@q1travel/design-system 0.4.0 → 0.5.1

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.
@@ -1,8 +1,8 @@
1
1
  import { jsxs as i, jsx as e, Fragment as U } from "react/jsx-runtime";
2
- import { forwardRef as je, createElement as xe, createContext as Ue, useContext as Ye, useState as E, useRef as T, useCallback as te, useEffect as F, useLayoutEffect as ne, useMemo as ae, useId as L, isValidElement as Re, Fragment as Le, cloneElement as bt } from "react";
3
- import { createPortal as yt } from "react-dom";
4
- const gt = (t) => t.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase(), Ve = (...t) => t.filter((n, r, a) => !!n && n.trim() !== "" && a.indexOf(n) === r).join(" ").trim();
5
- var Nt = {
2
+ import { forwardRef as Ue, createElement as xe, createContext as Ye, useContext as Ve, useState as M, useRef as T, useCallback as ne, useEffect as F, useLayoutEffect as ae, useMemo as re, useId as R, isValidElement as Le, Fragment as Re, cloneElement as kt } from "react";
3
+ import { createPortal as wt } from "react-dom";
4
+ const vt = (t) => t.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase(), Ge = (...t) => t.filter((n, r, a) => !!n && n.trim() !== "" && a.indexOf(n) === r).join(" ").trim();
5
+ var xt = {
6
6
  xmlns: "http://www.w3.org/2000/svg",
7
7
  width: 24,
8
8
  height: 24,
@@ -13,7 +13,7 @@ var Nt = {
13
13
  strokeLinecap: "round",
14
14
  strokeLinejoin: "round"
15
15
  };
16
- const kt = je(
16
+ const Ct = Ue(
17
17
  ({
18
18
  color: t = "currentColor",
19
19
  size: n = 24,
@@ -27,94 +27,94 @@ const kt = je(
27
27
  "svg",
28
28
  {
29
29
  ref: d,
30
- ...Nt,
30
+ ...xt,
31
31
  width: n,
32
32
  height: n,
33
33
  stroke: t,
34
34
  strokeWidth: a ? Number(r) * 24 / Number(n) : r,
35
- className: Ve("lucide", s),
35
+ className: Ge("lucide", s),
36
36
  ...u
37
37
  },
38
38
  [
39
- ...o.map(([b, c]) => xe(b, c)),
39
+ ...o.map(([f, c]) => xe(f, c)),
40
40
  ...Array.isArray(l) ? l : [l]
41
41
  ]
42
42
  )
43
43
  );
44
- const q = (t, n) => {
45
- const r = je(
46
- ({ className: a, ...s }, l) => xe(kt, {
44
+ const z = (t, n) => {
45
+ const r = Ue(
46
+ ({ className: a, ...s }, l) => xe(Ct, {
47
47
  ref: l,
48
48
  iconNode: n,
49
- className: Ve(`lucide-${gt(t)}`, a),
49
+ className: Ge(`lucide-${vt(t)}`, a),
50
50
  ...s
51
51
  })
52
52
  );
53
53
  return r.displayName = `${t}`, r;
54
54
  };
55
- const wt = q("ArrowLeft", [
55
+ const Dt = z("ArrowLeft", [
56
56
  ["path", { d: "m12 19-7-7 7-7", key: "1l729n" }],
57
57
  ["path", { d: "M19 12H5", key: "x3x0zl" }]
58
58
  ]);
59
- const Ge = q("ArrowRight", [
59
+ const Xe = z("ArrowRight", [
60
60
  ["path", { d: "M5 12h14", key: "1ays0h" }],
61
61
  ["path", { d: "m12 5 7 7-7 7", key: "xquz4c" }]
62
62
  ]);
63
- const vt = q("Calendar", [
63
+ const $t = z("Calendar", [
64
64
  ["path", { d: "M8 2v4", key: "1cmpym" }],
65
65
  ["path", { d: "M16 2v4", key: "4m81vk" }],
66
66
  ["rect", { width: "18", height: "18", x: "3", y: "4", rx: "2", key: "1hopcy" }],
67
67
  ["path", { d: "M3 10h18", key: "8toen8" }]
68
68
  ]);
69
- const Z = q("Check", [["path", { d: "M20 6 9 17l-5-5", key: "1gmf2c" }]]);
70
- const Y = q("ChevronDown", [
69
+ const Q = z("Check", [["path", { d: "M20 6 9 17l-5-5", key: "1gmf2c" }]]);
70
+ const Y = z("ChevronDown", [
71
71
  ["path", { d: "m6 9 6 6 6-6", key: "qrunsl" }]
72
72
  ]);
73
- const De = q("ChevronLeft", [
73
+ const De = z("ChevronLeft", [
74
74
  ["path", { d: "m15 18-6-6 6-6", key: "1wnfg3" }]
75
75
  ]);
76
- const Q = q("ChevronRight", [
76
+ const J = z("ChevronRight", [
77
77
  ["path", { d: "m9 18 6-6-6-6", key: "mthhwq" }]
78
78
  ]);
79
- const Xe = q("ChevronUp", [["path", { d: "m18 15-6-6-6 6", key: "153udz" }]]);
80
- const $e = q("CircleAlert", [
79
+ const Ze = z("ChevronUp", [["path", { d: "m18 15-6-6-6 6", key: "153udz" }]]);
80
+ const $e = z("CircleAlert", [
81
81
  ["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
82
82
  ["line", { x1: "12", x2: "12", y1: "8", y2: "12", key: "1pkeuh" }],
83
83
  ["line", { x1: "12", x2: "12.01", y1: "16", y2: "16", key: "4dfq90" }]
84
84
  ]);
85
- const Ze = q("CircleCheck", [
85
+ const Qe = z("CircleCheck", [
86
86
  ["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
87
87
  ["path", { d: "m9 12 2 2 4-4", key: "dzmm74" }]
88
88
  ]);
89
- const Qe = q("CircleX", [
89
+ const Je = z("CircleX", [
90
90
  ["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
91
91
  ["path", { d: "m15 9-6 6", key: "1uzhvr" }],
92
92
  ["path", { d: "m9 9 6 6", key: "z0biqf" }]
93
93
  ]);
94
- const xt = q("Clock", [
94
+ const Et = z("Clock", [
95
95
  ["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
96
96
  ["polyline", { points: "12 6 12 12 16 14", key: "68esgv" }]
97
97
  ]);
98
- const le = q("Copy", [
98
+ const se = z("Copy", [
99
99
  ["rect", { width: "14", height: "14", x: "8", y: "8", rx: "2", ry: "2", key: "17jyea" }],
100
100
  ["path", { d: "M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2", key: "zix9uf" }]
101
101
  ]);
102
- const Je = q("Ellipsis", [
102
+ const et = z("Ellipsis", [
103
103
  ["circle", { cx: "12", cy: "12", r: "1", key: "41hilf" }],
104
104
  ["circle", { cx: "19", cy: "12", r: "1", key: "1wjl8i" }],
105
105
  ["circle", { cx: "5", cy: "12", r: "1", key: "1pcz8c" }]
106
106
  ]);
107
- const Fe = q("FileCode", [
107
+ const Fe = z("FileCode", [
108
108
  ["path", { d: "M10 12.5 8 15l2 2.5", key: "1tg20x" }],
109
109
  ["path", { d: "m14 12.5 2 2.5-2 2.5", key: "yinavb" }],
110
110
  ["path", { d: "M14 2v4a2 2 0 0 0 2 2h4", key: "tnqrlb" }],
111
111
  ["path", { d: "M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7z", key: "1mlx9k" }]
112
112
  ]);
113
- const Ct = q("File", [
113
+ const Mt = z("File", [
114
114
  ["path", { d: "M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z", key: "1rqfz7" }],
115
115
  ["path", { d: "M14 2v4a2 2 0 0 0 2 2h4", key: "tnqrlb" }]
116
116
  ]);
117
- const Dt = q("FolderOpen", [
117
+ const It = z("FolderOpen", [
118
118
  [
119
119
  "path",
120
120
  {
@@ -123,7 +123,7 @@ const Dt = q("FolderOpen", [
123
123
  }
124
124
  ]
125
125
  ]);
126
- const $t = q("Folder", [
126
+ const Tt = z("Folder", [
127
127
  [
128
128
  "path",
129
129
  {
@@ -132,13 +132,13 @@ const $t = q("Folder", [
132
132
  }
133
133
  ]
134
134
  ]);
135
- const Mt = q("Frown", [
135
+ const At = z("Frown", [
136
136
  ["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
137
137
  ["path", { d: "M16 16s-1.5-2-4-2-4 2-4 2", key: "epbg0q" }],
138
138
  ["line", { x1: "9", x2: "9.01", y1: "9", y2: "9", key: "yxxnd0" }],
139
139
  ["line", { x1: "15", x2: "15.01", y1: "9", y2: "9", key: "1p4y9e" }]
140
140
  ]);
141
- const Et = q("Heart", [
141
+ const St = z("Heart", [
142
142
  [
143
143
  "path",
144
144
  {
@@ -147,41 +147,41 @@ const Et = q("Heart", [
147
147
  }
148
148
  ]
149
149
  ]);
150
- const de = q("Info", [
150
+ const ue = z("Info", [
151
151
  ["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
152
152
  ["path", { d: "M12 16v-4", key: "1dtifu" }],
153
153
  ["path", { d: "M12 8h.01", key: "e9boi3" }]
154
154
  ]);
155
- const me = q("LoaderCircle", [
155
+ const he = z("LoaderCircle", [
156
156
  ["path", { d: "M21 12a9 9 0 1 1-6.219-8.56", key: "13zald" }]
157
157
  ]);
158
- const It = q("Lock", [
158
+ const qt = z("Lock", [
159
159
  ["rect", { width: "18", height: "11", x: "3", y: "11", rx: "2", ry: "2", key: "1w4ew1" }],
160
160
  ["path", { d: "M7 11V7a5 5 0 0 1 10 0v4", key: "fwvmzm" }]
161
161
  ]);
162
- const Tt = q("Meh", [
162
+ const zt = z("Meh", [
163
163
  ["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
164
164
  ["line", { x1: "8", x2: "16", y1: "15", y2: "15", key: "1xb1d9" }],
165
165
  ["line", { x1: "9", x2: "9.01", y1: "9", y2: "9", key: "yxxnd0" }],
166
166
  ["line", { x1: "15", x2: "15.01", y1: "9", y2: "9", key: "1p4y9e" }]
167
167
  ]);
168
- const St = q("Monitor", [
168
+ const Wt = z("Monitor", [
169
169
  ["rect", { width: "20", height: "14", x: "2", y: "3", rx: "2", key: "48i651" }],
170
170
  ["line", { x1: "8", x2: "16", y1: "21", y2: "21", key: "1svkeh" }],
171
171
  ["line", { x1: "12", x2: "12", y1: "17", y2: "21", key: "vw1qmm" }]
172
172
  ]);
173
- const At = q("Moon", [
173
+ const Lt = z("Moon", [
174
174
  ["path", { d: "M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z", key: "a7tn18" }]
175
175
  ]);
176
- const qt = q("RotateCw", [
176
+ const Rt = z("RotateCw", [
177
177
  ["path", { d: "M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8", key: "1p45f6" }],
178
178
  ["path", { d: "M21 3v5h-5", key: "1q7to0" }]
179
179
  ]);
180
- const ue = q("Search", [
180
+ const me = z("Search", [
181
181
  ["circle", { cx: "11", cy: "11", r: "8", key: "4ej97u" }],
182
182
  ["path", { d: "m21 21-4.3-4.3", key: "1qie3q" }]
183
183
  ]);
184
- const zt = q("ShieldCheck", [
184
+ const Ft = z("ShieldCheck", [
185
185
  [
186
186
  "path",
187
187
  {
@@ -191,13 +191,13 @@ const zt = q("ShieldCheck", [
191
191
  ],
192
192
  ["path", { d: "m9 12 2 2 4-4", key: "dzmm74" }]
193
193
  ]);
194
- const Wt = q("Smile", [
194
+ const Kt = z("Smile", [
195
195
  ["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
196
196
  ["path", { d: "M8 14s1.5 2 4 2 4-2 4-2", key: "1y1vjs" }],
197
197
  ["line", { x1: "9", x2: "9.01", y1: "9", y2: "9", key: "yxxnd0" }],
198
198
  ["line", { x1: "15", x2: "15.01", y1: "9", y2: "9", key: "1p4y9e" }]
199
199
  ]);
200
- const Rt = q("Sun", [
200
+ const Bt = z("Sun", [
201
201
  ["circle", { cx: "12", cy: "12", r: "4", key: "4exip2" }],
202
202
  ["path", { d: "M12 2v2", key: "tus03m" }],
203
203
  ["path", { d: "M12 20v2", key: "1lh1kg" }],
@@ -208,7 +208,7 @@ const Rt = q("Sun", [
208
208
  ["path", { d: "m6.34 17.66-1.41 1.41", key: "1m8zz5" }],
209
209
  ["path", { d: "m19.07 4.93-1.41 1.41", key: "1shlcs" }]
210
210
  ]);
211
- const he = q("TriangleAlert", [
211
+ const pe = z("TriangleAlert", [
212
212
  [
213
213
  "path",
214
214
  {
@@ -219,35 +219,35 @@ const he = q("TriangleAlert", [
219
219
  ["path", { d: "M12 9v4", key: "juzpu7" }],
220
220
  ["path", { d: "M12 17h.01", key: "p32p05" }]
221
221
  ]);
222
- const J = q("X", [
222
+ const ee = z("X", [
223
223
  ["path", { d: "M18 6 6 18", key: "1bl5f8" }],
224
224
  ["path", { d: "m6 6 12 12", key: "d8bk6v" }]
225
- ]), Lt = {
226
- success: Ze,
227
- warning: he,
228
- error: Qe
229
- }, et = Ue(null);
230
- function Ft() {
231
- const t = Ye(et);
225
+ ]), Pt = {
226
+ success: Qe,
227
+ warning: pe,
228
+ error: Je
229
+ }, tt = Ye(null);
230
+ function Ot() {
231
+ const t = Ve(tt);
232
232
  if (!t)
233
233
  throw new Error("useToast 必须在 ToastProvider 内使用");
234
234
  return t;
235
235
  }
236
- function Cn({ children: t }) {
237
- const [n, r] = E([]), a = T(0), s = T(/* @__PURE__ */ new Map()), l = T(!1), o = T(null), [u, d] = E(!1), b = te((y) => {
236
+ function $n({ children: t }) {
237
+ const [n, r] = M([]), a = T(0), s = T(/* @__PURE__ */ new Map()), l = T(!1), o = T(null), [u, d] = M(!1), f = ne((y) => {
238
238
  const w = s.current.get(y);
239
239
  w && (window.clearTimeout(w.handle), s.current.delete(y)), r((p) => p.filter((N) => N.id !== y));
240
- }, []), c = te(
241
- ({ tone: y = "default", title: w, description: p, actionLabel: N, preserve: x, duration: $ = 4e3 }) => {
240
+ }, []), c = ne(
241
+ ({ tone: y = "default", title: w, description: p, actionLabel: N, preserve: v, duration: D = 4e3 }) => {
242
242
  const C = a.current += 1;
243
- if (r((h) => [...h, { id: C, tone: y, title: w, description: p, actionLabel: N, preserve: x }]), !x) {
244
- const h = l.current ? 0 : window.setTimeout(() => b(C), $);
245
- s.current.set(C, { remaining: $, start: Date.now(), handle: h });
243
+ if (r((h) => [...h, { id: C, tone: y, title: w, description: p, actionLabel: N, preserve: v }]), !v) {
244
+ const h = l.current ? 0 : window.setTimeout(() => f(C), D);
245
+ s.current.set(C, { remaining: D, start: Date.now(), handle: h });
246
246
  }
247
247
  },
248
- [b]
248
+ [f]
249
249
  );
250
- function f() {
250
+ function _() {
251
251
  if (l.current) return;
252
252
  l.current = !0;
253
253
  const y = Date.now();
@@ -255,12 +255,12 @@ function Cn({ children: t }) {
255
255
  window.clearTimeout(w.handle), w.remaining = Math.max(0, w.remaining - (y - w.start));
256
256
  });
257
257
  }
258
- function _() {
258
+ function b() {
259
259
  if (!l.current) return;
260
260
  l.current = !1;
261
261
  const y = Date.now();
262
262
  s.current.forEach((w, p) => {
263
- w.start = y, w.handle = window.setTimeout(() => b(p), w.remaining);
263
+ w.start = y, w.handle = window.setTimeout(() => f(p), w.remaining);
264
264
  });
265
265
  }
266
266
  F(
@@ -268,20 +268,20 @@ function Cn({ children: t }) {
268
268
  s.current.forEach((y) => window.clearTimeout(y.handle));
269
269
  },
270
270
  []
271
- ), ne(() => {
271
+ ), ae(() => {
272
272
  const y = o.current;
273
273
  if (!y) return;
274
274
  const w = [...y.querySelectorAll(".q1-toast")], p = 12, N = 14;
275
- let x = 0, $ = 0;
276
- for (let v = w.length - 1; v >= 0; v -= 1) {
277
- const g = w[v], k = w.length - 1 - v;
278
- k === 0 && ($ = g.offsetHeight), g.style.setProperty("--depth", String(k)), g.style.setProperty("--y", `${-x}px`), g.style.zIndex = String(100 + v), x += g.offsetHeight + p;
275
+ let v = 0, D = 0;
276
+ for (let x = w.length - 1; x >= 0; x -= 1) {
277
+ const g = w[x], k = w.length - 1 - x;
278
+ k === 0 && (D = g.offsetHeight), g.style.setProperty("--depth", String(k)), g.style.setProperty("--y", `${-v}px`), g.style.zIndex = String(100 + x), v += g.offsetHeight + p;
279
279
  }
280
- const C = $ + Math.min(w.length - 1, 2) * N, h = w.length === 0 ? 0 : u ? Math.max(x - p, 0) : C;
280
+ const C = D + Math.min(w.length - 1, 2) * N, h = w.length === 0 ? 0 : u ? Math.max(v - p, 0) : C;
281
281
  y.style.setProperty("--toast-stack-h", `${h}px`);
282
282
  }, [n, u]);
283
- const m = ae(() => ({ push: c, dismiss: b }), [c, b]);
284
- return /* @__PURE__ */ i(et.Provider, { value: m, children: [
283
+ const m = re(() => ({ push: c, dismiss: f }), [c, f]);
284
+ return /* @__PURE__ */ i(tt.Provider, { value: m, children: [
285
285
  t,
286
286
  /* @__PURE__ */ e(
287
287
  "div",
@@ -293,34 +293,34 @@ function Cn({ children: t }) {
293
293
  "aria-label": "通知",
294
294
  "data-expanded": u,
295
295
  onMouseEnter: () => {
296
- d(!0), f();
296
+ d(!0), _();
297
297
  },
298
298
  onMouseLeave: () => {
299
- d(!1), _();
299
+ d(!1), b();
300
300
  },
301
301
  onFocusCapture: () => {
302
- d(!0), f();
302
+ d(!0), _();
303
303
  },
304
304
  onBlurCapture: (y) => {
305
- y.currentTarget.contains(y.relatedTarget) || (d(!1), _());
305
+ y.currentTarget.contains(y.relatedTarget) || (d(!1), b());
306
306
  },
307
307
  children: n.map((y) => {
308
- const w = y.tone === "default" ? null : Lt[y.tone];
308
+ const w = y.tone === "default" ? null : Pt[y.tone];
309
309
  return /* @__PURE__ */ i("div", { className: `q1-toast q1-toast--${y.tone}`, "aria-atomic": "true", children: [
310
310
  w ? /* @__PURE__ */ e(w, { className: "q1-toast__icon", size: 16, strokeWidth: 2, "aria-hidden": "true" }) : null,
311
311
  /* @__PURE__ */ i("div", { className: "q1-toast__body", children: [
312
312
  /* @__PURE__ */ e("p", { className: "q1-toast__title", children: y.title }),
313
313
  y.description ? /* @__PURE__ */ e("p", { className: "q1-toast__description", children: y.description }) : null
314
314
  ] }),
315
- y.actionLabel ? /* @__PURE__ */ e("button", { type: "button", className: "q1-toast__action", onClick: () => b(y.id), children: y.actionLabel }) : null,
316
- /* @__PURE__ */ e("button", { type: "button", className: "q1-toast__close", "aria-label": "关闭", onClick: () => b(y.id), children: /* @__PURE__ */ e(J, { size: 16, strokeWidth: 2, "aria-hidden": "true" }) })
315
+ y.actionLabel ? /* @__PURE__ */ e("button", { type: "button", className: "q1-toast__action", onClick: () => f(y.id), children: y.actionLabel }) : null,
316
+ /* @__PURE__ */ e("button", { type: "button", className: "q1-toast__close", "aria-label": "关闭", onClick: () => f(y.id), children: /* @__PURE__ */ e(ee, { size: 16, strokeWidth: 2, "aria-hidden": "true" }) })
317
317
  ] }, y.id);
318
318
  })
319
319
  }
320
320
  )
321
321
  ] });
322
322
  }
323
- function Kt(t) {
323
+ function Ht(t) {
324
324
  const n = document.createElement("textarea");
325
325
  n.value = t, n.setAttribute("readonly", ""), n.style.position = "fixed", n.style.top = "0", n.style.left = "0", n.style.width = "1px", n.style.height = "1px", n.style.opacity = "0";
326
326
  try {
@@ -329,38 +329,38 @@ function Kt(t) {
329
329
  n.remove();
330
330
  }
331
331
  }
332
- async function tt(t) {
332
+ async function nt(t) {
333
333
  try {
334
334
  await navigator.clipboard.writeText(t);
335
335
  return;
336
336
  } catch {
337
- if (!Kt(t))
337
+ if (!Ht(t))
338
338
  throw new Error("clipboard write failed");
339
339
  }
340
340
  }
341
- function pe() {
342
- const [t, n] = E(!1), r = T(void 0), { push: a } = Ft(), s = te(
341
+ function fe() {
342
+ const [t, n] = M(!1), r = T(void 0), { push: a } = Ot(), s = ne(
343
343
  async (o, u = "已复制到剪贴板") => {
344
344
  try {
345
- await tt(o), n(!0), r.current && clearTimeout(r.current), r.current = setTimeout(() => n(!1), 1500), a({ title: u });
345
+ await nt(o), n(!0), r.current && clearTimeout(r.current), r.current = setTimeout(() => n(!1), 1500), a({ title: u });
346
346
  } catch {
347
347
  a({ tone: "error", title: "无法复制到剪贴板。请重试。" });
348
348
  }
349
349
  },
350
350
  [a]
351
- ), l = te(() => {
351
+ ), l = ne(() => {
352
352
  r.current && clearTimeout(r.current), n(!1);
353
353
  }, []);
354
354
  return { copied: t, copy: s, reset: l };
355
355
  }
356
- function Dn({
356
+ function En({
357
357
  value: t,
358
358
  label: n,
359
359
  successMessage: r,
360
360
  size: a = 16,
361
361
  className: s
362
362
  }) {
363
- const { copied: l, copy: o } = pe();
363
+ const { copied: l, copy: o } = fe();
364
364
  return /* @__PURE__ */ e(
365
365
  "button",
366
366
  {
@@ -368,93 +368,151 @@ function Dn({
368
368
  className: s ? `copy-button ${s}` : "copy-button",
369
369
  "aria-label": n,
370
370
  onClick: () => o(t, r),
371
- children: l ? /* @__PURE__ */ e(Z, { size: a, strokeWidth: 2, "aria-hidden": "true" }) : /* @__PURE__ */ e(le, { size: a, strokeWidth: 2, "aria-hidden": "true" })
371
+ children: l ? /* @__PURE__ */ e(Q, { size: a, strokeWidth: 2, "aria-hidden": "true" }) : /* @__PURE__ */ e(se, { size: a, strokeWidth: 2, "aria-hidden": "true" })
372
372
  }
373
373
  );
374
374
  }
375
- function Bt({
375
+ function jt({
376
376
  className: t,
377
377
  label: n,
378
378
  onClick: r
379
379
  }) {
380
- return /* @__PURE__ */ e("button", { type: "button", className: t, "aria-label": n, onClick: r, children: /* @__PURE__ */ e(J, { size: 14, strokeWidth: 2, "aria-hidden": "true" }) });
380
+ return /* @__PURE__ */ e("button", { type: "button", className: t, "aria-label": n, onClick: r, children: /* @__PURE__ */ e(ee, { size: 14, strokeWidth: 2, "aria-hidden": "true" }) });
381
381
  }
382
- function A(...t) {
382
+ function S(...t) {
383
383
  return t.filter(Boolean).join(" ");
384
384
  }
385
- function Pt({ variant: t, size: n, iconOnly: r, circle: a, rounded: s, loading: l, className: o }) {
386
- return A(
385
+ function at({
386
+ variant: t,
387
+ size: n,
388
+ svgOnly: r,
389
+ iconOnly: a,
390
+ circle: s,
391
+ rounded: l,
392
+ loading: o,
393
+ className: u
394
+ }) {
395
+ const d = r ?? a;
396
+ return S(
387
397
  "button",
388
398
  t ? `button--${t}` : "",
389
399
  n && n !== "md" ? `button--${n}` : "",
390
- r ? "button--icon" : "",
391
- a ? "button--circle" : "",
400
+ d ? "button--icon" : "",
401
+ s ? "button--circle" : "",
392
402
  // circle 与 rounded 互斥:circle 是圆形 icon-only、rounded 是药丸文字 CTA;同传时 circle 优先。
393
- s && !a ? "button--rounded" : "",
394
- l ? "button--loading" : "",
395
- o
403
+ l && !s ? "button--rounded" : "",
404
+ o ? "button--loading" : "",
405
+ u
396
406
  );
397
407
  }
398
- function Ot(t) {
408
+ function Ke(t) {
409
+ return t == null || t === "" || typeof t == "boolean" ? null : /* @__PURE__ */ e("span", { className: "button__affix", "aria-hidden": "true", children: t });
410
+ }
411
+ function rt({
412
+ loading: t,
413
+ loadingLabel: n,
414
+ prefix: r,
415
+ children: a,
416
+ suffix: s,
417
+ shortcut: l
418
+ }) {
419
+ return /* @__PURE__ */ i(U, { children: [
420
+ t ? /* @__PURE__ */ i("span", { role: "status", children: [
421
+ /* @__PURE__ */ e(he, { className: "button__spinner", size: 14, strokeWidth: 1.8, "aria-hidden": "true" }),
422
+ /* @__PURE__ */ e("span", { className: "q1-sr-only", children: n || "加载中…" })
423
+ ] }) : Ke(r),
424
+ a,
425
+ Ke(s),
426
+ l ? /* @__PURE__ */ e("kbd", { className: "button__shortcut", "aria-hidden": "true", children: l }) : null
427
+ ] });
428
+ }
429
+ function lt(t) {
399
430
  const {
400
431
  loading: n,
401
- disabled: r,
402
- href: a,
432
+ loadingLabel: r,
433
+ disabled: a,
403
434
  type: s = "button",
404
435
  shortcut: l,
405
436
  children: o,
406
- onClick: u,
407
- ariaLabel: d,
437
+ prefix: u,
438
+ suffix: d,
439
+ onClick: f,
440
+ "aria-label": c,
441
+ ariaLabel: _,
408
442
  ariaKeyshortcuts: b,
409
- "aria-describedby": c,
410
- onFocus: f,
411
- onBlur: _,
412
- onKeyDown: m,
413
- ref: y
414
- } = t, w = Pt(t), p = /* @__PURE__ */ i(U, { children: [
415
- n ? /* @__PURE__ */ e(me, { className: "button__spinner", size: 14, strokeWidth: 1.8, "aria-hidden": "true" }) : null,
416
- o,
417
- l ? /* @__PURE__ */ e("kbd", { className: "button__shortcut", "aria-hidden": "true", children: l }) : null
418
- ] });
419
- return a ? /* @__PURE__ */ e(
420
- "a",
421
- {
422
- ref: y,
423
- className: w,
424
- href: r ? void 0 : a,
425
- "aria-disabled": r || void 0,
426
- tabIndex: r ? -1 : void 0,
427
- "aria-label": d,
428
- "aria-describedby": c,
429
- onClick: r ? (N) => N.preventDefault() : u,
430
- onFocus: f,
431
- onBlur: _,
432
- onKeyDown: m,
433
- children: p
434
- }
435
- ) : /* @__PURE__ */ e(
443
+ "aria-describedby": m,
444
+ onFocus: y,
445
+ onBlur: w,
446
+ onKeyDown: p,
447
+ ref: N
448
+ } = t, v = at(t), D = c ?? _, C = n && !a;
449
+ return /* @__PURE__ */ e(
436
450
  "button",
437
451
  {
438
- ref: y,
452
+ ref: N,
439
453
  type: s,
440
- className: w,
441
- disabled: r,
442
- "aria-busy": n || void 0,
443
- "aria-label": d,
454
+ className: v,
455
+ disabled: a || void 0,
456
+ "aria-disabled": C ? !0 : void 0,
457
+ tabIndex: C ? 0 : void 0,
458
+ "aria-label": D,
444
459
  "aria-keyshortcuts": b,
445
- "aria-describedby": c,
446
- onClick: u,
447
- onFocus: f,
448
- onBlur: _,
449
- onKeyDown: m,
450
- children: p
460
+ "aria-describedby": m,
461
+ onClick: n ? (h) => h.preventDefault() : f,
462
+ onFocus: y,
463
+ onBlur: w,
464
+ onKeyDown: p,
465
+ children: rt({ loading: n, loadingLabel: r, prefix: u, children: o, suffix: d, shortcut: l })
466
+ }
467
+ );
468
+ }
469
+ function Mn(t) {
470
+ const {
471
+ href: n,
472
+ loading: r,
473
+ loadingLabel: a,
474
+ disabled: s,
475
+ type: l,
476
+ shortcut: o,
477
+ children: u,
478
+ prefix: d,
479
+ suffix: f,
480
+ onClick: c,
481
+ "aria-label": _,
482
+ ariaLabel: b,
483
+ ariaKeyshortcuts: m,
484
+ "aria-describedby": y,
485
+ onFocus: w,
486
+ onBlur: p,
487
+ onKeyDown: N,
488
+ ref: v
489
+ } = t, D = at(t), C = s || r;
490
+ return /* @__PURE__ */ e(
491
+ "a",
492
+ {
493
+ ref: v,
494
+ className: D,
495
+ href: C ? void 0 : n,
496
+ "aria-disabled": C || void 0,
497
+ tabIndex: s ? -1 : r ? 0 : void 0,
498
+ "aria-label": _ ?? b,
499
+ "aria-keyshortcuts": m,
500
+ "aria-describedby": y,
501
+ onClick: C ? (x) => x.preventDefault() : c,
502
+ onFocus: w,
503
+ onBlur: p,
504
+ onKeyDown: N,
505
+ children: rt({ loading: r, loadingLabel: a, prefix: d, children: u, suffix: f, shortcut: o })
451
506
  }
452
507
  );
453
508
  }
454
- function se(t, n) {
509
+ function In({ "aria-label": t, ariaLabel: n, ...r }) {
510
+ return /* @__PURE__ */ e(lt, { ...r, svgOnly: !0, "aria-label": t ?? n });
511
+ }
512
+ function oe(t, n) {
455
513
  return `${t}-${n ? "message" : "description"}`;
456
514
  }
457
- function Me({
515
+ function Ee({
458
516
  controlId: t,
459
517
  label: n,
460
518
  description: r,
@@ -462,27 +520,38 @@ function Me({
462
520
  wide: s,
463
521
  children: l
464
522
  }) {
465
- const o = A("form-field", s ? "form-field--wide" : "", a ? "form-field--error" : ""), u = se(t, !!a);
523
+ const o = S("form-field", s ? "form-field--wide" : "", a ? "form-field--error" : ""), u = oe(t, !!a);
466
524
  return /* @__PURE__ */ i("label", { className: o, htmlFor: t, children: [
467
525
  /* @__PURE__ */ e("span", { className: "form-field__label", children: n }),
468
526
  l,
469
527
  a ? /* @__PURE__ */ e("span", { className: "form-field__message", id: u, children: a }) : r ? /* @__PURE__ */ e("span", { className: "form-field__description", id: u, children: r }) : null
470
528
  ] });
471
529
  }
472
- function nt(...t) {
530
+ function st(...t) {
473
531
  return t.filter(Boolean).join(" ") || void 0;
474
532
  }
475
- function Ee(...t) {
533
+ function Me(...t) {
476
534
  return (n) => {
477
- for (const r of t)
478
- r && (typeof r == "function" ? r(n) : r.current = n);
535
+ const r = t.map((a) => {
536
+ if (a)
537
+ return typeof a == "function" ? a(n) : (a.current = n, () => {
538
+ a.current = null;
539
+ });
540
+ });
541
+ return () => {
542
+ t.forEach((a, s) => {
543
+ if (!a) return;
544
+ const l = r[s];
545
+ typeof l == "function" ? l() : typeof a == "function" ? a(null) : a.current = null;
546
+ });
547
+ };
479
548
  };
480
549
  }
481
550
  function Ie(t, n, r) {
482
551
  F(() => {
483
552
  }, [n, t, r]);
484
553
  }
485
- function $n({
554
+ function Tn({
486
555
  id: t,
487
556
  label: n,
488
557
  description: r,
@@ -492,31 +561,31 @@ function $n({
492
561
  ref: o,
493
562
  prefix: u,
494
563
  suffix: d,
495
- prefixStyling: b = !0,
564
+ prefixStyling: f = !0,
496
565
  suffixStyling: c = !0,
497
- rounded: f,
498
- wide: _,
566
+ rounded: _,
567
+ wide: b,
499
568
  size: m = "md",
500
569
  className: y,
501
570
  ...w
502
571
  }) {
503
- const p = L(), N = t ?? p, x = n === void 0, $ = T(null), C = ae(() => Ee($, o), [o]);
504
- Ie("Input", x, $);
505
- const h = r || a ? se(N, !!a) : void 0, v = A("form-control", m !== "md" ? `form-control--${m}` : "", y ?? ""), g = A("input-control", f ? "input-control--rounded" : ""), k = /* @__PURE__ */ e(
572
+ const p = R(), N = t ?? p, v = n === void 0, D = T(null), C = re(() => Me(D, o), [o]);
573
+ Ie("Input", v, D);
574
+ const h = r || a ? oe(N, !!a) : void 0, x = S("form-control", m !== "md" ? `form-control--${m}` : "", y ?? ""), g = S("input-control", _ ? "input-control--rounded" : ""), k = /* @__PURE__ */ e(
506
575
  "input",
507
576
  {
508
577
  ref: C,
509
578
  id: N,
510
- className: v,
511
- "aria-describedby": nt(l, h),
579
+ className: x,
580
+ "aria-describedby": st(l, h),
512
581
  "aria-invalid": s || a ? !0 : void 0,
513
582
  ...w
514
583
  }
515
- ), M = u || d || f ? /* @__PURE__ */ i("span", { className: g, children: [
584
+ ), E = u || d || _ ? /* @__PURE__ */ i("span", { className: g, children: [
516
585
  u ? /* @__PURE__ */ e(
517
586
  "span",
518
587
  {
519
- className: `input-control__prefix${b ? "" : " input-control__prefix--plain"}`,
588
+ className: `input-control__prefix${f ? "" : " input-control__prefix--plain"}`,
520
589
  "aria-hidden": "true",
521
590
  children: u
522
591
  }
@@ -531,17 +600,17 @@ function $n({
531
600
  }
532
601
  ) : null
533
602
  ] }) : k;
534
- return x ? M : /* @__PURE__ */ e(Me, { controlId: N, label: n, description: r, error: a, wide: _, children: M });
603
+ return v ? E : /* @__PURE__ */ e(Ee, { controlId: N, label: n, description: r, error: a, wide: b, children: E });
535
604
  }
536
- function at(t = "", n) {
537
- const [r, a] = E(t), s = T(null), l = () => {
605
+ function ot(t = "", n) {
606
+ const [r, a] = M(t), s = T(null), l = () => {
538
607
  a(""), s.current?.focus(), n?.();
539
608
  };
540
609
  return { value: r, setValue: a, inputRef: s, clear: l, onKeyDown: (u) => {
541
610
  u.nativeEvent.isComposing || u.key === "Escape" && r && (u.preventDefault(), l());
542
611
  } };
543
612
  }
544
- function Mn({
613
+ function An({
545
614
  id: t,
546
615
  placeholder: n,
547
616
  defaultValue: r = "",
@@ -550,30 +619,30 @@ function Mn({
550
619
  onClear: l,
551
620
  ariaLabel: o
552
621
  }) {
553
- const { value: u, setValue: d, inputRef: b, clear: c, onKeyDown: f } = at(r, l);
622
+ const { value: u, setValue: d, inputRef: f, clear: c, onKeyDown: _ } = ot(r, l);
554
623
  return /* @__PURE__ */ i("div", { className: "clearable", children: [
555
624
  /* @__PURE__ */ e(
556
625
  "input",
557
626
  {
558
627
  id: t,
559
- ref: b,
628
+ ref: f,
560
629
  className: "form-control clearable__input",
561
630
  type: "text",
562
631
  placeholder: n,
563
632
  "aria-label": o,
564
633
  value: u,
565
634
  disabled: a,
566
- onChange: (_) => d(_.target.value),
567
- onKeyDown: f
635
+ onChange: (b) => d(b.target.value),
636
+ onKeyDown: _
568
637
  }
569
638
  ),
570
- u && !a ? /* @__PURE__ */ e(Bt, { className: "clearable__clear", label: "清除", onClick: c }) : s ? /* @__PURE__ */ i("span", { className: "clearable__hint", "aria-hidden": "true", children: [
639
+ u && !a ? /* @__PURE__ */ e(jt, { className: "clearable__clear", label: "清除", onClick: c }) : s ? /* @__PURE__ */ i("span", { className: "clearable__hint", "aria-hidden": "true", children: [
571
640
  /* @__PURE__ */ e("kbd", { className: "q1-kbd q1-kbd--small", children: "Esc" }),
572
641
  /* @__PURE__ */ e("kbd", { className: "q1-kbd q1-kbd--small", children: "⌘K" })
573
642
  ] }) : null
574
643
  ] });
575
644
  }
576
- function En({
645
+ function Sn({
577
646
  id: t,
578
647
  ariaLabel: n,
579
648
  placeholder: r,
@@ -583,9 +652,9 @@ function En({
583
652
  kbdHint: o,
584
653
  icon: u
585
654
  }) {
586
- const { value: d, setValue: b, inputRef: c, clear: f, onKeyDown: _ } = at(a);
655
+ const { value: d, setValue: f, inputRef: c, clear: _, onKeyDown: b } = ot(a);
587
656
  return /* @__PURE__ */ i("div", { className: "search-input", "aria-busy": l || void 0, children: [
588
- /* @__PURE__ */ e("span", { className: "search-input__icon", "aria-hidden": "true", children: l ? /* @__PURE__ */ e(me, { className: "search-input__spinner", size: 16, strokeWidth: 2 }) : u ?? /* @__PURE__ */ e(ue, { size: 16, strokeWidth: 2 }) }),
657
+ /* @__PURE__ */ e("span", { className: "search-input__icon", "aria-hidden": "true", children: l ? /* @__PURE__ */ e(he, { className: "search-input__spinner", size: 16, strokeWidth: 2 }) : u ?? /* @__PURE__ */ e(me, { size: 16, strokeWidth: 2 }) }),
589
658
  /* @__PURE__ */ e(
590
659
  "input",
591
660
  {
@@ -599,18 +668,18 @@ function En({
599
668
  placeholder: r,
600
669
  value: d,
601
670
  disabled: s,
602
- onChange: (m) => b(m.target.value),
603
- onKeyDown: _
671
+ onChange: (m) => f(m.target.value),
672
+ onKeyDown: b
604
673
  }
605
674
  ),
606
675
  l ? /* @__PURE__ */ e("span", { className: "q1-sr-only", children: "加载中…" }) : null,
607
- d && !s ? /* @__PURE__ */ e("button", { type: "button", className: "search-input__esc", "aria-label": "清除搜索", onClick: f, children: /* @__PURE__ */ e("kbd", { className: "q1-kbd q1-kbd--small", "aria-hidden": "true", children: "Esc" }) }) : o && !s ? /* @__PURE__ */ i("span", { className: "search-input__hint", "aria-hidden": "true", children: [
676
+ d && !s ? /* @__PURE__ */ e("button", { type: "button", className: "search-input__esc", "aria-label": "清除搜索", onClick: _, children: /* @__PURE__ */ e("kbd", { className: "q1-kbd q1-kbd--small", "aria-hidden": "true", children: "Esc" }) }) : o && !s ? /* @__PURE__ */ i("span", { className: "search-input__hint", "aria-hidden": "true", children: [
608
677
  /* @__PURE__ */ e("kbd", { className: "q1-kbd q1-kbd--small", children: "⌘" }),
609
678
  /* @__PURE__ */ e("kbd", { className: "q1-kbd q1-kbd--small", children: "K" })
610
679
  ] }) : null
611
680
  ] });
612
681
  }
613
- function In({
682
+ function qn({
614
683
  id: t,
615
684
  label: n,
616
685
  description: r,
@@ -620,20 +689,20 @@ function In({
620
689
  ref: o,
621
690
  wide: u,
622
691
  size: d = "md",
623
- className: b,
692
+ className: f,
624
693
  maxLength: c,
625
- onInput: f,
626
- ..._
694
+ onInput: _,
695
+ ...b
627
696
  }) {
628
- const m = L(), y = t ?? m, w = n === void 0, p = T(null), N = ae(() => Ee(p, o), [o]);
697
+ const m = R(), y = t ?? m, w = n === void 0, p = T(null), N = re(() => Me(p, o), [o]);
629
698
  Ie("Textarea", w, p);
630
- const [x, $] = E(
631
- () => typeof _.defaultValue == "string" ? _.defaultValue.length : 0
632
- ), C = typeof _.value == "string" ? _.value.length : x, h = c !== void 0, v = !w && (r || a) ? se(y, !!a) : void 0, g = A(
699
+ const [v, D] = M(
700
+ () => typeof b.defaultValue == "string" ? b.defaultValue.length : 0
701
+ ), C = typeof b.value == "string" ? b.value.length : v, h = c !== void 0, x = !w && (r || a) ? oe(y, !!a) : void 0, g = S(
633
702
  "form-control",
634
703
  "form-control--textarea",
635
704
  d !== "md" ? `form-control--${d}` : "",
636
- b ?? ""
705
+ f ?? ""
637
706
  ), k = /* @__PURE__ */ e(
638
707
  "textarea",
639
708
  {
@@ -641,14 +710,14 @@ function In({
641
710
  ref: N,
642
711
  className: g,
643
712
  maxLength: c,
644
- "aria-describedby": nt(l, v),
713
+ "aria-describedby": st(l, x),
645
714
  "aria-invalid": s || a ? !0 : void 0,
646
715
  onInput: h ? (I) => {
647
- $(I.currentTarget.value.length), f?.(I);
648
- } : f,
649
- ..._
716
+ D(I.currentTarget.value.length), _?.(I);
717
+ } : _,
718
+ ...b
650
719
  }
651
- ), M = h ? /* @__PURE__ */ i("span", { className: "textarea-control", children: [
720
+ ), E = h ? /* @__PURE__ */ i("span", { className: "textarea-control", children: [
652
721
  k,
653
722
  /* @__PURE__ */ i("span", { className: "textarea-control__count", "aria-live": "polite", children: [
654
723
  C,
@@ -656,9 +725,9 @@ function In({
656
725
  c
657
726
  ] })
658
727
  ] }) : k;
659
- return w ? M : /* @__PURE__ */ e(Me, { controlId: y, label: n, description: r, error: a, wide: u, children: M });
728
+ return w ? E : /* @__PURE__ */ e(Ee, { controlId: y, label: n, description: r, error: a, wide: u, children: E });
660
729
  }
661
- function Tn({
730
+ function zn({
662
731
  id: t,
663
732
  label: n,
664
733
  description: r,
@@ -668,37 +737,37 @@ function Tn({
668
737
  prefix: o,
669
738
  suffix: u,
670
739
  className: d,
671
- children: b,
740
+ children: f,
672
741
  ...c
673
742
  }) {
674
- const f = A(
743
+ const _ = S(
675
744
  "form-control",
676
745
  "form-control--select",
677
746
  l !== "md" ? `form-control--${l}` : "",
678
747
  d ?? ""
679
- ), _ = A(
748
+ ), b = S(
680
749
  "select-control",
681
750
  o ? "select-control--prefixed" : "",
682
751
  u ? "select-control--suffixed" : ""
683
752
  );
684
- return /* @__PURE__ */ e(Me, { controlId: t, label: n, description: r, error: a, wide: s, children: /* @__PURE__ */ i("span", { className: _, children: [
753
+ return /* @__PURE__ */ e(Ee, { controlId: t, label: n, description: r, error: a, wide: s, children: /* @__PURE__ */ i("span", { className: b, children: [
685
754
  o ? /* @__PURE__ */ e("span", { className: "select-control__prefix", "aria-hidden": "true", children: o }) : null,
686
755
  /* @__PURE__ */ e(
687
756
  "select",
688
757
  {
689
758
  id: t,
690
- className: f,
691
- "aria-describedby": r || a ? se(t, !!a) : void 0,
759
+ className: _,
760
+ "aria-describedby": r || a ? oe(t, !!a) : void 0,
692
761
  "aria-invalid": a ? !0 : void 0,
693
762
  ...c,
694
- children: b
763
+ children: f
695
764
  }
696
765
  ),
697
766
  u ? /* @__PURE__ */ e("span", { className: "select-control__suffix", "aria-hidden": "true", children: u }) : null,
698
767
  /* @__PURE__ */ e("span", { className: "select-control__chevron", "aria-hidden": "true", children: /* @__PURE__ */ e(Y, { size: l === "xs" ? 12 : 16, strokeWidth: 1.8 }) })
699
768
  ] }) });
700
769
  }
701
- function rt({
770
+ function it({
702
771
  id: t,
703
772
  label: n,
704
773
  description: r,
@@ -708,17 +777,17 @@ function rt({
708
777
  type: o,
709
778
  ...u
710
779
  }) {
711
- const d = L(), b = t ?? d, c = n === void 0, f = o === "radio", _ = !f && (r || a) ? se(b, !!a) : void 0, m = f ? "control-option__visual control-option__visual--radio" : "control-option__visual", y = T(null), w = ae(() => Ee(y, l), [l]);
712
- Ie(f ? "Radio" : "Checkbox", c, y), F(() => {
713
- y.current && (y.current.indeterminate = !f && !!s);
714
- }, [s, f]);
780
+ const d = R(), f = t ?? d, c = n === void 0, _ = o === "radio", b = !_ && (r || a) ? oe(f, !!a) : void 0, m = _ ? "control-option__visual control-option__visual--radio" : "control-option__visual", y = T(null), w = re(() => Me(y, l), [l]);
781
+ Ie(_ ? "Radio" : "Checkbox", c, y), F(() => {
782
+ y.current && (y.current.indeterminate = !_ && !!s);
783
+ }, [s, _]);
715
784
  const p = /* @__PURE__ */ e(
716
785
  "input",
717
786
  {
718
787
  ref: w,
719
- id: b,
788
+ id: f,
720
789
  type: o,
721
- "aria-describedby": _,
790
+ "aria-describedby": b,
722
791
  "aria-invalid": a ? !0 : void 0,
723
792
  ...u
724
793
  }
@@ -726,42 +795,42 @@ function rt({
726
795
  return c ? /* @__PURE__ */ i("span", { className: "control-option control-option--bare", children: [
727
796
  p,
728
797
  /* @__PURE__ */ e("span", { className: m, "aria-hidden": "true" })
729
- ] }) : /* @__PURE__ */ i("label", { className: a ? "control-option control-option--error" : "control-option", htmlFor: b, children: [
798
+ ] }) : /* @__PURE__ */ i("label", { className: a ? "control-option control-option--error" : "control-option", htmlFor: f, children: [
730
799
  p,
731
800
  /* @__PURE__ */ e("span", { className: m, "aria-hidden": "true" }),
732
801
  /* @__PURE__ */ i("span", { className: "control-option__body", children: [
733
802
  /* @__PURE__ */ e("span", { className: "control-option__label", children: n }),
734
- a ? /* @__PURE__ */ e("span", { className: "control-option__message", id: _, children: a }) : r ? /* @__PURE__ */ e("span", { className: "control-option__description", id: _, children: r }) : null
803
+ a ? /* @__PURE__ */ e("span", { className: "control-option__message", id: b, children: a }) : r ? /* @__PURE__ */ e("span", { className: "control-option__description", id: b, children: r }) : null
735
804
  ] })
736
805
  ] });
737
806
  }
738
- function Sn({
807
+ function Wn({
739
808
  ...t
740
809
  }) {
741
- return /* @__PURE__ */ e(rt, { type: "checkbox", ...t });
810
+ return /* @__PURE__ */ e(it, { type: "checkbox", ...t });
742
811
  }
743
- function An({
812
+ function Ln({
744
813
  ...t
745
814
  }) {
746
- return /* @__PURE__ */ e(rt, { type: "radio", ...t });
815
+ return /* @__PURE__ */ e(it, { type: "radio", ...t });
747
816
  }
748
- function qn({ id: t, ...n }) {
817
+ function Rn({ id: t, ...n }) {
749
818
  return {
750
819
  component: /* @__PURE__ */ e("input", { id: t, type: "radio", ...n })
751
820
  };
752
821
  }
753
- function zn({ type: t, label: n, description: r, extra: a, className: s, ...l }) {
754
- return /* @__PURE__ */ i("label", { className: A("choicebox", `choicebox--${t}`, s), children: [
822
+ function Fn({ type: t, label: n, description: r, extra: a, className: s, ...l }) {
823
+ return /* @__PURE__ */ i("label", { className: S("choicebox", `choicebox--${t}`, s), children: [
755
824
  /* @__PURE__ */ e("input", { type: t, className: "choicebox__input", ...l }),
756
825
  /* @__PURE__ */ i("span", { className: "choicebox__body", children: [
757
826
  /* @__PURE__ */ e("span", { className: "choicebox__title", children: n }),
758
827
  r ? /* @__PURE__ */ e("span", { className: "choicebox__description", children: r }) : null,
759
828
  a ? /* @__PURE__ */ e("span", { className: "choicebox__extra", children: a }) : null
760
829
  ] }),
761
- /* @__PURE__ */ e("span", { className: "choicebox__indicator", "aria-hidden": "true", children: t === "checkbox" ? /* @__PURE__ */ e(Z, { className: "choicebox__check", size: 12, strokeWidth: 3 }) : null })
830
+ /* @__PURE__ */ e("span", { className: "choicebox__indicator", "aria-hidden": "true", children: t === "checkbox" ? /* @__PURE__ */ e(Q, { className: "choicebox__check", size: 12, strokeWidth: 3 }) : null })
762
831
  ] });
763
832
  }
764
- function Wn({
833
+ function Kn({
765
834
  options: t,
766
835
  value: n,
767
836
  onChange: r,
@@ -771,93 +840,98 @@ function Wn({
771
840
  readOnly: o,
772
841
  invalid: u,
773
842
  errorId: d,
774
- error: b,
843
+ error: f,
775
844
  emptyText: c = "无匹配项",
776
- clearable: f,
777
- id: _,
845
+ clearable: _,
846
+ id: b,
778
847
  className: m,
779
848
  name: y,
780
849
  inputMode: w,
781
850
  spellCheck: p,
782
851
  "aria-label": N,
783
- "aria-labelledby": x,
784
- ref: $,
852
+ "aria-labelledby": v,
853
+ ref: D,
785
854
  ...C
786
855
  }) {
787
- const [h, v] = E(""), [g, k] = E(!1), [M, I] = E(0), S = T(null), R = T(null), B = L(), V = `${B}-list`, G = `${B}-err`, O = n ?? "", oe = O === "" ? void 0 : t.find((D) => D.value === O), K = !l && !o, H = g && K, P = h === "" ? t : t.filter((D) => D.label.toLowerCase().includes(h.toLowerCase())), fe = H && P[M] ? `${B}-opt-${M}` : void 0, _e = !!b, Se = !!u || _e, mt = [d, _e ? G : null].filter(Boolean).join(" ") || void 0, Ae = {};
788
- for (const [D, z] of Object.entries(C))
789
- D.startsWith("data-") && (Ae[D] = z);
790
- const ht = te(
791
- (D) => {
792
- R.current = D, typeof $ == "function" ? $(D) : $ && ($.current = D);
856
+ const [h, x] = M(""), [g, k] = M(!1), [E, I] = M(0), A = T(null), W = T(null), P = R(), V = `${P}-list`, G = `${P}-err`, H = n ?? "", ie = H === "" ? void 0 : t.find(($) => $.value === H), K = !l && !o, j = g && K, B = h === "" ? t : t.filter(($) => $.label.toLowerCase().includes(h.toLowerCase())), _e = j && B[E] ? `${P}-opt-${E}` : void 0, be = !!f, Ae = !!u || be, _t = [d, be ? G : null].filter(Boolean).join(" ") || void 0, Se = {};
857
+ for (const [$, q] of Object.entries(C))
858
+ $.startsWith("data-") && (Se[$] = q);
859
+ const bt = ne(
860
+ ($) => {
861
+ W.current = $;
862
+ const q = typeof D == "function" ? D($) : void 0;
863
+ return D && typeof D != "function" && (D.current = $), () => {
864
+ W.current = null, typeof q == "function" ? q() : typeof D == "function" ? D(null) : D && (D.current = null);
865
+ };
793
866
  },
794
- [$]
867
+ [D]
795
868
  );
796
869
  F(() => {
797
- }, [N, x]), F(() => {
870
+ }, [N, v]), F(() => {
798
871
  if (!g) return;
799
- function D(z) {
800
- S.current && !S.current.contains(z.target) && k(!1);
872
+ function $(q) {
873
+ A.current && !A.current.contains(q.target) && k(!1);
801
874
  }
802
- return document.addEventListener("mousedown", D), () => document.removeEventListener("mousedown", D);
875
+ return document.addEventListener("mousedown", $), () => document.removeEventListener("mousedown", $);
803
876
  }, [g]), F(() => {
804
877
  K || k(!1);
805
878
  }, [K]);
806
- function be(D) {
807
- const z = D.findIndex((j) => !j.disabled);
808
- return z === -1 ? 0 : z;
879
+ function ye($, q = 0) {
880
+ const O = $.findIndex((X) => !X.disabled);
881
+ return O === -1 ? q : O;
809
882
  }
810
- function pt(D) {
811
- for (let z = D.length - 1; z >= 0; z--)
812
- if (!D[z].disabled) return z;
813
- return 0;
883
+ function yt($, q = 0) {
884
+ for (let O = $.length - 1; O >= 0; O--)
885
+ if (!$[O].disabled) return O;
886
+ return q;
814
887
  }
815
- function qe(D, z) {
816
- if (P.length === 0) return 0;
817
- for (let j = D + z; j >= 0 && j < P.length; j += z)
818
- if (!P[j].disabled) return j;
819
- return D;
888
+ function qe($, q) {
889
+ if (B.length === 0) return 0;
890
+ let O = $;
891
+ for (let X = 0; X < B.length; X++)
892
+ if (O = (O + q + B.length) % B.length, !B[O].disabled) return O;
893
+ return $;
820
894
  }
821
- function ye() {
822
- const D = O === "" ? -1 : t.findIndex((z) => z.value === O);
823
- v(""), I(D === -1 ? be(t) : D), k(!0);
895
+ function ge() {
896
+ const $ = H === "" ? -1 : t.findIndex((q) => q.value === H);
897
+ x(""), I($ === -1 ? ye(t) : $), k(!0);
824
898
  }
825
- function ze(D) {
826
- !K || D.disabled || (r?.(D.value, D), k(!1), R.current?.focus());
899
+ function ze($) {
900
+ !K || $.disabled || (r?.($.value, $), k(!1), W.current?.focus());
827
901
  }
828
902
  function We() {
829
- r?.("", void 0), v(""), k(!1), R.current?.focus();
903
+ r?.("", void 0), x(""), k(!1), W.current?.focus();
830
904
  }
831
- function ft(D) {
832
- if (!D.nativeEvent.isComposing && K) {
905
+ function gt($) {
906
+ if (!$.nativeEvent.isComposing && K) {
833
907
  if (!g) {
834
- D.key === "ArrowDown" || D.key === "Enter" ? (D.preventDefault(), ye()) : D.key === "Escape" && f && O !== "" && We();
908
+ $.key === "ArrowDown" || $.key === "Enter" ? ($.preventDefault(), ge()) : $.key === "Escape" && _ && H !== "" && We();
835
909
  return;
836
910
  }
837
- if (D.key === "ArrowDown")
838
- D.preventDefault(), I((z) => qe(z, 1));
839
- else if (D.key === "ArrowUp")
840
- D.preventDefault(), I((z) => qe(z, -1));
841
- else if (D.key === "Home")
842
- D.preventDefault(), I(be(P));
843
- else if (D.key === "End")
844
- D.preventDefault(), I(pt(P));
845
- else if (D.key === "Enter")
846
- D.preventDefault(), P[M] && ze(P[M]);
847
- else if (D.key === "Escape")
848
- D.preventDefault(), k(!1);
849
- else if (D.key === "Tab") {
850
- const z = S.current?.querySelector(
911
+ if ($.key === "ArrowDown")
912
+ $.preventDefault(), I((q) => qe(q, 1));
913
+ else if ($.key === "ArrowUp")
914
+ $.preventDefault(), I((q) => qe(q, -1));
915
+ else if ($.key === "Home")
916
+ $.preventDefault(), I((q) => ye(B, q));
917
+ else if ($.key === "End")
918
+ $.preventDefault(), I((q) => yt(B, q));
919
+ else if ($.key === "Enter")
920
+ $.preventDefault(), B[E] && ze(B[E]);
921
+ else if ($.key === "Escape")
922
+ $.preventDefault(), k(!1);
923
+ else if ($.key === "Tab") {
924
+ const q = A.current?.querySelector(
851
925
  '.combobox__empty a[href], .combobox__empty button:not([disabled]), .combobox__empty input:not([disabled]), .combobox__empty select:not([disabled]), .combobox__empty textarea:not([disabled]), .combobox__empty [tabindex]:not([tabindex="-1"])'
852
926
  );
853
- z && !D.shiftKey ? (D.preventDefault(), z.focus()) : k(!1);
927
+ q && !$.shiftKey ? ($.preventDefault(), q.focus()) : k(!1);
854
928
  }
855
929
  }
856
930
  }
857
- const _t = A(
931
+ const Nt = S(
858
932
  "combobox",
859
933
  s !== "md" ? `combobox--${s}` : "",
860
- Se ? "combobox--error" : "",
934
+ Ae ? "combobox--error" : "",
861
935
  l ? "combobox--disabled" : "",
862
936
  o ? "combobox--readonly" : "",
863
937
  m
@@ -865,90 +939,90 @@ function Wn({
865
939
  return /* @__PURE__ */ i(
866
940
  "div",
867
941
  {
868
- className: _t,
869
- ref: S,
870
- onBlur: (D) => {
871
- D.currentTarget.contains(D.relatedTarget) || k(!1);
942
+ className: Nt,
943
+ ref: A,
944
+ onBlur: ($) => {
945
+ $.currentTarget.contains($.relatedTarget) || k(!1);
872
946
  },
873
- onKeyDown: (D) => {
874
- D.key !== "Escape" || D.target === R.current || !H || (D.preventDefault(), k(!1), R.current?.focus());
947
+ onKeyDown: ($) => {
948
+ $.key !== "Escape" || $.target === W.current || !j || ($.preventDefault(), k(!1), W.current?.focus());
875
949
  },
876
- ...Ae,
950
+ ...Se,
877
951
  children: [
878
952
  /* @__PURE__ */ i("div", { className: "combobox__control", children: [
879
- /* @__PURE__ */ e(ue, { className: "combobox__leading", size: 16, strokeWidth: 2, "aria-hidden": "true" }),
953
+ /* @__PURE__ */ e(me, { className: "combobox__leading", size: 16, strokeWidth: 2, "aria-hidden": "true" }),
880
954
  /* @__PURE__ */ e(
881
955
  "input",
882
956
  {
883
- ref: ht,
884
- id: _ ?? `${B}-input`,
957
+ ref: bt,
958
+ id: b ?? `${P}-input`,
885
959
  type: "text",
886
960
  role: "combobox",
887
961
  className: "combobox__input",
888
962
  placeholder: a,
889
- value: H ? h : oe?.label ?? "",
963
+ value: j ? h : ie?.label ?? "",
890
964
  disabled: l,
891
965
  readOnly: o,
892
966
  name: y,
893
967
  inputMode: w,
894
968
  spellCheck: p,
895
969
  "aria-label": N,
896
- "aria-labelledby": x,
897
- "aria-expanded": H,
970
+ "aria-labelledby": v,
971
+ "aria-expanded": j,
898
972
  "aria-controls": V,
899
973
  "aria-autocomplete": "list",
900
- "aria-activedescendant": fe,
901
- "aria-invalid": Se ? !0 : void 0,
902
- "aria-describedby": mt,
903
- onChange: (D) => {
974
+ "aria-activedescendant": _e,
975
+ "aria-invalid": Ae ? !0 : void 0,
976
+ "aria-describedby": _t,
977
+ onChange: ($) => {
904
978
  if (!K) return;
905
- const z = D.target.value, j = z === "" ? t : t.filter((ge) => ge.label.toLowerCase().includes(z.toLowerCase()));
906
- v(z), I(be(j)), k(!0);
979
+ const q = $.target.value, O = q === "" ? t : t.filter((X) => X.label.toLowerCase().includes(q.toLowerCase()));
980
+ x(q), I(ye(O)), k(!0);
907
981
  },
908
- onFocus: () => K && !g && ye(),
909
- onMouseDown: () => K && !g && ye(),
910
- onKeyDown: ft
982
+ onFocus: () => K && !g && ge(),
983
+ onMouseDown: () => K && !g && ge(),
984
+ onKeyDown: gt
911
985
  }
912
986
  ),
913
- f && O !== "" && K ? /* @__PURE__ */ e("button", { type: "button", className: "combobox__clear", "aria-label": "清除选择", onClick: We, children: /* @__PURE__ */ e(J, { size: 14, strokeWidth: 2, "aria-hidden": "true" }) }) : null
987
+ _ && H !== "" && K ? /* @__PURE__ */ e("button", { type: "button", className: "combobox__clear", "aria-label": "清除选择", onClick: We, children: /* @__PURE__ */ e(ee, { size: 14, strokeWidth: 2, "aria-hidden": "true" }) }) : null
914
988
  ] }),
915
- H ? /* @__PURE__ */ i("div", { className: "combobox__popup", children: [
916
- /* @__PURE__ */ e("ul", { className: "combobox__listbox", id: V, role: "listbox", "aria-label": a, children: P.map((D, z) => {
917
- const j = O !== "" && D.value === O;
989
+ j ? /* @__PURE__ */ i("div", { className: "combobox__popup", children: [
990
+ /* @__PURE__ */ e("ul", { className: "combobox__listbox", id: V, role: "listbox", "aria-label": a, children: B.map(($, q) => {
991
+ const O = H !== "" && $.value === H;
918
992
  return /* @__PURE__ */ i(
919
993
  "li",
920
994
  {
921
- id: `${B}-opt-${z}`,
995
+ id: `${P}-opt-${q}`,
922
996
  role: "option",
923
- "aria-selected": j,
924
- "aria-disabled": D.disabled || void 0,
925
- className: A(
997
+ "aria-selected": O,
998
+ "aria-disabled": $.disabled || void 0,
999
+ className: S(
926
1000
  "combobox__option",
927
- z === M && "combobox__option--active",
928
- D.disabled && "combobox__option--disabled"
1001
+ q === E && "combobox__option--active",
1002
+ $.disabled && "combobox__option--disabled"
929
1003
  ),
930
- onMouseEnter: () => !D.disabled && I(z),
931
- onMouseDown: (ge) => {
932
- ge.preventDefault(), ze(D);
1004
+ onMouseEnter: () => !$.disabled && I(q),
1005
+ onMouseDown: (X) => {
1006
+ X.preventDefault(), ze($);
933
1007
  },
934
1008
  children: [
935
- D.prefix ? /* @__PURE__ */ e("span", { className: "combobox__option-prefix", "aria-hidden": "true", children: D.prefix }) : null,
936
- /* @__PURE__ */ e("span", { className: "combobox__option-label", children: D.label }),
937
- D.suffix ? /* @__PURE__ */ e("span", { className: "combobox__option-suffix", "aria-hidden": "true", children: D.suffix }) : null,
938
- j ? /* @__PURE__ */ e(Z, { className: "combobox__option-check", size: 14, strokeWidth: 2, "aria-hidden": "true" }) : null
1009
+ $.prefix ? /* @__PURE__ */ e("span", { className: "combobox__option-prefix", "aria-hidden": "true", children: $.prefix }) : null,
1010
+ /* @__PURE__ */ e("span", { className: "combobox__option-label", children: $.label }),
1011
+ $.suffix ? /* @__PURE__ */ e("span", { className: "combobox__option-suffix", "aria-hidden": "true", children: $.suffix }) : null,
1012
+ O ? /* @__PURE__ */ e(Q, { className: "combobox__option-check", size: 14, strokeWidth: 2, "aria-hidden": "true" }) : null
939
1013
  ]
940
1014
  },
941
- D.value
1015
+ $.value
942
1016
  );
943
1017
  }) }),
944
- P.length === 0 ? /* @__PURE__ */ e("div", { className: "combobox__empty", role: "status", "aria-live": "polite", children: c }) : null
1018
+ B.length === 0 ? /* @__PURE__ */ e("div", { className: "combobox__empty", role: "status", "aria-live": "polite", children: c }) : null
945
1019
  ] }) : null,
946
- _e ? /* @__PURE__ */ e("p", { className: "combobox__error-text", id: G, children: b }) : null
1020
+ be ? /* @__PURE__ */ e("p", { className: "combobox__error-text", id: G, children: f }) : null
947
1021
  ]
948
1022
  }
949
1023
  );
950
1024
  }
951
- function Rn({
1025
+ function Bn({
952
1026
  options: t,
953
1027
  ariaLabel: n,
954
1028
  name: r,
@@ -958,27 +1032,27 @@ function Rn({
958
1032
  fullWidth: o = !1,
959
1033
  iconOnly: u = !1
960
1034
  }) {
961
- const d = L();
1035
+ const d = R();
962
1036
  if (t.length === 0) return null;
963
- const b = r ?? d, c = t.find((_) => _.value === a && !_.disabled) ?? t.find((_) => !_.disabled) ?? t[0], f = A("switch-control", `switch-control--${l}`, o ? "switch-control--full" : "");
964
- return /* @__PURE__ */ e("div", { className: f, role: "radiogroup", "aria-label": n, children: t.map((_) => /* @__PURE__ */ i("label", { className: "switch-control__option", title: _.tooltip, children: [
1037
+ const f = r ?? d, c = t.find((b) => b.value === a && !b.disabled) ?? t.find((b) => !b.disabled) ?? t[0], _ = S("switch-control", `switch-control--${l}`, o ? "switch-control--full" : "");
1038
+ return /* @__PURE__ */ e("div", { className: _, role: "radiogroup", "aria-label": n, children: t.map((b) => /* @__PURE__ */ i("label", { className: "switch-control__option", title: b.tooltip, children: [
965
1039
  /* @__PURE__ */ e(
966
1040
  "input",
967
1041
  {
968
1042
  type: "radio",
969
1043
  className: "q1-sr-only",
970
- name: b,
971
- value: _.value,
972
- defaultChecked: _.value === c.value,
973
- disabled: _.disabled,
974
- onChange: () => s?.(_.value)
1044
+ name: f,
1045
+ value: b.value,
1046
+ defaultChecked: b.value === c.value,
1047
+ disabled: b.disabled,
1048
+ onChange: () => s?.(b.value)
975
1049
  }
976
1050
  ),
977
- _.icon ? /* @__PURE__ */ e("span", { className: "switch-control__icon", "aria-hidden": "true", children: _.icon }) : null,
978
- /* @__PURE__ */ e("span", { className: u ? "q1-sr-only" : void 0, children: _.label })
979
- ] }, _.value)) });
1051
+ b.icon ? /* @__PURE__ */ e("span", { className: "switch-control__icon", "aria-hidden": "true", children: b.icon }) : null,
1052
+ /* @__PURE__ */ e("span", { className: u ? "q1-sr-only" : void 0, children: b.label })
1053
+ ] }, b.value)) });
980
1054
  }
981
- function Ln({
1055
+ function Pn({
982
1056
  checked: t,
983
1057
  defaultOn: n = !1,
984
1058
  onChange: r,
@@ -988,23 +1062,23 @@ function Ln({
988
1062
  label: o,
989
1063
  description: u,
990
1064
  labelSide: d = "right",
991
- ariaLabel: b
1065
+ ariaLabel: f
992
1066
  }) {
993
- const [c, f] = E(n), _ = t !== void 0, m = _ ? t : c, y = L(), w = L(), p = l ? { "--toggle-on": l } : void 0;
1067
+ const [c, _] = M(n), b = t !== void 0, m = b ? t : c, y = R(), w = R(), p = l ? { "--toggle-on": l } : void 0;
994
1068
  return /* @__PURE__ */ i(
995
1069
  "button",
996
1070
  {
997
1071
  type: "button",
998
1072
  role: "switch",
999
1073
  "aria-checked": m,
1000
- "aria-label": o ? void 0 : b,
1074
+ "aria-label": o ? void 0 : f,
1001
1075
  "aria-labelledby": o ? y : void 0,
1002
1076
  "aria-describedby": o && u ? w : void 0,
1003
1077
  disabled: a,
1004
1078
  className: `toggle-field toggle-field--${d}`,
1005
1079
  onClick: () => {
1006
1080
  const N = !m;
1007
- _ || f(N), r?.(N);
1081
+ b || _(N), r?.(N);
1008
1082
  },
1009
1083
  children: [
1010
1084
  o ? /* @__PURE__ */ i("span", { className: "toggle-field__text", children: [
@@ -1016,39 +1090,39 @@ function Ln({
1016
1090
  }
1017
1091
  );
1018
1092
  }
1019
- function lt({ tokens: t }) {
1093
+ function ct({ tokens: t }) {
1020
1094
  return /* @__PURE__ */ e(U, { children: t.map(
1021
1095
  (n, r) => n.type ? /* @__PURE__ */ e("span", { className: `tok-${n.type}`, children: n.text }, r) : /* @__PURE__ */ e("span", { children: n.text }, r)
1022
1096
  ) });
1023
1097
  }
1024
- function Fn({ lines: t, ariaLabel: n }) {
1025
- return /* @__PURE__ */ e("pre", { className: "code-block", "aria-label": n, children: /* @__PURE__ */ e("code", { children: t.map((r, a) => /* @__PURE__ */ e("span", { className: "code-line", children: /* @__PURE__ */ e(lt, { tokens: r }) }, a)) }) });
1098
+ function On({ lines: t, ariaLabel: n }) {
1099
+ return /* @__PURE__ */ e("pre", { className: "code-block", "aria-label": n, children: /* @__PURE__ */ e("code", { children: t.map((r, a) => /* @__PURE__ */ e("span", { className: "code-line", children: /* @__PURE__ */ e(ct, { tokens: r }) }, a)) }) });
1026
1100
  }
1027
- function Kn({ children: t }) {
1101
+ function Hn({ children: t }) {
1028
1102
  return /* @__PURE__ */ e("code", { className: "code-inline", children: t });
1029
1103
  }
1030
- function Bn(t) {
1031
- const { lineNumbers: n = !0 } = t, { copied: r, copy: a, reset: s } = pe(), [l, o] = E(0), u = t.tabs ? t.tabs[l] ?? t.tabs[0] : void 0, d = u ? u.lines : t.lines ?? [], b = u ? u.filename : t.filename, c = d.map((_) => _.tokens.map((m) => m.text).join("")).join(`
1104
+ function jn(t) {
1105
+ const { lineNumbers: n = !0 } = t, { copied: r, copy: a, reset: s } = fe(), [l, o] = M(0), u = t.tabs ? t.tabs[l] ?? t.tabs[0] : void 0, d = u ? u.lines : t.lines ?? [], f = u ? u.filename : t.filename, c = d.map((b) => b.tokens.map((m) => m.text).join("")).join(`
1032
1106
  `);
1033
- let f = 0;
1107
+ let _ = 0;
1034
1108
  return /* @__PURE__ */ i("div", { className: "codeblock", children: [
1035
1109
  /* @__PURE__ */ i("header", { className: "codeblock__header", children: [
1036
- t.tabs ? /* @__PURE__ */ e("span", { className: "codeblock__tabs", children: t.tabs.map((_, m) => /* @__PURE__ */ e(
1110
+ t.tabs ? /* @__PURE__ */ e("span", { className: "codeblock__tabs", children: t.tabs.map((b, m) => /* @__PURE__ */ e(
1037
1111
  "button",
1038
1112
  {
1039
1113
  type: "button",
1040
1114
  className: `codeblock__tab${m === l ? " codeblock__tab--active" : ""}`,
1041
1115
  "aria-pressed": m === l,
1042
- "aria-label": `切换到 ${_.label} 示例`,
1116
+ "aria-label": `切换到 ${b.label} 示例`,
1043
1117
  onClick: () => {
1044
1118
  o(m), s();
1045
1119
  },
1046
- children: _.label
1120
+ children: b.label
1047
1121
  },
1048
- _.label
1049
- )) }) : b ? /* @__PURE__ */ i("span", { className: "codeblock__filename", children: [
1122
+ b.label
1123
+ )) }) : f ? /* @__PURE__ */ i("span", { className: "codeblock__filename", children: [
1050
1124
  /* @__PURE__ */ e(Fe, { size: 14, strokeWidth: 2, "aria-hidden": "true" }),
1051
- b
1125
+ f
1052
1126
  ] }) : /* @__PURE__ */ e("span", {}),
1053
1127
  /* @__PURE__ */ e(
1054
1128
  "button",
@@ -1057,7 +1131,7 @@ function Bn(t) {
1057
1131
  className: "codeblock__copy",
1058
1132
  "aria-label": "复制代码",
1059
1133
  onClick: () => a(c, "已复制代码"),
1060
- children: r ? /* @__PURE__ */ e(Z, { size: 14, strokeWidth: 2, "aria-hidden": "true" }) : /* @__PURE__ */ e(le, { size: 14, strokeWidth: 2, "aria-hidden": "true" })
1134
+ children: r ? /* @__PURE__ */ e(Q, { size: 14, strokeWidth: 2, "aria-hidden": "true" }) : /* @__PURE__ */ e(se, { size: 14, strokeWidth: 2, "aria-hidden": "true" })
1061
1135
  }
1062
1136
  )
1063
1137
  ] }),
@@ -1065,16 +1139,16 @@ function Bn(t) {
1065
1139
  /* @__PURE__ */ e(Fe, { size: 14, strokeWidth: 2, "aria-hidden": "true" }),
1066
1140
  u.filename
1067
1141
  ] }) : null,
1068
- /* @__PURE__ */ e("pre", { className: "codeblock__pre", children: /* @__PURE__ */ e("code", { children: d.map((_, m) => {
1069
- _.state !== "removed" && (f += 1);
1070
- const y = _.state === "added" ? "+" : _.state === "removed" ? "-" : f;
1142
+ /* @__PURE__ */ e("pre", { className: "codeblock__pre", children: /* @__PURE__ */ e("code", { children: d.map((b, m) => {
1143
+ b.state !== "removed" && (_ += 1);
1144
+ const y = b.state === "added" ? "+" : b.state === "removed" ? "-" : _;
1071
1145
  return /* @__PURE__ */ i(
1072
1146
  "span",
1073
1147
  {
1074
- className: `codeblock__line${_.state ? ` codeblock__line--${_.state}` : ""}`,
1148
+ className: `codeblock__line${b.state ? ` codeblock__line--${b.state}` : ""}`,
1075
1149
  children: [
1076
1150
  n ? /* @__PURE__ */ e("span", { className: "codeblock__ln", "aria-hidden": "true", children: y }) : null,
1077
- /* @__PURE__ */ e("span", { className: "codeblock__code", children: /* @__PURE__ */ e(lt, { tokens: _.tokens }) })
1151
+ /* @__PURE__ */ e("span", { className: "codeblock__code", children: /* @__PURE__ */ e(ct, { tokens: b.tokens }) })
1078
1152
  ]
1079
1153
  },
1080
1154
  m
@@ -1082,31 +1156,31 @@ function Bn(t) {
1082
1156
  }) }) })
1083
1157
  ] });
1084
1158
  }
1085
- function Pn({
1159
+ function Un({
1086
1160
  tabs: t,
1087
1161
  ariaLabel: n,
1088
1162
  variant: r = "default"
1089
1163
  }) {
1090
- const a = L(), s = t.find((c) => !c.disabled), [l, o] = E(s?.id ?? ""), u = t.find((c) => c.id === l), d = T(/* @__PURE__ */ new Map());
1091
- function b(c) {
1092
- const f = t.filter((y) => !y.disabled);
1093
- if (f.length === 0) return;
1094
- const _ = f.findIndex((y) => y.id === l);
1164
+ const a = R(), s = t.find((c) => !c.disabled), [l, o] = M(s?.id ?? ""), u = t.find((c) => c.id === l), d = T(/* @__PURE__ */ new Map());
1165
+ function f(c) {
1166
+ const _ = t.filter((y) => !y.disabled);
1167
+ if (_.length === 0) return;
1168
+ const b = _.findIndex((y) => y.id === l);
1095
1169
  let m;
1096
1170
  switch (c.key) {
1097
1171
  case "ArrowRight":
1098
1172
  case "ArrowDown":
1099
- m = f[(_ + 1) % f.length];
1173
+ m = _[(b + 1) % _.length];
1100
1174
  break;
1101
1175
  case "ArrowLeft":
1102
1176
  case "ArrowUp":
1103
- m = f[(_ - 1 + f.length) % f.length];
1177
+ m = _[(b - 1 + _.length) % _.length];
1104
1178
  break;
1105
1179
  case "Home":
1106
- m = f[0];
1180
+ m = _[0];
1107
1181
  break;
1108
1182
  case "End":
1109
- m = f[f.length - 1];
1183
+ m = _[_.length - 1];
1110
1184
  break;
1111
1185
  default:
1112
1186
  return;
@@ -1121,13 +1195,13 @@ function Pn({
1121
1195
  role: "tablist",
1122
1196
  "aria-label": n,
1123
1197
  "aria-orientation": "horizontal",
1124
- onKeyDown: b,
1198
+ onKeyDown: f,
1125
1199
  children: t.map((c) => {
1126
- const f = c.tooltip ? `${a}-tab-${c.id}-tooltip` : void 0, _ = /* @__PURE__ */ i(
1200
+ const _ = c.tooltip ? `${a}-tab-${c.id}-tooltip` : void 0, b = /* @__PURE__ */ i(
1127
1201
  "button",
1128
1202
  {
1129
1203
  "aria-controls": `${a}-panel-${c.id}`,
1130
- "aria-describedby": f,
1204
+ "aria-describedby": _,
1131
1205
  "aria-selected": c.id === l,
1132
1206
  className: "tabs-control__tab",
1133
1207
  disabled: c.disabled,
@@ -1147,9 +1221,9 @@ function Pn({
1147
1221
  c.id
1148
1222
  );
1149
1223
  return c.tooltip ? /* @__PURE__ */ i("span", { className: "tabs-control__tab-wrapper", title: c.tooltip, children: [
1150
- _,
1151
- /* @__PURE__ */ e("span", { id: f, className: "q1-sr-only", children: c.tooltip })
1152
- ] }, c.id) : _;
1224
+ b,
1225
+ /* @__PURE__ */ e("span", { id: _, className: "q1-sr-only", children: c.tooltip })
1226
+ ] }, c.id) : b;
1153
1227
  })
1154
1228
  }
1155
1229
  ),
@@ -1165,22 +1239,22 @@ function Pn({
1165
1239
  ) : null
1166
1240
  ] });
1167
1241
  }
1168
- const st = Ue(null);
1169
- function On({ multiple: t, children: n }) {
1170
- const [r, a] = E(null);
1171
- return /* @__PURE__ */ e("div", { className: "collapse-group", children: /* @__PURE__ */ e(st.Provider, { value: t ? null : { openId: r, setOpenId: a }, children: n }) });
1242
+ const dt = Ye(null);
1243
+ function Yn({ multiple: t, children: n }) {
1244
+ const [r, a] = M(null);
1245
+ return /* @__PURE__ */ e("div", { className: "collapse-group", children: /* @__PURE__ */ e(dt.Provider, { value: t ? null : { openId: r, setOpenId: a }, children: n }) });
1172
1246
  }
1173
- function Hn({
1247
+ function Vn({
1174
1248
  title: t,
1175
1249
  defaultOpen: n,
1176
1250
  small: r,
1177
1251
  children: a
1178
1252
  }) {
1179
- const s = Ye(st), l = L(), [o, u] = E(n ?? !1);
1180
- ne(() => {
1253
+ const s = Ve(dt), l = R(), [o, u] = M(n ?? !1);
1254
+ ae(() => {
1181
1255
  s && n && s.setOpenId(l);
1182
1256
  }, []);
1183
- const d = s ? s.openId === l : o, b = typeof t == "function" ? t(d) : t;
1257
+ const d = s ? s.openId === l : o, f = typeof t == "function" ? t(d) : t;
1184
1258
  return /* @__PURE__ */ i("div", { className: `collapse${r ? " collapse--small" : ""}`, children: [
1185
1259
  /* @__PURE__ */ i(
1186
1260
  "button",
@@ -1190,41 +1264,41 @@ function Hn({
1190
1264
  "aria-expanded": d,
1191
1265
  "aria-controls": l,
1192
1266
  onClick: () => {
1193
- s ? s.setOpenId(d ? null : l) : u((f) => !f);
1267
+ s ? s.setOpenId(d ? null : l) : u((_) => !_);
1194
1268
  },
1195
1269
  children: [
1196
- /* @__PURE__ */ e("span", { className: "collapse__title", children: b }),
1197
- /* @__PURE__ */ e(Q, { className: "collapse__chevron", size: 16, strokeWidth: 2, "aria-hidden": "true" })
1270
+ /* @__PURE__ */ e("span", { className: "collapse__title", children: f }),
1271
+ /* @__PURE__ */ e(J, { className: "collapse__chevron", size: 16, strokeWidth: 2, "aria-hidden": "true" })
1198
1272
  ]
1199
1273
  }
1200
1274
  ),
1201
1275
  /* @__PURE__ */ e("div", { className: `collapse__panel${d ? " collapse__panel--open" : ""}`, id: l, children: /* @__PURE__ */ e("div", { className: "collapse__content", children: a }) })
1202
1276
  ] });
1203
1277
  }
1204
- function jn({ sections: t, triggerLabel: n = "打开命令面板", hotkey: r }) {
1205
- const [a, s] = E(!1), [l, o] = E(""), [u, d] = E(0), b = T(null), c = T(null), f = T(null), _ = T(null), m = ae(() => {
1278
+ function Gn({ sections: t, triggerLabel: n = "打开命令面板", hotkey: r }) {
1279
+ const [a, s] = M(!1), [l, o] = M(""), [u, d] = M(0), f = T(null), c = T(null), _ = T(null), b = T(null), m = re(() => {
1206
1280
  const p = l.trim().toLowerCase();
1207
1281
  let N = 0;
1208
- return t.map((x) => ({
1209
- heading: x.heading,
1210
- items: x.items.filter(($) => p.length === 0 || $.label.toLowerCase().includes(p)).map(($) => ({ item: $, flatIndex: N++ }))
1211
- })).filter((x) => x.items.length > 0);
1282
+ return t.map((v) => ({
1283
+ heading: v.heading,
1284
+ items: v.items.filter((D) => p.length === 0 || D.label.toLowerCase().includes(p)).map((D) => ({ item: D, flatIndex: N++ }))
1285
+ })).filter((v) => v.items.length > 0);
1212
1286
  }, [t, l]), y = m.reduce((p, N) => p + N.items.length, 0);
1213
1287
  F(() => {
1214
1288
  if (!a) return;
1215
1289
  o(""), d(0);
1216
1290
  const p = document.activeElement;
1217
- _.current = p && p !== document.body ? p : b.current;
1218
- const N = window.setTimeout(() => f.current?.focus(), 0);
1291
+ b.current = p && p !== document.body ? p : f.current;
1292
+ const N = window.setTimeout(() => _.current?.focus(), 0);
1219
1293
  return document.body.style.overflow = "hidden", () => {
1220
1294
  window.clearTimeout(N), document.body.style.overflow = "";
1221
- const x = _.current;
1222
- (x && document.contains(x) ? x : b.current)?.focus();
1295
+ const v = b.current;
1296
+ (v && document.contains(v) ? v : f.current)?.focus();
1223
1297
  };
1224
1298
  }, [a]), F(() => {
1225
1299
  if (!r) return;
1226
1300
  function p(N) {
1227
- N.repeat || (N.metaKey || N.ctrlKey) && N.key.toLowerCase() === "k" && (N.preventDefault(), s((x) => !x));
1301
+ N.repeat || (N.metaKey || N.ctrlKey) && N.key.toLowerCase() === "k" && (N.preventDefault(), s((v) => !v));
1228
1302
  }
1229
1303
  return document.addEventListener("keydown", p), () => document.removeEventListener("keydown", p);
1230
1304
  }, [r]);
@@ -1241,14 +1315,14 @@ function jn({ sections: t, triggerLabel: n = "打开命令面板", hotkey: r })
1241
1315
  else if (p.key === "Tab") {
1242
1316
  const N = Array.from(
1243
1317
  c.current?.querySelectorAll("button:not([disabled]), input") ?? []
1244
- ), x = N[0], $ = N[N.length - 1];
1245
- p.shiftKey && document.activeElement === x ? (p.preventDefault(), $?.focus()) : !p.shiftKey && document.activeElement === $ && (p.preventDefault(), x?.focus());
1318
+ ), v = N[0], D = N[N.length - 1];
1319
+ p.shiftKey && document.activeElement === v ? (p.preventDefault(), D?.focus()) : !p.shiftKey && document.activeElement === D && (p.preventDefault(), v?.focus());
1246
1320
  }
1247
1321
  }
1248
1322
  }
1249
1323
  return /* @__PURE__ */ i("div", { className: "command-palette-wrap", children: [
1250
- /* @__PURE__ */ i("button", { ref: b, type: "button", className: "command-palette__trigger", onClick: () => s(!0), children: [
1251
- /* @__PURE__ */ e(ue, { size: 16, strokeWidth: 2, "aria-hidden": "true" }),
1324
+ /* @__PURE__ */ i("button", { ref: f, type: "button", className: "command-palette__trigger", onClick: () => s(!0), children: [
1325
+ /* @__PURE__ */ e(me, { size: 16, strokeWidth: 2, "aria-hidden": "true" }),
1252
1326
  n,
1253
1327
  /* @__PURE__ */ e("kbd", { className: "command-palette__hint", children: "⌘K" })
1254
1328
  ] }),
@@ -1265,11 +1339,11 @@ function jn({ sections: t, triggerLabel: n = "打开命令面板", hotkey: r })
1265
1339
  ),
1266
1340
  /* @__PURE__ */ i("div", { className: "command-palette__panel", ref: c, children: [
1267
1341
  /* @__PURE__ */ i("div", { className: "command-palette__search", children: [
1268
- /* @__PURE__ */ e(ue, { size: 18, strokeWidth: 2, "aria-hidden": "true" }),
1342
+ /* @__PURE__ */ e(me, { size: 18, strokeWidth: 2, "aria-hidden": "true" }),
1269
1343
  /* @__PURE__ */ e(
1270
1344
  "input",
1271
1345
  {
1272
- ref: f,
1346
+ ref: _,
1273
1347
  value: l,
1274
1348
  "aria-label": "输入命令或搜索",
1275
1349
  "aria-controls": "command-palette-list",
@@ -1290,23 +1364,23 @@ function jn({ sections: t, triggerLabel: n = "打开命令面板", hotkey: r })
1290
1364
  // heading 缺省的段即呈现为"只有分隔线、没有标题"。
1291
1365
  /* @__PURE__ */ i("section", { className: "command-palette__group", children: [
1292
1366
  p.heading ? /* @__PURE__ */ e("h2", { className: "command-palette__heading", children: p.heading }) : null,
1293
- p.items.map(({ item: x, flatIndex: $ }) => /* @__PURE__ */ i(
1367
+ p.items.map(({ item: v, flatIndex: D }) => /* @__PURE__ */ i(
1294
1368
  "button",
1295
1369
  {
1296
1370
  type: "button",
1297
1371
  role: "option",
1298
- "aria-selected": $ === u,
1299
- className: `command-palette__entry${$ === u ? " command-palette__entry--active" : ""}`,
1300
- onMouseEnter: () => d($),
1372
+ "aria-selected": D === u,
1373
+ className: `command-palette__entry${D === u ? " command-palette__entry--active" : ""}`,
1374
+ onMouseEnter: () => d(D),
1301
1375
  onClick: () => s(!1),
1302
1376
  children: [
1303
- /* @__PURE__ */ e(Ge, { size: 15, strokeWidth: 2, "aria-hidden": "true" }),
1304
- /* @__PURE__ */ e("span", { className: "command-palette__entry-label", children: x.label }),
1305
- x.suffix ? /* @__PURE__ */ e("span", { className: "command-palette__suffix", "aria-hidden": "true", children: x.suffix }) : null,
1306
- x.keybind ? /* @__PURE__ */ e("kbd", { className: "command-palette__kbd", children: x.keybind }) : null
1377
+ /* @__PURE__ */ e(Xe, { size: 15, strokeWidth: 2, "aria-hidden": "true" }),
1378
+ /* @__PURE__ */ e("span", { className: "command-palette__entry-label", children: v.label }),
1379
+ v.suffix ? /* @__PURE__ */ e("span", { className: "command-palette__suffix", "aria-hidden": "true", children: v.suffix }) : null,
1380
+ v.keybind ? /* @__PURE__ */ e("kbd", { className: "command-palette__kbd", children: v.keybind }) : null
1307
1381
  ]
1308
1382
  },
1309
- x.label
1383
+ v.label
1310
1384
  ))
1311
1385
  ] }, p.heading ?? `divider-${N}`)
1312
1386
  )) : /* @__PURE__ */ e("p", { className: "command-palette__empty", children: `没有匹配「${l}」的命令` }) })
@@ -1314,7 +1388,7 @@ function jn({ sections: t, triggerLabel: n = "打开命令面板", hotkey: r })
1314
1388
  ] }) : null
1315
1389
  ] });
1316
1390
  }
1317
- function Un({
1391
+ function Xn({
1318
1392
  open: t,
1319
1393
  onClose: n,
1320
1394
  title: r,
@@ -1324,41 +1398,41 @@ function Un({
1324
1398
  verificationPhrase: o,
1325
1399
  irreversibleDescription: u,
1326
1400
  loading: d,
1327
- onConfirm: b
1401
+ onConfirm: f
1328
1402
  }) {
1329
- const [c, f] = E(""), [_, m] = E(null), y = T(null), w = T(null), p = L(), N = L(), x = c === o && !d;
1403
+ const [c, _] = M(""), [b, m] = M(null), y = T(null), w = T(null), p = R(), N = R(), v = c === o && !d;
1330
1404
  if (F(() => {
1331
1405
  if (!t) return;
1332
- f(""), m(null);
1406
+ _(""), m(null);
1333
1407
  const h = document.body.style.overflow;
1334
1408
  document.body.style.overflow = "hidden";
1335
- const v = window.setTimeout(() => {
1409
+ const x = window.setTimeout(() => {
1336
1410
  const g = w.current;
1337
1411
  (g && !g.disabled ? g : y.current)?.focus();
1338
1412
  }, 0);
1339
1413
  return () => {
1340
- window.clearTimeout(v), document.body.style.overflow = h;
1414
+ window.clearTimeout(x), document.body.style.overflow = h;
1341
1415
  };
1342
- }, [t]), ne(() => {
1416
+ }, [t]), ae(() => {
1343
1417
  t && d && y.current && !y.current.contains(document.activeElement) && y.current.focus();
1344
1418
  }, [t, d]), !t) return null;
1345
- function $() {
1346
- if (!x) return;
1347
- const h = b();
1419
+ function D() {
1420
+ if (!v) return;
1421
+ const h = f();
1348
1422
  h ? m(h) : n();
1349
1423
  }
1350
1424
  function C(h) {
1351
1425
  if (h.key === "Escape")
1352
1426
  h.preventDefault(), d || n();
1353
1427
  else if (h.key === "Tab") {
1354
- const v = Array.from(
1428
+ const x = Array.from(
1355
1429
  y.current?.querySelectorAll("button:not([disabled]), input:not([disabled])") ?? []
1356
1430
  );
1357
- if (v.length === 0) {
1431
+ if (x.length === 0) {
1358
1432
  h.preventDefault();
1359
1433
  return;
1360
1434
  }
1361
- const g = v[0], k = v[v.length - 1];
1435
+ const g = x[0], k = x[x.length - 1];
1362
1436
  h.shiftKey && document.activeElement === g ? (h.preventDefault(), k.focus()) : !h.shiftKey && document.activeElement === k && (h.preventDefault(), g.focus());
1363
1437
  }
1364
1438
  }
@@ -1386,7 +1460,7 @@ function Un({
1386
1460
  children: [
1387
1461
  /* @__PURE__ */ i("header", { className: "modal__header", children: [
1388
1462
  /* @__PURE__ */ e("h2", { className: "modal__title", id: p, children: r }),
1389
- /* @__PURE__ */ e("button", { type: "button", className: "modal__close", "aria-label": "关闭", disabled: d, onClick: n, children: /* @__PURE__ */ e(J, { size: 16, strokeWidth: 2, "aria-hidden": "true" }) })
1463
+ /* @__PURE__ */ e("button", { type: "button", className: "modal__close", "aria-label": "关闭", disabled: d, onClick: n, children: /* @__PURE__ */ e(ee, { size: 16, strokeWidth: 2, "aria-hidden": "true" }) })
1390
1464
  ] }),
1391
1465
  /* @__PURE__ */ i("div", { className: "modal__body", children: [
1392
1466
  /* @__PURE__ */ e("p", { children: a }),
@@ -1404,38 +1478,38 @@ function Un({
1404
1478
  id: `${N}-input`,
1405
1479
  className: "modal-input",
1406
1480
  "aria-labelledby": N,
1407
- "aria-invalid": _ ? !0 : void 0,
1481
+ "aria-invalid": b ? !0 : void 0,
1408
1482
  disabled: d,
1409
1483
  value: c,
1410
1484
  onChange: (h) => {
1411
- f(h.target.value), m(null);
1485
+ _(h.target.value), m(null);
1412
1486
  },
1413
1487
  onKeyDown: (h) => {
1414
- h.key === "Enter" && (h.preventDefault(), $());
1488
+ h.key === "Enter" && (h.preventDefault(), D());
1415
1489
  }
1416
1490
  }
1417
1491
  ),
1418
- _ ? /* @__PURE__ */ e("p", { className: "destructive-modal__error", children: _ }) : null
1492
+ b ? /* @__PURE__ */ e("p", { className: "destructive-modal__error", children: b }) : null
1419
1493
  ] }),
1420
1494
  /* @__PURE__ */ i("footer", { className: "modal__footer", children: [
1421
- /* @__PURE__ */ e(Ot, { variant: "secondary", disabled: d, onClick: n, children: "取消" }),
1495
+ /* @__PURE__ */ e(lt, { variant: "secondary", disabled: d, onClick: n, children: "取消" }),
1422
1496
  /* @__PURE__ */ i(
1423
1497
  "button",
1424
1498
  {
1425
1499
  type: "button",
1426
1500
  className: "modal-btn modal-btn--danger",
1427
- disabled: !x,
1501
+ disabled: !v,
1428
1502
  "aria-busy": d || void 0,
1429
- onClick: $,
1503
+ onClick: D,
1430
1504
  children: [
1431
- d ? /* @__PURE__ */ e(me, { className: "destructive-modal__spinner", size: 14, strokeWidth: 2, "aria-hidden": "true" }) : null,
1505
+ d ? /* @__PURE__ */ e(he, { className: "destructive-modal__spinner", size: 14, strokeWidth: 2, "aria-hidden": "true" }) : null,
1432
1506
  s
1433
1507
  ]
1434
1508
  }
1435
1509
  )
1436
1510
  ] }),
1437
1511
  u ? /* @__PURE__ */ i("div", { className: "destructive-modal__band", children: [
1438
- /* @__PURE__ */ e(he, { size: 15, strokeWidth: 2, "aria-hidden": "true" }),
1512
+ /* @__PURE__ */ e(pe, { size: 15, strokeWidth: 2, "aria-hidden": "true" }),
1439
1513
  /* @__PURE__ */ e("span", { children: u })
1440
1514
  ] }) : null
1441
1515
  ]
@@ -1443,7 +1517,7 @@ function Un({
1443
1517
  )
1444
1518
  ] });
1445
1519
  }
1446
- function Yn({
1520
+ function Zn({
1447
1521
  open: t,
1448
1522
  onClose: n,
1449
1523
  title: r,
@@ -1451,46 +1525,46 @@ function Yn({
1451
1525
  footer: s,
1452
1526
  height: l
1453
1527
  }) {
1454
- const o = T(null), u = L(), [d, b] = E(0), c = T(null), f = T(!1);
1528
+ const o = T(null), u = R(), [d, f] = M(0), c = T(null), _ = T(!1);
1455
1529
  if (F(() => {
1456
1530
  if (!t) return;
1457
1531
  const N = document.body.style.overflow;
1458
1532
  document.body.style.overflow = "hidden";
1459
- const x = window.setTimeout(
1533
+ const v = window.setTimeout(
1460
1534
  () => o.current?.querySelector("button, input, [tabindex]")?.focus(),
1461
1535
  0
1462
1536
  );
1463
1537
  return () => {
1464
- window.clearTimeout(x), document.body.style.overflow = N, b(0);
1538
+ window.clearTimeout(v), document.body.style.overflow = N, f(0);
1465
1539
  };
1466
1540
  }, [t]), !t) return null;
1467
- function _(N) {
1541
+ function b(N) {
1468
1542
  if (N.key === "Escape")
1469
1543
  N.preventDefault(), n();
1470
1544
  else if (N.key === "Tab") {
1471
- const x = Array.from(
1545
+ const v = Array.from(
1472
1546
  o.current?.querySelectorAll("button:not([disabled]), input:not([disabled]), select") ?? []
1473
1547
  );
1474
- if (x.length === 0) return;
1475
- const $ = x[0], C = x[x.length - 1];
1476
- N.shiftKey && document.activeElement === $ ? (N.preventDefault(), C.focus()) : !N.shiftKey && document.activeElement === C && (N.preventDefault(), $.focus());
1548
+ if (v.length === 0) return;
1549
+ const D = v[0], C = v[v.length - 1];
1550
+ N.shiftKey && document.activeElement === D ? (N.preventDefault(), C.focus()) : !N.shiftKey && document.activeElement === C && (N.preventDefault(), D.focus());
1477
1551
  }
1478
1552
  }
1479
1553
  function m(N) {
1480
- c.current = N.clientY, f.current = !1, N.target.setPointerCapture(N.pointerId);
1554
+ c.current = N.clientY, _.current = !1, N.target.setPointerCapture(N.pointerId);
1481
1555
  }
1482
1556
  function y(N) {
1483
1557
  if (c.current === null) return;
1484
- const x = Math.max(0, N.clientY - c.current);
1485
- x > 4 && (f.current = !0), b(x);
1558
+ const v = Math.max(0, N.clientY - c.current);
1559
+ v > 4 && (_.current = !0), f(v);
1486
1560
  }
1487
1561
  function w() {
1488
- c.current !== null && d > 80 ? n() : b(0), c.current = null;
1562
+ c.current !== null && d > 80 ? n() : f(0), c.current = null;
1489
1563
  }
1490
1564
  function p() {
1491
- b(0), c.current = null, f.current = !1;
1565
+ f(0), c.current = null, _.current = !1;
1492
1566
  }
1493
- return /* @__PURE__ */ i("div", { className: "drawer", onKeyDown: _, children: [
1567
+ return /* @__PURE__ */ i("div", { className: "drawer", onKeyDown: b, children: [
1494
1568
  /* @__PURE__ */ e("button", { type: "button", className: "drawer__backdrop", "aria-label": "关闭", tabIndex: -1, onClick: n }),
1495
1569
  /* @__PURE__ */ i(
1496
1570
  "div",
@@ -1516,7 +1590,7 @@ function Yn({
1516
1590
  onPointerUp: w,
1517
1591
  onPointerCancel: p,
1518
1592
  onClick: () => {
1519
- f.current || n(), f.current = !1;
1593
+ _.current || n(), _.current = !1;
1520
1594
  },
1521
1595
  children: /* @__PURE__ */ e("span", { className: "drawer__grabber", "aria-hidden": "true" })
1522
1596
  }
@@ -1529,7 +1603,7 @@ function Yn({
1529
1603
  )
1530
1604
  ] });
1531
1605
  }
1532
- function Vn({
1606
+ function Qn({
1533
1607
  icon: t,
1534
1608
  title: n,
1535
1609
  description: r,
@@ -1544,7 +1618,7 @@ function Vn({
1544
1618
  a ? /* @__PURE__ */ e("div", { className: "empty-state__actions", children: a }) : null
1545
1619
  ] });
1546
1620
  }
1547
- function Gn({
1621
+ function Jn({
1548
1622
  leading: t,
1549
1623
  title: n,
1550
1624
  subtitle: r,
@@ -1561,7 +1635,7 @@ function Gn({
1561
1635
  a ? /* @__PURE__ */ e("div", { className: "entity__trailing", children: a }) : null
1562
1636
  ] });
1563
1637
  }
1564
- function Xn({
1638
+ function ea({
1565
1639
  label: t,
1566
1640
  size: n = "md",
1567
1641
  action: r,
@@ -1577,7 +1651,7 @@ function Xn({
1577
1651
  ] })
1578
1652
  ] });
1579
1653
  }
1580
- function Zn({ title: t, message: n, action: r }) {
1654
+ function ta({ title: t, message: n, action: r }) {
1581
1655
  return /* @__PURE__ */ i("div", { className: "error-card", role: "alert", "aria-live": "assertive", children: [
1582
1656
  /* @__PURE__ */ e($e, { className: "error-card__icon", size: 20, strokeWidth: 2, "aria-hidden": "true" }),
1583
1657
  /* @__PURE__ */ i("p", { className: "error-card__title", children: [
@@ -1588,36 +1662,36 @@ function Zn({ title: t, message: n, action: r }) {
1588
1662
  r ? /* @__PURE__ */ e("div", { className: "error-card__actions", children: r }) : null
1589
1663
  ] });
1590
1664
  }
1591
- const re = [
1592
- { value: "bad", label: "不太清楚", Icon: Mt },
1593
- { value: "ok", label: "还可以", Icon: Tt },
1594
- { value: "good", label: "不错", Icon: Wt },
1595
- { value: "love", label: "喜欢", Icon: Et }
1665
+ const le = [
1666
+ { value: "bad", label: "不太清楚", Icon: At },
1667
+ { value: "ok", label: "还可以", Icon: zt },
1668
+ { value: "good", label: "不错", Icon: Kt },
1669
+ { value: "love", label: "喜欢", Icon: St }
1596
1670
  ];
1597
- function Qn({
1671
+ function na({
1598
1672
  label: t = "反馈",
1599
1673
  prompt: n = "这次体验怎么样?",
1600
1674
  placeholder: r = "你的反馈…",
1601
1675
  inline: a,
1602
1676
  topics: s
1603
1677
  }) {
1604
- const [l, o] = E(!!a), [u, d] = E(null), [b, c] = E(!1), f = T(null), _ = T([]), m = L(), y = L();
1678
+ const [l, o] = M(!!a), [u, d] = M(null), [f, c] = M(!1), _ = T(null), b = T([]), m = R(), y = R();
1605
1679
  function w() {
1606
- o(!1), f.current?.focus();
1680
+ o(!1), _.current?.focus();
1607
1681
  }
1608
1682
  function p(g) {
1609
- g.preventDefault(), c(!0), a || (o(!1), f.current?.focus());
1683
+ g.preventDefault(), c(!0), a || (o(!1), _.current?.focus());
1610
1684
  }
1611
- const N = re.findIndex((g) => g.value === u), x = N === -1 ? 0 : N;
1612
- function $(g) {
1685
+ const N = le.findIndex((g) => g.value === u), v = N === -1 ? 0 : N;
1686
+ function D(g) {
1613
1687
  d(g), c(!1);
1614
1688
  }
1615
1689
  function C(g, k) {
1616
- const M = g.key === "ArrowRight" || g.key === "ArrowDown", I = g.key === "ArrowLeft" || g.key === "ArrowUp";
1617
- if (!M && !I) return;
1690
+ const E = g.key === "ArrowRight" || g.key === "ArrowDown", I = g.key === "ArrowLeft" || g.key === "ArrowUp";
1691
+ if (!E && !I) return;
1618
1692
  g.preventDefault();
1619
- const S = (k + (M ? 1 : re.length - 1)) % re.length;
1620
- $(re[S].value), _.current[S]?.focus();
1693
+ const A = (k + (E ? 1 : le.length - 1)) % le.length;
1694
+ D(le[A].value), b.current[A]?.focus();
1621
1695
  }
1622
1696
  const h = /* @__PURE__ */ i(
1623
1697
  "form",
@@ -1631,21 +1705,21 @@ function Qn({
1631
1705
  children: [
1632
1706
  /* @__PURE__ */ i("div", { className: "feedback__head", children: [
1633
1707
  /* @__PURE__ */ e("span", { className: "feedback__prompt", id: y, children: n }),
1634
- /* @__PURE__ */ e("div", { className: "feedback__emotions", role: "radiogroup", "aria-labelledby": y, children: re.map(({ value: g, label: k, Icon: M }, I) => /* @__PURE__ */ e(
1708
+ /* @__PURE__ */ e("div", { className: "feedback__emotions", role: "radiogroup", "aria-labelledby": y, children: le.map(({ value: g, label: k, Icon: E }, I) => /* @__PURE__ */ e(
1635
1709
  "button",
1636
1710
  {
1637
- ref: (S) => {
1638
- _.current[I] = S;
1711
+ ref: (A) => {
1712
+ b.current[I] = A;
1639
1713
  },
1640
1714
  type: "button",
1641
1715
  role: "radio",
1642
1716
  className: "feedback__emotion",
1643
1717
  "aria-label": k,
1644
1718
  "aria-checked": u === g,
1645
- tabIndex: I === x ? 0 : -1,
1646
- onClick: () => $(g),
1647
- onKeyDown: (S) => C(S, I),
1648
- children: /* @__PURE__ */ e(M, { size: 16, strokeWidth: 1.8, "aria-hidden": "true" })
1719
+ tabIndex: I === v ? 0 : -1,
1720
+ onClick: () => D(g),
1721
+ onKeyDown: (A) => C(A, I),
1722
+ children: /* @__PURE__ */ e(E, { size: 16, strokeWidth: 1.8, "aria-hidden": "true" })
1649
1723
  },
1650
1724
  g
1651
1725
  )) })
@@ -1662,20 +1736,20 @@ function Qn({
1662
1736
  /* @__PURE__ */ e("textarea", { className: "feedback__textarea", rows: 3, placeholder: r, onChange: () => c(!1) })
1663
1737
  ] }),
1664
1738
  /* @__PURE__ */ i("div", { className: "feedback__footer", children: [
1665
- /* @__PURE__ */ e("span", { className: "feedback__ack", "aria-hidden": "true", children: b ? "已收到反馈" : "" }),
1739
+ /* @__PURE__ */ e("span", { className: "feedback__ack", "aria-hidden": "true", children: f ? "已收到反馈" : "" }),
1666
1740
  /* @__PURE__ */ e("button", { type: "submit", className: "feedback__submit", children: "发送" })
1667
1741
  ] })
1668
1742
  ]
1669
1743
  }
1670
- ), v = /* @__PURE__ */ e("span", { className: "q1-sr-only", role: "status", "aria-live": "polite", children: b ? "已收到反馈" : "" });
1744
+ ), x = /* @__PURE__ */ e("span", { className: "q1-sr-only", role: "status", "aria-live": "polite", children: f ? "已收到反馈" : "" });
1671
1745
  return a ? /* @__PURE__ */ i("div", { className: "feedback feedback--inline", children: [
1672
1746
  h,
1673
- v
1747
+ x
1674
1748
  ] }) : /* @__PURE__ */ i("div", { className: "feedback", children: [
1675
1749
  /* @__PURE__ */ e(
1676
1750
  "button",
1677
1751
  {
1678
- ref: f,
1752
+ ref: _,
1679
1753
  type: "button",
1680
1754
  className: "feedback__trigger",
1681
1755
  "aria-expanded": l,
@@ -1687,10 +1761,10 @@ function Qn({
1687
1761
  }
1688
1762
  ),
1689
1763
  l ? h : null,
1690
- v
1764
+ x
1691
1765
  ] });
1692
1766
  }
1693
- function Jn({
1767
+ function aa({
1694
1768
  title: t,
1695
1769
  subtitle: n,
1696
1770
  tone: r,
@@ -1699,7 +1773,7 @@ function Jn({
1699
1773
  disabled: l,
1700
1774
  children: o
1701
1775
  }) {
1702
- const u = A("fieldset", r ? `fieldset--${r}` : "");
1776
+ const u = S("fieldset", r ? `fieldset--${r}` : "");
1703
1777
  return /* @__PURE__ */ i("fieldset", { className: u, disabled: l, children: [
1704
1778
  t ? /* @__PURE__ */ e("legend", { className: "fieldset__title", children: t }) : null,
1705
1779
  /* @__PURE__ */ e("p", { className: "fieldset__subtitle", children: n }),
@@ -1710,39 +1784,39 @@ function Jn({
1710
1784
  ] }) : null
1711
1785
  ] });
1712
1786
  }
1713
- function ot(t, n, r, a, s) {
1787
+ function ut(t, n, r, a, s) {
1714
1788
  const l = t.length;
1715
1789
  t.forEach((o, u) => {
1716
- const d = `${r}/${o.name}`, b = o.type === "folder" && (o.children?.length ?? 0) > 0;
1717
- s.push({ path: d, name: o.name, type: o.type, level: n, parentPath: r, hasChildren: b, setsize: l, posinset: u + 1 }), o.type === "folder" && a.has(d) && o.children && ot(o.children, n + 1, d, a, s);
1790
+ const d = `${r}/${o.name}`, f = o.type === "folder" && (o.children?.length ?? 0) > 0;
1791
+ s.push({ path: d, name: o.name, type: o.type, level: n, parentPath: r, hasChildren: f, setsize: l, posinset: u + 1 }), o.type === "folder" && a.has(d) && o.children && ut(o.children, n + 1, d, a, s);
1718
1792
  });
1719
1793
  }
1720
- function ea({
1794
+ function ra({
1721
1795
  nodes: t,
1722
1796
  label: n = "项目目录",
1723
1797
  defaultExpanded: r = []
1724
1798
  }) {
1725
- const [a, s] = E(() => new Set(r)), [l, o] = E(() => t.length ? `/${t[0].name}` : ""), u = T(/* @__PURE__ */ new Map()), d = ae(() => {
1799
+ const [a, s] = M(() => new Set(r)), [l, o] = M(() => t.length ? `/${t[0].name}` : ""), u = T(/* @__PURE__ */ new Map()), d = re(() => {
1726
1800
  const m = [];
1727
- return ot(t, 1, "", a, m), m;
1728
- }, [t, a]), b = d.some((m) => m.path === l) ? l : d[0]?.path ?? "";
1801
+ return ut(t, 1, "", a, m), m;
1802
+ }, [t, a]), f = d.some((m) => m.path === l) ? l : d[0]?.path ?? "";
1729
1803
  function c(m) {
1730
1804
  o(m), window.requestAnimationFrame(() => u.current.get(m)?.focus());
1731
1805
  }
1732
- function f(m, y) {
1806
+ function _(m, y) {
1733
1807
  s((w) => {
1734
1808
  const p = new Set(w);
1735
1809
  return y ?? !p.has(m) ? p.add(m) : p.delete(m), p;
1736
1810
  });
1737
1811
  }
1738
- function _(m) {
1739
- const y = d.findIndex((p) => p.path === b);
1812
+ function b(m) {
1813
+ const y = d.findIndex((p) => p.path === f);
1740
1814
  if (y === -1) return;
1741
1815
  const w = d[y];
1742
- m.key === "ArrowDown" ? (m.preventDefault(), y < d.length - 1 && c(d[y + 1].path)) : m.key === "ArrowUp" ? (m.preventDefault(), y > 0 && c(d[y - 1].path)) : m.key === "ArrowRight" ? (m.preventDefault(), w.hasChildren && !a.has(w.path) ? f(w.path, !0) : w.hasChildren && y < d.length - 1 && c(d[y + 1].path)) : m.key === "ArrowLeft" ? (m.preventDefault(), w.hasChildren && a.has(w.path) ? f(w.path, !1) : w.parentPath && c(w.parentPath)) : m.key === "Home" ? (m.preventDefault(), c(d[0].path)) : m.key === "End" ? (m.preventDefault(), c(d[d.length - 1].path)) : (m.key === "Enter" || m.key === " ") && (m.preventDefault(), w.hasChildren && f(w.path));
1816
+ m.key === "ArrowDown" ? (m.preventDefault(), y < d.length - 1 && c(d[y + 1].path)) : m.key === "ArrowUp" ? (m.preventDefault(), y > 0 && c(d[y - 1].path)) : m.key === "ArrowRight" ? (m.preventDefault(), w.hasChildren && !a.has(w.path) ? _(w.path, !0) : w.hasChildren && y < d.length - 1 && c(d[y + 1].path)) : m.key === "ArrowLeft" ? (m.preventDefault(), w.hasChildren && a.has(w.path) ? _(w.path, !1) : w.parentPath && c(w.parentPath)) : m.key === "Home" ? (m.preventDefault(), c(d[0].path)) : m.key === "End" ? (m.preventDefault(), c(d[d.length - 1].path)) : (m.key === "Enter" || m.key === " ") && (m.preventDefault(), w.hasChildren && _(w.path));
1743
1817
  }
1744
- return /* @__PURE__ */ e("ul", { className: "file-tree", role: "tree", "aria-label": n, onKeyDown: _, children: d.map((m) => {
1745
- const y = a.has(m.path), w = y ? Dt : $t;
1818
+ return /* @__PURE__ */ e("ul", { className: "file-tree", role: "tree", "aria-label": n, onKeyDown: b, children: d.map((m) => {
1819
+ const y = a.has(m.path), w = y ? It : Tt;
1746
1820
  return /* @__PURE__ */ e(
1747
1821
  "li",
1748
1822
  {
@@ -1754,16 +1828,16 @@ function ea({
1754
1828
  "aria-setsize": m.setsize,
1755
1829
  "aria-posinset": m.posinset,
1756
1830
  "aria-expanded": m.hasChildren ? y : void 0,
1757
- "aria-selected": m.path === b,
1758
- tabIndex: m.path === b ? 0 : -1,
1831
+ "aria-selected": m.path === f,
1832
+ tabIndex: m.path === f ? 0 : -1,
1759
1833
  className: "file-tree__item",
1760
1834
  style: { paddingLeft: `calc(${m.level} * var(--q1-space-4))` },
1761
1835
  onClick: (p) => {
1762
- p.stopPropagation(), o(m.path), m.hasChildren && f(m.path);
1836
+ p.stopPropagation(), o(m.path), m.hasChildren && _(m.path);
1763
1837
  },
1764
1838
  children: /* @__PURE__ */ i("span", { className: "file-tree__row", children: [
1765
- m.hasChildren ? /* @__PURE__ */ e(Q, { className: `file-tree__chevron${y ? " file-tree__chevron--open" : ""}`, size: 14, strokeWidth: 2, "aria-hidden": "true" }) : /* @__PURE__ */ e("span", { className: "file-tree__chevron-spacer", "aria-hidden": "true" }),
1766
- m.type === "folder" ? /* @__PURE__ */ e(w, { className: "file-tree__icon", size: 15, strokeWidth: 2, "aria-hidden": "true" }) : /* @__PURE__ */ e(Ct, { className: "file-tree__icon", size: 15, strokeWidth: 2, "aria-hidden": "true" }),
1839
+ m.hasChildren ? /* @__PURE__ */ e(J, { className: `file-tree__chevron${y ? " file-tree__chevron--open" : ""}`, size: 14, strokeWidth: 2, "aria-hidden": "true" }) : /* @__PURE__ */ e("span", { className: "file-tree__chevron-spacer", "aria-hidden": "true" }),
1840
+ m.type === "folder" ? /* @__PURE__ */ e(w, { className: "file-tree__icon", size: 15, strokeWidth: 2, "aria-hidden": "true" }) : /* @__PURE__ */ e(Mt, { className: "file-tree__icon", size: 15, strokeWidth: 2, "aria-hidden": "true" }),
1767
1841
  /* @__PURE__ */ e("span", { className: "file-tree__name", children: m.name })
1768
1842
  ] })
1769
1843
  },
@@ -1771,15 +1845,15 @@ function ea({
1771
1845
  );
1772
1846
  }) });
1773
1847
  }
1774
- function ta({
1848
+ function la({
1775
1849
  orientation: t = "horizontal",
1776
1850
  decorative: n = !0,
1777
1851
  className: r
1778
1852
  }) {
1779
- const a = A("separator", `separator--${t}`, r ?? "");
1853
+ const a = S("separator", `separator--${t}`, r ?? "");
1780
1854
  return n ? /* @__PURE__ */ e("div", { className: a, "aria-hidden": "true" }) : /* @__PURE__ */ e("div", { className: a, role: "separator", "aria-orientation": t });
1781
1855
  }
1782
- function na({
1856
+ function sa({
1783
1857
  htmlFor: t,
1784
1858
  required: n,
1785
1859
  children: r
@@ -1797,19 +1871,19 @@ function Te({
1797
1871
  getText: n,
1798
1872
  onClose: r
1799
1873
  }) {
1800
- const [a, s] = E(-1), l = T([]), o = T({ buffer: "", timer: 0 });
1874
+ const [a, s] = M(-1), l = T([]), o = T({ buffer: "", timer: 0 });
1801
1875
  function u(c) {
1802
1876
  s(c), l.current[c]?.focus();
1803
1877
  }
1804
1878
  function d() {
1805
1879
  s(-1);
1806
1880
  }
1807
- function b(c) {
1808
- const f = t.indexOf(a);
1881
+ function f(c) {
1882
+ const _ = t.indexOf(a);
1809
1883
  if (c.key === "ArrowDown")
1810
- c.preventDefault(), u(t[(f + 1) % t.length]);
1884
+ c.preventDefault(), u(t[(_ + 1) % t.length]);
1811
1885
  else if (c.key === "ArrowUp")
1812
- c.preventDefault(), u(t[(f - 1 + t.length) % t.length]);
1886
+ c.preventDefault(), u(t[(_ - 1 + t.length) % t.length]);
1813
1887
  else if (c.key === "Home")
1814
1888
  c.preventDefault(), u(t[0]);
1815
1889
  else if (c.key === "End")
@@ -1818,60 +1892,60 @@ function Te({
1818
1892
  c.preventDefault(), r();
1819
1893
  else if (c.key.length === 1 && /\S/.test(c.key)) {
1820
1894
  window.clearTimeout(o.current.timer), o.current.buffer += c.key.toLowerCase(), o.current.timer = window.setTimeout(() => o.current.buffer = "", 500);
1821
- const _ = t.find(
1895
+ const b = t.find(
1822
1896
  (m) => n(m).toLowerCase().startsWith(o.current.buffer)
1823
1897
  );
1824
- _ !== void 0 && u(_);
1898
+ b !== void 0 && u(b);
1825
1899
  }
1826
1900
  }
1827
- return { itemRefs: l, focusItem: u, reset: d, onMenuKeyDown: b };
1901
+ return { itemRefs: l, focusItem: u, reset: d, onMenuKeyDown: f };
1828
1902
  }
1829
- const Ht = (t) => t.type === "item" && !t.disabled || t.type === "link";
1830
- function aa({
1903
+ const Ut = (t) => t.type === "item" && !t.disabled || t.type === "link";
1904
+ function oa({
1831
1905
  label: t,
1832
1906
  entries: n,
1833
1907
  children: r
1834
1908
  }) {
1835
- const [a, s] = E(null), l = T(null), o = T(null), u = T(0), d = L(), b = a !== null, c = n.flatMap((h, v) => Ht(h) ? [v] : []), { itemRefs: f, focusItem: _, reset: m, onMenuKeyDown: y } = Te({
1909
+ const [a, s] = M(null), l = T(null), o = T(null), u = T(0), d = R(), f = a !== null, c = n.flatMap((h, x) => Ut(h) ? [x] : []), { itemRefs: _, focusItem: b, reset: m, onMenuKeyDown: y } = Te({
1836
1910
  focusableIndices: c,
1837
1911
  getText: (h) => {
1838
- const v = n[h];
1839
- return v.type === "item" || v.type === "link" ? v.label : "";
1912
+ const x = n[h];
1913
+ return x.type === "item" || x.type === "link" ? x.label : "";
1840
1914
  },
1841
1915
  onClose: () => p()
1842
1916
  });
1843
- function w(h, v) {
1844
- s({ x: h, y: v }), window.requestAnimationFrame(() => _(c[0]));
1917
+ function w(h, x) {
1918
+ s({ x: h, y: x }), window.requestAnimationFrame(() => b(c[0]));
1845
1919
  }
1846
1920
  function p(h = !0) {
1847
1921
  s(null), m(), h && l.current?.focus();
1848
1922
  }
1849
- ne(() => {
1923
+ ae(() => {
1850
1924
  if (!a || !o.current) return;
1851
1925
  const h = o.current.getBoundingClientRect();
1852
- let { x: v, y: g } = a;
1853
- v + h.width > window.innerWidth - 8 && (v = Math.max(8, v - h.width)), g + h.height > window.innerHeight - 8 && (g = Math.max(8, g - h.height)), (v !== a.x || g !== a.y) && s({ x: v, y: g });
1926
+ let { x, y: g } = a;
1927
+ x + h.width > window.innerWidth - 8 && (x = Math.max(8, x - h.width)), g + h.height > window.innerHeight - 8 && (g = Math.max(8, g - h.height)), (x !== a.x || g !== a.y) && s({ x, y: g });
1854
1928
  }, [a]), F(() => {
1855
- if (!b) return;
1856
- function h(v) {
1857
- o.current && !o.current.contains(v.target) && p(!1);
1929
+ if (!f) return;
1930
+ function h(x) {
1931
+ o.current && !o.current.contains(x.target) && p(!1);
1858
1932
  }
1859
1933
  return document.addEventListener("mousedown", h), () => document.removeEventListener("mousedown", h);
1860
- }, [b]);
1934
+ }, [f]);
1861
1935
  function N(h) {
1862
1936
  h.preventDefault(), w(h.clientX, h.clientY);
1863
1937
  }
1864
- function x(h) {
1938
+ function v(h) {
1865
1939
  if (h.shiftKey && h.key === "F10" || h.key === "ContextMenu") {
1866
1940
  h.preventDefault();
1867
- const v = l.current.getBoundingClientRect();
1868
- w(v.left + 16, v.top + 16);
1941
+ const x = l.current.getBoundingClientRect();
1942
+ w(x.left + 16, x.top + 16);
1869
1943
  }
1870
1944
  }
1871
- function $(h) {
1872
- const v = h.touches[0];
1945
+ function D(h) {
1946
+ const x = h.touches[0];
1873
1947
  u.current = window.setTimeout(() => {
1874
- v && w(v.clientX, v.clientY);
1948
+ x && w(x.clientX, x.clientY);
1875
1949
  }, 500);
1876
1950
  }
1877
1951
  function C() {
@@ -1888,13 +1962,13 @@ function aa({
1888
1962
  "aria-haspopup": "menu",
1889
1963
  "aria-label": `${t}(右键或 Shift+F10 打开菜单)`,
1890
1964
  onContextMenu: N,
1891
- onKeyDown: x,
1892
- onTouchStart: $,
1965
+ onKeyDown: v,
1966
+ onTouchStart: D,
1893
1967
  onTouchEnd: C,
1894
1968
  children: r
1895
1969
  }
1896
1970
  ),
1897
- b ? /* @__PURE__ */ e(
1971
+ f ? /* @__PURE__ */ e(
1898
1972
  "div",
1899
1973
  {
1900
1974
  ref: o,
@@ -1904,11 +1978,11 @@ function aa({
1904
1978
  className: "menu__popup context-menu__popup",
1905
1979
  style: { left: a.x, top: a.y },
1906
1980
  onKeyDown: y,
1907
- children: n.map((h, v) => h.type === "separator" ? /* @__PURE__ */ e("div", { className: "menu__separator", role: "separator" }, `sep-${v}`) : h.type === "link" ? /* @__PURE__ */ i(
1981
+ children: n.map((h, x) => h.type === "separator" ? /* @__PURE__ */ e("div", { className: "menu__separator", role: "separator" }, `sep-${x}`) : h.type === "link" ? /* @__PURE__ */ i(
1908
1982
  "a",
1909
1983
  {
1910
1984
  ref: (g) => {
1911
- f.current[v] = g;
1985
+ _.current[x] = g;
1912
1986
  },
1913
1987
  role: "menuitem",
1914
1988
  tabIndex: -1,
@@ -1928,7 +2002,7 @@ function aa({
1928
2002
  "button",
1929
2003
  {
1930
2004
  ref: (g) => {
1931
- f.current[v] = g;
2005
+ _.current[x] = g;
1932
2006
  },
1933
2007
  type: "button",
1934
2008
  role: "menuitem",
@@ -1949,13 +2023,13 @@ function aa({
1949
2023
  ) : null
1950
2024
  ] });
1951
2025
  }
1952
- function ra({
2026
+ function ia({
1953
2027
  entries: t,
1954
2028
  size: n = "md",
1955
2029
  disabled: r,
1956
2030
  align: a = "end"
1957
2031
  }) {
1958
- const [s, l] = E(!1), o = T(null), u = L(), d = t.flatMap((p, N) => p.disabled ? [] : [N]), { itemRefs: b, focusItem: c, reset: f, onMenuKeyDown: _ } = Te({
2032
+ const [s, l] = M(!1), o = T(null), u = R(), d = t.flatMap((p, N) => p.disabled ? [] : [N]), { itemRefs: f, focusItem: c, reset: _, onMenuKeyDown: b } = Te({
1959
2033
  focusableIndices: d,
1960
2034
  getText: (p) => t[p].label,
1961
2035
  onClose: () => y()
@@ -1966,13 +2040,13 @@ function ra({
1966
2040
  window.requestAnimationFrame(() => c(N));
1967
2041
  }
1968
2042
  function y(p = !0) {
1969
- l(!1), f(), p && o.current?.focus();
2043
+ l(!1), _(), p && o.current?.focus();
1970
2044
  }
1971
2045
  F(() => {
1972
2046
  if (!s) return;
1973
2047
  function p(N) {
1974
- const x = o.current?.closest(".dots-menu");
1975
- x && !x.contains(N.target) && y(!1);
2048
+ const v = o.current?.closest(".dots-menu");
2049
+ v && !v.contains(N.target) && y(!1);
1976
2050
  }
1977
2051
  return document.addEventListener("mousedown", p), () => document.removeEventListener("mousedown", p);
1978
2052
  }, [s]);
@@ -1993,7 +2067,7 @@ function ra({
1993
2067
  disabled: r,
1994
2068
  onClick: () => s ? y() : m("first"),
1995
2069
  onKeyDown: w,
1996
- children: /* @__PURE__ */ e(Je, { size: n === "sm" ? 14 : n === "lg" ? 20 : 16, strokeWidth: 2, "aria-hidden": "true" })
2070
+ children: /* @__PURE__ */ e(et, { size: n === "sm" ? 14 : n === "lg" ? 20 : 16, strokeWidth: 2, "aria-hidden": "true" })
1997
2071
  }
1998
2072
  ),
1999
2073
  s ? /* @__PURE__ */ e(
@@ -2003,12 +2077,12 @@ function ra({
2003
2077
  role: "menu",
2004
2078
  "aria-label": "更多操作",
2005
2079
  className: `menu__popup menu__popup--${a}`,
2006
- onKeyDown: _,
2080
+ onKeyDown: b,
2007
2081
  children: t.map((p, N) => /* @__PURE__ */ e(
2008
2082
  "button",
2009
2083
  {
2010
- ref: (x) => {
2011
- b.current[N] = x;
2084
+ ref: (v) => {
2085
+ f.current[N] = v;
2012
2086
  },
2013
2087
  type: "button",
2014
2088
  role: "menuitem",
@@ -2025,14 +2099,14 @@ function ra({
2025
2099
  ) : null
2026
2100
  ] });
2027
2101
  }
2028
- function la({
2102
+ function ca({
2029
2103
  tone: t,
2030
2104
  label: n,
2031
2105
  animated: r = !1,
2032
2106
  showLabel: a = !1,
2033
2107
  titlePrefix: s
2034
2108
  }) {
2035
- const l = A("status-dot", `status-dot--${t}`, r ? "status-dot--animated" : "");
2109
+ const l = S("status-dot", `status-dot--${t}`, r ? "status-dot--animated" : "");
2036
2110
  if (a)
2037
2111
  return /* @__PURE__ */ i("span", { className: "status-dot-item", children: [
2038
2112
  /* @__PURE__ */ e("span", { className: l, "aria-hidden": "true" }),
@@ -2041,58 +2115,59 @@ function la({
2041
2115
  const o = s ? `${s}:${n}` : n;
2042
2116
  return /* @__PURE__ */ e("span", { className: l, role: "img", "aria-label": o, title: o });
2043
2117
  }
2044
- function sa({
2118
+ function da({
2045
2119
  tone: t = "neutral",
2046
2120
  subtle: n = !1,
2047
- inverted: r = !1,
2048
- size: a = "md",
2049
- icon: s,
2050
- count: l = !1,
2051
- title: o,
2052
- className: u,
2053
- children: d,
2054
- ...b
2121
+ quiet: r = !1,
2122
+ inverted: a = !1,
2123
+ size: s = "md",
2124
+ icon: l,
2125
+ count: o = !1,
2126
+ title: u,
2127
+ className: d,
2128
+ children: f,
2129
+ ...c
2055
2130
  }) {
2056
- const c = A(
2131
+ const _ = S(
2057
2132
  "badge",
2058
- r ? "badge--inverted" : `badge--${t}${n ? "-subtle" : ""}`,
2059
- a === "md" ? "" : `badge--${a}`,
2060
- l ? "badge--count" : "",
2061
- u
2062
- ), _ = s != null && (d == null || d === "") ? { role: "img", "aria-label": o } : {};
2063
- return /* @__PURE__ */ i("span", { className: c, title: o, ..._, ...b, children: [
2064
- s ? /* @__PURE__ */ e("span", { className: "badge__icon", "aria-hidden": "true", children: s }) : null,
2133
+ a ? "badge--inverted" : r ? "badge--quiet" : `badge--${t}${n ? "-subtle" : ""}`,
2134
+ s === "md" ? "" : `badge--${s}`,
2135
+ o ? "badge--count" : "",
2065
2136
  d
2137
+ ), m = l != null && (f == null || f === "") ? { role: "img", "aria-label": u } : {};
2138
+ return /* @__PURE__ */ i("span", { className: _, title: u, ...m, ...c, children: [
2139
+ l ? /* @__PURE__ */ e("span", { className: "badge__icon", "aria-hidden": "true", children: l }) : null,
2140
+ f
2066
2141
  ] });
2067
2142
  }
2068
- function oa({ href: t, size: n = "md", icon: r, title: a, className: s, children: l, ...o }) {
2069
- const u = A("badge", "badge--pill", n === "md" ? "" : `badge--${n}`, s), b = r != null && (l == null || l === "") ? { "aria-label": a } : {};
2070
- return /* @__PURE__ */ i("a", { className: u, href: t, title: a, ...b, ...o, children: [
2143
+ function ua({ href: t, size: n = "md", icon: r, title: a, className: s, children: l, ...o }) {
2144
+ const u = S("badge", "badge--pill", n === "md" ? "" : `badge--${n}`, s), f = r != null && (l == null || l === "") ? { "aria-label": a } : {};
2145
+ return /* @__PURE__ */ i("a", { className: u, href: t, title: a, ...f, ...o, children: [
2071
2146
  r ? /* @__PURE__ */ e("span", { className: "badge__icon", "aria-hidden": "true", children: r }) : null,
2072
2147
  l
2073
2148
  ] });
2074
2149
  }
2075
- function ia({ title: t, children: n, tone: r, icon: a, action: s, onDismiss: l, progress: o, className: u, ...d }) {
2076
- const b = r === void 0 && !o, c = A(
2150
+ function ma({ title: t, children: n, tone: r, icon: a, action: s, onDismiss: l, progress: o, className: u, ...d }) {
2151
+ const f = r === void 0 && !o, c = S(
2077
2152
  "banner",
2078
- b ? "banner--announcement" : r === "neutral" ? "" : `banner--${r}`,
2153
+ f ? "banner--announcement" : r === "neutral" ? "" : `banner--${r}`,
2079
2154
  o ? "banner--progress" : "",
2080
2155
  u
2081
- ), f = /* @__PURE__ */ i("p", { className: "banner__content", children: [
2156
+ ), _ = /* @__PURE__ */ i("p", { className: "banner__content", children: [
2082
2157
  /* @__PURE__ */ e("span", { className: "banner__title", children: t }),
2083
2158
  n != null ? /* @__PURE__ */ i(U, { children: [
2084
2159
  " — ",
2085
2160
  n
2086
2161
  ] }) : null
2087
- ] }), _ = s ? b ? /* @__PURE__ */ e("a", { className: "banner__cta", href: s.href, children: s.label }) : /* @__PURE__ */ i("a", { className: "banner__action", href: s.href, children: [
2162
+ ] }), b = s ? f ? /* @__PURE__ */ e("a", { className: "banner__cta", href: s.href, children: s.label }) : /* @__PURE__ */ i("a", { className: "banner__action", href: s.href, children: [
2088
2163
  s.label,
2089
- /* @__PURE__ */ e(Q, { "aria-hidden": "true", size: 16, strokeWidth: 2 })
2090
- ] }) : null, m = !b && l ? /* @__PURE__ */ e("button", { className: "banner__close", type: "button", "aria-label": "关闭横幅", onClick: l, children: /* @__PURE__ */ e(J, { "aria-hidden": "true", size: 16, strokeWidth: 2 }) }) : null;
2164
+ /* @__PURE__ */ e(J, { "aria-hidden": "true", size: 16, strokeWidth: 2 })
2165
+ ] }) : null, m = !f && l ? /* @__PURE__ */ e("button", { className: "banner__close", type: "button", "aria-label": "关闭横幅", onClick: l, children: /* @__PURE__ */ e(ee, { "aria-hidden": "true", size: 16, strokeWidth: 2 }) }) : null;
2091
2166
  if (o) {
2092
2167
  const y = Number.isFinite(o.value) ? Math.min(100, Math.max(0, o.value)) : 0;
2093
2168
  return /* @__PURE__ */ i("div", { className: c, ...d, children: [
2094
2169
  /* @__PURE__ */ i("div", { className: "banner__progress-head", children: [
2095
- f,
2170
+ _,
2096
2171
  /* @__PURE__ */ i("span", { className: "banner__progress-value", children: [
2097
2172
  y,
2098
2173
  "%"
@@ -2114,16 +2189,16 @@ function ia({ title: t, children: n, tone: r, icon: a, action: s, onDismiss: l,
2114
2189
  ] });
2115
2190
  }
2116
2191
  return /* @__PURE__ */ i("div", { className: c, ...d, children: [
2117
- !b && a ? /* @__PURE__ */ e("span", { className: "banner__icon", "aria-hidden": "true", children: a }) : null,
2118
- f,
2119
- _ && m ? /* @__PURE__ */ i("div", { className: "banner__actions", children: [
2120
- _,
2192
+ !f && a ? /* @__PURE__ */ e("span", { className: "banner__icon", "aria-hidden": "true", children: a }) : null,
2193
+ _,
2194
+ b && m ? /* @__PURE__ */ i("div", { className: "banner__actions", children: [
2195
+ b,
2121
2196
  m
2122
- ] }) : _ ?? m
2197
+ ] }) : b ?? m
2123
2198
  ] });
2124
2199
  }
2125
- function jt({ hover: t, secondary: n, divided: r, direction: a, shadow: s, bordered: l, className: o }) {
2126
- return A(
2200
+ function Yt({ hover: t, secondary: n, divided: r, direction: a, shadow: s, bordered: l, className: o }) {
2201
+ return S(
2127
2202
  "q1-card",
2128
2203
  t ? "q1-card--hover" : "",
2129
2204
  n ? "q1-card--secondary" : "",
@@ -2136,21 +2211,21 @@ function jt({ hover: t, secondary: n, divided: r, direction: a, shadow: s, borde
2136
2211
  o
2137
2212
  );
2138
2213
  }
2139
- function ca(t) {
2140
- const n = jt(t);
2214
+ function ha(t) {
2215
+ const n = Yt(t);
2141
2216
  if (t.href !== void 0) {
2142
2217
  const {
2143
- hover: _,
2218
+ hover: b,
2144
2219
  secondary: m,
2145
2220
  divided: y,
2146
2221
  direction: w,
2147
2222
  shadow: p,
2148
2223
  bordered: N,
2149
- className: x,
2150
- children: $,
2224
+ className: v,
2225
+ children: D,
2151
2226
  ...C
2152
2227
  } = t;
2153
- return /* @__PURE__ */ e("a", { className: n, ...C, children: $ });
2228
+ return /* @__PURE__ */ e("a", { className: n, ...C, children: D });
2154
2229
  }
2155
2230
  const {
2156
2231
  href: r,
@@ -2160,13 +2235,13 @@ function ca(t) {
2160
2235
  direction: o,
2161
2236
  shadow: u,
2162
2237
  bordered: d,
2163
- className: b,
2238
+ className: f,
2164
2239
  children: c,
2165
- ...f
2240
+ ..._
2166
2241
  } = t;
2167
- return /* @__PURE__ */ e("div", { className: n, ...f, children: c });
2242
+ return /* @__PURE__ */ e("div", { className: n, ..._, children: c });
2168
2243
  }
2169
- function Ut({
2244
+ function Vt({
2170
2245
  content: t,
2171
2246
  placement: n = "top",
2172
2247
  delay: r = 150,
@@ -2176,44 +2251,44 @@ function Ut({
2176
2251
  tip: o = !0,
2177
2252
  center: u = !1
2178
2253
  }) {
2179
- const [d, b] = E(!1), [c, f] = E({
2254
+ const [d, f] = M(!1), [c, _] = M({
2180
2255
  p: n,
2181
2256
  left: 0,
2182
2257
  top: 0,
2183
2258
  caret: 0
2184
- }), _ = T(null), m = T(null), y = T(null), w = L(), p = te(() => {
2259
+ }), b = T(null), m = T(null), y = T(null), w = R(), p = ne(() => {
2185
2260
  const g = m.current, k = y.current;
2186
2261
  if (!g || !k) return;
2187
- const M = 8, I = 8, S = g.getBoundingClientRect(), R = k.offsetWidth, B = k.offsetHeight, V = document.documentElement.clientWidth, G = document.documentElement.clientHeight, O = S.left + S.width / 2, oe = S.top + S.height / 2;
2262
+ const E = 8, I = 8, A = g.getBoundingClientRect(), W = k.offsetWidth, P = k.offsetHeight, V = document.documentElement.clientWidth, G = document.documentElement.clientHeight, H = A.left + A.width / 2, ie = A.top + A.height / 2;
2188
2263
  let K = n;
2189
- n === "top" && S.top - I - B < M && S.bottom + I + B <= G - M ? K = "bottom" : n === "bottom" && S.bottom + I + B > G - M && S.top - I - B >= M ? K = "top" : n === "left" && S.left - I - R < M && S.right + I + R <= V - M ? K = "right" : n === "right" && S.right + I + R > V - M && S.left - I - R >= M && (K = "left");
2190
- let H, P;
2191
- K === "top" || K === "bottom" ? (H = l === "start" ? S.left : l === "end" ? S.right - R : O - R / 2, P = K === "top" ? S.top - I - B : S.bottom + I) : (P = l === "start" ? S.top : l === "end" ? S.bottom - B : oe - B / 2, H = K === "left" ? S.left - I - R : S.right + I), H = Math.max(M, Math.min(H, V - M - R)), P = Math.max(M, Math.min(P, G - M - B));
2192
- const fe = K === "top" || K === "bottom" ? Math.max(12, Math.min(R - 12, O - H)) : Math.max(12, Math.min(B - 12, oe - P));
2193
- f({ p: K, left: H, top: P, caret: fe });
2264
+ n === "top" && A.top - I - P < E && A.bottom + I + P <= G - E ? K = "bottom" : n === "bottom" && A.bottom + I + P > G - E && A.top - I - P >= E ? K = "top" : n === "left" && A.left - I - W < E && A.right + I + W <= V - E ? K = "right" : n === "right" && A.right + I + W > V - E && A.left - I - W >= E && (K = "left");
2265
+ let j, B;
2266
+ K === "top" || K === "bottom" ? (j = l === "start" ? A.left : l === "end" ? A.right - W : H - W / 2, B = K === "top" ? A.top - I - P : A.bottom + I) : (B = l === "start" ? A.top : l === "end" ? A.bottom - P : ie - P / 2, j = K === "left" ? A.left - I - W : A.right + I), j = Math.max(E, Math.min(j, V - E - W)), B = Math.max(E, Math.min(B, G - E - P));
2267
+ const _e = K === "top" || K === "bottom" ? Math.max(12, Math.min(W - 12, H - j)) : Math.max(12, Math.min(P - 12, ie - B));
2268
+ _({ p: K, left: j, top: B, caret: _e });
2194
2269
  }, [n, l]);
2195
- ne(() => {
2270
+ ae(() => {
2196
2271
  if (d)
2197
2272
  return p(), window.addEventListener("scroll", p, !0), window.addEventListener("resize", p), () => {
2198
2273
  window.removeEventListener("scroll", p, !0), window.removeEventListener("resize", p);
2199
2274
  };
2200
2275
  }, [d, p]), F(
2201
2276
  () => () => {
2202
- _.current && clearTimeout(_.current);
2277
+ b.current && clearTimeout(b.current);
2203
2278
  },
2204
2279
  []
2205
2280
  );
2206
2281
  function N() {
2207
- _.current && clearTimeout(_.current), _.current = setTimeout(() => b(!0), r);
2282
+ b.current && clearTimeout(b.current), b.current = setTimeout(() => f(!0), r);
2208
2283
  }
2209
- function x() {
2210
- _.current && clearTimeout(_.current), b(!1);
2284
+ function v() {
2285
+ b.current && clearTimeout(b.current), f(!1);
2211
2286
  }
2212
- const $ = {
2287
+ const D = {
2213
2288
  left: c.left,
2214
2289
  top: c.top,
2215
2290
  "--tt-caret": `${c.caret}px`
2216
- }, C = A(
2291
+ }, C = S(
2217
2292
  "q1-tooltip__bubble",
2218
2293
  `q1-tooltip__bubble--${c.p}`,
2219
2294
  d ? "q1-tooltip__bubble--open" : "",
@@ -2221,18 +2296,18 @@ function Ut({
2221
2296
  u ? "q1-tooltip__bubble--center" : ""
2222
2297
  );
2223
2298
  function h(g) {
2224
- g.key === "Escape" && x();
2299
+ g.key === "Escape" && v();
2225
2300
  }
2226
- s && (!Re(s) || s.type === Le) && console.warn(
2301
+ s && (!Le(s) || s.type === Re) && console.warn(
2227
2302
  `Tooltip:children 必须是单个合法元素/组件(不能是纯文本、Fragment 或多个子节点),已回退为默认触发器${a ? `(文案:"${a}")` : "——但没有传 triggerLabel,会渲染成一个看不出用途的空文案按钮"}。`
2228
2303
  );
2229
- const v = s && Re(s) && s.type !== Le ? bt(s, {
2304
+ const x = s && Le(s) && s.type !== Re ? kt(s, {
2230
2305
  "aria-describedby": w,
2231
2306
  onFocus: (g) => {
2232
2307
  s.props.onFocus?.(g), N();
2233
2308
  },
2234
2309
  onBlur: (g) => {
2235
- s.props.onBlur?.(g), x();
2310
+ s.props.onBlur?.(g), v();
2236
2311
  },
2237
2312
  onKeyDown: (g) => {
2238
2313
  s.props.onKeyDown?.(g), h(g);
@@ -2244,36 +2319,36 @@ function Ut({
2244
2319
  className: "q1-tooltip__trigger",
2245
2320
  "aria-describedby": w,
2246
2321
  onFocus: N,
2247
- onBlur: x,
2322
+ onBlur: v,
2248
2323
  onKeyDown: h,
2249
2324
  children: a
2250
2325
  }
2251
2326
  );
2252
- return /* @__PURE__ */ i("span", { ref: m, className: "q1-tooltip", onMouseEnter: N, onMouseLeave: x, children: [
2253
- v,
2254
- yt(
2255
- /* @__PURE__ */ e("span", { ref: y, role: "tooltip", id: w, className: C, style: $, children: t }),
2327
+ return /* @__PURE__ */ i("span", { ref: m, className: "q1-tooltip", onMouseEnter: N, onMouseLeave: v, children: [
2328
+ x,
2329
+ wt(
2330
+ /* @__PURE__ */ e("span", { ref: y, role: "tooltip", id: w, className: C, style: D, children: t }),
2256
2331
  document.body
2257
2332
  )
2258
2333
  ] });
2259
2334
  }
2260
- function da({
2335
+ function pa({
2261
2336
  title: t,
2262
2337
  tooltip: n,
2263
2338
  align: r,
2264
2339
  ellipsis: a,
2265
2340
  children: s
2266
2341
  }) {
2267
- const l = A("description", r === "right" ? "description--right" : "");
2342
+ const l = S("description", r === "right" ? "description--right" : "");
2268
2343
  return /* @__PURE__ */ i("dl", { className: l, children: [
2269
2344
  /* @__PURE__ */ i("dt", { className: "description__title", children: [
2270
2345
  t,
2271
- n ? /* @__PURE__ */ e(Ut, { content: n, placement: "top", children: /* @__PURE__ */ e("button", { type: "button", className: "description__hint", "aria-label": `${t}说明`, children: /* @__PURE__ */ e(de, { size: 13, strokeWidth: 2, "aria-hidden": "true" }) }) }) : null
2346
+ n ? /* @__PURE__ */ e(Vt, { content: n, placement: "top", children: /* @__PURE__ */ e("button", { type: "button", className: "description__hint", "aria-label": `${t}说明`, children: /* @__PURE__ */ e(ue, { size: 13, strokeWidth: 2, "aria-hidden": "true" }) }) }) : null
2272
2347
  ] }),
2273
2348
  /* @__PURE__ */ e("dd", { className: `description__value${a ? " description__value--ellipsis" : ""}`, children: s })
2274
2349
  ] });
2275
2350
  }
2276
- function ua({
2351
+ function fa({
2277
2352
  name: t,
2278
2353
  identity: n,
2279
2354
  rows: r,
@@ -2282,7 +2357,7 @@ function ua({
2282
2357
  align: l = "start",
2283
2358
  children: o
2284
2359
  }) {
2285
- const [u, d] = E(!1), b = A(
2360
+ const [u, d] = M(!1), f = S(
2286
2361
  "context-card-wrap",
2287
2362
  `context-card-wrap--${s}`,
2288
2363
  l !== "start" ? `context-card-wrap--align-${l}` : "",
@@ -2291,14 +2366,14 @@ function ua({
2291
2366
  return /* @__PURE__ */ i(
2292
2367
  "span",
2293
2368
  {
2294
- className: b,
2369
+ className: f,
2295
2370
  onKeyDown: (c) => {
2296
2371
  if (c.key === "Escape" && !u) {
2297
2372
  c.preventDefault(), d(!0);
2298
- const f = c.currentTarget.querySelector(".context-card");
2373
+ const _ = c.currentTarget.querySelector(".context-card");
2299
2374
  Array.from(
2300
2375
  c.currentTarget.querySelectorAll('button, a[href], [tabindex]:not([tabindex="-1"])')
2301
- ).find((m) => !f?.contains(m))?.focus();
2376
+ ).find((m) => !_?.contains(m))?.focus();
2302
2377
  }
2303
2378
  },
2304
2379
  onMouseLeave: (c) => {
@@ -2312,9 +2387,9 @@ function ua({
2312
2387
  /* @__PURE__ */ i("span", { className: "context-card", role: "group", "aria-label": `${t} 详情`, children: [
2313
2388
  /* @__PURE__ */ e("span", { className: "context-card__name", children: t }),
2314
2389
  /* @__PURE__ */ e("span", { className: "context-card__identity", children: n }),
2315
- /* @__PURE__ */ e("dl", { className: "context-card__rows", children: r.map(([c, f]) => /* @__PURE__ */ i("div", { className: "context-card__row", children: [
2390
+ /* @__PURE__ */ e("dl", { className: "context-card__rows", children: r.map(([c, _]) => /* @__PURE__ */ i("div", { className: "context-card__row", children: [
2316
2391
  /* @__PURE__ */ e("dt", { className: "context-card__key", children: c }),
2317
- /* @__PURE__ */ e("dd", { className: "context-card__value", children: f })
2392
+ /* @__PURE__ */ e("dd", { className: "context-card__value", children: _ })
2318
2393
  ] }, c)) }),
2319
2394
  a ? /* @__PURE__ */ e("button", { type: "button", className: "context-card__action", children: a }) : null
2320
2395
  ] })
@@ -2322,7 +2397,7 @@ function ua({
2322
2397
  }
2323
2398
  );
2324
2399
  }
2325
- function ma({
2400
+ function _a({
2326
2401
  title: t,
2327
2402
  variant: n = "stripe",
2328
2403
  color: r,
@@ -2332,18 +2407,18 @@ function ma({
2332
2407
  illustration: o,
2333
2408
  textured: u,
2334
2409
  width: d,
2335
- className: b,
2410
+ className: f,
2336
2411
  style: c,
2337
- ...f
2412
+ ..._
2338
2413
  }) {
2339
- const _ = A("book", `book--${n}`, u ? "book--textured" : "", b), m = typeof d == "number" ? Number.isFinite(d) && d > 0 ? `${d}px` : void 0 : d, y = {
2414
+ const b = S("book", `book--${n}`, u ? "book--textured" : "", f), m = typeof d == "number" ? Number.isFinite(d) && d > 0 ? `${d}px` : void 0 : d, y = {
2340
2415
  ...c,
2341
2416
  ...r ? { "--book-cover": r } : null,
2342
2417
  ...a ? { "--book-band": a } : null,
2343
2418
  ...s ? { "--book-text": s } : null,
2344
2419
  ...m ? { "--book-width": m } : null
2345
2420
  }, w = l ? /* @__PURE__ */ e("span", { className: "book__icon", "aria-hidden": "true", children: l }) : null;
2346
- return /* @__PURE__ */ e("div", { className: _, style: y, ...f, children: /* @__PURE__ */ i("div", { className: "book__inner", children: [
2421
+ return /* @__PURE__ */ e("div", { className: b, style: y, ..._, children: /* @__PURE__ */ i("div", { className: "book__inner", children: [
2347
2422
  /* @__PURE__ */ i("div", { className: "book__cover", children: [
2348
2423
  o ? /* @__PURE__ */ e("span", { className: "book__illustration", "aria-hidden": "true", children: o }) : null,
2349
2424
  n === "stripe" && !o ? /* @__PURE__ */ e("span", { className: "book__band", "aria-hidden": "true", children: w }) : null,
@@ -2357,81 +2432,81 @@ function ma({
2357
2432
  /* @__PURE__ */ e("span", { className: "book__pages", "aria-hidden": "true" })
2358
2433
  ] }) });
2359
2434
  }
2360
- function Yt({ className: t } = {}) {
2361
- return /* @__PURE__ */ i("span", { className: A("browser__dots", t), "aria-hidden": "true", children: [
2435
+ function Gt({ className: t } = {}) {
2436
+ return /* @__PURE__ */ i("span", { className: S("browser__dots", t), "aria-hidden": "true", children: [
2362
2437
  /* @__PURE__ */ e("span", { className: "browser__dot browser__dot--close" }),
2363
2438
  /* @__PURE__ */ e("span", { className: "browser__dot browser__dot--minimize" }),
2364
2439
  /* @__PURE__ */ e("span", { className: "browser__dot browser__dot--expand" })
2365
2440
  ] });
2366
2441
  }
2367
- function Vt({ className: t } = {}) {
2368
- return /* @__PURE__ */ i("span", { className: A("browser__controls", t), "aria-hidden": "true", children: [
2369
- /* @__PURE__ */ e(wt, { size: 14, strokeWidth: 2 }),
2370
- /* @__PURE__ */ e(Ge, { size: 14, strokeWidth: 2 }),
2371
- /* @__PURE__ */ e(qt, { size: 14, strokeWidth: 2 })
2442
+ function Xt({ className: t } = {}) {
2443
+ return /* @__PURE__ */ i("span", { className: S("browser__controls", t), "aria-hidden": "true", children: [
2444
+ /* @__PURE__ */ e(Dt, { size: 14, strokeWidth: 2 }),
2445
+ /* @__PURE__ */ e(Xe, { size: 14, strokeWidth: 2 }),
2446
+ /* @__PURE__ */ e(Rt, { size: 14, strokeWidth: 2 })
2372
2447
  ] });
2373
2448
  }
2374
- function Gt({ address: t, className: n }) {
2375
- const r = t.lastIndexOf("/"), a = r > 0 ? t.slice(0, r) : t, s = r > 0 ? t.slice(r) : "", [l, o] = E(!1), u = T(void 0);
2449
+ function Zt({ address: t, className: n }) {
2450
+ const r = t.lastIndexOf("/"), a = r > 0 ? t.slice(0, r) : t, s = r > 0 ? t.slice(r) : "", [l, o] = M(!1), u = T(void 0);
2376
2451
  F(() => () => clearTimeout(u.current), []);
2377
2452
  const d = async () => {
2378
2453
  try {
2379
- await tt(t), o(!0), clearTimeout(u.current), u.current = setTimeout(() => o(!1), 1500);
2454
+ await nt(t), o(!0), clearTimeout(u.current), u.current = setTimeout(() => o(!1), 1500);
2380
2455
  } catch {
2381
2456
  }
2382
2457
  };
2383
- return /* @__PURE__ */ i("span", { className: A("browser__address", n), children: [
2458
+ return /* @__PURE__ */ i("span", { className: S("browser__address", n), children: [
2384
2459
  /* @__PURE__ */ i("span", { className: "browser__url", title: t, children: [
2385
2460
  /* @__PURE__ */ e("span", { className: "browser__url-head", children: a }),
2386
2461
  s ? /* @__PURE__ */ e("span", { className: "browser__url-tail", children: s }) : null
2387
2462
  ] }),
2388
- /* @__PURE__ */ e("button", { type: "button", className: "browser__address-copy", onClick: d, "aria-label": "复制网址", children: l ? /* @__PURE__ */ e(Z, { className: "browser__address-icon", size: 12, strokeWidth: 2, "aria-hidden": "true" }) : /* @__PURE__ */ e(le, { className: "browser__address-icon", size: 12, strokeWidth: 2, "aria-hidden": "true" }) }),
2463
+ /* @__PURE__ */ e("button", { type: "button", className: "browser__address-copy", onClick: d, "aria-label": "复制网址", children: l ? /* @__PURE__ */ e(Q, { className: "browser__address-icon", size: 12, strokeWidth: 2, "aria-hidden": "true" }) : /* @__PURE__ */ e(se, { className: "browser__address-icon", size: 12, strokeWidth: 2, "aria-hidden": "true" }) }),
2389
2464
  /* @__PURE__ */ e("span", { className: "q1-sr-only", role: "status", "aria-live": "polite", children: l ? "已复制网址" : "" })
2390
2465
  ] });
2391
2466
  }
2392
- function Xt({ tabs: t, className: n }) {
2393
- return /* @__PURE__ */ e("div", { className: A("browser__tabs", n), "aria-hidden": "true", children: t.map((r, a) => (
2467
+ function Qt({ tabs: t, className: n }) {
2468
+ return /* @__PURE__ */ e("div", { className: S("browser__tabs", n), "aria-hidden": "true", children: t.map((r, a) => (
2394
2469
  // key 带 index:label 是装饰文案不保证唯一,纯 label 做 key 在同名标签时会撞车。
2395
2470
  /* @__PURE__ */ e("span", { className: `browser__tab${r.isActive ? " browser__tab--active" : ""}`, children: r.label }, `${r.label}-${a}`)
2396
2471
  )) });
2397
2472
  }
2398
- function ha({ address: t, variant: n = "dark", tabs: r, children: a, className: s, ...l }) {
2399
- return /* @__PURE__ */ i("div", { className: A("browser", `browser--${n}`, s), ...l, children: [
2473
+ function ba({ address: t, variant: n = "dark", tabs: r, children: a, className: s, ...l }) {
2474
+ return /* @__PURE__ */ i("div", { className: S("browser", `browser--${n}`, s), ...l, children: [
2400
2475
  /* @__PURE__ */ i("div", { className: "browser__chrome", children: [
2401
- r ? /* @__PURE__ */ e(Xt, { tabs: r }) : null,
2476
+ r ? /* @__PURE__ */ e(Qt, { tabs: r }) : null,
2402
2477
  /* @__PURE__ */ i("div", { className: "browser__bar", children: [
2403
2478
  /* @__PURE__ */ i("div", { className: "browser__zone browser__zone--start", children: [
2404
- /* @__PURE__ */ e(Yt, {}),
2405
- /* @__PURE__ */ e(Vt, {})
2479
+ /* @__PURE__ */ e(Gt, {}),
2480
+ /* @__PURE__ */ e(Xt, {})
2406
2481
  ] }),
2407
- /* @__PURE__ */ e("div", { className: "browser__zone browser__zone--center", children: /* @__PURE__ */ e(Gt, { address: t }) })
2482
+ /* @__PURE__ */ e("div", { className: "browser__zone browser__zone--center", children: /* @__PURE__ */ e(Zt, { address: t }) })
2408
2483
  ] })
2409
2484
  ] }),
2410
2485
  /* @__PURE__ */ e("div", { className: "browser__body", children: a })
2411
2486
  ] });
2412
2487
  }
2413
- function pa() {
2488
+ function ya() {
2414
2489
  return /* @__PURE__ */ i("div", { className: "browser__placeholder", "aria-hidden": "true", children: [
2415
2490
  /* @__PURE__ */ e("span", { className: "browser__skeleton-line browser__skeleton-line--medium" }),
2416
2491
  /* @__PURE__ */ e("span", { className: "browser__skeleton-line browser__skeleton-line--short" }),
2417
2492
  /* @__PURE__ */ e("span", { className: "browser__skeleton-line" })
2418
2493
  ] });
2419
2494
  }
2420
- const it = (t) => t !== void 0 && Number.isFinite(t) && t > 0 ? t : void 0, ct = (t) => t === void 0 ? void 0 : { "--q1-avatar-size": `${t}px` }, Zt = (t) => {
2495
+ const mt = (t) => t !== void 0 && Number.isFinite(t) && t > 0 ? t : void 0, ht = (t) => t === void 0 ? void 0 : { "--q1-avatar-size": `${t}px` }, Jt = (t) => {
2421
2496
  const n = t.trim();
2422
2497
  return n ? new RegExp("\\p{Script=Han}", "u").test(n[0]) ? n[0] : n.split(/\s+/).slice(0, 2).map((r) => r[0]).join("").toUpperCase() : "";
2423
2498
  };
2424
- function Qt({ title: t, src: n, letter: r, glyph: a, placeholder: s = !1, icon: l, iconColor: o, size: u, className: d }) {
2425
- const [b, c] = E(null), f = it(u), _ = !!n && b !== n, m = t.trim() || "头像", y = r ? { variant: "avatar--letter", node: r } : a ? { variant: "avatar--glyph", node: a } : { variant: "avatar--letter", node: Zt(t) }, w = s ? "avatar--placeholder" : _ ? "avatar--image" : y.variant, p = s ? { "aria-hidden": !0 } : _ ? {} : { role: "img", "aria-label": m };
2426
- return /* @__PURE__ */ i("span", { className: A("avatar", w, d), style: ct(f), ...p, children: [
2427
- _ ? /* @__PURE__ */ e(
2499
+ function en({ title: t, src: n, letter: r, glyph: a, placeholder: s = !1, icon: l, iconColor: o, size: u, className: d }) {
2500
+ const [f, c] = M(null), _ = mt(u), b = !!n && f !== n, m = t.trim() || "头像", y = r ? { variant: "avatar--letter", node: r } : a ? { variant: "avatar--glyph", node: a } : { variant: "avatar--letter", node: Jt(t) }, w = s ? "avatar--placeholder" : b ? "avatar--image" : y.variant, p = s ? { "aria-hidden": !0 } : b ? {} : { role: "img", "aria-label": m };
2501
+ return /* @__PURE__ */ i("span", { className: S("avatar", w, d), style: ht(_), ...p, children: [
2502
+ b ? /* @__PURE__ */ e(
2428
2503
  "img",
2429
2504
  {
2430
2505
  className: "avatar__img",
2431
2506
  src: n,
2432
2507
  alt: m,
2433
- width: f ?? 32,
2434
- height: f ?? 32,
2508
+ width: _ ?? 32,
2509
+ height: _ ?? 32,
2435
2510
  onError: () => c(n ?? null)
2436
2511
  }
2437
2512
  ) : s ? null : /* @__PURE__ */ e("span", { className: "avatar__glyph", "aria-hidden": "true", children: y.node }),
@@ -2446,7 +2521,7 @@ function Qt({ title: t, src: n, letter: r, glyph: a, placeholder: s = !1, icon:
2446
2521
  ) : null
2447
2522
  ] });
2448
2523
  }
2449
- function fa({
2524
+ function ga({
2450
2525
  members: t,
2451
2526
  label: n,
2452
2527
  size: r,
@@ -2455,13 +2530,13 @@ function fa({
2455
2530
  reverse: l = !1,
2456
2531
  className: o
2457
2532
  }) {
2458
- const u = it(r), d = u ?? 32, b = a !== void 0 && Number.isFinite(a) && a >= 0 ? Math.floor(a) : void 0, c = b !== void 0 && t.length > b ? t.slice(0, b) : t, f = t.length - c.length, _ = c.length + (f > 0 ? 1 : 0), m = s !== "auto" && Number.isFinite(s) ? Math.max(0, s) : Math.round(d * 0.3), y = { ...ct(u), "--q1-avatar-overlap": `${m}px` }, w = (N) => l ? void 0 : _ - 1 - N, p = n ? { role: "group", "aria-label": n } : {};
2459
- return /* @__PURE__ */ i("span", { className: A("avatar-group", o), style: y, ...p, children: [
2460
- c.map((N, x) => (
2533
+ const u = mt(r), d = u ?? 32, f = a !== void 0 && Number.isFinite(a) && a >= 0 ? Math.floor(a) : void 0, c = f !== void 0 && t.length > f ? t.slice(0, f) : t, _ = t.length - c.length, b = c.length + (_ > 0 ? 1 : 0), m = s !== "auto" && Number.isFinite(s) ? Math.max(0, s) : Math.round(d * 0.3), y = { ...ht(u), "--q1-avatar-overlap": `${m}px` }, w = (N) => l ? void 0 : b - 1 - N, p = n ? { role: "group", "aria-label": n } : {};
2534
+ return /* @__PURE__ */ i("span", { className: S("avatar-group", o), style: y, ...p, children: [
2535
+ c.map((N, v) => (
2461
2536
  // 成员不再 aria-hidden——每个 Avatar 自带 aria-label(名字),读屏逐个念。
2462
- /* @__PURE__ */ e("span", { className: "avatar-group__item", style: { zIndex: w(x) }, children: /* @__PURE__ */ e(Qt, { ...N, size: u }) }, `${N.title}-${x}`)
2537
+ /* @__PURE__ */ e("span", { className: "avatar-group__item", style: { zIndex: w(v) }, children: /* @__PURE__ */ e(en, { ...N, size: u }) }, `${N.title}-${v}`)
2463
2538
  )),
2464
- f > 0 ? (
2539
+ _ > 0 ? (
2465
2540
  // +N 独立可访问名「还有 N 位成员」,不再 aria-hidden。
2466
2541
  /* @__PURE__ */ i(
2467
2542
  "span",
@@ -2469,17 +2544,17 @@ function fa({
2469
2544
  className: "avatar avatar--overflow avatar-group__item",
2470
2545
  style: { zIndex: w(c.length) },
2471
2546
  role: "img",
2472
- "aria-label": `还有 ${f} 位成员`,
2547
+ "aria-label": `还有 ${_} 位成员`,
2473
2548
  children: [
2474
2549
  "+",
2475
- f
2550
+ _
2476
2551
  ]
2477
2552
  }
2478
2553
  )
2479
2554
  ) : null
2480
2555
  ] });
2481
2556
  }
2482
- function _a({
2557
+ function Na({
2483
2558
  shape: t = "rounded",
2484
2559
  animated: n = !0,
2485
2560
  show: r = !1,
@@ -2487,7 +2562,7 @@ function _a({
2487
2562
  children: s
2488
2563
  }) {
2489
2564
  if (s && r) return /* @__PURE__ */ e(U, { children: s });
2490
- const l = A(
2565
+ const l = S(
2491
2566
  "skeleton",
2492
2567
  `skeleton--${t}`,
2493
2568
  n ? "" : "skeleton--static",
@@ -2496,9 +2571,9 @@ function _a({
2496
2571
  );
2497
2572
  return s ? /* @__PURE__ */ e("span", { className: l, "aria-hidden": "true", children: /* @__PURE__ */ e("span", { className: "skeleton__content", children: s }) }) : /* @__PURE__ */ e("span", { className: l, "aria-hidden": "true" });
2498
2573
  }
2499
- const Jt = { sm: 2, md: 3, lg: 4 };
2500
- function ba({ label: t, size: n = "md" }) {
2501
- const r = typeof n == "number" ? n : Jt[n], a = { width: r, height: r };
2574
+ const tn = { sm: 2, md: 3, lg: 4 };
2575
+ function ka({ label: t, size: n = "md" }) {
2576
+ const r = typeof n == "number" ? n : tn[n], a = { width: r, height: r };
2502
2577
  return /* @__PURE__ */ i("span", { className: "loading-dots-wrap", "aria-live": "polite", children: [
2503
2578
  t ? /* @__PURE__ */ e("span", { className: "loading-dots__label", children: t }) : null,
2504
2579
  /* @__PURE__ */ i("span", { className: "loading-dots", "aria-hidden": "true", children: [
@@ -2508,7 +2583,7 @@ function ba({ label: t, size: n = "md" }) {
2508
2583
  ] })
2509
2584
  ] });
2510
2585
  }
2511
- function ya({ text: t, tailLength: n = 8, mono: r = !1 }) {
2586
+ function wa({ text: t, tailLength: n = 8, mono: r = !1 }) {
2512
2587
  const a = Math.max(0, t.length - n), s = t.slice(0, a), l = t.slice(a);
2513
2588
  return /* @__PURE__ */ i("span", { className: `middle-truncate${r ? " middle-truncate--mono" : ""}`, title: t, "aria-label": t, children: [
2514
2589
  /* @__PURE__ */ e("span", { className: "q1-sr-only", children: t }),
@@ -2518,7 +2593,7 @@ function ya({ text: t, tailLength: n = 8, mono: r = !1 }) {
2518
2593
  ] })
2519
2594
  ] });
2520
2595
  }
2521
- function ga({ screenLabel: t }) {
2596
+ function va({ screenLabel: t }) {
2522
2597
  return /* @__PURE__ */ i("div", { className: "phone", children: [
2523
2598
  /* @__PURE__ */ e("span", { className: "phone__island", "aria-hidden": "true" }),
2524
2599
  /* @__PURE__ */ e("span", { className: "phone__btn phone__btn--mute", "aria-hidden": "true" }),
@@ -2555,27 +2630,27 @@ function ga({ screenLabel: t }) {
2555
2630
  ] })
2556
2631
  ] });
2557
2632
  }
2558
- const en = {
2559
- default: de,
2560
- success: zt,
2561
- warning: he,
2633
+ const nn = {
2634
+ default: ue,
2635
+ success: Ft,
2636
+ warning: pe,
2562
2637
  error: $e
2563
2638
  };
2564
- function Na({ variant: t = "default", message: n, cta: r }) {
2565
- const a = en[t];
2639
+ function xa({ variant: t = "default", message: n, cta: r }) {
2640
+ const a = nn[t];
2566
2641
  return /* @__PURE__ */ i("div", { className: `project-banner project-banner--${t}`, role: "status", children: [
2567
2642
  /* @__PURE__ */ e(a, { className: "project-banner__icon", size: 15, strokeWidth: 2, "aria-hidden": "true" }),
2568
2643
  /* @__PURE__ */ e("span", { className: "project-banner__message", children: n }),
2569
2644
  /* @__PURE__ */ e("button", { type: "button", className: "project-banner__cta", children: r })
2570
2645
  ] });
2571
2646
  }
2572
- function ka({
2647
+ function Ca({
2573
2648
  text: t,
2574
2649
  copyValue: n,
2575
2650
  successMessage: r,
2576
2651
  size: a = "default"
2577
2652
  }) {
2578
- const { copied: s, copy: l } = pe(), o = n ?? t;
2653
+ const { copied: s, copy: l } = fe(), o = n ?? t;
2579
2654
  return /* @__PURE__ */ i("span", { className: `twc twc--${a}`, children: [
2580
2655
  /* @__PURE__ */ e("span", { className: "twc__text", children: t }),
2581
2656
  /* @__PURE__ */ e(
@@ -2585,12 +2660,12 @@ function ka({
2585
2660
  className: "twc__copy",
2586
2661
  "aria-label": `复制${t}`,
2587
2662
  onClick: () => l(o, r),
2588
- children: s ? /* @__PURE__ */ e(Z, { size: 14, strokeWidth: 2, "aria-hidden": "true" }) : /* @__PURE__ */ e(le, { size: 14, strokeWidth: 2, "aria-hidden": "true" })
2663
+ children: s ? /* @__PURE__ */ e(Q, { size: 14, strokeWidth: 2, "aria-hidden": "true" }) : /* @__PURE__ */ e(se, { size: 14, strokeWidth: 2, "aria-hidden": "true" })
2589
2664
  }
2590
2665
  )
2591
2666
  ] });
2592
2667
  }
2593
- function wa({
2668
+ function Da({
2594
2669
  text: t,
2595
2670
  prompt: n = !0,
2596
2671
  inverted: r = !1,
@@ -2598,15 +2673,15 @@ function wa({
2598
2673
  copyText: s,
2599
2674
  onCopy: l
2600
2675
  }) {
2601
- const { copied: o, copy: u } = pe(), d = Array.isArray(t) ? t : [t], b = A("snippet", r ? "snippet--inverted" : "", a ? `snippet--${a}` : "");
2602
- return /* @__PURE__ */ i("div", { className: b, children: [
2603
- /* @__PURE__ */ e("code", { className: "snippet__code", children: d.map((c, f) => /* @__PURE__ */ i("span", { className: "snippet__line", children: [
2676
+ const { copied: o, copy: u } = fe(), d = Array.isArray(t) ? t : [t], f = S("snippet", r ? "snippet--inverted" : "", a ? `snippet--${a}` : "");
2677
+ return /* @__PURE__ */ i("div", { className: f, children: [
2678
+ /* @__PURE__ */ e("code", { className: "snippet__code", children: d.map((c, _) => /* @__PURE__ */ i("span", { className: "snippet__line", children: [
2604
2679
  n ? /* @__PURE__ */ i("span", { className: "snippet__prompt", "aria-hidden": "true", children: [
2605
2680
  "$",
2606
2681
  " "
2607
2682
  ] }) : null,
2608
2683
  c
2609
- ] }, f)) }),
2684
+ ] }, _)) }),
2610
2685
  /* @__PURE__ */ e(
2611
2686
  "button",
2612
2687
  {
@@ -2617,31 +2692,31 @@ function wa({
2617
2692
  u(s ?? d.join(`
2618
2693
  `), "已复制命令"), l?.();
2619
2694
  },
2620
- children: o ? /* @__PURE__ */ e(Z, { size: 14, strokeWidth: 2, "aria-hidden": "true" }) : /* @__PURE__ */ e(le, { size: 14, strokeWidth: 2, "aria-hidden": "true" })
2695
+ children: o ? /* @__PURE__ */ e(Q, { size: 14, strokeWidth: 2, "aria-hidden": "true" }) : /* @__PURE__ */ e(se, { size: 14, strokeWidth: 2, "aria-hidden": "true" })
2621
2696
  }
2622
2697
  )
2623
2698
  ] });
2624
2699
  }
2625
- function tn(t, n) {
2700
+ function an(t, n) {
2626
2701
  return t >= 95 ? "danger" : t >= 80 ? "warning" : "success";
2627
2702
  }
2628
- const nn = {
2703
+ const rn = {
2629
2704
  xs: { boxPx: 20, radius: 42.5, strokeWidth: 15, valueFontSize: null },
2630
2705
  sm: { boxPx: 32, radius: 45, strokeWidth: 10, valueFontSize: 11 },
2631
2706
  md: { boxPx: 64, radius: 45, strokeWidth: 10, valueFontSize: 18 },
2632
2707
  lg: { boxPx: 128, radius: 45, strokeWidth: 10, valueFontSize: 32 }
2633
- }, an = 10, Ke = { success: 80, warning: 50 };
2634
- function rn(t, n, r) {
2635
- const a = Math.min(an, t, 100 - t);
2708
+ }, ln = 10, Be = { success: 80, warning: 50 };
2709
+ function sn(t, n, r) {
2710
+ const a = Math.min(ln, t, 100 - t);
2636
2711
  if (a <= 0) return 0;
2637
2712
  if (!(100 - t - a <= 0)) return a;
2638
2713
  const l = n / r * 100;
2639
2714
  return a < l ? 0 : a;
2640
2715
  }
2641
- function ln(t, n, r) {
2642
- return r || (n === "health" ? t >= Ke.success ? "success" : t >= Ke.warning ? "warning" : "danger" : tn(t));
2716
+ function on(t, n, r) {
2717
+ return r || (n === "health" ? t >= Be.success ? "success" : t >= Be.warning ? "warning" : "danger" : an(t));
2643
2718
  }
2644
- function va({
2719
+ function $a({
2645
2720
  value: t,
2646
2721
  size: n = "md",
2647
2722
  showValue: r = !1,
@@ -2650,7 +2725,7 @@ function va({
2650
2725
  label: l,
2651
2726
  indeterminate: o = !1
2652
2727
  }) {
2653
- const { boxPx: u, radius: d, strokeWidth: b, valueFontSize: c } = nn[n], f = 2 * Math.PI * d, _ = Math.min(100, Math.max(0, t ?? 0)), m = 50, y = o ? 25 : _, w = o ? 0 : rn(_, b, f), p = o ? 0 : Math.max(0, 100 - _ - w), N = -90 + (y + w / 2) / 100 * 360, x = o ? "primary" : ln(_, s, a);
2728
+ const { boxPx: u, radius: d, strokeWidth: f, valueFontSize: c } = rn[n], _ = 2 * Math.PI * d, b = Math.min(100, Math.max(0, t ?? 0)), m = 50, y = o ? 25 : b, w = o ? 0 : sn(b, f, _), p = o ? 0 : Math.max(0, 100 - b - w), N = -90 + (y + w / 2) / 100 * 360, v = o ? "primary" : on(b, s, a);
2654
2729
  return /* @__PURE__ */ i(
2655
2730
  "span",
2656
2731
  {
@@ -2659,7 +2734,7 @@ function va({
2659
2734
  "aria-label": l,
2660
2735
  "aria-valuemin": o ? void 0 : 0,
2661
2736
  "aria-valuemax": o ? void 0 : 100,
2662
- "aria-valuenow": o ? void 0 : _,
2737
+ "aria-valuenow": o ? void 0 : b,
2663
2738
  children: [
2664
2739
  /* @__PURE__ */ i("svg", { className: "gauge__svg", width: u, height: u, viewBox: "0 0 100 100", "aria-hidden": "true", children: [
2665
2740
  /* @__PURE__ */ e(
@@ -2669,34 +2744,34 @@ function va({
2669
2744
  cx: m,
2670
2745
  cy: m,
2671
2746
  r: d,
2672
- strokeWidth: b,
2747
+ strokeWidth: f,
2673
2748
  fill: "none",
2674
2749
  strokeLinecap: "round",
2675
- strokeDasharray: `${p / 100 * f} ${f}`,
2750
+ strokeDasharray: `${p / 100 * _} ${_}`,
2676
2751
  transform: `rotate(${N} ${m} ${m})`
2677
2752
  }
2678
2753
  ),
2679
2754
  /* @__PURE__ */ e(
2680
2755
  "circle",
2681
2756
  {
2682
- className: `gauge__arc gauge__arc--${x}`,
2757
+ className: `gauge__arc gauge__arc--${v}`,
2683
2758
  cx: m,
2684
2759
  cy: m,
2685
2760
  r: d,
2686
- strokeWidth: b,
2761
+ strokeWidth: f,
2687
2762
  fill: "none",
2688
2763
  strokeLinecap: "round",
2689
- strokeDasharray: `${y / 100 * f} ${f}`,
2764
+ strokeDasharray: `${y / 100 * _} ${_}`,
2690
2765
  transform: `rotate(-90 ${m} ${m})`
2691
2766
  }
2692
2767
  )
2693
2768
  ] }),
2694
- r && c ? /* @__PURE__ */ e("span", { className: "gauge__value", style: { fontSize: c }, children: _ }) : null
2769
+ r && c ? /* @__PURE__ */ e("span", { className: "gauge__value", style: { fontSize: c }, children: b }) : null
2695
2770
  ]
2696
2771
  }
2697
2772
  );
2698
2773
  }
2699
- function xa({
2774
+ function Ea({
2700
2775
  value: t,
2701
2776
  max: n = 100,
2702
2777
  tone: r = "neutral",
@@ -2717,28 +2792,28 @@ function xa({
2717
2792
  children: [
2718
2793
  /* @__PURE__ */ e("div", { className: "progress__track", children: /* @__PURE__ */ e("div", { className: `progress__fill progress__fill--${r}`, style: { width: `${u}%` } }) }),
2719
2794
  s?.map((d) => {
2720
- const b = typeof d == "number" ? d : d.at;
2721
- if (!(b > 0 && b < 100)) return null;
2795
+ const f = typeof d == "number" ? d : d.at;
2796
+ if (!(f > 0 && f < 100)) return null;
2722
2797
  const c = typeof d == "number" ? `${d}%` : d.label ?? `${d.at}%`;
2723
- return /* @__PURE__ */ i("span", { className: "progress__stop", style: { left: `calc(${b}% - 7px)` }, children: [
2798
+ return /* @__PURE__ */ i("span", { className: "progress__stop", style: { left: `calc(${f}% - 7px)` }, children: [
2724
2799
  /* @__PURE__ */ e("span", { className: "progress__stop-line progress__stop-line--tick" }),
2725
2800
  /* @__PURE__ */ e("span", { className: "progress__stop-line progress__stop-line--cut" }),
2726
2801
  /* @__PURE__ */ e("span", { className: "q1-sr-only", children: c }),
2727
2802
  /* @__PURE__ */ e("span", { className: "progress__stop-tip", "aria-hidden": "true", children: c })
2728
- ] }, b);
2803
+ ] }, f);
2729
2804
  })
2730
2805
  ]
2731
2806
  }
2732
2807
  );
2733
2808
  }
2734
- const sn = {
2735
- info: de,
2736
- success: Ze,
2737
- warning: he,
2738
- error: Qe,
2739
- secondary: de
2809
+ const cn = {
2810
+ info: ue,
2811
+ success: Qe,
2812
+ warning: pe,
2813
+ error: Je,
2814
+ secondary: ue
2740
2815
  };
2741
- function Ca({
2816
+ function Ma({
2742
2817
  tone: t = "info",
2743
2818
  size: n = "default",
2744
2819
  filled: r = !1,
@@ -2747,7 +2822,7 @@ function Ca({
2747
2822
  action: l,
2748
2823
  children: o
2749
2824
  }) {
2750
- const u = sn[t], d = A(
2825
+ const u = cn[t], d = S(
2751
2826
  "note",
2752
2827
  `note--${t}`,
2753
2828
  `note--${n}`,
@@ -2763,7 +2838,7 @@ function Ca({
2763
2838
  l ? /* @__PURE__ */ e("button", { type: "button", className: "note__action", disabled: a, children: l }) : null
2764
2839
  ] });
2765
2840
  }
2766
- function Da({ previous: t, next: n }) {
2841
+ function Ia({ previous: t, next: n }) {
2767
2842
  const r = (a) => a.preventDefault();
2768
2843
  return /* @__PURE__ */ i("nav", { className: "pagination", "aria-label": "分页导航", children: [
2769
2844
  t ? /* @__PURE__ */ i(
@@ -2793,22 +2868,22 @@ function Da({ previous: t, next: n }) {
2793
2868
  /* @__PURE__ */ e("span", { className: "pagination__label", children: "下一页" }),
2794
2869
  /* @__PURE__ */ i("span", { className: "pagination__title-frame", children: [
2795
2870
  /* @__PURE__ */ e("span", { className: "pagination__title", children: n.title }),
2796
- /* @__PURE__ */ e("span", { className: "pagination__chevron-slot", "aria-hidden": "true", children: /* @__PURE__ */ e(Q, { className: "pagination__chevron", size: 20, strokeWidth: 2 }) })
2871
+ /* @__PURE__ */ e("span", { className: "pagination__chevron-slot", "aria-hidden": "true", children: /* @__PURE__ */ e(J, { className: "pagination__chevron", size: 20, strokeWidth: 2 }) })
2797
2872
  ] })
2798
2873
  ]
2799
2874
  }
2800
2875
  ) : /* @__PURE__ */ e("span", { className: "pagination__slot" })
2801
2876
  ] });
2802
2877
  }
2803
- function $a({
2878
+ function Ta({
2804
2879
  items: t,
2805
2880
  initial: n = 4,
2806
2881
  noBorder: r,
2807
2882
  initialExpanded: a = !1
2808
2883
  }) {
2809
- const [s, l] = E(a), o = L(), u = s ? t : t.slice(0, n), d = t.length - n;
2884
+ const [s, l] = M(a), o = R(), u = s ? t : t.slice(0, n), d = t.length - n;
2810
2885
  return /* @__PURE__ */ i("div", { className: "show-more", children: [
2811
- /* @__PURE__ */ e("ul", { className: "show-more__list", id: o, children: u.map((b) => /* @__PURE__ */ e("li", { className: "show-more__row", children: b }, b)) }),
2886
+ /* @__PURE__ */ e("ul", { className: "show-more__list", id: o, children: u.map((f) => /* @__PURE__ */ e("li", { className: "show-more__row", children: f }, f)) }),
2812
2887
  d > 0 ? /* @__PURE__ */ e("div", { className: `show-more__trigger-row${r ? " show-more__trigger-row--no-border" : ""}`, children: /* @__PURE__ */ i(
2813
2888
  "button",
2814
2889
  {
@@ -2816,16 +2891,16 @@ function $a({
2816
2891
  className: "show-more__trigger",
2817
2892
  "aria-expanded": s,
2818
2893
  "aria-controls": o,
2819
- onClick: () => l((b) => !b),
2894
+ onClick: () => l((f) => !f),
2820
2895
  children: [
2821
2896
  s ? "收起" : `显示更多 ${d} 项`,
2822
- s ? /* @__PURE__ */ e(Xe, { size: 14, strokeWidth: 2, "aria-hidden": "true" }) : /* @__PURE__ */ e(Y, { size: 14, strokeWidth: 2, "aria-hidden": "true" })
2897
+ s ? /* @__PURE__ */ e(Ze, { size: 14, strokeWidth: 2, "aria-hidden": "true" }) : /* @__PURE__ */ e(Y, { size: 14, strokeWidth: 2, "aria-hidden": "true" })
2823
2898
  ]
2824
2899
  }
2825
2900
  ) }) : null
2826
2901
  ] });
2827
2902
  }
2828
- function Ma({
2903
+ function Aa({
2829
2904
  loading: t,
2830
2905
  noGap: n,
2831
2906
  noBorderRadius: r,
@@ -2836,7 +2911,7 @@ function Ma({
2836
2911
  "button",
2837
2912
  {
2838
2913
  type: "button",
2839
- className: A(
2914
+ className: S(
2840
2915
  "load-more-btn",
2841
2916
  n ? "load-more-btn--no-gap" : "",
2842
2917
  r ? "load-more-btn--no-border-radius" : ""
@@ -2845,26 +2920,26 @@ function Ma({
2845
2920
  disabled: t,
2846
2921
  onClick: a,
2847
2922
  children: [
2848
- t ? /* @__PURE__ */ e(me, { className: "load-more-btn__spinner", size: 16, strokeWidth: 2, "aria-hidden": "true" }) : null,
2923
+ t ? /* @__PURE__ */ e(he, { className: "load-more-btn__spinner", size: 16, strokeWidth: 2, "aria-hidden": "true" }) : null,
2849
2924
  s
2850
2925
  ]
2851
2926
  }
2852
2927
  );
2853
2928
  }
2854
- function on(t) {
2929
+ function dn(t) {
2855
2930
  const n = t.match(/([+-])(\d{2}):?(\d{2})$/);
2856
2931
  if (!n) return "UTC";
2857
2932
  const r = String(Number(n[2]));
2858
2933
  return `GMT${n[1]}${r}${n[3] !== "00" ? `:${n[3]}` : ""}`;
2859
2934
  }
2860
- function Ea({
2935
+ function Sa({
2861
2936
  relative: t,
2862
2937
  relativeLong: n,
2863
2938
  iso: r,
2864
2939
  local: a,
2865
2940
  utc: s
2866
2941
  }) {
2867
- const l = on(r);
2942
+ const l = dn(r);
2868
2943
  return /* @__PURE__ */ i("span", { className: "rtc-wrap", children: [
2869
2944
  /* @__PURE__ */ e("time", { className: "rtc-trigger", dateTime: r, tabIndex: 0, children: t }),
2870
2945
  /* @__PURE__ */ i("span", { className: "rtc-card", role: "group", "aria-label": `${n},UTC ${s},${l} ${a}`, children: [
@@ -2880,13 +2955,13 @@ function Ea({
2880
2955
  ] })
2881
2956
  ] });
2882
2957
  }
2883
- const cn = { sm: 10, md: 12, lg: 15, xl: 15 };
2884
- function Ia({
2958
+ const un = { sm: 10, md: 12, lg: 15, xl: 15 };
2959
+ function qa({
2885
2960
  size: t = "md",
2886
2961
  tone: n = "default",
2887
2962
  label: r = "加载中…"
2888
2963
  }) {
2889
- const a = A("spinner", `spinner--${t}`, n !== "default" ? `spinner--${n}` : ""), s = cn[t];
2964
+ const a = S("spinner", `spinner--${t}`, n !== "default" ? `spinner--${n}` : ""), s = un[t];
2890
2965
  return /* @__PURE__ */ i("span", { className: a, role: "status", children: [
2891
2966
  Array.from({ length: s }, (l, o) => /* @__PURE__ */ e(
2892
2967
  "span",
@@ -2903,18 +2978,18 @@ function Ia({
2903
2978
  /* @__PURE__ */ e("span", { className: "q1-sr-only", children: r })
2904
2979
  ] });
2905
2980
  }
2906
- function dt() {
2981
+ function pt() {
2907
2982
  return typeof window < "u" && typeof window.matchMedia == "function" && window.matchMedia("(prefers-reduced-motion: reduce)").matches;
2908
2983
  }
2909
- const Be = "/video-sample.mp4", dn = "/video-poster.jpg", un = dt();
2910
- function Ta({ controls: t = !0, loop: n = !0 }) {
2984
+ const Pe = "/video-sample.mp4", mn = "/video-poster.jpg", hn = pt();
2985
+ function za({ controls: t = !0, loop: n = !0 }) {
2911
2986
  const r = !t;
2912
2987
  return /* @__PURE__ */ i(
2913
2988
  "video",
2914
2989
  {
2915
2990
  className: "ds-video",
2916
- src: Be,
2917
- poster: dn,
2991
+ src: Pe,
2992
+ poster: mn,
2918
2993
  width: 1280,
2919
2994
  height: 720,
2920
2995
  controls: t,
@@ -2922,18 +2997,18 @@ function Ta({ controls: t = !0, loop: n = !0 }) {
2922
2997
  muted: !0,
2923
2998
  playsInline: !0,
2924
2999
  preload: r ? "auto" : "none",
2925
- autoPlay: r && !un,
3000
+ autoPlay: r && !hn,
2926
3001
  ...r ? { "aria-hidden": !0 } : { "aria-label": "产品演示视频" },
2927
3002
  children: [
2928
3003
  "您的浏览器不支持内嵌视频,",
2929
- /* @__PURE__ */ e("a", { href: Be, children: "下载视频" }),
3004
+ /* @__PURE__ */ e("a", { href: Pe, children: "下载视频" }),
2930
3005
  "。"
2931
3006
  ]
2932
3007
  }
2933
3008
  );
2934
3009
  }
2935
- const Pe = typeof navigator < "u" && /mac/i.test(navigator.platform);
2936
- function Sa({
3010
+ const Oe = typeof navigator < "u" && /mac/i.test(navigator.platform);
3011
+ function Wa({
2937
3012
  meta: t,
2938
3013
  shift: n,
2939
3014
  alt: r,
@@ -2942,17 +3017,17 @@ function Sa({
2942
3017
  children: l
2943
3018
  }) {
2944
3019
  return /* @__PURE__ */ i("kbd", { className: `q1-kbd${s ? " q1-kbd--small" : ""}`, children: [
2945
- t ? Pe ? "⌘" : /* @__PURE__ */ e("span", { "aria-label": "Control", children: "Ctrl" }) : null,
2946
- t && !Pe && !!(n || r || a || l) ? /* @__PURE__ */ e("span", { "aria-hidden": "true", children: "+" }) : null,
3020
+ t ? Oe ? "⌘" : /* @__PURE__ */ e("span", { "aria-label": "Control", children: "Ctrl" }) : null,
3021
+ t && !Oe && !!(n || r || a || l) ? /* @__PURE__ */ e("span", { "aria-hidden": "true", children: "+" }) : null,
2947
3022
  n ? "⇧" : null,
2948
3023
  r ? "⌥" : null,
2949
3024
  a ? "⌃" : null,
2950
3025
  l
2951
3026
  ] });
2952
3027
  }
2953
- const ut = "q1travel-design-system-theme", Ne = "q1travel-theme-change";
2954
- function Oe() {
2955
- const t = window.localStorage.getItem(ut);
3028
+ const ft = "q1travel-design-system-theme", Ne = "q1travel-theme-change";
3029
+ function He() {
3030
+ const t = window.localStorage.getItem(ft);
2956
3031
  return t === "light" || t === "dark" || t === "system" ? t : "system";
2957
3032
  }
2958
3033
  function ke(t) {
@@ -2961,25 +3036,25 @@ function ke(t) {
2961
3036
  const a = document.querySelector("#q1-theme-color"), s = r === "dark" ? a?.dataset.dark : a?.dataset.light;
2962
3037
  a && s && a.setAttribute("content", s);
2963
3038
  }
2964
- function mn() {
2965
- const [t, n] = E(Oe);
3039
+ function pn() {
3040
+ const [t, n] = M(He);
2966
3041
  return F(() => {
2967
3042
  ke(t);
2968
- const a = window.matchMedia("(prefers-color-scheme: dark)"), s = () => t === "system" && ke("system"), l = () => n(Oe());
3043
+ const a = window.matchMedia("(prefers-color-scheme: dark)"), s = () => t === "system" && ke("system"), l = () => n(He());
2969
3044
  return a.addEventListener("change", s), window.addEventListener(Ne, l), window.addEventListener("storage", l), () => {
2970
3045
  a.removeEventListener("change", s), window.removeEventListener(Ne, l), window.removeEventListener("storage", l);
2971
3046
  };
2972
3047
  }, [t]), [t, (a) => {
2973
- window.localStorage.setItem(ut, a), ke(a), n(a), window.dispatchEvent(new Event(Ne));
3048
+ window.localStorage.setItem(ft, a), ke(a), n(a), window.dispatchEvent(new Event(Ne));
2974
3049
  }];
2975
3050
  }
2976
- const hn = [
2977
- { mode: "system", label: "系统", Icon: St },
2978
- { mode: "light", label: "浅色", Icon: Rt },
2979
- { mode: "dark", label: "深色", Icon: At }
3051
+ const fn = [
3052
+ { mode: "system", label: "系统", Icon: Wt },
3053
+ { mode: "light", label: "浅色", Icon: Bt },
3054
+ { mode: "dark", label: "深色", Icon: Lt }
2980
3055
  ];
2981
- function Aa({ small: t, disabled: n }) {
2982
- const r = L(), [a, s] = mn();
3056
+ function La({ small: t, disabled: n }) {
3057
+ const r = R(), [a, s] = pn();
2983
3058
  return /* @__PURE__ */ i(
2984
3059
  "fieldset",
2985
3060
  {
@@ -2987,7 +3062,7 @@ function Aa({ small: t, disabled: n }) {
2987
3062
  disabled: n,
2988
3063
  children: [
2989
3064
  /* @__PURE__ */ e("legend", { className: "q1-sr-only", children: "选择显示主题" }),
2990
- hn.map(({ mode: l, label: o, Icon: u }) => /* @__PURE__ */ i("label", { className: "theme-switcher__option", children: [
3065
+ fn.map(({ mode: l, label: o, Icon: u }) => /* @__PURE__ */ i("label", { className: "theme-switcher__option", children: [
2991
3066
  /* @__PURE__ */ e(
2992
3067
  "input",
2993
3068
  {
@@ -3006,14 +3081,14 @@ function Aa({ small: t, disabled: n }) {
3006
3081
  }
3007
3082
  );
3008
3083
  }
3009
- function qa({
3084
+ function Ra({
3010
3085
  axis: t,
3011
3086
  label: n,
3012
3087
  children: r
3013
3088
  }) {
3014
3089
  return /* @__PURE__ */ e("div", { className: `scroller scroller--${t}`, children: /* @__PURE__ */ e("div", { className: "scroller__viewport", tabIndex: 0, role: "group", "aria-label": n, children: r }) });
3015
3090
  }
3016
- function za({
3091
+ function Fa({
3017
3092
  axis: t = "horizontal",
3018
3093
  contentName: n,
3019
3094
  label: r,
@@ -3023,15 +3098,15 @@ function za({
3023
3098
  function o(u) {
3024
3099
  const d = s.current;
3025
3100
  if (!d) return;
3026
- const b = Array.from(d.children), c = l ? d.scrollLeft : d.scrollTop, f = l ? d.clientWidth : d.clientHeight, _ = c + (u === 1 ? f : 0), m = ($) => l ? $.offsetLeft : $.offsetTop, y = ($) => l ? $.offsetLeft + $.offsetWidth : $.offsetTop + $.offsetHeight, w = u === 1 ? b.find(($) => y($) > _ + 1) : [...b].reverse().find(($) => m($) < c - 1);
3101
+ const f = Array.from(d.children), c = l ? d.scrollLeft : d.scrollTop, _ = l ? d.clientWidth : d.clientHeight, b = c + (u === 1 ? _ : 0), m = (D) => l ? D.offsetLeft : D.offsetTop, y = (D) => l ? D.offsetLeft + D.offsetWidth : D.offsetTop + D.offsetHeight, w = u === 1 ? f.find((D) => y(D) > b + 1) : [...f].reverse().find((D) => m(D) < c - 1);
3027
3102
  if (!w) return;
3028
- const p = dt() ? "auto" : "smooth";
3103
+ const p = pt() ? "auto" : "smooth";
3029
3104
  if (l) {
3030
3105
  w.scrollIntoView({ behavior: p, inline: "start", block: "nearest" });
3031
3106
  return;
3032
3107
  }
3033
- const N = parseFloat(getComputedStyle(d).paddingTop) || 0, x = w.getBoundingClientRect().top - d.getBoundingClientRect().top - N;
3034
- d.scrollTo({ top: d.scrollTop + x, behavior: p });
3108
+ const N = parseFloat(getComputedStyle(d).paddingTop) || 0, v = w.getBoundingClientRect().top - d.getBoundingClientRect().top - N;
3109
+ d.scrollTo({ top: d.scrollTop + v, behavior: p });
3035
3110
  }
3036
3111
  return /* @__PURE__ */ i("div", { className: l ? "scroller-buttons" : "scroller-buttons scroller-buttons--vertical", children: [
3037
3112
  /* @__PURE__ */ e(
@@ -3041,7 +3116,7 @@ function za({
3041
3116
  className: "scroller-buttons__control",
3042
3117
  "aria-label": `${l ? "向左滚动" : "向上滚动"}${n}`,
3043
3118
  onClick: () => o(-1),
3044
- children: l ? /* @__PURE__ */ e(De, { size: 16, strokeWidth: 2, "aria-hidden": "true" }) : /* @__PURE__ */ e(Xe, { size: 16, strokeWidth: 2, "aria-hidden": "true" })
3119
+ children: l ? /* @__PURE__ */ e(De, { size: 16, strokeWidth: 2, "aria-hidden": "true" }) : /* @__PURE__ */ e(Ze, { size: 16, strokeWidth: 2, "aria-hidden": "true" })
3045
3120
  }
3046
3121
  ),
3047
3122
  /* @__PURE__ */ e("div", { className: `scroller scroller--${t} scroller--flush`, children: /* @__PURE__ */ e("div", { className: "scroller__viewport", ref: s, tabIndex: 0, role: "group", "aria-label": r, children: a }) }),
@@ -3052,13 +3127,13 @@ function za({
3052
3127
  className: "scroller-buttons__control",
3053
3128
  "aria-label": `${l ? "向右滚动" : "向下滚动"}${n}`,
3054
3129
  onClick: () => o(1),
3055
- children: l ? /* @__PURE__ */ e(Q, { size: 16, strokeWidth: 2, "aria-hidden": "true" }) : /* @__PURE__ */ e(Y, { size: 16, strokeWidth: 2, "aria-hidden": "true" })
3130
+ children: l ? /* @__PURE__ */ e(J, { size: 16, strokeWidth: 2, "aria-hidden": "true" }) : /* @__PURE__ */ e(Y, { size: 16, strokeWidth: 2, "aria-hidden": "true" })
3056
3131
  }
3057
3132
  )
3058
3133
  ] });
3059
3134
  }
3060
- function Wa({ label: t, unit: n, min: r = 0, max: a = 100, step: s = 1, defaultValue: l }) {
3061
- const [o, u] = E(l), d = L(), b = (o - r) / (a - r) * 100;
3135
+ function Ka({ label: t, unit: n, min: r = 0, max: a = 100, step: s = 1, defaultValue: l }) {
3136
+ const [o, u] = M(l), d = R(), f = (o - r) / (a - r) * 100;
3062
3137
  return /* @__PURE__ */ i("div", { className: "slider-field", children: [
3063
3138
  /* @__PURE__ */ i("div", { className: "slider-field__head", children: [
3064
3139
  /* @__PURE__ */ e("label", { className: "slider-field__label", htmlFor: d, children: t }),
@@ -3077,14 +3152,14 @@ function Wa({ label: t, unit: n, min: r = 0, max: a = 100, step: s = 1, defaultV
3077
3152
  max: a,
3078
3153
  step: s,
3079
3154
  value: o,
3080
- style: { "--slider-pct": `${b}%` },
3155
+ style: { "--slider-pct": `${f}%` },
3081
3156
  onChange: (c) => u(Number(c.target.value))
3082
3157
  }
3083
3158
  )
3084
3159
  ] });
3085
3160
  }
3086
- function Ra({ min: t = 0, max: n = 100, step: r = 1, defaultLow: a, defaultHigh: s, disabled: l }) {
3087
- const [o, u] = E(a), [d, b] = E(s), c = L(), f = L(), _ = (o - t) / (n - t) * 100, m = (d - t) / (n - t) * 100, y = (p) => u(Math.min(p, d)), w = (p) => b(Math.max(p, o));
3161
+ function Ba({ min: t = 0, max: n = 100, step: r = 1, defaultLow: a, defaultHigh: s, disabled: l }) {
3162
+ const [o, u] = M(a), [d, f] = M(s), c = R(), _ = R(), b = (o - t) / (n - t) * 100, m = (d - t) / (n - t) * 100, y = (p) => u(Math.min(p, d)), w = (p) => f(Math.max(p, o));
3088
3163
  return /* @__PURE__ */ i("div", { className: `range-slider${l ? " range-slider--disabled" : ""}`, children: [
3089
3164
  /* @__PURE__ */ e("label", { className: "q1-sr-only", htmlFor: c, children: "区间下限" }),
3090
3165
  /* @__PURE__ */ e(
@@ -3101,7 +3176,7 @@ function Ra({ min: t = 0, max: n = 100, step: r = 1, defaultLow: a, defaultHigh:
3101
3176
  onChange: (p) => y(Number(p.target.value))
3102
3177
  }
3103
3178
  ),
3104
- /* @__PURE__ */ i("div", { className: "range-slider__track-area", style: { "--low": `${_}%`, "--high": `${m}%` }, children: [
3179
+ /* @__PURE__ */ i("div", { className: "range-slider__track-area", style: { "--low": `${b}%`, "--high": `${m}%` }, children: [
3105
3180
  /* @__PURE__ */ e("span", { className: "range-slider__rail", "aria-hidden": "true" }),
3106
3181
  /* @__PURE__ */ e("span", { className: "range-slider__fill", "aria-hidden": "true" }),
3107
3182
  /* @__PURE__ */ e(
@@ -3133,13 +3208,13 @@ function Ra({ min: t = 0, max: n = 100, step: r = 1, defaultLow: a, defaultHigh:
3133
3208
  }
3134
3209
  )
3135
3210
  ] }),
3136
- /* @__PURE__ */ e("label", { className: "q1-sr-only", htmlFor: f, children: "区间上限" }),
3211
+ /* @__PURE__ */ e("label", { className: "q1-sr-only", htmlFor: _, children: "区间上限" }),
3137
3212
  /* @__PURE__ */ e(
3138
3213
  "input",
3139
3214
  {
3140
3215
  type: "number",
3141
3216
  className: "range-slider__number",
3142
- id: f,
3217
+ id: _,
3143
3218
  min: t,
3144
3219
  max: n,
3145
3220
  step: r,
@@ -3150,33 +3225,33 @@ function Ra({ min: t = 0, max: n = 100, step: r = 1, defaultLow: a, defaultHigh:
3150
3225
  )
3151
3226
  ] });
3152
3227
  }
3153
- function ie({ crumb: t }) {
3228
+ function ce({ crumb: t }) {
3154
3229
  const n = /* @__PURE__ */ i(U, { children: [
3155
3230
  t.icon ? /* @__PURE__ */ e("span", { className: "breadcrumb__icon", "aria-hidden": "true", children: t.icon }) : null,
3156
3231
  t.label
3157
3232
  ] });
3158
3233
  return t.isCurrent ? /* @__PURE__ */ e("span", { className: "breadcrumb__link breadcrumb__link--current", "aria-current": "page", children: n }) : t.isDisabled ? /* @__PURE__ */ e("span", { className: "breadcrumb__link breadcrumb__link--disabled", "aria-disabled": "true", children: n }) : /* @__PURE__ */ e("a", { className: "breadcrumb__link", href: t.href ?? "#breadcrumb", children: n });
3159
3234
  }
3160
- function ce() {
3161
- return /* @__PURE__ */ e(Q, { className: "breadcrumb__separator", "aria-hidden": "true", size: 16, strokeWidth: 2 });
3235
+ function de() {
3236
+ return /* @__PURE__ */ e(J, { className: "breadcrumb__separator", "aria-hidden": "true", size: 16, strokeWidth: 2 });
3162
3237
  }
3163
- function La({
3238
+ function Pa({
3164
3239
  items: t,
3165
3240
  label: n,
3166
3241
  type: r = "text"
3167
3242
  }) {
3168
3243
  const a = r === "menu";
3169
- return /* @__PURE__ */ e("nav", { className: A("breadcrumb", a ? "breadcrumb--menu" : ""), "aria-label": n, children: /* @__PURE__ */ e("ol", { className: "breadcrumb__list", children: t.map((s, l) => /* @__PURE__ */ i("li", { className: "breadcrumb__item", children: [
3170
- /* @__PURE__ */ e(ie, { crumb: s }),
3171
- !a && l < t.length - 1 ? /* @__PURE__ */ e(ce, {}) : null
3244
+ return /* @__PURE__ */ e("nav", { className: S("breadcrumb", a ? "breadcrumb--menu" : ""), "aria-label": n, children: /* @__PURE__ */ e("ol", { className: "breadcrumb__list", children: t.map((s, l) => /* @__PURE__ */ i("li", { className: "breadcrumb__item", children: [
3245
+ /* @__PURE__ */ e(ce, { crumb: s }),
3246
+ !a && l < t.length - 1 ? /* @__PURE__ */ e(de, {}) : null
3172
3247
  ] }, s.label)) }) });
3173
3248
  }
3174
- function Fa({ items: t, label: n }) {
3175
- const [r, a] = E(!1), s = t[0], l = t[t.length - 1], o = t.slice(1, -1);
3249
+ function Oa({ items: t, label: n }) {
3250
+ const [r, a] = M(!1), s = t[0], l = t[t.length - 1], o = t.slice(1, -1);
3176
3251
  return /* @__PURE__ */ e("nav", { className: "breadcrumb", "aria-label": n, "data-expanded": r ? "true" : "false", children: /* @__PURE__ */ i("ol", { className: "breadcrumb__list", children: [
3177
3252
  /* @__PURE__ */ i("li", { className: "breadcrumb__item", children: [
3178
- /* @__PURE__ */ e(ie, { crumb: s }),
3179
- /* @__PURE__ */ e(ce, {})
3253
+ /* @__PURE__ */ e(ce, { crumb: s }),
3254
+ /* @__PURE__ */ e(de, {})
3180
3255
  ] }),
3181
3256
  /* @__PURE__ */ i("li", { className: "breadcrumb__item breadcrumb__item--toggle", children: [
3182
3257
  /* @__PURE__ */ e(
@@ -3187,42 +3262,42 @@ function Fa({ items: t, label: n }) {
3187
3262
  "aria-expanded": r,
3188
3263
  "aria-label": r ? "收起中间层级" : "展开折叠的中间层级",
3189
3264
  onClick: () => a((u) => !u),
3190
- children: /* @__PURE__ */ e(Je, { "aria-hidden": "true", size: 16, strokeWidth: 2 })
3265
+ children: /* @__PURE__ */ e(et, { "aria-hidden": "true", size: 16, strokeWidth: 2 })
3191
3266
  }
3192
3267
  ),
3193
- /* @__PURE__ */ e(ce, {})
3268
+ /* @__PURE__ */ e(de, {})
3194
3269
  ] }),
3195
3270
  o.map((u) => /* @__PURE__ */ i("li", { className: "breadcrumb__item breadcrumb__item--middle", children: [
3196
- /* @__PURE__ */ e(ie, { crumb: u }),
3197
- /* @__PURE__ */ e(ce, {})
3271
+ /* @__PURE__ */ e(ce, { crumb: u }),
3272
+ /* @__PURE__ */ e(de, {})
3198
3273
  ] }, u.label)),
3199
- /* @__PURE__ */ e("li", { className: "breadcrumb__item", children: /* @__PURE__ */ e(ie, { crumb: l }) })
3274
+ /* @__PURE__ */ e("li", { className: "breadcrumb__item", children: /* @__PURE__ */ e(ce, { crumb: l }) })
3200
3275
  ] }) });
3201
3276
  }
3202
- function Ka({ open: t, onClose: n, title: r, side: a = "right", children: s, footer: l }) {
3203
- const o = T(null), u = L();
3277
+ function Ha({ open: t, onClose: n, title: r, side: a = "right", children: s, footer: l }) {
3278
+ const o = T(null), u = R();
3204
3279
  if (F(() => {
3205
3280
  if (!t) return;
3206
- const b = window.setTimeout(
3281
+ const f = window.setTimeout(
3207
3282
  () => o.current?.querySelector("button, input, [tabindex]")?.focus(),
3208
3283
  0
3209
3284
  );
3210
3285
  return document.body.style.overflow = "hidden", () => {
3211
- window.clearTimeout(b), document.body.style.overflow = "";
3286
+ window.clearTimeout(f), document.body.style.overflow = "";
3212
3287
  };
3213
3288
  }, [t]), !t) return null;
3214
- function d(b) {
3215
- if (b.key === "Escape")
3216
- b.preventDefault(), n();
3217
- else if (b.key === "Tab") {
3289
+ function d(f) {
3290
+ if (f.key === "Escape")
3291
+ f.preventDefault(), n();
3292
+ else if (f.key === "Tab") {
3218
3293
  const c = Array.from(o.current?.querySelectorAll("button:not([disabled]), input:not([disabled]), a[href]") ?? []);
3219
3294
  if (c.length === 0) return;
3220
- const f = c[0], _ = c[c.length - 1];
3221
- b.shiftKey && document.activeElement === f ? (b.preventDefault(), _.focus()) : !b.shiftKey && document.activeElement === _ && (b.preventDefault(), f.focus());
3295
+ const _ = c[0], b = c[c.length - 1];
3296
+ f.shiftKey && document.activeElement === _ ? (f.preventDefault(), b.focus()) : !f.shiftKey && document.activeElement === b && (f.preventDefault(), _.focus());
3222
3297
  }
3223
3298
  }
3224
3299
  return /* @__PURE__ */ i(U, { children: [
3225
- /* @__PURE__ */ e("div", { className: "sheet__backdrop", "aria-hidden": "true", onMouseDown: (b) => b.preventDefault() }),
3300
+ /* @__PURE__ */ e("div", { className: "sheet__backdrop", "aria-hidden": "true", onMouseDown: (f) => f.preventDefault() }),
3226
3301
  /* @__PURE__ */ i(
3227
3302
  "div",
3228
3303
  {
@@ -3235,7 +3310,7 @@ function Ka({ open: t, onClose: n, title: r, side: a = "right", children: s, foo
3235
3310
  children: [
3236
3311
  /* @__PURE__ */ i("header", { className: "sheet__header", children: [
3237
3312
  /* @__PURE__ */ e("h2", { className: "sheet__title", id: u, children: r }),
3238
- /* @__PURE__ */ e("button", { type: "button", className: "sheet__close", "aria-label": "关闭", onClick: n, children: /* @__PURE__ */ e(J, { size: 16, strokeWidth: 2, "aria-hidden": "true" }) })
3313
+ /* @__PURE__ */ e("button", { type: "button", className: "sheet__close", "aria-label": "关闭", onClick: n, children: /* @__PURE__ */ e(ee, { size: 16, strokeWidth: 2, "aria-hidden": "true" }) })
3239
3314
  ] }),
3240
3315
  /* @__PURE__ */ e("div", { className: "sheet__body", children: s }),
3241
3316
  l ? /* @__PURE__ */ e("footer", { className: "sheet__footer", children: l }) : null
@@ -3244,42 +3319,42 @@ function Ka({ open: t, onClose: n, title: r, side: a = "right", children: s, foo
3244
3319
  )
3245
3320
  ] });
3246
3321
  }
3247
- function Ba({ label: t, entries: n, variant: r = "default", size: a = "md", align: s = "start", menuButtonLabel: l, icon: o }) {
3248
- const [u, d] = E(!1), [b, c] = E(-1), f = T(null), _ = T([]), m = T({ buffer: "", timer: 0 }), y = L(), w = n.map((h, v) => v);
3322
+ function ja({ label: t, entries: n, variant: r = "default", size: a = "md", align: s = "start", menuButtonLabel: l, icon: o }) {
3323
+ const [u, d] = M(!1), [f, c] = M(-1), _ = T(null), b = T([]), m = T({ buffer: "", timer: 0 }), y = R(), w = n.map((h, x) => x);
3249
3324
  function p(h) {
3250
- c(h), _.current[h]?.focus();
3325
+ c(h), b.current[h]?.focus();
3251
3326
  }
3252
3327
  function N(h) {
3253
3328
  d(!0);
3254
- const v = h === "first" ? 0 : n.length - 1;
3255
- window.requestAnimationFrame(() => p(v));
3329
+ const x = h === "first" ? 0 : n.length - 1;
3330
+ window.requestAnimationFrame(() => p(x));
3256
3331
  }
3257
- function x(h = !0) {
3258
- d(!1), c(-1), h && f.current?.focus();
3332
+ function v(h = !0) {
3333
+ d(!1), c(-1), h && _.current?.focus();
3259
3334
  }
3260
3335
  F(() => {
3261
3336
  if (!u) return;
3262
- function h(v) {
3263
- const g = f.current?.closest(".split-button");
3264
- g && !g.contains(v.target) && x(!1);
3337
+ function h(x) {
3338
+ const g = _.current?.closest(".split-button");
3339
+ g && !g.contains(x.target) && v(!1);
3265
3340
  }
3266
3341
  return document.addEventListener("mousedown", h), () => document.removeEventListener("mousedown", h);
3267
3342
  }, [u]);
3268
- function $(h) {
3343
+ function D(h) {
3269
3344
  h.key === "ArrowDown" || h.key === "Enter" || h.key === " " ? (h.preventDefault(), N("first")) : h.key === "ArrowUp" && (h.preventDefault(), N("last"));
3270
3345
  }
3271
3346
  function C(h) {
3272
- const v = w.indexOf(b);
3347
+ const x = w.indexOf(f);
3273
3348
  if (h.key === "ArrowDown")
3274
- h.preventDefault(), p(w[(v + 1) % w.length]);
3349
+ h.preventDefault(), p(w[(x + 1) % w.length]);
3275
3350
  else if (h.key === "ArrowUp")
3276
- h.preventDefault(), p(w[(v - 1 + w.length) % w.length]);
3351
+ h.preventDefault(), p(w[(x - 1 + w.length) % w.length]);
3277
3352
  else if (h.key === "Home")
3278
3353
  h.preventDefault(), p(0);
3279
3354
  else if (h.key === "End")
3280
3355
  h.preventDefault(), p(n.length - 1);
3281
3356
  else if (h.key === "Escape")
3282
- h.preventDefault(), x();
3357
+ h.preventDefault(), v();
3283
3358
  else if (h.key.length === 1 && /\S/.test(h.key)) {
3284
3359
  window.clearTimeout(m.current.timer), m.current.buffer += h.key.toLowerCase(), m.current.timer = window.setTimeout(() => m.current.buffer = "", 500);
3285
3360
  const g = w.find((k) => n[k].label.toLowerCase().startsWith(m.current.buffer));
@@ -3294,15 +3369,15 @@ function Ba({ label: t, entries: n, variant: r = "default", size: a = "md", alig
3294
3369
  /* @__PURE__ */ e(
3295
3370
  "button",
3296
3371
  {
3297
- ref: f,
3372
+ ref: _,
3298
3373
  type: "button",
3299
3374
  className: "split-button__toggle",
3300
3375
  "aria-label": l,
3301
3376
  "aria-haspopup": "menu",
3302
3377
  "aria-expanded": u,
3303
3378
  "aria-controls": u ? y : void 0,
3304
- onClick: () => u ? x() : N("first"),
3305
- onKeyDown: $,
3379
+ onClick: () => u ? v() : N("first"),
3380
+ onKeyDown: D,
3306
3381
  children: /* @__PURE__ */ e(Y, { size: a === "sm" ? 14 : 16, strokeWidth: 2, "aria-hidden": "true" })
3307
3382
  }
3308
3383
  ),
@@ -3314,17 +3389,17 @@ function Ba({ label: t, entries: n, variant: r = "default", size: a = "md", alig
3314
3389
  "aria-label": l,
3315
3390
  className: `menu__popup menu__popup--${s}`,
3316
3391
  onKeyDown: C,
3317
- children: n.map((h, v) => /* @__PURE__ */ i(
3392
+ children: n.map((h, x) => /* @__PURE__ */ i(
3318
3393
  "button",
3319
3394
  {
3320
3395
  ref: (g) => {
3321
- _.current[v] = g;
3396
+ b.current[x] = g;
3322
3397
  },
3323
3398
  type: "button",
3324
3399
  role: "menuitem",
3325
3400
  tabIndex: -1,
3326
3401
  className: `menu__item${h.danger ? " menu__item--danger" : ""}`,
3327
- onClick: () => x(),
3402
+ onClick: () => v(),
3328
3403
  children: [
3329
3404
  h.icon ? /* @__PURE__ */ e("span", { className: "menu__item-icon", children: h.icon }) : null,
3330
3405
  /* @__PURE__ */ e("span", { className: "menu__item-label", children: h.label })
@@ -3336,73 +3411,73 @@ function Ba({ label: t, entries: n, variant: r = "default", size: a = "md", alig
3336
3411
  ) : null
3337
3412
  ] });
3338
3413
  }
3339
- const pn = (t) => t.type === "item" && !t.disabled && !t.locked || t.type === "link";
3340
- function Pa({ label: t, entries: n, withChevron: r, align: a = "start", triggerContent: s }) {
3341
- const [l, o] = E(!1), [u, d] = E({
3414
+ const _n = (t) => t.type === "item" && !t.disabled && !t.locked || t.type === "link";
3415
+ function Ua({ label: t, entries: n, withChevron: r, align: a = "start", triggerContent: s }) {
3416
+ const [l, o] = M(!1), [u, d] = M({
3342
3417
  align: a,
3343
3418
  side: "bottom"
3344
- }), b = T(null), c = T(null), f = L();
3345
- ne(() => {
3419
+ }), f = T(null), c = T(null), _ = R();
3420
+ ae(() => {
3346
3421
  if (!l) return;
3347
3422
  function C() {
3348
- const g = b.current, k = c.current;
3423
+ const g = f.current, k = c.current;
3349
3424
  if (!g || !k) return;
3350
- const M = g.getBoundingClientRect(), I = k.getBoundingClientRect();
3351
- let S = a;
3352
- a === "start" && M.left + I.width > window.innerWidth ? S = "end" : a === "end" && M.right - I.width < 0 && (S = "start");
3353
- const R = M.bottom + I.height > window.innerHeight ? "top" : "bottom";
3354
- d({ align: S, side: R });
3425
+ const E = g.getBoundingClientRect(), I = k.getBoundingClientRect();
3426
+ let A = a;
3427
+ a === "start" && E.left + I.width > window.innerWidth ? A = "end" : a === "end" && E.right - I.width < 0 && (A = "start");
3428
+ const W = E.bottom + I.height > window.innerHeight ? "top" : "bottom";
3429
+ d({ align: A, side: W });
3355
3430
  }
3356
3431
  let h = 0;
3357
- function v() {
3432
+ function x() {
3358
3433
  h || (h = window.requestAnimationFrame(() => {
3359
3434
  h = 0, C();
3360
3435
  }));
3361
3436
  }
3362
- return C(), window.addEventListener("resize", v), () => {
3363
- window.removeEventListener("resize", v), h && window.cancelAnimationFrame(h);
3437
+ return C(), window.addEventListener("resize", x), () => {
3438
+ window.removeEventListener("resize", x), h && window.cancelAnimationFrame(h);
3364
3439
  };
3365
3440
  }, [l, a]);
3366
- const _ = n.flatMap((C, h) => pn(C) ? [h] : []), { itemRefs: m, focusItem: y, reset: w, onMenuKeyDown: p } = Te({
3367
- focusableIndices: _,
3441
+ const b = n.flatMap((C, h) => _n(C) ? [h] : []), { itemRefs: m, focusItem: y, reset: w, onMenuKeyDown: p } = Te({
3442
+ focusableIndices: b,
3368
3443
  getText: (C) => {
3369
3444
  const h = n[C];
3370
3445
  return h.type === "item" || h.type === "link" ? h.label : "";
3371
3446
  },
3372
- onClose: () => x()
3447
+ onClose: () => v()
3373
3448
  });
3374
3449
  function N(C) {
3375
3450
  o(!0);
3376
- const h = C === "first" ? _[0] : _[_.length - 1];
3451
+ const h = C === "first" ? b[0] : b[b.length - 1];
3377
3452
  window.requestAnimationFrame(() => y(h));
3378
3453
  }
3379
- function x(C = !0) {
3380
- o(!1), w(), d({ align: a, side: "bottom" }), C && b.current?.focus();
3454
+ function v(C = !0) {
3455
+ o(!1), w(), d({ align: a, side: "bottom" }), C && f.current?.focus();
3381
3456
  }
3382
3457
  F(() => {
3383
3458
  if (!l) return;
3384
3459
  function C(h) {
3385
- const v = m.current[0]?.closest(".menu");
3386
- v && !v.contains(h.target) && x(!1);
3460
+ const x = m.current[0]?.closest(".menu");
3461
+ x && !x.contains(h.target) && v(!1);
3387
3462
  }
3388
3463
  return document.addEventListener("mousedown", C), () => document.removeEventListener("mousedown", C);
3389
3464
  }, [l]);
3390
- function $(C) {
3465
+ function D(C) {
3391
3466
  C.key === "ArrowDown" || C.key === "Enter" || C.key === " " ? (C.preventDefault(), N("first")) : C.key === "ArrowUp" && (C.preventDefault(), N("last"));
3392
3467
  }
3393
3468
  return /* @__PURE__ */ i("div", { className: "menu", children: [
3394
3469
  /* @__PURE__ */ i(
3395
3470
  "button",
3396
3471
  {
3397
- ref: b,
3472
+ ref: f,
3398
3473
  type: "button",
3399
3474
  className: s ? "menu__trigger menu__trigger--icon" : "menu__trigger",
3400
3475
  "aria-haspopup": "menu",
3401
3476
  "aria-expanded": l,
3402
- "aria-controls": l ? f : void 0,
3477
+ "aria-controls": l ? _ : void 0,
3403
3478
  "aria-label": s ? t : void 0,
3404
- onClick: () => l ? x() : N("first"),
3405
- onKeyDown: $,
3479
+ onClick: () => l ? v() : N("first"),
3480
+ onKeyDown: D,
3406
3481
  children: [
3407
3482
  s ?? t,
3408
3483
  r ? /* @__PURE__ */ e(Y, { size: 16, strokeWidth: 2, "aria-hidden": "true" }) : null
@@ -3413,7 +3488,7 @@ function Pa({ label: t, entries: n, withChevron: r, align: a = "start", triggerC
3413
3488
  "div",
3414
3489
  {
3415
3490
  ref: c,
3416
- id: f,
3491
+ id: _,
3417
3492
  role: "menu",
3418
3493
  className: `menu__popup menu__popup--${u.align} menu__popup--${u.side}`,
3419
3494
  "aria-label": t,
@@ -3435,7 +3510,7 @@ function Pa({ label: t, entries: n, withChevron: r, align: a = "start", triggerC
3435
3510
  href: C.href,
3436
3511
  className: "menu__item",
3437
3512
  onClick: (k) => {
3438
- k.preventDefault(), x();
3513
+ k.preventDefault(), v();
3439
3514
  },
3440
3515
  children: [
3441
3516
  C.icon ? /* @__PURE__ */ e("span", { className: "menu__item-icon", children: C.icon }) : null,
@@ -3445,7 +3520,7 @@ function Pa({ label: t, entries: n, withChevron: r, align: a = "start", triggerC
3445
3520
  },
3446
3521
  C.label
3447
3522
  );
3448
- const v = !C.disabled && !C.locked, g = C.suffix ?? (C.locked ? /* @__PURE__ */ e(It, { size: 16, strokeWidth: 2, "aria-hidden": "true" }) : null);
3523
+ const x = !C.disabled && !C.locked, g = C.suffix ?? (C.locked ? /* @__PURE__ */ e(qt, { size: 16, strokeWidth: 2, "aria-hidden": "true" }) : null);
3449
3524
  return /* @__PURE__ */ i(
3450
3525
  "button",
3451
3526
  {
@@ -3455,10 +3530,10 @@ function Pa({ label: t, entries: n, withChevron: r, align: a = "start", triggerC
3455
3530
  type: "button",
3456
3531
  role: "menuitem",
3457
3532
  tabIndex: -1,
3458
- disabled: !v,
3459
- "aria-disabled": v ? void 0 : !0,
3533
+ disabled: !x,
3534
+ "aria-disabled": x ? void 0 : !0,
3460
3535
  className: `menu__item${C.danger ? " menu__item--danger" : ""}${C.locked ? " menu__item--locked" : ""}`,
3461
- onClick: () => v && x(),
3536
+ onClick: () => x && v(),
3462
3537
  children: [
3463
3538
  C.icon ? /* @__PURE__ */ e("span", { className: "menu__item-icon", children: C.icon }) : null,
3464
3539
  /* @__PURE__ */ e("span", { className: "menu__item-label", children: C.label }),
@@ -3472,14 +3547,14 @@ function Pa({ label: t, entries: n, withChevron: r, align: a = "start", triggerC
3472
3547
  ) : null
3473
3548
  ] });
3474
3549
  }
3475
- function Oa({ options: t, defaultSelected: n = [], placeholder: r, onChange: a }) {
3476
- const [s, l] = E(!1), [o, u] = E(n), [d, b] = E({ row: 0, col: 0 }), c = T(null), f = T(null), _ = T([]);
3550
+ function Ya({ options: t, defaultSelected: n = [], placeholder: r, onChange: a }) {
3551
+ const [s, l] = M(!1), [o, u] = M(n), [d, f] = M({ row: 0, col: 0 }), c = T(null), _ = T(null), b = T([]);
3477
3552
  function m(k) {
3478
3553
  u(k), a?.(k);
3479
3554
  }
3480
3555
  const y = (k) => o.includes(k);
3481
3556
  function w(k) {
3482
- m(y(k) ? o.filter((M) => M !== k) : [...o, k]);
3557
+ m(y(k) ? o.filter((E) => E !== k) : [...o, k]);
3483
3558
  }
3484
3559
  function p(k) {
3485
3560
  m([k]);
@@ -3487,35 +3562,35 @@ function Oa({ options: t, defaultSelected: n = [], placeholder: r, onChange: a }
3487
3562
  function N() {
3488
3563
  m([...t]);
3489
3564
  }
3490
- function x(k) {
3565
+ function v(k) {
3491
3566
  return y(k) ? o.length === t.length ? { label: "仅选此项", run: () => p(k) } : { label: "全选", run: () => N() } : o.length === 0 ? { label: "勾选", run: () => w(k) } : { label: "仅选此项", run: () => p(k) };
3492
3567
  }
3493
- function $(k, M) {
3494
- b({ row: k, col: M }), window.requestAnimationFrame(() => _.current[k]?.[M]?.focus());
3568
+ function D(k, E) {
3569
+ f({ row: k, col: E }), window.requestAnimationFrame(() => b.current[k]?.[E]?.focus());
3495
3570
  }
3496
3571
  function C() {
3497
- l(!0), window.requestAnimationFrame(() => $(0, 0));
3572
+ l(!0), window.requestAnimationFrame(() => D(0, 0));
3498
3573
  }
3499
3574
  function h(k = !0) {
3500
- l(!1), k && f.current?.focus();
3575
+ l(!1), k && _.current?.focus();
3501
3576
  }
3502
3577
  F(() => {
3503
3578
  if (!s) return;
3504
- function k(M) {
3505
- c.current && !c.current.contains(M.target) && h(!1);
3579
+ function k(E) {
3580
+ c.current && !c.current.contains(E.target) && h(!1);
3506
3581
  }
3507
3582
  return document.addEventListener("mousedown", k), () => document.removeEventListener("mousedown", k);
3508
3583
  }, [s]);
3509
- function v(k) {
3510
- const { row: M, col: I } = d;
3511
- k.key === "ArrowDown" ? (k.preventDefault(), $(Math.min(M + 1, t.length - 1), I)) : k.key === "ArrowUp" ? (k.preventDefault(), $(Math.max(M - 1, 0), I)) : k.key === "ArrowRight" ? (k.preventDefault(), $(M, 1)) : k.key === "ArrowLeft" ? (k.preventDefault(), $(M, 0)) : k.key === "Home" ? (k.preventDefault(), $(0, I)) : k.key === "End" ? (k.preventDefault(), $(t.length - 1, I)) : k.key === "Escape" && (k.preventDefault(), h());
3584
+ function x(k) {
3585
+ const { row: E, col: I } = d;
3586
+ k.key === "ArrowDown" ? (k.preventDefault(), D(Math.min(E + 1, t.length - 1), I)) : k.key === "ArrowUp" ? (k.preventDefault(), D(Math.max(E - 1, 0), I)) : k.key === "ArrowRight" ? (k.preventDefault(), D(E, 1)) : k.key === "ArrowLeft" ? (k.preventDefault(), D(E, 0)) : k.key === "Home" ? (k.preventDefault(), D(0, I)) : k.key === "End" ? (k.preventDefault(), D(t.length - 1, I)) : k.key === "Escape" && (k.preventDefault(), h());
3512
3587
  }
3513
3588
  const g = o.length === 0 ? r : o.length === 1 ? o[0] : `已选 ${o.length} 项`;
3514
3589
  return /* @__PURE__ */ i("div", { className: "multi-select", ref: c, children: [
3515
3590
  /* @__PURE__ */ i(
3516
3591
  "button",
3517
3592
  {
3518
- ref: f,
3593
+ ref: _,
3519
3594
  type: "button",
3520
3595
  className: "multi-select__trigger",
3521
3596
  "aria-haspopup": "listbox",
@@ -3527,7 +3602,7 @@ function Oa({ options: t, defaultSelected: n = [], placeholder: r, onChange: a }
3527
3602
  ]
3528
3603
  }
3529
3604
  ),
3530
- s ? /* @__PURE__ */ i("div", { className: "multi-select__menu", role: "listbox", "aria-multiselectable": "true", "aria-label": r, onKeyDown: v, children: [
3605
+ s ? /* @__PURE__ */ i("div", { className: "multi-select__menu", role: "listbox", "aria-multiselectable": "true", "aria-label": r, onKeyDown: x, children: [
3531
3606
  /* @__PURE__ */ i("div", { className: "multi-select__bulk", children: [
3532
3607
  /* @__PURE__ */ e(
3533
3608
  "button",
@@ -3544,26 +3619,26 @@ function Oa({ options: t, defaultSelected: n = [], placeholder: r, onChange: a }
3544
3619
  t.length
3545
3620
  ] })
3546
3621
  ] }),
3547
- t.map((k, M) => {
3548
- _.current[M] = _.current[M] ?? [];
3549
- const I = y(k), S = x(k);
3622
+ t.map((k, E) => {
3623
+ b.current[E] = b.current[E] ?? [];
3624
+ const I = y(k), A = v(k);
3550
3625
  return /* @__PURE__ */ i("div", { className: "multi-select__row", role: "presentation", children: [
3551
3626
  /* @__PURE__ */ i(
3552
3627
  "button",
3553
3628
  {
3554
- ref: (R) => {
3555
- R && (_.current[M][0] = R);
3629
+ ref: (W) => {
3630
+ W && (b.current[E][0] = W);
3556
3631
  },
3557
3632
  type: "button",
3558
3633
  role: "option",
3559
3634
  "aria-selected": I,
3560
3635
  "aria-label": `选择 ${k}`,
3561
- tabIndex: d.row === M && d.col === 0 ? 0 : -1,
3636
+ tabIndex: d.row === E && d.col === 0 ? 0 : -1,
3562
3637
  className: "multi-select__option",
3563
- onFocus: () => b({ row: M, col: 0 }),
3638
+ onFocus: () => f({ row: E, col: 0 }),
3564
3639
  onClick: () => w(k),
3565
3640
  children: [
3566
- /* @__PURE__ */ e("span", { className: `multi-select__check${I ? " multi-select__check--on" : ""}`, "aria-hidden": "true", children: I ? /* @__PURE__ */ e(Z, { size: 12, strokeWidth: 3 }) : null }),
3641
+ /* @__PURE__ */ e("span", { className: `multi-select__check${I ? " multi-select__check--on" : ""}`, "aria-hidden": "true", children: I ? /* @__PURE__ */ e(Q, { size: 12, strokeWidth: 3 }) : null }),
3567
3642
  /* @__PURE__ */ e("span", { className: "multi-select__option-label", children: k })
3568
3643
  ]
3569
3644
  }
@@ -3571,16 +3646,16 @@ function Oa({ options: t, defaultSelected: n = [], placeholder: r, onChange: a }
3571
3646
  /* @__PURE__ */ e(
3572
3647
  "button",
3573
3648
  {
3574
- ref: (R) => {
3575
- R && (_.current[M][1] = R);
3649
+ ref: (W) => {
3650
+ W && (b.current[E][1] = W);
3576
3651
  },
3577
3652
  type: "button",
3578
- "aria-label": `${S.label}:${k}`,
3579
- tabIndex: d.row === M && d.col === 1 ? 0 : -1,
3653
+ "aria-label": `${A.label}:${k}`,
3654
+ tabIndex: d.row === E && d.col === 1 ? 0 : -1,
3580
3655
  className: "multi-select__only",
3581
- onFocus: () => b({ row: M, col: 1 }),
3582
- onClick: S.run,
3583
- children: S.label
3656
+ onFocus: () => f({ row: E, col: 1 }),
3657
+ onClick: A.run,
3658
+ children: A.label
3584
3659
  }
3585
3660
  )
3586
3661
  ] }, k);
@@ -3588,33 +3663,33 @@ function Oa({ options: t, defaultSelected: n = [], placeholder: r, onChange: a }
3588
3663
  ] }) : null
3589
3664
  ] });
3590
3665
  }
3591
- function Ha({ open: t, onClose: n, title: r, children: a, footer: s, initialFocusRef: l, dismissable: o = !0, sticky: u = !1 }) {
3592
- const d = T(null), b = L();
3666
+ function Va({ open: t, onClose: n, title: r, children: a, footer: s, initialFocusRef: l, dismissable: o = !0, sticky: u = !1 }) {
3667
+ const d = T(null), f = R();
3593
3668
  if (F(() => {
3594
3669
  if (!t) return;
3595
- const f = document.body.style.overflow;
3670
+ const _ = document.body.style.overflow;
3596
3671
  document.body.style.overflow = "hidden";
3597
- const _ = window.setTimeout(() => {
3672
+ const b = window.setTimeout(() => {
3598
3673
  (l?.current ?? d.current?.querySelector("button:not([disabled]), input:not([disabled]), [tabindex]"))?.focus();
3599
3674
  }, 0);
3600
3675
  return () => {
3601
- window.clearTimeout(_), document.body.style.overflow = f;
3676
+ window.clearTimeout(b), document.body.style.overflow = _;
3602
3677
  };
3603
3678
  }, [t, l]), F(() => {
3604
3679
  if (!t || !o) return;
3605
- function f(_) {
3606
- _.key === "Escape" && (d.current?.contains(document.activeElement) || (_.preventDefault(), n()));
3680
+ function _(b) {
3681
+ b.key === "Escape" && (d.current?.contains(document.activeElement) || (b.preventDefault(), n()));
3607
3682
  }
3608
- return document.addEventListener("keydown", f), () => document.removeEventListener("keydown", f);
3683
+ return document.addEventListener("keydown", _), () => document.removeEventListener("keydown", _);
3609
3684
  }, [t, o, n]), !t) return null;
3610
- function c(f) {
3611
- if (f.key === "Escape" && o)
3612
- f.preventDefault(), n();
3613
- else if (f.key === "Tab") {
3614
- const _ = 'button:not([disabled]), input:not([disabled]), [tabindex="0"]', m = Array.from(d.current?.querySelectorAll(_) ?? []);
3685
+ function c(_) {
3686
+ if (_.key === "Escape" && o)
3687
+ _.preventDefault(), n();
3688
+ else if (_.key === "Tab") {
3689
+ const b = 'button:not([disabled]), input:not([disabled]), [tabindex="0"]', m = Array.from(d.current?.querySelectorAll(b) ?? []);
3615
3690
  if (m.length === 0) return;
3616
- const y = m[0], w = m[m.length - 1], p = document.querySelector(".q1-toast-region")?.lastElementChild, N = Array.from(p?.querySelectorAll(_) ?? []);
3617
- f.shiftKey && document.activeElement === y ? (f.preventDefault(), (N.length > 0 ? N[N.length - 1] : w).focus()) : !f.shiftKey && document.activeElement === w && (f.preventDefault(), (N.length > 0 ? N[0] : y).focus());
3691
+ const y = m[0], w = m[m.length - 1], p = document.querySelector(".q1-toast-region")?.lastElementChild, N = Array.from(p?.querySelectorAll(b) ?? []);
3692
+ _.shiftKey && document.activeElement === y ? (_.preventDefault(), (N.length > 0 ? N[N.length - 1] : w).focus()) : !_.shiftKey && document.activeElement === w && (_.preventDefault(), (N.length > 0 ? N[0] : y).focus());
3618
3693
  }
3619
3694
  }
3620
3695
  return /* @__PURE__ */ i("div", { className: "modal", onKeyDown: c, children: [
@@ -3634,10 +3709,10 @@ function Ha({ open: t, onClose: n, title: r, children: a, footer: s, initialFocu
3634
3709
  className: u ? "modal__dialog modal__dialog--sticky" : "modal__dialog",
3635
3710
  role: "dialog",
3636
3711
  "aria-modal": "true",
3637
- "aria-labelledby": b,
3712
+ "aria-labelledby": f,
3638
3713
  ref: d,
3639
3714
  children: [
3640
- /* @__PURE__ */ e("header", { className: "modal__header", children: /* @__PURE__ */ e("h2", { className: "modal__title", id: b, children: r }) }),
3715
+ /* @__PURE__ */ e("header", { className: "modal__header", children: /* @__PURE__ */ e("h2", { className: "modal__title", id: f, children: r }) }),
3641
3716
  /* @__PURE__ */ e("div", { className: "modal__body", children: a }),
3642
3717
  /* @__PURE__ */ e("footer", { className: "modal__footer", children: s })
3643
3718
  ]
@@ -3645,15 +3720,15 @@ function Ha({ open: t, onClose: n, title: r, children: a, footer: s, initialFocu
3645
3720
  )
3646
3721
  ] });
3647
3722
  }
3648
- function ja({ children: t }) {
3723
+ function Ga({ children: t }) {
3649
3724
  return /* @__PURE__ */ e("div", { className: "modal__inset", children: t });
3650
3725
  }
3651
- const fn = ["日", "一", "二", "三", "四", "五", "六"];
3652
- function W(t) {
3726
+ const bn = ["日", "一", "二", "三", "四", "五", "六"];
3727
+ function L(t) {
3653
3728
  const n = String(t.getMonth() + 1).padStart(2, "0"), r = String(t.getDate()).padStart(2, "0");
3654
3729
  return `${t.getFullYear()}-${n}-${r}`;
3655
3730
  }
3656
- function X(t, n) {
3731
+ function Z(t, n) {
3657
3732
  return new Date(t.getFullYear(), t.getMonth(), t.getDate() + n);
3658
3733
  }
3659
3734
  function we(t, n) {
@@ -3662,26 +3737,26 @@ function we(t, n) {
3662
3737
  function Ce(t) {
3663
3738
  return new Date(t.getFullYear(), t.getMonth(), 1);
3664
3739
  }
3665
- function ee(t, n) {
3666
- return !!t && !!n && W(t) === W(n);
3740
+ function te(t, n) {
3741
+ return !!t && !!n && L(t) === L(n);
3667
3742
  }
3668
- function _n(t, n) {
3743
+ function yn(t, n) {
3669
3744
  return Math.round((n.getTime() - t.getTime()) / 864e5) + 1;
3670
3745
  }
3671
- function bn(t) {
3672
- const n = Ce(t), r = X(n, -n.getDay());
3746
+ function gn(t) {
3747
+ const n = Ce(t), r = Z(n, -n.getDay());
3673
3748
  return Array.from({ length: 42 }, (a, s) => {
3674
- const l = X(r, s);
3749
+ const l = Z(r, s);
3675
3750
  return { date: l, inMonth: l.getMonth() === n.getMonth() };
3676
3751
  });
3677
3752
  }
3678
3753
  function ve(t, n, r) {
3679
- return !!(n && W(t) < W(n) || r && W(t) > W(r));
3754
+ return !!(n && L(t) < L(n) || r && L(t) > L(r));
3680
3755
  }
3681
- function He(t, n, r) {
3682
- return n && W(t) < W(n) ? n : r && W(t) > W(r) ? r : t;
3756
+ function je(t, n, r) {
3757
+ return n && L(t) < L(n) ? n : r && L(t) > L(r) ? r : t;
3683
3758
  }
3684
- function yn({
3759
+ function Nn({
3685
3760
  value: t,
3686
3761
  onChange: n,
3687
3762
  size: r = "large",
@@ -3689,46 +3764,46 @@ function yn({
3689
3764
  maxValue: s,
3690
3765
  today: l = /* @__PURE__ */ new Date()
3691
3766
  }) {
3692
- const [o, u] = E(
3693
- () => Ce(He(t.start ?? l, a, s))
3694
- ), [d, b] = E(null), [c, f] = E(() => He(t.start ?? l, a, s)), [_, m] = E(""), y = T(/* @__PURE__ */ new Map()), w = T(null), p = bn(o);
3767
+ const [o, u] = M(
3768
+ () => Ce(je(t.start ?? l, a, s))
3769
+ ), [d, f] = M(null), [c, _] = M(() => je(t.start ?? l, a, s)), [b, m] = M(""), y = T(/* @__PURE__ */ new Map()), w = T(null), p = gn(o);
3695
3770
  F(() => {
3696
3771
  if (!w.current) return;
3697
3772
  const g = y.current.get(w.current);
3698
3773
  w.current = null, g?.focus();
3699
3774
  });
3700
- const N = t.start && !t.end && d ? W(d) < W(t.start) ? { start: d, end: t.start } : { start: t.start, end: d } : t;
3701
- function x(g) {
3775
+ const N = t.start && !t.end && d ? L(d) < L(t.start) ? { start: d, end: t.start } : { start: t.start, end: d } : t;
3776
+ function v(g) {
3702
3777
  if (!t.start || t.end) {
3703
- n({ start: g, end: null }), m(`开始日期 ${W(g)},请选择结束日期`);
3778
+ n({ start: g, end: null }), m(`开始日期 ${L(g)},请选择结束日期`);
3704
3779
  return;
3705
3780
  }
3706
- const [k, M] = W(g) < W(t.start) ? [g, t.start] : [t.start, g];
3707
- n({ start: k, end: M }), m(`已选择 ${W(k)} 至 ${W(M)},共 ${_n(k, M)} 天`);
3781
+ const [k, E] = L(g) < L(t.start) ? [g, t.start] : [t.start, g];
3782
+ n({ start: k, end: E }), m(`已选择 ${L(k)} 至 ${L(E)},共 ${yn(k, E)} 天`);
3708
3783
  }
3709
- function $(g) {
3710
- ve(g, a, s) || ((g.getMonth() !== o.getMonth() || g.getFullYear() !== o.getFullYear()) && u(Ce(g)), f(g), w.current = W(g));
3784
+ function D(g) {
3785
+ ve(g, a, s) || ((g.getMonth() !== o.getMonth() || g.getFullYear() !== o.getFullYear()) && u(Ce(g)), _(g), w.current = L(g));
3711
3786
  }
3712
3787
  function C(g) {
3713
3788
  let k = null;
3714
3789
  switch (g.key) {
3715
3790
  case "ArrowLeft":
3716
- k = X(c, g.shiftKey ? -7 : -1);
3791
+ k = Z(c, g.shiftKey ? -7 : -1);
3717
3792
  break;
3718
3793
  case "ArrowRight":
3719
- k = X(c, g.shiftKey ? 7 : 1);
3794
+ k = Z(c, g.shiftKey ? 7 : 1);
3720
3795
  break;
3721
3796
  case "ArrowUp":
3722
- k = X(c, -7);
3797
+ k = Z(c, -7);
3723
3798
  break;
3724
3799
  case "ArrowDown":
3725
- k = X(c, 7);
3800
+ k = Z(c, 7);
3726
3801
  break;
3727
3802
  case "Home":
3728
- k = X(c, -c.getDay());
3803
+ k = Z(c, -c.getDay());
3729
3804
  break;
3730
3805
  case "End":
3731
- k = X(c, 6 - c.getDay());
3806
+ k = Z(c, 6 - c.getDay());
3732
3807
  break;
3733
3808
  case "PageUp":
3734
3809
  k = we(c, -1);
@@ -3738,21 +3813,21 @@ function yn({
3738
3813
  break;
3739
3814
  case "Enter":
3740
3815
  case " ":
3741
- g.preventDefault(), ve(c, a, s) || x(c);
3816
+ g.preventDefault(), ve(c, a, s) || v(c);
3742
3817
  return;
3743
3818
  default:
3744
3819
  return;
3745
3820
  }
3746
- g.preventDefault(), k && $(k);
3821
+ g.preventDefault(), k && D(k);
3747
3822
  }
3748
3823
  function h(g) {
3749
3824
  const k = we(o, g);
3750
- u(k), f(k);
3825
+ u(k), _(k);
3751
3826
  }
3752
- const v = `${o.getFullYear()} 年 ${o.getMonth() + 1} 月`;
3827
+ const x = `${o.getFullYear()} 年 ${o.getMonth() + 1} 月`;
3753
3828
  return /* @__PURE__ */ i("div", { className: `calendar calendar--${r}`, children: [
3754
3829
  /* @__PURE__ */ i("div", { className: "calendar__header", children: [
3755
- /* @__PURE__ */ e("span", { className: "calendar__month", children: v }),
3830
+ /* @__PURE__ */ e("span", { className: "calendar__month", children: x }),
3756
3831
  /* @__PURE__ */ i("span", { className: "calendar__nav", children: [
3757
3832
  /* @__PURE__ */ e(
3758
3833
  "button",
@@ -3771,50 +3846,50 @@ function yn({
3771
3846
  className: "calendar__nav-btn",
3772
3847
  "aria-label": "下一月",
3773
3848
  onClick: () => h(1),
3774
- children: /* @__PURE__ */ e(Q, { size: 16, strokeWidth: 2 })
3849
+ children: /* @__PURE__ */ e(J, { size: 16, strokeWidth: 2 })
3775
3850
  }
3776
3851
  )
3777
3852
  ] })
3778
3853
  ] }),
3779
- /* @__PURE__ */ e("div", { className: "calendar__weekdays", "aria-hidden": "true", children: fn.map((g, k) => /* @__PURE__ */ e("span", { className: "calendar__weekday", children: g }, `${g}-${k}`)) }),
3780
- /* @__PURE__ */ e("div", { className: "calendar__grid", role: "grid", "aria-label": v, onKeyDown: C, children: p.map(({ date: g, inMonth: k }) => {
3781
- const M = !k || ve(g, a, s), I = ee(g, N.start), S = ee(g, N.end), R = !!N.start && !!N.end && !ee(N.start, N.end), B = R && W(g) > W(N.start) && W(g) < W(N.end), V = A(
3854
+ /* @__PURE__ */ e("div", { className: "calendar__weekdays", "aria-hidden": "true", children: bn.map((g, k) => /* @__PURE__ */ e("span", { className: "calendar__weekday", children: g }, `${g}-${k}`)) }),
3855
+ /* @__PURE__ */ e("div", { className: "calendar__grid", role: "grid", "aria-label": x, onKeyDown: C, children: p.map(({ date: g, inMonth: k }) => {
3856
+ const E = !k || ve(g, a, s), I = te(g, N.start), A = te(g, N.end), W = !!N.start && !!N.end && !te(N.start, N.end), P = W && L(g) > L(N.start) && L(g) < L(N.end), V = S(
3782
3857
  "calendar__cell",
3783
- B ? "calendar__cell--in-range" : "",
3784
- R && I ? "calendar__cell--range-start" : "",
3785
- R && S ? "calendar__cell--range-end" : ""
3786
- ), G = A(
3858
+ P ? "calendar__cell--in-range" : "",
3859
+ W && I ? "calendar__cell--range-start" : "",
3860
+ W && A ? "calendar__cell--range-end" : ""
3861
+ ), G = S(
3787
3862
  "calendar__day",
3788
3863
  k ? "" : "calendar__day--outside",
3789
3864
  I && N.start ? "calendar__day--start" : "",
3790
- S && R ? "calendar__day--end" : "",
3791
- k && !M && ee(g, l) ? "calendar__day--today" : ""
3865
+ A && W ? "calendar__day--end" : "",
3866
+ k && !E && te(g, l) ? "calendar__day--today" : ""
3792
3867
  );
3793
3868
  return /* @__PURE__ */ e("div", { className: V, role: "gridcell", children: /* @__PURE__ */ e(
3794
3869
  "button",
3795
3870
  {
3796
3871
  type: "button",
3797
- ref: (O) => {
3798
- O ? y.current.set(W(g), O) : y.current.delete(W(g));
3872
+ ref: (H) => {
3873
+ H ? y.current.set(L(g), H) : y.current.delete(L(g));
3799
3874
  },
3800
3875
  className: G,
3801
- tabIndex: k && !M && ee(g, c) ? 0 : -1,
3802
- disabled: M,
3803
- "aria-disabled": M || void 0,
3804
- "aria-selected": (I || S) && N.start ? !0 : void 0,
3805
- "aria-current": k && ee(g, l) ? "date" : void 0,
3806
- onClick: () => !M && x(g),
3807
- onMouseEnter: () => b(g),
3808
- onMouseLeave: () => b(null),
3809
- onFocus: () => f(g),
3876
+ tabIndex: k && !E && te(g, c) ? 0 : -1,
3877
+ disabled: E,
3878
+ "aria-disabled": E || void 0,
3879
+ "aria-selected": (I || A) && N.start ? !0 : void 0,
3880
+ "aria-current": k && te(g, l) ? "date" : void 0,
3881
+ onClick: () => !E && v(g),
3882
+ onMouseEnter: () => f(g),
3883
+ onMouseLeave: () => f(null),
3884
+ onFocus: () => _(g),
3810
3885
  children: g.getDate()
3811
3886
  }
3812
- ) }, W(g));
3887
+ ) }, L(g));
3813
3888
  }) }),
3814
- /* @__PURE__ */ e("span", { className: "q1-sr-only", "aria-live": "polite", children: _ })
3889
+ /* @__PURE__ */ e("span", { className: "q1-sr-only", "aria-live": "polite", children: b })
3815
3890
  ] });
3816
3891
  }
3817
- function gn({
3892
+ function kn({
3818
3893
  value: t,
3819
3894
  withTime: n,
3820
3895
  onApply: r,
@@ -3824,14 +3899,14 @@ function gn({
3824
3899
  /* @__PURE__ */ i("div", { className: "cal-inputs__field", children: [
3825
3900
  /* @__PURE__ */ e("span", { className: "cal-inputs__label", children: "开始" }),
3826
3901
  /* @__PURE__ */ i("div", { className: "cal-inputs__row", children: [
3827
- /* @__PURE__ */ e("span", { className: "cal-inputs__value", children: t.start ? W(t.start) : "请选择" }),
3902
+ /* @__PURE__ */ e("span", { className: "cal-inputs__value", children: t.start ? L(t.start) : "请选择" }),
3828
3903
  n ? /* @__PURE__ */ e("span", { className: "cal-inputs__time", children: "00:00" }) : null
3829
3904
  ] })
3830
3905
  ] }),
3831
3906
  /* @__PURE__ */ i("div", { className: "cal-inputs__field", children: [
3832
3907
  /* @__PURE__ */ e("span", { className: "cal-inputs__label", children: "结束" }),
3833
3908
  /* @__PURE__ */ i("div", { className: "cal-inputs__row", children: [
3834
- /* @__PURE__ */ e("span", { className: "cal-inputs__value", children: t.end ? W(t.end) : "请选择" }),
3909
+ /* @__PURE__ */ e("span", { className: "cal-inputs__value", children: t.end ? L(t.end) : "请选择" }),
3835
3910
  n ? /* @__PURE__ */ e("span", { className: "cal-inputs__time", children: "23:59" }) : null
3836
3911
  ] })
3837
3912
  ] }),
@@ -3845,7 +3920,7 @@ function gn({
3845
3920
  ] })
3846
3921
  ] });
3847
3922
  }
3848
- function Ua({
3923
+ function Xa({
3849
3924
  layout: t = "vertical",
3850
3925
  trigger: n = "default",
3851
3926
  size: r = "large",
@@ -3856,50 +3931,50 @@ function Ua({
3856
3931
  value: u,
3857
3932
  onChange: d
3858
3933
  }) {
3859
- const [b, c] = E(!1), f = T(null), _ = T(null);
3934
+ const [f, c] = M(!1), _ = T(null), b = T(null);
3860
3935
  F(() => {
3861
- if (!b) return;
3862
- const N = f.current?.querySelector(".cal-popover"), x = () => N ? [
3936
+ if (!f) return;
3937
+ const N = _.current?.querySelector(".cal-popover"), v = () => N ? [
3863
3938
  ...N.querySelectorAll(
3864
3939
  'button:not([disabled]), input:not([disabled]), select:not([disabled]), [tabindex]:not([tabindex="-1"]):not([disabled])'
3865
3940
  )
3866
- ].filter((v) => v.offsetParent !== null) : [];
3867
- (N?.querySelector('.calendar__day[tabindex="0"]') ?? x()[0])?.focus();
3868
- function C(v) {
3869
- f.current && !f.current.contains(v.target) && c(!1);
3941
+ ].filter((x) => x.offsetParent !== null) : [];
3942
+ (N?.querySelector('.calendar__day[tabindex="0"]') ?? v()[0])?.focus();
3943
+ function C(x) {
3944
+ _.current && !_.current.contains(x.target) && c(!1);
3870
3945
  }
3871
- function h(v) {
3872
- if (v.key === "Escape") {
3873
- c(!1), _.current?.focus();
3946
+ function h(x) {
3947
+ if (x.key === "Escape") {
3948
+ c(!1), b.current?.focus();
3874
3949
  return;
3875
3950
  }
3876
- if (v.key === "Tab" && N) {
3877
- const g = x();
3951
+ if (x.key === "Tab" && N) {
3952
+ const g = v();
3878
3953
  if (g.length === 0) return;
3879
- const k = g[0], M = g[g.length - 1], I = document.activeElement;
3880
- N.contains(I) ? v.shiftKey && I === k ? (v.preventDefault(), M.focus()) : !v.shiftKey && I === M && (v.preventDefault(), k.focus()) : (v.preventDefault(), (v.shiftKey ? M : k).focus());
3954
+ const k = g[0], E = g[g.length - 1], I = document.activeElement;
3955
+ N.contains(I) ? x.shiftKey && I === k ? (x.preventDefault(), E.focus()) : !x.shiftKey && I === E && (x.preventDefault(), k.focus()) : (x.preventDefault(), (x.shiftKey ? E : k).focus());
3881
3956
  }
3882
3957
  }
3883
3958
  return document.addEventListener("mousedown", C), document.addEventListener("keydown", h), () => {
3884
3959
  document.removeEventListener("mousedown", C), document.removeEventListener("keydown", h);
3885
3960
  };
3886
- }, [b]);
3887
- const m = !!u.start && !!u.end, y = m ? `${W(u.start)} ~ ${W(u.end)}` : "选择日期区间", w = /* @__PURE__ */ e(yn, { value: u, onChange: d, size: r, minValue: a, maxValue: s, today: o }), p = /* @__PURE__ */ e(
3888
- gn,
3961
+ }, [f]);
3962
+ const m = !!u.start && !!u.end, y = m ? `${L(u.start)} ~ ${L(u.end)}` : "选择日期区间", w = /* @__PURE__ */ e(Nn, { value: u, onChange: d, size: r, minValue: a, maxValue: s, today: o }), p = /* @__PURE__ */ e(
3963
+ kn,
3889
3964
  {
3890
3965
  value: u,
3891
3966
  withTime: t === "vertical",
3892
3967
  onApply: () => {
3893
- c(!1), _.current?.focus();
3968
+ c(!1), b.current?.focus();
3894
3969
  },
3895
3970
  pinnedTimezone: l
3896
3971
  }
3897
3972
  );
3898
- return /* @__PURE__ */ i("div", { className: "cal-field", ref: f, children: [
3973
+ return /* @__PURE__ */ i("div", { className: "cal-field", ref: _, children: [
3899
3974
  /* @__PURE__ */ i(
3900
3975
  "span",
3901
3976
  {
3902
- className: A(
3977
+ className: S(
3903
3978
  "cal-field__control",
3904
3979
  `cal-field__control--${n}`,
3905
3980
  m ? "cal-field__control--filled" : ""
@@ -3909,13 +3984,13 @@ function Ua({
3909
3984
  "button",
3910
3985
  {
3911
3986
  type: "button",
3912
- ref: _,
3987
+ ref: b,
3913
3988
  className: "cal-field__trigger",
3914
3989
  "aria-haspopup": "dialog",
3915
- "aria-expanded": b,
3990
+ "aria-expanded": f,
3916
3991
  onClick: () => c((N) => !N),
3917
3992
  children: [
3918
- /* @__PURE__ */ e(vt, { size: 15, strokeWidth: 2, "aria-hidden": "true" }),
3993
+ /* @__PURE__ */ e($t, { size: 15, strokeWidth: 2, "aria-hidden": "true" }),
3919
3994
  /* @__PURE__ */ e("span", { className: "cal-field__label", children: y })
3920
3995
  ]
3921
3996
  }
@@ -3936,13 +4011,13 @@ function Ua({
3936
4011
  className: "cal-field__clear",
3937
4012
  "aria-label": "清除已选区间",
3938
4013
  onClick: () => d({ start: null, end: null }),
3939
- children: /* @__PURE__ */ e(J, { size: 14, strokeWidth: 2 })
4014
+ children: /* @__PURE__ */ e(ee, { size: 14, strokeWidth: 2 })
3940
4015
  }
3941
4016
  ) : null
3942
4017
  ]
3943
4018
  }
3944
4019
  ),
3945
- b ? /* @__PURE__ */ e(
4020
+ f ? /* @__PURE__ */ e(
3946
4021
  "div",
3947
4022
  {
3948
4023
  className: `cal-popover cal-popover--${t}`,
@@ -3960,13 +4035,13 @@ function Ua({
3960
4035
  ) : null
3961
4036
  ] });
3962
4037
  }
3963
- const Nn = ["45m", "12 小时", "10d", "2 周", "上个月", "昨天", "今天"], kn = ["6/1", "6/1 - 6/2", "6月1日", "6月1日 - 6月2日"];
3964
- function Ya({
4038
+ const wn = ["45m", "12 小时", "10d", "2 周", "上个月", "昨天", "今天"], vn = ["6/1", "6/1 - 6/2", "6月1日", "6月1日 - 6月2日"];
4039
+ function Za({
3965
4040
  presets: t,
3966
4041
  activeLabel: n,
3967
4042
  onPick: r
3968
4043
  }) {
3969
- const [a, s] = E(!1), l = T(null);
4044
+ const [a, s] = M(!1), l = T(null);
3970
4045
  return F(() => {
3971
4046
  if (!a) return;
3972
4047
  function o(u) {
@@ -3983,7 +4058,7 @@ function Ya({
3983
4058
  "aria-expanded": a,
3984
4059
  onClick: () => s((o) => !o),
3985
4060
  children: [
3986
- /* @__PURE__ */ e(xt, { size: 15, strokeWidth: 2, "aria-hidden": "true" }),
4061
+ /* @__PURE__ */ e(Et, { size: 15, strokeWidth: 2, "aria-hidden": "true" }),
3987
4062
  /* @__PURE__ */ e("span", { className: "cal-period__label", children: n ?? "选择周期" }),
3988
4063
  /* @__PURE__ */ e(Y, { size: 15, strokeWidth: 2, "aria-hidden": "true" })
3989
4064
  ]
@@ -4003,105 +4078,107 @@ function Ya({
4003
4078
  ) }, o.label)) }),
4004
4079
  /* @__PURE__ */ i("div", { className: "cal-period__hints", "aria-hidden": "true", children: [
4005
4080
  /* @__PURE__ */ e("p", { className: "cal-period__hint-title", children: "输入相对时间" }),
4006
- /* @__PURE__ */ e("div", { className: "cal-period__chips", children: Nn.map((o) => /* @__PURE__ */ e("span", { className: "cal-period__chip", children: o }, o)) }),
4081
+ /* @__PURE__ */ e("div", { className: "cal-period__chips", children: wn.map((o) => /* @__PURE__ */ e("span", { className: "cal-period__chip", children: o }, o)) }),
4007
4082
  /* @__PURE__ */ e("p", { className: "cal-period__hint-title", children: "输入固定时间" }),
4008
- /* @__PURE__ */ e("div", { className: "cal-period__chips", children: kn.map((o) => /* @__PURE__ */ e("span", { className: "cal-period__chip", children: o }, o)) })
4083
+ /* @__PURE__ */ e("div", { className: "cal-period__chips", children: vn.map((o) => /* @__PURE__ */ e("span", { className: "cal-period__chip", children: o }, o)) })
4009
4084
  ] })
4010
4085
  ] }) : null
4011
4086
  ] });
4012
4087
  }
4013
4088
  export {
4014
- Qt as Avatar,
4015
- fa as AvatarGroup,
4016
- sa as Badge,
4017
- ia as Banner,
4018
- ma as Book,
4019
- La as Breadcrumb,
4020
- ha as Browser,
4021
- Gt as BrowserAddress,
4022
- Vt as BrowserControls,
4023
- Yt as BrowserDots,
4024
- pa as BrowserPlaceholder,
4025
- Xt as BrowserTabs,
4026
- Ot as Button,
4027
- yn as CalendarGrid,
4028
- ca as Card,
4029
- Sn as Checkbox,
4030
- zn as Choicebox,
4031
- Bt as ClearButton,
4032
- Mn as ClearableInput,
4033
- Fn as Code,
4034
- Bn as CodeBlock,
4035
- Kn as CodeInline,
4036
- lt as CodeTokens,
4037
- Hn as Collapse,
4038
- On as CollapseGroup,
4039
- Fa as CollapsibleBreadcrumb,
4040
- Wn as Combobox,
4041
- jn as CommandMenu,
4042
- ua as ContextCard,
4043
- aa as ContextMenu,
4044
- rt as ControlOption,
4045
- Dn as CopyButton,
4046
- da as Description,
4047
- Un as DestructiveActionModal,
4048
- ra as DotsMenu,
4049
- Yn as Drawer,
4050
- Vn as EmptyState,
4051
- Gn as Entity,
4052
- Zn as ErrorCard,
4053
- Xn as ErrorMessage,
4054
- Qn as Feedback,
4055
- Jn as Fieldset,
4056
- ea as FileTree,
4057
- Me as FormField,
4058
- va as Gauge,
4059
- $n as Input,
4060
- Sa as Kbd,
4061
- na as Label,
4062
- Ma as LoadMoreButton,
4063
- ba as LoadingDots,
4064
- Pa as Menu,
4065
- ya as MiddleTruncate,
4066
- Ha as Modal,
4067
- ja as ModalInset,
4068
- Oa as MultiSelect,
4069
- Ca as Note,
4070
- Da as Pagination,
4071
- Ya as PeriodCombobox,
4072
- ga as Phone,
4073
- oa as Pill,
4074
- xa as Progress,
4075
- Na as ProjectBanner,
4076
- An as Radio,
4077
- Ua as RangeField,
4078
- gn as RangeInputs,
4079
- Ra as RangeSlider,
4080
- Ea as RelativeTimeCard,
4081
- qa as Scroller,
4082
- za as ScrollerWithButtons,
4083
- En as SearchInput,
4084
- Tn as Select,
4085
- ta as Separator,
4086
- Ka as Sheet,
4087
- $a as ShowMore,
4088
- _a as Skeleton,
4089
- Wa as Slider,
4090
- wa as Snippet,
4091
- Ia as Spinner,
4092
- Ba as SplitButton,
4093
- la as StatusDot,
4094
- Rn as Switch,
4095
- Pn as Tabs,
4096
- ka as TextWithCopyButton,
4097
- In as Textarea,
4098
- Aa as ThemeSwitcher,
4099
- Cn as ToastProvider,
4100
- Ln as Toggle,
4101
- Ut as Tooltip,
4102
- Ta as Video,
4103
- X as addDays,
4104
- pe as useCopy,
4105
- qn as useRadio,
4106
- Ft as useToast
4089
+ en as Avatar,
4090
+ ga as AvatarGroup,
4091
+ da as Badge,
4092
+ ma as Banner,
4093
+ _a as Book,
4094
+ Pa as Breadcrumb,
4095
+ ba as Browser,
4096
+ Zt as BrowserAddress,
4097
+ Xt as BrowserControls,
4098
+ Gt as BrowserDots,
4099
+ ya as BrowserPlaceholder,
4100
+ Qt as BrowserTabs,
4101
+ lt as Button,
4102
+ Mn as ButtonLink,
4103
+ Nn as CalendarGrid,
4104
+ ha as Card,
4105
+ Wn as Checkbox,
4106
+ Fn as Choicebox,
4107
+ jt as ClearButton,
4108
+ An as ClearableInput,
4109
+ On as Code,
4110
+ jn as CodeBlock,
4111
+ Hn as CodeInline,
4112
+ ct as CodeTokens,
4113
+ Vn as Collapse,
4114
+ Yn as CollapseGroup,
4115
+ Oa as CollapsibleBreadcrumb,
4116
+ Kn as Combobox,
4117
+ Gn as CommandMenu,
4118
+ fa as ContextCard,
4119
+ oa as ContextMenu,
4120
+ it as ControlOption,
4121
+ En as CopyButton,
4122
+ pa as Description,
4123
+ Xn as DestructiveActionModal,
4124
+ ia as DotsMenu,
4125
+ Zn as Drawer,
4126
+ Qn as EmptyState,
4127
+ Jn as Entity,
4128
+ ta as ErrorCard,
4129
+ ea as ErrorMessage,
4130
+ na as Feedback,
4131
+ aa as Fieldset,
4132
+ ra as FileTree,
4133
+ Ee as FormField,
4134
+ $a as Gauge,
4135
+ In as IconButton,
4136
+ Tn as Input,
4137
+ Wa as Kbd,
4138
+ sa as Label,
4139
+ Aa as LoadMoreButton,
4140
+ ka as LoadingDots,
4141
+ Ua as Menu,
4142
+ wa as MiddleTruncate,
4143
+ Va as Modal,
4144
+ Ga as ModalInset,
4145
+ Ya as MultiSelect,
4146
+ Ma as Note,
4147
+ Ia as Pagination,
4148
+ Za as PeriodCombobox,
4149
+ va as Phone,
4150
+ ua as Pill,
4151
+ Ea as Progress,
4152
+ xa as ProjectBanner,
4153
+ Ln as Radio,
4154
+ Xa as RangeField,
4155
+ kn as RangeInputs,
4156
+ Ba as RangeSlider,
4157
+ Sa as RelativeTimeCard,
4158
+ Ra as Scroller,
4159
+ Fa as ScrollerWithButtons,
4160
+ Sn as SearchInput,
4161
+ zn as Select,
4162
+ la as Separator,
4163
+ Ha as Sheet,
4164
+ Ta as ShowMore,
4165
+ Na as Skeleton,
4166
+ Ka as Slider,
4167
+ Da as Snippet,
4168
+ qa as Spinner,
4169
+ ja as SplitButton,
4170
+ ca as StatusDot,
4171
+ Bn as Switch,
4172
+ Un as Tabs,
4173
+ Ca as TextWithCopyButton,
4174
+ qn as Textarea,
4175
+ La as ThemeSwitcher,
4176
+ $n as ToastProvider,
4177
+ Pn as Toggle,
4178
+ Vt as Tooltip,
4179
+ za as Video,
4180
+ Z as addDays,
4181
+ fe as useCopy,
4182
+ Rn as useRadio,
4183
+ Ot as useToast
4107
4184
  };