@feedmepos/mf-media 0.0.5 → 0.0.7
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/{AssetLibrary-571ef313.js → AssetLibrary-7f23572a.js} +1651 -1459
- package/dist/app.js +30 -30
- package/dist/src/app.d.ts +1 -0
- package/dist/style.css +1 -0
- package/dist/tsconfig.app.tsbuildinfo +1 -1
- package/package.json +2 -2
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { useI18n as
|
|
3
|
-
import { useDialog as
|
|
4
|
-
function
|
|
1
|
+
import { defineComponent as ge, resolveComponent as V, openBlock as k, createElementBlock as _, toDisplayString as E, unref as T, createElementVNode as h, Fragment as J, renderList as me, normalizeClass as te, withModifiers as st, createBlock as re, createCommentVNode as q, createVNode as F, ref as N, withDirectives as Cn, withKeys as An, vModelText as Dn, computed as Q, withCtx as fe, createTextVNode as ce, onScopeDispose as Fn, watch as pe, mergeModels as dt, useModel as Xt, onMounted as Nn } from "vue";
|
|
2
|
+
import { useI18n as he, useCoreStore as Qt } from "@feedmepos/mf-common";
|
|
3
|
+
import { useDialog as Yt } from "@feedmepos/ui-library";
|
|
4
|
+
function Zt(e, t) {
|
|
5
5
|
return function() {
|
|
6
6
|
return e.apply(t, arguments);
|
|
7
7
|
};
|
|
8
8
|
}
|
|
9
|
-
const { toString:
|
|
9
|
+
const { toString: Un } = Object.prototype, { getPrototypeOf: _e } = Object, { iterator: Ie, toStringTag: en } = Symbol, Ke = (({ hasOwnProperty: e }) => (t, n) => e.call(t, n))(Object.prototype), Ue = (e, t) => {
|
|
10
10
|
let n = e;
|
|
11
11
|
const a = [];
|
|
12
12
|
for (; n != null && n !== Object.prototype; ) {
|
|
@@ -14,63 +14,63 @@ const { toString: _n } = Object.prototype, { getPrototypeOf: Ce } = Object, { it
|
|
|
14
14
|
return !1;
|
|
15
15
|
if (a.push(n), Ke(n, t))
|
|
16
16
|
return !0;
|
|
17
|
-
n =
|
|
17
|
+
n = _e(n);
|
|
18
18
|
}
|
|
19
19
|
return !1;
|
|
20
|
-
},
|
|
21
|
-
const n =
|
|
20
|
+
}, In = (e, t) => e != null && Ue(e, t) ? e[t] : void 0, yt = ((e) => (t) => {
|
|
21
|
+
const n = Un.call(t);
|
|
22
22
|
return e[n] || (e[n] = n.slice(8, -1).toLowerCase());
|
|
23
|
-
})(/* @__PURE__ */ Object.create(null)),
|
|
23
|
+
})(/* @__PURE__ */ Object.create(null)), de = (e) => (e = e.toLowerCase(), (t) => yt(t) === e), Ze = (e) => (t) => typeof t === e, { isArray: Te } = Array, Ce = Ze("undefined");
|
|
24
24
|
function Ae(e) {
|
|
25
|
-
return e !== null && !
|
|
25
|
+
return e !== null && !Ce(e) && e.constructor !== null && !Ce(e.constructor) && oe(e.constructor.isBuffer) && e.constructor.isBuffer(e);
|
|
26
26
|
}
|
|
27
|
-
const
|
|
28
|
-
function
|
|
27
|
+
const tn = de("ArrayBuffer");
|
|
28
|
+
function Ln(e) {
|
|
29
29
|
let t;
|
|
30
|
-
return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? t = ArrayBuffer.isView(e) : t = e && e.buffer &&
|
|
30
|
+
return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? t = ArrayBuffer.isView(e) : t = e && e.buffer && tn(e.buffer), t;
|
|
31
31
|
}
|
|
32
|
-
const
|
|
33
|
-
if (!
|
|
32
|
+
const jn = Ze("string"), oe = Ze("function"), nn = Ze("number"), De = (e) => e !== null && typeof e == "object", Mn = (e) => e === !0 || e === !1, Ge = (e) => {
|
|
33
|
+
if (!De(e))
|
|
34
34
|
return !1;
|
|
35
|
-
const t =
|
|
36
|
-
return (t === null || t === Object.prototype ||
|
|
35
|
+
const t = _e(e);
|
|
36
|
+
return (t === null || t === Object.prototype || _e(t) === null) && // Treat any genuine (non-Object.prototype-polluted) Symbol.toStringTag or
|
|
37
37
|
// Symbol.iterator as evidence the value is a tagged/iterable type rather
|
|
38
38
|
// than a plain object, while ignoring keys injected onto Object.prototype.
|
|
39
|
-
!
|
|
40
|
-
},
|
|
41
|
-
if (!
|
|
39
|
+
!Ue(e, en) && !Ue(e, Ie);
|
|
40
|
+
}, zn = (e) => {
|
|
41
|
+
if (!De(e) || Ae(e))
|
|
42
42
|
return !1;
|
|
43
43
|
try {
|
|
44
44
|
return Object.keys(e).length === 0 && Object.getPrototypeOf(e) === Object.prototype;
|
|
45
45
|
} catch {
|
|
46
46
|
return !1;
|
|
47
47
|
}
|
|
48
|
-
},
|
|
49
|
-
function
|
|
48
|
+
}, Vn = de("Date"), qn = de("File"), $n = (e) => !!(e && typeof e.uri < "u"), Gn = (e) => e && typeof e.getParts < "u", Wn = de("Blob"), Hn = de("FileList"), Jn = (e) => De(e) && oe(e.pipe);
|
|
49
|
+
function Kn() {
|
|
50
50
|
return typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : typeof global < "u" ? global : {};
|
|
51
51
|
}
|
|
52
|
-
const
|
|
52
|
+
const Ct = Kn(), At = typeof Ct.FormData < "u" ? Ct.FormData : void 0, Xn = (e) => {
|
|
53
53
|
if (!e)
|
|
54
54
|
return !1;
|
|
55
55
|
if (At && e instanceof At)
|
|
56
56
|
return !0;
|
|
57
|
-
const t =
|
|
58
|
-
if (!t || t === Object.prototype || !
|
|
57
|
+
const t = _e(e);
|
|
58
|
+
if (!t || t === Object.prototype || !oe(e.append))
|
|
59
59
|
return !1;
|
|
60
|
-
const n =
|
|
60
|
+
const n = yt(e);
|
|
61
61
|
return n === "formdata" || // detect form-data instance
|
|
62
|
-
n === "object" &&
|
|
63
|
-
},
|
|
62
|
+
n === "object" && oe(e.toString) && e.toString() === "[object FormData]";
|
|
63
|
+
}, Qn = de("URLSearchParams"), [Yn, Zn, ea, ta] = [
|
|
64
64
|
"ReadableStream",
|
|
65
65
|
"Request",
|
|
66
66
|
"Response",
|
|
67
67
|
"Headers"
|
|
68
|
-
].map(
|
|
69
|
-
function
|
|
68
|
+
].map(de), na = (e) => e.trim ? e.trim() : e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
|
|
69
|
+
function Le(e, t, { allOwnKeys: n = !1 } = {}) {
|
|
70
70
|
if (e === null || typeof e > "u")
|
|
71
71
|
return;
|
|
72
72
|
let a, r;
|
|
73
|
-
if (typeof e != "object" && (e = [e]),
|
|
73
|
+
if (typeof e != "object" && (e = [e]), Te(e))
|
|
74
74
|
for (a = 0, r = e.length; a < r; a++)
|
|
75
75
|
t.call(null, e[a], a, e);
|
|
76
76
|
else {
|
|
@@ -82,7 +82,7 @@ function Ue(e, t, { allOwnKeys: n = !1 } = {}) {
|
|
|
82
82
|
i = o[a], t.call(null, e[i], i, e);
|
|
83
83
|
}
|
|
84
84
|
}
|
|
85
|
-
function
|
|
85
|
+
function an(e, t) {
|
|
86
86
|
if (Ae(e))
|
|
87
87
|
return null;
|
|
88
88
|
t = t.toLowerCase();
|
|
@@ -93,34 +93,34 @@ function en(e, t) {
|
|
|
93
93
|
return r;
|
|
94
94
|
return null;
|
|
95
95
|
}
|
|
96
|
-
const Re = (() => typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global)(),
|
|
97
|
-
function
|
|
98
|
-
const { caseless: t, skipUndefined: n } =
|
|
96
|
+
const Re = (() => typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global)(), rn = (e) => !Ce(e) && e !== Re;
|
|
97
|
+
function pt(...e) {
|
|
98
|
+
const { caseless: t, skipUndefined: n } = rn(this) && this || {}, a = {}, r = (o, s) => {
|
|
99
99
|
if (s === "__proto__" || s === "constructor" || s === "prototype")
|
|
100
100
|
return;
|
|
101
|
-
const i = t && typeof s == "string" &&
|
|
102
|
-
Ge(u) && Ge(o) ? a[i] =
|
|
101
|
+
const i = t && typeof s == "string" && an(a, s) || s, u = Ke(a, i) ? a[i] : void 0;
|
|
102
|
+
Ge(u) && Ge(o) ? a[i] = pt(u, o) : Ge(o) ? a[i] = pt({}, o) : Te(o) ? a[i] = o.slice() : (!n || !Ce(o)) && (a[i] = o);
|
|
103
103
|
};
|
|
104
104
|
for (let o = 0, s = e.length; o < s; o++) {
|
|
105
105
|
const i = e[o];
|
|
106
|
-
if (!i || Ae(i) || (
|
|
106
|
+
if (!i || Ae(i) || (Le(i, r), typeof i != "object" || Te(i)))
|
|
107
107
|
continue;
|
|
108
108
|
const u = Object.getOwnPropertySymbols(i);
|
|
109
|
-
for (let
|
|
110
|
-
const c = u[
|
|
111
|
-
|
|
109
|
+
for (let d = 0; d < u.length; d++) {
|
|
110
|
+
const c = u[d];
|
|
111
|
+
ma.call(i, c) && r(i[c], c);
|
|
112
112
|
}
|
|
113
113
|
}
|
|
114
114
|
return a;
|
|
115
115
|
}
|
|
116
|
-
const
|
|
116
|
+
const aa = (e, t, n, { allOwnKeys: a } = {}) => (Le(
|
|
117
117
|
t,
|
|
118
118
|
(r, o) => {
|
|
119
|
-
n &&
|
|
119
|
+
n && oe(r) ? Object.defineProperty(e, o, {
|
|
120
120
|
// Null-proto descriptor so a polluted Object.prototype.get cannot
|
|
121
121
|
// hijack defineProperty's accessor-vs-data resolution.
|
|
122
122
|
__proto__: null,
|
|
123
|
-
value:
|
|
123
|
+
value: Zt(r, n),
|
|
124
124
|
writable: !0,
|
|
125
125
|
enumerable: !0,
|
|
126
126
|
configurable: !0
|
|
@@ -133,7 +133,7 @@ const Yn = (e, t, n, { allOwnKeys: a } = {}) => (Ue(
|
|
|
133
133
|
});
|
|
134
134
|
},
|
|
135
135
|
{ allOwnKeys: a }
|
|
136
|
-
), e),
|
|
136
|
+
), e), ra = (e) => (e.charCodeAt(0) === 65279 && (e = e.slice(1)), e), oa = (e, t, n, a) => {
|
|
137
137
|
e.prototype = Object.create(t.prototype, a), Object.defineProperty(e.prototype, "constructor", {
|
|
138
138
|
__proto__: null,
|
|
139
139
|
value: e,
|
|
@@ -144,7 +144,7 @@ const Yn = (e, t, n, { allOwnKeys: a } = {}) => (Ue(
|
|
|
144
144
|
__proto__: null,
|
|
145
145
|
value: t.prototype
|
|
146
146
|
}), n && Object.assign(e.prototype, n);
|
|
147
|
-
},
|
|
147
|
+
}, sa = (e, t, n, a) => {
|
|
148
148
|
let r, o, s;
|
|
149
149
|
const i = {};
|
|
150
150
|
if (t = t || {}, e == null)
|
|
@@ -152,52 +152,52 @@ const Yn = (e, t, n, { allOwnKeys: a } = {}) => (Ue(
|
|
|
152
152
|
do {
|
|
153
153
|
for (r = Object.getOwnPropertyNames(e), o = r.length; o-- > 0; )
|
|
154
154
|
s = r[o], (!a || a(s, e, t)) && !i[s] && (t[s] = e[s], i[s] = !0);
|
|
155
|
-
e = n !== !1 &&
|
|
155
|
+
e = n !== !1 && _e(e);
|
|
156
156
|
} while (e && (!n || n(e, t)) && e !== Object.prototype);
|
|
157
157
|
return t;
|
|
158
|
-
},
|
|
158
|
+
}, ia = (e, t, n) => {
|
|
159
159
|
e = String(e), (n === void 0 || n > e.length) && (n = e.length), n -= t.length;
|
|
160
160
|
const a = e.indexOf(t, n);
|
|
161
161
|
return a !== -1 && a === n;
|
|
162
|
-
},
|
|
162
|
+
}, la = (e) => {
|
|
163
163
|
if (!e)
|
|
164
164
|
return null;
|
|
165
|
-
if (
|
|
165
|
+
if (Te(e))
|
|
166
166
|
return e;
|
|
167
167
|
let t = e.length;
|
|
168
|
-
if (!
|
|
168
|
+
if (!nn(t))
|
|
169
169
|
return null;
|
|
170
170
|
const n = new Array(t);
|
|
171
171
|
for (; t-- > 0; )
|
|
172
172
|
n[t] = e[t];
|
|
173
173
|
return n;
|
|
174
|
-
},
|
|
175
|
-
const n = (e && e[
|
|
174
|
+
}, ua = ((e) => (t) => e && t instanceof e)(typeof Uint8Array < "u" && _e(Uint8Array)), ca = (e, t) => {
|
|
175
|
+
const n = (e && e[Ie]).call(e);
|
|
176
176
|
let a;
|
|
177
177
|
for (; (a = n.next()) && !a.done; ) {
|
|
178
178
|
const r = a.value;
|
|
179
179
|
t.call(e, r[0], r[1]);
|
|
180
180
|
}
|
|
181
|
-
},
|
|
181
|
+
}, da = (e, t) => {
|
|
182
182
|
let n;
|
|
183
183
|
const a = [];
|
|
184
184
|
for (; (n = e.exec(t)) !== null; )
|
|
185
185
|
a.push(n);
|
|
186
186
|
return a;
|
|
187
|
-
},
|
|
187
|
+
}, pa = de("HTMLFormElement"), fa = (e) => e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g, function(t, n, a) {
|
|
188
188
|
return n.toUpperCase() + a;
|
|
189
|
-
}), { propertyIsEnumerable:
|
|
189
|
+
}), { propertyIsEnumerable: ma } = Object.prototype, ga = de("RegExp"), on = (e, t) => {
|
|
190
190
|
const n = Object.getOwnPropertyDescriptors(e), a = {};
|
|
191
|
-
|
|
191
|
+
Le(n, (r, o) => {
|
|
192
192
|
let s;
|
|
193
193
|
(s = t(r, o, e)) !== !1 && (a[o] = s || r);
|
|
194
194
|
}), Object.defineProperties(e, a);
|
|
195
|
-
},
|
|
196
|
-
|
|
197
|
-
if (
|
|
195
|
+
}, ha = (e) => {
|
|
196
|
+
on(e, (t, n) => {
|
|
197
|
+
if (oe(e) && ["arguments", "caller", "callee"].includes(n))
|
|
198
198
|
return !1;
|
|
199
199
|
const a = e[n];
|
|
200
|
-
if (
|
|
200
|
+
if (oe(a)) {
|
|
201
201
|
if (t.enumerable = !1, "writable" in t) {
|
|
202
202
|
t.writable = !1;
|
|
203
203
|
return;
|
|
@@ -207,38 +207,38 @@ const Yn = (e, t, n, { allOwnKeys: a } = {}) => (Ue(
|
|
|
207
207
|
});
|
|
208
208
|
}
|
|
209
209
|
});
|
|
210
|
-
},
|
|
210
|
+
}, ba = (e, t) => {
|
|
211
211
|
const n = {}, a = (r) => {
|
|
212
212
|
r.forEach((o) => {
|
|
213
213
|
n[o] = !0;
|
|
214
214
|
});
|
|
215
215
|
};
|
|
216
|
-
return
|
|
217
|
-
},
|
|
218
|
-
},
|
|
219
|
-
function
|
|
220
|
-
return !!(e &&
|
|
216
|
+
return Te(e) ? a(e) : a(String(e).split(t)), n;
|
|
217
|
+
}, ya = () => {
|
|
218
|
+
}, va = (e, t) => e != null && Number.isFinite(e = +e) ? e : t;
|
|
219
|
+
function wa(e) {
|
|
220
|
+
return !!(e && oe(e.append) && e[en] === "FormData" && e[Ie]);
|
|
221
221
|
}
|
|
222
|
-
const
|
|
222
|
+
const xa = (e) => {
|
|
223
223
|
const t = /* @__PURE__ */ new WeakSet(), n = (a) => {
|
|
224
|
-
if (
|
|
224
|
+
if (De(a)) {
|
|
225
225
|
if (t.has(a))
|
|
226
226
|
return;
|
|
227
227
|
if (Ae(a))
|
|
228
228
|
return a;
|
|
229
229
|
if (!("toJSON" in a)) {
|
|
230
230
|
t.add(a);
|
|
231
|
-
const r =
|
|
232
|
-
return
|
|
231
|
+
const r = Te(a) ? [] : {};
|
|
232
|
+
return Le(a, (o, s) => {
|
|
233
233
|
const i = n(o);
|
|
234
|
-
!
|
|
234
|
+
!Ce(i) && (r[s] = i);
|
|
235
235
|
}), t.delete(a), r;
|
|
236
236
|
}
|
|
237
237
|
}
|
|
238
238
|
return a;
|
|
239
239
|
};
|
|
240
240
|
return n(e);
|
|
241
|
-
},
|
|
241
|
+
}, ka = de("AsyncFunction"), Pa = (e) => e && (De(e) || oe(e)) && oe(e.then) && oe(e.catch), sn = ((e, t) => e ? setImmediate : t ? ((n, a) => (Re.addEventListener(
|
|
242
242
|
"message",
|
|
243
243
|
({ source: r, data: o }) => {
|
|
244
244
|
r === Re && o === n && a.length && a.shift()();
|
|
@@ -246,71 +246,71 @@ const ga = (e) => {
|
|
|
246
246
|
!1
|
|
247
247
|
), (r) => {
|
|
248
248
|
a.push(r), Re.postMessage(n, "*");
|
|
249
|
-
}))(`axios@${Math.random()}`, []) : (n) => setTimeout(n))(typeof setImmediate == "function",
|
|
250
|
-
isArray:
|
|
251
|
-
isArrayBuffer:
|
|
249
|
+
}))(`axios@${Math.random()}`, []) : (n) => setTimeout(n))(typeof setImmediate == "function", oe(Re.postMessage)), Ea = typeof queueMicrotask < "u" ? queueMicrotask.bind(Re) : typeof process < "u" && process.nextTick || sn, ln = (e) => e != null && oe(e[Ie]), Sa = (e) => e != null && Ue(e, Ie) && ln(e), l = {
|
|
250
|
+
isArray: Te,
|
|
251
|
+
isArrayBuffer: tn,
|
|
252
252
|
isBuffer: Ae,
|
|
253
|
-
isFormData:
|
|
254
|
-
isArrayBufferView:
|
|
255
|
-
isString:
|
|
256
|
-
isNumber:
|
|
257
|
-
isBoolean:
|
|
258
|
-
isObject:
|
|
253
|
+
isFormData: Xn,
|
|
254
|
+
isArrayBufferView: Ln,
|
|
255
|
+
isString: jn,
|
|
256
|
+
isNumber: nn,
|
|
257
|
+
isBoolean: Mn,
|
|
258
|
+
isObject: De,
|
|
259
259
|
isPlainObject: Ge,
|
|
260
|
-
isEmptyObject:
|
|
261
|
-
isReadableStream:
|
|
262
|
-
isRequest:
|
|
263
|
-
isResponse:
|
|
264
|
-
isHeaders:
|
|
265
|
-
isUndefined:
|
|
266
|
-
isDate:
|
|
267
|
-
isFile:
|
|
268
|
-
isReactNativeBlob:
|
|
269
|
-
isReactNative:
|
|
270
|
-
isBlob:
|
|
271
|
-
isRegExp:
|
|
272
|
-
isFunction:
|
|
273
|
-
isStream:
|
|
274
|
-
isURLSearchParams:
|
|
275
|
-
isTypedArray:
|
|
276
|
-
isFileList:
|
|
277
|
-
forEach:
|
|
278
|
-
merge:
|
|
279
|
-
extend:
|
|
280
|
-
trim:
|
|
281
|
-
stripBOM:
|
|
282
|
-
inherits:
|
|
283
|
-
toFlatObject:
|
|
284
|
-
kindOf:
|
|
285
|
-
kindOfTest:
|
|
286
|
-
endsWith:
|
|
287
|
-
toArray:
|
|
288
|
-
forEachEntry:
|
|
289
|
-
matchAll:
|
|
290
|
-
isHTMLForm:
|
|
260
|
+
isEmptyObject: zn,
|
|
261
|
+
isReadableStream: Yn,
|
|
262
|
+
isRequest: Zn,
|
|
263
|
+
isResponse: ea,
|
|
264
|
+
isHeaders: ta,
|
|
265
|
+
isUndefined: Ce,
|
|
266
|
+
isDate: Vn,
|
|
267
|
+
isFile: qn,
|
|
268
|
+
isReactNativeBlob: $n,
|
|
269
|
+
isReactNative: Gn,
|
|
270
|
+
isBlob: Wn,
|
|
271
|
+
isRegExp: ga,
|
|
272
|
+
isFunction: oe,
|
|
273
|
+
isStream: Jn,
|
|
274
|
+
isURLSearchParams: Qn,
|
|
275
|
+
isTypedArray: ua,
|
|
276
|
+
isFileList: Hn,
|
|
277
|
+
forEach: Le,
|
|
278
|
+
merge: pt,
|
|
279
|
+
extend: aa,
|
|
280
|
+
trim: na,
|
|
281
|
+
stripBOM: ra,
|
|
282
|
+
inherits: oa,
|
|
283
|
+
toFlatObject: sa,
|
|
284
|
+
kindOf: yt,
|
|
285
|
+
kindOfTest: de,
|
|
286
|
+
endsWith: ia,
|
|
287
|
+
toArray: la,
|
|
288
|
+
forEachEntry: ca,
|
|
289
|
+
matchAll: da,
|
|
290
|
+
isHTMLForm: pa,
|
|
291
291
|
hasOwnProperty: Ke,
|
|
292
292
|
hasOwnProp: Ke,
|
|
293
293
|
// an alias to avoid ESLint no-prototype-builtins detection
|
|
294
|
-
hasOwnInPrototypeChain:
|
|
295
|
-
getSafeProp:
|
|
296
|
-
reduceDescriptors:
|
|
297
|
-
freezeMethods:
|
|
298
|
-
toObjectSet:
|
|
299
|
-
toCamelCase:
|
|
300
|
-
noop:
|
|
301
|
-
toFiniteNumber:
|
|
302
|
-
findKey:
|
|
294
|
+
hasOwnInPrototypeChain: Ue,
|
|
295
|
+
getSafeProp: In,
|
|
296
|
+
reduceDescriptors: on,
|
|
297
|
+
freezeMethods: ha,
|
|
298
|
+
toObjectSet: ba,
|
|
299
|
+
toCamelCase: fa,
|
|
300
|
+
noop: ya,
|
|
301
|
+
toFiniteNumber: va,
|
|
302
|
+
findKey: an,
|
|
303
303
|
global: Re,
|
|
304
|
-
isContextDefined:
|
|
305
|
-
isSpecCompliantForm:
|
|
306
|
-
toJSONObject:
|
|
307
|
-
isAsyncFn:
|
|
308
|
-
isThenable:
|
|
309
|
-
setImmediate:
|
|
310
|
-
asap:
|
|
311
|
-
isIterable:
|
|
312
|
-
isSafeIterable:
|
|
313
|
-
},
|
|
304
|
+
isContextDefined: rn,
|
|
305
|
+
isSpecCompliantForm: wa,
|
|
306
|
+
toJSONObject: xa,
|
|
307
|
+
isAsyncFn: ka,
|
|
308
|
+
isThenable: Pa,
|
|
309
|
+
setImmediate: sn,
|
|
310
|
+
asap: Ea,
|
|
311
|
+
isIterable: ln,
|
|
312
|
+
isSafeIterable: Sa
|
|
313
|
+
}, Ra = l.toObjectSet([
|
|
314
314
|
"age",
|
|
315
315
|
"authorization",
|
|
316
316
|
"content-length",
|
|
@@ -328,15 +328,15 @@ const ga = (e) => {
|
|
|
328
328
|
"referer",
|
|
329
329
|
"retry-after",
|
|
330
330
|
"user-agent"
|
|
331
|
-
]),
|
|
331
|
+
]), Ta = (e) => {
|
|
332
332
|
const t = {};
|
|
333
333
|
let n, a, r;
|
|
334
334
|
return e && e.split(`
|
|
335
335
|
`).forEach(function(o) {
|
|
336
|
-
r = o.indexOf(":"), n = o.substring(0, r).trim().toLowerCase(), a = o.substring(r + 1).trim(), !(!n || t[n] &&
|
|
336
|
+
r = o.indexOf(":"), n = o.substring(0, r).trim().toLowerCase(), a = o.substring(r + 1).trim(), !(!n || t[n] && Ra[n]) && (n === "set-cookie" ? t[n] ? t[n].push(a) : t[n] = [a] : t[n] = t[n] ? t[n] + ", " + a : a);
|
|
337
337
|
}), t;
|
|
338
338
|
};
|
|
339
|
-
function
|
|
339
|
+
function Oa(e) {
|
|
340
340
|
let t = 0, n = e.length;
|
|
341
341
|
for (; t < n; ) {
|
|
342
342
|
const a = e.charCodeAt(t);
|
|
@@ -352,32 +352,32 @@ function ka(e) {
|
|
|
352
352
|
}
|
|
353
353
|
return t === 0 && n === e.length ? e : e.slice(t, n);
|
|
354
354
|
}
|
|
355
|
-
const
|
|
356
|
-
function
|
|
357
|
-
return l.isArray(e) ? e.map((n) =>
|
|
355
|
+
const Ba = new RegExp("[\\u0000-\\u0008\\u000a-\\u001f\\u007f]+", "g"), _a = new RegExp("[^\\u0009\\u0020-\\u007e\\u0080-\\u00ff]+", "g");
|
|
356
|
+
function vt(e, t) {
|
|
357
|
+
return l.isArray(e) ? e.map((n) => vt(n, t)) : Oa(String(e).replace(t, ""));
|
|
358
358
|
}
|
|
359
|
-
const
|
|
360
|
-
function
|
|
359
|
+
const Ca = (e) => vt(e, Ba), Aa = (e) => vt(e, _a);
|
|
360
|
+
function un(e) {
|
|
361
361
|
const t = /* @__PURE__ */ Object.create(null);
|
|
362
362
|
return l.forEach(e.toJSON(), (n, a) => {
|
|
363
|
-
t[a] =
|
|
363
|
+
t[a] = Aa(n);
|
|
364
364
|
}), t;
|
|
365
365
|
}
|
|
366
|
-
const
|
|
367
|
-
function
|
|
366
|
+
const Dt = Symbol("internals");
|
|
367
|
+
function Ne(e) {
|
|
368
368
|
return e && String(e).trim().toLowerCase();
|
|
369
369
|
}
|
|
370
|
-
function
|
|
371
|
-
return e === !1 || e == null ? e : l.isArray(e) ? e.map(
|
|
370
|
+
function We(e) {
|
|
371
|
+
return e === !1 || e == null ? e : l.isArray(e) ? e.map(We) : Ca(String(e));
|
|
372
372
|
}
|
|
373
|
-
function
|
|
373
|
+
function Da(e) {
|
|
374
374
|
const t = /* @__PURE__ */ Object.create(null), n = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;
|
|
375
375
|
let a;
|
|
376
376
|
for (; a = n.exec(e); )
|
|
377
377
|
t[a[1]] = a[2];
|
|
378
378
|
return t;
|
|
379
379
|
}
|
|
380
|
-
const
|
|
380
|
+
const Fa = (e) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());
|
|
381
381
|
function it(e, t, n, a, r) {
|
|
382
382
|
if (l.isFunction(a))
|
|
383
383
|
return a.call(this, t, n);
|
|
@@ -388,10 +388,10 @@ function it(e, t, n, a, r) {
|
|
|
388
388
|
return a.test(t);
|
|
389
389
|
}
|
|
390
390
|
}
|
|
391
|
-
function
|
|
391
|
+
function Na(e) {
|
|
392
392
|
return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, (t, n, a) => n.toUpperCase() + a);
|
|
393
393
|
}
|
|
394
|
-
function
|
|
394
|
+
function Ua(e, t) {
|
|
395
395
|
const n = l.toCamelCase(" " + t);
|
|
396
396
|
["get", "set", "has"].forEach((a) => {
|
|
397
397
|
Object.defineProperty(e, a + n, {
|
|
@@ -411,24 +411,24 @@ class et {
|
|
|
411
411
|
}
|
|
412
412
|
set(t, n, a) {
|
|
413
413
|
const r = this;
|
|
414
|
-
function o(i, u,
|
|
415
|
-
const c =
|
|
414
|
+
function o(i, u, d) {
|
|
415
|
+
const c = Ne(u);
|
|
416
416
|
if (!c)
|
|
417
417
|
return;
|
|
418
|
-
const
|
|
419
|
-
(!
|
|
418
|
+
const p = l.findKey(r, c);
|
|
419
|
+
(!p || r[p] === void 0 || d === !0 || d === void 0 && r[p] !== !1) && (r[p || u] = We(i));
|
|
420
420
|
}
|
|
421
|
-
const s = (i, u) => l.forEach(i, (
|
|
421
|
+
const s = (i, u) => l.forEach(i, (d, c) => o(d, c, u));
|
|
422
422
|
if (l.isPlainObject(t) || t instanceof this.constructor)
|
|
423
423
|
s(t, n);
|
|
424
|
-
else if (l.isString(t) && (t = t.trim()) && !
|
|
425
|
-
s(
|
|
424
|
+
else if (l.isString(t) && (t = t.trim()) && !Fa(t))
|
|
425
|
+
s(Ta(t), n);
|
|
426
426
|
else if (l.isObject(t) && l.isSafeIterable(t)) {
|
|
427
|
-
let i = /* @__PURE__ */ Object.create(null), u,
|
|
427
|
+
let i = /* @__PURE__ */ Object.create(null), u, d;
|
|
428
428
|
for (const c of t) {
|
|
429
429
|
if (!l.isArray(c))
|
|
430
430
|
throw new TypeError("Object iterator must return a key-value pair");
|
|
431
|
-
|
|
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
432
|
}
|
|
433
433
|
s(i, n);
|
|
434
434
|
} else
|
|
@@ -436,14 +436,14 @@ class et {
|
|
|
436
436
|
return this;
|
|
437
437
|
}
|
|
438
438
|
get(t, n) {
|
|
439
|
-
if (t =
|
|
439
|
+
if (t = Ne(t), t) {
|
|
440
440
|
const a = l.findKey(this, t);
|
|
441
441
|
if (a) {
|
|
442
442
|
const r = this[a];
|
|
443
443
|
if (!n)
|
|
444
444
|
return r;
|
|
445
445
|
if (n === !0)
|
|
446
|
-
return
|
|
446
|
+
return Da(r);
|
|
447
447
|
if (l.isFunction(n))
|
|
448
448
|
return n.call(this, r, a);
|
|
449
449
|
if (l.isRegExp(n))
|
|
@@ -453,7 +453,7 @@ class et {
|
|
|
453
453
|
}
|
|
454
454
|
}
|
|
455
455
|
has(t, n) {
|
|
456
|
-
if (t =
|
|
456
|
+
if (t = Ne(t), t) {
|
|
457
457
|
const a = l.findKey(this, t);
|
|
458
458
|
return !!(a && this[a] !== void 0 && (!n || it(this, this[a], a, n)));
|
|
459
459
|
}
|
|
@@ -463,7 +463,7 @@ class et {
|
|
|
463
463
|
const a = this;
|
|
464
464
|
let r = !1;
|
|
465
465
|
function o(s) {
|
|
466
|
-
if (s =
|
|
466
|
+
if (s = Ne(s), s) {
|
|
467
467
|
const i = l.findKey(a, s);
|
|
468
468
|
i && (!n || it(a, a[i], i, n)) && (delete a[i], r = !0);
|
|
469
469
|
}
|
|
@@ -484,11 +484,11 @@ class et {
|
|
|
484
484
|
return l.forEach(this, (r, o) => {
|
|
485
485
|
const s = l.findKey(a, o);
|
|
486
486
|
if (s) {
|
|
487
|
-
n[s] =
|
|
487
|
+
n[s] = We(r), delete n[o];
|
|
488
488
|
return;
|
|
489
489
|
}
|
|
490
|
-
const i = t ?
|
|
491
|
-
i !== o && delete n[o], n[i] =
|
|
490
|
+
const i = t ? Na(o) : String(o).trim();
|
|
491
|
+
i !== o && delete n[o], n[i] = We(r), a[i] = !0;
|
|
492
492
|
}), this;
|
|
493
493
|
}
|
|
494
494
|
concat(...t) {
|
|
@@ -521,12 +521,12 @@ class et {
|
|
|
521
521
|
return n.forEach((r) => a.set(r)), a;
|
|
522
522
|
}
|
|
523
523
|
static accessor(t) {
|
|
524
|
-
const n = (this[
|
|
524
|
+
const n = (this[Dt] = this[Dt] = {
|
|
525
525
|
accessors: {}
|
|
526
526
|
}).accessors, a = this.prototype;
|
|
527
527
|
function r(o) {
|
|
528
|
-
const s =
|
|
529
|
-
n[s] || (
|
|
528
|
+
const s = Ne(o);
|
|
529
|
+
n[s] || (Ua(a, o), n[s] = !0);
|
|
530
530
|
}
|
|
531
531
|
return l.isArray(t) ? t.forEach(r) : r(t), this;
|
|
532
532
|
}
|
|
@@ -549,8 +549,8 @@ l.reduceDescriptors(et.prototype, ({ value: e }, t) => {
|
|
|
549
549
|
};
|
|
550
550
|
});
|
|
551
551
|
l.freezeMethods(et);
|
|
552
|
-
const
|
|
553
|
-
function
|
|
552
|
+
const ie = et, Ia = "[REDACTED ****]";
|
|
553
|
+
function La(e) {
|
|
554
554
|
if (l.hasOwnProp(e, "toJSON"))
|
|
555
555
|
return !0;
|
|
556
556
|
let t = Object.getPrototypeOf(e);
|
|
@@ -561,35 +561,35 @@ function Ba(e) {
|
|
|
561
561
|
}
|
|
562
562
|
return !1;
|
|
563
563
|
}
|
|
564
|
-
function
|
|
564
|
+
function ja(e, t) {
|
|
565
565
|
const n = new Set(t.map((o) => String(o).toLowerCase())), a = [], r = (o) => {
|
|
566
566
|
if (o === null || typeof o != "object" || l.isBuffer(o))
|
|
567
567
|
return o;
|
|
568
568
|
if (a.indexOf(o) !== -1)
|
|
569
569
|
return;
|
|
570
|
-
o instanceof
|
|
570
|
+
o instanceof ie && (o = o.toJSON()), a.push(o);
|
|
571
571
|
let s;
|
|
572
572
|
if (l.isArray(o))
|
|
573
573
|
s = [], o.forEach((i, u) => {
|
|
574
|
-
const
|
|
575
|
-
l.isUndefined(
|
|
574
|
+
const d = r(i);
|
|
575
|
+
l.isUndefined(d) || (s[u] = d);
|
|
576
576
|
});
|
|
577
577
|
else {
|
|
578
|
-
if (!l.isPlainObject(o) &&
|
|
578
|
+
if (!l.isPlainObject(o) && La(o))
|
|
579
579
|
return a.pop(), o;
|
|
580
580
|
s = /* @__PURE__ */ Object.create(null);
|
|
581
581
|
for (const [i, u] of Object.entries(o)) {
|
|
582
|
-
const
|
|
583
|
-
l.isUndefined(
|
|
582
|
+
const d = n.has(i.toLowerCase()) ? Ia : r(u);
|
|
583
|
+
l.isUndefined(d) || (s[i] = d);
|
|
584
584
|
}
|
|
585
585
|
}
|
|
586
586
|
return a.pop(), s;
|
|
587
587
|
};
|
|
588
588
|
return r(e);
|
|
589
589
|
}
|
|
590
|
-
class
|
|
590
|
+
class Z extends Error {
|
|
591
591
|
static from(t, n, a, r, o, s) {
|
|
592
|
-
const i = new
|
|
592
|
+
const i = new Z(t.message, n || t.code, a, r, o);
|
|
593
593
|
return Object.defineProperty(i, "cause", {
|
|
594
594
|
__proto__: null,
|
|
595
595
|
value: t,
|
|
@@ -621,7 +621,7 @@ class G extends Error {
|
|
|
621
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
622
|
}
|
|
623
623
|
toJSON() {
|
|
624
|
-
const t = this.config, n = t && l.hasOwnProp(t, "redact") ? t.redact : void 0, a = l.isArray(n) && n.length > 0 ?
|
|
624
|
+
const t = this.config, n = t && l.hasOwnProp(t, "redact") ? t.redact : void 0, a = l.isArray(n) && n.length > 0 ? ja(t, n) : l.toJSONObject(t);
|
|
625
625
|
return {
|
|
626
626
|
// Standard
|
|
627
627
|
message: this.message,
|
|
@@ -641,36 +641,36 @@ class G extends Error {
|
|
|
641
641
|
};
|
|
642
642
|
}
|
|
643
643
|
}
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
const
|
|
659
|
-
function
|
|
644
|
+
Z.ERR_BAD_OPTION_VALUE = "ERR_BAD_OPTION_VALUE";
|
|
645
|
+
Z.ERR_BAD_OPTION = "ERR_BAD_OPTION";
|
|
646
|
+
Z.ECONNABORTED = "ECONNABORTED";
|
|
647
|
+
Z.ETIMEDOUT = "ETIMEDOUT";
|
|
648
|
+
Z.ECONNREFUSED = "ECONNREFUSED";
|
|
649
|
+
Z.ERR_NETWORK = "ERR_NETWORK";
|
|
650
|
+
Z.ERR_FR_TOO_MANY_REDIRECTS = "ERR_FR_TOO_MANY_REDIRECTS";
|
|
651
|
+
Z.ERR_DEPRECATED = "ERR_DEPRECATED";
|
|
652
|
+
Z.ERR_BAD_RESPONSE = "ERR_BAD_RESPONSE";
|
|
653
|
+
Z.ERR_BAD_REQUEST = "ERR_BAD_REQUEST";
|
|
654
|
+
Z.ERR_CANCELED = "ERR_CANCELED";
|
|
655
|
+
Z.ERR_NOT_SUPPORT = "ERR_NOT_SUPPORT";
|
|
656
|
+
Z.ERR_INVALID_URL = "ERR_INVALID_URL";
|
|
657
|
+
Z.ERR_FORM_DATA_DEPTH_EXCEEDED = "ERR_FORM_DATA_DEPTH_EXCEEDED";
|
|
658
|
+
const B = Z, Ma = null, cn = 100;
|
|
659
|
+
function ft(e) {
|
|
660
660
|
return l.isPlainObject(e) || l.isArray(e);
|
|
661
661
|
}
|
|
662
|
-
function
|
|
662
|
+
function dn(e) {
|
|
663
663
|
return l.endsWith(e, "[]") ? e.slice(0, -2) : e;
|
|
664
664
|
}
|
|
665
665
|
function lt(e, t, n) {
|
|
666
666
|
return e ? e.concat(t).map(function(a, r) {
|
|
667
|
-
return a =
|
|
667
|
+
return a = dn(a), !n && r ? "[" + a + "]" : a;
|
|
668
668
|
}).join(n ? "." : "") : t;
|
|
669
669
|
}
|
|
670
|
-
function
|
|
671
|
-
return l.isArray(e) && !e.some(
|
|
670
|
+
function za(e) {
|
|
671
|
+
return l.isArray(e) && !e.some(ft);
|
|
672
672
|
}
|
|
673
|
-
const
|
|
673
|
+
const Va = l.toFlatObject(l, {}, null, function(e) {
|
|
674
674
|
return /^is[A-Z]/.test(e);
|
|
675
675
|
});
|
|
676
676
|
function tt(e, t, n) {
|
|
@@ -684,87 +684,87 @@ function tt(e, t, n) {
|
|
|
684
684
|
indexes: !1
|
|
685
685
|
},
|
|
686
686
|
!1,
|
|
687
|
-
function(
|
|
688
|
-
return !l.isUndefined(
|
|
687
|
+
function(f, g) {
|
|
688
|
+
return !l.isUndefined(g[f]);
|
|
689
689
|
}
|
|
690
690
|
);
|
|
691
|
-
const a = n.metaTokens, r = n.visitor ||
|
|
691
|
+
const a = n.metaTokens, r = n.visitor || b, o = n.dots, s = n.indexes, i = n.Blob || typeof Blob < "u" && Blob, u = n.maxDepth === void 0 ? cn : n.maxDepth, d = i && l.isSpecCompliantForm(t), c = [];
|
|
692
692
|
if (!l.isFunction(r))
|
|
693
693
|
throw new TypeError("visitor must be a function");
|
|
694
|
-
function
|
|
695
|
-
if (
|
|
694
|
+
function p(f) {
|
|
695
|
+
if (f === null)
|
|
696
696
|
return "";
|
|
697
|
-
if (l.isDate(
|
|
698
|
-
return
|
|
699
|
-
if (l.isBoolean(
|
|
700
|
-
return
|
|
701
|
-
if (!
|
|
702
|
-
throw new
|
|
703
|
-
if (l.isArrayBuffer(
|
|
704
|
-
if (
|
|
705
|
-
return new i([
|
|
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 B("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
706
|
if (typeof Buffer < "u")
|
|
707
|
-
return Buffer.from(
|
|
708
|
-
throw new
|
|
707
|
+
return Buffer.from(f);
|
|
708
|
+
throw new B("Blob is not supported. Use a Buffer instead.", B.ERR_NOT_SUPPORT);
|
|
709
709
|
}
|
|
710
|
-
return
|
|
710
|
+
return f;
|
|
711
711
|
}
|
|
712
|
-
function
|
|
713
|
-
if (
|
|
714
|
-
throw new
|
|
715
|
-
"Object is too deeply nested (" +
|
|
716
|
-
|
|
712
|
+
function w(f) {
|
|
713
|
+
if (f > u)
|
|
714
|
+
throw new B(
|
|
715
|
+
"Object is too deeply nested (" + f + " levels). Max depth: " + u,
|
|
716
|
+
B.ERR_FORM_DATA_DEPTH_EXCEEDED
|
|
717
717
|
);
|
|
718
718
|
}
|
|
719
|
-
function
|
|
719
|
+
function P(f, g) {
|
|
720
720
|
if (u === 1 / 0)
|
|
721
|
-
return JSON.stringify(
|
|
722
|
-
const
|
|
723
|
-
return JSON.stringify(
|
|
724
|
-
if (!l.isObject(
|
|
725
|
-
return
|
|
726
|
-
for (;
|
|
727
|
-
|
|
728
|
-
return
|
|
721
|
+
return JSON.stringify(f);
|
|
722
|
+
const m = [];
|
|
723
|
+
return JSON.stringify(f, function(S, x) {
|
|
724
|
+
if (!l.isObject(x))
|
|
725
|
+
return x;
|
|
726
|
+
for (; m.length && m[m.length - 1] !== this; )
|
|
727
|
+
m.pop();
|
|
728
|
+
return m.push(x), w(g + m.length - 1), x;
|
|
729
729
|
});
|
|
730
730
|
}
|
|
731
|
-
function
|
|
732
|
-
let
|
|
733
|
-
if (l.isReactNative(t) && l.isReactNativeBlob(
|
|
734
|
-
return t.append(lt(
|
|
735
|
-
if (
|
|
736
|
-
if (l.endsWith(
|
|
737
|
-
|
|
738
|
-
else if (l.isArray(
|
|
739
|
-
return
|
|
740
|
-
!(l.isUndefined(
|
|
731
|
+
function b(f, g, m) {
|
|
732
|
+
let S = f;
|
|
733
|
+
if (l.isReactNative(t) && l.isReactNativeBlob(f))
|
|
734
|
+
return t.append(lt(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 = P(f, 1);
|
|
738
|
+
else if (l.isArray(f) && za(f) || (l.isFileList(f) || l.endsWith(g, "[]")) && (S = l.toArray(f)))
|
|
739
|
+
return g = dn(g), S.forEach(function(x, y) {
|
|
740
|
+
!(l.isUndefined(x) || x === null) && t.append(
|
|
741
741
|
// eslint-disable-next-line no-nested-ternary
|
|
742
|
-
s === !0 ? lt([
|
|
743
|
-
|
|
742
|
+
s === !0 ? lt([g], y, o) : s === null ? g : g + "[]",
|
|
743
|
+
p(x)
|
|
744
744
|
);
|
|
745
745
|
}), !1;
|
|
746
746
|
}
|
|
747
|
-
return
|
|
747
|
+
return ft(f) ? !0 : (t.append(lt(m, g, o), p(f)), !1);
|
|
748
748
|
}
|
|
749
|
-
const v = Object.assign(
|
|
750
|
-
defaultVisitor:
|
|
751
|
-
convertValue:
|
|
752
|
-
isVisitable:
|
|
749
|
+
const v = Object.assign(Va, {
|
|
750
|
+
defaultVisitor: b,
|
|
751
|
+
convertValue: p,
|
|
752
|
+
isVisitable: ft
|
|
753
753
|
});
|
|
754
|
-
function
|
|
755
|
-
if (!l.isUndefined(
|
|
756
|
-
if (
|
|
757
|
-
throw new Error("Circular reference detected in " +
|
|
758
|
-
c.push(
|
|
759
|
-
(!(l.isUndefined(
|
|
754
|
+
function U(f, g, m = 0) {
|
|
755
|
+
if (!l.isUndefined(f)) {
|
|
756
|
+
if (w(m), c.indexOf(f) !== -1)
|
|
757
|
+
throw new Error("Circular reference detected in " + g.join("."));
|
|
758
|
+
c.push(f), l.forEach(f, function(S, x) {
|
|
759
|
+
(!(l.isUndefined(S) || S === null) && r.call(t, S, l.isString(x) ? x.trim() : x, g, v)) === !0 && U(S, g ? g.concat(x) : [x], m + 1);
|
|
760
760
|
}), c.pop();
|
|
761
761
|
}
|
|
762
762
|
}
|
|
763
763
|
if (!l.isObject(e))
|
|
764
764
|
throw new TypeError("data must be an object");
|
|
765
|
-
return
|
|
765
|
+
return U(e), t;
|
|
766
766
|
}
|
|
767
|
-
function
|
|
767
|
+
function Ft(e) {
|
|
768
768
|
const t = {
|
|
769
769
|
"!": "%21",
|
|
770
770
|
"'": "%27",
|
|
@@ -777,37 +777,37 @@ function Dt(e) {
|
|
|
777
777
|
return t[n];
|
|
778
778
|
});
|
|
779
779
|
}
|
|
780
|
-
function
|
|
780
|
+
function wt(e, t) {
|
|
781
781
|
this._pairs = [], e && tt(e, this, t);
|
|
782
782
|
}
|
|
783
|
-
const
|
|
784
|
-
|
|
783
|
+
const pn = wt.prototype;
|
|
784
|
+
pn.append = function(e, t) {
|
|
785
785
|
this._pairs.push([e, t]);
|
|
786
786
|
};
|
|
787
|
-
|
|
788
|
-
const t = e ? (n) => e.call(this, n,
|
|
787
|
+
pn.toString = function(e) {
|
|
788
|
+
const t = e ? (n) => e.call(this, n, Ft) : Ft;
|
|
789
789
|
return this._pairs.map(function(n) {
|
|
790
790
|
return t(n[0]) + "=" + t(n[1]);
|
|
791
791
|
}, "").join("&");
|
|
792
792
|
};
|
|
793
|
-
function
|
|
793
|
+
function qa(e) {
|
|
794
794
|
return encodeURIComponent(e).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+");
|
|
795
795
|
}
|
|
796
|
-
function
|
|
796
|
+
function fn(e, t, n) {
|
|
797
797
|
if (!t)
|
|
798
798
|
return e;
|
|
799
799
|
e = e || "";
|
|
800
800
|
const a = l.isFunction(n) ? {
|
|
801
801
|
serialize: n
|
|
802
|
-
} : n, r = l.getSafeProp(a, "encode") ||
|
|
802
|
+
} : n, r = l.getSafeProp(a, "encode") || qa, o = l.getSafeProp(a, "serialize");
|
|
803
803
|
let s;
|
|
804
|
-
if (o ? s = o(t, a) : s = l.isURLSearchParams(t) ? t.toString() : new
|
|
804
|
+
if (o ? s = o(t, a) : s = l.isURLSearchParams(t) ? t.toString() : new wt(t, a).toString(r), s) {
|
|
805
805
|
const i = e.indexOf("#");
|
|
806
806
|
i !== -1 && (e = e.slice(0, i)), e += (e.indexOf("?") === -1 ? "?" : "&") + s;
|
|
807
807
|
}
|
|
808
808
|
return e;
|
|
809
809
|
}
|
|
810
|
-
class
|
|
810
|
+
class $a {
|
|
811
811
|
constructor() {
|
|
812
812
|
this.handlers = [];
|
|
813
813
|
}
|
|
@@ -862,57 +862,57 @@ class ja {
|
|
|
862
862
|
});
|
|
863
863
|
}
|
|
864
864
|
}
|
|
865
|
-
const
|
|
865
|
+
const Nt = $a, xt = {
|
|
866
866
|
silentJSONParsing: !0,
|
|
867
867
|
forcedJSONParsing: !0,
|
|
868
868
|
clarifyTimeoutError: !1,
|
|
869
869
|
legacyInterceptorReqResOrdering: !0,
|
|
870
870
|
advertiseZstdAcceptEncoding: !1,
|
|
871
871
|
validateStatusUndefinedResolves: !0
|
|
872
|
-
},
|
|
872
|
+
}, Ga = typeof URLSearchParams < "u" ? URLSearchParams : wt, Wa = typeof FormData < "u" ? FormData : null, Ha = typeof Blob < "u" ? Blob : null, Ja = {
|
|
873
873
|
isBrowser: !0,
|
|
874
874
|
classes: {
|
|
875
|
-
URLSearchParams:
|
|
876
|
-
FormData:
|
|
877
|
-
Blob:
|
|
875
|
+
URLSearchParams: Ga,
|
|
876
|
+
FormData: Wa,
|
|
877
|
+
Blob: Ha
|
|
878
878
|
},
|
|
879
879
|
protocols: ["http", "https", "file", "blob", "url", "data"]
|
|
880
|
-
},
|
|
881
|
-
self instanceof WorkerGlobalScope && typeof self.importScripts == "function")(),
|
|
880
|
+
}, kt = typeof window < "u" && typeof document < "u", mt = typeof navigator == "object" && navigator || void 0, Ka = kt && (!mt || ["ReactNative", "NativeScript", "NS"].indexOf(mt.product) < 0), Xa = (() => typeof WorkerGlobalScope < "u" && // eslint-disable-next-line no-undef
|
|
881
|
+
self instanceof WorkerGlobalScope && typeof self.importScripts == "function")(), Qa = kt && window.location.href || "http://localhost", Ya = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
882
882
|
__proto__: null,
|
|
883
|
-
hasBrowserEnv:
|
|
884
|
-
hasStandardBrowserEnv:
|
|
885
|
-
hasStandardBrowserWebWorkerEnv:
|
|
886
|
-
navigator:
|
|
887
|
-
origin:
|
|
888
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
889
|
-
...
|
|
890
|
-
...
|
|
883
|
+
hasBrowserEnv: kt,
|
|
884
|
+
hasStandardBrowserEnv: Ka,
|
|
885
|
+
hasStandardBrowserWebWorkerEnv: Xa,
|
|
886
|
+
navigator: mt,
|
|
887
|
+
origin: Qa
|
|
888
|
+
}, Symbol.toStringTag, { value: "Module" })), Y = {
|
|
889
|
+
...Ya,
|
|
890
|
+
...Ja
|
|
891
891
|
};
|
|
892
|
-
function
|
|
893
|
-
return tt(e, new
|
|
892
|
+
function Za(e, t) {
|
|
893
|
+
return tt(e, new Y.classes.URLSearchParams(), {
|
|
894
894
|
visitor: function(n, a, r, o) {
|
|
895
|
-
return
|
|
895
|
+
return Y.isNode && l.isBuffer(n) ? (this.append(a, n.toString("base64")), !1) : o.defaultVisitor.apply(this, arguments);
|
|
896
896
|
},
|
|
897
897
|
...t
|
|
898
898
|
});
|
|
899
899
|
}
|
|
900
|
-
const
|
|
901
|
-
function
|
|
902
|
-
if (e >
|
|
903
|
-
throw new
|
|
904
|
-
"FormData field is too deeply nested (" + e + " levels). Max depth: " +
|
|
905
|
-
|
|
900
|
+
const Ut = cn;
|
|
901
|
+
function mn(e) {
|
|
902
|
+
if (e > Ut)
|
|
903
|
+
throw new B(
|
|
904
|
+
"FormData field is too deeply nested (" + e + " levels). Max depth: " + Ut,
|
|
905
|
+
B.ERR_FORM_DATA_DEPTH_EXCEEDED
|
|
906
906
|
);
|
|
907
907
|
}
|
|
908
|
-
function
|
|
908
|
+
function er(e) {
|
|
909
909
|
const t = [], n = /\w+|\[(\w*)]/g;
|
|
910
910
|
let a;
|
|
911
911
|
for (; (a = n.exec(e)) !== null; )
|
|
912
|
-
|
|
912
|
+
mn(t.length), t.push(a[0] === "[]" ? "" : a[1] || a[0]);
|
|
913
913
|
return t;
|
|
914
914
|
}
|
|
915
|
-
function
|
|
915
|
+
function tr(e) {
|
|
916
916
|
const t = {}, n = Object.keys(e);
|
|
917
917
|
let a;
|
|
918
918
|
const r = n.length;
|
|
@@ -921,25 +921,25 @@ function Ka(e) {
|
|
|
921
921
|
o = n[a], t[o] = e[o];
|
|
922
922
|
return t;
|
|
923
923
|
}
|
|
924
|
-
function
|
|
924
|
+
function gn(e) {
|
|
925
925
|
function t(n, a, r, o) {
|
|
926
|
-
|
|
926
|
+
mn(o);
|
|
927
927
|
let s = n[o++];
|
|
928
928
|
if (s === "__proto__")
|
|
929
929
|
return !0;
|
|
930
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] =
|
|
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] = tr(r[s])), !i);
|
|
932
932
|
}
|
|
933
933
|
if (l.isFormData(e) && l.isFunction(e.entries)) {
|
|
934
934
|
const n = {};
|
|
935
935
|
return l.forEachEntry(e, (a, r) => {
|
|
936
|
-
t(
|
|
936
|
+
t(er(a), r, n, 0);
|
|
937
937
|
}), n;
|
|
938
938
|
}
|
|
939
939
|
return null;
|
|
940
940
|
}
|
|
941
|
-
const
|
|
942
|
-
function
|
|
941
|
+
const Be = (e, t) => e != null && l.hasOwnProp(e, t) ? e[t] : void 0;
|
|
942
|
+
function nr(e, t, n) {
|
|
943
943
|
if (l.isString(e))
|
|
944
944
|
try {
|
|
945
945
|
return (t || JSON.parse)(e), l.trim(e);
|
|
@@ -949,14 +949,14 @@ function Xa(e, t, n) {
|
|
|
949
949
|
}
|
|
950
950
|
return (n || JSON.stringify)(e);
|
|
951
951
|
}
|
|
952
|
-
const
|
|
953
|
-
transitional:
|
|
952
|
+
const Pt = {
|
|
953
|
+
transitional: xt,
|
|
954
954
|
adapter: ["xhr", "http", "fetch"],
|
|
955
955
|
transformRequest: [
|
|
956
956
|
function(e, t) {
|
|
957
957
|
const n = t.getContentType() || "", a = n.indexOf("application/json") > -1, r = l.isObject(e);
|
|
958
958
|
if (r && l.isHTMLForm(e) && (e = new FormData(e)), l.isFormData(e))
|
|
959
|
-
return a ? JSON.stringify(
|
|
959
|
+
return a ? JSON.stringify(gn(e)) : e;
|
|
960
960
|
if (l.isArrayBuffer(e) || l.isBuffer(e) || l.isStream(e) || l.isFile(e) || l.isBlob(e) || l.isReadableStream(e))
|
|
961
961
|
return e;
|
|
962
962
|
if (l.isArrayBufferView(e))
|
|
@@ -965,11 +965,11 @@ const kt = {
|
|
|
965
965
|
return t.setContentType("application/x-www-form-urlencoded;charset=utf-8", !1), e.toString();
|
|
966
966
|
let o;
|
|
967
967
|
if (r) {
|
|
968
|
-
const s =
|
|
968
|
+
const s = Be(this, "formSerializer");
|
|
969
969
|
if (n.indexOf("application/x-www-form-urlencoded") > -1)
|
|
970
|
-
return
|
|
970
|
+
return Za(e, s).toString();
|
|
971
971
|
if ((o = l.isFileList(e)) || n.indexOf("multipart/form-data") > -1) {
|
|
972
|
-
const i =
|
|
972
|
+
const i = Be(this, "env"), u = i && i.FormData;
|
|
973
973
|
return tt(
|
|
974
974
|
o ? { "files[]": e } : e,
|
|
975
975
|
u && new u(),
|
|
@@ -977,21 +977,21 @@ const kt = {
|
|
|
977
977
|
);
|
|
978
978
|
}
|
|
979
979
|
}
|
|
980
|
-
return r || a ? (t.setContentType("application/json", !1),
|
|
980
|
+
return r || a ? (t.setContentType("application/json", !1), nr(e)) : e;
|
|
981
981
|
}
|
|
982
982
|
],
|
|
983
983
|
transformResponse: [
|
|
984
984
|
function(e) {
|
|
985
|
-
const t =
|
|
985
|
+
const t = Be(this, "transitional") || Pt.transitional, n = t && t.forcedJSONParsing, a = Be(this, "responseType"), r = a === "json";
|
|
986
986
|
if (l.isResponse(e) || l.isReadableStream(e))
|
|
987
987
|
return e;
|
|
988
988
|
if (e && l.isString(e) && (n && !a || r)) {
|
|
989
989
|
const o = !(t && t.silentJSONParsing) && r;
|
|
990
990
|
try {
|
|
991
|
-
return JSON.parse(e,
|
|
991
|
+
return JSON.parse(e, Be(this, "parseReviver"));
|
|
992
992
|
} catch (s) {
|
|
993
993
|
if (o)
|
|
994
|
-
throw s.name === "SyntaxError" ?
|
|
994
|
+
throw s.name === "SyntaxError" ? B.from(s, B.ERR_BAD_RESPONSE, this, null, Be(this, "response")) : s;
|
|
995
995
|
}
|
|
996
996
|
}
|
|
997
997
|
return e;
|
|
@@ -1007,8 +1007,8 @@ const kt = {
|
|
|
1007
1007
|
maxContentLength: -1,
|
|
1008
1008
|
maxBodyLength: -1,
|
|
1009
1009
|
env: {
|
|
1010
|
-
FormData:
|
|
1011
|
-
Blob:
|
|
1010
|
+
FormData: Y.classes.FormData,
|
|
1011
|
+
Blob: Y.classes.Blob
|
|
1012
1012
|
},
|
|
1013
1013
|
validateStatus: function(e) {
|
|
1014
1014
|
return e >= 200 && e < 300;
|
|
@@ -1021,20 +1021,20 @@ const kt = {
|
|
|
1021
1021
|
}
|
|
1022
1022
|
};
|
|
1023
1023
|
l.forEach(["delete", "get", "head", "post", "put", "patch", "query"], (e) => {
|
|
1024
|
-
|
|
1024
|
+
Pt.headers[e] = {};
|
|
1025
1025
|
});
|
|
1026
|
-
const
|
|
1026
|
+
const Et = Pt;
|
|
1027
1027
|
function ut(e, t) {
|
|
1028
|
-
const n = this ||
|
|
1028
|
+
const n = this || Et, a = t || n, r = ie.from(a.headers);
|
|
1029
1029
|
let o = a.data;
|
|
1030
1030
|
return l.forEach(e, function(s) {
|
|
1031
1031
|
o = s.call(n, o, r.normalize(), t ? t.status : void 0);
|
|
1032
1032
|
}), r.normalize(), o;
|
|
1033
1033
|
}
|
|
1034
|
-
function
|
|
1034
|
+
function hn(e) {
|
|
1035
1035
|
return !!(e && e.__CANCEL__);
|
|
1036
1036
|
}
|
|
1037
|
-
class
|
|
1037
|
+
class ar extends B {
|
|
1038
1038
|
/**
|
|
1039
1039
|
* A `CanceledError` is an object that is thrown when an operation is canceled.
|
|
1040
1040
|
*
|
|
@@ -1045,74 +1045,74 @@ class Ya extends E {
|
|
|
1045
1045
|
* @returns {CanceledError} The created error.
|
|
1046
1046
|
*/
|
|
1047
1047
|
constructor(t, n, a) {
|
|
1048
|
-
super(t ?? "canceled",
|
|
1048
|
+
super(t ?? "canceled", B.ERR_CANCELED, n, a), this.name = "CanceledError", this.__CANCEL__ = !0;
|
|
1049
1049
|
}
|
|
1050
1050
|
}
|
|
1051
|
-
const je =
|
|
1052
|
-
function
|
|
1051
|
+
const je = ar;
|
|
1052
|
+
function bn(e, t, n) {
|
|
1053
1053
|
const a = n.config.validateStatus;
|
|
1054
|
-
!n.status || !a || a(n.status) ? e(n) : t(new
|
|
1054
|
+
!n.status || !a || a(n.status) ? e(n) : t(new B(
|
|
1055
1055
|
"Request failed with status code " + n.status,
|
|
1056
|
-
n.status >= 400 && n.status < 500 ?
|
|
1056
|
+
n.status >= 400 && n.status < 500 ? B.ERR_BAD_REQUEST : B.ERR_BAD_RESPONSE,
|
|
1057
1057
|
n.config,
|
|
1058
1058
|
n.request,
|
|
1059
1059
|
n
|
|
1060
1060
|
));
|
|
1061
1061
|
}
|
|
1062
|
-
function
|
|
1062
|
+
function rr(e) {
|
|
1063
1063
|
const t = /^([-+\w]{1,25}):(?:\/\/)?/.exec(e);
|
|
1064
1064
|
return t && t[1] || "";
|
|
1065
1065
|
}
|
|
1066
|
-
function
|
|
1066
|
+
function or(e, t) {
|
|
1067
1067
|
e = e || 10;
|
|
1068
1068
|
const n = new Array(e), a = new Array(e);
|
|
1069
1069
|
let r = 0, o = 0, s;
|
|
1070
1070
|
return t = t !== void 0 ? t : 1e3, function(i) {
|
|
1071
|
-
const u = Date.now(),
|
|
1071
|
+
const u = Date.now(), d = a[o];
|
|
1072
1072
|
s || (s = u), n[r] = i, a[r] = u;
|
|
1073
|
-
let c = o,
|
|
1073
|
+
let c = o, p = 0;
|
|
1074
1074
|
for (; c !== r; )
|
|
1075
|
-
|
|
1075
|
+
p += n[c++], c = c % e;
|
|
1076
1076
|
if (r = (r + 1) % e, r === o && (o = (o + 1) % e), u - s < t)
|
|
1077
1077
|
return;
|
|
1078
|
-
const
|
|
1079
|
-
return
|
|
1078
|
+
const w = d && u - d;
|
|
1079
|
+
return w ? Math.round(p * 1e3 / w) : void 0;
|
|
1080
1080
|
};
|
|
1081
1081
|
}
|
|
1082
|
-
function
|
|
1082
|
+
function sr(e, t) {
|
|
1083
1083
|
let n = 0, a = 1e3 / t, r, o;
|
|
1084
1084
|
const s = (i, u = Date.now()) => {
|
|
1085
1085
|
n = u, r = null, o && (clearTimeout(o), o = null), e(...i);
|
|
1086
1086
|
};
|
|
1087
1087
|
return [(...i) => {
|
|
1088
|
-
const u = Date.now(),
|
|
1089
|
-
|
|
1088
|
+
const u = Date.now(), d = u - n;
|
|
1089
|
+
d >= a ? s(i, u) : (r = i, o || (o = setTimeout(() => {
|
|
1090
1090
|
o = null, s(r);
|
|
1091
|
-
}, a -
|
|
1091
|
+
}, a - d)));
|
|
1092
1092
|
}, () => r && s(r)];
|
|
1093
1093
|
}
|
|
1094
1094
|
const Xe = (e, t, n = 3) => {
|
|
1095
1095
|
let a = 0;
|
|
1096
|
-
const r =
|
|
1097
|
-
return
|
|
1096
|
+
const r = or(50, 250);
|
|
1097
|
+
return sr((o) => {
|
|
1098
1098
|
if (!o || typeof o.loaded != "number")
|
|
1099
1099
|
return;
|
|
1100
|
-
const s = o.loaded, i = o.lengthComputable ? o.total : void 0, u = i != null ? Math.min(s, i) : s,
|
|
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
1101
|
a = Math.max(a, u);
|
|
1102
|
-
const
|
|
1102
|
+
const p = {
|
|
1103
1103
|
loaded: u,
|
|
1104
1104
|
total: i,
|
|
1105
1105
|
progress: i ? u / i : void 0,
|
|
1106
|
-
bytes:
|
|
1106
|
+
bytes: d,
|
|
1107
1107
|
rate: c || void 0,
|
|
1108
1108
|
estimated: c && i ? (i - u) / c : void 0,
|
|
1109
1109
|
event: o,
|
|
1110
1110
|
lengthComputable: i != null,
|
|
1111
1111
|
[t ? "download" : "upload"]: !0
|
|
1112
1112
|
};
|
|
1113
|
-
e(
|
|
1113
|
+
e(p);
|
|
1114
1114
|
}, n);
|
|
1115
|
-
},
|
|
1115
|
+
}, It = (e, t) => {
|
|
1116
1116
|
const n = e != null;
|
|
1117
1117
|
return [
|
|
1118
1118
|
(a) => t[0]({
|
|
@@ -1122,10 +1122,10 @@ const Xe = (e, t, n = 3) => {
|
|
|
1122
1122
|
}),
|
|
1123
1123
|
t[1]
|
|
1124
1124
|
];
|
|
1125
|
-
},
|
|
1126
|
-
new URL(
|
|
1127
|
-
|
|
1128
|
-
) : () => !0,
|
|
1125
|
+
}, Lt = (e) => (...t) => l.asap(() => e(...t)), ir = Y.hasStandardBrowserEnv ? ((e, t) => (n) => (n = new URL(n, Y.origin), e.protocol === n.protocol && e.host === n.host && (t || e.port === n.port)))(
|
|
1126
|
+
new URL(Y.origin),
|
|
1127
|
+
Y.navigator && /(msie|trident)/i.test(Y.navigator.userAgent)
|
|
1128
|
+
) : () => !0, lr = Y.hasStandardBrowserEnv ? (
|
|
1129
1129
|
// Standard browser envs support document.cookie
|
|
1130
1130
|
{
|
|
1131
1131
|
write(e, t, n, a, r, o, s) {
|
|
@@ -1165,37 +1165,37 @@ const Xe = (e, t, n = 3) => {
|
|
|
1165
1165
|
}
|
|
1166
1166
|
}
|
|
1167
1167
|
);
|
|
1168
|
-
function
|
|
1168
|
+
function ur(e) {
|
|
1169
1169
|
return typeof e != "string" ? !1 : /^([a-z][a-z\d+\-.]*:)?\/\//i.test(e);
|
|
1170
1170
|
}
|
|
1171
|
-
function
|
|
1171
|
+
function cr(e, t) {
|
|
1172
1172
|
return t ? e.replace(/\/?\/$/, "") + "/" + t.replace(/^\/+/, "") : e;
|
|
1173
1173
|
}
|
|
1174
|
-
const
|
|
1175
|
-
function
|
|
1174
|
+
const dr = /^https?:(?!\/\/)/i, pr = /[\t\n\r]/g;
|
|
1175
|
+
function fr(e) {
|
|
1176
1176
|
let t = 0;
|
|
1177
1177
|
for (; t < e.length && e.charCodeAt(t) <= 32; )
|
|
1178
1178
|
t++;
|
|
1179
1179
|
return e.slice(t);
|
|
1180
1180
|
}
|
|
1181
|
-
function
|
|
1182
|
-
return
|
|
1181
|
+
function mr(e) {
|
|
1182
|
+
return fr(e).replace(pr, "");
|
|
1183
1183
|
}
|
|
1184
1184
|
function jt(e, t) {
|
|
1185
|
-
if (typeof e == "string" &&
|
|
1186
|
-
throw new
|
|
1185
|
+
if (typeof e == "string" && dr.test(mr(e)))
|
|
1186
|
+
throw new B(
|
|
1187
1187
|
'Invalid URL: missing "//" after protocol',
|
|
1188
|
-
|
|
1188
|
+
B.ERR_INVALID_URL,
|
|
1189
1189
|
t
|
|
1190
1190
|
);
|
|
1191
1191
|
}
|
|
1192
|
-
function
|
|
1192
|
+
function yn(e, t, n, a) {
|
|
1193
1193
|
jt(t, a);
|
|
1194
|
-
let r = !
|
|
1195
|
-
return e && (r || n === !1) ? (jt(e, a),
|
|
1194
|
+
let r = !ur(t);
|
|
1195
|
+
return e && (r || n === !1) ? (jt(e, a), cr(e, t)) : t;
|
|
1196
1196
|
}
|
|
1197
|
-
const
|
|
1198
|
-
function
|
|
1197
|
+
const Mt = (e) => e instanceof ie ? { ...e } : e;
|
|
1198
|
+
function Oe(e, t) {
|
|
1199
1199
|
e = e || {}, t = t || {};
|
|
1200
1200
|
const n = /* @__PURE__ */ Object.create(null);
|
|
1201
1201
|
Object.defineProperty(n, "hasOwnProperty", {
|
|
@@ -1207,46 +1207,46 @@ function Se(e, t) {
|
|
|
1207
1207
|
writable: !0,
|
|
1208
1208
|
configurable: !0
|
|
1209
1209
|
});
|
|
1210
|
-
function a(c,
|
|
1211
|
-
return l.isPlainObject(c) && l.isPlainObject(
|
|
1210
|
+
function a(c, p, w, P) {
|
|
1211
|
+
return l.isPlainObject(c) && l.isPlainObject(p) ? l.merge.call({ caseless: P }, c, p) : l.isPlainObject(p) ? l.merge({}, p) : l.isArray(p) ? p.slice() : p;
|
|
1212
1212
|
}
|
|
1213
|
-
function r(c,
|
|
1214
|
-
if (l.isUndefined(
|
|
1213
|
+
function r(c, p, w, P) {
|
|
1214
|
+
if (l.isUndefined(p)) {
|
|
1215
1215
|
if (!l.isUndefined(c))
|
|
1216
|
-
return a(void 0, c,
|
|
1216
|
+
return a(void 0, c, w, P);
|
|
1217
1217
|
} else
|
|
1218
|
-
return a(c,
|
|
1218
|
+
return a(c, p, w, P);
|
|
1219
1219
|
}
|
|
1220
|
-
function o(c,
|
|
1221
|
-
if (!l.isUndefined(
|
|
1222
|
-
return a(void 0,
|
|
1220
|
+
function o(c, p) {
|
|
1221
|
+
if (!l.isUndefined(p))
|
|
1222
|
+
return a(void 0, p);
|
|
1223
1223
|
}
|
|
1224
|
-
function s(c,
|
|
1225
|
-
if (l.isUndefined(
|
|
1224
|
+
function s(c, p) {
|
|
1225
|
+
if (l.isUndefined(p)) {
|
|
1226
1226
|
if (!l.isUndefined(c))
|
|
1227
1227
|
return a(void 0, c);
|
|
1228
1228
|
} else
|
|
1229
|
-
return a(void 0,
|
|
1229
|
+
return a(void 0, p);
|
|
1230
1230
|
}
|
|
1231
1231
|
function i(c) {
|
|
1232
|
-
const
|
|
1233
|
-
if (!l.isUndefined(
|
|
1234
|
-
if (l.isPlainObject(
|
|
1235
|
-
if (l.hasOwnProp(
|
|
1236
|
-
return
|
|
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
1237
|
} else
|
|
1238
1238
|
return;
|
|
1239
|
-
const
|
|
1240
|
-
if (l.isPlainObject(
|
|
1241
|
-
return
|
|
1239
|
+
const w = l.hasOwnProp(e, "transitional") ? e.transitional : void 0;
|
|
1240
|
+
if (l.isPlainObject(w) && l.hasOwnProp(w, c))
|
|
1241
|
+
return w[c];
|
|
1242
1242
|
}
|
|
1243
|
-
function u(c,
|
|
1244
|
-
if (l.hasOwnProp(t,
|
|
1245
|
-
return a(c,
|
|
1246
|
-
if (l.hasOwnProp(e,
|
|
1243
|
+
function u(c, p, w) {
|
|
1244
|
+
if (l.hasOwnProp(t, w))
|
|
1245
|
+
return a(c, p);
|
|
1246
|
+
if (l.hasOwnProp(e, w))
|
|
1247
1247
|
return a(void 0, c);
|
|
1248
1248
|
}
|
|
1249
|
-
const
|
|
1249
|
+
const d = {
|
|
1250
1250
|
url: o,
|
|
1251
1251
|
method: o,
|
|
1252
1252
|
data: o,
|
|
@@ -1276,127 +1276,127 @@ function Se(e, t) {
|
|
|
1276
1276
|
allowedSocketPaths: s,
|
|
1277
1277
|
responseEncoding: s,
|
|
1278
1278
|
validateStatus: u,
|
|
1279
|
-
headers: (c,
|
|
1279
|
+
headers: (c, p, w) => r(Mt(c), Mt(p), w, !0)
|
|
1280
1280
|
};
|
|
1281
1281
|
return l.forEach(Object.keys({ ...e, ...t }), function(c) {
|
|
1282
1282
|
if (c === "__proto__" || c === "constructor" || c === "prototype")
|
|
1283
1283
|
return;
|
|
1284
|
-
const
|
|
1285
|
-
l.isUndefined(
|
|
1284
|
+
const p = l.hasOwnProp(d, c) ? d[c] : r, w = l.hasOwnProp(e, c) ? e[c] : void 0, P = l.hasOwnProp(t, c) ? t[c] : void 0, b = p(w, P, c);
|
|
1285
|
+
l.isUndefined(b) && p !== u || (n[c] = b);
|
|
1286
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
1287
|
}
|
|
1288
|
-
const
|
|
1289
|
-
function
|
|
1288
|
+
const gr = ["content-type", "content-length"];
|
|
1289
|
+
function hr(e, t, n) {
|
|
1290
1290
|
if (n !== "content-only") {
|
|
1291
1291
|
e.set(t);
|
|
1292
1292
|
return;
|
|
1293
1293
|
}
|
|
1294
1294
|
Object.entries(t || {}).forEach(([a, r]) => {
|
|
1295
|
-
|
|
1295
|
+
gr.includes(a.toLowerCase()) && e.set(a, r);
|
|
1296
1296
|
});
|
|
1297
1297
|
}
|
|
1298
|
-
const
|
|
1298
|
+
const br = (e) => encodeURIComponent(e).replace(
|
|
1299
1299
|
/%([0-9A-F]{2})/gi,
|
|
1300
1300
|
(t, n) => String.fromCharCode(parseInt(n, 16))
|
|
1301
1301
|
);
|
|
1302
|
-
function
|
|
1303
|
-
const t =
|
|
1302
|
+
function vn(e) {
|
|
1303
|
+
const t = Oe({}, e), n = (w) => l.hasOwnProp(t, w) ? t[w] : void 0, a = n("data");
|
|
1304
1304
|
let r = n("withXSRFToken");
|
|
1305
1305
|
const o = n("xsrfHeaderName"), s = n("xsrfCookieName");
|
|
1306
1306
|
let i = n("headers");
|
|
1307
|
-
const u = n("auth"),
|
|
1308
|
-
if (t.headers = i =
|
|
1309
|
-
|
|
1307
|
+
const u = n("auth"), d = n("baseURL"), c = n("allowAbsoluteUrls"), p = n("url");
|
|
1308
|
+
if (t.headers = i = ie.from(i), t.url = fn(
|
|
1309
|
+
yn(d, p, c, t),
|
|
1310
1310
|
n("params"),
|
|
1311
1311
|
n("paramsSerializer")
|
|
1312
1312
|
), u) {
|
|
1313
|
-
const
|
|
1313
|
+
const w = l.getSafeProp(u, "username") || "", P = l.getSafeProp(u, "password") || "";
|
|
1314
1314
|
try {
|
|
1315
1315
|
i.set(
|
|
1316
1316
|
"Authorization",
|
|
1317
|
-
"Basic " + btoa(
|
|
1317
|
+
"Basic " + btoa(w + ":" + (P ? br(P) : ""))
|
|
1318
1318
|
);
|
|
1319
|
-
} catch (
|
|
1320
|
-
throw
|
|
1319
|
+
} catch (b) {
|
|
1320
|
+
throw B.from(b, B.ERR_BAD_OPTION_VALUE, e);
|
|
1321
1321
|
}
|
|
1322
1322
|
}
|
|
1323
|
-
if (l.isFormData(a) && (
|
|
1324
|
-
const
|
|
1325
|
-
|
|
1323
|
+
if (l.isFormData(a) && (Y.hasStandardBrowserEnv || Y.hasStandardBrowserWebWorkerEnv || l.isReactNative(a) ? i.setContentType(void 0) : l.isFunction(a.getHeaders) && hr(i, a.getHeaders(), n("formDataHeaderPolicy"))), Y.hasStandardBrowserEnv && (l.isFunction(r) && (r = r(t)), r === !0 || r == null && ir(t.url))) {
|
|
1324
|
+
const w = o && s && lr.read(s);
|
|
1325
|
+
w && i.set(o, w);
|
|
1326
1326
|
}
|
|
1327
1327
|
return t;
|
|
1328
1328
|
}
|
|
1329
|
-
const
|
|
1329
|
+
const yr = typeof XMLHttpRequest < "u", vr = yr && function(e) {
|
|
1330
1330
|
return new Promise(function(t, n) {
|
|
1331
|
-
const a =
|
|
1331
|
+
const a = vn(e);
|
|
1332
1332
|
let r = a.data;
|
|
1333
|
-
const o =
|
|
1334
|
-
let { responseType: s, onUploadProgress: i, onDownloadProgress: u } = a,
|
|
1335
|
-
function
|
|
1336
|
-
|
|
1333
|
+
const o = ie.from(a.headers).normalize();
|
|
1334
|
+
let { responseType: s, onUploadProgress: i, onDownloadProgress: u } = a, d, c, p, w, P;
|
|
1335
|
+
function b() {
|
|
1336
|
+
w && w(), P && P(), a.cancelToken && a.cancelToken.unsubscribe(d), a.signal && a.signal.removeEventListener("abort", d);
|
|
1337
1337
|
}
|
|
1338
1338
|
let v = new XMLHttpRequest();
|
|
1339
1339
|
v.open(a.method.toUpperCase(), a.url, !0), v.timeout = a.timeout;
|
|
1340
|
-
function
|
|
1340
|
+
function U() {
|
|
1341
1341
|
if (!v)
|
|
1342
1342
|
return;
|
|
1343
|
-
const
|
|
1343
|
+
const g = ie.from(
|
|
1344
1344
|
"getAllResponseHeaders" in v && v.getAllResponseHeaders()
|
|
1345
|
-
),
|
|
1345
|
+
), m = {
|
|
1346
1346
|
data: !s || s === "text" || s === "json" ? v.responseText : v.response,
|
|
1347
1347
|
status: v.status,
|
|
1348
1348
|
statusText: v.statusText,
|
|
1349
|
-
headers:
|
|
1349
|
+
headers: g,
|
|
1350
1350
|
config: e,
|
|
1351
1351
|
request: v
|
|
1352
1352
|
};
|
|
1353
|
-
|
|
1354
|
-
function(
|
|
1355
|
-
t(
|
|
1353
|
+
bn(
|
|
1354
|
+
function(S) {
|
|
1355
|
+
t(S), b();
|
|
1356
1356
|
},
|
|
1357
|
-
function(
|
|
1358
|
-
n(
|
|
1357
|
+
function(S) {
|
|
1358
|
+
n(S), b();
|
|
1359
1359
|
},
|
|
1360
|
-
|
|
1360
|
+
m
|
|
1361
1361
|
), v = null;
|
|
1362
1362
|
}
|
|
1363
|
-
"onloadend" in v ? v.onloadend =
|
|
1364
|
-
!v || v.readyState !== 4 || v.status === 0 && !(v.responseURL && v.responseURL.startsWith("file:")) || setTimeout(
|
|
1363
|
+
"onloadend" in v ? v.onloadend = U : v.onreadystatechange = function() {
|
|
1364
|
+
!v || v.readyState !== 4 || v.status === 0 && !(v.responseURL && v.responseURL.startsWith("file:")) || setTimeout(U);
|
|
1365
1365
|
}, v.onabort = function() {
|
|
1366
|
-
v && (n(new
|
|
1367
|
-
}, v.onerror = function(
|
|
1368
|
-
const
|
|
1369
|
-
|
|
1366
|
+
v && (n(new B("Request aborted", B.ECONNABORTED, e, v)), b(), v = null);
|
|
1367
|
+
}, v.onerror = function(g) {
|
|
1368
|
+
const m = g && g.message ? g.message : "Network Error", S = new B(m, B.ERR_NETWORK, e, v);
|
|
1369
|
+
S.event = g || null, n(S), b(), v = null;
|
|
1370
1370
|
}, v.ontimeout = function() {
|
|
1371
|
-
let
|
|
1372
|
-
const
|
|
1373
|
-
a.timeoutErrorMessage && (
|
|
1374
|
-
new
|
|
1375
|
-
|
|
1376
|
-
|
|
1371
|
+
let g = a.timeout ? "timeout of " + a.timeout + "ms exceeded" : "timeout exceeded";
|
|
1372
|
+
const m = a.transitional || xt;
|
|
1373
|
+
a.timeoutErrorMessage && (g = a.timeoutErrorMessage), n(
|
|
1374
|
+
new B(
|
|
1375
|
+
g,
|
|
1376
|
+
m.clarifyTimeoutError ? B.ETIMEDOUT : B.ECONNABORTED,
|
|
1377
1377
|
e,
|
|
1378
1378
|
v
|
|
1379
1379
|
)
|
|
1380
|
-
),
|
|
1381
|
-
}, r === void 0 && o.setContentType(null), "setRequestHeader" in v && l.forEach(
|
|
1382
|
-
v.setRequestHeader(
|
|
1383
|
-
}), l.isUndefined(a.withCredentials) || (v.withCredentials = !!a.withCredentials), s && s !== "json" && (v.responseType = a.responseType), u && ([
|
|
1384
|
-
v && (n(!
|
|
1385
|
-
}, a.cancelToken && a.cancelToken.subscribe(
|
|
1386
|
-
const
|
|
1387
|
-
if (
|
|
1380
|
+
), b(), v = null;
|
|
1381
|
+
}, r === void 0 && o.setContentType(null), "setRequestHeader" in v && l.forEach(un(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, P] = Xe(u, !0), v.addEventListener("progress", p)), i && v.upload && ([c, w] = Xe(i), v.upload.addEventListener("progress", c), v.upload.addEventListener("loadend", w)), (a.cancelToken || a.signal) && (d = (g) => {
|
|
1384
|
+
v && (n(!g || g.type ? new je(null, e, v) : g), v.abort(), b(), v = null);
|
|
1385
|
+
}, a.cancelToken && a.cancelToken.subscribe(d), a.signal && (a.signal.aborted ? d() : a.signal.addEventListener("abort", d)));
|
|
1386
|
+
const f = rr(a.url);
|
|
1387
|
+
if (f && !Y.protocols.includes(f)) {
|
|
1388
1388
|
n(
|
|
1389
|
-
new
|
|
1390
|
-
"Unsupported protocol " +
|
|
1391
|
-
|
|
1389
|
+
new B(
|
|
1390
|
+
"Unsupported protocol " + f + ":",
|
|
1391
|
+
B.ERR_BAD_REQUEST,
|
|
1392
1392
|
e
|
|
1393
1393
|
)
|
|
1394
|
-
),
|
|
1394
|
+
), b();
|
|
1395
1395
|
return;
|
|
1396
1396
|
}
|
|
1397
1397
|
v.send(r || null);
|
|
1398
1398
|
});
|
|
1399
|
-
},
|
|
1399
|
+
}, wr = (e, t) => {
|
|
1400
1400
|
if (e = e ? e.filter(Boolean) : [], !t && !e.length)
|
|
1401
1401
|
return;
|
|
1402
1402
|
const n = new AbortController();
|
|
@@ -1404,14 +1404,14 @@ const pr = typeof XMLHttpRequest < "u", fr = pr && function(e) {
|
|
|
1404
1404
|
const r = function(u) {
|
|
1405
1405
|
if (!a) {
|
|
1406
1406
|
a = !0, s();
|
|
1407
|
-
const
|
|
1407
|
+
const d = u instanceof Error ? u : this.reason;
|
|
1408
1408
|
n.abort(
|
|
1409
|
-
|
|
1409
|
+
d instanceof B ? d : new je(d instanceof Error ? d.message : d)
|
|
1410
1410
|
);
|
|
1411
1411
|
}
|
|
1412
1412
|
};
|
|
1413
1413
|
let o = t && setTimeout(() => {
|
|
1414
|
-
o = null, r(new
|
|
1414
|
+
o = null, r(new B(`timeout of ${t}ms exceeded`, B.ETIMEDOUT));
|
|
1415
1415
|
}, t);
|
|
1416
1416
|
const s = () => {
|
|
1417
1417
|
e && (o && clearTimeout(o), o = null, e.forEach((u) => {
|
|
@@ -1421,7 +1421,7 @@ const pr = typeof XMLHttpRequest < "u", fr = pr && function(e) {
|
|
|
1421
1421
|
e.forEach((u) => u.addEventListener("abort", r, { once: !0 }));
|
|
1422
1422
|
const { signal: i } = n;
|
|
1423
1423
|
return i.unsubscribe = () => l.asap(s), i;
|
|
1424
|
-
},
|
|
1424
|
+
}, xr = wr, kr = function* (e, t) {
|
|
1425
1425
|
let n = e.byteLength;
|
|
1426
1426
|
if (!t || n < t) {
|
|
1427
1427
|
yield e;
|
|
@@ -1430,10 +1430,10 @@ const pr = typeof XMLHttpRequest < "u", fr = pr && function(e) {
|
|
|
1430
1430
|
let a = 0, r;
|
|
1431
1431
|
for (; a < n; )
|
|
1432
1432
|
r = a + t, yield e.slice(a, r), a = r;
|
|
1433
|
-
},
|
|
1434
|
-
for await (const n of
|
|
1435
|
-
yield*
|
|
1436
|
-
},
|
|
1433
|
+
}, Pr = async function* (e, t) {
|
|
1434
|
+
for await (const n of Er(e))
|
|
1435
|
+
yield* kr(n, t);
|
|
1436
|
+
}, Er = async function* (e) {
|
|
1437
1437
|
if (e[Symbol.asyncIterator]) {
|
|
1438
1438
|
yield* e;
|
|
1439
1439
|
return;
|
|
@@ -1449,8 +1449,8 @@ const pr = typeof XMLHttpRequest < "u", fr = pr && function(e) {
|
|
|
1449
1449
|
} finally {
|
|
1450
1450
|
await t.cancel();
|
|
1451
1451
|
}
|
|
1452
|
-
},
|
|
1453
|
-
const r =
|
|
1452
|
+
}, zt = (e, t, n, a) => {
|
|
1453
|
+
const r = Pr(e, t);
|
|
1454
1454
|
let o = 0, s, i = (u) => {
|
|
1455
1455
|
s || (s = !0, a && a(u));
|
|
1456
1456
|
};
|
|
@@ -1458,19 +1458,19 @@ const pr = typeof XMLHttpRequest < "u", fr = pr && function(e) {
|
|
|
1458
1458
|
{
|
|
1459
1459
|
async pull(u) {
|
|
1460
1460
|
try {
|
|
1461
|
-
const { done:
|
|
1462
|
-
if (
|
|
1461
|
+
const { done: d, value: c } = await r.next();
|
|
1462
|
+
if (d) {
|
|
1463
1463
|
i(), u.close();
|
|
1464
1464
|
return;
|
|
1465
1465
|
}
|
|
1466
|
-
let
|
|
1466
|
+
let p = c.byteLength;
|
|
1467
1467
|
if (n) {
|
|
1468
|
-
let
|
|
1469
|
-
n(
|
|
1468
|
+
let w = o += p;
|
|
1469
|
+
n(w);
|
|
1470
1470
|
}
|
|
1471
1471
|
u.enqueue(new Uint8Array(c));
|
|
1472
|
-
} catch (
|
|
1473
|
-
throw i(
|
|
1472
|
+
} catch (d) {
|
|
1473
|
+
throw i(d), d;
|
|
1474
1474
|
}
|
|
1475
1475
|
},
|
|
1476
1476
|
cancel(u) {
|
|
@@ -1481,8 +1481,8 @@ const pr = typeof XMLHttpRequest < "u", fr = pr && function(e) {
|
|
|
1481
1481
|
highWaterMark: 2
|
|
1482
1482
|
}
|
|
1483
1483
|
);
|
|
1484
|
-
},
|
|
1485
|
-
function
|
|
1484
|
+
}, Qe = (e) => e >= 48 && e <= 57 || e >= 65 && e <= 70 || e >= 97 && e <= 102, Sr = (e, t, n) => t + 2 < n && Qe(e.charCodeAt(t + 1)) && Qe(e.charCodeAt(t + 2));
|
|
1485
|
+
function Rr(e) {
|
|
1486
1486
|
if (!e || typeof e != "string" || !e.startsWith("data:"))
|
|
1487
1487
|
return 0;
|
|
1488
1488
|
const t = e.indexOf(",");
|
|
@@ -1492,23 +1492,23 @@ function wr(e) {
|
|
|
1492
1492
|
if (/;base64/i.test(n)) {
|
|
1493
1493
|
let o = a.length;
|
|
1494
1494
|
const s = a.length;
|
|
1495
|
-
for (let
|
|
1496
|
-
if (a.charCodeAt(
|
|
1497
|
-
const
|
|
1498
|
-
|
|
1495
|
+
for (let p = 0; p < s; p++)
|
|
1496
|
+
if (a.charCodeAt(p) === 37 && p + 2 < s) {
|
|
1497
|
+
const w = a.charCodeAt(p + 1), P = a.charCodeAt(p + 2);
|
|
1498
|
+
Qe(w) && Qe(P) && (o -= 2, p += 2);
|
|
1499
1499
|
}
|
|
1500
1500
|
let i = 0, u = s - 1;
|
|
1501
|
-
const
|
|
1502
|
-
a.charCodeAt(
|
|
1503
|
-
(a.charCodeAt(
|
|
1504
|
-
u >= 0 && (a.charCodeAt(u) === 61 ? (i++, u--) :
|
|
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
1505
|
const c = Math.floor(o / 4) * 3 - (i || 0);
|
|
1506
1506
|
return c > 0 ? c : 0;
|
|
1507
1507
|
}
|
|
1508
1508
|
let r = 0;
|
|
1509
1509
|
for (let o = 0, s = a.length; o < s; o++) {
|
|
1510
1510
|
const i = a.charCodeAt(o);
|
|
1511
|
-
if (i === 37 &&
|
|
1511
|
+
if (i === 37 && Sr(a, o, s))
|
|
1512
1512
|
r += 1, o += 2;
|
|
1513
1513
|
else if (i < 128)
|
|
1514
1514
|
r += 1;
|
|
@@ -1522,10 +1522,10 @@ function wr(e) {
|
|
|
1522
1522
|
}
|
|
1523
1523
|
return r;
|
|
1524
1524
|
}
|
|
1525
|
-
const
|
|
1525
|
+
const St = "1.18.1", Vt = 64 * 1024, { isFunction: $e } = l, Tr = (e) => encodeURIComponent(e).replace(
|
|
1526
1526
|
/%([0-9A-F]{2})/gi,
|
|
1527
1527
|
(t, n) => String.fromCharCode(parseInt(n, 16))
|
|
1528
|
-
),
|
|
1528
|
+
), qt = (e) => {
|
|
1529
1529
|
if (!l.isString(e))
|
|
1530
1530
|
return e;
|
|
1531
1531
|
try {
|
|
@@ -1533,17 +1533,17 @@ const Rt = "1.18.1", zt = 64 * 1024, { isFunction: $e } = l, xr = (e) => encodeU
|
|
|
1533
1533
|
} catch {
|
|
1534
1534
|
return e;
|
|
1535
1535
|
}
|
|
1536
|
-
},
|
|
1536
|
+
}, $t = (e, ...t) => {
|
|
1537
1537
|
try {
|
|
1538
1538
|
return !!e(...t);
|
|
1539
1539
|
} catch {
|
|
1540
1540
|
return !1;
|
|
1541
1541
|
}
|
|
1542
|
-
},
|
|
1542
|
+
}, Or = (e) => {
|
|
1543
1543
|
const t = e.indexOf("://");
|
|
1544
1544
|
let n = e;
|
|
1545
1545
|
return t !== -1 && (n = n.slice(t + 3)), n.includes("@") || n.includes(":");
|
|
1546
|
-
},
|
|
1546
|
+
}, Br = (e) => {
|
|
1547
1547
|
const t = l.global !== void 0 && l.global !== null ? l.global : globalThis, { ReadableStream: n, TextEncoder: a } = t;
|
|
1548
1548
|
e = l.merge.call(
|
|
1549
1549
|
{
|
|
@@ -1555,286 +1555,286 @@ const Rt = "1.18.1", zt = 64 * 1024, { isFunction: $e } = l, xr = (e) => encodeU
|
|
|
1555
1555
|
},
|
|
1556
1556
|
e
|
|
1557
1557
|
);
|
|
1558
|
-
const { fetch: r, Request: o, Response: s } = e, i = r ? $e(r) : typeof fetch == "function", u = $e(o),
|
|
1558
|
+
const { fetch: r, Request: o, Response: s } = e, i = r ? $e(r) : typeof fetch == "function", u = $e(o), d = $e(s);
|
|
1559
1559
|
if (!i)
|
|
1560
1560
|
return !1;
|
|
1561
|
-
const c = i && $e(n),
|
|
1562
|
-
let
|
|
1563
|
-
const
|
|
1561
|
+
const c = i && $e(n), p = i && (typeof a == "function" ? ((f) => (g) => f.encode(g))(new a()) : async (f) => new Uint8Array(await new o(f).arrayBuffer())), w = u && c && $t(() => {
|
|
1562
|
+
let f = !1;
|
|
1563
|
+
const g = new o(Y.origin, {
|
|
1564
1564
|
body: new n(),
|
|
1565
1565
|
method: "POST",
|
|
1566
1566
|
get duplex() {
|
|
1567
|
-
return
|
|
1567
|
+
return f = !0, "half";
|
|
1568
1568
|
}
|
|
1569
|
-
}),
|
|
1570
|
-
return
|
|
1571
|
-
}),
|
|
1572
|
-
stream:
|
|
1569
|
+
}), m = g.headers.has("Content-Type");
|
|
1570
|
+
return g.body != null && g.body.cancel(), f && !m;
|
|
1571
|
+
}), P = d && c && $t(() => l.isReadableStream(new s("").body)), b = {
|
|
1572
|
+
stream: P && ((f) => f.body)
|
|
1573
1573
|
};
|
|
1574
|
-
i && ["text", "arrayBuffer", "blob", "formData", "stream"].forEach((
|
|
1575
|
-
!
|
|
1576
|
-
let
|
|
1577
|
-
if (
|
|
1578
|
-
return
|
|
1579
|
-
throw new
|
|
1580
|
-
`Response type '${
|
|
1581
|
-
|
|
1582
|
-
|
|
1574
|
+
i && ["text", "arrayBuffer", "blob", "formData", "stream"].forEach((f) => {
|
|
1575
|
+
!b[f] && (b[f] = (g, m) => {
|
|
1576
|
+
let S = g && g[f];
|
|
1577
|
+
if (S)
|
|
1578
|
+
return S.call(g);
|
|
1579
|
+
throw new B(
|
|
1580
|
+
`Response type '${f}' is not supported`,
|
|
1581
|
+
B.ERR_NOT_SUPPORT,
|
|
1582
|
+
m
|
|
1583
1583
|
);
|
|
1584
1584
|
});
|
|
1585
1585
|
});
|
|
1586
|
-
const v = async (
|
|
1587
|
-
if (
|
|
1586
|
+
const v = async (f) => {
|
|
1587
|
+
if (f == null)
|
|
1588
1588
|
return 0;
|
|
1589
|
-
if (l.isBlob(
|
|
1590
|
-
return
|
|
1591
|
-
if (l.isSpecCompliantForm(
|
|
1592
|
-
return (await new o(
|
|
1589
|
+
if (l.isBlob(f))
|
|
1590
|
+
return f.size;
|
|
1591
|
+
if (l.isSpecCompliantForm(f))
|
|
1592
|
+
return (await new o(Y.origin, {
|
|
1593
1593
|
method: "POST",
|
|
1594
|
-
body:
|
|
1594
|
+
body: f
|
|
1595
1595
|
}).arrayBuffer()).byteLength;
|
|
1596
|
-
if (l.isArrayBufferView(
|
|
1597
|
-
return
|
|
1598
|
-
if (l.isURLSearchParams(
|
|
1599
|
-
return (await
|
|
1600
|
-
},
|
|
1601
|
-
return async (
|
|
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
|
+
}, U = async (f, g) => l.toFiniteNumber(f.getContentLength()) ?? v(g);
|
|
1601
|
+
return async (f) => {
|
|
1602
1602
|
let {
|
|
1603
|
-
url:
|
|
1604
|
-
method:
|
|
1605
|
-
data:
|
|
1606
|
-
signal:
|
|
1603
|
+
url: g,
|
|
1604
|
+
method: m,
|
|
1605
|
+
data: S,
|
|
1606
|
+
signal: x,
|
|
1607
1607
|
cancelToken: y,
|
|
1608
|
-
timeout:
|
|
1609
|
-
onDownloadProgress:
|
|
1610
|
-
onUploadProgress:
|
|
1611
|
-
responseType:
|
|
1612
|
-
headers:
|
|
1613
|
-
withCredentials:
|
|
1614
|
-
fetchOptions:
|
|
1615
|
-
maxContentLength:
|
|
1616
|
-
maxBodyLength:
|
|
1617
|
-
} =
|
|
1618
|
-
const
|
|
1619
|
-
let
|
|
1620
|
-
|
|
1621
|
-
let
|
|
1622
|
-
[
|
|
1623
|
-
|
|
1608
|
+
timeout: G,
|
|
1609
|
+
onDownloadProgress: K,
|
|
1610
|
+
onUploadProgress: ne,
|
|
1611
|
+
responseType: X,
|
|
1612
|
+
headers: M,
|
|
1613
|
+
withCredentials: W = "same-origin",
|
|
1614
|
+
fetchOptions: C,
|
|
1615
|
+
maxContentLength: R,
|
|
1616
|
+
maxBodyLength: ae
|
|
1617
|
+
} = vn(f);
|
|
1618
|
+
const H = l.isNumber(R) && R > -1, ue = l.isNumber(ae) && ae > -1, j = (I) => l.hasOwnProp(f, I) ? f[I] : void 0;
|
|
1619
|
+
let Pe = r || fetch;
|
|
1620
|
+
X = X ? (X + "").toLowerCase() : "text";
|
|
1621
|
+
let le = xr(
|
|
1622
|
+
[x, y && y.toAbortSignal()],
|
|
1623
|
+
G
|
|
1624
1624
|
), O = null;
|
|
1625
|
-
const
|
|
1626
|
-
|
|
1625
|
+
const A = le && le.unsubscribe && (() => {
|
|
1626
|
+
le.unsubscribe();
|
|
1627
1627
|
});
|
|
1628
|
-
let
|
|
1629
|
-
const ze = () => new
|
|
1628
|
+
let z, be = null;
|
|
1629
|
+
const ze = () => new B(
|
|
1630
1630
|
"Request body larger than maxBodyLength limit",
|
|
1631
|
-
|
|
1632
|
-
|
|
1631
|
+
B.ERR_BAD_REQUEST,
|
|
1632
|
+
f,
|
|
1633
1633
|
O
|
|
1634
1634
|
);
|
|
1635
1635
|
try {
|
|
1636
|
-
let
|
|
1637
|
-
const
|
|
1638
|
-
if (
|
|
1639
|
-
const
|
|
1640
|
-
|
|
1641
|
-
username:
|
|
1642
|
-
password:
|
|
1636
|
+
let I;
|
|
1637
|
+
const L = j("auth");
|
|
1638
|
+
if (L) {
|
|
1639
|
+
const D = l.getSafeProp(L, "username") || "", se = l.getSafeProp(L, "password") || "";
|
|
1640
|
+
I = {
|
|
1641
|
+
username: D,
|
|
1642
|
+
password: se
|
|
1643
1643
|
};
|
|
1644
1644
|
}
|
|
1645
|
-
if (
|
|
1646
|
-
const
|
|
1647
|
-
if (!
|
|
1648
|
-
const
|
|
1649
|
-
|
|
1650
|
-
username:
|
|
1651
|
-
password:
|
|
1645
|
+
if (Or(g)) {
|
|
1646
|
+
const D = new URL(g, Y.origin);
|
|
1647
|
+
if (!I && (D.username || D.password)) {
|
|
1648
|
+
const se = qt(D.username), ke = qt(D.password);
|
|
1649
|
+
I = {
|
|
1650
|
+
username: se,
|
|
1651
|
+
password: ke
|
|
1652
1652
|
};
|
|
1653
1653
|
}
|
|
1654
|
-
(
|
|
1654
|
+
(D.username || D.password) && (D.username = "", D.password = "", g = D.href);
|
|
1655
1655
|
}
|
|
1656
|
-
if (
|
|
1656
|
+
if (I && (M.delete("authorization"), M.set(
|
|
1657
1657
|
"Authorization",
|
|
1658
|
-
"Basic " + btoa(
|
|
1659
|
-
)),
|
|
1660
|
-
throw new
|
|
1661
|
-
"maxContentLength size of " +
|
|
1662
|
-
|
|
1663
|
-
|
|
1658
|
+
"Basic " + btoa(Tr((I.username || "") + ":" + (I.password || "")))
|
|
1659
|
+
)), H && typeof g == "string" && g.startsWith("data:") && Rr(g) > R)
|
|
1660
|
+
throw new B(
|
|
1661
|
+
"maxContentLength size of " + R + " exceeded",
|
|
1662
|
+
B.ERR_BAD_RESPONSE,
|
|
1663
|
+
f,
|
|
1664
1664
|
O
|
|
1665
1665
|
);
|
|
1666
|
-
if (
|
|
1667
|
-
const
|
|
1668
|
-
if (typeof
|
|
1666
|
+
if (ue && m !== "get" && m !== "head") {
|
|
1667
|
+
const D = await v(S);
|
|
1668
|
+
if (typeof D == "number" && isFinite(D) && (z = D, D > ae))
|
|
1669
1669
|
throw ze();
|
|
1670
1670
|
}
|
|
1671
|
-
const
|
|
1672
|
-
|
|
1673
|
-
|
|
1674
|
-
(
|
|
1675
|
-
if (
|
|
1676
|
-
throw
|
|
1677
|
-
|
|
1671
|
+
const Ee = ue && (l.isReadableStream(S) || l.isStream(S)), Ve = (D, se, ke) => zt(
|
|
1672
|
+
D,
|
|
1673
|
+
Vt,
|
|
1674
|
+
(Se) => {
|
|
1675
|
+
if (ue && Se > ae)
|
|
1676
|
+
throw be = ze();
|
|
1677
|
+
se && se(Se);
|
|
1678
1678
|
},
|
|
1679
|
-
|
|
1679
|
+
ke
|
|
1680
1680
|
);
|
|
1681
|
-
if (
|
|
1682
|
-
if (
|
|
1683
|
-
let
|
|
1681
|
+
if (w && m !== "get" && m !== "head" && (ne || Ee)) {
|
|
1682
|
+
if (z = z ?? await U(M, S), z !== 0 || Ee) {
|
|
1683
|
+
let D = new o(g, {
|
|
1684
1684
|
method: "POST",
|
|
1685
|
-
body:
|
|
1685
|
+
body: S,
|
|
1686
1686
|
duplex: "half"
|
|
1687
|
-
}),
|
|
1688
|
-
if (l.isFormData(
|
|
1689
|
-
const [
|
|
1690
|
-
|
|
1691
|
-
Xe(
|
|
1687
|
+
}), se;
|
|
1688
|
+
if (l.isFormData(S) && (se = D.headers.get("content-type")) && M.setContentType(se), D.body) {
|
|
1689
|
+
const [ke, Se] = ne && It(
|
|
1690
|
+
z,
|
|
1691
|
+
Xe(Lt(ne))
|
|
1692
1692
|
) || [];
|
|
1693
|
-
|
|
1693
|
+
S = Ve(D.body, ke, Se);
|
|
1694
1694
|
}
|
|
1695
1695
|
}
|
|
1696
|
-
} else if (
|
|
1697
|
-
|
|
1698
|
-
else if (
|
|
1699
|
-
throw new
|
|
1696
|
+
} else if (Ee && !u && c && m !== "get" && m !== "head")
|
|
1697
|
+
S = Ve(S);
|
|
1698
|
+
else if (Ee && u && !w && m !== "get" && m !== "head")
|
|
1699
|
+
throw new B(
|
|
1700
1700
|
"Stream request bodies are not supported by the current fetch implementation",
|
|
1701
|
-
|
|
1702
|
-
|
|
1701
|
+
B.ERR_NOT_SUPPORT,
|
|
1702
|
+
f,
|
|
1703
1703
|
O
|
|
1704
1704
|
);
|
|
1705
|
-
l.isString(
|
|
1705
|
+
l.isString(W) || (W = W ? "include" : "omit");
|
|
1706
1706
|
const qe = u && "credentials" in o.prototype;
|
|
1707
|
-
if (l.isFormData(
|
|
1708
|
-
const
|
|
1709
|
-
|
|
1707
|
+
if (l.isFormData(S)) {
|
|
1708
|
+
const D = M.getContentType();
|
|
1709
|
+
D && /^multipart\/form-data/i.test(D) && !/boundary=/i.test(D) && M.delete("content-type");
|
|
1710
1710
|
}
|
|
1711
|
-
|
|
1711
|
+
M.set("User-Agent", "axios/" + St, !1);
|
|
1712
1712
|
const Ot = {
|
|
1713
|
-
...
|
|
1714
|
-
signal:
|
|
1715
|
-
method:
|
|
1716
|
-
headers:
|
|
1717
|
-
body:
|
|
1713
|
+
...C,
|
|
1714
|
+
signal: le,
|
|
1715
|
+
method: m.toUpperCase(),
|
|
1716
|
+
headers: un(M.normalize()),
|
|
1717
|
+
body: S,
|
|
1718
1718
|
duplex: "half",
|
|
1719
|
-
credentials: qe ?
|
|
1719
|
+
credentials: qe ? W : void 0
|
|
1720
1720
|
};
|
|
1721
|
-
O = u && new o(
|
|
1722
|
-
let
|
|
1723
|
-
const
|
|
1724
|
-
if (
|
|
1725
|
-
const
|
|
1726
|
-
if (
|
|
1727
|
-
throw new
|
|
1728
|
-
"maxContentLength size of " +
|
|
1729
|
-
|
|
1730
|
-
|
|
1721
|
+
O = u && new o(g, Ot);
|
|
1722
|
+
let ye = await (u ? Pe(O, C) : Pe(g, Ot));
|
|
1723
|
+
const Bt = ie.from(ye.headers);
|
|
1724
|
+
if (H) {
|
|
1725
|
+
const D = l.toFiniteNumber(Bt.getContentLength());
|
|
1726
|
+
if (D != null && D > R)
|
|
1727
|
+
throw new B(
|
|
1728
|
+
"maxContentLength size of " + R + " exceeded",
|
|
1729
|
+
B.ERR_BAD_RESPONSE,
|
|
1730
|
+
f,
|
|
1731
1731
|
O
|
|
1732
1732
|
);
|
|
1733
1733
|
}
|
|
1734
|
-
const ot =
|
|
1735
|
-
if (
|
|
1736
|
-
const
|
|
1737
|
-
["status", "statusText", "headers"].forEach((
|
|
1738
|
-
|
|
1734
|
+
const ot = P && (X === "stream" || X === "response");
|
|
1735
|
+
if (P && ye.body && (K || H || ot && A)) {
|
|
1736
|
+
const D = {};
|
|
1737
|
+
["status", "statusText", "headers"].forEach((Fe) => {
|
|
1738
|
+
D[Fe] = ye[Fe];
|
|
1739
1739
|
});
|
|
1740
|
-
const
|
|
1741
|
-
|
|
1742
|
-
Xe(
|
|
1740
|
+
const se = l.toFiniteNumber(Bt.getContentLength()), [ke, Se] = K && It(
|
|
1741
|
+
se,
|
|
1742
|
+
Xe(Lt(K), !0)
|
|
1743
1743
|
) || [];
|
|
1744
|
-
let
|
|
1745
|
-
const
|
|
1746
|
-
if (
|
|
1747
|
-
throw new
|
|
1748
|
-
"maxContentLength size of " +
|
|
1749
|
-
|
|
1750
|
-
|
|
1744
|
+
let _t = 0;
|
|
1745
|
+
const _n = (Fe) => {
|
|
1746
|
+
if (H && (_t = Fe, _t > R))
|
|
1747
|
+
throw new B(
|
|
1748
|
+
"maxContentLength size of " + R + " exceeded",
|
|
1749
|
+
B.ERR_BAD_RESPONSE,
|
|
1750
|
+
f,
|
|
1751
1751
|
O
|
|
1752
1752
|
);
|
|
1753
|
-
|
|
1753
|
+
ke && ke(Fe);
|
|
1754
1754
|
};
|
|
1755
|
-
|
|
1756
|
-
|
|
1757
|
-
|
|
1755
|
+
ye = new s(
|
|
1756
|
+
zt(ye.body, Vt, _n, () => {
|
|
1757
|
+
Se && Se(), A && A();
|
|
1758
1758
|
}),
|
|
1759
|
-
|
|
1759
|
+
D
|
|
1760
1760
|
);
|
|
1761
1761
|
}
|
|
1762
|
-
|
|
1763
|
-
let
|
|
1764
|
-
|
|
1765
|
-
|
|
1762
|
+
X = X || "text";
|
|
1763
|
+
let ve = await b[l.findKey(b, X) || "text"](
|
|
1764
|
+
ye,
|
|
1765
|
+
f
|
|
1766
1766
|
);
|
|
1767
|
-
if (
|
|
1768
|
-
let
|
|
1769
|
-
if (
|
|
1770
|
-
throw new
|
|
1771
|
-
"maxContentLength size of " +
|
|
1772
|
-
|
|
1773
|
-
|
|
1767
|
+
if (H && !P && !ot) {
|
|
1768
|
+
let D;
|
|
1769
|
+
if (ve != null && (typeof ve.byteLength == "number" ? D = ve.byteLength : typeof ve.size == "number" ? D = ve.size : typeof ve == "string" && (D = typeof a == "function" ? new a().encode(ve).byteLength : ve.length)), typeof D == "number" && D > R)
|
|
1770
|
+
throw new B(
|
|
1771
|
+
"maxContentLength size of " + R + " exceeded",
|
|
1772
|
+
B.ERR_BAD_RESPONSE,
|
|
1773
|
+
f,
|
|
1774
1774
|
O
|
|
1775
1775
|
);
|
|
1776
1776
|
}
|
|
1777
|
-
return !ot &&
|
|
1778
|
-
|
|
1779
|
-
data:
|
|
1780
|
-
headers:
|
|
1781
|
-
status:
|
|
1782
|
-
statusText:
|
|
1783
|
-
config:
|
|
1777
|
+
return !ot && A && A(), await new Promise((D, se) => {
|
|
1778
|
+
bn(D, se, {
|
|
1779
|
+
data: ve,
|
|
1780
|
+
headers: ie.from(ye.headers),
|
|
1781
|
+
status: ye.status,
|
|
1782
|
+
statusText: ye.statusText,
|
|
1783
|
+
config: f,
|
|
1784
1784
|
request: O
|
|
1785
1785
|
});
|
|
1786
1786
|
});
|
|
1787
|
-
} catch (
|
|
1788
|
-
if (
|
|
1789
|
-
const
|
|
1790
|
-
throw
|
|
1787
|
+
} catch (I) {
|
|
1788
|
+
if (A && A(), le && le.aborted && le.reason instanceof B) {
|
|
1789
|
+
const L = le.reason;
|
|
1790
|
+
throw L.config = f, O && (L.request = O), I !== L && Object.defineProperty(L, "cause", {
|
|
1791
1791
|
__proto__: null,
|
|
1792
|
-
value:
|
|
1792
|
+
value: I,
|
|
1793
1793
|
writable: !0,
|
|
1794
1794
|
enumerable: !1,
|
|
1795
1795
|
configurable: !0
|
|
1796
|
-
}),
|
|
1796
|
+
}), L;
|
|
1797
1797
|
}
|
|
1798
|
-
if (
|
|
1799
|
-
throw O && !
|
|
1800
|
-
if (
|
|
1801
|
-
throw O && !
|
|
1802
|
-
if (
|
|
1803
|
-
const
|
|
1798
|
+
if (be)
|
|
1799
|
+
throw O && !be.request && (be.request = O), be;
|
|
1800
|
+
if (I instanceof B)
|
|
1801
|
+
throw O && !I.request && (I.request = O), I;
|
|
1802
|
+
if (I && I.name === "TypeError" && /Load failed|fetch/i.test(I.message)) {
|
|
1803
|
+
const L = new B(
|
|
1804
1804
|
"Network Error",
|
|
1805
|
-
|
|
1806
|
-
|
|
1805
|
+
B.ERR_NETWORK,
|
|
1806
|
+
f,
|
|
1807
1807
|
O,
|
|
1808
|
-
|
|
1808
|
+
I && I.response
|
|
1809
1809
|
);
|
|
1810
|
-
throw Object.defineProperty(
|
|
1810
|
+
throw Object.defineProperty(L, "cause", {
|
|
1811
1811
|
__proto__: null,
|
|
1812
|
-
value:
|
|
1812
|
+
value: I.cause || I,
|
|
1813
1813
|
writable: !0,
|
|
1814
1814
|
enumerable: !1,
|
|
1815
1815
|
configurable: !0
|
|
1816
|
-
}),
|
|
1816
|
+
}), L;
|
|
1817
1817
|
}
|
|
1818
|
-
throw
|
|
1818
|
+
throw B.from(I, I && I.code, f, O, I && I.response);
|
|
1819
1819
|
}
|
|
1820
1820
|
};
|
|
1821
|
-
},
|
|
1821
|
+
}, _r = /* @__PURE__ */ new Map(), wn = (e) => {
|
|
1822
1822
|
let t = e && e.env || {};
|
|
1823
1823
|
const { fetch: n, Request: a, Response: r } = t, o = [a, r, n];
|
|
1824
|
-
let s = o.length, i = s, u,
|
|
1824
|
+
let s = o.length, i = s, u, d, c = _r;
|
|
1825
1825
|
for (; i--; )
|
|
1826
|
-
u = o[i],
|
|
1827
|
-
return
|
|
1826
|
+
u = o[i], d = c.get(u), d === void 0 && c.set(u, d = i ? /* @__PURE__ */ new Map() : Br(t)), c = d;
|
|
1827
|
+
return d;
|
|
1828
1828
|
};
|
|
1829
|
-
|
|
1830
|
-
const
|
|
1831
|
-
http:
|
|
1832
|
-
xhr:
|
|
1829
|
+
wn();
|
|
1830
|
+
const Rt = {
|
|
1831
|
+
http: Ma,
|
|
1832
|
+
xhr: vr,
|
|
1833
1833
|
fetch: {
|
|
1834
|
-
get:
|
|
1834
|
+
get: wn
|
|
1835
1835
|
}
|
|
1836
1836
|
};
|
|
1837
|
-
l.forEach(
|
|
1837
|
+
l.forEach(Rt, (e, t) => {
|
|
1838
1838
|
if (e) {
|
|
1839
1839
|
try {
|
|
1840
1840
|
Object.defineProperty(e, "name", { __proto__: null, value: t });
|
|
@@ -1843,8 +1843,8 @@ l.forEach(Et, (e, t) => {
|
|
|
1843
1843
|
Object.defineProperty(e, "adapterName", { __proto__: null, value: t });
|
|
1844
1844
|
}
|
|
1845
1845
|
});
|
|
1846
|
-
const
|
|
1847
|
-
function
|
|
1846
|
+
const Gt = (e) => `- ${e}`, Cr = (e) => l.isFunction(e) || e === null || e === !1;
|
|
1847
|
+
function Ar(e, t) {
|
|
1848
1848
|
e = l.isArray(e) ? e : [e];
|
|
1849
1849
|
const { length: n } = e;
|
|
1850
1850
|
let a, r;
|
|
@@ -1852,44 +1852,44 @@ function Sr(e, t) {
|
|
|
1852
1852
|
for (let s = 0; s < n; s++) {
|
|
1853
1853
|
a = e[s];
|
|
1854
1854
|
let i;
|
|
1855
|
-
if (r = a, !
|
|
1856
|
-
throw new
|
|
1855
|
+
if (r = a, !Cr(a) && (r = Rt[(i = String(a)).toLowerCase()], r === void 0))
|
|
1856
|
+
throw new B(`Unknown adapter '${i}'`);
|
|
1857
1857
|
if (r && (l.isFunction(r) || (r = r.get(t))))
|
|
1858
1858
|
break;
|
|
1859
1859
|
o[i || "#" + s] = r;
|
|
1860
1860
|
}
|
|
1861
1861
|
if (!r) {
|
|
1862
1862
|
const s = Object.entries(o).map(
|
|
1863
|
-
([u,
|
|
1863
|
+
([u, d]) => `adapter ${u} ` + (d === !1 ? "is not supported by the environment" : "is not available in the build")
|
|
1864
1864
|
);
|
|
1865
1865
|
let i = n ? s.length > 1 ? `since :
|
|
1866
|
-
` + s.map(
|
|
1867
|
-
`) : " " +
|
|
1868
|
-
throw new
|
|
1866
|
+
` + s.map(Gt).join(`
|
|
1867
|
+
`) : " " + Gt(s[0]) : "as no adapter specified";
|
|
1868
|
+
throw new B(
|
|
1869
1869
|
"There is no suitable adapter to dispatch the request " + i,
|
|
1870
|
-
|
|
1870
|
+
B.ERR_NOT_SUPPORT
|
|
1871
1871
|
);
|
|
1872
1872
|
}
|
|
1873
1873
|
return r;
|
|
1874
1874
|
}
|
|
1875
|
-
const
|
|
1875
|
+
const xn = {
|
|
1876
1876
|
/**
|
|
1877
1877
|
* Resolve an adapter from a list of adapter names or functions.
|
|
1878
1878
|
* @type {Function}
|
|
1879
1879
|
*/
|
|
1880
|
-
getAdapter:
|
|
1880
|
+
getAdapter: Ar,
|
|
1881
1881
|
/**
|
|
1882
1882
|
* Exposes all known adapters
|
|
1883
1883
|
* @type {Object<string, Function|Object>}
|
|
1884
1884
|
*/
|
|
1885
|
-
adapters:
|
|
1885
|
+
adapters: Rt
|
|
1886
1886
|
};
|
|
1887
1887
|
function ct(e) {
|
|
1888
1888
|
if (e.cancelToken && e.cancelToken.throwIfRequested(), e.signal && e.signal.aborted)
|
|
1889
1889
|
throw new je(null, e);
|
|
1890
1890
|
}
|
|
1891
|
-
function
|
|
1892
|
-
return ct(e), e.headers =
|
|
1891
|
+
function Wt(e) {
|
|
1892
|
+
return ct(e), e.headers = ie.from(e.headers), e.data = ut.call(e, e.transformRequest), ["post", "put", "patch"].indexOf(e.method) !== -1 && e.headers.setContentType("application/x-www-form-urlencoded", !1), xn.getAdapter(e.adapter || Et.adapter, e)(e).then(
|
|
1893
1893
|
function(t) {
|
|
1894
1894
|
ct(e), e.response = t;
|
|
1895
1895
|
try {
|
|
@@ -1897,10 +1897,10 @@ function Gt(e) {
|
|
|
1897
1897
|
} finally {
|
|
1898
1898
|
delete e.response;
|
|
1899
1899
|
}
|
|
1900
|
-
return t.headers =
|
|
1900
|
+
return t.headers = ie.from(t.headers), t;
|
|
1901
1901
|
},
|
|
1902
1902
|
function(t) {
|
|
1903
|
-
if (!
|
|
1903
|
+
if (!hn(t) && (ct(e), t && t.response)) {
|
|
1904
1904
|
e.response = t.response;
|
|
1905
1905
|
try {
|
|
1906
1906
|
t.response.data = ut.call(
|
|
@@ -1911,7 +1911,7 @@ function Gt(e) {
|
|
|
1911
1911
|
} finally {
|
|
1912
1912
|
delete e.response;
|
|
1913
1913
|
}
|
|
1914
|
-
t.response.headers =
|
|
1914
|
+
t.response.headers = ie.from(t.response.headers);
|
|
1915
1915
|
}
|
|
1916
1916
|
return Promise.reject(t);
|
|
1917
1917
|
}
|
|
@@ -1926,13 +1926,13 @@ const nt = {};
|
|
|
1926
1926
|
const Ht = {};
|
|
1927
1927
|
nt.transitional = function(e, t, n) {
|
|
1928
1928
|
function a(r, o) {
|
|
1929
|
-
return "[Axios v" +
|
|
1929
|
+
return "[Axios v" + St + "] Transitional option '" + r + "'" + o + (n ? ". " + n : "");
|
|
1930
1930
|
}
|
|
1931
1931
|
return (r, o, s) => {
|
|
1932
1932
|
if (e === !1)
|
|
1933
|
-
throw new
|
|
1933
|
+
throw new B(
|
|
1934
1934
|
a(o, " has been removed" + (t ? " in " + t : "")),
|
|
1935
|
-
|
|
1935
|
+
B.ERR_DEPRECATED
|
|
1936
1936
|
);
|
|
1937
1937
|
return t && !Ht[o] && (Ht[o] = !0, console.warn(
|
|
1938
1938
|
a(
|
|
@@ -1945,9 +1945,9 @@ nt.transitional = function(e, t, n) {
|
|
|
1945
1945
|
nt.spelling = function(e) {
|
|
1946
1946
|
return (t, n) => (console.warn(`${n} is likely a misspelling of ${e}`), !0);
|
|
1947
1947
|
};
|
|
1948
|
-
function
|
|
1948
|
+
function Dr(e, t, n) {
|
|
1949
1949
|
if (typeof e != "object" || e === null)
|
|
1950
|
-
throw new
|
|
1950
|
+
throw new B("options must be an object", B.ERR_BAD_OPTION_VALUE);
|
|
1951
1951
|
const a = Object.keys(e);
|
|
1952
1952
|
let r = a.length;
|
|
1953
1953
|
for (; r-- > 0; ) {
|
|
@@ -1955,25 +1955,25 @@ function Or(e, t, n) {
|
|
|
1955
1955
|
if (s) {
|
|
1956
1956
|
const i = e[o], u = i === void 0 || s(i, o, e);
|
|
1957
1957
|
if (u !== !0)
|
|
1958
|
-
throw new
|
|
1958
|
+
throw new B(
|
|
1959
1959
|
"option " + o + " must be " + u,
|
|
1960
|
-
|
|
1960
|
+
B.ERR_BAD_OPTION_VALUE
|
|
1961
1961
|
);
|
|
1962
1962
|
continue;
|
|
1963
1963
|
}
|
|
1964
1964
|
if (n !== !0)
|
|
1965
|
-
throw new
|
|
1965
|
+
throw new B("Unknown option " + o, B.ERR_BAD_OPTION);
|
|
1966
1966
|
}
|
|
1967
1967
|
}
|
|
1968
|
-
const
|
|
1969
|
-
assertOptions:
|
|
1968
|
+
const He = {
|
|
1969
|
+
assertOptions: Dr,
|
|
1970
1970
|
validators: nt
|
|
1971
|
-
},
|
|
1972
|
-
class
|
|
1971
|
+
}, ee = He.validators;
|
|
1972
|
+
class Ye {
|
|
1973
1973
|
constructor(t) {
|
|
1974
1974
|
this.defaults = t || {}, this.interceptors = {
|
|
1975
|
-
request: new
|
|
1976
|
-
response: new
|
|
1975
|
+
request: new Nt(),
|
|
1976
|
+
response: new Nt()
|
|
1977
1977
|
};
|
|
1978
1978
|
}
|
|
1979
1979
|
/**
|
|
@@ -2015,90 +2015,90 @@ class Qe {
|
|
|
2015
2015
|
}
|
|
2016
2016
|
}
|
|
2017
2017
|
_request(t, n) {
|
|
2018
|
-
typeof t == "string" ? (n = n || {}, n.url = t) : n = t || {}, n =
|
|
2018
|
+
typeof t == "string" ? (n = n || {}, n.url = t) : n = t || {}, n = Oe(this.defaults, n);
|
|
2019
2019
|
const { transitional: a, paramsSerializer: r, headers: o } = n;
|
|
2020
|
-
a !== void 0 &&
|
|
2020
|
+
a !== void 0 && He.assertOptions(
|
|
2021
2021
|
a,
|
|
2022
2022
|
{
|
|
2023
|
-
silentJSONParsing:
|
|
2024
|
-
forcedJSONParsing:
|
|
2025
|
-
clarifyTimeoutError:
|
|
2026
|
-
legacyInterceptorReqResOrdering:
|
|
2027
|
-
advertiseZstdAcceptEncoding:
|
|
2028
|
-
validateStatusUndefinedResolves:
|
|
2023
|
+
silentJSONParsing: ee.transitional(ee.boolean),
|
|
2024
|
+
forcedJSONParsing: ee.transitional(ee.boolean),
|
|
2025
|
+
clarifyTimeoutError: ee.transitional(ee.boolean),
|
|
2026
|
+
legacyInterceptorReqResOrdering: ee.transitional(ee.boolean),
|
|
2027
|
+
advertiseZstdAcceptEncoding: ee.transitional(ee.boolean),
|
|
2028
|
+
validateStatusUndefinedResolves: ee.transitional(ee.boolean)
|
|
2029
2029
|
},
|
|
2030
2030
|
!1
|
|
2031
2031
|
), r != null && (l.isFunction(r) ? n.paramsSerializer = {
|
|
2032
2032
|
serialize: r
|
|
2033
|
-
} :
|
|
2033
|
+
} : He.assertOptions(
|
|
2034
2034
|
r,
|
|
2035
2035
|
{
|
|
2036
|
-
encode:
|
|
2037
|
-
serialize:
|
|
2036
|
+
encode: ee.function,
|
|
2037
|
+
serialize: ee.function
|
|
2038
2038
|
},
|
|
2039
2039
|
!0
|
|
2040
|
-
)), n.allowAbsoluteUrls !== void 0 || (this.defaults.allowAbsoluteUrls !== void 0 ? n.allowAbsoluteUrls = this.defaults.allowAbsoluteUrls : n.allowAbsoluteUrls = !0),
|
|
2040
|
+
)), n.allowAbsoluteUrls !== void 0 || (this.defaults.allowAbsoluteUrls !== void 0 ? n.allowAbsoluteUrls = this.defaults.allowAbsoluteUrls : n.allowAbsoluteUrls = !0), He.assertOptions(
|
|
2041
2041
|
n,
|
|
2042
2042
|
{
|
|
2043
|
-
baseUrl:
|
|
2044
|
-
withXsrfToken:
|
|
2043
|
+
baseUrl: ee.spelling("baseURL"),
|
|
2044
|
+
withXsrfToken: ee.spelling("withXSRFToken")
|
|
2045
2045
|
},
|
|
2046
2046
|
!0
|
|
2047
2047
|
), n.method = (n.method || this.defaults.method || "get").toLowerCase();
|
|
2048
2048
|
let s = o && l.merge(o.common, o[n.method]);
|
|
2049
|
-
o && l.forEach(["delete", "get", "head", "post", "put", "patch", "query", "common"], (
|
|
2050
|
-
delete o[
|
|
2051
|
-
}), n.headers =
|
|
2049
|
+
o && l.forEach(["delete", "get", "head", "post", "put", "patch", "query", "common"], (b) => {
|
|
2050
|
+
delete o[b];
|
|
2051
|
+
}), n.headers = ie.concat(s, o);
|
|
2052
2052
|
const i = [];
|
|
2053
2053
|
let u = !0;
|
|
2054
|
-
this.interceptors.request.forEach(function(
|
|
2055
|
-
if (typeof
|
|
2054
|
+
this.interceptors.request.forEach(function(b) {
|
|
2055
|
+
if (typeof b.runWhen == "function" && b.runWhen(n) === !1)
|
|
2056
2056
|
return;
|
|
2057
|
-
u = u &&
|
|
2058
|
-
const v = n.transitional ||
|
|
2059
|
-
v && v.legacyInterceptorReqResOrdering ? i.unshift(
|
|
2057
|
+
u = u && b.synchronous;
|
|
2058
|
+
const v = n.transitional || xt;
|
|
2059
|
+
v && v.legacyInterceptorReqResOrdering ? i.unshift(b.fulfilled, b.rejected) : i.push(b.fulfilled, b.rejected);
|
|
2060
2060
|
});
|
|
2061
|
-
const
|
|
2062
|
-
this.interceptors.response.forEach(function(
|
|
2063
|
-
|
|
2061
|
+
const d = [];
|
|
2062
|
+
this.interceptors.response.forEach(function(b) {
|
|
2063
|
+
d.push(b.fulfilled, b.rejected);
|
|
2064
2064
|
});
|
|
2065
|
-
let c,
|
|
2065
|
+
let c, p = 0, w;
|
|
2066
2066
|
if (!u) {
|
|
2067
|
-
const
|
|
2068
|
-
for (
|
|
2069
|
-
c = c.then(
|
|
2067
|
+
const b = [Wt.bind(this), void 0];
|
|
2068
|
+
for (b.unshift(...i), b.push(...d), w = b.length, c = Promise.resolve(n); p < w; )
|
|
2069
|
+
c = c.then(b[p++], b[p++]);
|
|
2070
2070
|
return c;
|
|
2071
2071
|
}
|
|
2072
|
-
|
|
2073
|
-
let
|
|
2074
|
-
for (;
|
|
2075
|
-
const
|
|
2072
|
+
w = i.length;
|
|
2073
|
+
let P = n;
|
|
2074
|
+
for (; p < w; ) {
|
|
2075
|
+
const b = i[p++], v = i[p++];
|
|
2076
2076
|
try {
|
|
2077
|
-
|
|
2078
|
-
} catch (
|
|
2079
|
-
v.call(this,
|
|
2077
|
+
P = b(P);
|
|
2078
|
+
} catch (U) {
|
|
2079
|
+
v.call(this, U);
|
|
2080
2080
|
break;
|
|
2081
2081
|
}
|
|
2082
2082
|
}
|
|
2083
2083
|
try {
|
|
2084
|
-
c =
|
|
2085
|
-
} catch (
|
|
2086
|
-
return Promise.reject(
|
|
2084
|
+
c = Wt.call(this, P);
|
|
2085
|
+
} catch (b) {
|
|
2086
|
+
return Promise.reject(b);
|
|
2087
2087
|
}
|
|
2088
|
-
for (
|
|
2089
|
-
c = c.then(
|
|
2088
|
+
for (p = 0, w = d.length; p < w; )
|
|
2089
|
+
c = c.then(d[p++], d[p++]);
|
|
2090
2090
|
return c;
|
|
2091
2091
|
}
|
|
2092
2092
|
getUri(t) {
|
|
2093
|
-
t =
|
|
2094
|
-
const n =
|
|
2095
|
-
return
|
|
2093
|
+
t = Oe(this.defaults, t);
|
|
2094
|
+
const n = yn(t.baseURL, t.url, t.allowAbsoluteUrls, t);
|
|
2095
|
+
return fn(n, t.params, t.paramsSerializer);
|
|
2096
2096
|
}
|
|
2097
2097
|
}
|
|
2098
2098
|
l.forEach(["delete", "get", "head", "options"], function(e) {
|
|
2099
|
-
|
|
2099
|
+
Ye.prototype[e] = function(t, n) {
|
|
2100
2100
|
return this.request(
|
|
2101
|
-
|
|
2101
|
+
Oe(n || {}, {
|
|
2102
2102
|
method: e,
|
|
2103
2103
|
url: t,
|
|
2104
2104
|
data: n && l.hasOwnProp(n, "data") ? n.data : void 0
|
|
@@ -2110,7 +2110,7 @@ l.forEach(["post", "put", "patch", "query"], function(e) {
|
|
|
2110
2110
|
function t(n) {
|
|
2111
2111
|
return function(a, r, o) {
|
|
2112
2112
|
return this.request(
|
|
2113
|
-
|
|
2113
|
+
Oe(o || {}, {
|
|
2114
2114
|
method: e,
|
|
2115
2115
|
headers: n ? {
|
|
2116
2116
|
"Content-Type": "multipart/form-data"
|
|
@@ -2121,10 +2121,10 @@ l.forEach(["post", "put", "patch", "query"], function(e) {
|
|
|
2121
2121
|
);
|
|
2122
2122
|
};
|
|
2123
2123
|
}
|
|
2124
|
-
|
|
2124
|
+
Ye.prototype[e] = t(), e !== "query" && (Ye.prototype[e + "Form"] = t(!0));
|
|
2125
2125
|
});
|
|
2126
|
-
const
|
|
2127
|
-
class
|
|
2126
|
+
const Je = Ye;
|
|
2127
|
+
class Tt {
|
|
2128
2128
|
constructor(t) {
|
|
2129
2129
|
if (typeof t != "function")
|
|
2130
2130
|
throw new TypeError("executor must be a function.");
|
|
@@ -2191,23 +2191,23 @@ class St {
|
|
|
2191
2191
|
static source() {
|
|
2192
2192
|
let t;
|
|
2193
2193
|
return {
|
|
2194
|
-
token: new
|
|
2194
|
+
token: new Tt(function(n) {
|
|
2195
2195
|
t = n;
|
|
2196
2196
|
}),
|
|
2197
2197
|
cancel: t
|
|
2198
2198
|
};
|
|
2199
2199
|
}
|
|
2200
2200
|
}
|
|
2201
|
-
const
|
|
2202
|
-
function
|
|
2201
|
+
const Fr = Tt;
|
|
2202
|
+
function Nr(e) {
|
|
2203
2203
|
return function(t) {
|
|
2204
2204
|
return e.apply(null, t);
|
|
2205
2205
|
};
|
|
2206
2206
|
}
|
|
2207
|
-
function
|
|
2207
|
+
function Ur(e) {
|
|
2208
2208
|
return l.isObject(e) && e.isAxiosError === !0;
|
|
2209
2209
|
}
|
|
2210
|
-
const
|
|
2210
|
+
const gt = {
|
|
2211
2211
|
Continue: 100,
|
|
2212
2212
|
SwitchingProtocols: 101,
|
|
2213
2213
|
Processing: 102,
|
|
@@ -2278,55 +2278,55 @@ const mt = {
|
|
|
2278
2278
|
SslHandshakeFailed: 525,
|
|
2279
2279
|
InvalidSslCertificate: 526
|
|
2280
2280
|
};
|
|
2281
|
-
Object.entries(
|
|
2282
|
-
|
|
2281
|
+
Object.entries(gt).forEach(([e, t]) => {
|
|
2282
|
+
gt[t] = e;
|
|
2283
2283
|
});
|
|
2284
|
-
const
|
|
2285
|
-
function
|
|
2286
|
-
const t = new
|
|
2287
|
-
return l.extend(n,
|
|
2288
|
-
return
|
|
2284
|
+
const Ir = gt;
|
|
2285
|
+
function kn(e) {
|
|
2286
|
+
const t = new Je(e), n = Zt(Je.prototype.request, t);
|
|
2287
|
+
return l.extend(n, Je.prototype, t, { allOwnKeys: !0 }), l.extend(n, t, null, { allOwnKeys: !0 }), n.create = function(a) {
|
|
2288
|
+
return kn(Oe(e, a));
|
|
2289
2289
|
}, n;
|
|
2290
2290
|
}
|
|
2291
|
-
const
|
|
2292
|
-
|
|
2293
|
-
|
|
2294
|
-
|
|
2295
|
-
|
|
2296
|
-
|
|
2297
|
-
|
|
2298
|
-
|
|
2299
|
-
|
|
2300
|
-
|
|
2291
|
+
const $ = kn(Et);
|
|
2292
|
+
$.Axios = Je;
|
|
2293
|
+
$.CanceledError = je;
|
|
2294
|
+
$.CancelToken = Fr;
|
|
2295
|
+
$.isCancel = hn;
|
|
2296
|
+
$.VERSION = St;
|
|
2297
|
+
$.toFormData = tt;
|
|
2298
|
+
$.AxiosError = B;
|
|
2299
|
+
$.Cancel = $.CanceledError;
|
|
2300
|
+
$.all = function(e) {
|
|
2301
2301
|
return Promise.all(e);
|
|
2302
2302
|
};
|
|
2303
|
-
|
|
2304
|
-
|
|
2305
|
-
|
|
2306
|
-
|
|
2307
|
-
|
|
2308
|
-
|
|
2309
|
-
|
|
2310
|
-
|
|
2311
|
-
const
|
|
2312
|
-
function
|
|
2303
|
+
$.spread = Nr;
|
|
2304
|
+
$.isAxiosError = Ur;
|
|
2305
|
+
$.mergeConfig = Oe;
|
|
2306
|
+
$.AxiosHeaders = ie;
|
|
2307
|
+
$.formToJSON = (e) => gn(l.isHTMLForm(e) ? new FormData(e) : e);
|
|
2308
|
+
$.getAdapter = xn.getAdapter;
|
|
2309
|
+
$.HttpStatusCode = Ir;
|
|
2310
|
+
$.default = $;
|
|
2311
|
+
const Lr = $;
|
|
2312
|
+
function jr(e, t) {
|
|
2313
2313
|
const n = t && t.toUpperCase() !== "MY" ? `.${t.toLowerCase()}` : "";
|
|
2314
2314
|
return `https://portal-v2${e === "dev" ? "-dev" : ""}${n}.feedmeapi.com`;
|
|
2315
2315
|
}
|
|
2316
|
-
function
|
|
2317
|
-
return
|
|
2316
|
+
function Mr(e, t) {
|
|
2317
|
+
return jr(e, t);
|
|
2318
2318
|
}
|
|
2319
|
-
const
|
|
2320
|
-
function
|
|
2319
|
+
const Pn = ["1x1", "4x3", "16x9", "9x16"], ht = "asset";
|
|
2320
|
+
function zr(e) {
|
|
2321
2321
|
return e.some((t) => t.status === "pending");
|
|
2322
2322
|
}
|
|
2323
|
-
function
|
|
2323
|
+
function Vr(e) {
|
|
2324
2324
|
if (e.length === 0)
|
|
2325
2325
|
return null;
|
|
2326
2326
|
const t = e.filter((n) => n.status === "active").length;
|
|
2327
2327
|
return { tone: e.some((n) => n.status === "pending") ? "progress" : e.some((n) => n.status === "failed") ? "warning" : "done", active: t, total: e.length };
|
|
2328
2328
|
}
|
|
2329
|
-
function
|
|
2329
|
+
function En(e, t) {
|
|
2330
2330
|
return [
|
|
2331
2331
|
{ key: "original", kind: "original", ratio: null, url: e.url, status: null },
|
|
2332
2332
|
...t.map((n) => ({
|
|
@@ -2338,7 +2338,7 @@ function jr(e, t) {
|
|
|
2338
2338
|
}))
|
|
2339
2339
|
];
|
|
2340
2340
|
}
|
|
2341
|
-
function
|
|
2341
|
+
function qr(e) {
|
|
2342
2342
|
return e.refType && e.refId ? {
|
|
2343
2343
|
kind: "image",
|
|
2344
2344
|
entry: {
|
|
@@ -2351,11 +2351,40 @@ function Ir(e) {
|
|
|
2351
2351
|
}
|
|
2352
2352
|
} : { kind: "asset", id: e.id };
|
|
2353
2353
|
}
|
|
2354
|
-
function
|
|
2354
|
+
function $r(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 Jt(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 Gr(e) {
|
|
2381
|
+
return e >= 1024 * 1024 ? `${(e / 1024 / 1024).toFixed(1)} MB` : `${Math.round(e / 1024)} KB`;
|
|
2382
|
+
}
|
|
2383
|
+
function we() {
|
|
2355
2384
|
var e;
|
|
2356
|
-
const { sessionUser: t, namespace: n, currentCountry: a } =
|
|
2357
|
-
return
|
|
2358
|
-
baseURL:
|
|
2385
|
+
const { sessionUser: t, namespace: n, currentCountry: a } = Qt(), r = (e = t.value) == null ? void 0 : e.token;
|
|
2386
|
+
return Lr.create({
|
|
2387
|
+
baseURL: Mr(n.value, a.value),
|
|
2359
2388
|
headers: r ? { Authorization: `Bearer ${r}` } : {}
|
|
2360
2389
|
});
|
|
2361
2390
|
}
|
|
@@ -2363,66 +2392,66 @@ function at(e) {
|
|
|
2363
2392
|
return `/media-v1/businesses/${e}/assets`;
|
|
2364
2393
|
}
|
|
2365
2394
|
async function rt(e) {
|
|
2366
|
-
const { businessId: t, ...n } = e, { data: a } = await
|
|
2395
|
+
const { businessId: t, ...n } = e, { data: a } = await we().get(at(t), { params: n });
|
|
2367
2396
|
return a;
|
|
2368
2397
|
}
|
|
2369
|
-
async function
|
|
2398
|
+
async function Sn(e) {
|
|
2370
2399
|
const { resources: t } = await rt({ businessId: e, limit: 200 }), n = /* @__PURE__ */ new Set();
|
|
2371
2400
|
return t.forEach((a) => a.tags.forEach((r) => n.add(r))), [...n].sort();
|
|
2372
2401
|
}
|
|
2373
|
-
async function
|
|
2402
|
+
async function Wr(e) {
|
|
2374
2403
|
const { resources: t } = await rt({ businessId: e, limit: 200 }), n = /* @__PURE__ */ new Map();
|
|
2375
2404
|
return t.forEach((a) => a.tags.forEach((r) => n.set(r, (n.get(r) ?? 0) + 1))), { tags: [...n.entries()].map(([a, r]) => ({ tag: a, count: r })).sort((a, r) => a.tag.localeCompare(r.tag)), total: t.length };
|
|
2376
2405
|
}
|
|
2377
|
-
async function
|
|
2378
|
-
const { data: a } = await
|
|
2406
|
+
async function Hr(e, t, n) {
|
|
2407
|
+
const { data: a } = await we().patch(`${at(e)}/${t}`, { fileName: n });
|
|
2379
2408
|
return a;
|
|
2380
2409
|
}
|
|
2381
|
-
async function
|
|
2382
|
-
const { data: a } = await
|
|
2410
|
+
async function Jr(e, t, n) {
|
|
2411
|
+
const { data: a } = await we().patch(`${at(e)}/${t}`, { tags: n });
|
|
2383
2412
|
return a;
|
|
2384
2413
|
}
|
|
2385
|
-
async function
|
|
2386
|
-
await
|
|
2414
|
+
async function Kr(e, t) {
|
|
2415
|
+
await we().delete(`${at(e)}/${t}`);
|
|
2387
2416
|
}
|
|
2388
|
-
function
|
|
2417
|
+
function Me(e) {
|
|
2389
2418
|
return `/media-v1/businesses/${e}/images`;
|
|
2390
2419
|
}
|
|
2391
|
-
async function
|
|
2392
|
-
const { data: a } = await
|
|
2420
|
+
async function Xr(e, t, n) {
|
|
2421
|
+
const { data: a } = await we().post(`${Me(e)}/create`, t, {
|
|
2393
2422
|
headers: n ? { "Idempotency-Key": n } : {}
|
|
2394
2423
|
});
|
|
2395
2424
|
return a;
|
|
2396
2425
|
}
|
|
2397
|
-
async function
|
|
2398
|
-
const { data: n } = await
|
|
2426
|
+
async function Qr(e, t) {
|
|
2427
|
+
const { data: n } = await we().post(`${Me(e)}/delete`, {
|
|
2399
2428
|
entries: t
|
|
2400
2429
|
});
|
|
2401
2430
|
return n.results;
|
|
2402
2431
|
}
|
|
2403
|
-
async function
|
|
2404
|
-
const { businessId: t, refIds: n, ...a } = e, { data: r } = await
|
|
2432
|
+
async function Yr(e) {
|
|
2433
|
+
const { businessId: t, refIds: n, ...a } = e, { data: r } = await we().get(Me(t), {
|
|
2405
2434
|
params: { ...a, refIds: n.join(",") }
|
|
2406
2435
|
});
|
|
2407
2436
|
return r.images;
|
|
2408
2437
|
}
|
|
2409
|
-
async function
|
|
2410
|
-
const { data: n } = await
|
|
2438
|
+
async function Zr(e, t) {
|
|
2439
|
+
const { data: n } = await we().post(`${Me(e)}/upload-intent`, t);
|
|
2411
2440
|
return n;
|
|
2412
2441
|
}
|
|
2413
|
-
async function
|
|
2414
|
-
const { data: n } = await
|
|
2442
|
+
async function eo(e, t) {
|
|
2443
|
+
const { data: n } = await we().post(`${Me(e)}/confirm`, t);
|
|
2415
2444
|
return n;
|
|
2416
2445
|
}
|
|
2417
|
-
async function
|
|
2418
|
-
const n =
|
|
2446
|
+
async function bt(e, t) {
|
|
2447
|
+
const n = qr(t);
|
|
2419
2448
|
if (n.kind === "image") {
|
|
2420
|
-
await
|
|
2449
|
+
await Qr(e, [n.entry]);
|
|
2421
2450
|
return;
|
|
2422
2451
|
}
|
|
2423
|
-
await
|
|
2452
|
+
await Kr(e, n.id);
|
|
2424
2453
|
}
|
|
2425
|
-
const
|
|
2454
|
+
const to = {
|
|
2426
2455
|
assetGrid: {
|
|
2427
2456
|
loading: "Loading…",
|
|
2428
2457
|
empty: "No assets yet",
|
|
@@ -2493,10 +2522,13 @@ const Kr = {
|
|
|
2493
2522
|
generating: "Generating…",
|
|
2494
2523
|
failed: "Generation failed",
|
|
2495
2524
|
regenerate: "Regenerate"
|
|
2525
|
+
},
|
|
2526
|
+
ratioBar: {
|
|
2527
|
+
label: "Ratio"
|
|
2496
2528
|
}
|
|
2497
|
-
},
|
|
2498
|
-
mediaPicker:
|
|
2499
|
-
},
|
|
2529
|
+
}, no = {
|
|
2530
|
+
mediaPicker: to
|
|
2531
|
+
}, ao = {
|
|
2500
2532
|
assetGrid: {
|
|
2501
2533
|
loading: "Chargement…",
|
|
2502
2534
|
empty: "Aucun média",
|
|
@@ -2567,10 +2599,13 @@ const Kr = {
|
|
|
2567
2599
|
generating: "Génération…",
|
|
2568
2600
|
failed: "Échec de la génération",
|
|
2569
2601
|
regenerate: "Régénérer"
|
|
2602
|
+
},
|
|
2603
|
+
ratioBar: {
|
|
2604
|
+
label: "Ratio"
|
|
2570
2605
|
}
|
|
2571
|
-
},
|
|
2572
|
-
mediaPicker:
|
|
2573
|
-
},
|
|
2606
|
+
}, ro = {
|
|
2607
|
+
mediaPicker: ao
|
|
2608
|
+
}, oo = {
|
|
2574
2609
|
assetGrid: {
|
|
2575
2610
|
loading: "Memuat…",
|
|
2576
2611
|
empty: "Belum ada media",
|
|
@@ -2641,10 +2676,13 @@ const Kr = {
|
|
|
2641
2676
|
generating: "Membuat…",
|
|
2642
2677
|
failed: "Gagal membuat",
|
|
2643
2678
|
regenerate: "Buat ulang"
|
|
2679
|
+
},
|
|
2680
|
+
ratioBar: {
|
|
2681
|
+
label: "Rasio"
|
|
2644
2682
|
}
|
|
2645
|
-
},
|
|
2646
|
-
mediaPicker:
|
|
2647
|
-
},
|
|
2683
|
+
}, so = {
|
|
2684
|
+
mediaPicker: oo
|
|
2685
|
+
}, io = {
|
|
2648
2686
|
assetGrid: {
|
|
2649
2687
|
loading: "読み込み中…",
|
|
2650
2688
|
empty: "素材がありません",
|
|
@@ -2715,10 +2753,13 @@ const Kr = {
|
|
|
2715
2753
|
generating: "生成中…",
|
|
2716
2754
|
failed: "生成に失敗しました",
|
|
2717
2755
|
regenerate: "再生成"
|
|
2756
|
+
},
|
|
2757
|
+
ratioBar: {
|
|
2758
|
+
label: "比率"
|
|
2718
2759
|
}
|
|
2719
|
-
},
|
|
2720
|
-
mediaPicker:
|
|
2721
|
-
},
|
|
2760
|
+
}, lo = {
|
|
2761
|
+
mediaPicker: io
|
|
2762
|
+
}, uo = {
|
|
2722
2763
|
assetGrid: {
|
|
2723
2764
|
loading: "กำลังโหลด…",
|
|
2724
2765
|
empty: "ยังไม่มีสื่อ",
|
|
@@ -2789,10 +2830,13 @@ const Kr = {
|
|
|
2789
2830
|
generating: "กำลังสร้าง…",
|
|
2790
2831
|
failed: "สร้างไม่สำเร็จ",
|
|
2791
2832
|
regenerate: "สร้างใหม่"
|
|
2833
|
+
},
|
|
2834
|
+
ratioBar: {
|
|
2835
|
+
label: "อัตราส่วน"
|
|
2792
2836
|
}
|
|
2793
|
-
},
|
|
2794
|
-
mediaPicker:
|
|
2795
|
-
},
|
|
2837
|
+
}, co = {
|
|
2838
|
+
mediaPicker: uo
|
|
2839
|
+
}, po = {
|
|
2796
2840
|
assetGrid: {
|
|
2797
2841
|
loading: "加载中…",
|
|
2798
2842
|
empty: "暂无素材",
|
|
@@ -2863,10 +2907,13 @@ const Kr = {
|
|
|
2863
2907
|
generating: "生成中…",
|
|
2864
2908
|
failed: "生成失败",
|
|
2865
2909
|
regenerate: "重新生成"
|
|
2910
|
+
},
|
|
2911
|
+
ratioBar: {
|
|
2912
|
+
label: "规格"
|
|
2866
2913
|
}
|
|
2867
|
-
},
|
|
2868
|
-
mediaPicker:
|
|
2869
|
-
},
|
|
2914
|
+
}, fo = {
|
|
2915
|
+
mediaPicker: po
|
|
2916
|
+
}, mo = {
|
|
2870
2917
|
assetGrid: {
|
|
2871
2918
|
loading: "載入中…",
|
|
2872
2919
|
empty: "暫無素材",
|
|
@@ -2937,30 +2984,33 @@ const Kr = {
|
|
|
2937
2984
|
generating: "產生中…",
|
|
2938
2985
|
failed: "產生失敗",
|
|
2939
2986
|
regenerate: "重新產生"
|
|
2987
|
+
},
|
|
2988
|
+
ratioBar: {
|
|
2989
|
+
label: "規格"
|
|
2940
2990
|
}
|
|
2941
|
-
},
|
|
2942
|
-
mediaPicker:
|
|
2943
|
-
},
|
|
2944
|
-
"en-US":
|
|
2945
|
-
"zh-CN":
|
|
2946
|
-
"zh-Hant":
|
|
2947
|
-
"th-TH":
|
|
2948
|
-
"ja-JP":
|
|
2949
|
-
"id-ID":
|
|
2950
|
-
"fr-MA":
|
|
2951
|
-
},
|
|
2991
|
+
}, go = {
|
|
2992
|
+
mediaPicker: mo
|
|
2993
|
+
}, xe = {
|
|
2994
|
+
"en-US": no,
|
|
2995
|
+
"zh-CN": fo,
|
|
2996
|
+
"zh-Hant": go,
|
|
2997
|
+
"th-TH": co,
|
|
2998
|
+
"ja-JP": lo,
|
|
2999
|
+
"id-ID": so,
|
|
3000
|
+
"fr-MA": ro
|
|
3001
|
+
}, ho = {
|
|
2952
3002
|
key: 0,
|
|
2953
3003
|
class: "py-64 text-center text-sm text-gray-400"
|
|
2954
|
-
},
|
|
3004
|
+
}, bo = {
|
|
2955
3005
|
key: 1,
|
|
2956
3006
|
class: "py-64 text-center text-sm text-gray-400"
|
|
2957
|
-
},
|
|
3007
|
+
}, yo = {
|
|
2958
3008
|
key: 2,
|
|
2959
3009
|
class: "bg-white border border-fm-color-neutral-gray-200 rounded-lg overflow-hidden"
|
|
2960
|
-
},
|
|
3010
|
+
}, vo = { 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" }, wo = ["onClick"], xo = ["onClick"], ko = { key: 1 }, Po = { class: "w-[44px] h-[36px] rounded overflow-hidden" }, Eo = { class: "min-w-0 flex flex-col gap-4" }, So = { class: "text-xs font-semibold truncate" }, Ro = { class: "flex items-center gap-8" }, To = { class: "text-[11px] text-fm-color-typo-tertiary" }, Oo = { class: "text-xs text-fm-color-typo-primary" }, Bo = { class: "text-xs text-fm-color-typo-primary" }, _o = { class: "flex items-center gap-8 min-w-0" }, Co = { class: "text-xs text-fm-color-typo-primary truncate" }, Ao = { class: "text-xs text-fm-color-typo-secondary" }, Do = {
|
|
2961
3011
|
key: 3,
|
|
2962
3012
|
class: "grid grid-cols-2 sm:grid-cols-3 md:grid-cols-4 lg:grid-cols-5 gap-16"
|
|
2963
|
-
},
|
|
3013
|
+
}, Fo = ["onClick"], No = { class: "relative aspect-[4/3]" }, Uo = ["onClick"], Io = { 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" }, jo = { class: "text-xs font-semibold truncate" }, Mo = { class: "text-[11px] text-gray-500 truncate" }, Rn = /* @__PURE__ */ ge({
|
|
2964
3014
|
__name: "AssetGrid",
|
|
2965
3015
|
props: {
|
|
2966
3016
|
assets: {},
|
|
@@ -2968,154 +3018,171 @@ const Kr = {
|
|
|
2968
3018
|
selectable: { type: Boolean, default: !1 },
|
|
2969
3019
|
selectedIds: { default: () => /* @__PURE__ */ new Set() },
|
|
2970
3020
|
view: { default: "grid" },
|
|
2971
|
-
variantsByRefId: {}
|
|
3021
|
+
variantsByRefId: {},
|
|
3022
|
+
unavailableIds: {}
|
|
2972
3023
|
},
|
|
2973
3024
|
emits: ["open", "toggle", "delete"],
|
|
2974
3025
|
setup(e, { emit: t }) {
|
|
2975
|
-
const { t: n } =
|
|
2976
|
-
function r(
|
|
2977
|
-
var
|
|
2978
|
-
if (!
|
|
3026
|
+
const { t: n } = he({ messages: xe }), a = e;
|
|
3027
|
+
function r(P) {
|
|
3028
|
+
var b;
|
|
3029
|
+
if (!P.refId)
|
|
2979
3030
|
return null;
|
|
2980
|
-
const
|
|
2981
|
-
return
|
|
3031
|
+
const v = (b = a.variantsByRefId) == null ? void 0 : b.get(P.refId);
|
|
3032
|
+
return v ? Vr(v.variants) : null;
|
|
2982
3033
|
}
|
|
2983
|
-
function o(
|
|
2984
|
-
|
|
3034
|
+
function o(P) {
|
|
3035
|
+
var b;
|
|
3036
|
+
return ((b = a.unavailableIds) == null ? void 0 : b.has(P.id)) ?? !1;
|
|
2985
3037
|
}
|
|
2986
|
-
|
|
2987
|
-
|
|
2988
|
-
var d;
|
|
2989
|
-
return ((d = c.split("/")[1]) == null ? void 0 : d.toUpperCase()) ?? c;
|
|
3038
|
+
function s(P) {
|
|
3039
|
+
o(P) || d("open", P);
|
|
2990
3040
|
}
|
|
2991
|
-
function
|
|
2992
|
-
|
|
3041
|
+
function i(P) {
|
|
3042
|
+
o(P) || d("toggle", P);
|
|
3043
|
+
}
|
|
3044
|
+
function u(P) {
|
|
3045
|
+
return P.tone === "done" ? n("mediaPicker.variants.badgeDone", { count: P.total }) : n("mediaPicker.variants.badgeProgress", { active: P.active, total: P.total });
|
|
3046
|
+
}
|
|
3047
|
+
const d = t;
|
|
3048
|
+
function c(P) {
|
|
3049
|
+
var b;
|
|
3050
|
+
return ((b = P.split("/")[1]) == null ? void 0 : b.toUpperCase()) ?? P;
|
|
2993
3051
|
}
|
|
2994
|
-
function
|
|
2995
|
-
|
|
2996
|
-
|
|
3052
|
+
function p(P) {
|
|
3053
|
+
return P >= 1024 * 1024 ? `${(P / 1024 / 1024).toFixed(1)} MB` : `${Math.round(P / 1024)} KB`;
|
|
3054
|
+
}
|
|
3055
|
+
function w(P) {
|
|
3056
|
+
const b = Date.now() - new Date(P).getTime(), v = 6e4, U = 36e5, f = 864e5;
|
|
3057
|
+
if (b < v)
|
|
2997
3058
|
return n("mediaPicker.assetGrid.time.justNow");
|
|
2998
|
-
if (
|
|
2999
|
-
return n("mediaPicker.assetGrid.time.minutesAgo", { n: Math.floor(
|
|
3000
|
-
if (
|
|
3001
|
-
return n("mediaPicker.assetGrid.time.hoursAgo", { n: Math.floor(
|
|
3002
|
-
if (
|
|
3003
|
-
return n("mediaPicker.assetGrid.time.daysAgo", { n: Math.floor(
|
|
3004
|
-
const
|
|
3005
|
-
return `${
|
|
3059
|
+
if (b < U)
|
|
3060
|
+
return n("mediaPicker.assetGrid.time.minutesAgo", { n: Math.floor(b / v) });
|
|
3061
|
+
if (b < f)
|
|
3062
|
+
return n("mediaPicker.assetGrid.time.hoursAgo", { n: Math.floor(b / U) });
|
|
3063
|
+
if (b < f * 8)
|
|
3064
|
+
return n("mediaPicker.assetGrid.time.daysAgo", { n: Math.floor(b / f) });
|
|
3065
|
+
const g = new Date(P);
|
|
3066
|
+
return `${g.getFullYear()}-${String(g.getMonth() + 1).padStart(2, "0")}-${String(g.getDate()).padStart(2, "0")}`;
|
|
3006
3067
|
}
|
|
3007
|
-
return (
|
|
3008
|
-
const
|
|
3009
|
-
return e.loading ? (
|
|
3010
|
-
h("div",
|
|
3011
|
-
|
|
3012
|
-
|
|
3013
|
-
h("span", null,
|
|
3014
|
-
h("span", null,
|
|
3015
|
-
h("span", null,
|
|
3016
|
-
h("span", null,
|
|
3017
|
-
h("span", null,
|
|
3018
|
-
|
|
3068
|
+
return (P, b) => {
|
|
3069
|
+
const v = V("FmIcon"), U = V("FmThumbnail"), f = V("FmAvatar"), g = V("FmButton");
|
|
3070
|
+
return e.loading ? (k(), _("div", ho, E(T(n)("mediaPicker.assetGrid.loading")), 1)) : e.assets.length === 0 ? (k(), _("div", bo, E(T(n)("mediaPicker.assetGrid.empty")), 1)) : e.view === "list" ? (k(), _("div", yo, [
|
|
3071
|
+
h("div", vo, [
|
|
3072
|
+
b[0] || (b[0] = h("span", null, null, -1)),
|
|
3073
|
+
b[1] || (b[1] = h("span", null, null, -1)),
|
|
3074
|
+
h("span", null, E(T(n)("mediaPicker.assetGrid.columns.name")), 1),
|
|
3075
|
+
h("span", null, E(T(n)("mediaPicker.assetGrid.columns.dimensions")), 1),
|
|
3076
|
+
h("span", null, E(T(n)("mediaPicker.assetGrid.columns.fileSize")), 1),
|
|
3077
|
+
h("span", null, E(T(n)("mediaPicker.assetGrid.columns.uploader")), 1),
|
|
3078
|
+
h("span", null, E(T(n)("mediaPicker.assetGrid.columns.uploadedAt")), 1),
|
|
3079
|
+
b[2] || (b[2] = h("span", null, null, -1))
|
|
3019
3080
|
]),
|
|
3020
|
-
(
|
|
3021
|
-
key:
|
|
3022
|
-
class:
|
|
3023
|
-
|
|
3081
|
+
(k(!0), _(J, null, me(e.assets, (m) => (k(), _("div", {
|
|
3082
|
+
key: m.id,
|
|
3083
|
+
class: te(["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", [
|
|
3084
|
+
e.selectedIds.has(m.id) ? "bg-[#FFF7F0]" : "bg-white",
|
|
3085
|
+
o(m) ? "opacity-40 pointer-events-none" : ""
|
|
3086
|
+
]]),
|
|
3087
|
+
onClick: (S) => s(m)
|
|
3024
3088
|
}, [
|
|
3025
|
-
e.selectable ? (
|
|
3089
|
+
e.selectable ? (k(), _("button", {
|
|
3026
3090
|
key: 0,
|
|
3027
|
-
class:
|
|
3028
|
-
onClick: st((
|
|
3091
|
+
class: te(["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"]),
|
|
3092
|
+
onClick: st((S) => i(m), ["stop"])
|
|
3029
3093
|
}, [
|
|
3030
|
-
e.selectedIds.has(
|
|
3094
|
+
e.selectedIds.has(m.id) ? (k(), re(v, {
|
|
3031
3095
|
key: 0,
|
|
3032
3096
|
name: "check",
|
|
3033
3097
|
size: "sm",
|
|
3034
3098
|
color: "white"
|
|
3035
|
-
})) :
|
|
3036
|
-
], 10,
|
|
3037
|
-
h("div",
|
|
3038
|
-
|
|
3039
|
-
src:
|
|
3099
|
+
})) : q("", !0)
|
|
3100
|
+
], 10, xo)) : (k(), _("span", ko)),
|
|
3101
|
+
h("div", Po, [
|
|
3102
|
+
F(U, {
|
|
3103
|
+
src: m.url,
|
|
3040
3104
|
size: "sm",
|
|
3041
3105
|
class: "!w-full !h-full"
|
|
3042
3106
|
}, null, 8, ["src"])
|
|
3043
3107
|
]),
|
|
3044
|
-
h("div",
|
|
3045
|
-
h("span",
|
|
3046
|
-
h("div",
|
|
3047
|
-
h("span",
|
|
3048
|
-
r(
|
|
3108
|
+
h("div", Eo, [
|
|
3109
|
+
h("span", So, E(m.fileName), 1),
|
|
3110
|
+
h("div", Ro, [
|
|
3111
|
+
h("span", To, E(c(m.mimeType)), 1),
|
|
3112
|
+
r(m) ? (k(), _("span", {
|
|
3049
3113
|
key: 0,
|
|
3050
|
-
class:
|
|
3051
|
-
"text-fm-color-typo-tertiary": r(
|
|
3052
|
-
"text-blue-600": r(
|
|
3053
|
-
"text-amber-600": r(
|
|
3114
|
+
class: te(["text-[11px] font-semibold", {
|
|
3115
|
+
"text-fm-color-typo-tertiary": r(m).tone === "done",
|
|
3116
|
+
"text-blue-600": r(m).tone === "progress",
|
|
3117
|
+
"text-amber-600": r(m).tone === "warning"
|
|
3054
3118
|
}])
|
|
3055
|
-
},
|
|
3119
|
+
}, E(u(r(m))), 3)) : q("", !0)
|
|
3056
3120
|
])
|
|
3057
3121
|
]),
|
|
3058
|
-
h("span",
|
|
3059
|
-
h("span",
|
|
3060
|
-
h("div",
|
|
3061
|
-
|
|
3062
|
-
name:
|
|
3122
|
+
h("span", Oo, E(m.width) + "×" + E(m.height), 1),
|
|
3123
|
+
h("span", Bo, E(p(m.fileSizeBytes)), 1),
|
|
3124
|
+
h("div", _o, [
|
|
3125
|
+
F(f, {
|
|
3126
|
+
name: m.uploadedBy,
|
|
3063
3127
|
size: "sm"
|
|
3064
3128
|
}, null, 8, ["name"]),
|
|
3065
|
-
h("span",
|
|
3129
|
+
h("span", Co, E(m.uploadedBy), 1)
|
|
3066
3130
|
]),
|
|
3067
|
-
h("span",
|
|
3068
|
-
|
|
3131
|
+
h("span", Ao, E(w(m.createdAt)), 1),
|
|
3132
|
+
F(g, {
|
|
3069
3133
|
variant: "tertiary",
|
|
3070
3134
|
size: "md",
|
|
3071
3135
|
"prepend-icon": "delete",
|
|
3072
3136
|
label: "",
|
|
3073
|
-
onClick: st((
|
|
3137
|
+
onClick: st((S) => d("delete", m), ["stop"])
|
|
3074
3138
|
}, null, 8, ["onClick"])
|
|
3075
|
-
], 10,
|
|
3076
|
-
])) : (
|
|
3077
|
-
(
|
|
3078
|
-
key:
|
|
3079
|
-
class:
|
|
3080
|
-
|
|
3139
|
+
], 10, wo))), 128))
|
|
3140
|
+
])) : (k(), _("div", Do, [
|
|
3141
|
+
(k(!0), _(J, null, me(e.assets, (m) => (k(), _("div", {
|
|
3142
|
+
key: m.id,
|
|
3143
|
+
class: te(["cursor-pointer rounded-lg border bg-white overflow-hidden transition-shadow hover:shadow-lg", [
|
|
3144
|
+
e.selectedIds.has(m.id) ? "border-2 border-[--fm-color-brand-primary,#FF7823]" : "border-gray-200",
|
|
3145
|
+
o(m) ? "opacity-40 pointer-events-none" : ""
|
|
3146
|
+
]]),
|
|
3147
|
+
onClick: (S) => s(m)
|
|
3081
3148
|
}, [
|
|
3082
|
-
h("div",
|
|
3083
|
-
|
|
3084
|
-
src:
|
|
3149
|
+
h("div", No, [
|
|
3150
|
+
F(U, {
|
|
3151
|
+
src: m.url,
|
|
3085
3152
|
size: "xl",
|
|
3086
3153
|
class: "w-full h-full"
|
|
3087
3154
|
}, null, 8, ["src"]),
|
|
3088
|
-
e.selectable ? (
|
|
3155
|
+
e.selectable ? (k(), _("button", {
|
|
3089
3156
|
key: 0,
|
|
3090
|
-
class:
|
|
3091
|
-
onClick: st((
|
|
3157
|
+
class: te(["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"]),
|
|
3158
|
+
onClick: st((S) => i(m), ["stop"])
|
|
3092
3159
|
}, [
|
|
3093
|
-
e.selectedIds.has(
|
|
3160
|
+
e.selectedIds.has(m.id) ? (k(), re(v, {
|
|
3094
3161
|
key: 0,
|
|
3095
3162
|
name: "check",
|
|
3096
3163
|
size: "sm",
|
|
3097
3164
|
color: "white"
|
|
3098
|
-
})) :
|
|
3099
|
-
], 10,
|
|
3100
|
-
h("span",
|
|
3101
|
-
r(
|
|
3165
|
+
})) : q("", !0)
|
|
3166
|
+
], 10, Uo)) : q("", !0),
|
|
3167
|
+
h("span", Io, E(c(m.mimeType)), 1),
|
|
3168
|
+
r(m) ? (k(), _("span", {
|
|
3102
3169
|
key: 1,
|
|
3103
|
-
class:
|
|
3104
|
-
"bg-black/70": r(
|
|
3105
|
-
"bg-blue-600/90": r(
|
|
3106
|
-
"bg-amber-600/90": r(
|
|
3170
|
+
class: te(["absolute bottom-8 right-8 text-white text-[11px] font-semibold px-[6px] py-[2px] rounded", {
|
|
3171
|
+
"bg-black/70": r(m).tone === "done",
|
|
3172
|
+
"bg-blue-600/90": r(m).tone === "progress",
|
|
3173
|
+
"bg-amber-600/90": r(m).tone === "warning"
|
|
3107
3174
|
}])
|
|
3108
|
-
},
|
|
3175
|
+
}, E(u(r(m))), 3)) : q("", !0)
|
|
3109
3176
|
]),
|
|
3110
|
-
h("div",
|
|
3111
|
-
h("div",
|
|
3112
|
-
h("span",
|
|
3177
|
+
h("div", Lo, [
|
|
3178
|
+
h("div", jo, E(m.fileName), 1),
|
|
3179
|
+
h("span", Mo, E(m.width) + "×" + E(m.height) + " · " + E(p(m.fileSizeBytes)), 1)
|
|
3113
3180
|
])
|
|
3114
|
-
], 10,
|
|
3181
|
+
], 10, Fo))), 128))
|
|
3115
3182
|
]));
|
|
3116
3183
|
};
|
|
3117
3184
|
}
|
|
3118
|
-
}),
|
|
3185
|
+
}), zo = { class: "flex flex-wrap items-center gap-8" }, Vo = { class: "flex items-center gap-6" }, qo = { class: "flex items-center gap-6" }, $o = /* @__PURE__ */ ge({
|
|
3119
3186
|
__name: "TagFilterTabs",
|
|
3120
3187
|
props: {
|
|
3121
3188
|
tags: {},
|
|
@@ -3124,37 +3191,37 @@ const Kr = {
|
|
|
3124
3191
|
},
|
|
3125
3192
|
emits: ["update:modelValue"],
|
|
3126
3193
|
setup(e, { emit: t }) {
|
|
3127
|
-
const { t: n } =
|
|
3194
|
+
const { t: n } = he({ messages: xe }), a = t;
|
|
3128
3195
|
return (r, o) => {
|
|
3129
|
-
const s =
|
|
3130
|
-
return
|
|
3131
|
-
|
|
3196
|
+
const s = V("FmChip");
|
|
3197
|
+
return k(), _("div", zo, [
|
|
3198
|
+
F(s, {
|
|
3132
3199
|
selectable: "",
|
|
3133
3200
|
selected: e.modelValue === null,
|
|
3134
3201
|
onClick: o[0] || (o[0] = (i) => a("update:modelValue", null))
|
|
3135
3202
|
}, {
|
|
3136
|
-
default:
|
|
3137
|
-
h("span",
|
|
3138
|
-
|
|
3203
|
+
default: fe(() => [
|
|
3204
|
+
h("span", Vo, [
|
|
3205
|
+
ce(E(T(n)("mediaPicker.tagFilterTabs.all")) + " ", 1),
|
|
3139
3206
|
h("span", {
|
|
3140
|
-
class:
|
|
3141
|
-
},
|
|
3207
|
+
class: te(["text-[11px] leading-none rounded-full px-6 py-2", e.modelValue === null ? "bg-white/25" : "bg-fm-color-neutral-gray-100"])
|
|
3208
|
+
}, E(e.total), 3)
|
|
3142
3209
|
])
|
|
3143
3210
|
]),
|
|
3144
3211
|
_: 1
|
|
3145
3212
|
}, 8, ["selected"]),
|
|
3146
|
-
(
|
|
3213
|
+
(k(!0), _(J, null, me(e.tags, (i) => (k(), re(s, {
|
|
3147
3214
|
key: i.tag,
|
|
3148
3215
|
selectable: "",
|
|
3149
3216
|
selected: e.modelValue === i.tag,
|
|
3150
3217
|
onClick: (u) => a("update:modelValue", i.tag)
|
|
3151
3218
|
}, {
|
|
3152
|
-
default:
|
|
3153
|
-
h("span",
|
|
3154
|
-
|
|
3219
|
+
default: fe(() => [
|
|
3220
|
+
h("span", qo, [
|
|
3221
|
+
ce(E(i.tag) + " ", 1),
|
|
3155
3222
|
h("span", {
|
|
3156
|
-
class:
|
|
3157
|
-
},
|
|
3223
|
+
class: te(["text-[11px] leading-none rounded-full px-6 py-2", e.modelValue === i.tag ? "bg-white/25" : "bg-fm-color-neutral-gray-100"])
|
|
3224
|
+
}, E(i.count), 3)
|
|
3158
3225
|
])
|
|
3159
3226
|
]),
|
|
3160
3227
|
_: 2
|
|
@@ -3162,7 +3229,56 @@ const Kr = {
|
|
|
3162
3229
|
]);
|
|
3163
3230
|
};
|
|
3164
3231
|
}
|
|
3165
|
-
}),
|
|
3232
|
+
}), Go = { class: "flex items-center gap-12 border-t border-fm-color-neutral-gray-200 px-4 py-8" }, Wo = { class: "text-xs font-semibold text-gray-500 shrink-0" }, Ho = { class: "flex flex-wrap items-center gap-8" }, Jo = ["onClick"], Ko = { class: "text-xs text-fm-color-typo-secondary shrink-0" }, Xo = /* @__PURE__ */ ge({
|
|
3233
|
+
__name: "RatioPickerBar",
|
|
3234
|
+
props: /* @__PURE__ */ dt({
|
|
3235
|
+
facts: {},
|
|
3236
|
+
locked: { type: Boolean }
|
|
3237
|
+
}, {
|
|
3238
|
+
modelValue: { default: null },
|
|
3239
|
+
modelModifiers: {}
|
|
3240
|
+
}),
|
|
3241
|
+
emits: ["update:modelValue"],
|
|
3242
|
+
setup(e) {
|
|
3243
|
+
const { t } = he({ messages: xe }), n = e, a = Xt(e, "modelValue");
|
|
3244
|
+
function r(i) {
|
|
3245
|
+
n.locked || (a.value = i);
|
|
3246
|
+
}
|
|
3247
|
+
function o(i) {
|
|
3248
|
+
return i.replace("x", ":");
|
|
3249
|
+
}
|
|
3250
|
+
function s(i) {
|
|
3251
|
+
return [
|
|
3252
|
+
i ? "border-[--fm-color-brand-primary,#FF7823] text-[--fm-color-brand-primary,#FF7823] bg-[#FFF7F0]" : "border-fm-color-neutral-gray-300 text-gray-500",
|
|
3253
|
+
n.locked ? "cursor-not-allowed opacity-60" : ""
|
|
3254
|
+
];
|
|
3255
|
+
}
|
|
3256
|
+
return (i, u) => (k(), _("div", Go, [
|
|
3257
|
+
h("span", Wo, E(T(t)("mediaPicker.ratioBar.label")), 1),
|
|
3258
|
+
h("div", Ho, [
|
|
3259
|
+
h("button", {
|
|
3260
|
+
type: "button",
|
|
3261
|
+
class: te(["h-[28px] px-12 rounded-full border text-[11px] font-semibold transition-colors", s(a.value === null)]),
|
|
3262
|
+
onClick: u[0] || (u[0] = (d) => r(null))
|
|
3263
|
+
}, E(T(t)("mediaPicker.variants.original")), 3),
|
|
3264
|
+
(k(!0), _(J, null, me(T(Pn), (d) => (k(), _("button", {
|
|
3265
|
+
key: d,
|
|
3266
|
+
type: "button",
|
|
3267
|
+
class: te(["h-[28px] px-12 rounded-full border text-[11px] font-semibold transition-colors", s(a.value === d)]),
|
|
3268
|
+
onClick: (c) => r(d)
|
|
3269
|
+
}, E(o(d)), 11, Jo))), 128))
|
|
3270
|
+
]),
|
|
3271
|
+
u[1] || (u[1] = h("div", { class: "flex-1" }, null, -1)),
|
|
3272
|
+
h("span", Ko, [
|
|
3273
|
+
e.facts ? (k(), _(J, { key: 0 }, [
|
|
3274
|
+
ce(E(e.facts.dimensions) + " · " + E(T(Gr)(e.facts.sizeBytes)), 1)
|
|
3275
|
+
], 64)) : (k(), _(J, { key: 1 }, [
|
|
3276
|
+
ce("—")
|
|
3277
|
+
], 64))
|
|
3278
|
+
])
|
|
3279
|
+
]));
|
|
3280
|
+
}
|
|
3281
|
+
}), Qo = { class: "space-y-8" }, Yo = { class: "text-xs font-semibold text-gray-500" }, Zo = { class: "flex flex-wrap gap-8" }, es = ["onClick"], ts = { class: "text-[11px] text-gray-400" }, ns = /* @__PURE__ */ ge({
|
|
3166
3282
|
__name: "RatioSelector",
|
|
3167
3283
|
props: {
|
|
3168
3284
|
modelValue: {},
|
|
@@ -3170,7 +3286,7 @@ const Kr = {
|
|
|
3170
3286
|
},
|
|
3171
3287
|
emits: ["update:modelValue"],
|
|
3172
3288
|
setup(e, { emit: t }) {
|
|
3173
|
-
const { t: n } =
|
|
3289
|
+
const { t: n } = he({ messages: xe }), a = e, r = t;
|
|
3174
3290
|
function o(i) {
|
|
3175
3291
|
a.disabled || r(
|
|
3176
3292
|
"update:modelValue",
|
|
@@ -3180,33 +3296,33 @@ const Kr = {
|
|
|
3180
3296
|
function s(i) {
|
|
3181
3297
|
return i.replace("x", ":");
|
|
3182
3298
|
}
|
|
3183
|
-
return (i, u) => (
|
|
3184
|
-
h("div",
|
|
3185
|
-
h("div",
|
|
3186
|
-
(
|
|
3187
|
-
key:
|
|
3299
|
+
return (i, u) => (k(), _("div", Qo, [
|
|
3300
|
+
h("div", Yo, E(T(n)("mediaPicker.ratios.title")), 1),
|
|
3301
|
+
h("div", Zo, [
|
|
3302
|
+
(k(!0), _(J, null, me(T(Pn), (d) => (k(), _("button", {
|
|
3303
|
+
key: d,
|
|
3188
3304
|
type: "button",
|
|
3189
|
-
class:
|
|
3190
|
-
e.modelValue.includes(
|
|
3305
|
+
class: te(["h-[30px] px-12 rounded-full border text-[11px] font-semibold transition-colors", [
|
|
3306
|
+
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",
|
|
3191
3307
|
e.disabled ? "opacity-50 cursor-not-allowed" : ""
|
|
3192
3308
|
]]),
|
|
3193
|
-
onClick: (c) => o(
|
|
3194
|
-
},
|
|
3309
|
+
onClick: (c) => o(d)
|
|
3310
|
+
}, E(s(d)), 11, es))), 128))
|
|
3195
3311
|
]),
|
|
3196
|
-
h("div",
|
|
3312
|
+
h("div", ts, E(T(n)("mediaPicker.ratios.hint")), 1)
|
|
3197
3313
|
]));
|
|
3198
3314
|
}
|
|
3199
3315
|
});
|
|
3200
|
-
function
|
|
3316
|
+
function Kt(e) {
|
|
3201
3317
|
return new Promise((t) => {
|
|
3202
3318
|
const n = new Image();
|
|
3203
3319
|
n.onload = () => t({ width: n.naturalWidth || 480, height: n.naturalHeight || 360 }), n.onerror = () => t({ width: 480, height: 360 }), n.src = e;
|
|
3204
3320
|
});
|
|
3205
3321
|
}
|
|
3206
|
-
const
|
|
3322
|
+
const as = { class: "flex flex-wrap items-center gap-8" }, rs = {
|
|
3207
3323
|
key: 1,
|
|
3208
3324
|
class: "inline-flex items-center gap-4 border rounded-full border-gray-300 pl-8 pr-4 h-[28px]"
|
|
3209
|
-
},
|
|
3325
|
+
}, os = ["placeholder"], Tn = /* @__PURE__ */ ge({
|
|
3210
3326
|
__name: "TagFilterBar",
|
|
3211
3327
|
props: {
|
|
3212
3328
|
tags: {},
|
|
@@ -3215,67 +3331,67 @@ const Go = { class: "flex flex-wrap items-center gap-8" }, Ho = {
|
|
|
3215
3331
|
},
|
|
3216
3332
|
emits: ["update:modelValue", "tag-created"],
|
|
3217
3333
|
setup(e, { emit: t }) {
|
|
3218
|
-
const { t: n } =
|
|
3334
|
+
const { t: n } = he({ messages: xe }), a = e, r = t;
|
|
3219
3335
|
function o(u) {
|
|
3220
|
-
r("update:modelValue", a.modelValue.includes(u) ? a.modelValue.filter((
|
|
3336
|
+
r("update:modelValue", a.modelValue.includes(u) ? a.modelValue.filter((d) => d !== u) : [...a.modelValue, u]);
|
|
3221
3337
|
}
|
|
3222
|
-
const s =
|
|
3338
|
+
const s = N("");
|
|
3223
3339
|
function i() {
|
|
3224
3340
|
const u = s.value.trim();
|
|
3225
3341
|
s.value = "", u && (a.modelValue.includes(u) || r("update:modelValue", [...a.modelValue, u]), a.tags.includes(u) || r("tag-created", u));
|
|
3226
3342
|
}
|
|
3227
|
-
return (u,
|
|
3228
|
-
const c =
|
|
3229
|
-
return
|
|
3230
|
-
e.mode === "filter" ? (
|
|
3343
|
+
return (u, d) => {
|
|
3344
|
+
const c = V("FmChip"), p = V("FmIcon");
|
|
3345
|
+
return k(), _("div", as, [
|
|
3346
|
+
e.mode === "filter" ? (k(), re(c, {
|
|
3231
3347
|
key: 0,
|
|
3232
|
-
label:
|
|
3348
|
+
label: T(n)("mediaPicker.tagFilterBar.all"),
|
|
3233
3349
|
selected: e.modelValue.length === 0,
|
|
3234
3350
|
selectable: "",
|
|
3235
|
-
onClick:
|
|
3236
|
-
}, null, 8, ["label", "selected"])) :
|
|
3237
|
-
(
|
|
3238
|
-
key:
|
|
3239
|
-
label:
|
|
3240
|
-
selected: e.modelValue.includes(
|
|
3351
|
+
onClick: d[0] || (d[0] = (w) => r("update:modelValue", []))
|
|
3352
|
+
}, null, 8, ["label", "selected"])) : q("", !0),
|
|
3353
|
+
(k(!0), _(J, null, me(e.tags, (w) => (k(), re(c, {
|
|
3354
|
+
key: w,
|
|
3355
|
+
label: w,
|
|
3356
|
+
selected: e.modelValue.includes(w),
|
|
3241
3357
|
selectable: "",
|
|
3242
|
-
onClick: (
|
|
3358
|
+
onClick: (P) => o(w)
|
|
3243
3359
|
}, null, 8, ["label", "selected", "onClick"]))), 128)),
|
|
3244
|
-
e.mode === "assign" ? (
|
|
3245
|
-
|
|
3246
|
-
"onUpdate:modelValue":
|
|
3247
|
-
placeholder:
|
|
3360
|
+
e.mode === "assign" ? (k(), _("div", rs, [
|
|
3361
|
+
Cn(h("input", {
|
|
3362
|
+
"onUpdate:modelValue": d[1] || (d[1] = (w) => s.value = w),
|
|
3363
|
+
placeholder: T(n)("mediaPicker.tagFilterBar.newTagPlaceholder"),
|
|
3248
3364
|
class: "text-xs outline-none w-[88px]",
|
|
3249
|
-
onKeyup:
|
|
3250
|
-
}, null, 40,
|
|
3251
|
-
[
|
|
3365
|
+
onKeyup: An(i, ["enter"])
|
|
3366
|
+
}, null, 40, os), [
|
|
3367
|
+
[Dn, s.value]
|
|
3252
3368
|
]),
|
|
3253
3369
|
h("button", {
|
|
3254
3370
|
class: "p-2",
|
|
3255
3371
|
onClick: i
|
|
3256
3372
|
}, [
|
|
3257
|
-
|
|
3373
|
+
F(p, {
|
|
3258
3374
|
name: "add",
|
|
3259
3375
|
size: "sm"
|
|
3260
3376
|
})
|
|
3261
3377
|
])
|
|
3262
|
-
])) :
|
|
3378
|
+
])) : q("", !0)
|
|
3263
3379
|
]);
|
|
3264
3380
|
};
|
|
3265
3381
|
}
|
|
3266
|
-
}),
|
|
3382
|
+
}), ss = { class: "space-y-16" }, is = {
|
|
3267
3383
|
key: 0,
|
|
3268
3384
|
class: "space-y-8"
|
|
3269
|
-
},
|
|
3385
|
+
}, ls = { class: "text-xs font-semibold text-gray-500" }, us = ["src"], cs = { class: "flex-1 min-w-0 flex flex-col gap-2" }, ds = { class: "text-xs font-semibold truncate" }, ps = {
|
|
3270
3386
|
key: 0,
|
|
3271
3387
|
class: "text-[11px] text-red-600"
|
|
3272
|
-
},
|
|
3388
|
+
}, fs = {
|
|
3273
3389
|
key: 1,
|
|
3274
3390
|
class: "text-[11px] text-gray-500"
|
|
3275
|
-
},
|
|
3391
|
+
}, ms = ["onClick"], gs = { class: "space-y-8" }, hs = { class: "text-xs font-semibold text-gray-500" }, bs = {
|
|
3276
3392
|
key: 0,
|
|
3277
3393
|
class: "flex flex-wrap items-center gap-8"
|
|
3278
|
-
},
|
|
3394
|
+
}, ys = { class: "text-[11px] text-gray-400" }, vs = ["onClick"], On = /* @__PURE__ */ ge({
|
|
3279
3395
|
__name: "UploadPanel",
|
|
3280
3396
|
props: {
|
|
3281
3397
|
businessId: {},
|
|
@@ -3284,152 +3400,182 @@ const Go = { class: "flex flex-wrap items-center gap-8" }, Ho = {
|
|
|
3284
3400
|
},
|
|
3285
3401
|
emits: ["tag-created", "uploaded"],
|
|
3286
3402
|
setup(e, { expose: t, emit: n }) {
|
|
3287
|
-
const { t: a } =
|
|
3288
|
-
function
|
|
3289
|
-
s.value.forEach((
|
|
3403
|
+
const { t: a } = he({ messages: xe }), r = e, o = n, s = N([]), i = N([]), u = N([]), d = N(!1), c = Q(() => s.value.length), p = Q(() => r.availableTags.filter((g) => !i.value.includes(g)).slice(0, 6));
|
|
3404
|
+
function w() {
|
|
3405
|
+
s.value.forEach((g) => URL.revokeObjectURL(g.previewUrl)), s.value = [], i.value = [], u.value = [];
|
|
3290
3406
|
}
|
|
3291
|
-
async function
|
|
3292
|
-
const
|
|
3407
|
+
async function P(g) {
|
|
3408
|
+
const m = URL.createObjectURL(g), S = {
|
|
3293
3409
|
id: crypto.randomUUID(),
|
|
3294
3410
|
refId: crypto.randomUUID(),
|
|
3295
|
-
file:
|
|
3296
|
-
previewUrl:
|
|
3411
|
+
file: g,
|
|
3412
|
+
previewUrl: m,
|
|
3297
3413
|
dimensions: null,
|
|
3298
3414
|
error: null
|
|
3299
3415
|
};
|
|
3300
|
-
s.value.push(
|
|
3416
|
+
s.value.push(S), S.dimensions = await Kt(m);
|
|
3301
3417
|
}
|
|
3302
|
-
function
|
|
3303
|
-
const
|
|
3304
|
-
|
|
3418
|
+
function b(g) {
|
|
3419
|
+
const m = s.value.find((S) => S.id === g);
|
|
3420
|
+
m && URL.revokeObjectURL(m.previewUrl), s.value = s.value.filter((S) => S.id !== g);
|
|
3305
3421
|
}
|
|
3306
|
-
function v(
|
|
3307
|
-
return
|
|
3422
|
+
function v(g) {
|
|
3423
|
+
return g >= 1024 * 1024 ? `${(g / 1024 / 1024).toFixed(1)} MB` : `${Math.round(g / 1024)} KB`;
|
|
3308
3424
|
}
|
|
3309
|
-
async function g
|
|
3310
|
-
const
|
|
3311
|
-
refType:
|
|
3312
|
-
refId:
|
|
3425
|
+
async function U(g) {
|
|
3426
|
+
const m = g.dimensions ?? await Kt(g.previewUrl), S = g.file.type || "image/jpeg", x = await Zr(r.businessId, {
|
|
3427
|
+
refType: ht,
|
|
3428
|
+
refId: g.refId,
|
|
3313
3429
|
imageId: "main",
|
|
3314
|
-
contentType:
|
|
3315
|
-
fileSize:
|
|
3316
|
-
}), y = await fetch(
|
|
3430
|
+
contentType: S,
|
|
3431
|
+
fileSize: g.file.size
|
|
3432
|
+
}), y = await fetch(x.uploadUrl, { method: "PUT", headers: { "Content-Type": S }, body: g.file });
|
|
3317
3433
|
if (!y.ok)
|
|
3318
3434
|
throw new Error(a("mediaPicker.uploadPanel.uploadFailedError", { status: y.status }));
|
|
3319
|
-
const
|
|
3320
|
-
refType:
|
|
3321
|
-
refId:
|
|
3435
|
+
const G = await eo(r.businessId, {
|
|
3436
|
+
refType: ht,
|
|
3437
|
+
refId: g.refId,
|
|
3322
3438
|
imageId: "main",
|
|
3323
3439
|
restaurantId: r.restaurantId,
|
|
3324
|
-
fileName:
|
|
3325
|
-
width:
|
|
3326
|
-
height:
|
|
3440
|
+
fileName: g.file.name,
|
|
3441
|
+
width: m.width,
|
|
3442
|
+
height: m.height,
|
|
3327
3443
|
aspectRatios: u.value
|
|
3328
3444
|
});
|
|
3329
|
-
return i.value.length ? await
|
|
3445
|
+
return i.value.length ? await Jr(r.businessId, G.asset.id, i.value) : G.asset;
|
|
3330
3446
|
}
|
|
3331
|
-
async function
|
|
3447
|
+
async function f() {
|
|
3332
3448
|
if (!(!s.value.length || !r.businessId)) {
|
|
3333
|
-
|
|
3449
|
+
d.value = !0;
|
|
3334
3450
|
try {
|
|
3335
|
-
const
|
|
3336
|
-
|
|
3337
|
-
y.status === "rejected" ? (
|
|
3338
|
-
}), s.value =
|
|
3451
|
+
const g = s.value, m = await Promise.allSettled(g.map(U)), S = /* @__PURE__ */ new Set(), x = [];
|
|
3452
|
+
m.forEach((y, G) => {
|
|
3453
|
+
y.status === "rejected" ? (S.add(g[G].id), g[G].error = y.reason instanceof Error ? y.reason.message : String(y.reason)) : x.push(y.value);
|
|
3454
|
+
}), s.value = g.filter((y) => S.has(y.id)), x.length > 0 && o("uploaded", x);
|
|
3339
3455
|
} finally {
|
|
3340
|
-
|
|
3456
|
+
d.value = !1;
|
|
3341
3457
|
}
|
|
3342
3458
|
}
|
|
3343
3459
|
}
|
|
3344
|
-
return t({ stagedCount: c, uploading:
|
|
3345
|
-
const
|
|
3346
|
-
return
|
|
3347
|
-
|
|
3348
|
-
label:
|
|
3460
|
+
return t({ stagedCount: c, uploading: d, upload: f, reset: w }), (g, m) => {
|
|
3461
|
+
const S = V("FmDropField"), x = V("FmIcon");
|
|
3462
|
+
return k(), _("div", ss, [
|
|
3463
|
+
F(S, {
|
|
3464
|
+
label: T(a)("mediaPicker.uploadPanel.dropLabel"),
|
|
3349
3465
|
accept: "image/jpeg,image/png,image/webp",
|
|
3350
3466
|
"max-file-size": 10 * 1024 * 1024,
|
|
3351
|
-
onFileUpload:
|
|
3467
|
+
onFileUpload: P
|
|
3352
3468
|
}, {
|
|
3353
|
-
"helper-text":
|
|
3354
|
-
|
|
3469
|
+
"helper-text": fe(() => [
|
|
3470
|
+
ce(E(T(a)("mediaPicker.uploadPanel.helperText")), 1)
|
|
3355
3471
|
]),
|
|
3356
3472
|
_: 1
|
|
3357
3473
|
}, 8, ["label"]),
|
|
3358
|
-
|
|
3474
|
+
F(ns, {
|
|
3359
3475
|
modelValue: u.value,
|
|
3360
|
-
"onUpdate:modelValue":
|
|
3361
|
-
disabled:
|
|
3476
|
+
"onUpdate:modelValue": m[0] || (m[0] = (y) => u.value = y),
|
|
3477
|
+
disabled: d.value
|
|
3362
3478
|
}, null, 8, ["modelValue", "disabled"]),
|
|
3363
|
-
s.value.length ? (
|
|
3364
|
-
h("div",
|
|
3365
|
-
(
|
|
3479
|
+
s.value.length ? (k(), _("div", is, [
|
|
3480
|
+
h("div", ls, E(T(a)("mediaPicker.uploadPanel.stagedCount", { count: s.value.length })), 1),
|
|
3481
|
+
(k(!0), _(J, null, me(s.value, (y) => (k(), _("div", {
|
|
3366
3482
|
key: y.id,
|
|
3367
|
-
class:
|
|
3483
|
+
class: te(["flex items-center gap-12 p-8 border rounded-lg", y.error ? "border-red-300 bg-red-50" : "border-fm-color-neutral-gray-200"])
|
|
3368
3484
|
}, [
|
|
3369
3485
|
h("img", {
|
|
3370
3486
|
src: y.previewUrl,
|
|
3371
3487
|
class: "w-[44px] h-[44px] rounded flex-shrink-0 object-cover"
|
|
3372
|
-
}, null, 8,
|
|
3373
|
-
h("div",
|
|
3374
|
-
h("span",
|
|
3375
|
-
y.error ? (
|
|
3376
|
-
y.dimensions ? (
|
|
3377
|
-
|
|
3378
|
-
], 64)) :
|
|
3379
|
-
|
|
3488
|
+
}, null, 8, us),
|
|
3489
|
+
h("div", cs, [
|
|
3490
|
+
h("span", ds, E(y.file.name), 1),
|
|
3491
|
+
y.error ? (k(), _("span", ps, E(y.error), 1)) : (k(), _("span", fs, [
|
|
3492
|
+
y.dimensions ? (k(), _(J, { key: 0 }, [
|
|
3493
|
+
ce(E(y.dimensions.width) + "×" + E(y.dimensions.height) + " · ", 1)
|
|
3494
|
+
], 64)) : q("", !0),
|
|
3495
|
+
ce(E(v(y.file.size)), 1)
|
|
3380
3496
|
]))
|
|
3381
3497
|
]),
|
|
3382
3498
|
h("button", {
|
|
3383
3499
|
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",
|
|
3384
|
-
onClick: (
|
|
3500
|
+
onClick: (G) => b(y.id)
|
|
3385
3501
|
}, [
|
|
3386
|
-
|
|
3502
|
+
F(x, {
|
|
3387
3503
|
name: "close",
|
|
3388
3504
|
size: "sm"
|
|
3389
3505
|
})
|
|
3390
|
-
], 8,
|
|
3506
|
+
], 8, ms)
|
|
3391
3507
|
], 2))), 128))
|
|
3392
|
-
])) :
|
|
3393
|
-
h("div",
|
|
3394
|
-
h("div",
|
|
3395
|
-
|
|
3508
|
+
])) : q("", !0),
|
|
3509
|
+
h("div", gs, [
|
|
3510
|
+
h("div", hs, E(T(a)("mediaPicker.uploadPanel.tagsLabel")), 1),
|
|
3511
|
+
F(Tn, {
|
|
3396
3512
|
modelValue: i.value,
|
|
3397
|
-
"onUpdate:modelValue":
|
|
3513
|
+
"onUpdate:modelValue": m[1] || (m[1] = (y) => i.value = y),
|
|
3398
3514
|
tags: e.availableTags,
|
|
3399
3515
|
mode: "assign",
|
|
3400
|
-
onTagCreated:
|
|
3516
|
+
onTagCreated: m[2] || (m[2] = (y) => o("tag-created", y))
|
|
3401
3517
|
}, null, 8, ["modelValue", "tags"]),
|
|
3402
|
-
|
|
3403
|
-
h("span",
|
|
3404
|
-
(
|
|
3518
|
+
p.value.length ? (k(), _("div", bs, [
|
|
3519
|
+
h("span", ys, E(T(a)("mediaPicker.uploadPanel.suggestedTagsLabel")), 1),
|
|
3520
|
+
(k(!0), _(J, null, me(p.value, (y) => (k(), _("button", {
|
|
3405
3521
|
key: y,
|
|
3406
3522
|
class: "h-[26px] px-12 rounded-full border border-dashed border-fm-color-neutral-gray-300 text-[11px] font-semibold text-gray-500",
|
|
3407
|
-
onClick: (
|
|
3408
|
-
}, " + " +
|
|
3409
|
-
])) :
|
|
3523
|
+
onClick: (G) => i.value.push(y)
|
|
3524
|
+
}, " + " + E(y), 9, vs))), 128))
|
|
3525
|
+
])) : q("", !0)
|
|
3410
3526
|
])
|
|
3411
3527
|
]);
|
|
3412
3528
|
};
|
|
3413
3529
|
}
|
|
3414
|
-
}),
|
|
3530
|
+
}), ws = 5e3, xs = 3;
|
|
3531
|
+
function Bn(e) {
|
|
3532
|
+
const t = N(/* @__PURE__ */ new Map());
|
|
3533
|
+
let n = [], a, r = 0;
|
|
3534
|
+
function o() {
|
|
3535
|
+
a !== void 0 && clearTimeout(a), a = void 0;
|
|
3536
|
+
}
|
|
3537
|
+
async function s() {
|
|
3538
|
+
let u = !1;
|
|
3539
|
+
try {
|
|
3540
|
+
const d = await Yr({ businessId: e(), refType: ht, refIds: n });
|
|
3541
|
+
t.value = new Map(d.map((c) => [c.refId, c])), r = 0;
|
|
3542
|
+
} catch (d) {
|
|
3543
|
+
if (u = !0, r += 1, r >= xs) {
|
|
3544
|
+
console.warn("[media-picker] stopped polling image variants after repeated failures", d);
|
|
3545
|
+
return;
|
|
3546
|
+
}
|
|
3547
|
+
}
|
|
3548
|
+
([...t.value.values()].some((d) => zr(d.variants)) || u) && (a = setTimeout(s, ws));
|
|
3549
|
+
}
|
|
3550
|
+
async function i(u) {
|
|
3551
|
+
if (o(), r = 0, n = u, u.length === 0 || !e()) {
|
|
3552
|
+
t.value = /* @__PURE__ */ new Map();
|
|
3553
|
+
return;
|
|
3554
|
+
}
|
|
3555
|
+
await s();
|
|
3556
|
+
}
|
|
3557
|
+
return Fn(o), { byRefId: t, load: i, stop: o };
|
|
3558
|
+
}
|
|
3559
|
+
const ks = { class: "w-full flex items-center justify-between gap-16 pr-8" }, Ps = { class: "text-xs font-normal text-fm-color-typo-secondary" }, Es = { class: "flex gap-16 border-b border-fm-color-neutral-gray-200 mb-12" }, Ss = { class: "flex items-center justify-between w-full" }, Rs = {
|
|
3415
3560
|
key: 0,
|
|
3416
3561
|
class: "text-xs text-fm-color-typo-secondary"
|
|
3417
|
-
},
|
|
3562
|
+
}, Ts = { key: 1 }, Os = { class: "flex gap-8" }, Bs = /* @__PURE__ */ ge({
|
|
3418
3563
|
__name: "MediaPickerModal",
|
|
3419
3564
|
props: {
|
|
3420
3565
|
open: { type: Boolean },
|
|
3421
3566
|
businessId: {},
|
|
3422
3567
|
restaurantId: {},
|
|
3423
|
-
selectionMode: { default: "single" }
|
|
3568
|
+
selectionMode: { default: "single" },
|
|
3569
|
+
ratio: {}
|
|
3424
3570
|
},
|
|
3425
3571
|
emits: ["update:open", "select", "confirm"],
|
|
3426
3572
|
setup(e, { emit: t }) {
|
|
3427
|
-
const { t: n } =
|
|
3428
|
-
async function
|
|
3573
|
+
const { t: n } = he({ messages: xe }), a = e, r = t, o = N("browse"), s = N(""), i = N(null), u = N([]), d = Bn(() => a.businessId), c = N([]), p = N(0), w = N([]), P = N(!1);
|
|
3574
|
+
async function b() {
|
|
3429
3575
|
if (a.businessId) {
|
|
3430
|
-
|
|
3576
|
+
P.value = !0;
|
|
3431
3577
|
try {
|
|
3432
|
-
const
|
|
3578
|
+
const C = await rt({
|
|
3433
3579
|
businessId: a.businessId,
|
|
3434
3580
|
restaurantId: a.restaurantId,
|
|
3435
3581
|
search: s.value || void 0,
|
|
@@ -3438,212 +3584,255 @@ const Go = { class: "flex flex-wrap items-center gap-8" }, Ho = {
|
|
|
3438
3584
|
sortBy: "createdAt",
|
|
3439
3585
|
descending: !0
|
|
3440
3586
|
});
|
|
3441
|
-
u.value =
|
|
3587
|
+
u.value = C.resources, await d.load(C.resources.map((R) => R.refId).filter((R) => !!R));
|
|
3442
3588
|
} finally {
|
|
3443
|
-
|
|
3589
|
+
P.value = !1;
|
|
3444
3590
|
}
|
|
3445
3591
|
}
|
|
3446
3592
|
}
|
|
3447
|
-
async function
|
|
3593
|
+
async function v() {
|
|
3448
3594
|
if (!a.businessId)
|
|
3449
3595
|
return;
|
|
3450
|
-
const [
|
|
3451
|
-
|
|
3596
|
+
const [C, R] = await Promise.all([Wr(a.businessId), Sn(a.businessId)]);
|
|
3597
|
+
c.value = C.tags, p.value = C.total, w.value = R;
|
|
3452
3598
|
}
|
|
3453
|
-
|
|
3599
|
+
pe(
|
|
3454
3600
|
() => a.open,
|
|
3455
|
-
(
|
|
3456
|
-
var
|
|
3457
|
-
|
|
3601
|
+
(C) => {
|
|
3602
|
+
var R;
|
|
3603
|
+
C && (o.value = "browse", s.value = "", i.value = null, x.value = /* @__PURE__ */ new Set(), f.value = a.ratio ?? null, (R = M.value) == null || R.reset(), v(), b());
|
|
3458
3604
|
}
|
|
3459
|
-
),
|
|
3460
|
-
let
|
|
3461
|
-
|
|
3462
|
-
clearTimeout(
|
|
3605
|
+
), pe(i, b);
|
|
3606
|
+
let U;
|
|
3607
|
+
pe(s, () => {
|
|
3608
|
+
clearTimeout(U), U = setTimeout(b, 250);
|
|
3463
3609
|
});
|
|
3464
|
-
const
|
|
3465
|
-
|
|
3466
|
-
|
|
3467
|
-
|
|
3610
|
+
const f = N(a.ratio ?? null);
|
|
3611
|
+
pe(
|
|
3612
|
+
() => a.ratio,
|
|
3613
|
+
(C) => f.value = C ?? null
|
|
3614
|
+
);
|
|
3615
|
+
const g = Q(() => a.ratio !== void 0 && a.ratio !== null);
|
|
3616
|
+
function m(C) {
|
|
3617
|
+
var R;
|
|
3618
|
+
return C.refId ? ((R = d.byRefId.value.get(C.refId)) == null ? void 0 : R.variants) ?? [] : [];
|
|
3619
|
+
}
|
|
3620
|
+
const S = Q(() => {
|
|
3621
|
+
const C = /* @__PURE__ */ new Set();
|
|
3622
|
+
if (f.value === null)
|
|
3623
|
+
return C;
|
|
3624
|
+
for (const R of u.value)
|
|
3625
|
+
Jt(R, f.value, m(R)) || C.add(R.id);
|
|
3626
|
+
return C;
|
|
3627
|
+
}), x = N(/* @__PURE__ */ new Set());
|
|
3628
|
+
function y(C) {
|
|
3629
|
+
const R = new Set(x.value);
|
|
3630
|
+
R.has(C.id) ? R.delete(C.id) : (a.selectionMode === "single" && R.clear(), R.add(C.id)), x.value = R;
|
|
3631
|
+
}
|
|
3632
|
+
function G(C) {
|
|
3633
|
+
y(C);
|
|
3468
3634
|
}
|
|
3469
|
-
|
|
3635
|
+
const K = Q(
|
|
3636
|
+
() => u.value.filter((C) => x.value.has(C.id)).map((C) => Jt(C, f.value, m(C))).filter((C) => C !== null)
|
|
3637
|
+
), ne = Q(() => {
|
|
3638
|
+
if (K.value.length !== 1)
|
|
3639
|
+
return null;
|
|
3640
|
+
const C = K.value[0];
|
|
3641
|
+
if (C.ratio === null)
|
|
3642
|
+
return { dimensions: `${C.asset.width}×${C.asset.height}`, sizeBytes: C.asset.fileSizeBytes };
|
|
3643
|
+
const R = m(C.asset).find((ae) => ae.aspectRatio === C.ratio);
|
|
3644
|
+
return !(R != null && R.width) || !(R != null && R.height) || !R.fileSizeBytes ? null : { dimensions: `${R.width}×${R.height}`, sizeBytes: R.fileSizeBytes };
|
|
3645
|
+
});
|
|
3646
|
+
function X() {
|
|
3470
3647
|
if (a.selectionMode === "single") {
|
|
3471
|
-
|
|
3648
|
+
const C = K.value[0];
|
|
3649
|
+
if (!C)
|
|
3650
|
+
return;
|
|
3651
|
+
r("select", C), r("update:open", !1);
|
|
3472
3652
|
return;
|
|
3473
3653
|
}
|
|
3474
|
-
|
|
3654
|
+
r("confirm", K.value), r("update:open", !1);
|
|
3475
3655
|
}
|
|
3476
|
-
|
|
3477
|
-
|
|
3478
|
-
|
|
3656
|
+
const M = N(null);
|
|
3657
|
+
async function W() {
|
|
3658
|
+
var C;
|
|
3659
|
+
(C = M.value) != null && C.stagedCount || (o.value = "browse"), await Promise.all([b(), v()]);
|
|
3479
3660
|
}
|
|
3480
|
-
|
|
3481
|
-
|
|
3482
|
-
|
|
3483
|
-
(y = w.value) != null && y.stagedCount || (o.value = "browse"), await Promise.all([C(), R()]);
|
|
3484
|
-
}
|
|
3485
|
-
return (y, A) => {
|
|
3486
|
-
const ne = M("FmSearch"), J = M("FmButton"), te = M("FmDialog");
|
|
3487
|
-
return x(), Z(te, {
|
|
3661
|
+
return (C, R) => {
|
|
3662
|
+
const ae = V("FmSearch"), H = V("FmButton"), ue = V("FmDialog");
|
|
3663
|
+
return k(), re(ue, {
|
|
3488
3664
|
"model-value": e.open,
|
|
3489
3665
|
"max-width": 900,
|
|
3490
|
-
"onUpdate:modelValue":
|
|
3666
|
+
"onUpdate:modelValue": R[8] || (R[8] = (j) => !j && r("update:open", !1))
|
|
3491
3667
|
}, {
|
|
3492
|
-
"dialog-header":
|
|
3493
|
-
h("div",
|
|
3668
|
+
"dialog-header": fe(() => [
|
|
3669
|
+
h("div", ks, [
|
|
3494
3670
|
h("div", null, [
|
|
3495
|
-
h("div", null,
|
|
3496
|
-
h("div",
|
|
3671
|
+
h("div", null, E(T(n)("mediaPicker.pickerModal.title")), 1),
|
|
3672
|
+
h("div", Ps, E(e.selectionMode === "multiple" ? T(n)("mediaPicker.pickerModal.subtitleMultiple") : T(n)("mediaPicker.pickerModal.subtitleSingle")), 1)
|
|
3497
3673
|
]),
|
|
3498
|
-
o.value === "browse" ? (
|
|
3674
|
+
o.value === "browse" ? (k(), re(ae, {
|
|
3499
3675
|
key: 0,
|
|
3500
3676
|
modelValue: s.value,
|
|
3501
|
-
"onUpdate:modelValue":
|
|
3502
|
-
placeholder:
|
|
3677
|
+
"onUpdate:modelValue": R[0] || (R[0] = (j) => s.value = j),
|
|
3678
|
+
placeholder: T(n)("mediaPicker.pickerModal.searchPlaceholder"),
|
|
3503
3679
|
class: "w-[200px] shrink-0"
|
|
3504
|
-
}, null, 8, ["modelValue", "placeholder"])) :
|
|
3680
|
+
}, null, 8, ["modelValue", "placeholder"])) : q("", !0)
|
|
3505
3681
|
])
|
|
3506
3682
|
]),
|
|
3507
|
-
"dialog-footer":
|
|
3508
|
-
var j,
|
|
3683
|
+
"dialog-footer": fe(() => {
|
|
3684
|
+
var j, Pe;
|
|
3509
3685
|
return [
|
|
3510
|
-
h("div",
|
|
3511
|
-
o.value === "browse"
|
|
3512
|
-
|
|
3513
|
-
|
|
3514
|
-
], 64)) : (
|
|
3515
|
-
|
|
3686
|
+
h("div", Ss, [
|
|
3687
|
+
o.value === "browse" ? (k(), _("span", Rs, [
|
|
3688
|
+
x.value.size ? (k(), _(J, { key: 0 }, [
|
|
3689
|
+
ce(E(T(n)("mediaPicker.pickerModal.selectedCount", { count: x.value.size })), 1)
|
|
3690
|
+
], 64)) : (k(), _(J, { key: 1 }, [
|
|
3691
|
+
ce(E(T(n)("mediaPicker.pickerModal.selectPrompt")), 1)
|
|
3516
3692
|
], 64))
|
|
3517
|
-
])) : (
|
|
3518
|
-
h("div",
|
|
3519
|
-
|
|
3520
|
-
label:
|
|
3693
|
+
])) : (k(), _("span", Ts)),
|
|
3694
|
+
h("div", Os, [
|
|
3695
|
+
F(H, {
|
|
3696
|
+
label: T(n)("mediaPicker.pickerModal.cancelButton"),
|
|
3521
3697
|
variant: "tertiary",
|
|
3522
|
-
onClick:
|
|
3698
|
+
onClick: R[6] || (R[6] = (le) => r("update:open", !1))
|
|
3523
3699
|
}, null, 8, ["label"]),
|
|
3524
|
-
o.value === "upload" ? (
|
|
3700
|
+
o.value === "upload" ? (k(), re(H, {
|
|
3525
3701
|
key: 0,
|
|
3526
|
-
label:
|
|
3702
|
+
label: T(n)("mediaPicker.pickerModal.uploadSubmitButton", { count: ((j = M.value) == null ? void 0 : j.stagedCount) ?? 0 }),
|
|
3527
3703
|
variant: "primary",
|
|
3528
|
-
disabled: !((
|
|
3529
|
-
onClick:
|
|
3530
|
-
var
|
|
3531
|
-
return (
|
|
3704
|
+
disabled: !((Pe = M.value) != null && Pe.stagedCount) || M.value.uploading,
|
|
3705
|
+
onClick: R[7] || (R[7] = (le) => {
|
|
3706
|
+
var O;
|
|
3707
|
+
return (O = M.value) == null ? void 0 : O.upload();
|
|
3532
3708
|
})
|
|
3533
|
-
}, null, 8, ["label", "disabled"])) :
|
|
3709
|
+
}, null, 8, ["label", "disabled"])) : (k(), re(H, {
|
|
3534
3710
|
key: 1,
|
|
3535
|
-
label:
|
|
3711
|
+
label: T(n)("mediaPicker.pickerModal.confirmButton"),
|
|
3536
3712
|
variant: "primary",
|
|
3537
|
-
disabled:
|
|
3538
|
-
onClick:
|
|
3539
|
-
}, null, 8, ["label", "disabled"]))
|
|
3713
|
+
disabled: K.value.length === 0,
|
|
3714
|
+
onClick: X
|
|
3715
|
+
}, null, 8, ["label", "disabled"]))
|
|
3540
3716
|
])
|
|
3541
3717
|
])
|
|
3542
3718
|
];
|
|
3543
3719
|
}),
|
|
3544
|
-
default:
|
|
3545
|
-
h("div",
|
|
3720
|
+
default: fe(() => [
|
|
3721
|
+
h("div", Es, [
|
|
3546
3722
|
h("button", {
|
|
3547
|
-
class:
|
|
3548
|
-
onClick:
|
|
3549
|
-
},
|
|
3723
|
+
class: te(["pb-8 px-4 text-sm", o.value === "browse" ? "font-semibold border-b-2 border-[--fm-color-brand-primary,#FF7823]" : "text-gray-500"]),
|
|
3724
|
+
onClick: R[1] || (R[1] = (j) => o.value = "browse")
|
|
3725
|
+
}, E(T(n)("mediaPicker.pickerModal.browseTab")), 3),
|
|
3550
3726
|
h("button", {
|
|
3551
|
-
class:
|
|
3552
|
-
onClick:
|
|
3553
|
-
},
|
|
3727
|
+
class: te(["pb-8 px-4 text-sm", o.value === "upload" ? "font-semibold border-b-2 border-[--fm-color-brand-primary,#FF7823]" : "text-gray-500"]),
|
|
3728
|
+
onClick: R[2] || (R[2] = (j) => o.value = "upload")
|
|
3729
|
+
}, E(T(n)("mediaPicker.pickerModal.uploadTab")), 3)
|
|
3554
3730
|
]),
|
|
3555
|
-
o.value === "browse" ? (
|
|
3556
|
-
|
|
3731
|
+
o.value === "browse" ? (k(), _(J, { key: 0 }, [
|
|
3732
|
+
c.value.length ? (k(), re($o, {
|
|
3557
3733
|
key: 0,
|
|
3558
3734
|
modelValue: i.value,
|
|
3559
|
-
"onUpdate:modelValue":
|
|
3560
|
-
tags:
|
|
3561
|
-
total:
|
|
3735
|
+
"onUpdate:modelValue": R[3] || (R[3] = (j) => i.value = j),
|
|
3736
|
+
tags: c.value,
|
|
3737
|
+
total: p.value,
|
|
3562
3738
|
class: "mb-12"
|
|
3563
|
-
}, null, 8, ["modelValue", "tags", "total"])) :
|
|
3564
|
-
|
|
3739
|
+
}, null, 8, ["modelValue", "tags", "total"])) : q("", !0),
|
|
3740
|
+
F(Rn, {
|
|
3565
3741
|
assets: u.value,
|
|
3566
|
-
loading:
|
|
3567
|
-
selectable:
|
|
3568
|
-
"selected-ids":
|
|
3569
|
-
|
|
3570
|
-
|
|
3571
|
-
|
|
3572
|
-
|
|
3742
|
+
loading: P.value,
|
|
3743
|
+
selectable: "",
|
|
3744
|
+
"selected-ids": x.value,
|
|
3745
|
+
"variants-by-ref-id": T(d).byRefId.value,
|
|
3746
|
+
"unavailable-ids": S.value,
|
|
3747
|
+
onOpen: G,
|
|
3748
|
+
onToggle: y
|
|
3749
|
+
}, null, 8, ["assets", "loading", "selected-ids", "variants-by-ref-id", "unavailable-ids"]),
|
|
3750
|
+
e.selectionMode === "single" ? (k(), re(Xo, {
|
|
3751
|
+
key: 1,
|
|
3752
|
+
modelValue: f.value,
|
|
3753
|
+
"onUpdate:modelValue": R[4] || (R[4] = (j) => f.value = j),
|
|
3754
|
+
facts: ne.value,
|
|
3755
|
+
locked: g.value,
|
|
3756
|
+
class: "mt-12"
|
|
3757
|
+
}, null, 8, ["modelValue", "facts", "locked"])) : q("", !0)
|
|
3758
|
+
], 64)) : (k(), re(On, {
|
|
3573
3759
|
key: 1,
|
|
3574
3760
|
ref_key: "uploadPanelRef",
|
|
3575
|
-
ref:
|
|
3761
|
+
ref: M,
|
|
3576
3762
|
"business-id": e.businessId,
|
|
3577
3763
|
"restaurant-id": e.restaurantId,
|
|
3578
|
-
"available-tags":
|
|
3579
|
-
onTagCreated:
|
|
3580
|
-
onUploaded:
|
|
3764
|
+
"available-tags": w.value,
|
|
3765
|
+
onTagCreated: R[5] || (R[5] = (j) => w.value.push(j)),
|
|
3766
|
+
onUploaded: W
|
|
3581
3767
|
}, null, 8, ["business-id", "restaurant-id", "available-tags"]))
|
|
3582
3768
|
]),
|
|
3583
3769
|
_: 1
|
|
3584
3770
|
}, 8, ["model-value"]);
|
|
3585
3771
|
};
|
|
3586
3772
|
}
|
|
3587
|
-
}),
|
|
3773
|
+
}), _s = { class: "relative flex-1 min-w-0 bg-gray-900 flex items-center justify-center overflow-hidden" }, Cs = ["src", "alt"], As = {
|
|
3588
3774
|
key: 1,
|
|
3589
3775
|
class: "flex flex-col items-center gap-12 text-center px-24"
|
|
3590
|
-
},
|
|
3776
|
+
}, Ds = { class: "text-sm text-white" }, Fs = { class: "absolute top-8 left-8 bg-black/70 text-white text-[11px] font-semibold px-8 py-[2px] rounded" }, Ns = { class: "absolute bottom-12 left-1/2 -translate-x-1/2 flex items-center gap-8" }, Us = ["onClick"], Is = /* @__PURE__ */ ge({
|
|
3591
3777
|
__name: "VariantCarousel",
|
|
3592
|
-
props: {
|
|
3778
|
+
props: /* @__PURE__ */ dt({
|
|
3593
3779
|
original: {},
|
|
3594
3780
|
variants: {},
|
|
3595
3781
|
alt: {}
|
|
3596
|
-
},
|
|
3597
|
-
|
|
3782
|
+
}, {
|
|
3783
|
+
index: { default: 0 },
|
|
3784
|
+
indexModifiers: {}
|
|
3785
|
+
}),
|
|
3786
|
+
emits: /* @__PURE__ */ dt(["regenerate"], ["update:index"]),
|
|
3598
3787
|
setup(e, { emit: t }) {
|
|
3599
|
-
const { t: n } =
|
|
3600
|
-
|
|
3601
|
-
|
|
3788
|
+
const { t: n } = he({ messages: xe }), a = e, r = t, o = Xt(e, "index"), s = Q(() => En(a.original, a.variants));
|
|
3789
|
+
pe(s, (c) => {
|
|
3790
|
+
o.value > c.length - 1 && (o.value = c.length - 1);
|
|
3602
3791
|
});
|
|
3603
|
-
const i =
|
|
3792
|
+
const i = Q(() => s.value[o.value]);
|
|
3604
3793
|
function u(c) {
|
|
3605
|
-
const
|
|
3606
|
-
|
|
3794
|
+
const p = s.value.length;
|
|
3795
|
+
o.value = (o.value + c + p) % p;
|
|
3607
3796
|
}
|
|
3608
|
-
function
|
|
3797
|
+
function d(c) {
|
|
3609
3798
|
return c ? c.replace("x", ":") : "";
|
|
3610
3799
|
}
|
|
3611
|
-
return (c,
|
|
3612
|
-
var
|
|
3613
|
-
const
|
|
3614
|
-
return
|
|
3615
|
-
(
|
|
3800
|
+
return (c, p) => {
|
|
3801
|
+
var w, P, b, v;
|
|
3802
|
+
const U = V("FmIcon"), f = V("FmButton");
|
|
3803
|
+
return k(), _("div", _s, [
|
|
3804
|
+
(w = i.value) != null && w.url ? (k(), _("img", {
|
|
3616
3805
|
key: 0,
|
|
3617
3806
|
src: i.value.url,
|
|
3618
3807
|
alt: e.alt,
|
|
3619
3808
|
class: "max-w-full max-h-full object-contain"
|
|
3620
|
-
}, null, 8,
|
|
3621
|
-
|
|
3809
|
+
}, null, 8, Cs)) : i.value ? (k(), _("div", As, [
|
|
3810
|
+
F(U, {
|
|
3622
3811
|
name: "error",
|
|
3623
3812
|
size: "lg",
|
|
3624
3813
|
color: "white"
|
|
3625
3814
|
}),
|
|
3626
|
-
h("span",
|
|
3627
|
-
|
|
3628
|
-
label:
|
|
3815
|
+
h("span", Ds, E(T(n)("mediaPicker.variants.failed")), 1),
|
|
3816
|
+
F(f, {
|
|
3817
|
+
label: T(n)("mediaPicker.variants.regenerate"),
|
|
3629
3818
|
variant: "secondary",
|
|
3630
3819
|
size: "md",
|
|
3631
3820
|
"prepend-icon": "refresh",
|
|
3632
|
-
onClick:
|
|
3821
|
+
onClick: p[0] || (p[0] = (g) => i.value.ratio && r("regenerate", i.value.ratio))
|
|
3633
3822
|
}, null, 8, ["label"])
|
|
3634
|
-
])) :
|
|
3635
|
-
h("span",
|
|
3636
|
-
|
|
3637
|
-
((v = i.value) == null ? void 0 : v.status) === "pending" ? (
|
|
3638
|
-
|
|
3639
|
-
], 64)) :
|
|
3823
|
+
])) : q("", !0),
|
|
3824
|
+
h("span", Fs, [
|
|
3825
|
+
ce(E(((P = i.value) == null ? void 0 : P.kind) === "original" ? T(n)("mediaPicker.variants.original") : d(((b = i.value) == null ? void 0 : b.ratio) ?? null)) + " ", 1),
|
|
3826
|
+
((v = i.value) == null ? void 0 : v.status) === "pending" ? (k(), _(J, { key: 0 }, [
|
|
3827
|
+
ce(" · " + E(T(n)("mediaPicker.variants.generating")), 1)
|
|
3828
|
+
], 64)) : q("", !0)
|
|
3640
3829
|
]),
|
|
3641
|
-
|
|
3830
|
+
s.value.length > 1 ? (k(), _(J, { key: 2 }, [
|
|
3642
3831
|
h("button", {
|
|
3643
3832
|
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",
|
|
3644
|
-
onClick:
|
|
3833
|
+
onClick: p[1] || (p[1] = (g) => u(-1))
|
|
3645
3834
|
}, [
|
|
3646
|
-
|
|
3835
|
+
F(U, {
|
|
3647
3836
|
name: "chevron_left",
|
|
3648
3837
|
size: "sm",
|
|
3649
3838
|
color: "white"
|
|
@@ -3651,38 +3840,38 @@ const Go = { class: "flex flex-wrap items-center gap-8" }, Ho = {
|
|
|
3651
3840
|
]),
|
|
3652
3841
|
h("button", {
|
|
3653
3842
|
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",
|
|
3654
|
-
onClick:
|
|
3843
|
+
onClick: p[2] || (p[2] = (g) => u(1))
|
|
3655
3844
|
}, [
|
|
3656
|
-
|
|
3845
|
+
F(U, {
|
|
3657
3846
|
name: "chevron_right",
|
|
3658
3847
|
size: "sm",
|
|
3659
3848
|
color: "white"
|
|
3660
3849
|
})
|
|
3661
3850
|
]),
|
|
3662
|
-
h("div",
|
|
3663
|
-
(
|
|
3664
|
-
key:
|
|
3665
|
-
class:
|
|
3666
|
-
onClick: (
|
|
3667
|
-
}, null, 10,
|
|
3851
|
+
h("div", Ns, [
|
|
3852
|
+
(k(!0), _(J, null, me(s.value, (g, m) => (k(), _("button", {
|
|
3853
|
+
key: g.key,
|
|
3854
|
+
class: te(["w-[8px] h-[8px] rounded-full", m === o.value ? "bg-white" : "bg-white/40"]),
|
|
3855
|
+
onClick: (S) => o.value = m
|
|
3856
|
+
}, null, 10, Us))), 128))
|
|
3668
3857
|
])
|
|
3669
|
-
], 64)) :
|
|
3858
|
+
], 64)) : q("", !0)
|
|
3670
3859
|
]);
|
|
3671
3860
|
};
|
|
3672
3861
|
}
|
|
3673
|
-
}),
|
|
3862
|
+
}), Ls = {
|
|
3674
3863
|
key: 0,
|
|
3675
3864
|
class: "flex h-[620px]"
|
|
3676
|
-
},
|
|
3865
|
+
}, js = { class: "w-[320px] flex-shrink-0 flex flex-col gap-12 p-16 overflow-y-auto" }, Ms = { class: "flex items-center justify-between" }, zs = { class: "fm-typo-en-title-sm-600" }, Vs = {
|
|
3677
3866
|
key: 0,
|
|
3678
3867
|
class: "flex items-start gap-8"
|
|
3679
|
-
},
|
|
3868
|
+
}, qs = { class: "flex-1 text-sm font-semibold break-all" }, $s = {
|
|
3680
3869
|
key: 1,
|
|
3681
3870
|
class: "flex gap-8"
|
|
3682
|
-
},
|
|
3871
|
+
}, Gs = { class: "text-xs space-y-8 border-t pt-8" }, Ws = { class: "flex justify-between" }, Hs = { class: "text-gray-500" }, Js = { class: "font-semibold" }, Ks = { class: "flex justify-between" }, Xs = { class: "text-gray-500" }, Qs = { class: "flex justify-between" }, Ys = { class: "text-gray-500" }, Zs = { class: "flex justify-between" }, ei = { class: "text-gray-500" }, ti = {
|
|
3683
3872
|
key: 2,
|
|
3684
3873
|
class: "flex flex-wrap gap-4"
|
|
3685
|
-
},
|
|
3874
|
+
}, ni = { class: "flex gap-8 border-t pt-12" }, ai = /* @__PURE__ */ ge({
|
|
3686
3875
|
__name: "AssetDetailDialog",
|
|
3687
3876
|
props: {
|
|
3688
3877
|
asset: {},
|
|
@@ -3691,149 +3880,181 @@ const Go = { class: "flex flex-wrap items-center gap-8" }, Ho = {
|
|
|
3691
3880
|
},
|
|
3692
3881
|
emits: ["close", "renamed", "deleted", "changed"],
|
|
3693
3882
|
setup(e, { emit: t }) {
|
|
3694
|
-
const n =
|
|
3695
|
-
|
|
3883
|
+
const n = Yt(), { t: a } = he({ messages: xe }), r = e, o = t, s = N(!1), i = N("");
|
|
3884
|
+
pe(
|
|
3696
3885
|
() => r.asset,
|
|
3697
|
-
(
|
|
3698
|
-
s.value = !1, i.value = (
|
|
3886
|
+
(x) => {
|
|
3887
|
+
s.value = !1, i.value = (x == null ? void 0 : x.fileName) ?? "";
|
|
3699
3888
|
}
|
|
3700
3889
|
);
|
|
3701
3890
|
function u() {
|
|
3702
|
-
var
|
|
3703
|
-
i.value = ((
|
|
3891
|
+
var x;
|
|
3892
|
+
i.value = ((x = r.asset) == null ? void 0 : x.fileName) ?? "", s.value = !0;
|
|
3704
3893
|
}
|
|
3705
|
-
async function
|
|
3706
|
-
r.asset && (await
|
|
3894
|
+
async function d() {
|
|
3895
|
+
r.asset && (await Hr(r.businessId, r.asset.id, i.value), s.value = !1, o("renamed"));
|
|
3707
3896
|
}
|
|
3708
3897
|
function c() {
|
|
3709
3898
|
if (!r.asset)
|
|
3710
3899
|
return;
|
|
3711
|
-
const
|
|
3900
|
+
const x = r.asset;
|
|
3712
3901
|
n.open({
|
|
3713
3902
|
title: a("mediaPicker.assetDetailDialog.deleteDialogTitle"),
|
|
3714
3903
|
message: a("mediaPicker.assetDetailDialog.deleteDialogMessage", {
|
|
3715
|
-
fileName:
|
|
3904
|
+
fileName: x.fileName,
|
|
3716
3905
|
disclaimer: a("mediaPicker.assetDetailDialog.deleteDisclaimer")
|
|
3717
3906
|
}),
|
|
3718
3907
|
primaryActions: { text: a("mediaPicker.assetDetailDialog.deleteConfirmButton"), close: !1, variant: "destructive" },
|
|
3719
3908
|
secondaryActions: { text: a("mediaPicker.assetDetailDialog.cancelButton"), close: !0 }
|
|
3720
3909
|
}).onPrimary(async () => {
|
|
3721
|
-
await
|
|
3910
|
+
await bt(r.businessId, x), o("deleted", x.id), n.close();
|
|
3722
3911
|
});
|
|
3723
3912
|
}
|
|
3724
|
-
const
|
|
3725
|
-
|
|
3726
|
-
|
|
3727
|
-
|
|
3728
|
-
|
|
3913
|
+
const p = N(0), w = Q(() => {
|
|
3914
|
+
var x, y, G, K, ne, X;
|
|
3915
|
+
return {
|
|
3916
|
+
url: ((x = r.image) == null ? void 0 : x.original.url) ?? ((y = r.asset) == null ? void 0 : y.url) ?? "",
|
|
3917
|
+
width: ((G = r.image) == null ? void 0 : G.original.width) ?? ((K = r.asset) == null ? void 0 : K.width),
|
|
3918
|
+
height: ((ne = r.image) == null ? void 0 : ne.original.height) ?? ((X = r.asset) == null ? void 0 : X.height)
|
|
3919
|
+
};
|
|
3920
|
+
}), P = Q(
|
|
3921
|
+
() => {
|
|
3922
|
+
var x;
|
|
3923
|
+
return r.asset ? En(w.value, ((x = r.image) == null ? void 0 : x.variants) ?? []) : [];
|
|
3924
|
+
}
|
|
3925
|
+
);
|
|
3926
|
+
pe(() => {
|
|
3927
|
+
var x;
|
|
3928
|
+
return (x = r.asset) == null ? void 0 : x.id;
|
|
3929
|
+
}, () => p.value = 0);
|
|
3930
|
+
const b = Q(() => {
|
|
3931
|
+
var x;
|
|
3932
|
+
const y = P.value[p.value];
|
|
3933
|
+
return !y || !r.asset ? null : $r(y, r.asset, ((x = r.image) == null ? void 0 : x.variants) ?? []);
|
|
3934
|
+
}), v = Q(
|
|
3935
|
+
() => {
|
|
3936
|
+
var x;
|
|
3937
|
+
return (x = b.value) != null && x.ratio ? b.value.ratio.replace("x", ":") : a("mediaPicker.variants.original");
|
|
3938
|
+
}
|
|
3939
|
+
), U = N(!1);
|
|
3940
|
+
async function f(x) {
|
|
3941
|
+
var y;
|
|
3942
|
+
if (!(!((y = r.asset) != null && y.refType) || !r.asset.refId || U.value)) {
|
|
3943
|
+
U.value = !0;
|
|
3729
3944
|
try {
|
|
3730
|
-
await
|
|
3945
|
+
await Xr(r.businessId, {
|
|
3731
3946
|
refType: r.asset.refType,
|
|
3732
3947
|
refId: r.asset.refId,
|
|
3733
3948
|
imageId: r.asset.imageId ?? "main",
|
|
3734
|
-
aspectRatios: [
|
|
3949
|
+
aspectRatios: [x],
|
|
3735
3950
|
mode: "append"
|
|
3736
3951
|
}), o("changed");
|
|
3737
3952
|
} finally {
|
|
3738
|
-
|
|
3953
|
+
U.value = !1;
|
|
3739
3954
|
}
|
|
3740
3955
|
}
|
|
3741
3956
|
}
|
|
3742
|
-
function
|
|
3743
|
-
var
|
|
3744
|
-
|
|
3957
|
+
function g() {
|
|
3958
|
+
var x;
|
|
3959
|
+
b.value && ((x = navigator.clipboard) == null || x.writeText(b.value.url));
|
|
3745
3960
|
}
|
|
3746
|
-
function
|
|
3747
|
-
var
|
|
3748
|
-
return ((
|
|
3961
|
+
function m(x) {
|
|
3962
|
+
var y;
|
|
3963
|
+
return ((y = x.split("/")[1]) == null ? void 0 : y.toUpperCase()) ?? x;
|
|
3749
3964
|
}
|
|
3750
|
-
function
|
|
3751
|
-
return
|
|
3965
|
+
function S(x) {
|
|
3966
|
+
return x >= 1024 * 1024 ? `${(x / 1024 / 1024).toFixed(1)} MB` : `${Math.round(x / 1024)} KB`;
|
|
3752
3967
|
}
|
|
3753
|
-
return (
|
|
3754
|
-
const
|
|
3755
|
-
return
|
|
3968
|
+
return (x, y) => {
|
|
3969
|
+
const G = V("FmIcon"), K = V("FmTextField"), ne = V("FmButton"), X = V("FmDialog");
|
|
3970
|
+
return k(), re(X, {
|
|
3756
3971
|
"model-value": !!e.asset,
|
|
3757
3972
|
"max-width": 920,
|
|
3758
3973
|
"max-height": "620px",
|
|
3759
3974
|
"content-class": "!p-0 asset-preview-dialog-content",
|
|
3760
3975
|
"close-button": !1,
|
|
3761
|
-
"onUpdate:modelValue":
|
|
3976
|
+
"onUpdate:modelValue": y[3] || (y[3] = (M) => !M && o("close"))
|
|
3762
3977
|
}, {
|
|
3763
|
-
default:
|
|
3764
|
-
var
|
|
3978
|
+
default: fe(() => {
|
|
3979
|
+
var M, W, C, R, ae;
|
|
3765
3980
|
return [
|
|
3766
|
-
e.asset ? (
|
|
3767
|
-
|
|
3768
|
-
|
|
3769
|
-
|
|
3981
|
+
e.asset ? (k(), _("div", Ls, [
|
|
3982
|
+
F(Is, {
|
|
3983
|
+
index: p.value,
|
|
3984
|
+
"onUpdate:index": y[0] || (y[0] = (H) => p.value = H),
|
|
3985
|
+
original: w.value,
|
|
3986
|
+
variants: ((M = e.image) == null ? void 0 : M.variants) ?? [],
|
|
3770
3987
|
alt: e.asset.fileName,
|
|
3771
|
-
onRegenerate:
|
|
3772
|
-
}, null, 8, ["original", "variants", "alt"]),
|
|
3773
|
-
h("div",
|
|
3774
|
-
h("div",
|
|
3775
|
-
h("span",
|
|
3988
|
+
onRegenerate: f
|
|
3989
|
+
}, null, 8, ["index", "original", "variants", "alt"]),
|
|
3990
|
+
h("div", js, [
|
|
3991
|
+
h("div", Ms, [
|
|
3992
|
+
h("span", zs, E(T(a)("mediaPicker.assetDetailDialog.previewTitle")), 1),
|
|
3776
3993
|
h("button", {
|
|
3777
3994
|
class: "w-[32px] h-[32px] rounded-lg bg-fm-color-neutral-gray-100 flex items-center justify-center flex-shrink-0",
|
|
3778
|
-
onClick:
|
|
3995
|
+
onClick: y[1] || (y[1] = (H) => o("close"))
|
|
3779
3996
|
}, [
|
|
3780
|
-
|
|
3997
|
+
F(G, {
|
|
3781
3998
|
name: "close",
|
|
3782
3999
|
size: "sm"
|
|
3783
4000
|
})
|
|
3784
4001
|
])
|
|
3785
4002
|
]),
|
|
3786
|
-
s.value ? (
|
|
3787
|
-
|
|
4003
|
+
s.value ? (k(), _("div", $s, [
|
|
4004
|
+
F(K, {
|
|
3788
4005
|
modelValue: i.value,
|
|
3789
|
-
"onUpdate:modelValue":
|
|
4006
|
+
"onUpdate:modelValue": y[2] || (y[2] = (H) => i.value = H)
|
|
3790
4007
|
}, null, 8, ["modelValue"]),
|
|
3791
|
-
|
|
3792
|
-
label:
|
|
4008
|
+
F(ne, {
|
|
4009
|
+
label: T(a)("mediaPicker.assetDetailDialog.saveButton"),
|
|
3793
4010
|
size: "md",
|
|
3794
|
-
onClick:
|
|
4011
|
+
onClick: d
|
|
3795
4012
|
}, null, 8, ["label"])
|
|
3796
|
-
])) : (
|
|
3797
|
-
h("span",
|
|
4013
|
+
])) : (k(), _("div", Vs, [
|
|
4014
|
+
h("span", qs, E(e.asset.fileName), 1),
|
|
3798
4015
|
h("button", { onClick: u }, [
|
|
3799
|
-
|
|
4016
|
+
F(G, {
|
|
3800
4017
|
name: "edit",
|
|
3801
4018
|
size: "sm"
|
|
3802
4019
|
})
|
|
3803
4020
|
])
|
|
3804
4021
|
])),
|
|
3805
|
-
h("div",
|
|
3806
|
-
h("div",
|
|
3807
|
-
h("span",
|
|
3808
|
-
h("span",
|
|
4022
|
+
h("div", Gs, [
|
|
4023
|
+
h("div", Ws, [
|
|
4024
|
+
h("span", Hs, E(T(a)("mediaPicker.ratios.title")), 1),
|
|
4025
|
+
h("span", Js, E(v.value), 1)
|
|
4026
|
+
]),
|
|
4027
|
+
h("div", Ks, [
|
|
4028
|
+
h("span", Xs, E(T(a)("mediaPicker.assetDetailDialog.dimensionsLabel")), 1),
|
|
4029
|
+
h("span", null, E(((W = b.value) == null ? void 0 : W.dimensions) ?? "—"), 1)
|
|
3809
4030
|
]),
|
|
3810
|
-
h("div",
|
|
3811
|
-
h("span",
|
|
3812
|
-
h("span", null,
|
|
4031
|
+
h("div", Qs, [
|
|
4032
|
+
h("span", Ys, E(T(a)("mediaPicker.assetDetailDialog.sizeLabel")), 1),
|
|
4033
|
+
h("span", null, E((C = b.value) != null && C.sizeBytes ? S(b.value.sizeBytes) : "—"), 1)
|
|
3813
4034
|
]),
|
|
3814
|
-
h("div",
|
|
3815
|
-
h("span",
|
|
3816
|
-
h("span", null,
|
|
4035
|
+
h("div", Zs, [
|
|
4036
|
+
h("span", ei, E(T(a)("mediaPicker.assetDetailDialog.formatLabel")), 1),
|
|
4037
|
+
h("span", null, E((R = b.value) != null && R.contentType ? m(b.value.contentType) : "—"), 1)
|
|
3817
4038
|
])
|
|
3818
4039
|
]),
|
|
3819
|
-
(
|
|
3820
|
-
(
|
|
3821
|
-
key:
|
|
4040
|
+
(ae = e.asset.tags) != null && ae.length ? (k(), _("div", ti, [
|
|
4041
|
+
(k(!0), _(J, null, me(e.asset.tags, (H) => (k(), _("span", {
|
|
4042
|
+
key: H,
|
|
3822
4043
|
class: "text-[11px] bg-gray-100 rounded-full px-8 py-[2px]"
|
|
3823
|
-
}, " # " +
|
|
3824
|
-
])) :
|
|
3825
|
-
|
|
3826
|
-
h("div",
|
|
3827
|
-
|
|
3828
|
-
label:
|
|
4044
|
+
}, " # " + E(H), 1))), 128))
|
|
4045
|
+
])) : q("", !0),
|
|
4046
|
+
y[4] || (y[4] = h("div", { class: "flex-1" }, null, -1)),
|
|
4047
|
+
h("div", ni, [
|
|
4048
|
+
F(ne, {
|
|
4049
|
+
label: T(a)("mediaPicker.assetDetailDialog.copyLinkButton"),
|
|
3829
4050
|
variant: "tertiary",
|
|
3830
4051
|
size: "md",
|
|
3831
4052
|
"prepend-icon": "link",
|
|
3832
4053
|
class: "flex-1",
|
|
3833
|
-
onClick:
|
|
4054
|
+
onClick: g
|
|
3834
4055
|
}, null, 8, ["label"]),
|
|
3835
|
-
|
|
3836
|
-
label:
|
|
4056
|
+
F(ne, {
|
|
4057
|
+
label: T(a)("mediaPicker.assetDetailDialog.deleteButton"),
|
|
3837
4058
|
variant: "destructive",
|
|
3838
4059
|
size: "md",
|
|
3839
4060
|
"prepend-icon": "delete",
|
|
@@ -3841,106 +4062,77 @@ const Go = { class: "flex flex-wrap items-center gap-8" }, Ho = {
|
|
|
3841
4062
|
}, null, 8, ["label"])
|
|
3842
4063
|
])
|
|
3843
4064
|
])
|
|
3844
|
-
])) :
|
|
4065
|
+
])) : q("", !0)
|
|
3845
4066
|
];
|
|
3846
4067
|
}),
|
|
3847
4068
|
_: 1
|
|
3848
4069
|
}, 8, ["model-value"]);
|
|
3849
4070
|
};
|
|
3850
4071
|
}
|
|
3851
|
-
}),
|
|
3852
|
-
function qs(e) {
|
|
3853
|
-
const t = F(/* @__PURE__ */ new Map());
|
|
3854
|
-
let n = [], a, r = 0;
|
|
3855
|
-
function o() {
|
|
3856
|
-
a !== void 0 && clearTimeout(a), a = void 0;
|
|
3857
|
-
}
|
|
3858
|
-
async function s() {
|
|
3859
|
-
let u = !1;
|
|
3860
|
-
try {
|
|
3861
|
-
const f = await Hr({ businessId: e(), refType: gt, refIds: n });
|
|
3862
|
-
t.value = new Map(f.map((c) => [c.refId, c])), r = 0;
|
|
3863
|
-
} catch (f) {
|
|
3864
|
-
if (u = !0, r += 1, r >= Vs) {
|
|
3865
|
-
console.warn("[media-picker] stopped polling image variants after repeated failures", f);
|
|
3866
|
-
return;
|
|
3867
|
-
}
|
|
3868
|
-
}
|
|
3869
|
-
([...t.value.values()].some((f) => Lr(f.variants)) || u) && (a = setTimeout(s, zs));
|
|
3870
|
-
}
|
|
3871
|
-
async function i(u) {
|
|
3872
|
-
if (o(), r = 0, n = u, u.length === 0 || !e()) {
|
|
3873
|
-
t.value = /* @__PURE__ */ new Map();
|
|
3874
|
-
return;
|
|
3875
|
-
}
|
|
3876
|
-
await s();
|
|
3877
|
-
}
|
|
3878
|
-
return Tn(o), { byRefId: t, load: i, stop: o };
|
|
3879
|
-
}
|
|
3880
|
-
const $s = { class: "p-24 relative min-h-full" }, Gs = { class: "flex items-center justify-between mb-16" }, Hs = { class: "fm-typo-en-title-md-600 fm-step-title line-clamp-2" }, Js = { class: "flex gap-8" }, Ws = { class: "flex flex-col gap-12 mb-16" }, Ks = { class: "flex items-center gap-12" }, Xs = { class: "flex-1 text-xs text-fm-color-typo-secondary" }, Ys = {
|
|
4072
|
+
}), ri = { class: "p-24 relative min-h-full" }, oi = { class: "flex items-center justify-between mb-16" }, si = { class: "fm-typo-en-title-md-600 fm-step-title line-clamp-2" }, ii = { class: "flex gap-8" }, li = { class: "flex flex-col gap-12 mb-16" }, ui = { class: "flex items-center gap-12" }, ci = { class: "flex-1 text-xs text-fm-color-typo-secondary" }, di = {
|
|
3881
4073
|
key: 0,
|
|
3882
4074
|
class: "text-fm-color-typo-primary font-semibold"
|
|
3883
|
-
},
|
|
4075
|
+
}, pi = { key: 1 }, fi = {
|
|
3884
4076
|
key: 0,
|
|
3885
4077
|
class: "fixed bottom-24 left-1/2 -translate-x-1/2 flex items-center gap-12 bg-white border rounded-lg shadow-lg px-16 py-8 z-30"
|
|
3886
|
-
},
|
|
4078
|
+
}, mi = { class: "text-sm font-semibold" }, gi = { class: "flex justify-end gap-8 w-full" }, vi = /* @__PURE__ */ ge({
|
|
3887
4079
|
__name: "AssetLibrary",
|
|
3888
4080
|
setup(e) {
|
|
3889
|
-
const t =
|
|
4081
|
+
const t = Qt(), { t: n } = he(), a = Q(() => {
|
|
3890
4082
|
var O;
|
|
3891
4083
|
return ((O = t.currentBusiness.value) == null ? void 0 : O.id) ?? "";
|
|
3892
|
-
}), r =
|
|
4084
|
+
}), r = Q(() => {
|
|
3893
4085
|
var O;
|
|
3894
4086
|
return (O = t.currentRestaurant.value) == null ? void 0 : O._id;
|
|
3895
|
-
}), o =
|
|
4087
|
+
}), o = Yt(), s = N(!1);
|
|
3896
4088
|
function i(O) {
|
|
3897
|
-
console.log("[media-debug] MediaPickerModal selected", O),
|
|
4089
|
+
console.log("[media-debug] MediaPickerModal selected", O.ratio ?? "original", O.url), S();
|
|
3898
4090
|
}
|
|
3899
|
-
const u =
|
|
4091
|
+
const u = N(""), d = N([]), c = N([]), p = N([]), w = N(!1), P = N("recent"), b = {
|
|
3900
4092
|
recent: { sortBy: "createdAt", descending: !0 },
|
|
3901
4093
|
name: { sortBy: "fileName", descending: !1 },
|
|
3902
4094
|
size: { sortBy: "fileSizeBytes", descending: !0 }
|
|
3903
|
-
}, v = [{ icon: "grid_view" }, { icon: "view_list" }],
|
|
3904
|
-
const O = c.value.reduce((
|
|
4095
|
+
}, v = [{ icon: "grid_view" }, { icon: "view_list" }], U = N(v[0]), f = Q(() => U.value.icon === "grid_view" ? "grid" : "list"), g = Q(() => {
|
|
4096
|
+
const O = c.value.reduce((A, z) => A + z.fileSizeBytes, 0);
|
|
3905
4097
|
return O >= 1024 * 1024 ? `${(O / 1024 / 1024).toFixed(1)} MB` : `${Math.round(O / 1024)} KB`;
|
|
3906
|
-
}),
|
|
3907
|
-
async function
|
|
4098
|
+
}), m = Bn(() => a.value);
|
|
4099
|
+
async function S() {
|
|
3908
4100
|
if (a.value) {
|
|
3909
|
-
c.value.length === 0 && (
|
|
4101
|
+
c.value.length === 0 && (w.value = !0);
|
|
3910
4102
|
try {
|
|
3911
|
-
const [O,
|
|
4103
|
+
const [O, A] = await Promise.all([
|
|
3912
4104
|
rt({
|
|
3913
4105
|
businessId: a.value,
|
|
3914
4106
|
restaurantId: r.value,
|
|
3915
4107
|
search: u.value || void 0,
|
|
3916
|
-
tags:
|
|
3917
|
-
...
|
|
4108
|
+
tags: d.value.length ? d.value : void 0,
|
|
4109
|
+
...b[P.value]
|
|
3918
4110
|
}),
|
|
3919
|
-
|
|
4111
|
+
Sn(a.value)
|
|
3920
4112
|
]);
|
|
3921
|
-
c.value = O.resources,
|
|
4113
|
+
c.value = O.resources, p.value = A, await m.load(O.resources.map((z) => z.refId).filter((z) => !!z));
|
|
3922
4114
|
} finally {
|
|
3923
|
-
|
|
4115
|
+
w.value = !1;
|
|
3924
4116
|
}
|
|
3925
4117
|
}
|
|
3926
4118
|
}
|
|
3927
|
-
|
|
3928
|
-
let
|
|
3929
|
-
|
|
3930
|
-
clearTimeout(
|
|
4119
|
+
Nn(S), pe(a, S), pe([d, P], S);
|
|
4120
|
+
let x;
|
|
4121
|
+
pe(u, () => {
|
|
4122
|
+
clearTimeout(x), x = setTimeout(S, 250);
|
|
3931
4123
|
});
|
|
3932
|
-
const y =
|
|
3933
|
-
function
|
|
3934
|
-
const
|
|
3935
|
-
|
|
4124
|
+
const y = N(/* @__PURE__ */ new Set());
|
|
4125
|
+
function G(O) {
|
|
4126
|
+
const A = new Set(y.value);
|
|
4127
|
+
A.has(O.id) ? A.delete(O.id) : A.add(O.id), y.value = A;
|
|
3936
4128
|
}
|
|
3937
|
-
function
|
|
4129
|
+
function K() {
|
|
3938
4130
|
y.value = /* @__PURE__ */ new Set();
|
|
3939
4131
|
}
|
|
3940
|
-
function
|
|
4132
|
+
function ne() {
|
|
3941
4133
|
y.value = new Set(c.value.map((O) => O.id));
|
|
3942
4134
|
}
|
|
3943
|
-
function
|
|
4135
|
+
function X() {
|
|
3944
4136
|
const O = y.value.size;
|
|
3945
4137
|
o.open({
|
|
3946
4138
|
title: n("media.library.deleteBulkTitle"),
|
|
@@ -3949,182 +4141,182 @@ const $s = { class: "p-24 relative min-h-full" }, Gs = { class: "flex items-cent
|
|
|
3949
4141
|
secondaryActions: { text: n("media.library.cancelButton"), close: !0 }
|
|
3950
4142
|
}).onPrimary(async () => {
|
|
3951
4143
|
await Promise.all(
|
|
3952
|
-
[...y.value].map((
|
|
3953
|
-
const
|
|
3954
|
-
return
|
|
4144
|
+
[...y.value].map((A) => {
|
|
4145
|
+
const z = c.value.find((be) => be.id === A);
|
|
4146
|
+
return z ? bt(a.value, z) : Promise.resolve();
|
|
3955
4147
|
})
|
|
3956
|
-
),
|
|
4148
|
+
), K(), await S(), o.close();
|
|
3957
4149
|
});
|
|
3958
4150
|
}
|
|
3959
|
-
function
|
|
4151
|
+
function M(O) {
|
|
3960
4152
|
o.open({
|
|
3961
4153
|
title: n("media.library.deleteOneTitle"),
|
|
3962
4154
|
message: n("media.library.deleteOneMessage", { fileName: O.fileName, disclaimer: n("media.library.deleteDisclaimer") }),
|
|
3963
4155
|
primaryActions: { text: n("media.library.deleteConfirmButton"), close: !1, variant: "destructive" },
|
|
3964
4156
|
secondaryActions: { text: n("media.library.cancelButton"), close: !0 }
|
|
3965
4157
|
}).onPrimary(async () => {
|
|
3966
|
-
await
|
|
3967
|
-
const
|
|
3968
|
-
|
|
4158
|
+
await bt(a.value, O);
|
|
4159
|
+
const A = new Set(y.value);
|
|
4160
|
+
A.delete(O.id), y.value = A, await S(), o.close();
|
|
3969
4161
|
});
|
|
3970
4162
|
}
|
|
3971
|
-
const
|
|
4163
|
+
const W = N(null), C = Q(
|
|
3972
4164
|
() => {
|
|
3973
4165
|
var O;
|
|
3974
|
-
return (O =
|
|
4166
|
+
return (O = W.value) != null && O.refId ? m.byRefId.value.get(W.value.refId) ?? null : null;
|
|
3975
4167
|
}
|
|
3976
4168
|
);
|
|
3977
|
-
function
|
|
3978
|
-
|
|
4169
|
+
function R(O) {
|
|
4170
|
+
W.value = O;
|
|
3979
4171
|
}
|
|
3980
|
-
async function
|
|
3981
|
-
await
|
|
3982
|
-
var
|
|
3983
|
-
return O.id === ((
|
|
4172
|
+
async function ae() {
|
|
4173
|
+
await S(), W.value && (W.value = c.value.find((O) => {
|
|
4174
|
+
var A;
|
|
4175
|
+
return O.id === ((A = W.value) == null ? void 0 : A.id);
|
|
3984
4176
|
}) ?? null);
|
|
3985
4177
|
}
|
|
3986
|
-
async function
|
|
3987
|
-
|
|
4178
|
+
async function H() {
|
|
4179
|
+
W.value = null, await S();
|
|
3988
4180
|
}
|
|
3989
|
-
const
|
|
3990
|
-
function
|
|
4181
|
+
const ue = N(!1), j = N(null);
|
|
4182
|
+
function Pe() {
|
|
3991
4183
|
var O;
|
|
3992
|
-
(O =
|
|
4184
|
+
(O = j.value) == null || O.reset(), ue.value = !0;
|
|
3993
4185
|
}
|
|
3994
|
-
async function
|
|
4186
|
+
async function le() {
|
|
3995
4187
|
var O;
|
|
3996
|
-
(O =
|
|
4188
|
+
(O = j.value) != null && O.stagedCount || (ue.value = !1), await S();
|
|
3997
4189
|
}
|
|
3998
|
-
return (O,
|
|
3999
|
-
const
|
|
4000
|
-
return
|
|
4001
|
-
h("div",
|
|
4002
|
-
h("h1",
|
|
4003
|
-
h("div",
|
|
4004
|
-
|
|
4005
|
-
label:
|
|
4190
|
+
return (O, A) => {
|
|
4191
|
+
const z = V("FmButton"), be = V("FmSearch"), ze = V("FmButtonGroup"), I = V("FmDialog");
|
|
4192
|
+
return k(), _("div", ri, [
|
|
4193
|
+
h("div", oi, [
|
|
4194
|
+
h("h1", si, E(T(n)("media.title")), 1),
|
|
4195
|
+
h("div", ii, [
|
|
4196
|
+
F(z, {
|
|
4197
|
+
label: T(n)("media.library.testPickerButton"),
|
|
4006
4198
|
variant: "tertiary",
|
|
4007
|
-
onClick:
|
|
4199
|
+
onClick: A[0] || (A[0] = (L) => s.value = !0)
|
|
4008
4200
|
}, null, 8, ["label"]),
|
|
4009
|
-
|
|
4010
|
-
label:
|
|
4201
|
+
F(z, {
|
|
4202
|
+
label: T(n)("media.library.uploadButton"),
|
|
4011
4203
|
"prepend-icon": "add",
|
|
4012
4204
|
variant: "primary",
|
|
4013
|
-
onClick:
|
|
4205
|
+
onClick: Pe
|
|
4014
4206
|
}, null, 8, ["label"])
|
|
4015
4207
|
])
|
|
4016
4208
|
]),
|
|
4017
|
-
h("div",
|
|
4018
|
-
|
|
4209
|
+
h("div", li, [
|
|
4210
|
+
F(be, {
|
|
4019
4211
|
modelValue: u.value,
|
|
4020
|
-
"onUpdate:modelValue":
|
|
4021
|
-
placeholder:
|
|
4212
|
+
"onUpdate:modelValue": A[1] || (A[1] = (L) => u.value = L),
|
|
4213
|
+
placeholder: T(n)("media.library.searchPlaceholder"),
|
|
4022
4214
|
class: "max-w-[280px]"
|
|
4023
4215
|
}, null, 8, ["modelValue", "placeholder"]),
|
|
4024
|
-
|
|
4216
|
+
p.value.length ? (k(), re(T(Tn), {
|
|
4025
4217
|
key: 0,
|
|
4026
|
-
modelValue:
|
|
4027
|
-
"onUpdate:modelValue":
|
|
4028
|
-
tags:
|
|
4029
|
-
}, null, 8, ["modelValue", "tags"])) :
|
|
4030
|
-
h("div",
|
|
4031
|
-
h("div",
|
|
4032
|
-
y.value.size > 0 ? (
|
|
4218
|
+
modelValue: d.value,
|
|
4219
|
+
"onUpdate:modelValue": A[2] || (A[2] = (L) => d.value = L),
|
|
4220
|
+
tags: p.value
|
|
4221
|
+
}, null, 8, ["modelValue", "tags"])) : q("", !0),
|
|
4222
|
+
h("div", ui, [
|
|
4223
|
+
h("div", ci, [
|
|
4224
|
+
y.value.size > 0 ? (k(), _("span", di, E(T(n)("media.library.selectedCount", { count: y.value.size })), 1)) : (k(), _("span", pi, E(T(n)("media.library.totalSummary", { count: c.value.length, size: g.value })), 1))
|
|
4033
4225
|
]),
|
|
4034
|
-
|
|
4035
|
-
label:
|
|
4226
|
+
F(z, {
|
|
4227
|
+
label: T(n)("media.library.selectAllButton"),
|
|
4036
4228
|
variant: "tertiary",
|
|
4037
4229
|
size: "md",
|
|
4038
|
-
onClick:
|
|
4230
|
+
onClick: ne
|
|
4039
4231
|
}, null, 8, ["label"]),
|
|
4040
|
-
|
|
4041
|
-
modelValue:
|
|
4042
|
-
"onUpdate:modelValue":
|
|
4232
|
+
F(ze, {
|
|
4233
|
+
modelValue: U.value,
|
|
4234
|
+
"onUpdate:modelValue": A[3] || (A[3] = (L) => U.value = L),
|
|
4043
4235
|
items: v
|
|
4044
4236
|
}, null, 8, ["modelValue"])
|
|
4045
4237
|
])
|
|
4046
4238
|
]),
|
|
4047
|
-
|
|
4239
|
+
F(T(Rn), {
|
|
4048
4240
|
assets: c.value,
|
|
4049
|
-
loading:
|
|
4050
|
-
view:
|
|
4241
|
+
loading: w.value,
|
|
4242
|
+
view: f.value,
|
|
4051
4243
|
selectable: "",
|
|
4052
4244
|
"selected-ids": y.value,
|
|
4053
|
-
"variants-by-ref-id":
|
|
4054
|
-
onOpen:
|
|
4055
|
-
onToggle:
|
|
4056
|
-
onDelete:
|
|
4245
|
+
"variants-by-ref-id": T(m).byRefId.value,
|
|
4246
|
+
onOpen: R,
|
|
4247
|
+
onToggle: G,
|
|
4248
|
+
onDelete: M
|
|
4057
4249
|
}, null, 8, ["assets", "loading", "view", "selected-ids", "variants-by-ref-id"]),
|
|
4058
|
-
y.value.size > 0 ? (
|
|
4059
|
-
h("span",
|
|
4060
|
-
|
|
4061
|
-
label:
|
|
4250
|
+
y.value.size > 0 ? (k(), _("div", fi, [
|
|
4251
|
+
h("span", mi, E(T(n)("media.library.selectedCount", { count: y.value.size })), 1),
|
|
4252
|
+
F(z, {
|
|
4253
|
+
label: T(n)("media.library.cancelButton"),
|
|
4062
4254
|
variant: "tertiary",
|
|
4063
4255
|
size: "md",
|
|
4064
|
-
onClick:
|
|
4256
|
+
onClick: K
|
|
4065
4257
|
}, null, 8, ["label"]),
|
|
4066
|
-
|
|
4067
|
-
label:
|
|
4258
|
+
F(z, {
|
|
4259
|
+
label: T(n)("media.library.deleteSelectedButton"),
|
|
4068
4260
|
variant: "destructive",
|
|
4069
4261
|
size: "md",
|
|
4070
4262
|
"prepend-icon": "delete",
|
|
4071
|
-
onClick:
|
|
4263
|
+
onClick: X
|
|
4072
4264
|
}, null, 8, ["label"])
|
|
4073
|
-
])) :
|
|
4074
|
-
|
|
4075
|
-
asset:
|
|
4076
|
-
image:
|
|
4265
|
+
])) : q("", !0),
|
|
4266
|
+
F(T(ai), {
|
|
4267
|
+
asset: W.value,
|
|
4268
|
+
image: C.value,
|
|
4077
4269
|
"business-id": a.value,
|
|
4078
|
-
onClose:
|
|
4079
|
-
onRenamed:
|
|
4080
|
-
onDeleted:
|
|
4081
|
-
onChanged:
|
|
4270
|
+
onClose: A[4] || (A[4] = (L) => W.value = null),
|
|
4271
|
+
onRenamed: ae,
|
|
4272
|
+
onDeleted: H,
|
|
4273
|
+
onChanged: ae
|
|
4082
4274
|
}, null, 8, ["asset", "image", "business-id"]),
|
|
4083
|
-
|
|
4275
|
+
F(T(Bs), {
|
|
4084
4276
|
open: s.value,
|
|
4085
|
-
"onUpdate:open":
|
|
4277
|
+
"onUpdate:open": A[5] || (A[5] = (L) => s.value = L),
|
|
4086
4278
|
"business-id": a.value,
|
|
4087
4279
|
"restaurant-id": r.value,
|
|
4088
4280
|
onSelect: i
|
|
4089
4281
|
}, null, 8, ["open", "business-id", "restaurant-id"]),
|
|
4090
|
-
|
|
4091
|
-
modelValue:
|
|
4092
|
-
"onUpdate:modelValue":
|
|
4282
|
+
F(I, {
|
|
4283
|
+
modelValue: ue.value,
|
|
4284
|
+
"onUpdate:modelValue": A[9] || (A[9] = (L) => ue.value = L),
|
|
4093
4285
|
"max-width": 480
|
|
4094
4286
|
}, {
|
|
4095
|
-
"dialog-header":
|
|
4096
|
-
h("div", null,
|
|
4287
|
+
"dialog-header": fe(() => [
|
|
4288
|
+
h("div", null, E(T(n)("media.library.uploadDialogTitle")), 1)
|
|
4097
4289
|
]),
|
|
4098
|
-
"dialog-footer":
|
|
4099
|
-
var
|
|
4290
|
+
"dialog-footer": fe(() => {
|
|
4291
|
+
var L, Ee;
|
|
4100
4292
|
return [
|
|
4101
|
-
h("div",
|
|
4102
|
-
|
|
4103
|
-
label:
|
|
4293
|
+
h("div", gi, [
|
|
4294
|
+
F(z, {
|
|
4295
|
+
label: T(n)("media.library.cancelButton"),
|
|
4104
4296
|
variant: "tertiary",
|
|
4105
|
-
onClick:
|
|
4297
|
+
onClick: A[7] || (A[7] = (Ve) => ue.value = !1)
|
|
4106
4298
|
}, null, 8, ["label"]),
|
|
4107
|
-
|
|
4108
|
-
label:
|
|
4299
|
+
F(z, {
|
|
4300
|
+
label: T(n)("media.library.uploadSubmitButton", { count: ((L = j.value) == null ? void 0 : L.stagedCount) ?? 0 }),
|
|
4109
4301
|
variant: "primary",
|
|
4110
|
-
disabled: !((
|
|
4111
|
-
onClick:
|
|
4302
|
+
disabled: !((Ee = j.value) != null && Ee.stagedCount) || j.value.uploading,
|
|
4303
|
+
onClick: A[8] || (A[8] = (Ve) => {
|
|
4112
4304
|
var qe;
|
|
4113
|
-
return (qe =
|
|
4305
|
+
return (qe = j.value) == null ? void 0 : qe.upload();
|
|
4114
4306
|
})
|
|
4115
4307
|
}, null, 8, ["label", "disabled"])
|
|
4116
4308
|
])
|
|
4117
4309
|
];
|
|
4118
4310
|
}),
|
|
4119
|
-
default:
|
|
4120
|
-
|
|
4311
|
+
default: fe(() => [
|
|
4312
|
+
F(T(On), {
|
|
4121
4313
|
ref_key: "uploadPanelRef",
|
|
4122
|
-
ref:
|
|
4314
|
+
ref: j,
|
|
4123
4315
|
"business-id": a.value,
|
|
4124
4316
|
"restaurant-id": r.value,
|
|
4125
|
-
"available-tags":
|
|
4126
|
-
onTagCreated:
|
|
4127
|
-
onUploaded:
|
|
4317
|
+
"available-tags": p.value,
|
|
4318
|
+
onTagCreated: A[6] || (A[6] = (L) => p.value.push(L)),
|
|
4319
|
+
onUploaded: le
|
|
4128
4320
|
}, null, 8, ["business-id", "restaurant-id", "available-tags"])
|
|
4129
4321
|
]),
|
|
4130
4322
|
_: 1
|
|
@@ -4134,5 +4326,5 @@ const $s = { class: "p-24 relative min-h-full" }, Gs = { class: "flex items-cent
|
|
|
4134
4326
|
}
|
|
4135
4327
|
});
|
|
4136
4328
|
export {
|
|
4137
|
-
|
|
4329
|
+
vi as default
|
|
4138
4330
|
};
|