@jctrans-materials/comps-vue3 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 +1 -1
- package/dist/index.css +1 -1
- package/dist/index.esm.js +789 -764
- package/package.json +2 -2
package/dist/index.esm.js
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import { ref as E, computed as M, onMounted as
|
|
2
|
-
import { locationSearchV2 as
|
|
3
|
-
import { MODAL_ACTION as
|
|
4
|
-
import { ElDialog as
|
|
5
|
-
function
|
|
1
|
+
import { ref as E, computed as M, onMounted as je, onBeforeUnmount as Ct, defineComponent as Xe, toRef as Ke, watch as De, createElementBlock as b, openBlock as A, createElementVNode as m, createBlock as Ze, normalizeClass as ae, createCommentVNode as I, withDirectives as Be, Fragment as se, renderList as ge, toDisplayString as _, withModifiers as le, withKeys as Jt, normalizeStyle as Ee, vModelText as et, unref as h, Teleport as St, renderSlot as Qe, createTextVNode as tt, vShow as Wt, reactive as qe, createVNode as L, onUnmounted as Kt, withCtx as N, Transition as dt, nextTick as qt, createApp as Gt } from "vue";
|
|
2
|
+
import { locationSearchV2 as nt, emitter as fe, MODAL_ACTION as pe, initSharedConfig as Yt } from "@jctrans-materials/shared";
|
|
3
|
+
import { MODAL_ACTION as Ul, emitter as Pl, initSharedConfig as Hl } from "@jctrans-materials/shared";
|
|
4
|
+
import { ElDialog as zt, ElForm as jt, ElRow as $e, ElCol as Ce, ElFormItem as ve, ElInput as Se, ElCheckbox as Xt, ElButton as ft } from "element-plus";
|
|
5
|
+
function Zt(e) {
|
|
6
6
|
const t = E([]), n = "_search_history_cache", o = typeof window < "u" && typeof localStorage < "u", l = M(
|
|
7
7
|
() => (e.value || "") + n
|
|
8
8
|
), i = M(
|
|
9
9
|
() => !!e.value && e.value !== ""
|
|
10
10
|
), s = (c) => {
|
|
11
11
|
if (!c || !o) return;
|
|
12
|
-
const
|
|
12
|
+
const r = t.value.filter(
|
|
13
13
|
(f) => f.id && f.id !== c.id || f.display !== c.display
|
|
14
14
|
);
|
|
15
|
-
|
|
16
|
-
const u =
|
|
15
|
+
r.unshift(c);
|
|
16
|
+
const u = r.slice(0, 4);
|
|
17
17
|
if (i.value) {
|
|
18
18
|
t.value = u;
|
|
19
19
|
try {
|
|
@@ -22,10 +22,10 @@ function qt(e) {
|
|
|
22
22
|
console.warn("LocalStorage save failed:", f);
|
|
23
23
|
}
|
|
24
24
|
}
|
|
25
|
-
},
|
|
25
|
+
}, a = () => {
|
|
26
26
|
t.value = [], o && localStorage.removeItem(l.value);
|
|
27
27
|
};
|
|
28
|
-
return
|
|
28
|
+
return je(() => {
|
|
29
29
|
if (o && i.value) {
|
|
30
30
|
const c = localStorage.getItem(l.value);
|
|
31
31
|
if (c)
|
|
@@ -38,30 +38,30 @@ function qt(e) {
|
|
|
38
38
|
}), {
|
|
39
39
|
searchHistory: t,
|
|
40
40
|
saveToHistory: s,
|
|
41
|
-
clearHistory:
|
|
41
|
+
clearHistory: a,
|
|
42
42
|
HasHistory: i
|
|
43
43
|
};
|
|
44
44
|
}
|
|
45
|
-
async function
|
|
45
|
+
async function en(e, t = [
|
|
46
46
|
"Continent",
|
|
47
47
|
"Country",
|
|
48
48
|
"City",
|
|
49
49
|
"Seaport",
|
|
50
50
|
"Airport"
|
|
51
51
|
], n = {}) {
|
|
52
|
-
return
|
|
52
|
+
return nt.searchByName({
|
|
53
53
|
keyword: e,
|
|
54
54
|
displayInfo: t,
|
|
55
55
|
...n
|
|
56
56
|
});
|
|
57
57
|
}
|
|
58
|
-
const
|
|
59
|
-
function
|
|
60
|
-
const n = E([]), o = E(!1), l = E(!1), i = E(1), s = E(0),
|
|
58
|
+
const Je = (e, t) => nt.searchByIdWithType(e, t);
|
|
59
|
+
function tn(e, t) {
|
|
60
|
+
const n = E([]), o = E(!1), l = E(!1), i = E(1), s = E(0), a = E(10), c = M(() => s.value === 0 ? !1 : n.value.length >= s.value), r = M(() => {
|
|
61
61
|
const d = [...t.value];
|
|
62
62
|
return d.includes("Country") && !d.includes("Region") && d.push("Region"), d;
|
|
63
63
|
}), u = (d) => !d || !Array.isArray(d) ? [] : d.filter(
|
|
64
|
-
(p) =>
|
|
64
|
+
(p) => r.value.includes(p.type)
|
|
65
65
|
);
|
|
66
66
|
return {
|
|
67
67
|
searchResults: n,
|
|
@@ -78,13 +78,13 @@ function Yt(e, t) {
|
|
|
78
78
|
if (!(p && (l.value || c.value)) && !(!p && o.value)) {
|
|
79
79
|
p ? l.value = !0 : (o.value = !0, i.value = 1);
|
|
80
80
|
try {
|
|
81
|
-
const v = await
|
|
81
|
+
const v = await en(
|
|
82
82
|
e.value,
|
|
83
83
|
t.value,
|
|
84
84
|
{
|
|
85
85
|
current: d,
|
|
86
86
|
// 使用传入的 page 参数
|
|
87
|
-
size:
|
|
87
|
+
size: a.value
|
|
88
88
|
}
|
|
89
89
|
), w = v.records || [], x = u(w);
|
|
90
90
|
p ? n.value = [...n.value, ...x] : n.value = x, s.value = v.total || 0, i.value = d;
|
|
@@ -98,78 +98,78 @@ function Yt(e, t) {
|
|
|
98
98
|
filterByTypes: u
|
|
99
99
|
};
|
|
100
100
|
}
|
|
101
|
-
const
|
|
101
|
+
const Ae = Math.min, J = Math.max, Le = Math.round, Ve = Math.floor, Z = (e) => ({
|
|
102
102
|
x: e,
|
|
103
103
|
y: e
|
|
104
|
-
}),
|
|
104
|
+
}), nn = {
|
|
105
105
|
left: "right",
|
|
106
106
|
right: "left",
|
|
107
107
|
bottom: "top",
|
|
108
108
|
top: "bottom"
|
|
109
|
-
},
|
|
109
|
+
}, on = {
|
|
110
110
|
start: "end",
|
|
111
111
|
end: "start"
|
|
112
112
|
};
|
|
113
|
-
function
|
|
114
|
-
return
|
|
113
|
+
function pt(e, t, n) {
|
|
114
|
+
return J(e, Ae(t, n));
|
|
115
115
|
}
|
|
116
|
-
function
|
|
116
|
+
function Re(e, t) {
|
|
117
117
|
return typeof e == "function" ? e(t) : e;
|
|
118
118
|
}
|
|
119
|
-
function
|
|
119
|
+
function re(e) {
|
|
120
120
|
return e.split("-")[0];
|
|
121
121
|
}
|
|
122
|
-
function
|
|
122
|
+
function _e(e) {
|
|
123
123
|
return e.split("-")[1];
|
|
124
124
|
}
|
|
125
|
-
function
|
|
125
|
+
function kt(e) {
|
|
126
126
|
return e === "x" ? "y" : "x";
|
|
127
127
|
}
|
|
128
|
-
function
|
|
128
|
+
function Rt(e) {
|
|
129
129
|
return e === "y" ? "height" : "width";
|
|
130
130
|
}
|
|
131
|
-
const
|
|
132
|
-
function
|
|
133
|
-
return
|
|
131
|
+
const ln = /* @__PURE__ */ new Set(["top", "bottom"]);
|
|
132
|
+
function ie(e) {
|
|
133
|
+
return ln.has(re(e)) ? "y" : "x";
|
|
134
134
|
}
|
|
135
|
-
function
|
|
136
|
-
return
|
|
135
|
+
function _t(e) {
|
|
136
|
+
return kt(ie(e));
|
|
137
137
|
}
|
|
138
|
-
function
|
|
138
|
+
function sn(e, t, n) {
|
|
139
139
|
n === void 0 && (n = !1);
|
|
140
|
-
const o =
|
|
140
|
+
const o = _e(e), l = _t(e), i = Rt(l);
|
|
141
141
|
let s = l === "x" ? o === (n ? "end" : "start") ? "right" : "left" : o === "start" ? "bottom" : "top";
|
|
142
|
-
return t.reference[i] > t.floating[i] && (s =
|
|
142
|
+
return t.reference[i] > t.floating[i] && (s = Ne(s)), [s, Ne(s)];
|
|
143
143
|
}
|
|
144
|
-
function
|
|
145
|
-
const t =
|
|
146
|
-
return [
|
|
144
|
+
function an(e) {
|
|
145
|
+
const t = Ne(e);
|
|
146
|
+
return [Ge(e), t, Ge(t)];
|
|
147
147
|
}
|
|
148
|
-
function
|
|
149
|
-
return e.replace(/start|end/g, (t) =>
|
|
148
|
+
function Ge(e) {
|
|
149
|
+
return e.replace(/start|end/g, (t) => on[t]);
|
|
150
150
|
}
|
|
151
|
-
const
|
|
152
|
-
function
|
|
151
|
+
const mt = ["left", "right"], ht = ["right", "left"], rn = ["top", "bottom"], cn = ["bottom", "top"];
|
|
152
|
+
function un(e, t, n) {
|
|
153
153
|
switch (e) {
|
|
154
154
|
case "top":
|
|
155
155
|
case "bottom":
|
|
156
|
-
return n ? t ?
|
|
156
|
+
return n ? t ? ht : mt : t ? mt : ht;
|
|
157
157
|
case "left":
|
|
158
158
|
case "right":
|
|
159
|
-
return t ?
|
|
159
|
+
return t ? rn : cn;
|
|
160
160
|
default:
|
|
161
161
|
return [];
|
|
162
162
|
}
|
|
163
163
|
}
|
|
164
|
-
function
|
|
165
|
-
const l =
|
|
166
|
-
let i =
|
|
167
|
-
return l && (i = i.map((s) => s + "-" + l), t && (i = i.concat(i.map(
|
|
164
|
+
function dn(e, t, n, o) {
|
|
165
|
+
const l = _e(e);
|
|
166
|
+
let i = un(re(e), n === "start", o);
|
|
167
|
+
return l && (i = i.map((s) => s + "-" + l), t && (i = i.concat(i.map(Ge)))), i;
|
|
168
168
|
}
|
|
169
|
-
function
|
|
170
|
-
return e.replace(/left|right|bottom|top/g, (t) =>
|
|
169
|
+
function Ne(e) {
|
|
170
|
+
return e.replace(/left|right|bottom|top/g, (t) => nn[t]);
|
|
171
171
|
}
|
|
172
|
-
function
|
|
172
|
+
function fn(e) {
|
|
173
173
|
return {
|
|
174
174
|
top: 0,
|
|
175
175
|
right: 0,
|
|
@@ -178,15 +178,15 @@ function sn(e) {
|
|
|
178
178
|
...e
|
|
179
179
|
};
|
|
180
180
|
}
|
|
181
|
-
function
|
|
182
|
-
return typeof e != "number" ?
|
|
181
|
+
function pn(e) {
|
|
182
|
+
return typeof e != "number" ? fn(e) : {
|
|
183
183
|
top: e,
|
|
184
184
|
right: e,
|
|
185
185
|
bottom: e,
|
|
186
186
|
left: e
|
|
187
187
|
};
|
|
188
188
|
}
|
|
189
|
-
function
|
|
189
|
+
function Ie(e) {
|
|
190
190
|
const {
|
|
191
191
|
x: t,
|
|
192
192
|
y: n,
|
|
@@ -204,12 +204,12 @@ function Be(e) {
|
|
|
204
204
|
y: n
|
|
205
205
|
};
|
|
206
206
|
}
|
|
207
|
-
function
|
|
207
|
+
function vt(e, t, n) {
|
|
208
208
|
let {
|
|
209
209
|
reference: o,
|
|
210
210
|
floating: l
|
|
211
211
|
} = e;
|
|
212
|
-
const i =
|
|
212
|
+
const i = ie(t), s = _t(t), a = Rt(s), c = re(t), r = i === "y", u = o.x + o.width / 2 - l.width / 2, f = o.y + o.height / 2 - l.height / 2, d = o[a] / 2 - l[a] / 2;
|
|
213
213
|
let p;
|
|
214
214
|
switch (c) {
|
|
215
215
|
case "top":
|
|
@@ -242,68 +242,68 @@ function dt(e, t, n) {
|
|
|
242
242
|
y: o.y
|
|
243
243
|
};
|
|
244
244
|
}
|
|
245
|
-
switch (
|
|
245
|
+
switch (_e(t)) {
|
|
246
246
|
case "start":
|
|
247
|
-
p[s] -= d * (n &&
|
|
247
|
+
p[s] -= d * (n && r ? -1 : 1);
|
|
248
248
|
break;
|
|
249
249
|
case "end":
|
|
250
|
-
p[s] += d * (n &&
|
|
250
|
+
p[s] += d * (n && r ? -1 : 1);
|
|
251
251
|
break;
|
|
252
252
|
}
|
|
253
253
|
return p;
|
|
254
254
|
}
|
|
255
|
-
const
|
|
255
|
+
const mn = async (e, t, n) => {
|
|
256
256
|
const {
|
|
257
257
|
placement: o = "bottom",
|
|
258
258
|
strategy: l = "absolute",
|
|
259
259
|
middleware: i = [],
|
|
260
260
|
platform: s
|
|
261
|
-
} = n,
|
|
262
|
-
let
|
|
261
|
+
} = n, a = i.filter(Boolean), c = await (s.isRTL == null ? void 0 : s.isRTL(t));
|
|
262
|
+
let r = await s.getElementRects({
|
|
263
263
|
reference: e,
|
|
264
264
|
floating: t,
|
|
265
265
|
strategy: l
|
|
266
266
|
}), {
|
|
267
267
|
x: u,
|
|
268
268
|
y: f
|
|
269
|
-
} =
|
|
270
|
-
for (let w = 0; w <
|
|
269
|
+
} = vt(r, o, c), d = o, p = {}, v = 0;
|
|
270
|
+
for (let w = 0; w < a.length; w++) {
|
|
271
271
|
const {
|
|
272
272
|
name: x,
|
|
273
|
-
fn:
|
|
274
|
-
} =
|
|
275
|
-
x:
|
|
273
|
+
fn: y
|
|
274
|
+
} = a[w], {
|
|
275
|
+
x: C,
|
|
276
276
|
y: R,
|
|
277
277
|
data: V,
|
|
278
278
|
reset: D
|
|
279
|
-
} = await
|
|
279
|
+
} = await y({
|
|
280
280
|
x: u,
|
|
281
281
|
y: f,
|
|
282
282
|
initialPlacement: o,
|
|
283
283
|
placement: d,
|
|
284
284
|
strategy: l,
|
|
285
285
|
middlewareData: p,
|
|
286
|
-
rects:
|
|
286
|
+
rects: r,
|
|
287
287
|
platform: s,
|
|
288
288
|
elements: {
|
|
289
289
|
reference: e,
|
|
290
290
|
floating: t
|
|
291
291
|
}
|
|
292
292
|
});
|
|
293
|
-
u =
|
|
293
|
+
u = C ?? u, f = R ?? f, p = {
|
|
294
294
|
...p,
|
|
295
295
|
[x]: {
|
|
296
296
|
...p[x],
|
|
297
297
|
...V
|
|
298
298
|
}
|
|
299
|
-
}, D && v <= 50 && (v++, typeof D == "object" && (D.placement && (d = D.placement), D.rects && (
|
|
299
|
+
}, D && v <= 50 && (v++, typeof D == "object" && (D.placement && (d = D.placement), D.rects && (r = D.rects === !0 ? await s.getElementRects({
|
|
300
300
|
reference: e,
|
|
301
301
|
floating: t,
|
|
302
302
|
strategy: l
|
|
303
303
|
}) : D.rects), {
|
|
304
304
|
x: u,
|
|
305
305
|
y: f
|
|
306
|
-
} =
|
|
306
|
+
} = vt(r, d, c)), w = -1);
|
|
307
307
|
}
|
|
308
308
|
return {
|
|
309
309
|
x: u,
|
|
@@ -313,7 +313,7 @@ const rn = async (e, t, n) => {
|
|
|
313
313
|
middlewareData: p
|
|
314
314
|
};
|
|
315
315
|
};
|
|
316
|
-
async function
|
|
316
|
+
async function ot(e, t) {
|
|
317
317
|
var n;
|
|
318
318
|
t === void 0 && (t = {});
|
|
319
319
|
const {
|
|
@@ -321,44 +321,44 @@ async function Xe(e, t) {
|
|
|
321
321
|
y: l,
|
|
322
322
|
platform: i,
|
|
323
323
|
rects: s,
|
|
324
|
-
elements:
|
|
324
|
+
elements: a,
|
|
325
325
|
strategy: c
|
|
326
326
|
} = e, {
|
|
327
|
-
boundary:
|
|
327
|
+
boundary: r = "clippingAncestors",
|
|
328
328
|
rootBoundary: u = "viewport",
|
|
329
329
|
elementContext: f = "floating",
|
|
330
330
|
altBoundary: d = !1,
|
|
331
331
|
padding: p = 0
|
|
332
|
-
} =
|
|
333
|
-
element: (n = await (i.isElement == null ? void 0 : i.isElement(x))) == null || n ? x : x.contextElement || await (i.getDocumentElement == null ? void 0 : i.getDocumentElement(
|
|
334
|
-
boundary:
|
|
332
|
+
} = Re(t, e), v = pn(p), x = a[d ? f === "floating" ? "reference" : "floating" : f], y = Ie(await i.getClippingRect({
|
|
333
|
+
element: (n = await (i.isElement == null ? void 0 : i.isElement(x))) == null || n ? x : x.contextElement || await (i.getDocumentElement == null ? void 0 : i.getDocumentElement(a.floating)),
|
|
334
|
+
boundary: r,
|
|
335
335
|
rootBoundary: u,
|
|
336
336
|
strategy: c
|
|
337
|
-
})),
|
|
337
|
+
})), C = f === "floating" ? {
|
|
338
338
|
x: o,
|
|
339
339
|
y: l,
|
|
340
340
|
width: s.floating.width,
|
|
341
341
|
height: s.floating.height
|
|
342
|
-
} : s.reference, R = await (i.getOffsetParent == null ? void 0 : i.getOffsetParent(
|
|
342
|
+
} : s.reference, R = await (i.getOffsetParent == null ? void 0 : i.getOffsetParent(a.floating)), V = await (i.isElement == null ? void 0 : i.isElement(R)) ? await (i.getScale == null ? void 0 : i.getScale(R)) || {
|
|
343
343
|
x: 1,
|
|
344
344
|
y: 1
|
|
345
345
|
} : {
|
|
346
346
|
x: 1,
|
|
347
347
|
y: 1
|
|
348
|
-
}, D =
|
|
349
|
-
elements:
|
|
350
|
-
rect:
|
|
348
|
+
}, D = Ie(i.convertOffsetParentRelativeRectToViewportRelativeRect ? await i.convertOffsetParentRelativeRectToViewportRelativeRect({
|
|
349
|
+
elements: a,
|
|
350
|
+
rect: C,
|
|
351
351
|
offsetParent: R,
|
|
352
352
|
strategy: c
|
|
353
|
-
}) :
|
|
353
|
+
}) : C);
|
|
354
354
|
return {
|
|
355
|
-
top: (
|
|
356
|
-
bottom: (D.bottom -
|
|
357
|
-
left: (
|
|
358
|
-
right: (D.right -
|
|
355
|
+
top: (y.top - D.top + v.top) / V.y,
|
|
356
|
+
bottom: (D.bottom - y.bottom + v.bottom) / V.y,
|
|
357
|
+
left: (y.left - D.left + v.left) / V.x,
|
|
358
|
+
right: (D.right - y.right + v.right) / V.x
|
|
359
359
|
};
|
|
360
360
|
}
|
|
361
|
-
const
|
|
361
|
+
const hn = function(e) {
|
|
362
362
|
return e === void 0 && (e = {}), {
|
|
363
363
|
name: "flip",
|
|
364
364
|
options: e,
|
|
@@ -368,9 +368,9 @@ const cn = function(e) {
|
|
|
368
368
|
placement: l,
|
|
369
369
|
middlewareData: i,
|
|
370
370
|
rects: s,
|
|
371
|
-
initialPlacement:
|
|
371
|
+
initialPlacement: a,
|
|
372
372
|
platform: c,
|
|
373
|
-
elements:
|
|
373
|
+
elements: r
|
|
374
374
|
} = t, {
|
|
375
375
|
mainAxis: u = !0,
|
|
376
376
|
crossAxis: f = !0,
|
|
@@ -379,73 +379,73 @@ const cn = function(e) {
|
|
|
379
379
|
fallbackAxisSideDirection: v = "none",
|
|
380
380
|
flipAlignment: w = !0,
|
|
381
381
|
...x
|
|
382
|
-
} =
|
|
382
|
+
} = Re(e, t);
|
|
383
383
|
if ((n = i.arrow) != null && n.alignmentOffset)
|
|
384
384
|
return {};
|
|
385
|
-
const
|
|
386
|
-
!d &&
|
|
387
|
-
const U = [
|
|
385
|
+
const y = re(l), C = ie(a), R = re(a) === a, V = await (c.isRTL == null ? void 0 : c.isRTL(r.floating)), D = d || (R || !w ? [Ne(a)] : an(a)), K = v !== "none";
|
|
386
|
+
!d && K && D.push(...dn(a, w, v, V));
|
|
387
|
+
const U = [a, ...D], Q = await ot(t, x), q = [];
|
|
388
388
|
let P = ((o = i.flip) == null ? void 0 : o.overflows) || [];
|
|
389
|
-
if (u &&
|
|
390
|
-
const
|
|
391
|
-
|
|
389
|
+
if (u && q.push(Q[y]), f) {
|
|
390
|
+
const G = sn(l, s, V);
|
|
391
|
+
q.push(Q[G[0]], Q[G[1]]);
|
|
392
392
|
}
|
|
393
393
|
if (P = [...P, {
|
|
394
394
|
placement: l,
|
|
395
|
-
overflows:
|
|
396
|
-
}], !
|
|
397
|
-
var
|
|
398
|
-
const
|
|
399
|
-
if (
|
|
395
|
+
overflows: q
|
|
396
|
+
}], !q.every((G) => G <= 0)) {
|
|
397
|
+
var ne, j;
|
|
398
|
+
const G = (((ne = i.flip) == null ? void 0 : ne.index) || 0) + 1, ue = U[G];
|
|
399
|
+
if (ue && (!(f === "alignment" ? C !== ie(ue) : !1) || // We leave the current main axis only if every placement on that axis
|
|
400
400
|
// overflows the main axis.
|
|
401
|
-
P.every((T) =>
|
|
401
|
+
P.every((T) => ie(T.placement) === C ? T.overflows[0] > 0 : !0)))
|
|
402
402
|
return {
|
|
403
403
|
data: {
|
|
404
|
-
index:
|
|
404
|
+
index: G,
|
|
405
405
|
overflows: P
|
|
406
406
|
},
|
|
407
407
|
reset: {
|
|
408
|
-
placement:
|
|
408
|
+
placement: ue
|
|
409
409
|
}
|
|
410
410
|
};
|
|
411
|
-
let
|
|
412
|
-
if (!
|
|
411
|
+
let S = (j = P.filter((O) => O.overflows[0] <= 0).sort((O, T) => O.overflows[1] - T.overflows[1])[0]) == null ? void 0 : j.placement;
|
|
412
|
+
if (!S)
|
|
413
413
|
switch (p) {
|
|
414
414
|
case "bestFit": {
|
|
415
415
|
var F;
|
|
416
416
|
const O = (F = P.filter((T) => {
|
|
417
|
-
if (
|
|
418
|
-
const H =
|
|
419
|
-
return H ===
|
|
417
|
+
if (K) {
|
|
418
|
+
const H = ie(T.placement);
|
|
419
|
+
return H === C || // Create a bias to the `y` side axis due to horizontal
|
|
420
420
|
// reading directions favoring greater width.
|
|
421
421
|
H === "y";
|
|
422
422
|
}
|
|
423
423
|
return !0;
|
|
424
|
-
}).map((T) => [T.placement, T.overflows.filter((H) => H > 0).reduce((H,
|
|
425
|
-
O && (
|
|
424
|
+
}).map((T) => [T.placement, T.overflows.filter((H) => H > 0).reduce((H, be) => H + be, 0)]).sort((T, H) => T[1] - H[1])[0]) == null ? void 0 : F[0];
|
|
425
|
+
O && (S = O);
|
|
426
426
|
break;
|
|
427
427
|
}
|
|
428
428
|
case "initialPlacement":
|
|
429
|
-
|
|
429
|
+
S = a;
|
|
430
430
|
break;
|
|
431
431
|
}
|
|
432
|
-
if (l !==
|
|
432
|
+
if (l !== S)
|
|
433
433
|
return {
|
|
434
434
|
reset: {
|
|
435
|
-
placement:
|
|
435
|
+
placement: S
|
|
436
436
|
}
|
|
437
437
|
};
|
|
438
438
|
}
|
|
439
439
|
return {};
|
|
440
440
|
}
|
|
441
441
|
};
|
|
442
|
-
},
|
|
443
|
-
async function
|
|
442
|
+
}, vn = /* @__PURE__ */ new Set(["left", "top"]);
|
|
443
|
+
async function gn(e, t) {
|
|
444
444
|
const {
|
|
445
445
|
placement: n,
|
|
446
446
|
platform: o,
|
|
447
447
|
elements: l
|
|
448
|
-
} = e, i = await (o.isRTL == null ? void 0 : o.isRTL(l.floating)), s =
|
|
448
|
+
} = e, i = await (o.isRTL == null ? void 0 : o.isRTL(l.floating)), s = re(n), a = _e(n), c = ie(n) === "y", r = vn.has(s) ? -1 : 1, u = i && c ? -1 : 1, f = Re(t, e);
|
|
449
449
|
let {
|
|
450
450
|
mainAxis: d,
|
|
451
451
|
crossAxis: p,
|
|
@@ -459,15 +459,15 @@ async function dn(e, t) {
|
|
|
459
459
|
crossAxis: f.crossAxis || 0,
|
|
460
460
|
alignmentAxis: f.alignmentAxis
|
|
461
461
|
};
|
|
462
|
-
return
|
|
462
|
+
return a && typeof v == "number" && (p = a === "end" ? v * -1 : v), c ? {
|
|
463
463
|
x: p * u,
|
|
464
|
-
y: d *
|
|
464
|
+
y: d * r
|
|
465
465
|
} : {
|
|
466
|
-
x: d *
|
|
466
|
+
x: d * r,
|
|
467
467
|
y: p * u
|
|
468
468
|
};
|
|
469
469
|
}
|
|
470
|
-
const
|
|
470
|
+
const yn = function(e) {
|
|
471
471
|
return e === void 0 && (e = 0), {
|
|
472
472
|
name: "offset",
|
|
473
473
|
options: e,
|
|
@@ -477,9 +477,9 @@ const fn = function(e) {
|
|
|
477
477
|
x: l,
|
|
478
478
|
y: i,
|
|
479
479
|
placement: s,
|
|
480
|
-
middlewareData:
|
|
481
|
-
} = t, c = await
|
|
482
|
-
return s === ((n =
|
|
480
|
+
middlewareData: a
|
|
481
|
+
} = t, c = await gn(t, e);
|
|
482
|
+
return s === ((n = a.offset) == null ? void 0 : n.placement) && (o = a.arrow) != null && o.alignmentOffset ? {} : {
|
|
483
483
|
x: l + c.x,
|
|
484
484
|
y: i + c.y,
|
|
485
485
|
data: {
|
|
@@ -489,7 +489,7 @@ const fn = function(e) {
|
|
|
489
489
|
};
|
|
490
490
|
}
|
|
491
491
|
};
|
|
492
|
-
},
|
|
492
|
+
}, An = function(e) {
|
|
493
493
|
return e === void 0 && (e = {}), {
|
|
494
494
|
name: "shift",
|
|
495
495
|
options: e,
|
|
@@ -501,33 +501,33 @@ const fn = function(e) {
|
|
|
501
501
|
} = t, {
|
|
502
502
|
mainAxis: i = !0,
|
|
503
503
|
crossAxis: s = !1,
|
|
504
|
-
limiter:
|
|
504
|
+
limiter: a = {
|
|
505
505
|
fn: (x) => {
|
|
506
506
|
let {
|
|
507
|
-
x:
|
|
508
|
-
y:
|
|
507
|
+
x: y,
|
|
508
|
+
y: C
|
|
509
509
|
} = x;
|
|
510
510
|
return {
|
|
511
|
-
x:
|
|
512
|
-
y:
|
|
511
|
+
x: y,
|
|
512
|
+
y: C
|
|
513
513
|
};
|
|
514
514
|
}
|
|
515
515
|
},
|
|
516
516
|
...c
|
|
517
|
-
} =
|
|
517
|
+
} = Re(e, t), r = {
|
|
518
518
|
x: n,
|
|
519
519
|
y: o
|
|
520
|
-
}, u = await
|
|
521
|
-
let p =
|
|
520
|
+
}, u = await ot(t, c), f = ie(re(l)), d = kt(f);
|
|
521
|
+
let p = r[d], v = r[f];
|
|
522
522
|
if (i) {
|
|
523
|
-
const x = d === "y" ? "top" : "left",
|
|
524
|
-
p =
|
|
523
|
+
const x = d === "y" ? "top" : "left", y = d === "y" ? "bottom" : "right", C = p + u[x], R = p - u[y];
|
|
524
|
+
p = pt(C, p, R);
|
|
525
525
|
}
|
|
526
526
|
if (s) {
|
|
527
|
-
const x = f === "y" ? "top" : "left",
|
|
528
|
-
v =
|
|
527
|
+
const x = f === "y" ? "top" : "left", y = f === "y" ? "bottom" : "right", C = v + u[x], R = v - u[y];
|
|
528
|
+
v = pt(C, v, R);
|
|
529
529
|
}
|
|
530
|
-
const w =
|
|
530
|
+
const w = a.fn({
|
|
531
531
|
...t,
|
|
532
532
|
[d]: p,
|
|
533
533
|
[f]: v
|
|
@@ -545,7 +545,7 @@ const fn = function(e) {
|
|
|
545
545
|
};
|
|
546
546
|
}
|
|
547
547
|
};
|
|
548
|
-
},
|
|
548
|
+
}, wn = function(e) {
|
|
549
549
|
return e === void 0 && (e = {}), {
|
|
550
550
|
name: "size",
|
|
551
551
|
options: e,
|
|
@@ -555,30 +555,30 @@ const fn = function(e) {
|
|
|
555
555
|
placement: l,
|
|
556
556
|
rects: i,
|
|
557
557
|
platform: s,
|
|
558
|
-
elements:
|
|
558
|
+
elements: a
|
|
559
559
|
} = t, {
|
|
560
560
|
apply: c = () => {
|
|
561
561
|
},
|
|
562
|
-
...
|
|
563
|
-
} =
|
|
562
|
+
...r
|
|
563
|
+
} = Re(e, t), u = await ot(t, r), f = re(l), d = _e(l), p = ie(l) === "y", {
|
|
564
564
|
width: v,
|
|
565
565
|
height: w
|
|
566
566
|
} = i.floating;
|
|
567
|
-
let x,
|
|
568
|
-
f === "top" || f === "bottom" ? (x = f,
|
|
569
|
-
const
|
|
567
|
+
let x, y;
|
|
568
|
+
f === "top" || f === "bottom" ? (x = f, y = d === (await (s.isRTL == null ? void 0 : s.isRTL(a.floating)) ? "start" : "end") ? "left" : "right") : (y = f, x = d === "end" ? "top" : "bottom");
|
|
569
|
+
const C = w - u.top - u.bottom, R = v - u.left - u.right, V = Ae(w - u[x], C), D = Ae(v - u[y], R), K = !t.middlewareData.shift;
|
|
570
570
|
let U = V, Q = D;
|
|
571
|
-
if ((n = t.middlewareData.shift) != null && n.enabled.x && (Q = R), (o = t.middlewareData.shift) != null && o.enabled.y && (U =
|
|
572
|
-
const P =
|
|
573
|
-
p ? Q = v - 2 * (P !== 0 ||
|
|
571
|
+
if ((n = t.middlewareData.shift) != null && n.enabled.x && (Q = R), (o = t.middlewareData.shift) != null && o.enabled.y && (U = C), K && !d) {
|
|
572
|
+
const P = J(u.left, 0), ne = J(u.right, 0), j = J(u.top, 0), F = J(u.bottom, 0);
|
|
573
|
+
p ? Q = v - 2 * (P !== 0 || ne !== 0 ? P + ne : J(u.left, u.right)) : U = w - 2 * (j !== 0 || F !== 0 ? j + F : J(u.top, u.bottom));
|
|
574
574
|
}
|
|
575
575
|
await c({
|
|
576
576
|
...t,
|
|
577
577
|
availableWidth: Q,
|
|
578
578
|
availableHeight: U
|
|
579
579
|
});
|
|
580
|
-
const
|
|
581
|
-
return v !==
|
|
580
|
+
const q = await s.getDimensions(a.floating);
|
|
581
|
+
return v !== q.width || w !== q.height ? {
|
|
582
582
|
reset: {
|
|
583
583
|
rects: !0
|
|
584
584
|
}
|
|
@@ -586,49 +586,49 @@ const fn = function(e) {
|
|
|
586
586
|
}
|
|
587
587
|
};
|
|
588
588
|
};
|
|
589
|
-
function
|
|
589
|
+
function Fe() {
|
|
590
590
|
return typeof window < "u";
|
|
591
591
|
}
|
|
592
|
-
function
|
|
593
|
-
return
|
|
592
|
+
function xe(e) {
|
|
593
|
+
return Ot(e) ? (e.nodeName || "").toLowerCase() : "#document";
|
|
594
594
|
}
|
|
595
|
-
function
|
|
595
|
+
function W(e) {
|
|
596
596
|
var t;
|
|
597
597
|
return (e == null || (t = e.ownerDocument) == null ? void 0 : t.defaultView) || window;
|
|
598
598
|
}
|
|
599
|
-
function
|
|
599
|
+
function te(e) {
|
|
600
600
|
var t;
|
|
601
|
-
return (t = (
|
|
601
|
+
return (t = (Ot(e) ? e.ownerDocument : e.document) || window.document) == null ? void 0 : t.documentElement;
|
|
602
602
|
}
|
|
603
|
-
function
|
|
604
|
-
return
|
|
603
|
+
function Ot(e) {
|
|
604
|
+
return Fe() ? e instanceof Node || e instanceof W(e).Node : !1;
|
|
605
605
|
}
|
|
606
|
-
function
|
|
607
|
-
return
|
|
606
|
+
function Y(e) {
|
|
607
|
+
return Fe() ? e instanceof Element || e instanceof W(e).Element : !1;
|
|
608
608
|
}
|
|
609
|
-
function
|
|
610
|
-
return
|
|
609
|
+
function ee(e) {
|
|
610
|
+
return Fe() ? e instanceof HTMLElement || e instanceof W(e).HTMLElement : !1;
|
|
611
611
|
}
|
|
612
|
-
function
|
|
613
|
-
return !
|
|
612
|
+
function gt(e) {
|
|
613
|
+
return !Fe() || typeof ShadowRoot > "u" ? !1 : e instanceof ShadowRoot || e instanceof W(e).ShadowRoot;
|
|
614
614
|
}
|
|
615
|
-
const
|
|
616
|
-
function
|
|
615
|
+
const xn = /* @__PURE__ */ new Set(["inline", "contents"]);
|
|
616
|
+
function Oe(e) {
|
|
617
617
|
const {
|
|
618
618
|
overflow: t,
|
|
619
619
|
overflowX: n,
|
|
620
620
|
overflowY: o,
|
|
621
621
|
display: l
|
|
622
|
-
} =
|
|
623
|
-
return /auto|scroll|overlay|hidden|clip/.test(t + o + n) && !
|
|
622
|
+
} = z(e);
|
|
623
|
+
return /auto|scroll|overlay|hidden|clip/.test(t + o + n) && !xn.has(l);
|
|
624
624
|
}
|
|
625
|
-
const
|
|
626
|
-
function
|
|
627
|
-
return
|
|
625
|
+
const bn = /* @__PURE__ */ new Set(["table", "td", "th"]);
|
|
626
|
+
function Cn(e) {
|
|
627
|
+
return bn.has(xe(e));
|
|
628
628
|
}
|
|
629
|
-
const
|
|
630
|
-
function
|
|
631
|
-
return
|
|
629
|
+
const Sn = [":popover-open", ":modal"];
|
|
630
|
+
function Me(e) {
|
|
631
|
+
return Sn.some((t) => {
|
|
632
632
|
try {
|
|
633
633
|
return e.matches(t);
|
|
634
634
|
} catch {
|
|
@@ -636,34 +636,34 @@ function Ne(e) {
|
|
|
636
636
|
}
|
|
637
637
|
});
|
|
638
638
|
}
|
|
639
|
-
const
|
|
640
|
-
function
|
|
641
|
-
const t =
|
|
642
|
-
return
|
|
639
|
+
const kn = ["transform", "translate", "scale", "rotate", "perspective"], Rn = ["transform", "translate", "scale", "rotate", "perspective", "filter"], _n = ["paint", "layout", "strict", "content"];
|
|
640
|
+
function lt(e) {
|
|
641
|
+
const t = st(), n = Y(e) ? z(e) : e;
|
|
642
|
+
return kn.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) || Rn.some((o) => (n.willChange || "").includes(o)) || _n.some((o) => (n.contain || "").includes(o));
|
|
643
643
|
}
|
|
644
|
-
function
|
|
645
|
-
let t =
|
|
646
|
-
for (;
|
|
647
|
-
if (
|
|
644
|
+
function On(e) {
|
|
645
|
+
let t = ce(e);
|
|
646
|
+
for (; ee(t) && !we(t); ) {
|
|
647
|
+
if (lt(t))
|
|
648
648
|
return t;
|
|
649
|
-
if (
|
|
649
|
+
if (Me(t))
|
|
650
650
|
return null;
|
|
651
|
-
t =
|
|
651
|
+
t = ce(t);
|
|
652
652
|
}
|
|
653
653
|
return null;
|
|
654
654
|
}
|
|
655
|
-
function
|
|
655
|
+
function st() {
|
|
656
656
|
return typeof CSS > "u" || !CSS.supports ? !1 : CSS.supports("-webkit-backdrop-filter", "none");
|
|
657
657
|
}
|
|
658
|
-
const
|
|
659
|
-
function
|
|
660
|
-
return
|
|
658
|
+
const Tn = /* @__PURE__ */ new Set(["html", "body", "#document"]);
|
|
659
|
+
function we(e) {
|
|
660
|
+
return Tn.has(xe(e));
|
|
661
661
|
}
|
|
662
|
-
function
|
|
663
|
-
return
|
|
662
|
+
function z(e) {
|
|
663
|
+
return W(e).getComputedStyle(e);
|
|
664
664
|
}
|
|
665
|
-
function
|
|
666
|
-
return
|
|
665
|
+
function Ue(e) {
|
|
666
|
+
return Y(e) ? {
|
|
667
667
|
scrollLeft: e.scrollLeft,
|
|
668
668
|
scrollTop: e.scrollTop
|
|
669
669
|
} : {
|
|
@@ -671,189 +671,189 @@ function Ie(e) {
|
|
|
671
671
|
scrollTop: e.scrollY
|
|
672
672
|
};
|
|
673
673
|
}
|
|
674
|
-
function
|
|
675
|
-
if (
|
|
674
|
+
function ce(e) {
|
|
675
|
+
if (xe(e) === "html")
|
|
676
676
|
return e;
|
|
677
677
|
const t = (
|
|
678
678
|
// Step into the shadow DOM of the parent of a slotted node.
|
|
679
679
|
e.assignedSlot || // DOM Element detected.
|
|
680
680
|
e.parentNode || // ShadowRoot detected.
|
|
681
|
-
|
|
682
|
-
|
|
681
|
+
gt(e) && e.host || // Fallback.
|
|
682
|
+
te(e)
|
|
683
683
|
);
|
|
684
|
-
return
|
|
684
|
+
return gt(t) ? t.host : t;
|
|
685
685
|
}
|
|
686
|
-
function
|
|
687
|
-
const t =
|
|
688
|
-
return
|
|
686
|
+
function Tt(e) {
|
|
687
|
+
const t = ce(e);
|
|
688
|
+
return we(t) ? e.ownerDocument ? e.ownerDocument.body : e.body : ee(t) && Oe(t) ? t : Tt(t);
|
|
689
689
|
}
|
|
690
|
-
function
|
|
690
|
+
function ke(e, t, n) {
|
|
691
691
|
var o;
|
|
692
692
|
t === void 0 && (t = []), n === void 0 && (n = !0);
|
|
693
|
-
const l =
|
|
693
|
+
const l = Tt(e), i = l === ((o = e.ownerDocument) == null ? void 0 : o.body), s = W(l);
|
|
694
694
|
if (i) {
|
|
695
|
-
const
|
|
696
|
-
return t.concat(s, s.visualViewport || [],
|
|
695
|
+
const a = Ye(s);
|
|
696
|
+
return t.concat(s, s.visualViewport || [], Oe(l) ? l : [], a && n ? ke(a) : []);
|
|
697
697
|
}
|
|
698
|
-
return t.concat(l,
|
|
698
|
+
return t.concat(l, ke(l, [], n));
|
|
699
699
|
}
|
|
700
|
-
function
|
|
700
|
+
function Ye(e) {
|
|
701
701
|
return e.parent && Object.getPrototypeOf(e.parent) ? e.frameElement : null;
|
|
702
702
|
}
|
|
703
|
-
function
|
|
704
|
-
const t =
|
|
703
|
+
function Et(e) {
|
|
704
|
+
const t = z(e);
|
|
705
705
|
let n = parseFloat(t.width) || 0, o = parseFloat(t.height) || 0;
|
|
706
|
-
const l =
|
|
707
|
-
return
|
|
706
|
+
const l = ee(e), i = l ? e.offsetWidth : n, s = l ? e.offsetHeight : o, a = Le(n) !== i || Le(o) !== s;
|
|
707
|
+
return a && (n = i, o = s), {
|
|
708
708
|
width: n,
|
|
709
709
|
height: o,
|
|
710
|
-
$:
|
|
710
|
+
$: a
|
|
711
711
|
};
|
|
712
712
|
}
|
|
713
|
-
function
|
|
714
|
-
return
|
|
713
|
+
function it(e) {
|
|
714
|
+
return Y(e) ? e : e.contextElement;
|
|
715
715
|
}
|
|
716
|
-
function
|
|
717
|
-
const t =
|
|
718
|
-
if (!
|
|
719
|
-
return
|
|
716
|
+
function ye(e) {
|
|
717
|
+
const t = it(e);
|
|
718
|
+
if (!ee(t))
|
|
719
|
+
return Z(1);
|
|
720
720
|
const n = t.getBoundingClientRect(), {
|
|
721
721
|
width: o,
|
|
722
722
|
height: l,
|
|
723
723
|
$: i
|
|
724
|
-
} =
|
|
725
|
-
let s = (i ?
|
|
726
|
-
return (!s || !Number.isFinite(s)) && (s = 1), (!
|
|
724
|
+
} = Et(t);
|
|
725
|
+
let s = (i ? Le(n.width) : n.width) / o, a = (i ? Le(n.height) : n.height) / l;
|
|
726
|
+
return (!s || !Number.isFinite(s)) && (s = 1), (!a || !Number.isFinite(a)) && (a = 1), {
|
|
727
727
|
x: s,
|
|
728
|
-
y:
|
|
728
|
+
y: a
|
|
729
729
|
};
|
|
730
730
|
}
|
|
731
|
-
const
|
|
732
|
-
function
|
|
733
|
-
const t =
|
|
734
|
-
return !
|
|
731
|
+
const En = /* @__PURE__ */ Z(0);
|
|
732
|
+
function Vt(e) {
|
|
733
|
+
const t = W(e);
|
|
734
|
+
return !st() || !t.visualViewport ? En : {
|
|
735
735
|
x: t.visualViewport.offsetLeft,
|
|
736
736
|
y: t.visualViewport.offsetTop
|
|
737
737
|
};
|
|
738
738
|
}
|
|
739
|
-
function
|
|
740
|
-
return t === void 0 && (t = !1), !n || t && n !==
|
|
739
|
+
function Vn(e, t, n) {
|
|
740
|
+
return t === void 0 && (t = !1), !n || t && n !== W(e) ? !1 : t;
|
|
741
741
|
}
|
|
742
|
-
function
|
|
742
|
+
function me(e, t, n, o) {
|
|
743
743
|
t === void 0 && (t = !1), n === void 0 && (n = !1);
|
|
744
|
-
const l = e.getBoundingClientRect(), i =
|
|
745
|
-
let s =
|
|
746
|
-
t && (o ?
|
|
747
|
-
const
|
|
748
|
-
let c = (l.left +
|
|
744
|
+
const l = e.getBoundingClientRect(), i = it(e);
|
|
745
|
+
let s = Z(1);
|
|
746
|
+
t && (o ? Y(o) && (s = ye(o)) : s = ye(e));
|
|
747
|
+
const a = Vn(i, n, o) ? Vt(i) : Z(0);
|
|
748
|
+
let c = (l.left + a.x) / s.x, r = (l.top + a.y) / s.y, u = l.width / s.x, f = l.height / s.y;
|
|
749
749
|
if (i) {
|
|
750
|
-
const d =
|
|
751
|
-
let v = d, w =
|
|
750
|
+
const d = W(i), p = o && Y(o) ? W(o) : o;
|
|
751
|
+
let v = d, w = Ye(v);
|
|
752
752
|
for (; w && o && p !== v; ) {
|
|
753
|
-
const x =
|
|
754
|
-
c *= x.x,
|
|
753
|
+
const x = ye(w), y = w.getBoundingClientRect(), C = z(w), R = y.left + (w.clientLeft + parseFloat(C.paddingLeft)) * x.x, V = y.top + (w.clientTop + parseFloat(C.paddingTop)) * x.y;
|
|
754
|
+
c *= x.x, r *= x.y, u *= x.x, f *= x.y, c += R, r += V, v = W(w), w = Ye(v);
|
|
755
755
|
}
|
|
756
756
|
}
|
|
757
|
-
return
|
|
757
|
+
return Ie({
|
|
758
758
|
width: u,
|
|
759
759
|
height: f,
|
|
760
760
|
x: c,
|
|
761
|
-
y:
|
|
761
|
+
y: r
|
|
762
762
|
});
|
|
763
763
|
}
|
|
764
|
-
function
|
|
765
|
-
const n =
|
|
766
|
-
return t ? t.left + n :
|
|
764
|
+
function Pe(e, t) {
|
|
765
|
+
const n = Ue(e).scrollLeft;
|
|
766
|
+
return t ? t.left + n : me(te(e)).left + n;
|
|
767
767
|
}
|
|
768
|
-
function
|
|
769
|
-
const n = e.getBoundingClientRect(), o = n.left + t.scrollLeft -
|
|
768
|
+
function Dt(e, t) {
|
|
769
|
+
const n = e.getBoundingClientRect(), o = n.left + t.scrollLeft - Pe(e, n), l = n.top + t.scrollTop;
|
|
770
770
|
return {
|
|
771
771
|
x: o,
|
|
772
772
|
y: l
|
|
773
773
|
};
|
|
774
774
|
}
|
|
775
|
-
function
|
|
775
|
+
function Dn(e) {
|
|
776
776
|
let {
|
|
777
777
|
elements: t,
|
|
778
778
|
rect: n,
|
|
779
779
|
offsetParent: o,
|
|
780
780
|
strategy: l
|
|
781
781
|
} = e;
|
|
782
|
-
const i = l === "fixed", s =
|
|
783
|
-
if (o === s ||
|
|
782
|
+
const i = l === "fixed", s = te(o), a = t ? Me(t.floating) : !1;
|
|
783
|
+
if (o === s || a && i)
|
|
784
784
|
return n;
|
|
785
785
|
let c = {
|
|
786
786
|
scrollLeft: 0,
|
|
787
787
|
scrollTop: 0
|
|
788
|
-
},
|
|
789
|
-
const u =
|
|
790
|
-
if ((f || !f && !i) && ((
|
|
791
|
-
const p =
|
|
792
|
-
|
|
788
|
+
}, r = Z(1);
|
|
789
|
+
const u = Z(0), f = ee(o);
|
|
790
|
+
if ((f || !f && !i) && ((xe(o) !== "body" || Oe(s)) && (c = Ue(o)), ee(o))) {
|
|
791
|
+
const p = me(o);
|
|
792
|
+
r = ye(o), u.x = p.x + o.clientLeft, u.y = p.y + o.clientTop;
|
|
793
793
|
}
|
|
794
|
-
const d = s && !f && !i ?
|
|
794
|
+
const d = s && !f && !i ? Dt(s, c) : Z(0);
|
|
795
795
|
return {
|
|
796
|
-
width: n.width *
|
|
797
|
-
height: n.height *
|
|
798
|
-
x: n.x *
|
|
799
|
-
y: n.y *
|
|
796
|
+
width: n.width * r.x,
|
|
797
|
+
height: n.height * r.y,
|
|
798
|
+
x: n.x * r.x - c.scrollLeft * r.x + u.x + d.x,
|
|
799
|
+
y: n.y * r.y - c.scrollTop * r.y + u.y + d.y
|
|
800
800
|
};
|
|
801
801
|
}
|
|
802
|
-
function
|
|
802
|
+
function Bn(e) {
|
|
803
803
|
return Array.from(e.getClientRects());
|
|
804
804
|
}
|
|
805
|
-
function
|
|
806
|
-
const t =
|
|
807
|
-
let s = -n.scrollLeft +
|
|
808
|
-
const
|
|
809
|
-
return
|
|
805
|
+
function Ln(e) {
|
|
806
|
+
const t = te(e), n = Ue(e), o = e.ownerDocument.body, l = J(t.scrollWidth, t.clientWidth, o.scrollWidth, o.clientWidth), i = J(t.scrollHeight, t.clientHeight, o.scrollHeight, o.clientHeight);
|
|
807
|
+
let s = -n.scrollLeft + Pe(e);
|
|
808
|
+
const a = -n.scrollTop;
|
|
809
|
+
return z(o).direction === "rtl" && (s += J(t.clientWidth, o.clientWidth) - l), {
|
|
810
810
|
width: l,
|
|
811
811
|
height: i,
|
|
812
812
|
x: s,
|
|
813
|
-
y:
|
|
813
|
+
y: a
|
|
814
814
|
};
|
|
815
815
|
}
|
|
816
|
-
const
|
|
817
|
-
function
|
|
818
|
-
const n =
|
|
819
|
-
let i = o.clientWidth, s = o.clientHeight,
|
|
816
|
+
const yt = 25;
|
|
817
|
+
function Nn(e, t) {
|
|
818
|
+
const n = W(e), o = te(e), l = n.visualViewport;
|
|
819
|
+
let i = o.clientWidth, s = o.clientHeight, a = 0, c = 0;
|
|
820
820
|
if (l) {
|
|
821
821
|
i = l.width, s = l.height;
|
|
822
|
-
const u =
|
|
823
|
-
(!u || u && t === "fixed") && (
|
|
822
|
+
const u = st();
|
|
823
|
+
(!u || u && t === "fixed") && (a = l.offsetLeft, c = l.offsetTop);
|
|
824
824
|
}
|
|
825
|
-
const
|
|
826
|
-
if (
|
|
825
|
+
const r = Pe(o);
|
|
826
|
+
if (r <= 0) {
|
|
827
827
|
const u = o.ownerDocument, f = u.body, d = getComputedStyle(f), p = u.compatMode === "CSS1Compat" && parseFloat(d.marginLeft) + parseFloat(d.marginRight) || 0, v = Math.abs(o.clientWidth - f.clientWidth - p);
|
|
828
|
-
v <=
|
|
829
|
-
} else
|
|
828
|
+
v <= yt && (i -= v);
|
|
829
|
+
} else r <= yt && (i += r);
|
|
830
830
|
return {
|
|
831
831
|
width: i,
|
|
832
832
|
height: s,
|
|
833
|
-
x:
|
|
833
|
+
x: a,
|
|
834
834
|
y: c
|
|
835
835
|
};
|
|
836
836
|
}
|
|
837
|
-
const
|
|
838
|
-
function
|
|
839
|
-
const n =
|
|
837
|
+
const In = /* @__PURE__ */ new Set(["absolute", "fixed"]);
|
|
838
|
+
function Fn(e, t) {
|
|
839
|
+
const n = me(e, !0, t === "fixed"), o = n.top + e.clientTop, l = n.left + e.clientLeft, i = ee(e) ? ye(e) : Z(1), s = e.clientWidth * i.x, a = e.clientHeight * i.y, c = l * i.x, r = o * i.y;
|
|
840
840
|
return {
|
|
841
841
|
width: s,
|
|
842
|
-
height:
|
|
842
|
+
height: a,
|
|
843
843
|
x: c,
|
|
844
|
-
y:
|
|
844
|
+
y: r
|
|
845
845
|
};
|
|
846
846
|
}
|
|
847
|
-
function
|
|
847
|
+
function At(e, t, n) {
|
|
848
848
|
let o;
|
|
849
849
|
if (t === "viewport")
|
|
850
|
-
o =
|
|
850
|
+
o = Nn(e, n);
|
|
851
851
|
else if (t === "document")
|
|
852
|
-
o =
|
|
853
|
-
else if (
|
|
854
|
-
o =
|
|
852
|
+
o = Ln(te(e));
|
|
853
|
+
else if (Y(t))
|
|
854
|
+
o = Fn(t, n);
|
|
855
855
|
else {
|
|
856
|
-
const l =
|
|
856
|
+
const l = Vt(e);
|
|
857
857
|
o = {
|
|
858
858
|
x: t.x - l.x,
|
|
859
859
|
y: t.y - l.y,
|
|
@@ -861,36 +861,36 @@ function mt(e, t, n) {
|
|
|
861
861
|
height: t.height
|
|
862
862
|
};
|
|
863
863
|
}
|
|
864
|
-
return
|
|
864
|
+
return Ie(o);
|
|
865
865
|
}
|
|
866
|
-
function
|
|
867
|
-
const n =
|
|
868
|
-
return n === t || !
|
|
866
|
+
function Bt(e, t) {
|
|
867
|
+
const n = ce(e);
|
|
868
|
+
return n === t || !Y(n) || we(n) ? !1 : z(n).position === "fixed" || Bt(n, t);
|
|
869
869
|
}
|
|
870
|
-
function
|
|
870
|
+
function Mn(e, t) {
|
|
871
871
|
const n = t.get(e);
|
|
872
872
|
if (n)
|
|
873
873
|
return n;
|
|
874
|
-
let o =
|
|
875
|
-
const i =
|
|
876
|
-
let s = i ?
|
|
877
|
-
for (;
|
|
878
|
-
const
|
|
879
|
-
!c &&
|
|
874
|
+
let o = ke(e, [], !1).filter((a) => Y(a) && xe(a) !== "body"), l = null;
|
|
875
|
+
const i = z(e).position === "fixed";
|
|
876
|
+
let s = i ? ce(e) : e;
|
|
877
|
+
for (; Y(s) && !we(s); ) {
|
|
878
|
+
const a = z(s), c = lt(s);
|
|
879
|
+
!c && a.position === "fixed" && (l = null), (i ? !c && !l : !c && a.position === "static" && !!l && In.has(l.position) || Oe(s) && !c && Bt(e, s)) ? o = o.filter((u) => u !== s) : l = a, s = ce(s);
|
|
880
880
|
}
|
|
881
881
|
return t.set(e, o), o;
|
|
882
882
|
}
|
|
883
|
-
function
|
|
883
|
+
function Un(e) {
|
|
884
884
|
let {
|
|
885
885
|
element: t,
|
|
886
886
|
boundary: n,
|
|
887
887
|
rootBoundary: o,
|
|
888
888
|
strategy: l
|
|
889
889
|
} = e;
|
|
890
|
-
const s = [...n === "clippingAncestors" ?
|
|
891
|
-
const f =
|
|
892
|
-
return
|
|
893
|
-
},
|
|
890
|
+
const s = [...n === "clippingAncestors" ? Me(t) ? [] : Mn(t, this._c) : [].concat(n), o], a = s[0], c = s.reduce((r, u) => {
|
|
891
|
+
const f = At(t, u, l);
|
|
892
|
+
return r.top = J(f.top, r.top), r.right = Ae(f.right, r.right), r.bottom = Ae(f.bottom, r.bottom), r.left = J(f.left, r.left), r;
|
|
893
|
+
}, At(t, a, l));
|
|
894
894
|
return {
|
|
895
895
|
width: c.right - c.left,
|
|
896
896
|
height: c.bottom - c.top,
|
|
@@ -898,33 +898,33 @@ function Bn(e) {
|
|
|
898
898
|
y: c.top
|
|
899
899
|
};
|
|
900
900
|
}
|
|
901
|
-
function
|
|
901
|
+
function Pn(e) {
|
|
902
902
|
const {
|
|
903
903
|
width: t,
|
|
904
904
|
height: n
|
|
905
|
-
} =
|
|
905
|
+
} = Et(e);
|
|
906
906
|
return {
|
|
907
907
|
width: t,
|
|
908
908
|
height: n
|
|
909
909
|
};
|
|
910
910
|
}
|
|
911
|
-
function
|
|
912
|
-
const o =
|
|
913
|
-
let
|
|
911
|
+
function Hn(e, t, n) {
|
|
912
|
+
const o = ee(t), l = te(t), i = n === "fixed", s = me(e, !0, i, t);
|
|
913
|
+
let a = {
|
|
914
914
|
scrollLeft: 0,
|
|
915
915
|
scrollTop: 0
|
|
916
916
|
};
|
|
917
|
-
const c =
|
|
918
|
-
function
|
|
919
|
-
c.x =
|
|
917
|
+
const c = Z(0);
|
|
918
|
+
function r() {
|
|
919
|
+
c.x = Pe(l);
|
|
920
920
|
}
|
|
921
921
|
if (o || !o && !i)
|
|
922
|
-
if ((
|
|
923
|
-
const p =
|
|
922
|
+
if ((xe(t) !== "body" || Oe(l)) && (a = Ue(t)), o) {
|
|
923
|
+
const p = me(t, !0, i, t);
|
|
924
924
|
c.x = p.x + t.clientLeft, c.y = p.y + t.clientTop;
|
|
925
|
-
} else l &&
|
|
926
|
-
i && !o && l &&
|
|
927
|
-
const u = l && !o && !i ?
|
|
925
|
+
} else l && r();
|
|
926
|
+
i && !o && l && r();
|
|
927
|
+
const u = l && !o && !i ? Dt(l, a) : Z(0), f = s.left + a.scrollLeft - c.x - u.x, d = s.top + a.scrollTop - c.y - u.y;
|
|
928
928
|
return {
|
|
929
929
|
x: f,
|
|
930
930
|
y: d,
|
|
@@ -932,39 +932,39 @@ function Nn(e, t, n) {
|
|
|
932
932
|
height: s.height
|
|
933
933
|
};
|
|
934
934
|
}
|
|
935
|
-
function
|
|
936
|
-
return
|
|
935
|
+
function We(e) {
|
|
936
|
+
return z(e).position === "static";
|
|
937
937
|
}
|
|
938
|
-
function
|
|
939
|
-
if (!
|
|
938
|
+
function wt(e, t) {
|
|
939
|
+
if (!ee(e) || z(e).position === "fixed")
|
|
940
940
|
return null;
|
|
941
941
|
if (t)
|
|
942
942
|
return t(e);
|
|
943
943
|
let n = e.offsetParent;
|
|
944
|
-
return
|
|
944
|
+
return te(e) === n && (n = n.ownerDocument.body), n;
|
|
945
945
|
}
|
|
946
|
-
function
|
|
947
|
-
const n =
|
|
948
|
-
if (
|
|
946
|
+
function Lt(e, t) {
|
|
947
|
+
const n = W(e);
|
|
948
|
+
if (Me(e))
|
|
949
949
|
return n;
|
|
950
|
-
if (!
|
|
951
|
-
let l =
|
|
952
|
-
for (; l && !
|
|
953
|
-
if (
|
|
950
|
+
if (!ee(e)) {
|
|
951
|
+
let l = ce(e);
|
|
952
|
+
for (; l && !we(l); ) {
|
|
953
|
+
if (Y(l) && !We(l))
|
|
954
954
|
return l;
|
|
955
|
-
l =
|
|
955
|
+
l = ce(l);
|
|
956
956
|
}
|
|
957
957
|
return n;
|
|
958
958
|
}
|
|
959
|
-
let o =
|
|
960
|
-
for (; o &&
|
|
961
|
-
o =
|
|
962
|
-
return o &&
|
|
959
|
+
let o = wt(e, t);
|
|
960
|
+
for (; o && Cn(o) && We(o); )
|
|
961
|
+
o = wt(o, t);
|
|
962
|
+
return o && we(o) && We(o) && !lt(o) ? n : o || On(e) || n;
|
|
963
963
|
}
|
|
964
|
-
const
|
|
965
|
-
const t = this.getOffsetParent ||
|
|
964
|
+
const Qn = async function(e) {
|
|
965
|
+
const t = this.getOffsetParent || Lt, n = this.getDimensions, o = await n(e.floating);
|
|
966
966
|
return {
|
|
967
|
-
reference:
|
|
967
|
+
reference: Hn(e.reference, await t(e.floating), e.strategy),
|
|
968
968
|
floating: {
|
|
969
969
|
x: 0,
|
|
970
970
|
y: 0,
|
|
@@ -973,48 +973,48 @@ const In = async function(e) {
|
|
|
973
973
|
}
|
|
974
974
|
};
|
|
975
975
|
};
|
|
976
|
-
function
|
|
977
|
-
return
|
|
978
|
-
}
|
|
979
|
-
const
|
|
980
|
-
convertOffsetParentRelativeRectToViewportRelativeRect:
|
|
981
|
-
getDocumentElement:
|
|
982
|
-
getClippingRect:
|
|
983
|
-
getOffsetParent:
|
|
984
|
-
getElementRects:
|
|
985
|
-
getClientRects:
|
|
986
|
-
getDimensions:
|
|
987
|
-
getScale:
|
|
988
|
-
isElement:
|
|
989
|
-
isRTL:
|
|
976
|
+
function $n(e) {
|
|
977
|
+
return z(e).direction === "rtl";
|
|
978
|
+
}
|
|
979
|
+
const Jn = {
|
|
980
|
+
convertOffsetParentRelativeRectToViewportRelativeRect: Dn,
|
|
981
|
+
getDocumentElement: te,
|
|
982
|
+
getClippingRect: Un,
|
|
983
|
+
getOffsetParent: Lt,
|
|
984
|
+
getElementRects: Qn,
|
|
985
|
+
getClientRects: Bn,
|
|
986
|
+
getDimensions: Pn,
|
|
987
|
+
getScale: ye,
|
|
988
|
+
isElement: Y,
|
|
989
|
+
isRTL: $n
|
|
990
990
|
};
|
|
991
|
-
function
|
|
991
|
+
function Nt(e, t) {
|
|
992
992
|
return e.x === t.x && e.y === t.y && e.width === t.width && e.height === t.height;
|
|
993
993
|
}
|
|
994
|
-
function
|
|
994
|
+
function Wn(e, t) {
|
|
995
995
|
let n = null, o;
|
|
996
|
-
const l =
|
|
996
|
+
const l = te(e);
|
|
997
997
|
function i() {
|
|
998
|
-
var
|
|
999
|
-
clearTimeout(o), (
|
|
998
|
+
var a;
|
|
999
|
+
clearTimeout(o), (a = n) == null || a.disconnect(), n = null;
|
|
1000
1000
|
}
|
|
1001
|
-
function s(
|
|
1002
|
-
|
|
1003
|
-
const
|
|
1001
|
+
function s(a, c) {
|
|
1002
|
+
a === void 0 && (a = !1), c === void 0 && (c = 1), i();
|
|
1003
|
+
const r = e.getBoundingClientRect(), {
|
|
1004
1004
|
left: u,
|
|
1005
1005
|
top: f,
|
|
1006
1006
|
width: d,
|
|
1007
1007
|
height: p
|
|
1008
|
-
} =
|
|
1009
|
-
if (
|
|
1008
|
+
} = r;
|
|
1009
|
+
if (a || t(), !d || !p)
|
|
1010
1010
|
return;
|
|
1011
|
-
const v =
|
|
1012
|
-
rootMargin: -v + "px " + -w + "px " + -x + "px " + -
|
|
1013
|
-
threshold:
|
|
1011
|
+
const v = Ve(f), w = Ve(l.clientWidth - (u + d)), x = Ve(l.clientHeight - (f + p)), y = Ve(u), R = {
|
|
1012
|
+
rootMargin: -v + "px " + -w + "px " + -x + "px " + -y + "px",
|
|
1013
|
+
threshold: J(0, Ae(1, c)) || 1
|
|
1014
1014
|
};
|
|
1015
1015
|
let V = !0;
|
|
1016
|
-
function D(
|
|
1017
|
-
const U =
|
|
1016
|
+
function D(K) {
|
|
1017
|
+
const U = K[0].intersectionRatio;
|
|
1018
1018
|
if (U !== c) {
|
|
1019
1019
|
if (!V)
|
|
1020
1020
|
return s();
|
|
@@ -1022,7 +1022,7 @@ function Un(e, t) {
|
|
|
1022
1022
|
s(!1, 1e-7);
|
|
1023
1023
|
}, 1e3);
|
|
1024
1024
|
}
|
|
1025
|
-
U === 1 && !
|
|
1025
|
+
U === 1 && !Nt(r, e.getBoundingClientRect()) && s(), V = !1;
|
|
1026
1026
|
}
|
|
1027
1027
|
try {
|
|
1028
1028
|
n = new IntersectionObserver(D, {
|
|
@@ -1037,56 +1037,56 @@ function Un(e, t) {
|
|
|
1037
1037
|
}
|
|
1038
1038
|
return s(!0), i;
|
|
1039
1039
|
}
|
|
1040
|
-
function
|
|
1040
|
+
function Kn(e, t, n, o) {
|
|
1041
1041
|
o === void 0 && (o = {});
|
|
1042
1042
|
const {
|
|
1043
1043
|
ancestorScroll: l = !0,
|
|
1044
1044
|
ancestorResize: i = !0,
|
|
1045
1045
|
elementResize: s = typeof ResizeObserver == "function",
|
|
1046
|
-
layoutShift:
|
|
1046
|
+
layoutShift: a = typeof IntersectionObserver == "function",
|
|
1047
1047
|
animationFrame: c = !1
|
|
1048
|
-
} = o,
|
|
1049
|
-
u.forEach((
|
|
1050
|
-
l &&
|
|
1048
|
+
} = o, r = it(e), u = l || i ? [...r ? ke(r) : [], ...ke(t)] : [];
|
|
1049
|
+
u.forEach((y) => {
|
|
1050
|
+
l && y.addEventListener("scroll", n, {
|
|
1051
1051
|
passive: !0
|
|
1052
|
-
}), i &&
|
|
1052
|
+
}), i && y.addEventListener("resize", n);
|
|
1053
1053
|
});
|
|
1054
|
-
const f =
|
|
1054
|
+
const f = r && a ? Wn(r, n) : null;
|
|
1055
1055
|
let d = -1, p = null;
|
|
1056
|
-
s && (p = new ResizeObserver((
|
|
1057
|
-
let [
|
|
1058
|
-
|
|
1056
|
+
s && (p = new ResizeObserver((y) => {
|
|
1057
|
+
let [C] = y;
|
|
1058
|
+
C && C.target === r && p && (p.unobserve(t), cancelAnimationFrame(d), d = requestAnimationFrame(() => {
|
|
1059
1059
|
var R;
|
|
1060
1060
|
(R = p) == null || R.observe(t);
|
|
1061
1061
|
})), n();
|
|
1062
|
-
}),
|
|
1063
|
-
let v, w = c ?
|
|
1062
|
+
}), r && !c && p.observe(r), p.observe(t));
|
|
1063
|
+
let v, w = c ? me(e) : null;
|
|
1064
1064
|
c && x();
|
|
1065
1065
|
function x() {
|
|
1066
|
-
const
|
|
1067
|
-
w && !
|
|
1066
|
+
const y = me(e);
|
|
1067
|
+
w && !Nt(w, y) && n(), w = y, v = requestAnimationFrame(x);
|
|
1068
1068
|
}
|
|
1069
1069
|
return n(), () => {
|
|
1070
|
-
var
|
|
1071
|
-
u.forEach((
|
|
1072
|
-
l &&
|
|
1073
|
-
}), f?.(), (
|
|
1070
|
+
var y;
|
|
1071
|
+
u.forEach((C) => {
|
|
1072
|
+
l && C.removeEventListener("scroll", n), i && C.removeEventListener("resize", n);
|
|
1073
|
+
}), f?.(), (y = p) == null || y.disconnect(), p = null, c && cancelAnimationFrame(v);
|
|
1074
1074
|
};
|
|
1075
1075
|
}
|
|
1076
|
-
const
|
|
1076
|
+
const qn = yn, Gn = An, Yn = hn, zn = wn, jn = (e, t, n) => {
|
|
1077
1077
|
const o = /* @__PURE__ */ new Map(), l = {
|
|
1078
|
-
platform:
|
|
1078
|
+
platform: Jn,
|
|
1079
1079
|
...n
|
|
1080
1080
|
}, i = {
|
|
1081
1081
|
...l.platform,
|
|
1082
1082
|
_c: o
|
|
1083
1083
|
};
|
|
1084
|
-
return
|
|
1084
|
+
return mn(e, t, {
|
|
1085
1085
|
...l,
|
|
1086
1086
|
platform: i
|
|
1087
1087
|
});
|
|
1088
1088
|
};
|
|
1089
|
-
function
|
|
1089
|
+
function Xn(e, t) {
|
|
1090
1090
|
const n = E({
|
|
1091
1091
|
position: "fixed",
|
|
1092
1092
|
left: "0",
|
|
@@ -1096,63 +1096,63 @@ function Kn(e, t) {
|
|
|
1096
1096
|
});
|
|
1097
1097
|
let o = null;
|
|
1098
1098
|
const l = () => {
|
|
1099
|
-
!e.value || !t.value ||
|
|
1099
|
+
!e.value || !t.value || jn(e.value, t.value, {
|
|
1100
1100
|
placement: "bottom-start",
|
|
1101
1101
|
strategy: "fixed",
|
|
1102
1102
|
middleware: [
|
|
1103
|
-
|
|
1103
|
+
qn(6),
|
|
1104
1104
|
// 输入框与下拉列表的间距
|
|
1105
|
-
|
|
1105
|
+
Yn(),
|
|
1106
1106
|
// 空间不足自动翻转到上方
|
|
1107
|
-
|
|
1107
|
+
Gn({ padding: 10 }),
|
|
1108
1108
|
// 靠近屏幕边缘时自动位移
|
|
1109
|
-
|
|
1110
|
-
apply({ rects:
|
|
1111
|
-
const
|
|
1109
|
+
zn({
|
|
1110
|
+
apply({ rects: a, elements: c }) {
|
|
1111
|
+
const r = `${a.reference.width}px`;
|
|
1112
1112
|
Object.assign(c.floating.style, {
|
|
1113
|
-
width:
|
|
1113
|
+
width: r,
|
|
1114
1114
|
// 必须锁定,否则在 body 下它可能由于内容过多撑开到 100vw
|
|
1115
|
-
minWidth:
|
|
1116
|
-
maxWidth:
|
|
1115
|
+
minWidth: r,
|
|
1116
|
+
maxWidth: r
|
|
1117
1117
|
});
|
|
1118
1118
|
}
|
|
1119
1119
|
})
|
|
1120
1120
|
]
|
|
1121
|
-
}).then(({ x:
|
|
1121
|
+
}).then(({ x: a, y: c }) => {
|
|
1122
1122
|
Object.assign(n.value, {
|
|
1123
|
-
left: `${
|
|
1123
|
+
left: `${a}px`,
|
|
1124
1124
|
top: `${c}px`
|
|
1125
1125
|
});
|
|
1126
1126
|
});
|
|
1127
1127
|
}, i = () => {
|
|
1128
|
-
e.value && t.value && (o =
|
|
1128
|
+
e.value && t.value && (o = Kn(e.value, t.value, l));
|
|
1129
1129
|
}, s = () => {
|
|
1130
1130
|
o && (o(), o = null);
|
|
1131
1131
|
};
|
|
1132
|
-
return
|
|
1132
|
+
return Ct(s), { floatingStyles: n, startTrack: i, stopTrack: s };
|
|
1133
1133
|
}
|
|
1134
|
-
const
|
|
1134
|
+
const Zn = "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", eo = "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=", to = "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==", no = "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", oo = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAABFUlEQVR4AaRQO07DQBCdWe8B4B5IFFyAK9ARkIVNhIQEEiVtJLgABRVRvIBCJBquwBVyDgoaSnuHeZY3MlYcNsnIb8fze6M3hra0XoKJm95N3Nv3EnyhFvb2EgjRJbOMKqmO2tDcvQ5fK+qvl4CJbOn9/CJPP9tArp5sHtP4lc652VXxPL1Z1hRFIOytF1NuTJCfnT4Ms8HjSgJctn1xIt6hxqIkdK+u8U8zT1ESmP5enUkWmqMkhG2FmxXOvR+EGD5KAhoDqsQvtiMXJQGNQJ4N8mF6PMd/wL8SxuOXPSG21pj9p+L1EOjGyAHoQQ0zWGDqx9pbPWIpwqOEkw+gGyMHoAc1ozOkVhOcZyepYndNpDpPvwAAAP//BVQJHAAAAAZJREFUAwDZWL4hub5xHQAAAABJRU5ErkJggg==", ze = "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", lo = { class: "search-container" }, so = { class: "selection-wrapper" }, io = { class: "tag-text" }, ao = ["onClick"], ro = {
|
|
1135
1135
|
key: 0,
|
|
1136
1136
|
class: "search-tag collapse"
|
|
1137
|
-
},
|
|
1137
|
+
}, co = ["placeholder"], uo = { class: "suffix-area" }, fo = {
|
|
1138
1138
|
key: 1,
|
|
1139
1139
|
class: "loading-spinner"
|
|
1140
|
-
},
|
|
1140
|
+
}, po = { class: "search-icon" }, mo = ["src"], ho = {
|
|
1141
1141
|
key: 0,
|
|
1142
1142
|
class: "history-section"
|
|
1143
|
-
},
|
|
1143
|
+
}, vo = { class: "history-header" }, go = ["onMousedown"], yo = ["src"], Ao = { class: "type-text" }, wo = { class: "result-text" }, xo = {
|
|
1144
1144
|
key: 0,
|
|
1145
1145
|
class: "status-msg"
|
|
1146
|
-
},
|
|
1146
|
+
}, bo = ["onMousedown"], Co = ["src"], So = { class: "type-text" }, ko = { class: "result-text" }, Ro = {
|
|
1147
1147
|
key: 0,
|
|
1148
1148
|
class: "load-more-msg"
|
|
1149
|
-
},
|
|
1149
|
+
}, _o = {
|
|
1150
1150
|
key: 1,
|
|
1151
1151
|
class: "load-more-msg no-more"
|
|
1152
|
-
},
|
|
1152
|
+
}, Oo = {
|
|
1153
1153
|
key: 2,
|
|
1154
1154
|
class: "status-msg"
|
|
1155
|
-
},
|
|
1155
|
+
}, To = /* @__PURE__ */ Xe({
|
|
1156
1156
|
__name: "index",
|
|
1157
1157
|
props: {
|
|
1158
1158
|
modelValue: { default: null },
|
|
@@ -1180,19 +1180,19 @@ const qn = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAA
|
|
|
1180
1180
|
"remove"
|
|
1181
1181
|
],
|
|
1182
1182
|
setup(e, { emit: t }) {
|
|
1183
|
-
const n = e, o = t, l = E(null), i = E(null), s = E(null),
|
|
1183
|
+
const n = e, o = t, l = E(null), i = E(null), s = E(null), a = E(""), c = E(""), r = E(!1), u = E(!1);
|
|
1184
1184
|
let f = null;
|
|
1185
|
-
const d = M(() => n.modelValue ? Array.isArray(n.modelValue) ? n.modelValue : [n.modelValue] : []), p = M(() => n.multiple ? n.collapseTags ? d.value.slice(0, 1) : d.value : []), v = M(() =>
|
|
1186
|
-
|
|
1185
|
+
const d = M(() => n.modelValue ? Array.isArray(n.modelValue) ? n.modelValue : [n.modelValue] : []), p = M(() => n.multiple ? n.collapseTags ? d.value.slice(0, 1) : d.value : []), v = M(() => a.value || d.value.length > 0), w = M(() => n.multiple ? a.value ? `${a.value.length * 10 + 20}px` : "10px" : "100%"), { searchHistory: x, saveToHistory: y, clearHistory: C } = Zt(
|
|
1186
|
+
Ke(n, "historyKey")
|
|
1187
1187
|
), {
|
|
1188
1188
|
searchResults: R,
|
|
1189
1189
|
loading: V,
|
|
1190
1190
|
isFetchingMore: D,
|
|
1191
|
-
isFinished:
|
|
1191
|
+
isFinished: K,
|
|
1192
1192
|
currentPage: U,
|
|
1193
1193
|
fetchData: Q,
|
|
1194
|
-
filterByTypes:
|
|
1195
|
-
} =
|
|
1194
|
+
filterByTypes: q
|
|
1195
|
+
} = tn(a, Ke(n, "searchTypeList")), { floatingStyles: P, startTrack: ne, stopTrack: j } = Xn(
|
|
1196
1196
|
i,
|
|
1197
1197
|
s
|
|
1198
1198
|
), F = M(() => {
|
|
@@ -1200,15 +1200,15 @@ const qn = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAA
|
|
|
1200
1200
|
return n.lang === "en" || n.lang === "en-US";
|
|
1201
1201
|
try {
|
|
1202
1202
|
if (typeof useCookie == "function") {
|
|
1203
|
-
const
|
|
1204
|
-
if (
|
|
1205
|
-
return /^en(-US)?$/.test(
|
|
1203
|
+
const g = useCookie("jc-language")?.value;
|
|
1204
|
+
if (g)
|
|
1205
|
+
return /^en(-US)?$/.test(g);
|
|
1206
1206
|
}
|
|
1207
1207
|
} catch {
|
|
1208
1208
|
}
|
|
1209
1209
|
if (typeof document < "u") {
|
|
1210
|
-
const
|
|
1211
|
-
return /(^|;\s*)jc-language=en(-US)?(;|$)/.test(
|
|
1210
|
+
const g = document.cookie || "";
|
|
1211
|
+
return /(^|;\s*)jc-language=en(-US)?(;|$)/.test(g);
|
|
1212
1212
|
}
|
|
1213
1213
|
try {
|
|
1214
1214
|
if (typeof useNuxtApp == "function") {
|
|
@@ -1218,92 +1218,117 @@ const qn = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAA
|
|
|
1218
1218
|
} catch {
|
|
1219
1219
|
}
|
|
1220
1220
|
return !1;
|
|
1221
|
-
}),
|
|
1222
|
-
if (g
|
|
1223
|
-
if (!d.value.some((
|
|
1224
|
-
const
|
|
1225
|
-
o("update:modelValue",
|
|
1221
|
+
}), G = M(() => n.multiple && d.value.length > 0 ? "" : r.value && !n.multiple ? c.value : n.placeholder ? n.placeholder : F.value ? "Please enter..." : "请输入..."), ue = () => l.value?.focus(), S = (g) => {
|
|
1222
|
+
if (y(g), n.multiple) {
|
|
1223
|
+
if (!d.value.some((k) => k.id === g.id)) {
|
|
1224
|
+
const k = [...d.value, g];
|
|
1225
|
+
o("update:modelValue", k);
|
|
1226
1226
|
}
|
|
1227
|
-
|
|
1227
|
+
a.value = "";
|
|
1228
1228
|
} else
|
|
1229
|
-
c.value =
|
|
1230
|
-
o("select",
|
|
1231
|
-
}, O = (
|
|
1232
|
-
const B = d.value.filter((
|
|
1233
|
-
o("update:modelValue", B), o("remove",
|
|
1229
|
+
c.value = he(g), r.value = !0, a.value = "", u.value = !1, o("update:modelValue", g);
|
|
1230
|
+
o("select", g), o("change", g);
|
|
1231
|
+
}, O = (g) => {
|
|
1232
|
+
const B = d.value.filter((k) => k.id !== g.id);
|
|
1233
|
+
o("update:modelValue", B), o("remove", g);
|
|
1234
1234
|
}, T = () => {
|
|
1235
|
-
n.multiple && !
|
|
1235
|
+
n.multiple && !a.value && d.value.length > 0 && O(
|
|
1236
1236
|
d.value[d.value.length - 1]
|
|
1237
1237
|
);
|
|
1238
1238
|
}, H = () => {
|
|
1239
|
-
|
|
1240
|
-
},
|
|
1241
|
-
if (u.value = !0, !n.multiple &&
|
|
1242
|
-
const
|
|
1243
|
-
if (
|
|
1239
|
+
a.value = "", r.value = !1, c.value = "", o("update:modelValue", n.multiple ? [] : null);
|
|
1240
|
+
}, be = async () => {
|
|
1241
|
+
if (u.value = !0, !n.multiple && r.value && R.value.length === 0) {
|
|
1242
|
+
const g = n.modelValue;
|
|
1243
|
+
if (g?.id) {
|
|
1244
1244
|
V.value = !0;
|
|
1245
1245
|
try {
|
|
1246
|
-
const B = await
|
|
1247
|
-
|
|
1248
|
-
|
|
1246
|
+
const B = await Je(
|
|
1247
|
+
g.id,
|
|
1248
|
+
g.type
|
|
1249
1249
|
);
|
|
1250
|
-
R.value =
|
|
1250
|
+
R.value = q(B.records);
|
|
1251
1251
|
} finally {
|
|
1252
1252
|
V.value = !1;
|
|
1253
1253
|
}
|
|
1254
1254
|
}
|
|
1255
1255
|
}
|
|
1256
|
-
},
|
|
1257
|
-
|
|
1258
|
-
},
|
|
1259
|
-
|
|
1260
|
-
},
|
|
1261
|
-
const { scrollTop: B, scrollHeight:
|
|
1262
|
-
B +
|
|
1256
|
+
}, Ft = () => setTimeout(() => u.value = !1, 200), Mt = (g) => {
|
|
1257
|
+
g.target.value === "" && !n.multiple && H();
|
|
1258
|
+
}, Ut = () => {
|
|
1259
|
+
o("submit-search", d.value), u.value = !1;
|
|
1260
|
+
}, Pt = (g) => {
|
|
1261
|
+
const { scrollTop: B, scrollHeight: k, clientHeight: $ } = g.target;
|
|
1262
|
+
B + $ >= k - 20 && !V.value && !D.value && !K.value && a.value && Q(U.value + 1, !0);
|
|
1263
1263
|
};
|
|
1264
|
-
|
|
1265
|
-
|
|
1266
|
-
}),
|
|
1267
|
-
if (!
|
|
1264
|
+
De(u, (g) => {
|
|
1265
|
+
g ? ne() : j();
|
|
1266
|
+
}), De(a, (g) => {
|
|
1267
|
+
if (!g.trim()) {
|
|
1268
1268
|
R.value = [];
|
|
1269
1269
|
return;
|
|
1270
1270
|
}
|
|
1271
1271
|
f && clearTimeout(f), f = setTimeout(() => Q(1, !1), 300);
|
|
1272
|
-
}),
|
|
1272
|
+
}), De(
|
|
1273
1273
|
() => n.modelValue,
|
|
1274
|
-
async (
|
|
1275
|
-
if (
|
|
1274
|
+
async (g, B) => {
|
|
1275
|
+
if (JSON.stringify(g) === JSON.stringify(B)) return;
|
|
1276
|
+
if (n.multiple && Array.isArray(g)) {
|
|
1277
|
+
const $ = [...g], oe = $.filter(
|
|
1278
|
+
(X) => X && X.id && X.type && !X.display
|
|
1279
|
+
);
|
|
1280
|
+
if (oe.length > 0)
|
|
1281
|
+
try {
|
|
1282
|
+
const X = oe.map((de) => de.id).filter(
|
|
1283
|
+
(de) => de != null
|
|
1284
|
+
), He = await Je(
|
|
1285
|
+
X,
|
|
1286
|
+
oe[0].type
|
|
1287
|
+
);
|
|
1288
|
+
if (He && He.records) {
|
|
1289
|
+
let de = !1;
|
|
1290
|
+
const Qt = $.map((Te) => {
|
|
1291
|
+
const ut = He.records.find(($t) => $t.id === Te.id);
|
|
1292
|
+
return ut && !Te.display ? (de = !0, { ...Te, ...ut }) : Te;
|
|
1293
|
+
});
|
|
1294
|
+
de && o("update:modelValue", Qt);
|
|
1295
|
+
}
|
|
1296
|
+
} catch (X) {
|
|
1297
|
+
console.error("Batch fetch detail failed:", X);
|
|
1298
|
+
}
|
|
1276
1299
|
return;
|
|
1277
|
-
|
|
1278
|
-
|
|
1279
|
-
|
|
1300
|
+
}
|
|
1301
|
+
const k = g;
|
|
1302
|
+
if (!k) {
|
|
1303
|
+
r.value = !1, c.value = "";
|
|
1280
1304
|
return;
|
|
1281
1305
|
}
|
|
1282
|
-
if (typeof
|
|
1283
|
-
if (
|
|
1306
|
+
if (typeof k == "object")
|
|
1307
|
+
if (k.id && k.type && !k.display)
|
|
1284
1308
|
try {
|
|
1285
|
-
const
|
|
1286
|
-
|
|
1287
|
-
|
|
1309
|
+
const oe = (await Je(
|
|
1310
|
+
k.id,
|
|
1311
|
+
k.type
|
|
1288
1312
|
)).records.find(
|
|
1289
|
-
(
|
|
1313
|
+
(X) => X.id === k.id
|
|
1290
1314
|
);
|
|
1291
|
-
|
|
1292
|
-
} catch (
|
|
1293
|
-
console.error("
|
|
1315
|
+
oe && (c.value = he(oe), r.value = !0);
|
|
1316
|
+
} catch ($) {
|
|
1317
|
+
console.error("Single fetch detail failed:", $);
|
|
1294
1318
|
}
|
|
1295
1319
|
else
|
|
1296
|
-
c.value =
|
|
1297
|
-
else
|
|
1320
|
+
c.value = he(k), r.value = !!c.value;
|
|
1321
|
+
else
|
|
1322
|
+
c.value = String(k), r.value = !!k;
|
|
1298
1323
|
},
|
|
1299
1324
|
{ immediate: !0, deep: !0 }
|
|
1300
1325
|
);
|
|
1301
|
-
const
|
|
1302
|
-
City:
|
|
1303
|
-
Country:
|
|
1304
|
-
Airport:
|
|
1305
|
-
Seaport:
|
|
1306
|
-
})[
|
|
1326
|
+
const rt = (g) => ({
|
|
1327
|
+
City: oo,
|
|
1328
|
+
Country: no,
|
|
1329
|
+
Airport: Zn,
|
|
1330
|
+
Seaport: to
|
|
1331
|
+
})[g] || eo, he = (g) => F.value ? g.displayEn || g.display || "" : g.displayCn || g.display || "", ct = (g) => {
|
|
1307
1332
|
const B = {
|
|
1308
1333
|
City: {
|
|
1309
1334
|
en: "City",
|
|
@@ -1326,162 +1351,162 @@ const qn = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAA
|
|
|
1326
1351
|
cn: "港口"
|
|
1327
1352
|
}
|
|
1328
1353
|
};
|
|
1329
|
-
return F.value ? B[
|
|
1330
|
-
},
|
|
1331
|
-
return
|
|
1354
|
+
return F.value ? B[g].en : B[g].cn;
|
|
1355
|
+
}, Ht = (g) => d.value.some((B) => B.id === g.id);
|
|
1356
|
+
return Ct(j), (g, B) => (A(), b("div", lo, [
|
|
1332
1357
|
m("div", {
|
|
1333
|
-
class:
|
|
1358
|
+
class: ae(["search-input-wrapper", { "is-multiple": e.multiple }]),
|
|
1334
1359
|
ref_key: "referenceRef",
|
|
1335
1360
|
ref: i,
|
|
1336
|
-
onClick:
|
|
1361
|
+
onClick: ue
|
|
1337
1362
|
}, [
|
|
1338
|
-
m("div",
|
|
1339
|
-
e.multiple && d.value.length > 0 ? (A(), b(
|
|
1340
|
-
(A(!0), b(
|
|
1341
|
-
key:
|
|
1363
|
+
m("div", so, [
|
|
1364
|
+
e.multiple && d.value.length > 0 ? (A(), b(se, { key: 0 }, [
|
|
1365
|
+
(A(!0), b(se, null, ge(p.value, (k, $) => (A(), b("div", {
|
|
1366
|
+
key: k.id || $,
|
|
1342
1367
|
class: "search-tag"
|
|
1343
1368
|
}, [
|
|
1344
|
-
m("span",
|
|
1369
|
+
m("span", io, _(he(k)), 1),
|
|
1345
1370
|
m("span", {
|
|
1346
1371
|
class: "tag-close",
|
|
1347
|
-
onClick:
|
|
1348
|
-
}, "×", 8,
|
|
1372
|
+
onClick: le((oe) => O(k), ["stop"])
|
|
1373
|
+
}, "×", 8, ao)
|
|
1349
1374
|
]))), 128)),
|
|
1350
|
-
e.collapseTags && d.value.length > 1 ? (A(), b("div",
|
|
1375
|
+
e.collapseTags && d.value.length > 1 ? (A(), b("div", ro, " + " + _(d.value.length - 1), 1)) : I("", !0)
|
|
1351
1376
|
], 64)) : I("", !0),
|
|
1352
|
-
|
|
1377
|
+
Be(m("input", {
|
|
1353
1378
|
ref_key: "inputRef",
|
|
1354
1379
|
ref: l,
|
|
1355
|
-
class:
|
|
1356
|
-
"onUpdate:modelValue": B[0] || (B[0] = (
|
|
1380
|
+
class: ae({ "is-selected-state": r.value && !e.multiple }),
|
|
1381
|
+
"onUpdate:modelValue": B[0] || (B[0] = (k) => a.value = k),
|
|
1357
1382
|
type: "text",
|
|
1358
|
-
placeholder:
|
|
1359
|
-
style:
|
|
1360
|
-
onFocus:
|
|
1361
|
-
onBlur:
|
|
1362
|
-
onInput:
|
|
1363
|
-
onKeydown:
|
|
1364
|
-
}, null, 46,
|
|
1365
|
-
[
|
|
1383
|
+
placeholder: G.value,
|
|
1384
|
+
style: Ee({ width: w.value }),
|
|
1385
|
+
onFocus: be,
|
|
1386
|
+
onBlur: Ft,
|
|
1387
|
+
onInput: Mt,
|
|
1388
|
+
onKeydown: Jt(T, ["delete"])
|
|
1389
|
+
}, null, 46, co), [
|
|
1390
|
+
[et, a.value]
|
|
1366
1391
|
])
|
|
1367
1392
|
]),
|
|
1368
|
-
m("div",
|
|
1393
|
+
m("div", uo, [
|
|
1369
1394
|
v.value ? (A(), b("span", {
|
|
1370
1395
|
key: 0,
|
|
1371
1396
|
class: "clear-icon",
|
|
1372
|
-
onMousedown: B[1] || (B[1] =
|
|
1397
|
+
onMousedown: B[1] || (B[1] = le(() => {
|
|
1373
1398
|
}, ["prevent"])),
|
|
1374
|
-
onClick:
|
|
1399
|
+
onClick: le(H, ["stop"])
|
|
1375
1400
|
}, "ⓧ", 32)) : I("", !0),
|
|
1376
|
-
h(V) && !h(D) ? (A(), b("div",
|
|
1401
|
+
h(V) && !h(D) ? (A(), b("div", fo)) : !h(V) && e.showSearchIcon ? (A(), b("button", {
|
|
1377
1402
|
key: 2,
|
|
1378
1403
|
class: "search-btn",
|
|
1379
|
-
onClick:
|
|
1404
|
+
onClick: le(Ut, ["stop"])
|
|
1380
1405
|
}, [
|
|
1381
|
-
m("span",
|
|
1406
|
+
m("span", po, [
|
|
1382
1407
|
m("img", {
|
|
1383
|
-
src: h(
|
|
1408
|
+
src: h(ze),
|
|
1384
1409
|
alt: "search"
|
|
1385
|
-
}, null, 8,
|
|
1410
|
+
}, null, 8, mo)
|
|
1386
1411
|
])
|
|
1387
1412
|
])) : I("", !0)
|
|
1388
1413
|
])
|
|
1389
1414
|
], 2),
|
|
1390
|
-
(A(),
|
|
1391
|
-
|
|
1415
|
+
(A(), Ze(St, { to: "body" }, [
|
|
1416
|
+
Be(m("div", {
|
|
1392
1417
|
ref_key: "floatingRef",
|
|
1393
1418
|
ref: s,
|
|
1394
1419
|
class: "dropdown-list",
|
|
1395
|
-
style:
|
|
1396
|
-
onScroll:
|
|
1420
|
+
style: Ee(h(P)),
|
|
1421
|
+
onScroll: Pt
|
|
1397
1422
|
}, [
|
|
1398
|
-
|
|
1399
|
-
h(x).length > 0 && !
|
|
1400
|
-
m("div",
|
|
1423
|
+
Qe(g.$slots, "history", { searchHistory: h(x) }, () => [
|
|
1424
|
+
h(x).length > 0 && !a.value ? (A(), b("div", ho, [
|
|
1425
|
+
m("div", vo, [
|
|
1401
1426
|
m("span", null, _(F.value ? "Recent search" : "最近搜索"), 1),
|
|
1402
1427
|
m("span", {
|
|
1403
1428
|
class: "clear-btn",
|
|
1404
|
-
onMousedown: B[2] || (B[2] =
|
|
1429
|
+
onMousedown: B[2] || (B[2] = le(() => {
|
|
1405
1430
|
}, ["prevent"])),
|
|
1406
|
-
onClick: B[3] || (B[3] =
|
|
1431
|
+
onClick: B[3] || (B[3] = le(
|
|
1407
1432
|
//@ts-ignore
|
|
1408
|
-
(...
|
|
1433
|
+
(...k) => h(C) && h(C)(...k),
|
|
1409
1434
|
["stop"]
|
|
1410
1435
|
))
|
|
1411
1436
|
}, _(F.value ? "Clear" : "清空"), 33)
|
|
1412
1437
|
]),
|
|
1413
|
-
(A(!0), b(
|
|
1414
|
-
key: "hist-" +
|
|
1438
|
+
(A(!0), b(se, null, ge(h(x), (k, $) => (A(), b("div", {
|
|
1439
|
+
key: "hist-" + $,
|
|
1415
1440
|
class: "dropdown-item",
|
|
1416
|
-
onMousedown: (
|
|
1441
|
+
onMousedown: (oe) => S(k)
|
|
1417
1442
|
}, [
|
|
1418
1443
|
m("div", {
|
|
1419
1444
|
class: "category-tag",
|
|
1420
|
-
style:
|
|
1445
|
+
style: Ee(e.showItemTag ? {} : { display: "none" })
|
|
1421
1446
|
}, [
|
|
1422
1447
|
m("img", {
|
|
1423
1448
|
class: "type-icon",
|
|
1424
|
-
src:
|
|
1449
|
+
src: rt(k.type),
|
|
1425
1450
|
alt: ""
|
|
1426
|
-
}, null, 8,
|
|
1427
|
-
m("span",
|
|
1451
|
+
}, null, 8, yo),
|
|
1452
|
+
m("span", Ao, _(ct(k.type)), 1)
|
|
1428
1453
|
], 4),
|
|
1429
|
-
m("div",
|
|
1430
|
-
], 40,
|
|
1454
|
+
m("div", wo, _(he(k)), 1)
|
|
1455
|
+
], 40, go))), 128)),
|
|
1431
1456
|
B[4] || (B[4] = m("hr", { class: "divider" }, null, -1))
|
|
1432
1457
|
])) : I("", !0)
|
|
1433
1458
|
], !0),
|
|
1434
|
-
h(V) && !h(D) ? (A(), b("div",
|
|
1435
|
-
|
|
1436
|
-
(A(!0), b(
|
|
1437
|
-
key:
|
|
1438
|
-
class:
|
|
1439
|
-
onMousedown: (
|
|
1459
|
+
h(V) && !h(D) ? (A(), b("div", xo, _(F.value ? "Searching..." : "正在搜索中..."), 1)) : h(R).length > 0 ? (A(), b(se, { key: 1 }, [
|
|
1460
|
+
Qe(g.$slots, "results", { searchResults: h(R) }, () => [
|
|
1461
|
+
(A(!0), b(se, null, ge(h(R), (k, $) => (A(), b("div", {
|
|
1462
|
+
key: $,
|
|
1463
|
+
class: ae(["dropdown-item", { "is-active": Ht(k) }]),
|
|
1464
|
+
onMousedown: (oe) => S(k)
|
|
1440
1465
|
}, [
|
|
1441
1466
|
m("div", {
|
|
1442
1467
|
class: "category-tag",
|
|
1443
|
-
style:
|
|
1468
|
+
style: Ee(e.showItemTag ? {} : { display: "none" })
|
|
1444
1469
|
}, [
|
|
1445
1470
|
m("img", {
|
|
1446
1471
|
class: "type-icon",
|
|
1447
|
-
src:
|
|
1472
|
+
src: rt(k.type),
|
|
1448
1473
|
alt: ""
|
|
1449
|
-
}, null, 8,
|
|
1450
|
-
m("span",
|
|
1474
|
+
}, null, 8, Co),
|
|
1475
|
+
m("span", So, _(ct(k.type)), 1)
|
|
1451
1476
|
], 4),
|
|
1452
|
-
m("div",
|
|
1453
|
-
], 42,
|
|
1477
|
+
m("div", ko, _(he(k)), 1)
|
|
1478
|
+
], 42, bo))), 128))
|
|
1454
1479
|
], !0),
|
|
1455
|
-
h(D) ? (A(), b("div",
|
|
1456
|
-
], 64)) :
|
|
1457
|
-
|
|
1458
|
-
|
|
1480
|
+
h(D) ? (A(), b("div", Ro, _(F.value ? "Loading more..." : "正在加载更多..."), 1)) : h(K) && a.value ? (A(), b("div", _o, _(F.value ? "All results have been loaded" : "已加载全部结果"), 1)) : I("", !0)
|
|
1481
|
+
], 64)) : a.value && !h(V) ? (A(), b("div", Oo, [
|
|
1482
|
+
Qe(g.$slots, "noData", {}, () => [
|
|
1483
|
+
tt(_(F.value ? `No results found related to "${a.value}".` : `未找到与 "${a.value}" 相关的结果`), 1)
|
|
1459
1484
|
], !0)
|
|
1460
1485
|
])) : I("", !0)
|
|
1461
1486
|
], 36), [
|
|
1462
1487
|
[
|
|
1463
|
-
|
|
1464
|
-
u.value && (h(R).length > 0 || h(V) ||
|
|
1488
|
+
Wt,
|
|
1489
|
+
u.value && (h(R).length > 0 || h(V) || a.value || h(x).length > 0)
|
|
1465
1490
|
]
|
|
1466
1491
|
])
|
|
1467
1492
|
]))
|
|
1468
1493
|
]));
|
|
1469
1494
|
}
|
|
1470
|
-
}),
|
|
1495
|
+
}), at = (e, t) => {
|
|
1471
1496
|
const n = e.__vccOpts || e;
|
|
1472
1497
|
for (const [o, l] of t)
|
|
1473
1498
|
n[o] = l;
|
|
1474
1499
|
return n;
|
|
1475
|
-
},
|
|
1500
|
+
}, It = /* @__PURE__ */ at(To, [["__scopeId", "data-v-af778256"]]), Eo = { class: "modal-container" }, Vo = { class: "modal-header" }, Do = { class: "header-title" }, Bo = { class: "modal-body" }, Lo = { class: "form-item" }, No = { class: "required" }, Io = { class: "input-box" }, Fo = ["placeholder"], Mo = {
|
|
1476
1501
|
key: 0,
|
|
1477
1502
|
class: "error-message"
|
|
1478
|
-
},
|
|
1503
|
+
}, Uo = { class: "form-item" }, Po = { class: "required" }, Ho = { class: "type-group" }, Qo = ["onClick"], $o = {
|
|
1479
1504
|
key: 0,
|
|
1480
1505
|
class: "check-mark"
|
|
1481
|
-
},
|
|
1506
|
+
}, Jo = { class: "form-item" }, Wo = { class: "required" }, Ko = {
|
|
1482
1507
|
key: 0,
|
|
1483
1508
|
class: "error-message"
|
|
1484
|
-
},
|
|
1509
|
+
}, qo = { class: "modal-footer" }, Go = {
|
|
1485
1510
|
__name: "ApplyDataDialog",
|
|
1486
1511
|
props: {
|
|
1487
1512
|
// v-model 绑定,默认 false
|
|
@@ -1507,10 +1532,10 @@ const qn = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAA
|
|
|
1507
1532
|
{ typeCn: "城市", typeEn: "City", type: "City" },
|
|
1508
1533
|
{ typeCn: "海运港口", typeEn: "Port", type: "Seaport" },
|
|
1509
1534
|
{ typeCn: "机场", typeEn: "Airport", type: "Airport" }
|
|
1510
|
-
], i = E(null), s =
|
|
1535
|
+
], i = E(null), s = qe({
|
|
1511
1536
|
name: "",
|
|
1512
1537
|
country: ""
|
|
1513
|
-
}),
|
|
1538
|
+
}), a = qe({
|
|
1514
1539
|
name: "",
|
|
1515
1540
|
type: "City"
|
|
1516
1541
|
}), c = M(() => {
|
|
@@ -1536,61 +1561,61 @@ const qn = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAA
|
|
|
1536
1561
|
} catch {
|
|
1537
1562
|
}
|
|
1538
1563
|
return !1;
|
|
1539
|
-
}),
|
|
1564
|
+
}), r = () => {
|
|
1540
1565
|
s.name = "", s.country = "", o("update:value", !1);
|
|
1541
1566
|
}, u = () => {
|
|
1542
1567
|
s.name = "", s.country = "";
|
|
1543
1568
|
let f = !0;
|
|
1544
|
-
|
|
1569
|
+
a.name.trim() || (s.name = "Data name is required", f = !1), i.value || (s.country = "Please select a country", f = !1), f && o("confirm", { ...a, country: i.value });
|
|
1545
1570
|
};
|
|
1546
1571
|
return (f, d) => e.value ? (A(), b("div", {
|
|
1547
1572
|
key: 0,
|
|
1548
1573
|
class: "modal-mask",
|
|
1549
|
-
onClick:
|
|
1574
|
+
onClick: le(r, ["self"])
|
|
1550
1575
|
}, [
|
|
1551
|
-
m("div",
|
|
1552
|
-
m("div",
|
|
1553
|
-
m("span",
|
|
1576
|
+
m("div", Eo, [
|
|
1577
|
+
m("div", Vo, [
|
|
1578
|
+
m("span", Do, _(c.value ? "Apply for data addition" : "申请补充数据"), 1),
|
|
1554
1579
|
m("div", {
|
|
1555
1580
|
class: "close-btn",
|
|
1556
|
-
onClick:
|
|
1581
|
+
onClick: r
|
|
1557
1582
|
}, "×")
|
|
1558
1583
|
]),
|
|
1559
|
-
m("div",
|
|
1560
|
-
m("div",
|
|
1561
|
-
m("label",
|
|
1562
|
-
m("div",
|
|
1563
|
-
|
|
1564
|
-
"onUpdate:modelValue": d[0] || (d[0] = (p) =>
|
|
1584
|
+
m("div", Bo, [
|
|
1585
|
+
m("div", Lo, [
|
|
1586
|
+
m("label", No, _(c.value ? "Data To Add" : "需补充的数据"), 1),
|
|
1587
|
+
m("div", Io, [
|
|
1588
|
+
Be(m("input", {
|
|
1589
|
+
"onUpdate:modelValue": d[0] || (d[0] = (p) => a.name = p),
|
|
1565
1590
|
type: "text",
|
|
1566
1591
|
placeholder: e.placeholder ?? (c.value ? " Please enter" : "请输入"),
|
|
1567
|
-
class:
|
|
1592
|
+
class: ae(["custom-input", { "input-error": s.name }]),
|
|
1568
1593
|
onInput: d[1] || (d[1] = (p) => s.name = "")
|
|
1569
|
-
}, null, 42,
|
|
1570
|
-
[
|
|
1594
|
+
}, null, 42, Fo), [
|
|
1595
|
+
[et, a.name]
|
|
1571
1596
|
])
|
|
1572
1597
|
]),
|
|
1573
|
-
s.name ? (A(), b("div",
|
|
1598
|
+
s.name ? (A(), b("div", Mo, _(s.name), 1)) : I("", !0)
|
|
1574
1599
|
]),
|
|
1575
|
-
m("div",
|
|
1576
|
-
m("label",
|
|
1577
|
-
m("div",
|
|
1578
|
-
(A(), b(
|
|
1600
|
+
m("div", Uo, [
|
|
1601
|
+
m("label", Po, _(c.value ? "Type" : "所属类别"), 1),
|
|
1602
|
+
m("div", Ho, [
|
|
1603
|
+
(A(), b(se, null, ge(l, (p) => m("div", {
|
|
1579
1604
|
key: p.type,
|
|
1580
|
-
class:
|
|
1581
|
-
onClick: (v) =>
|
|
1605
|
+
class: ae(["type-btn", { active: a.type === p.type }]),
|
|
1606
|
+
onClick: (v) => a.type = p.type
|
|
1582
1607
|
}, [
|
|
1583
|
-
|
|
1584
|
-
|
|
1585
|
-
], 10,
|
|
1608
|
+
tt(_(c.value ? p.typeEn : p.typeCn) + " ", 1),
|
|
1609
|
+
a.type === p.type ? (A(), b("div", $o)) : I("", !0)
|
|
1610
|
+
], 10, Qo)), 64))
|
|
1586
1611
|
])
|
|
1587
1612
|
]),
|
|
1588
|
-
m("div",
|
|
1589
|
-
m("label",
|
|
1613
|
+
m("div", Jo, [
|
|
1614
|
+
m("label", Wo, _(c.value ? "Country" : "国家"), 1),
|
|
1590
1615
|
m("div", {
|
|
1591
|
-
class:
|
|
1616
|
+
class: ae({ "search-error-wrap": s.country })
|
|
1592
1617
|
}, [
|
|
1593
|
-
L(
|
|
1618
|
+
L(It, {
|
|
1594
1619
|
"search-type-list": ["Country"],
|
|
1595
1620
|
"model-value": i.value,
|
|
1596
1621
|
"onUpdate:modelValue": [
|
|
@@ -1602,10 +1627,10 @@ const qn = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAA
|
|
|
1602
1627
|
placeholder: e.placeholder ?? (c.value ? " Please enter" : "请输入")
|
|
1603
1628
|
}, null, 8, ["model-value", "lang", "placeholder"])
|
|
1604
1629
|
], 2),
|
|
1605
|
-
s.country ? (A(), b("div",
|
|
1630
|
+
s.country ? (A(), b("div", Ko, _(s.country), 1)) : I("", !0)
|
|
1606
1631
|
])
|
|
1607
1632
|
]),
|
|
1608
|
-
m("div",
|
|
1633
|
+
m("div", qo, [
|
|
1609
1634
|
m("button", {
|
|
1610
1635
|
class: "confirm-btn",
|
|
1611
1636
|
onClick: u
|
|
@@ -1614,7 +1639,7 @@ const qn = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAA
|
|
|
1614
1639
|
])
|
|
1615
1640
|
])) : I("", !0);
|
|
1616
1641
|
}
|
|
1617
|
-
},
|
|
1642
|
+
}, Yo = /* @__PURE__ */ at(Go, [["__scopeId", "data-v-9c778fb9"]]), zo = { class: "global-modal-header-custom" }, jo = { class: "global-modal-body-custom" }, Xo = { class: "global-modal-footer-custom" }, Zo = /* @__PURE__ */ Xe({
|
|
1618
1643
|
__name: "GlobalModal",
|
|
1619
1644
|
setup(e) {
|
|
1620
1645
|
const t = E(), n = E(!1), o = E({
|
|
@@ -1624,7 +1649,7 @@ const qn = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAA
|
|
|
1624
1649
|
phone: "",
|
|
1625
1650
|
name: "",
|
|
1626
1651
|
agreement: !1
|
|
1627
|
-
}), l =
|
|
1652
|
+
}), l = qe({
|
|
1628
1653
|
city: [{ required: !0, message: "请输入所在地城市", trigger: "blur" }],
|
|
1629
1654
|
company: [{ required: !0, message: "请输入公司名称", trigger: "blur" }],
|
|
1630
1655
|
email: [
|
|
@@ -1633,17 +1658,17 @@ const qn = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAA
|
|
|
1633
1658
|
],
|
|
1634
1659
|
agreement: [
|
|
1635
1660
|
{
|
|
1636
|
-
validator: (c,
|
|
1637
|
-
|
|
1661
|
+
validator: (c, r, u) => {
|
|
1662
|
+
r ? u() : u(new Error("请同意隐私政策"));
|
|
1638
1663
|
},
|
|
1639
1664
|
trigger: "change"
|
|
1640
1665
|
}
|
|
1641
1666
|
]
|
|
1642
1667
|
}), i = () => {
|
|
1643
|
-
n.value = !1,
|
|
1668
|
+
n.value = !1, fe.emit(pe.Close, void 0), t.value?.resetFields();
|
|
1644
1669
|
}, s = async () => {
|
|
1645
1670
|
t.value && await t.value.validate((c) => {
|
|
1646
|
-
c && (
|
|
1671
|
+
c && (fe.emit(pe.Submit, o.value), i(), o.value = {
|
|
1647
1672
|
city: "",
|
|
1648
1673
|
company: "",
|
|
1649
1674
|
email: "",
|
|
@@ -1652,16 +1677,16 @@ const qn = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAA
|
|
|
1652
1677
|
agreement: !1
|
|
1653
1678
|
});
|
|
1654
1679
|
});
|
|
1655
|
-
},
|
|
1680
|
+
}, a = (c) => {
|
|
1656
1681
|
n.value = !0;
|
|
1657
1682
|
};
|
|
1658
|
-
return
|
|
1659
|
-
|
|
1660
|
-
}),
|
|
1661
|
-
|
|
1662
|
-
}), (c,
|
|
1683
|
+
return je(() => {
|
|
1684
|
+
fe.on(pe.Open, a);
|
|
1685
|
+
}), Kt(() => {
|
|
1686
|
+
fe.off(pe.Open, a);
|
|
1687
|
+
}), (c, r) => (A(), Ze(h(zt), {
|
|
1663
1688
|
modelValue: n.value,
|
|
1664
|
-
"onUpdate:modelValue":
|
|
1689
|
+
"onUpdate:modelValue": r[7] || (r[7] = (u) => n.value = u),
|
|
1665
1690
|
"before-close": i,
|
|
1666
1691
|
"show-close": !1,
|
|
1667
1692
|
"close-on-click-modal": !0,
|
|
@@ -1669,15 +1694,15 @@ const qn = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAA
|
|
|
1669
1694
|
class: "global-modal-custom"
|
|
1670
1695
|
}, {
|
|
1671
1696
|
header: N(() => [
|
|
1672
|
-
m("div",
|
|
1673
|
-
|
|
1674
|
-
L(h(
|
|
1697
|
+
m("div", zo, [
|
|
1698
|
+
r[9] || (r[9] = m("h2", null, "即刻链接全球货代", -1)),
|
|
1699
|
+
L(h(ft), {
|
|
1675
1700
|
link: "",
|
|
1676
1701
|
onClick: i,
|
|
1677
1702
|
class: "close-button-custom",
|
|
1678
1703
|
"aria-label": "Close"
|
|
1679
1704
|
}, {
|
|
1680
|
-
default: N(() => [...
|
|
1705
|
+
default: N(() => [...r[8] || (r[8] = [
|
|
1681
1706
|
m("span", { style: { "font-size": "2rem" } }, "×", -1)
|
|
1682
1707
|
])]),
|
|
1683
1708
|
_: 1
|
|
@@ -1685,43 +1710,43 @@ const qn = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAA
|
|
|
1685
1710
|
])
|
|
1686
1711
|
]),
|
|
1687
1712
|
footer: N(() => [
|
|
1688
|
-
m("div",
|
|
1689
|
-
L(h(
|
|
1713
|
+
m("div", Xo, [
|
|
1714
|
+
L(h(ft), {
|
|
1690
1715
|
type: "primary",
|
|
1691
1716
|
class: "submit-button-custom",
|
|
1692
1717
|
onClick: s
|
|
1693
1718
|
}, {
|
|
1694
|
-
default: N(() => [...
|
|
1695
|
-
|
|
1719
|
+
default: N(() => [...r[11] || (r[11] = [
|
|
1720
|
+
tt(" 加入会员 ", -1)
|
|
1696
1721
|
])]),
|
|
1697
1722
|
_: 1
|
|
1698
1723
|
})
|
|
1699
1724
|
])
|
|
1700
1725
|
]),
|
|
1701
1726
|
default: N(() => [
|
|
1702
|
-
m("div",
|
|
1703
|
-
L(h(
|
|
1727
|
+
m("div", jo, [
|
|
1728
|
+
L(h(jt), {
|
|
1704
1729
|
model: o.value,
|
|
1705
1730
|
rules: l,
|
|
1706
1731
|
ref_key: "formRef",
|
|
1707
1732
|
ref: t,
|
|
1708
1733
|
"label-position": "top",
|
|
1709
|
-
onSubmit:
|
|
1734
|
+
onSubmit: r[6] || (r[6] = le(() => {
|
|
1710
1735
|
}, ["prevent"]))
|
|
1711
1736
|
}, {
|
|
1712
1737
|
default: N(() => [
|
|
1713
|
-
L(h(
|
|
1738
|
+
L(h($e), { gutter: 20 }, {
|
|
1714
1739
|
default: N(() => [
|
|
1715
|
-
L(h(
|
|
1740
|
+
L(h(Ce), { span: 12 }, {
|
|
1716
1741
|
default: N(() => [
|
|
1717
|
-
L(h(
|
|
1742
|
+
L(h(ve), {
|
|
1718
1743
|
label: "所在地(城市)",
|
|
1719
1744
|
prop: "city"
|
|
1720
1745
|
}, {
|
|
1721
1746
|
default: N(() => [
|
|
1722
|
-
L(h(
|
|
1747
|
+
L(h(Se), {
|
|
1723
1748
|
modelValue: o.value.city,
|
|
1724
|
-
"onUpdate:modelValue":
|
|
1749
|
+
"onUpdate:modelValue": r[0] || (r[0] = (u) => o.value.city = u),
|
|
1725
1750
|
placeholder: "请输入城市"
|
|
1726
1751
|
}, null, 8, ["modelValue"])
|
|
1727
1752
|
]),
|
|
@@ -1730,16 +1755,16 @@ const qn = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAA
|
|
|
1730
1755
|
]),
|
|
1731
1756
|
_: 1
|
|
1732
1757
|
}),
|
|
1733
|
-
L(h(
|
|
1758
|
+
L(h(Ce), { span: 12 }, {
|
|
1734
1759
|
default: N(() => [
|
|
1735
|
-
L(h(
|
|
1760
|
+
L(h(ve), {
|
|
1736
1761
|
label: "公司名称",
|
|
1737
1762
|
prop: "company"
|
|
1738
1763
|
}, {
|
|
1739
1764
|
default: N(() => [
|
|
1740
|
-
L(h(
|
|
1765
|
+
L(h(Se), {
|
|
1741
1766
|
modelValue: o.value.company,
|
|
1742
|
-
"onUpdate:modelValue":
|
|
1767
|
+
"onUpdate:modelValue": r[1] || (r[1] = (u) => o.value.company = u),
|
|
1743
1768
|
placeholder: "请输入公司名称"
|
|
1744
1769
|
}, null, 8, ["modelValue"])
|
|
1745
1770
|
]),
|
|
@@ -1751,18 +1776,18 @@ const qn = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAA
|
|
|
1751
1776
|
]),
|
|
1752
1777
|
_: 1
|
|
1753
1778
|
}),
|
|
1754
|
-
L(h(
|
|
1779
|
+
L(h($e), { gutter: 20 }, {
|
|
1755
1780
|
default: N(() => [
|
|
1756
|
-
L(h(
|
|
1781
|
+
L(h(Ce), { span: 12 }, {
|
|
1757
1782
|
default: N(() => [
|
|
1758
|
-
L(h(
|
|
1783
|
+
L(h(ve), {
|
|
1759
1784
|
label: "邮箱",
|
|
1760
1785
|
prop: "email"
|
|
1761
1786
|
}, {
|
|
1762
1787
|
default: N(() => [
|
|
1763
|
-
L(h(
|
|
1788
|
+
L(h(Se), {
|
|
1764
1789
|
modelValue: o.value.email,
|
|
1765
|
-
"onUpdate:modelValue":
|
|
1790
|
+
"onUpdate:modelValue": r[2] || (r[2] = (u) => o.value.email = u),
|
|
1766
1791
|
placeholder: "请输入邮箱"
|
|
1767
1792
|
}, null, 8, ["modelValue"])
|
|
1768
1793
|
]),
|
|
@@ -1771,16 +1796,16 @@ const qn = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAA
|
|
|
1771
1796
|
]),
|
|
1772
1797
|
_: 1
|
|
1773
1798
|
}),
|
|
1774
|
-
L(h(
|
|
1799
|
+
L(h(Ce), { span: 12 }, {
|
|
1775
1800
|
default: N(() => [
|
|
1776
|
-
L(h(
|
|
1801
|
+
L(h(ve), {
|
|
1777
1802
|
label: "电话",
|
|
1778
1803
|
prop: "phone"
|
|
1779
1804
|
}, {
|
|
1780
1805
|
default: N(() => [
|
|
1781
|
-
L(h(
|
|
1806
|
+
L(h(Se), {
|
|
1782
1807
|
modelValue: o.value.phone,
|
|
1783
|
-
"onUpdate:modelValue":
|
|
1808
|
+
"onUpdate:modelValue": r[3] || (r[3] = (u) => o.value.phone = u),
|
|
1784
1809
|
placeholder: "请输入电话"
|
|
1785
1810
|
}, null, 8, ["modelValue"])
|
|
1786
1811
|
]),
|
|
@@ -1792,18 +1817,18 @@ const qn = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAA
|
|
|
1792
1817
|
]),
|
|
1793
1818
|
_: 1
|
|
1794
1819
|
}),
|
|
1795
|
-
L(h(
|
|
1820
|
+
L(h($e), null, {
|
|
1796
1821
|
default: N(() => [
|
|
1797
|
-
L(h(
|
|
1822
|
+
L(h(Ce), { span: 24 }, {
|
|
1798
1823
|
default: N(() => [
|
|
1799
|
-
L(h(
|
|
1824
|
+
L(h(ve), {
|
|
1800
1825
|
label: "姓名",
|
|
1801
1826
|
prop: "name"
|
|
1802
1827
|
}, {
|
|
1803
1828
|
default: N(() => [
|
|
1804
|
-
L(h(
|
|
1829
|
+
L(h(Se), {
|
|
1805
1830
|
modelValue: o.value.name,
|
|
1806
|
-
"onUpdate:modelValue":
|
|
1831
|
+
"onUpdate:modelValue": r[4] || (r[4] = (u) => o.value.name = u),
|
|
1807
1832
|
placeholder: "请输入您的全名"
|
|
1808
1833
|
}, null, 8, ["modelValue"])
|
|
1809
1834
|
]),
|
|
@@ -1815,17 +1840,17 @@ const qn = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAA
|
|
|
1815
1840
|
]),
|
|
1816
1841
|
_: 1
|
|
1817
1842
|
}),
|
|
1818
|
-
L(h(
|
|
1843
|
+
L(h(ve), {
|
|
1819
1844
|
prop: "agreement",
|
|
1820
1845
|
class: "agreement-item"
|
|
1821
1846
|
}, {
|
|
1822
1847
|
default: N(() => [
|
|
1823
|
-
L(h(
|
|
1848
|
+
L(h(Xt), {
|
|
1824
1849
|
modelValue: o.value.agreement,
|
|
1825
|
-
"onUpdate:modelValue":
|
|
1850
|
+
"onUpdate:modelValue": r[5] || (r[5] = (u) => o.value.agreement = u),
|
|
1826
1851
|
label: "我同意"
|
|
1827
1852
|
}, null, 8, ["modelValue"]),
|
|
1828
|
-
|
|
1853
|
+
r[10] || (r[10] = m("a", {
|
|
1829
1854
|
href: "#",
|
|
1830
1855
|
class: "privacy-link"
|
|
1831
1856
|
}, "隐私政策", -1))
|
|
@@ -1841,18 +1866,18 @@ const qn = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAA
|
|
|
1841
1866
|
}, 8, ["modelValue"]));
|
|
1842
1867
|
}
|
|
1843
1868
|
});
|
|
1844
|
-
function
|
|
1869
|
+
function el(e) {
|
|
1845
1870
|
const t = E([]), n = "_search_history_cache", o = typeof window < "u" && typeof localStorage < "u", l = M(
|
|
1846
1871
|
() => (e.value || "") + n
|
|
1847
1872
|
), i = M(
|
|
1848
1873
|
() => !!e.value && e.value !== ""
|
|
1849
1874
|
), s = (c) => {
|
|
1850
1875
|
if (!c || !o) return;
|
|
1851
|
-
const
|
|
1876
|
+
const r = t.value.filter(
|
|
1852
1877
|
(f) => f.id && f.id !== c.id || f.display !== c.display
|
|
1853
1878
|
);
|
|
1854
|
-
|
|
1855
|
-
const u =
|
|
1879
|
+
r.unshift(c);
|
|
1880
|
+
const u = r.slice(0, 4);
|
|
1856
1881
|
if (i.value) {
|
|
1857
1882
|
t.value = u;
|
|
1858
1883
|
try {
|
|
@@ -1861,10 +1886,10 @@ function Go(e) {
|
|
|
1861
1886
|
console.warn("LocalStorage save failed:", f);
|
|
1862
1887
|
}
|
|
1863
1888
|
}
|
|
1864
|
-
},
|
|
1889
|
+
}, a = () => {
|
|
1865
1890
|
t.value = [], o && localStorage.removeItem(l.value);
|
|
1866
1891
|
};
|
|
1867
|
-
return
|
|
1892
|
+
return je(() => {
|
|
1868
1893
|
if (o && i.value) {
|
|
1869
1894
|
const c = localStorage.getItem(l.value);
|
|
1870
1895
|
if (c)
|
|
@@ -1877,29 +1902,29 @@ function Go(e) {
|
|
|
1877
1902
|
}), {
|
|
1878
1903
|
searchHistory: t,
|
|
1879
1904
|
saveToHistory: s,
|
|
1880
|
-
clearHistory:
|
|
1905
|
+
clearHistory: a,
|
|
1881
1906
|
HasHistory: i
|
|
1882
1907
|
};
|
|
1883
1908
|
}
|
|
1884
|
-
async function
|
|
1909
|
+
async function tl(e, t = [
|
|
1885
1910
|
"Continent",
|
|
1886
1911
|
"Country",
|
|
1887
1912
|
"City",
|
|
1888
1913
|
"Seaport",
|
|
1889
1914
|
"Airport"
|
|
1890
1915
|
], n = {}) {
|
|
1891
|
-
return
|
|
1916
|
+
return nt.searchByName({
|
|
1892
1917
|
keyword: e,
|
|
1893
1918
|
displayInfo: t,
|
|
1894
1919
|
...n
|
|
1895
1920
|
});
|
|
1896
1921
|
}
|
|
1897
|
-
function
|
|
1898
|
-
const n = E([]), o = E(!1), l = E(!1), i = E(!1), s = E(1),
|
|
1922
|
+
function nl(e, t) {
|
|
1923
|
+
const n = E([]), o = E(!1), l = E(!1), i = E(!1), s = E(1), a = 10, c = E(0), r = M(() => {
|
|
1899
1924
|
const d = [...t.value];
|
|
1900
1925
|
return d.includes("Country") && !d.includes("Region") && d.push("Region"), d;
|
|
1901
1926
|
}), u = (d) => Array.isArray(d) ? d.filter(
|
|
1902
|
-
(p) =>
|
|
1927
|
+
(p) => r.value.includes(p.type)
|
|
1903
1928
|
) : [];
|
|
1904
1929
|
return {
|
|
1905
1930
|
searchResults: n,
|
|
@@ -1920,15 +1945,15 @@ function zo(e, t) {
|
|
|
1920
1945
|
o.value = !0, s.value = 1, i.value = !1;
|
|
1921
1946
|
}
|
|
1922
1947
|
try {
|
|
1923
|
-
const v = await
|
|
1948
|
+
const v = await tl(
|
|
1924
1949
|
p,
|
|
1925
1950
|
t.value,
|
|
1926
1951
|
{
|
|
1927
1952
|
current: s.value,
|
|
1928
|
-
size:
|
|
1953
|
+
size: a
|
|
1929
1954
|
}
|
|
1930
1955
|
), w = u(v.records || []);
|
|
1931
|
-
d ? n.value.push(...w) : n.value = w, c.value = v.total || 0, (n.value.length >= c.value || w.length <
|
|
1956
|
+
d ? n.value.push(...w) : n.value = w, c.value = v.total || 0, (n.value.length >= c.value || w.length < a) && (i.value = !0);
|
|
1932
1957
|
} catch (v) {
|
|
1933
1958
|
console.error("Search request failed:", v), d && (s.value -= 1);
|
|
1934
1959
|
} finally {
|
|
@@ -1937,37 +1962,37 @@ function zo(e, t) {
|
|
|
1937
1962
|
}
|
|
1938
1963
|
};
|
|
1939
1964
|
}
|
|
1940
|
-
const
|
|
1965
|
+
const ol = { class: "h5-search-container" }, ll = { class: "trigger-content" }, sl = ["src"], il = { class: "placeholder-text" }, al = {
|
|
1941
1966
|
key: 0,
|
|
1942
1967
|
class: "selected-count"
|
|
1943
|
-
},
|
|
1968
|
+
}, rl = {
|
|
1944
1969
|
key: 1,
|
|
1945
1970
|
class: "selected-val"
|
|
1946
|
-
},
|
|
1971
|
+
}, cl = {
|
|
1947
1972
|
key: 2,
|
|
1948
1973
|
class: "placeholder-gray"
|
|
1949
|
-
},
|
|
1974
|
+
}, ul = {
|
|
1950
1975
|
key: 0,
|
|
1951
1976
|
class: "h5-modal-root"
|
|
1952
|
-
},
|
|
1977
|
+
}, dl = { class: "h5-drawer-card" }, fl = { class: "h5-header" }, pl = { class: "h5-input-wrapper" }, ml = ["src"], hl = ["placeholder"], vl = {
|
|
1953
1978
|
key: 0,
|
|
1954
1979
|
class: "h5-spinner-box"
|
|
1955
|
-
},
|
|
1980
|
+
}, gl = {
|
|
1956
1981
|
key: 1,
|
|
1957
1982
|
class: "h5-section"
|
|
1958
|
-
},
|
|
1983
|
+
}, yl = { class: "h5-section-hd" }, Al = { class: "h5-history-grid" }, wl = ["onClick"], xl = {
|
|
1959
1984
|
key: 2,
|
|
1960
1985
|
class: "h5-result-list"
|
|
1961
|
-
},
|
|
1986
|
+
}, bl = ["onClick"], Cl = { class: "item-info" }, Sl = { class: "item-name" }, kl = {
|
|
1962
1987
|
key: 0,
|
|
1963
1988
|
class: "item-sub"
|
|
1964
|
-
},
|
|
1989
|
+
}, Rl = { class: "h5-load-status" }, _l = {
|
|
1965
1990
|
key: 1,
|
|
1966
1991
|
class: "no-more"
|
|
1967
|
-
},
|
|
1992
|
+
}, Ol = {
|
|
1968
1993
|
key: 3,
|
|
1969
1994
|
class: "h5-empty"
|
|
1970
|
-
},
|
|
1995
|
+
}, Tl = /* @__PURE__ */ Xe({
|
|
1971
1996
|
__name: "index",
|
|
1972
1997
|
props: {
|
|
1973
1998
|
modelValue: {},
|
|
@@ -1978,24 +2003,24 @@ const jo = { class: "h5-search-container" }, Xo = { class: "trigger-content" },
|
|
|
1978
2003
|
},
|
|
1979
2004
|
emits: ["update:modelValue", "select"],
|
|
1980
2005
|
setup(e, { emit: t }) {
|
|
1981
|
-
const n = e, o = t, l = E(!1), i = E(""), s = E(null),
|
|
2006
|
+
const n = e, o = t, l = E(!1), i = E(""), s = E(null), a = E(null);
|
|
1982
2007
|
let c = null;
|
|
1983
|
-
const { searchHistory:
|
|
1984
|
-
|
|
1985
|
-
), { searchResults: d, loading: p, isFetchingMore: v, isFinished: w, fetchData: x } =
|
|
2008
|
+
const { searchHistory: r, saveToHistory: u, clearHistory: f } = el(
|
|
2009
|
+
Ke(n, "historyKey")
|
|
2010
|
+
), { searchResults: d, loading: p, isFetchingMore: v, isFinished: w, fetchData: x } = nl(i, E(["City", "Seaport", "Airport"])), y = M(() => {
|
|
1986
2011
|
if (n.lang)
|
|
1987
2012
|
return n.lang === "en" || n.lang === "en-US";
|
|
1988
2013
|
try {
|
|
1989
2014
|
if (typeof useCookie == "function") {
|
|
1990
|
-
const
|
|
1991
|
-
if (
|
|
1992
|
-
return /^en(-US)?$/.test(
|
|
2015
|
+
const S = useCookie("jc-language")?.value;
|
|
2016
|
+
if (S)
|
|
2017
|
+
return /^en(-US)?$/.test(S);
|
|
1993
2018
|
}
|
|
1994
2019
|
} catch {
|
|
1995
2020
|
}
|
|
1996
2021
|
if (typeof document < "u") {
|
|
1997
|
-
const
|
|
1998
|
-
return /(^|;\s*)jc-language=en(-US)?(;|$)/.test(
|
|
2022
|
+
const S = document.cookie || "";
|
|
2023
|
+
return /(^|;\s*)jc-language=en(-US)?(;|$)/.test(S);
|
|
1999
2024
|
}
|
|
2000
2025
|
try {
|
|
2001
2026
|
if (typeof useNuxtApp == "function") {
|
|
@@ -2005,59 +2030,59 @@ const jo = { class: "h5-search-container" }, Xo = { class: "trigger-content" },
|
|
|
2005
2030
|
} catch {
|
|
2006
2031
|
}
|
|
2007
2032
|
return !1;
|
|
2008
|
-
}),
|
|
2033
|
+
}), C = M(
|
|
2009
2034
|
() => Array.isArray(n.modelValue) ? n.modelValue : n.modelValue ? [n.modelValue] : []
|
|
2010
2035
|
), R = M(() => !n.multiple && !!n.modelValue), V = M(
|
|
2011
2036
|
() => R.value ? F(n.modelValue) : ""
|
|
2012
|
-
), D = M(() =>
|
|
2013
|
-
l.value = !0,
|
|
2037
|
+
), D = M(() => C.value.length > 0), K = () => {
|
|
2038
|
+
l.value = !0, qt(() => {
|
|
2014
2039
|
s.value?.focus();
|
|
2015
2040
|
});
|
|
2016
2041
|
}, U = () => {
|
|
2017
2042
|
l.value = !1, i.value = "";
|
|
2018
|
-
}, Q = (
|
|
2019
|
-
u(
|
|
2020
|
-
},
|
|
2043
|
+
}, Q = (S) => {
|
|
2044
|
+
u(S), n.multiple ? C.value.some((T) => T.id === S.id) || o("update:modelValue", [...C.value, S]) : (o("update:modelValue", S), U()), o("select", S);
|
|
2045
|
+
}, q = () => {
|
|
2021
2046
|
o("update:modelValue", n.multiple ? [] : null);
|
|
2022
|
-
}, P = E(!1),
|
|
2023
|
-
const O =
|
|
2047
|
+
}, P = E(!1), ne = (S) => {
|
|
2048
|
+
const O = S.target;
|
|
2024
2049
|
if (!O) return;
|
|
2025
2050
|
O.scrollTop + O.clientHeight >= O.scrollHeight - 80 && i.value && !p.value && !v.value && !w.value && !P.value && (P.value = !0, x(!0));
|
|
2026
2051
|
};
|
|
2027
|
-
|
|
2028
|
-
|
|
2052
|
+
De(v, (S) => {
|
|
2053
|
+
S || (P.value = !1);
|
|
2029
2054
|
});
|
|
2030
|
-
const
|
|
2055
|
+
const j = () => {
|
|
2031
2056
|
c && clearTimeout(c), c = setTimeout(() => {
|
|
2032
|
-
P.value = !1,
|
|
2057
|
+
P.value = !1, a.value?.scrollTo({ top: 0 }), console.log("🍉 ~ index.vue:279 ~ onInput ~ fetchData:", x), x(!1);
|
|
2033
2058
|
}, 300);
|
|
2034
|
-
}, F = (
|
|
2059
|
+
}, F = (S) => y.value ? S.displayEn || S.display : S.displayCn || S.display, G = (S) => {
|
|
2035
2060
|
const O = { City: "城市", Seaport: "港口", Airport: "机场" };
|
|
2036
|
-
return
|
|
2037
|
-
},
|
|
2038
|
-
return (
|
|
2061
|
+
return y.value ? S : O[S] || S;
|
|
2062
|
+
}, ue = (S) => C.value.some((O) => O.id === S.id);
|
|
2063
|
+
return (S, O) => (A(), b("div", ol, [
|
|
2039
2064
|
m("div", {
|
|
2040
2065
|
class: "search-trigger",
|
|
2041
|
-
onClick:
|
|
2066
|
+
onClick: K
|
|
2042
2067
|
}, [
|
|
2043
|
-
m("div",
|
|
2068
|
+
m("div", ll, [
|
|
2044
2069
|
m("img", {
|
|
2045
|
-
src: h(
|
|
2070
|
+
src: h(ze),
|
|
2046
2071
|
class: "search-icon-m"
|
|
2047
|
-
}, null, 8,
|
|
2048
|
-
m("div",
|
|
2049
|
-
e.multiple &&
|
|
2072
|
+
}, null, 8, sl),
|
|
2073
|
+
m("div", il, [
|
|
2074
|
+
e.multiple && C.value.length > 0 ? (A(), b("span", al, _(y.value ? "Selected" : "已选") + " (" + _(C.value.length) + ")", 1)) : !e.multiple && R.value ? (A(), b("span", rl, _(V.value), 1)) : (A(), b("span", cl, _(e.placeholder || (y.value ? "Search" : "搜索")), 1))
|
|
2050
2075
|
])
|
|
2051
2076
|
]),
|
|
2052
2077
|
D.value ? (A(), b("span", {
|
|
2053
2078
|
key: 0,
|
|
2054
2079
|
class: "clear-trigger",
|
|
2055
|
-
onClick:
|
|
2080
|
+
onClick: le(q, ["stop"])
|
|
2056
2081
|
}, "ⓧ")) : I("", !0)
|
|
2057
2082
|
]),
|
|
2058
|
-
(A(),
|
|
2059
|
-
l.value ? (A(), b("div",
|
|
2060
|
-
L(
|
|
2083
|
+
(A(), Ze(St, { to: "body" }, [
|
|
2084
|
+
l.value ? (A(), b("div", ul, [
|
|
2085
|
+
L(dt, { name: "fade" }, {
|
|
2061
2086
|
default: N(() => [
|
|
2062
2087
|
m("div", {
|
|
2063
2088
|
class: "h5-mask",
|
|
@@ -2066,27 +2091,27 @@ const jo = { class: "h5-search-container" }, Xo = { class: "trigger-content" },
|
|
|
2066
2091
|
]),
|
|
2067
2092
|
_: 1
|
|
2068
2093
|
}),
|
|
2069
|
-
L(
|
|
2094
|
+
L(dt, { name: "slide-up" }, {
|
|
2070
2095
|
default: N(() => [
|
|
2071
|
-
m("div",
|
|
2096
|
+
m("div", dl, [
|
|
2072
2097
|
m("div", {
|
|
2073
2098
|
class: "drawer-handle",
|
|
2074
2099
|
onClick: U
|
|
2075
2100
|
}),
|
|
2076
|
-
m("div",
|
|
2077
|
-
m("div",
|
|
2101
|
+
m("div", fl, [
|
|
2102
|
+
m("div", pl, [
|
|
2078
2103
|
m("img", {
|
|
2079
|
-
src: h(
|
|
2104
|
+
src: h(ze),
|
|
2080
2105
|
class: "inner-icon"
|
|
2081
|
-
}, null, 8,
|
|
2082
|
-
|
|
2106
|
+
}, null, 8, ml),
|
|
2107
|
+
Be(m("input", {
|
|
2083
2108
|
ref_key: "inputRef",
|
|
2084
2109
|
ref: s,
|
|
2085
2110
|
"onUpdate:modelValue": O[0] || (O[0] = (T) => i.value = T),
|
|
2086
|
-
placeholder:
|
|
2087
|
-
onInput:
|
|
2088
|
-
}, null, 40,
|
|
2089
|
-
[
|
|
2111
|
+
placeholder: y.value ? "City/Port/Airport" : "搜索城市/港口/机场",
|
|
2112
|
+
onInput: j
|
|
2113
|
+
}, null, 40, hl), [
|
|
2114
|
+
[et, i.value]
|
|
2090
2115
|
]),
|
|
2091
2116
|
i.value ? (A(), b("div", {
|
|
2092
2117
|
key: 0,
|
|
@@ -2097,56 +2122,56 @@ const jo = { class: "h5-search-container" }, Xo = { class: "trigger-content" },
|
|
|
2097
2122
|
m("div", {
|
|
2098
2123
|
class: "h5-cancel-btn",
|
|
2099
2124
|
onClick: U
|
|
2100
|
-
}, _(
|
|
2125
|
+
}, _(y.value ? "Cancel" : "取消"), 1)
|
|
2101
2126
|
]),
|
|
2102
2127
|
m("div", {
|
|
2103
2128
|
class: "h5-main-content",
|
|
2104
2129
|
ref_key: "scrollContainer",
|
|
2105
|
-
ref:
|
|
2106
|
-
onScroll:
|
|
2130
|
+
ref: a,
|
|
2131
|
+
onScroll: ne
|
|
2107
2132
|
}, [
|
|
2108
|
-
h(p) && !h(v) ? (A(), b("div",
|
|
2133
|
+
h(p) && !h(v) ? (A(), b("div", vl, [...O[3] || (O[3] = [
|
|
2109
2134
|
m("div", { class: "h5-spinner" }, null, -1)
|
|
2110
2135
|
])])) : I("", !0),
|
|
2111
|
-
!i.value && h(
|
|
2112
|
-
m("div",
|
|
2113
|
-
m("span", null, _(
|
|
2136
|
+
!i.value && h(r).length > 0 ? (A(), b("div", gl, [
|
|
2137
|
+
m("div", yl, [
|
|
2138
|
+
m("span", null, _(y.value ? "Recent" : "最近搜索"), 1),
|
|
2114
2139
|
m("span", {
|
|
2115
2140
|
class: "h5-clear-history",
|
|
2116
2141
|
onClick: O[2] || (O[2] = //@ts-ignore
|
|
2117
2142
|
(...T) => h(f) && h(f)(...T))
|
|
2118
|
-
}, _(
|
|
2143
|
+
}, _(y.value ? "Clear" : "清空"), 1)
|
|
2119
2144
|
]),
|
|
2120
|
-
m("div",
|
|
2121
|
-
(A(!0), b(
|
|
2145
|
+
m("div", Al, [
|
|
2146
|
+
(A(!0), b(se, null, ge(h(r), (T, H) => (A(), b("div", {
|
|
2122
2147
|
key: H,
|
|
2123
2148
|
class: "h5-history-tag",
|
|
2124
|
-
onClick: (
|
|
2125
|
-
}, _(F(T)), 9,
|
|
2149
|
+
onClick: (be) => Q(T)
|
|
2150
|
+
}, _(F(T)), 9, wl))), 128))
|
|
2126
2151
|
])
|
|
2127
2152
|
])) : I("", !0),
|
|
2128
|
-
h(d).length > 0 ? (A(), b("div",
|
|
2129
|
-
(A(!0), b(
|
|
2153
|
+
h(d).length > 0 ? (A(), b("div", xl, [
|
|
2154
|
+
(A(!0), b(se, null, ge(h(d), (T, H) => (A(), b("div", {
|
|
2130
2155
|
key: H,
|
|
2131
|
-
class:
|
|
2132
|
-
onClick: (
|
|
2156
|
+
class: ae(["h5-result-item", { "is-active": ue(T) }]),
|
|
2157
|
+
onClick: (be) => Q(T)
|
|
2133
2158
|
}, [
|
|
2134
2159
|
m("div", {
|
|
2135
|
-
class:
|
|
2136
|
-
}, _(
|
|
2137
|
-
m("div",
|
|
2138
|
-
m("div",
|
|
2139
|
-
T.parentName ? (A(), b("div",
|
|
2160
|
+
class: ae(["item-type", T.type.toLowerCase()])
|
|
2161
|
+
}, _(G(T.type)), 3),
|
|
2162
|
+
m("div", Cl, [
|
|
2163
|
+
m("div", Sl, _(F(T)), 1),
|
|
2164
|
+
T.parentName ? (A(), b("div", kl, _(T.parentName), 1)) : I("", !0)
|
|
2140
2165
|
])
|
|
2141
|
-
], 10,
|
|
2142
|
-
m("div",
|
|
2143
|
-
h(v) ? (A(), b(
|
|
2166
|
+
], 10, bl))), 128)),
|
|
2167
|
+
m("div", Rl, [
|
|
2168
|
+
h(v) ? (A(), b(se, { key: 0 }, [
|
|
2144
2169
|
O[4] || (O[4] = m("div", { class: "mini-spinner" }, null, -1)),
|
|
2145
|
-
m("span", null, _(
|
|
2146
|
-
], 64)) : h(w) && i.value ? (A(), b("span",
|
|
2170
|
+
m("span", null, _(y.value ? "Loading..." : "加载中..."), 1)
|
|
2171
|
+
], 64)) : h(w) && i.value ? (A(), b("span", _l, _(y.value ? "No more results" : "没有更多结果了"), 1)) : I("", !0)
|
|
2147
2172
|
])
|
|
2148
2173
|
])) : I("", !0),
|
|
2149
|
-
i.value && !h(p) && h(d).length === 0 ? (A(), b("div",
|
|
2174
|
+
i.value && !h(p) && h(d).length === 0 ? (A(), b("div", Ol, _(y.value ? "No Results Found" : "未找到相关结果"), 1)) : I("", !0)
|
|
2150
2175
|
], 544)
|
|
2151
2176
|
])
|
|
2152
2177
|
]),
|
|
@@ -2156,53 +2181,53 @@ const jo = { class: "h5-search-container" }, Xo = { class: "trigger-content" },
|
|
|
2156
2181
|
]))
|
|
2157
2182
|
]));
|
|
2158
2183
|
}
|
|
2159
|
-
}),
|
|
2160
|
-
let
|
|
2184
|
+
}), El = /* @__PURE__ */ at(Tl, [["__scopeId", "data-v-c1314e9c"]]);
|
|
2185
|
+
let Vl = {
|
|
2161
2186
|
open() {
|
|
2162
|
-
|
|
2187
|
+
fe.emit(pe.Open);
|
|
2163
2188
|
},
|
|
2164
2189
|
close() {
|
|
2165
|
-
|
|
2190
|
+
fe.emit(pe.Close);
|
|
2166
2191
|
},
|
|
2167
2192
|
onSubmit(e) {
|
|
2168
|
-
|
|
2193
|
+
fe.on(pe.Submit, e);
|
|
2169
2194
|
}
|
|
2170
2195
|
};
|
|
2171
|
-
function
|
|
2196
|
+
function Nl() {
|
|
2172
2197
|
let e = !1;
|
|
2173
2198
|
return {
|
|
2174
2199
|
install(t) {
|
|
2175
2200
|
if (typeof window < "u" && !e) {
|
|
2176
2201
|
const n = document.createElement("div");
|
|
2177
|
-
n.setAttribute("id", "global-modal-root"), document.body.appendChild(n),
|
|
2202
|
+
n.setAttribute("id", "global-modal-root"), document.body.appendChild(n), Gt(Zo).mount(n), e = !0;
|
|
2178
2203
|
}
|
|
2179
|
-
t.config.globalProperties.$globalModal =
|
|
2204
|
+
t.config.globalProperties.$globalModal = Vl;
|
|
2180
2205
|
}
|
|
2181
2206
|
};
|
|
2182
2207
|
}
|
|
2183
|
-
const
|
|
2184
|
-
ApplyDataDialog:
|
|
2185
|
-
JcSearch:
|
|
2186
|
-
JCMSearch:
|
|
2208
|
+
const xt = {
|
|
2209
|
+
ApplyDataDialog: Yo,
|
|
2210
|
+
JcSearch: It,
|
|
2211
|
+
JCMSearch: El
|
|
2187
2212
|
};
|
|
2188
|
-
let
|
|
2189
|
-
const
|
|
2213
|
+
let bt = !1;
|
|
2214
|
+
const Il = {
|
|
2190
2215
|
install(e, t) {
|
|
2191
|
-
if (!
|
|
2192
|
-
|
|
2193
|
-
for (const n in
|
|
2194
|
-
e.component(n,
|
|
2216
|
+
if (!bt) {
|
|
2217
|
+
bt = !0, t?.sharedConfig && Yt(t.sharedConfig);
|
|
2218
|
+
for (const n in xt)
|
|
2219
|
+
e.component(n, xt[n]);
|
|
2195
2220
|
}
|
|
2196
2221
|
}
|
|
2197
2222
|
};
|
|
2198
2223
|
export {
|
|
2199
|
-
|
|
2200
|
-
|
|
2201
|
-
|
|
2202
|
-
|
|
2203
|
-
|
|
2204
|
-
|
|
2205
|
-
|
|
2206
|
-
|
|
2207
|
-
|
|
2224
|
+
Yo as ApplyDataDialog,
|
|
2225
|
+
Zo as GlobalModal,
|
|
2226
|
+
El as JCMSearch,
|
|
2227
|
+
It as JcSearch,
|
|
2228
|
+
Ul as MODAL_ACTION,
|
|
2229
|
+
Nl as createGlobalModalPlugin,
|
|
2230
|
+
Il as default,
|
|
2231
|
+
Pl as emitter,
|
|
2232
|
+
Hl as initSharedConfig
|
|
2208
2233
|
};
|