@jctrans-materials/comps-vue2 1.0.3 → 1.0.4
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/index.cjs.js +2 -2
- package/dist/index.css +1 -1
- package/dist/index.esm.js +335 -305
- package/package.json +2 -2
package/dist/index.esm.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import oe, { ref as C, computed as Z, onMounted as se, onBeforeUnmount as
|
|
2
|
-
import { locationSearchV2 as
|
|
1
|
+
import oe, { ref as C, computed as Z, onMounted as se, onBeforeUnmount as Ut, defineComponent as ie, toRef as xt, watch as bt, reactive as Ct } from "vue";
|
|
2
|
+
import { locationSearchV2 as qt, emitter as W, MODAL_ACTION as G, initSharedConfig as re } from "@jctrans-materials/shared";
|
|
3
3
|
import { MODAL_ACTION as Mn, emitter as Pn } from "@jctrans-materials/shared";
|
|
4
|
-
import { Col as
|
|
4
|
+
import { Col as St, Row as Rt, Checkbox as Dt, Button as Et, Input as Ot, FormItem as _t, Form as kt, Dialog as Tt } from "jctrans-ui";
|
|
5
5
|
oe.util.warn;
|
|
6
6
|
function le(e) {
|
|
7
7
|
const t = C([]), n = "_search_history_cache", o = typeof window < "u" && typeof localStorage < "u", s = Z(
|
|
@@ -10,17 +10,17 @@ function le(e) {
|
|
|
10
10
|
() => !!e.value && e.value !== ""
|
|
11
11
|
), r = (a) => {
|
|
12
12
|
if (!a || !o) return;
|
|
13
|
-
const
|
|
14
|
-
(
|
|
13
|
+
const u = t.value.filter(
|
|
14
|
+
(f) => f.id && f.id !== a.id || f.display !== a.display
|
|
15
15
|
);
|
|
16
|
-
|
|
17
|
-
const
|
|
16
|
+
u.unshift(a);
|
|
17
|
+
const c = u.slice(0, 4);
|
|
18
18
|
if (i.value) {
|
|
19
|
-
t.value =
|
|
19
|
+
t.value = c;
|
|
20
20
|
try {
|
|
21
|
-
localStorage.setItem(s.value, JSON.stringify(
|
|
22
|
-
} catch (
|
|
23
|
-
console.warn("LocalStorage save failed:",
|
|
21
|
+
localStorage.setItem(s.value, JSON.stringify(c));
|
|
22
|
+
} catch (f) {
|
|
23
|
+
console.warn("LocalStorage save failed:", f);
|
|
24
24
|
}
|
|
25
25
|
}
|
|
26
26
|
}, l = () => {
|
|
@@ -50,19 +50,19 @@ async function ae(e, t = [
|
|
|
50
50
|
"Seaport",
|
|
51
51
|
"Airport"
|
|
52
52
|
], n = {}) {
|
|
53
|
-
return
|
|
53
|
+
return qt.searchByName({
|
|
54
54
|
keyword: e,
|
|
55
55
|
displayInfo: t,
|
|
56
56
|
...n
|
|
57
57
|
});
|
|
58
58
|
}
|
|
59
|
-
const ce = (e, t) =>
|
|
59
|
+
const ce = (e, t) => qt.searchByIdWithType(e, t);
|
|
60
60
|
function ue(e, t) {
|
|
61
|
-
const n = C([]), o = C(!1), s = C(!1), i = C(1), r = C(0), l = C(10), a = Z(() => r.value === 0 ? !1 : n.value.length >= r.value),
|
|
61
|
+
const n = C([]), o = C(!1), s = C(!1), i = C(1), r = C(0), l = C(10), a = Z(() => r.value === 0 ? !1 : n.value.length >= r.value), u = Z(() => {
|
|
62
62
|
const m = [...t.value];
|
|
63
63
|
return m.includes("Country") && !m.includes("Region") && m.push("Region"), m;
|
|
64
|
-
}),
|
|
65
|
-
(
|
|
64
|
+
}), c = (m) => !m || !Array.isArray(m) ? [] : m.filter(
|
|
65
|
+
(d) => u.value.includes(d.type)
|
|
66
66
|
);
|
|
67
67
|
return {
|
|
68
68
|
searchResults: n,
|
|
@@ -71,13 +71,13 @@ function ue(e, t) {
|
|
|
71
71
|
isFinished: a,
|
|
72
72
|
currentPage: i,
|
|
73
73
|
total: r,
|
|
74
|
-
fetchData: async (m = 1,
|
|
75
|
-
if (!e.value.trim() && !
|
|
74
|
+
fetchData: async (m = 1, d = !1) => {
|
|
75
|
+
if (!e.value.trim() && !d) {
|
|
76
76
|
n.value = [], r.value = 0;
|
|
77
77
|
return;
|
|
78
78
|
}
|
|
79
|
-
if (!(
|
|
80
|
-
|
|
79
|
+
if (!(d && (s.value || a.value)) && !(!d && o.value)) {
|
|
80
|
+
d ? s.value = !0 : (o.value = !0, i.value = 1);
|
|
81
81
|
try {
|
|
82
82
|
const p = await ae(
|
|
83
83
|
e.value,
|
|
@@ -87,8 +87,8 @@ function ue(e, t) {
|
|
|
87
87
|
// 使用传入的 page 参数
|
|
88
88
|
size: l.value
|
|
89
89
|
}
|
|
90
|
-
), h = p.records || [], y =
|
|
91
|
-
|
|
90
|
+
), h = p.records || [], y = c(h);
|
|
91
|
+
d ? n.value = [...n.value, ...y] : n.value = y, r.value = p.total || 0, i.value = m;
|
|
92
92
|
} catch (p) {
|
|
93
93
|
console.error("Failed to fetch search results:", p);
|
|
94
94
|
} finally {
|
|
@@ -96,10 +96,10 @@ function ue(e, t) {
|
|
|
96
96
|
}
|
|
97
97
|
}
|
|
98
98
|
},
|
|
99
|
-
filterByTypes:
|
|
99
|
+
filterByTypes: c
|
|
100
100
|
};
|
|
101
101
|
}
|
|
102
|
-
const Y = Math.min,
|
|
102
|
+
const Y = Math.min, S = Math.max, it = Math.round, st = Math.floor, I = (e) => ({
|
|
103
103
|
x: e,
|
|
104
104
|
y: e
|
|
105
105
|
}), fe = {
|
|
@@ -112,12 +112,12 @@ const Y = Math.min, R = Math.max, it = Math.round, st = Math.floor, I = (e) => (
|
|
|
112
112
|
end: "start"
|
|
113
113
|
};
|
|
114
114
|
function It(e, t, n) {
|
|
115
|
-
return
|
|
115
|
+
return S(e, Y(t, n));
|
|
116
116
|
}
|
|
117
117
|
function et(e, t) {
|
|
118
118
|
return typeof e == "function" ? e(t) : e;
|
|
119
119
|
}
|
|
120
|
-
function
|
|
120
|
+
function Q(e) {
|
|
121
121
|
return e.split("-")[0];
|
|
122
122
|
}
|
|
123
123
|
function nt(e) {
|
|
@@ -130,11 +130,11 @@ function Gt(e) {
|
|
|
130
130
|
return e === "y" ? "height" : "width";
|
|
131
131
|
}
|
|
132
132
|
const me = /* @__PURE__ */ new Set(["top", "bottom"]);
|
|
133
|
-
function
|
|
134
|
-
return me.has(
|
|
133
|
+
function N(e) {
|
|
134
|
+
return me.has(Q(e)) ? "y" : "x";
|
|
135
135
|
}
|
|
136
136
|
function Jt(e) {
|
|
137
|
-
return Wt(
|
|
137
|
+
return Wt(N(e));
|
|
138
138
|
}
|
|
139
139
|
function pe(e, t, n) {
|
|
140
140
|
n === void 0 && (n = !1);
|
|
@@ -149,12 +149,12 @@ function he(e) {
|
|
|
149
149
|
function pt(e) {
|
|
150
150
|
return e.replace(/start|end/g, (t) => de[t]);
|
|
151
151
|
}
|
|
152
|
-
const
|
|
152
|
+
const Lt = ["left", "right"], Ft = ["right", "left"], ge = ["top", "bottom"], ye = ["bottom", "top"];
|
|
153
153
|
function ve(e, t, n) {
|
|
154
154
|
switch (e) {
|
|
155
155
|
case "top":
|
|
156
156
|
case "bottom":
|
|
157
|
-
return n ? t ?
|
|
157
|
+
return n ? t ? Ft : Lt : t ? Lt : Ft;
|
|
158
158
|
case "left":
|
|
159
159
|
case "right":
|
|
160
160
|
return t ? ge : ye;
|
|
@@ -164,7 +164,7 @@ function ve(e, t, n) {
|
|
|
164
164
|
}
|
|
165
165
|
function Ae(e, t, n, o) {
|
|
166
166
|
const s = nt(e);
|
|
167
|
-
let i = ve(
|
|
167
|
+
let i = ve(Q(e), n === "start", o);
|
|
168
168
|
return s && (i = i.map((r) => r + "-" + s), t && (i = i.concat(i.map(pt)))), i;
|
|
169
169
|
}
|
|
170
170
|
function rt(e) {
|
|
@@ -210,48 +210,48 @@ function Bt(e, t, n) {
|
|
|
210
210
|
reference: o,
|
|
211
211
|
floating: s
|
|
212
212
|
} = e;
|
|
213
|
-
const i =
|
|
214
|
-
let
|
|
213
|
+
const i = N(t), r = Jt(t), l = Gt(r), a = Q(t), u = i === "y", c = o.x + o.width / 2 - s.width / 2, f = o.y + o.height / 2 - s.height / 2, m = o[l] / 2 - s[l] / 2;
|
|
214
|
+
let d;
|
|
215
215
|
switch (a) {
|
|
216
216
|
case "top":
|
|
217
|
-
|
|
218
|
-
x:
|
|
217
|
+
d = {
|
|
218
|
+
x: c,
|
|
219
219
|
y: o.y - s.height
|
|
220
220
|
};
|
|
221
221
|
break;
|
|
222
222
|
case "bottom":
|
|
223
|
-
|
|
224
|
-
x:
|
|
223
|
+
d = {
|
|
224
|
+
x: c,
|
|
225
225
|
y: o.y + o.height
|
|
226
226
|
};
|
|
227
227
|
break;
|
|
228
228
|
case "right":
|
|
229
|
-
|
|
229
|
+
d = {
|
|
230
230
|
x: o.x + o.width,
|
|
231
|
-
y:
|
|
231
|
+
y: f
|
|
232
232
|
};
|
|
233
233
|
break;
|
|
234
234
|
case "left":
|
|
235
|
-
|
|
235
|
+
d = {
|
|
236
236
|
x: o.x - s.width,
|
|
237
|
-
y:
|
|
237
|
+
y: f
|
|
238
238
|
};
|
|
239
239
|
break;
|
|
240
240
|
default:
|
|
241
|
-
|
|
241
|
+
d = {
|
|
242
242
|
x: o.x,
|
|
243
243
|
y: o.y
|
|
244
244
|
};
|
|
245
245
|
}
|
|
246
246
|
switch (nt(t)) {
|
|
247
247
|
case "start":
|
|
248
|
-
|
|
248
|
+
d[r] -= m * (n && u ? -1 : 1);
|
|
249
249
|
break;
|
|
250
250
|
case "end":
|
|
251
|
-
|
|
251
|
+
d[r] += m * (n && u ? -1 : 1);
|
|
252
252
|
break;
|
|
253
253
|
}
|
|
254
|
-
return
|
|
254
|
+
return d;
|
|
255
255
|
}
|
|
256
256
|
const be = async (e, t, n) => {
|
|
257
257
|
const {
|
|
@@ -260,14 +260,14 @@ const be = async (e, t, n) => {
|
|
|
260
260
|
middleware: i = [],
|
|
261
261
|
platform: r
|
|
262
262
|
} = n, l = i.filter(Boolean), a = await (r.isRTL == null ? void 0 : r.isRTL(t));
|
|
263
|
-
let
|
|
263
|
+
let u = await r.getElementRects({
|
|
264
264
|
reference: e,
|
|
265
265
|
floating: t,
|
|
266
266
|
strategy: s
|
|
267
267
|
}), {
|
|
268
|
-
x:
|
|
269
|
-
y:
|
|
270
|
-
} = Bt(
|
|
268
|
+
x: c,
|
|
269
|
+
y: f
|
|
270
|
+
} = Bt(u, o, a), m = o, d = {}, p = 0;
|
|
271
271
|
for (let h = 0; h < l.length; h++) {
|
|
272
272
|
const {
|
|
273
273
|
name: y,
|
|
@@ -278,40 +278,40 @@ const be = async (e, t, n) => {
|
|
|
278
278
|
data: b,
|
|
279
279
|
reset: w
|
|
280
280
|
} = await g({
|
|
281
|
-
x:
|
|
282
|
-
y:
|
|
281
|
+
x: c,
|
|
282
|
+
y: f,
|
|
283
283
|
initialPlacement: o,
|
|
284
284
|
placement: m,
|
|
285
285
|
strategy: s,
|
|
286
|
-
middlewareData:
|
|
287
|
-
rects:
|
|
286
|
+
middlewareData: d,
|
|
287
|
+
rects: u,
|
|
288
288
|
platform: r,
|
|
289
289
|
elements: {
|
|
290
290
|
reference: e,
|
|
291
291
|
floating: t
|
|
292
292
|
}
|
|
293
293
|
});
|
|
294
|
-
|
|
295
|
-
...
|
|
294
|
+
c = v ?? c, f = A ?? f, d = {
|
|
295
|
+
...d,
|
|
296
296
|
[y]: {
|
|
297
|
-
...
|
|
297
|
+
...d[y],
|
|
298
298
|
...b
|
|
299
299
|
}
|
|
300
|
-
}, w && p <= 50 && (p++, typeof w == "object" && (w.placement && (m = w.placement), w.rects && (
|
|
300
|
+
}, w && p <= 50 && (p++, typeof w == "object" && (w.placement && (m = w.placement), w.rects && (u = w.rects === !0 ? await r.getElementRects({
|
|
301
301
|
reference: e,
|
|
302
302
|
floating: t,
|
|
303
303
|
strategy: s
|
|
304
304
|
}) : w.rects), {
|
|
305
|
-
x:
|
|
306
|
-
y:
|
|
307
|
-
} = Bt(
|
|
305
|
+
x: c,
|
|
306
|
+
y: f
|
|
307
|
+
} = Bt(u, m, a)), h = -1);
|
|
308
308
|
}
|
|
309
309
|
return {
|
|
310
|
-
x:
|
|
311
|
-
y:
|
|
310
|
+
x: c,
|
|
311
|
+
y: f,
|
|
312
312
|
placement: m,
|
|
313
313
|
strategy: s,
|
|
314
|
-
middlewareData:
|
|
314
|
+
middlewareData: d
|
|
315
315
|
};
|
|
316
316
|
};
|
|
317
317
|
async function gt(e, t) {
|
|
@@ -325,17 +325,17 @@ async function gt(e, t) {
|
|
|
325
325
|
elements: l,
|
|
326
326
|
strategy: a
|
|
327
327
|
} = e, {
|
|
328
|
-
boundary:
|
|
329
|
-
rootBoundary:
|
|
330
|
-
elementContext:
|
|
328
|
+
boundary: u = "clippingAncestors",
|
|
329
|
+
rootBoundary: c = "viewport",
|
|
330
|
+
elementContext: f = "floating",
|
|
331
331
|
altBoundary: m = !1,
|
|
332
|
-
padding:
|
|
333
|
-
} = et(t, e), p = xe(
|
|
332
|
+
padding: d = 0
|
|
333
|
+
} = et(t, e), p = xe(d), y = l[m ? f === "floating" ? "reference" : "floating" : f], g = lt(await i.getClippingRect({
|
|
334
334
|
element: (n = await (i.isElement == null ? void 0 : i.isElement(y))) == null || n ? y : y.contextElement || await (i.getDocumentElement == null ? void 0 : i.getDocumentElement(l.floating)),
|
|
335
|
-
boundary:
|
|
336
|
-
rootBoundary:
|
|
335
|
+
boundary: u,
|
|
336
|
+
rootBoundary: c,
|
|
337
337
|
strategy: a
|
|
338
|
-
})), v =
|
|
338
|
+
})), v = f === "floating" ? {
|
|
339
339
|
x: o,
|
|
340
340
|
y: s,
|
|
341
341
|
width: r.floating.width,
|
|
@@ -371,59 +371,59 @@ const Ce = function(e) {
|
|
|
371
371
|
rects: r,
|
|
372
372
|
initialPlacement: l,
|
|
373
373
|
platform: a,
|
|
374
|
-
elements:
|
|
374
|
+
elements: u
|
|
375
375
|
} = t, {
|
|
376
|
-
mainAxis:
|
|
377
|
-
crossAxis:
|
|
376
|
+
mainAxis: c = !0,
|
|
377
|
+
crossAxis: f = !0,
|
|
378
378
|
fallbackPlacements: m,
|
|
379
|
-
fallbackStrategy:
|
|
379
|
+
fallbackStrategy: d = "bestFit",
|
|
380
380
|
fallbackAxisSideDirection: p = "none",
|
|
381
381
|
flipAlignment: h = !0,
|
|
382
382
|
...y
|
|
383
383
|
} = et(e, t);
|
|
384
384
|
if ((n = i.arrow) != null && n.alignmentOffset)
|
|
385
385
|
return {};
|
|
386
|
-
const g =
|
|
386
|
+
const g = Q(s), v = N(l), A = Q(l) === l, b = await (a.isRTL == null ? void 0 : a.isRTL(u.floating)), w = m || (A || !h ? [rt(l)] : he(l)), E = p !== "none";
|
|
387
387
|
!m && E && w.push(...Ae(l, h, p, b));
|
|
388
388
|
const D = [l, ...w], B = await gt(t, y), M = [];
|
|
389
389
|
let O = ((o = i.flip) == null ? void 0 : o.overflows) || [];
|
|
390
|
-
if (
|
|
391
|
-
const
|
|
392
|
-
M.push(B[
|
|
390
|
+
if (c && M.push(B[g]), f) {
|
|
391
|
+
const U = pe(s, r, b);
|
|
392
|
+
M.push(B[U[0]], B[U[1]]);
|
|
393
393
|
}
|
|
394
394
|
if (O = [...O, {
|
|
395
395
|
placement: s,
|
|
396
396
|
overflows: M
|
|
397
|
-
}], !M.every((
|
|
397
|
+
}], !M.every((U) => U <= 0)) {
|
|
398
398
|
var x, P;
|
|
399
|
-
const
|
|
400
|
-
if (dt && (!(
|
|
399
|
+
const U = (((x = i.flip) == null ? void 0 : x.index) || 0) + 1, dt = D[U];
|
|
400
|
+
if (dt && (!(f === "alignment" ? v !== N(dt) : !1) || // We leave the current main axis only if every placement on that axis
|
|
401
401
|
// overflows the main axis.
|
|
402
|
-
O.every((_) =>
|
|
402
|
+
O.every((_) => N(_.placement) === v ? _.overflows[0] > 0 : !0)))
|
|
403
403
|
return {
|
|
404
404
|
data: {
|
|
405
|
-
index:
|
|
405
|
+
index: U,
|
|
406
406
|
overflows: O
|
|
407
407
|
},
|
|
408
408
|
reset: {
|
|
409
409
|
placement: dt
|
|
410
410
|
}
|
|
411
411
|
};
|
|
412
|
-
let $ = (P = O.filter((
|
|
412
|
+
let $ = (P = O.filter((q) => q.overflows[0] <= 0).sort((q, _) => q.overflows[1] - _.overflows[1])[0]) == null ? void 0 : P.placement;
|
|
413
413
|
if (!$)
|
|
414
|
-
switch (
|
|
414
|
+
switch (d) {
|
|
415
415
|
case "bestFit": {
|
|
416
416
|
var j;
|
|
417
|
-
const
|
|
417
|
+
const q = (j = O.filter((_) => {
|
|
418
418
|
if (E) {
|
|
419
|
-
const
|
|
420
|
-
return
|
|
419
|
+
const V = N(_.placement);
|
|
420
|
+
return V === v || // Create a bias to the `y` side axis due to horizontal
|
|
421
421
|
// reading directions favoring greater width.
|
|
422
|
-
|
|
422
|
+
V === "y";
|
|
423
423
|
}
|
|
424
424
|
return !0;
|
|
425
|
-
}).map((_) => [_.placement, _.overflows.filter((
|
|
426
|
-
|
|
425
|
+
}).map((_) => [_.placement, _.overflows.filter((V) => V > 0).reduce((V, ne) => V + ne, 0)]).sort((_, V) => _[1] - V[1])[0]) == null ? void 0 : j[0];
|
|
426
|
+
q && ($ = q);
|
|
427
427
|
break;
|
|
428
428
|
}
|
|
429
429
|
case "initialPlacement":
|
|
@@ -440,32 +440,32 @@ const Ce = function(e) {
|
|
|
440
440
|
return {};
|
|
441
441
|
}
|
|
442
442
|
};
|
|
443
|
-
},
|
|
444
|
-
async function
|
|
443
|
+
}, Se = /* @__PURE__ */ new Set(["left", "top"]);
|
|
444
|
+
async function Re(e, t) {
|
|
445
445
|
const {
|
|
446
446
|
placement: n,
|
|
447
447
|
platform: o,
|
|
448
448
|
elements: s
|
|
449
|
-
} = e, i = await (o.isRTL == null ? void 0 : o.isRTL(s.floating)), r =
|
|
449
|
+
} = e, i = await (o.isRTL == null ? void 0 : o.isRTL(s.floating)), r = Q(n), l = nt(n), a = N(n) === "y", u = Se.has(r) ? -1 : 1, c = i && a ? -1 : 1, f = et(t, e);
|
|
450
450
|
let {
|
|
451
451
|
mainAxis: m,
|
|
452
|
-
crossAxis:
|
|
452
|
+
crossAxis: d,
|
|
453
453
|
alignmentAxis: p
|
|
454
|
-
} = typeof
|
|
455
|
-
mainAxis:
|
|
454
|
+
} = typeof f == "number" ? {
|
|
455
|
+
mainAxis: f,
|
|
456
456
|
crossAxis: 0,
|
|
457
457
|
alignmentAxis: null
|
|
458
458
|
} : {
|
|
459
|
-
mainAxis:
|
|
460
|
-
crossAxis:
|
|
461
|
-
alignmentAxis:
|
|
459
|
+
mainAxis: f.mainAxis || 0,
|
|
460
|
+
crossAxis: f.crossAxis || 0,
|
|
461
|
+
alignmentAxis: f.alignmentAxis
|
|
462
462
|
};
|
|
463
|
-
return l && typeof p == "number" && (
|
|
464
|
-
x:
|
|
465
|
-
y: m *
|
|
463
|
+
return l && typeof p == "number" && (d = l === "end" ? p * -1 : p), a ? {
|
|
464
|
+
x: d * c,
|
|
465
|
+
y: m * u
|
|
466
466
|
} : {
|
|
467
|
-
x: m *
|
|
468
|
-
y:
|
|
467
|
+
x: m * u,
|
|
468
|
+
y: d * c
|
|
469
469
|
};
|
|
470
470
|
}
|
|
471
471
|
const De = function(e) {
|
|
@@ -479,7 +479,7 @@ const De = function(e) {
|
|
|
479
479
|
y: i,
|
|
480
480
|
placement: r,
|
|
481
481
|
middlewareData: l
|
|
482
|
-
} = t, a = await
|
|
482
|
+
} = t, a = await Re(t, e);
|
|
483
483
|
return r === ((n = l.offset) == null ? void 0 : n.placement) && (o = l.arrow) != null && o.alignmentOffset ? {} : {
|
|
484
484
|
x: s + a.x,
|
|
485
485
|
y: i + a.y,
|
|
@@ -515,23 +515,23 @@ const De = function(e) {
|
|
|
515
515
|
}
|
|
516
516
|
},
|
|
517
517
|
...a
|
|
518
|
-
} = et(e, t),
|
|
518
|
+
} = et(e, t), u = {
|
|
519
519
|
x: n,
|
|
520
520
|
y: o
|
|
521
|
-
},
|
|
522
|
-
let
|
|
521
|
+
}, c = await gt(t, a), f = N(Q(s)), m = Wt(f);
|
|
522
|
+
let d = u[m], p = u[f];
|
|
523
523
|
if (i) {
|
|
524
|
-
const y = m === "y" ? "top" : "left", g = m === "y" ? "bottom" : "right", v =
|
|
525
|
-
|
|
524
|
+
const y = m === "y" ? "top" : "left", g = m === "y" ? "bottom" : "right", v = d + c[y], A = d - c[g];
|
|
525
|
+
d = It(v, d, A);
|
|
526
526
|
}
|
|
527
527
|
if (r) {
|
|
528
|
-
const y =
|
|
528
|
+
const y = f === "y" ? "top" : "left", g = f === "y" ? "bottom" : "right", v = p + c[y], A = p - c[g];
|
|
529
529
|
p = It(v, p, A);
|
|
530
530
|
}
|
|
531
531
|
const h = l.fn({
|
|
532
532
|
...t,
|
|
533
|
-
[m]:
|
|
534
|
-
[
|
|
533
|
+
[m]: d,
|
|
534
|
+
[f]: p
|
|
535
535
|
});
|
|
536
536
|
return {
|
|
537
537
|
...h,
|
|
@@ -540,7 +540,7 @@ const De = function(e) {
|
|
|
540
540
|
y: h.y - o,
|
|
541
541
|
enabled: {
|
|
542
542
|
[m]: i,
|
|
543
|
-
[
|
|
543
|
+
[f]: r
|
|
544
544
|
}
|
|
545
545
|
}
|
|
546
546
|
};
|
|
@@ -560,18 +560,18 @@ const De = function(e) {
|
|
|
560
560
|
} = t, {
|
|
561
561
|
apply: a = () => {
|
|
562
562
|
},
|
|
563
|
-
...
|
|
564
|
-
} = et(e, t),
|
|
563
|
+
...u
|
|
564
|
+
} = et(e, t), c = await gt(t, u), f = Q(s), m = nt(s), d = N(s) === "y", {
|
|
565
565
|
width: p,
|
|
566
566
|
height: h
|
|
567
567
|
} = i.floating;
|
|
568
568
|
let y, g;
|
|
569
|
-
|
|
570
|
-
const v = h -
|
|
569
|
+
f === "top" || f === "bottom" ? (y = f, g = m === (await (r.isRTL == null ? void 0 : r.isRTL(l.floating)) ? "start" : "end") ? "left" : "right") : (g = f, y = m === "end" ? "top" : "bottom");
|
|
570
|
+
const v = h - c.top - c.bottom, A = p - c.left - c.right, b = Y(h - c[y], v), w = Y(p - c[g], A), E = !t.middlewareData.shift;
|
|
571
571
|
let D = b, B = w;
|
|
572
572
|
if ((n = t.middlewareData.shift) != null && n.enabled.x && (B = A), (o = t.middlewareData.shift) != null && o.enabled.y && (D = v), E && !m) {
|
|
573
|
-
const O =
|
|
574
|
-
|
|
573
|
+
const O = S(c.left, 0), x = S(c.right, 0), P = S(c.top, 0), j = S(c.bottom, 0);
|
|
574
|
+
d ? B = p - 2 * (O !== 0 || x !== 0 ? O + x : S(c.left, c.right)) : D = h - 2 * (P !== 0 || j !== 0 ? P + j : S(c.top, c.bottom));
|
|
575
575
|
}
|
|
576
576
|
await a({
|
|
577
577
|
...t,
|
|
@@ -590,28 +590,28 @@ const De = function(e) {
|
|
|
590
590
|
function at() {
|
|
591
591
|
return typeof window < "u";
|
|
592
592
|
}
|
|
593
|
-
function
|
|
593
|
+
function X(e) {
|
|
594
594
|
return Kt(e) ? (e.nodeName || "").toLowerCase() : "#document";
|
|
595
595
|
}
|
|
596
|
-
function
|
|
596
|
+
function R(e) {
|
|
597
597
|
var t;
|
|
598
598
|
return (e == null || (t = e.ownerDocument) == null ? void 0 : t.defaultView) || window;
|
|
599
599
|
}
|
|
600
|
-
function
|
|
600
|
+
function F(e) {
|
|
601
601
|
var t;
|
|
602
602
|
return (t = (Kt(e) ? e.ownerDocument : e.document) || window.document) == null ? void 0 : t.documentElement;
|
|
603
603
|
}
|
|
604
604
|
function Kt(e) {
|
|
605
|
-
return at() ? e instanceof Node || e instanceof
|
|
605
|
+
return at() ? e instanceof Node || e instanceof R(e).Node : !1;
|
|
606
606
|
}
|
|
607
|
-
function
|
|
608
|
-
return at() ? e instanceof Element || e instanceof
|
|
607
|
+
function k(e) {
|
|
608
|
+
return at() ? e instanceof Element || e instanceof R(e).Element : !1;
|
|
609
609
|
}
|
|
610
|
-
function
|
|
611
|
-
return at() ? e instanceof HTMLElement || e instanceof
|
|
610
|
+
function L(e) {
|
|
611
|
+
return at() ? e instanceof HTMLElement || e instanceof R(e).HTMLElement : !1;
|
|
612
612
|
}
|
|
613
613
|
function Mt(e) {
|
|
614
|
-
return !at() || typeof ShadowRoot > "u" ? !1 : e instanceof ShadowRoot || e instanceof
|
|
614
|
+
return !at() || typeof ShadowRoot > "u" ? !1 : e instanceof ShadowRoot || e instanceof R(e).ShadowRoot;
|
|
615
615
|
}
|
|
616
616
|
const _e = /* @__PURE__ */ new Set(["inline", "contents"]);
|
|
617
617
|
function ot(e) {
|
|
@@ -620,12 +620,12 @@ function ot(e) {
|
|
|
620
620
|
overflowX: n,
|
|
621
621
|
overflowY: o,
|
|
622
622
|
display: s
|
|
623
|
-
} =
|
|
623
|
+
} = T(e);
|
|
624
624
|
return /auto|scroll|overlay|hidden|clip/.test(t + o + n) && !_e.has(s);
|
|
625
625
|
}
|
|
626
|
-
const
|
|
627
|
-
function
|
|
628
|
-
return
|
|
626
|
+
const ke = /* @__PURE__ */ new Set(["table", "td", "th"]);
|
|
627
|
+
function Te(e) {
|
|
628
|
+
return ke.has(X(e));
|
|
629
629
|
}
|
|
630
630
|
const Ie = [":popover-open", ":modal"];
|
|
631
631
|
function ct(e) {
|
|
@@ -637,14 +637,14 @@ function ct(e) {
|
|
|
637
637
|
}
|
|
638
638
|
});
|
|
639
639
|
}
|
|
640
|
-
const
|
|
640
|
+
const Le = ["transform", "translate", "scale", "rotate", "perspective"], Fe = ["transform", "translate", "scale", "rotate", "perspective", "filter"], Be = ["paint", "layout", "strict", "content"];
|
|
641
641
|
function yt(e) {
|
|
642
|
-
const t = vt(), n =
|
|
643
|
-
return
|
|
642
|
+
const t = vt(), n = k(e) ? T(e) : e;
|
|
643
|
+
return Le.some((o) => n[o] ? n[o] !== "none" : !1) || (n.containerType ? n.containerType !== "normal" : !1) || !t && (n.backdropFilter ? n.backdropFilter !== "none" : !1) || !t && (n.filter ? n.filter !== "none" : !1) || Fe.some((o) => (n.willChange || "").includes(o)) || Be.some((o) => (n.contain || "").includes(o));
|
|
644
644
|
}
|
|
645
645
|
function Me(e) {
|
|
646
646
|
let t = H(e);
|
|
647
|
-
for (;
|
|
647
|
+
for (; L(t) && !z(t); ) {
|
|
648
648
|
if (yt(t))
|
|
649
649
|
return t;
|
|
650
650
|
if (ct(t))
|
|
@@ -657,14 +657,14 @@ function vt() {
|
|
|
657
657
|
return typeof CSS > "u" || !CSS.supports ? !1 : CSS.supports("-webkit-backdrop-filter", "none");
|
|
658
658
|
}
|
|
659
659
|
const Pe = /* @__PURE__ */ new Set(["html", "body", "#document"]);
|
|
660
|
-
function
|
|
661
|
-
return Pe.has(
|
|
660
|
+
function z(e) {
|
|
661
|
+
return Pe.has(X(e));
|
|
662
662
|
}
|
|
663
|
-
function
|
|
664
|
-
return
|
|
663
|
+
function T(e) {
|
|
664
|
+
return R(e).getComputedStyle(e);
|
|
665
665
|
}
|
|
666
666
|
function ut(e) {
|
|
667
|
-
return
|
|
667
|
+
return k(e) ? {
|
|
668
668
|
scrollLeft: e.scrollLeft,
|
|
669
669
|
scrollTop: e.scrollTop
|
|
670
670
|
} : {
|
|
@@ -673,25 +673,25 @@ function ut(e) {
|
|
|
673
673
|
};
|
|
674
674
|
}
|
|
675
675
|
function H(e) {
|
|
676
|
-
if (
|
|
676
|
+
if (X(e) === "html")
|
|
677
677
|
return e;
|
|
678
678
|
const t = (
|
|
679
679
|
// Step into the shadow DOM of the parent of a slotted node.
|
|
680
680
|
e.assignedSlot || // DOM Element detected.
|
|
681
681
|
e.parentNode || // ShadowRoot detected.
|
|
682
682
|
Mt(e) && e.host || // Fallback.
|
|
683
|
-
|
|
683
|
+
F(e)
|
|
684
684
|
);
|
|
685
685
|
return Mt(t) ? t.host : t;
|
|
686
686
|
}
|
|
687
687
|
function Yt(e) {
|
|
688
688
|
const t = H(e);
|
|
689
|
-
return
|
|
689
|
+
return z(t) ? e.ownerDocument ? e.ownerDocument.body : e.body : L(t) && ot(t) ? t : Yt(t);
|
|
690
690
|
}
|
|
691
691
|
function tt(e, t, n) {
|
|
692
692
|
var o;
|
|
693
693
|
t === void 0 && (t = []), n === void 0 && (n = !0);
|
|
694
|
-
const s = Yt(e), i = s === ((o = e.ownerDocument) == null ? void 0 : o.body), r =
|
|
694
|
+
const s = Yt(e), i = s === ((o = e.ownerDocument) == null ? void 0 : o.body), r = R(s);
|
|
695
695
|
if (i) {
|
|
696
696
|
const l = ht(r);
|
|
697
697
|
return t.concat(r, r.visualViewport || [], ot(s) ? s : [], l && n ? tt(l) : []);
|
|
@@ -701,10 +701,10 @@ function tt(e, t, n) {
|
|
|
701
701
|
function ht(e) {
|
|
702
702
|
return e.parent && Object.getPrototypeOf(e.parent) ? e.frameElement : null;
|
|
703
703
|
}
|
|
704
|
-
function
|
|
705
|
-
const t =
|
|
704
|
+
function zt(e) {
|
|
705
|
+
const t = T(e);
|
|
706
706
|
let n = parseFloat(t.width) || 0, o = parseFloat(t.height) || 0;
|
|
707
|
-
const s =
|
|
707
|
+
const s = L(e), i = s ? e.offsetWidth : n, r = s ? e.offsetHeight : o, l = it(n) !== i || it(o) !== r;
|
|
708
708
|
return l && (n = i, o = r), {
|
|
709
709
|
width: n,
|
|
710
710
|
height: o,
|
|
@@ -712,59 +712,59 @@ function Xt(e) {
|
|
|
712
712
|
};
|
|
713
713
|
}
|
|
714
714
|
function At(e) {
|
|
715
|
-
return
|
|
715
|
+
return k(e) ? e : e.contextElement;
|
|
716
716
|
}
|
|
717
717
|
function K(e) {
|
|
718
718
|
const t = At(e);
|
|
719
|
-
if (!
|
|
719
|
+
if (!L(t))
|
|
720
720
|
return I(1);
|
|
721
721
|
const n = t.getBoundingClientRect(), {
|
|
722
722
|
width: o,
|
|
723
723
|
height: s,
|
|
724
724
|
$: i
|
|
725
|
-
} =
|
|
725
|
+
} = zt(t);
|
|
726
726
|
let r = (i ? it(n.width) : n.width) / o, l = (i ? it(n.height) : n.height) / s;
|
|
727
727
|
return (!r || !Number.isFinite(r)) && (r = 1), (!l || !Number.isFinite(l)) && (l = 1), {
|
|
728
728
|
x: r,
|
|
729
729
|
y: l
|
|
730
730
|
};
|
|
731
731
|
}
|
|
732
|
-
const
|
|
733
|
-
function
|
|
734
|
-
const t =
|
|
735
|
-
return !vt() || !t.visualViewport ?
|
|
732
|
+
const Ne = /* @__PURE__ */ I(0);
|
|
733
|
+
function Xt(e) {
|
|
734
|
+
const t = R(e);
|
|
735
|
+
return !vt() || !t.visualViewport ? Ne : {
|
|
736
736
|
x: t.visualViewport.offsetLeft,
|
|
737
737
|
y: t.visualViewport.offsetTop
|
|
738
738
|
};
|
|
739
739
|
}
|
|
740
|
-
function
|
|
741
|
-
return t === void 0 && (t = !1), !n || t && n !==
|
|
740
|
+
function Ve(e, t, n) {
|
|
741
|
+
return t === void 0 && (t = !1), !n || t && n !== R(e) ? !1 : t;
|
|
742
742
|
}
|
|
743
743
|
function J(e, t, n, o) {
|
|
744
744
|
t === void 0 && (t = !1), n === void 0 && (n = !1);
|
|
745
745
|
const s = e.getBoundingClientRect(), i = At(e);
|
|
746
746
|
let r = I(1);
|
|
747
|
-
t && (o ?
|
|
748
|
-
const l =
|
|
749
|
-
let a = (s.left + l.x) / r.x,
|
|
747
|
+
t && (o ? k(o) && (r = K(o)) : r = K(e));
|
|
748
|
+
const l = Ve(i, n, o) ? Xt(i) : I(0);
|
|
749
|
+
let a = (s.left + l.x) / r.x, u = (s.top + l.y) / r.y, c = s.width / r.x, f = s.height / r.y;
|
|
750
750
|
if (i) {
|
|
751
|
-
const m =
|
|
751
|
+
const m = R(i), d = o && k(o) ? R(o) : o;
|
|
752
752
|
let p = m, h = ht(p);
|
|
753
|
-
for (; h && o &&
|
|
754
|
-
const y = K(h), g = h.getBoundingClientRect(), v =
|
|
755
|
-
a *= y.x,
|
|
753
|
+
for (; h && o && d !== p; ) {
|
|
754
|
+
const y = K(h), g = h.getBoundingClientRect(), v = T(h), A = g.left + (h.clientLeft + parseFloat(v.paddingLeft)) * y.x, b = g.top + (h.clientTop + parseFloat(v.paddingTop)) * y.y;
|
|
755
|
+
a *= y.x, u *= y.y, c *= y.x, f *= y.y, a += A, u += b, p = R(h), h = ht(p);
|
|
756
756
|
}
|
|
757
757
|
}
|
|
758
758
|
return lt({
|
|
759
|
-
width:
|
|
760
|
-
height:
|
|
759
|
+
width: c,
|
|
760
|
+
height: f,
|
|
761
761
|
x: a,
|
|
762
|
-
y:
|
|
762
|
+
y: u
|
|
763
763
|
});
|
|
764
764
|
}
|
|
765
765
|
function ft(e, t) {
|
|
766
766
|
const n = ut(e).scrollLeft;
|
|
767
|
-
return t ? t.left + n : J(
|
|
767
|
+
return t ? t.left + n : J(F(e)).left + n;
|
|
768
768
|
}
|
|
769
769
|
function jt(e, t) {
|
|
770
770
|
const n = e.getBoundingClientRect(), o = n.left + t.scrollLeft - ft(e, n), s = n.top + t.scrollTop;
|
|
@@ -773,41 +773,41 @@ function jt(e, t) {
|
|
|
773
773
|
y: s
|
|
774
774
|
};
|
|
775
775
|
}
|
|
776
|
-
function
|
|
776
|
+
function Qe(e) {
|
|
777
777
|
let {
|
|
778
778
|
elements: t,
|
|
779
779
|
rect: n,
|
|
780
780
|
offsetParent: o,
|
|
781
781
|
strategy: s
|
|
782
782
|
} = e;
|
|
783
|
-
const i = s === "fixed", r =
|
|
783
|
+
const i = s === "fixed", r = F(o), l = t ? ct(t.floating) : !1;
|
|
784
784
|
if (o === r || l && i)
|
|
785
785
|
return n;
|
|
786
786
|
let a = {
|
|
787
787
|
scrollLeft: 0,
|
|
788
788
|
scrollTop: 0
|
|
789
|
-
},
|
|
790
|
-
const
|
|
791
|
-
if ((
|
|
792
|
-
const
|
|
793
|
-
|
|
789
|
+
}, u = I(1);
|
|
790
|
+
const c = I(0), f = L(o);
|
|
791
|
+
if ((f || !f && !i) && ((X(o) !== "body" || ot(r)) && (a = ut(o)), L(o))) {
|
|
792
|
+
const d = J(o);
|
|
793
|
+
u = K(o), c.x = d.x + o.clientLeft, c.y = d.y + o.clientTop;
|
|
794
794
|
}
|
|
795
|
-
const m = r && !
|
|
795
|
+
const m = r && !f && !i ? jt(r, a) : I(0);
|
|
796
796
|
return {
|
|
797
|
-
width: n.width *
|
|
798
|
-
height: n.height *
|
|
799
|
-
x: n.x *
|
|
800
|
-
y: n.y *
|
|
797
|
+
width: n.width * u.x,
|
|
798
|
+
height: n.height * u.y,
|
|
799
|
+
x: n.x * u.x - a.scrollLeft * u.x + c.x + m.x,
|
|
800
|
+
y: n.y * u.y - a.scrollTop * u.y + c.y + m.y
|
|
801
801
|
};
|
|
802
802
|
}
|
|
803
803
|
function He(e) {
|
|
804
804
|
return Array.from(e.getClientRects());
|
|
805
805
|
}
|
|
806
|
-
function
|
|
807
|
-
const t =
|
|
806
|
+
function Ue(e) {
|
|
807
|
+
const t = F(e), n = ut(e), o = e.ownerDocument.body, s = S(t.scrollWidth, t.clientWidth, o.scrollWidth, o.clientWidth), i = S(t.scrollHeight, t.clientHeight, o.scrollHeight, o.clientHeight);
|
|
808
808
|
let r = -n.scrollLeft + ft(e);
|
|
809
809
|
const l = -n.scrollTop;
|
|
810
|
-
return
|
|
810
|
+
return T(o).direction === "rtl" && (r += S(t.clientWidth, o.clientWidth) - s), {
|
|
811
811
|
width: s,
|
|
812
812
|
height: i,
|
|
813
813
|
x: r,
|
|
@@ -815,19 +815,19 @@ function qe(e) {
|
|
|
815
815
|
};
|
|
816
816
|
}
|
|
817
817
|
const Pt = 25;
|
|
818
|
-
function
|
|
819
|
-
const n =
|
|
818
|
+
function qe(e, t) {
|
|
819
|
+
const n = R(e), o = F(e), s = n.visualViewport;
|
|
820
820
|
let i = o.clientWidth, r = o.clientHeight, l = 0, a = 0;
|
|
821
821
|
if (s) {
|
|
822
822
|
i = s.width, r = s.height;
|
|
823
|
-
const
|
|
824
|
-
(!
|
|
823
|
+
const c = vt();
|
|
824
|
+
(!c || c && t === "fixed") && (l = s.offsetLeft, a = s.offsetTop);
|
|
825
825
|
}
|
|
826
|
-
const
|
|
827
|
-
if (
|
|
828
|
-
const
|
|
826
|
+
const u = ft(o);
|
|
827
|
+
if (u <= 0) {
|
|
828
|
+
const c = o.ownerDocument, f = c.body, m = getComputedStyle(f), d = c.compatMode === "CSS1Compat" && parseFloat(m.marginLeft) + parseFloat(m.marginRight) || 0, p = Math.abs(o.clientWidth - f.clientWidth - d);
|
|
829
829
|
p <= Pt && (i -= p);
|
|
830
|
-
} else
|
|
830
|
+
} else u <= Pt && (i += u);
|
|
831
831
|
return {
|
|
832
832
|
width: i,
|
|
833
833
|
height: r,
|
|
@@ -837,24 +837,24 @@ function Ue(e, t) {
|
|
|
837
837
|
}
|
|
838
838
|
const We = /* @__PURE__ */ new Set(["absolute", "fixed"]);
|
|
839
839
|
function Ge(e, t) {
|
|
840
|
-
const n = J(e, !0, t === "fixed"), o = n.top + e.clientTop, s = n.left + e.clientLeft, i =
|
|
840
|
+
const n = J(e, !0, t === "fixed"), o = n.top + e.clientTop, s = n.left + e.clientLeft, i = L(e) ? K(e) : I(1), r = e.clientWidth * i.x, l = e.clientHeight * i.y, a = s * i.x, u = o * i.y;
|
|
841
841
|
return {
|
|
842
842
|
width: r,
|
|
843
843
|
height: l,
|
|
844
844
|
x: a,
|
|
845
|
-
y:
|
|
845
|
+
y: u
|
|
846
846
|
};
|
|
847
847
|
}
|
|
848
|
-
function
|
|
848
|
+
function Nt(e, t, n) {
|
|
849
849
|
let o;
|
|
850
850
|
if (t === "viewport")
|
|
851
|
-
o =
|
|
851
|
+
o = qe(e, n);
|
|
852
852
|
else if (t === "document")
|
|
853
|
-
o =
|
|
854
|
-
else if (
|
|
853
|
+
o = Ue(F(e));
|
|
854
|
+
else if (k(t))
|
|
855
855
|
o = Ge(t, n);
|
|
856
856
|
else {
|
|
857
|
-
const s =
|
|
857
|
+
const s = Xt(e);
|
|
858
858
|
o = {
|
|
859
859
|
x: t.x - s.x,
|
|
860
860
|
y: t.y - s.y,
|
|
@@ -866,18 +866,18 @@ function Vt(e, t, n) {
|
|
|
866
866
|
}
|
|
867
867
|
function $t(e, t) {
|
|
868
868
|
const n = H(e);
|
|
869
|
-
return n === t || !
|
|
869
|
+
return n === t || !k(n) || z(n) ? !1 : T(n).position === "fixed" || $t(n, t);
|
|
870
870
|
}
|
|
871
871
|
function Je(e, t) {
|
|
872
872
|
const n = t.get(e);
|
|
873
873
|
if (n)
|
|
874
874
|
return n;
|
|
875
|
-
let o = tt(e, [], !1).filter((l) =>
|
|
876
|
-
const i =
|
|
875
|
+
let o = tt(e, [], !1).filter((l) => k(l) && X(l) !== "body"), s = null;
|
|
876
|
+
const i = T(e).position === "fixed";
|
|
877
877
|
let r = i ? H(e) : e;
|
|
878
|
-
for (;
|
|
879
|
-
const l =
|
|
880
|
-
!a && l.position === "fixed" && (s = null), (i ? !a && !s : !a && l.position === "static" && !!s && We.has(s.position) || ot(r) && !a && $t(e, r)) ? o = o.filter((
|
|
878
|
+
for (; k(r) && !z(r); ) {
|
|
879
|
+
const l = T(r), a = yt(r);
|
|
880
|
+
!a && l.position === "fixed" && (s = null), (i ? !a && !s : !a && l.position === "static" && !!s && We.has(s.position) || ot(r) && !a && $t(e, r)) ? o = o.filter((c) => c !== r) : s = l, r = H(r);
|
|
881
881
|
}
|
|
882
882
|
return t.set(e, o), o;
|
|
883
883
|
}
|
|
@@ -888,10 +888,10 @@ function Ke(e) {
|
|
|
888
888
|
rootBoundary: o,
|
|
889
889
|
strategy: s
|
|
890
890
|
} = e;
|
|
891
|
-
const r = [...n === "clippingAncestors" ? ct(t) ? [] : Je(t, this._c) : [].concat(n), o], l = r[0], a = r.reduce((
|
|
892
|
-
const
|
|
893
|
-
return
|
|
894
|
-
},
|
|
891
|
+
const r = [...n === "clippingAncestors" ? ct(t) ? [] : Je(t, this._c) : [].concat(n), o], l = r[0], a = r.reduce((u, c) => {
|
|
892
|
+
const f = Nt(t, c, s);
|
|
893
|
+
return u.top = S(f.top, u.top), u.right = Y(f.right, u.right), u.bottom = Y(f.bottom, u.bottom), u.left = S(f.left, u.left), u;
|
|
894
|
+
}, Nt(t, l, s));
|
|
895
895
|
return {
|
|
896
896
|
width: a.right - a.left,
|
|
897
897
|
height: a.bottom - a.top,
|
|
@@ -903,69 +903,69 @@ function Ye(e) {
|
|
|
903
903
|
const {
|
|
904
904
|
width: t,
|
|
905
905
|
height: n
|
|
906
|
-
} =
|
|
906
|
+
} = zt(e);
|
|
907
907
|
return {
|
|
908
908
|
width: t,
|
|
909
909
|
height: n
|
|
910
910
|
};
|
|
911
911
|
}
|
|
912
|
-
function
|
|
913
|
-
const o =
|
|
912
|
+
function ze(e, t, n) {
|
|
913
|
+
const o = L(t), s = F(t), i = n === "fixed", r = J(e, !0, i, t);
|
|
914
914
|
let l = {
|
|
915
915
|
scrollLeft: 0,
|
|
916
916
|
scrollTop: 0
|
|
917
917
|
};
|
|
918
918
|
const a = I(0);
|
|
919
|
-
function
|
|
919
|
+
function u() {
|
|
920
920
|
a.x = ft(s);
|
|
921
921
|
}
|
|
922
922
|
if (o || !o && !i)
|
|
923
|
-
if ((
|
|
924
|
-
const
|
|
925
|
-
a.x =
|
|
926
|
-
} else s &&
|
|
927
|
-
i && !o && s &&
|
|
928
|
-
const
|
|
923
|
+
if ((X(t) !== "body" || ot(s)) && (l = ut(t)), o) {
|
|
924
|
+
const d = J(t, !0, i, t);
|
|
925
|
+
a.x = d.x + t.clientLeft, a.y = d.y + t.clientTop;
|
|
926
|
+
} else s && u();
|
|
927
|
+
i && !o && s && u();
|
|
928
|
+
const c = s && !o && !i ? jt(s, l) : I(0), f = r.left + l.scrollLeft - a.x - c.x, m = r.top + l.scrollTop - a.y - c.y;
|
|
929
929
|
return {
|
|
930
|
-
x:
|
|
930
|
+
x: f,
|
|
931
931
|
y: m,
|
|
932
932
|
width: r.width,
|
|
933
933
|
height: r.height
|
|
934
934
|
};
|
|
935
935
|
}
|
|
936
936
|
function mt(e) {
|
|
937
|
-
return
|
|
937
|
+
return T(e).position === "static";
|
|
938
938
|
}
|
|
939
|
-
function
|
|
940
|
-
if (!
|
|
939
|
+
function Vt(e, t) {
|
|
940
|
+
if (!L(e) || T(e).position === "fixed")
|
|
941
941
|
return null;
|
|
942
942
|
if (t)
|
|
943
943
|
return t(e);
|
|
944
944
|
let n = e.offsetParent;
|
|
945
|
-
return
|
|
945
|
+
return F(e) === n && (n = n.ownerDocument.body), n;
|
|
946
946
|
}
|
|
947
947
|
function Zt(e, t) {
|
|
948
|
-
const n =
|
|
948
|
+
const n = R(e);
|
|
949
949
|
if (ct(e))
|
|
950
950
|
return n;
|
|
951
|
-
if (!
|
|
951
|
+
if (!L(e)) {
|
|
952
952
|
let s = H(e);
|
|
953
|
-
for (; s && !
|
|
954
|
-
if (
|
|
953
|
+
for (; s && !z(s); ) {
|
|
954
|
+
if (k(s) && !mt(s))
|
|
955
955
|
return s;
|
|
956
956
|
s = H(s);
|
|
957
957
|
}
|
|
958
958
|
return n;
|
|
959
959
|
}
|
|
960
|
-
let o =
|
|
961
|
-
for (; o &&
|
|
962
|
-
o =
|
|
963
|
-
return o &&
|
|
960
|
+
let o = Vt(e, t);
|
|
961
|
+
for (; o && Te(o) && mt(o); )
|
|
962
|
+
o = Vt(o, t);
|
|
963
|
+
return o && z(o) && mt(o) && !yt(o) ? n : o || Me(e) || n;
|
|
964
964
|
}
|
|
965
|
-
const
|
|
965
|
+
const Xe = async function(e) {
|
|
966
966
|
const t = this.getOffsetParent || Zt, n = this.getDimensions, o = await n(e.floating);
|
|
967
967
|
return {
|
|
968
|
-
reference:
|
|
968
|
+
reference: ze(e.reference, await t(e.floating), e.strategy),
|
|
969
969
|
floating: {
|
|
970
970
|
x: 0,
|
|
971
971
|
y: 0,
|
|
@@ -975,18 +975,18 @@ const ze = async function(e) {
|
|
|
975
975
|
};
|
|
976
976
|
};
|
|
977
977
|
function je(e) {
|
|
978
|
-
return
|
|
978
|
+
return T(e).direction === "rtl";
|
|
979
979
|
}
|
|
980
980
|
const $e = {
|
|
981
|
-
convertOffsetParentRelativeRectToViewportRelativeRect:
|
|
982
|
-
getDocumentElement:
|
|
981
|
+
convertOffsetParentRelativeRectToViewportRelativeRect: Qe,
|
|
982
|
+
getDocumentElement: F,
|
|
983
983
|
getClippingRect: Ke,
|
|
984
984
|
getOffsetParent: Zt,
|
|
985
|
-
getElementRects:
|
|
985
|
+
getElementRects: Xe,
|
|
986
986
|
getClientRects: He,
|
|
987
987
|
getDimensions: Ye,
|
|
988
988
|
getScale: K,
|
|
989
|
-
isElement:
|
|
989
|
+
isElement: k,
|
|
990
990
|
isRTL: je
|
|
991
991
|
};
|
|
992
992
|
function te(e, t) {
|
|
@@ -994,24 +994,24 @@ function te(e, t) {
|
|
|
994
994
|
}
|
|
995
995
|
function Ze(e, t) {
|
|
996
996
|
let n = null, o;
|
|
997
|
-
const s =
|
|
997
|
+
const s = F(e);
|
|
998
998
|
function i() {
|
|
999
999
|
var l;
|
|
1000
1000
|
clearTimeout(o), (l = n) == null || l.disconnect(), n = null;
|
|
1001
1001
|
}
|
|
1002
1002
|
function r(l, a) {
|
|
1003
1003
|
l === void 0 && (l = !1), a === void 0 && (a = 1), i();
|
|
1004
|
-
const
|
|
1005
|
-
left:
|
|
1006
|
-
top:
|
|
1004
|
+
const u = e.getBoundingClientRect(), {
|
|
1005
|
+
left: c,
|
|
1006
|
+
top: f,
|
|
1007
1007
|
width: m,
|
|
1008
|
-
height:
|
|
1009
|
-
} =
|
|
1010
|
-
if (l || t(), !m || !
|
|
1008
|
+
height: d
|
|
1009
|
+
} = u;
|
|
1010
|
+
if (l || t(), !m || !d)
|
|
1011
1011
|
return;
|
|
1012
|
-
const p = st(
|
|
1012
|
+
const p = st(f), h = st(s.clientWidth - (c + m)), y = st(s.clientHeight - (f + d)), g = st(c), A = {
|
|
1013
1013
|
rootMargin: -p + "px " + -h + "px " + -y + "px " + -g + "px",
|
|
1014
|
-
threshold:
|
|
1014
|
+
threshold: S(0, Y(1, a)) || 1
|
|
1015
1015
|
};
|
|
1016
1016
|
let b = !0;
|
|
1017
1017
|
function w(E) {
|
|
@@ -1023,7 +1023,7 @@ function Ze(e, t) {
|
|
|
1023
1023
|
r(!1, 1e-7);
|
|
1024
1024
|
}, 1e3);
|
|
1025
1025
|
}
|
|
1026
|
-
D === 1 && !te(
|
|
1026
|
+
D === 1 && !te(u, e.getBoundingClientRect()) && r(), b = !1;
|
|
1027
1027
|
}
|
|
1028
1028
|
try {
|
|
1029
1029
|
n = new IntersectionObserver(w, {
|
|
@@ -1046,21 +1046,21 @@ function tn(e, t, n, o) {
|
|
|
1046
1046
|
elementResize: r = typeof ResizeObserver == "function",
|
|
1047
1047
|
layoutShift: l = typeof IntersectionObserver == "function",
|
|
1048
1048
|
animationFrame: a = !1
|
|
1049
|
-
} = o,
|
|
1050
|
-
|
|
1049
|
+
} = o, u = At(e), c = s || i ? [...u ? tt(u) : [], ...tt(t)] : [];
|
|
1050
|
+
c.forEach((g) => {
|
|
1051
1051
|
s && g.addEventListener("scroll", n, {
|
|
1052
1052
|
passive: !0
|
|
1053
1053
|
}), i && g.addEventListener("resize", n);
|
|
1054
1054
|
});
|
|
1055
|
-
const
|
|
1056
|
-
let m = -1,
|
|
1057
|
-
r && (
|
|
1055
|
+
const f = u && l ? Ze(u, n) : null;
|
|
1056
|
+
let m = -1, d = null;
|
|
1057
|
+
r && (d = new ResizeObserver((g) => {
|
|
1058
1058
|
let [v] = g;
|
|
1059
|
-
v && v.target ===
|
|
1059
|
+
v && v.target === u && d && (d.unobserve(t), cancelAnimationFrame(m), m = requestAnimationFrame(() => {
|
|
1060
1060
|
var A;
|
|
1061
|
-
(A =
|
|
1061
|
+
(A = d) == null || A.observe(t);
|
|
1062
1062
|
})), n();
|
|
1063
|
-
}),
|
|
1063
|
+
}), u && !a && d.observe(u), d.observe(t));
|
|
1064
1064
|
let p, h = a ? J(e) : null;
|
|
1065
1065
|
a && y();
|
|
1066
1066
|
function y() {
|
|
@@ -1069,9 +1069,9 @@ function tn(e, t, n, o) {
|
|
|
1069
1069
|
}
|
|
1070
1070
|
return n(), () => {
|
|
1071
1071
|
var g;
|
|
1072
|
-
|
|
1072
|
+
c.forEach((v) => {
|
|
1073
1073
|
s && v.removeEventListener("scroll", n), i && v.removeEventListener("resize", n);
|
|
1074
|
-
}),
|
|
1074
|
+
}), f?.(), (g = d) == null || g.disconnect(), d = null, a && cancelAnimationFrame(p);
|
|
1075
1075
|
};
|
|
1076
1076
|
}
|
|
1077
1077
|
const en = De, nn = Ee, on = Ce, sn = Oe, rn = (e, t, n) => {
|
|
@@ -1109,12 +1109,12 @@ function ln(e, t) {
|
|
|
1109
1109
|
// 靠近屏幕边缘时自动位移
|
|
1110
1110
|
sn({
|
|
1111
1111
|
apply({ rects: l, elements: a }) {
|
|
1112
|
-
const
|
|
1112
|
+
const u = `${l.reference.width}px`;
|
|
1113
1113
|
Object.assign(a.floating.style, {
|
|
1114
|
-
width:
|
|
1114
|
+
width: u,
|
|
1115
1115
|
// 必须锁定,否则在 body 下它可能由于内容过多撑开到 100vw
|
|
1116
|
-
minWidth:
|
|
1117
|
-
maxWidth:
|
|
1116
|
+
minWidth: u,
|
|
1117
|
+
maxWidth: u
|
|
1118
1118
|
});
|
|
1119
1119
|
}
|
|
1120
1120
|
})
|
|
@@ -1130,7 +1130,7 @@ function ln(e, t) {
|
|
|
1130
1130
|
}, r = () => {
|
|
1131
1131
|
o && (o(), o = null);
|
|
1132
1132
|
};
|
|
1133
|
-
return
|
|
1133
|
+
return Ut(r), { floatingStyles: n, startTrack: i, stopTrack: r };
|
|
1134
1134
|
}
|
|
1135
1135
|
const an = "data:image/svg+xml,%3csvg%20t='1695277594902'%20fill='%23fff'%20class='icon'%20viewBox='0%200%201024%201024'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20p-id='2534'%20width='200'%20height='200'%3e%3cpath%20d='M448%2085.333333a362.666667%20362.666667%200%201%200%20224.512%20647.509334l155.818667%20155.818666a42.666667%2042.666667%200%200%200%2060.330666-60.330666l-155.818666-155.818667A362.666667%20362.666667%200%200%200%20448%2085.333333zM170.666667%20448a277.333333%20277.333333%200%201%201%20554.666666%200%20277.333333%20277.333333%200%200%201-554.666666%200z'%20p-id='2535'%3e%3c/path%3e%3c/svg%3e", cn = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAABFUlEQVR4AaRQO07DQBCdWe8B4B5IFFyAK9ARkIVNhIQEEiVtJLgABRVRvIBCJBquwBVyDgoaSnuHeZY3MlYcNsnIb8fze6M3hra0XoKJm95N3Nv3EnyhFvb2EgjRJbOMKqmO2tDcvQ5fK+qvl4CJbOn9/CJPP9tArp5sHtP4lc652VXxPL1Z1hRFIOytF1NuTJCfnT4Ms8HjSgJctn1xIt6hxqIkdK+u8U8zT1ESmP5enUkWmqMkhG2FmxXOvR+EGD5KAhoDqsQvtiMXJQGNQJ4N8mF6PMd/wL8SxuOXPSG21pj9p+L1EOjGyAHoQQ0zWGDqx9pbPWIpwqOEkw+gGyMHoAc1ozOkVhOcZyepYndNpDpPvwAAAP//BVQJHAAAAAZJREFUAwDZWL4hub5xHQAAAABJRU5ErkJggg==", un = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAACC0lEQVR4AXxRv2tTURT+zk1iIjgoOMShkIJVNwf/gQYULOjQwaGvGl8TBMEMDg4ODgF17likvL4HIYm4OLg61K2CooWKDoKCDoJDHASb9N17POf5Enwk6eN+9/z+3nfvNZjxbYS9ymbYXlQ8CbvnZrRhKoEOFMl9zFHuuaJA/E4Jp5FMJTCwZWner/veCYX6ecQVsRNrKsFE1yGJDMFW1Hm4FXX7hnIvADquvkJ9zYn/U3vw35chYOA2Ebcc26uWbVWwnKKqOak9ktmmYLwyBATkY+d2b63d2FYgps9umNtTX6G18WTqmNRmTNB+djaIOqEpmC+FIn8Lom4vaD89n2lKgwkCebYNsvEnAlXI4CIMXSagTNa9l9p6Ojc2CUEYhiW5oE3IxQH4AYNFeb5qvea9SuB7Vc1J7ReDjomidZ2RWNKysyneFHNFovGgxIiizoWR9BGRqiKw76i0qj2JAo7jtwycJDvY1eQIDNM0lu+OYrUHf/BBbEmI9sTKP2VvNGpvAP4Kc1SVSGb2OlLiVQa+12srr7UrUZA6Lx27e0HUu6PnU/kOXGbwaT1Gq9XKa80xmgTa1hlFQiBP1hNWn4AdOd8DpmLfgnakYV/yv/UF5ipn+qLyvgGp2us6I/V/R+DYPiYenpKbv0Y8mGeLS0OmhYbvLQuWiGkeFkuGBwtrvrdyMKA5nVGCvwAAAP//q4xnOgAAAAZJREFUAwCH2O8KfEWHWQAAAABJRU5ErkJggg==", fn = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAACT0lEQVR4AaRSO2hTYRT+zn9v2g6CiktFJYoVHXQoOljM2EIEh0orbRKa5qUuDoIZAnXI4FBwcRDikMcNkoQMQjcVESo4OASsW2kLBi3oUKiD1OZx7/H811wJZFF6uOee85/H93/3nKtwQPkvgFKpdKRgVR+UrFrOsurX9N3/DJCvVPxMwx+lKcbgKzbstPhwAXSyWK7eLZZrc4VCNZDPPx/Tt+kCrTqvOrQqfuNrc2OcgW0CduQM9TfJyIB5mQy8UaaxKbftFq3qL9HP1KGGFDe+NDdC/jPnlwgcZEM9lRiU2VFjgngI4FGxa0IvZXecU07XPsc2pkCUIULaa2Z2MsJ7Orkw/8kFiMVCb4XWcQV14w8temL4aJNM47Fh0OHEYqieWAyXT/jPBhzmh7o5EY28Rk/cGWSz2a4GSsTCt3tgs5qmDc726sTQvsS6/c0SFDz97lO/329K4z2Amm1u3ZK11SyrOmNC/ZDYSElWiT5R2resymUZ1pIUv2Qa+iafcrrFretDNJwTf94GUnt7u9u6to3hUW09dQEcIC+BR0LxqgztPnFrotd8wWHclNykaR4dYeCngj0IQNyekOQshLas8hmzLyA3B2UTU6l4eEX8Ld8IZsTu+Mg4hj5xGcTj8f1kLPxChjgO0AdWlAOwnkotbImFrHGFGdOy6u82aJAB+kUZywQ6KaH3ou7TcbguziRApiLWOXjiMvAO2iaic3rH6wxe1Wetd+KRNQKEDV9kwisd83QAQCfkr7uUjEUq2vdUgdJQFExEw++8mLa/AQAA//9h0VsEAAAABklEQVQDAKhs6Pxd3K8TAAAAAElFTkSuQmCC", dn = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAACmklEQVR4AXRTT0jUQRT+3uyqGxgYeCiy1JAo6JBUp4Q81EEiKKiDa+H+/ENGHgPpZtChQ4EHL+Ku+9t0V7EkQSGPBYGHBIU6RAqt2cFDBw9C+3de3yy7hobDvHm/+d4337x58xuDQ9r4+FRDLJZqG49PtrvvQ2j4TyDmJ7sm/NRqoMpsIYD3RgIL7pvY54lEqvug0J5APB4PxfzUOwFGRWReVJp7I+GjW+nvxxQo0DagOjLhJxcctyK0J6BS/UaAc1nNtXrdnc88rzPtSMPDwwXiM7R2WNwDpMVKzTTKrSRQTq0tq9mOR55XWliOY2wsVQ+RRWZQiyACjiPQ9pg/0+U4JQEoBkXMi4OLmWpdsEZXofY5yYtSzH10HHJHBPYJMZhyhS8X84U5B+y36iaBNPxMr59nPTo9z8uU4jaToL8Yj88eN2xNTG+3r+/BBncMuSLRln1/+iZgdkhEY2NjvfMVo1DarbG20GIqoPMaqL5G38Zb+GBh36roMufpzc3N3xSvi0ZfX6APEYNAg86bjMluCFDr+7OX1JoWQNJed/ipaK6Z6oOi2dbTZ85eVan+YYLBL7yBdRb9IXkha23aPPa8bQBrFoUVqo4qMMU5mOZ2JBKeo98RiwHi8xQ7Qo6vCsdb6e+//4ubgJegLzlmDOQ6i/XKCVQskZg9aaFtRrBGsYytQpQiu+SPOI5xQ2+kK6mQJRJHo8lko8MqxswGhceCzY25mMnLEmOf3Br6f2/BaLaTqhuSl6/xxPRQNDrJehBRrSWxABMaMnmsKfCN9eEfSZS9lAG9O3OmJ9J1C9ABVb1rgoF1PqA/Cokw3k7stgKDvZHwHXcUYqW+J1CacejlcXoi4SvFvD2lRdxAER0s3glirS5Gyr7+FwAA//8Pj6q2AAAABklEQVQDAJPeLlNn5TR8AAAAAElFTkSuQmCC", mn = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAACgUlEQVR4AXRST0hUYRD/zbfbrqahQpAHlQ3dSurYoaBAwWNQkIT7J/ve09DQsOigkNCha4ckl4Lct0/S3QI7REFEBB08FBHRIYLwIJEodOlUurnfNN+6mq9weMPM+818v2/mm1HYQXK5XH02mz9h1fo7pOE/gkwmU+v5+fuGot8phJdWmSLLnl+4I0RV/xIFCGxCdU3DUwaOkULX18Uve1ydrC4xdwLcwRR9bnO2kwQIoCIDEowpXjsZ4vBCSyx+w/Nnb1KElkkwG4OqGhG79QUImEkT0T2JrpZ4fV5sF0Ad6je9BrBKxLeZuVv8rS9IAG4qGf5oTPSolNxIXOyUNjqlpb0W4xI+Cd62dVqcAAGBVqSCVmPMIoPCttzm2MEBAoeLir4hRK2AWPyVIAHRHMH0Ly0tCBF3M5t+Aq6A0HPJSSyCeZAIz7BNAgQwqxNyc1NL7MCoeyH1xNWpuKsTcet7fv46QI0/zdoEtkmAwHGcHyFQj/Q57vuPzm7m+X5efB6HYj3kOCubuLVlApltfdbPX5uaetCmdeKVAqUN1mdy04XR3PTsqAHPWMztTb24myvEBBuRM+WlUnbzDEXeya2D4XC0zrJqnXwsO3pG3mCMGWMK6lQZk2A0hH2GMSxL9VlI6lVkd90RgGKkVFrrc+9REXubjLH9FxfbbVUVGG5v4i2p8LD8x9ax65C66KTfKGCSDc97fv6DJzuf9QtDtm+iqsM1ot70w9O+YDbmSQ6bkkyCJitnAUcnryqmuExgSsZYKypvgFvS+5xVsJk0MGlps97mFCVXpnNZqoBcbo2QyJz7dCLj6JTj6tRxVyf3izZUtNndwM73SU55JzaO4Q8AAAD//54At5MAAAAGSURBVAMAh2IbMAJQAZQAAAAASUVORK5CYII=", pn = ie({
|
|
1136
1136
|
name: "GlobalSearch",
|
|
@@ -1150,10 +1150,10 @@ const an = "data:image/svg+xml,%3csvg%20t='1695277594902'%20fill='%23fff'%20clas
|
|
|
1150
1150
|
showItemTag: { type: Boolean, default: !0 }
|
|
1151
1151
|
},
|
|
1152
1152
|
setup(e, { emit: t }) {
|
|
1153
|
-
const n = C(""), o = C(!1), s = C(!1), i = C(""), r = C(null), l = C(null), a = C(null),
|
|
1153
|
+
const n = C(""), o = C(!1), s = C(!1), i = C(""), r = C(null), l = C(null), a = C(null), u = C(null), { searchHistory: c, saveToHistory: f, clearHistory: m } = le(
|
|
1154
1154
|
xt(e, "historyKey")
|
|
1155
1155
|
), {
|
|
1156
|
-
searchResults:
|
|
1156
|
+
searchResults: d,
|
|
1157
1157
|
loading: p,
|
|
1158
1158
|
isFetchingMore: h,
|
|
1159
1159
|
isFinished: y,
|
|
@@ -1162,19 +1162,15 @@ const an = "data:image/svg+xml,%3csvg%20t='1695277594902'%20fill='%23fff'%20clas
|
|
|
1162
1162
|
filterByTypes: A
|
|
1163
1163
|
} = ue(n, xt(e, "searchTypeList")), { floatingStyles: b, startTrack: w, stopTrack: E } = ln(
|
|
1164
1164
|
a,
|
|
1165
|
-
|
|
1165
|
+
u
|
|
1166
1166
|
), D = async () => {
|
|
1167
|
-
if (s.value = !0,
|
|
1168
|
-
"🍉 ~ index.vue:210 ~ onFocus ~ searchResults.value:",
|
|
1169
|
-
f.value,
|
|
1170
|
-
o.value
|
|
1171
|
-
), !e.multiple && o.value && f.value.length === 0) {
|
|
1167
|
+
if (s.value = !0, !e.multiple && o.value && d.value.length === 0) {
|
|
1172
1168
|
const x = e.value;
|
|
1173
|
-
if (
|
|
1169
|
+
if (x?.id) {
|
|
1174
1170
|
p.value = !0;
|
|
1175
1171
|
try {
|
|
1176
1172
|
const P = await ce(x.id, x.type);
|
|
1177
|
-
|
|
1173
|
+
d.value = A(P.records);
|
|
1178
1174
|
} finally {
|
|
1179
1175
|
p.value = !1;
|
|
1180
1176
|
}
|
|
@@ -1194,11 +1190,11 @@ const an = "data:image/svg+xml,%3csvg%20t='1695277594902'%20fill='%23fff'%20clas
|
|
|
1194
1190
|
};
|
|
1195
1191
|
return bt(s, (x) => x ? w() : E()), bt(n, (x) => {
|
|
1196
1192
|
if (!x.trim()) {
|
|
1197
|
-
|
|
1193
|
+
d.value = [];
|
|
1198
1194
|
return;
|
|
1199
1195
|
}
|
|
1200
1196
|
r.value && clearTimeout(r.value), r.value = setTimeout(() => v(1, !1), 300);
|
|
1201
|
-
}),
|
|
1197
|
+
}), Ut(E), {
|
|
1202
1198
|
// 状态
|
|
1203
1199
|
query: n,
|
|
1204
1200
|
isSelected: o,
|
|
@@ -1206,17 +1202,17 @@ const an = "data:image/svg+xml,%3csvg%20t='1695277594902'%20fill='%23fff'%20clas
|
|
|
1206
1202
|
selectedLabel: i,
|
|
1207
1203
|
inputRef: l,
|
|
1208
1204
|
referenceRef: a,
|
|
1209
|
-
floatingRef:
|
|
1205
|
+
floatingRef: u,
|
|
1210
1206
|
// Hook 状态
|
|
1211
|
-
searchHistory:
|
|
1212
|
-
searchResults:
|
|
1207
|
+
searchHistory: c,
|
|
1208
|
+
searchResults: d,
|
|
1213
1209
|
loading: p,
|
|
1214
1210
|
isFetchingMore: h,
|
|
1215
1211
|
isFinished: y,
|
|
1216
1212
|
currentPage: g,
|
|
1217
1213
|
floatingStyles: b,
|
|
1218
1214
|
// Hook 方法
|
|
1219
|
-
saveToHistory:
|
|
1215
|
+
saveToHistory: f,
|
|
1220
1216
|
clearHistory: m,
|
|
1221
1217
|
fetchData: v,
|
|
1222
1218
|
filterByTypes: A,
|
|
@@ -1233,17 +1229,28 @@ const an = "data:image/svg+xml,%3csvg%20t='1695277594902'%20fill='%23fff'%20clas
|
|
|
1233
1229
|
},
|
|
1234
1230
|
computed: {
|
|
1235
1231
|
isEn() {
|
|
1236
|
-
if (this.lang !== "")
|
|
1232
|
+
if (this.lang && this.lang !== "")
|
|
1237
1233
|
return this.lang === "en" || this.lang === "en-US";
|
|
1238
|
-
let e = "";
|
|
1239
1234
|
try {
|
|
1240
1235
|
if (typeof useCookie == "function") {
|
|
1241
|
-
const
|
|
1242
|
-
if (
|
|
1236
|
+
const e = useCookie("jc-language")?.value;
|
|
1237
|
+
if (e)
|
|
1238
|
+
return /^en(-US)?$/.test(e);
|
|
1239
|
+
}
|
|
1240
|
+
} catch {
|
|
1241
|
+
}
|
|
1242
|
+
if (typeof document < "u") {
|
|
1243
|
+
const e = document.cookie || "";
|
|
1244
|
+
return /(^|;\s*)jc-language=en(-US)?(;|$)/.test(e);
|
|
1245
|
+
}
|
|
1246
|
+
try {
|
|
1247
|
+
if (typeof useNuxtApp == "function") {
|
|
1248
|
+
const t = useNuxtApp()?.ssrContext?.event?.node?.req?.headers?.cookie || "";
|
|
1249
|
+
return /(^|;\s*)jc-language=en(-US)?(;|$)/.test(t);
|
|
1243
1250
|
}
|
|
1244
1251
|
} catch {
|
|
1245
1252
|
}
|
|
1246
|
-
return
|
|
1253
|
+
return !1;
|
|
1247
1254
|
},
|
|
1248
1255
|
selectedItems() {
|
|
1249
1256
|
return this.value ? Array.isArray(this.value) ? this.value : [this.value] : [];
|
|
@@ -1378,7 +1385,7 @@ var hn = function() {
|
|
|
1378
1385
|
gn,
|
|
1379
1386
|
!1,
|
|
1380
1387
|
null,
|
|
1381
|
-
"
|
|
1388
|
+
"7ac0ea89"
|
|
1382
1389
|
);
|
|
1383
1390
|
const ee = yn.exports, vn = {
|
|
1384
1391
|
__name: "ApplyDataDialog",
|
|
@@ -1393,7 +1400,7 @@ const ee = yn.exports, vn = {
|
|
|
1393
1400
|
type: String,
|
|
1394
1401
|
default: "en",
|
|
1395
1402
|
// 增加校验,确保只能传入 'en' 或 'cn'
|
|
1396
|
-
validator: (e) => ["en", "cn"].includes(e)
|
|
1403
|
+
validator: (e) => ["en", "en-US", "zh-CN", "cn"].includes(e)
|
|
1397
1404
|
},
|
|
1398
1405
|
placeholder: {
|
|
1399
1406
|
type: String,
|
|
@@ -1412,13 +1419,36 @@ const ee = yn.exports, vn = {
|
|
|
1412
1419
|
}), r = Ct({
|
|
1413
1420
|
name: "",
|
|
1414
1421
|
type: "City"
|
|
1415
|
-
}), l = Z(() =>
|
|
1422
|
+
}), l = Z(() => {
|
|
1423
|
+
if (n.lang && n.lang !== "")
|
|
1424
|
+
return n.lang === "en" || n.lang === "en-US";
|
|
1425
|
+
try {
|
|
1426
|
+
if (typeof useCookie == "function") {
|
|
1427
|
+
const c = useCookie("jc-language")?.value;
|
|
1428
|
+
if (c)
|
|
1429
|
+
return /^en(-US)?$/.test(c);
|
|
1430
|
+
}
|
|
1431
|
+
} catch {
|
|
1432
|
+
}
|
|
1433
|
+
if (typeof document < "u") {
|
|
1434
|
+
const c = document.cookie || "";
|
|
1435
|
+
return /(^|;\s*)jc-language=en(-US)?(;|$)/.test(c);
|
|
1436
|
+
}
|
|
1437
|
+
try {
|
|
1438
|
+
if (typeof useNuxtApp == "function") {
|
|
1439
|
+
const f = useNuxtApp()?.ssrContext?.event?.node?.req?.headers?.cookie || "";
|
|
1440
|
+
return /(^|;\s*)jc-language=en(-US)?(;|$)/.test(f);
|
|
1441
|
+
}
|
|
1442
|
+
} catch {
|
|
1443
|
+
}
|
|
1444
|
+
return !1;
|
|
1445
|
+
});
|
|
1416
1446
|
return { __sfc: !0, props: n, emit: t, typeOptions: o, displayQuery: s, errors: i, formData: r, isEn: l, handleClose: () => {
|
|
1417
1447
|
i.name = "", i.country = "", t("update:value", !1);
|
|
1418
1448
|
}, handleConfirm: () => {
|
|
1419
1449
|
i.name = "", i.country = "";
|
|
1420
|
-
let
|
|
1421
|
-
r.name.trim() || (i.name = "Data name is required",
|
|
1450
|
+
let c = !0;
|
|
1451
|
+
r.name.trim() || (i.name = "Data name is required", c = !1), s.value || (i.country = "Please select a country", c = !1), c && (console.log("🍉 ~ ApplyDataDialog.vue:115 ~ handleConfirm ~ data:", {
|
|
1422
1452
|
...r,
|
|
1423
1453
|
country: s.value
|
|
1424
1454
|
}), t("confirm", { ...r, country: s.value }));
|
|
@@ -1448,19 +1478,19 @@ var An = function() {
|
|
|
1448
1478
|
wn,
|
|
1449
1479
|
!1,
|
|
1450
1480
|
null,
|
|
1451
|
-
"
|
|
1481
|
+
"77035ea3"
|
|
1452
1482
|
);
|
|
1453
1483
|
const bn = xn.exports, Cn = {
|
|
1454
1484
|
// 2. 局部注册组件
|
|
1455
1485
|
components: {
|
|
1456
|
-
[kt.name]: kt,
|
|
1457
1486
|
[Tt.name]: Tt,
|
|
1487
|
+
[kt.name]: kt,
|
|
1458
1488
|
[_t.name]: _t,
|
|
1459
1489
|
[Ot.name]: Ot,
|
|
1460
1490
|
[Et.name]: Et,
|
|
1461
1491
|
[Dt.name]: Dt,
|
|
1462
|
-
[
|
|
1463
|
-
[
|
|
1492
|
+
[Rt.name]: Rt,
|
|
1493
|
+
[St.name]: St
|
|
1464
1494
|
},
|
|
1465
1495
|
data() {
|
|
1466
1496
|
return {
|
|
@@ -1518,7 +1548,7 @@ const bn = xn.exports, Cn = {
|
|
|
1518
1548
|
}
|
|
1519
1549
|
}
|
|
1520
1550
|
};
|
|
1521
|
-
var
|
|
1551
|
+
var Sn = function() {
|
|
1522
1552
|
var t = this, n = t._self._c;
|
|
1523
1553
|
return n("el-dialog", { attrs: { visible: t.isVisible, "before-close": t.closeModal, "show-close": !1, "close-on-click-modal": !0, width: "500px", "custom-class": "global-modal-custom" }, on: { "update:visible": function(o) {
|
|
1524
1554
|
t.isVisible = o;
|
|
@@ -1537,10 +1567,10 @@ var Rn = function() {
|
|
|
1537
1567
|
}, expression: "formData.name" } })], 1)], 1)], 1), n("el-form-item", { staticClass: "agreement-item", attrs: { prop: "agreement" } }, [n("el-checkbox", { model: { value: t.formData.agreement, callback: function(o) {
|
|
1538
1568
|
t.$set(t.formData, "agreement", o);
|
|
1539
1569
|
}, expression: "formData.agreement" } }, [t._v("我同意")]), n("a", { staticClass: "privacy-link", attrs: { href: "#" } }, [t._v("隐私政策")])], 1)], 1)], 1), n("div", { staticClass: "global-modal-footer-custom", attrs: { slot: "footer" }, slot: "footer" }, [n("el-button", { staticClass: "submit-button-custom", attrs: { type: "primary" }, on: { click: t.handleSubmit } }, [t._v(" 加入会员 ")])], 1)]);
|
|
1540
|
-
},
|
|
1570
|
+
}, Rn = [], Dn = /* @__PURE__ */ wt(
|
|
1541
1571
|
Cn,
|
|
1542
|
-
Rn,
|
|
1543
1572
|
Sn,
|
|
1573
|
+
Rn,
|
|
1544
1574
|
!1,
|
|
1545
1575
|
null,
|
|
1546
1576
|
null
|
|
@@ -1571,19 +1601,19 @@ function In() {
|
|
|
1571
1601
|
}
|
|
1572
1602
|
};
|
|
1573
1603
|
}
|
|
1574
|
-
const
|
|
1604
|
+
const Qt = {
|
|
1575
1605
|
ApplyDataDialog: bn,
|
|
1576
1606
|
JcSearch: ee
|
|
1577
1607
|
};
|
|
1578
1608
|
let Ht = !1;
|
|
1579
|
-
const
|
|
1609
|
+
const Ln = {
|
|
1580
1610
|
/**
|
|
1581
1611
|
* Vue 2 插件安装方法
|
|
1582
1612
|
* @param Vue Vue 的构造函数
|
|
1583
1613
|
*/
|
|
1584
1614
|
install(e, t) {
|
|
1585
|
-
Ht || (Ht = !0, t?.sharedConfig && re(t.sharedConfig), Object.keys(
|
|
1586
|
-
e.component(n,
|
|
1615
|
+
Ht || (Ht = !0, t?.sharedConfig && re(t.sharedConfig), Object.keys(Qt).forEach((n) => {
|
|
1616
|
+
e.component(n, Qt[n]);
|
|
1587
1617
|
}));
|
|
1588
1618
|
}
|
|
1589
1619
|
};
|
|
@@ -1593,6 +1623,6 @@ export {
|
|
|
1593
1623
|
ee as JcSearch,
|
|
1594
1624
|
Mn as MODAL_ACTION,
|
|
1595
1625
|
In as createGlobalModalPlugin,
|
|
1596
|
-
|
|
1626
|
+
Ln as default,
|
|
1597
1627
|
Pn as emitter
|
|
1598
1628
|
};
|