@jctrans-materials/comps-vue3 1.0.1 → 1.0.2

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