@feedmepos/mf-media 0.0.9 → 0.0.10-dev.2
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.
- package/dist/AiStudio-9f9c1203.js +797 -0
- package/dist/AssetLibrary-7609684b.js +269 -0
- package/dist/app.js +388 -402
- package/dist/media-picker-cf281640.js +4297 -0
- package/dist/src/app.d.ts +7 -0
- package/dist/tsconfig.app.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/dist/AiStudio-a4b7098a.js +0 -792
- package/dist/AssetLibrary-4c2864d0.js +0 -285
- package/dist/media-picker-e86c4195.js +0 -4207
|
@@ -1,4207 +0,0 @@
|
|
|
1
|
-
import { defineComponent as ue, resolveComponent as I, openBlock as x, createElementBlock as S, toDisplayString as P, unref as B, createElementVNode as b, Fragment as z, renderList as le, normalizeClass as X, withModifiers as nt, createBlock as ee, createCommentVNode as U, createVNode as F, ref as N, withDirectives as Rn, withKeys as En, vModelText as Tn, computed as W, withCtx as xe, createTextVNode as oe, onScopeDispose as Sn, watch as be, mergeModels as it, useModel as Jt } from "vue";
|
|
2
|
-
import { useI18n as ce, useCoreStore as On } from "@feedmepos/mf-common";
|
|
3
|
-
import { useDialog as Cn } from "@feedmepos/ui-library";
|
|
4
|
-
function Wt(e, t) {
|
|
5
|
-
return function() {
|
|
6
|
-
return e.apply(t, arguments);
|
|
7
|
-
};
|
|
8
|
-
}
|
|
9
|
-
const { toString: Bn } = Object.prototype, { getPrototypeOf: Ee } = Object, { iterator: Ne, toStringTag: Kt } = Symbol, Je = (({ hasOwnProperty: e }) => (t, n) => e.call(t, n))(Object.prototype), Le = (e, t) => {
|
|
10
|
-
let n = e;
|
|
11
|
-
const a = [];
|
|
12
|
-
for (; n != null && n !== Object.prototype; ) {
|
|
13
|
-
if (a.indexOf(n) !== -1)
|
|
14
|
-
return !1;
|
|
15
|
-
if (a.push(n), Je(n, t))
|
|
16
|
-
return !0;
|
|
17
|
-
n = Ee(n);
|
|
18
|
-
}
|
|
19
|
-
return !1;
|
|
20
|
-
}, _n = (e, t) => e != null && Le(e, t) ? e[t] : void 0, ft = ((e) => (t) => {
|
|
21
|
-
const n = Bn.call(t);
|
|
22
|
-
return e[n] || (e[n] = n.slice(8, -1).toLowerCase());
|
|
23
|
-
})(/* @__PURE__ */ Object.create(null)), se = (e) => (e = e.toLowerCase(), (t) => ft(t) === e), Ye = (e) => (t) => typeof t === e, { isArray: ke } = Array, Te = Ye("undefined");
|
|
24
|
-
function Se(e) {
|
|
25
|
-
return e !== null && !Te(e) && e.constructor !== null && !Te(e.constructor) && Q(e.constructor.isBuffer) && e.constructor.isBuffer(e);
|
|
26
|
-
}
|
|
27
|
-
const Xt = se("ArrayBuffer");
|
|
28
|
-
function An(e) {
|
|
29
|
-
let t;
|
|
30
|
-
return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? t = ArrayBuffer.isView(e) : t = e && e.buffer && Xt(e.buffer), t;
|
|
31
|
-
}
|
|
32
|
-
const Dn = Ye("string"), Q = Ye("function"), Yt = Ye("number"), Oe = (e) => e !== null && typeof e == "object", Fn = (e) => e === !0 || e === !1, qe = (e) => {
|
|
33
|
-
if (!Oe(e))
|
|
34
|
-
return !1;
|
|
35
|
-
const t = Ee(e);
|
|
36
|
-
return (t === null || t === Object.prototype || Ee(t) === null) && // Treat any genuine (non-Object.prototype-polluted) Symbol.toStringTag or
|
|
37
|
-
// Symbol.iterator as evidence the value is a tagged/iterable type rather
|
|
38
|
-
// than a plain object, while ignoring keys injected onto Object.prototype.
|
|
39
|
-
!Le(e, Kt) && !Le(e, Ne);
|
|
40
|
-
}, Ln = (e) => {
|
|
41
|
-
if (!Oe(e) || Se(e))
|
|
42
|
-
return !1;
|
|
43
|
-
try {
|
|
44
|
-
return Object.keys(e).length === 0 && Object.getPrototypeOf(e) === Object.prototype;
|
|
45
|
-
} catch {
|
|
46
|
-
return !1;
|
|
47
|
-
}
|
|
48
|
-
}, Nn = se("Date"), Un = se("File"), jn = (e) => !!(e && typeof e.uri < "u"), In = (e) => e && typeof e.getParts < "u", Mn = se("Blob"), zn = se("FileList"), Vn = (e) => Oe(e) && Q(e.pipe);
|
|
49
|
-
function qn() {
|
|
50
|
-
return typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : typeof global < "u" ? global : {};
|
|
51
|
-
}
|
|
52
|
-
const Ot = qn(), Ct = typeof Ot.FormData < "u" ? Ot.FormData : void 0, $n = (e) => {
|
|
53
|
-
if (!e)
|
|
54
|
-
return !1;
|
|
55
|
-
if (Ct && e instanceof Ct)
|
|
56
|
-
return !0;
|
|
57
|
-
const t = Ee(e);
|
|
58
|
-
if (!t || t === Object.prototype || !Q(e.append))
|
|
59
|
-
return !1;
|
|
60
|
-
const n = ft(e);
|
|
61
|
-
return n === "formdata" || // detect form-data instance
|
|
62
|
-
n === "object" && Q(e.toString) && e.toString() === "[object FormData]";
|
|
63
|
-
}, Gn = se("URLSearchParams"), [Hn, Jn, Wn, Kn] = [
|
|
64
|
-
"ReadableStream",
|
|
65
|
-
"Request",
|
|
66
|
-
"Response",
|
|
67
|
-
"Headers"
|
|
68
|
-
].map(se), Xn = (e) => e.trim ? e.trim() : e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
|
|
69
|
-
function Ue(e, t, { allOwnKeys: n = !1 } = {}) {
|
|
70
|
-
if (e === null || typeof e > "u")
|
|
71
|
-
return;
|
|
72
|
-
let a, r;
|
|
73
|
-
if (typeof e != "object" && (e = [e]), ke(e))
|
|
74
|
-
for (a = 0, r = e.length; a < r; a++)
|
|
75
|
-
t.call(null, e[a], a, e);
|
|
76
|
-
else {
|
|
77
|
-
if (Se(e))
|
|
78
|
-
return;
|
|
79
|
-
const o = n ? Object.getOwnPropertyNames(e) : Object.keys(e), s = o.length;
|
|
80
|
-
let i;
|
|
81
|
-
for (a = 0; a < s; a++)
|
|
82
|
-
i = o[a], t.call(null, e[i], i, e);
|
|
83
|
-
}
|
|
84
|
-
}
|
|
85
|
-
function Qt(e, t) {
|
|
86
|
-
if (Se(e))
|
|
87
|
-
return null;
|
|
88
|
-
t = t.toLowerCase();
|
|
89
|
-
const n = Object.keys(e);
|
|
90
|
-
let a = n.length, r;
|
|
91
|
-
for (; a-- > 0; )
|
|
92
|
-
if (r = n[a], t === r.toLowerCase())
|
|
93
|
-
return r;
|
|
94
|
-
return null;
|
|
95
|
-
}
|
|
96
|
-
const we = (() => typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global)(), Zt = (e) => !Te(e) && e !== we;
|
|
97
|
-
function lt(...e) {
|
|
98
|
-
const { caseless: t, skipUndefined: n } = Zt(this) && this || {}, a = {}, r = (o, s) => {
|
|
99
|
-
if (s === "__proto__" || s === "constructor" || s === "prototype")
|
|
100
|
-
return;
|
|
101
|
-
const i = t && typeof s == "string" && Qt(a, s) || s, u = Je(a, i) ? a[i] : void 0;
|
|
102
|
-
qe(u) && qe(o) ? a[i] = lt(u, o) : qe(o) ? a[i] = lt({}, o) : ke(o) ? a[i] = o.slice() : (!n || !Te(o)) && (a[i] = o);
|
|
103
|
-
};
|
|
104
|
-
for (let o = 0, s = e.length; o < s; o++) {
|
|
105
|
-
const i = e[o];
|
|
106
|
-
if (!i || Se(i) || (Ue(i, r), typeof i != "object" || ke(i)))
|
|
107
|
-
continue;
|
|
108
|
-
const u = Object.getOwnPropertySymbols(i);
|
|
109
|
-
for (let d = 0; d < u.length; d++) {
|
|
110
|
-
const c = u[d];
|
|
111
|
-
la.call(i, c) && r(i[c], c);
|
|
112
|
-
}
|
|
113
|
-
}
|
|
114
|
-
return a;
|
|
115
|
-
}
|
|
116
|
-
const Yn = (e, t, n, { allOwnKeys: a } = {}) => (Ue(
|
|
117
|
-
t,
|
|
118
|
-
(r, o) => {
|
|
119
|
-
n && Q(r) ? Object.defineProperty(e, o, {
|
|
120
|
-
// Null-proto descriptor so a polluted Object.prototype.get cannot
|
|
121
|
-
// hijack defineProperty's accessor-vs-data resolution.
|
|
122
|
-
__proto__: null,
|
|
123
|
-
value: Wt(r, n),
|
|
124
|
-
writable: !0,
|
|
125
|
-
enumerable: !0,
|
|
126
|
-
configurable: !0
|
|
127
|
-
}) : Object.defineProperty(e, o, {
|
|
128
|
-
__proto__: null,
|
|
129
|
-
value: r,
|
|
130
|
-
writable: !0,
|
|
131
|
-
enumerable: !0,
|
|
132
|
-
configurable: !0
|
|
133
|
-
});
|
|
134
|
-
},
|
|
135
|
-
{ allOwnKeys: a }
|
|
136
|
-
), e), Qn = (e) => (e.charCodeAt(0) === 65279 && (e = e.slice(1)), e), Zn = (e, t, n, a) => {
|
|
137
|
-
e.prototype = Object.create(t.prototype, a), Object.defineProperty(e.prototype, "constructor", {
|
|
138
|
-
__proto__: null,
|
|
139
|
-
value: e,
|
|
140
|
-
writable: !0,
|
|
141
|
-
enumerable: !1,
|
|
142
|
-
configurable: !0
|
|
143
|
-
}), Object.defineProperty(e, "super", {
|
|
144
|
-
__proto__: null,
|
|
145
|
-
value: t.prototype
|
|
146
|
-
}), n && Object.assign(e.prototype, n);
|
|
147
|
-
}, ea = (e, t, n, a) => {
|
|
148
|
-
let r, o, s;
|
|
149
|
-
const i = {};
|
|
150
|
-
if (t = t || {}, e == null)
|
|
151
|
-
return t;
|
|
152
|
-
do {
|
|
153
|
-
for (r = Object.getOwnPropertyNames(e), o = r.length; o-- > 0; )
|
|
154
|
-
s = r[o], (!a || a(s, e, t)) && !i[s] && (t[s] = e[s], i[s] = !0);
|
|
155
|
-
e = n !== !1 && Ee(e);
|
|
156
|
-
} while (e && (!n || n(e, t)) && e !== Object.prototype);
|
|
157
|
-
return t;
|
|
158
|
-
}, ta = (e, t, n) => {
|
|
159
|
-
e = String(e), (n === void 0 || n > e.length) && (n = e.length), n -= t.length;
|
|
160
|
-
const a = e.indexOf(t, n);
|
|
161
|
-
return a !== -1 && a === n;
|
|
162
|
-
}, na = (e) => {
|
|
163
|
-
if (!e)
|
|
164
|
-
return null;
|
|
165
|
-
if (ke(e))
|
|
166
|
-
return e;
|
|
167
|
-
let t = e.length;
|
|
168
|
-
if (!Yt(t))
|
|
169
|
-
return null;
|
|
170
|
-
const n = new Array(t);
|
|
171
|
-
for (; t-- > 0; )
|
|
172
|
-
n[t] = e[t];
|
|
173
|
-
return n;
|
|
174
|
-
}, aa = ((e) => (t) => e && t instanceof e)(typeof Uint8Array < "u" && Ee(Uint8Array)), ra = (e, t) => {
|
|
175
|
-
const n = (e && e[Ne]).call(e);
|
|
176
|
-
let a;
|
|
177
|
-
for (; (a = n.next()) && !a.done; ) {
|
|
178
|
-
const r = a.value;
|
|
179
|
-
t.call(e, r[0], r[1]);
|
|
180
|
-
}
|
|
181
|
-
}, oa = (e, t) => {
|
|
182
|
-
let n;
|
|
183
|
-
const a = [];
|
|
184
|
-
for (; (n = e.exec(t)) !== null; )
|
|
185
|
-
a.push(n);
|
|
186
|
-
return a;
|
|
187
|
-
}, sa = se("HTMLFormElement"), ia = (e) => e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g, function(t, n, a) {
|
|
188
|
-
return n.toUpperCase() + a;
|
|
189
|
-
}), { propertyIsEnumerable: la } = Object.prototype, ua = se("RegExp"), en = (e, t) => {
|
|
190
|
-
const n = Object.getOwnPropertyDescriptors(e), a = {};
|
|
191
|
-
Ue(n, (r, o) => {
|
|
192
|
-
let s;
|
|
193
|
-
(s = t(r, o, e)) !== !1 && (a[o] = s || r);
|
|
194
|
-
}), Object.defineProperties(e, a);
|
|
195
|
-
}, ca = (e) => {
|
|
196
|
-
en(e, (t, n) => {
|
|
197
|
-
if (Q(e) && ["arguments", "caller", "callee"].includes(n))
|
|
198
|
-
return !1;
|
|
199
|
-
const a = e[n];
|
|
200
|
-
if (Q(a)) {
|
|
201
|
-
if (t.enumerable = !1, "writable" in t) {
|
|
202
|
-
t.writable = !1;
|
|
203
|
-
return;
|
|
204
|
-
}
|
|
205
|
-
t.set || (t.set = () => {
|
|
206
|
-
throw Error("Can not rewrite read-only method '" + n + "'");
|
|
207
|
-
});
|
|
208
|
-
}
|
|
209
|
-
});
|
|
210
|
-
}, da = (e, t) => {
|
|
211
|
-
const n = {}, a = (r) => {
|
|
212
|
-
r.forEach((o) => {
|
|
213
|
-
n[o] = !0;
|
|
214
|
-
});
|
|
215
|
-
};
|
|
216
|
-
return ke(e) ? a(e) : a(String(e).split(t)), n;
|
|
217
|
-
}, pa = () => {
|
|
218
|
-
}, fa = (e, t) => e != null && Number.isFinite(e = +e) ? e : t;
|
|
219
|
-
function ma(e) {
|
|
220
|
-
return !!(e && Q(e.append) && e[Kt] === "FormData" && e[Ne]);
|
|
221
|
-
}
|
|
222
|
-
const ga = (e) => {
|
|
223
|
-
const t = /* @__PURE__ */ new WeakSet(), n = (a) => {
|
|
224
|
-
if (Oe(a)) {
|
|
225
|
-
if (t.has(a))
|
|
226
|
-
return;
|
|
227
|
-
if (Se(a))
|
|
228
|
-
return a;
|
|
229
|
-
if (!("toJSON" in a)) {
|
|
230
|
-
t.add(a);
|
|
231
|
-
const r = ke(a) ? [] : {};
|
|
232
|
-
return Ue(a, (o, s) => {
|
|
233
|
-
const i = n(o);
|
|
234
|
-
!Te(i) && (r[s] = i);
|
|
235
|
-
}), t.delete(a), r;
|
|
236
|
-
}
|
|
237
|
-
}
|
|
238
|
-
return a;
|
|
239
|
-
};
|
|
240
|
-
return n(e);
|
|
241
|
-
}, ha = se("AsyncFunction"), ba = (e) => e && (Oe(e) || Q(e)) && Q(e.then) && Q(e.catch), tn = ((e, t) => e ? setImmediate : t ? ((n, a) => (we.addEventListener(
|
|
242
|
-
"message",
|
|
243
|
-
({ source: r, data: o }) => {
|
|
244
|
-
r === we && o === n && a.length && a.shift()();
|
|
245
|
-
},
|
|
246
|
-
!1
|
|
247
|
-
), (r) => {
|
|
248
|
-
a.push(r), we.postMessage(n, "*");
|
|
249
|
-
}))(`axios@${Math.random()}`, []) : (n) => setTimeout(n))(typeof setImmediate == "function", Q(we.postMessage)), ya = typeof queueMicrotask < "u" ? queueMicrotask.bind(we) : typeof process < "u" && process.nextTick || tn, nn = (e) => e != null && Q(e[Ne]), va = (e) => e != null && Le(e, Ne) && nn(e), l = {
|
|
250
|
-
isArray: ke,
|
|
251
|
-
isArrayBuffer: Xt,
|
|
252
|
-
isBuffer: Se,
|
|
253
|
-
isFormData: $n,
|
|
254
|
-
isArrayBufferView: An,
|
|
255
|
-
isString: Dn,
|
|
256
|
-
isNumber: Yt,
|
|
257
|
-
isBoolean: Fn,
|
|
258
|
-
isObject: Oe,
|
|
259
|
-
isPlainObject: qe,
|
|
260
|
-
isEmptyObject: Ln,
|
|
261
|
-
isReadableStream: Hn,
|
|
262
|
-
isRequest: Jn,
|
|
263
|
-
isResponse: Wn,
|
|
264
|
-
isHeaders: Kn,
|
|
265
|
-
isUndefined: Te,
|
|
266
|
-
isDate: Nn,
|
|
267
|
-
isFile: Un,
|
|
268
|
-
isReactNativeBlob: jn,
|
|
269
|
-
isReactNative: In,
|
|
270
|
-
isBlob: Mn,
|
|
271
|
-
isRegExp: ua,
|
|
272
|
-
isFunction: Q,
|
|
273
|
-
isStream: Vn,
|
|
274
|
-
isURLSearchParams: Gn,
|
|
275
|
-
isTypedArray: aa,
|
|
276
|
-
isFileList: zn,
|
|
277
|
-
forEach: Ue,
|
|
278
|
-
merge: lt,
|
|
279
|
-
extend: Yn,
|
|
280
|
-
trim: Xn,
|
|
281
|
-
stripBOM: Qn,
|
|
282
|
-
inherits: Zn,
|
|
283
|
-
toFlatObject: ea,
|
|
284
|
-
kindOf: ft,
|
|
285
|
-
kindOfTest: se,
|
|
286
|
-
endsWith: ta,
|
|
287
|
-
toArray: na,
|
|
288
|
-
forEachEntry: ra,
|
|
289
|
-
matchAll: oa,
|
|
290
|
-
isHTMLForm: sa,
|
|
291
|
-
hasOwnProperty: Je,
|
|
292
|
-
hasOwnProp: Je,
|
|
293
|
-
// an alias to avoid ESLint no-prototype-builtins detection
|
|
294
|
-
hasOwnInPrototypeChain: Le,
|
|
295
|
-
getSafeProp: _n,
|
|
296
|
-
reduceDescriptors: en,
|
|
297
|
-
freezeMethods: ca,
|
|
298
|
-
toObjectSet: da,
|
|
299
|
-
toCamelCase: ia,
|
|
300
|
-
noop: pa,
|
|
301
|
-
toFiniteNumber: fa,
|
|
302
|
-
findKey: Qt,
|
|
303
|
-
global: we,
|
|
304
|
-
isContextDefined: Zt,
|
|
305
|
-
isSpecCompliantForm: ma,
|
|
306
|
-
toJSONObject: ga,
|
|
307
|
-
isAsyncFn: ha,
|
|
308
|
-
isThenable: ba,
|
|
309
|
-
setImmediate: tn,
|
|
310
|
-
asap: ya,
|
|
311
|
-
isIterable: nn,
|
|
312
|
-
isSafeIterable: va
|
|
313
|
-
}, wa = l.toObjectSet([
|
|
314
|
-
"age",
|
|
315
|
-
"authorization",
|
|
316
|
-
"content-length",
|
|
317
|
-
"content-type",
|
|
318
|
-
"etag",
|
|
319
|
-
"expires",
|
|
320
|
-
"from",
|
|
321
|
-
"host",
|
|
322
|
-
"if-modified-since",
|
|
323
|
-
"if-unmodified-since",
|
|
324
|
-
"last-modified",
|
|
325
|
-
"location",
|
|
326
|
-
"max-forwards",
|
|
327
|
-
"proxy-authorization",
|
|
328
|
-
"referer",
|
|
329
|
-
"retry-after",
|
|
330
|
-
"user-agent"
|
|
331
|
-
]), xa = (e) => {
|
|
332
|
-
const t = {};
|
|
333
|
-
let n, a, r;
|
|
334
|
-
return e && e.split(`
|
|
335
|
-
`).forEach(function(o) {
|
|
336
|
-
r = o.indexOf(":"), n = o.substring(0, r).trim().toLowerCase(), a = o.substring(r + 1).trim(), !(!n || t[n] && wa[n]) && (n === "set-cookie" ? t[n] ? t[n].push(a) : t[n] = [a] : t[n] = t[n] ? t[n] + ", " + a : a);
|
|
337
|
-
}), t;
|
|
338
|
-
};
|
|
339
|
-
function ka(e) {
|
|
340
|
-
let t = 0, n = e.length;
|
|
341
|
-
for (; t < n; ) {
|
|
342
|
-
const a = e.charCodeAt(t);
|
|
343
|
-
if (a !== 9 && a !== 32)
|
|
344
|
-
break;
|
|
345
|
-
t += 1;
|
|
346
|
-
}
|
|
347
|
-
for (; n > t; ) {
|
|
348
|
-
const a = e.charCodeAt(n - 1);
|
|
349
|
-
if (a !== 9 && a !== 32)
|
|
350
|
-
break;
|
|
351
|
-
n -= 1;
|
|
352
|
-
}
|
|
353
|
-
return t === 0 && n === e.length ? e : e.slice(t, n);
|
|
354
|
-
}
|
|
355
|
-
const Pa = new RegExp("[\\u0000-\\u0008\\u000a-\\u001f\\u007f]+", "g"), Ra = new RegExp("[^\\u0009\\u0020-\\u007e\\u0080-\\u00ff]+", "g");
|
|
356
|
-
function mt(e, t) {
|
|
357
|
-
return l.isArray(e) ? e.map((n) => mt(n, t)) : ka(String(e).replace(t, ""));
|
|
358
|
-
}
|
|
359
|
-
const Ea = (e) => mt(e, Pa), Ta = (e) => mt(e, Ra);
|
|
360
|
-
function an(e) {
|
|
361
|
-
const t = /* @__PURE__ */ Object.create(null);
|
|
362
|
-
return l.forEach(e.toJSON(), (n, a) => {
|
|
363
|
-
t[a] = Ta(n);
|
|
364
|
-
}), t;
|
|
365
|
-
}
|
|
366
|
-
const Bt = Symbol("internals");
|
|
367
|
-
function Fe(e) {
|
|
368
|
-
return e && String(e).trim().toLowerCase();
|
|
369
|
-
}
|
|
370
|
-
function $e(e) {
|
|
371
|
-
return e === !1 || e == null ? e : l.isArray(e) ? e.map($e) : Ea(String(e));
|
|
372
|
-
}
|
|
373
|
-
function Sa(e) {
|
|
374
|
-
const t = /* @__PURE__ */ Object.create(null), n = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;
|
|
375
|
-
let a;
|
|
376
|
-
for (; a = n.exec(e); )
|
|
377
|
-
t[a[1]] = a[2];
|
|
378
|
-
return t;
|
|
379
|
-
}
|
|
380
|
-
const Oa = (e) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());
|
|
381
|
-
function at(e, t, n, a, r) {
|
|
382
|
-
if (l.isFunction(a))
|
|
383
|
-
return a.call(this, t, n);
|
|
384
|
-
if (r && (t = n), !!l.isString(t)) {
|
|
385
|
-
if (l.isString(a))
|
|
386
|
-
return t.indexOf(a) !== -1;
|
|
387
|
-
if (l.isRegExp(a))
|
|
388
|
-
return a.test(t);
|
|
389
|
-
}
|
|
390
|
-
}
|
|
391
|
-
function Ca(e) {
|
|
392
|
-
return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, (t, n, a) => n.toUpperCase() + a);
|
|
393
|
-
}
|
|
394
|
-
function Ba(e, t) {
|
|
395
|
-
const n = l.toCamelCase(" " + t);
|
|
396
|
-
["get", "set", "has"].forEach((a) => {
|
|
397
|
-
Object.defineProperty(e, a + n, {
|
|
398
|
-
// Null-proto descriptor so a polluted Object.prototype.get cannot turn
|
|
399
|
-
// this data descriptor into an accessor descriptor on the way in.
|
|
400
|
-
__proto__: null,
|
|
401
|
-
value: function(r, o, s) {
|
|
402
|
-
return this[a].call(this, t, r, o, s);
|
|
403
|
-
},
|
|
404
|
-
configurable: !0
|
|
405
|
-
});
|
|
406
|
-
});
|
|
407
|
-
}
|
|
408
|
-
class Qe {
|
|
409
|
-
constructor(t) {
|
|
410
|
-
t && this.set(t);
|
|
411
|
-
}
|
|
412
|
-
set(t, n, a) {
|
|
413
|
-
const r = this;
|
|
414
|
-
function o(i, u, d) {
|
|
415
|
-
const c = Fe(u);
|
|
416
|
-
if (!c)
|
|
417
|
-
return;
|
|
418
|
-
const p = l.findKey(r, c);
|
|
419
|
-
(!p || r[p] === void 0 || d === !0 || d === void 0 && r[p] !== !1) && (r[p || u] = $e(i));
|
|
420
|
-
}
|
|
421
|
-
const s = (i, u) => l.forEach(i, (d, c) => o(d, c, u));
|
|
422
|
-
if (l.isPlainObject(t) || t instanceof this.constructor)
|
|
423
|
-
s(t, n);
|
|
424
|
-
else if (l.isString(t) && (t = t.trim()) && !Oa(t))
|
|
425
|
-
s(xa(t), n);
|
|
426
|
-
else if (l.isObject(t) && l.isSafeIterable(t)) {
|
|
427
|
-
let i = /* @__PURE__ */ Object.create(null), u, d;
|
|
428
|
-
for (const c of t) {
|
|
429
|
-
if (!l.isArray(c))
|
|
430
|
-
throw new TypeError("Object iterator must return a key-value pair");
|
|
431
|
-
d = c[0], l.hasOwnProp(i, d) ? (u = i[d], i[d] = l.isArray(u) ? [...u, c[1]] : [u, c[1]]) : i[d] = c[1];
|
|
432
|
-
}
|
|
433
|
-
s(i, n);
|
|
434
|
-
} else
|
|
435
|
-
t != null && o(n, t, a);
|
|
436
|
-
return this;
|
|
437
|
-
}
|
|
438
|
-
get(t, n) {
|
|
439
|
-
if (t = Fe(t), t) {
|
|
440
|
-
const a = l.findKey(this, t);
|
|
441
|
-
if (a) {
|
|
442
|
-
const r = this[a];
|
|
443
|
-
if (!n)
|
|
444
|
-
return r;
|
|
445
|
-
if (n === !0)
|
|
446
|
-
return Sa(r);
|
|
447
|
-
if (l.isFunction(n))
|
|
448
|
-
return n.call(this, r, a);
|
|
449
|
-
if (l.isRegExp(n))
|
|
450
|
-
return n.exec(r);
|
|
451
|
-
throw new TypeError("parser must be boolean|regexp|function");
|
|
452
|
-
}
|
|
453
|
-
}
|
|
454
|
-
}
|
|
455
|
-
has(t, n) {
|
|
456
|
-
if (t = Fe(t), t) {
|
|
457
|
-
const a = l.findKey(this, t);
|
|
458
|
-
return !!(a && this[a] !== void 0 && (!n || at(this, this[a], a, n)));
|
|
459
|
-
}
|
|
460
|
-
return !1;
|
|
461
|
-
}
|
|
462
|
-
delete(t, n) {
|
|
463
|
-
const a = this;
|
|
464
|
-
let r = !1;
|
|
465
|
-
function o(s) {
|
|
466
|
-
if (s = Fe(s), s) {
|
|
467
|
-
const i = l.findKey(a, s);
|
|
468
|
-
i && (!n || at(a, a[i], i, n)) && (delete a[i], r = !0);
|
|
469
|
-
}
|
|
470
|
-
}
|
|
471
|
-
return l.isArray(t) ? t.forEach(o) : o(t), r;
|
|
472
|
-
}
|
|
473
|
-
clear(t) {
|
|
474
|
-
const n = Object.keys(this);
|
|
475
|
-
let a = n.length, r = !1;
|
|
476
|
-
for (; a--; ) {
|
|
477
|
-
const o = n[a];
|
|
478
|
-
(!t || at(this, this[o], o, t, !0)) && (delete this[o], r = !0);
|
|
479
|
-
}
|
|
480
|
-
return r;
|
|
481
|
-
}
|
|
482
|
-
normalize(t) {
|
|
483
|
-
const n = this, a = {};
|
|
484
|
-
return l.forEach(this, (r, o) => {
|
|
485
|
-
const s = l.findKey(a, o);
|
|
486
|
-
if (s) {
|
|
487
|
-
n[s] = $e(r), delete n[o];
|
|
488
|
-
return;
|
|
489
|
-
}
|
|
490
|
-
const i = t ? Ca(o) : String(o).trim();
|
|
491
|
-
i !== o && delete n[o], n[i] = $e(r), a[i] = !0;
|
|
492
|
-
}), this;
|
|
493
|
-
}
|
|
494
|
-
concat(...t) {
|
|
495
|
-
return this.constructor.concat(this, ...t);
|
|
496
|
-
}
|
|
497
|
-
toJSON(t) {
|
|
498
|
-
const n = /* @__PURE__ */ Object.create(null);
|
|
499
|
-
return l.forEach(this, (a, r) => {
|
|
500
|
-
a != null && a !== !1 && (n[r] = t && l.isArray(a) ? a.join(", ") : a);
|
|
501
|
-
}), n;
|
|
502
|
-
}
|
|
503
|
-
[Symbol.iterator]() {
|
|
504
|
-
return Object.entries(this.toJSON())[Symbol.iterator]();
|
|
505
|
-
}
|
|
506
|
-
toString() {
|
|
507
|
-
return Object.entries(this.toJSON()).map(([t, n]) => t + ": " + n).join(`
|
|
508
|
-
`);
|
|
509
|
-
}
|
|
510
|
-
getSetCookie() {
|
|
511
|
-
return this.get("set-cookie") || [];
|
|
512
|
-
}
|
|
513
|
-
get [Symbol.toStringTag]() {
|
|
514
|
-
return "AxiosHeaders";
|
|
515
|
-
}
|
|
516
|
-
static from(t) {
|
|
517
|
-
return t instanceof this ? t : new this(t);
|
|
518
|
-
}
|
|
519
|
-
static concat(t, ...n) {
|
|
520
|
-
const a = new this(t);
|
|
521
|
-
return n.forEach((r) => a.set(r)), a;
|
|
522
|
-
}
|
|
523
|
-
static accessor(t) {
|
|
524
|
-
const n = (this[Bt] = this[Bt] = {
|
|
525
|
-
accessors: {}
|
|
526
|
-
}).accessors, a = this.prototype;
|
|
527
|
-
function r(o) {
|
|
528
|
-
const s = Fe(o);
|
|
529
|
-
n[s] || (Ba(a, o), n[s] = !0);
|
|
530
|
-
}
|
|
531
|
-
return l.isArray(t) ? t.forEach(r) : r(t), this;
|
|
532
|
-
}
|
|
533
|
-
}
|
|
534
|
-
Qe.accessor([
|
|
535
|
-
"Content-Type",
|
|
536
|
-
"Content-Length",
|
|
537
|
-
"Accept",
|
|
538
|
-
"Accept-Encoding",
|
|
539
|
-
"User-Agent",
|
|
540
|
-
"Authorization"
|
|
541
|
-
]);
|
|
542
|
-
l.reduceDescriptors(Qe.prototype, ({ value: e }, t) => {
|
|
543
|
-
let n = t[0].toUpperCase() + t.slice(1);
|
|
544
|
-
return {
|
|
545
|
-
get: () => e,
|
|
546
|
-
set(a) {
|
|
547
|
-
this[n] = a;
|
|
548
|
-
}
|
|
549
|
-
};
|
|
550
|
-
});
|
|
551
|
-
l.freezeMethods(Qe);
|
|
552
|
-
const te = Qe, _a = "[REDACTED ****]";
|
|
553
|
-
function Aa(e) {
|
|
554
|
-
if (l.hasOwnProp(e, "toJSON"))
|
|
555
|
-
return !0;
|
|
556
|
-
let t = Object.getPrototypeOf(e);
|
|
557
|
-
for (; t && t !== Object.prototype; ) {
|
|
558
|
-
if (l.hasOwnProp(t, "toJSON"))
|
|
559
|
-
return !0;
|
|
560
|
-
t = Object.getPrototypeOf(t);
|
|
561
|
-
}
|
|
562
|
-
return !1;
|
|
563
|
-
}
|
|
564
|
-
function Da(e, t) {
|
|
565
|
-
const n = new Set(t.map((o) => String(o).toLowerCase())), a = [], r = (o) => {
|
|
566
|
-
if (o === null || typeof o != "object" || l.isBuffer(o))
|
|
567
|
-
return o;
|
|
568
|
-
if (a.indexOf(o) !== -1)
|
|
569
|
-
return;
|
|
570
|
-
o instanceof te && (o = o.toJSON()), a.push(o);
|
|
571
|
-
let s;
|
|
572
|
-
if (l.isArray(o))
|
|
573
|
-
s = [], o.forEach((i, u) => {
|
|
574
|
-
const d = r(i);
|
|
575
|
-
l.isUndefined(d) || (s[u] = d);
|
|
576
|
-
});
|
|
577
|
-
else {
|
|
578
|
-
if (!l.isPlainObject(o) && Aa(o))
|
|
579
|
-
return a.pop(), o;
|
|
580
|
-
s = /* @__PURE__ */ Object.create(null);
|
|
581
|
-
for (const [i, u] of Object.entries(o)) {
|
|
582
|
-
const d = n.has(i.toLowerCase()) ? _a : r(u);
|
|
583
|
-
l.isUndefined(d) || (s[i] = d);
|
|
584
|
-
}
|
|
585
|
-
}
|
|
586
|
-
return a.pop(), s;
|
|
587
|
-
};
|
|
588
|
-
return r(e);
|
|
589
|
-
}
|
|
590
|
-
class G extends Error {
|
|
591
|
-
static from(t, n, a, r, o, s) {
|
|
592
|
-
const i = new G(t.message, n || t.code, a, r, o);
|
|
593
|
-
return Object.defineProperty(i, "cause", {
|
|
594
|
-
__proto__: null,
|
|
595
|
-
value: t,
|
|
596
|
-
writable: !0,
|
|
597
|
-
enumerable: !1,
|
|
598
|
-
configurable: !0
|
|
599
|
-
}), i.name = t.name, t.status != null && i.status == null && (i.status = t.status), s && Object.assign(i, s), i;
|
|
600
|
-
}
|
|
601
|
-
/**
|
|
602
|
-
* Create an Error with the specified message, config, error code, request and response.
|
|
603
|
-
*
|
|
604
|
-
* @param {string} message The error message.
|
|
605
|
-
* @param {string} [code] The error code (for example, 'ECONNABORTED').
|
|
606
|
-
* @param {Object} [config] The config.
|
|
607
|
-
* @param {Object} [request] The request.
|
|
608
|
-
* @param {Object} [response] The response.
|
|
609
|
-
*
|
|
610
|
-
* @returns {Error} The created error.
|
|
611
|
-
*/
|
|
612
|
-
constructor(t, n, a, r, o) {
|
|
613
|
-
super(t), Object.defineProperty(this, "message", {
|
|
614
|
-
// Null-proto descriptor so a polluted Object.prototype.get cannot turn
|
|
615
|
-
// this data descriptor into an accessor descriptor on the way in.
|
|
616
|
-
__proto__: null,
|
|
617
|
-
value: t,
|
|
618
|
-
enumerable: !0,
|
|
619
|
-
writable: !0,
|
|
620
|
-
configurable: !0
|
|
621
|
-
}), this.name = "AxiosError", this.isAxiosError = !0, n && (this.code = n), a && (this.config = a), r && (this.request = r), o && (this.response = o, this.status = o.status);
|
|
622
|
-
}
|
|
623
|
-
toJSON() {
|
|
624
|
-
const t = this.config, n = t && l.hasOwnProp(t, "redact") ? t.redact : void 0, a = l.isArray(n) && n.length > 0 ? Da(t, n) : l.toJSONObject(t);
|
|
625
|
-
return {
|
|
626
|
-
// Standard
|
|
627
|
-
message: this.message,
|
|
628
|
-
name: this.name,
|
|
629
|
-
// Microsoft
|
|
630
|
-
description: this.description,
|
|
631
|
-
number: this.number,
|
|
632
|
-
// Mozilla
|
|
633
|
-
fileName: this.fileName,
|
|
634
|
-
lineNumber: this.lineNumber,
|
|
635
|
-
columnNumber: this.columnNumber,
|
|
636
|
-
stack: this.stack,
|
|
637
|
-
// Axios
|
|
638
|
-
config: a,
|
|
639
|
-
code: this.code,
|
|
640
|
-
status: this.status
|
|
641
|
-
};
|
|
642
|
-
}
|
|
643
|
-
}
|
|
644
|
-
G.ERR_BAD_OPTION_VALUE = "ERR_BAD_OPTION_VALUE";
|
|
645
|
-
G.ERR_BAD_OPTION = "ERR_BAD_OPTION";
|
|
646
|
-
G.ECONNABORTED = "ECONNABORTED";
|
|
647
|
-
G.ETIMEDOUT = "ETIMEDOUT";
|
|
648
|
-
G.ECONNREFUSED = "ECONNREFUSED";
|
|
649
|
-
G.ERR_NETWORK = "ERR_NETWORK";
|
|
650
|
-
G.ERR_FR_TOO_MANY_REDIRECTS = "ERR_FR_TOO_MANY_REDIRECTS";
|
|
651
|
-
G.ERR_DEPRECATED = "ERR_DEPRECATED";
|
|
652
|
-
G.ERR_BAD_RESPONSE = "ERR_BAD_RESPONSE";
|
|
653
|
-
G.ERR_BAD_REQUEST = "ERR_BAD_REQUEST";
|
|
654
|
-
G.ERR_CANCELED = "ERR_CANCELED";
|
|
655
|
-
G.ERR_NOT_SUPPORT = "ERR_NOT_SUPPORT";
|
|
656
|
-
G.ERR_INVALID_URL = "ERR_INVALID_URL";
|
|
657
|
-
G.ERR_FORM_DATA_DEPTH_EXCEEDED = "ERR_FORM_DATA_DEPTH_EXCEEDED";
|
|
658
|
-
const T = G, Fa = null, rn = 100;
|
|
659
|
-
function ut(e) {
|
|
660
|
-
return l.isPlainObject(e) || l.isArray(e);
|
|
661
|
-
}
|
|
662
|
-
function on(e) {
|
|
663
|
-
return l.endsWith(e, "[]") ? e.slice(0, -2) : e;
|
|
664
|
-
}
|
|
665
|
-
function rt(e, t, n) {
|
|
666
|
-
return e ? e.concat(t).map(function(a, r) {
|
|
667
|
-
return a = on(a), !n && r ? "[" + a + "]" : a;
|
|
668
|
-
}).join(n ? "." : "") : t;
|
|
669
|
-
}
|
|
670
|
-
function La(e) {
|
|
671
|
-
return l.isArray(e) && !e.some(ut);
|
|
672
|
-
}
|
|
673
|
-
const Na = l.toFlatObject(l, {}, null, function(e) {
|
|
674
|
-
return /^is[A-Z]/.test(e);
|
|
675
|
-
});
|
|
676
|
-
function Ze(e, t, n) {
|
|
677
|
-
if (!l.isObject(e))
|
|
678
|
-
throw new TypeError("target must be an object");
|
|
679
|
-
t = t || new FormData(), n = l.toFlatObject(
|
|
680
|
-
n,
|
|
681
|
-
{
|
|
682
|
-
metaTokens: !0,
|
|
683
|
-
dots: !1,
|
|
684
|
-
indexes: !1
|
|
685
|
-
},
|
|
686
|
-
!1,
|
|
687
|
-
function(f, g) {
|
|
688
|
-
return !l.isUndefined(g[f]);
|
|
689
|
-
}
|
|
690
|
-
);
|
|
691
|
-
const a = n.metaTokens, r = n.visitor || h, o = n.dots, s = n.indexes, i = n.Blob || typeof Blob < "u" && Blob, u = n.maxDepth === void 0 ? rn : n.maxDepth, d = i && l.isSpecCompliantForm(t), c = [];
|
|
692
|
-
if (!l.isFunction(r))
|
|
693
|
-
throw new TypeError("visitor must be a function");
|
|
694
|
-
function p(f) {
|
|
695
|
-
if (f === null)
|
|
696
|
-
return "";
|
|
697
|
-
if (l.isDate(f))
|
|
698
|
-
return f.toISOString();
|
|
699
|
-
if (l.isBoolean(f))
|
|
700
|
-
return f.toString();
|
|
701
|
-
if (!d && l.isBlob(f))
|
|
702
|
-
throw new T("Blob is not supported. Use a Buffer instead.");
|
|
703
|
-
if (l.isArrayBuffer(f) || l.isTypedArray(f)) {
|
|
704
|
-
if (d && typeof i == "function")
|
|
705
|
-
return new i([f]);
|
|
706
|
-
if (typeof Buffer < "u")
|
|
707
|
-
return Buffer.from(f);
|
|
708
|
-
throw new T("Blob is not supported. Use a Buffer instead.", T.ERR_NOT_SUPPORT);
|
|
709
|
-
}
|
|
710
|
-
return f;
|
|
711
|
-
}
|
|
712
|
-
function y(f) {
|
|
713
|
-
if (f > u)
|
|
714
|
-
throw new T(
|
|
715
|
-
"Object is too deeply nested (" + f + " levels). Max depth: " + u,
|
|
716
|
-
T.ERR_FORM_DATA_DEPTH_EXCEEDED
|
|
717
|
-
);
|
|
718
|
-
}
|
|
719
|
-
function k(f, g) {
|
|
720
|
-
if (u === 1 / 0)
|
|
721
|
-
return JSON.stringify(f);
|
|
722
|
-
const m = [];
|
|
723
|
-
return JSON.stringify(f, function(O, w) {
|
|
724
|
-
if (!l.isObject(w))
|
|
725
|
-
return w;
|
|
726
|
-
for (; m.length && m[m.length - 1] !== this; )
|
|
727
|
-
m.pop();
|
|
728
|
-
return m.push(w), y(g + m.length - 1), w;
|
|
729
|
-
});
|
|
730
|
-
}
|
|
731
|
-
function h(f, g, m) {
|
|
732
|
-
let O = f;
|
|
733
|
-
if (l.isReactNative(t) && l.isReactNativeBlob(f))
|
|
734
|
-
return t.append(rt(m, g, o), p(f)), !1;
|
|
735
|
-
if (f && !m && typeof f == "object") {
|
|
736
|
-
if (l.endsWith(g, "{}"))
|
|
737
|
-
g = a ? g : g.slice(0, -2), f = k(f, 1);
|
|
738
|
-
else if (l.isArray(f) && La(f) || (l.isFileList(f) || l.endsWith(g, "[]")) && (O = l.toArray(f)))
|
|
739
|
-
return g = on(g), O.forEach(function(w, R) {
|
|
740
|
-
!(l.isUndefined(w) || w === null) && t.append(
|
|
741
|
-
// eslint-disable-next-line no-nested-ternary
|
|
742
|
-
s === !0 ? rt([g], R, o) : s === null ? g : g + "[]",
|
|
743
|
-
p(w)
|
|
744
|
-
);
|
|
745
|
-
}), !1;
|
|
746
|
-
}
|
|
747
|
-
return ut(f) ? !0 : (t.append(rt(m, g, o), p(f)), !1);
|
|
748
|
-
}
|
|
749
|
-
const v = Object.assign(Na, {
|
|
750
|
-
defaultVisitor: h,
|
|
751
|
-
convertValue: p,
|
|
752
|
-
isVisitable: ut
|
|
753
|
-
});
|
|
754
|
-
function A(f, g, m = 0) {
|
|
755
|
-
if (!l.isUndefined(f)) {
|
|
756
|
-
if (y(m), c.indexOf(f) !== -1)
|
|
757
|
-
throw new Error("Circular reference detected in " + g.join("."));
|
|
758
|
-
c.push(f), l.forEach(f, function(O, w) {
|
|
759
|
-
(!(l.isUndefined(O) || O === null) && r.call(t, O, l.isString(w) ? w.trim() : w, g, v)) === !0 && A(O, g ? g.concat(w) : [w], m + 1);
|
|
760
|
-
}), c.pop();
|
|
761
|
-
}
|
|
762
|
-
}
|
|
763
|
-
if (!l.isObject(e))
|
|
764
|
-
throw new TypeError("data must be an object");
|
|
765
|
-
return A(e), t;
|
|
766
|
-
}
|
|
767
|
-
function _t(e) {
|
|
768
|
-
const t = {
|
|
769
|
-
"!": "%21",
|
|
770
|
-
"'": "%27",
|
|
771
|
-
"(": "%28",
|
|
772
|
-
")": "%29",
|
|
773
|
-
"~": "%7E",
|
|
774
|
-
"%20": "+"
|
|
775
|
-
};
|
|
776
|
-
return encodeURIComponent(e).replace(/[!'()~]|%20/g, function(n) {
|
|
777
|
-
return t[n];
|
|
778
|
-
});
|
|
779
|
-
}
|
|
780
|
-
function gt(e, t) {
|
|
781
|
-
this._pairs = [], e && Ze(e, this, t);
|
|
782
|
-
}
|
|
783
|
-
const sn = gt.prototype;
|
|
784
|
-
sn.append = function(e, t) {
|
|
785
|
-
this._pairs.push([e, t]);
|
|
786
|
-
};
|
|
787
|
-
sn.toString = function(e) {
|
|
788
|
-
const t = e ? (n) => e.call(this, n, _t) : _t;
|
|
789
|
-
return this._pairs.map(function(n) {
|
|
790
|
-
return t(n[0]) + "=" + t(n[1]);
|
|
791
|
-
}, "").join("&");
|
|
792
|
-
};
|
|
793
|
-
function Ua(e) {
|
|
794
|
-
return encodeURIComponent(e).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+");
|
|
795
|
-
}
|
|
796
|
-
function ln(e, t, n) {
|
|
797
|
-
if (!t)
|
|
798
|
-
return e;
|
|
799
|
-
e = e || "";
|
|
800
|
-
const a = l.isFunction(n) ? {
|
|
801
|
-
serialize: n
|
|
802
|
-
} : n, r = l.getSafeProp(a, "encode") || Ua, o = l.getSafeProp(a, "serialize");
|
|
803
|
-
let s;
|
|
804
|
-
if (o ? s = o(t, a) : s = l.isURLSearchParams(t) ? t.toString() : new gt(t, a).toString(r), s) {
|
|
805
|
-
const i = e.indexOf("#");
|
|
806
|
-
i !== -1 && (e = e.slice(0, i)), e += (e.indexOf("?") === -1 ? "?" : "&") + s;
|
|
807
|
-
}
|
|
808
|
-
return e;
|
|
809
|
-
}
|
|
810
|
-
class ja {
|
|
811
|
-
constructor() {
|
|
812
|
-
this.handlers = [];
|
|
813
|
-
}
|
|
814
|
-
/**
|
|
815
|
-
* Add a new interceptor to the stack
|
|
816
|
-
*
|
|
817
|
-
* @param {Function} fulfilled The function to handle `then` for a `Promise`
|
|
818
|
-
* @param {Function} rejected The function to handle `reject` for a `Promise`
|
|
819
|
-
* @param {Object} options The options for the interceptor, synchronous and runWhen
|
|
820
|
-
*
|
|
821
|
-
* @return {Number} An ID used to remove interceptor later
|
|
822
|
-
*/
|
|
823
|
-
use(t, n, a) {
|
|
824
|
-
return this.handlers.push({
|
|
825
|
-
fulfilled: t,
|
|
826
|
-
rejected: n,
|
|
827
|
-
synchronous: a ? a.synchronous : !1,
|
|
828
|
-
runWhen: a ? a.runWhen : null
|
|
829
|
-
}), this.handlers.length - 1;
|
|
830
|
-
}
|
|
831
|
-
/**
|
|
832
|
-
* Remove an interceptor from the stack
|
|
833
|
-
*
|
|
834
|
-
* @param {Number} id The ID that was returned by `use`
|
|
835
|
-
*
|
|
836
|
-
* @returns {void}
|
|
837
|
-
*/
|
|
838
|
-
eject(t) {
|
|
839
|
-
this.handlers[t] && (this.handlers[t] = null);
|
|
840
|
-
}
|
|
841
|
-
/**
|
|
842
|
-
* Clear all interceptors from the stack
|
|
843
|
-
*
|
|
844
|
-
* @returns {void}
|
|
845
|
-
*/
|
|
846
|
-
clear() {
|
|
847
|
-
this.handlers && (this.handlers = []);
|
|
848
|
-
}
|
|
849
|
-
/**
|
|
850
|
-
* Iterate over all the registered interceptors
|
|
851
|
-
*
|
|
852
|
-
* This method is particularly useful for skipping over any
|
|
853
|
-
* interceptors that may have become `null` calling `eject`.
|
|
854
|
-
*
|
|
855
|
-
* @param {Function} fn The function to call for each interceptor
|
|
856
|
-
*
|
|
857
|
-
* @returns {void}
|
|
858
|
-
*/
|
|
859
|
-
forEach(t) {
|
|
860
|
-
l.forEach(this.handlers, function(n) {
|
|
861
|
-
n !== null && t(n);
|
|
862
|
-
});
|
|
863
|
-
}
|
|
864
|
-
}
|
|
865
|
-
const At = ja, ht = {
|
|
866
|
-
silentJSONParsing: !0,
|
|
867
|
-
forcedJSONParsing: !0,
|
|
868
|
-
clarifyTimeoutError: !1,
|
|
869
|
-
legacyInterceptorReqResOrdering: !0,
|
|
870
|
-
advertiseZstdAcceptEncoding: !1,
|
|
871
|
-
validateStatusUndefinedResolves: !0
|
|
872
|
-
}, Ia = typeof URLSearchParams < "u" ? URLSearchParams : gt, Ma = typeof FormData < "u" ? FormData : null, za = typeof Blob < "u" ? Blob : null, Va = {
|
|
873
|
-
isBrowser: !0,
|
|
874
|
-
classes: {
|
|
875
|
-
URLSearchParams: Ia,
|
|
876
|
-
FormData: Ma,
|
|
877
|
-
Blob: za
|
|
878
|
-
},
|
|
879
|
-
protocols: ["http", "https", "file", "blob", "url", "data"]
|
|
880
|
-
}, bt = typeof window < "u" && typeof document < "u", ct = typeof navigator == "object" && navigator || void 0, qa = bt && (!ct || ["ReactNative", "NativeScript", "NS"].indexOf(ct.product) < 0), $a = (() => typeof WorkerGlobalScope < "u" && // eslint-disable-next-line no-undef
|
|
881
|
-
self instanceof WorkerGlobalScope && typeof self.importScripts == "function")(), Ga = bt && window.location.href || "http://localhost", Ha = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
882
|
-
__proto__: null,
|
|
883
|
-
hasBrowserEnv: bt,
|
|
884
|
-
hasStandardBrowserEnv: qa,
|
|
885
|
-
hasStandardBrowserWebWorkerEnv: $a,
|
|
886
|
-
navigator: ct,
|
|
887
|
-
origin: Ga
|
|
888
|
-
}, Symbol.toStringTag, { value: "Module" })), $ = {
|
|
889
|
-
...Ha,
|
|
890
|
-
...Va
|
|
891
|
-
};
|
|
892
|
-
function Ja(e, t) {
|
|
893
|
-
return Ze(e, new $.classes.URLSearchParams(), {
|
|
894
|
-
visitor: function(n, a, r, o) {
|
|
895
|
-
return $.isNode && l.isBuffer(n) ? (this.append(a, n.toString("base64")), !1) : o.defaultVisitor.apply(this, arguments);
|
|
896
|
-
},
|
|
897
|
-
...t
|
|
898
|
-
});
|
|
899
|
-
}
|
|
900
|
-
const Dt = rn;
|
|
901
|
-
function un(e) {
|
|
902
|
-
if (e > Dt)
|
|
903
|
-
throw new T(
|
|
904
|
-
"FormData field is too deeply nested (" + e + " levels). Max depth: " + Dt,
|
|
905
|
-
T.ERR_FORM_DATA_DEPTH_EXCEEDED
|
|
906
|
-
);
|
|
907
|
-
}
|
|
908
|
-
function Wa(e) {
|
|
909
|
-
const t = [], n = /\w+|\[(\w*)]/g;
|
|
910
|
-
let a;
|
|
911
|
-
for (; (a = n.exec(e)) !== null; )
|
|
912
|
-
un(t.length), t.push(a[0] === "[]" ? "" : a[1] || a[0]);
|
|
913
|
-
return t;
|
|
914
|
-
}
|
|
915
|
-
function Ka(e) {
|
|
916
|
-
const t = {}, n = Object.keys(e);
|
|
917
|
-
let a;
|
|
918
|
-
const r = n.length;
|
|
919
|
-
let o;
|
|
920
|
-
for (a = 0; a < r; a++)
|
|
921
|
-
o = n[a], t[o] = e[o];
|
|
922
|
-
return t;
|
|
923
|
-
}
|
|
924
|
-
function cn(e) {
|
|
925
|
-
function t(n, a, r, o) {
|
|
926
|
-
un(o);
|
|
927
|
-
let s = n[o++];
|
|
928
|
-
if (s === "__proto__")
|
|
929
|
-
return !0;
|
|
930
|
-
const i = Number.isFinite(+s), u = o >= n.length;
|
|
931
|
-
return s = !s && l.isArray(r) ? r.length : s, u ? (l.hasOwnProp(r, s) ? r[s] = l.isArray(r[s]) ? r[s].concat(a) : [r[s], a] : r[s] = a, !i) : ((!l.hasOwnProp(r, s) || !l.isObject(r[s])) && (r[s] = []), t(n, a, r[s], o) && l.isArray(r[s]) && (r[s] = Ka(r[s])), !i);
|
|
932
|
-
}
|
|
933
|
-
if (l.isFormData(e) && l.isFunction(e.entries)) {
|
|
934
|
-
const n = {};
|
|
935
|
-
return l.forEachEntry(e, (a, r) => {
|
|
936
|
-
t(Wa(a), r, n, 0);
|
|
937
|
-
}), n;
|
|
938
|
-
}
|
|
939
|
-
return null;
|
|
940
|
-
}
|
|
941
|
-
const Re = (e, t) => e != null && l.hasOwnProp(e, t) ? e[t] : void 0;
|
|
942
|
-
function Xa(e, t, n) {
|
|
943
|
-
if (l.isString(e))
|
|
944
|
-
try {
|
|
945
|
-
return (t || JSON.parse)(e), l.trim(e);
|
|
946
|
-
} catch (a) {
|
|
947
|
-
if (a.name !== "SyntaxError")
|
|
948
|
-
throw a;
|
|
949
|
-
}
|
|
950
|
-
return (n || JSON.stringify)(e);
|
|
951
|
-
}
|
|
952
|
-
const yt = {
|
|
953
|
-
transitional: ht,
|
|
954
|
-
adapter: ["xhr", "http", "fetch"],
|
|
955
|
-
transformRequest: [
|
|
956
|
-
function(e, t) {
|
|
957
|
-
const n = t.getContentType() || "", a = n.indexOf("application/json") > -1, r = l.isObject(e);
|
|
958
|
-
if (r && l.isHTMLForm(e) && (e = new FormData(e)), l.isFormData(e))
|
|
959
|
-
return a ? JSON.stringify(cn(e)) : e;
|
|
960
|
-
if (l.isArrayBuffer(e) || l.isBuffer(e) || l.isStream(e) || l.isFile(e) || l.isBlob(e) || l.isReadableStream(e))
|
|
961
|
-
return e;
|
|
962
|
-
if (l.isArrayBufferView(e))
|
|
963
|
-
return e.buffer;
|
|
964
|
-
if (l.isURLSearchParams(e))
|
|
965
|
-
return t.setContentType("application/x-www-form-urlencoded;charset=utf-8", !1), e.toString();
|
|
966
|
-
let o;
|
|
967
|
-
if (r) {
|
|
968
|
-
const s = Re(this, "formSerializer");
|
|
969
|
-
if (n.indexOf("application/x-www-form-urlencoded") > -1)
|
|
970
|
-
return Ja(e, s).toString();
|
|
971
|
-
if ((o = l.isFileList(e)) || n.indexOf("multipart/form-data") > -1) {
|
|
972
|
-
const i = Re(this, "env"), u = i && i.FormData;
|
|
973
|
-
return Ze(
|
|
974
|
-
o ? { "files[]": e } : e,
|
|
975
|
-
u && new u(),
|
|
976
|
-
s
|
|
977
|
-
);
|
|
978
|
-
}
|
|
979
|
-
}
|
|
980
|
-
return r || a ? (t.setContentType("application/json", !1), Xa(e)) : e;
|
|
981
|
-
}
|
|
982
|
-
],
|
|
983
|
-
transformResponse: [
|
|
984
|
-
function(e) {
|
|
985
|
-
const t = Re(this, "transitional") || yt.transitional, n = t && t.forcedJSONParsing, a = Re(this, "responseType"), r = a === "json";
|
|
986
|
-
if (l.isResponse(e) || l.isReadableStream(e))
|
|
987
|
-
return e;
|
|
988
|
-
if (e && l.isString(e) && (n && !a || r)) {
|
|
989
|
-
const o = !(t && t.silentJSONParsing) && r;
|
|
990
|
-
try {
|
|
991
|
-
return JSON.parse(e, Re(this, "parseReviver"));
|
|
992
|
-
} catch (s) {
|
|
993
|
-
if (o)
|
|
994
|
-
throw s.name === "SyntaxError" ? T.from(s, T.ERR_BAD_RESPONSE, this, null, Re(this, "response")) : s;
|
|
995
|
-
}
|
|
996
|
-
}
|
|
997
|
-
return e;
|
|
998
|
-
}
|
|
999
|
-
],
|
|
1000
|
-
/**
|
|
1001
|
-
* A timeout in milliseconds to abort a request. If set to 0 (default) a
|
|
1002
|
-
* timeout is not created.
|
|
1003
|
-
*/
|
|
1004
|
-
timeout: 0,
|
|
1005
|
-
xsrfCookieName: "XSRF-TOKEN",
|
|
1006
|
-
xsrfHeaderName: "X-XSRF-TOKEN",
|
|
1007
|
-
maxContentLength: -1,
|
|
1008
|
-
maxBodyLength: -1,
|
|
1009
|
-
env: {
|
|
1010
|
-
FormData: $.classes.FormData,
|
|
1011
|
-
Blob: $.classes.Blob
|
|
1012
|
-
},
|
|
1013
|
-
validateStatus: function(e) {
|
|
1014
|
-
return e >= 200 && e < 300;
|
|
1015
|
-
},
|
|
1016
|
-
headers: {
|
|
1017
|
-
common: {
|
|
1018
|
-
Accept: "application/json, text/plain, */*",
|
|
1019
|
-
"Content-Type": void 0
|
|
1020
|
-
}
|
|
1021
|
-
}
|
|
1022
|
-
};
|
|
1023
|
-
l.forEach(["delete", "get", "head", "post", "put", "patch", "query"], (e) => {
|
|
1024
|
-
yt.headers[e] = {};
|
|
1025
|
-
});
|
|
1026
|
-
const vt = yt;
|
|
1027
|
-
function ot(e, t) {
|
|
1028
|
-
const n = this || vt, a = t || n, r = te.from(a.headers);
|
|
1029
|
-
let o = a.data;
|
|
1030
|
-
return l.forEach(e, function(s) {
|
|
1031
|
-
o = s.call(n, o, r.normalize(), t ? t.status : void 0);
|
|
1032
|
-
}), r.normalize(), o;
|
|
1033
|
-
}
|
|
1034
|
-
function dn(e) {
|
|
1035
|
-
return !!(e && e.__CANCEL__);
|
|
1036
|
-
}
|
|
1037
|
-
class Ya extends T {
|
|
1038
|
-
/**
|
|
1039
|
-
* A `CanceledError` is an object that is thrown when an operation is canceled.
|
|
1040
|
-
*
|
|
1041
|
-
* @param {string=} message The message.
|
|
1042
|
-
* @param {Object=} config The config.
|
|
1043
|
-
* @param {Object=} request The request.
|
|
1044
|
-
*
|
|
1045
|
-
* @returns {CanceledError} The created error.
|
|
1046
|
-
*/
|
|
1047
|
-
constructor(t, n, a) {
|
|
1048
|
-
super(t ?? "canceled", T.ERR_CANCELED, n, a), this.name = "CanceledError", this.__CANCEL__ = !0;
|
|
1049
|
-
}
|
|
1050
|
-
}
|
|
1051
|
-
const je = Ya;
|
|
1052
|
-
function pn(e, t, n) {
|
|
1053
|
-
const a = n.config.validateStatus;
|
|
1054
|
-
!n.status || !a || a(n.status) ? e(n) : t(new T(
|
|
1055
|
-
"Request failed with status code " + n.status,
|
|
1056
|
-
n.status >= 400 && n.status < 500 ? T.ERR_BAD_REQUEST : T.ERR_BAD_RESPONSE,
|
|
1057
|
-
n.config,
|
|
1058
|
-
n.request,
|
|
1059
|
-
n
|
|
1060
|
-
));
|
|
1061
|
-
}
|
|
1062
|
-
function Qa(e) {
|
|
1063
|
-
const t = /^([-+\w]{1,25}):(?:\/\/)?/.exec(e);
|
|
1064
|
-
return t && t[1] || "";
|
|
1065
|
-
}
|
|
1066
|
-
function Za(e, t) {
|
|
1067
|
-
e = e || 10;
|
|
1068
|
-
const n = new Array(e), a = new Array(e);
|
|
1069
|
-
let r = 0, o = 0, s;
|
|
1070
|
-
return t = t !== void 0 ? t : 1e3, function(i) {
|
|
1071
|
-
const u = Date.now(), d = a[o];
|
|
1072
|
-
s || (s = u), n[r] = i, a[r] = u;
|
|
1073
|
-
let c = o, p = 0;
|
|
1074
|
-
for (; c !== r; )
|
|
1075
|
-
p += n[c++], c = c % e;
|
|
1076
|
-
if (r = (r + 1) % e, r === o && (o = (o + 1) % e), u - s < t)
|
|
1077
|
-
return;
|
|
1078
|
-
const y = d && u - d;
|
|
1079
|
-
return y ? Math.round(p * 1e3 / y) : void 0;
|
|
1080
|
-
};
|
|
1081
|
-
}
|
|
1082
|
-
function er(e, t) {
|
|
1083
|
-
let n = 0, a = 1e3 / t, r, o;
|
|
1084
|
-
const s = (i, u = Date.now()) => {
|
|
1085
|
-
n = u, r = null, o && (clearTimeout(o), o = null), e(...i);
|
|
1086
|
-
};
|
|
1087
|
-
return [(...i) => {
|
|
1088
|
-
const u = Date.now(), d = u - n;
|
|
1089
|
-
d >= a ? s(i, u) : (r = i, o || (o = setTimeout(() => {
|
|
1090
|
-
o = null, s(r);
|
|
1091
|
-
}, a - d)));
|
|
1092
|
-
}, () => r && s(r)];
|
|
1093
|
-
}
|
|
1094
|
-
const We = (e, t, n = 3) => {
|
|
1095
|
-
let a = 0;
|
|
1096
|
-
const r = Za(50, 250);
|
|
1097
|
-
return er((o) => {
|
|
1098
|
-
if (!o || typeof o.loaded != "number")
|
|
1099
|
-
return;
|
|
1100
|
-
const s = o.loaded, i = o.lengthComputable ? o.total : void 0, u = i != null ? Math.min(s, i) : s, d = Math.max(0, u - a), c = r(d);
|
|
1101
|
-
a = Math.max(a, u);
|
|
1102
|
-
const p = {
|
|
1103
|
-
loaded: u,
|
|
1104
|
-
total: i,
|
|
1105
|
-
progress: i ? u / i : void 0,
|
|
1106
|
-
bytes: d,
|
|
1107
|
-
rate: c || void 0,
|
|
1108
|
-
estimated: c && i ? (i - u) / c : void 0,
|
|
1109
|
-
event: o,
|
|
1110
|
-
lengthComputable: i != null,
|
|
1111
|
-
[t ? "download" : "upload"]: !0
|
|
1112
|
-
};
|
|
1113
|
-
e(p);
|
|
1114
|
-
}, n);
|
|
1115
|
-
}, Ft = (e, t) => {
|
|
1116
|
-
const n = e != null;
|
|
1117
|
-
return [
|
|
1118
|
-
(a) => t[0]({
|
|
1119
|
-
lengthComputable: n,
|
|
1120
|
-
total: e,
|
|
1121
|
-
loaded: a
|
|
1122
|
-
}),
|
|
1123
|
-
t[1]
|
|
1124
|
-
];
|
|
1125
|
-
}, Lt = (e) => (...t) => l.asap(() => e(...t)), tr = $.hasStandardBrowserEnv ? ((e, t) => (n) => (n = new URL(n, $.origin), e.protocol === n.protocol && e.host === n.host && (t || e.port === n.port)))(
|
|
1126
|
-
new URL($.origin),
|
|
1127
|
-
$.navigator && /(msie|trident)/i.test($.navigator.userAgent)
|
|
1128
|
-
) : () => !0, nr = $.hasStandardBrowserEnv ? (
|
|
1129
|
-
// Standard browser envs support document.cookie
|
|
1130
|
-
{
|
|
1131
|
-
write(e, t, n, a, r, o, s) {
|
|
1132
|
-
if (typeof document > "u")
|
|
1133
|
-
return;
|
|
1134
|
-
const i = [`${e}=${encodeURIComponent(t)}`];
|
|
1135
|
-
l.isNumber(n) && i.push(`expires=${new Date(n).toUTCString()}`), l.isString(a) && i.push(`path=${a}`), l.isString(r) && i.push(`domain=${r}`), o === !0 && i.push("secure"), l.isString(s) && i.push(`SameSite=${s}`), document.cookie = i.join("; ");
|
|
1136
|
-
},
|
|
1137
|
-
read(e) {
|
|
1138
|
-
if (typeof document > "u")
|
|
1139
|
-
return null;
|
|
1140
|
-
const t = document.cookie.split(";");
|
|
1141
|
-
for (let n = 0; n < t.length; n++) {
|
|
1142
|
-
const a = t[n].replace(/^\s+/, ""), r = a.indexOf("=");
|
|
1143
|
-
if (r !== -1 && a.slice(0, r) === e)
|
|
1144
|
-
try {
|
|
1145
|
-
return decodeURIComponent(a.slice(r + 1));
|
|
1146
|
-
} catch {
|
|
1147
|
-
return a.slice(r + 1);
|
|
1148
|
-
}
|
|
1149
|
-
}
|
|
1150
|
-
return null;
|
|
1151
|
-
},
|
|
1152
|
-
remove(e) {
|
|
1153
|
-
this.write(e, "", Date.now() - 864e5, "/");
|
|
1154
|
-
}
|
|
1155
|
-
}
|
|
1156
|
-
) : (
|
|
1157
|
-
// Non-standard browser env (web workers, react-native) lack needed support.
|
|
1158
|
-
{
|
|
1159
|
-
write() {
|
|
1160
|
-
},
|
|
1161
|
-
read() {
|
|
1162
|
-
return null;
|
|
1163
|
-
},
|
|
1164
|
-
remove() {
|
|
1165
|
-
}
|
|
1166
|
-
}
|
|
1167
|
-
);
|
|
1168
|
-
function ar(e) {
|
|
1169
|
-
return typeof e != "string" ? !1 : /^([a-z][a-z\d+\-.]*:)?\/\//i.test(e);
|
|
1170
|
-
}
|
|
1171
|
-
function rr(e, t) {
|
|
1172
|
-
return t ? e.replace(/\/?\/$/, "") + "/" + t.replace(/^\/+/, "") : e;
|
|
1173
|
-
}
|
|
1174
|
-
const or = /^https?:(?!\/\/)/i, sr = /[\t\n\r]/g;
|
|
1175
|
-
function ir(e) {
|
|
1176
|
-
let t = 0;
|
|
1177
|
-
for (; t < e.length && e.charCodeAt(t) <= 32; )
|
|
1178
|
-
t++;
|
|
1179
|
-
return e.slice(t);
|
|
1180
|
-
}
|
|
1181
|
-
function lr(e) {
|
|
1182
|
-
return ir(e).replace(sr, "");
|
|
1183
|
-
}
|
|
1184
|
-
function Nt(e, t) {
|
|
1185
|
-
if (typeof e == "string" && or.test(lr(e)))
|
|
1186
|
-
throw new T(
|
|
1187
|
-
'Invalid URL: missing "//" after protocol',
|
|
1188
|
-
T.ERR_INVALID_URL,
|
|
1189
|
-
t
|
|
1190
|
-
);
|
|
1191
|
-
}
|
|
1192
|
-
function fn(e, t, n, a) {
|
|
1193
|
-
Nt(t, a);
|
|
1194
|
-
let r = !ar(t);
|
|
1195
|
-
return e && (r || n === !1) ? (Nt(e, a), rr(e, t)) : t;
|
|
1196
|
-
}
|
|
1197
|
-
const Ut = (e) => e instanceof te ? { ...e } : e;
|
|
1198
|
-
function Pe(e, t) {
|
|
1199
|
-
e = e || {}, t = t || {};
|
|
1200
|
-
const n = /* @__PURE__ */ Object.create(null);
|
|
1201
|
-
Object.defineProperty(n, "hasOwnProperty", {
|
|
1202
|
-
// Null-proto descriptor so a polluted Object.prototype.get cannot turn
|
|
1203
|
-
// this data descriptor into an accessor descriptor on the way in.
|
|
1204
|
-
__proto__: null,
|
|
1205
|
-
value: Object.prototype.hasOwnProperty,
|
|
1206
|
-
enumerable: !1,
|
|
1207
|
-
writable: !0,
|
|
1208
|
-
configurable: !0
|
|
1209
|
-
});
|
|
1210
|
-
function a(c, p, y, k) {
|
|
1211
|
-
return l.isPlainObject(c) && l.isPlainObject(p) ? l.merge.call({ caseless: k }, c, p) : l.isPlainObject(p) ? l.merge({}, p) : l.isArray(p) ? p.slice() : p;
|
|
1212
|
-
}
|
|
1213
|
-
function r(c, p, y, k) {
|
|
1214
|
-
if (l.isUndefined(p)) {
|
|
1215
|
-
if (!l.isUndefined(c))
|
|
1216
|
-
return a(void 0, c, y, k);
|
|
1217
|
-
} else
|
|
1218
|
-
return a(c, p, y, k);
|
|
1219
|
-
}
|
|
1220
|
-
function o(c, p) {
|
|
1221
|
-
if (!l.isUndefined(p))
|
|
1222
|
-
return a(void 0, p);
|
|
1223
|
-
}
|
|
1224
|
-
function s(c, p) {
|
|
1225
|
-
if (l.isUndefined(p)) {
|
|
1226
|
-
if (!l.isUndefined(c))
|
|
1227
|
-
return a(void 0, c);
|
|
1228
|
-
} else
|
|
1229
|
-
return a(void 0, p);
|
|
1230
|
-
}
|
|
1231
|
-
function i(c) {
|
|
1232
|
-
const p = l.hasOwnProp(t, "transitional") ? t.transitional : void 0;
|
|
1233
|
-
if (!l.isUndefined(p))
|
|
1234
|
-
if (l.isPlainObject(p)) {
|
|
1235
|
-
if (l.hasOwnProp(p, c))
|
|
1236
|
-
return p[c];
|
|
1237
|
-
} else
|
|
1238
|
-
return;
|
|
1239
|
-
const y = l.hasOwnProp(e, "transitional") ? e.transitional : void 0;
|
|
1240
|
-
if (l.isPlainObject(y) && l.hasOwnProp(y, c))
|
|
1241
|
-
return y[c];
|
|
1242
|
-
}
|
|
1243
|
-
function u(c, p, y) {
|
|
1244
|
-
if (l.hasOwnProp(t, y))
|
|
1245
|
-
return a(c, p);
|
|
1246
|
-
if (l.hasOwnProp(e, y))
|
|
1247
|
-
return a(void 0, c);
|
|
1248
|
-
}
|
|
1249
|
-
const d = {
|
|
1250
|
-
url: o,
|
|
1251
|
-
method: o,
|
|
1252
|
-
data: o,
|
|
1253
|
-
baseURL: s,
|
|
1254
|
-
transformRequest: s,
|
|
1255
|
-
transformResponse: s,
|
|
1256
|
-
paramsSerializer: s,
|
|
1257
|
-
timeout: s,
|
|
1258
|
-
timeoutMessage: s,
|
|
1259
|
-
withCredentials: s,
|
|
1260
|
-
withXSRFToken: s,
|
|
1261
|
-
adapter: s,
|
|
1262
|
-
responseType: s,
|
|
1263
|
-
xsrfCookieName: s,
|
|
1264
|
-
xsrfHeaderName: s,
|
|
1265
|
-
onUploadProgress: s,
|
|
1266
|
-
onDownloadProgress: s,
|
|
1267
|
-
decompress: s,
|
|
1268
|
-
maxContentLength: s,
|
|
1269
|
-
maxBodyLength: s,
|
|
1270
|
-
beforeRedirect: s,
|
|
1271
|
-
transport: s,
|
|
1272
|
-
httpAgent: s,
|
|
1273
|
-
httpsAgent: s,
|
|
1274
|
-
cancelToken: s,
|
|
1275
|
-
socketPath: s,
|
|
1276
|
-
allowedSocketPaths: s,
|
|
1277
|
-
responseEncoding: s,
|
|
1278
|
-
validateStatus: u,
|
|
1279
|
-
headers: (c, p, y) => r(Ut(c), Ut(p), y, !0)
|
|
1280
|
-
};
|
|
1281
|
-
return l.forEach(Object.keys({ ...e, ...t }), function(c) {
|
|
1282
|
-
if (c === "__proto__" || c === "constructor" || c === "prototype")
|
|
1283
|
-
return;
|
|
1284
|
-
const p = l.hasOwnProp(d, c) ? d[c] : r, y = l.hasOwnProp(e, c) ? e[c] : void 0, k = l.hasOwnProp(t, c) ? t[c] : void 0, h = p(y, k, c);
|
|
1285
|
-
l.isUndefined(h) && p !== u || (n[c] = h);
|
|
1286
|
-
}), l.hasOwnProp(t, "validateStatus") && l.isUndefined(t.validateStatus) && i("validateStatusUndefinedResolves") === !1 && (l.hasOwnProp(e, "validateStatus") ? n.validateStatus = a(void 0, e.validateStatus) : delete n.validateStatus), n;
|
|
1287
|
-
}
|
|
1288
|
-
const ur = ["content-type", "content-length"];
|
|
1289
|
-
function cr(e, t, n) {
|
|
1290
|
-
if (n !== "content-only") {
|
|
1291
|
-
e.set(t);
|
|
1292
|
-
return;
|
|
1293
|
-
}
|
|
1294
|
-
Object.entries(t || {}).forEach(([a, r]) => {
|
|
1295
|
-
ur.includes(a.toLowerCase()) && e.set(a, r);
|
|
1296
|
-
});
|
|
1297
|
-
}
|
|
1298
|
-
const dr = (e) => encodeURIComponent(e).replace(
|
|
1299
|
-
/%([0-9A-F]{2})/gi,
|
|
1300
|
-
(t, n) => String.fromCharCode(parseInt(n, 16))
|
|
1301
|
-
);
|
|
1302
|
-
function mn(e) {
|
|
1303
|
-
const t = Pe({}, e), n = (y) => l.hasOwnProp(t, y) ? t[y] : void 0, a = n("data");
|
|
1304
|
-
let r = n("withXSRFToken");
|
|
1305
|
-
const o = n("xsrfHeaderName"), s = n("xsrfCookieName");
|
|
1306
|
-
let i = n("headers");
|
|
1307
|
-
const u = n("auth"), d = n("baseURL"), c = n("allowAbsoluteUrls"), p = n("url");
|
|
1308
|
-
if (t.headers = i = te.from(i), t.url = ln(
|
|
1309
|
-
fn(d, p, c, t),
|
|
1310
|
-
n("params"),
|
|
1311
|
-
n("paramsSerializer")
|
|
1312
|
-
), u) {
|
|
1313
|
-
const y = l.getSafeProp(u, "username") || "", k = l.getSafeProp(u, "password") || "";
|
|
1314
|
-
try {
|
|
1315
|
-
i.set(
|
|
1316
|
-
"Authorization",
|
|
1317
|
-
"Basic " + btoa(y + ":" + (k ? dr(k) : ""))
|
|
1318
|
-
);
|
|
1319
|
-
} catch (h) {
|
|
1320
|
-
throw T.from(h, T.ERR_BAD_OPTION_VALUE, e);
|
|
1321
|
-
}
|
|
1322
|
-
}
|
|
1323
|
-
if (l.isFormData(a) && ($.hasStandardBrowserEnv || $.hasStandardBrowserWebWorkerEnv || l.isReactNative(a) ? i.setContentType(void 0) : l.isFunction(a.getHeaders) && cr(i, a.getHeaders(), n("formDataHeaderPolicy"))), $.hasStandardBrowserEnv && (l.isFunction(r) && (r = r(t)), r === !0 || r == null && tr(t.url))) {
|
|
1324
|
-
const y = o && s && nr.read(s);
|
|
1325
|
-
y && i.set(o, y);
|
|
1326
|
-
}
|
|
1327
|
-
return t;
|
|
1328
|
-
}
|
|
1329
|
-
const pr = typeof XMLHttpRequest < "u", fr = pr && function(e) {
|
|
1330
|
-
return new Promise(function(t, n) {
|
|
1331
|
-
const a = mn(e);
|
|
1332
|
-
let r = a.data;
|
|
1333
|
-
const o = te.from(a.headers).normalize();
|
|
1334
|
-
let { responseType: s, onUploadProgress: i, onDownloadProgress: u } = a, d, c, p, y, k;
|
|
1335
|
-
function h() {
|
|
1336
|
-
y && y(), k && k(), a.cancelToken && a.cancelToken.unsubscribe(d), a.signal && a.signal.removeEventListener("abort", d);
|
|
1337
|
-
}
|
|
1338
|
-
let v = new XMLHttpRequest();
|
|
1339
|
-
v.open(a.method.toUpperCase(), a.url, !0), v.timeout = a.timeout;
|
|
1340
|
-
function A() {
|
|
1341
|
-
if (!v)
|
|
1342
|
-
return;
|
|
1343
|
-
const g = te.from(
|
|
1344
|
-
"getAllResponseHeaders" in v && v.getAllResponseHeaders()
|
|
1345
|
-
), m = {
|
|
1346
|
-
data: !s || s === "text" || s === "json" ? v.responseText : v.response,
|
|
1347
|
-
status: v.status,
|
|
1348
|
-
statusText: v.statusText,
|
|
1349
|
-
headers: g,
|
|
1350
|
-
config: e,
|
|
1351
|
-
request: v
|
|
1352
|
-
};
|
|
1353
|
-
pn(
|
|
1354
|
-
function(O) {
|
|
1355
|
-
t(O), h();
|
|
1356
|
-
},
|
|
1357
|
-
function(O) {
|
|
1358
|
-
n(O), h();
|
|
1359
|
-
},
|
|
1360
|
-
m
|
|
1361
|
-
), v = null;
|
|
1362
|
-
}
|
|
1363
|
-
"onloadend" in v ? v.onloadend = A : v.onreadystatechange = function() {
|
|
1364
|
-
!v || v.readyState !== 4 || v.status === 0 && !(v.responseURL && v.responseURL.startsWith("file:")) || setTimeout(A);
|
|
1365
|
-
}, v.onabort = function() {
|
|
1366
|
-
v && (n(new T("Request aborted", T.ECONNABORTED, e, v)), h(), v = null);
|
|
1367
|
-
}, v.onerror = function(g) {
|
|
1368
|
-
const m = g && g.message ? g.message : "Network Error", O = new T(m, T.ERR_NETWORK, e, v);
|
|
1369
|
-
O.event = g || null, n(O), h(), v = null;
|
|
1370
|
-
}, v.ontimeout = function() {
|
|
1371
|
-
let g = a.timeout ? "timeout of " + a.timeout + "ms exceeded" : "timeout exceeded";
|
|
1372
|
-
const m = a.transitional || ht;
|
|
1373
|
-
a.timeoutErrorMessage && (g = a.timeoutErrorMessage), n(
|
|
1374
|
-
new T(
|
|
1375
|
-
g,
|
|
1376
|
-
m.clarifyTimeoutError ? T.ETIMEDOUT : T.ECONNABORTED,
|
|
1377
|
-
e,
|
|
1378
|
-
v
|
|
1379
|
-
)
|
|
1380
|
-
), h(), v = null;
|
|
1381
|
-
}, r === void 0 && o.setContentType(null), "setRequestHeader" in v && l.forEach(an(o), function(g, m) {
|
|
1382
|
-
v.setRequestHeader(m, g);
|
|
1383
|
-
}), l.isUndefined(a.withCredentials) || (v.withCredentials = !!a.withCredentials), s && s !== "json" && (v.responseType = a.responseType), u && ([p, k] = We(u, !0), v.addEventListener("progress", p)), i && v.upload && ([c, y] = We(i), v.upload.addEventListener("progress", c), v.upload.addEventListener("loadend", y)), (a.cancelToken || a.signal) && (d = (g) => {
|
|
1384
|
-
v && (n(!g || g.type ? new je(null, e, v) : g), v.abort(), h(), v = null);
|
|
1385
|
-
}, a.cancelToken && a.cancelToken.subscribe(d), a.signal && (a.signal.aborted ? d() : a.signal.addEventListener("abort", d)));
|
|
1386
|
-
const f = Qa(a.url);
|
|
1387
|
-
if (f && !$.protocols.includes(f)) {
|
|
1388
|
-
n(
|
|
1389
|
-
new T(
|
|
1390
|
-
"Unsupported protocol " + f + ":",
|
|
1391
|
-
T.ERR_BAD_REQUEST,
|
|
1392
|
-
e
|
|
1393
|
-
)
|
|
1394
|
-
), h();
|
|
1395
|
-
return;
|
|
1396
|
-
}
|
|
1397
|
-
v.send(r || null);
|
|
1398
|
-
});
|
|
1399
|
-
}, mr = (e, t) => {
|
|
1400
|
-
if (e = e ? e.filter(Boolean) : [], !t && !e.length)
|
|
1401
|
-
return;
|
|
1402
|
-
const n = new AbortController();
|
|
1403
|
-
let a = !1;
|
|
1404
|
-
const r = function(u) {
|
|
1405
|
-
if (!a) {
|
|
1406
|
-
a = !0, s();
|
|
1407
|
-
const d = u instanceof Error ? u : this.reason;
|
|
1408
|
-
n.abort(
|
|
1409
|
-
d instanceof T ? d : new je(d instanceof Error ? d.message : d)
|
|
1410
|
-
);
|
|
1411
|
-
}
|
|
1412
|
-
};
|
|
1413
|
-
let o = t && setTimeout(() => {
|
|
1414
|
-
o = null, r(new T(`timeout of ${t}ms exceeded`, T.ETIMEDOUT));
|
|
1415
|
-
}, t);
|
|
1416
|
-
const s = () => {
|
|
1417
|
-
e && (o && clearTimeout(o), o = null, e.forEach((u) => {
|
|
1418
|
-
u.unsubscribe ? u.unsubscribe(r) : u.removeEventListener("abort", r);
|
|
1419
|
-
}), e = null);
|
|
1420
|
-
};
|
|
1421
|
-
e.forEach((u) => u.addEventListener("abort", r, { once: !0 }));
|
|
1422
|
-
const { signal: i } = n;
|
|
1423
|
-
return i.unsubscribe = () => l.asap(s), i;
|
|
1424
|
-
}, gr = mr, hr = function* (e, t) {
|
|
1425
|
-
let n = e.byteLength;
|
|
1426
|
-
if (!t || n < t) {
|
|
1427
|
-
yield e;
|
|
1428
|
-
return;
|
|
1429
|
-
}
|
|
1430
|
-
let a = 0, r;
|
|
1431
|
-
for (; a < n; )
|
|
1432
|
-
r = a + t, yield e.slice(a, r), a = r;
|
|
1433
|
-
}, br = async function* (e, t) {
|
|
1434
|
-
for await (const n of yr(e))
|
|
1435
|
-
yield* hr(n, t);
|
|
1436
|
-
}, yr = async function* (e) {
|
|
1437
|
-
if (e[Symbol.asyncIterator]) {
|
|
1438
|
-
yield* e;
|
|
1439
|
-
return;
|
|
1440
|
-
}
|
|
1441
|
-
const t = e.getReader();
|
|
1442
|
-
try {
|
|
1443
|
-
for (; ; ) {
|
|
1444
|
-
const { done: n, value: a } = await t.read();
|
|
1445
|
-
if (n)
|
|
1446
|
-
break;
|
|
1447
|
-
yield a;
|
|
1448
|
-
}
|
|
1449
|
-
} finally {
|
|
1450
|
-
await t.cancel();
|
|
1451
|
-
}
|
|
1452
|
-
}, jt = (e, t, n, a) => {
|
|
1453
|
-
const r = br(e, t);
|
|
1454
|
-
let o = 0, s, i = (u) => {
|
|
1455
|
-
s || (s = !0, a && a(u));
|
|
1456
|
-
};
|
|
1457
|
-
return new ReadableStream(
|
|
1458
|
-
{
|
|
1459
|
-
async pull(u) {
|
|
1460
|
-
try {
|
|
1461
|
-
const { done: d, value: c } = await r.next();
|
|
1462
|
-
if (d) {
|
|
1463
|
-
i(), u.close();
|
|
1464
|
-
return;
|
|
1465
|
-
}
|
|
1466
|
-
let p = c.byteLength;
|
|
1467
|
-
if (n) {
|
|
1468
|
-
let y = o += p;
|
|
1469
|
-
n(y);
|
|
1470
|
-
}
|
|
1471
|
-
u.enqueue(new Uint8Array(c));
|
|
1472
|
-
} catch (d) {
|
|
1473
|
-
throw i(d), d;
|
|
1474
|
-
}
|
|
1475
|
-
},
|
|
1476
|
-
cancel(u) {
|
|
1477
|
-
return i(u), r.return();
|
|
1478
|
-
}
|
|
1479
|
-
},
|
|
1480
|
-
{
|
|
1481
|
-
highWaterMark: 2
|
|
1482
|
-
}
|
|
1483
|
-
);
|
|
1484
|
-
}, Ke = (e) => e >= 48 && e <= 57 || e >= 65 && e <= 70 || e >= 97 && e <= 102, vr = (e, t, n) => t + 2 < n && Ke(e.charCodeAt(t + 1)) && Ke(e.charCodeAt(t + 2));
|
|
1485
|
-
function wr(e) {
|
|
1486
|
-
if (!e || typeof e != "string" || !e.startsWith("data:"))
|
|
1487
|
-
return 0;
|
|
1488
|
-
const t = e.indexOf(",");
|
|
1489
|
-
if (t < 0)
|
|
1490
|
-
return 0;
|
|
1491
|
-
const n = e.slice(5, t), a = e.slice(t + 1);
|
|
1492
|
-
if (/;base64/i.test(n)) {
|
|
1493
|
-
let o = a.length;
|
|
1494
|
-
const s = a.length;
|
|
1495
|
-
for (let p = 0; p < s; p++)
|
|
1496
|
-
if (a.charCodeAt(p) === 37 && p + 2 < s) {
|
|
1497
|
-
const y = a.charCodeAt(p + 1), k = a.charCodeAt(p + 2);
|
|
1498
|
-
Ke(y) && Ke(k) && (o -= 2, p += 2);
|
|
1499
|
-
}
|
|
1500
|
-
let i = 0, u = s - 1;
|
|
1501
|
-
const d = (p) => p >= 2 && a.charCodeAt(p - 2) === 37 && // '%'
|
|
1502
|
-
a.charCodeAt(p - 1) === 51 && // '3'
|
|
1503
|
-
(a.charCodeAt(p) === 68 || a.charCodeAt(p) === 100);
|
|
1504
|
-
u >= 0 && (a.charCodeAt(u) === 61 ? (i++, u--) : d(u) && (i++, u -= 3)), i === 1 && u >= 0 && (a.charCodeAt(u) === 61 || d(u)) && i++;
|
|
1505
|
-
const c = Math.floor(o / 4) * 3 - (i || 0);
|
|
1506
|
-
return c > 0 ? c : 0;
|
|
1507
|
-
}
|
|
1508
|
-
let r = 0;
|
|
1509
|
-
for (let o = 0, s = a.length; o < s; o++) {
|
|
1510
|
-
const i = a.charCodeAt(o);
|
|
1511
|
-
if (i === 37 && vr(a, o, s))
|
|
1512
|
-
r += 1, o += 2;
|
|
1513
|
-
else if (i < 128)
|
|
1514
|
-
r += 1;
|
|
1515
|
-
else if (i < 2048)
|
|
1516
|
-
r += 2;
|
|
1517
|
-
else if (i >= 55296 && i <= 56319 && o + 1 < s) {
|
|
1518
|
-
const u = a.charCodeAt(o + 1);
|
|
1519
|
-
u >= 56320 && u <= 57343 ? (r += 4, o++) : r += 3;
|
|
1520
|
-
} else
|
|
1521
|
-
r += 3;
|
|
1522
|
-
}
|
|
1523
|
-
return r;
|
|
1524
|
-
}
|
|
1525
|
-
const wt = "1.18.1", It = 64 * 1024, { isFunction: Ve } = l, xr = (e) => encodeURIComponent(e).replace(
|
|
1526
|
-
/%([0-9A-F]{2})/gi,
|
|
1527
|
-
(t, n) => String.fromCharCode(parseInt(n, 16))
|
|
1528
|
-
), Mt = (e) => {
|
|
1529
|
-
if (!l.isString(e))
|
|
1530
|
-
return e;
|
|
1531
|
-
try {
|
|
1532
|
-
return decodeURIComponent(e);
|
|
1533
|
-
} catch {
|
|
1534
|
-
return e;
|
|
1535
|
-
}
|
|
1536
|
-
}, zt = (e, ...t) => {
|
|
1537
|
-
try {
|
|
1538
|
-
return !!e(...t);
|
|
1539
|
-
} catch {
|
|
1540
|
-
return !1;
|
|
1541
|
-
}
|
|
1542
|
-
}, kr = (e) => {
|
|
1543
|
-
const t = e.indexOf("://");
|
|
1544
|
-
let n = e;
|
|
1545
|
-
return t !== -1 && (n = n.slice(t + 3)), n.includes("@") || n.includes(":");
|
|
1546
|
-
}, Pr = (e) => {
|
|
1547
|
-
const t = l.global !== void 0 && l.global !== null ? l.global : globalThis, { ReadableStream: n, TextEncoder: a } = t;
|
|
1548
|
-
e = l.merge.call(
|
|
1549
|
-
{
|
|
1550
|
-
skipUndefined: !0
|
|
1551
|
-
},
|
|
1552
|
-
{
|
|
1553
|
-
Request: t.Request,
|
|
1554
|
-
Response: t.Response
|
|
1555
|
-
},
|
|
1556
|
-
e
|
|
1557
|
-
);
|
|
1558
|
-
const { fetch: r, Request: o, Response: s } = e, i = r ? Ve(r) : typeof fetch == "function", u = Ve(o), d = Ve(s);
|
|
1559
|
-
if (!i)
|
|
1560
|
-
return !1;
|
|
1561
|
-
const c = i && Ve(n), p = i && (typeof a == "function" ? ((f) => (g) => f.encode(g))(new a()) : async (f) => new Uint8Array(await new o(f).arrayBuffer())), y = u && c && zt(() => {
|
|
1562
|
-
let f = !1;
|
|
1563
|
-
const g = new o($.origin, {
|
|
1564
|
-
body: new n(),
|
|
1565
|
-
method: "POST",
|
|
1566
|
-
get duplex() {
|
|
1567
|
-
return f = !0, "half";
|
|
1568
|
-
}
|
|
1569
|
-
}), m = g.headers.has("Content-Type");
|
|
1570
|
-
return g.body != null && g.body.cancel(), f && !m;
|
|
1571
|
-
}), k = d && c && zt(() => l.isReadableStream(new s("").body)), h = {
|
|
1572
|
-
stream: k && ((f) => f.body)
|
|
1573
|
-
};
|
|
1574
|
-
i && ["text", "arrayBuffer", "blob", "formData", "stream"].forEach((f) => {
|
|
1575
|
-
!h[f] && (h[f] = (g, m) => {
|
|
1576
|
-
let O = g && g[f];
|
|
1577
|
-
if (O)
|
|
1578
|
-
return O.call(g);
|
|
1579
|
-
throw new T(
|
|
1580
|
-
`Response type '${f}' is not supported`,
|
|
1581
|
-
T.ERR_NOT_SUPPORT,
|
|
1582
|
-
m
|
|
1583
|
-
);
|
|
1584
|
-
});
|
|
1585
|
-
});
|
|
1586
|
-
const v = async (f) => {
|
|
1587
|
-
if (f == null)
|
|
1588
|
-
return 0;
|
|
1589
|
-
if (l.isBlob(f))
|
|
1590
|
-
return f.size;
|
|
1591
|
-
if (l.isSpecCompliantForm(f))
|
|
1592
|
-
return (await new o($.origin, {
|
|
1593
|
-
method: "POST",
|
|
1594
|
-
body: f
|
|
1595
|
-
}).arrayBuffer()).byteLength;
|
|
1596
|
-
if (l.isArrayBufferView(f) || l.isArrayBuffer(f))
|
|
1597
|
-
return f.byteLength;
|
|
1598
|
-
if (l.isURLSearchParams(f) && (f = f + ""), l.isString(f))
|
|
1599
|
-
return (await p(f)).byteLength;
|
|
1600
|
-
}, A = async (f, g) => l.toFiniteNumber(f.getContentLength()) ?? v(g);
|
|
1601
|
-
return async (f) => {
|
|
1602
|
-
let {
|
|
1603
|
-
url: g,
|
|
1604
|
-
method: m,
|
|
1605
|
-
data: O,
|
|
1606
|
-
signal: w,
|
|
1607
|
-
cancelToken: R,
|
|
1608
|
-
timeout: V,
|
|
1609
|
-
onDownloadProgress: Y,
|
|
1610
|
-
onUploadProgress: ne,
|
|
1611
|
-
responseType: K,
|
|
1612
|
-
headers: L,
|
|
1613
|
-
withCredentials: fe = "same-origin",
|
|
1614
|
-
fetchOptions: C,
|
|
1615
|
-
maxContentLength: E,
|
|
1616
|
-
maxBodyLength: re
|
|
1617
|
-
} = mn(f);
|
|
1618
|
-
const q = l.isNumber(E) && E > -1, Ce = l.isNumber(re) && re > -1, H = (D) => l.hasOwnProp(f, D) ? f[D] : void 0;
|
|
1619
|
-
let Be = r || fetch;
|
|
1620
|
-
K = K ? (K + "").toLowerCase() : "text";
|
|
1621
|
-
let ie = gr(
|
|
1622
|
-
[w, R && R.toAbortSignal()],
|
|
1623
|
-
V
|
|
1624
|
-
), j = null;
|
|
1625
|
-
const ye = ie && ie.unsubscribe && (() => {
|
|
1626
|
-
ie.unsubscribe();
|
|
1627
|
-
});
|
|
1628
|
-
let _e, Ae = null;
|
|
1629
|
-
const Pt = () => new T(
|
|
1630
|
-
"Request body larger than maxBodyLength limit",
|
|
1631
|
-
T.ERR_BAD_REQUEST,
|
|
1632
|
-
f,
|
|
1633
|
-
j
|
|
1634
|
-
);
|
|
1635
|
-
try {
|
|
1636
|
-
let D;
|
|
1637
|
-
const ae = H("auth");
|
|
1638
|
-
if (ae) {
|
|
1639
|
-
const _ = l.getSafeProp(ae, "username") || "", Z = l.getSafeProp(ae, "password") || "";
|
|
1640
|
-
D = {
|
|
1641
|
-
username: _,
|
|
1642
|
-
password: Z
|
|
1643
|
-
};
|
|
1644
|
-
}
|
|
1645
|
-
if (kr(g)) {
|
|
1646
|
-
const _ = new URL(g, $.origin);
|
|
1647
|
-
if (!D && (_.username || _.password)) {
|
|
1648
|
-
const Z = Mt(_.username), he = Mt(_.password);
|
|
1649
|
-
D = {
|
|
1650
|
-
username: Z,
|
|
1651
|
-
password: he
|
|
1652
|
-
};
|
|
1653
|
-
}
|
|
1654
|
-
(_.username || _.password) && (_.username = "", _.password = "", g = _.href);
|
|
1655
|
-
}
|
|
1656
|
-
if (D && (L.delete("authorization"), L.set(
|
|
1657
|
-
"Authorization",
|
|
1658
|
-
"Basic " + btoa(xr((D.username || "") + ":" + (D.password || "")))
|
|
1659
|
-
)), q && typeof g == "string" && g.startsWith("data:") && wr(g) > E)
|
|
1660
|
-
throw new T(
|
|
1661
|
-
"maxContentLength size of " + E + " exceeded",
|
|
1662
|
-
T.ERR_BAD_RESPONSE,
|
|
1663
|
-
f,
|
|
1664
|
-
j
|
|
1665
|
-
);
|
|
1666
|
-
if (Ce && m !== "get" && m !== "head") {
|
|
1667
|
-
const _ = await v(O);
|
|
1668
|
-
if (typeof _ == "number" && isFinite(_) && (_e = _, _ > re))
|
|
1669
|
-
throw Pt();
|
|
1670
|
-
}
|
|
1671
|
-
const ze = Ce && (l.isReadableStream(O) || l.isStream(O)), Rt = (_, Z, he) => jt(
|
|
1672
|
-
_,
|
|
1673
|
-
It,
|
|
1674
|
-
(ve) => {
|
|
1675
|
-
if (Ce && ve > re)
|
|
1676
|
-
throw Ae = Pt();
|
|
1677
|
-
Z && Z(ve);
|
|
1678
|
-
},
|
|
1679
|
-
he
|
|
1680
|
-
);
|
|
1681
|
-
if (y && m !== "get" && m !== "head" && (ne || ze)) {
|
|
1682
|
-
if (_e = _e ?? await A(L, O), _e !== 0 || ze) {
|
|
1683
|
-
let _ = new o(g, {
|
|
1684
|
-
method: "POST",
|
|
1685
|
-
body: O,
|
|
1686
|
-
duplex: "half"
|
|
1687
|
-
}), Z;
|
|
1688
|
-
if (l.isFormData(O) && (Z = _.headers.get("content-type")) && L.setContentType(Z), _.body) {
|
|
1689
|
-
const [he, ve] = ne && Ft(
|
|
1690
|
-
_e,
|
|
1691
|
-
We(Lt(ne))
|
|
1692
|
-
) || [];
|
|
1693
|
-
O = Rt(_.body, he, ve);
|
|
1694
|
-
}
|
|
1695
|
-
}
|
|
1696
|
-
} else if (ze && !u && c && m !== "get" && m !== "head")
|
|
1697
|
-
O = Rt(O);
|
|
1698
|
-
else if (ze && u && !y && m !== "get" && m !== "head")
|
|
1699
|
-
throw new T(
|
|
1700
|
-
"Stream request bodies are not supported by the current fetch implementation",
|
|
1701
|
-
T.ERR_NOT_SUPPORT,
|
|
1702
|
-
f,
|
|
1703
|
-
j
|
|
1704
|
-
);
|
|
1705
|
-
l.isString(fe) || (fe = fe ? "include" : "omit");
|
|
1706
|
-
const kn = u && "credentials" in o.prototype;
|
|
1707
|
-
if (l.isFormData(O)) {
|
|
1708
|
-
const _ = L.getContentType();
|
|
1709
|
-
_ && /^multipart\/form-data/i.test(_) && !/boundary=/i.test(_) && L.delete("content-type");
|
|
1710
|
-
}
|
|
1711
|
-
L.set("User-Agent", "axios/" + wt, !1);
|
|
1712
|
-
const Et = {
|
|
1713
|
-
...C,
|
|
1714
|
-
signal: ie,
|
|
1715
|
-
method: m.toUpperCase(),
|
|
1716
|
-
headers: an(L.normalize()),
|
|
1717
|
-
body: O,
|
|
1718
|
-
duplex: "half",
|
|
1719
|
-
credentials: kn ? fe : void 0
|
|
1720
|
-
};
|
|
1721
|
-
j = u && new o(g, Et);
|
|
1722
|
-
let me = await (u ? Be(j, C) : Be(g, Et));
|
|
1723
|
-
const Tt = te.from(me.headers);
|
|
1724
|
-
if (q) {
|
|
1725
|
-
const _ = l.toFiniteNumber(Tt.getContentLength());
|
|
1726
|
-
if (_ != null && _ > E)
|
|
1727
|
-
throw new T(
|
|
1728
|
-
"maxContentLength size of " + E + " exceeded",
|
|
1729
|
-
T.ERR_BAD_RESPONSE,
|
|
1730
|
-
f,
|
|
1731
|
-
j
|
|
1732
|
-
);
|
|
1733
|
-
}
|
|
1734
|
-
const tt = k && (K === "stream" || K === "response");
|
|
1735
|
-
if (k && me.body && (Y || q || tt && ye)) {
|
|
1736
|
-
const _ = {};
|
|
1737
|
-
["status", "statusText", "headers"].forEach((De) => {
|
|
1738
|
-
_[De] = me[De];
|
|
1739
|
-
});
|
|
1740
|
-
const Z = l.toFiniteNumber(Tt.getContentLength()), [he, ve] = Y && Ft(
|
|
1741
|
-
Z,
|
|
1742
|
-
We(Lt(Y), !0)
|
|
1743
|
-
) || [];
|
|
1744
|
-
let St = 0;
|
|
1745
|
-
const Pn = (De) => {
|
|
1746
|
-
if (q && (St = De, St > E))
|
|
1747
|
-
throw new T(
|
|
1748
|
-
"maxContentLength size of " + E + " exceeded",
|
|
1749
|
-
T.ERR_BAD_RESPONSE,
|
|
1750
|
-
f,
|
|
1751
|
-
j
|
|
1752
|
-
);
|
|
1753
|
-
he && he(De);
|
|
1754
|
-
};
|
|
1755
|
-
me = new s(
|
|
1756
|
-
jt(me.body, It, Pn, () => {
|
|
1757
|
-
ve && ve(), ye && ye();
|
|
1758
|
-
}),
|
|
1759
|
-
_
|
|
1760
|
-
);
|
|
1761
|
-
}
|
|
1762
|
-
K = K || "text";
|
|
1763
|
-
let ge = await h[l.findKey(h, K) || "text"](
|
|
1764
|
-
me,
|
|
1765
|
-
f
|
|
1766
|
-
);
|
|
1767
|
-
if (q && !k && !tt) {
|
|
1768
|
-
let _;
|
|
1769
|
-
if (ge != null && (typeof ge.byteLength == "number" ? _ = ge.byteLength : typeof ge.size == "number" ? _ = ge.size : typeof ge == "string" && (_ = typeof a == "function" ? new a().encode(ge).byteLength : ge.length)), typeof _ == "number" && _ > E)
|
|
1770
|
-
throw new T(
|
|
1771
|
-
"maxContentLength size of " + E + " exceeded",
|
|
1772
|
-
T.ERR_BAD_RESPONSE,
|
|
1773
|
-
f,
|
|
1774
|
-
j
|
|
1775
|
-
);
|
|
1776
|
-
}
|
|
1777
|
-
return !tt && ye && ye(), await new Promise((_, Z) => {
|
|
1778
|
-
pn(_, Z, {
|
|
1779
|
-
data: ge,
|
|
1780
|
-
headers: te.from(me.headers),
|
|
1781
|
-
status: me.status,
|
|
1782
|
-
statusText: me.statusText,
|
|
1783
|
-
config: f,
|
|
1784
|
-
request: j
|
|
1785
|
-
});
|
|
1786
|
-
});
|
|
1787
|
-
} catch (D) {
|
|
1788
|
-
if (ye && ye(), ie && ie.aborted && ie.reason instanceof T) {
|
|
1789
|
-
const ae = ie.reason;
|
|
1790
|
-
throw ae.config = f, j && (ae.request = j), D !== ae && Object.defineProperty(ae, "cause", {
|
|
1791
|
-
__proto__: null,
|
|
1792
|
-
value: D,
|
|
1793
|
-
writable: !0,
|
|
1794
|
-
enumerable: !1,
|
|
1795
|
-
configurable: !0
|
|
1796
|
-
}), ae;
|
|
1797
|
-
}
|
|
1798
|
-
if (Ae)
|
|
1799
|
-
throw j && !Ae.request && (Ae.request = j), Ae;
|
|
1800
|
-
if (D instanceof T)
|
|
1801
|
-
throw j && !D.request && (D.request = j), D;
|
|
1802
|
-
if (D && D.name === "TypeError" && /Load failed|fetch/i.test(D.message)) {
|
|
1803
|
-
const ae = new T(
|
|
1804
|
-
"Network Error",
|
|
1805
|
-
T.ERR_NETWORK,
|
|
1806
|
-
f,
|
|
1807
|
-
j,
|
|
1808
|
-
D && D.response
|
|
1809
|
-
);
|
|
1810
|
-
throw Object.defineProperty(ae, "cause", {
|
|
1811
|
-
__proto__: null,
|
|
1812
|
-
value: D.cause || D,
|
|
1813
|
-
writable: !0,
|
|
1814
|
-
enumerable: !1,
|
|
1815
|
-
configurable: !0
|
|
1816
|
-
}), ae;
|
|
1817
|
-
}
|
|
1818
|
-
throw T.from(D, D && D.code, f, j, D && D.response);
|
|
1819
|
-
}
|
|
1820
|
-
};
|
|
1821
|
-
}, Rr = /* @__PURE__ */ new Map(), gn = (e) => {
|
|
1822
|
-
let t = e && e.env || {};
|
|
1823
|
-
const { fetch: n, Request: a, Response: r } = t, o = [a, r, n];
|
|
1824
|
-
let s = o.length, i = s, u, d, c = Rr;
|
|
1825
|
-
for (; i--; )
|
|
1826
|
-
u = o[i], d = c.get(u), d === void 0 && c.set(u, d = i ? /* @__PURE__ */ new Map() : Pr(t)), c = d;
|
|
1827
|
-
return d;
|
|
1828
|
-
};
|
|
1829
|
-
gn();
|
|
1830
|
-
const xt = {
|
|
1831
|
-
http: Fa,
|
|
1832
|
-
xhr: fr,
|
|
1833
|
-
fetch: {
|
|
1834
|
-
get: gn
|
|
1835
|
-
}
|
|
1836
|
-
};
|
|
1837
|
-
l.forEach(xt, (e, t) => {
|
|
1838
|
-
if (e) {
|
|
1839
|
-
try {
|
|
1840
|
-
Object.defineProperty(e, "name", { __proto__: null, value: t });
|
|
1841
|
-
} catch {
|
|
1842
|
-
}
|
|
1843
|
-
Object.defineProperty(e, "adapterName", { __proto__: null, value: t });
|
|
1844
|
-
}
|
|
1845
|
-
});
|
|
1846
|
-
const Vt = (e) => `- ${e}`, Er = (e) => l.isFunction(e) || e === null || e === !1;
|
|
1847
|
-
function Tr(e, t) {
|
|
1848
|
-
e = l.isArray(e) ? e : [e];
|
|
1849
|
-
const { length: n } = e;
|
|
1850
|
-
let a, r;
|
|
1851
|
-
const o = {};
|
|
1852
|
-
for (let s = 0; s < n; s++) {
|
|
1853
|
-
a = e[s];
|
|
1854
|
-
let i;
|
|
1855
|
-
if (r = a, !Er(a) && (r = xt[(i = String(a)).toLowerCase()], r === void 0))
|
|
1856
|
-
throw new T(`Unknown adapter '${i}'`);
|
|
1857
|
-
if (r && (l.isFunction(r) || (r = r.get(t))))
|
|
1858
|
-
break;
|
|
1859
|
-
o[i || "#" + s] = r;
|
|
1860
|
-
}
|
|
1861
|
-
if (!r) {
|
|
1862
|
-
const s = Object.entries(o).map(
|
|
1863
|
-
([u, d]) => `adapter ${u} ` + (d === !1 ? "is not supported by the environment" : "is not available in the build")
|
|
1864
|
-
);
|
|
1865
|
-
let i = n ? s.length > 1 ? `since :
|
|
1866
|
-
` + s.map(Vt).join(`
|
|
1867
|
-
`) : " " + Vt(s[0]) : "as no adapter specified";
|
|
1868
|
-
throw new T(
|
|
1869
|
-
"There is no suitable adapter to dispatch the request " + i,
|
|
1870
|
-
T.ERR_NOT_SUPPORT
|
|
1871
|
-
);
|
|
1872
|
-
}
|
|
1873
|
-
return r;
|
|
1874
|
-
}
|
|
1875
|
-
const hn = {
|
|
1876
|
-
/**
|
|
1877
|
-
* Resolve an adapter from a list of adapter names or functions.
|
|
1878
|
-
* @type {Function}
|
|
1879
|
-
*/
|
|
1880
|
-
getAdapter: Tr,
|
|
1881
|
-
/**
|
|
1882
|
-
* Exposes all known adapters
|
|
1883
|
-
* @type {Object<string, Function|Object>}
|
|
1884
|
-
*/
|
|
1885
|
-
adapters: xt
|
|
1886
|
-
};
|
|
1887
|
-
function st(e) {
|
|
1888
|
-
if (e.cancelToken && e.cancelToken.throwIfRequested(), e.signal && e.signal.aborted)
|
|
1889
|
-
throw new je(null, e);
|
|
1890
|
-
}
|
|
1891
|
-
function qt(e) {
|
|
1892
|
-
return st(e), e.headers = te.from(e.headers), e.data = ot.call(e, e.transformRequest), ["post", "put", "patch"].indexOf(e.method) !== -1 && e.headers.setContentType("application/x-www-form-urlencoded", !1), hn.getAdapter(e.adapter || vt.adapter, e)(e).then(
|
|
1893
|
-
function(t) {
|
|
1894
|
-
st(e), e.response = t;
|
|
1895
|
-
try {
|
|
1896
|
-
t.data = ot.call(e, e.transformResponse, t);
|
|
1897
|
-
} finally {
|
|
1898
|
-
delete e.response;
|
|
1899
|
-
}
|
|
1900
|
-
return t.headers = te.from(t.headers), t;
|
|
1901
|
-
},
|
|
1902
|
-
function(t) {
|
|
1903
|
-
if (!dn(t) && (st(e), t && t.response)) {
|
|
1904
|
-
e.response = t.response;
|
|
1905
|
-
try {
|
|
1906
|
-
t.response.data = ot.call(
|
|
1907
|
-
e,
|
|
1908
|
-
e.transformResponse,
|
|
1909
|
-
t.response
|
|
1910
|
-
);
|
|
1911
|
-
} finally {
|
|
1912
|
-
delete e.response;
|
|
1913
|
-
}
|
|
1914
|
-
t.response.headers = te.from(t.response.headers);
|
|
1915
|
-
}
|
|
1916
|
-
return Promise.reject(t);
|
|
1917
|
-
}
|
|
1918
|
-
);
|
|
1919
|
-
}
|
|
1920
|
-
const et = {};
|
|
1921
|
-
["object", "boolean", "number", "function", "string", "symbol"].forEach((e, t) => {
|
|
1922
|
-
et[e] = function(n) {
|
|
1923
|
-
return typeof n === e || "a" + (t < 1 ? "n " : " ") + e;
|
|
1924
|
-
};
|
|
1925
|
-
});
|
|
1926
|
-
const $t = {};
|
|
1927
|
-
et.transitional = function(e, t, n) {
|
|
1928
|
-
function a(r, o) {
|
|
1929
|
-
return "[Axios v" + wt + "] Transitional option '" + r + "'" + o + (n ? ". " + n : "");
|
|
1930
|
-
}
|
|
1931
|
-
return (r, o, s) => {
|
|
1932
|
-
if (e === !1)
|
|
1933
|
-
throw new T(
|
|
1934
|
-
a(o, " has been removed" + (t ? " in " + t : "")),
|
|
1935
|
-
T.ERR_DEPRECATED
|
|
1936
|
-
);
|
|
1937
|
-
return t && !$t[o] && ($t[o] = !0, console.warn(
|
|
1938
|
-
a(
|
|
1939
|
-
o,
|
|
1940
|
-
" has been deprecated since v" + t + " and will be removed in the near future"
|
|
1941
|
-
)
|
|
1942
|
-
)), e ? e(r, o, s) : !0;
|
|
1943
|
-
};
|
|
1944
|
-
};
|
|
1945
|
-
et.spelling = function(e) {
|
|
1946
|
-
return (t, n) => (console.warn(`${n} is likely a misspelling of ${e}`), !0);
|
|
1947
|
-
};
|
|
1948
|
-
function Sr(e, t, n) {
|
|
1949
|
-
if (typeof e != "object" || e === null)
|
|
1950
|
-
throw new T("options must be an object", T.ERR_BAD_OPTION_VALUE);
|
|
1951
|
-
const a = Object.keys(e);
|
|
1952
|
-
let r = a.length;
|
|
1953
|
-
for (; r-- > 0; ) {
|
|
1954
|
-
const o = a[r], s = Object.prototype.hasOwnProperty.call(t, o) ? t[o] : void 0;
|
|
1955
|
-
if (s) {
|
|
1956
|
-
const i = e[o], u = i === void 0 || s(i, o, e);
|
|
1957
|
-
if (u !== !0)
|
|
1958
|
-
throw new T(
|
|
1959
|
-
"option " + o + " must be " + u,
|
|
1960
|
-
T.ERR_BAD_OPTION_VALUE
|
|
1961
|
-
);
|
|
1962
|
-
continue;
|
|
1963
|
-
}
|
|
1964
|
-
if (n !== !0)
|
|
1965
|
-
throw new T("Unknown option " + o, T.ERR_BAD_OPTION);
|
|
1966
|
-
}
|
|
1967
|
-
}
|
|
1968
|
-
const Ge = {
|
|
1969
|
-
assertOptions: Sr,
|
|
1970
|
-
validators: et
|
|
1971
|
-
}, J = Ge.validators;
|
|
1972
|
-
class Xe {
|
|
1973
|
-
constructor(t) {
|
|
1974
|
-
this.defaults = t || {}, this.interceptors = {
|
|
1975
|
-
request: new At(),
|
|
1976
|
-
response: new At()
|
|
1977
|
-
};
|
|
1978
|
-
}
|
|
1979
|
-
/**
|
|
1980
|
-
* Dispatch a request
|
|
1981
|
-
*
|
|
1982
|
-
* @param {String|Object} configOrUrl The config specific for this request (merged with this.defaults)
|
|
1983
|
-
* @param {?Object} config
|
|
1984
|
-
*
|
|
1985
|
-
* @returns {Promise} The Promise to be fulfilled
|
|
1986
|
-
*/
|
|
1987
|
-
async request(t, n) {
|
|
1988
|
-
try {
|
|
1989
|
-
return await this._request(t, n);
|
|
1990
|
-
} catch (a) {
|
|
1991
|
-
if (a instanceof Error) {
|
|
1992
|
-
let r = {};
|
|
1993
|
-
Error.captureStackTrace ? Error.captureStackTrace(r) : r = new Error();
|
|
1994
|
-
const o = (() => {
|
|
1995
|
-
if (!r.stack)
|
|
1996
|
-
return "";
|
|
1997
|
-
const s = r.stack.indexOf(`
|
|
1998
|
-
`);
|
|
1999
|
-
return s === -1 ? "" : r.stack.slice(s + 1);
|
|
2000
|
-
})();
|
|
2001
|
-
try {
|
|
2002
|
-
if (!a.stack)
|
|
2003
|
-
a.stack = o;
|
|
2004
|
-
else if (o) {
|
|
2005
|
-
const s = o.indexOf(`
|
|
2006
|
-
`), i = s === -1 ? -1 : o.indexOf(`
|
|
2007
|
-
`, s + 1), u = i === -1 ? "" : o.slice(i + 1);
|
|
2008
|
-
String(a.stack).endsWith(u) || (a.stack += `
|
|
2009
|
-
` + o);
|
|
2010
|
-
}
|
|
2011
|
-
} catch {
|
|
2012
|
-
}
|
|
2013
|
-
}
|
|
2014
|
-
throw a;
|
|
2015
|
-
}
|
|
2016
|
-
}
|
|
2017
|
-
_request(t, n) {
|
|
2018
|
-
typeof t == "string" ? (n = n || {}, n.url = t) : n = t || {}, n = Pe(this.defaults, n);
|
|
2019
|
-
const { transitional: a, paramsSerializer: r, headers: o } = n;
|
|
2020
|
-
a !== void 0 && Ge.assertOptions(
|
|
2021
|
-
a,
|
|
2022
|
-
{
|
|
2023
|
-
silentJSONParsing: J.transitional(J.boolean),
|
|
2024
|
-
forcedJSONParsing: J.transitional(J.boolean),
|
|
2025
|
-
clarifyTimeoutError: J.transitional(J.boolean),
|
|
2026
|
-
legacyInterceptorReqResOrdering: J.transitional(J.boolean),
|
|
2027
|
-
advertiseZstdAcceptEncoding: J.transitional(J.boolean),
|
|
2028
|
-
validateStatusUndefinedResolves: J.transitional(J.boolean)
|
|
2029
|
-
},
|
|
2030
|
-
!1
|
|
2031
|
-
), r != null && (l.isFunction(r) ? n.paramsSerializer = {
|
|
2032
|
-
serialize: r
|
|
2033
|
-
} : Ge.assertOptions(
|
|
2034
|
-
r,
|
|
2035
|
-
{
|
|
2036
|
-
encode: J.function,
|
|
2037
|
-
serialize: J.function
|
|
2038
|
-
},
|
|
2039
|
-
!0
|
|
2040
|
-
)), n.allowAbsoluteUrls !== void 0 || (this.defaults.allowAbsoluteUrls !== void 0 ? n.allowAbsoluteUrls = this.defaults.allowAbsoluteUrls : n.allowAbsoluteUrls = !0), Ge.assertOptions(
|
|
2041
|
-
n,
|
|
2042
|
-
{
|
|
2043
|
-
baseUrl: J.spelling("baseURL"),
|
|
2044
|
-
withXsrfToken: J.spelling("withXSRFToken")
|
|
2045
|
-
},
|
|
2046
|
-
!0
|
|
2047
|
-
), n.method = (n.method || this.defaults.method || "get").toLowerCase();
|
|
2048
|
-
let s = o && l.merge(o.common, o[n.method]);
|
|
2049
|
-
o && l.forEach(["delete", "get", "head", "post", "put", "patch", "query", "common"], (h) => {
|
|
2050
|
-
delete o[h];
|
|
2051
|
-
}), n.headers = te.concat(s, o);
|
|
2052
|
-
const i = [];
|
|
2053
|
-
let u = !0;
|
|
2054
|
-
this.interceptors.request.forEach(function(h) {
|
|
2055
|
-
if (typeof h.runWhen == "function" && h.runWhen(n) === !1)
|
|
2056
|
-
return;
|
|
2057
|
-
u = u && h.synchronous;
|
|
2058
|
-
const v = n.transitional || ht;
|
|
2059
|
-
v && v.legacyInterceptorReqResOrdering ? i.unshift(h.fulfilled, h.rejected) : i.push(h.fulfilled, h.rejected);
|
|
2060
|
-
});
|
|
2061
|
-
const d = [];
|
|
2062
|
-
this.interceptors.response.forEach(function(h) {
|
|
2063
|
-
d.push(h.fulfilled, h.rejected);
|
|
2064
|
-
});
|
|
2065
|
-
let c, p = 0, y;
|
|
2066
|
-
if (!u) {
|
|
2067
|
-
const h = [qt.bind(this), void 0];
|
|
2068
|
-
for (h.unshift(...i), h.push(...d), y = h.length, c = Promise.resolve(n); p < y; )
|
|
2069
|
-
c = c.then(h[p++], h[p++]);
|
|
2070
|
-
return c;
|
|
2071
|
-
}
|
|
2072
|
-
y = i.length;
|
|
2073
|
-
let k = n;
|
|
2074
|
-
for (; p < y; ) {
|
|
2075
|
-
const h = i[p++], v = i[p++];
|
|
2076
|
-
try {
|
|
2077
|
-
k = h(k);
|
|
2078
|
-
} catch (A) {
|
|
2079
|
-
v.call(this, A);
|
|
2080
|
-
break;
|
|
2081
|
-
}
|
|
2082
|
-
}
|
|
2083
|
-
try {
|
|
2084
|
-
c = qt.call(this, k);
|
|
2085
|
-
} catch (h) {
|
|
2086
|
-
return Promise.reject(h);
|
|
2087
|
-
}
|
|
2088
|
-
for (p = 0, y = d.length; p < y; )
|
|
2089
|
-
c = c.then(d[p++], d[p++]);
|
|
2090
|
-
return c;
|
|
2091
|
-
}
|
|
2092
|
-
getUri(t) {
|
|
2093
|
-
t = Pe(this.defaults, t);
|
|
2094
|
-
const n = fn(t.baseURL, t.url, t.allowAbsoluteUrls, t);
|
|
2095
|
-
return ln(n, t.params, t.paramsSerializer);
|
|
2096
|
-
}
|
|
2097
|
-
}
|
|
2098
|
-
l.forEach(["delete", "get", "head", "options"], function(e) {
|
|
2099
|
-
Xe.prototype[e] = function(t, n) {
|
|
2100
|
-
return this.request(
|
|
2101
|
-
Pe(n || {}, {
|
|
2102
|
-
method: e,
|
|
2103
|
-
url: t,
|
|
2104
|
-
data: n && l.hasOwnProp(n, "data") ? n.data : void 0
|
|
2105
|
-
})
|
|
2106
|
-
);
|
|
2107
|
-
};
|
|
2108
|
-
});
|
|
2109
|
-
l.forEach(["post", "put", "patch", "query"], function(e) {
|
|
2110
|
-
function t(n) {
|
|
2111
|
-
return function(a, r, o) {
|
|
2112
|
-
return this.request(
|
|
2113
|
-
Pe(o || {}, {
|
|
2114
|
-
method: e,
|
|
2115
|
-
headers: n ? {
|
|
2116
|
-
"Content-Type": "multipart/form-data"
|
|
2117
|
-
} : {},
|
|
2118
|
-
url: a,
|
|
2119
|
-
data: r
|
|
2120
|
-
})
|
|
2121
|
-
);
|
|
2122
|
-
};
|
|
2123
|
-
}
|
|
2124
|
-
Xe.prototype[e] = t(), e !== "query" && (Xe.prototype[e + "Form"] = t(!0));
|
|
2125
|
-
});
|
|
2126
|
-
const He = Xe;
|
|
2127
|
-
class kt {
|
|
2128
|
-
constructor(t) {
|
|
2129
|
-
if (typeof t != "function")
|
|
2130
|
-
throw new TypeError("executor must be a function.");
|
|
2131
|
-
let n;
|
|
2132
|
-
this.promise = new Promise(function(r) {
|
|
2133
|
-
n = r;
|
|
2134
|
-
});
|
|
2135
|
-
const a = this;
|
|
2136
|
-
this.promise.then((r) => {
|
|
2137
|
-
if (!a._listeners)
|
|
2138
|
-
return;
|
|
2139
|
-
let o = a._listeners.length;
|
|
2140
|
-
for (; o-- > 0; )
|
|
2141
|
-
a._listeners[o](r);
|
|
2142
|
-
a._listeners = null;
|
|
2143
|
-
}), this.promise.then = (r) => {
|
|
2144
|
-
let o;
|
|
2145
|
-
const s = new Promise((i) => {
|
|
2146
|
-
a.subscribe(i), o = i;
|
|
2147
|
-
}).then(r);
|
|
2148
|
-
return s.cancel = function() {
|
|
2149
|
-
a.unsubscribe(o);
|
|
2150
|
-
}, s;
|
|
2151
|
-
}, t(function(r, o, s) {
|
|
2152
|
-
a.reason || (a.reason = new je(r, o, s), n(a.reason));
|
|
2153
|
-
});
|
|
2154
|
-
}
|
|
2155
|
-
/**
|
|
2156
|
-
* Throws a `CanceledError` if cancellation has been requested.
|
|
2157
|
-
*/
|
|
2158
|
-
throwIfRequested() {
|
|
2159
|
-
if (this.reason)
|
|
2160
|
-
throw this.reason;
|
|
2161
|
-
}
|
|
2162
|
-
/**
|
|
2163
|
-
* Subscribe to the cancel signal
|
|
2164
|
-
*/
|
|
2165
|
-
subscribe(t) {
|
|
2166
|
-
if (this.reason) {
|
|
2167
|
-
t(this.reason);
|
|
2168
|
-
return;
|
|
2169
|
-
}
|
|
2170
|
-
this._listeners ? this._listeners.push(t) : this._listeners = [t];
|
|
2171
|
-
}
|
|
2172
|
-
/**
|
|
2173
|
-
* Unsubscribe from the cancel signal
|
|
2174
|
-
*/
|
|
2175
|
-
unsubscribe(t) {
|
|
2176
|
-
if (!this._listeners)
|
|
2177
|
-
return;
|
|
2178
|
-
const n = this._listeners.indexOf(t);
|
|
2179
|
-
n !== -1 && this._listeners.splice(n, 1);
|
|
2180
|
-
}
|
|
2181
|
-
toAbortSignal() {
|
|
2182
|
-
const t = new AbortController(), n = (a) => {
|
|
2183
|
-
t.abort(a);
|
|
2184
|
-
};
|
|
2185
|
-
return this.subscribe(n), t.signal.unsubscribe = () => this.unsubscribe(n), t.signal;
|
|
2186
|
-
}
|
|
2187
|
-
/**
|
|
2188
|
-
* Returns an object that contains a new `CancelToken` and a function that, when called,
|
|
2189
|
-
* cancels the `CancelToken`.
|
|
2190
|
-
*/
|
|
2191
|
-
static source() {
|
|
2192
|
-
let t;
|
|
2193
|
-
return {
|
|
2194
|
-
token: new kt(function(n) {
|
|
2195
|
-
t = n;
|
|
2196
|
-
}),
|
|
2197
|
-
cancel: t
|
|
2198
|
-
};
|
|
2199
|
-
}
|
|
2200
|
-
}
|
|
2201
|
-
const Or = kt;
|
|
2202
|
-
function Cr(e) {
|
|
2203
|
-
return function(t) {
|
|
2204
|
-
return e.apply(null, t);
|
|
2205
|
-
};
|
|
2206
|
-
}
|
|
2207
|
-
function Br(e) {
|
|
2208
|
-
return l.isObject(e) && e.isAxiosError === !0;
|
|
2209
|
-
}
|
|
2210
|
-
const dt = {
|
|
2211
|
-
Continue: 100,
|
|
2212
|
-
SwitchingProtocols: 101,
|
|
2213
|
-
Processing: 102,
|
|
2214
|
-
EarlyHints: 103,
|
|
2215
|
-
Ok: 200,
|
|
2216
|
-
Created: 201,
|
|
2217
|
-
Accepted: 202,
|
|
2218
|
-
NonAuthoritativeInformation: 203,
|
|
2219
|
-
NoContent: 204,
|
|
2220
|
-
ResetContent: 205,
|
|
2221
|
-
PartialContent: 206,
|
|
2222
|
-
MultiStatus: 207,
|
|
2223
|
-
AlreadyReported: 208,
|
|
2224
|
-
ImUsed: 226,
|
|
2225
|
-
MultipleChoices: 300,
|
|
2226
|
-
MovedPermanently: 301,
|
|
2227
|
-
Found: 302,
|
|
2228
|
-
SeeOther: 303,
|
|
2229
|
-
NotModified: 304,
|
|
2230
|
-
UseProxy: 305,
|
|
2231
|
-
Unused: 306,
|
|
2232
|
-
TemporaryRedirect: 307,
|
|
2233
|
-
PermanentRedirect: 308,
|
|
2234
|
-
BadRequest: 400,
|
|
2235
|
-
Unauthorized: 401,
|
|
2236
|
-
PaymentRequired: 402,
|
|
2237
|
-
Forbidden: 403,
|
|
2238
|
-
NotFound: 404,
|
|
2239
|
-
MethodNotAllowed: 405,
|
|
2240
|
-
NotAcceptable: 406,
|
|
2241
|
-
ProxyAuthenticationRequired: 407,
|
|
2242
|
-
RequestTimeout: 408,
|
|
2243
|
-
Conflict: 409,
|
|
2244
|
-
Gone: 410,
|
|
2245
|
-
LengthRequired: 411,
|
|
2246
|
-
PreconditionFailed: 412,
|
|
2247
|
-
PayloadTooLarge: 413,
|
|
2248
|
-
UriTooLong: 414,
|
|
2249
|
-
UnsupportedMediaType: 415,
|
|
2250
|
-
RangeNotSatisfiable: 416,
|
|
2251
|
-
ExpectationFailed: 417,
|
|
2252
|
-
ImATeapot: 418,
|
|
2253
|
-
MisdirectedRequest: 421,
|
|
2254
|
-
UnprocessableEntity: 422,
|
|
2255
|
-
Locked: 423,
|
|
2256
|
-
FailedDependency: 424,
|
|
2257
|
-
TooEarly: 425,
|
|
2258
|
-
UpgradeRequired: 426,
|
|
2259
|
-
PreconditionRequired: 428,
|
|
2260
|
-
TooManyRequests: 429,
|
|
2261
|
-
RequestHeaderFieldsTooLarge: 431,
|
|
2262
|
-
UnavailableForLegalReasons: 451,
|
|
2263
|
-
InternalServerError: 500,
|
|
2264
|
-
NotImplemented: 501,
|
|
2265
|
-
BadGateway: 502,
|
|
2266
|
-
ServiceUnavailable: 503,
|
|
2267
|
-
GatewayTimeout: 504,
|
|
2268
|
-
HttpVersionNotSupported: 505,
|
|
2269
|
-
VariantAlsoNegotiates: 506,
|
|
2270
|
-
InsufficientStorage: 507,
|
|
2271
|
-
LoopDetected: 508,
|
|
2272
|
-
NotExtended: 510,
|
|
2273
|
-
NetworkAuthenticationRequired: 511,
|
|
2274
|
-
WebServerIsDown: 521,
|
|
2275
|
-
ConnectionTimedOut: 522,
|
|
2276
|
-
OriginIsUnreachable: 523,
|
|
2277
|
-
TimeoutOccurred: 524,
|
|
2278
|
-
SslHandshakeFailed: 525,
|
|
2279
|
-
InvalidSslCertificate: 526
|
|
2280
|
-
};
|
|
2281
|
-
Object.entries(dt).forEach(([e, t]) => {
|
|
2282
|
-
dt[t] = e;
|
|
2283
|
-
});
|
|
2284
|
-
const _r = dt;
|
|
2285
|
-
function bn(e) {
|
|
2286
|
-
const t = new He(e), n = Wt(He.prototype.request, t);
|
|
2287
|
-
return l.extend(n, He.prototype, t, { allOwnKeys: !0 }), l.extend(n, t, null, { allOwnKeys: !0 }), n.create = function(a) {
|
|
2288
|
-
return bn(Pe(e, a));
|
|
2289
|
-
}, n;
|
|
2290
|
-
}
|
|
2291
|
-
const M = bn(vt);
|
|
2292
|
-
M.Axios = He;
|
|
2293
|
-
M.CanceledError = je;
|
|
2294
|
-
M.CancelToken = Or;
|
|
2295
|
-
M.isCancel = dn;
|
|
2296
|
-
M.VERSION = wt;
|
|
2297
|
-
M.toFormData = Ze;
|
|
2298
|
-
M.AxiosError = T;
|
|
2299
|
-
M.Cancel = M.CanceledError;
|
|
2300
|
-
M.all = function(e) {
|
|
2301
|
-
return Promise.all(e);
|
|
2302
|
-
};
|
|
2303
|
-
M.spread = Cr;
|
|
2304
|
-
M.isAxiosError = Br;
|
|
2305
|
-
M.mergeConfig = Pe;
|
|
2306
|
-
M.AxiosHeaders = te;
|
|
2307
|
-
M.formToJSON = (e) => cn(l.isHTMLForm(e) ? new FormData(e) : e);
|
|
2308
|
-
M.getAdapter = hn.getAdapter;
|
|
2309
|
-
M.HttpStatusCode = _r;
|
|
2310
|
-
M.default = M;
|
|
2311
|
-
const Ar = M;
|
|
2312
|
-
function Dr(e, t) {
|
|
2313
|
-
const n = t && t.toUpperCase() !== "MY" ? `.${t.toLowerCase()}` : "";
|
|
2314
|
-
return `https://portal-v2${e === "dev" ? "-dev" : ""}${n}.feedmeapi.com`;
|
|
2315
|
-
}
|
|
2316
|
-
function Fr(e, t) {
|
|
2317
|
-
return Dr(e, t);
|
|
2318
|
-
}
|
|
2319
|
-
const yn = ["1x1", "4x3", "16x9", "9x16"], pt = "asset";
|
|
2320
|
-
function Lr(e) {
|
|
2321
|
-
return e.some((t) => t.status === "pending");
|
|
2322
|
-
}
|
|
2323
|
-
function Nr(e) {
|
|
2324
|
-
if (e.length === 0)
|
|
2325
|
-
return null;
|
|
2326
|
-
const t = e.filter((n) => n.status === "active").length;
|
|
2327
|
-
return { tone: e.some((n) => n.status === "pending") ? "progress" : e.some((n) => n.status === "failed") ? "warning" : "done", active: t, total: e.length };
|
|
2328
|
-
}
|
|
2329
|
-
function vn(e, t) {
|
|
2330
|
-
return [
|
|
2331
|
-
{ key: "original", kind: "original", ratio: null, url: e.url, status: null },
|
|
2332
|
-
...t.map((n) => ({
|
|
2333
|
-
key: n.aspectRatio,
|
|
2334
|
-
kind: "variant",
|
|
2335
|
-
ratio: n.aspectRatio,
|
|
2336
|
-
url: n.status === "failed" ? null : n.url,
|
|
2337
|
-
status: n.status
|
|
2338
|
-
}))
|
|
2339
|
-
];
|
|
2340
|
-
}
|
|
2341
|
-
function Ur(e) {
|
|
2342
|
-
return e.refType && e.refId ? {
|
|
2343
|
-
kind: "image",
|
|
2344
|
-
entry: {
|
|
2345
|
-
refType: e.refType,
|
|
2346
|
-
refId: e.refId,
|
|
2347
|
-
imageId: e.imageId ?? "main",
|
|
2348
|
-
// null, not []: null deletes the whole set including the original, which is what
|
|
2349
|
-
// deleting an asset means. [] is rejected by the server.
|
|
2350
|
-
aspectRatios: null
|
|
2351
|
-
}
|
|
2352
|
-
} : { kind: "asset", id: e.id };
|
|
2353
|
-
}
|
|
2354
|
-
function jr(e, t, n) {
|
|
2355
|
-
if (e.kind === "original" || e.ratio === null)
|
|
2356
|
-
return {
|
|
2357
|
-
ratio: null,
|
|
2358
|
-
dimensions: `${t.width}×${t.height}`,
|
|
2359
|
-
sizeBytes: t.fileSizeBytes,
|
|
2360
|
-
contentType: t.mimeType,
|
|
2361
|
-
url: t.url
|
|
2362
|
-
};
|
|
2363
|
-
const a = n.find((r) => r.aspectRatio === e.ratio);
|
|
2364
|
-
return {
|
|
2365
|
-
ratio: e.ratio,
|
|
2366
|
-
dimensions: a != null && a.width && a != null && a.height ? `${a.width}×${a.height}` : null,
|
|
2367
|
-
sizeBytes: (a == null ? void 0 : a.fileSizeBytes) ?? null,
|
|
2368
|
-
contentType: (a == null ? void 0 : a.contentType) ?? null,
|
|
2369
|
-
// Falling back to the asset's url here would reintroduce the copy-link bug, so a
|
|
2370
|
-
// missing variant keeps its derivable address rather than borrowing the original's.
|
|
2371
|
-
url: (a == null ? void 0 : a.url) ?? `${t.url}?aspect_ratio=${e.ratio}`
|
|
2372
|
-
};
|
|
2373
|
-
}
|
|
2374
|
-
function Gt(e, t, n) {
|
|
2375
|
-
if (t === null)
|
|
2376
|
-
return { asset: e, ratio: null, url: e.url };
|
|
2377
|
-
const a = n.find((r) => r.aspectRatio === t);
|
|
2378
|
-
return !a || a.status !== "active" ? null : { asset: e, ratio: t, url: a.url };
|
|
2379
|
-
}
|
|
2380
|
-
function Ir(e) {
|
|
2381
|
-
return e >= 1024 * 1024 ? `${(e / 1024 / 1024).toFixed(1)} MB` : `${Math.round(e / 1024)} KB`;
|
|
2382
|
-
}
|
|
2383
|
-
const wn = "ai-draft";
|
|
2384
|
-
function Mr() {
|
|
2385
|
-
var e;
|
|
2386
|
-
const { sessionUser: t, namespace: n, currentCountry: a } = On(), r = (e = t.value) == null ? void 0 : e.token;
|
|
2387
|
-
return Ar.create({
|
|
2388
|
-
baseURL: Fr(n.value, a.value),
|
|
2389
|
-
headers: r ? { Authorization: `Bearer ${r}` } : {}
|
|
2390
|
-
});
|
|
2391
|
-
}
|
|
2392
|
-
const de = Mr;
|
|
2393
|
-
function Ie(e) {
|
|
2394
|
-
return `/media-v1/businesses/${e}/assets`;
|
|
2395
|
-
}
|
|
2396
|
-
async function zr(e) {
|
|
2397
|
-
const { businessId: t, ...n } = e, { data: a } = await de().get(Ie(t), { params: n });
|
|
2398
|
-
return a;
|
|
2399
|
-
}
|
|
2400
|
-
async function xn(e) {
|
|
2401
|
-
const { data: t } = await de().get(`${Ie(e)}/tags`, {
|
|
2402
|
-
params: { excludeTags: [wn] }
|
|
2403
|
-
});
|
|
2404
|
-
return t;
|
|
2405
|
-
}
|
|
2406
|
-
async function Vr(e) {
|
|
2407
|
-
const { tags: t } = await xn(e);
|
|
2408
|
-
return t.map((n) => n.tag);
|
|
2409
|
-
}
|
|
2410
|
-
async function qr(e, t, n) {
|
|
2411
|
-
const { data: a } = await de().patch(`${Ie(e)}/${t}`, { fileName: n });
|
|
2412
|
-
return a;
|
|
2413
|
-
}
|
|
2414
|
-
async function $r(e, t, n) {
|
|
2415
|
-
const { data: a } = await de().patch(`${Ie(e)}/${t}`, { tags: n });
|
|
2416
|
-
return a;
|
|
2417
|
-
}
|
|
2418
|
-
async function Gr(e, t) {
|
|
2419
|
-
await de().delete(`${Ie(e)}/${t}`);
|
|
2420
|
-
}
|
|
2421
|
-
function Me(e) {
|
|
2422
|
-
return `/media-v1/businesses/${e}/images`;
|
|
2423
|
-
}
|
|
2424
|
-
async function Hr(e, t, n) {
|
|
2425
|
-
const { data: a } = await de().post(`${Me(e)}/create`, t, {
|
|
2426
|
-
headers: n ? { "Idempotency-Key": n } : {}
|
|
2427
|
-
});
|
|
2428
|
-
return a;
|
|
2429
|
-
}
|
|
2430
|
-
async function Jr(e, t) {
|
|
2431
|
-
const { data: n } = await de().post(`${Me(e)}/delete`, {
|
|
2432
|
-
entries: t
|
|
2433
|
-
});
|
|
2434
|
-
return n.results;
|
|
2435
|
-
}
|
|
2436
|
-
async function Wr(e) {
|
|
2437
|
-
const { businessId: t, refIds: n, ...a } = e, { data: r } = await de().get(Me(t), {
|
|
2438
|
-
params: { ...a, refIds: n.join(",") }
|
|
2439
|
-
});
|
|
2440
|
-
return r.images;
|
|
2441
|
-
}
|
|
2442
|
-
async function Kr(e, t) {
|
|
2443
|
-
const { data: n } = await de().post(`${Me(e)}/upload-intent`, t);
|
|
2444
|
-
return n;
|
|
2445
|
-
}
|
|
2446
|
-
async function Xr(e, t) {
|
|
2447
|
-
const { data: n } = await de().post(`${Me(e)}/confirm`, t);
|
|
2448
|
-
return n;
|
|
2449
|
-
}
|
|
2450
|
-
async function Yr(e, t) {
|
|
2451
|
-
const n = Ur(t);
|
|
2452
|
-
if (n.kind === "image") {
|
|
2453
|
-
await Jr(e, [n.entry]);
|
|
2454
|
-
return;
|
|
2455
|
-
}
|
|
2456
|
-
await Gr(e, n.id);
|
|
2457
|
-
}
|
|
2458
|
-
const Qr = {
|
|
2459
|
-
assetGrid: {
|
|
2460
|
-
loading: "Loading…",
|
|
2461
|
-
empty: "No assets yet",
|
|
2462
|
-
columns: {
|
|
2463
|
-
name: "Name",
|
|
2464
|
-
dimensions: "Dimensions",
|
|
2465
|
-
fileSize: "Size",
|
|
2466
|
-
uploader: "Uploaded By",
|
|
2467
|
-
uploadedAt: "Uploaded At"
|
|
2468
|
-
},
|
|
2469
|
-
time: {
|
|
2470
|
-
justNow: "Just now",
|
|
2471
|
-
minutesAgo: "{n} minutes ago",
|
|
2472
|
-
hoursAgo: "{n} hours ago",
|
|
2473
|
-
daysAgo: "{n} days ago"
|
|
2474
|
-
}
|
|
2475
|
-
},
|
|
2476
|
-
assetPagination: {
|
|
2477
|
-
itemCount: "{start}–{end} of {total}",
|
|
2478
|
-
pageCount: "{total} pages"
|
|
2479
|
-
},
|
|
2480
|
-
assetDetailDialog: {
|
|
2481
|
-
previewTitle: "Preview",
|
|
2482
|
-
saveButton: "Save",
|
|
2483
|
-
dimensionsLabel: "Dimensions",
|
|
2484
|
-
sizeLabel: "Size",
|
|
2485
|
-
formatLabel: "Format",
|
|
2486
|
-
copyLinkButton: "Copy Link",
|
|
2487
|
-
deleteButton: "Delete",
|
|
2488
|
-
deleteDisclaimer: "If any business module is still using this image, it will show as broken wherever it's referenced after deletion — make sure it's no longer needed.",
|
|
2489
|
-
deleteDialogTitle: "Delete Asset",
|
|
2490
|
-
deleteDialogMessage: 'Delete "{fileName}"? {disclaimer}',
|
|
2491
|
-
deleteConfirmButton: "Delete",
|
|
2492
|
-
cancelButton: "Cancel"
|
|
2493
|
-
},
|
|
2494
|
-
tagFilterBar: {
|
|
2495
|
-
all: "All",
|
|
2496
|
-
newTagPlaceholder: "New tag…"
|
|
2497
|
-
},
|
|
2498
|
-
tagFilterTabs: {
|
|
2499
|
-
all: "All"
|
|
2500
|
-
},
|
|
2501
|
-
uploadPanel: {
|
|
2502
|
-
dropLabel: "Drag images here, or click to choose",
|
|
2503
|
-
helperText: "Supports JPG, PNG, WEBP, up to 10MB each",
|
|
2504
|
-
stagedCount: "Pending · {count}",
|
|
2505
|
-
tagsLabel: "Tags (optional)",
|
|
2506
|
-
suggestedTagsLabel: "Common",
|
|
2507
|
-
uploadFailedError: "Upload failed: {status}"
|
|
2508
|
-
},
|
|
2509
|
-
pickerModal: {
|
|
2510
|
-
title: "Select Assets",
|
|
2511
|
-
subtitleMultiple: "Select multiple or upload — click an image to toggle selection",
|
|
2512
|
-
subtitleSingle: "Click an image to select it, or switch to Upload New",
|
|
2513
|
-
searchPlaceholder: "Search…",
|
|
2514
|
-
browseTab: "Browse",
|
|
2515
|
-
uploadTab: "Upload New",
|
|
2516
|
-
selectedCount: "{count} selected",
|
|
2517
|
-
selectPrompt: "Select an image",
|
|
2518
|
-
cancelButton: "Cancel",
|
|
2519
|
-
uploadSubmitButton: "Upload {count}",
|
|
2520
|
-
confirmButton: "Confirm"
|
|
2521
|
-
},
|
|
2522
|
-
ratios: {
|
|
2523
|
-
title: "Ratios to generate",
|
|
2524
|
-
hint: "AI expands the canvas — about 40s per ratio"
|
|
2525
|
-
},
|
|
2526
|
-
variants: {
|
|
2527
|
-
badgeDone: "{count} ratios",
|
|
2528
|
-
badgeProgress: "{active}/{total} ratios",
|
|
2529
|
-
original: "Original",
|
|
2530
|
-
generating: "Generating…",
|
|
2531
|
-
failed: "Generation failed",
|
|
2532
|
-
regenerate: "Regenerate"
|
|
2533
|
-
},
|
|
2534
|
-
ratioBar: {
|
|
2535
|
-
label: "Ratio"
|
|
2536
|
-
}
|
|
2537
|
-
}, Zr = {
|
|
2538
|
-
mediaPicker: Qr
|
|
2539
|
-
}, eo = {
|
|
2540
|
-
assetGrid: {
|
|
2541
|
-
loading: "Chargement…",
|
|
2542
|
-
empty: "Aucun média",
|
|
2543
|
-
columns: {
|
|
2544
|
-
name: "Nom",
|
|
2545
|
-
dimensions: "Dimensions",
|
|
2546
|
-
fileSize: "Taille",
|
|
2547
|
-
uploader: "Importé par",
|
|
2548
|
-
uploadedAt: "Importé le"
|
|
2549
|
-
},
|
|
2550
|
-
time: {
|
|
2551
|
-
justNow: "À l'instant",
|
|
2552
|
-
minutesAgo: "il y a {n} min",
|
|
2553
|
-
hoursAgo: "il y a {n} h",
|
|
2554
|
-
daysAgo: "il y a {n} j"
|
|
2555
|
-
}
|
|
2556
|
-
},
|
|
2557
|
-
assetPagination: {
|
|
2558
|
-
itemCount: "{start}–{end} sur {total}",
|
|
2559
|
-
pageCount: "{total} pages"
|
|
2560
|
-
},
|
|
2561
|
-
assetDetailDialog: {
|
|
2562
|
-
previewTitle: "Aperçu",
|
|
2563
|
-
saveButton: "Enregistrer",
|
|
2564
|
-
dimensionsLabel: "Dimensions",
|
|
2565
|
-
sizeLabel: "Taille",
|
|
2566
|
-
formatLabel: "Format",
|
|
2567
|
-
copyLinkButton: "Copier le lien",
|
|
2568
|
-
deleteButton: "Supprimer",
|
|
2569
|
-
deleteDisclaimer: "Après suppression, si un module métier utilise encore cette image, elle apparaîtra comme cassée à l'endroit où elle est référencée. Assurez-vous qu'elle n'est plus nécessaire.",
|
|
2570
|
-
deleteDialogTitle: "Supprimer le média",
|
|
2571
|
-
deleteDialogMessage: "Supprimer « {fileName} » ? {disclaimer}",
|
|
2572
|
-
deleteConfirmButton: "Supprimer",
|
|
2573
|
-
cancelButton: "Annuler"
|
|
2574
|
-
},
|
|
2575
|
-
tagFilterBar: {
|
|
2576
|
-
all: "Tous",
|
|
2577
|
-
newTagPlaceholder: "Nouveau tag…"
|
|
2578
|
-
},
|
|
2579
|
-
tagFilterTabs: {
|
|
2580
|
-
all: "Tous"
|
|
2581
|
-
},
|
|
2582
|
-
uploadPanel: {
|
|
2583
|
-
dropLabel: "Glissez des images ici, ou cliquez pour choisir",
|
|
2584
|
-
helperText: "JPG, PNG, WEBP acceptés, 10 Mo maximum par image",
|
|
2585
|
-
stagedCount: "En attente · {count}",
|
|
2586
|
-
tagsLabel: "Tags (facultatif)",
|
|
2587
|
-
suggestedTagsLabel: "Fréquents",
|
|
2588
|
-
uploadFailedError: "Échec de l'import : {status}"
|
|
2589
|
-
},
|
|
2590
|
-
pickerModal: {
|
|
2591
|
-
title: "Sélectionner des médias",
|
|
2592
|
-
subtitleMultiple: "Sélection multiple ou import — cliquez sur une image pour la sélectionner",
|
|
2593
|
-
subtitleSingle: "Cliquez sur une image pour la choisir, ou passez à l'onglet Importer",
|
|
2594
|
-
searchPlaceholder: "Rechercher…",
|
|
2595
|
-
browseTab: "Parcourir",
|
|
2596
|
-
uploadTab: "Importer",
|
|
2597
|
-
selectedCount: "{count} sélectionné(s)",
|
|
2598
|
-
selectPrompt: "Sélectionnez une image",
|
|
2599
|
-
cancelButton: "Annuler",
|
|
2600
|
-
uploadSubmitButton: "Importer {count}",
|
|
2601
|
-
confirmButton: "Confirmer"
|
|
2602
|
-
},
|
|
2603
|
-
ratios: {
|
|
2604
|
-
title: "Ratios à générer",
|
|
2605
|
-
hint: "L'IA étend le cadre — environ 40 s par ratio"
|
|
2606
|
-
},
|
|
2607
|
-
variants: {
|
|
2608
|
-
badgeDone: "{count} ratios",
|
|
2609
|
-
badgeProgress: "{active}/{total} ratios",
|
|
2610
|
-
original: "Original",
|
|
2611
|
-
generating: "Génération…",
|
|
2612
|
-
failed: "Échec de la génération",
|
|
2613
|
-
regenerate: "Régénérer"
|
|
2614
|
-
},
|
|
2615
|
-
ratioBar: {
|
|
2616
|
-
label: "Ratio"
|
|
2617
|
-
}
|
|
2618
|
-
}, to = {
|
|
2619
|
-
mediaPicker: eo
|
|
2620
|
-
}, no = {
|
|
2621
|
-
assetGrid: {
|
|
2622
|
-
loading: "Memuat…",
|
|
2623
|
-
empty: "Belum ada media",
|
|
2624
|
-
columns: {
|
|
2625
|
-
name: "Nama",
|
|
2626
|
-
dimensions: "Dimensi",
|
|
2627
|
-
fileSize: "Ukuran",
|
|
2628
|
-
uploader: "Diunggah Oleh",
|
|
2629
|
-
uploadedAt: "Waktu Unggah"
|
|
2630
|
-
},
|
|
2631
|
-
time: {
|
|
2632
|
-
justNow: "Baru saja",
|
|
2633
|
-
minutesAgo: "{n} menit lalu",
|
|
2634
|
-
hoursAgo: "{n} jam lalu",
|
|
2635
|
-
daysAgo: "{n} hari lalu"
|
|
2636
|
-
}
|
|
2637
|
-
},
|
|
2638
|
-
assetPagination: {
|
|
2639
|
-
itemCount: "{start}–{end} dari {total}",
|
|
2640
|
-
pageCount: "{total} halaman"
|
|
2641
|
-
},
|
|
2642
|
-
assetDetailDialog: {
|
|
2643
|
-
previewTitle: "Pratinjau",
|
|
2644
|
-
saveButton: "Simpan",
|
|
2645
|
-
dimensionsLabel: "Dimensi",
|
|
2646
|
-
sizeLabel: "Ukuran",
|
|
2647
|
-
formatLabel: "Format",
|
|
2648
|
-
copyLinkButton: "Salin Tautan",
|
|
2649
|
-
deleteButton: "Hapus",
|
|
2650
|
-
deleteDisclaimer: "Setelah dihapus, jika ada modul bisnis yang masih menggunakan gambar ini, gambar akan tampil rusak di tempat penggunaannya. Pastikan gambar ini sudah tidak diperlukan lagi.",
|
|
2651
|
-
deleteDialogTitle: "Hapus Media",
|
|
2652
|
-
deleteDialogMessage: 'Hapus "{fileName}"? {disclaimer}',
|
|
2653
|
-
deleteConfirmButton: "Hapus",
|
|
2654
|
-
cancelButton: "Batal"
|
|
2655
|
-
},
|
|
2656
|
-
tagFilterBar: {
|
|
2657
|
-
all: "Semua",
|
|
2658
|
-
newTagPlaceholder: "Buat tag baru…"
|
|
2659
|
-
},
|
|
2660
|
-
tagFilterTabs: {
|
|
2661
|
-
all: "Semua"
|
|
2662
|
-
},
|
|
2663
|
-
uploadPanel: {
|
|
2664
|
-
dropLabel: "Seret gambar ke sini, atau klik untuk memilih",
|
|
2665
|
-
helperText: "Mendukung JPG, PNG, WEBP, maksimal 10MB per file",
|
|
2666
|
-
stagedCount: "Menunggu diunggah · {count}",
|
|
2667
|
-
tagsLabel: "Tag (opsional)",
|
|
2668
|
-
suggestedTagsLabel: "Sering digunakan",
|
|
2669
|
-
uploadFailedError: "Unggah gagal: {status}"
|
|
2670
|
-
},
|
|
2671
|
-
pickerModal: {
|
|
2672
|
-
title: "Pilih Media",
|
|
2673
|
-
subtitleMultiple: "Pilih beberapa atau unggah — klik gambar untuk mengubah pilihan",
|
|
2674
|
-
subtitleSingle: "Klik gambar untuk memilihnya, atau beralih ke Unggah Baru",
|
|
2675
|
-
searchPlaceholder: "Cari…",
|
|
2676
|
-
browseTab: "Jelajahi & Pilih",
|
|
2677
|
-
uploadTab: "Unggah Baru",
|
|
2678
|
-
selectedCount: "{count} dipilih",
|
|
2679
|
-
selectPrompt: "Pilih gambar",
|
|
2680
|
-
cancelButton: "Batal",
|
|
2681
|
-
uploadSubmitButton: "Unggah {count}",
|
|
2682
|
-
confirmButton: "Konfirmasi"
|
|
2683
|
-
},
|
|
2684
|
-
ratios: {
|
|
2685
|
-
title: "Rasio yang akan dibuat",
|
|
2686
|
-
hint: "AI memperluas kanvas — sekitar 40 detik per rasio"
|
|
2687
|
-
},
|
|
2688
|
-
variants: {
|
|
2689
|
-
badgeDone: "{count} rasio",
|
|
2690
|
-
badgeProgress: "{active}/{total} rasio",
|
|
2691
|
-
original: "Asli",
|
|
2692
|
-
generating: "Membuat…",
|
|
2693
|
-
failed: "Gagal membuat",
|
|
2694
|
-
regenerate: "Buat ulang"
|
|
2695
|
-
},
|
|
2696
|
-
ratioBar: {
|
|
2697
|
-
label: "Rasio"
|
|
2698
|
-
}
|
|
2699
|
-
}, ao = {
|
|
2700
|
-
mediaPicker: no
|
|
2701
|
-
}, ro = {
|
|
2702
|
-
assetGrid: {
|
|
2703
|
-
loading: "読み込み中…",
|
|
2704
|
-
empty: "素材がありません",
|
|
2705
|
-
columns: {
|
|
2706
|
-
name: "名前",
|
|
2707
|
-
dimensions: "サイズ",
|
|
2708
|
-
fileSize: "容量",
|
|
2709
|
-
uploader: "アップロード者",
|
|
2710
|
-
uploadedAt: "アップロード日時"
|
|
2711
|
-
},
|
|
2712
|
-
time: {
|
|
2713
|
-
justNow: "たった今",
|
|
2714
|
-
minutesAgo: "{n} 分前",
|
|
2715
|
-
hoursAgo: "{n} 時間前",
|
|
2716
|
-
daysAgo: "{n} 日前"
|
|
2717
|
-
}
|
|
2718
|
-
},
|
|
2719
|
-
assetPagination: {
|
|
2720
|
-
itemCount: "{total} 件中 {start}–{end} 件",
|
|
2721
|
-
pageCount: "全 {total} ページ"
|
|
2722
|
-
},
|
|
2723
|
-
assetDetailDialog: {
|
|
2724
|
-
previewTitle: "プレビュー",
|
|
2725
|
-
saveButton: "保存",
|
|
2726
|
-
dimensionsLabel: "サイズ",
|
|
2727
|
-
sizeLabel: "容量",
|
|
2728
|
-
formatLabel: "形式",
|
|
2729
|
-
copyLinkButton: "リンクをコピー",
|
|
2730
|
-
deleteButton: "削除",
|
|
2731
|
-
deleteDisclaimer: "削除後、この画像を使用している業務モジュールがある場合、参照元では画像が表示されなくなります。不要であることを確認してください。",
|
|
2732
|
-
deleteDialogTitle: "素材を削除",
|
|
2733
|
-
deleteDialogMessage: "「{fileName}」を削除しますか?{disclaimer}",
|
|
2734
|
-
deleteConfirmButton: "削除",
|
|
2735
|
-
cancelButton: "キャンセル"
|
|
2736
|
-
},
|
|
2737
|
-
tagFilterBar: {
|
|
2738
|
-
all: "すべて",
|
|
2739
|
-
newTagPlaceholder: "新しいタグを作成…"
|
|
2740
|
-
},
|
|
2741
|
-
tagFilterTabs: {
|
|
2742
|
-
all: "すべて"
|
|
2743
|
-
},
|
|
2744
|
-
uploadPanel: {
|
|
2745
|
-
dropLabel: "ここに画像をドラッグ、またはクリックして選択",
|
|
2746
|
-
helperText: "JPG、PNG、WEBP に対応、1枚あたり10MBまで",
|
|
2747
|
-
stagedCount: "アップロード待ち · {count}",
|
|
2748
|
-
tagsLabel: "タグ(任意)",
|
|
2749
|
-
suggestedTagsLabel: "よく使うタグ",
|
|
2750
|
-
uploadFailedError: "アップロードに失敗しました:{status}"
|
|
2751
|
-
},
|
|
2752
|
-
pickerModal: {
|
|
2753
|
-
title: "素材を選択",
|
|
2754
|
-
subtitleMultiple: "複数選択またはアップロードが可能です。画像をクリックして選択を切り替えます",
|
|
2755
|
-
subtitleSingle: "画像をクリックして選択するか、「新規アップロード」に切り替えてください",
|
|
2756
|
-
searchPlaceholder: "検索…",
|
|
2757
|
-
browseTab: "選択して閲覧",
|
|
2758
|
-
uploadTab: "新規アップロード",
|
|
2759
|
-
selectedCount: "{count} 件選択中",
|
|
2760
|
-
selectPrompt: "画像を選択してください",
|
|
2761
|
-
cancelButton: "キャンセル",
|
|
2762
|
-
uploadSubmitButton: "{count} 件をアップロード",
|
|
2763
|
-
confirmButton: "確定"
|
|
2764
|
-
},
|
|
2765
|
-
ratios: {
|
|
2766
|
-
title: "生成する比率",
|
|
2767
|
-
hint: "AI がキャンバスを拡張します(1件あたり約40秒)"
|
|
2768
|
-
},
|
|
2769
|
-
variants: {
|
|
2770
|
-
badgeDone: "{count} 比率",
|
|
2771
|
-
badgeProgress: "{active}/{total} 比率",
|
|
2772
|
-
original: "元画像",
|
|
2773
|
-
generating: "生成中…",
|
|
2774
|
-
failed: "生成に失敗しました",
|
|
2775
|
-
regenerate: "再生成"
|
|
2776
|
-
},
|
|
2777
|
-
ratioBar: {
|
|
2778
|
-
label: "比率"
|
|
2779
|
-
}
|
|
2780
|
-
}, oo = {
|
|
2781
|
-
mediaPicker: ro
|
|
2782
|
-
}, so = {
|
|
2783
|
-
assetGrid: {
|
|
2784
|
-
loading: "กำลังโหลด…",
|
|
2785
|
-
empty: "ยังไม่มีสื่อ",
|
|
2786
|
-
columns: {
|
|
2787
|
-
name: "ชื่อ",
|
|
2788
|
-
dimensions: "ขนาด (พิกเซล)",
|
|
2789
|
-
fileSize: "ขนาดไฟล์",
|
|
2790
|
-
uploader: "ผู้อัปโหลด",
|
|
2791
|
-
uploadedAt: "เวลาอัปโหลด"
|
|
2792
|
-
},
|
|
2793
|
-
time: {
|
|
2794
|
-
justNow: "เมื่อสักครู่",
|
|
2795
|
-
minutesAgo: "{n} นาทีที่แล้ว",
|
|
2796
|
-
hoursAgo: "{n} ชั่วโมงที่แล้ว",
|
|
2797
|
-
daysAgo: "{n} วันที่แล้ว"
|
|
2798
|
-
}
|
|
2799
|
-
},
|
|
2800
|
-
assetPagination: {
|
|
2801
|
-
itemCount: "{start}–{end} จาก {total} รายการ",
|
|
2802
|
-
pageCount: "{total} หน้า"
|
|
2803
|
-
},
|
|
2804
|
-
assetDetailDialog: {
|
|
2805
|
-
previewTitle: "ตัวอย่าง",
|
|
2806
|
-
saveButton: "บันทึก",
|
|
2807
|
-
dimensionsLabel: "ขนาด (พิกเซล)",
|
|
2808
|
-
sizeLabel: "ขนาดไฟล์",
|
|
2809
|
-
formatLabel: "รูปแบบ",
|
|
2810
|
-
copyLinkButton: "คัดลอกลิงก์",
|
|
2811
|
-
deleteButton: "ลบ",
|
|
2812
|
-
deleteDisclaimer: "หลังลบแล้ว หากมีโมดูลธุรกิจใดกำลังใช้รูปนี้อยู่ รูปจะแสดงเป็นลิงก์เสียในตำแหน่งที่ถูกใช้งาน กรุณายืนยันว่าไม่จำเป็นต้องใช้แล้ว",
|
|
2813
|
-
deleteDialogTitle: "ลบสื่อ",
|
|
2814
|
-
deleteDialogMessage: "ยืนยันลบ “{fileName}” ใช่หรือไม่? {disclaimer}",
|
|
2815
|
-
deleteConfirmButton: "ลบ",
|
|
2816
|
-
cancelButton: "ยกเลิก"
|
|
2817
|
-
},
|
|
2818
|
-
tagFilterBar: {
|
|
2819
|
-
all: "ทั้งหมด",
|
|
2820
|
-
newTagPlaceholder: "สร้างแท็กใหม่…"
|
|
2821
|
-
},
|
|
2822
|
-
tagFilterTabs: {
|
|
2823
|
-
all: "ทั้งหมด"
|
|
2824
|
-
},
|
|
2825
|
-
uploadPanel: {
|
|
2826
|
-
dropLabel: "ลากรูปภาพมาวางที่นี่ หรือคลิกเพื่อเลือก",
|
|
2827
|
-
helperText: "รองรับ JPG, PNG, WEBP ไฟล์ละไม่เกิน 10MB",
|
|
2828
|
-
stagedCount: "รอการอัปโหลด · {count}",
|
|
2829
|
-
tagsLabel: "แท็ก (ไม่บังคับ)",
|
|
2830
|
-
suggestedTagsLabel: "ที่ใช้บ่อย",
|
|
2831
|
-
uploadFailedError: "อัปโหลดล้มเหลว: {status}"
|
|
2832
|
-
},
|
|
2833
|
-
pickerModal: {
|
|
2834
|
-
title: "เลือกสื่อ",
|
|
2835
|
-
subtitleMultiple: "เลือกได้หลายรายการหรืออัปโหลด คลิกที่รูปเพื่อสลับการเลือก",
|
|
2836
|
-
subtitleSingle: "คลิกที่รูปเพื่อเลือก หรือสลับไปที่แท็บอัปโหลดรูปใหม่",
|
|
2837
|
-
searchPlaceholder: "ค้นหา…",
|
|
2838
|
-
browseTab: "เรียกดูและเลือก",
|
|
2839
|
-
uploadTab: "อัปโหลดรูปใหม่",
|
|
2840
|
-
selectedCount: "เลือกแล้ว {count} รายการ",
|
|
2841
|
-
selectPrompt: "กรุณาเลือกรูปภาพ",
|
|
2842
|
-
cancelButton: "ยกเลิก",
|
|
2843
|
-
uploadSubmitButton: "อัปโหลด {count} รายการ",
|
|
2844
|
-
confirmButton: "ยืนยัน"
|
|
2845
|
-
},
|
|
2846
|
-
ratios: {
|
|
2847
|
-
title: "อัตราส่วนที่ต้องการสร้าง",
|
|
2848
|
-
hint: "AI จะขยายพื้นที่ภาพ ใช้เวลาประมาณ 40 วินาทีต่อรายการ"
|
|
2849
|
-
},
|
|
2850
|
-
variants: {
|
|
2851
|
-
badgeDone: "{count} อัตราส่วน",
|
|
2852
|
-
badgeProgress: "{active}/{total} อัตราส่วน",
|
|
2853
|
-
original: "ภาพต้นฉบับ",
|
|
2854
|
-
generating: "กำลังสร้าง…",
|
|
2855
|
-
failed: "สร้างไม่สำเร็จ",
|
|
2856
|
-
regenerate: "สร้างใหม่"
|
|
2857
|
-
},
|
|
2858
|
-
ratioBar: {
|
|
2859
|
-
label: "อัตราส่วน"
|
|
2860
|
-
}
|
|
2861
|
-
}, io = {
|
|
2862
|
-
mediaPicker: so
|
|
2863
|
-
}, lo = {
|
|
2864
|
-
assetGrid: {
|
|
2865
|
-
loading: "加载中…",
|
|
2866
|
-
empty: "暂无素材",
|
|
2867
|
-
columns: {
|
|
2868
|
-
name: "名称",
|
|
2869
|
-
dimensions: "尺寸",
|
|
2870
|
-
fileSize: "大小",
|
|
2871
|
-
uploader: "上传人",
|
|
2872
|
-
uploadedAt: "上传时间"
|
|
2873
|
-
},
|
|
2874
|
-
time: {
|
|
2875
|
-
justNow: "刚刚",
|
|
2876
|
-
minutesAgo: "{n} 分钟前",
|
|
2877
|
-
hoursAgo: "{n} 小时前",
|
|
2878
|
-
daysAgo: "{n} 天前"
|
|
2879
|
-
}
|
|
2880
|
-
},
|
|
2881
|
-
assetPagination: {
|
|
2882
|
-
itemCount: "第 {start}–{end} 项,共 {total} 项",
|
|
2883
|
-
pageCount: "共 {total} 页"
|
|
2884
|
-
},
|
|
2885
|
-
assetDetailDialog: {
|
|
2886
|
-
previewTitle: "预览",
|
|
2887
|
-
saveButton: "保存",
|
|
2888
|
-
dimensionsLabel: "尺寸",
|
|
2889
|
-
sizeLabel: "大小",
|
|
2890
|
-
formatLabel: "格式",
|
|
2891
|
-
copyLinkButton: "复制链接",
|
|
2892
|
-
deleteButton: "删除",
|
|
2893
|
-
deleteDisclaimer: "删除后如有业务模块正在使用这张图,图片会在原处显示失效,请确认已不再需要。",
|
|
2894
|
-
deleteDialogTitle: "删除素材",
|
|
2895
|
-
deleteDialogMessage: "确定删除「{fileName}」吗?{disclaimer}",
|
|
2896
|
-
deleteConfirmButton: "删除",
|
|
2897
|
-
cancelButton: "取消"
|
|
2898
|
-
},
|
|
2899
|
-
tagFilterBar: {
|
|
2900
|
-
all: "全部",
|
|
2901
|
-
newTagPlaceholder: "新建标签…"
|
|
2902
|
-
},
|
|
2903
|
-
tagFilterTabs: {
|
|
2904
|
-
all: "全部"
|
|
2905
|
-
},
|
|
2906
|
-
uploadPanel: {
|
|
2907
|
-
dropLabel: "拖拽图片到此处,或点击选择",
|
|
2908
|
-
helperText: "支持 JPG、PNG、WEBP,单张不超过 10MB",
|
|
2909
|
-
stagedCount: "待上传 · {count}",
|
|
2910
|
-
tagsLabel: "标签(可选)",
|
|
2911
|
-
suggestedTagsLabel: "常用",
|
|
2912
|
-
uploadFailedError: "上传失败:{status}"
|
|
2913
|
-
},
|
|
2914
|
-
pickerModal: {
|
|
2915
|
-
title: "选择素材",
|
|
2916
|
-
subtitleMultiple: "可多选或上传,点击图片切换选择",
|
|
2917
|
-
subtitleSingle: "点击图片完成选择,或切换到上传新图",
|
|
2918
|
-
searchPlaceholder: "搜索…",
|
|
2919
|
-
browseTab: "浏览选择",
|
|
2920
|
-
uploadTab: "上传新图",
|
|
2921
|
-
selectedCount: "已选择 {count} 张",
|
|
2922
|
-
selectPrompt: "请选择图片",
|
|
2923
|
-
cancelButton: "取消",
|
|
2924
|
-
uploadSubmitButton: "上传 {count} 张",
|
|
2925
|
-
confirmButton: "确定"
|
|
2926
|
-
},
|
|
2927
|
-
ratios: {
|
|
2928
|
-
title: "要生成的规格",
|
|
2929
|
-
hint: "AI 扩展画布,每个规格约 40 秒"
|
|
2930
|
-
},
|
|
2931
|
-
variants: {
|
|
2932
|
-
badgeDone: "{count} 规格",
|
|
2933
|
-
badgeProgress: "{active}/{total} 规格",
|
|
2934
|
-
original: "原图",
|
|
2935
|
-
generating: "生成中…",
|
|
2936
|
-
failed: "生成失败",
|
|
2937
|
-
regenerate: "重新生成"
|
|
2938
|
-
},
|
|
2939
|
-
ratioBar: {
|
|
2940
|
-
label: "规格"
|
|
2941
|
-
}
|
|
2942
|
-
}, uo = {
|
|
2943
|
-
mediaPicker: lo
|
|
2944
|
-
}, co = {
|
|
2945
|
-
assetGrid: {
|
|
2946
|
-
loading: "載入中…",
|
|
2947
|
-
empty: "暫無素材",
|
|
2948
|
-
columns: {
|
|
2949
|
-
name: "名稱",
|
|
2950
|
-
dimensions: "尺寸",
|
|
2951
|
-
fileSize: "大小",
|
|
2952
|
-
uploader: "上傳人",
|
|
2953
|
-
uploadedAt: "上傳時間"
|
|
2954
|
-
},
|
|
2955
|
-
time: {
|
|
2956
|
-
justNow: "剛剛",
|
|
2957
|
-
minutesAgo: "{n} 分鐘前",
|
|
2958
|
-
hoursAgo: "{n} 小時前",
|
|
2959
|
-
daysAgo: "{n} 天前"
|
|
2960
|
-
}
|
|
2961
|
-
},
|
|
2962
|
-
assetPagination: {
|
|
2963
|
-
itemCount: "第 {start}–{end} 項,共 {total} 項",
|
|
2964
|
-
pageCount: "共 {total} 頁"
|
|
2965
|
-
},
|
|
2966
|
-
assetDetailDialog: {
|
|
2967
|
-
previewTitle: "預覽",
|
|
2968
|
-
saveButton: "儲存",
|
|
2969
|
-
dimensionsLabel: "尺寸",
|
|
2970
|
-
sizeLabel: "大小",
|
|
2971
|
-
formatLabel: "格式",
|
|
2972
|
-
copyLinkButton: "複製連結",
|
|
2973
|
-
deleteButton: "刪除",
|
|
2974
|
-
deleteDisclaimer: "刪除後如有業務模組正在使用這張圖,圖片會在原處顯示失效,請確認已不再需要。",
|
|
2975
|
-
deleteDialogTitle: "刪除素材",
|
|
2976
|
-
deleteDialogMessage: "確定刪除「{fileName}」嗎?{disclaimer}",
|
|
2977
|
-
deleteConfirmButton: "刪除",
|
|
2978
|
-
cancelButton: "取消"
|
|
2979
|
-
},
|
|
2980
|
-
tagFilterBar: {
|
|
2981
|
-
all: "全部",
|
|
2982
|
-
newTagPlaceholder: "新增標籤…"
|
|
2983
|
-
},
|
|
2984
|
-
tagFilterTabs: {
|
|
2985
|
-
all: "全部"
|
|
2986
|
-
},
|
|
2987
|
-
uploadPanel: {
|
|
2988
|
-
dropLabel: "拖曳圖片到此處,或點擊選擇",
|
|
2989
|
-
helperText: "支援 JPG、PNG、WEBP,單張不超過 10MB",
|
|
2990
|
-
stagedCount: "待上傳 · {count}",
|
|
2991
|
-
tagsLabel: "標籤(可選)",
|
|
2992
|
-
suggestedTagsLabel: "常用",
|
|
2993
|
-
uploadFailedError: "上傳失敗:{status}"
|
|
2994
|
-
},
|
|
2995
|
-
pickerModal: {
|
|
2996
|
-
title: "選擇素材",
|
|
2997
|
-
subtitleMultiple: "可多選或上傳,點擊圖片切換選擇",
|
|
2998
|
-
subtitleSingle: "點擊圖片完成選擇,或切換到上傳新圖",
|
|
2999
|
-
searchPlaceholder: "搜尋…",
|
|
3000
|
-
browseTab: "瀏覽選擇",
|
|
3001
|
-
uploadTab: "上傳新圖",
|
|
3002
|
-
selectedCount: "已選擇 {count} 張",
|
|
3003
|
-
selectPrompt: "請選擇圖片",
|
|
3004
|
-
cancelButton: "取消",
|
|
3005
|
-
uploadSubmitButton: "上傳 {count} 張",
|
|
3006
|
-
confirmButton: "確定"
|
|
3007
|
-
},
|
|
3008
|
-
ratios: {
|
|
3009
|
-
title: "要產生的規格",
|
|
3010
|
-
hint: "AI 擴展畫布,每個規格約 40 秒"
|
|
3011
|
-
},
|
|
3012
|
-
variants: {
|
|
3013
|
-
badgeDone: "{count} 規格",
|
|
3014
|
-
badgeProgress: "{active}/{total} 規格",
|
|
3015
|
-
original: "原圖",
|
|
3016
|
-
generating: "產生中…",
|
|
3017
|
-
failed: "產生失敗",
|
|
3018
|
-
regenerate: "重新產生"
|
|
3019
|
-
},
|
|
3020
|
-
ratioBar: {
|
|
3021
|
-
label: "規格"
|
|
3022
|
-
}
|
|
3023
|
-
}, po = {
|
|
3024
|
-
mediaPicker: co
|
|
3025
|
-
}, pe = {
|
|
3026
|
-
"en-US": Zr,
|
|
3027
|
-
"zh-CN": uo,
|
|
3028
|
-
"zh-Hant": po,
|
|
3029
|
-
"th-TH": io,
|
|
3030
|
-
"ja-JP": oo,
|
|
3031
|
-
"id-ID": ao,
|
|
3032
|
-
"fr-MA": to
|
|
3033
|
-
}, fo = {
|
|
3034
|
-
key: 0,
|
|
3035
|
-
class: "py-64 text-center text-sm text-gray-400"
|
|
3036
|
-
}, mo = {
|
|
3037
|
-
key: 1,
|
|
3038
|
-
class: "py-64 text-center text-sm text-gray-400"
|
|
3039
|
-
}, go = {
|
|
3040
|
-
key: 2,
|
|
3041
|
-
class: "bg-white border border-fm-color-neutral-gray-200 rounded-lg overflow-hidden"
|
|
3042
|
-
}, ho = { class: "grid grid-cols-[40px_56px_minmax(160px,2.2fr)_110px_90px_150px_120px_40px] items-center gap-8 px-16 h-40 bg-fm-color-neutral-gray-100 border-b border-fm-color-neutral-gray-200 text-xs font-semibold text-fm-color-typo-secondary" }, bo = ["onClick"], yo = ["onClick"], vo = { key: 1 }, wo = { class: "w-[44px] h-[36px] rounded overflow-hidden" }, xo = { class: "min-w-0 flex flex-col gap-4" }, ko = { class: "text-xs font-semibold truncate" }, Po = { class: "flex items-center gap-8" }, Ro = { class: "text-[11px] text-fm-color-typo-tertiary" }, Eo = { class: "text-xs text-fm-color-typo-primary" }, To = { class: "text-xs text-fm-color-typo-primary" }, So = { class: "flex items-center gap-8 min-w-0" }, Oo = { class: "text-xs text-fm-color-typo-primary truncate" }, Co = { class: "text-xs text-fm-color-typo-secondary" }, Bo = {
|
|
3043
|
-
key: 3,
|
|
3044
|
-
class: "grid grid-cols-2 sm:grid-cols-3 md:grid-cols-4 lg:grid-cols-5 gap-16"
|
|
3045
|
-
}, _o = ["onClick"], Ao = { class: "relative aspect-[4/3]" }, Do = ["onClick"], Fo = { class: "absolute bottom-8 left-8 bg-black/70 text-white text-[11px] font-semibold px-[6px] py-[2px] rounded" }, Lo = { class: "px-8 py-6 space-y-2" }, No = { class: "text-xs font-semibold truncate" }, Uo = { class: "text-[11px] text-gray-500 truncate" }, jo = /* @__PURE__ */ ue({
|
|
3046
|
-
__name: "AssetGrid",
|
|
3047
|
-
props: {
|
|
3048
|
-
assets: {},
|
|
3049
|
-
loading: { type: Boolean, default: !1 },
|
|
3050
|
-
selectable: { type: Boolean, default: !1 },
|
|
3051
|
-
selectedIds: { default: () => /* @__PURE__ */ new Set() },
|
|
3052
|
-
view: { default: "grid" },
|
|
3053
|
-
variantsByRefId: {},
|
|
3054
|
-
unavailableIds: {}
|
|
3055
|
-
},
|
|
3056
|
-
emits: ["open", "toggle", "delete"],
|
|
3057
|
-
setup(e, { emit: t }) {
|
|
3058
|
-
const { t: n } = ce({ messages: pe }), a = e;
|
|
3059
|
-
function r(k) {
|
|
3060
|
-
var h;
|
|
3061
|
-
if (!k.refId)
|
|
3062
|
-
return null;
|
|
3063
|
-
const v = (h = a.variantsByRefId) == null ? void 0 : h.get(k.refId);
|
|
3064
|
-
return v ? Nr(v.variants) : null;
|
|
3065
|
-
}
|
|
3066
|
-
function o(k) {
|
|
3067
|
-
var h;
|
|
3068
|
-
return ((h = a.unavailableIds) == null ? void 0 : h.has(k.id)) ?? !1;
|
|
3069
|
-
}
|
|
3070
|
-
function s(k) {
|
|
3071
|
-
o(k) || d("open", k);
|
|
3072
|
-
}
|
|
3073
|
-
function i(k) {
|
|
3074
|
-
o(k) || d("toggle", k);
|
|
3075
|
-
}
|
|
3076
|
-
function u(k) {
|
|
3077
|
-
return k.tone === "done" ? n("mediaPicker.variants.badgeDone", { count: k.total }) : n("mediaPicker.variants.badgeProgress", { active: k.active, total: k.total });
|
|
3078
|
-
}
|
|
3079
|
-
const d = t;
|
|
3080
|
-
function c(k) {
|
|
3081
|
-
var h;
|
|
3082
|
-
return ((h = k.split("/")[1]) == null ? void 0 : h.toUpperCase()) ?? k;
|
|
3083
|
-
}
|
|
3084
|
-
function p(k) {
|
|
3085
|
-
return k >= 1024 * 1024 ? `${(k / 1024 / 1024).toFixed(1)} MB` : `${Math.round(k / 1024)} KB`;
|
|
3086
|
-
}
|
|
3087
|
-
function y(k) {
|
|
3088
|
-
const h = Date.now() - new Date(k).getTime(), v = 6e4, A = 36e5, f = 864e5;
|
|
3089
|
-
if (h < v)
|
|
3090
|
-
return n("mediaPicker.assetGrid.time.justNow");
|
|
3091
|
-
if (h < A)
|
|
3092
|
-
return n("mediaPicker.assetGrid.time.minutesAgo", { n: Math.floor(h / v) });
|
|
3093
|
-
if (h < f)
|
|
3094
|
-
return n("mediaPicker.assetGrid.time.hoursAgo", { n: Math.floor(h / A) });
|
|
3095
|
-
if (h < f * 8)
|
|
3096
|
-
return n("mediaPicker.assetGrid.time.daysAgo", { n: Math.floor(h / f) });
|
|
3097
|
-
const g = new Date(k);
|
|
3098
|
-
return `${g.getFullYear()}-${String(g.getMonth() + 1).padStart(2, "0")}-${String(g.getDate()).padStart(2, "0")}`;
|
|
3099
|
-
}
|
|
3100
|
-
return (k, h) => {
|
|
3101
|
-
const v = I("FmIcon"), A = I("FmThumbnail"), f = I("FmAvatar"), g = I("FmButton");
|
|
3102
|
-
return e.loading ? (x(), S("div", fo, P(B(n)("mediaPicker.assetGrid.loading")), 1)) : e.assets.length === 0 ? (x(), S("div", mo, P(B(n)("mediaPicker.assetGrid.empty")), 1)) : e.view === "list" ? (x(), S("div", go, [
|
|
3103
|
-
b("div", ho, [
|
|
3104
|
-
h[0] || (h[0] = b("span", null, null, -1)),
|
|
3105
|
-
h[1] || (h[1] = b("span", null, null, -1)),
|
|
3106
|
-
b("span", null, P(B(n)("mediaPicker.assetGrid.columns.name")), 1),
|
|
3107
|
-
b("span", null, P(B(n)("mediaPicker.assetGrid.columns.dimensions")), 1),
|
|
3108
|
-
b("span", null, P(B(n)("mediaPicker.assetGrid.columns.fileSize")), 1),
|
|
3109
|
-
b("span", null, P(B(n)("mediaPicker.assetGrid.columns.uploader")), 1),
|
|
3110
|
-
b("span", null, P(B(n)("mediaPicker.assetGrid.columns.uploadedAt")), 1),
|
|
3111
|
-
h[2] || (h[2] = b("span", null, null, -1))
|
|
3112
|
-
]),
|
|
3113
|
-
(x(!0), S(z, null, le(e.assets, (m) => (x(), S("div", {
|
|
3114
|
-
key: m.id,
|
|
3115
|
-
class: X(["grid grid-cols-[40px_56px_minmax(160px,2.2fr)_110px_90px_150px_120px_40px] items-center gap-8 px-16 h-56 border-b border-fm-color-neutral-gray-200 last:border-b-0 cursor-pointer hover:bg-fm-color-neutral-gray-100", [
|
|
3116
|
-
e.selectedIds.has(m.id) ? "bg-[#FFF7F0]" : "bg-white",
|
|
3117
|
-
o(m) ? "opacity-40 pointer-events-none" : ""
|
|
3118
|
-
]]),
|
|
3119
|
-
onClick: (O) => s(m)
|
|
3120
|
-
}, [
|
|
3121
|
-
e.selectable ? (x(), S("button", {
|
|
3122
|
-
key: 0,
|
|
3123
|
-
class: X(["w-[20px] h-[20px] rounded flex items-center justify-center", e.selectedIds.has(m.id) ? "bg-[--fm-color-brand-primary,#FF7823]" : "bg-white border border-fm-color-neutral-gray-200"]),
|
|
3124
|
-
onClick: nt((O) => i(m), ["stop"])
|
|
3125
|
-
}, [
|
|
3126
|
-
e.selectedIds.has(m.id) ? (x(), ee(v, {
|
|
3127
|
-
key: 0,
|
|
3128
|
-
name: "check",
|
|
3129
|
-
size: "sm",
|
|
3130
|
-
color: "white"
|
|
3131
|
-
})) : U("", !0)
|
|
3132
|
-
], 10, yo)) : (x(), S("span", vo)),
|
|
3133
|
-
b("div", wo, [
|
|
3134
|
-
F(A, {
|
|
3135
|
-
src: m.url,
|
|
3136
|
-
size: "sm",
|
|
3137
|
-
class: "!w-full !h-full"
|
|
3138
|
-
}, null, 8, ["src"])
|
|
3139
|
-
]),
|
|
3140
|
-
b("div", xo, [
|
|
3141
|
-
b("span", ko, P(m.fileName), 1),
|
|
3142
|
-
b("div", Po, [
|
|
3143
|
-
b("span", Ro, P(c(m.mimeType)), 1),
|
|
3144
|
-
r(m) ? (x(), S("span", {
|
|
3145
|
-
key: 0,
|
|
3146
|
-
class: X(["text-[11px] font-semibold", {
|
|
3147
|
-
"text-fm-color-typo-tertiary": r(m).tone === "done",
|
|
3148
|
-
"text-blue-600": r(m).tone === "progress",
|
|
3149
|
-
"text-amber-600": r(m).tone === "warning"
|
|
3150
|
-
}])
|
|
3151
|
-
}, P(u(r(m))), 3)) : U("", !0)
|
|
3152
|
-
])
|
|
3153
|
-
]),
|
|
3154
|
-
b("span", Eo, P(m.width) + "×" + P(m.height), 1),
|
|
3155
|
-
b("span", To, P(p(m.fileSizeBytes)), 1),
|
|
3156
|
-
b("div", So, [
|
|
3157
|
-
F(f, {
|
|
3158
|
-
name: m.uploadedBy,
|
|
3159
|
-
size: "sm"
|
|
3160
|
-
}, null, 8, ["name"]),
|
|
3161
|
-
b("span", Oo, P(m.uploadedBy), 1)
|
|
3162
|
-
]),
|
|
3163
|
-
b("span", Co, P(y(m.createdAt)), 1),
|
|
3164
|
-
F(g, {
|
|
3165
|
-
variant: "tertiary",
|
|
3166
|
-
size: "md",
|
|
3167
|
-
"prepend-icon": "delete",
|
|
3168
|
-
label: "",
|
|
3169
|
-
onClick: nt((O) => d("delete", m), ["stop"])
|
|
3170
|
-
}, null, 8, ["onClick"])
|
|
3171
|
-
], 10, bo))), 128))
|
|
3172
|
-
])) : (x(), S("div", Bo, [
|
|
3173
|
-
(x(!0), S(z, null, le(e.assets, (m) => (x(), S("div", {
|
|
3174
|
-
key: m.id,
|
|
3175
|
-
class: X(["cursor-pointer rounded-lg border bg-white overflow-hidden transition-shadow hover:shadow-lg", [
|
|
3176
|
-
e.selectedIds.has(m.id) ? "border-2 border-[--fm-color-brand-primary,#FF7823]" : "border-gray-200",
|
|
3177
|
-
o(m) ? "opacity-40 pointer-events-none" : ""
|
|
3178
|
-
]]),
|
|
3179
|
-
onClick: (O) => s(m)
|
|
3180
|
-
}, [
|
|
3181
|
-
b("div", Ao, [
|
|
3182
|
-
F(A, {
|
|
3183
|
-
src: m.url,
|
|
3184
|
-
size: "xl",
|
|
3185
|
-
class: "w-full h-full"
|
|
3186
|
-
}, null, 8, ["src"]),
|
|
3187
|
-
e.selectable ? (x(), S("button", {
|
|
3188
|
-
key: 0,
|
|
3189
|
-
class: X(["absolute top-8 left-8 z-10 w-24 h-24 rounded-full flex items-center justify-center", e.selectedIds.has(m.id) ? "bg-[--fm-color-brand-primary,#FF7823]" : "bg-black/30 border border-white/80"]),
|
|
3190
|
-
onClick: nt((O) => i(m), ["stop"])
|
|
3191
|
-
}, [
|
|
3192
|
-
e.selectedIds.has(m.id) ? (x(), ee(v, {
|
|
3193
|
-
key: 0,
|
|
3194
|
-
name: "check",
|
|
3195
|
-
size: "sm",
|
|
3196
|
-
color: "white"
|
|
3197
|
-
})) : U("", !0)
|
|
3198
|
-
], 10, Do)) : U("", !0),
|
|
3199
|
-
b("span", Fo, P(c(m.mimeType)), 1),
|
|
3200
|
-
r(m) ? (x(), S("span", {
|
|
3201
|
-
key: 1,
|
|
3202
|
-
class: X(["absolute bottom-8 right-8 text-white text-[11px] font-semibold px-[6px] py-[2px] rounded", {
|
|
3203
|
-
"bg-black/70": r(m).tone === "done",
|
|
3204
|
-
"bg-blue-600/90": r(m).tone === "progress",
|
|
3205
|
-
"bg-amber-600/90": r(m).tone === "warning"
|
|
3206
|
-
}])
|
|
3207
|
-
}, P(u(r(m))), 3)) : U("", !0)
|
|
3208
|
-
]),
|
|
3209
|
-
b("div", Lo, [
|
|
3210
|
-
b("div", No, P(m.fileName), 1),
|
|
3211
|
-
b("span", Uo, P(m.width) + "×" + P(m.height) + " · " + P(p(m.fileSizeBytes)), 1)
|
|
3212
|
-
])
|
|
3213
|
-
], 10, _o))), 128))
|
|
3214
|
-
]));
|
|
3215
|
-
};
|
|
3216
|
-
}
|
|
3217
|
-
}), Io = { class: "flex flex-wrap items-center gap-8" }, Mo = { class: "flex items-center gap-6" }, zo = { class: "flex items-center gap-6" }, Vo = /* @__PURE__ */ ue({
|
|
3218
|
-
__name: "TagFilterTabs",
|
|
3219
|
-
props: {
|
|
3220
|
-
tags: {},
|
|
3221
|
-
total: {},
|
|
3222
|
-
modelValue: {}
|
|
3223
|
-
},
|
|
3224
|
-
emits: ["update:modelValue"],
|
|
3225
|
-
setup(e, { emit: t }) {
|
|
3226
|
-
const { t: n } = ce({ messages: pe }), a = t;
|
|
3227
|
-
return (r, o) => {
|
|
3228
|
-
const s = I("FmChip");
|
|
3229
|
-
return x(), S("div", Io, [
|
|
3230
|
-
F(s, {
|
|
3231
|
-
selectable: "",
|
|
3232
|
-
selected: e.modelValue === null,
|
|
3233
|
-
onClick: o[0] || (o[0] = (i) => a("update:modelValue", null))
|
|
3234
|
-
}, {
|
|
3235
|
-
default: xe(() => [
|
|
3236
|
-
b("span", Mo, [
|
|
3237
|
-
oe(P(B(n)("mediaPicker.tagFilterTabs.all")) + " ", 1),
|
|
3238
|
-
b("span", {
|
|
3239
|
-
class: X(["text-[11px] leading-none rounded-full px-6 py-2", e.modelValue === null ? "bg-white/25" : "bg-fm-color-neutral-gray-100"])
|
|
3240
|
-
}, P(e.total), 3)
|
|
3241
|
-
])
|
|
3242
|
-
]),
|
|
3243
|
-
_: 1
|
|
3244
|
-
}, 8, ["selected"]),
|
|
3245
|
-
(x(!0), S(z, null, le(e.tags, (i) => (x(), ee(s, {
|
|
3246
|
-
key: i.tag,
|
|
3247
|
-
selectable: "",
|
|
3248
|
-
selected: e.modelValue === i.tag,
|
|
3249
|
-
onClick: (u) => a("update:modelValue", i.tag)
|
|
3250
|
-
}, {
|
|
3251
|
-
default: xe(() => [
|
|
3252
|
-
b("span", zo, [
|
|
3253
|
-
oe(P(i.tag) + " ", 1),
|
|
3254
|
-
b("span", {
|
|
3255
|
-
class: X(["text-[11px] leading-none rounded-full px-6 py-2", e.modelValue === i.tag ? "bg-white/25" : "bg-fm-color-neutral-gray-100"])
|
|
3256
|
-
}, P(i.count), 3)
|
|
3257
|
-
])
|
|
3258
|
-
]),
|
|
3259
|
-
_: 2
|
|
3260
|
-
}, 1032, ["selected", "onClick"]))), 128))
|
|
3261
|
-
]);
|
|
3262
|
-
};
|
|
3263
|
-
}
|
|
3264
|
-
}), qo = { class: "flex items-center gap-12 border-t border-fm-color-neutral-gray-200 px-4 py-8" }, $o = { class: "text-xs font-semibold text-gray-500 shrink-0" }, Go = { class: "flex flex-wrap items-center gap-8" }, Ho = ["onClick"], Jo = { class: "text-xs text-fm-color-typo-secondary shrink-0" }, Wo = /* @__PURE__ */ ue({
|
|
3265
|
-
__name: "RatioPickerBar",
|
|
3266
|
-
props: /* @__PURE__ */ it({
|
|
3267
|
-
facts: {},
|
|
3268
|
-
locked: { type: Boolean }
|
|
3269
|
-
}, {
|
|
3270
|
-
modelValue: { default: null },
|
|
3271
|
-
modelModifiers: {}
|
|
3272
|
-
}),
|
|
3273
|
-
emits: ["update:modelValue"],
|
|
3274
|
-
setup(e) {
|
|
3275
|
-
const { t } = ce({ messages: pe }), n = e, a = Jt(e, "modelValue");
|
|
3276
|
-
function r(i) {
|
|
3277
|
-
n.locked || (a.value = i);
|
|
3278
|
-
}
|
|
3279
|
-
function o(i) {
|
|
3280
|
-
return i.replace("x", ":");
|
|
3281
|
-
}
|
|
3282
|
-
function s(i) {
|
|
3283
|
-
return [
|
|
3284
|
-
i ? "border-[--fm-color-brand-primary,#FF7823] text-[--fm-color-brand-primary,#FF7823] bg-[#FFF7F0]" : "border-fm-color-neutral-gray-300 text-gray-500",
|
|
3285
|
-
n.locked ? "cursor-not-allowed opacity-60" : ""
|
|
3286
|
-
];
|
|
3287
|
-
}
|
|
3288
|
-
return (i, u) => (x(), S("div", qo, [
|
|
3289
|
-
b("span", $o, P(B(t)("mediaPicker.ratioBar.label")), 1),
|
|
3290
|
-
b("div", Go, [
|
|
3291
|
-
b("button", {
|
|
3292
|
-
type: "button",
|
|
3293
|
-
class: X(["h-[28px] px-12 rounded-full border text-[11px] font-semibold transition-colors", s(a.value === null)]),
|
|
3294
|
-
onClick: u[0] || (u[0] = (d) => r(null))
|
|
3295
|
-
}, P(B(t)("mediaPicker.variants.original")), 3),
|
|
3296
|
-
(x(!0), S(z, null, le(B(yn), (d) => (x(), S("button", {
|
|
3297
|
-
key: d,
|
|
3298
|
-
type: "button",
|
|
3299
|
-
class: X(["h-[28px] px-12 rounded-full border text-[11px] font-semibold transition-colors", s(a.value === d)]),
|
|
3300
|
-
onClick: (c) => r(d)
|
|
3301
|
-
}, P(o(d)), 11, Ho))), 128))
|
|
3302
|
-
]),
|
|
3303
|
-
u[1] || (u[1] = b("div", { class: "flex-1" }, null, -1)),
|
|
3304
|
-
b("span", Jo, [
|
|
3305
|
-
e.facts ? (x(), S(z, { key: 0 }, [
|
|
3306
|
-
oe(P(e.facts.dimensions) + " · " + P(B(Ir)(e.facts.sizeBytes)), 1)
|
|
3307
|
-
], 64)) : (x(), S(z, { key: 1 }, [
|
|
3308
|
-
oe("—")
|
|
3309
|
-
], 64))
|
|
3310
|
-
])
|
|
3311
|
-
]));
|
|
3312
|
-
}
|
|
3313
|
-
}), Ko = { class: "space-y-8" }, Xo = { class: "text-xs font-semibold text-gray-500" }, Yo = { class: "flex flex-wrap gap-8" }, Qo = ["onClick"], Zo = { class: "text-[11px] text-gray-400" }, es = /* @__PURE__ */ ue({
|
|
3314
|
-
__name: "RatioSelector",
|
|
3315
|
-
props: {
|
|
3316
|
-
modelValue: {},
|
|
3317
|
-
disabled: { type: Boolean }
|
|
3318
|
-
},
|
|
3319
|
-
emits: ["update:modelValue"],
|
|
3320
|
-
setup(e, { emit: t }) {
|
|
3321
|
-
const { t: n } = ce({ messages: pe }), a = e, r = t;
|
|
3322
|
-
function o(i) {
|
|
3323
|
-
a.disabled || r(
|
|
3324
|
-
"update:modelValue",
|
|
3325
|
-
a.modelValue.includes(i) ? a.modelValue.filter((u) => u !== i) : [...a.modelValue, i]
|
|
3326
|
-
);
|
|
3327
|
-
}
|
|
3328
|
-
function s(i) {
|
|
3329
|
-
return i.replace("x", ":");
|
|
3330
|
-
}
|
|
3331
|
-
return (i, u) => (x(), S("div", Ko, [
|
|
3332
|
-
b("div", Xo, P(B(n)("mediaPicker.ratios.title")), 1),
|
|
3333
|
-
b("div", Yo, [
|
|
3334
|
-
(x(!0), S(z, null, le(B(yn), (d) => (x(), S("button", {
|
|
3335
|
-
key: d,
|
|
3336
|
-
type: "button",
|
|
3337
|
-
class: X(["h-[30px] px-12 rounded-full border text-[11px] font-semibold transition-colors", [
|
|
3338
|
-
e.modelValue.includes(d) ? "border-[--fm-color-brand-primary,#FF7823] text-[--fm-color-brand-primary,#FF7823] bg-[#FFF7F0]" : "border-fm-color-neutral-gray-300 text-gray-500",
|
|
3339
|
-
e.disabled ? "opacity-50 cursor-not-allowed" : ""
|
|
3340
|
-
]]),
|
|
3341
|
-
onClick: (c) => o(d)
|
|
3342
|
-
}, P(s(d)), 11, Qo))), 128))
|
|
3343
|
-
]),
|
|
3344
|
-
b("div", Zo, P(B(n)("mediaPicker.ratios.hint")), 1)
|
|
3345
|
-
]));
|
|
3346
|
-
}
|
|
3347
|
-
});
|
|
3348
|
-
function Ht(e) {
|
|
3349
|
-
return new Promise((t) => {
|
|
3350
|
-
const n = new Image();
|
|
3351
|
-
n.onload = () => t({ width: n.naturalWidth || 480, height: n.naturalHeight || 360 }), n.onerror = () => t({ width: 480, height: 360 }), n.src = e;
|
|
3352
|
-
});
|
|
3353
|
-
}
|
|
3354
|
-
const ts = { class: "flex flex-wrap items-center gap-8" }, ns = {
|
|
3355
|
-
key: 1,
|
|
3356
|
-
class: "inline-flex items-center gap-4 border rounded-full border-gray-300 pl-8 pr-4 h-[28px]"
|
|
3357
|
-
}, as = ["placeholder"], rs = /* @__PURE__ */ ue({
|
|
3358
|
-
__name: "TagFilterBar",
|
|
3359
|
-
props: {
|
|
3360
|
-
tags: {},
|
|
3361
|
-
modelValue: {},
|
|
3362
|
-
mode: { default: "filter" }
|
|
3363
|
-
},
|
|
3364
|
-
emits: ["update:modelValue", "tag-created"],
|
|
3365
|
-
setup(e, { emit: t }) {
|
|
3366
|
-
const { t: n } = ce({ messages: pe }), a = e, r = t;
|
|
3367
|
-
function o(u) {
|
|
3368
|
-
r("update:modelValue", a.modelValue.includes(u) ? a.modelValue.filter((d) => d !== u) : [...a.modelValue, u]);
|
|
3369
|
-
}
|
|
3370
|
-
const s = N("");
|
|
3371
|
-
function i() {
|
|
3372
|
-
const u = s.value.trim();
|
|
3373
|
-
s.value = "", u && (a.modelValue.includes(u) || r("update:modelValue", [...a.modelValue, u]), a.tags.includes(u) || r("tag-created", u));
|
|
3374
|
-
}
|
|
3375
|
-
return (u, d) => {
|
|
3376
|
-
const c = I("FmChip"), p = I("FmIcon");
|
|
3377
|
-
return x(), S("div", ts, [
|
|
3378
|
-
e.mode === "filter" ? (x(), ee(c, {
|
|
3379
|
-
key: 0,
|
|
3380
|
-
label: B(n)("mediaPicker.tagFilterBar.all"),
|
|
3381
|
-
selected: e.modelValue.length === 0,
|
|
3382
|
-
selectable: "",
|
|
3383
|
-
onClick: d[0] || (d[0] = (y) => r("update:modelValue", []))
|
|
3384
|
-
}, null, 8, ["label", "selected"])) : U("", !0),
|
|
3385
|
-
(x(!0), S(z, null, le(e.tags, (y) => (x(), ee(c, {
|
|
3386
|
-
key: y,
|
|
3387
|
-
label: y,
|
|
3388
|
-
selected: e.modelValue.includes(y),
|
|
3389
|
-
selectable: "",
|
|
3390
|
-
onClick: (k) => o(y)
|
|
3391
|
-
}, null, 8, ["label", "selected", "onClick"]))), 128)),
|
|
3392
|
-
e.mode === "assign" ? (x(), S("div", ns, [
|
|
3393
|
-
Rn(b("input", {
|
|
3394
|
-
"onUpdate:modelValue": d[1] || (d[1] = (y) => s.value = y),
|
|
3395
|
-
placeholder: B(n)("mediaPicker.tagFilterBar.newTagPlaceholder"),
|
|
3396
|
-
class: "text-xs outline-none w-[88px]",
|
|
3397
|
-
onKeyup: En(i, ["enter"])
|
|
3398
|
-
}, null, 40, as), [
|
|
3399
|
-
[Tn, s.value]
|
|
3400
|
-
]),
|
|
3401
|
-
b("button", {
|
|
3402
|
-
class: "p-2",
|
|
3403
|
-
onClick: i
|
|
3404
|
-
}, [
|
|
3405
|
-
F(p, {
|
|
3406
|
-
name: "add",
|
|
3407
|
-
size: "sm"
|
|
3408
|
-
})
|
|
3409
|
-
])
|
|
3410
|
-
])) : U("", !0)
|
|
3411
|
-
]);
|
|
3412
|
-
};
|
|
3413
|
-
}
|
|
3414
|
-
}), os = { class: "space-y-16" }, ss = {
|
|
3415
|
-
key: 0,
|
|
3416
|
-
class: "space-y-8"
|
|
3417
|
-
}, is = { class: "text-xs font-semibold text-gray-500" }, ls = ["src"], us = { class: "flex-1 min-w-0 flex flex-col gap-2" }, cs = { class: "text-xs font-semibold truncate" }, ds = {
|
|
3418
|
-
key: 0,
|
|
3419
|
-
class: "text-[11px] text-red-600"
|
|
3420
|
-
}, ps = {
|
|
3421
|
-
key: 1,
|
|
3422
|
-
class: "text-[11px] text-gray-500"
|
|
3423
|
-
}, fs = ["onClick"], ms = { class: "space-y-8" }, gs = { class: "text-xs font-semibold text-gray-500" }, hs = {
|
|
3424
|
-
key: 0,
|
|
3425
|
-
class: "flex flex-wrap items-center gap-8"
|
|
3426
|
-
}, bs = { class: "text-[11px] text-gray-400" }, ys = ["onClick"], vs = /* @__PURE__ */ ue({
|
|
3427
|
-
__name: "UploadPanel",
|
|
3428
|
-
props: {
|
|
3429
|
-
businessId: {},
|
|
3430
|
-
restaurantId: {},
|
|
3431
|
-
availableTags: {}
|
|
3432
|
-
},
|
|
3433
|
-
emits: ["tag-created", "uploaded"],
|
|
3434
|
-
setup(e, { expose: t, emit: n }) {
|
|
3435
|
-
const { t: a } = ce({ messages: pe }), r = e, o = n, s = N([]), i = N([]), u = N([]), d = N(!1), c = W(() => s.value.length), p = W(() => r.availableTags.filter((g) => !i.value.includes(g)).slice(0, 6));
|
|
3436
|
-
function y() {
|
|
3437
|
-
s.value.forEach((g) => URL.revokeObjectURL(g.previewUrl)), s.value = [], i.value = [], u.value = [];
|
|
3438
|
-
}
|
|
3439
|
-
async function k(g) {
|
|
3440
|
-
const m = URL.createObjectURL(g), O = {
|
|
3441
|
-
id: crypto.randomUUID(),
|
|
3442
|
-
refId: crypto.randomUUID(),
|
|
3443
|
-
file: g,
|
|
3444
|
-
previewUrl: m,
|
|
3445
|
-
dimensions: null,
|
|
3446
|
-
error: null
|
|
3447
|
-
};
|
|
3448
|
-
s.value.push(O), O.dimensions = await Ht(m);
|
|
3449
|
-
}
|
|
3450
|
-
function h(g) {
|
|
3451
|
-
const m = s.value.find((O) => O.id === g);
|
|
3452
|
-
m && URL.revokeObjectURL(m.previewUrl), s.value = s.value.filter((O) => O.id !== g);
|
|
3453
|
-
}
|
|
3454
|
-
function v(g) {
|
|
3455
|
-
return g >= 1024 * 1024 ? `${(g / 1024 / 1024).toFixed(1)} MB` : `${Math.round(g / 1024)} KB`;
|
|
3456
|
-
}
|
|
3457
|
-
async function A(g) {
|
|
3458
|
-
const m = g.dimensions ?? await Ht(g.previewUrl), O = g.file.type || "image/jpeg", w = await Kr(r.businessId, {
|
|
3459
|
-
refType: pt,
|
|
3460
|
-
refId: g.refId,
|
|
3461
|
-
imageId: "main",
|
|
3462
|
-
contentType: O,
|
|
3463
|
-
fileSize: g.file.size
|
|
3464
|
-
}), R = await fetch(w.uploadUrl, { method: "PUT", headers: { "Content-Type": O }, body: g.file });
|
|
3465
|
-
if (!R.ok)
|
|
3466
|
-
throw new Error(a("mediaPicker.uploadPanel.uploadFailedError", { status: R.status }));
|
|
3467
|
-
const V = await Xr(r.businessId, {
|
|
3468
|
-
refType: pt,
|
|
3469
|
-
refId: g.refId,
|
|
3470
|
-
imageId: "main",
|
|
3471
|
-
restaurantId: r.restaurantId,
|
|
3472
|
-
fileName: g.file.name,
|
|
3473
|
-
width: m.width,
|
|
3474
|
-
height: m.height,
|
|
3475
|
-
aspectRatios: u.value
|
|
3476
|
-
});
|
|
3477
|
-
return i.value.length ? await $r(r.businessId, V.asset.id, i.value) : V.asset;
|
|
3478
|
-
}
|
|
3479
|
-
async function f() {
|
|
3480
|
-
if (!(!s.value.length || !r.businessId)) {
|
|
3481
|
-
d.value = !0;
|
|
3482
|
-
try {
|
|
3483
|
-
const g = s.value, m = await Promise.allSettled(g.map(A)), O = /* @__PURE__ */ new Set(), w = [];
|
|
3484
|
-
m.forEach((R, V) => {
|
|
3485
|
-
R.status === "rejected" ? (O.add(g[V].id), g[V].error = R.reason instanceof Error ? R.reason.message : String(R.reason)) : w.push(R.value);
|
|
3486
|
-
}), s.value = g.filter((R) => O.has(R.id)), w.length > 0 && o("uploaded", w);
|
|
3487
|
-
} finally {
|
|
3488
|
-
d.value = !1;
|
|
3489
|
-
}
|
|
3490
|
-
}
|
|
3491
|
-
}
|
|
3492
|
-
return t({ stagedCount: c, uploading: d, upload: f, reset: y }), (g, m) => {
|
|
3493
|
-
const O = I("FmDropField"), w = I("FmIcon");
|
|
3494
|
-
return x(), S("div", os, [
|
|
3495
|
-
F(O, {
|
|
3496
|
-
label: B(a)("mediaPicker.uploadPanel.dropLabel"),
|
|
3497
|
-
accept: "image/jpeg,image/png,image/webp",
|
|
3498
|
-
"max-file-size": 10 * 1024 * 1024,
|
|
3499
|
-
onFileUpload: k
|
|
3500
|
-
}, {
|
|
3501
|
-
"helper-text": xe(() => [
|
|
3502
|
-
oe(P(B(a)("mediaPicker.uploadPanel.helperText")), 1)
|
|
3503
|
-
]),
|
|
3504
|
-
_: 1
|
|
3505
|
-
}, 8, ["label"]),
|
|
3506
|
-
F(es, {
|
|
3507
|
-
modelValue: u.value,
|
|
3508
|
-
"onUpdate:modelValue": m[0] || (m[0] = (R) => u.value = R),
|
|
3509
|
-
disabled: d.value
|
|
3510
|
-
}, null, 8, ["modelValue", "disabled"]),
|
|
3511
|
-
s.value.length ? (x(), S("div", ss, [
|
|
3512
|
-
b("div", is, P(B(a)("mediaPicker.uploadPanel.stagedCount", { count: s.value.length })), 1),
|
|
3513
|
-
(x(!0), S(z, null, le(s.value, (R) => (x(), S("div", {
|
|
3514
|
-
key: R.id,
|
|
3515
|
-
class: X(["flex items-center gap-12 p-8 border rounded-lg", R.error ? "border-red-300 bg-red-50" : "border-fm-color-neutral-gray-200"])
|
|
3516
|
-
}, [
|
|
3517
|
-
b("img", {
|
|
3518
|
-
src: R.previewUrl,
|
|
3519
|
-
class: "w-[44px] h-[44px] rounded flex-shrink-0 object-cover"
|
|
3520
|
-
}, null, 8, ls),
|
|
3521
|
-
b("div", us, [
|
|
3522
|
-
b("span", cs, P(R.file.name), 1),
|
|
3523
|
-
R.error ? (x(), S("span", ds, P(R.error), 1)) : (x(), S("span", ps, [
|
|
3524
|
-
R.dimensions ? (x(), S(z, { key: 0 }, [
|
|
3525
|
-
oe(P(R.dimensions.width) + "×" + P(R.dimensions.height) + " · ", 1)
|
|
3526
|
-
], 64)) : U("", !0),
|
|
3527
|
-
oe(P(v(R.file.size)), 1)
|
|
3528
|
-
]))
|
|
3529
|
-
]),
|
|
3530
|
-
b("button", {
|
|
3531
|
-
class: "w-[28px] h-[28px] rounded flex-shrink-0 flex items-center justify-center text-gray-500 hover:bg-red-50 hover:text-red-600",
|
|
3532
|
-
onClick: (V) => h(R.id)
|
|
3533
|
-
}, [
|
|
3534
|
-
F(w, {
|
|
3535
|
-
name: "close",
|
|
3536
|
-
size: "sm"
|
|
3537
|
-
})
|
|
3538
|
-
], 8, fs)
|
|
3539
|
-
], 2))), 128))
|
|
3540
|
-
])) : U("", !0),
|
|
3541
|
-
b("div", ms, [
|
|
3542
|
-
b("div", gs, P(B(a)("mediaPicker.uploadPanel.tagsLabel")), 1),
|
|
3543
|
-
F(rs, {
|
|
3544
|
-
modelValue: i.value,
|
|
3545
|
-
"onUpdate:modelValue": m[1] || (m[1] = (R) => i.value = R),
|
|
3546
|
-
tags: e.availableTags,
|
|
3547
|
-
mode: "assign",
|
|
3548
|
-
onTagCreated: m[2] || (m[2] = (R) => o("tag-created", R))
|
|
3549
|
-
}, null, 8, ["modelValue", "tags"]),
|
|
3550
|
-
p.value.length ? (x(), S("div", hs, [
|
|
3551
|
-
b("span", bs, P(B(a)("mediaPicker.uploadPanel.suggestedTagsLabel")), 1),
|
|
3552
|
-
(x(!0), S(z, null, le(p.value, (R) => (x(), S("button", {
|
|
3553
|
-
key: R,
|
|
3554
|
-
class: "h-[26px] px-12 rounded-full border border-dashed border-fm-color-neutral-gray-300 text-[11px] font-semibold text-gray-500",
|
|
3555
|
-
onClick: (V) => i.value.push(R)
|
|
3556
|
-
}, " + " + P(R), 9, ys))), 128))
|
|
3557
|
-
])) : U("", !0)
|
|
3558
|
-
])
|
|
3559
|
-
]);
|
|
3560
|
-
};
|
|
3561
|
-
}
|
|
3562
|
-
}), ws = 5e3, xs = 3;
|
|
3563
|
-
function ks(e) {
|
|
3564
|
-
const t = N(/* @__PURE__ */ new Map());
|
|
3565
|
-
let n = [], a, r = 0;
|
|
3566
|
-
function o() {
|
|
3567
|
-
a !== void 0 && clearTimeout(a), a = void 0;
|
|
3568
|
-
}
|
|
3569
|
-
async function s() {
|
|
3570
|
-
let u = !1;
|
|
3571
|
-
try {
|
|
3572
|
-
const d = await Wr({ businessId: e(), refType: pt, refIds: n });
|
|
3573
|
-
t.value = new Map(d.map((c) => [c.refId, c])), r = 0;
|
|
3574
|
-
} catch (d) {
|
|
3575
|
-
if (u = !0, r += 1, r >= xs) {
|
|
3576
|
-
console.warn("[media-picker] stopped polling image variants after repeated failures", d);
|
|
3577
|
-
return;
|
|
3578
|
-
}
|
|
3579
|
-
}
|
|
3580
|
-
([...t.value.values()].some((d) => Lr(d.variants)) || u) && (a = setTimeout(s, ws));
|
|
3581
|
-
}
|
|
3582
|
-
async function i(u) {
|
|
3583
|
-
if (o(), r = 0, n = u, u.length === 0 || !e()) {
|
|
3584
|
-
t.value = /* @__PURE__ */ new Map();
|
|
3585
|
-
return;
|
|
3586
|
-
}
|
|
3587
|
-
await s();
|
|
3588
|
-
}
|
|
3589
|
-
return Sn(o), { byRefId: t, load: i, stop: o };
|
|
3590
|
-
}
|
|
3591
|
-
const Ps = { class: "w-full flex items-center justify-between gap-16 pr-8" }, Rs = { class: "text-xs font-normal text-fm-color-typo-secondary" }, Es = {
|
|
3592
|
-
key: 0,
|
|
3593
|
-
class: "flex gap-16 border-b border-fm-color-neutral-gray-200 mb-12"
|
|
3594
|
-
}, Ts = { class: "flex items-center justify-between w-full" }, Ss = {
|
|
3595
|
-
key: 0,
|
|
3596
|
-
class: "text-xs text-fm-color-typo-secondary"
|
|
3597
|
-
}, Os = { key: 1 }, Cs = { class: "flex gap-8" }, fi = /* @__PURE__ */ ue({
|
|
3598
|
-
__name: "MediaPickerModal",
|
|
3599
|
-
props: {
|
|
3600
|
-
open: { type: Boolean },
|
|
3601
|
-
businessId: {},
|
|
3602
|
-
restaurantId: {},
|
|
3603
|
-
selectionMode: { default: "single" },
|
|
3604
|
-
ratio: {},
|
|
3605
|
-
allowUpload: { type: Boolean, default: !0 }
|
|
3606
|
-
},
|
|
3607
|
-
emits: ["update:open", "select", "confirm"],
|
|
3608
|
-
setup(e, { emit: t }) {
|
|
3609
|
-
const { t: n } = ce({ messages: pe }), a = e, r = t, o = N("browse");
|
|
3610
|
-
be(
|
|
3611
|
-
() => a.allowUpload,
|
|
3612
|
-
(C) => {
|
|
3613
|
-
C || (o.value = "browse");
|
|
3614
|
-
},
|
|
3615
|
-
{ immediate: !0 }
|
|
3616
|
-
);
|
|
3617
|
-
const s = N(""), i = N(null), u = N([]), d = ks(() => a.businessId), c = N([]), p = N(0), y = N([]), k = N(!1);
|
|
3618
|
-
async function h() {
|
|
3619
|
-
if (a.businessId) {
|
|
3620
|
-
k.value = !0;
|
|
3621
|
-
try {
|
|
3622
|
-
const C = await zr({
|
|
3623
|
-
// Never offer an unconfirmed AI draft as a pickable image.
|
|
3624
|
-
excludeTags: [wn],
|
|
3625
|
-
businessId: a.businessId,
|
|
3626
|
-
restaurantId: a.restaurantId,
|
|
3627
|
-
search: s.value || void 0,
|
|
3628
|
-
tags: i.value ? [i.value] : void 0,
|
|
3629
|
-
limit: 200,
|
|
3630
|
-
sortBy: "createdAt",
|
|
3631
|
-
descending: !0
|
|
3632
|
-
});
|
|
3633
|
-
u.value = C.resources, await d.load(C.resources.map((E) => E.refId).filter((E) => !!E));
|
|
3634
|
-
} finally {
|
|
3635
|
-
k.value = !1;
|
|
3636
|
-
}
|
|
3637
|
-
}
|
|
3638
|
-
}
|
|
3639
|
-
async function v() {
|
|
3640
|
-
if (!a.businessId)
|
|
3641
|
-
return;
|
|
3642
|
-
const [C, E] = await Promise.all([xn(a.businessId), Vr(a.businessId)]);
|
|
3643
|
-
c.value = C.tags, p.value = C.total, y.value = E;
|
|
3644
|
-
}
|
|
3645
|
-
be(
|
|
3646
|
-
() => a.open,
|
|
3647
|
-
(C) => {
|
|
3648
|
-
var E;
|
|
3649
|
-
C && (o.value = "browse", s.value = "", i.value = null, w.value = /* @__PURE__ */ new Set(), f.value = a.ratio ?? null, (E = L.value) == null || E.reset(), v(), h());
|
|
3650
|
-
}
|
|
3651
|
-
), be(i, h);
|
|
3652
|
-
let A;
|
|
3653
|
-
be(s, () => {
|
|
3654
|
-
clearTimeout(A), A = setTimeout(h, 250);
|
|
3655
|
-
});
|
|
3656
|
-
const f = N(a.ratio ?? null);
|
|
3657
|
-
be(
|
|
3658
|
-
() => a.ratio,
|
|
3659
|
-
(C) => f.value = C ?? null
|
|
3660
|
-
);
|
|
3661
|
-
const g = W(() => a.ratio !== void 0 && a.ratio !== null);
|
|
3662
|
-
function m(C) {
|
|
3663
|
-
var E;
|
|
3664
|
-
return C.refId ? ((E = d.byRefId.value.get(C.refId)) == null ? void 0 : E.variants) ?? [] : [];
|
|
3665
|
-
}
|
|
3666
|
-
const O = W(() => {
|
|
3667
|
-
const C = /* @__PURE__ */ new Set();
|
|
3668
|
-
if (f.value === null)
|
|
3669
|
-
return C;
|
|
3670
|
-
for (const E of u.value)
|
|
3671
|
-
Gt(E, f.value, m(E)) || C.add(E.id);
|
|
3672
|
-
return C;
|
|
3673
|
-
}), w = N(/* @__PURE__ */ new Set());
|
|
3674
|
-
function R(C) {
|
|
3675
|
-
const E = new Set(w.value);
|
|
3676
|
-
E.has(C.id) ? E.delete(C.id) : (a.selectionMode === "single" && E.clear(), E.add(C.id)), w.value = E;
|
|
3677
|
-
}
|
|
3678
|
-
function V(C) {
|
|
3679
|
-
R(C);
|
|
3680
|
-
}
|
|
3681
|
-
const Y = W(
|
|
3682
|
-
() => u.value.filter((C) => w.value.has(C.id)).map((C) => Gt(C, f.value, m(C))).filter((C) => C !== null)
|
|
3683
|
-
), ne = W(() => {
|
|
3684
|
-
if (Y.value.length !== 1)
|
|
3685
|
-
return null;
|
|
3686
|
-
const C = Y.value[0];
|
|
3687
|
-
if (C.ratio === null)
|
|
3688
|
-
return { dimensions: `${C.asset.width}×${C.asset.height}`, sizeBytes: C.asset.fileSizeBytes };
|
|
3689
|
-
const E = m(C.asset).find((re) => re.aspectRatio === C.ratio);
|
|
3690
|
-
return !(E != null && E.width) || !(E != null && E.height) || !E.fileSizeBytes ? null : { dimensions: `${E.width}×${E.height}`, sizeBytes: E.fileSizeBytes };
|
|
3691
|
-
});
|
|
3692
|
-
function K() {
|
|
3693
|
-
if (a.selectionMode === "single") {
|
|
3694
|
-
const C = Y.value[0];
|
|
3695
|
-
if (!C)
|
|
3696
|
-
return;
|
|
3697
|
-
r("select", C), r("update:open", !1);
|
|
3698
|
-
return;
|
|
3699
|
-
}
|
|
3700
|
-
r("confirm", Y.value), r("update:open", !1);
|
|
3701
|
-
}
|
|
3702
|
-
const L = N(null);
|
|
3703
|
-
async function fe() {
|
|
3704
|
-
var C;
|
|
3705
|
-
(C = L.value) != null && C.stagedCount || (o.value = "browse"), await Promise.all([h(), v()]);
|
|
3706
|
-
}
|
|
3707
|
-
return (C, E) => {
|
|
3708
|
-
const re = I("FmSearch"), q = I("FmButton"), Ce = I("FmDialog");
|
|
3709
|
-
return x(), ee(Ce, {
|
|
3710
|
-
"model-value": e.open,
|
|
3711
|
-
"max-width": 900,
|
|
3712
|
-
"onUpdate:modelValue": E[8] || (E[8] = (H) => !H && r("update:open", !1))
|
|
3713
|
-
}, {
|
|
3714
|
-
"dialog-header": xe(() => [
|
|
3715
|
-
b("div", Ps, [
|
|
3716
|
-
b("div", null, [
|
|
3717
|
-
b("div", null, P(B(n)("mediaPicker.pickerModal.title")), 1),
|
|
3718
|
-
b("div", Rs, P(e.selectionMode === "multiple" ? B(n)("mediaPicker.pickerModal.subtitleMultiple") : B(n)("mediaPicker.pickerModal.subtitleSingle")), 1)
|
|
3719
|
-
]),
|
|
3720
|
-
o.value === "browse" ? (x(), ee(re, {
|
|
3721
|
-
key: 0,
|
|
3722
|
-
modelValue: s.value,
|
|
3723
|
-
"onUpdate:modelValue": E[0] || (E[0] = (H) => s.value = H),
|
|
3724
|
-
placeholder: B(n)("mediaPicker.pickerModal.searchPlaceholder"),
|
|
3725
|
-
class: "w-[200px] shrink-0"
|
|
3726
|
-
}, null, 8, ["modelValue", "placeholder"])) : U("", !0)
|
|
3727
|
-
])
|
|
3728
|
-
]),
|
|
3729
|
-
"dialog-footer": xe(() => {
|
|
3730
|
-
var H, Be;
|
|
3731
|
-
return [
|
|
3732
|
-
b("div", Ts, [
|
|
3733
|
-
o.value === "browse" ? (x(), S("span", Ss, [
|
|
3734
|
-
w.value.size ? (x(), S(z, { key: 0 }, [
|
|
3735
|
-
oe(P(B(n)("mediaPicker.pickerModal.selectedCount", { count: w.value.size })), 1)
|
|
3736
|
-
], 64)) : (x(), S(z, { key: 1 }, [
|
|
3737
|
-
oe(P(B(n)("mediaPicker.pickerModal.selectPrompt")), 1)
|
|
3738
|
-
], 64))
|
|
3739
|
-
])) : (x(), S("span", Os)),
|
|
3740
|
-
b("div", Cs, [
|
|
3741
|
-
F(q, {
|
|
3742
|
-
label: B(n)("mediaPicker.pickerModal.cancelButton"),
|
|
3743
|
-
variant: "tertiary",
|
|
3744
|
-
onClick: E[6] || (E[6] = (ie) => r("update:open", !1))
|
|
3745
|
-
}, null, 8, ["label"]),
|
|
3746
|
-
o.value === "upload" ? (x(), ee(q, {
|
|
3747
|
-
key: 0,
|
|
3748
|
-
label: B(n)("mediaPicker.pickerModal.uploadSubmitButton", { count: ((H = L.value) == null ? void 0 : H.stagedCount) ?? 0 }),
|
|
3749
|
-
variant: "primary",
|
|
3750
|
-
disabled: !((Be = L.value) != null && Be.stagedCount) || L.value.uploading,
|
|
3751
|
-
onClick: E[7] || (E[7] = (ie) => {
|
|
3752
|
-
var j;
|
|
3753
|
-
return (j = L.value) == null ? void 0 : j.upload();
|
|
3754
|
-
})
|
|
3755
|
-
}, null, 8, ["label", "disabled"])) : (x(), ee(q, {
|
|
3756
|
-
key: 1,
|
|
3757
|
-
label: B(n)("mediaPicker.pickerModal.confirmButton"),
|
|
3758
|
-
variant: "primary",
|
|
3759
|
-
disabled: Y.value.length === 0,
|
|
3760
|
-
onClick: K
|
|
3761
|
-
}, null, 8, ["label", "disabled"]))
|
|
3762
|
-
])
|
|
3763
|
-
])
|
|
3764
|
-
];
|
|
3765
|
-
}),
|
|
3766
|
-
default: xe(() => [
|
|
3767
|
-
e.allowUpload ? (x(), S("div", Es, [
|
|
3768
|
-
b("button", {
|
|
3769
|
-
class: X(["pb-8 px-4 text-sm", o.value === "browse" ? "font-semibold border-b-2 border-[--fm-color-brand-primary,#FF7823]" : "text-gray-500"]),
|
|
3770
|
-
onClick: E[1] || (E[1] = (H) => o.value = "browse")
|
|
3771
|
-
}, P(B(n)("mediaPicker.pickerModal.browseTab")), 3),
|
|
3772
|
-
b("button", {
|
|
3773
|
-
class: X(["pb-8 px-4 text-sm", o.value === "upload" ? "font-semibold border-b-2 border-[--fm-color-brand-primary,#FF7823]" : "text-gray-500"]),
|
|
3774
|
-
onClick: E[2] || (E[2] = (H) => o.value = "upload")
|
|
3775
|
-
}, P(B(n)("mediaPicker.pickerModal.uploadTab")), 3)
|
|
3776
|
-
])) : U("", !0),
|
|
3777
|
-
o.value === "browse" ? (x(), S(z, { key: 1 }, [
|
|
3778
|
-
c.value.length ? (x(), ee(Vo, {
|
|
3779
|
-
key: 0,
|
|
3780
|
-
modelValue: i.value,
|
|
3781
|
-
"onUpdate:modelValue": E[3] || (E[3] = (H) => i.value = H),
|
|
3782
|
-
tags: c.value,
|
|
3783
|
-
total: p.value,
|
|
3784
|
-
class: "mb-12"
|
|
3785
|
-
}, null, 8, ["modelValue", "tags", "total"])) : U("", !0),
|
|
3786
|
-
F(jo, {
|
|
3787
|
-
assets: u.value,
|
|
3788
|
-
loading: k.value,
|
|
3789
|
-
selectable: "",
|
|
3790
|
-
"selected-ids": w.value,
|
|
3791
|
-
"variants-by-ref-id": B(d).byRefId.value,
|
|
3792
|
-
"unavailable-ids": O.value,
|
|
3793
|
-
onOpen: V,
|
|
3794
|
-
onToggle: R
|
|
3795
|
-
}, null, 8, ["assets", "loading", "selected-ids", "variants-by-ref-id", "unavailable-ids"]),
|
|
3796
|
-
e.selectionMode === "single" ? (x(), ee(Wo, {
|
|
3797
|
-
key: 1,
|
|
3798
|
-
modelValue: f.value,
|
|
3799
|
-
"onUpdate:modelValue": E[4] || (E[4] = (H) => f.value = H),
|
|
3800
|
-
facts: ne.value,
|
|
3801
|
-
locked: g.value,
|
|
3802
|
-
class: "mt-12"
|
|
3803
|
-
}, null, 8, ["modelValue", "facts", "locked"])) : U("", !0)
|
|
3804
|
-
], 64)) : e.allowUpload ? (x(), ee(vs, {
|
|
3805
|
-
key: 2,
|
|
3806
|
-
ref_key: "uploadPanelRef",
|
|
3807
|
-
ref: L,
|
|
3808
|
-
"business-id": e.businessId,
|
|
3809
|
-
"restaurant-id": e.restaurantId,
|
|
3810
|
-
"available-tags": y.value,
|
|
3811
|
-
onTagCreated: E[5] || (E[5] = (H) => y.value.push(H)),
|
|
3812
|
-
onUploaded: fe
|
|
3813
|
-
}, null, 8, ["business-id", "restaurant-id", "available-tags"])) : U("", !0)
|
|
3814
|
-
]),
|
|
3815
|
-
_: 1
|
|
3816
|
-
}, 8, ["model-value"]);
|
|
3817
|
-
};
|
|
3818
|
-
}
|
|
3819
|
-
}), mi = 60;
|
|
3820
|
-
function Bs(e, t) {
|
|
3821
|
-
return (e - 1) * t;
|
|
3822
|
-
}
|
|
3823
|
-
function _s(e, t, n) {
|
|
3824
|
-
if (n === 0)
|
|
3825
|
-
return { start: 0, end: 0 };
|
|
3826
|
-
const a = Bs(e, t) + 1;
|
|
3827
|
-
return { start: a, end: Math.min(a + t - 1, n) };
|
|
3828
|
-
}
|
|
3829
|
-
function gi(e, t) {
|
|
3830
|
-
return Math.min(Math.max(e, 1), Math.max(t, 1));
|
|
3831
|
-
}
|
|
3832
|
-
function As(e) {
|
|
3833
|
-
return Array.from({ length: Math.max(e, 0) }, (t, n) => ({
|
|
3834
|
-
label: String(n + 1),
|
|
3835
|
-
value: n + 1
|
|
3836
|
-
}));
|
|
3837
|
-
}
|
|
3838
|
-
const Ds = {
|
|
3839
|
-
key: 0,
|
|
3840
|
-
class: "flex items-center justify-between gap-24 mt-16 flex-wrap"
|
|
3841
|
-
}, Fs = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, Ls = { class: "flex gap-8 items-center" }, Ns = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-primary" }, hi = /* @__PURE__ */ ue({
|
|
3842
|
-
__name: "AssetPagination",
|
|
3843
|
-
props: {
|
|
3844
|
-
page: {},
|
|
3845
|
-
pageSize: {},
|
|
3846
|
-
totalResources: {},
|
|
3847
|
-
totalPages: {},
|
|
3848
|
-
disabled: { type: Boolean, default: !1 }
|
|
3849
|
-
},
|
|
3850
|
-
emits: ["update:page"],
|
|
3851
|
-
setup(e, { emit: t }) {
|
|
3852
|
-
const n = e, a = t, { t: r } = ce({ messages: pe }), o = W(() => _s(n.page, n.pageSize, n.totalResources)), s = W(() => As(n.totalPages)), i = W(() => n.page <= 1), u = W(() => n.page >= n.totalPages);
|
|
3853
|
-
function d(c) {
|
|
3854
|
-
c === n.page || c < 1 || c > n.totalPages || a("update:page", c);
|
|
3855
|
-
}
|
|
3856
|
-
return (c, p) => {
|
|
3857
|
-
const y = I("FmSelect"), k = I("FmButton");
|
|
3858
|
-
return e.totalPages > 1 ? (x(), S("div", Ds, [
|
|
3859
|
-
b("span", Fs, P(B(r)("mediaPicker.assetPagination.itemCount", { start: o.value.start, end: o.value.end, total: e.totalResources })), 1),
|
|
3860
|
-
b("div", Ls, [
|
|
3861
|
-
F(y, {
|
|
3862
|
-
items: s.value,
|
|
3863
|
-
"model-value": e.page,
|
|
3864
|
-
disabled: e.disabled,
|
|
3865
|
-
"onUpdate:modelValue": p[0] || (p[0] = (h) => d(h))
|
|
3866
|
-
}, null, 8, ["items", "model-value", "disabled"]),
|
|
3867
|
-
b("span", Ns, P(B(r)("mediaPicker.assetPagination.pageCount", { total: e.totalPages })), 1),
|
|
3868
|
-
F(k, {
|
|
3869
|
-
icon: "chevron_left",
|
|
3870
|
-
"icon-color": "neutral-black",
|
|
3871
|
-
variant: "tertiary",
|
|
3872
|
-
disabled: e.disabled || i.value,
|
|
3873
|
-
onClick: p[1] || (p[1] = (h) => d(e.page - 1))
|
|
3874
|
-
}, null, 8, ["disabled"]),
|
|
3875
|
-
F(k, {
|
|
3876
|
-
icon: "chevron_right",
|
|
3877
|
-
"icon-color": "neutral-black",
|
|
3878
|
-
variant: "tertiary",
|
|
3879
|
-
disabled: e.disabled || u.value,
|
|
3880
|
-
onClick: p[2] || (p[2] = (h) => d(e.page + 1))
|
|
3881
|
-
}, null, 8, ["disabled"])
|
|
3882
|
-
])
|
|
3883
|
-
])) : U("", !0);
|
|
3884
|
-
};
|
|
3885
|
-
}
|
|
3886
|
-
}), Us = { class: "relative flex-1 min-w-0 bg-gray-900 flex items-center justify-center overflow-hidden" }, js = ["src", "alt"], Is = {
|
|
3887
|
-
key: 1,
|
|
3888
|
-
class: "flex flex-col items-center gap-12 text-center px-24"
|
|
3889
|
-
}, Ms = { class: "text-sm text-white" }, zs = { class: "absolute top-8 left-8 bg-black/70 text-white text-[11px] font-semibold px-8 py-[2px] rounded" }, Vs = { class: "absolute bottom-12 left-1/2 -translate-x-1/2 flex items-center gap-8" }, qs = ["onClick"], $s = /* @__PURE__ */ ue({
|
|
3890
|
-
__name: "VariantCarousel",
|
|
3891
|
-
props: /* @__PURE__ */ it({
|
|
3892
|
-
original: {},
|
|
3893
|
-
variants: {},
|
|
3894
|
-
alt: {}
|
|
3895
|
-
}, {
|
|
3896
|
-
index: { default: 0 },
|
|
3897
|
-
indexModifiers: {}
|
|
3898
|
-
}),
|
|
3899
|
-
emits: /* @__PURE__ */ it(["regenerate"], ["update:index"]),
|
|
3900
|
-
setup(e, { emit: t }) {
|
|
3901
|
-
const { t: n } = ce({ messages: pe }), a = e, r = t, o = Jt(e, "index"), s = W(() => vn(a.original, a.variants));
|
|
3902
|
-
be(s, (c) => {
|
|
3903
|
-
o.value > c.length - 1 && (o.value = c.length - 1);
|
|
3904
|
-
});
|
|
3905
|
-
const i = W(() => s.value[o.value]);
|
|
3906
|
-
function u(c) {
|
|
3907
|
-
const p = s.value.length;
|
|
3908
|
-
o.value = (o.value + c + p) % p;
|
|
3909
|
-
}
|
|
3910
|
-
function d(c) {
|
|
3911
|
-
return c ? c.replace("x", ":") : "";
|
|
3912
|
-
}
|
|
3913
|
-
return (c, p) => {
|
|
3914
|
-
var y, k, h, v;
|
|
3915
|
-
const A = I("FmIcon"), f = I("FmButton");
|
|
3916
|
-
return x(), S("div", Us, [
|
|
3917
|
-
(y = i.value) != null && y.url ? (x(), S("img", {
|
|
3918
|
-
key: 0,
|
|
3919
|
-
src: i.value.url,
|
|
3920
|
-
alt: e.alt,
|
|
3921
|
-
class: "max-w-full max-h-full object-contain"
|
|
3922
|
-
}, null, 8, js)) : i.value ? (x(), S("div", Is, [
|
|
3923
|
-
F(A, {
|
|
3924
|
-
name: "error",
|
|
3925
|
-
size: "lg",
|
|
3926
|
-
color: "white"
|
|
3927
|
-
}),
|
|
3928
|
-
b("span", Ms, P(B(n)("mediaPicker.variants.failed")), 1),
|
|
3929
|
-
F(f, {
|
|
3930
|
-
label: B(n)("mediaPicker.variants.regenerate"),
|
|
3931
|
-
variant: "secondary",
|
|
3932
|
-
size: "md",
|
|
3933
|
-
"prepend-icon": "refresh",
|
|
3934
|
-
onClick: p[0] || (p[0] = (g) => i.value.ratio && r("regenerate", i.value.ratio))
|
|
3935
|
-
}, null, 8, ["label"])
|
|
3936
|
-
])) : U("", !0),
|
|
3937
|
-
b("span", zs, [
|
|
3938
|
-
oe(P(((k = i.value) == null ? void 0 : k.kind) === "original" ? B(n)("mediaPicker.variants.original") : d(((h = i.value) == null ? void 0 : h.ratio) ?? null)) + " ", 1),
|
|
3939
|
-
((v = i.value) == null ? void 0 : v.status) === "pending" ? (x(), S(z, { key: 0 }, [
|
|
3940
|
-
oe(" · " + P(B(n)("mediaPicker.variants.generating")), 1)
|
|
3941
|
-
], 64)) : U("", !0)
|
|
3942
|
-
]),
|
|
3943
|
-
s.value.length > 1 ? (x(), S(z, { key: 2 }, [
|
|
3944
|
-
b("button", {
|
|
3945
|
-
class: "absolute left-8 top-1/2 -translate-y-1/2 w-[32px] h-[32px] rounded-full bg-black/50 flex items-center justify-center",
|
|
3946
|
-
onClick: p[1] || (p[1] = (g) => u(-1))
|
|
3947
|
-
}, [
|
|
3948
|
-
F(A, {
|
|
3949
|
-
name: "chevron_left",
|
|
3950
|
-
size: "sm",
|
|
3951
|
-
color: "white"
|
|
3952
|
-
})
|
|
3953
|
-
]),
|
|
3954
|
-
b("button", {
|
|
3955
|
-
class: "absolute right-8 top-1/2 -translate-y-1/2 w-[32px] h-[32px] rounded-full bg-black/50 flex items-center justify-center",
|
|
3956
|
-
onClick: p[2] || (p[2] = (g) => u(1))
|
|
3957
|
-
}, [
|
|
3958
|
-
F(A, {
|
|
3959
|
-
name: "chevron_right",
|
|
3960
|
-
size: "sm",
|
|
3961
|
-
color: "white"
|
|
3962
|
-
})
|
|
3963
|
-
]),
|
|
3964
|
-
b("div", Vs, [
|
|
3965
|
-
(x(!0), S(z, null, le(s.value, (g, m) => (x(), S("button", {
|
|
3966
|
-
key: g.key,
|
|
3967
|
-
class: X(["w-[8px] h-[8px] rounded-full", m === o.value ? "bg-white" : "bg-white/40"]),
|
|
3968
|
-
onClick: (O) => o.value = m
|
|
3969
|
-
}, null, 10, qs))), 128))
|
|
3970
|
-
])
|
|
3971
|
-
], 64)) : U("", !0)
|
|
3972
|
-
]);
|
|
3973
|
-
};
|
|
3974
|
-
}
|
|
3975
|
-
}), Gs = {
|
|
3976
|
-
key: 0,
|
|
3977
|
-
class: "flex h-[620px]"
|
|
3978
|
-
}, Hs = { class: "w-[320px] flex-shrink-0 flex flex-col gap-12 p-16 overflow-y-auto" }, Js = { class: "flex items-center justify-between" }, Ws = { class: "fm-typo-en-title-sm-600" }, Ks = {
|
|
3979
|
-
key: 0,
|
|
3980
|
-
class: "flex items-start gap-8"
|
|
3981
|
-
}, Xs = { class: "flex-1 text-sm font-semibold break-all" }, Ys = {
|
|
3982
|
-
key: 1,
|
|
3983
|
-
class: "flex gap-8"
|
|
3984
|
-
}, Qs = { class: "text-xs space-y-8 border-t pt-8" }, Zs = { class: "flex justify-between" }, ei = { class: "text-gray-500" }, ti = { class: "font-semibold" }, ni = { class: "flex justify-between" }, ai = { class: "text-gray-500" }, ri = { class: "flex justify-between" }, oi = { class: "text-gray-500" }, si = { class: "flex justify-between" }, ii = { class: "text-gray-500" }, li = {
|
|
3985
|
-
key: 2,
|
|
3986
|
-
class: "flex flex-wrap gap-4"
|
|
3987
|
-
}, ui = { class: "flex gap-8 border-t pt-12" }, bi = /* @__PURE__ */ ue({
|
|
3988
|
-
__name: "AssetDetailDialog",
|
|
3989
|
-
props: {
|
|
3990
|
-
asset: {},
|
|
3991
|
-
businessId: {},
|
|
3992
|
-
image: {}
|
|
3993
|
-
},
|
|
3994
|
-
emits: ["close", "renamed", "deleted", "changed"],
|
|
3995
|
-
setup(e, { emit: t }) {
|
|
3996
|
-
const n = Cn(), { t: a } = ce({ messages: pe }), r = e, o = t, s = N(!1), i = N("");
|
|
3997
|
-
be(
|
|
3998
|
-
() => r.asset,
|
|
3999
|
-
(w) => {
|
|
4000
|
-
s.value = !1, i.value = (w == null ? void 0 : w.fileName) ?? "";
|
|
4001
|
-
}
|
|
4002
|
-
);
|
|
4003
|
-
function u() {
|
|
4004
|
-
var w;
|
|
4005
|
-
i.value = ((w = r.asset) == null ? void 0 : w.fileName) ?? "", s.value = !0;
|
|
4006
|
-
}
|
|
4007
|
-
async function d() {
|
|
4008
|
-
r.asset && (await qr(r.businessId, r.asset.id, i.value), s.value = !1, o("renamed"));
|
|
4009
|
-
}
|
|
4010
|
-
function c() {
|
|
4011
|
-
if (!r.asset)
|
|
4012
|
-
return;
|
|
4013
|
-
const w = r.asset;
|
|
4014
|
-
n.open({
|
|
4015
|
-
title: a("mediaPicker.assetDetailDialog.deleteDialogTitle"),
|
|
4016
|
-
message: a("mediaPicker.assetDetailDialog.deleteDialogMessage", {
|
|
4017
|
-
fileName: w.fileName,
|
|
4018
|
-
disclaimer: a("mediaPicker.assetDetailDialog.deleteDisclaimer")
|
|
4019
|
-
}),
|
|
4020
|
-
primaryActions: { text: a("mediaPicker.assetDetailDialog.deleteConfirmButton"), close: !1, variant: "destructive" },
|
|
4021
|
-
secondaryActions: { text: a("mediaPicker.assetDetailDialog.cancelButton"), close: !0 }
|
|
4022
|
-
}).onPrimary(async () => {
|
|
4023
|
-
await Yr(r.businessId, w), o("deleted", w.id), n.close();
|
|
4024
|
-
});
|
|
4025
|
-
}
|
|
4026
|
-
const p = N(0), y = W(() => {
|
|
4027
|
-
var w, R, V, Y, ne, K;
|
|
4028
|
-
return {
|
|
4029
|
-
url: ((w = r.image) == null ? void 0 : w.original.url) ?? ((R = r.asset) == null ? void 0 : R.url) ?? "",
|
|
4030
|
-
width: ((V = r.image) == null ? void 0 : V.original.width) ?? ((Y = r.asset) == null ? void 0 : Y.width),
|
|
4031
|
-
height: ((ne = r.image) == null ? void 0 : ne.original.height) ?? ((K = r.asset) == null ? void 0 : K.height)
|
|
4032
|
-
};
|
|
4033
|
-
}), k = W(
|
|
4034
|
-
() => {
|
|
4035
|
-
var w;
|
|
4036
|
-
return r.asset ? vn(y.value, ((w = r.image) == null ? void 0 : w.variants) ?? []) : [];
|
|
4037
|
-
}
|
|
4038
|
-
);
|
|
4039
|
-
be(() => {
|
|
4040
|
-
var w;
|
|
4041
|
-
return (w = r.asset) == null ? void 0 : w.id;
|
|
4042
|
-
}, () => p.value = 0);
|
|
4043
|
-
const h = W(() => {
|
|
4044
|
-
var w;
|
|
4045
|
-
const R = k.value[p.value];
|
|
4046
|
-
return !R || !r.asset ? null : jr(R, r.asset, ((w = r.image) == null ? void 0 : w.variants) ?? []);
|
|
4047
|
-
}), v = W(
|
|
4048
|
-
() => {
|
|
4049
|
-
var w;
|
|
4050
|
-
return (w = h.value) != null && w.ratio ? h.value.ratio.replace("x", ":") : a("mediaPicker.variants.original");
|
|
4051
|
-
}
|
|
4052
|
-
), A = N(!1);
|
|
4053
|
-
async function f(w) {
|
|
4054
|
-
var R;
|
|
4055
|
-
if (!(!((R = r.asset) != null && R.refType) || !r.asset.refId || A.value)) {
|
|
4056
|
-
A.value = !0;
|
|
4057
|
-
try {
|
|
4058
|
-
await Hr(r.businessId, {
|
|
4059
|
-
refType: r.asset.refType,
|
|
4060
|
-
refId: r.asset.refId,
|
|
4061
|
-
imageId: r.asset.imageId ?? "main",
|
|
4062
|
-
aspectRatios: [w],
|
|
4063
|
-
mode: "append"
|
|
4064
|
-
}), o("changed");
|
|
4065
|
-
} finally {
|
|
4066
|
-
A.value = !1;
|
|
4067
|
-
}
|
|
4068
|
-
}
|
|
4069
|
-
}
|
|
4070
|
-
function g() {
|
|
4071
|
-
var w;
|
|
4072
|
-
h.value && ((w = navigator.clipboard) == null || w.writeText(h.value.url));
|
|
4073
|
-
}
|
|
4074
|
-
function m(w) {
|
|
4075
|
-
var R;
|
|
4076
|
-
return ((R = w.split("/")[1]) == null ? void 0 : R.toUpperCase()) ?? w;
|
|
4077
|
-
}
|
|
4078
|
-
function O(w) {
|
|
4079
|
-
return w >= 1024 * 1024 ? `${(w / 1024 / 1024).toFixed(1)} MB` : `${Math.round(w / 1024)} KB`;
|
|
4080
|
-
}
|
|
4081
|
-
return (w, R) => {
|
|
4082
|
-
const V = I("FmIcon"), Y = I("FmTextField"), ne = I("FmButton"), K = I("FmDialog");
|
|
4083
|
-
return x(), ee(K, {
|
|
4084
|
-
"model-value": !!e.asset,
|
|
4085
|
-
"max-width": 920,
|
|
4086
|
-
"max-height": "620px",
|
|
4087
|
-
"content-class": "!p-0 asset-preview-dialog-content",
|
|
4088
|
-
"close-button": !1,
|
|
4089
|
-
"onUpdate:modelValue": R[3] || (R[3] = (L) => !L && o("close"))
|
|
4090
|
-
}, {
|
|
4091
|
-
default: xe(() => {
|
|
4092
|
-
var L, fe, C, E, re;
|
|
4093
|
-
return [
|
|
4094
|
-
e.asset ? (x(), S("div", Gs, [
|
|
4095
|
-
F($s, {
|
|
4096
|
-
index: p.value,
|
|
4097
|
-
"onUpdate:index": R[0] || (R[0] = (q) => p.value = q),
|
|
4098
|
-
original: y.value,
|
|
4099
|
-
variants: ((L = e.image) == null ? void 0 : L.variants) ?? [],
|
|
4100
|
-
alt: e.asset.fileName,
|
|
4101
|
-
onRegenerate: f
|
|
4102
|
-
}, null, 8, ["index", "original", "variants", "alt"]),
|
|
4103
|
-
b("div", Hs, [
|
|
4104
|
-
b("div", Js, [
|
|
4105
|
-
b("span", Ws, P(B(a)("mediaPicker.assetDetailDialog.previewTitle")), 1),
|
|
4106
|
-
b("button", {
|
|
4107
|
-
class: "w-[32px] h-[32px] rounded-lg bg-fm-color-neutral-gray-100 flex items-center justify-center flex-shrink-0",
|
|
4108
|
-
onClick: R[1] || (R[1] = (q) => o("close"))
|
|
4109
|
-
}, [
|
|
4110
|
-
F(V, {
|
|
4111
|
-
name: "close",
|
|
4112
|
-
size: "sm"
|
|
4113
|
-
})
|
|
4114
|
-
])
|
|
4115
|
-
]),
|
|
4116
|
-
s.value ? (x(), S("div", Ys, [
|
|
4117
|
-
F(Y, {
|
|
4118
|
-
modelValue: i.value,
|
|
4119
|
-
"onUpdate:modelValue": R[2] || (R[2] = (q) => i.value = q),
|
|
4120
|
-
class: "flex-1 min-w-0"
|
|
4121
|
-
}, null, 8, ["modelValue"]),
|
|
4122
|
-
F(ne, {
|
|
4123
|
-
label: B(a)("mediaPicker.assetDetailDialog.saveButton"),
|
|
4124
|
-
variant: "primary",
|
|
4125
|
-
size: "md",
|
|
4126
|
-
class: "flex-shrink-0",
|
|
4127
|
-
onClick: d
|
|
4128
|
-
}, null, 8, ["label"])
|
|
4129
|
-
])) : (x(), S("div", Ks, [
|
|
4130
|
-
b("span", Xs, P(e.asset.fileName), 1),
|
|
4131
|
-
b("button", { onClick: u }, [
|
|
4132
|
-
F(V, {
|
|
4133
|
-
name: "edit",
|
|
4134
|
-
size: "sm"
|
|
4135
|
-
})
|
|
4136
|
-
])
|
|
4137
|
-
])),
|
|
4138
|
-
b("div", Qs, [
|
|
4139
|
-
b("div", Zs, [
|
|
4140
|
-
b("span", ei, P(B(a)("mediaPicker.ratios.title")), 1),
|
|
4141
|
-
b("span", ti, P(v.value), 1)
|
|
4142
|
-
]),
|
|
4143
|
-
b("div", ni, [
|
|
4144
|
-
b("span", ai, P(B(a)("mediaPicker.assetDetailDialog.dimensionsLabel")), 1),
|
|
4145
|
-
b("span", null, P(((fe = h.value) == null ? void 0 : fe.dimensions) ?? "—"), 1)
|
|
4146
|
-
]),
|
|
4147
|
-
b("div", ri, [
|
|
4148
|
-
b("span", oi, P(B(a)("mediaPicker.assetDetailDialog.sizeLabel")), 1),
|
|
4149
|
-
b("span", null, P((C = h.value) != null && C.sizeBytes ? O(h.value.sizeBytes) : "—"), 1)
|
|
4150
|
-
]),
|
|
4151
|
-
b("div", si, [
|
|
4152
|
-
b("span", ii, P(B(a)("mediaPicker.assetDetailDialog.formatLabel")), 1),
|
|
4153
|
-
b("span", null, P((E = h.value) != null && E.contentType ? m(h.value.contentType) : "—"), 1)
|
|
4154
|
-
])
|
|
4155
|
-
]),
|
|
4156
|
-
(re = e.asset.tags) != null && re.length ? (x(), S("div", li, [
|
|
4157
|
-
(x(!0), S(z, null, le(e.asset.tags, (q) => (x(), S("span", {
|
|
4158
|
-
key: q,
|
|
4159
|
-
class: "text-[11px] bg-gray-100 rounded-full px-8 py-[2px]"
|
|
4160
|
-
}, " # " + P(q), 1))), 128))
|
|
4161
|
-
])) : U("", !0),
|
|
4162
|
-
R[4] || (R[4] = b("div", { class: "flex-1" }, null, -1)),
|
|
4163
|
-
b("div", ui, [
|
|
4164
|
-
F(ne, {
|
|
4165
|
-
label: B(a)("mediaPicker.assetDetailDialog.copyLinkButton"),
|
|
4166
|
-
variant: "tertiary",
|
|
4167
|
-
size: "md",
|
|
4168
|
-
"prepend-icon": "link",
|
|
4169
|
-
class: "flex-1",
|
|
4170
|
-
onClick: g
|
|
4171
|
-
}, null, 8, ["label"]),
|
|
4172
|
-
F(ne, {
|
|
4173
|
-
label: B(a)("mediaPicker.assetDetailDialog.deleteButton"),
|
|
4174
|
-
variant: "destructive",
|
|
4175
|
-
size: "md",
|
|
4176
|
-
"prepend-icon": "delete",
|
|
4177
|
-
onClick: c
|
|
4178
|
-
}, null, 8, ["label"])
|
|
4179
|
-
])
|
|
4180
|
-
])
|
|
4181
|
-
])) : U("", !0)
|
|
4182
|
-
];
|
|
4183
|
-
}),
|
|
4184
|
-
_: 1
|
|
4185
|
-
}, 8, ["model-value"]);
|
|
4186
|
-
};
|
|
4187
|
-
}
|
|
4188
|
-
});
|
|
4189
|
-
export {
|
|
4190
|
-
jo as $,
|
|
4191
|
-
$r as G,
|
|
4192
|
-
Jr as K,
|
|
4193
|
-
Bs as O,
|
|
4194
|
-
bi as P,
|
|
4195
|
-
Yr as Q,
|
|
4196
|
-
zr as V,
|
|
4197
|
-
gi as _,
|
|
4198
|
-
rs as a,
|
|
4199
|
-
hi as b,
|
|
4200
|
-
vs as c,
|
|
4201
|
-
wn as d,
|
|
4202
|
-
ks as k,
|
|
4203
|
-
Vr as q,
|
|
4204
|
-
mi as v,
|
|
4205
|
-
fi as x,
|
|
4206
|
-
Mr as z
|
|
4207
|
-
};
|