@kingsimba/nc-ui 0.1.33 → 0.1.35

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,14 +1,14 @@
1
- var dt = Object.defineProperty;
2
- var ut = (e, t, n) => t in e ? dt(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
3
- var Q = (e, t, n) => ut(e, typeof t != "symbol" ? t + "" : t, n);
4
- import { jsx as s, jsxs as N, Fragment as pt } from "react/jsx-runtime";
5
- import { d as $e, E as ft, R as ht, T as mt, g as gt, V as bt, b as vt, a as wt, c as yt } from "./GeneratedIcons-HFZmBTBT.js";
6
- import Me, { useState as E, useRef as H, useMemo as we, useEffect as z, createContext as ce, useContext as ne, Children as xt, isValidElement as kt, forwardRef as Nt, useImperativeHandle as At, useCallback as V, Suspense as St } from "react";
7
- import { createPortal as pe } from "react-dom";
8
- import { useTranslation as Z } from "react-i18next";
9
- import Ct from "i18next";
10
- import { c as $t } from "./clsx-OuTLNxxd.js";
11
- function _e({
1
+ var pt = Object.defineProperty;
2
+ var ft = (e, t, n) => t in e ? pt(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
3
+ var oe = (e, t, n) => ft(e, typeof t != "symbol" ? t + "" : t, n);
4
+ import { jsx as s, jsxs as N, Fragment as Te } from "react/jsx-runtime";
5
+ import { d as Ee, E as ht, R as mt, T as gt, g as bt, V as vt, b as wt, a as yt, c as xt } from "./GeneratedIcons-HFZmBTBT.js";
6
+ import Le, { useState as T, useRef as O, useEffect as D, useMemo as Ce, createContext as be, useContext as ce, Children as kt, isValidElement as Nt, forwardRef as At, useImperativeHandle as St, useCallback as Y, Suspense as Ct } from "react";
7
+ import { createPortal as ke } from "react-dom";
8
+ import { useTranslation as ne } from "react-i18next";
9
+ import $t from "i18next";
10
+ import { c as Mt } from "./clsx-OuTLNxxd.js";
11
+ function Je({
12
12
  size: e = "default",
13
13
  color: t,
14
14
  overlay: n = !1,
@@ -37,8 +37,8 @@ function _e({
37
37
  );
38
38
  return n ? /* @__PURE__ */ s("div", { className: "nc-activity-indicator-overlay", children: o }) : o;
39
39
  }
40
- function X({ variant: e = "default", block: t, size: n = "default", appearance: r = "default", className: o, disabled: i, textSelectable: a, loading: c, onClick: l, children: u, ...f }) {
41
- const v = [
40
+ function ee({ variant: e = "default", block: t, size: n = "default", appearance: r = "default", className: o, disabled: i, textSelectable: a, loading: c, onClick: l, children: u, ...f }) {
41
+ const b = [
42
42
  "nc-button",
43
43
  e !== "default" ? `nc-${e}` : "",
44
44
  t ? "nc-block" : "",
@@ -53,13 +53,13 @@ function X({ variant: e = "default", block: t, size: n = "default", appearance:
53
53
  return /* @__PURE__ */ N(
54
54
  "button",
55
55
  {
56
- className: v,
56
+ className: b,
57
57
  disabled: i || c,
58
58
  onClick: (m) => {
59
59
  if (!c) {
60
60
  if (a) {
61
- const y = window.getSelection();
62
- if (y && y.toString().length > 0)
61
+ const A = window.getSelection();
62
+ if (A && A.toString().length > 0)
63
63
  return;
64
64
  }
65
65
  l == null || l(m);
@@ -68,7 +68,7 @@ function X({ variant: e = "default", block: t, size: n = "default", appearance:
68
68
  ...f,
69
69
  children: [
70
70
  c && /* @__PURE__ */ s(
71
- _e,
71
+ Je,
72
72
  {
73
73
  size: "small",
74
74
  className: "nc-button-spinner",
@@ -80,7 +80,7 @@ function X({ variant: e = "default", block: t, size: n = "default", appearance:
80
80
  }
81
81
  );
82
82
  }
83
- const Mt = {
83
+ const It = {
84
84
  info: "primary",
85
85
  success: "success",
86
86
  warning: "warning",
@@ -98,7 +98,7 @@ function Gn({
98
98
  className: c = "",
99
99
  style: l
100
100
  }) {
101
- const u = i ?? /* @__PURE__ */ N(pt, { children: [
101
+ const u = i ?? /* @__PURE__ */ N(Te, { children: [
102
102
  e !== void 0 && /* @__PURE__ */ s("span", { className: "nc-alert-code", children: e }),
103
103
  t
104
104
  ] });
@@ -112,15 +112,15 @@ function Gn({
112
112
  className: "nc-alert-close",
113
113
  "aria-label": "Close alert",
114
114
  onClick: a,
115
- children: /* @__PURE__ */ s($e, { size: 16 })
115
+ children: /* @__PURE__ */ s(Ee, { size: 16 })
116
116
  }
117
117
  )
118
118
  ] }),
119
119
  r && /* @__PURE__ */ s("span", { className: "nc-alert-action", children: /* @__PURE__ */ s(
120
- X,
120
+ ee,
121
121
  {
122
122
  size: "small",
123
- variant: r.variant ?? Mt[n],
123
+ variant: r.variant ?? It[n],
124
124
  onClick: o,
125
125
  children: r.text
126
126
  }
@@ -136,47 +136,47 @@ function Yn({
136
136
  const o = Math.max(0, Math.min(1, Number(e) || 0)), i = o === 0 ? "-" : String(Math.round(o * 100));
137
137
  let a;
138
138
  r ? o < 0.1 ? a = "var(--nc-danger)" : o < 0.2 ? a = "var(--nc-warning)" : a = "var(--nc-success)" : a = n ? "#ffffff" : "#000000";
139
- const c = "var(--nc-battery-shell-bg)", l = 24, u = 14, f = 2, v = 0, d = 12, m = 0, y = 0, b = 0, w = l, k = u, g = k - m * 2, p = w - m * 2, h = Math.max(1, Math.min(4, k / 4)), A = o === 0 ? 0 : 0.05 + o * 0.95, C = l + f + d, T = 20, P = 0.65, x = Math.max(u, T * P), I = l + f + 1, S = (u - T * P) / 2;
139
+ const c = "var(--nc-battery-shell-bg)", l = 24, u = 14, f = 2, b = 0, d = 12, m = 0, A = 0, v = 0, w = l, y = u, h = y - m * 2, p = w - m * 2, g = Math.max(1, Math.min(4, y / 4)), x = o === 0 ? 0 : 0.05 + o * 0.95, $ = l + f + d, R = 20, E = 0.65, S = Math.max(u, R * E), L = l + f + 1, k = (u - R * E) / 2;
140
140
  return /* @__PURE__ */ N(
141
141
  "svg",
142
142
  {
143
143
  className: "nc-battery",
144
- width: C,
145
- height: x,
146
- viewBox: `0 0 ${C} ${x}`,
144
+ width: $,
145
+ height: S,
146
+ viewBox: `0 0 ${$} ${S}`,
147
147
  role: "img",
148
148
  "aria-label": `Battery ${i === "-" ? "-" : `${i}%`} ${t}`,
149
149
  children: [
150
- /* @__PURE__ */ s("defs", { children: /* @__PURE__ */ s("mask", { id: `nc-battery-fill-mask-${o}`, children: /* @__PURE__ */ s("rect", { x: "0", y: "0", width: p * A, height: g, fill: "white" }) }) }),
150
+ /* @__PURE__ */ s("defs", { children: /* @__PURE__ */ s("mask", { id: `nc-battery-fill-mask-${o}`, children: /* @__PURE__ */ s("rect", { x: "0", y: "0", width: p * x, height: h, fill: "white" }) }) }),
151
151
  /* @__PURE__ */ s(
152
152
  "rect",
153
153
  {
154
- x: y,
155
- y: b,
156
- rx: h,
157
- ry: h,
154
+ x: A,
155
+ y: v,
156
+ rx: g,
157
+ ry: g,
158
158
  width: w,
159
- height: k,
159
+ height: y,
160
160
  fill: c
161
161
  }
162
162
  ),
163
163
  /* @__PURE__ */ s(
164
164
  "rect",
165
165
  {
166
- x: y + m,
167
- y: b + m,
166
+ x: A + m,
167
+ y: v + m,
168
168
  width: p,
169
- height: g,
169
+ height: h,
170
170
  fill: a,
171
- rx: h,
172
- ry: h,
171
+ rx: g,
172
+ ry: g,
173
173
  mask: `url(#nc-battery-fill-mask-${o})`
174
174
  }
175
175
  ),
176
176
  /* @__PURE__ */ s(
177
177
  "text",
178
178
  {
179
- x: y + w / 2,
179
+ x: A + w / 2,
180
180
  y: u - 3,
181
181
  fontSize: 11,
182
182
  fontWeight: "bold",
@@ -188,7 +188,7 @@ function Yn({
188
188
  /* @__PURE__ */ s(
189
189
  "rect",
190
190
  {
191
- x: l + v,
191
+ x: l + b,
192
192
  y: u * 0.26,
193
193
  width: f,
194
194
  height: u * 0.48,
@@ -197,7 +197,7 @@ function Yn({
197
197
  fill: o === 1 ? a : c
198
198
  }
199
199
  ),
200
- t === "charging" ? /* @__PURE__ */ s("g", { transform: `translate(${I}, ${S}) scale(${P})`, fill: a, children: /* @__PURE__ */ s("path", { d: "M10 0 L2 11 H8 L5 20 L14 8 H8 L10 0 Z" }) }) : null
200
+ t === "charging" ? /* @__PURE__ */ s("g", { transform: `translate(${L}, ${k}) scale(${E})`, fill: a, children: /* @__PURE__ */ s("path", { d: "M10 0 L2 11 H8 L5 20 L14 8 H8 L10 0 Z" }) }) : null
201
201
  ]
202
202
  }
203
203
  );
@@ -224,7 +224,7 @@ function Kn({
224
224
  );
225
225
  }) });
226
226
  }
227
- function It({ size: e }) {
227
+ function Rt({ size: e }) {
228
228
  return /* @__PURE__ */ s("svg", { className: `nc-checkbox-icon ${e === "small" ? "nc-small" : ""}`, viewBox: "0 0 12 12", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ s(
229
229
  "path",
230
230
  {
@@ -257,7 +257,7 @@ function _n({ checked: e, onChange: t, disabled: n, label: r, size: o = "default
257
257
  onKeyDown: (u) => {
258
258
  n || (u.key === "Enter" || u.key === " ") && (u.preventDefault(), t(!e));
259
259
  },
260
- children: e && /* @__PURE__ */ s(It, { size: o })
260
+ children: e && /* @__PURE__ */ s(Rt, { size: o })
261
261
  }
262
262
  ),
263
263
  r && /* @__PURE__ */ s("span", { className: "nc-checkbox-text", style: i ? { color: i } : void 0, children: r })
@@ -265,30 +265,30 @@ function _n({ checked: e, onChange: t, disabled: n, label: r, size: o = "default
265
265
  }
266
266
  );
267
267
  }
268
- function Rt({ option: e, onChange: t, selected: n, highlighted: r, small: o }) {
269
- const i = H(null), { t: a } = Z();
270
- return z(() => {
271
- r && i.current && i.current.scrollIntoView({ block: "nearest" });
272
- }, [r]), /* @__PURE__ */ N(
268
+ function Tt({ option: e, onChange: t, selected: n, highlighted: r, small: o, renderOption: i, index: a }) {
269
+ const c = O(null), { t: l } = ne();
270
+ return D(() => {
271
+ r && c.current && c.current.scrollIntoView({ block: "nearest" });
272
+ }, [r]), /* @__PURE__ */ s(
273
273
  "div",
274
274
  {
275
- ref: i,
275
+ ref: c,
276
276
  className: `nc-combo-dropdown-option ${o ? "nc-small" : ""} ${r ? "nc-highlighted" : ""}`,
277
277
  role: "option",
278
- onMouseDown: () => t(e.value),
278
+ onClick: () => t(e.value, e.label),
279
279
  "aria-selected": n,
280
280
  style: {
281
281
  cursor: "pointer",
282
282
  background: r ? "rgba(59,130,246,0.18)" : n ? "rgba(59,130,246,0.12)" : void 0
283
283
  },
284
- children: [
284
+ children: i ? i(e, a, !!r) : /* @__PURE__ */ N(Te, { children: [
285
285
  e.label,
286
286
  e.default && /* @__PURE__ */ N("span", { style: { fontSize: "0.85em", color: "var(--nc-text-weak)", marginLeft: 6 }, children: [
287
287
  "(",
288
- a("common.default"),
288
+ l("common.default"),
289
289
  ")"
290
290
  ] })
291
- ]
291
+ ] })
292
292
  }
293
293
  );
294
294
  }
@@ -300,44 +300,46 @@ function Et({
300
300
  placement: o = "bottom",
301
301
  anchorRef: i,
302
302
  small: a,
303
- highlightedIndex: c = -1
303
+ highlightedIndex: c = -1,
304
+ renderOption: l
304
305
  }) {
305
- const [l, u] = E({ top: 0, left: 0, width: 0 }), [f, v] = E(o), { t: d } = Z();
306
- if (z(() => {
306
+ const [u, f] = T({ top: 0, left: 0, width: 0 }), [b, d] = T(o), { t: m } = ne();
307
+ if (D(() => {
307
308
  if (e && i.current) {
308
- const y = i.current.getBoundingClientRect();
309
- let b = o;
309
+ const v = i.current.getBoundingClientRect();
310
+ let w = o;
310
311
  if (o === "bottom") {
311
- const w = window.innerHeight - y.bottom, k = y.top;
312
- w < 320 && k > w && (b = "top");
312
+ const y = window.innerHeight - v.bottom, h = v.top;
313
+ y < 320 && h > y && (w = "top");
313
314
  }
314
- v(b), u({
315
- top: b === "top" ? y.top - 4 : y.bottom + 4,
316
- left: y.left,
317
- width: y.width
315
+ d(w), f({
316
+ top: w === "top" ? v.top - 4 : v.bottom + 4,
317
+ left: v.left,
318
+ width: v.width
318
319
  });
319
320
  }
320
321
  }, [e, i, o]), !e) return null;
321
- const m = /* @__PURE__ */ s(
322
+ const A = /* @__PURE__ */ s(
322
323
  "div",
323
324
  {
324
325
  className: "nc-combo-dropdown",
326
+ onMouseDown: (v) => v.stopPropagation(),
325
327
  style: {
326
328
  position: "fixed",
327
- top: f === "top" ? void 0 : l.top,
328
- bottom: f === "top" ? window.innerHeight - l.top : void 0,
329
- left: l.left,
330
- width: l.width,
329
+ top: b === "top" ? void 0 : u.top,
330
+ bottom: b === "top" ? window.innerHeight - u.top : void 0,
331
+ left: u.left,
332
+ width: u.width,
331
333
  zIndex: 1e3,
332
334
  maxHeight: 300,
333
335
  overflowY: "auto"
334
336
  },
335
- children: t.length === 0 ? /* @__PURE__ */ s("div", { className: `nc-combo-dropdown-option nc-no-results ${a ? "nc-small" : ""}`, children: d("common.noResults") }) : t.map((y, b) => /* @__PURE__ */ s(Rt, { option: y, onChange: n, selected: y.value === r, highlighted: b === c, small: a }, y.value))
337
+ children: t.length === 0 ? /* @__PURE__ */ s("div", { className: `nc-combo-dropdown-option nc-no-results ${a ? "nc-small" : ""}`, children: m("common.noResults") }) : t.map((v, w) => /* @__PURE__ */ s(Tt, { option: v, onChange: n, selected: v.value === r, highlighted: w === c, small: a, renderOption: l, index: w }, v.value))
336
338
  }
337
339
  );
338
- return pe(m, document.body);
340
+ return ke(A, document.body);
339
341
  }
340
- function Tt({ onClick: e, small: t }) {
342
+ function Lt({ onClick: e, small: t }) {
341
343
  return /* @__PURE__ */ s(
342
344
  "span",
343
345
  {
@@ -371,135 +373,185 @@ function Un({
371
373
  onChange: t,
372
374
  placeholder: n = "Select…",
373
375
  options: r,
374
- disabled: o,
375
- label: i,
376
- clearable: a = !0,
377
- allowTyping: c = !1,
378
- placement: l = "bottom",
379
- size: u = "default",
380
- appearance: f = "default",
376
+ candidates: o,
377
+ renderOption: i,
378
+ renderSelected: a,
379
+ selectedOption: c,
380
+ disabled: l,
381
+ label: u,
382
+ clearable: f = !0,
383
+ allowTyping: b = !1,
384
+ placement: d = "bottom",
385
+ size: m = "default",
386
+ appearance: A = "default",
381
387
  textAlign: v = "left",
382
- style: d,
383
- className: m
388
+ style: w,
389
+ className: y
384
390
  }) {
385
- const [y, b] = E(!1), [w, k] = E(""), [g, p] = E(-1), h = H(null), A = H(null), C = u === "small", { t: T } = Z(), P = we(() => {
386
- const R = w.toLowerCase();
387
- return c ? r.filter((B) => B.label.toLowerCase().includes(R)) : r;
388
- }, [r, w, c]);
389
- z(() => {
390
- y && p(-1);
391
- }, [y, P]), z(() => {
392
- if (!a && !e && r.length > 0 && t) {
393
- const R = r.find((B) => B.default) || r[0];
394
- t(R.value);
391
+ const [h, p] = T(!1), [g, x] = T(""), [$, R] = T(-1), E = O(null), S = O(null), L = O(null), k = m === "small", { t: C } = ne(), z = !!o, H = b || z, [j, G] = T([]), [X, U] = T(() => {
392
+ if (r && e) {
393
+ const I = r.find((B) => B.value === e);
394
+ return I ? I.label : "";
395
395
  }
396
- }, [a, e, r, t]), z(() => {
397
- function R(B) {
398
- var W;
399
- B.target instanceof Node && h.current && ((W = h.current.parentElement) != null && W.contains(B.target) || b(!1));
396
+ return o && e ? e : "";
397
+ });
398
+ D(() => {
399
+ if (!e) {
400
+ U("");
401
+ return;
400
402
  }
401
- return document.addEventListener("mousedown", R), () => document.removeEventListener("mousedown", R);
403
+ if (r) {
404
+ const I = r.find((B) => B.value === e);
405
+ I && U(I.label);
406
+ } else o && U(e);
407
+ }, [e, r, o]);
408
+ const _ = (I, B = !1) => {
409
+ if (!o) return;
410
+ L.current && clearTimeout(L.current);
411
+ const V = async () => {
412
+ try {
413
+ const J = await o(I);
414
+ G(J), R(-1);
415
+ } catch {
416
+ G([]);
417
+ }
418
+ };
419
+ B ? V() : L.current = setTimeout(V, 200);
420
+ }, F = Ce(() => {
421
+ if (z) return j;
422
+ const I = g.toLowerCase();
423
+ return H ? (r || []).filter((B) => B.label.toLowerCase().includes(I)) : r || [];
424
+ }, [r, g, H, z, j]);
425
+ D(() => {
426
+ h && R(-1);
427
+ }, [h, F]), D(() => {
428
+ if (!f && !e && r && r.length > 0 && t) {
429
+ const I = r.find((B) => B.default) || r[0];
430
+ t(I.value);
431
+ }
432
+ }, [f, e, r, t]), D(() => {
433
+ function I(B) {
434
+ var V;
435
+ B.target instanceof Node && E.current && ((V = E.current.parentElement) != null && V.contains(B.target) || p(!1));
436
+ }
437
+ return document.addEventListener("mousedown", I), () => document.removeEventListener("mousedown", I);
402
438
  }, []);
403
- const x = r.find((R) => R.value === e), I = x && a, S = !o && !I, $ = `nc-align-${v}`, L = !(y && c) && !!x, O = (R, B = !1) => {
404
- var W;
405
- t == null || t(R), b(!1), k(""), B && ((W = h.current) == null || W.blur());
406
- }, F = () => {
407
- t == null || t(void 0), k(""), b(!1);
408
- }, j = (R) => {
409
- if (!y) {
410
- (R.key === "ArrowDown" || R.key === "ArrowUp") && (b(!0), R.preventDefault());
439
+ const P = c ?? (r ? r.find((I) => I.value === e) : e ? { label: X, value: e } : void 0), re = P && f, de = !l && !re, ae = `nc-align-${v}`, ue = !(h && H) && !!P, pe = (I, B, V = !1) => {
440
+ var J;
441
+ U(B), t == null || t(I), p(!1), x(""), V && ((J = E.current) == null || J.blur());
442
+ }, fe = () => {
443
+ t == null || t(void 0), x(""), p(!1);
444
+ }, De = (I) => {
445
+ if (!h) {
446
+ (I.key === "ArrowDown" || I.key === "ArrowUp") && (p(!0), I.preventDefault());
411
447
  return;
412
448
  }
413
- switch (R.key) {
449
+ switch (I.key) {
414
450
  case "ArrowDown":
415
- R.preventDefault(), p((B) => {
416
- const W = B + 1;
417
- return W >= P.length ? 0 : W;
451
+ I.preventDefault(), R((B) => {
452
+ const V = B + 1;
453
+ return V >= F.length ? 0 : V;
418
454
  });
419
455
  break;
420
456
  case "ArrowUp":
421
- R.preventDefault(), p((B) => {
422
- const W = B - 1;
423
- return W < 0 ? P.length - 1 : W;
457
+ I.preventDefault(), R((B) => {
458
+ const V = B - 1;
459
+ return V < 0 ? F.length - 1 : V;
424
460
  });
425
461
  break;
426
462
  case "Enter":
427
- R.preventDefault(), g >= 0 && g < P.length && O(P[g].value, !0);
463
+ I.preventDefault(), $ >= 0 && $ < F.length && pe(F[$].value, F[$].label, !0);
428
464
  break;
429
465
  case "Escape":
430
- R.preventDefault(), b(!1), k("");
466
+ I.preventDefault(), p(!1), x("");
431
467
  break;
432
468
  }
433
469
  };
434
- return /* @__PURE__ */ N("div", { className: `nc-combo-container ${f === "transparent" ? "nc-transparent" : ""} ${f === "plain" ? "nc-plain" : ""} ${y ? "nc-open" : ""} ${$} ${m || ""}`.trim(), style: { position: "relative", ...d }, children: [
435
- i && /* @__PURE__ */ s("span", { className: `nc-label ${C ? "nc-small" : ""}`, children: i }),
470
+ return /* @__PURE__ */ N("div", { className: `nc-combo-container ${A === "transparent" ? "nc-transparent" : ""} ${A === "plain" ? "nc-plain" : ""} ${h ? "nc-open" : ""} ${ae} ${y || ""}`.trim(), style: { position: "relative", ...w }, children: [
471
+ u && /* @__PURE__ */ s("span", { className: `nc-label ${k ? "nc-small" : ""}`, children: u }),
436
472
  /* @__PURE__ */ N(
437
473
  "div",
438
474
  {
439
- ref: A,
475
+ ref: S,
440
476
  style: { position: "relative", display: "flex", alignItems: "center" },
441
- onMouseDown: (R) => {
442
- o || c && R.target === h.current || (b((B) => (!B && c && x && k(x.label), !B)), c && !y && setTimeout(() => {
443
- var B, W;
444
- (B = h.current) == null || B.focus(), (W = h.current) == null || W.select();
445
- }, 0));
477
+ onMouseDown: (I) => {
478
+ if (l || H && I.target === E.current) return;
479
+ const B = !h;
480
+ if (p((V) => (!V && H && P && x(P.label), !V)), z && B) {
481
+ const V = H && P ? P.label : "";
482
+ G([]), setTimeout(() => _(V, !0), 0);
483
+ }
484
+ H && !h && setTimeout(() => {
485
+ var V, J;
486
+ (V = E.current) == null || V.focus(), (J = E.current) == null || J.select();
487
+ }, 0);
446
488
  },
447
489
  children: [
448
490
  /* @__PURE__ */ s(
449
491
  "input",
450
492
  {
451
- ref: h,
452
- className: `nc-input ${C ? "nc-small" : ""}`,
493
+ ref: E,
494
+ className: `nc-input ${k ? "nc-small" : ""}`,
453
495
  placeholder: n,
454
496
  onFocus: () => {
455
- !o && c && (b(!0), x && (k(x.label), setTimeout(() => {
456
- var R;
457
- return (R = h.current) == null ? void 0 : R.select();
458
- }, 0)));
497
+ if (!l && H) {
498
+ p(!0);
499
+ const I = P ? P.label : "";
500
+ P && (x(I), setTimeout(() => {
501
+ var B;
502
+ return (B = E.current) == null ? void 0 : B.select();
503
+ }, 0)), z && (G([]), _(I, !0));
504
+ }
505
+ },
506
+ onChange: (I) => {
507
+ const B = I.target.value;
508
+ H && (x(B), z && _(B));
459
509
  },
460
- onChange: (R) => c && k(R.target.value),
461
- onKeyDown: j,
462
- value: y && c ? w : (x == null ? void 0 : x.label) || "",
463
- readOnly: o || !c,
510
+ onKeyDown: De,
511
+ value: h && H ? g : (P == null ? void 0 : P.label) || "",
512
+ readOnly: l || !H,
464
513
  style: {
465
514
  width: "100%",
466
- paddingRight: S || I ? C ? 32 : 44 : 12,
467
- caretColor: c ? void 0 : "transparent",
468
- cursor: c ? void 0 : "pointer",
469
- userSelect: c ? void 0 : "none",
470
- color: L ? "transparent" : "var(--nc-text)"
515
+ paddingRight: de || re ? k ? 32 : 44 : 12,
516
+ caretColor: b ? void 0 : "transparent",
517
+ cursor: b ? void 0 : "pointer",
518
+ userSelect: b ? void 0 : "none",
519
+ color: ue ? "transparent" : "var(--nc-text)"
471
520
  }
472
521
  }
473
522
  ),
474
- L && /* @__PURE__ */ N(
523
+ ue && /* @__PURE__ */ s(
475
524
  "div",
476
525
  {
477
526
  "aria-hidden": !0,
478
- className: `nc-combo-overlay ${$}`,
527
+ className: `nc-combo-overlay ${ae}`,
479
528
  style: {
480
529
  position: "absolute",
481
- left: C ? 8 : 12,
482
- right: S || I ? C ? 12 : 24 : C ? 8 : 12,
530
+ left: k ? 8 : 12,
531
+ right: de || re ? k ? 12 : 24 : k ? 8 : 12,
483
532
  top: "50%",
484
533
  transform: "translateY(-50%)",
485
- pointerEvents: "none"
534
+ pointerEvents: "none",
535
+ display: "flex",
536
+ alignItems: "center",
537
+ gap: 6
486
538
  },
487
- children: [
488
- /* @__PURE__ */ s("span", { className: `nc-combo-overlay-text ${C ? "nc-small" : ""}`, children: x == null ? void 0 : x.label }),
489
- (x == null ? void 0 : x.default) && /* @__PURE__ */ N("span", { className: `nc-combo-overlay-default ${C ? "nc-small" : ""}`, children: [
539
+ children: a && P ? a(P) : /* @__PURE__ */ N(Te, { children: [
540
+ /* @__PURE__ */ s("span", { className: `nc-combo-overlay-text ${k ? "nc-small" : ""}`, children: P == null ? void 0 : P.label }),
541
+ (P == null ? void 0 : P.default) && /* @__PURE__ */ N("span", { className: `nc-combo-overlay-default ${k ? "nc-small" : ""}`, children: [
490
542
  "(",
491
- T("common.default"),
543
+ C("common.default"),
492
544
  ")"
493
545
  ] })
494
- ]
546
+ ] })
495
547
  }
496
548
  ),
497
- I && /* @__PURE__ */ s(Tt, { onClick: F, small: C }),
498
- S && /* @__PURE__ */ s(Pt, { open: y, small: C })
549
+ re && /* @__PURE__ */ s(Lt, { onClick: fe, small: k }),
550
+ de && /* @__PURE__ */ s(Pt, { open: h, small: k })
499
551
  ]
500
552
  }
501
553
  ),
502
- /* @__PURE__ */ s(Et, { isOpen: y, options: P, onSelect: O, selectedValue: e, placement: l, anchorRef: A, small: C, highlightedIndex: g })
554
+ /* @__PURE__ */ s(Et, { isOpen: h, options: F, onSelect: pe, selectedValue: e, placement: d, anchorRef: S, small: k, highlightedIndex: $, renderOption: i })
503
555
  ] });
504
556
  }
505
557
  function qn({ onClick: e, loading: t = !1, disabled: n = !1, size: r = "default", title: o, "aria-label": i }) {
@@ -512,11 +564,11 @@ function qn({ onClick: e, loading: t = !1, disabled: n = !1, size: r = "default"
512
564
  title: o ?? (t ? "Refreshing..." : "Refresh"),
513
565
  "aria-label": i ?? (t ? "Refreshing" : "Refresh"),
514
566
  "data-size": r,
515
- children: /* @__PURE__ */ s(ht, { size: r === "small" ? 14 : r === "large" ? 20 : 18, className: t ? "nc-spinning" : "" })
567
+ children: /* @__PURE__ */ s(mt, { size: r === "small" ? 14 : r === "large" ? 20 : 18, className: t ? "nc-spinning" : "" })
516
568
  }
517
569
  );
518
570
  }
519
- function Ue({ onClick: e, disabled: t = !1, size: n = "default", title: r = "Close", "aria-label": o = "Close" }) {
571
+ function Qe({ onClick: e, disabled: t = !1, size: n = "default", title: r = "Close", "aria-label": o = "Close" }) {
520
572
  return /* @__PURE__ */ s(
521
573
  "button",
522
574
  {
@@ -526,7 +578,7 @@ function Ue({ onClick: e, disabled: t = !1, size: n = "default", title: r = "Clo
526
578
  title: r,
527
579
  "aria-label": o,
528
580
  "data-size": n,
529
- children: /* @__PURE__ */ s($e, { size: n === "small" ? 14 : n === "large" ? 20 : 18 })
581
+ children: /* @__PURE__ */ s(Ee, { size: n === "small" ? 14 : n === "large" ? 20 : 18 })
530
582
  }
531
583
  );
532
584
  }
@@ -540,7 +592,7 @@ function Xn({ onClick: e, disabled: t = !1, size: n = "default", title: r = "Edi
540
592
  title: r,
541
593
  "aria-label": o,
542
594
  "data-size": n,
543
- children: /* @__PURE__ */ s(ft, { size: n === "small" ? 14 : n === "large" ? 20 : 18 })
595
+ children: /* @__PURE__ */ s(ht, { size: n === "small" ? 14 : n === "large" ? 20 : 18 })
544
596
  }
545
597
  );
546
598
  }
@@ -554,11 +606,11 @@ function Jn({ onClick: e, disabled: t = !1, size: n = "default", title: r = "Del
554
606
  title: r,
555
607
  "aria-label": o,
556
608
  "data-size": n,
557
- children: /* @__PURE__ */ s(mt, { size: n === "small" ? 14 : n === "large" ? 20 : 18 })
609
+ children: /* @__PURE__ */ s(gt, { size: n === "small" ? 14 : n === "large" ? 20 : 18 })
558
610
  }
559
611
  );
560
612
  }
561
- function Zn({ onClick: e, disabled: t = !1, children: n, title: r, "aria-label": o, size: i = "default" }) {
613
+ function Qn({ onClick: e, disabled: t = !1, children: n, title: r, "aria-label": o, size: i = "default" }) {
562
614
  return /* @__PURE__ */ s(
563
615
  "button",
564
616
  {
@@ -572,7 +624,7 @@ function Zn({ onClick: e, disabled: t = !1, children: n, title: r, "aria-label":
572
624
  }
573
625
  );
574
626
  }
575
- function Qn({
627
+ function Zn({
576
628
  open: e,
577
629
  onClose: t,
578
630
  options: n,
@@ -580,27 +632,27 @@ function Qn({
580
632
  anchor: o,
581
633
  preferredDirection: i = "down"
582
634
  }) {
583
- const a = H(null), [c, l] = E({ top: 0, left: 0 }), u = o || (r == null ? void 0 : r.current);
584
- if (z(() => {
635
+ const a = O(null), [c, l] = T({ top: 0, left: 0 }), u = o || (r == null ? void 0 : r.current);
636
+ if (D(() => {
585
637
  if (!e || !u || !a.current) return;
586
- const d = u.getBoundingClientRect(), m = a.current.getBoundingClientRect(), y = window.innerHeight, b = window.innerWidth, w = d.bottom + 8, k = w + m.height <= y - 8;
587
- let g = i;
588
- (!k && i === "down" || i === "up" && k) && (g = "up");
638
+ const d = u.getBoundingClientRect(), m = a.current.getBoundingClientRect(), A = window.innerHeight, v = window.innerWidth, w = d.bottom + 8, y = w + m.height <= A - 8;
639
+ let h = i;
640
+ (!y && i === "down" || i === "up" && y) && (h = "up");
589
641
  let p;
590
- g === "down" ? p = w : p = d.top - m.height - 8;
591
- let h = d.left;
592
- h + m.width > b - 8 && (h = d.right - m.width), l({
642
+ h === "down" ? p = w : p = d.top - m.height - 8;
643
+ let g = d.left;
644
+ g + m.width > v - 8 && (g = d.right - m.width), l({
593
645
  top: Math.max(8, p),
594
646
  // Ensure minimum 8px from top
595
- left: Math.max(8, h)
647
+ left: Math.max(8, g)
596
648
  // Ensure minimum 8px from left
597
649
  });
598
- }, [e, u, i]), z(() => {
650
+ }, [e, u, i]), D(() => {
599
651
  if (!e) return;
600
- const d = (y) => {
601
- a.current && !a.current.contains(y.target) && u && !u.contains(y.target) && t();
602
- }, m = (y) => {
603
- y.key === "Escape" && t();
652
+ const d = (A) => {
653
+ a.current && !a.current.contains(A.target) && u && !u.contains(A.target) && t();
654
+ }, m = (A) => {
655
+ A.key === "Escape" && t();
604
656
  };
605
657
  return document.addEventListener("mousedown", d), document.addEventListener("keydown", m), () => {
606
658
  document.removeEventListener("mousedown", d), document.removeEventListener("keydown", m);
@@ -608,8 +660,8 @@ function Qn({
608
660
  }, [e, t, u]), !e) return null;
609
661
  const f = (d) => {
610
662
  d.type !== "separator" && !d.disabled && d.onClick && (d.onClick(), t());
611
- }, v = n.some((d) => d.icon);
612
- return pe(
663
+ }, b = n.some((d) => d.icon);
664
+ return ke(
613
665
  /* @__PURE__ */ s(
614
666
  "div",
615
667
  {
@@ -636,7 +688,7 @@ function Qn({
636
688
  "nc-context-menu-item",
637
689
  d.variant && d.variant !== "default" ? `nc-${d.variant}` : "",
638
690
  d.disabled ? "nc-disabled" : "",
639
- v && !d.icon ? "nc-indented" : ""
691
+ b && !d.icon ? "nc-indented" : ""
640
692
  ].filter(Boolean).join(" ");
641
693
  return /* @__PURE__ */ N(
642
694
  "button",
@@ -658,16 +710,16 @@ function Qn({
658
710
  document.body
659
711
  );
660
712
  }
661
- const qe = ce(null);
662
- function Lt() {
663
- const e = ne(qe);
713
+ const Ze = be(null);
714
+ function zt() {
715
+ const e = ce(Ze);
664
716
  if (!e)
665
717
  throw new Error("useDialog must be used inside a Dialog component");
666
718
  return e;
667
719
  }
668
- function oe({ children: e, onClick: t, ...n }) {
669
- const { close: r } = Lt(), { t: o } = Z();
670
- return /* @__PURE__ */ s(X, { onClick: (a) => {
720
+ function he({ children: e, onClick: t, ...n }) {
721
+ const { close: r } = zt(), { t: o } = ne();
722
+ return /* @__PURE__ */ s(ee, { onClick: (a) => {
671
723
  t == null || t(a), r();
672
724
  }, ...n, children: e ?? o("common.close") });
673
725
  }
@@ -683,59 +735,59 @@ function er({
683
735
  onSave: l,
684
736
  onDelete: u,
685
737
  onCancel: f,
686
- onConnect: v,
738
+ onConnect: b,
687
739
  closeOnOverlay: d = !0,
688
740
  primaryDisabled: m = !1,
689
- fullScreen: y = !1,
690
- hideTitleBar: b = !1,
741
+ fullScreen: A = !1,
742
+ hideTitleBar: v = !1,
691
743
  className: w = "",
692
- onContentHeightChange: k
744
+ onContentHeightChange: y
693
745
  }) {
694
- const g = H(null), p = H(null), { t: h } = Z(), A = { close: t }, C = (x) => {
695
- d && x.target === x.currentTarget && t();
746
+ const h = O(null), p = O(null), { t: g } = ne(), x = { close: t }, $ = (S) => {
747
+ d && S.target === S.currentTarget && t();
696
748
  };
697
- if (z(() => {
698
- e && g.current && g.current.focus();
699
- }, [e]), z(() => {
700
- if (!k || !p.current) return;
701
- const x = new ResizeObserver((I) => {
702
- for (const S of I) {
703
- const $ = S.contentRect.height;
704
- k($);
749
+ if (D(() => {
750
+ e && h.current && h.current.focus();
751
+ }, [e]), D(() => {
752
+ if (!y || !p.current) return;
753
+ const S = new ResizeObserver((L) => {
754
+ for (const k of L) {
755
+ const C = k.contentRect.height;
756
+ y(C);
705
757
  }
706
758
  });
707
- return x.observe(p.current), () => {
708
- x.disconnect();
759
+ return S.observe(p.current), () => {
760
+ S.disconnect();
709
761
  };
710
- }, [k]), !e) return null;
711
- const T = () => {
762
+ }, [y]), !e) return null;
763
+ const R = () => {
712
764
  switch (i) {
713
765
  case "ok":
714
- return /* @__PURE__ */ s("div", { className: "nc-dialog-footer", children: /* @__PURE__ */ s(X, { variant: "primary", onClick: c ?? t, disabled: m, children: h("common.ok") }) });
766
+ return /* @__PURE__ */ s("div", { className: "nc-dialog-footer", children: /* @__PURE__ */ s(ee, { variant: "primary", onClick: c ?? t, disabled: m, children: g("common.ok") }) });
715
767
  case "ok-cancel":
716
768
  return /* @__PURE__ */ N("div", { className: "nc-dialog-footer", children: [
717
- /* @__PURE__ */ s(oe, { onClick: f, children: h("common.cancel") }),
718
- /* @__PURE__ */ s(X, { variant: "primary", onClick: c ?? t, disabled: m, children: h("common.ok") })
769
+ /* @__PURE__ */ s(he, { onClick: f, children: g("common.cancel") }),
770
+ /* @__PURE__ */ s(ee, { variant: "primary", onClick: c ?? t, disabled: m, children: g("common.ok") })
719
771
  ] });
720
772
  case "save-cancel":
721
773
  return /* @__PURE__ */ N("div", { className: "nc-dialog-footer", children: [
722
- /* @__PURE__ */ s(oe, { onClick: f, children: h("common.cancel") }),
723
- /* @__PURE__ */ s(X, { variant: "primary", onClick: l, disabled: m, children: h("common.save") })
774
+ /* @__PURE__ */ s(he, { onClick: f, children: g("common.cancel") }),
775
+ /* @__PURE__ */ s(ee, { variant: "primary", onClick: l, disabled: m, children: g("common.save") })
724
776
  ] });
725
777
  case "delete-cancel":
726
778
  return /* @__PURE__ */ N("div", { className: "nc-dialog-footer", children: [
727
- /* @__PURE__ */ s(oe, { onClick: f, children: h("common.cancel") }),
728
- /* @__PURE__ */ s(X, { variant: "danger", onClick: u, disabled: m, children: h("common.delete") })
779
+ /* @__PURE__ */ s(he, { onClick: f, children: g("common.cancel") }),
780
+ /* @__PURE__ */ s(ee, { variant: "danger", onClick: u, disabled: m, children: g("common.delete") })
729
781
  ] });
730
782
  case "connect":
731
783
  return /* @__PURE__ */ N("div", { className: "nc-dialog-footer", children: [
732
- /* @__PURE__ */ s(oe, { onClick: f, children: h("common.cancel") }),
733
- /* @__PURE__ */ s(X, { variant: "primary", onClick: v, disabled: m, children: h("common.connect") })
784
+ /* @__PURE__ */ s(he, { onClick: f, children: g("common.cancel") }),
785
+ /* @__PURE__ */ s(ee, { variant: "primary", onClick: b, disabled: m, children: g("common.connect") })
734
786
  ] });
735
787
  case "close":
736
- return /* @__PURE__ */ s("div", { className: "nc-dialog-footer", children: /* @__PURE__ */ s(oe, { variant: "primary" }) });
788
+ return /* @__PURE__ */ s("div", { className: "nc-dialog-footer", children: /* @__PURE__ */ s(he, { variant: "primary" }) });
737
789
  case "gotit":
738
- return /* @__PURE__ */ s("div", { className: "nc-dialog-footer", children: /* @__PURE__ */ s(oe, { variant: "primary", children: h("common.gotit") }) });
790
+ return /* @__PURE__ */ s("div", { className: "nc-dialog-footer", children: /* @__PURE__ */ s(he, { variant: "primary", children: g("common.gotit") }) });
739
791
  case "custom":
740
792
  return /* @__PURE__ */ s("div", { className: "nc-dialog-footer", children: a });
741
793
  case "none":
@@ -743,29 +795,29 @@ function er({
743
795
  default:
744
796
  return null;
745
797
  }
746
- }, P = /* @__PURE__ */ s(qe.Provider, { value: A, children: /* @__PURE__ */ s("div", { className: `nc-dialog-overlay${y ? " nc-fullscreen" : ""}`, onClick: C, children: /* @__PURE__ */ N(
798
+ }, E = /* @__PURE__ */ s(Ze.Provider, { value: x, children: /* @__PURE__ */ s("div", { className: `nc-dialog-overlay${A ? " nc-fullscreen" : ""}`, onClick: $, children: /* @__PURE__ */ N(
747
799
  "div",
748
800
  {
749
- ref: g,
801
+ ref: h,
750
802
  className: `nc-dialog-container ${w}`,
751
803
  style: o,
752
804
  tabIndex: -1,
753
805
  role: "dialog",
754
806
  "aria-modal": "true",
755
- "aria-labelledby": b ? void 0 : "nc-dialog-title",
807
+ "aria-labelledby": v ? void 0 : "nc-dialog-title",
756
808
  children: [
757
- !b && /* @__PURE__ */ N("div", { className: "nc-dialog-header", children: [
809
+ !v && /* @__PURE__ */ N("div", { className: "nc-dialog-header", children: [
758
810
  /* @__PURE__ */ s("h3", { id: "nc-dialog-title", className: "nc-dialog-title", children: n }),
759
- /* @__PURE__ */ s(Ue, { onClick: t, "aria-label": "Close dialog" })
811
+ /* @__PURE__ */ s(Qe, { onClick: t, "aria-label": "Close dialog" })
760
812
  ] }),
761
813
  /* @__PURE__ */ s("div", { ref: p, className: "nc-dialog-content", children: r }),
762
- T()
814
+ R()
763
815
  ]
764
816
  }
765
817
  ) }) });
766
- return y ? pe(P, document.body) : P;
818
+ return A ? ke(E, document.body) : E;
767
819
  }
768
- function zt({ onClick: e, size: t = "default", rightOffset: n = 4 }) {
820
+ function Bt({ onClick: e, size: t = "default", rightOffset: n = 4 }) {
769
821
  const r = t === "small" ? 28 : 34;
770
822
  return /* @__PURE__ */ s(
771
823
  "button",
@@ -794,7 +846,7 @@ function zt({ onClick: e, size: t = "default", rightOffset: n = 4 }) {
794
846
  }
795
847
  );
796
848
  }
797
- function Bt({ visible: e, onClick: t, size: n = "default" }) {
849
+ function Dt({ visible: e, onClick: t, size: n = "default" }) {
798
850
  const r = n === "small" ? 28 : 34, o = n === "small" ? 16 : 18;
799
851
  return /* @__PURE__ */ s(
800
852
  "button",
@@ -818,7 +870,7 @@ function Bt({ visible: e, onClick: t, size: n = "default" }) {
818
870
  alignItems: "center",
819
871
  justifyContent: "center"
820
872
  },
821
- children: e ? /* @__PURE__ */ s(gt, { size: o }) : /* @__PURE__ */ s(bt, { size: o })
873
+ children: e ? /* @__PURE__ */ s(bt, { size: o }) : /* @__PURE__ */ s(vt, { size: o })
822
874
  }
823
875
  );
824
876
  }
@@ -834,114 +886,114 @@ function tr({
834
886
  label: l,
835
887
  clearable: u = !0,
836
888
  type: f = "text",
837
- className: v = "",
889
+ className: b = "",
838
890
  size: d = "default",
839
891
  appearance: m = "default",
840
- style: y,
841
- leadingIcon: b,
892
+ style: A,
893
+ leadingIcon: v,
842
894
  showPasswordToggle: w = !1,
843
- multiline: k = !1,
844
- rows: g = 3,
895
+ multiline: y = !1,
896
+ rows: h = 3,
845
897
  validator: p,
846
- showErrorMessage: h = !0
898
+ showErrorMessage: g = !0
847
899
  }) {
848
- const A = H(null), C = H(null), T = H(!1), [P, x] = E(!1), [I, S] = E(!1), $ = e !== void 0, [L, O] = E(t), F = $ ? e : L, [j, R] = E(F), B = p ? p(F) : null, W = !!B, G = !k && m === "plain", Y = G && I, ye = Y ? j : F;
849
- z(() => {
850
- Y || R(F);
851
- }, [F, Y]);
852
- const Te = f === "password", fe = Te && w && !c && !k, xe = u && ye && !c && I, ke = d === "small" ? 32 : 44;
853
- let he = 12;
854
- xe && fe ? he = ke * 2 : (xe || fe) && (he = ke);
855
- const me = b ? d === "small" ? 28 : 34 : void 0, Pe = () => {
856
- if (!G)
857
- return F;
858
- const K = j !== F;
859
- return $ || O(j), K && (n == null || n(j), r == null || r(j)), j;
860
- }, at = () => {
861
- R(F);
862
- }, lt = () => {
863
- var K, U, He;
864
- if (G) {
865
- R(""), i == null || i(), (K = A.current) == null || K.focus();
900
+ const x = O(null), $ = O(null), R = O(!1), [E, S] = T(!1), [L, k] = T(!1), C = e !== void 0, [z, H] = T(t), j = C ? e : z, [G, X] = T(j), U = p ? p(j) : null, _ = !!U, F = !y && m === "plain", P = F && L, re = P ? G : j;
901
+ D(() => {
902
+ P || X(j);
903
+ }, [j, P]);
904
+ const de = f === "password", ae = de && w && !c && !y, ue = u && re && !c && L, pe = d === "small" ? 32 : 44;
905
+ let fe = 12;
906
+ ue && ae ? fe = pe * 2 : (ue || ae) && (fe = pe);
907
+ const I = v ? d === "small" ? 28 : 34 : void 0, B = () => {
908
+ if (!F)
909
+ return j;
910
+ const K = G !== j;
911
+ return C || H(G), K && (n == null || n(G), r == null || r(G)), G;
912
+ }, V = () => {
913
+ X(j);
914
+ }, J = () => {
915
+ var K, Q, je;
916
+ if (F) {
917
+ X(""), i == null || i(), (K = x.current) == null || K.focus();
866
918
  return;
867
919
  }
868
- $ || O(""), n == null || n(""), i == null || i(), k ? (U = C.current) == null || U.focus() : (He = A.current) == null || He.focus();
869
- }, Le = (K) => {
870
- if (G && K.key === "Escape") {
871
- K.preventDefault(), T.current = !0, at(), K.currentTarget.blur();
920
+ C || H(""), n == null || n(""), i == null || i(), y ? (Q = $.current) == null || Q.focus() : (je = x.current) == null || je.focus();
921
+ }, We = (K) => {
922
+ if (F && K.key === "Escape") {
923
+ K.preventDefault(), R.current = !0, V(), K.currentTarget.blur();
872
924
  return;
873
925
  }
874
- if (K.key === "Enter" && !k) {
875
- const U = G ? Pe() : F;
876
- G && (K.preventDefault(), T.current = !0, K.currentTarget.blur()), o == null || o(U);
926
+ if (K.key === "Enter" && !y) {
927
+ const Q = F ? B() : j;
928
+ F && (K.preventDefault(), R.current = !0, K.currentTarget.blur()), o == null || o(Q);
877
929
  }
878
- }, ze = (K) => {
879
- const U = K.target.value;
880
- if (G) {
881
- R(U), n == null || n(U);
930
+ }, He = (K) => {
931
+ const Q = K.target.value;
932
+ if (F) {
933
+ X(Q), n == null || n(Q);
882
934
  return;
883
935
  }
884
- $ || O(U), n == null || n(U);
885
- }, Be = () => {
886
- S(!0), G && R(F);
887
- }, De = () => {
888
- if (G && T.current) {
889
- T.current = !1, S(!1);
936
+ C || H(Q), n == null || n(Q);
937
+ }, Ve = () => {
938
+ k(!0), F && X(j);
939
+ }, Oe = () => {
940
+ if (F && R.current) {
941
+ R.current = !1, k(!1);
890
942
  return;
891
943
  }
892
- G && Pe(), S(!1);
893
- }, We = `nc-input ${d === "small" ? "nc-small " : ""}${!k && m === "plain" ? "nc-plain " : ""}${W ? "nc-error " : ""}${v}`;
894
- return /* @__PURE__ */ N("div", { className: "nc-col", style: { position: "relative", flex: 1, ...y }, children: [
944
+ F && B(), k(!1);
945
+ }, Fe = `nc-input ${d === "small" ? "nc-small " : ""}${!y && m === "plain" ? "nc-plain " : ""}${_ ? "nc-error " : ""}${b}`;
946
+ return /* @__PURE__ */ N("div", { className: "nc-col", style: { position: "relative", flex: 1, ...A }, children: [
895
947
  l && /* @__PURE__ */ s("span", { className: "nc-label", children: l }),
896
- /* @__PURE__ */ N("div", { style: { position: "relative", display: "flex", alignItems: k ? "flex-start" : "center" }, children: [
897
- b && /* @__PURE__ */ s("span", { className: "nc-input-leading-icon", style: { height: k ? void 0 : "100%", top: k ? 10 : void 0 }, children: b }),
898
- k ? /* @__PURE__ */ s(
948
+ /* @__PURE__ */ N("div", { style: { position: "relative", display: "flex", alignItems: y ? "flex-start" : "center" }, children: [
949
+ v && /* @__PURE__ */ s("span", { className: "nc-input-leading-icon", style: { height: y ? void 0 : "100%", top: y ? 10 : void 0 }, children: v }),
950
+ y ? /* @__PURE__ */ s(
899
951
  "textarea",
900
952
  {
901
- ref: C,
902
- className: We,
953
+ ref: $,
954
+ className: Fe,
903
955
  placeholder: a,
904
- value: ye,
905
- onChange: ze,
906
- onKeyDown: Le,
907
- onFocus: Be,
908
- onBlur: De,
956
+ value: re,
957
+ onChange: He,
958
+ onKeyDown: We,
959
+ onFocus: Ve,
960
+ onBlur: Oe,
909
961
  readOnly: c,
910
962
  "aria-disabled": c,
911
963
  tabIndex: c ? -1 : void 0,
912
- rows: g,
964
+ rows: h,
913
965
  style: {
914
966
  width: "100%",
915
- paddingRight: he,
916
- ...me !== void 0 ? { paddingLeft: me } : {}
967
+ paddingRight: fe,
968
+ ...I !== void 0 ? { paddingLeft: I } : {}
917
969
  }
918
970
  }
919
971
  ) : /* @__PURE__ */ s(
920
972
  "input",
921
973
  {
922
- ref: A,
923
- type: Te && P ? "text" : f,
924
- className: We,
974
+ ref: x,
975
+ type: de && E ? "text" : f,
976
+ className: Fe,
925
977
  placeholder: a,
926
- value: ye,
927
- onChange: ze,
928
- onKeyDown: Le,
929
- onFocus: Be,
930
- onBlur: De,
978
+ value: re,
979
+ onChange: He,
980
+ onKeyDown: We,
981
+ onFocus: Ve,
982
+ onBlur: Oe,
931
983
  readOnly: c,
932
984
  "aria-disabled": c,
933
985
  tabIndex: c ? -1 : void 0,
934
986
  style: {
935
987
  width: "100%",
936
- paddingRight: he,
937
- ...me !== void 0 ? { paddingLeft: me } : {}
988
+ paddingRight: fe,
989
+ ...I !== void 0 ? { paddingLeft: I } : {}
938
990
  }
939
991
  }
940
992
  ),
941
- xe && /* @__PURE__ */ s(zt, { onClick: lt, size: d, rightOffset: fe ? ke + 4 : 4 }),
942
- fe && /* @__PURE__ */ s(Bt, { visible: P, onClick: () => x(!P), size: d })
993
+ ue && /* @__PURE__ */ s(Bt, { onClick: J, size: d, rightOffset: ae ? pe + 4 : 4 }),
994
+ ae && /* @__PURE__ */ s(Dt, { visible: E, onClick: () => S(!E), size: d })
943
995
  ] }),
944
- W && h && /* @__PURE__ */ s("span", { className: "nc-error-message", children: B })
996
+ _ && g && /* @__PURE__ */ s("span", { className: "nc-error-message", children: U })
945
997
  ] });
946
998
  }
947
999
  function nr({
@@ -951,7 +1003,7 @@ function nr({
951
1003
  selectable: r = !1,
952
1004
  style: o
953
1005
  }) {
954
- const [i, a] = Me.useState(!1);
1006
+ const [i, a] = Le.useState(!1);
955
1007
  return /* @__PURE__ */ s(
956
1008
  "div",
957
1009
  {
@@ -995,14 +1047,14 @@ function rr({ title: e, titleTools: t, children: n, style: r }) {
995
1047
  ] });
996
1048
  }
997
1049
  function or({ values: e, onChange: t, options: n, placeholder: r = "Select…", label: o }) {
998
- const [i, a] = E(!1), [c, l] = E(""), u = H(null), f = we(() => n.filter((d) => d.label.toLowerCase().includes(c.toLowerCase())), [n, c]);
999
- z(() => {
1050
+ const [i, a] = T(!1), [c, l] = T(""), u = O(null), f = Ce(() => n.filter((d) => d.label.toLowerCase().includes(c.toLowerCase())), [n, c]);
1051
+ D(() => {
1000
1052
  function d(m) {
1001
1053
  !(m.target instanceof Node) || !u.current || u.current.contains(m.target) || a(!1);
1002
1054
  }
1003
1055
  return document.addEventListener("mousedown", d), () => document.removeEventListener("mousedown", d);
1004
1056
  }, []);
1005
- const v = (d) => {
1057
+ const b = (d) => {
1006
1058
  e.includes(d) ? t(e.filter((m) => m !== d)) : t([...e, d]);
1007
1059
  };
1008
1060
  return /* @__PURE__ */ N("div", { ref: u, className: "nc-col", style: { position: "relative" }, children: [
@@ -1010,7 +1062,7 @@ function or({ values: e, onChange: t, options: n, placeholder: r = "Select…",
1010
1062
  /* @__PURE__ */ N("div", { className: "nc-row", style: { flexWrap: "wrap", gap: 6, minHeight: 42, alignItems: "center", border: "1px solid var(--nc-button-border)", borderRadius: 8, background: "var(--nc-button-bg)", padding: "4px 8px" }, children: [
1011
1063
  e.length === 0 && /* @__PURE__ */ s("span", { className: "nc-label", children: r }),
1012
1064
  e.map((d) => {
1013
- const m = n.find((y) => y.value === d);
1065
+ const m = n.find((A) => A.value === d);
1014
1066
  return m ? /* @__PURE__ */ N("span", { style: { padding: "4px 8px", borderRadius: 6, display: "inline-flex", alignItems: "center", gap: 4, background: "var(--nc-button-bg)", border: "1px solid var(--nc-button-border)" }, children: [
1015
1067
  m.label,
1016
1068
  /* @__PURE__ */ s(
@@ -1018,7 +1070,7 @@ function or({ values: e, onChange: t, options: n, placeholder: r = "Select…",
1018
1070
  {
1019
1071
  className: "nc-button nc-ghost",
1020
1072
  style: { padding: 0, minHeight: 0, height: 20, width: 20, display: "inline-flex", alignItems: "center", justifyContent: "center", border: "none" },
1021
- onClick: () => v(d),
1073
+ onClick: () => b(d),
1022
1074
  "aria-label": `Remove ${m.label}`,
1023
1075
  children: "✕"
1024
1076
  }
@@ -1039,7 +1091,7 @@ function or({ values: e, onChange: t, options: n, placeholder: r = "Select…",
1039
1091
  i && /* @__PURE__ */ N("div", { className: "nc-combo-dropdown", style: { position: "absolute", top: "100%", left: 0, right: 0, zIndex: 10, marginTop: 4, boxShadow: "0 4px 12px var(--nc-shadow)" }, children: [
1040
1092
  f.map((d) => {
1041
1093
  const m = e.includes(d.value);
1042
- return /* @__PURE__ */ N("div", { className: "nc-section nc-row", style: { justifyContent: "space-between", cursor: "pointer", padding: 12 }, onMouseDown: () => v(d.value), children: [
1094
+ return /* @__PURE__ */ N("div", { className: "nc-section nc-row", style: { justifyContent: "space-between", cursor: "pointer", padding: 12 }, onMouseDown: () => b(d.value), children: [
1043
1095
  /* @__PURE__ */ s("span", { children: d.label }),
1044
1096
  /* @__PURE__ */ s("span", { children: m ? "✔️" : "" })
1045
1097
  ] }, d.value);
@@ -1048,7 +1100,7 @@ function or({ values: e, onChange: t, options: n, placeholder: r = "Select…",
1048
1100
  ] })
1049
1101
  ] });
1050
1102
  }
1051
- function ge(e) {
1103
+ function Ne(e) {
1052
1104
  if (!e) return null;
1053
1105
  const t = /^\d{2}-\d{1,2}$/, n = /^\d{4}-\d{1,2}$/;
1054
1106
  if (!t.test(e) && !n.test(e))
@@ -1056,7 +1108,7 @@ function ge(e) {
1056
1108
  const r = e.split("-"), o = parseInt(r[1], 10);
1057
1109
  return o < 1 || o > 12 ? "Month must be between 1 and 12" : null;
1058
1110
  }
1059
- function ue(e) {
1111
+ function xe(e) {
1060
1112
  if (!e) return "";
1061
1113
  const t = e.split("-");
1062
1114
  if (t.length !== 2) return e;
@@ -1068,14 +1120,14 @@ function ue(e) {
1068
1120
  }
1069
1121
  return `${n}-${r}`;
1070
1122
  }
1071
- function Ve(e) {
1123
+ function Ge(e) {
1072
1124
  if (!e) return "";
1073
- const t = ue(e);
1125
+ const t = xe(e);
1074
1126
  if (!/^\d{4}-\d{2}$/.test(t)) return e;
1075
1127
  const [n, r] = t.split("-");
1076
1128
  return `${n}/${r}`;
1077
1129
  }
1078
- function Oe() {
1130
+ function Ye() {
1079
1131
  const e = /* @__PURE__ */ new Date(), t = e.getFullYear(), n = String(e.getMonth() + 1).padStart(2, "0");
1080
1132
  return `${t}-${n}`;
1081
1133
  }
@@ -1088,41 +1140,41 @@ function sr({
1088
1140
  disabled: i = !1,
1089
1141
  size: a = "default"
1090
1142
  }) {
1091
- const [c, l] = E(!1), [u, f] = E(""), [v, d] = E(""), [m, y] = E({ top: 0, left: 0, width: 0, right: void 0 }), b = H(null), w = H(null);
1092
- z(() => {
1093
- if (c && b.current) {
1094
- const S = b.current.getBoundingClientRect(), L = Math.max(S.width, 400);
1095
- window.innerWidth - S.left < L && S.right >= L ? y({
1096
- top: S.bottom + 4,
1143
+ const [c, l] = T(!1), [u, f] = T(""), [b, d] = T(""), [m, A] = T({ top: 0, left: 0, width: 0, right: void 0 }), v = O(null), w = O(null);
1144
+ D(() => {
1145
+ if (c && v.current) {
1146
+ const k = v.current.getBoundingClientRect(), z = Math.max(k.width, 400);
1147
+ window.innerWidth - k.left < z && k.right >= z ? A({
1148
+ top: k.bottom + 4,
1097
1149
  left: 0,
1098
1150
  // Not used but type needs it, let's just use 0
1099
- right: window.innerWidth - S.right,
1100
- width: L
1101
- }) : y({
1102
- top: S.bottom + 4,
1103
- left: S.left,
1151
+ right: window.innerWidth - k.right,
1152
+ width: z
1153
+ }) : A({
1154
+ top: k.bottom + 4,
1155
+ left: k.left,
1104
1156
  right: void 0,
1105
- width: L
1157
+ width: z
1106
1158
  });
1107
1159
  }
1108
- }, [c]), z(() => {
1160
+ }, [c]), D(() => {
1109
1161
  if (!c) return;
1110
- const S = ($) => {
1111
- b.current && !b.current.contains($.target) && w.current && !w.current.contains($.target) && l(!1);
1162
+ const k = (C) => {
1163
+ v.current && !v.current.contains(C.target) && w.current && !w.current.contains(C.target) && l(!1);
1112
1164
  };
1113
- return document.addEventListener("mousedown", S), () => document.removeEventListener("mousedown", S);
1165
+ return document.addEventListener("mousedown", k), () => document.removeEventListener("mousedown", k);
1114
1166
  }, [c]);
1115
- const k = () => {
1116
- f(e || Oe()), d(t || Oe()), l(!0);
1117
- }, g = () => {
1167
+ const y = () => {
1168
+ f(e || Ye()), d(t || Ye()), l(!0);
1169
+ }, h = () => {
1118
1170
  l(!1);
1119
1171
  }, p = () => {
1120
- const S = ge(u), $ = ge(v);
1121
- if (S || $)
1172
+ const k = Ne(u), C = Ne(b);
1173
+ if (k || C)
1122
1174
  return;
1123
- const L = ue(u), O = ue(v);
1124
- L && O && (n == null || n(L, O)), l(!1);
1125
- }, h = e && t ? `${Ve(e)} - ${Ve(t)}` : "Select month range", A = ge(u), C = ge(v), T = ue(u), P = ue(v), x = T && P && T > P, I = c ? pe(
1175
+ const z = xe(u), H = xe(b);
1176
+ z && H && (n == null || n(z, H)), l(!1);
1177
+ }, g = e && t ? `${Ge(e)} - ${Ge(t)}` : "Select month range", x = Ne(u), $ = Ne(b), R = xe(u), E = xe(b), S = R && E && R > E, L = c ? ke(
1126
1178
  /* @__PURE__ */ s(
1127
1179
  "div",
1128
1180
  {
@@ -1143,13 +1195,13 @@ function sr({
1143
1195
  "input",
1144
1196
  {
1145
1197
  type: "text",
1146
- className: `nc-month-input ${A ? "nc-error" : ""}`,
1198
+ className: `nc-month-input ${x ? "nc-error" : ""}`,
1147
1199
  value: u,
1148
- onChange: (S) => f(S.target.value),
1200
+ onChange: (k) => f(k.target.value),
1149
1201
  placeholder: "YY-M(M) or YYYY-M(M)"
1150
1202
  }
1151
1203
  ),
1152
- A && /* @__PURE__ */ s("div", { className: "nc-month-error-text", children: A })
1204
+ x && /* @__PURE__ */ s("div", { className: "nc-month-error-text", children: x })
1153
1205
  ] }),
1154
1206
  /* @__PURE__ */ N("div", { className: "nc-month-range-picker-column", children: [
1155
1207
  /* @__PURE__ */ s("label", { className: "nc-label", children: "End Month" }),
@@ -1157,27 +1209,27 @@ function sr({
1157
1209
  "input",
1158
1210
  {
1159
1211
  type: "text",
1160
- className: `nc-month-input ${C ? "nc-error" : ""}`,
1161
- value: v,
1162
- onChange: (S) => d(S.target.value),
1212
+ className: `nc-month-input ${$ ? "nc-error" : ""}`,
1213
+ value: b,
1214
+ onChange: (k) => d(k.target.value),
1163
1215
  placeholder: "YY-M(M) or YYYY-M(M)"
1164
1216
  }
1165
1217
  ),
1166
- C && /* @__PURE__ */ s("div", { className: "nc-month-error-text", children: C })
1218
+ $ && /* @__PURE__ */ s("div", { className: "nc-month-error-text", children: $ })
1167
1219
  ] })
1168
1220
  ] }),
1169
- x && !A && !C && /* @__PURE__ */ s("div", { className: "nc-month-range-error", children: "End month must be after or equal to start month" }),
1221
+ S && !x && !$ && /* @__PURE__ */ s("div", { className: "nc-month-range-error", children: "End month must be after or equal to start month" }),
1170
1222
  /* @__PURE__ */ N("div", { className: "nc-month-range-picker-footer", children: [
1171
1223
  /* @__PURE__ */ s(
1172
- X,
1224
+ ee,
1173
1225
  {
1174
1226
  variant: "primary",
1175
1227
  onClick: p,
1176
- disabled: !u || !v || !!A || !!C || !!x,
1228
+ disabled: !u || !b || !!x || !!$ || !!S,
1177
1229
  children: "Apply"
1178
1230
  }
1179
1231
  ),
1180
- /* @__PURE__ */ s(X, { variant: "ghost", onClick: g, children: "Cancel" })
1232
+ /* @__PURE__ */ s(ee, { variant: "ghost", onClick: h, children: "Cancel" })
1181
1233
  ] })
1182
1234
  ] })
1183
1235
  }
@@ -1189,14 +1241,14 @@ function sr({
1189
1241
  /* @__PURE__ */ s(
1190
1242
  "button",
1191
1243
  {
1192
- ref: b,
1244
+ ref: v,
1193
1245
  className: `nc-month-range-picker-input${a === "small" ? " nc-small" : ""}`,
1194
- onClick: k,
1246
+ onClick: y,
1195
1247
  disabled: i,
1196
- children: h
1248
+ children: g
1197
1249
  }
1198
1250
  ),
1199
- I
1251
+ L
1200
1252
  ] });
1201
1253
  }
1202
1254
  function ir({ value: e, onChange: t, min: n, max: r, step: o = 1, label: i, disabled: a, size: c = "default" }) {
@@ -1262,7 +1314,7 @@ function cr({
1262
1314
  const f = (d) => {
1263
1315
  const m = parseFloat(d.target.value);
1264
1316
  t(m);
1265
- }, v = (e - n) / (r - n) * 100;
1317
+ }, b = (e - n) / (r - n) * 100;
1266
1318
  return /* @__PURE__ */ N("div", { className: "nc-col", style: { gap: 6 }, children: [
1267
1319
  i && /* @__PURE__ */ s("span", { className: "nc-label", children: i }),
1268
1320
  /* @__PURE__ */ N("div", { style: { display: "flex", gap: 12, alignItems: "center" }, children: [
@@ -1279,7 +1331,7 @@ function cr({
1279
1331
  disabled: a,
1280
1332
  style: {
1281
1333
  width: u,
1282
- "--nc-slider-percentage": `${v}%`
1334
+ "--nc-slider-percentage": `${b}%`
1283
1335
  }
1284
1336
  }
1285
1337
  ),
@@ -1299,13 +1351,13 @@ function cr({
1299
1351
  ] })
1300
1352
  ] });
1301
1353
  }
1302
- const Dt = ({ size: e = 24, className: t, style: n }) => /* @__PURE__ */ s("svg", { width: e, height: e, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round", className: t, style: n, children: /* @__PURE__ */ s("polyline", { points: "18 15 12 9 6 15" }) });
1303
- function Wt({ children: e, className: t = "", style: n }) {
1354
+ const Wt = ({ size: e = 24, className: t, style: n }) => /* @__PURE__ */ s("svg", { width: e, height: e, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round", className: t, style: n, children: /* @__PURE__ */ s("polyline", { points: "18 15 12 9 6 15" }) });
1355
+ function Ht({ children: e, className: t = "", style: n }) {
1304
1356
  return /* @__PURE__ */ s("div", { className: `nc-tab-panel ${t}`, style: n, children: e });
1305
1357
  }
1306
1358
  function ar({ active: e, children: t, keepMounted: n = !1, className: r = "", style: o }) {
1307
- const i = xt.toArray(t).filter(
1308
- (c) => kt(c) && (c.type === Wt || c.type.displayName === "TabPanel")
1359
+ const i = kt.toArray(t).filter(
1360
+ (c) => Nt(c) && (c.type === Ht || c.type.displayName === "TabPanel")
1309
1361
  );
1310
1362
  if (n)
1311
1363
  return /* @__PURE__ */ s("div", { className: `nc-tab-panels ${r}`, style: o, children: i.map((c) => {
@@ -1325,86 +1377,86 @@ function ar({ active: e, children: t, keepMounted: n = !1, className: r = "", st
1325
1377
  return /* @__PURE__ */ s("div", { className: `nc-tab-panels ${r}`, style: o, children: a });
1326
1378
  }
1327
1379
  function lr({ tabs: e, active: t, onChange: n, onClose: r, permanentTabs: o, className: i, toolbar: a, multiline: c, orientation: l = "horizontal", style: u }) {
1328
- const f = H(null), [v, d] = E(!1), [m, y] = E(!1), b = l === "verticalLeft" || l === "verticalRight", w = H(!1), k = H(0), g = H(0), p = H(!1);
1329
- z(() => {
1330
- const x = () => {
1380
+ const f = O(null), [b, d] = T(!1), [m, A] = T(!1), v = l === "verticalLeft" || l === "verticalRight", w = O(!1), y = O(0), h = O(0), p = O(!1);
1381
+ D(() => {
1382
+ const S = () => {
1331
1383
  if (f.current)
1332
- if (b) {
1333
- const { scrollTop: S, scrollHeight: $, clientHeight: L } = f.current;
1334
- d(S > 1), y(S < $ - L - 1);
1384
+ if (v) {
1385
+ const { scrollTop: k, scrollHeight: C, clientHeight: z } = f.current;
1386
+ d(k > 1), A(k < C - z - 1);
1335
1387
  } else {
1336
- const { scrollLeft: S, scrollWidth: $, clientWidth: L } = f.current;
1337
- d(S > 1), y(S < $ - L - 1);
1388
+ const { scrollLeft: k, scrollWidth: C, clientWidth: z } = f.current;
1389
+ d(k > 1), A(k < C - z - 1);
1338
1390
  }
1339
- }, I = f.current;
1340
- if (I)
1341
- return x(), I.addEventListener("scroll", x), window.addEventListener("resize", x), () => {
1342
- I.removeEventListener("scroll", x), window.removeEventListener("resize", x);
1391
+ }, L = f.current;
1392
+ if (L)
1393
+ return S(), L.addEventListener("scroll", S), window.addEventListener("resize", S), () => {
1394
+ L.removeEventListener("scroll", S), window.removeEventListener("resize", S);
1343
1395
  };
1344
- }, [e, b]);
1345
- const h = (x) => {
1346
- f.current && (w.current = !0, p.current = !1, k.current = b ? x.clientY : x.clientX, g.current = b ? f.current.scrollTop : f.current.scrollLeft, f.current.style.cursor = "grabbing", f.current.style.userSelect = "none");
1347
- }, A = (x) => {
1396
+ }, [e, v]);
1397
+ const g = (S) => {
1398
+ f.current && (w.current = !0, p.current = !1, y.current = v ? S.clientY : S.clientX, h.current = v ? f.current.scrollTop : f.current.scrollLeft, f.current.style.cursor = "grabbing", f.current.style.userSelect = "none");
1399
+ }, x = (S) => {
1348
1400
  if (!w.current || !f.current) return;
1349
- const I = b ? x.clientY : x.clientX, S = k.current - I;
1350
- Math.abs(S) > 3 && (p.current = !0), b ? f.current.scrollTop = g.current + S : f.current.scrollLeft = g.current + S;
1351
- }, C = () => {
1401
+ const L = v ? S.clientY : S.clientX, k = y.current - L;
1402
+ Math.abs(k) > 3 && (p.current = !0), v ? f.current.scrollTop = h.current + k : f.current.scrollLeft = h.current + k;
1403
+ }, $ = () => {
1352
1404
  f.current && (w.current = !1, f.current.style.cursor = "", f.current.style.userSelect = "");
1353
- }, T = () => {
1354
- C();
1405
+ }, R = () => {
1406
+ $();
1355
1407
  };
1356
- z(() => {
1357
- const x = f.current;
1358
- if (!x || b) return;
1359
- const I = (S) => {
1360
- S.deltaY !== 0 && (S.preventDefault(), x.scrollLeft += S.deltaY * 0.3);
1408
+ D(() => {
1409
+ const S = f.current;
1410
+ if (!S || v) return;
1411
+ const L = (k) => {
1412
+ k.deltaY !== 0 && (k.preventDefault(), S.scrollLeft += k.deltaY * 0.3);
1361
1413
  };
1362
- return x.addEventListener("wheel", I, { passive: !1 }), () => {
1363
- x.removeEventListener("wheel", I);
1414
+ return S.addEventListener("wheel", L, { passive: !1 }), () => {
1415
+ S.removeEventListener("wheel", L);
1364
1416
  };
1365
- }, [b]);
1366
- const P = (x) => {
1367
- p.current || n(x);
1417
+ }, [v]);
1418
+ const E = (S) => {
1419
+ p.current || n(S);
1368
1420
  };
1369
- return /* @__PURE__ */ N("div", { className: `nc-tab-container ${b ? `nc-vertical nc-${l}` : ""} ${i || ""}`, style: u, children: [
1421
+ return /* @__PURE__ */ N("div", { className: `nc-tab-container ${v ? `nc-vertical nc-${l}` : ""} ${i || ""}`, style: u, children: [
1370
1422
  /* @__PURE__ */ N("div", { className: "nc-tab-scroll-wrapper", children: [
1371
- v && /* @__PURE__ */ s("div", { className: `nc-tab-scroll-indicator ${b ? "nc-top" : "nc-left"}`, children: b ? /* @__PURE__ */ s(Dt, { size: 16 }) : /* @__PURE__ */ s(vt, { size: 16 }) }),
1423
+ b && /* @__PURE__ */ s("div", { className: `nc-tab-scroll-indicator ${v ? "nc-top" : "nc-left"}`, children: v ? /* @__PURE__ */ s(Wt, { size: 16 }) : /* @__PURE__ */ s(wt, { size: 16 }) }),
1372
1424
  /* @__PURE__ */ s(
1373
1425
  "div",
1374
1426
  {
1375
1427
  ref: f,
1376
1428
  className: `nc-tab-scroll ${c ? "nc-multiline" : ""}`,
1377
- onMouseDown: h,
1378
- onMouseMove: A,
1379
- onMouseUp: C,
1380
- onMouseLeave: T,
1429
+ onMouseDown: g,
1430
+ onMouseMove: x,
1431
+ onMouseUp: $,
1432
+ onMouseLeave: R,
1381
1433
  style: { cursor: "grab" },
1382
- children: e.map((x) => {
1383
- const I = typeof x == "string" ? x : x.id, S = typeof x == "string" ? x : x.label, $ = r && !(o != null && o.includes(I));
1434
+ children: e.map((S) => {
1435
+ const L = typeof S == "string" ? S : S.id, k = typeof S == "string" ? S : S.label, C = r && !(o != null && o.includes(L));
1384
1436
  return /* @__PURE__ */ N(
1385
1437
  "div",
1386
1438
  {
1387
- className: `nc-tab-item ${t === I ? "nc-active" : ""} ${$ ? "nc-closable" : ""}`,
1388
- onClick: () => P(I),
1439
+ className: `nc-tab-item ${t === L ? "nc-active" : ""} ${C ? "nc-closable" : ""}`,
1440
+ onClick: () => E(L),
1389
1441
  role: "button",
1390
1442
  tabIndex: 0,
1391
- onKeyDown: (L) => {
1392
- (L.key === "Enter" || L.key === " ") && n(I);
1443
+ onKeyDown: (z) => {
1444
+ (z.key === "Enter" || z.key === " ") && n(L);
1393
1445
  },
1394
1446
  children: [
1395
- /* @__PURE__ */ s("span", { className: "nc-tab-label", children: b ? S : typeof S == "string" ? S.toUpperCase() : S }),
1396
- $ && /* @__PURE__ */ s(
1447
+ /* @__PURE__ */ s("span", { className: "nc-tab-label", children: v ? k : typeof k == "string" ? k.toUpperCase() : k }),
1448
+ C && /* @__PURE__ */ s(
1397
1449
  "span",
1398
1450
  {
1399
1451
  className: "nc-tab-close",
1400
1452
  role: "button",
1401
1453
  tabIndex: 0,
1402
- "aria-label": `Close ${typeof S == "string" ? S : I}`,
1403
- onClick: (L) => {
1404
- L.stopPropagation(), r(I);
1454
+ "aria-label": `Close ${typeof k == "string" ? k : L}`,
1455
+ onClick: (z) => {
1456
+ z.stopPropagation(), r(L);
1405
1457
  },
1406
- onKeyDown: (L) => {
1407
- (L.key === "Enter" || L.key === " ") && (L.stopPropagation(), r(I));
1458
+ onKeyDown: (z) => {
1459
+ (z.key === "Enter" || z.key === " ") && (z.stopPropagation(), r(L));
1408
1460
  },
1409
1461
  children: /* @__PURE__ */ N("svg", { width: "14", height: "14", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round", children: [
1410
1462
  /* @__PURE__ */ s("line", { x1: "18", y1: "6", x2: "6", y2: "18" }),
@@ -1414,12 +1466,12 @@ function lr({ tabs: e, active: t, onChange: n, onClose: r, permanentTabs: o, cla
1414
1466
  )
1415
1467
  ]
1416
1468
  },
1417
- I
1469
+ L
1418
1470
  );
1419
1471
  })
1420
1472
  }
1421
1473
  ),
1422
- m && /* @__PURE__ */ s("div", { className: `nc-tab-scroll-indicator ${b ? "nc-bottom" : "nc-right"}`, children: b ? /* @__PURE__ */ s(wt, { size: 16 }) : /* @__PURE__ */ s(yt, { size: 16 }) })
1474
+ m && /* @__PURE__ */ s("div", { className: `nc-tab-scroll-indicator ${v ? "nc-bottom" : "nc-right"}`, children: v ? /* @__PURE__ */ s(yt, { size: 16 }) : /* @__PURE__ */ s(xt, { size: 16 }) })
1423
1475
  ] }),
1424
1476
  a && /* @__PURE__ */ s("div", { className: "nc-tab-toolbar", children: a })
1425
1477
  ] });
@@ -1476,7 +1528,7 @@ function dr({ checked: e, onChange: t, disabled: n, label: r }) {
1476
1528
  }
1477
1529
  );
1478
1530
  }
1479
- const Fe = [
1531
+ const Ke = [
1480
1532
  "var(--nc-csv-col-0)",
1481
1533
  "var(--nc-csv-col-1)",
1482
1534
  "var(--nc-csv-col-2)",
@@ -1488,24 +1540,24 @@ const Fe = [
1488
1540
  "var(--nc-csv-col-8)",
1489
1541
  "var(--nc-csv-col-9)"
1490
1542
  ];
1491
- function Ht(e, t) {
1543
+ function Vt(e, t) {
1492
1544
  const r = e.slice(0, t).split(`
1493
1545
  `), o = r.length, a = r[o - 1].split(" "), c = a.length, l = a[c - 1].length + 1;
1494
1546
  return { line: o, column: c, character: l, offset: t };
1495
1547
  }
1496
- function Vt(e, t, n, r) {
1548
+ function Ot(e, t, n, r) {
1497
1549
  const o = e.split(`
1498
1550
  `), i = Math.max(1, Math.min(t, o.length));
1499
1551
  let a = 0;
1500
- for (let v = 0; v < i - 1; v++)
1501
- a += o[v].length + 1;
1552
+ for (let b = 0; b < i - 1; b++)
1553
+ a += o[b].length + 1;
1502
1554
  const l = o[i - 1].split(" "), u = Math.max(1, Math.min(n, l.length));
1503
- for (let v = 0; v < u - 1; v++)
1504
- a += l[v].length + 1;
1555
+ for (let b = 0; b < u - 1; b++)
1556
+ a += l[b].length + 1;
1505
1557
  const f = Math.max(1, Math.min(r, l[u - 1].length + 1));
1506
1558
  return a += f - 1, a;
1507
1559
  }
1508
- function Ot(e, t) {
1560
+ function Ft(e, t) {
1509
1561
  const n = e.split(`
1510
1562
  `), r = Math.max(1, Math.min(t, n.length));
1511
1563
  let o = 0;
@@ -1513,76 +1565,76 @@ function Ot(e, t) {
1513
1565
  o += n[i].length + 1;
1514
1566
  return o;
1515
1567
  }
1516
- const ur = Nt(
1568
+ const ur = At(
1517
1569
  function({ value: t, onChange: n, placeholder: r, className: o, style: i, showLineNumbers: a = !1, onCursorChange: c, highlightLine: l }, u) {
1518
- const f = H(null), v = H(null), d = H(null);
1519
- At(u, () => ({
1520
- goToLine(g) {
1570
+ const f = O(null), b = O(null), d = O(null);
1571
+ St(u, () => ({
1572
+ goToLine(h) {
1521
1573
  const p = f.current;
1522
1574
  if (!p) return;
1523
- const h = Ot(t, g);
1524
- p.focus(), p.setSelectionRange(h, h);
1525
- const A = parseFloat(getComputedStyle(p).lineHeight) || 18;
1526
- p.scrollTop = (Math.max(1, g) - 1) * A, y(), m();
1575
+ const g = Ft(t, h);
1576
+ p.focus(), p.setSelectionRange(g, g);
1577
+ const x = parseFloat(getComputedStyle(p).lineHeight) || 18;
1578
+ p.scrollTop = (Math.max(1, h) - 1) * x, A(), m();
1527
1579
  },
1528
- goToPosition(g, p, h) {
1529
- const A = f.current;
1530
- if (!A) return;
1531
- const C = Vt(t, g, p, h);
1532
- A.focus(), A.setSelectionRange(C, C);
1533
- const T = parseFloat(getComputedStyle(A).lineHeight) || 18;
1534
- A.scrollTop = (Math.max(1, g) - 1) * T, y(), m();
1580
+ goToPosition(h, p, g) {
1581
+ const x = f.current;
1582
+ if (!x) return;
1583
+ const $ = Ot(t, h, p, g);
1584
+ x.focus(), x.setSelectionRange($, $);
1585
+ const R = parseFloat(getComputedStyle(x).lineHeight) || 18;
1586
+ x.scrollTop = (Math.max(1, h) - 1) * R, A(), m();
1535
1587
  }
1536
1588
  }), [t]);
1537
- const m = V(() => {
1589
+ const m = Y(() => {
1538
1590
  if (!c || !f.current) return;
1539
- const g = Ht(t, f.current.selectionStart);
1540
- c(g);
1541
- }, [c, t]), y = V(() => {
1542
- const g = f.current;
1543
- g && (v.current && (v.current.scrollTop = g.scrollTop, v.current.scrollLeft = g.scrollLeft), d.current && (d.current.scrollTop = g.scrollTop));
1591
+ const h = Vt(t, f.current.selectionStart);
1592
+ c(h);
1593
+ }, [c, t]), A = Y(() => {
1594
+ const h = f.current;
1595
+ h && (b.current && (b.current.scrollTop = h.scrollTop, b.current.scrollLeft = h.scrollLeft), d.current && (d.current.scrollTop = h.scrollTop));
1544
1596
  }, []);
1545
- z(() => {
1597
+ D(() => {
1546
1598
  if (l == null || l < 1) return;
1547
- const g = f.current;
1548
- if (!g) return;
1549
- const p = parseFloat(getComputedStyle(g).lineHeight) || 18, h = (l - 1) * p, A = h + p;
1550
- (h < g.scrollTop || A > g.scrollTop + g.clientHeight) && (g.scrollTop = h - g.clientHeight / 2 + p / 2), y();
1599
+ const h = f.current;
1600
+ if (!h) return;
1601
+ const p = parseFloat(getComputedStyle(h).lineHeight) || 18, g = (l - 1) * p, x = g + p;
1602
+ (g < h.scrollTop || x > h.scrollTop + h.clientHeight) && (h.scrollTop = g - h.clientHeight / 2 + p / 2), A();
1551
1603
  }, [l]);
1552
- const b = we(() => t.split(`
1604
+ const v = Ce(() => t.split(`
1553
1605
  `).length, [t]), w = () => {
1554
- const g = [];
1555
- for (let p = 1; p <= b; p++)
1556
- g.push(
1606
+ const h = [];
1607
+ for (let p = 1; p <= v; p++)
1608
+ h.push(
1557
1609
  /* @__PURE__ */ s("div", { className: `nc-csv-line-number ${l === p ? "nc-csv-highlight" : ""}`, children: p }, p)
1558
1610
  );
1559
- return /* @__PURE__ */ s("div", { className: "nc-csv-gutter", ref: d, children: g });
1560
- }, k = (g) => g ? g.split(`
1561
- `).map((h, A) => {
1562
- const C = h.split(" ");
1563
- return /* @__PURE__ */ N("div", { className: `nc-csv-line ${l === A + 1 ? "nc-csv-highlight" : ""}`, children: [
1564
- C.map((T, P) => /* @__PURE__ */ N("span", { children: [
1565
- P > 0 && /* @__PURE__ */ s("span", { className: "nc-csv-tab-char", children: " " }),
1566
- /* @__PURE__ */ s("span", { style: { color: Fe[P % Fe.length] }, children: T })
1567
- ] }, P)),
1568
- h === "" && `
1611
+ return /* @__PURE__ */ s("div", { className: "nc-csv-gutter", ref: d, children: h });
1612
+ }, y = (h) => h ? h.split(`
1613
+ `).map((g, x) => {
1614
+ const $ = g.split(" ");
1615
+ return /* @__PURE__ */ N("div", { className: `nc-csv-line ${l === x + 1 ? "nc-csv-highlight" : ""}`, children: [
1616
+ $.map((R, E) => /* @__PURE__ */ N("span", { children: [
1617
+ E > 0 && /* @__PURE__ */ s("span", { className: "nc-csv-tab-char", children: " " }),
1618
+ /* @__PURE__ */ s("span", { style: { color: Ke[E % Ke.length] }, children: R })
1619
+ ] }, E)),
1620
+ g === "" && `
1569
1621
  `
1570
- ] }, A);
1622
+ ] }, x);
1571
1623
  }) : null;
1572
1624
  return /* @__PURE__ */ N("div", { className: `nc-csv-textarea-container ${a ? "nc-csv-with-gutter" : ""} ${o ?? ""}`, style: i, children: [
1573
1625
  a && w(),
1574
1626
  /* @__PURE__ */ N("div", { className: "nc-csv-textarea-editor", children: [
1575
- /* @__PURE__ */ s("div", { className: "nc-csv-textarea-backdrop", ref: v, children: /* @__PURE__ */ s("pre", { className: "nc-csv-textarea-highlights", children: k(t) }) }),
1627
+ /* @__PURE__ */ s("div", { className: "nc-csv-textarea-backdrop", ref: b, children: /* @__PURE__ */ s("pre", { className: "nc-csv-textarea-highlights", children: y(t) }) }),
1576
1628
  /* @__PURE__ */ s(
1577
1629
  "textarea",
1578
1630
  {
1579
1631
  ref: f,
1580
1632
  className: "nc-csv-textarea-input",
1581
1633
  value: t,
1582
- onChange: (g) => {
1583
- n(g.target.value), requestAnimationFrame(m);
1634
+ onChange: (h) => {
1635
+ n(h.target.value), requestAnimationFrame(m);
1584
1636
  },
1585
- onScroll: y,
1637
+ onScroll: A,
1586
1638
  onSelect: m,
1587
1639
  onKeyUp: m,
1588
1640
  onClick: m,
@@ -1596,27 +1648,27 @@ const ur = Nt(
1596
1648
  ] });
1597
1649
  }
1598
1650
  );
1599
- let re = { notifications: [] };
1600
- const Ae = /* @__PURE__ */ new Set(), je = /* @__PURE__ */ new Map();
1601
- function Se() {
1602
- const e = re.notifications.slice();
1603
- for (const t of Array.from(Ae))
1651
+ let le = { notifications: [] };
1652
+ const Me = /* @__PURE__ */ new Set(), _e = /* @__PURE__ */ new Map();
1653
+ function Ie() {
1654
+ const e = le.notifications.slice();
1655
+ for (const t of Array.from(Me))
1604
1656
  try {
1605
1657
  t(e);
1606
1658
  } catch {
1607
1659
  }
1608
1660
  }
1609
- function Ft(e) {
1610
- Ae.add(e);
1661
+ function jt(e) {
1662
+ Me.add(e);
1611
1663
  try {
1612
- e(re.notifications.slice());
1664
+ e(le.notifications.slice());
1613
1665
  } catch {
1614
1666
  }
1615
1667
  return () => {
1616
- Ae.delete(e);
1668
+ Me.delete(e);
1617
1669
  };
1618
1670
  }
1619
- function jt(e) {
1671
+ function Gt(e) {
1620
1672
  const t = `notification-${Date.now()}-${Math.random()}`, { duration: n, type: r, ...o } = e, i = {
1621
1673
  id: t,
1622
1674
  dismissible: !0,
@@ -1624,20 +1676,20 @@ function jt(e) {
1624
1676
  type: r === "error" ? "danger" : r ?? "info",
1625
1677
  duration: n ?? 5e3
1626
1678
  };
1627
- return re.notifications = [i, ...re.notifications], Se(), i.duration && i.duration > 0 && setTimeout(() => {
1628
- Xe(t);
1679
+ return le.notifications = [i, ...le.notifications], Ie(), i.duration && i.duration > 0 && setTimeout(() => {
1680
+ et(t);
1629
1681
  }, i.duration), t;
1630
1682
  }
1631
- function Xe(e) {
1632
- const t = re.notifications.find((r) => r.id === e);
1683
+ function et(e) {
1684
+ const t = le.notifications.find((r) => r.id === e);
1633
1685
  if (!t) return;
1634
- t.isRemoving = !0, Se();
1686
+ t.isRemoving = !0, Ie();
1635
1687
  const n = window.setTimeout(() => {
1636
- re.notifications = re.notifications.filter((r) => r.id !== e), Se(), je.delete(e);
1688
+ le.notifications = le.notifications.filter((r) => r.id !== e), Ie(), _e.delete(e);
1637
1689
  }, 300);
1638
- je.set(e, n);
1690
+ _e.set(e, n);
1639
1691
  }
1640
- function Gt({ type: e }) {
1692
+ function Yt({ type: e }) {
1641
1693
  switch (e) {
1642
1694
  case "success":
1643
1695
  return /* @__PURE__ */ s("svg", { viewBox: "0 0 20 20", fill: "none", "aria-hidden": "true", children: /* @__PURE__ */ s(
@@ -1678,8 +1730,8 @@ function Gt({ type: e }) {
1678
1730
  ] });
1679
1731
  }
1680
1732
  }
1681
- function Yt({ notification: e }) {
1682
- const { t } = Z(), n = e.type || "info", r = () => {
1733
+ function Kt({ notification: e }) {
1734
+ const { t } = ne(), n = e.type || "info", r = () => {
1683
1735
  if (e.title) return e.title;
1684
1736
  switch (n) {
1685
1737
  case "success":
@@ -1692,14 +1744,14 @@ function Yt({ notification: e }) {
1692
1744
  return t("common.info");
1693
1745
  }
1694
1746
  }, o = () => {
1695
- Xe(e.id);
1747
+ et(e.id);
1696
1748
  };
1697
1749
  return /* @__PURE__ */ s(
1698
1750
  "div",
1699
1751
  {
1700
1752
  className: `nc-notification nc-notification-${n}`,
1701
1753
  children: /* @__PURE__ */ N("div", { className: "nc-notification-content", children: [
1702
- /* @__PURE__ */ s("div", { className: `nc-notification-icon nc-notification-icon-${n}`, children: /* @__PURE__ */ s(Gt, { type: n }) }),
1754
+ /* @__PURE__ */ s("div", { className: `nc-notification-icon nc-notification-icon-${n}`, children: /* @__PURE__ */ s(Yt, { type: n }) }),
1703
1755
  /* @__PURE__ */ N("div", { className: "nc-notification-body", children: [
1704
1756
  /* @__PURE__ */ s("div", { className: "nc-notification-title", children: r() }),
1705
1757
  /* @__PURE__ */ s("div", { className: "nc-notification-message", children: e.message })
@@ -1710,7 +1762,7 @@ function Yt({ notification: e }) {
1710
1762
  className: "nc-notification-dismiss",
1711
1763
  onClick: o,
1712
1764
  "aria-label": t("common.close"),
1713
- children: /* @__PURE__ */ s($e, { size: 16 })
1765
+ children: /* @__PURE__ */ s(Ee, { size: 16 })
1714
1766
  }
1715
1767
  )
1716
1768
  ] })
@@ -1718,23 +1770,23 @@ function Yt({ notification: e }) {
1718
1770
  );
1719
1771
  }
1720
1772
  function pr() {
1721
- const [e, t] = E([]), [n, r] = E(/* @__PURE__ */ new Map()), [o, i] = E(/* @__PURE__ */ new Set()), a = H(null), c = H([]);
1722
- return z(() => Ft((u) => {
1723
- const f = new Set(c.current.map((d) => d.id)), v = u.filter((d) => !f.has(d.id)).map((d) => d.id);
1724
- v.length > 0 ? (t(u), i(new Set(v)), requestAnimationFrame(() => {
1773
+ const [e, t] = T([]), [n, r] = T(/* @__PURE__ */ new Map()), [o, i] = T(/* @__PURE__ */ new Set()), a = O(null), c = O([]);
1774
+ return D(() => jt((u) => {
1775
+ const f = new Set(c.current.map((d) => d.id)), b = u.filter((d) => !f.has(d.id)).map((d) => d.id);
1776
+ b.length > 0 ? (t(u), i(new Set(b)), requestAnimationFrame(() => {
1725
1777
  requestAnimationFrame(() => {
1726
1778
  i(/* @__PURE__ */ new Set());
1727
1779
  });
1728
1780
  })) : t(u), c.current = u;
1729
- }), []), z(() => {
1781
+ }), []), D(() => {
1730
1782
  if (!a.current) return;
1731
1783
  const l = /* @__PURE__ */ new Map();
1732
1784
  let u = 0;
1733
1785
  const f = a.current.children;
1734
- e.forEach((v, d) => {
1735
- if (l.set(v.id, u), f[d]) {
1786
+ e.forEach((b, d) => {
1787
+ if (l.set(b.id, u), f[d]) {
1736
1788
  const m = f[d].offsetHeight;
1737
- v.isRemoving || (u += m + 12);
1789
+ b.isRemoving || (u += m + 12);
1738
1790
  }
1739
1791
  }), r(l);
1740
1792
  }, [e]), /* @__PURE__ */ s(
@@ -1758,7 +1810,7 @@ function pr() {
1758
1810
  width: "100%"
1759
1811
  },
1760
1812
  children: e.map((l) => {
1761
- const u = o.has(l.id), f = l.isRemoving, v = n.get(l.id) || 0;
1813
+ const u = o.has(l.id), f = l.isRemoving, b = n.get(l.id) || 0;
1762
1814
  return /* @__PURE__ */ s(
1763
1815
  "div",
1764
1816
  {
@@ -1766,13 +1818,13 @@ function pr() {
1766
1818
  position: "absolute",
1767
1819
  top: 0,
1768
1820
  left: 0,
1769
- transform: u ? `translate3d(-40px, ${v}px, 0)` : `translate3d(0, ${v}px, 0)`,
1821
+ transform: u ? `translate3d(-40px, ${b}px, 0)` : `translate3d(0, ${b}px, 0)`,
1770
1822
  // Only animate transform when not leaving, animate opacity always
1771
1823
  transition: f ? "opacity 300ms ease-out" : "transform 300ms ease-out, opacity 300ms ease-out",
1772
1824
  opacity: f ? 0 : 1,
1773
1825
  width: "100%"
1774
1826
  },
1775
- children: /* @__PURE__ */ s(Yt, { notification: l })
1827
+ children: /* @__PURE__ */ s(Kt, { notification: l })
1776
1828
  },
1777
1829
  l.id
1778
1830
  );
@@ -1782,14 +1834,14 @@ function pr() {
1782
1834
  }
1783
1835
  );
1784
1836
  }
1785
- function Kt(e) {
1786
- return jt(e);
1837
+ function _t(e) {
1838
+ return Gt(e);
1787
1839
  }
1788
1840
  const fr = {
1789
- show: (e) => Kt(e)
1841
+ show: (e) => _t(e)
1790
1842
  };
1791
1843
  function hr(e) {
1792
- const t = Ct.createInstance(), n = {};
1844
+ const t = $t.createInstance(), n = {};
1793
1845
  for (const o in e)
1794
1846
  n[o] = { translation: e[o] };
1795
1847
  const r = typeof document < "u" && document.documentElement.lang || "en";
@@ -1809,9 +1861,9 @@ function hr(e) {
1809
1861
  }
1810
1862
  }).observe(document.documentElement, { attributes: !0 }), t;
1811
1863
  }
1812
- class _t {
1864
+ class Ut {
1813
1865
  constructor() {
1814
- Q(this, "apps", /* @__PURE__ */ new Map());
1866
+ oe(this, "apps", /* @__PURE__ */ new Map());
1815
1867
  }
1816
1868
  /**
1817
1869
  * Register an app definition.
@@ -1849,16 +1901,16 @@ class _t {
1849
1901
  return this.apps.has(t);
1850
1902
  }
1851
1903
  }
1852
- const ie = new _t(), Ge = "nc-ui-app-state";
1853
- class Ut {
1904
+ const ge = new Ut(), Ue = "nc-ui-app-state";
1905
+ class qt {
1854
1906
  constructor() {
1855
- Q(this, "state");
1856
- Q(this, "listeners", /* @__PURE__ */ new Map());
1907
+ oe(this, "state");
1908
+ oe(this, "listeners", /* @__PURE__ */ new Map());
1857
1909
  this.state = this.loadState();
1858
1910
  }
1859
1911
  loadState() {
1860
1912
  try {
1861
- const t = localStorage.getItem(Ge);
1913
+ const t = localStorage.getItem(Ue);
1862
1914
  if (t)
1863
1915
  return JSON.parse(t);
1864
1916
  } catch {
@@ -1867,7 +1919,7 @@ class Ut {
1867
1919
  }
1868
1920
  saveState() {
1869
1921
  try {
1870
- localStorage.setItem(Ge, JSON.stringify(this.state));
1922
+ localStorage.setItem(Ue, JSON.stringify(this.state));
1871
1923
  } catch {
1872
1924
  }
1873
1925
  }
@@ -1897,13 +1949,13 @@ class Ut {
1897
1949
  (r = this.listeners.get(t)) == null || r.forEach((o) => o(n));
1898
1950
  }
1899
1951
  }
1900
- const J = new Ut();
1901
- class qt {
1952
+ const te = new qt();
1953
+ class Xt {
1902
1954
  constructor() {
1903
- Q(this, "apps", []);
1904
- Q(this, "activeAppId", null);
1905
- Q(this, "listeners", /* @__PURE__ */ new Set());
1906
- Q(this, "refReadyResolvers", /* @__PURE__ */ new Map());
1955
+ oe(this, "apps", []);
1956
+ oe(this, "activeAppId", null);
1957
+ oe(this, "listeners", /* @__PURE__ */ new Set());
1958
+ oe(this, "refReadyResolvers", /* @__PURE__ */ new Map());
1907
1959
  }
1908
1960
  /**
1909
1961
  * Launch an app and wait for it to be ready (ref populated).
@@ -1915,16 +1967,16 @@ class qt {
1915
1967
  */
1916
1968
  async launchApp(t, n) {
1917
1969
  const { launchInBackground: r = !1 } = n || {};
1918
- if (!ie.has(t))
1970
+ if (!ge.has(t))
1919
1971
  return console.error(`Cannot launch app "${t}": not registered`), null;
1920
1972
  const o = this.apps.find((a) => a.appId === t);
1921
1973
  if (o)
1922
- return r || (this.setActiveApp(t), J._setActiveAppId(t)), o.ref ? o : this.waitForRef(t);
1974
+ return r || (this.setActiveApp(t), te._setActiveAppId(t)), o.ref ? o : this.waitForRef(t);
1923
1975
  const i = {
1924
1976
  appId: t,
1925
1977
  launchedAt: Date.now()
1926
1978
  };
1927
- return this.apps.push(i), r || (this.activeAppId = t, J._setActiveAppId(t)), this.notify(), this.waitForRef(t);
1979
+ return this.apps.push(i), r || (this.activeAppId = t, te._setActiveAppId(t)), this.notify(), this.waitForRef(t);
1928
1980
  }
1929
1981
  waitForRef(t) {
1930
1982
  return new Promise((n) => {
@@ -1961,7 +2013,7 @@ class qt {
1961
2013
  const r = this.apps[n];
1962
2014
  if (r.ref && (r.ref = void 0), this.apps.splice(n, 1), this.activeAppId === t) {
1963
2015
  const o = window.innerWidth >= 768;
1964
- this.activeAppId = o && this.apps.length > 0 ? this.apps[this.apps.length - 1].appId : null, J._setActiveAppId(this.activeAppId);
2016
+ this.activeAppId = o && this.apps.length > 0 ? this.apps[this.apps.length - 1].appId : null, te._setActiveAppId(this.activeAppId);
1965
2017
  }
1966
2018
  this.notify();
1967
2019
  }
@@ -1973,7 +2025,7 @@ class qt {
1973
2025
  console.warn(`Cannot activate app "${t}": not running`);
1974
2026
  return;
1975
2027
  }
1976
- this.activeAppId !== t && (this.activeAppId = t, this.notify(), J._setActiveAppId(t));
2028
+ this.activeAppId !== t && (this.activeAppId = t, this.notify(), te._setActiveAppId(t));
1977
2029
  }
1978
2030
  /**
1979
2031
  * Toggle an app: if active, deactivate; if inactive, activate.
@@ -1991,7 +2043,7 @@ class qt {
1991
2043
  * Get the currently active app definition.
1992
2044
  */
1993
2045
  getActiveApp() {
1994
- return this.activeAppId ? ie.get(this.activeAppId) ?? null : null;
2046
+ return this.activeAppId ? ge.get(this.activeAppId) ?? null : null;
1995
2047
  }
1996
2048
  /**
1997
2049
  * Get all running apps.
@@ -2017,14 +2069,14 @@ class qt {
2017
2069
  this.listeners.forEach((t) => t());
2018
2070
  }
2019
2071
  }
2020
- const _ = new qt(), Je = ce(null);
2021
- function Xt() {
2022
- const e = ne(Je);
2072
+ const q = new Xt(), tt = be(null);
2073
+ function Jt() {
2074
+ const e = ce(tt);
2023
2075
  if (!e)
2024
2076
  throw new Error("useApp must be used inside an App");
2025
2077
  return e;
2026
2078
  }
2027
- function Jt({ size: e = 16 }) {
2079
+ function Qt({ size: e = 16 }) {
2028
2080
  return /* @__PURE__ */ N(
2029
2081
  "svg",
2030
2082
  {
@@ -2053,18 +2105,18 @@ function Zt({ title: e, onClose: t, onBack: n, toolbar: r, hideBackButton: o })
2053
2105
  onClick: n,
2054
2106
  title: "Back",
2055
2107
  "aria-label": "Go back",
2056
- children: /* @__PURE__ */ s(Jt, { size: 16 })
2108
+ children: /* @__PURE__ */ s(Qt, { size: 16 })
2057
2109
  }
2058
2110
  ),
2059
2111
  /* @__PURE__ */ s("span", { className: "nc-app-title-bar-title", children: e })
2060
2112
  ] }),
2061
2113
  /* @__PURE__ */ N("div", { className: "nc-app-title-bar-right", children: [
2062
2114
  r && /* @__PURE__ */ s("div", { className: "nc-app-title-bar-toolbar", children: r }),
2063
- /* @__PURE__ */ s(Ue, { onClick: t, "aria-label": "Close application" })
2115
+ /* @__PURE__ */ s(Qe, { onClick: t, "aria-label": "Close application" })
2064
2116
  ] })
2065
2117
  ] });
2066
2118
  }
2067
- class Qt extends Me.Component {
2119
+ class en extends Le.Component {
2068
2120
  constructor(t) {
2069
2121
  super(t), this.state = { hasError: !1 };
2070
2122
  }
@@ -2097,38 +2149,38 @@ class Qt extends Me.Component {
2097
2149
  ) : this.props.children;
2098
2150
  }
2099
2151
  }
2100
- function Ze({ appId: e, isActive: t, onClose: n }) {
2101
- const { t: r } = Z(), o = ie.get(e), [i, a] = E(""), [c, l] = E(null), [u, f] = E(null), [v, d] = E(!1), [m, y] = E(!1);
2102
- Me.useEffect(() => {
2152
+ function nt({ appId: e, isActive: t, onClose: n }) {
2153
+ const { t: r } = ne(), o = ge.get(e), [i, a] = T(""), [c, l] = T(null), [u, f] = T(null), [b, d] = T(!1), [m, A] = T(!1);
2154
+ Le.useEffect(() => {
2103
2155
  o != null && o.titleKey && a(r(o.titleKey));
2104
2156
  }, [o, r]);
2105
- const b = V((x) => {
2106
- a(x);
2107
- }, []), w = V((x) => {
2108
- l(() => x);
2109
- }, []), k = V(() => {
2157
+ const v = Y((S) => {
2158
+ a(S);
2159
+ }, []), w = Y((S) => {
2160
+ l(() => S);
2161
+ }, []), y = Y(() => {
2110
2162
  l(null);
2111
- }, []), g = V((x) => {
2112
- f(x);
2113
- }, []), p = V(() => {
2163
+ }, []), h = Y((S) => {
2164
+ f(S);
2165
+ }, []), p = Y(() => {
2114
2166
  f(null);
2115
- }, []), h = V((x) => {
2116
- d(x);
2117
- }, []), A = V((x) => {
2118
- y(x);
2119
- }, []), C = we(() => ({
2120
- setTitle: b,
2167
+ }, []), g = Y((S) => {
2168
+ d(S);
2169
+ }, []), x = Y((S) => {
2170
+ A(S);
2171
+ }, []), $ = Ce(() => ({
2172
+ setTitle: v,
2121
2173
  setBackHandler: w,
2122
- clearBackHandler: k,
2123
- setToolbar: g,
2174
+ clearBackHandler: y,
2175
+ setToolbar: h,
2124
2176
  clearToolbar: p,
2125
- setHideBackButton: h,
2126
- setHideTitleBar: A,
2177
+ setHideBackButton: g,
2178
+ setHideTitleBar: x,
2127
2179
  close: n
2128
- }), [b, w, k, g, p, h, A, n]);
2180
+ }), [v, w, y, h, p, g, x, n]);
2129
2181
  if (!o)
2130
2182
  return null;
2131
- const T = o.component, P = !o.hideTitleBar && !m;
2183
+ const R = o.component, E = !o.hideTitleBar && !m;
2132
2184
  return /* @__PURE__ */ N(
2133
2185
  "div",
2134
2186
  {
@@ -2139,20 +2191,20 @@ function Ze({ appId: e, isActive: t, onClose: n }) {
2139
2191
  minHeight: 0
2140
2192
  },
2141
2193
  children: [
2142
- P && /* @__PURE__ */ s(
2194
+ E && /* @__PURE__ */ s(
2143
2195
  Zt,
2144
2196
  {
2145
2197
  title: i,
2146
2198
  onClose: n,
2147
2199
  onBack: c ?? void 0,
2148
2200
  toolbar: u,
2149
- hideBackButton: v
2201
+ hideBackButton: b
2150
2202
  }
2151
2203
  ),
2152
2204
  /* @__PURE__ */ s(
2153
2205
  "div",
2154
2206
  {
2155
- className: P ? "nc-app-content-wrapper" : "",
2207
+ className: E ? "nc-app-content-wrapper" : "",
2156
2208
  style: {
2157
2209
  padding: o.padding,
2158
2210
  flex: 1,
@@ -2162,8 +2214,8 @@ function Ze({ appId: e, isActive: t, onClose: n }) {
2162
2214
  backgroundColor: "var(--nc-bg-tertiary)",
2163
2215
  position: "relative"
2164
2216
  },
2165
- children: /* @__PURE__ */ s(Je.Provider, { value: C, children: /* @__PURE__ */ s(Qt, { appId: e, children: /* @__PURE__ */ s(
2166
- St,
2217
+ children: /* @__PURE__ */ s(tt.Provider, { value: $, children: /* @__PURE__ */ s(en, { appId: e, children: /* @__PURE__ */ s(
2218
+ Ct,
2167
2219
  {
2168
2220
  fallback: /* @__PURE__ */ s(
2169
2221
  "div",
@@ -2174,10 +2226,10 @@ function Ze({ appId: e, isActive: t, onClose: n }) {
2174
2226
  justifyContent: "center",
2175
2227
  flex: 1
2176
2228
  },
2177
- children: /* @__PURE__ */ s(_e, {})
2229
+ children: /* @__PURE__ */ s(Je, {})
2178
2230
  }
2179
2231
  ),
2180
- children: /* @__PURE__ */ s(T, {})
2232
+ children: /* @__PURE__ */ s(R, {})
2181
2233
  }
2182
2234
  ) }) })
2183
2235
  }
@@ -2186,77 +2238,77 @@ function Ze({ appId: e, isActive: t, onClose: n }) {
2186
2238
  }
2187
2239
  );
2188
2240
  }
2189
- const be = 768, ve = 1024, Qe = {
2241
+ const Ae = 768, Se = 1024, rt = {
2190
2242
  isMobile: !1,
2191
2243
  isTablet: !1,
2192
2244
  isDesktop: !0,
2193
2245
  width: typeof window < "u" ? window.innerWidth : 1024,
2194
2246
  height: typeof window < "u" ? window.innerHeight : 768
2195
- }, et = ce(Qe);
2247
+ }, ot = be(rt);
2196
2248
  function mr({ children: e }) {
2197
- const [t, n] = E(() => {
2198
- if (typeof window > "u") return Qe;
2249
+ const [t, n] = T(() => {
2250
+ if (typeof window > "u") return rt;
2199
2251
  const r = window.innerWidth, o = window.innerHeight;
2200
2252
  return {
2201
- isMobile: r < be,
2202
- isTablet: r >= be && r < ve,
2203
- isDesktop: r >= ve,
2253
+ isMobile: r < Ae,
2254
+ isTablet: r >= Ae && r < Se,
2255
+ isDesktop: r >= Se,
2204
2256
  width: r,
2205
2257
  height: o
2206
2258
  };
2207
2259
  });
2208
- return z(() => {
2260
+ return D(() => {
2209
2261
  const r = () => {
2210
2262
  const o = window.innerWidth, i = window.innerHeight;
2211
2263
  n({
2212
- isMobile: o < be,
2213
- isTablet: o >= be && o < ve,
2214
- isDesktop: o >= ve,
2264
+ isMobile: o < Ae,
2265
+ isTablet: o >= Ae && o < Se,
2266
+ isDesktop: o >= Se,
2215
2267
  width: o,
2216
2268
  height: i
2217
2269
  });
2218
2270
  };
2219
2271
  return window.addEventListener("resize", r), () => window.removeEventListener("resize", r);
2220
- }, []), /* @__PURE__ */ s(et.Provider, { value: t, children: e });
2272
+ }, []), /* @__PURE__ */ s(ot.Provider, { value: t, children: e });
2221
2273
  }
2222
- function tt() {
2223
- return ne(et);
2274
+ function st() {
2275
+ return ce(ot);
2224
2276
  }
2225
- const Ie = "-", en = (e) => {
2226
- const t = nn(e), {
2277
+ const Pe = "-", tn = (e) => {
2278
+ const t = rn(e), {
2227
2279
  conflictingClassGroups: n,
2228
2280
  conflictingClassGroupModifiers: r
2229
2281
  } = e;
2230
2282
  return {
2231
2283
  getClassGroupId: (a) => {
2232
- const c = a.split(Ie);
2233
- return c[0] === "" && c.length !== 1 && c.shift(), nt(c, t) || tn(a);
2284
+ const c = a.split(Pe);
2285
+ return c[0] === "" && c.length !== 1 && c.shift(), it(c, t) || nn(a);
2234
2286
  },
2235
2287
  getConflictingClassGroupIds: (a, c) => {
2236
2288
  const l = n[a] || [];
2237
2289
  return c && r[a] ? [...l, ...r[a]] : l;
2238
2290
  }
2239
2291
  };
2240
- }, nt = (e, t) => {
2292
+ }, it = (e, t) => {
2241
2293
  var a;
2242
2294
  if (e.length === 0)
2243
2295
  return t.classGroupId;
2244
- const n = e[0], r = t.nextPart.get(n), o = r ? nt(e.slice(1), r) : void 0;
2296
+ const n = e[0], r = t.nextPart.get(n), o = r ? it(e.slice(1), r) : void 0;
2245
2297
  if (o)
2246
2298
  return o;
2247
2299
  if (t.validators.length === 0)
2248
2300
  return;
2249
- const i = e.join(Ie);
2301
+ const i = e.join(Pe);
2250
2302
  return (a = t.validators.find(({
2251
2303
  validator: c
2252
2304
  }) => c(i))) == null ? void 0 : a.classGroupId;
2253
- }, Ye = /^\[(.+)\]$/, tn = (e) => {
2254
- if (Ye.test(e)) {
2255
- const t = Ye.exec(e)[1], n = t == null ? void 0 : t.substring(0, t.indexOf(":"));
2305
+ }, qe = /^\[(.+)\]$/, nn = (e) => {
2306
+ if (qe.test(e)) {
2307
+ const t = qe.exec(e)[1], n = t == null ? void 0 : t.substring(0, t.indexOf(":"));
2256
2308
  if (n)
2257
2309
  return "arbitrary.." + n;
2258
2310
  }
2259
- }, nn = (e) => {
2311
+ }, rn = (e) => {
2260
2312
  const {
2261
2313
  theme: t,
2262
2314
  prefix: n
@@ -2264,19 +2316,19 @@ const Ie = "-", en = (e) => {
2264
2316
  nextPart: /* @__PURE__ */ new Map(),
2265
2317
  validators: []
2266
2318
  };
2267
- return on(Object.entries(e.classGroups), n).forEach(([i, a]) => {
2268
- Ce(a, r, i, t);
2319
+ return sn(Object.entries(e.classGroups), n).forEach(([i, a]) => {
2320
+ Re(a, r, i, t);
2269
2321
  }), r;
2270
- }, Ce = (e, t, n, r) => {
2322
+ }, Re = (e, t, n, r) => {
2271
2323
  e.forEach((o) => {
2272
2324
  if (typeof o == "string") {
2273
- const i = o === "" ? t : Ke(t, o);
2325
+ const i = o === "" ? t : Xe(t, o);
2274
2326
  i.classGroupId = n;
2275
2327
  return;
2276
2328
  }
2277
2329
  if (typeof o == "function") {
2278
- if (rn(o)) {
2279
- Ce(o(r), t, n, r);
2330
+ if (on(o)) {
2331
+ Re(o(r), t, n, r);
2280
2332
  return;
2281
2333
  }
2282
2334
  t.validators.push({
@@ -2286,21 +2338,21 @@ const Ie = "-", en = (e) => {
2286
2338
  return;
2287
2339
  }
2288
2340
  Object.entries(o).forEach(([i, a]) => {
2289
- Ce(a, Ke(t, i), n, r);
2341
+ Re(a, Xe(t, i), n, r);
2290
2342
  });
2291
2343
  });
2292
- }, Ke = (e, t) => {
2344
+ }, Xe = (e, t) => {
2293
2345
  let n = e;
2294
- return t.split(Ie).forEach((r) => {
2346
+ return t.split(Pe).forEach((r) => {
2295
2347
  n.nextPart.has(r) || n.nextPart.set(r, {
2296
2348
  nextPart: /* @__PURE__ */ new Map(),
2297
2349
  validators: []
2298
2350
  }), n = n.nextPart.get(r);
2299
2351
  }), n;
2300
- }, rn = (e) => e.isThemeGetter, on = (e, t) => t ? e.map(([n, r]) => {
2352
+ }, on = (e) => e.isThemeGetter, sn = (e, t) => t ? e.map(([n, r]) => {
2301
2353
  const o = r.map((i) => typeof i == "string" ? t + i : typeof i == "object" ? Object.fromEntries(Object.entries(i).map(([a, c]) => [t + a, c])) : i);
2302
2354
  return [n, o];
2303
- }) : e, sn = (e) => {
2355
+ }) : e, cn = (e) => {
2304
2356
  if (e < 1)
2305
2357
  return {
2306
2358
  get: () => {
@@ -2324,40 +2376,40 @@ const Ie = "-", en = (e) => {
2324
2376
  n.has(i) ? n.set(i, a) : o(i, a);
2325
2377
  }
2326
2378
  };
2327
- }, rt = "!", cn = (e) => {
2379
+ }, ct = "!", an = (e) => {
2328
2380
  const {
2329
2381
  separator: t,
2330
2382
  experimentalParseClassName: n
2331
2383
  } = e, r = t.length === 1, o = t[0], i = t.length, a = (c) => {
2332
2384
  const l = [];
2333
- let u = 0, f = 0, v;
2385
+ let u = 0, f = 0, b;
2334
2386
  for (let w = 0; w < c.length; w++) {
2335
- let k = c[w];
2387
+ let y = c[w];
2336
2388
  if (u === 0) {
2337
- if (k === o && (r || c.slice(w, w + i) === t)) {
2389
+ if (y === o && (r || c.slice(w, w + i) === t)) {
2338
2390
  l.push(c.slice(f, w)), f = w + i;
2339
2391
  continue;
2340
2392
  }
2341
- if (k === "/") {
2342
- v = w;
2393
+ if (y === "/") {
2394
+ b = w;
2343
2395
  continue;
2344
2396
  }
2345
2397
  }
2346
- k === "[" ? u++ : k === "]" && u--;
2398
+ y === "[" ? u++ : y === "]" && u--;
2347
2399
  }
2348
- const d = l.length === 0 ? c : c.substring(f), m = d.startsWith(rt), y = m ? d.substring(1) : d, b = v && v > f ? v - f : void 0;
2400
+ const d = l.length === 0 ? c : c.substring(f), m = d.startsWith(ct), A = m ? d.substring(1) : d, v = b && b > f ? b - f : void 0;
2349
2401
  return {
2350
2402
  modifiers: l,
2351
2403
  hasImportantModifier: m,
2352
- baseClassName: y,
2353
- maybePostfixModifierPosition: b
2404
+ baseClassName: A,
2405
+ maybePostfixModifierPosition: v
2354
2406
  };
2355
2407
  };
2356
2408
  return n ? (c) => n({
2357
2409
  className: c,
2358
2410
  parseClassName: a
2359
2411
  }) : a;
2360
- }, an = (e) => {
2412
+ }, ln = (e) => {
2361
2413
  if (e.length <= 1)
2362
2414
  return e;
2363
2415
  const t = [];
@@ -2365,122 +2417,122 @@ const Ie = "-", en = (e) => {
2365
2417
  return e.forEach((r) => {
2366
2418
  r[0] === "[" ? (t.push(...n.sort(), r), n = []) : n.push(r);
2367
2419
  }), t.push(...n.sort()), t;
2368
- }, ln = (e) => ({
2369
- cache: sn(e.cacheSize),
2370
- parseClassName: cn(e),
2371
- ...en(e)
2372
- }), dn = /\s+/, un = (e, t) => {
2420
+ }, dn = (e) => ({
2421
+ cache: cn(e.cacheSize),
2422
+ parseClassName: an(e),
2423
+ ...tn(e)
2424
+ }), un = /\s+/, pn = (e, t) => {
2373
2425
  const {
2374
2426
  parseClassName: n,
2375
2427
  getClassGroupId: r,
2376
2428
  getConflictingClassGroupIds: o
2377
- } = t, i = [], a = e.trim().split(dn);
2429
+ } = t, i = [], a = e.trim().split(un);
2378
2430
  let c = "";
2379
2431
  for (let l = a.length - 1; l >= 0; l -= 1) {
2380
2432
  const u = a[l], {
2381
2433
  modifiers: f,
2382
- hasImportantModifier: v,
2434
+ hasImportantModifier: b,
2383
2435
  baseClassName: d,
2384
2436
  maybePostfixModifierPosition: m
2385
2437
  } = n(u);
2386
- let y = !!m, b = r(y ? d.substring(0, m) : d);
2387
- if (!b) {
2388
- if (!y) {
2438
+ let A = !!m, v = r(A ? d.substring(0, m) : d);
2439
+ if (!v) {
2440
+ if (!A) {
2389
2441
  c = u + (c.length > 0 ? " " + c : c);
2390
2442
  continue;
2391
2443
  }
2392
- if (b = r(d), !b) {
2444
+ if (v = r(d), !v) {
2393
2445
  c = u + (c.length > 0 ? " " + c : c);
2394
2446
  continue;
2395
2447
  }
2396
- y = !1;
2448
+ A = !1;
2397
2449
  }
2398
- const w = an(f).join(":"), k = v ? w + rt : w, g = k + b;
2399
- if (i.includes(g))
2450
+ const w = ln(f).join(":"), y = b ? w + ct : w, h = y + v;
2451
+ if (i.includes(h))
2400
2452
  continue;
2401
- i.push(g);
2402
- const p = o(b, y);
2403
- for (let h = 0; h < p.length; ++h) {
2404
- const A = p[h];
2405
- i.push(k + A);
2453
+ i.push(h);
2454
+ const p = o(v, A);
2455
+ for (let g = 0; g < p.length; ++g) {
2456
+ const x = p[g];
2457
+ i.push(y + x);
2406
2458
  }
2407
2459
  c = u + (c.length > 0 ? " " + c : c);
2408
2460
  }
2409
2461
  return c;
2410
2462
  };
2411
- function pn() {
2463
+ function fn() {
2412
2464
  let e = 0, t, n, r = "";
2413
2465
  for (; e < arguments.length; )
2414
- (t = arguments[e++]) && (n = ot(t)) && (r && (r += " "), r += n);
2466
+ (t = arguments[e++]) && (n = at(t)) && (r && (r += " "), r += n);
2415
2467
  return r;
2416
2468
  }
2417
- const ot = (e) => {
2469
+ const at = (e) => {
2418
2470
  if (typeof e == "string")
2419
2471
  return e;
2420
2472
  let t, n = "";
2421
2473
  for (let r = 0; r < e.length; r++)
2422
- e[r] && (t = ot(e[r])) && (n && (n += " "), n += t);
2474
+ e[r] && (t = at(e[r])) && (n && (n += " "), n += t);
2423
2475
  return n;
2424
2476
  };
2425
- function fn(e, ...t) {
2477
+ function hn(e, ...t) {
2426
2478
  let n, r, o, i = a;
2427
2479
  function a(l) {
2428
- const u = t.reduce((f, v) => v(f), e());
2429
- return n = ln(u), r = n.cache.get, o = n.cache.set, i = c, c(l);
2480
+ const u = t.reduce((f, b) => b(f), e());
2481
+ return n = dn(u), r = n.cache.get, o = n.cache.set, i = c, c(l);
2430
2482
  }
2431
2483
  function c(l) {
2432
2484
  const u = r(l);
2433
2485
  if (u)
2434
2486
  return u;
2435
- const f = un(l, n);
2487
+ const f = pn(l, n);
2436
2488
  return o(l, f), f;
2437
2489
  }
2438
2490
  return function() {
2439
- return i(pn.apply(null, arguments));
2491
+ return i(fn.apply(null, arguments));
2440
2492
  };
2441
2493
  }
2442
- const D = (e) => {
2494
+ const W = (e) => {
2443
2495
  const t = (n) => n[e] || [];
2444
2496
  return t.isThemeGetter = !0, t;
2445
- }, st = /^\[(?:([a-z-]+):)?(.+)\]$/i, hn = /^\d+\/\d+$/, mn = /* @__PURE__ */ new Set(["px", "full", "screen"]), gn = /^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/, bn = /\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/, vn = /^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/, wn = /^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/, yn = /^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/, q = (e) => se(e) || mn.has(e) || hn.test(e), ee = (e) => ae(e, "length", Mn), se = (e) => !!e && !Number.isNaN(Number(e)), Ne = (e) => ae(e, "number", se), le = (e) => !!e && Number.isInteger(Number(e)), xn = (e) => e.endsWith("%") && se(e.slice(0, -1)), M = (e) => st.test(e), te = (e) => gn.test(e), kn = /* @__PURE__ */ new Set(["length", "size", "percentage"]), Nn = (e) => ae(e, kn, it), An = (e) => ae(e, "position", it), Sn = /* @__PURE__ */ new Set(["image", "url"]), Cn = (e) => ae(e, Sn, Rn), $n = (e) => ae(e, "", In), de = () => !0, ae = (e, t, n) => {
2446
- const r = st.exec(e);
2497
+ }, lt = /^\[(?:([a-z-]+):)?(.+)\]$/i, mn = /^\d+\/\d+$/, gn = /* @__PURE__ */ new Set(["px", "full", "screen"]), bn = /^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/, vn = /\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/, wn = /^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/, yn = /^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/, xn = /^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/, Z = (e) => me(e) || gn.has(e) || mn.test(e), se = (e) => ve(e, "length", In), me = (e) => !!e && !Number.isNaN(Number(e)), $e = (e) => ve(e, "number", me), we = (e) => !!e && Number.isInteger(Number(e)), kn = (e) => e.endsWith("%") && me(e.slice(0, -1)), M = (e) => lt.test(e), ie = (e) => bn.test(e), Nn = /* @__PURE__ */ new Set(["length", "size", "percentage"]), An = (e) => ve(e, Nn, dt), Sn = (e) => ve(e, "position", dt), Cn = /* @__PURE__ */ new Set(["image", "url"]), $n = (e) => ve(e, Cn, Tn), Mn = (e) => ve(e, "", Rn), ye = () => !0, ve = (e, t, n) => {
2498
+ const r = lt.exec(e);
2447
2499
  return r ? r[1] ? typeof t == "string" ? r[1] === t : t.has(r[1]) : n(r[2]) : !1;
2448
- }, Mn = (e) => (
2500
+ }, In = (e) => (
2449
2501
  // `colorFunctionRegex` check is necessary because color functions can have percentages in them which which would be incorrectly classified as lengths.
2450
2502
  // For example, `hsl(0 0% 0%)` would be classified as a length without this check.
2451
2503
  // I could also use lookbehind assertion in `lengthUnitRegex` but that isn't supported widely enough.
2452
- bn.test(e) && !vn.test(e)
2453
- ), it = () => !1, In = (e) => wn.test(e), Rn = (e) => yn.test(e), En = () => {
2454
- const e = D("colors"), t = D("spacing"), n = D("blur"), r = D("brightness"), o = D("borderColor"), i = D("borderRadius"), a = D("borderSpacing"), c = D("borderWidth"), l = D("contrast"), u = D("grayscale"), f = D("hueRotate"), v = D("invert"), d = D("gap"), m = D("gradientColorStops"), y = D("gradientColorStopPositions"), b = D("inset"), w = D("margin"), k = D("opacity"), g = D("padding"), p = D("saturate"), h = D("scale"), A = D("sepia"), C = D("skew"), T = D("space"), P = D("translate"), x = () => ["auto", "contain", "none"], I = () => ["auto", "hidden", "clip", "visible", "scroll"], S = () => ["auto", M, t], $ = () => [M, t], L = () => ["", q, ee], O = () => ["auto", se, M], F = () => ["bottom", "center", "left", "left-bottom", "left-top", "right", "right-bottom", "right-top", "top"], j = () => ["solid", "dashed", "dotted", "double", "none"], R = () => ["normal", "multiply", "screen", "overlay", "darken", "lighten", "color-dodge", "color-burn", "hard-light", "soft-light", "difference", "exclusion", "hue", "saturation", "color", "luminosity"], B = () => ["start", "end", "center", "between", "around", "evenly", "stretch"], W = () => ["", "0", M], G = () => ["auto", "avoid", "all", "avoid-page", "page", "left", "right", "column"], Y = () => [se, M];
2504
+ vn.test(e) && !wn.test(e)
2505
+ ), dt = () => !1, Rn = (e) => yn.test(e), Tn = (e) => xn.test(e), En = () => {
2506
+ const e = W("colors"), t = W("spacing"), n = W("blur"), r = W("brightness"), o = W("borderColor"), i = W("borderRadius"), a = W("borderSpacing"), c = W("borderWidth"), l = W("contrast"), u = W("grayscale"), f = W("hueRotate"), b = W("invert"), d = W("gap"), m = W("gradientColorStops"), A = W("gradientColorStopPositions"), v = W("inset"), w = W("margin"), y = W("opacity"), h = W("padding"), p = W("saturate"), g = W("scale"), x = W("sepia"), $ = W("skew"), R = W("space"), E = W("translate"), S = () => ["auto", "contain", "none"], L = () => ["auto", "hidden", "clip", "visible", "scroll"], k = () => ["auto", M, t], C = () => [M, t], z = () => ["", Z, se], H = () => ["auto", me, M], j = () => ["bottom", "center", "left", "left-bottom", "left-top", "right", "right-bottom", "right-top", "top"], G = () => ["solid", "dashed", "dotted", "double", "none"], X = () => ["normal", "multiply", "screen", "overlay", "darken", "lighten", "color-dodge", "color-burn", "hard-light", "soft-light", "difference", "exclusion", "hue", "saturation", "color", "luminosity"], U = () => ["start", "end", "center", "between", "around", "evenly", "stretch"], _ = () => ["", "0", M], F = () => ["auto", "avoid", "all", "avoid-page", "page", "left", "right", "column"], P = () => [me, M];
2455
2507
  return {
2456
2508
  cacheSize: 500,
2457
2509
  separator: ":",
2458
2510
  theme: {
2459
- colors: [de],
2460
- spacing: [q, ee],
2461
- blur: ["none", "", te, M],
2462
- brightness: Y(),
2511
+ colors: [ye],
2512
+ spacing: [Z, se],
2513
+ blur: ["none", "", ie, M],
2514
+ brightness: P(),
2463
2515
  borderColor: [e],
2464
- borderRadius: ["none", "", "full", te, M],
2465
- borderSpacing: $(),
2466
- borderWidth: L(),
2467
- contrast: Y(),
2468
- grayscale: W(),
2469
- hueRotate: Y(),
2470
- invert: W(),
2471
- gap: $(),
2516
+ borderRadius: ["none", "", "full", ie, M],
2517
+ borderSpacing: C(),
2518
+ borderWidth: z(),
2519
+ contrast: P(),
2520
+ grayscale: _(),
2521
+ hueRotate: P(),
2522
+ invert: _(),
2523
+ gap: C(),
2472
2524
  gradientColorStops: [e],
2473
- gradientColorStopPositions: [xn, ee],
2474
- inset: S(),
2475
- margin: S(),
2476
- opacity: Y(),
2477
- padding: $(),
2478
- saturate: Y(),
2479
- scale: Y(),
2480
- sepia: W(),
2481
- skew: Y(),
2482
- space: $(),
2483
- translate: $()
2525
+ gradientColorStopPositions: [kn, se],
2526
+ inset: k(),
2527
+ margin: k(),
2528
+ opacity: P(),
2529
+ padding: C(),
2530
+ saturate: P(),
2531
+ scale: P(),
2532
+ sepia: _(),
2533
+ skew: P(),
2534
+ space: C(),
2535
+ translate: C()
2484
2536
  },
2485
2537
  classGroups: {
2486
2538
  // Layout
@@ -2501,21 +2553,21 @@ const D = (e) => {
2501
2553
  * @see https://tailwindcss.com/docs/columns
2502
2554
  */
2503
2555
  columns: [{
2504
- columns: [te]
2556
+ columns: [ie]
2505
2557
  }],
2506
2558
  /**
2507
2559
  * Break After
2508
2560
  * @see https://tailwindcss.com/docs/break-after
2509
2561
  */
2510
2562
  "break-after": [{
2511
- "break-after": G()
2563
+ "break-after": F()
2512
2564
  }],
2513
2565
  /**
2514
2566
  * Break Before
2515
2567
  * @see https://tailwindcss.com/docs/break-before
2516
2568
  */
2517
2569
  "break-before": [{
2518
- "break-before": G()
2570
+ "break-before": F()
2519
2571
  }],
2520
2572
  /**
2521
2573
  * Break Inside
@@ -2574,49 +2626,49 @@ const D = (e) => {
2574
2626
  * @see https://tailwindcss.com/docs/object-position
2575
2627
  */
2576
2628
  "object-position": [{
2577
- object: [...F(), M]
2629
+ object: [...j(), M]
2578
2630
  }],
2579
2631
  /**
2580
2632
  * Overflow
2581
2633
  * @see https://tailwindcss.com/docs/overflow
2582
2634
  */
2583
2635
  overflow: [{
2584
- overflow: I()
2636
+ overflow: L()
2585
2637
  }],
2586
2638
  /**
2587
2639
  * Overflow X
2588
2640
  * @see https://tailwindcss.com/docs/overflow
2589
2641
  */
2590
2642
  "overflow-x": [{
2591
- "overflow-x": I()
2643
+ "overflow-x": L()
2592
2644
  }],
2593
2645
  /**
2594
2646
  * Overflow Y
2595
2647
  * @see https://tailwindcss.com/docs/overflow
2596
2648
  */
2597
2649
  "overflow-y": [{
2598
- "overflow-y": I()
2650
+ "overflow-y": L()
2599
2651
  }],
2600
2652
  /**
2601
2653
  * Overscroll Behavior
2602
2654
  * @see https://tailwindcss.com/docs/overscroll-behavior
2603
2655
  */
2604
2656
  overscroll: [{
2605
- overscroll: x()
2657
+ overscroll: S()
2606
2658
  }],
2607
2659
  /**
2608
2660
  * Overscroll Behavior X
2609
2661
  * @see https://tailwindcss.com/docs/overscroll-behavior
2610
2662
  */
2611
2663
  "overscroll-x": [{
2612
- "overscroll-x": x()
2664
+ "overscroll-x": S()
2613
2665
  }],
2614
2666
  /**
2615
2667
  * Overscroll Behavior Y
2616
2668
  * @see https://tailwindcss.com/docs/overscroll-behavior
2617
2669
  */
2618
2670
  "overscroll-y": [{
2619
- "overscroll-y": x()
2671
+ "overscroll-y": S()
2620
2672
  }],
2621
2673
  /**
2622
2674
  * Position
@@ -2628,63 +2680,63 @@ const D = (e) => {
2628
2680
  * @see https://tailwindcss.com/docs/top-right-bottom-left
2629
2681
  */
2630
2682
  inset: [{
2631
- inset: [b]
2683
+ inset: [v]
2632
2684
  }],
2633
2685
  /**
2634
2686
  * Right / Left
2635
2687
  * @see https://tailwindcss.com/docs/top-right-bottom-left
2636
2688
  */
2637
2689
  "inset-x": [{
2638
- "inset-x": [b]
2690
+ "inset-x": [v]
2639
2691
  }],
2640
2692
  /**
2641
2693
  * Top / Bottom
2642
2694
  * @see https://tailwindcss.com/docs/top-right-bottom-left
2643
2695
  */
2644
2696
  "inset-y": [{
2645
- "inset-y": [b]
2697
+ "inset-y": [v]
2646
2698
  }],
2647
2699
  /**
2648
2700
  * Start
2649
2701
  * @see https://tailwindcss.com/docs/top-right-bottom-left
2650
2702
  */
2651
2703
  start: [{
2652
- start: [b]
2704
+ start: [v]
2653
2705
  }],
2654
2706
  /**
2655
2707
  * End
2656
2708
  * @see https://tailwindcss.com/docs/top-right-bottom-left
2657
2709
  */
2658
2710
  end: [{
2659
- end: [b]
2711
+ end: [v]
2660
2712
  }],
2661
2713
  /**
2662
2714
  * Top
2663
2715
  * @see https://tailwindcss.com/docs/top-right-bottom-left
2664
2716
  */
2665
2717
  top: [{
2666
- top: [b]
2718
+ top: [v]
2667
2719
  }],
2668
2720
  /**
2669
2721
  * Right
2670
2722
  * @see https://tailwindcss.com/docs/top-right-bottom-left
2671
2723
  */
2672
2724
  right: [{
2673
- right: [b]
2725
+ right: [v]
2674
2726
  }],
2675
2727
  /**
2676
2728
  * Bottom
2677
2729
  * @see https://tailwindcss.com/docs/top-right-bottom-left
2678
2730
  */
2679
2731
  bottom: [{
2680
- bottom: [b]
2732
+ bottom: [v]
2681
2733
  }],
2682
2734
  /**
2683
2735
  * Left
2684
2736
  * @see https://tailwindcss.com/docs/top-right-bottom-left
2685
2737
  */
2686
2738
  left: [{
2687
- left: [b]
2739
+ left: [v]
2688
2740
  }],
2689
2741
  /**
2690
2742
  * Visibility
@@ -2696,7 +2748,7 @@ const D = (e) => {
2696
2748
  * @see https://tailwindcss.com/docs/z-index
2697
2749
  */
2698
2750
  z: [{
2699
- z: ["auto", le, M]
2751
+ z: ["auto", we, M]
2700
2752
  }],
2701
2753
  // Flexbox and Grid
2702
2754
  /**
@@ -2704,7 +2756,7 @@ const D = (e) => {
2704
2756
  * @see https://tailwindcss.com/docs/flex-basis
2705
2757
  */
2706
2758
  basis: [{
2707
- basis: S()
2759
+ basis: k()
2708
2760
  }],
2709
2761
  /**
2710
2762
  * Flex Direction
@@ -2732,28 +2784,28 @@ const D = (e) => {
2732
2784
  * @see https://tailwindcss.com/docs/flex-grow
2733
2785
  */
2734
2786
  grow: [{
2735
- grow: W()
2787
+ grow: _()
2736
2788
  }],
2737
2789
  /**
2738
2790
  * Flex Shrink
2739
2791
  * @see https://tailwindcss.com/docs/flex-shrink
2740
2792
  */
2741
2793
  shrink: [{
2742
- shrink: W()
2794
+ shrink: _()
2743
2795
  }],
2744
2796
  /**
2745
2797
  * Order
2746
2798
  * @see https://tailwindcss.com/docs/order
2747
2799
  */
2748
2800
  order: [{
2749
- order: ["first", "last", "none", le, M]
2801
+ order: ["first", "last", "none", we, M]
2750
2802
  }],
2751
2803
  /**
2752
2804
  * Grid Template Columns
2753
2805
  * @see https://tailwindcss.com/docs/grid-template-columns
2754
2806
  */
2755
2807
  "grid-cols": [{
2756
- "grid-cols": [de]
2808
+ "grid-cols": [ye]
2757
2809
  }],
2758
2810
  /**
2759
2811
  * Grid Column Start / End
@@ -2761,7 +2813,7 @@ const D = (e) => {
2761
2813
  */
2762
2814
  "col-start-end": [{
2763
2815
  col: ["auto", {
2764
- span: ["full", le, M]
2816
+ span: ["full", we, M]
2765
2817
  }, M]
2766
2818
  }],
2767
2819
  /**
@@ -2769,21 +2821,21 @@ const D = (e) => {
2769
2821
  * @see https://tailwindcss.com/docs/grid-column
2770
2822
  */
2771
2823
  "col-start": [{
2772
- "col-start": O()
2824
+ "col-start": H()
2773
2825
  }],
2774
2826
  /**
2775
2827
  * Grid Column End
2776
2828
  * @see https://tailwindcss.com/docs/grid-column
2777
2829
  */
2778
2830
  "col-end": [{
2779
- "col-end": O()
2831
+ "col-end": H()
2780
2832
  }],
2781
2833
  /**
2782
2834
  * Grid Template Rows
2783
2835
  * @see https://tailwindcss.com/docs/grid-template-rows
2784
2836
  */
2785
2837
  "grid-rows": [{
2786
- "grid-rows": [de]
2838
+ "grid-rows": [ye]
2787
2839
  }],
2788
2840
  /**
2789
2841
  * Grid Row Start / End
@@ -2791,7 +2843,7 @@ const D = (e) => {
2791
2843
  */
2792
2844
  "row-start-end": [{
2793
2845
  row: ["auto", {
2794
- span: [le, M]
2846
+ span: [we, M]
2795
2847
  }, M]
2796
2848
  }],
2797
2849
  /**
@@ -2799,14 +2851,14 @@ const D = (e) => {
2799
2851
  * @see https://tailwindcss.com/docs/grid-row
2800
2852
  */
2801
2853
  "row-start": [{
2802
- "row-start": O()
2854
+ "row-start": H()
2803
2855
  }],
2804
2856
  /**
2805
2857
  * Grid Row End
2806
2858
  * @see https://tailwindcss.com/docs/grid-row
2807
2859
  */
2808
2860
  "row-end": [{
2809
- "row-end": O()
2861
+ "row-end": H()
2810
2862
  }],
2811
2863
  /**
2812
2864
  * Grid Auto Flow
@@ -2855,7 +2907,7 @@ const D = (e) => {
2855
2907
  * @see https://tailwindcss.com/docs/justify-content
2856
2908
  */
2857
2909
  "justify-content": [{
2858
- justify: ["normal", ...B()]
2910
+ justify: ["normal", ...U()]
2859
2911
  }],
2860
2912
  /**
2861
2913
  * Justify Items
@@ -2876,7 +2928,7 @@ const D = (e) => {
2876
2928
  * @see https://tailwindcss.com/docs/align-content
2877
2929
  */
2878
2930
  "align-content": [{
2879
- content: ["normal", ...B(), "baseline"]
2931
+ content: ["normal", ...U(), "baseline"]
2880
2932
  }],
2881
2933
  /**
2882
2934
  * Align Items
@@ -2897,7 +2949,7 @@ const D = (e) => {
2897
2949
  * @see https://tailwindcss.com/docs/place-content
2898
2950
  */
2899
2951
  "place-content": [{
2900
- "place-content": [...B(), "baseline"]
2952
+ "place-content": [...U(), "baseline"]
2901
2953
  }],
2902
2954
  /**
2903
2955
  * Place Items
@@ -2919,63 +2971,63 @@ const D = (e) => {
2919
2971
  * @see https://tailwindcss.com/docs/padding
2920
2972
  */
2921
2973
  p: [{
2922
- p: [g]
2974
+ p: [h]
2923
2975
  }],
2924
2976
  /**
2925
2977
  * Padding X
2926
2978
  * @see https://tailwindcss.com/docs/padding
2927
2979
  */
2928
2980
  px: [{
2929
- px: [g]
2981
+ px: [h]
2930
2982
  }],
2931
2983
  /**
2932
2984
  * Padding Y
2933
2985
  * @see https://tailwindcss.com/docs/padding
2934
2986
  */
2935
2987
  py: [{
2936
- py: [g]
2988
+ py: [h]
2937
2989
  }],
2938
2990
  /**
2939
2991
  * Padding Start
2940
2992
  * @see https://tailwindcss.com/docs/padding
2941
2993
  */
2942
2994
  ps: [{
2943
- ps: [g]
2995
+ ps: [h]
2944
2996
  }],
2945
2997
  /**
2946
2998
  * Padding End
2947
2999
  * @see https://tailwindcss.com/docs/padding
2948
3000
  */
2949
3001
  pe: [{
2950
- pe: [g]
3002
+ pe: [h]
2951
3003
  }],
2952
3004
  /**
2953
3005
  * Padding Top
2954
3006
  * @see https://tailwindcss.com/docs/padding
2955
3007
  */
2956
3008
  pt: [{
2957
- pt: [g]
3009
+ pt: [h]
2958
3010
  }],
2959
3011
  /**
2960
3012
  * Padding Right
2961
3013
  * @see https://tailwindcss.com/docs/padding
2962
3014
  */
2963
3015
  pr: [{
2964
- pr: [g]
3016
+ pr: [h]
2965
3017
  }],
2966
3018
  /**
2967
3019
  * Padding Bottom
2968
3020
  * @see https://tailwindcss.com/docs/padding
2969
3021
  */
2970
3022
  pb: [{
2971
- pb: [g]
3023
+ pb: [h]
2972
3024
  }],
2973
3025
  /**
2974
3026
  * Padding Left
2975
3027
  * @see https://tailwindcss.com/docs/padding
2976
3028
  */
2977
3029
  pl: [{
2978
- pl: [g]
3030
+ pl: [h]
2979
3031
  }],
2980
3032
  /**
2981
3033
  * Margin
@@ -3045,7 +3097,7 @@ const D = (e) => {
3045
3097
  * @see https://tailwindcss.com/docs/space
3046
3098
  */
3047
3099
  "space-x": [{
3048
- "space-x": [T]
3100
+ "space-x": [R]
3049
3101
  }],
3050
3102
  /**
3051
3103
  * Space Between X Reverse
@@ -3057,7 +3109,7 @@ const D = (e) => {
3057
3109
  * @see https://tailwindcss.com/docs/space
3058
3110
  */
3059
3111
  "space-y": [{
3060
- "space-y": [T]
3112
+ "space-y": [R]
3061
3113
  }],
3062
3114
  /**
3063
3115
  * Space Between Y Reverse
@@ -3085,8 +3137,8 @@ const D = (e) => {
3085
3137
  */
3086
3138
  "max-w": [{
3087
3139
  "max-w": [M, t, "none", "full", "min", "max", "fit", "prose", {
3088
- screen: [te]
3089
- }, te]
3140
+ screen: [ie]
3141
+ }, ie]
3090
3142
  }],
3091
3143
  /**
3092
3144
  * Height
@@ -3122,7 +3174,7 @@ const D = (e) => {
3122
3174
  * @see https://tailwindcss.com/docs/font-size
3123
3175
  */
3124
3176
  "font-size": [{
3125
- text: ["base", te, ee]
3177
+ text: ["base", ie, se]
3126
3178
  }],
3127
3179
  /**
3128
3180
  * Font Smoothing
@@ -3139,14 +3191,14 @@ const D = (e) => {
3139
3191
  * @see https://tailwindcss.com/docs/font-weight
3140
3192
  */
3141
3193
  "font-weight": [{
3142
- font: ["thin", "extralight", "light", "normal", "medium", "semibold", "bold", "extrabold", "black", Ne]
3194
+ font: ["thin", "extralight", "light", "normal", "medium", "semibold", "bold", "extrabold", "black", $e]
3143
3195
  }],
3144
3196
  /**
3145
3197
  * Font Family
3146
3198
  * @see https://tailwindcss.com/docs/font-family
3147
3199
  */
3148
3200
  "font-family": [{
3149
- font: [de]
3201
+ font: [ye]
3150
3202
  }],
3151
3203
  /**
3152
3204
  * Font Variant Numeric
@@ -3190,14 +3242,14 @@ const D = (e) => {
3190
3242
  * @see https://tailwindcss.com/docs/line-clamp
3191
3243
  */
3192
3244
  "line-clamp": [{
3193
- "line-clamp": ["none", se, Ne]
3245
+ "line-clamp": ["none", me, $e]
3194
3246
  }],
3195
3247
  /**
3196
3248
  * Line Height
3197
3249
  * @see https://tailwindcss.com/docs/line-height
3198
3250
  */
3199
3251
  leading: [{
3200
- leading: ["none", "tight", "snug", "normal", "relaxed", "loose", q, M]
3252
+ leading: ["none", "tight", "snug", "normal", "relaxed", "loose", Z, M]
3201
3253
  }],
3202
3254
  /**
3203
3255
  * List Style Image
@@ -3233,7 +3285,7 @@ const D = (e) => {
3233
3285
  * @see https://tailwindcss.com/docs/placeholder-opacity
3234
3286
  */
3235
3287
  "placeholder-opacity": [{
3236
- "placeholder-opacity": [k]
3288
+ "placeholder-opacity": [y]
3237
3289
  }],
3238
3290
  /**
3239
3291
  * Text Alignment
@@ -3254,7 +3306,7 @@ const D = (e) => {
3254
3306
  * @see https://tailwindcss.com/docs/text-opacity
3255
3307
  */
3256
3308
  "text-opacity": [{
3257
- "text-opacity": [k]
3309
+ "text-opacity": [y]
3258
3310
  }],
3259
3311
  /**
3260
3312
  * Text Decoration
@@ -3266,21 +3318,21 @@ const D = (e) => {
3266
3318
  * @see https://tailwindcss.com/docs/text-decoration-style
3267
3319
  */
3268
3320
  "text-decoration-style": [{
3269
- decoration: [...j(), "wavy"]
3321
+ decoration: [...G(), "wavy"]
3270
3322
  }],
3271
3323
  /**
3272
3324
  * Text Decoration Thickness
3273
3325
  * @see https://tailwindcss.com/docs/text-decoration-thickness
3274
3326
  */
3275
3327
  "text-decoration-thickness": [{
3276
- decoration: ["auto", "from-font", q, ee]
3328
+ decoration: ["auto", "from-font", Z, se]
3277
3329
  }],
3278
3330
  /**
3279
3331
  * Text Underline Offset
3280
3332
  * @see https://tailwindcss.com/docs/text-underline-offset
3281
3333
  */
3282
3334
  "underline-offset": [{
3283
- "underline-offset": ["auto", q, M]
3335
+ "underline-offset": ["auto", Z, M]
3284
3336
  }],
3285
3337
  /**
3286
3338
  * Text Decoration Color
@@ -3311,7 +3363,7 @@ const D = (e) => {
3311
3363
  * @see https://tailwindcss.com/docs/text-indent
3312
3364
  */
3313
3365
  indent: [{
3314
- indent: $()
3366
+ indent: C()
3315
3367
  }],
3316
3368
  /**
3317
3369
  * Vertical Alignment
@@ -3369,7 +3421,7 @@ const D = (e) => {
3369
3421
  * @see https://tailwindcss.com/docs/background-opacity
3370
3422
  */
3371
3423
  "bg-opacity": [{
3372
- "bg-opacity": [k]
3424
+ "bg-opacity": [y]
3373
3425
  }],
3374
3426
  /**
3375
3427
  * Background Origin
@@ -3383,7 +3435,7 @@ const D = (e) => {
3383
3435
  * @see https://tailwindcss.com/docs/background-position
3384
3436
  */
3385
3437
  "bg-position": [{
3386
- bg: [...F(), An]
3438
+ bg: [...j(), Sn]
3387
3439
  }],
3388
3440
  /**
3389
3441
  * Background Repeat
@@ -3399,7 +3451,7 @@ const D = (e) => {
3399
3451
  * @see https://tailwindcss.com/docs/background-size
3400
3452
  */
3401
3453
  "bg-size": [{
3402
- bg: ["auto", "cover", "contain", Nn]
3454
+ bg: ["auto", "cover", "contain", An]
3403
3455
  }],
3404
3456
  /**
3405
3457
  * Background Image
@@ -3408,7 +3460,7 @@ const D = (e) => {
3408
3460
  "bg-image": [{
3409
3461
  bg: ["none", {
3410
3462
  "gradient-to": ["t", "tr", "r", "br", "b", "bl", "l", "tl"]
3411
- }, Cn]
3463
+ }, $n]
3412
3464
  }],
3413
3465
  /**
3414
3466
  * Background Color
@@ -3422,21 +3474,21 @@ const D = (e) => {
3422
3474
  * @see https://tailwindcss.com/docs/gradient-color-stops
3423
3475
  */
3424
3476
  "gradient-from-pos": [{
3425
- from: [y]
3477
+ from: [A]
3426
3478
  }],
3427
3479
  /**
3428
3480
  * Gradient Color Stops Via Position
3429
3481
  * @see https://tailwindcss.com/docs/gradient-color-stops
3430
3482
  */
3431
3483
  "gradient-via-pos": [{
3432
- via: [y]
3484
+ via: [A]
3433
3485
  }],
3434
3486
  /**
3435
3487
  * Gradient Color Stops To Position
3436
3488
  * @see https://tailwindcss.com/docs/gradient-color-stops
3437
3489
  */
3438
3490
  "gradient-to-pos": [{
3439
- to: [y]
3491
+ to: [A]
3440
3492
  }],
3441
3493
  /**
3442
3494
  * Gradient Color Stops From
@@ -3633,14 +3685,14 @@ const D = (e) => {
3633
3685
  * @see https://tailwindcss.com/docs/border-opacity
3634
3686
  */
3635
3687
  "border-opacity": [{
3636
- "border-opacity": [k]
3688
+ "border-opacity": [y]
3637
3689
  }],
3638
3690
  /**
3639
3691
  * Border Style
3640
3692
  * @see https://tailwindcss.com/docs/border-style
3641
3693
  */
3642
3694
  "border-style": [{
3643
- border: [...j(), "hidden"]
3695
+ border: [...G(), "hidden"]
3644
3696
  }],
3645
3697
  /**
3646
3698
  * Divide Width X
@@ -3671,14 +3723,14 @@ const D = (e) => {
3671
3723
  * @see https://tailwindcss.com/docs/divide-opacity
3672
3724
  */
3673
3725
  "divide-opacity": [{
3674
- "divide-opacity": [k]
3726
+ "divide-opacity": [y]
3675
3727
  }],
3676
3728
  /**
3677
3729
  * Divide Style
3678
3730
  * @see https://tailwindcss.com/docs/divide-style
3679
3731
  */
3680
3732
  "divide-style": [{
3681
- divide: j()
3733
+ divide: G()
3682
3734
  }],
3683
3735
  /**
3684
3736
  * Border Color
@@ -3755,21 +3807,21 @@ const D = (e) => {
3755
3807
  * @see https://tailwindcss.com/docs/outline-style
3756
3808
  */
3757
3809
  "outline-style": [{
3758
- outline: ["", ...j()]
3810
+ outline: ["", ...G()]
3759
3811
  }],
3760
3812
  /**
3761
3813
  * Outline Offset
3762
3814
  * @see https://tailwindcss.com/docs/outline-offset
3763
3815
  */
3764
3816
  "outline-offset": [{
3765
- "outline-offset": [q, M]
3817
+ "outline-offset": [Z, M]
3766
3818
  }],
3767
3819
  /**
3768
3820
  * Outline Width
3769
3821
  * @see https://tailwindcss.com/docs/outline-width
3770
3822
  */
3771
3823
  "outline-w": [{
3772
- outline: [q, ee]
3824
+ outline: [Z, se]
3773
3825
  }],
3774
3826
  /**
3775
3827
  * Outline Color
@@ -3783,7 +3835,7 @@ const D = (e) => {
3783
3835
  * @see https://tailwindcss.com/docs/ring-width
3784
3836
  */
3785
3837
  "ring-w": [{
3786
- ring: L()
3838
+ ring: z()
3787
3839
  }],
3788
3840
  /**
3789
3841
  * Ring Width Inset
@@ -3802,14 +3854,14 @@ const D = (e) => {
3802
3854
  * @see https://tailwindcss.com/docs/ring-opacity
3803
3855
  */
3804
3856
  "ring-opacity": [{
3805
- "ring-opacity": [k]
3857
+ "ring-opacity": [y]
3806
3858
  }],
3807
3859
  /**
3808
3860
  * Ring Offset Width
3809
3861
  * @see https://tailwindcss.com/docs/ring-offset-width
3810
3862
  */
3811
3863
  "ring-offset-w": [{
3812
- "ring-offset": [q, ee]
3864
+ "ring-offset": [Z, se]
3813
3865
  }],
3814
3866
  /**
3815
3867
  * Ring Offset Color
@@ -3824,35 +3876,35 @@ const D = (e) => {
3824
3876
  * @see https://tailwindcss.com/docs/box-shadow
3825
3877
  */
3826
3878
  shadow: [{
3827
- shadow: ["", "inner", "none", te, $n]
3879
+ shadow: ["", "inner", "none", ie, Mn]
3828
3880
  }],
3829
3881
  /**
3830
3882
  * Box Shadow Color
3831
3883
  * @see https://tailwindcss.com/docs/box-shadow-color
3832
3884
  */
3833
3885
  "shadow-color": [{
3834
- shadow: [de]
3886
+ shadow: [ye]
3835
3887
  }],
3836
3888
  /**
3837
3889
  * Opacity
3838
3890
  * @see https://tailwindcss.com/docs/opacity
3839
3891
  */
3840
3892
  opacity: [{
3841
- opacity: [k]
3893
+ opacity: [y]
3842
3894
  }],
3843
3895
  /**
3844
3896
  * Mix Blend Mode
3845
3897
  * @see https://tailwindcss.com/docs/mix-blend-mode
3846
3898
  */
3847
3899
  "mix-blend": [{
3848
- "mix-blend": [...R(), "plus-lighter", "plus-darker"]
3900
+ "mix-blend": [...X(), "plus-lighter", "plus-darker"]
3849
3901
  }],
3850
3902
  /**
3851
3903
  * Background Blend Mode
3852
3904
  * @see https://tailwindcss.com/docs/background-blend-mode
3853
3905
  */
3854
3906
  "bg-blend": [{
3855
- "bg-blend": R()
3907
+ "bg-blend": X()
3856
3908
  }],
3857
3909
  // Filters
3858
3910
  /**
@@ -3889,7 +3941,7 @@ const D = (e) => {
3889
3941
  * @see https://tailwindcss.com/docs/drop-shadow
3890
3942
  */
3891
3943
  "drop-shadow": [{
3892
- "drop-shadow": ["", "none", te, M]
3944
+ "drop-shadow": ["", "none", ie, M]
3893
3945
  }],
3894
3946
  /**
3895
3947
  * Grayscale
@@ -3910,7 +3962,7 @@ const D = (e) => {
3910
3962
  * @see https://tailwindcss.com/docs/invert
3911
3963
  */
3912
3964
  invert: [{
3913
- invert: [v]
3965
+ invert: [b]
3914
3966
  }],
3915
3967
  /**
3916
3968
  * Saturate
@@ -3924,7 +3976,7 @@ const D = (e) => {
3924
3976
  * @see https://tailwindcss.com/docs/sepia
3925
3977
  */
3926
3978
  sepia: [{
3927
- sepia: [A]
3979
+ sepia: [x]
3928
3980
  }],
3929
3981
  /**
3930
3982
  * Backdrop Filter
@@ -3974,14 +4026,14 @@ const D = (e) => {
3974
4026
  * @see https://tailwindcss.com/docs/backdrop-invert
3975
4027
  */
3976
4028
  "backdrop-invert": [{
3977
- "backdrop-invert": [v]
4029
+ "backdrop-invert": [b]
3978
4030
  }],
3979
4031
  /**
3980
4032
  * Backdrop Opacity
3981
4033
  * @see https://tailwindcss.com/docs/backdrop-opacity
3982
4034
  */
3983
4035
  "backdrop-opacity": [{
3984
- "backdrop-opacity": [k]
4036
+ "backdrop-opacity": [y]
3985
4037
  }],
3986
4038
  /**
3987
4039
  * Backdrop Saturate
@@ -3995,7 +4047,7 @@ const D = (e) => {
3995
4047
  * @see https://tailwindcss.com/docs/backdrop-sepia
3996
4048
  */
3997
4049
  "backdrop-sepia": [{
3998
- "backdrop-sepia": [A]
4050
+ "backdrop-sepia": [x]
3999
4051
  }],
4000
4052
  // Tables
4001
4053
  /**
@@ -4053,7 +4105,7 @@ const D = (e) => {
4053
4105
  * @see https://tailwindcss.com/docs/transition-duration
4054
4106
  */
4055
4107
  duration: [{
4056
- duration: Y()
4108
+ duration: P()
4057
4109
  }],
4058
4110
  /**
4059
4111
  * Transition Timing Function
@@ -4067,7 +4119,7 @@ const D = (e) => {
4067
4119
  * @see https://tailwindcss.com/docs/transition-delay
4068
4120
  */
4069
4121
  delay: [{
4070
- delay: Y()
4122
+ delay: P()
4071
4123
  }],
4072
4124
  /**
4073
4125
  * Animation
@@ -4089,56 +4141,56 @@ const D = (e) => {
4089
4141
  * @see https://tailwindcss.com/docs/scale
4090
4142
  */
4091
4143
  scale: [{
4092
- scale: [h]
4144
+ scale: [g]
4093
4145
  }],
4094
4146
  /**
4095
4147
  * Scale X
4096
4148
  * @see https://tailwindcss.com/docs/scale
4097
4149
  */
4098
4150
  "scale-x": [{
4099
- "scale-x": [h]
4151
+ "scale-x": [g]
4100
4152
  }],
4101
4153
  /**
4102
4154
  * Scale Y
4103
4155
  * @see https://tailwindcss.com/docs/scale
4104
4156
  */
4105
4157
  "scale-y": [{
4106
- "scale-y": [h]
4158
+ "scale-y": [g]
4107
4159
  }],
4108
4160
  /**
4109
4161
  * Rotate
4110
4162
  * @see https://tailwindcss.com/docs/rotate
4111
4163
  */
4112
4164
  rotate: [{
4113
- rotate: [le, M]
4165
+ rotate: [we, M]
4114
4166
  }],
4115
4167
  /**
4116
4168
  * Translate X
4117
4169
  * @see https://tailwindcss.com/docs/translate
4118
4170
  */
4119
4171
  "translate-x": [{
4120
- "translate-x": [P]
4172
+ "translate-x": [E]
4121
4173
  }],
4122
4174
  /**
4123
4175
  * Translate Y
4124
4176
  * @see https://tailwindcss.com/docs/translate
4125
4177
  */
4126
4178
  "translate-y": [{
4127
- "translate-y": [P]
4179
+ "translate-y": [E]
4128
4180
  }],
4129
4181
  /**
4130
4182
  * Skew X
4131
4183
  * @see https://tailwindcss.com/docs/skew
4132
4184
  */
4133
4185
  "skew-x": [{
4134
- "skew-x": [C]
4186
+ "skew-x": [$]
4135
4187
  }],
4136
4188
  /**
4137
4189
  * Skew Y
4138
4190
  * @see https://tailwindcss.com/docs/skew
4139
4191
  */
4140
4192
  "skew-y": [{
4141
- "skew-y": [C]
4193
+ "skew-y": [$]
4142
4194
  }],
4143
4195
  /**
4144
4196
  * Transform Origin
@@ -4202,126 +4254,126 @@ const D = (e) => {
4202
4254
  * @see https://tailwindcss.com/docs/scroll-margin
4203
4255
  */
4204
4256
  "scroll-m": [{
4205
- "scroll-m": $()
4257
+ "scroll-m": C()
4206
4258
  }],
4207
4259
  /**
4208
4260
  * Scroll Margin X
4209
4261
  * @see https://tailwindcss.com/docs/scroll-margin
4210
4262
  */
4211
4263
  "scroll-mx": [{
4212
- "scroll-mx": $()
4264
+ "scroll-mx": C()
4213
4265
  }],
4214
4266
  /**
4215
4267
  * Scroll Margin Y
4216
4268
  * @see https://tailwindcss.com/docs/scroll-margin
4217
4269
  */
4218
4270
  "scroll-my": [{
4219
- "scroll-my": $()
4271
+ "scroll-my": C()
4220
4272
  }],
4221
4273
  /**
4222
4274
  * Scroll Margin Start
4223
4275
  * @see https://tailwindcss.com/docs/scroll-margin
4224
4276
  */
4225
4277
  "scroll-ms": [{
4226
- "scroll-ms": $()
4278
+ "scroll-ms": C()
4227
4279
  }],
4228
4280
  /**
4229
4281
  * Scroll Margin End
4230
4282
  * @see https://tailwindcss.com/docs/scroll-margin
4231
4283
  */
4232
4284
  "scroll-me": [{
4233
- "scroll-me": $()
4285
+ "scroll-me": C()
4234
4286
  }],
4235
4287
  /**
4236
4288
  * Scroll Margin Top
4237
4289
  * @see https://tailwindcss.com/docs/scroll-margin
4238
4290
  */
4239
4291
  "scroll-mt": [{
4240
- "scroll-mt": $()
4292
+ "scroll-mt": C()
4241
4293
  }],
4242
4294
  /**
4243
4295
  * Scroll Margin Right
4244
4296
  * @see https://tailwindcss.com/docs/scroll-margin
4245
4297
  */
4246
4298
  "scroll-mr": [{
4247
- "scroll-mr": $()
4299
+ "scroll-mr": C()
4248
4300
  }],
4249
4301
  /**
4250
4302
  * Scroll Margin Bottom
4251
4303
  * @see https://tailwindcss.com/docs/scroll-margin
4252
4304
  */
4253
4305
  "scroll-mb": [{
4254
- "scroll-mb": $()
4306
+ "scroll-mb": C()
4255
4307
  }],
4256
4308
  /**
4257
4309
  * Scroll Margin Left
4258
4310
  * @see https://tailwindcss.com/docs/scroll-margin
4259
4311
  */
4260
4312
  "scroll-ml": [{
4261
- "scroll-ml": $()
4313
+ "scroll-ml": C()
4262
4314
  }],
4263
4315
  /**
4264
4316
  * Scroll Padding
4265
4317
  * @see https://tailwindcss.com/docs/scroll-padding
4266
4318
  */
4267
4319
  "scroll-p": [{
4268
- "scroll-p": $()
4320
+ "scroll-p": C()
4269
4321
  }],
4270
4322
  /**
4271
4323
  * Scroll Padding X
4272
4324
  * @see https://tailwindcss.com/docs/scroll-padding
4273
4325
  */
4274
4326
  "scroll-px": [{
4275
- "scroll-px": $()
4327
+ "scroll-px": C()
4276
4328
  }],
4277
4329
  /**
4278
4330
  * Scroll Padding Y
4279
4331
  * @see https://tailwindcss.com/docs/scroll-padding
4280
4332
  */
4281
4333
  "scroll-py": [{
4282
- "scroll-py": $()
4334
+ "scroll-py": C()
4283
4335
  }],
4284
4336
  /**
4285
4337
  * Scroll Padding Start
4286
4338
  * @see https://tailwindcss.com/docs/scroll-padding
4287
4339
  */
4288
4340
  "scroll-ps": [{
4289
- "scroll-ps": $()
4341
+ "scroll-ps": C()
4290
4342
  }],
4291
4343
  /**
4292
4344
  * Scroll Padding End
4293
4345
  * @see https://tailwindcss.com/docs/scroll-padding
4294
4346
  */
4295
4347
  "scroll-pe": [{
4296
- "scroll-pe": $()
4348
+ "scroll-pe": C()
4297
4349
  }],
4298
4350
  /**
4299
4351
  * Scroll Padding Top
4300
4352
  * @see https://tailwindcss.com/docs/scroll-padding
4301
4353
  */
4302
4354
  "scroll-pt": [{
4303
- "scroll-pt": $()
4355
+ "scroll-pt": C()
4304
4356
  }],
4305
4357
  /**
4306
4358
  * Scroll Padding Right
4307
4359
  * @see https://tailwindcss.com/docs/scroll-padding
4308
4360
  */
4309
4361
  "scroll-pr": [{
4310
- "scroll-pr": $()
4362
+ "scroll-pr": C()
4311
4363
  }],
4312
4364
  /**
4313
4365
  * Scroll Padding Bottom
4314
4366
  * @see https://tailwindcss.com/docs/scroll-padding
4315
4367
  */
4316
4368
  "scroll-pb": [{
4317
- "scroll-pb": $()
4369
+ "scroll-pb": C()
4318
4370
  }],
4319
4371
  /**
4320
4372
  * Scroll Padding Left
4321
4373
  * @see https://tailwindcss.com/docs/scroll-padding
4322
4374
  */
4323
4375
  "scroll-pl": [{
4324
- "scroll-pl": $()
4376
+ "scroll-pl": C()
4325
4377
  }],
4326
4378
  /**
4327
4379
  * Scroll Snap Align
@@ -4404,7 +4456,7 @@ const D = (e) => {
4404
4456
  * @see https://tailwindcss.com/docs/stroke-width
4405
4457
  */
4406
4458
  "stroke-w": [{
4407
- stroke: [q, ee, Ne]
4459
+ stroke: [Z, se, $e]
4408
4460
  }],
4409
4461
  /**
4410
4462
  * Stroke
@@ -4479,39 +4531,39 @@ const D = (e) => {
4479
4531
  "font-size": ["leading"]
4480
4532
  }
4481
4533
  };
4482
- }, Tn = /* @__PURE__ */ fn(En);
4534
+ }, Ln = /* @__PURE__ */ hn(En);
4483
4535
  function Pn(...e) {
4484
- return Tn($t(e));
4536
+ return Ln(Mt(e));
4485
4537
  }
4486
4538
  function gr({ autoWidth: e = !0, className: t, style: n }) {
4487
- const [r, o] = E(() => J.getActiveAppId()), [i, a] = E(() => _.getRunningApps()), { isMobile: c } = tt();
4488
- z(() => {
4489
- const w = J.subscribe("activeAppId", (k) => {
4490
- o(k);
4539
+ const [r, o] = T(() => te.getActiveAppId()), [i, a] = T(() => q.getRunningApps()), { isMobile: c } = st();
4540
+ D(() => {
4541
+ const w = te.subscribe("activeAppId", (y) => {
4542
+ o(y);
4491
4543
  });
4492
4544
  return () => {
4493
4545
  w();
4494
4546
  };
4495
- }, []), z(() => _.subscribe(() => {
4496
- a(_.getRunningApps());
4497
- }), []), z(() => {
4547
+ }, []), D(() => q.subscribe(() => {
4548
+ a(q.getRunningApps());
4549
+ }), []), D(() => {
4498
4550
  if (!new URLSearchParams(window.location.search).has("app")) {
4499
- const g = J.getActiveAppId();
4500
- g && !_.isRunning(g) && _.launchApp(g);
4551
+ const h = te.getActiveAppId();
4552
+ h && !q.isRunning(h) && q.launchApp(h);
4501
4553
  }
4502
4554
  }, []);
4503
4555
  const l = (w) => {
4504
- _.closeApp(w);
4505
- }, u = r ? ie.get(r) : null, v = (u == null ? void 0 : u.width) ?? 400, d = r !== null, b = { ...{
4556
+ q.closeApp(w);
4557
+ }, u = r ? ge.get(r) : null, b = (u == null ? void 0 : u.width) ?? 400, d = r !== null, v = { ...{
4506
4558
  overflow: "hidden",
4507
4559
  display: d ? "flex" : "none",
4508
4560
  flexDirection: "column",
4509
4561
  flexShrink: 0,
4510
4562
  // Only set width if autoWidth is enabled
4511
- ...e && d ? { width: c ? "100%" : v } : {}
4563
+ ...e && d ? { width: c ? "100%" : b } : {}
4512
4564
  }, ...n };
4513
- return /* @__PURE__ */ s("div", { className: Pn("nc-app-panel", t), style: b, children: i.map((w) => /* @__PURE__ */ s(
4514
- Ze,
4565
+ return /* @__PURE__ */ s("div", { className: Pn("nc-app-panel", t), style: v, children: i.map((w) => /* @__PURE__ */ s(
4566
+ nt,
4515
4567
  {
4516
4568
  appId: w.appId,
4517
4569
  isActive: r === w.appId,
@@ -4527,60 +4579,60 @@ function br({
4527
4579
  side: r = "left",
4528
4580
  getBadge: o
4529
4581
  }) {
4530
- const { t: i } = Z(), { isMobile: a } = tt(), [c, l] = E(() => J.getActiveAppId()), [u, f] = E(() => _.getRunningApps());
4531
- z(() => {
4532
- const p = J.subscribe("activeAppId", (h) => {
4533
- l(h);
4582
+ const { t: i } = ne(), { isMobile: a } = st(), [c, l] = T(() => te.getActiveAppId()), [u, f] = T(() => q.getRunningApps());
4583
+ D(() => {
4584
+ const p = te.subscribe("activeAppId", (g) => {
4585
+ l(g);
4534
4586
  });
4535
4587
  return () => {
4536
4588
  p();
4537
4589
  };
4538
- }, []), z(() => _.subscribe(() => {
4539
- f(_.getRunningApps());
4590
+ }, []), D(() => q.subscribe(() => {
4591
+ f(q.getRunningApps());
4540
4592
  }), []);
4541
- const v = (p) => {
4542
- c === p ? _.setActiveApp(null) : _.launchApp(p);
4543
- }, d = e.map((p) => ie.get(p)).filter((p) => !!p), m = u.filter((p) => !e.includes(p.appId)).map((p) => ({ running: p, def: ie.get(p.appId) })).filter((p) => !!p.def), y = (p) => u.some((h) => h.appId === p), b = (p) => p.titleKey ? String(i(p.titleKey)) : p.id, w = (p) => typeof p == "number" && p > 99 ? "99+" : p, k = (p, h) => {
4544
- const A = o == null ? void 0 : o(p, h);
4545
- return A ? /* @__PURE__ */ s(
4593
+ const b = (p) => {
4594
+ c === p ? q.setActiveApp(null) : q.launchApp(p);
4595
+ }, d = e.map((p) => ge.get(p)).filter((p) => !!p), m = u.filter((p) => !e.includes(p.appId)).map((p) => ({ running: p, def: ge.get(p.appId) })).filter((p) => !!p.def), A = (p) => u.some((g) => g.appId === p), v = (p) => p.titleKey ? String(i(p.titleKey)) : p.id, w = (p) => typeof p == "number" && p > 99 ? "99+" : p, y = (p, g) => {
4596
+ const x = o == null ? void 0 : o(p, g);
4597
+ return x ? /* @__PURE__ */ s(
4546
4598
  "span",
4547
4599
  {
4548
- className: `nc-app-taskbar-badge nc-${A.tone ?? "default"}`,
4549
- "aria-label": A.ariaLabel,
4550
- children: w(A.content)
4600
+ className: `nc-app-taskbar-badge nc-${x.tone ?? "default"}`,
4601
+ "aria-label": x.ariaLabel,
4602
+ children: w(x.content)
4551
4603
  }
4552
4604
  ) : null;
4553
- }, g = a ? 24 : 28;
4605
+ }, h = a ? 24 : 28;
4554
4606
  return /* @__PURE__ */ N("div", { className: `nc-app-taskbar ${a ? "nc-mobile" : "nc-desktop"} nc-${r} ${t}`, children: [
4555
4607
  d.map((p) => {
4556
- const h = p.icon, A = c === p.id, C = y(p.id), T = { isActive: A, isRunning: C, isPinned: !0 };
4608
+ const g = p.icon, x = c === p.id, $ = A(p.id), R = { isActive: x, isRunning: $, isPinned: !0 };
4557
4609
  return /* @__PURE__ */ N(
4558
4610
  "button",
4559
4611
  {
4560
- className: `nc-app-taskbar-button ${A ? "nc-active" : ""} ${C ? "nc-running" : ""}`,
4561
- onClick: () => v(p.id),
4562
- title: b(p),
4612
+ className: `nc-app-taskbar-button ${x ? "nc-active" : ""} ${$ ? "nc-running" : ""}`,
4613
+ onClick: () => b(p.id),
4614
+ title: v(p),
4563
4615
  children: [
4564
- /* @__PURE__ */ s(h, { size: g }),
4565
- k(p, T),
4566
- n && C && /* @__PURE__ */ s("span", { className: "nc-app-taskbar-indicator" })
4616
+ /* @__PURE__ */ s(g, { size: h }),
4617
+ y(p, R),
4618
+ n && $ && /* @__PURE__ */ s("span", { className: "nc-app-taskbar-indicator" })
4567
4619
  ]
4568
4620
  },
4569
4621
  p.id
4570
4622
  );
4571
4623
  }),
4572
4624
  m.length > 0 && /* @__PURE__ */ s("div", { className: "nc-app-taskbar-separator" }),
4573
- m.map(({ running: p, def: h }) => {
4574
- const A = h.icon, C = c === p.appId, T = { isActive: C, isRunning: !0, isPinned: !1 };
4625
+ m.map(({ running: p, def: g }) => {
4626
+ const x = g.icon, $ = c === p.appId, R = { isActive: $, isRunning: !0, isPinned: !1 };
4575
4627
  return /* @__PURE__ */ N(
4576
4628
  "button",
4577
4629
  {
4578
- className: `nc-app-taskbar-button ${C ? "nc-active" : ""} nc-running`,
4579
- onClick: () => v(p.appId),
4580
- title: b(h),
4630
+ className: `nc-app-taskbar-button ${$ ? "nc-active" : ""} nc-running`,
4631
+ onClick: () => b(p.appId),
4632
+ title: v(g),
4581
4633
  children: [
4582
- /* @__PURE__ */ s(A, { size: g }),
4583
- k(h, T),
4634
+ /* @__PURE__ */ s(x, { size: h }),
4635
+ y(g, R),
4584
4636
  n && /* @__PURE__ */ s("span", { className: "nc-app-taskbar-indicator" })
4585
4637
  ]
4586
4638
  },
@@ -4613,7 +4665,7 @@ function vr({
4613
4665
  style: i,
4614
4666
  onClick: (l) => l.stopPropagation(),
4615
4667
  children: /* @__PURE__ */ s(
4616
- Ze,
4668
+ nt,
4617
4669
  {
4618
4670
  appId: e,
4619
4671
  isActive: !0,
@@ -4624,86 +4676,86 @@ function vr({
4624
4676
  )
4625
4677
  }
4626
4678
  );
4627
- return pe(c, document.body);
4679
+ return ke(c, document.body);
4628
4680
  }
4629
- const Re = ce(null), ct = ce(null);
4681
+ const ze = be(null), ut = be(null);
4630
4682
  function wr() {
4631
- const e = ne(Re);
4683
+ const e = ce(ze);
4632
4684
  if (!e)
4633
4685
  throw new Error("useNavStack must be used within a NavStackProvider");
4634
4686
  return e;
4635
4687
  }
4636
4688
  function yr() {
4637
- const e = ne(ct);
4689
+ const e = ce(ut);
4638
4690
  if (!e)
4639
4691
  throw new Error("useNavView must be used within NavStack");
4640
4692
  return e;
4641
4693
  }
4642
- const Ee = ce(null);
4694
+ const Be = be(null);
4643
4695
  function xr({ rootView: e, children: t }) {
4644
- const { t: n } = Z(), r = Xt(), [o, i] = E([e]), [a, c] = E([null]), l = V((h, A) => {
4645
- c((C) => {
4646
- const T = [...C];
4647
- return T[h] = A, T;
4696
+ const { t: n } = ne(), r = Jt(), [o, i] = T([e]), [a, c] = T([null]), l = Y((g, x) => {
4697
+ c(($) => {
4698
+ const R = [...$];
4699
+ return R[g] = x, R;
4648
4700
  });
4649
- }, []), u = V((h) => {
4650
- c((A) => {
4651
- const C = [...A];
4652
- return C[h] = null, C;
4701
+ }, []), u = Y((g) => {
4702
+ c((x) => {
4703
+ const $ = [...x];
4704
+ return $[g] = null, $;
4653
4705
  });
4654
- }, []), f = V((h) => {
4655
- i((A) => [...A, h]), c((A) => [...A, null]);
4656
- }, []), v = V(() => {
4657
- i((h) => h.length <= 1 ? h : h.slice(0, -1)), c((h) => h.slice(0, -1));
4658
- }, []), d = V(() => {
4706
+ }, []), f = Y((g) => {
4707
+ i((x) => [...x, g]), c((x) => [...x, null]);
4708
+ }, []), b = Y(() => {
4709
+ i((g) => g.length <= 1 ? g : g.slice(0, -1)), c((g) => g.slice(0, -1));
4710
+ }, []), d = Y(() => {
4659
4711
  i([e]), c([null]);
4660
- }, [e]), m = o.length, y = m > 1, b = o.length - 1, w = o[o.length - 1], k = w != null && w.titleKey ? n(w.titleKey) : (w == null ? void 0 : w.title) ?? "";
4661
- z(() => {
4662
- r.setTitle(k);
4663
- }, [k, r]), z(() => {
4664
- y ? r.setBackHandler(v) : r.clearBackHandler();
4665
- }, [y, v, r]), z(() => {
4666
- const h = a[a.length - 1];
4667
- h ? r.setToolbar(h) : r.clearToolbar();
4712
+ }, [e]), m = o.length, A = m > 1, v = o.length - 1, w = o[o.length - 1], y = w != null && w.titleKey ? n(w.titleKey) : (w == null ? void 0 : w.title) ?? "";
4713
+ D(() => {
4714
+ r.setTitle(y);
4715
+ }, [y, r]), D(() => {
4716
+ A ? r.setBackHandler(b) : r.clearBackHandler();
4717
+ }, [A, b, r]), D(() => {
4718
+ const g = a[a.length - 1];
4719
+ g ? r.setToolbar(g) : r.clearToolbar();
4668
4720
  }, [a, r]);
4669
- const g = {
4721
+ const h = {
4670
4722
  push: f,
4671
- pop: v,
4723
+ pop: b,
4672
4724
  reset: d,
4673
4725
  depth: m,
4674
- canGoBack: y,
4675
- currentTitle: k
4726
+ canGoBack: A,
4727
+ currentTitle: y
4676
4728
  }, p = {
4677
4729
  stack: o,
4678
4730
  toolbarStack: a,
4679
4731
  updateToolbar: l,
4680
4732
  clearToolbarAt: u,
4681
- topIndex: b
4733
+ topIndex: v
4682
4734
  };
4683
- return /* @__PURE__ */ s(Re.Provider, { value: g, children: /* @__PURE__ */ s(Ee.Provider, { value: p, children: t }) });
4735
+ return /* @__PURE__ */ s(ze.Provider, { value: h, children: /* @__PURE__ */ s(Be.Provider, { value: p, children: t }) });
4684
4736
  }
4685
- function Ln({ index: e, children: t }) {
4686
- const n = ne(Ee);
4737
+ function zn({ index: e, children: t }) {
4738
+ const n = ce(Be);
4687
4739
  if (!n)
4688
4740
  throw new Error("NavViewProvider must be used within NavStackProvider");
4689
- const { updateToolbar: r, clearToolbarAt: o, topIndex: i } = n, a = V((u) => {
4741
+ const { updateToolbar: r, clearToolbarAt: o, topIndex: i } = n, a = Y((u) => {
4690
4742
  e === i && r(e, u);
4691
- }, [e, i, r]), c = V(() => {
4743
+ }, [e, i, r]), c = Y(() => {
4692
4744
  e === i && o(e);
4693
4745
  }, [e, i, o]), l = {
4694
4746
  setToolbar: a,
4695
4747
  clearToolbar: c
4696
4748
  };
4697
- return /* @__PURE__ */ s(ct.Provider, { value: l, children: t });
4749
+ return /* @__PURE__ */ s(ut.Provider, { value: l, children: t });
4698
4750
  }
4699
4751
  function kr() {
4700
- const e = ne(Re), t = ne(Ee);
4752
+ const e = ce(ze), t = ce(Be);
4701
4753
  if (!e || !t)
4702
4754
  throw new Error("NavStackContainer must be used within a NavStackProvider");
4703
4755
  const { stack: n } = t;
4704
4756
  return /* @__PURE__ */ s("div", { className: "nav-stack-container", children: /* @__PURE__ */ s("div", { className: "nav-stack-content", children: n.map((r, o) => {
4705
4757
  const i = o === n.length - 1;
4706
- return /* @__PURE__ */ s(Ln, { index: o, children: /* @__PURE__ */ s(
4758
+ return /* @__PURE__ */ s(zn, { index: o, children: /* @__PURE__ */ s(
4707
4759
  "div",
4708
4760
  {
4709
4761
  style: { display: i ? "flex" : "none", flexDirection: "column", height: "100%" },
@@ -4713,26 +4765,26 @@ function kr() {
4713
4765
  }) }) });
4714
4766
  }
4715
4767
  export {
4716
- _e as ActivityIndicator,
4768
+ Je as ActivityIndicator,
4717
4769
  Gn as Alert,
4718
- Ze as AppContainer,
4719
- Je as AppContext,
4770
+ nt as AppContainer,
4771
+ tt as AppContext,
4720
4772
  vr as AppDialog,
4721
4773
  gr as AppPanel,
4722
4774
  br as AppTaskbar,
4723
4775
  Zt as AppTitleBar,
4724
4776
  Yn as Battery,
4725
- X as Button,
4777
+ ee as Button,
4726
4778
  Kn as ButtonGroup,
4727
4779
  _n as Checkbox,
4728
- Ue as CloseButton,
4780
+ Qe as CloseButton,
4729
4781
  Un as ComboBox,
4730
- Qn as ContextMenu,
4782
+ Zn as ContextMenu,
4731
4783
  ur as CsvTextArea,
4732
4784
  er as Dialog,
4733
- oe as DialogClose,
4785
+ he as DialogClose,
4734
4786
  Xn as EditButton,
4735
- Zn as Hyperlink,
4787
+ Qn as Hyperlink,
4736
4788
  tr as Input,
4737
4789
  rr as ListGroup,
4738
4790
  nr as ListGroupItem,
@@ -4740,28 +4792,28 @@ export {
4740
4792
  or as MultiSelect,
4741
4793
  kr as NavStackContainer,
4742
4794
  xr as NavStackProvider,
4743
- Yt as Notification,
4795
+ Kt as Notification,
4744
4796
  pr as NotificationContainer,
4745
4797
  ir as NumberInput,
4746
4798
  qn as RefreshButton,
4747
4799
  cr as Slider,
4748
- Wt as TabPanel,
4800
+ Ht as TabPanel,
4749
4801
  ar as TabPanels,
4750
4802
  lr as Tabs,
4751
4803
  dr as Toggle,
4752
4804
  Jn as TrashButton,
4753
4805
  mr as ViewportProvider,
4754
- ie as appRegistry,
4755
- J as appStateStore,
4806
+ ge as appRegistry,
4807
+ te as appStateStore,
4756
4808
  Pn as cn,
4757
4809
  hr as createAppI18nFactory,
4758
4810
  fr as notificationManager,
4759
- _ as runningAppsStore,
4760
- Kt as showNotification,
4761
- Xt as useApp,
4762
- Lt as useDialog,
4811
+ q as runningAppsStore,
4812
+ _t as showNotification,
4813
+ Jt as useApp,
4814
+ zt as useDialog,
4763
4815
  wr as useNavStack,
4764
4816
  yr as useNavView,
4765
- tt as useViewport
4817
+ st as useViewport
4766
4818
  };
4767
4819
  //# sourceMappingURL=index.js.map