@jctrans-materials/comps-vue2 1.0.5 → 1.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/components/search/common.d.ts +1 -1
- package/dist/index.cjs.js +2 -2
- package/dist/index.css +1 -1
- package/dist/index.esm.js +532 -506
- package/package.json +2 -2
package/dist/index.esm.js
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { locationSearchV2 as
|
|
3
|
-
import { MODAL_ACTION as
|
|
4
|
-
import { Col as
|
|
5
|
-
|
|
6
|
-
function
|
|
7
|
-
const t =
|
|
1
|
+
import le, { ref as S, computed as X, onMounted as ce, onBeforeUnmount as Kt, defineComponent as ue, toRef as Et, watch as ht, reactive as Ot } from "vue";
|
|
2
|
+
import { locationSearchV2 as Yt, emitter as K, MODAL_ACTION as Y, initSharedConfig as fe } from "@jctrans-materials/shared";
|
|
3
|
+
import { MODAL_ACTION as Vn, emitter as Hn } from "@jctrans-materials/shared";
|
|
4
|
+
import { Col as _t, Row as kt, Checkbox as Tt, Button as It, Input as Lt, FormItem as Ft, Form as Bt, Dialog as Mt } from "jctrans-ui";
|
|
5
|
+
le.util.warn;
|
|
6
|
+
function de(e) {
|
|
7
|
+
const t = S([]), n = "_search_history_cache", o = typeof window < "u" && typeof localStorage < "u", s = X(
|
|
8
8
|
() => (e.value || "") + n
|
|
9
9
|
), i = X(
|
|
10
10
|
() => !!e.value && e.value !== ""
|
|
11
|
-
), r = (
|
|
12
|
-
if (!
|
|
11
|
+
), r = (l) => {
|
|
12
|
+
if (!l || !o) return;
|
|
13
13
|
const u = t.value.filter(
|
|
14
|
-
(f) => f.id && f.id !==
|
|
14
|
+
(f) => f.id && f.id !== l.id || f.display !== l.display
|
|
15
15
|
);
|
|
16
|
-
u.unshift(
|
|
16
|
+
u.unshift(l);
|
|
17
17
|
const c = u.slice(0, 4);
|
|
18
18
|
if (i.value) {
|
|
19
19
|
t.value = c;
|
|
@@ -23,15 +23,15 @@ function ae(e) {
|
|
|
23
23
|
console.warn("LocalStorage save failed:", f);
|
|
24
24
|
}
|
|
25
25
|
}
|
|
26
|
-
},
|
|
26
|
+
}, a = () => {
|
|
27
27
|
t.value = [], o && localStorage.removeItem(s.value);
|
|
28
28
|
};
|
|
29
|
-
return
|
|
29
|
+
return ce(() => {
|
|
30
30
|
if (o && i.value) {
|
|
31
|
-
const
|
|
32
|
-
if (
|
|
31
|
+
const l = localStorage.getItem(s.value);
|
|
32
|
+
if (l)
|
|
33
33
|
try {
|
|
34
|
-
t.value = JSON.parse(
|
|
34
|
+
t.value = JSON.parse(l);
|
|
35
35
|
} catch {
|
|
36
36
|
t.value = [];
|
|
37
37
|
}
|
|
@@ -39,26 +39,26 @@ function ae(e) {
|
|
|
39
39
|
}), {
|
|
40
40
|
searchHistory: t,
|
|
41
41
|
saveToHistory: r,
|
|
42
|
-
clearHistory:
|
|
42
|
+
clearHistory: a,
|
|
43
43
|
HasHistory: i
|
|
44
44
|
};
|
|
45
45
|
}
|
|
46
|
-
async function
|
|
46
|
+
async function me(e, t = [
|
|
47
47
|
"Continent",
|
|
48
48
|
"Country",
|
|
49
49
|
"City",
|
|
50
50
|
"Seaport",
|
|
51
51
|
"Airport"
|
|
52
52
|
], n = {}) {
|
|
53
|
-
return
|
|
53
|
+
return Yt.searchByName({
|
|
54
54
|
keyword: e,
|
|
55
55
|
displayInfo: t,
|
|
56
56
|
...n
|
|
57
57
|
});
|
|
58
58
|
}
|
|
59
|
-
const
|
|
60
|
-
function
|
|
61
|
-
const n =
|
|
59
|
+
const gt = (e, t) => Yt.searchByIdWithType(e, t);
|
|
60
|
+
function pe(e, t) {
|
|
61
|
+
const n = S([]), o = S(!1), s = S(!1), i = S(1), r = S(0), a = S(10), l = X(() => r.value === 0 ? !1 : n.value.length >= r.value), u = X(() => {
|
|
62
62
|
const m = [...t.value];
|
|
63
63
|
return m.includes("Country") && !m.includes("Region") && m.push("Region"), m;
|
|
64
64
|
}), c = (m) => !m || !Array.isArray(m) ? [] : m.filter(
|
|
@@ -68,7 +68,7 @@ function ue(e, t) {
|
|
|
68
68
|
searchResults: n,
|
|
69
69
|
loading: o,
|
|
70
70
|
isFetchingMore: s,
|
|
71
|
-
isFinished:
|
|
71
|
+
isFinished: l,
|
|
72
72
|
currentPage: i,
|
|
73
73
|
total: r,
|
|
74
74
|
fetchData: async (m = 1, d = !1) => {
|
|
@@ -76,16 +76,16 @@ function ue(e, t) {
|
|
|
76
76
|
n.value = [], r.value = 0;
|
|
77
77
|
return;
|
|
78
78
|
}
|
|
79
|
-
if (!(d && (s.value ||
|
|
79
|
+
if (!(d && (s.value || l.value)) && !(!d && o.value)) {
|
|
80
80
|
d ? s.value = !0 : (o.value = !0, i.value = 1);
|
|
81
81
|
try {
|
|
82
|
-
const p = await
|
|
82
|
+
const p = await me(
|
|
83
83
|
e.value,
|
|
84
84
|
t.value,
|
|
85
85
|
{
|
|
86
86
|
current: m,
|
|
87
87
|
// 使用传入的 page 参数
|
|
88
|
-
size:
|
|
88
|
+
size: a.value
|
|
89
89
|
}
|
|
90
90
|
), h = p.records || [], y = c(h);
|
|
91
91
|
d ? n.value = [...n.value, ...y] : n.value = y, r.value = p.total || 0, i.value = m;
|
|
@@ -99,78 +99,78 @@ function ue(e, t) {
|
|
|
99
99
|
filterByTypes: c
|
|
100
100
|
};
|
|
101
101
|
}
|
|
102
|
-
const
|
|
102
|
+
const Z = Math.min, O = Math.max, lt = Math.round, at = Math.floor, P = (e) => ({
|
|
103
103
|
x: e,
|
|
104
104
|
y: e
|
|
105
|
-
}),
|
|
105
|
+
}), he = {
|
|
106
106
|
left: "right",
|
|
107
107
|
right: "left",
|
|
108
108
|
bottom: "top",
|
|
109
109
|
top: "bottom"
|
|
110
|
-
},
|
|
110
|
+
}, ge = {
|
|
111
111
|
start: "end",
|
|
112
112
|
end: "start"
|
|
113
113
|
};
|
|
114
|
-
function
|
|
115
|
-
return
|
|
114
|
+
function Pt(e, t, n) {
|
|
115
|
+
return O(e, Z(t, n));
|
|
116
116
|
}
|
|
117
|
-
function
|
|
117
|
+
function ot(e, t) {
|
|
118
118
|
return typeof e == "function" ? e(t) : e;
|
|
119
119
|
}
|
|
120
120
|
function W(e) {
|
|
121
121
|
return e.split("-")[0];
|
|
122
122
|
}
|
|
123
|
-
function
|
|
123
|
+
function st(e) {
|
|
124
124
|
return e.split("-")[1];
|
|
125
125
|
}
|
|
126
|
-
function
|
|
126
|
+
function jt(e) {
|
|
127
127
|
return e === "x" ? "y" : "x";
|
|
128
128
|
}
|
|
129
|
-
function
|
|
129
|
+
function $t(e) {
|
|
130
130
|
return e === "y" ? "height" : "width";
|
|
131
131
|
}
|
|
132
|
-
const
|
|
133
|
-
function
|
|
134
|
-
return
|
|
132
|
+
const ye = /* @__PURE__ */ new Set(["top", "bottom"]);
|
|
133
|
+
function U(e) {
|
|
134
|
+
return ye.has(W(e)) ? "y" : "x";
|
|
135
135
|
}
|
|
136
|
-
function
|
|
137
|
-
return
|
|
136
|
+
function zt(e) {
|
|
137
|
+
return jt(U(e));
|
|
138
138
|
}
|
|
139
|
-
function
|
|
139
|
+
function ve(e, t, n) {
|
|
140
140
|
n === void 0 && (n = !1);
|
|
141
|
-
const o =
|
|
141
|
+
const o = st(e), s = zt(e), i = $t(s);
|
|
142
142
|
let r = s === "x" ? o === (n ? "end" : "start") ? "right" : "left" : o === "start" ? "bottom" : "top";
|
|
143
|
-
return t.reference[i] > t.floating[i] && (r =
|
|
143
|
+
return t.reference[i] > t.floating[i] && (r = ct(r)), [r, ct(r)];
|
|
144
144
|
}
|
|
145
|
-
function
|
|
146
|
-
const t =
|
|
147
|
-
return [
|
|
145
|
+
function Ae(e) {
|
|
146
|
+
const t = ct(e);
|
|
147
|
+
return [vt(e), t, vt(t)];
|
|
148
148
|
}
|
|
149
|
-
function
|
|
150
|
-
return e.replace(/start|end/g, (t) =>
|
|
149
|
+
function vt(e) {
|
|
150
|
+
return e.replace(/start|end/g, (t) => ge[t]);
|
|
151
151
|
}
|
|
152
|
-
const
|
|
153
|
-
function
|
|
152
|
+
const Nt = ["left", "right"], Qt = ["right", "left"], we = ["top", "bottom"], xe = ["bottom", "top"];
|
|
153
|
+
function be(e, t, n) {
|
|
154
154
|
switch (e) {
|
|
155
155
|
case "top":
|
|
156
156
|
case "bottom":
|
|
157
|
-
return n ? t ?
|
|
157
|
+
return n ? t ? Qt : Nt : t ? Nt : Qt;
|
|
158
158
|
case "left":
|
|
159
159
|
case "right":
|
|
160
|
-
return t ?
|
|
160
|
+
return t ? we : xe;
|
|
161
161
|
default:
|
|
162
162
|
return [];
|
|
163
163
|
}
|
|
164
164
|
}
|
|
165
|
-
function
|
|
166
|
-
const s =
|
|
167
|
-
let i =
|
|
168
|
-
return s && (i = i.map((r) => r + "-" + s), t && (i = i.concat(i.map(
|
|
165
|
+
function Ce(e, t, n, o) {
|
|
166
|
+
const s = st(e);
|
|
167
|
+
let i = be(W(e), n === "start", o);
|
|
168
|
+
return s && (i = i.map((r) => r + "-" + s), t && (i = i.concat(i.map(vt)))), i;
|
|
169
169
|
}
|
|
170
|
-
function
|
|
171
|
-
return e.replace(/left|right|bottom|top/g, (t) =>
|
|
170
|
+
function ct(e) {
|
|
171
|
+
return e.replace(/left|right|bottom|top/g, (t) => he[t]);
|
|
172
172
|
}
|
|
173
|
-
function
|
|
173
|
+
function Se(e) {
|
|
174
174
|
return {
|
|
175
175
|
top: 0,
|
|
176
176
|
right: 0,
|
|
@@ -179,15 +179,15 @@ function we(e) {
|
|
|
179
179
|
...e
|
|
180
180
|
};
|
|
181
181
|
}
|
|
182
|
-
function
|
|
183
|
-
return typeof e != "number" ?
|
|
182
|
+
function Re(e) {
|
|
183
|
+
return typeof e != "number" ? Se(e) : {
|
|
184
184
|
top: e,
|
|
185
185
|
right: e,
|
|
186
186
|
bottom: e,
|
|
187
187
|
left: e
|
|
188
188
|
};
|
|
189
189
|
}
|
|
190
|
-
function
|
|
190
|
+
function ut(e) {
|
|
191
191
|
const {
|
|
192
192
|
x: t,
|
|
193
193
|
y: n,
|
|
@@ -205,14 +205,14 @@ function at(e) {
|
|
|
205
205
|
y: n
|
|
206
206
|
};
|
|
207
207
|
}
|
|
208
|
-
function
|
|
208
|
+
function Vt(e, t, n) {
|
|
209
209
|
let {
|
|
210
210
|
reference: o,
|
|
211
211
|
floating: s
|
|
212
212
|
} = e;
|
|
213
|
-
const i =
|
|
213
|
+
const i = U(t), r = zt(t), a = $t(r), l = W(t), u = i === "y", c = o.x + o.width / 2 - s.width / 2, f = o.y + o.height / 2 - s.height / 2, m = o[a] / 2 - s[a] / 2;
|
|
214
214
|
let d;
|
|
215
|
-
switch (
|
|
215
|
+
switch (l) {
|
|
216
216
|
case "top":
|
|
217
217
|
d = {
|
|
218
218
|
x: c,
|
|
@@ -243,7 +243,7 @@ function Mt(e, t, n) {
|
|
|
243
243
|
y: o.y
|
|
244
244
|
};
|
|
245
245
|
}
|
|
246
|
-
switch (
|
|
246
|
+
switch (st(t)) {
|
|
247
247
|
case "start":
|
|
248
248
|
d[r] -= m * (n && u ? -1 : 1);
|
|
249
249
|
break;
|
|
@@ -253,13 +253,13 @@ function Mt(e, t, n) {
|
|
|
253
253
|
}
|
|
254
254
|
return d;
|
|
255
255
|
}
|
|
256
|
-
const
|
|
256
|
+
const De = async (e, t, n) => {
|
|
257
257
|
const {
|
|
258
258
|
placement: o = "bottom",
|
|
259
259
|
strategy: s = "absolute",
|
|
260
260
|
middleware: i = [],
|
|
261
261
|
platform: r
|
|
262
|
-
} = n,
|
|
262
|
+
} = n, a = i.filter(Boolean), l = await (r.isRTL == null ? void 0 : r.isRTL(t));
|
|
263
263
|
let u = await r.getElementRects({
|
|
264
264
|
reference: e,
|
|
265
265
|
floating: t,
|
|
@@ -267,15 +267,15 @@ const be = async (e, t, n) => {
|
|
|
267
267
|
}), {
|
|
268
268
|
x: c,
|
|
269
269
|
y: f
|
|
270
|
-
} =
|
|
271
|
-
for (let h = 0; h <
|
|
270
|
+
} = Vt(u, o, l), m = o, d = {}, p = 0;
|
|
271
|
+
for (let h = 0; h < a.length; h++) {
|
|
272
272
|
const {
|
|
273
273
|
name: y,
|
|
274
274
|
fn: g
|
|
275
|
-
} =
|
|
276
|
-
x:
|
|
275
|
+
} = a[h], {
|
|
276
|
+
x: A,
|
|
277
277
|
y: w,
|
|
278
|
-
data:
|
|
278
|
+
data: C,
|
|
279
279
|
reset: x
|
|
280
280
|
} = await g({
|
|
281
281
|
x: c,
|
|
@@ -291,11 +291,11 @@ const be = async (e, t, n) => {
|
|
|
291
291
|
floating: t
|
|
292
292
|
}
|
|
293
293
|
});
|
|
294
|
-
c =
|
|
294
|
+
c = A ?? c, f = w ?? f, d = {
|
|
295
295
|
...d,
|
|
296
296
|
[y]: {
|
|
297
297
|
...d[y],
|
|
298
|
-
...
|
|
298
|
+
...C
|
|
299
299
|
}
|
|
300
300
|
}, x && p <= 50 && (p++, typeof x == "object" && (x.placement && (m = x.placement), x.rects && (u = x.rects === !0 ? await r.getElementRects({
|
|
301
301
|
reference: e,
|
|
@@ -304,7 +304,7 @@ const be = async (e, t, n) => {
|
|
|
304
304
|
}) : x.rects), {
|
|
305
305
|
x: c,
|
|
306
306
|
y: f
|
|
307
|
-
} =
|
|
307
|
+
} = Vt(u, m, l)), h = -1);
|
|
308
308
|
}
|
|
309
309
|
return {
|
|
310
310
|
x: c,
|
|
@@ -314,7 +314,7 @@ const be = async (e, t, n) => {
|
|
|
314
314
|
middlewareData: d
|
|
315
315
|
};
|
|
316
316
|
};
|
|
317
|
-
async function
|
|
317
|
+
async function wt(e, t) {
|
|
318
318
|
var n;
|
|
319
319
|
t === void 0 && (t = {});
|
|
320
320
|
const {
|
|
@@ -322,44 +322,44 @@ async function yt(e, t) {
|
|
|
322
322
|
y: s,
|
|
323
323
|
platform: i,
|
|
324
324
|
rects: r,
|
|
325
|
-
elements:
|
|
326
|
-
strategy:
|
|
325
|
+
elements: a,
|
|
326
|
+
strategy: l
|
|
327
327
|
} = e, {
|
|
328
328
|
boundary: u = "clippingAncestors",
|
|
329
329
|
rootBoundary: c = "viewport",
|
|
330
330
|
elementContext: f = "floating",
|
|
331
331
|
altBoundary: m = !1,
|
|
332
332
|
padding: d = 0
|
|
333
|
-
} =
|
|
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(
|
|
333
|
+
} = ot(t, e), p = Re(d), y = a[m ? f === "floating" ? "reference" : "floating" : f], g = ut(await i.getClippingRect({
|
|
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(a.floating)),
|
|
335
335
|
boundary: u,
|
|
336
336
|
rootBoundary: c,
|
|
337
|
-
strategy:
|
|
338
|
-
})),
|
|
337
|
+
strategy: l
|
|
338
|
+
})), A = f === "floating" ? {
|
|
339
339
|
x: o,
|
|
340
340
|
y: s,
|
|
341
341
|
width: r.floating.width,
|
|
342
342
|
height: r.floating.height
|
|
343
|
-
} : r.reference, w = await (i.getOffsetParent == null ? void 0 : i.getOffsetParent(
|
|
343
|
+
} : r.reference, w = await (i.getOffsetParent == null ? void 0 : i.getOffsetParent(a.floating)), C = await (i.isElement == null ? void 0 : i.isElement(w)) ? await (i.getScale == null ? void 0 : i.getScale(w)) || {
|
|
344
344
|
x: 1,
|
|
345
345
|
y: 1
|
|
346
346
|
} : {
|
|
347
347
|
x: 1,
|
|
348
348
|
y: 1
|
|
349
|
-
}, x =
|
|
350
|
-
elements:
|
|
351
|
-
rect:
|
|
349
|
+
}, x = ut(i.convertOffsetParentRelativeRectToViewportRelativeRect ? await i.convertOffsetParentRelativeRectToViewportRelativeRect({
|
|
350
|
+
elements: a,
|
|
351
|
+
rect: A,
|
|
352
352
|
offsetParent: w,
|
|
353
|
-
strategy:
|
|
354
|
-
}) :
|
|
353
|
+
strategy: l
|
|
354
|
+
}) : A);
|
|
355
355
|
return {
|
|
356
|
-
top: (g.top - x.top + p.top) /
|
|
357
|
-
bottom: (x.bottom - g.bottom + p.bottom) /
|
|
358
|
-
left: (g.left - x.left + p.left) /
|
|
359
|
-
right: (x.right - g.right + p.right) /
|
|
356
|
+
top: (g.top - x.top + p.top) / C.y,
|
|
357
|
+
bottom: (x.bottom - g.bottom + p.bottom) / C.y,
|
|
358
|
+
left: (g.left - x.left + p.left) / C.x,
|
|
359
|
+
right: (x.right - g.right + p.right) / C.x
|
|
360
360
|
};
|
|
361
361
|
}
|
|
362
|
-
const
|
|
362
|
+
const Ee = function(e) {
|
|
363
363
|
return e === void 0 && (e = {}), {
|
|
364
364
|
name: "flip",
|
|
365
365
|
options: e,
|
|
@@ -369,8 +369,8 @@ const Ce = function(e) {
|
|
|
369
369
|
placement: s,
|
|
370
370
|
middlewareData: i,
|
|
371
371
|
rects: r,
|
|
372
|
-
initialPlacement:
|
|
373
|
-
platform:
|
|
372
|
+
initialPlacement: a,
|
|
373
|
+
platform: l,
|
|
374
374
|
elements: u
|
|
375
375
|
} = t, {
|
|
376
376
|
mainAxis: c = !0,
|
|
@@ -380,73 +380,73 @@ const Ce = function(e) {
|
|
|
380
380
|
fallbackAxisSideDirection: p = "none",
|
|
381
381
|
flipAlignment: h = !0,
|
|
382
382
|
...y
|
|
383
|
-
} =
|
|
383
|
+
} = ot(e, t);
|
|
384
384
|
if ((n = i.arrow) != null && n.alignmentOffset)
|
|
385
385
|
return {};
|
|
386
|
-
const g = W(s),
|
|
387
|
-
!m &&
|
|
388
|
-
const
|
|
389
|
-
let
|
|
390
|
-
if (c &&
|
|
391
|
-
const
|
|
392
|
-
|
|
386
|
+
const g = W(s), A = U(a), w = W(a) === a, C = await (l.isRTL == null ? void 0 : l.isRTL(u.floating)), x = m || (w || !h ? [ct(a)] : Ae(a)), I = p !== "none";
|
|
387
|
+
!m && I && x.push(...Ce(a, h, p, C));
|
|
388
|
+
const k = [a, ...x], V = await wt(t, y), H = [];
|
|
389
|
+
let L = ((o = i.flip) == null ? void 0 : o.overflows) || [];
|
|
390
|
+
if (c && H.push(V[g]), f) {
|
|
391
|
+
const E = ve(s, r, C);
|
|
392
|
+
H.push(V[E[0]], V[E[1]]);
|
|
393
393
|
}
|
|
394
|
-
if (
|
|
394
|
+
if (L = [...L, {
|
|
395
395
|
placement: s,
|
|
396
|
-
overflows:
|
|
397
|
-
}], !
|
|
398
|
-
var G,
|
|
399
|
-
const
|
|
400
|
-
if (
|
|
396
|
+
overflows: H
|
|
397
|
+
}], !H.every((E) => E <= 0)) {
|
|
398
|
+
var G, q;
|
|
399
|
+
const E = (((G = i.flip) == null ? void 0 : G.index) || 0) + 1, R = k[E];
|
|
400
|
+
if (R && (!(f === "alignment" ? A !== U(R) : !1) || // We leave the current main axis only if every placement on that axis
|
|
401
401
|
// overflows the main axis.
|
|
402
|
-
|
|
402
|
+
L.every((b) => U(b.placement) === A ? b.overflows[0] > 0 : !0)))
|
|
403
403
|
return {
|
|
404
404
|
data: {
|
|
405
|
-
index:
|
|
406
|
-
overflows:
|
|
405
|
+
index: E,
|
|
406
|
+
overflows: L
|
|
407
407
|
},
|
|
408
408
|
reset: {
|
|
409
|
-
placement:
|
|
409
|
+
placement: R
|
|
410
410
|
}
|
|
411
411
|
};
|
|
412
|
-
let
|
|
413
|
-
if (!
|
|
412
|
+
let F = (q = L.filter((D) => D.overflows[0] <= 0).sort((D, b) => D.overflows[1] - b.overflows[1])[0]) == null ? void 0 : q.placement;
|
|
413
|
+
if (!F)
|
|
414
414
|
switch (d) {
|
|
415
415
|
case "bestFit": {
|
|
416
|
-
var
|
|
417
|
-
const
|
|
418
|
-
if (
|
|
419
|
-
const
|
|
420
|
-
return
|
|
416
|
+
var v;
|
|
417
|
+
const D = (v = L.filter((b) => {
|
|
418
|
+
if (I) {
|
|
419
|
+
const T = U(b.placement);
|
|
420
|
+
return T === A || // Create a bias to the `y` side axis due to horizontal
|
|
421
421
|
// reading directions favoring greater width.
|
|
422
|
-
|
|
422
|
+
T === "y";
|
|
423
423
|
}
|
|
424
424
|
return !0;
|
|
425
|
-
}).map((
|
|
426
|
-
|
|
425
|
+
}).map((b) => [b.placement, b.overflows.filter((T) => T > 0).reduce((T, $) => T + $, 0)]).sort((b, T) => b[1] - T[1])[0]) == null ? void 0 : v[0];
|
|
426
|
+
D && (F = D);
|
|
427
427
|
break;
|
|
428
428
|
}
|
|
429
429
|
case "initialPlacement":
|
|
430
|
-
|
|
430
|
+
F = a;
|
|
431
431
|
break;
|
|
432
432
|
}
|
|
433
|
-
if (s !==
|
|
433
|
+
if (s !== F)
|
|
434
434
|
return {
|
|
435
435
|
reset: {
|
|
436
|
-
placement:
|
|
436
|
+
placement: F
|
|
437
437
|
}
|
|
438
438
|
};
|
|
439
439
|
}
|
|
440
440
|
return {};
|
|
441
441
|
}
|
|
442
442
|
};
|
|
443
|
-
},
|
|
444
|
-
async function
|
|
443
|
+
}, Oe = /* @__PURE__ */ new Set(["left", "top"]);
|
|
444
|
+
async function _e(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 = W(n),
|
|
449
|
+
} = e, i = await (o.isRTL == null ? void 0 : o.isRTL(s.floating)), r = W(n), a = st(n), l = U(n) === "y", u = Oe.has(r) ? -1 : 1, c = i && l ? -1 : 1, f = ot(t, e);
|
|
450
450
|
let {
|
|
451
451
|
mainAxis: m,
|
|
452
452
|
crossAxis: d,
|
|
@@ -460,7 +460,7 @@ async function Re(e, t) {
|
|
|
460
460
|
crossAxis: f.crossAxis || 0,
|
|
461
461
|
alignmentAxis: f.alignmentAxis
|
|
462
462
|
};
|
|
463
|
-
return
|
|
463
|
+
return a && typeof p == "number" && (d = a === "end" ? p * -1 : p), l ? {
|
|
464
464
|
x: d * c,
|
|
465
465
|
y: m * u
|
|
466
466
|
} : {
|
|
@@ -468,7 +468,7 @@ async function Re(e, t) {
|
|
|
468
468
|
y: d * c
|
|
469
469
|
};
|
|
470
470
|
}
|
|
471
|
-
const
|
|
471
|
+
const ke = function(e) {
|
|
472
472
|
return e === void 0 && (e = 0), {
|
|
473
473
|
name: "offset",
|
|
474
474
|
options: e,
|
|
@@ -478,19 +478,19 @@ const De = function(e) {
|
|
|
478
478
|
x: s,
|
|
479
479
|
y: i,
|
|
480
480
|
placement: r,
|
|
481
|
-
middlewareData:
|
|
482
|
-
} = t,
|
|
483
|
-
return r === ((n =
|
|
484
|
-
x: s +
|
|
485
|
-
y: i +
|
|
481
|
+
middlewareData: a
|
|
482
|
+
} = t, l = await _e(t, e);
|
|
483
|
+
return r === ((n = a.offset) == null ? void 0 : n.placement) && (o = a.arrow) != null && o.alignmentOffset ? {} : {
|
|
484
|
+
x: s + l.x,
|
|
485
|
+
y: i + l.y,
|
|
486
486
|
data: {
|
|
487
|
-
...
|
|
487
|
+
...l,
|
|
488
488
|
placement: r
|
|
489
489
|
}
|
|
490
490
|
};
|
|
491
491
|
}
|
|
492
492
|
};
|
|
493
|
-
},
|
|
493
|
+
}, Te = function(e) {
|
|
494
494
|
return e === void 0 && (e = {}), {
|
|
495
495
|
name: "shift",
|
|
496
496
|
options: e,
|
|
@@ -502,33 +502,33 @@ const De = function(e) {
|
|
|
502
502
|
} = t, {
|
|
503
503
|
mainAxis: i = !0,
|
|
504
504
|
crossAxis: r = !1,
|
|
505
|
-
limiter:
|
|
505
|
+
limiter: a = {
|
|
506
506
|
fn: (y) => {
|
|
507
507
|
let {
|
|
508
508
|
x: g,
|
|
509
|
-
y:
|
|
509
|
+
y: A
|
|
510
510
|
} = y;
|
|
511
511
|
return {
|
|
512
512
|
x: g,
|
|
513
|
-
y:
|
|
513
|
+
y: A
|
|
514
514
|
};
|
|
515
515
|
}
|
|
516
516
|
},
|
|
517
|
-
...
|
|
518
|
-
} =
|
|
517
|
+
...l
|
|
518
|
+
} = ot(e, t), u = {
|
|
519
519
|
x: n,
|
|
520
520
|
y: o
|
|
521
|
-
}, c = await
|
|
521
|
+
}, c = await wt(t, l), f = U(W(s)), m = jt(f);
|
|
522
522
|
let d = u[m], p = u[f];
|
|
523
523
|
if (i) {
|
|
524
|
-
const y = m === "y" ? "top" : "left", g = m === "y" ? "bottom" : "right",
|
|
525
|
-
d =
|
|
524
|
+
const y = m === "y" ? "top" : "left", g = m === "y" ? "bottom" : "right", A = d + c[y], w = d - c[g];
|
|
525
|
+
d = Pt(A, d, w);
|
|
526
526
|
}
|
|
527
527
|
if (r) {
|
|
528
|
-
const y = f === "y" ? "top" : "left", g = f === "y" ? "bottom" : "right",
|
|
529
|
-
p =
|
|
528
|
+
const y = f === "y" ? "top" : "left", g = f === "y" ? "bottom" : "right", A = p + c[y], w = p - c[g];
|
|
529
|
+
p = Pt(A, p, w);
|
|
530
530
|
}
|
|
531
|
-
const h =
|
|
531
|
+
const h = a.fn({
|
|
532
532
|
...t,
|
|
533
533
|
[m]: d,
|
|
534
534
|
[f]: p
|
|
@@ -546,7 +546,7 @@ const De = function(e) {
|
|
|
546
546
|
};
|
|
547
547
|
}
|
|
548
548
|
};
|
|
549
|
-
},
|
|
549
|
+
}, Ie = function(e) {
|
|
550
550
|
return e === void 0 && (e = {}), {
|
|
551
551
|
name: "size",
|
|
552
552
|
options: e,
|
|
@@ -556,30 +556,30 @@ const De = function(e) {
|
|
|
556
556
|
placement: s,
|
|
557
557
|
rects: i,
|
|
558
558
|
platform: r,
|
|
559
|
-
elements:
|
|
559
|
+
elements: a
|
|
560
560
|
} = t, {
|
|
561
|
-
apply:
|
|
561
|
+
apply: l = () => {
|
|
562
562
|
},
|
|
563
563
|
...u
|
|
564
|
-
} =
|
|
564
|
+
} = ot(e, t), c = await wt(t, u), f = W(s), m = st(s), d = U(s) === "y", {
|
|
565
565
|
width: p,
|
|
566
566
|
height: h
|
|
567
567
|
} = i.floating;
|
|
568
568
|
let y, g;
|
|
569
|
-
f === "top" || f === "bottom" ? (y = f, g = m === (await (r.isRTL == null ? void 0 : r.isRTL(
|
|
570
|
-
const
|
|
571
|
-
let
|
|
572
|
-
if ((n = t.middlewareData.shift) != null && n.enabled.x && (
|
|
573
|
-
const
|
|
574
|
-
d ?
|
|
569
|
+
f === "top" || f === "bottom" ? (y = f, g = m === (await (r.isRTL == null ? void 0 : r.isRTL(a.floating)) ? "start" : "end") ? "left" : "right") : (g = f, y = m === "end" ? "top" : "bottom");
|
|
570
|
+
const A = h - c.top - c.bottom, w = p - c.left - c.right, C = Z(h - c[y], A), x = Z(p - c[g], w), I = !t.middlewareData.shift;
|
|
571
|
+
let k = C, V = x;
|
|
572
|
+
if ((n = t.middlewareData.shift) != null && n.enabled.x && (V = w), (o = t.middlewareData.shift) != null && o.enabled.y && (k = A), I && !m) {
|
|
573
|
+
const L = O(c.left, 0), G = O(c.right, 0), q = O(c.top, 0), v = O(c.bottom, 0);
|
|
574
|
+
d ? V = p - 2 * (L !== 0 || G !== 0 ? L + G : O(c.left, c.right)) : k = h - 2 * (q !== 0 || v !== 0 ? q + v : O(c.top, c.bottom));
|
|
575
575
|
}
|
|
576
|
-
await
|
|
576
|
+
await l({
|
|
577
577
|
...t,
|
|
578
|
-
availableWidth:
|
|
579
|
-
availableHeight:
|
|
578
|
+
availableWidth: V,
|
|
579
|
+
availableHeight: k
|
|
580
580
|
});
|
|
581
|
-
const
|
|
582
|
-
return p !==
|
|
581
|
+
const H = await r.getDimensions(a.floating);
|
|
582
|
+
return p !== H.width || h !== H.height ? {
|
|
583
583
|
reset: {
|
|
584
584
|
rects: !0
|
|
585
585
|
}
|
|
@@ -587,49 +587,49 @@ const De = function(e) {
|
|
|
587
587
|
}
|
|
588
588
|
};
|
|
589
589
|
};
|
|
590
|
-
function
|
|
590
|
+
function ft() {
|
|
591
591
|
return typeof window < "u";
|
|
592
592
|
}
|
|
593
|
-
function
|
|
594
|
-
return
|
|
593
|
+
function et(e) {
|
|
594
|
+
return Xt(e) ? (e.nodeName || "").toLowerCase() : "#document";
|
|
595
595
|
}
|
|
596
|
-
function
|
|
596
|
+
function _(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 Q(e) {
|
|
601
601
|
var t;
|
|
602
|
-
return (t = (
|
|
602
|
+
return (t = (Xt(e) ? e.ownerDocument : e.document) || window.document) == null ? void 0 : t.documentElement;
|
|
603
603
|
}
|
|
604
|
-
function
|
|
605
|
-
return
|
|
604
|
+
function Xt(e) {
|
|
605
|
+
return ft() ? e instanceof Node || e instanceof _(e).Node : !1;
|
|
606
606
|
}
|
|
607
|
-
function
|
|
608
|
-
return
|
|
607
|
+
function B(e) {
|
|
608
|
+
return ft() ? e instanceof Element || e instanceof _(e).Element : !1;
|
|
609
609
|
}
|
|
610
|
-
function
|
|
611
|
-
return
|
|
610
|
+
function N(e) {
|
|
611
|
+
return ft() ? e instanceof HTMLElement || e instanceof _(e).HTMLElement : !1;
|
|
612
612
|
}
|
|
613
|
-
function
|
|
614
|
-
return !
|
|
613
|
+
function Ht(e) {
|
|
614
|
+
return !ft() || typeof ShadowRoot > "u" ? !1 : e instanceof ShadowRoot || e instanceof _(e).ShadowRoot;
|
|
615
615
|
}
|
|
616
|
-
const
|
|
617
|
-
function
|
|
616
|
+
const Le = /* @__PURE__ */ new Set(["inline", "contents"]);
|
|
617
|
+
function it(e) {
|
|
618
618
|
const {
|
|
619
619
|
overflow: t,
|
|
620
620
|
overflowX: n,
|
|
621
621
|
overflowY: o,
|
|
622
622
|
display: s
|
|
623
|
-
} =
|
|
624
|
-
return /auto|scroll|overlay|hidden|clip/.test(t + o + n) && !
|
|
623
|
+
} = M(e);
|
|
624
|
+
return /auto|scroll|overlay|hidden|clip/.test(t + o + n) && !Le.has(s);
|
|
625
625
|
}
|
|
626
|
-
const
|
|
627
|
-
function
|
|
628
|
-
return
|
|
626
|
+
const Fe = /* @__PURE__ */ new Set(["table", "td", "th"]);
|
|
627
|
+
function Be(e) {
|
|
628
|
+
return Fe.has(et(e));
|
|
629
629
|
}
|
|
630
|
-
const
|
|
631
|
-
function
|
|
632
|
-
return
|
|
630
|
+
const Me = [":popover-open", ":modal"];
|
|
631
|
+
function dt(e) {
|
|
632
|
+
return Me.some((t) => {
|
|
633
633
|
try {
|
|
634
634
|
return e.matches(t);
|
|
635
635
|
} catch {
|
|
@@ -637,34 +637,34 @@ function ut(e) {
|
|
|
637
637
|
}
|
|
638
638
|
});
|
|
639
639
|
}
|
|
640
|
-
const
|
|
641
|
-
function
|
|
642
|
-
const t =
|
|
643
|
-
return
|
|
640
|
+
const Pe = ["transform", "translate", "scale", "rotate", "perspective"], Ne = ["transform", "translate", "scale", "rotate", "perspective", "filter"], Qe = ["paint", "layout", "strict", "content"];
|
|
641
|
+
function xt(e) {
|
|
642
|
+
const t = bt(), n = B(e) ? M(e) : e;
|
|
643
|
+
return Pe.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) || Ne.some((o) => (n.willChange || "").includes(o)) || Qe.some((o) => (n.contain || "").includes(o));
|
|
644
644
|
}
|
|
645
|
-
function
|
|
645
|
+
function Ve(e) {
|
|
646
646
|
let t = J(e);
|
|
647
|
-
for (;
|
|
648
|
-
if (
|
|
647
|
+
for (; N(t) && !tt(t); ) {
|
|
648
|
+
if (xt(t))
|
|
649
649
|
return t;
|
|
650
|
-
if (
|
|
650
|
+
if (dt(t))
|
|
651
651
|
return null;
|
|
652
652
|
t = J(t);
|
|
653
653
|
}
|
|
654
654
|
return null;
|
|
655
655
|
}
|
|
656
|
-
function
|
|
656
|
+
function bt() {
|
|
657
657
|
return typeof CSS > "u" || !CSS.supports ? !1 : CSS.supports("-webkit-backdrop-filter", "none");
|
|
658
658
|
}
|
|
659
|
-
const
|
|
660
|
-
function
|
|
661
|
-
return
|
|
659
|
+
const He = /* @__PURE__ */ new Set(["html", "body", "#document"]);
|
|
660
|
+
function tt(e) {
|
|
661
|
+
return He.has(et(e));
|
|
662
662
|
}
|
|
663
|
-
function
|
|
664
|
-
return
|
|
663
|
+
function M(e) {
|
|
664
|
+
return _(e).getComputedStyle(e);
|
|
665
665
|
}
|
|
666
|
-
function
|
|
667
|
-
return
|
|
666
|
+
function mt(e) {
|
|
667
|
+
return B(e) ? {
|
|
668
668
|
scrollLeft: e.scrollLeft,
|
|
669
669
|
scrollTop: e.scrollTop
|
|
670
670
|
} : {
|
|
@@ -673,188 +673,188 @@ function ft(e) {
|
|
|
673
673
|
};
|
|
674
674
|
}
|
|
675
675
|
function J(e) {
|
|
676
|
-
if (
|
|
676
|
+
if (et(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
|
-
|
|
683
|
-
|
|
682
|
+
Ht(e) && e.host || // Fallback.
|
|
683
|
+
Q(e)
|
|
684
684
|
);
|
|
685
|
-
return
|
|
685
|
+
return Ht(t) ? t.host : t;
|
|
686
686
|
}
|
|
687
|
-
function
|
|
687
|
+
function Zt(e) {
|
|
688
688
|
const t = J(e);
|
|
689
|
-
return
|
|
689
|
+
return tt(t) ? e.ownerDocument ? e.ownerDocument.body : e.body : N(t) && it(t) ? t : Zt(t);
|
|
690
690
|
}
|
|
691
|
-
function
|
|
691
|
+
function nt(e, t, n) {
|
|
692
692
|
var o;
|
|
693
693
|
t === void 0 && (t = []), n === void 0 && (n = !0);
|
|
694
|
-
const s =
|
|
694
|
+
const s = Zt(e), i = s === ((o = e.ownerDocument) == null ? void 0 : o.body), r = _(s);
|
|
695
695
|
if (i) {
|
|
696
|
-
const
|
|
697
|
-
return t.concat(r, r.visualViewport || [],
|
|
696
|
+
const a = At(r);
|
|
697
|
+
return t.concat(r, r.visualViewport || [], it(s) ? s : [], a && n ? nt(a) : []);
|
|
698
698
|
}
|
|
699
|
-
return t.concat(s,
|
|
699
|
+
return t.concat(s, nt(s, [], n));
|
|
700
700
|
}
|
|
701
|
-
function
|
|
701
|
+
function At(e) {
|
|
702
702
|
return e.parent && Object.getPrototypeOf(e.parent) ? e.frameElement : null;
|
|
703
703
|
}
|
|
704
|
-
function
|
|
705
|
-
const t =
|
|
704
|
+
function te(e) {
|
|
705
|
+
const t = M(e);
|
|
706
706
|
let n = parseFloat(t.width) || 0, o = parseFloat(t.height) || 0;
|
|
707
|
-
const s =
|
|
708
|
-
return
|
|
707
|
+
const s = N(e), i = s ? e.offsetWidth : n, r = s ? e.offsetHeight : o, a = lt(n) !== i || lt(o) !== r;
|
|
708
|
+
return a && (n = i, o = r), {
|
|
709
709
|
width: n,
|
|
710
710
|
height: o,
|
|
711
|
-
$:
|
|
711
|
+
$: a
|
|
712
712
|
};
|
|
713
713
|
}
|
|
714
|
-
function
|
|
715
|
-
return
|
|
714
|
+
function Ct(e) {
|
|
715
|
+
return B(e) ? e : e.contextElement;
|
|
716
716
|
}
|
|
717
717
|
function z(e) {
|
|
718
|
-
const t =
|
|
719
|
-
if (!
|
|
720
|
-
return
|
|
718
|
+
const t = Ct(e);
|
|
719
|
+
if (!N(t))
|
|
720
|
+
return P(1);
|
|
721
721
|
const n = t.getBoundingClientRect(), {
|
|
722
722
|
width: o,
|
|
723
723
|
height: s,
|
|
724
724
|
$: i
|
|
725
|
-
} =
|
|
726
|
-
let r = (i ?
|
|
727
|
-
return (!r || !Number.isFinite(r)) && (r = 1), (!
|
|
725
|
+
} = te(t);
|
|
726
|
+
let r = (i ? lt(n.width) : n.width) / o, a = (i ? lt(n.height) : n.height) / s;
|
|
727
|
+
return (!r || !Number.isFinite(r)) && (r = 1), (!a || !Number.isFinite(a)) && (a = 1), {
|
|
728
728
|
x: r,
|
|
729
|
-
y:
|
|
729
|
+
y: a
|
|
730
730
|
};
|
|
731
731
|
}
|
|
732
|
-
const
|
|
733
|
-
function
|
|
734
|
-
const t =
|
|
735
|
-
return !
|
|
732
|
+
const Ue = /* @__PURE__ */ P(0);
|
|
733
|
+
function ee(e) {
|
|
734
|
+
const t = _(e);
|
|
735
|
+
return !bt() || !t.visualViewport ? Ue : {
|
|
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 qe(e, t, n) {
|
|
741
|
+
return t === void 0 && (t = !1), !n || t && n !== _(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
|
-
const s = e.getBoundingClientRect(), i =
|
|
746
|
-
let r =
|
|
747
|
-
t && (o ?
|
|
748
|
-
const
|
|
749
|
-
let
|
|
745
|
+
const s = e.getBoundingClientRect(), i = Ct(e);
|
|
746
|
+
let r = P(1);
|
|
747
|
+
t && (o ? B(o) && (r = z(o)) : r = z(e));
|
|
748
|
+
const a = qe(i, n, o) ? ee(i) : P(0);
|
|
749
|
+
let l = (s.left + a.x) / r.x, u = (s.top + a.y) / r.y, c = s.width / r.x, f = s.height / r.y;
|
|
750
750
|
if (i) {
|
|
751
|
-
const m =
|
|
752
|
-
let p = m, h =
|
|
751
|
+
const m = _(i), d = o && B(o) ? _(o) : o;
|
|
752
|
+
let p = m, h = At(p);
|
|
753
753
|
for (; h && o && d !== p; ) {
|
|
754
|
-
const y = z(h), g = h.getBoundingClientRect(),
|
|
755
|
-
|
|
754
|
+
const y = z(h), g = h.getBoundingClientRect(), A = M(h), w = g.left + (h.clientLeft + parseFloat(A.paddingLeft)) * y.x, C = g.top + (h.clientTop + parseFloat(A.paddingTop)) * y.y;
|
|
755
|
+
l *= y.x, u *= y.y, c *= y.x, f *= y.y, l += w, u += C, p = _(h), h = At(p);
|
|
756
756
|
}
|
|
757
757
|
}
|
|
758
|
-
return
|
|
758
|
+
return ut({
|
|
759
759
|
width: c,
|
|
760
760
|
height: f,
|
|
761
|
-
x:
|
|
761
|
+
x: l,
|
|
762
762
|
y: u
|
|
763
763
|
});
|
|
764
764
|
}
|
|
765
|
-
function
|
|
766
|
-
const n =
|
|
767
|
-
return t ? t.left + n : j(
|
|
765
|
+
function pt(e, t) {
|
|
766
|
+
const n = mt(e).scrollLeft;
|
|
767
|
+
return t ? t.left + n : j(Q(e)).left + n;
|
|
768
768
|
}
|
|
769
|
-
function
|
|
770
|
-
const n = e.getBoundingClientRect(), o = n.left + t.scrollLeft -
|
|
769
|
+
function ne(e, t) {
|
|
770
|
+
const n = e.getBoundingClientRect(), o = n.left + t.scrollLeft - pt(e, n), s = n.top + t.scrollTop;
|
|
771
771
|
return {
|
|
772
772
|
x: o,
|
|
773
773
|
y: s
|
|
774
774
|
};
|
|
775
775
|
}
|
|
776
|
-
function
|
|
776
|
+
function We(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 =
|
|
784
|
-
if (o === r ||
|
|
783
|
+
const i = s === "fixed", r = Q(o), a = t ? dt(t.floating) : !1;
|
|
784
|
+
if (o === r || a && i)
|
|
785
785
|
return n;
|
|
786
|
-
let
|
|
786
|
+
let l = {
|
|
787
787
|
scrollLeft: 0,
|
|
788
788
|
scrollTop: 0
|
|
789
|
-
}, u =
|
|
790
|
-
const c =
|
|
791
|
-
if ((f || !f && !i) && ((
|
|
789
|
+
}, u = P(1);
|
|
790
|
+
const c = P(0), f = N(o);
|
|
791
|
+
if ((f || !f && !i) && ((et(o) !== "body" || it(r)) && (l = mt(o)), N(o))) {
|
|
792
792
|
const d = j(o);
|
|
793
793
|
u = z(o), c.x = d.x + o.clientLeft, c.y = d.y + o.clientTop;
|
|
794
794
|
}
|
|
795
|
-
const m = r && !f && !i ?
|
|
795
|
+
const m = r && !f && !i ? ne(r, l) : P(0);
|
|
796
796
|
return {
|
|
797
797
|
width: n.width * u.x,
|
|
798
798
|
height: n.height * u.y,
|
|
799
|
-
x: n.x * u.x -
|
|
800
|
-
y: n.y * u.y -
|
|
799
|
+
x: n.x * u.x - l.scrollLeft * u.x + c.x + m.x,
|
|
800
|
+
y: n.y * u.y - l.scrollTop * u.y + c.y + m.y
|
|
801
801
|
};
|
|
802
802
|
}
|
|
803
|
-
function
|
|
803
|
+
function Je(e) {
|
|
804
804
|
return Array.from(e.getClientRects());
|
|
805
805
|
}
|
|
806
|
-
function
|
|
807
|
-
const t =
|
|
808
|
-
let r = -n.scrollLeft +
|
|
809
|
-
const
|
|
810
|
-
return
|
|
806
|
+
function Ge(e) {
|
|
807
|
+
const t = Q(e), n = mt(e), o = e.ownerDocument.body, s = O(t.scrollWidth, t.clientWidth, o.scrollWidth, o.clientWidth), i = O(t.scrollHeight, t.clientHeight, o.scrollHeight, o.clientHeight);
|
|
808
|
+
let r = -n.scrollLeft + pt(e);
|
|
809
|
+
const a = -n.scrollTop;
|
|
810
|
+
return M(o).direction === "rtl" && (r += O(t.clientWidth, o.clientWidth) - s), {
|
|
811
811
|
width: s,
|
|
812
812
|
height: i,
|
|
813
813
|
x: r,
|
|
814
|
-
y:
|
|
814
|
+
y: a
|
|
815
815
|
};
|
|
816
816
|
}
|
|
817
|
-
const
|
|
818
|
-
function
|
|
819
|
-
const n =
|
|
820
|
-
let i = o.clientWidth, r = o.clientHeight,
|
|
817
|
+
const Ut = 25;
|
|
818
|
+
function Ke(e, t) {
|
|
819
|
+
const n = _(e), o = Q(e), s = n.visualViewport;
|
|
820
|
+
let i = o.clientWidth, r = o.clientHeight, a = 0, l = 0;
|
|
821
821
|
if (s) {
|
|
822
822
|
i = s.width, r = s.height;
|
|
823
|
-
const c =
|
|
824
|
-
(!c || c && t === "fixed") && (
|
|
823
|
+
const c = bt();
|
|
824
|
+
(!c || c && t === "fixed") && (a = s.offsetLeft, l = s.offsetTop);
|
|
825
825
|
}
|
|
826
|
-
const u =
|
|
826
|
+
const u = pt(o);
|
|
827
827
|
if (u <= 0) {
|
|
828
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
|
-
p <=
|
|
830
|
-
} else u <=
|
|
829
|
+
p <= Ut && (i -= p);
|
|
830
|
+
} else u <= Ut && (i += u);
|
|
831
831
|
return {
|
|
832
832
|
width: i,
|
|
833
833
|
height: r,
|
|
834
|
-
x:
|
|
835
|
-
y:
|
|
834
|
+
x: a,
|
|
835
|
+
y: l
|
|
836
836
|
};
|
|
837
837
|
}
|
|
838
|
-
const
|
|
839
|
-
function
|
|
840
|
-
const n = j(e, !0, t === "fixed"), o = n.top + e.clientTop, s = n.left + e.clientLeft, i =
|
|
838
|
+
const Ye = /* @__PURE__ */ new Set(["absolute", "fixed"]);
|
|
839
|
+
function je(e, t) {
|
|
840
|
+
const n = j(e, !0, t === "fixed"), o = n.top + e.clientTop, s = n.left + e.clientLeft, i = N(e) ? z(e) : P(1), r = e.clientWidth * i.x, a = e.clientHeight * i.y, l = s * i.x, u = o * i.y;
|
|
841
841
|
return {
|
|
842
842
|
width: r,
|
|
843
|
-
height:
|
|
844
|
-
x:
|
|
843
|
+
height: a,
|
|
844
|
+
x: l,
|
|
845
845
|
y: u
|
|
846
846
|
};
|
|
847
847
|
}
|
|
848
|
-
function
|
|
848
|
+
function qt(e, t, n) {
|
|
849
849
|
let o;
|
|
850
850
|
if (t === "viewport")
|
|
851
|
-
o =
|
|
851
|
+
o = Ke(e, n);
|
|
852
852
|
else if (t === "document")
|
|
853
|
-
o =
|
|
854
|
-
else if (
|
|
855
|
-
o =
|
|
853
|
+
o = Ge(Q(e));
|
|
854
|
+
else if (B(t))
|
|
855
|
+
o = je(t, n);
|
|
856
856
|
else {
|
|
857
|
-
const s =
|
|
857
|
+
const s = ee(e);
|
|
858
858
|
o = {
|
|
859
859
|
x: t.x - s.x,
|
|
860
860
|
y: t.y - s.y,
|
|
@@ -862,70 +862,70 @@ function Vt(e, t, n) {
|
|
|
862
862
|
height: t.height
|
|
863
863
|
};
|
|
864
864
|
}
|
|
865
|
-
return
|
|
865
|
+
return ut(o);
|
|
866
866
|
}
|
|
867
|
-
function
|
|
867
|
+
function oe(e, t) {
|
|
868
868
|
const n = J(e);
|
|
869
|
-
return n === t || !
|
|
869
|
+
return n === t || !B(n) || tt(n) ? !1 : M(n).position === "fixed" || oe(n, t);
|
|
870
870
|
}
|
|
871
|
-
function
|
|
871
|
+
function $e(e, t) {
|
|
872
872
|
const n = t.get(e);
|
|
873
873
|
if (n)
|
|
874
874
|
return n;
|
|
875
|
-
let o =
|
|
876
|
-
const i =
|
|
875
|
+
let o = nt(e, [], !1).filter((a) => B(a) && et(a) !== "body"), s = null;
|
|
876
|
+
const i = M(e).position === "fixed";
|
|
877
877
|
let r = i ? J(e) : e;
|
|
878
|
-
for (;
|
|
879
|
-
const
|
|
880
|
-
!
|
|
878
|
+
for (; B(r) && !tt(r); ) {
|
|
879
|
+
const a = M(r), l = xt(r);
|
|
880
|
+
!l && a.position === "fixed" && (s = null), (i ? !l && !s : !l && a.position === "static" && !!s && Ye.has(s.position) || it(r) && !l && oe(e, r)) ? o = o.filter((c) => c !== r) : s = a, r = J(r);
|
|
881
881
|
}
|
|
882
882
|
return t.set(e, o), o;
|
|
883
883
|
}
|
|
884
|
-
function
|
|
884
|
+
function ze(e) {
|
|
885
885
|
let {
|
|
886
886
|
element: t,
|
|
887
887
|
boundary: n,
|
|
888
888
|
rootBoundary: o,
|
|
889
889
|
strategy: s
|
|
890
890
|
} = e;
|
|
891
|
-
const r = [...n === "clippingAncestors" ?
|
|
892
|
-
const f =
|
|
893
|
-
return u.top =
|
|
894
|
-
},
|
|
891
|
+
const r = [...n === "clippingAncestors" ? dt(t) ? [] : $e(t, this._c) : [].concat(n), o], a = r[0], l = r.reduce((u, c) => {
|
|
892
|
+
const f = qt(t, c, s);
|
|
893
|
+
return u.top = O(f.top, u.top), u.right = Z(f.right, u.right), u.bottom = Z(f.bottom, u.bottom), u.left = O(f.left, u.left), u;
|
|
894
|
+
}, qt(t, a, s));
|
|
895
895
|
return {
|
|
896
|
-
width:
|
|
897
|
-
height:
|
|
898
|
-
x:
|
|
899
|
-
y:
|
|
896
|
+
width: l.right - l.left,
|
|
897
|
+
height: l.bottom - l.top,
|
|
898
|
+
x: l.left,
|
|
899
|
+
y: l.top
|
|
900
900
|
};
|
|
901
901
|
}
|
|
902
|
-
function
|
|
902
|
+
function Xe(e) {
|
|
903
903
|
const {
|
|
904
904
|
width: t,
|
|
905
905
|
height: n
|
|
906
|
-
} =
|
|
906
|
+
} = te(e);
|
|
907
907
|
return {
|
|
908
908
|
width: t,
|
|
909
909
|
height: n
|
|
910
910
|
};
|
|
911
911
|
}
|
|
912
|
-
function
|
|
913
|
-
const o =
|
|
914
|
-
let
|
|
912
|
+
function Ze(e, t, n) {
|
|
913
|
+
const o = N(t), s = Q(t), i = n === "fixed", r = j(e, !0, i, t);
|
|
914
|
+
let a = {
|
|
915
915
|
scrollLeft: 0,
|
|
916
916
|
scrollTop: 0
|
|
917
917
|
};
|
|
918
|
-
const
|
|
918
|
+
const l = P(0);
|
|
919
919
|
function u() {
|
|
920
|
-
|
|
920
|
+
l.x = pt(s);
|
|
921
921
|
}
|
|
922
922
|
if (o || !o && !i)
|
|
923
|
-
if ((
|
|
923
|
+
if ((et(t) !== "body" || it(s)) && (a = mt(t)), o) {
|
|
924
924
|
const d = j(t, !0, i, t);
|
|
925
|
-
|
|
925
|
+
l.x = d.x + t.clientLeft, l.y = d.y + t.clientTop;
|
|
926
926
|
} else s && u();
|
|
927
927
|
i && !o && s && u();
|
|
928
|
-
const c = s && !o && !i ?
|
|
928
|
+
const c = s && !o && !i ? ne(s, a) : P(0), f = r.left + a.scrollLeft - l.x - c.x, m = r.top + a.scrollTop - l.y - c.y;
|
|
929
929
|
return {
|
|
930
930
|
x: f,
|
|
931
931
|
y: m,
|
|
@@ -933,39 +933,39 @@ function je(e, t, n) {
|
|
|
933
933
|
height: r.height
|
|
934
934
|
};
|
|
935
935
|
}
|
|
936
|
-
function
|
|
937
|
-
return
|
|
936
|
+
function yt(e) {
|
|
937
|
+
return M(e).position === "static";
|
|
938
938
|
}
|
|
939
|
-
function
|
|
940
|
-
if (!
|
|
939
|
+
function Wt(e, t) {
|
|
940
|
+
if (!N(e) || M(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 Q(e) === n && (n = n.ownerDocument.body), n;
|
|
946
946
|
}
|
|
947
|
-
function
|
|
948
|
-
const n =
|
|
949
|
-
if (
|
|
947
|
+
function se(e, t) {
|
|
948
|
+
const n = _(e);
|
|
949
|
+
if (dt(e))
|
|
950
950
|
return n;
|
|
951
|
-
if (!
|
|
951
|
+
if (!N(e)) {
|
|
952
952
|
let s = J(e);
|
|
953
|
-
for (; s && !
|
|
954
|
-
if (
|
|
953
|
+
for (; s && !tt(s); ) {
|
|
954
|
+
if (B(s) && !yt(s))
|
|
955
955
|
return s;
|
|
956
956
|
s = J(s);
|
|
957
957
|
}
|
|
958
958
|
return n;
|
|
959
959
|
}
|
|
960
|
-
let o =
|
|
961
|
-
for (; o &&
|
|
962
|
-
o =
|
|
963
|
-
return o &&
|
|
960
|
+
let o = Wt(e, t);
|
|
961
|
+
for (; o && Be(o) && yt(o); )
|
|
962
|
+
o = Wt(o, t);
|
|
963
|
+
return o && tt(o) && yt(o) && !xt(o) ? n : o || Ve(e) || n;
|
|
964
964
|
}
|
|
965
|
-
const
|
|
966
|
-
const t = this.getOffsetParent ||
|
|
965
|
+
const tn = async function(e) {
|
|
966
|
+
const t = this.getOffsetParent || se, 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,
|
|
@@ -974,56 +974,56 @@ const ze = async function(e) {
|
|
|
974
974
|
}
|
|
975
975
|
};
|
|
976
976
|
};
|
|
977
|
-
function
|
|
978
|
-
return
|
|
979
|
-
}
|
|
980
|
-
const
|
|
981
|
-
convertOffsetParentRelativeRectToViewportRelativeRect:
|
|
982
|
-
getDocumentElement:
|
|
983
|
-
getClippingRect:
|
|
984
|
-
getOffsetParent:
|
|
985
|
-
getElementRects:
|
|
986
|
-
getClientRects:
|
|
987
|
-
getDimensions:
|
|
977
|
+
function en(e) {
|
|
978
|
+
return M(e).direction === "rtl";
|
|
979
|
+
}
|
|
980
|
+
const nn = {
|
|
981
|
+
convertOffsetParentRelativeRectToViewportRelativeRect: We,
|
|
982
|
+
getDocumentElement: Q,
|
|
983
|
+
getClippingRect: ze,
|
|
984
|
+
getOffsetParent: se,
|
|
985
|
+
getElementRects: tn,
|
|
986
|
+
getClientRects: Je,
|
|
987
|
+
getDimensions: Xe,
|
|
988
988
|
getScale: z,
|
|
989
|
-
isElement:
|
|
990
|
-
isRTL:
|
|
989
|
+
isElement: B,
|
|
990
|
+
isRTL: en
|
|
991
991
|
};
|
|
992
|
-
function
|
|
992
|
+
function ie(e, t) {
|
|
993
993
|
return e.x === t.x && e.y === t.y && e.width === t.width && e.height === t.height;
|
|
994
994
|
}
|
|
995
|
-
function
|
|
995
|
+
function on(e, t) {
|
|
996
996
|
let n = null, o;
|
|
997
|
-
const s =
|
|
997
|
+
const s = Q(e);
|
|
998
998
|
function i() {
|
|
999
|
-
var
|
|
1000
|
-
clearTimeout(o), (
|
|
999
|
+
var a;
|
|
1000
|
+
clearTimeout(o), (a = n) == null || a.disconnect(), n = null;
|
|
1001
1001
|
}
|
|
1002
|
-
function r(
|
|
1003
|
-
|
|
1002
|
+
function r(a, l) {
|
|
1003
|
+
a === void 0 && (a = !1), l === void 0 && (l = 1), i();
|
|
1004
1004
|
const u = e.getBoundingClientRect(), {
|
|
1005
1005
|
left: c,
|
|
1006
1006
|
top: f,
|
|
1007
1007
|
width: m,
|
|
1008
1008
|
height: d
|
|
1009
1009
|
} = u;
|
|
1010
|
-
if (
|
|
1010
|
+
if (a || t(), !m || !d)
|
|
1011
1011
|
return;
|
|
1012
|
-
const p =
|
|
1012
|
+
const p = at(f), h = at(s.clientWidth - (c + m)), y = at(s.clientHeight - (f + d)), g = at(c), w = {
|
|
1013
1013
|
rootMargin: -p + "px " + -h + "px " + -y + "px " + -g + "px",
|
|
1014
|
-
threshold:
|
|
1014
|
+
threshold: O(0, Z(1, l)) || 1
|
|
1015
1015
|
};
|
|
1016
|
-
let
|
|
1017
|
-
function x(
|
|
1018
|
-
const
|
|
1019
|
-
if (
|
|
1020
|
-
if (!
|
|
1016
|
+
let C = !0;
|
|
1017
|
+
function x(I) {
|
|
1018
|
+
const k = I[0].intersectionRatio;
|
|
1019
|
+
if (k !== l) {
|
|
1020
|
+
if (!C)
|
|
1021
1021
|
return r();
|
|
1022
|
-
|
|
1022
|
+
k ? r(!1, k) : o = setTimeout(() => {
|
|
1023
1023
|
r(!1, 1e-7);
|
|
1024
1024
|
}, 1e3);
|
|
1025
1025
|
}
|
|
1026
|
-
|
|
1026
|
+
k === 1 && !ie(u, e.getBoundingClientRect()) && r(), C = !1;
|
|
1027
1027
|
}
|
|
1028
1028
|
try {
|
|
1029
1029
|
n = new IntersectionObserver(x, {
|
|
@@ -1038,57 +1038,57 @@ function Ze(e, t) {
|
|
|
1038
1038
|
}
|
|
1039
1039
|
return r(!0), i;
|
|
1040
1040
|
}
|
|
1041
|
-
function
|
|
1041
|
+
function sn(e, t, n, o) {
|
|
1042
1042
|
o === void 0 && (o = {});
|
|
1043
1043
|
const {
|
|
1044
1044
|
ancestorScroll: s = !0,
|
|
1045
1045
|
ancestorResize: i = !0,
|
|
1046
1046
|
elementResize: r = typeof ResizeObserver == "function",
|
|
1047
|
-
layoutShift:
|
|
1048
|
-
animationFrame:
|
|
1049
|
-
} = o, u =
|
|
1047
|
+
layoutShift: a = typeof IntersectionObserver == "function",
|
|
1048
|
+
animationFrame: l = !1
|
|
1049
|
+
} = o, u = Ct(e), c = s || i ? [...u ? nt(u) : [], ...nt(t)] : [];
|
|
1050
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 f = u &&
|
|
1055
|
+
const f = u && a ? on(u, n) : null;
|
|
1056
1056
|
let m = -1, d = null;
|
|
1057
1057
|
r && (d = new ResizeObserver((g) => {
|
|
1058
|
-
let [
|
|
1059
|
-
|
|
1058
|
+
let [A] = g;
|
|
1059
|
+
A && A.target === u && d && (d.unobserve(t), cancelAnimationFrame(m), m = requestAnimationFrame(() => {
|
|
1060
1060
|
var w;
|
|
1061
1061
|
(w = d) == null || w.observe(t);
|
|
1062
1062
|
})), n();
|
|
1063
|
-
}), u && !
|
|
1064
|
-
let p, h =
|
|
1065
|
-
|
|
1063
|
+
}), u && !l && d.observe(u), d.observe(t));
|
|
1064
|
+
let p, h = l ? j(e) : null;
|
|
1065
|
+
l && y();
|
|
1066
1066
|
function y() {
|
|
1067
1067
|
const g = j(e);
|
|
1068
|
-
h && !
|
|
1068
|
+
h && !ie(h, g) && n(), h = g, p = requestAnimationFrame(y);
|
|
1069
1069
|
}
|
|
1070
1070
|
return n(), () => {
|
|
1071
1071
|
var g;
|
|
1072
|
-
c.forEach((
|
|
1073
|
-
s &&
|
|
1074
|
-
}), f?.(), (g = d) == null || g.disconnect(), d = null,
|
|
1072
|
+
c.forEach((A) => {
|
|
1073
|
+
s && A.removeEventListener("scroll", n), i && A.removeEventListener("resize", n);
|
|
1074
|
+
}), f?.(), (g = d) == null || g.disconnect(), d = null, l && cancelAnimationFrame(p);
|
|
1075
1075
|
};
|
|
1076
1076
|
}
|
|
1077
|
-
const
|
|
1077
|
+
const rn = ke, an = Te, ln = Ee, cn = Ie, un = (e, t, n) => {
|
|
1078
1078
|
const o = /* @__PURE__ */ new Map(), s = {
|
|
1079
|
-
platform:
|
|
1079
|
+
platform: nn,
|
|
1080
1080
|
...n
|
|
1081
1081
|
}, i = {
|
|
1082
1082
|
...s.platform,
|
|
1083
1083
|
_c: o
|
|
1084
1084
|
};
|
|
1085
|
-
return
|
|
1085
|
+
return De(e, t, {
|
|
1086
1086
|
...s,
|
|
1087
1087
|
platform: i
|
|
1088
1088
|
});
|
|
1089
1089
|
};
|
|
1090
|
-
function
|
|
1091
|
-
const n =
|
|
1090
|
+
function fn(e, t) {
|
|
1091
|
+
const n = S({
|
|
1092
1092
|
position: "fixed",
|
|
1093
1093
|
left: "0",
|
|
1094
1094
|
top: "0",
|
|
@@ -1097,20 +1097,20 @@ function ln(e, t) {
|
|
|
1097
1097
|
});
|
|
1098
1098
|
let o = null;
|
|
1099
1099
|
const s = () => {
|
|
1100
|
-
!e.value || !t.value ||
|
|
1100
|
+
!e.value || !t.value || un(e.value, t.value, {
|
|
1101
1101
|
placement: "bottom-start",
|
|
1102
1102
|
strategy: "fixed",
|
|
1103
1103
|
middleware: [
|
|
1104
|
-
|
|
1104
|
+
rn(6),
|
|
1105
1105
|
// 输入框与下拉列表的间距
|
|
1106
|
-
|
|
1106
|
+
ln(),
|
|
1107
1107
|
// 空间不足自动翻转到上方
|
|
1108
|
-
|
|
1108
|
+
an({ padding: 10 }),
|
|
1109
1109
|
// 靠近屏幕边缘时自动位移
|
|
1110
|
-
|
|
1111
|
-
apply({ rects:
|
|
1112
|
-
const u = `${
|
|
1113
|
-
Object.assign(
|
|
1110
|
+
cn({
|
|
1111
|
+
apply({ rects: a, elements: l }) {
|
|
1112
|
+
const u = `${a.reference.width}px`;
|
|
1113
|
+
Object.assign(l.floating.style, {
|
|
1114
1114
|
width: u,
|
|
1115
1115
|
// 必须锁定,否则在 body 下它可能由于内容过多撑开到 100vw
|
|
1116
1116
|
minWidth: u,
|
|
@@ -1119,20 +1119,20 @@ function ln(e, t) {
|
|
|
1119
1119
|
}
|
|
1120
1120
|
})
|
|
1121
1121
|
]
|
|
1122
|
-
}).then(({ x:
|
|
1122
|
+
}).then(({ x: a, y: l }) => {
|
|
1123
1123
|
Object.assign(n.value, {
|
|
1124
|
-
left: `${
|
|
1125
|
-
top: `${
|
|
1124
|
+
left: `${a}px`,
|
|
1125
|
+
top: `${l}px`
|
|
1126
1126
|
});
|
|
1127
1127
|
});
|
|
1128
1128
|
}, i = () => {
|
|
1129
|
-
e.value && t.value && (o =
|
|
1129
|
+
e.value && t.value && (o = sn(e.value, t.value, s));
|
|
1130
1130
|
}, r = () => {
|
|
1131
1131
|
o && (o(), o = null);
|
|
1132
1132
|
};
|
|
1133
|
-
return
|
|
1133
|
+
return Kt(r), { floatingStyles: n, startTrack: i, stopTrack: r };
|
|
1134
1134
|
}
|
|
1135
|
-
const
|
|
1135
|
+
const dn = "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", mn = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAABFUlEQVR4AaRQO07DQBCdWe8B4B5IFFyAK9ARkIVNhIQEEiVtJLgABRVRvIBCJBquwBVyDgoaSnuHeZY3MlYcNsnIb8fze6M3hra0XoKJm95N3Nv3EnyhFvb2EgjRJbOMKqmO2tDcvQ5fK+qvl4CJbOn9/CJPP9tArp5sHtP4lc652VXxPL1Z1hRFIOytF1NuTJCfnT4Ms8HjSgJctn1xIt6hxqIkdK+u8U8zT1ESmP5enUkWmqMkhG2FmxXOvR+EGD5KAhoDqsQvtiMXJQGNQJ4N8mF6PMd/wL8SxuOXPSG21pj9p+L1EOjGyAHoQQ0zWGDqx9pbPWIpwqOEkw+gGyMHoAc1ozOkVhOcZyepYndNpDpPvwAAAP//BVQJHAAAAAZJREFUAwDZWL4hub5xHQAAAABJRU5ErkJggg==", pn = "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==", hn = "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", gn = "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", yn = "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=", vn = ue({
|
|
1136
1136
|
name: "GlobalSearch",
|
|
1137
1137
|
model: { prop: "value", event: "input" },
|
|
1138
1138
|
props: {
|
|
@@ -1150,85 +1150,111 @@ 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 =
|
|
1154
|
-
|
|
1153
|
+
const n = S(""), o = S(!1), s = S(!1), i = S(""), r = S(null), a = S(null), l = S(null), u = S(null), { searchHistory: c, saveToHistory: f, clearHistory: m } = de(
|
|
1154
|
+
Et(e, "historyKey")
|
|
1155
1155
|
), {
|
|
1156
1156
|
searchResults: d,
|
|
1157
1157
|
loading: p,
|
|
1158
1158
|
isFetchingMore: h,
|
|
1159
1159
|
isFinished: y,
|
|
1160
1160
|
currentPage: g,
|
|
1161
|
-
fetchData:
|
|
1161
|
+
fetchData: A,
|
|
1162
1162
|
filterByTypes: w
|
|
1163
|
-
} =
|
|
1164
|
-
|
|
1163
|
+
} = pe(n, Et(e, "searchTypeList")), { floatingStyles: C, startTrack: x, stopTrack: I } = fn(
|
|
1164
|
+
l,
|
|
1165
1165
|
u
|
|
1166
|
-
),
|
|
1166
|
+
), k = async () => {
|
|
1167
1167
|
if (s.value = !0, !e.multiple && o.value && d.value.length === 0) {
|
|
1168
|
-
const
|
|
1169
|
-
if (
|
|
1168
|
+
const v = e.value;
|
|
1169
|
+
if (v?.id) {
|
|
1170
1170
|
p.value = !0;
|
|
1171
1171
|
try {
|
|
1172
|
-
const
|
|
1173
|
-
d.value = w(
|
|
1172
|
+
const E = await gt(v.id, v.type);
|
|
1173
|
+
d.value = w(E.records);
|
|
1174
1174
|
} finally {
|
|
1175
1175
|
p.value = !1;
|
|
1176
1176
|
}
|
|
1177
1177
|
}
|
|
1178
1178
|
}
|
|
1179
|
-
},
|
|
1179
|
+
}, V = () => {
|
|
1180
1180
|
setTimeout(() => {
|
|
1181
1181
|
s.value = !1;
|
|
1182
1182
|
}, 200);
|
|
1183
|
-
},
|
|
1184
|
-
|
|
1185
|
-
},
|
|
1183
|
+
}, H = (v) => {
|
|
1184
|
+
v.target.value === "" && !e.multiple && (o.value = !1, t("input", null), t("update:value", null));
|
|
1185
|
+
}, L = () => {
|
|
1186
1186
|
if (e.multiple && !n.value && e.value?.length > 0) {
|
|
1187
|
-
const
|
|
1188
|
-
t("input",
|
|
1187
|
+
const v = [...e.value], E = v.pop();
|
|
1188
|
+
t("input", v), t("update:value", v), t("remove", E);
|
|
1189
1189
|
}
|
|
1190
1190
|
};
|
|
1191
|
-
|
|
1192
|
-
if (!
|
|
1191
|
+
ht(s, (v) => v ? x() : I()), ht(n, (v) => {
|
|
1192
|
+
if (!v.trim()) {
|
|
1193
1193
|
d.value = [];
|
|
1194
1194
|
return;
|
|
1195
1195
|
}
|
|
1196
|
-
r.value && clearTimeout(r.value), r.value = setTimeout(() =>
|
|
1196
|
+
r.value && clearTimeout(r.value), r.value = setTimeout(() => A(1, !1), 300);
|
|
1197
1197
|
});
|
|
1198
|
-
const G = X(() => e.lang ? e.lang === "en" || e.lang === "en-US" : typeof document < "u" ? /(^|;\s*)jc-language=en(-US)?(;|$)/.test(document.cookie || "") : !1),
|
|
1199
|
-
return
|
|
1198
|
+
const G = X(() => e.lang ? e.lang === "en" || e.lang === "en-US" : typeof document < "u" ? /(^|;\s*)jc-language=en(-US)?(;|$)/.test(document.cookie || "") : !1), q = (v) => G.value ? v.displayEn || v.display || v.nameEn || "" : v.displayCn || v.display || v.nameCn || v.name || "";
|
|
1199
|
+
return ht(
|
|
1200
1200
|
() => e.value,
|
|
1201
|
-
async (
|
|
1202
|
-
if (
|
|
1201
|
+
async (v, E) => {
|
|
1202
|
+
if (console.log("🍉 ~ index.vue:304 ~ newVal:", v), JSON.stringify(v) === JSON.stringify(E)) return;
|
|
1203
|
+
if (e.multiple && Array.isArray(v)) {
|
|
1204
|
+
const F = [...v], D = F.filter(
|
|
1205
|
+
(b) => b && b.id && b.type
|
|
1206
|
+
);
|
|
1207
|
+
if (D.length > 0)
|
|
1208
|
+
try {
|
|
1209
|
+
const b = D.map(($) => $.id), T = await gt(
|
|
1210
|
+
b,
|
|
1211
|
+
D[0].type
|
|
1212
|
+
);
|
|
1213
|
+
if (T && T.records) {
|
|
1214
|
+
let $ = !1;
|
|
1215
|
+
const Rt = F.map((rt) => {
|
|
1216
|
+
const Dt = T.records.find((ae) => ae.id === rt.id);
|
|
1217
|
+
return Dt && !rt.display ? ($ = !0, { ...rt, ...Dt }) : rt;
|
|
1218
|
+
});
|
|
1219
|
+
$ && (t("input", Rt), t("update:value", Rt));
|
|
1220
|
+
}
|
|
1221
|
+
} catch (b) {
|
|
1222
|
+
console.error("Batch fetch detail failed:", b);
|
|
1223
|
+
}
|
|
1203
1224
|
return;
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
|
|
1225
|
+
}
|
|
1226
|
+
const R = v;
|
|
1227
|
+
if (!R) {
|
|
1228
|
+
o.value = !1, i.value = "";
|
|
1207
1229
|
return;
|
|
1208
1230
|
}
|
|
1209
|
-
if (typeof
|
|
1210
|
-
if (
|
|
1231
|
+
if (typeof R == "object")
|
|
1232
|
+
if (R.id && R.type && !R.display)
|
|
1211
1233
|
try {
|
|
1212
|
-
const
|
|
1213
|
-
|
|
1234
|
+
const D = (await gt(
|
|
1235
|
+
R.id,
|
|
1236
|
+
R.type
|
|
1237
|
+
)).records.find(
|
|
1238
|
+
(b) => b.id === R.id
|
|
1214
1239
|
);
|
|
1215
|
-
|
|
1216
|
-
} catch (
|
|
1217
|
-
console.error("
|
|
1240
|
+
D && (i.value = q(D), o.value = !0);
|
|
1241
|
+
} catch (F) {
|
|
1242
|
+
console.error("Single fetch detail failed:", F);
|
|
1218
1243
|
}
|
|
1219
1244
|
else
|
|
1220
|
-
i.value =
|
|
1221
|
-
else
|
|
1245
|
+
i.value = q(R), o.value = !!i.value;
|
|
1246
|
+
else
|
|
1247
|
+
i.value = String(R), o.value = !!R;
|
|
1222
1248
|
},
|
|
1223
1249
|
{ immediate: !0, deep: !0 }
|
|
1224
|
-
),
|
|
1250
|
+
), Kt(I), {
|
|
1225
1251
|
// 状态
|
|
1226
1252
|
query: n,
|
|
1227
1253
|
isSelected: o,
|
|
1228
1254
|
isDropdownVisible: s,
|
|
1229
1255
|
selectedLabel: i,
|
|
1230
|
-
inputRef:
|
|
1231
|
-
referenceRef:
|
|
1256
|
+
inputRef: a,
|
|
1257
|
+
referenceRef: l,
|
|
1232
1258
|
floatingRef: u,
|
|
1233
1259
|
// Hook 状态
|
|
1234
1260
|
searchHistory: c,
|
|
@@ -1237,21 +1263,21 @@ const an = "data:image/svg+xml,%3csvg%20t='1695277594902'%20fill='%23fff'%20clas
|
|
|
1237
1263
|
isFetchingMore: h,
|
|
1238
1264
|
isFinished: y,
|
|
1239
1265
|
currentPage: g,
|
|
1240
|
-
floatingStyles:
|
|
1266
|
+
floatingStyles: C,
|
|
1241
1267
|
// Hook 方法
|
|
1242
1268
|
saveToHistory: f,
|
|
1243
1269
|
clearHistory: m,
|
|
1244
|
-
fetchData:
|
|
1270
|
+
fetchData: A,
|
|
1245
1271
|
filterByTypes: w,
|
|
1246
1272
|
startTrack: x,
|
|
1247
|
-
stopTrack:
|
|
1273
|
+
stopTrack: I,
|
|
1248
1274
|
// 组件方法
|
|
1249
|
-
onFocus:
|
|
1250
|
-
handleBlur:
|
|
1251
|
-
onInput:
|
|
1252
|
-
handleDelete:
|
|
1275
|
+
onFocus: k,
|
|
1276
|
+
handleBlur: V,
|
|
1277
|
+
onInput: H,
|
|
1278
|
+
handleDelete: L,
|
|
1253
1279
|
// 资源
|
|
1254
|
-
SearchIcon:
|
|
1280
|
+
SearchIcon: dn
|
|
1255
1281
|
};
|
|
1256
1282
|
},
|
|
1257
1283
|
computed: {
|
|
@@ -1292,7 +1318,7 @@ const an = "data:image/svg+xml,%3csvg%20t='1695277594902'%20fill='%23fff'%20clas
|
|
|
1292
1318
|
return this.multiple ? this.query ? `${this.query.length * 10 + 20}px` : "10px" : "100%";
|
|
1293
1319
|
},
|
|
1294
1320
|
currentPlaceholder() {
|
|
1295
|
-
return this.multiple && this.selectedItems.length > 0 ? "" : this.isSelected && !this.multiple ? this.selectedLabel : this.placeholder
|
|
1321
|
+
return this.multiple && this.selectedItems.length > 0 ? "" : this.isSelected && !this.multiple ? this.selectedLabel : this.placeholder ? this.placeholder : this.isEn ? "Please enter..." : "请输入...";
|
|
1296
1322
|
}
|
|
1297
1323
|
},
|
|
1298
1324
|
methods: {
|
|
@@ -1331,7 +1357,7 @@ const an = "data:image/svg+xml,%3csvg%20t='1695277594902'%20fill='%23fff'%20clas
|
|
|
1331
1357
|
return this.selectedItems.some((t) => t.id === e.id);
|
|
1332
1358
|
},
|
|
1333
1359
|
selectItem(e) {
|
|
1334
|
-
this.saveToHistory(e), this.multiple ? this.isItemActive(e) || (this.$emit("input", [...this.selectedItems, e]), this.$emit("update:value", [...this.selectedItems, e])) : (this.isSelected = !0, this.selectedLabel = this.getItemLabel(e), this.$emit("input", e), this.$emit("update:value", e), this.isDropdownVisible = !1), this.query = "", this.$emit("select", e);
|
|
1360
|
+
this.saveToHistory(e), this.multiple ? this.isItemActive(e) || (this.$emit("input", [...this.selectedItems, e]), this.$emit("update:value", [...this.selectedItems, e])) : (this.isSelected = !0, this.selectedLabel = this.getItemLabel(e), this.$emit("input", e), this.$emit("update:value", e), this.isDropdownVisible = !1), this.query = "", this.$emit("select", e), this.$emit("change", e);
|
|
1335
1361
|
},
|
|
1336
1362
|
removeItem(e) {
|
|
1337
1363
|
const t = this.selectedItems.filter((n) => n.id !== e.id);
|
|
@@ -1346,11 +1372,11 @@ const an = "data:image/svg+xml,%3csvg%20t='1695277594902'%20fill='%23fff'%20clas
|
|
|
1346
1372
|
},
|
|
1347
1373
|
getIconUrl(e) {
|
|
1348
1374
|
return {
|
|
1349
|
-
City:
|
|
1350
|
-
Seaport:
|
|
1351
|
-
Airport:
|
|
1352
|
-
Country:
|
|
1353
|
-
}[e] ||
|
|
1375
|
+
City: mn,
|
|
1376
|
+
Seaport: pn,
|
|
1377
|
+
Airport: hn,
|
|
1378
|
+
Country: gn
|
|
1379
|
+
}[e] || yn;
|
|
1354
1380
|
},
|
|
1355
1381
|
handleScroll(e) {
|
|
1356
1382
|
const { scrollTop: t, scrollHeight: n, clientHeight: o } = e.target;
|
|
@@ -1358,14 +1384,14 @@ const an = "data:image/svg+xml,%3csvg%20t='1695277594902'%20fill='%23fff'%20clas
|
|
|
1358
1384
|
}
|
|
1359
1385
|
}
|
|
1360
1386
|
});
|
|
1361
|
-
function
|
|
1362
|
-
var
|
|
1363
|
-
return t && (
|
|
1387
|
+
function St(e, t, n, o, s, i, r, a) {
|
|
1388
|
+
var l = typeof e == "function" ? e.options : e;
|
|
1389
|
+
return t && (l.render = t, l.staticRenderFns = n, l._compiled = !0), i && (l._scopeId = "data-v-" + i), {
|
|
1364
1390
|
exports: e,
|
|
1365
|
-
options:
|
|
1391
|
+
options: l
|
|
1366
1392
|
};
|
|
1367
1393
|
}
|
|
1368
|
-
var
|
|
1394
|
+
var An = function() {
|
|
1369
1395
|
var t = this, n = t._self._c;
|
|
1370
1396
|
return t._self._setupProxy, n("div", { staticClass: "search-container" }, [n("div", { ref: "referenceRef", staticClass: "search-input-wrapper", class: { "is-multiple": t.multiple }, on: { click: t.focusInput } }, [n("div", { staticClass: "selection-wrapper" }, [t.multiple && t.selectedItems.length > 0 ? [t._l(t.displayedTags, function(o, s) {
|
|
1371
1397
|
return n("div", { key: o.id || s, staticClass: "search-tag" }, [n("span", { staticClass: "tag-text" }, [t._v(t._s(t.getItemLabel(o)))]), n("span", { staticClass: "tag-close", on: { click: function(i) {
|
|
@@ -1406,15 +1432,15 @@ var hn = function() {
|
|
|
1406
1432
|
}, { searchResults: t.searchResults }), t.isFetchingMore ? n("div", { staticClass: "load-more-msg" }, [t._v(" " + t._s(t.isEn ? "Loading more..." : "正在加载更多...") + " ")]) : t.isFinished && t.query ? n("div", { staticClass: "load-more-msg no-more" }, [t._v(" " + t._s(t.isEn ? "All results have been loaded" : "已加载全部结果") + " ")]) : t._e()] : t.query && !t.loading ? n("div", { staticClass: "status-msg" }, [t._t("noData", function() {
|
|
1407
1433
|
return [t._v(" " + t._s(t.isEn ? `No results found related to "${t.query}".` : `未找到与 "${t.query}" 相关的结果`) + " ")];
|
|
1408
1434
|
})], 2) : t._e()], 2)]);
|
|
1409
|
-
},
|
|
1410
|
-
|
|
1411
|
-
|
|
1412
|
-
|
|
1435
|
+
}, wn = [], xn = /* @__PURE__ */ St(
|
|
1436
|
+
vn,
|
|
1437
|
+
An,
|
|
1438
|
+
wn,
|
|
1413
1439
|
!1,
|
|
1414
1440
|
null,
|
|
1415
|
-
"
|
|
1441
|
+
"74864ae1"
|
|
1416
1442
|
);
|
|
1417
|
-
const
|
|
1443
|
+
const re = xn.exports, bn = {
|
|
1418
1444
|
__name: "ApplyDataDialog",
|
|
1419
1445
|
props: {
|
|
1420
1446
|
// v-model 绑定,默认 false
|
|
@@ -1440,13 +1466,13 @@ const ne = yn.exports, vn = {
|
|
|
1440
1466
|
{ typeCn: "城市", typeEn: "City", type: "City" },
|
|
1441
1467
|
{ typeCn: "海运港口", typeEn: "Port", type: "Seaport" },
|
|
1442
1468
|
{ typeCn: "机场", typeEn: "Airport", type: "Airport" }
|
|
1443
|
-
], s =
|
|
1469
|
+
], s = S(null), i = Ot({
|
|
1444
1470
|
name: "",
|
|
1445
1471
|
country: ""
|
|
1446
|
-
}), r =
|
|
1472
|
+
}), r = Ot({
|
|
1447
1473
|
name: "",
|
|
1448
1474
|
type: "City"
|
|
1449
|
-
}),
|
|
1475
|
+
}), a = X(() => {
|
|
1450
1476
|
if (n.lang && n.lang !== "")
|
|
1451
1477
|
return n.lang === "en" || n.lang === "en-US";
|
|
1452
1478
|
try {
|
|
@@ -1470,7 +1496,7 @@ const ne = yn.exports, vn = {
|
|
|
1470
1496
|
}
|
|
1471
1497
|
return !1;
|
|
1472
1498
|
});
|
|
1473
|
-
return { __sfc: !0, props: n, emit: t, typeOptions: o, displayQuery: s, errors: i, formData: r, isEn:
|
|
1499
|
+
return { __sfc: !0, props: n, emit: t, typeOptions: o, displayQuery: s, errors: i, formData: r, isEn: a, handleClose: () => {
|
|
1474
1500
|
i.name = "", i.country = "", t("update:value", !1);
|
|
1475
1501
|
}, handleConfirm: () => {
|
|
1476
1502
|
i.name = "", i.country = "";
|
|
@@ -1479,10 +1505,10 @@ const ne = yn.exports, vn = {
|
|
|
1479
1505
|
...r,
|
|
1480
1506
|
country: s.value
|
|
1481
1507
|
}), t("confirm", { ...r, country: s.value }));
|
|
1482
|
-
}, Search:
|
|
1508
|
+
}, Search: re };
|
|
1483
1509
|
}
|
|
1484
1510
|
};
|
|
1485
|
-
var
|
|
1511
|
+
var Cn = function() {
|
|
1486
1512
|
var t = this, n = t._self._c, o = t._self._setupProxy;
|
|
1487
1513
|
return t.value ? n("div", { staticClass: "modal-mask", on: { click: function(s) {
|
|
1488
1514
|
return s.target !== s.currentTarget ? null : o.handleClose.apply(null, arguments);
|
|
@@ -1499,25 +1525,25 @@ var An = function() {
|
|
|
1499
1525
|
} }, model: { value: o.displayQuery, callback: function(s) {
|
|
1500
1526
|
o.displayQuery = s;
|
|
1501
1527
|
}, expression: "displayQuery" } })], 1), o.errors.country ? n("div", { staticClass: "error-message" }, [t._v(" " + t._s(o.errors.country) + " ")]) : t._e()])]), n("div", { staticClass: "modal-footer" }, [n("button", { staticClass: "confirm-btn", on: { click: o.handleConfirm } }, [t._v(" " + t._s(o.isEn ? "Submit" : "申请补充") + " ")])])])]) : t._e();
|
|
1502
|
-
},
|
|
1503
|
-
|
|
1504
|
-
|
|
1505
|
-
|
|
1528
|
+
}, Sn = [], Rn = /* @__PURE__ */ St(
|
|
1529
|
+
bn,
|
|
1530
|
+
Cn,
|
|
1531
|
+
Sn,
|
|
1506
1532
|
!1,
|
|
1507
1533
|
null,
|
|
1508
1534
|
"77035ea3"
|
|
1509
1535
|
);
|
|
1510
|
-
const
|
|
1536
|
+
const Dn = Rn.exports, En = {
|
|
1511
1537
|
// 2. 局部注册组件
|
|
1512
1538
|
components: {
|
|
1539
|
+
[Mt.name]: Mt,
|
|
1540
|
+
[Bt.name]: Bt,
|
|
1541
|
+
[Ft.name]: Ft,
|
|
1542
|
+
[Lt.name]: Lt,
|
|
1543
|
+
[It.name]: It,
|
|
1513
1544
|
[Tt.name]: Tt,
|
|
1514
1545
|
[kt.name]: kt,
|
|
1515
|
-
[_t.name]: _t
|
|
1516
|
-
[Ot.name]: Ot,
|
|
1517
|
-
[Et.name]: Et,
|
|
1518
|
-
[Dt.name]: Dt,
|
|
1519
|
-
[Rt.name]: Rt,
|
|
1520
|
-
[St.name]: St
|
|
1546
|
+
[_t.name]: _t
|
|
1521
1547
|
},
|
|
1522
1548
|
data() {
|
|
1523
1549
|
return {
|
|
@@ -1575,7 +1601,7 @@ const bn = xn.exports, Cn = {
|
|
|
1575
1601
|
}
|
|
1576
1602
|
}
|
|
1577
1603
|
};
|
|
1578
|
-
var
|
|
1604
|
+
var On = function() {
|
|
1579
1605
|
var t = this, n = t._self._c;
|
|
1580
1606
|
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) {
|
|
1581
1607
|
t.isVisible = o;
|
|
@@ -1594,16 +1620,16 @@ var Sn = function() {
|
|
|
1594
1620
|
}, 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) {
|
|
1595
1621
|
t.$set(t.formData, "agreement", o);
|
|
1596
1622
|
}, 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)]);
|
|
1597
|
-
},
|
|
1598
|
-
|
|
1599
|
-
|
|
1600
|
-
|
|
1623
|
+
}, _n = [], kn = /* @__PURE__ */ St(
|
|
1624
|
+
En,
|
|
1625
|
+
On,
|
|
1626
|
+
_n,
|
|
1601
1627
|
!1,
|
|
1602
1628
|
null,
|
|
1603
1629
|
null
|
|
1604
1630
|
);
|
|
1605
|
-
const
|
|
1606
|
-
let
|
|
1631
|
+
const Tn = kn.exports;
|
|
1632
|
+
let In = {
|
|
1607
1633
|
open() {
|
|
1608
1634
|
K.emit(Y.Open);
|
|
1609
1635
|
},
|
|
@@ -1614,42 +1640,42 @@ let On = {
|
|
|
1614
1640
|
K.on(Y.Submit, e);
|
|
1615
1641
|
}
|
|
1616
1642
|
};
|
|
1617
|
-
function
|
|
1643
|
+
function Mn() {
|
|
1618
1644
|
let e = !1;
|
|
1619
1645
|
return {
|
|
1620
1646
|
install(t) {
|
|
1621
1647
|
if (typeof window < "u" && !e) {
|
|
1622
1648
|
const n = document.createElement("div");
|
|
1623
1649
|
n.setAttribute("id", "global-modal-root"), document.body.appendChild(n);
|
|
1624
|
-
const o = t.extend(
|
|
1650
|
+
const o = t.extend(Tn);
|
|
1625
1651
|
new o().$mount(n), e = !0;
|
|
1626
1652
|
}
|
|
1627
|
-
t.prototype.$globalModal =
|
|
1653
|
+
t.prototype.$globalModal = In;
|
|
1628
1654
|
}
|
|
1629
1655
|
};
|
|
1630
1656
|
}
|
|
1631
|
-
const
|
|
1632
|
-
ApplyDataDialog:
|
|
1633
|
-
JcSearch:
|
|
1657
|
+
const Jt = {
|
|
1658
|
+
ApplyDataDialog: Dn,
|
|
1659
|
+
JcSearch: re
|
|
1634
1660
|
};
|
|
1635
|
-
let
|
|
1636
|
-
const
|
|
1661
|
+
let Gt = !1;
|
|
1662
|
+
const Pn = {
|
|
1637
1663
|
/**
|
|
1638
1664
|
* Vue 2 插件安装方法
|
|
1639
1665
|
* @param Vue Vue 的构造函数
|
|
1640
1666
|
*/
|
|
1641
1667
|
install(e, t) {
|
|
1642
|
-
|
|
1643
|
-
e.component(n,
|
|
1668
|
+
Gt || (Gt = !0, t?.sharedConfig && fe(t.sharedConfig), Object.keys(Jt).forEach((n) => {
|
|
1669
|
+
e.component(n, Jt[n]);
|
|
1644
1670
|
}));
|
|
1645
1671
|
}
|
|
1646
1672
|
};
|
|
1647
1673
|
export {
|
|
1648
|
-
|
|
1649
|
-
|
|
1650
|
-
|
|
1651
|
-
|
|
1652
|
-
|
|
1653
|
-
|
|
1654
|
-
|
|
1674
|
+
Dn as ApplyDataDialog,
|
|
1675
|
+
Tn as GlobalModal,
|
|
1676
|
+
re as JcSearch,
|
|
1677
|
+
Vn as MODAL_ACTION,
|
|
1678
|
+
Mn as createGlobalModalPlugin,
|
|
1679
|
+
Pn as default,
|
|
1680
|
+
Hn as emitter
|
|
1655
1681
|
};
|