@kingsimba/nc-ui 0.1.34 → 0.1.36

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 ht = Object.defineProperty;
2
+ var mt = (e, t, n) => t in e ? ht(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
3
+ var oe = (e, t, n) => mt(e, typeof t != "symbol" ? t + "" : t, n);
4
+ import { jsx as s, jsxs as N, Fragment as Le } from "react/jsx-runtime";
5
+ import { d as Pe, E as gt, R as bt, T as vt, g as wt, V as yt, b as xt, a as kt, c as Nt } from "./GeneratedIcons-HFZmBTBT.js";
6
+ import ze, { useState as R, useRef as F, useEffect as D, useMemo as Me, createContext as ge, useContext as ce, Children as At, isValidElement as St, forwardRef as Ct, useImperativeHandle as $t, useCallback as Y, Suspense as Mt } from "react";
7
+ import { createPortal as Ae } from "react-dom";
8
+ import { useTranslation as re } from "react-i18next";
9
+ import It from "i18next";
10
+ import { c as Rt } from "./clsx-OuTLNxxd.js";
11
+ function Qe({
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 te({ 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
+ Qe,
72
72
  {
73
73
  size: "small",
74
74
  className: "nc-button-spinner",
@@ -80,14 +80,14 @@ function X({ variant: e = "default", block: t, size: n = "default", appearance:
80
80
  }
81
81
  );
82
82
  }
83
- const Mt = {
83
+ const Tt = {
84
84
  info: "primary",
85
85
  success: "success",
86
86
  warning: "warning",
87
87
  error: "danger",
88
88
  danger: "danger"
89
89
  };
90
- function Gn({
90
+ function Kn({
91
91
  code: e,
92
92
  text: t,
93
93
  type: n,
@@ -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(Le, { children: [
102
102
  e !== void 0 && /* @__PURE__ */ s("span", { className: "nc-alert-code", children: e }),
103
103
  t
104
104
  ] });
@@ -112,22 +112,22 @@ 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(Pe, { size: 16 })
116
116
  }
117
117
  )
118
118
  ] }),
119
119
  r && /* @__PURE__ */ s("span", { className: "nc-alert-action", children: /* @__PURE__ */ s(
120
- X,
120
+ te,
121
121
  {
122
122
  size: "small",
123
- variant: r.variant ?? Mt[n],
123
+ variant: r.variant ?? Tt[n],
124
124
  onClick: o,
125
125
  children: r.text
126
126
  }
127
127
  ) })
128
128
  ] });
129
129
  }
130
- function Yn({
130
+ function _n({
131
131
  percentage: e = 0.5,
132
132
  status: t = "discharging",
133
133
  darkMode: n = !1,
@@ -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, C = l + f + d, T = 20, E = 0.65, S = Math.max(u, T * E), L = l + f + 1, k = (u - T * E) / 2;
140
140
  return /* @__PURE__ */ N(
141
141
  "svg",
142
142
  {
143
143
  className: "nc-battery",
144
144
  width: C,
145
- height: x,
146
- viewBox: `0 0 ${C} ${x}`,
145
+ height: S,
146
+ viewBox: `0 0 ${C} ${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,12 +197,12 @@ 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
  );
204
204
  }
205
- function Kn({
205
+ function Un({
206
206
  value: e,
207
207
  onChange: t,
208
208
  options: n,
@@ -224,7 +224,7 @@ function Kn({
224
224
  );
225
225
  }) });
226
226
  }
227
- function It({ size: e }) {
227
+ function Et({ 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
  {
@@ -236,7 +236,7 @@ function It({ size: e }) {
236
236
  }
237
237
  ) });
238
238
  }
239
- function _n({ checked: e, onChange: t, disabled: n, label: r, size: o = "default", labelColor: i, style: a, className: c = "" }) {
239
+ function qn({ checked: e, onChange: t, disabled: n, label: r, size: o = "default", labelColor: i, style: a, className: c = "" }) {
240
240
  const l = o === "small";
241
241
  return /* @__PURE__ */ N(
242
242
  "label",
@@ -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(Et, { 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,34 +265,38 @@ 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 Lt({ option: e, onChange: t, selected: n, highlighted: r, small: o, renderOption: i, index: a }) {
269
+ const c = F(null), { t: l } = re(), u = e.disabled === !0;
270
+ return D(() => {
271
+ r && c.current && c.current.scrollIntoView({ block: "nearest" });
272
+ }, [r]), /* @__PURE__ */ s(
273
273
  "div",
274
274
  {
275
- ref: i,
276
- className: `nc-combo-dropdown-option ${o ? "nc-small" : ""} ${r ? "nc-highlighted" : ""}`,
275
+ ref: c,
276
+ className: `nc-combo-dropdown-option ${o ? "nc-small" : ""} ${r ? "nc-highlighted" : ""} ${u ? "nc-disabled" : ""}`,
277
277
  role: "option",
278
- onMouseDown: () => t(e.value),
278
+ onClick: () => {
279
+ u || t(e.value, e.label);
280
+ },
279
281
  "aria-selected": n,
282
+ "aria-disabled": u,
280
283
  style: {
281
- cursor: "pointer",
282
- background: r ? "rgba(59,130,246,0.18)" : n ? "rgba(59,130,246,0.12)" : void 0
284
+ cursor: u ? "default" : "pointer",
285
+ opacity: u ? 0.4 : void 0,
286
+ background: r && !u ? "rgba(59,130,246,0.18)" : n && !u ? "rgba(59,130,246,0.12)" : void 0
283
287
  },
284
- children: [
288
+ children: i ? i(e, a, !!r) : /* @__PURE__ */ N(Le, { children: [
285
289
  e.label,
286
290
  e.default && /* @__PURE__ */ N("span", { style: { fontSize: "0.85em", color: "var(--nc-text-weak)", marginLeft: 6 }, children: [
287
291
  "(",
288
- a("common.default"),
292
+ l("common.default"),
289
293
  ")"
290
294
  ] })
291
- ]
295
+ ] })
292
296
  }
293
297
  );
294
298
  }
295
- function Et({
299
+ function Pt({
296
300
  isOpen: e,
297
301
  options: t,
298
302
  onSelect: n,
@@ -300,44 +304,46 @@ function Et({
300
304
  placement: o = "bottom",
301
305
  anchorRef: i,
302
306
  small: a,
303
- highlightedIndex: c = -1
307
+ highlightedIndex: c = -1,
308
+ renderOption: l
304
309
  }) {
305
- const [l, u] = E({ top: 0, left: 0, width: 0 }), [f, v] = E(o), { t: d } = Z();
306
- if (z(() => {
310
+ const [u, f] = R({ top: 0, left: 0, width: 0 }), [b, d] = R(o), { t: m } = re();
311
+ if (D(() => {
307
312
  if (e && i.current) {
308
- const y = i.current.getBoundingClientRect();
309
- let b = o;
313
+ const v = i.current.getBoundingClientRect();
314
+ let w = o;
310
315
  if (o === "bottom") {
311
- const w = window.innerHeight - y.bottom, k = y.top;
312
- w < 320 && k > w && (b = "top");
316
+ const y = window.innerHeight - v.bottom, h = v.top;
317
+ y < 320 && h > y && (w = "top");
313
318
  }
314
- v(b), u({
315
- top: b === "top" ? y.top - 4 : y.bottom + 4,
316
- left: y.left,
317
- width: y.width
319
+ d(w), f({
320
+ top: w === "top" ? v.top - 4 : v.bottom + 4,
321
+ left: v.left,
322
+ width: v.width
318
323
  });
319
324
  }
320
325
  }, [e, i, o]), !e) return null;
321
- const m = /* @__PURE__ */ s(
326
+ const A = /* @__PURE__ */ s(
322
327
  "div",
323
328
  {
324
329
  className: "nc-combo-dropdown",
330
+ onMouseDown: (v) => v.stopPropagation(),
325
331
  style: {
326
332
  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,
333
+ top: b === "top" ? void 0 : u.top,
334
+ bottom: b === "top" ? window.innerHeight - u.top : void 0,
335
+ left: u.left,
336
+ width: u.width,
331
337
  zIndex: 1e3,
332
338
  maxHeight: 300,
333
339
  overflowY: "auto"
334
340
  },
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))
341
+ 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(Lt, { option: v, onChange: n, selected: v.value === r, highlighted: w === c, small: a, renderOption: l, index: w }, v.value))
336
342
  }
337
343
  );
338
- return pe(m, document.body);
344
+ return Ae(A, document.body);
339
345
  }
340
- function Tt({ onClick: e, small: t }) {
346
+ function zt({ onClick: e, small: t }) {
341
347
  return /* @__PURE__ */ s(
342
348
  "span",
343
349
  {
@@ -356,7 +362,7 @@ function Tt({ onClick: e, small: t }) {
356
362
  }
357
363
  );
358
364
  }
359
- function Pt({ open: e, small: t }) {
365
+ function Bt({ open: e, small: t }) {
360
366
  return /* @__PURE__ */ s(
361
367
  "span",
362
368
  {
@@ -366,143 +372,207 @@ function Pt({ open: e, small: t }) {
366
372
  }
367
373
  );
368
374
  }
369
- function Un({
375
+ function Xn({
370
376
  value: e,
371
377
  onChange: t,
372
378
  placeholder: n = "Select…",
373
379
  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",
380
+ candidates: o,
381
+ renderOption: i,
382
+ renderSelected: a,
383
+ selectedOption: c,
384
+ disabled: l,
385
+ label: u,
386
+ clearable: f = !0,
387
+ allowTyping: b = !1,
388
+ placement: d = "bottom",
389
+ size: m = "default",
390
+ appearance: A = "default",
381
391
  textAlign: v = "left",
382
- style: d,
383
- className: m
392
+ style: w,
393
+ className: y
384
394
  }) {
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);
395
+ const [h, p] = R(!1), [g, x] = R(""), [C, T] = R(-1), E = F(null), S = F(null), L = F(null), k = m === "small", { t: $ } = re(), P = !!o, H = b || P, [ae, X] = R([]), [K, _] = R(() => {
396
+ if (r && e) {
397
+ const I = r.find((W) => W.value === e);
398
+ return I ? I.label : "";
399
+ }
400
+ return o && e ? e : "";
401
+ });
402
+ D(() => {
403
+ if (!e) {
404
+ _("");
405
+ return;
395
406
  }
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));
407
+ if (r) {
408
+ const I = r.find((W) => W.value === e);
409
+ I && _(I.label);
410
+ } else o && _(e);
411
+ }, [e, r, o]);
412
+ const U = (I, W = !1) => {
413
+ if (!o) return;
414
+ L.current && clearTimeout(L.current);
415
+ const B = async () => {
416
+ try {
417
+ const G = await o(I);
418
+ X(G), T(-1);
419
+ } catch {
420
+ X([]);
421
+ }
422
+ };
423
+ W ? B() : L.current = setTimeout(B, 200);
424
+ }, j = Me(() => {
425
+ if (P) return ae;
426
+ const I = g.toLowerCase();
427
+ return H ? (r || []).filter((W) => W.label.toLowerCase().includes(I)) : r || [];
428
+ }, [r, g, H, P, ae]);
429
+ D(() => {
430
+ h && T(-1);
431
+ }, [h, j]), D(() => {
432
+ if (!f && !e && r && r.length > 0 && t) {
433
+ const I = r.find((W) => W.default) || r[0];
434
+ t(I.value);
400
435
  }
401
- return document.addEventListener("mousedown", R), () => document.removeEventListener("mousedown", R);
436
+ }, [f, e, r, t]), D(() => {
437
+ function I(W) {
438
+ var B;
439
+ W.target instanceof Node && E.current && ((B = E.current.parentElement) != null && B.contains(W.target) || p(!1));
440
+ }
441
+ return document.addEventListener("mousedown", I), () => document.removeEventListener("mousedown", I);
402
442
  }, []);
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());
443
+ const z = c ?? (r ? r.find((I) => I.value === e) : e ? { label: K, value: e } : void 0), q = z && f, le = !l && !q, pe = `nc-align-${v}`, ve = !(h && H) && !!z, de = (I, W, B = !1) => {
444
+ var G;
445
+ _(W), t == null || t(I), p(!1), x(""), B && ((G = E.current) == null || G.blur());
446
+ }, we = () => {
447
+ t == null || t(void 0), x(""), p(!1);
448
+ }, ye = (I) => {
449
+ if (!h) {
450
+ (I.key === "ArrowDown" || I.key === "ArrowUp") && (p(!0), I.preventDefault());
411
451
  return;
412
452
  }
413
- switch (R.key) {
453
+ const W = (B, G) => {
454
+ if (G === 1) {
455
+ for (let V = B; V < j.length; V++)
456
+ if (!j[V].disabled) return V;
457
+ for (let V = 0; V < B; V++)
458
+ if (!j[V].disabled) return V;
459
+ } else {
460
+ for (let V = B; V >= 0; V--)
461
+ if (!j[V].disabled) return V;
462
+ for (let V = j.length - 1; V > B; V--)
463
+ if (!j[V].disabled) return V;
464
+ }
465
+ return B;
466
+ };
467
+ switch (I.key) {
414
468
  case "ArrowDown":
415
- R.preventDefault(), p((B) => {
416
- const W = B + 1;
417
- return W >= P.length ? 0 : W;
469
+ I.preventDefault(), T((B) => {
470
+ const G = B + 1, V = G >= j.length ? 0 : G;
471
+ return W(V, 1);
418
472
  });
419
473
  break;
420
474
  case "ArrowUp":
421
- R.preventDefault(), p((B) => {
422
- const W = B - 1;
423
- return W < 0 ? P.length - 1 : W;
475
+ I.preventDefault(), T((B) => {
476
+ const G = B - 1, V = G < 0 ? j.length - 1 : G;
477
+ return W(V, -1);
424
478
  });
425
479
  break;
426
480
  case "Enter":
427
- R.preventDefault(), g >= 0 && g < P.length && O(P[g].value, !0);
481
+ I.preventDefault(), C >= 0 && C < j.length && !j[C].disabled && de(j[C].value, j[C].label, !0);
428
482
  break;
429
483
  case "Escape":
430
- R.preventDefault(), b(!1), k("");
484
+ I.preventDefault(), p(!1), x("");
431
485
  break;
432
486
  }
433
487
  };
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 }),
488
+ return /* @__PURE__ */ N("div", { className: `nc-combo-container ${A === "transparent" ? "nc-transparent" : ""} ${A === "plain" ? "nc-plain" : ""} ${h ? "nc-open" : ""} ${pe} ${y || ""}`.trim(), style: { position: "relative", ...w }, children: [
489
+ u && /* @__PURE__ */ s("span", { className: `nc-label ${k ? "nc-small" : ""}`, children: u }),
436
490
  /* @__PURE__ */ N(
437
491
  "div",
438
492
  {
439
- ref: A,
493
+ ref: S,
440
494
  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));
495
+ onMouseDown: (I) => {
496
+ if (l || H && I.target === E.current) return;
497
+ const W = !h;
498
+ if (p((B) => (!B && H && z && x(z.label), !B)), P && W) {
499
+ const B = H && z ? z.label : "";
500
+ X([]), setTimeout(() => U(B, !0), 0);
501
+ }
502
+ H && !h && setTimeout(() => {
503
+ var B, G;
504
+ (B = E.current) == null || B.focus(), (G = E.current) == null || G.select();
505
+ }, 0);
446
506
  },
447
507
  children: [
448
508
  /* @__PURE__ */ s(
449
509
  "input",
450
510
  {
451
- ref: h,
452
- className: `nc-input ${C ? "nc-small" : ""}`,
511
+ ref: E,
512
+ className: `nc-input ${k ? "nc-small" : ""}`,
453
513
  placeholder: n,
454
514
  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)));
515
+ if (!l && H) {
516
+ p(!0);
517
+ const I = z ? z.label : "";
518
+ z && (x(I), setTimeout(() => {
519
+ var W;
520
+ return (W = E.current) == null ? void 0 : W.select();
521
+ }, 0)), P && (X([]), U(I, !0));
522
+ }
523
+ },
524
+ onChange: (I) => {
525
+ const W = I.target.value;
526
+ H && (x(W), P && U(W));
459
527
  },
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,
528
+ onKeyDown: ye,
529
+ value: h && H ? g : (z == null ? void 0 : z.label) || "",
530
+ readOnly: l || !H,
464
531
  style: {
465
532
  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)"
533
+ paddingRight: le || q ? k ? 32 : 44 : 12,
534
+ caretColor: b ? void 0 : "transparent",
535
+ cursor: b ? void 0 : "pointer",
536
+ userSelect: b ? void 0 : "none",
537
+ color: ve ? "transparent" : "var(--nc-text)"
471
538
  }
472
539
  }
473
540
  ),
474
- L && /* @__PURE__ */ N(
541
+ ve && /* @__PURE__ */ s(
475
542
  "div",
476
543
  {
477
544
  "aria-hidden": !0,
478
- className: `nc-combo-overlay ${$}`,
545
+ className: `nc-combo-overlay ${pe}`,
479
546
  style: {
480
547
  position: "absolute",
481
- left: C ? 8 : 12,
482
- right: S || I ? C ? 12 : 24 : C ? 8 : 12,
548
+ left: k ? 8 : 12,
549
+ right: le || q ? k ? 12 : 24 : k ? 8 : 12,
483
550
  top: "50%",
484
551
  transform: "translateY(-50%)",
485
- pointerEvents: "none"
552
+ pointerEvents: "none",
553
+ display: "flex",
554
+ alignItems: "center",
555
+ gap: 6
486
556
  },
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: [
557
+ children: a && z ? a(z) : /* @__PURE__ */ N(Le, { children: [
558
+ /* @__PURE__ */ s("span", { className: `nc-combo-overlay-text ${k ? "nc-small" : ""}`, children: z == null ? void 0 : z.label }),
559
+ (z == null ? void 0 : z.default) && /* @__PURE__ */ N("span", { className: `nc-combo-overlay-default ${k ? "nc-small" : ""}`, children: [
490
560
  "(",
491
- T("common.default"),
561
+ $("common.default"),
492
562
  ")"
493
563
  ] })
494
- ]
564
+ ] })
495
565
  }
496
566
  ),
497
- I && /* @__PURE__ */ s(Tt, { onClick: F, small: C }),
498
- S && /* @__PURE__ */ s(Pt, { open: y, small: C })
567
+ q && /* @__PURE__ */ s(zt, { onClick: we, small: k }),
568
+ le && /* @__PURE__ */ s(Bt, { open: h, small: k })
499
569
  ]
500
570
  }
501
571
  ),
502
- /* @__PURE__ */ s(Et, { isOpen: y, options: P, onSelect: O, selectedValue: e, placement: l, anchorRef: A, small: C, highlightedIndex: g })
572
+ /* @__PURE__ */ s(Pt, { isOpen: h, options: j, onSelect: de, selectedValue: e, placement: d, anchorRef: S, small: k, highlightedIndex: C, renderOption: i })
503
573
  ] });
504
574
  }
505
- function qn({ onClick: e, loading: t = !1, disabled: n = !1, size: r = "default", title: o, "aria-label": i }) {
575
+ function Jn({ onClick: e, loading: t = !1, disabled: n = !1, size: r = "default", title: o, "aria-label": i }) {
506
576
  return /* @__PURE__ */ s(
507
577
  "button",
508
578
  {
@@ -512,11 +582,11 @@ function qn({ onClick: e, loading: t = !1, disabled: n = !1, size: r = "default"
512
582
  title: o ?? (t ? "Refreshing..." : "Refresh"),
513
583
  "aria-label": i ?? (t ? "Refreshing" : "Refresh"),
514
584
  "data-size": r,
515
- children: /* @__PURE__ */ s(ht, { size: r === "small" ? 14 : r === "large" ? 20 : 18, className: t ? "nc-spinning" : "" })
585
+ children: /* @__PURE__ */ s(bt, { size: r === "small" ? 14 : r === "large" ? 20 : 18, className: t ? "nc-spinning" : "" })
516
586
  }
517
587
  );
518
588
  }
519
- function Ue({ onClick: e, disabled: t = !1, size: n = "default", title: r = "Close", "aria-label": o = "Close" }) {
589
+ function Ze({ onClick: e, disabled: t = !1, size: n = "default", title: r = "Close", "aria-label": o = "Close" }) {
520
590
  return /* @__PURE__ */ s(
521
591
  "button",
522
592
  {
@@ -526,11 +596,11 @@ function Ue({ onClick: e, disabled: t = !1, size: n = "default", title: r = "Clo
526
596
  title: r,
527
597
  "aria-label": o,
528
598
  "data-size": n,
529
- children: /* @__PURE__ */ s($e, { size: n === "small" ? 14 : n === "large" ? 20 : 18 })
599
+ children: /* @__PURE__ */ s(Pe, { size: n === "small" ? 14 : n === "large" ? 20 : 18 })
530
600
  }
531
601
  );
532
602
  }
533
- function Xn({ onClick: e, disabled: t = !1, size: n = "default", title: r = "Edit", "aria-label": o = "Edit" }) {
603
+ function Qn({ onClick: e, disabled: t = !1, size: n = "default", title: r = "Edit", "aria-label": o = "Edit" }) {
534
604
  return /* @__PURE__ */ s(
535
605
  "button",
536
606
  {
@@ -540,11 +610,11 @@ function Xn({ onClick: e, disabled: t = !1, size: n = "default", title: r = "Edi
540
610
  title: r,
541
611
  "aria-label": o,
542
612
  "data-size": n,
543
- children: /* @__PURE__ */ s(ft, { size: n === "small" ? 14 : n === "large" ? 20 : 18 })
613
+ children: /* @__PURE__ */ s(gt, { size: n === "small" ? 14 : n === "large" ? 20 : 18 })
544
614
  }
545
615
  );
546
616
  }
547
- function Jn({ onClick: e, disabled: t = !1, size: n = "default", title: r = "Delete", "aria-label": o = "Delete" }) {
617
+ function Zn({ onClick: e, disabled: t = !1, size: n = "default", title: r = "Delete", "aria-label": o = "Delete" }) {
548
618
  return /* @__PURE__ */ s(
549
619
  "button",
550
620
  {
@@ -554,11 +624,11 @@ function Jn({ onClick: e, disabled: t = !1, size: n = "default", title: r = "Del
554
624
  title: r,
555
625
  "aria-label": o,
556
626
  "data-size": n,
557
- children: /* @__PURE__ */ s(mt, { size: n === "small" ? 14 : n === "large" ? 20 : 18 })
627
+ children: /* @__PURE__ */ s(vt, { size: n === "small" ? 14 : n === "large" ? 20 : 18 })
558
628
  }
559
629
  );
560
630
  }
561
- function Zn({ onClick: e, disabled: t = !1, children: n, title: r, "aria-label": o, size: i = "default" }) {
631
+ function er({ onClick: e, disabled: t = !1, children: n, title: r, "aria-label": o, size: i = "default" }) {
562
632
  return /* @__PURE__ */ s(
563
633
  "button",
564
634
  {
@@ -572,7 +642,7 @@ function Zn({ onClick: e, disabled: t = !1, children: n, title: r, "aria-label":
572
642
  }
573
643
  );
574
644
  }
575
- function Qn({
645
+ function tr({
576
646
  open: e,
577
647
  onClose: t,
578
648
  options: n,
@@ -580,27 +650,27 @@ function Qn({
580
650
  anchor: o,
581
651
  preferredDirection: i = "down"
582
652
  }) {
583
- const a = H(null), [c, l] = E({ top: 0, left: 0 }), u = o || (r == null ? void 0 : r.current);
584
- if (z(() => {
653
+ const a = F(null), [c, l] = R({ top: 0, left: 0 }), u = o || (r == null ? void 0 : r.current);
654
+ if (D(() => {
585
655
  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");
656
+ const d = u.getBoundingClientRect(), m = a.current.getBoundingClientRect(), A = window.innerHeight, v = window.innerWidth, w = d.bottom + 8, y = w + m.height <= A - 8;
657
+ let h = i;
658
+ (!y && i === "down" || i === "up" && y) && (h = "up");
589
659
  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({
660
+ h === "down" ? p = w : p = d.top - m.height - 8;
661
+ let g = d.left;
662
+ g + m.width > v - 8 && (g = d.right - m.width), l({
593
663
  top: Math.max(8, p),
594
664
  // Ensure minimum 8px from top
595
- left: Math.max(8, h)
665
+ left: Math.max(8, g)
596
666
  // Ensure minimum 8px from left
597
667
  });
598
- }, [e, u, i]), z(() => {
668
+ }, [e, u, i]), D(() => {
599
669
  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();
670
+ const d = (A) => {
671
+ a.current && !a.current.contains(A.target) && u && !u.contains(A.target) && t();
672
+ }, m = (A) => {
673
+ A.key === "Escape" && t();
604
674
  };
605
675
  return document.addEventListener("mousedown", d), document.addEventListener("keydown", m), () => {
606
676
  document.removeEventListener("mousedown", d), document.removeEventListener("keydown", m);
@@ -608,8 +678,8 @@ function Qn({
608
678
  }, [e, t, u]), !e) return null;
609
679
  const f = (d) => {
610
680
  d.type !== "separator" && !d.disabled && d.onClick && (d.onClick(), t());
611
- }, v = n.some((d) => d.icon);
612
- return pe(
681
+ }, b = n.some((d) => d.icon);
682
+ return Ae(
613
683
  /* @__PURE__ */ s(
614
684
  "div",
615
685
  {
@@ -636,7 +706,7 @@ function Qn({
636
706
  "nc-context-menu-item",
637
707
  d.variant && d.variant !== "default" ? `nc-${d.variant}` : "",
638
708
  d.disabled ? "nc-disabled" : "",
639
- v && !d.icon ? "nc-indented" : ""
709
+ b && !d.icon ? "nc-indented" : ""
640
710
  ].filter(Boolean).join(" ");
641
711
  return /* @__PURE__ */ N(
642
712
  "button",
@@ -658,20 +728,20 @@ function Qn({
658
728
  document.body
659
729
  );
660
730
  }
661
- const qe = ce(null);
662
- function Lt() {
663
- const e = ne(qe);
731
+ const et = ge(null);
732
+ function Dt() {
733
+ const e = ce(et);
664
734
  if (!e)
665
735
  throw new Error("useDialog must be used inside a Dialog component");
666
736
  return e;
667
737
  }
668
- function oe({ children: e, onClick: t, ...n }) {
669
- const { close: r } = Lt(), { t: o } = Z();
670
- return /* @__PURE__ */ s(X, { onClick: (a) => {
738
+ function fe({ children: e, onClick: t, ...n }) {
739
+ const { close: r } = Dt(), { t: o } = re();
740
+ return /* @__PURE__ */ s(te, { onClick: (a) => {
671
741
  t == null || t(a), r();
672
742
  }, ...n, children: e ?? o("common.close") });
673
743
  }
674
- function er({
744
+ function nr({
675
745
  open: e,
676
746
  onClose: t,
677
747
  title: n,
@@ -683,59 +753,59 @@ function er({
683
753
  onSave: l,
684
754
  onDelete: u,
685
755
  onCancel: f,
686
- onConnect: v,
756
+ onConnect: b,
687
757
  closeOnOverlay: d = !0,
688
758
  primaryDisabled: m = !1,
689
- fullScreen: y = !1,
690
- hideTitleBar: b = !1,
759
+ fullScreen: A = !1,
760
+ hideTitleBar: v = !1,
691
761
  className: w = "",
692
- onContentHeightChange: k
762
+ onContentHeightChange: y
693
763
  }) {
694
- const g = H(null), p = H(null), { t: h } = Z(), A = { close: t }, C = (x) => {
695
- d && x.target === x.currentTarget && t();
764
+ const h = F(null), p = F(null), { t: g } = re(), x = { close: t }, C = (S) => {
765
+ d && S.target === S.currentTarget && t();
696
766
  };
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($);
767
+ if (D(() => {
768
+ e && h.current && h.current.focus();
769
+ }, [e]), D(() => {
770
+ if (!y || !p.current) return;
771
+ const S = new ResizeObserver((L) => {
772
+ for (const k of L) {
773
+ const $ = k.contentRect.height;
774
+ y($);
705
775
  }
706
776
  });
707
- return x.observe(p.current), () => {
708
- x.disconnect();
777
+ return S.observe(p.current), () => {
778
+ S.disconnect();
709
779
  };
710
- }, [k]), !e) return null;
780
+ }, [y]), !e) return null;
711
781
  const T = () => {
712
782
  switch (i) {
713
783
  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") }) });
784
+ return /* @__PURE__ */ s("div", { className: "nc-dialog-footer", children: /* @__PURE__ */ s(te, { variant: "primary", onClick: c ?? t, disabled: m, children: g("common.ok") }) });
715
785
  case "ok-cancel":
716
786
  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") })
787
+ /* @__PURE__ */ s(fe, { onClick: f, children: g("common.cancel") }),
788
+ /* @__PURE__ */ s(te, { variant: "primary", onClick: c ?? t, disabled: m, children: g("common.ok") })
719
789
  ] });
720
790
  case "save-cancel":
721
791
  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") })
792
+ /* @__PURE__ */ s(fe, { onClick: f, children: g("common.cancel") }),
793
+ /* @__PURE__ */ s(te, { variant: "primary", onClick: l, disabled: m, children: g("common.save") })
724
794
  ] });
725
795
  case "delete-cancel":
726
796
  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") })
797
+ /* @__PURE__ */ s(fe, { onClick: f, children: g("common.cancel") }),
798
+ /* @__PURE__ */ s(te, { variant: "danger", onClick: u, disabled: m, children: g("common.delete") })
729
799
  ] });
730
800
  case "connect":
731
801
  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") })
802
+ /* @__PURE__ */ s(fe, { onClick: f, children: g("common.cancel") }),
803
+ /* @__PURE__ */ s(te, { variant: "primary", onClick: b, disabled: m, children: g("common.connect") })
734
804
  ] });
735
805
  case "close":
736
- return /* @__PURE__ */ s("div", { className: "nc-dialog-footer", children: /* @__PURE__ */ s(oe, { variant: "primary" }) });
806
+ return /* @__PURE__ */ s("div", { className: "nc-dialog-footer", children: /* @__PURE__ */ s(fe, { variant: "primary" }) });
737
807
  case "gotit":
738
- return /* @__PURE__ */ s("div", { className: "nc-dialog-footer", children: /* @__PURE__ */ s(oe, { variant: "primary", children: h("common.gotit") }) });
808
+ return /* @__PURE__ */ s("div", { className: "nc-dialog-footer", children: /* @__PURE__ */ s(fe, { variant: "primary", children: g("common.gotit") }) });
739
809
  case "custom":
740
810
  return /* @__PURE__ */ s("div", { className: "nc-dialog-footer", children: a });
741
811
  case "none":
@@ -743,29 +813,29 @@ function er({
743
813
  default:
744
814
  return null;
745
815
  }
746
- }, P = /* @__PURE__ */ s(qe.Provider, { value: A, children: /* @__PURE__ */ s("div", { className: `nc-dialog-overlay${y ? " nc-fullscreen" : ""}`, onClick: C, children: /* @__PURE__ */ N(
816
+ }, E = /* @__PURE__ */ s(et.Provider, { value: x, children: /* @__PURE__ */ s("div", { className: `nc-dialog-overlay${A ? " nc-fullscreen" : ""}`, onClick: C, children: /* @__PURE__ */ N(
747
817
  "div",
748
818
  {
749
- ref: g,
819
+ ref: h,
750
820
  className: `nc-dialog-container ${w}`,
751
821
  style: o,
752
822
  tabIndex: -1,
753
823
  role: "dialog",
754
824
  "aria-modal": "true",
755
- "aria-labelledby": b ? void 0 : "nc-dialog-title",
825
+ "aria-labelledby": v ? void 0 : "nc-dialog-title",
756
826
  children: [
757
- !b && /* @__PURE__ */ N("div", { className: "nc-dialog-header", children: [
827
+ !v && /* @__PURE__ */ N("div", { className: "nc-dialog-header", children: [
758
828
  /* @__PURE__ */ s("h3", { id: "nc-dialog-title", className: "nc-dialog-title", children: n }),
759
- /* @__PURE__ */ s(Ue, { onClick: t, "aria-label": "Close dialog" })
829
+ /* @__PURE__ */ s(Ze, { onClick: t, "aria-label": "Close dialog" })
760
830
  ] }),
761
831
  /* @__PURE__ */ s("div", { ref: p, className: "nc-dialog-content", children: r }),
762
832
  T()
763
833
  ]
764
834
  }
765
835
  ) }) });
766
- return y ? pe(P, document.body) : P;
836
+ return A ? Ae(E, document.body) : E;
767
837
  }
768
- function zt({ onClick: e, size: t = "default", rightOffset: n = 4 }) {
838
+ function Wt({ onClick: e, size: t = "default", rightOffset: n = 4 }) {
769
839
  const r = t === "small" ? 28 : 34;
770
840
  return /* @__PURE__ */ s(
771
841
  "button",
@@ -794,7 +864,7 @@ function zt({ onClick: e, size: t = "default", rightOffset: n = 4 }) {
794
864
  }
795
865
  );
796
866
  }
797
- function Bt({ visible: e, onClick: t, size: n = "default" }) {
867
+ function Ht({ visible: e, onClick: t, size: n = "default" }) {
798
868
  const r = n === "small" ? 28 : 34, o = n === "small" ? 16 : 18;
799
869
  return /* @__PURE__ */ s(
800
870
  "button",
@@ -818,11 +888,11 @@ function Bt({ visible: e, onClick: t, size: n = "default" }) {
818
888
  alignItems: "center",
819
889
  justifyContent: "center"
820
890
  },
821
- children: e ? /* @__PURE__ */ s(gt, { size: o }) : /* @__PURE__ */ s(bt, { size: o })
891
+ children: e ? /* @__PURE__ */ s(wt, { size: o }) : /* @__PURE__ */ s(yt, { size: o })
822
892
  }
823
893
  );
824
894
  }
825
- function tr({
895
+ function rr({
826
896
  value: e,
827
897
  defaultValue: t = "",
828
898
  onChange: n,
@@ -834,124 +904,133 @@ function tr({
834
904
  label: l,
835
905
  clearable: u = !0,
836
906
  type: f = "text",
837
- className: v = "",
907
+ className: b = "",
838
908
  size: d = "default",
839
909
  appearance: m = "default",
840
- style: y,
841
- leadingIcon: b,
910
+ style: A,
911
+ leadingIcon: v,
842
912
  showPasswordToggle: w = !1,
843
- multiline: k = !1,
844
- rows: g = 3,
913
+ multiline: y = !1,
914
+ rows: h = 3,
845
915
  validator: p,
846
- showErrorMessage: h = !0
916
+ showErrorMessage: g = !0
847
917
  }) {
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();
918
+ const x = F(null), C = F(null), T = F(!1), [E, S] = R(!1), [L, k] = R(!1), [$, P] = R(!1), H = e !== void 0, [ae, X] = R(t), K = H ? e : ae, [_, U] = R(K), j = p ? p(K) : null, z = !!j, q = !y && m === "plain", le = q && L, pe = le ? _ : K;
919
+ D(() => {
920
+ le || U(K);
921
+ }, [K, le]);
922
+ const ve = f === "password", de = ve && w && !c && !y, we = u && pe && !c && (L || $), ye = d === "small" ? 32 : 44;
923
+ let I = 12;
924
+ we && de ? I = ye * 2 : (we || de) && (I = ye);
925
+ const B = v ? d === "small" ? 28 : 34 : void 0, G = () => {
926
+ if (!q)
927
+ return K;
928
+ const J = _ !== K;
929
+ return H || X(_), J && (n == null || n(_), r == null || r(_)), _;
930
+ }, V = () => {
931
+ U(K);
932
+ }, ft = () => {
933
+ var J, Z, Ge;
934
+ if (q) {
935
+ U(""), i == null || i(), (J = x.current) == null || J.focus();
866
936
  return;
867
937
  }
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();
938
+ H || X(""), n == null || n(""), i == null || i(), y ? (Z = C.current) == null || Z.focus() : (Ge = x.current) == null || Ge.focus();
939
+ }, He = (J) => {
940
+ if (q && J.key === "Escape") {
941
+ J.preventDefault(), T.current = !0, V(), J.currentTarget.blur();
872
942
  return;
873
943
  }
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);
944
+ if (J.key === "Enter" && !y) {
945
+ const Z = q ? G() : K;
946
+ q && (J.preventDefault(), T.current = !0, J.currentTarget.blur()), o == null || o(Z);
877
947
  }
878
- }, ze = (K) => {
879
- const U = K.target.value;
880
- if (G) {
881
- R(U), n == null || n(U);
948
+ }, Ve = (J) => {
949
+ const Z = J.target.value;
950
+ if (q) {
951
+ U(Z), n == null || n(Z);
882
952
  return;
883
953
  }
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);
954
+ H || X(Z), n == null || n(Z);
955
+ }, Oe = () => {
956
+ k(!0), q && U(K);
957
+ }, Fe = () => {
958
+ if (q && T.current) {
959
+ T.current = !1, k(!1);
890
960
  return;
891
961
  }
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: [
895
- 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(
899
- "textarea",
900
- {
901
- ref: C,
902
- className: We,
903
- placeholder: a,
904
- value: ye,
905
- onChange: ze,
906
- onKeyDown: Le,
907
- onFocus: Be,
908
- onBlur: De,
909
- readOnly: c,
910
- "aria-disabled": c,
911
- tabIndex: c ? -1 : void 0,
912
- rows: g,
913
- style: {
914
- width: "100%",
915
- paddingRight: he,
916
- ...me !== void 0 ? { paddingLeft: me } : {}
917
- }
918
- }
919
- ) : /* @__PURE__ */ s(
920
- "input",
921
- {
922
- ref: A,
923
- type: Te && P ? "text" : f,
924
- className: We,
925
- placeholder: a,
926
- value: ye,
927
- onChange: ze,
928
- onKeyDown: Le,
929
- onFocus: Be,
930
- onBlur: De,
931
- readOnly: c,
932
- "aria-disabled": c,
933
- tabIndex: c ? -1 : void 0,
934
- style: {
935
- width: "100%",
936
- paddingRight: he,
937
- ...me !== void 0 ? { paddingLeft: me } : {}
938
- }
939
- }
940
- ),
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 })
943
- ] }),
944
- W && h && /* @__PURE__ */ s("span", { className: "nc-error-message", children: B })
945
- ] });
962
+ q && G(), k(!1);
963
+ }, je = `nc-input ${d === "small" ? "nc-small " : ""}${!y && m === "plain" ? "nc-plain " : ""}${z ? "nc-error " : ""}${b}`;
964
+ return /* @__PURE__ */ N(
965
+ "div",
966
+ {
967
+ className: "nc-col",
968
+ style: { position: "relative", flex: 1, ...A },
969
+ onMouseEnter: () => P(!0),
970
+ onMouseLeave: () => P(!1),
971
+ children: [
972
+ l && /* @__PURE__ */ s("span", { className: "nc-label", children: l }),
973
+ /* @__PURE__ */ N("div", { style: { position: "relative", display: "flex", alignItems: y ? "flex-start" : "center" }, children: [
974
+ v && /* @__PURE__ */ s("span", { className: "nc-input-leading-icon", style: { height: y ? void 0 : "100%", top: y ? 10 : void 0 }, children: v }),
975
+ y ? /* @__PURE__ */ s(
976
+ "textarea",
977
+ {
978
+ ref: C,
979
+ className: je,
980
+ placeholder: a,
981
+ value: pe,
982
+ onChange: Ve,
983
+ onKeyDown: He,
984
+ onFocus: Oe,
985
+ onBlur: Fe,
986
+ readOnly: c,
987
+ "aria-disabled": c,
988
+ tabIndex: c ? -1 : void 0,
989
+ rows: h,
990
+ style: {
991
+ width: "100%",
992
+ paddingRight: I,
993
+ ...B !== void 0 ? { paddingLeft: B } : {}
994
+ }
995
+ }
996
+ ) : /* @__PURE__ */ s(
997
+ "input",
998
+ {
999
+ ref: x,
1000
+ type: ve && E ? "text" : f,
1001
+ className: je,
1002
+ placeholder: a,
1003
+ value: pe,
1004
+ onChange: Ve,
1005
+ onKeyDown: He,
1006
+ onFocus: Oe,
1007
+ onBlur: Fe,
1008
+ readOnly: c,
1009
+ "aria-disabled": c,
1010
+ tabIndex: c ? -1 : void 0,
1011
+ style: {
1012
+ width: "100%",
1013
+ paddingRight: I,
1014
+ ...B !== void 0 ? { paddingLeft: B } : {}
1015
+ }
1016
+ }
1017
+ ),
1018
+ we && /* @__PURE__ */ s(Wt, { onClick: ft, size: d, rightOffset: de ? ye + 4 : 4 }),
1019
+ de && /* @__PURE__ */ s(Ht, { visible: E, onClick: () => S(!E), size: d })
1020
+ ] }),
1021
+ z && g && /* @__PURE__ */ s("span", { className: "nc-error-message", children: j })
1022
+ ]
1023
+ }
1024
+ );
946
1025
  }
947
- function nr({
1026
+ function or({
948
1027
  children: e,
949
1028
  onClick: t,
950
1029
  showBorder: n = !0,
951
1030
  selectable: r = !1,
952
1031
  style: o
953
1032
  }) {
954
- const [i, a] = Me.useState(!1);
1033
+ const [i, a] = ze.useState(!1);
955
1034
  return /* @__PURE__ */ s(
956
1035
  "div",
957
1036
  {
@@ -979,7 +1058,7 @@ function nr({
979
1058
  }
980
1059
  );
981
1060
  }
982
- function rr({ title: e, titleTools: t, children: n, style: r }) {
1061
+ function sr({ title: e, titleTools: t, children: n, style: r }) {
983
1062
  return /* @__PURE__ */ N("div", { className: "nc-list-group", style: r, children: [
984
1063
  (e || t) && /* @__PURE__ */ N("div", { className: "nc-list-group-title", children: [
985
1064
  /* @__PURE__ */ s("div", { children: e }),
@@ -994,15 +1073,15 @@ function rr({ title: e, titleTools: t, children: n, style: r }) {
994
1073
  )
995
1074
  ] });
996
1075
  }
997
- 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(() => {
1076
+ function ir({ values: e, onChange: t, options: n, placeholder: r = "Select…", label: o }) {
1077
+ const [i, a] = R(!1), [c, l] = R(""), u = F(null), f = Me(() => n.filter((d) => d.label.toLowerCase().includes(c.toLowerCase())), [n, c]);
1078
+ D(() => {
1000
1079
  function d(m) {
1001
1080
  !(m.target instanceof Node) || !u.current || u.current.contains(m.target) || a(!1);
1002
1081
  }
1003
1082
  return document.addEventListener("mousedown", d), () => document.removeEventListener("mousedown", d);
1004
1083
  }, []);
1005
- const v = (d) => {
1084
+ const b = (d) => {
1006
1085
  e.includes(d) ? t(e.filter((m) => m !== d)) : t([...e, d]);
1007
1086
  };
1008
1087
  return /* @__PURE__ */ N("div", { ref: u, className: "nc-col", style: { position: "relative" }, children: [
@@ -1010,7 +1089,7 @@ function or({ values: e, onChange: t, options: n, placeholder: r = "Select…",
1010
1089
  /* @__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
1090
  e.length === 0 && /* @__PURE__ */ s("span", { className: "nc-label", children: r }),
1012
1091
  e.map((d) => {
1013
- const m = n.find((y) => y.value === d);
1092
+ const m = n.find((A) => A.value === d);
1014
1093
  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
1094
  m.label,
1016
1095
  /* @__PURE__ */ s(
@@ -1018,7 +1097,7 @@ function or({ values: e, onChange: t, options: n, placeholder: r = "Select…",
1018
1097
  {
1019
1098
  className: "nc-button nc-ghost",
1020
1099
  style: { padding: 0, minHeight: 0, height: 20, width: 20, display: "inline-flex", alignItems: "center", justifyContent: "center", border: "none" },
1021
- onClick: () => v(d),
1100
+ onClick: () => b(d),
1022
1101
  "aria-label": `Remove ${m.label}`,
1023
1102
  children: "✕"
1024
1103
  }
@@ -1039,7 +1118,7 @@ function or({ values: e, onChange: t, options: n, placeholder: r = "Select…",
1039
1118
  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
1119
  f.map((d) => {
1041
1120
  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: [
1121
+ return /* @__PURE__ */ N("div", { className: "nc-section nc-row", style: { justifyContent: "space-between", cursor: "pointer", padding: 12 }, onMouseDown: () => b(d.value), children: [
1043
1122
  /* @__PURE__ */ s("span", { children: d.label }),
1044
1123
  /* @__PURE__ */ s("span", { children: m ? "✔️" : "" })
1045
1124
  ] }, d.value);
@@ -1048,7 +1127,7 @@ function or({ values: e, onChange: t, options: n, placeholder: r = "Select…",
1048
1127
  ] })
1049
1128
  ] });
1050
1129
  }
1051
- function ge(e) {
1130
+ function Se(e) {
1052
1131
  if (!e) return null;
1053
1132
  const t = /^\d{2}-\d{1,2}$/, n = /^\d{4}-\d{1,2}$/;
1054
1133
  if (!t.test(e) && !n.test(e))
@@ -1056,7 +1135,7 @@ function ge(e) {
1056
1135
  const r = e.split("-"), o = parseInt(r[1], 10);
1057
1136
  return o < 1 || o > 12 ? "Month must be between 1 and 12" : null;
1058
1137
  }
1059
- function ue(e) {
1138
+ function Ne(e) {
1060
1139
  if (!e) return "";
1061
1140
  const t = e.split("-");
1062
1141
  if (t.length !== 2) return e;
@@ -1068,18 +1147,18 @@ function ue(e) {
1068
1147
  }
1069
1148
  return `${n}-${r}`;
1070
1149
  }
1071
- function Ve(e) {
1150
+ function Ye(e) {
1072
1151
  if (!e) return "";
1073
- const t = ue(e);
1152
+ const t = Ne(e);
1074
1153
  if (!/^\d{4}-\d{2}$/.test(t)) return e;
1075
1154
  const [n, r] = t.split("-");
1076
1155
  return `${n}/${r}`;
1077
1156
  }
1078
- function Oe() {
1157
+ function Ke() {
1079
1158
  const e = /* @__PURE__ */ new Date(), t = e.getFullYear(), n = String(e.getMonth() + 1).padStart(2, "0");
1080
1159
  return `${t}-${n}`;
1081
1160
  }
1082
- function sr({
1161
+ function cr({
1083
1162
  startMonth: e,
1084
1163
  endMonth: t,
1085
1164
  onChange: n,
@@ -1088,41 +1167,41 @@ function sr({
1088
1167
  disabled: i = !1,
1089
1168
  size: a = "default"
1090
1169
  }) {
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,
1170
+ const [c, l] = R(!1), [u, f] = R(""), [b, d] = R(""), [m, A] = R({ top: 0, left: 0, width: 0, right: void 0 }), v = F(null), w = F(null);
1171
+ D(() => {
1172
+ if (c && v.current) {
1173
+ const k = v.current.getBoundingClientRect(), P = Math.max(k.width, 400);
1174
+ window.innerWidth - k.left < P && k.right >= P ? A({
1175
+ top: k.bottom + 4,
1097
1176
  left: 0,
1098
1177
  // 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,
1178
+ right: window.innerWidth - k.right,
1179
+ width: P
1180
+ }) : A({
1181
+ top: k.bottom + 4,
1182
+ left: k.left,
1104
1183
  right: void 0,
1105
- width: L
1184
+ width: P
1106
1185
  });
1107
1186
  }
1108
- }, [c]), z(() => {
1187
+ }, [c]), D(() => {
1109
1188
  if (!c) return;
1110
- const S = ($) => {
1111
- b.current && !b.current.contains($.target) && w.current && !w.current.contains($.target) && l(!1);
1189
+ const k = ($) => {
1190
+ v.current && !v.current.contains($.target) && w.current && !w.current.contains($.target) && l(!1);
1112
1191
  };
1113
- return document.addEventListener("mousedown", S), () => document.removeEventListener("mousedown", S);
1192
+ return document.addEventListener("mousedown", k), () => document.removeEventListener("mousedown", k);
1114
1193
  }, [c]);
1115
- const k = () => {
1116
- f(e || Oe()), d(t || Oe()), l(!0);
1117
- }, g = () => {
1194
+ const y = () => {
1195
+ f(e || Ke()), d(t || Ke()), l(!0);
1196
+ }, h = () => {
1118
1197
  l(!1);
1119
1198
  }, p = () => {
1120
- const S = ge(u), $ = ge(v);
1121
- if (S || $)
1199
+ const k = Se(u), $ = Se(b);
1200
+ if (k || $)
1122
1201
  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(
1202
+ const P = Ne(u), H = Ne(b);
1203
+ P && H && (n == null || n(P, H)), l(!1);
1204
+ }, g = e && t ? `${Ye(e)} - ${Ye(t)}` : "Select month range", x = Se(u), C = Se(b), T = Ne(u), E = Ne(b), S = T && E && T > E, L = c ? Ae(
1126
1205
  /* @__PURE__ */ s(
1127
1206
  "div",
1128
1207
  {
@@ -1143,13 +1222,13 @@ function sr({
1143
1222
  "input",
1144
1223
  {
1145
1224
  type: "text",
1146
- className: `nc-month-input ${A ? "nc-error" : ""}`,
1225
+ className: `nc-month-input ${x ? "nc-error" : ""}`,
1147
1226
  value: u,
1148
- onChange: (S) => f(S.target.value),
1227
+ onChange: (k) => f(k.target.value),
1149
1228
  placeholder: "YY-M(M) or YYYY-M(M)"
1150
1229
  }
1151
1230
  ),
1152
- A && /* @__PURE__ */ s("div", { className: "nc-month-error-text", children: A })
1231
+ x && /* @__PURE__ */ s("div", { className: "nc-month-error-text", children: x })
1153
1232
  ] }),
1154
1233
  /* @__PURE__ */ N("div", { className: "nc-month-range-picker-column", children: [
1155
1234
  /* @__PURE__ */ s("label", { className: "nc-label", children: "End Month" }),
@@ -1158,26 +1237,26 @@ function sr({
1158
1237
  {
1159
1238
  type: "text",
1160
1239
  className: `nc-month-input ${C ? "nc-error" : ""}`,
1161
- value: v,
1162
- onChange: (S) => d(S.target.value),
1240
+ value: b,
1241
+ onChange: (k) => d(k.target.value),
1163
1242
  placeholder: "YY-M(M) or YYYY-M(M)"
1164
1243
  }
1165
1244
  ),
1166
1245
  C && /* @__PURE__ */ s("div", { className: "nc-month-error-text", children: C })
1167
1246
  ] })
1168
1247
  ] }),
1169
- x && !A && !C && /* @__PURE__ */ s("div", { className: "nc-month-range-error", children: "End month must be after or equal to start month" }),
1248
+ S && !x && !C && /* @__PURE__ */ s("div", { className: "nc-month-range-error", children: "End month must be after or equal to start month" }),
1170
1249
  /* @__PURE__ */ N("div", { className: "nc-month-range-picker-footer", children: [
1171
1250
  /* @__PURE__ */ s(
1172
- X,
1251
+ te,
1173
1252
  {
1174
1253
  variant: "primary",
1175
1254
  onClick: p,
1176
- disabled: !u || !v || !!A || !!C || !!x,
1255
+ disabled: !u || !b || !!x || !!C || !!S,
1177
1256
  children: "Apply"
1178
1257
  }
1179
1258
  ),
1180
- /* @__PURE__ */ s(X, { variant: "ghost", onClick: g, children: "Cancel" })
1259
+ /* @__PURE__ */ s(te, { variant: "ghost", onClick: h, children: "Cancel" })
1181
1260
  ] })
1182
1261
  ] })
1183
1262
  }
@@ -1189,17 +1268,17 @@ function sr({
1189
1268
  /* @__PURE__ */ s(
1190
1269
  "button",
1191
1270
  {
1192
- ref: b,
1271
+ ref: v,
1193
1272
  className: `nc-month-range-picker-input${a === "small" ? " nc-small" : ""}`,
1194
- onClick: k,
1273
+ onClick: y,
1195
1274
  disabled: i,
1196
- children: h
1275
+ children: g
1197
1276
  }
1198
1277
  ),
1199
- I
1278
+ L
1200
1279
  ] });
1201
1280
  }
1202
- function ir({ value: e, onChange: t, min: n, max: r, step: o = 1, label: i, disabled: a, size: c = "default" }) {
1281
+ function ar({ value: e, onChange: t, min: n, max: r, step: o = 1, label: i, disabled: a, size: c = "default" }) {
1203
1282
  const l = c === "small", u = () => {
1204
1283
  const d = e - o;
1205
1284
  n !== void 0 && d < n || t(parseFloat(d.toFixed(10)));
@@ -1247,7 +1326,7 @@ function ir({ value: e, onChange: t, min: n, max: r, step: o = 1, label: i, disa
1247
1326
  ] })
1248
1327
  ] });
1249
1328
  }
1250
- function cr({
1329
+ function lr({
1251
1330
  value: e,
1252
1331
  onChange: t,
1253
1332
  min: n = 0,
@@ -1262,7 +1341,7 @@ function cr({
1262
1341
  const f = (d) => {
1263
1342
  const m = parseFloat(d.target.value);
1264
1343
  t(m);
1265
- }, v = (e - n) / (r - n) * 100;
1344
+ }, b = (e - n) / (r - n) * 100;
1266
1345
  return /* @__PURE__ */ N("div", { className: "nc-col", style: { gap: 6 }, children: [
1267
1346
  i && /* @__PURE__ */ s("span", { className: "nc-label", children: i }),
1268
1347
  /* @__PURE__ */ N("div", { style: { display: "flex", gap: 12, alignItems: "center" }, children: [
@@ -1279,7 +1358,7 @@ function cr({
1279
1358
  disabled: a,
1280
1359
  style: {
1281
1360
  width: u,
1282
- "--nc-slider-percentage": `${v}%`
1361
+ "--nc-slider-percentage": `${b}%`
1283
1362
  }
1284
1363
  }
1285
1364
  ),
@@ -1299,13 +1378,13 @@ function cr({
1299
1378
  ] })
1300
1379
  ] });
1301
1380
  }
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 }) {
1381
+ const Vt = ({ 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" }) });
1382
+ function Ot({ children: e, className: t = "", style: n }) {
1304
1383
  return /* @__PURE__ */ s("div", { className: `nc-tab-panel ${t}`, style: n, children: e });
1305
1384
  }
1306
- 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")
1385
+ function dr({ active: e, children: t, keepMounted: n = !1, className: r = "", style: o }) {
1386
+ const i = At.toArray(t).filter(
1387
+ (c) => St(c) && (c.type === Ot || c.type.displayName === "TabPanel")
1309
1388
  );
1310
1389
  if (n)
1311
1390
  return /* @__PURE__ */ s("div", { className: `nc-tab-panels ${r}`, style: o, children: i.map((c) => {
@@ -1324,87 +1403,87 @@ function ar({ active: e, children: t, keepMounted: n = !1, className: r = "", st
1324
1403
  const a = i.find((c) => c.props.tab === e);
1325
1404
  return /* @__PURE__ */ s("div", { className: `nc-tab-panels ${r}`, style: o, children: a });
1326
1405
  }
1327
- 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 = () => {
1406
+ function ur({ tabs: e, active: t, onChange: n, onClose: r, permanentTabs: o, className: i, toolbar: a, multiline: c, orientation: l = "horizontal", style: u }) {
1407
+ const f = F(null), [b, d] = R(!1), [m, A] = R(!1), v = l === "verticalLeft" || l === "verticalRight", w = F(!1), y = F(0), h = F(0), p = F(!1);
1408
+ D(() => {
1409
+ const S = () => {
1331
1410
  if (f.current)
1332
- if (b) {
1333
- const { scrollTop: S, scrollHeight: $, clientHeight: L } = f.current;
1334
- d(S > 1), y(S < $ - L - 1);
1411
+ if (v) {
1412
+ const { scrollTop: k, scrollHeight: $, clientHeight: P } = f.current;
1413
+ d(k > 1), A(k < $ - P - 1);
1335
1414
  } else {
1336
- const { scrollLeft: S, scrollWidth: $, clientWidth: L } = f.current;
1337
- d(S > 1), y(S < $ - L - 1);
1415
+ const { scrollLeft: k, scrollWidth: $, clientWidth: P } = f.current;
1416
+ d(k > 1), A(k < $ - P - 1);
1338
1417
  }
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);
1418
+ }, L = f.current;
1419
+ if (L)
1420
+ return S(), L.addEventListener("scroll", S), window.addEventListener("resize", S), () => {
1421
+ L.removeEventListener("scroll", S), window.removeEventListener("resize", S);
1343
1422
  };
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) => {
1423
+ }, [e, v]);
1424
+ const g = (S) => {
1425
+ 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");
1426
+ }, x = (S) => {
1348
1427
  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;
1428
+ const L = v ? S.clientY : S.clientX, k = y.current - L;
1429
+ Math.abs(k) > 3 && (p.current = !0), v ? f.current.scrollTop = h.current + k : f.current.scrollLeft = h.current + k;
1351
1430
  }, C = () => {
1352
1431
  f.current && (w.current = !1, f.current.style.cursor = "", f.current.style.userSelect = "");
1353
1432
  }, T = () => {
1354
1433
  C();
1355
1434
  };
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);
1435
+ D(() => {
1436
+ const S = f.current;
1437
+ if (!S || v) return;
1438
+ const L = (k) => {
1439
+ k.deltaY !== 0 && (k.preventDefault(), S.scrollLeft += k.deltaY * 0.3);
1361
1440
  };
1362
- return x.addEventListener("wheel", I, { passive: !1 }), () => {
1363
- x.removeEventListener("wheel", I);
1441
+ return S.addEventListener("wheel", L, { passive: !1 }), () => {
1442
+ S.removeEventListener("wheel", L);
1364
1443
  };
1365
- }, [b]);
1366
- const P = (x) => {
1367
- p.current || n(x);
1444
+ }, [v]);
1445
+ const E = (S) => {
1446
+ p.current || n(S);
1368
1447
  };
1369
- return /* @__PURE__ */ N("div", { className: `nc-tab-container ${b ? `nc-vertical nc-${l}` : ""} ${i || ""}`, style: u, children: [
1448
+ return /* @__PURE__ */ N("div", { className: `nc-tab-container ${v ? `nc-vertical nc-${l}` : ""} ${i || ""}`, style: u, children: [
1370
1449
  /* @__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 }) }),
1450
+ b && /* @__PURE__ */ s("div", { className: `nc-tab-scroll-indicator ${v ? "nc-top" : "nc-left"}`, children: v ? /* @__PURE__ */ s(Vt, { size: 16 }) : /* @__PURE__ */ s(xt, { size: 16 }) }),
1372
1451
  /* @__PURE__ */ s(
1373
1452
  "div",
1374
1453
  {
1375
1454
  ref: f,
1376
1455
  className: `nc-tab-scroll ${c ? "nc-multiline" : ""}`,
1377
- onMouseDown: h,
1378
- onMouseMove: A,
1456
+ onMouseDown: g,
1457
+ onMouseMove: x,
1379
1458
  onMouseUp: C,
1380
1459
  onMouseLeave: T,
1381
1460
  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));
1461
+ children: e.map((S) => {
1462
+ const L = typeof S == "string" ? S : S.id, k = typeof S == "string" ? S : S.label, $ = r && !(o != null && o.includes(L));
1384
1463
  return /* @__PURE__ */ N(
1385
1464
  "div",
1386
1465
  {
1387
- className: `nc-tab-item ${t === I ? "nc-active" : ""} ${$ ? "nc-closable" : ""}`,
1388
- onClick: () => P(I),
1466
+ className: `nc-tab-item ${t === L ? "nc-active" : ""} ${$ ? "nc-closable" : ""}`,
1467
+ onClick: () => E(L),
1389
1468
  role: "button",
1390
1469
  tabIndex: 0,
1391
- onKeyDown: (L) => {
1392
- (L.key === "Enter" || L.key === " ") && n(I);
1470
+ onKeyDown: (P) => {
1471
+ (P.key === "Enter" || P.key === " ") && n(L);
1393
1472
  },
1394
1473
  children: [
1395
- /* @__PURE__ */ s("span", { className: "nc-tab-label", children: b ? S : typeof S == "string" ? S.toUpperCase() : S }),
1474
+ /* @__PURE__ */ s("span", { className: "nc-tab-label", children: v ? k : typeof k == "string" ? k.toUpperCase() : k }),
1396
1475
  $ && /* @__PURE__ */ s(
1397
1476
  "span",
1398
1477
  {
1399
1478
  className: "nc-tab-close",
1400
1479
  role: "button",
1401
1480
  tabIndex: 0,
1402
- "aria-label": `Close ${typeof S == "string" ? S : I}`,
1403
- onClick: (L) => {
1404
- L.stopPropagation(), r(I);
1481
+ "aria-label": `Close ${typeof k == "string" ? k : L}`,
1482
+ onClick: (P) => {
1483
+ P.stopPropagation(), r(L);
1405
1484
  },
1406
- onKeyDown: (L) => {
1407
- (L.key === "Enter" || L.key === " ") && (L.stopPropagation(), r(I));
1485
+ onKeyDown: (P) => {
1486
+ (P.key === "Enter" || P.key === " ") && (P.stopPropagation(), r(L));
1408
1487
  },
1409
1488
  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
1489
  /* @__PURE__ */ s("line", { x1: "18", y1: "6", x2: "6", y2: "18" }),
@@ -1414,17 +1493,17 @@ function lr({ tabs: e, active: t, onChange: n, onClose: r, permanentTabs: o, cla
1414
1493
  )
1415
1494
  ]
1416
1495
  },
1417
- I
1496
+ L
1418
1497
  );
1419
1498
  })
1420
1499
  }
1421
1500
  ),
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 }) })
1501
+ m && /* @__PURE__ */ s("div", { className: `nc-tab-scroll-indicator ${v ? "nc-bottom" : "nc-right"}`, children: v ? /* @__PURE__ */ s(kt, { size: 16 }) : /* @__PURE__ */ s(Nt, { size: 16 }) })
1423
1502
  ] }),
1424
1503
  a && /* @__PURE__ */ s("div", { className: "nc-tab-toolbar", children: a })
1425
1504
  ] });
1426
1505
  }
1427
- function dr({ checked: e, onChange: t, disabled: n, label: r }) {
1506
+ function pr({ checked: e, onChange: t, disabled: n, label: r }) {
1428
1507
  return /* @__PURE__ */ N(
1429
1508
  "label",
1430
1509
  {
@@ -1476,7 +1555,7 @@ function dr({ checked: e, onChange: t, disabled: n, label: r }) {
1476
1555
  }
1477
1556
  );
1478
1557
  }
1479
- const Fe = [
1558
+ const _e = [
1480
1559
  "var(--nc-csv-col-0)",
1481
1560
  "var(--nc-csv-col-1)",
1482
1561
  "var(--nc-csv-col-2)",
@@ -1488,24 +1567,24 @@ const Fe = [
1488
1567
  "var(--nc-csv-col-8)",
1489
1568
  "var(--nc-csv-col-9)"
1490
1569
  ];
1491
- function Ht(e, t) {
1570
+ function Ft(e, t) {
1492
1571
  const r = e.slice(0, t).split(`
1493
1572
  `), o = r.length, a = r[o - 1].split(" "), c = a.length, l = a[c - 1].length + 1;
1494
1573
  return { line: o, column: c, character: l, offset: t };
1495
1574
  }
1496
- function Vt(e, t, n, r) {
1575
+ function jt(e, t, n, r) {
1497
1576
  const o = e.split(`
1498
1577
  `), i = Math.max(1, Math.min(t, o.length));
1499
1578
  let a = 0;
1500
- for (let v = 0; v < i - 1; v++)
1501
- a += o[v].length + 1;
1579
+ for (let b = 0; b < i - 1; b++)
1580
+ a += o[b].length + 1;
1502
1581
  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;
1582
+ for (let b = 0; b < u - 1; b++)
1583
+ a += l[b].length + 1;
1505
1584
  const f = Math.max(1, Math.min(r, l[u - 1].length + 1));
1506
1585
  return a += f - 1, a;
1507
1586
  }
1508
- function Ot(e, t) {
1587
+ function Gt(e, t) {
1509
1588
  const n = e.split(`
1510
1589
  `), r = Math.max(1, Math.min(t, n.length));
1511
1590
  let o = 0;
@@ -1513,76 +1592,76 @@ function Ot(e, t) {
1513
1592
  o += n[i].length + 1;
1514
1593
  return o;
1515
1594
  }
1516
- const ur = Nt(
1595
+ const fr = Ct(
1517
1596
  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) {
1597
+ const f = F(null), b = F(null), d = F(null);
1598
+ $t(u, () => ({
1599
+ goToLine(h) {
1521
1600
  const p = f.current;
1522
1601
  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();
1602
+ const g = Gt(t, h);
1603
+ p.focus(), p.setSelectionRange(g, g);
1604
+ const x = parseFloat(getComputedStyle(p).lineHeight) || 18;
1605
+ p.scrollTop = (Math.max(1, h) - 1) * x, A(), m();
1527
1606
  },
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();
1607
+ goToPosition(h, p, g) {
1608
+ const x = f.current;
1609
+ if (!x) return;
1610
+ const C = jt(t, h, p, g);
1611
+ x.focus(), x.setSelectionRange(C, C);
1612
+ const T = parseFloat(getComputedStyle(x).lineHeight) || 18;
1613
+ x.scrollTop = (Math.max(1, h) - 1) * T, A(), m();
1535
1614
  }
1536
1615
  }), [t]);
1537
- const m = V(() => {
1616
+ const m = Y(() => {
1538
1617
  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));
1618
+ const h = Ft(t, f.current.selectionStart);
1619
+ c(h);
1620
+ }, [c, t]), A = Y(() => {
1621
+ const h = f.current;
1622
+ h && (b.current && (b.current.scrollTop = h.scrollTop, b.current.scrollLeft = h.scrollLeft), d.current && (d.current.scrollTop = h.scrollTop));
1544
1623
  }, []);
1545
- z(() => {
1624
+ D(() => {
1546
1625
  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();
1626
+ const h = f.current;
1627
+ if (!h) return;
1628
+ const p = parseFloat(getComputedStyle(h).lineHeight) || 18, g = (l - 1) * p, x = g + p;
1629
+ (g < h.scrollTop || x > h.scrollTop + h.clientHeight) && (h.scrollTop = g - h.clientHeight / 2 + p / 2), A();
1551
1630
  }, [l]);
1552
- const b = we(() => t.split(`
1631
+ const v = Me(() => t.split(`
1553
1632
  `).length, [t]), w = () => {
1554
- const g = [];
1555
- for (let p = 1; p <= b; p++)
1556
- g.push(
1633
+ const h = [];
1634
+ for (let p = 1; p <= v; p++)
1635
+ h.push(
1557
1636
  /* @__PURE__ */ s("div", { className: `nc-csv-line-number ${l === p ? "nc-csv-highlight" : ""}`, children: p }, p)
1558
1637
  );
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 === "" && `
1638
+ return /* @__PURE__ */ s("div", { className: "nc-csv-gutter", ref: d, children: h });
1639
+ }, y = (h) => h ? h.split(`
1640
+ `).map((g, x) => {
1641
+ const C = g.split(" ");
1642
+ return /* @__PURE__ */ N("div", { className: `nc-csv-line ${l === x + 1 ? "nc-csv-highlight" : ""}`, children: [
1643
+ C.map((T, E) => /* @__PURE__ */ N("span", { children: [
1644
+ E > 0 && /* @__PURE__ */ s("span", { className: "nc-csv-tab-char", children: " " }),
1645
+ /* @__PURE__ */ s("span", { style: { color: _e[E % _e.length] }, children: T })
1646
+ ] }, E)),
1647
+ g === "" && `
1569
1648
  `
1570
- ] }, A);
1649
+ ] }, x);
1571
1650
  }) : null;
1572
1651
  return /* @__PURE__ */ N("div", { className: `nc-csv-textarea-container ${a ? "nc-csv-with-gutter" : ""} ${o ?? ""}`, style: i, children: [
1573
1652
  a && w(),
1574
1653
  /* @__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) }) }),
1654
+ /* @__PURE__ */ s("div", { className: "nc-csv-textarea-backdrop", ref: b, children: /* @__PURE__ */ s("pre", { className: "nc-csv-textarea-highlights", children: y(t) }) }),
1576
1655
  /* @__PURE__ */ s(
1577
1656
  "textarea",
1578
1657
  {
1579
1658
  ref: f,
1580
1659
  className: "nc-csv-textarea-input",
1581
1660
  value: t,
1582
- onChange: (g) => {
1583
- n(g.target.value), requestAnimationFrame(m);
1661
+ onChange: (h) => {
1662
+ n(h.target.value), requestAnimationFrame(m);
1584
1663
  },
1585
- onScroll: y,
1664
+ onScroll: A,
1586
1665
  onSelect: m,
1587
1666
  onKeyUp: m,
1588
1667
  onClick: m,
@@ -1596,27 +1675,27 @@ const ur = Nt(
1596
1675
  ] });
1597
1676
  }
1598
1677
  );
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))
1678
+ let ue = { notifications: [] };
1679
+ const Re = /* @__PURE__ */ new Set(), Ue = /* @__PURE__ */ new Map();
1680
+ function Te() {
1681
+ const e = ue.notifications.slice();
1682
+ for (const t of Array.from(Re))
1604
1683
  try {
1605
1684
  t(e);
1606
1685
  } catch {
1607
1686
  }
1608
1687
  }
1609
- function Ft(e) {
1610
- Ae.add(e);
1688
+ function Yt(e) {
1689
+ Re.add(e);
1611
1690
  try {
1612
- e(re.notifications.slice());
1691
+ e(ue.notifications.slice());
1613
1692
  } catch {
1614
1693
  }
1615
1694
  return () => {
1616
- Ae.delete(e);
1695
+ Re.delete(e);
1617
1696
  };
1618
1697
  }
1619
- function jt(e) {
1698
+ function Kt(e) {
1620
1699
  const t = `notification-${Date.now()}-${Math.random()}`, { duration: n, type: r, ...o } = e, i = {
1621
1700
  id: t,
1622
1701
  dismissible: !0,
@@ -1624,20 +1703,20 @@ function jt(e) {
1624
1703
  type: r === "error" ? "danger" : r ?? "info",
1625
1704
  duration: n ?? 5e3
1626
1705
  };
1627
- return re.notifications = [i, ...re.notifications], Se(), i.duration && i.duration > 0 && setTimeout(() => {
1628
- Xe(t);
1706
+ return ue.notifications = [i, ...ue.notifications], Te(), i.duration && i.duration > 0 && setTimeout(() => {
1707
+ tt(t);
1629
1708
  }, i.duration), t;
1630
1709
  }
1631
- function Xe(e) {
1632
- const t = re.notifications.find((r) => r.id === e);
1710
+ function tt(e) {
1711
+ const t = ue.notifications.find((r) => r.id === e);
1633
1712
  if (!t) return;
1634
- t.isRemoving = !0, Se();
1713
+ t.isRemoving = !0, Te();
1635
1714
  const n = window.setTimeout(() => {
1636
- re.notifications = re.notifications.filter((r) => r.id !== e), Se(), je.delete(e);
1715
+ ue.notifications = ue.notifications.filter((r) => r.id !== e), Te(), Ue.delete(e);
1637
1716
  }, 300);
1638
- je.set(e, n);
1717
+ Ue.set(e, n);
1639
1718
  }
1640
- function Gt({ type: e }) {
1719
+ function _t({ type: e }) {
1641
1720
  switch (e) {
1642
1721
  case "success":
1643
1722
  return /* @__PURE__ */ s("svg", { viewBox: "0 0 20 20", fill: "none", "aria-hidden": "true", children: /* @__PURE__ */ s(
@@ -1678,8 +1757,8 @@ function Gt({ type: e }) {
1678
1757
  ] });
1679
1758
  }
1680
1759
  }
1681
- function Yt({ notification: e }) {
1682
- const { t } = Z(), n = e.type || "info", r = () => {
1760
+ function Ut({ notification: e }) {
1761
+ const { t } = re(), n = e.type || "info", r = () => {
1683
1762
  if (e.title) return e.title;
1684
1763
  switch (n) {
1685
1764
  case "success":
@@ -1692,14 +1771,14 @@ function Yt({ notification: e }) {
1692
1771
  return t("common.info");
1693
1772
  }
1694
1773
  }, o = () => {
1695
- Xe(e.id);
1774
+ tt(e.id);
1696
1775
  };
1697
1776
  return /* @__PURE__ */ s(
1698
1777
  "div",
1699
1778
  {
1700
1779
  className: `nc-notification nc-notification-${n}`,
1701
1780
  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 }) }),
1781
+ /* @__PURE__ */ s("div", { className: `nc-notification-icon nc-notification-icon-${n}`, children: /* @__PURE__ */ s(_t, { type: n }) }),
1703
1782
  /* @__PURE__ */ N("div", { className: "nc-notification-body", children: [
1704
1783
  /* @__PURE__ */ s("div", { className: "nc-notification-title", children: r() }),
1705
1784
  /* @__PURE__ */ s("div", { className: "nc-notification-message", children: e.message })
@@ -1710,31 +1789,31 @@ function Yt({ notification: e }) {
1710
1789
  className: "nc-notification-dismiss",
1711
1790
  onClick: o,
1712
1791
  "aria-label": t("common.close"),
1713
- children: /* @__PURE__ */ s($e, { size: 16 })
1792
+ children: /* @__PURE__ */ s(Pe, { size: 16 })
1714
1793
  }
1715
1794
  )
1716
1795
  ] })
1717
1796
  }
1718
1797
  );
1719
1798
  }
1720
- 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(() => {
1799
+ function hr() {
1800
+ const [e, t] = R([]), [n, r] = R(/* @__PURE__ */ new Map()), [o, i] = R(/* @__PURE__ */ new Set()), a = F(null), c = F([]);
1801
+ return D(() => Yt((u) => {
1802
+ const f = new Set(c.current.map((d) => d.id)), b = u.filter((d) => !f.has(d.id)).map((d) => d.id);
1803
+ b.length > 0 ? (t(u), i(new Set(b)), requestAnimationFrame(() => {
1725
1804
  requestAnimationFrame(() => {
1726
1805
  i(/* @__PURE__ */ new Set());
1727
1806
  });
1728
1807
  })) : t(u), c.current = u;
1729
- }), []), z(() => {
1808
+ }), []), D(() => {
1730
1809
  if (!a.current) return;
1731
1810
  const l = /* @__PURE__ */ new Map();
1732
1811
  let u = 0;
1733
1812
  const f = a.current.children;
1734
- e.forEach((v, d) => {
1735
- if (l.set(v.id, u), f[d]) {
1813
+ e.forEach((b, d) => {
1814
+ if (l.set(b.id, u), f[d]) {
1736
1815
  const m = f[d].offsetHeight;
1737
- v.isRemoving || (u += m + 12);
1816
+ b.isRemoving || (u += m + 12);
1738
1817
  }
1739
1818
  }), r(l);
1740
1819
  }, [e]), /* @__PURE__ */ s(
@@ -1758,7 +1837,7 @@ function pr() {
1758
1837
  width: "100%"
1759
1838
  },
1760
1839
  children: e.map((l) => {
1761
- const u = o.has(l.id), f = l.isRemoving, v = n.get(l.id) || 0;
1840
+ const u = o.has(l.id), f = l.isRemoving, b = n.get(l.id) || 0;
1762
1841
  return /* @__PURE__ */ s(
1763
1842
  "div",
1764
1843
  {
@@ -1766,13 +1845,13 @@ function pr() {
1766
1845
  position: "absolute",
1767
1846
  top: 0,
1768
1847
  left: 0,
1769
- transform: u ? `translate3d(-40px, ${v}px, 0)` : `translate3d(0, ${v}px, 0)`,
1848
+ transform: u ? `translate3d(-40px, ${b}px, 0)` : `translate3d(0, ${b}px, 0)`,
1770
1849
  // Only animate transform when not leaving, animate opacity always
1771
1850
  transition: f ? "opacity 300ms ease-out" : "transform 300ms ease-out, opacity 300ms ease-out",
1772
1851
  opacity: f ? 0 : 1,
1773
1852
  width: "100%"
1774
1853
  },
1775
- children: /* @__PURE__ */ s(Yt, { notification: l })
1854
+ children: /* @__PURE__ */ s(Ut, { notification: l })
1776
1855
  },
1777
1856
  l.id
1778
1857
  );
@@ -1782,14 +1861,14 @@ function pr() {
1782
1861
  }
1783
1862
  );
1784
1863
  }
1785
- function Kt(e) {
1786
- return jt(e);
1864
+ function qt(e) {
1865
+ return Kt(e);
1787
1866
  }
1788
- const fr = {
1789
- show: (e) => Kt(e)
1867
+ const mr = {
1868
+ show: (e) => qt(e)
1790
1869
  };
1791
- function hr(e) {
1792
- const t = Ct.createInstance(), n = {};
1870
+ function gr(e) {
1871
+ const t = It.createInstance(), n = {};
1793
1872
  for (const o in e)
1794
1873
  n[o] = { translation: e[o] };
1795
1874
  const r = typeof document < "u" && document.documentElement.lang || "en";
@@ -1809,9 +1888,9 @@ function hr(e) {
1809
1888
  }
1810
1889
  }).observe(document.documentElement, { attributes: !0 }), t;
1811
1890
  }
1812
- class _t {
1891
+ class Xt {
1813
1892
  constructor() {
1814
- Q(this, "apps", /* @__PURE__ */ new Map());
1893
+ oe(this, "apps", /* @__PURE__ */ new Map());
1815
1894
  }
1816
1895
  /**
1817
1896
  * Register an app definition.
@@ -1849,16 +1928,16 @@ class _t {
1849
1928
  return this.apps.has(t);
1850
1929
  }
1851
1930
  }
1852
- const ie = new _t(), Ge = "nc-ui-app-state";
1853
- class Ut {
1931
+ const me = new Xt(), qe = "nc-ui-app-state";
1932
+ class Jt {
1854
1933
  constructor() {
1855
- Q(this, "state");
1856
- Q(this, "listeners", /* @__PURE__ */ new Map());
1934
+ oe(this, "state");
1935
+ oe(this, "listeners", /* @__PURE__ */ new Map());
1857
1936
  this.state = this.loadState();
1858
1937
  }
1859
1938
  loadState() {
1860
1939
  try {
1861
- const t = localStorage.getItem(Ge);
1940
+ const t = localStorage.getItem(qe);
1862
1941
  if (t)
1863
1942
  return JSON.parse(t);
1864
1943
  } catch {
@@ -1867,7 +1946,7 @@ class Ut {
1867
1946
  }
1868
1947
  saveState() {
1869
1948
  try {
1870
- localStorage.setItem(Ge, JSON.stringify(this.state));
1949
+ localStorage.setItem(qe, JSON.stringify(this.state));
1871
1950
  } catch {
1872
1951
  }
1873
1952
  }
@@ -1897,13 +1976,13 @@ class Ut {
1897
1976
  (r = this.listeners.get(t)) == null || r.forEach((o) => o(n));
1898
1977
  }
1899
1978
  }
1900
- const J = new Ut();
1901
- class qt {
1979
+ const ne = new Jt();
1980
+ class Qt {
1902
1981
  constructor() {
1903
- Q(this, "apps", []);
1904
- Q(this, "activeAppId", null);
1905
- Q(this, "listeners", /* @__PURE__ */ new Set());
1906
- Q(this, "refReadyResolvers", /* @__PURE__ */ new Map());
1982
+ oe(this, "apps", []);
1983
+ oe(this, "activeAppId", null);
1984
+ oe(this, "listeners", /* @__PURE__ */ new Set());
1985
+ oe(this, "refReadyResolvers", /* @__PURE__ */ new Map());
1907
1986
  }
1908
1987
  /**
1909
1988
  * Launch an app and wait for it to be ready (ref populated).
@@ -1915,16 +1994,16 @@ class qt {
1915
1994
  */
1916
1995
  async launchApp(t, n) {
1917
1996
  const { launchInBackground: r = !1 } = n || {};
1918
- if (!ie.has(t))
1997
+ if (!me.has(t))
1919
1998
  return console.error(`Cannot launch app "${t}": not registered`), null;
1920
1999
  const o = this.apps.find((a) => a.appId === t);
1921
2000
  if (o)
1922
- return r || (this.setActiveApp(t), J._setActiveAppId(t)), o.ref ? o : this.waitForRef(t);
2001
+ return r || (this.setActiveApp(t), ne._setActiveAppId(t)), o.ref ? o : this.waitForRef(t);
1923
2002
  const i = {
1924
2003
  appId: t,
1925
2004
  launchedAt: Date.now()
1926
2005
  };
1927
- return this.apps.push(i), r || (this.activeAppId = t, J._setActiveAppId(t)), this.notify(), this.waitForRef(t);
2006
+ return this.apps.push(i), r || (this.activeAppId = t, ne._setActiveAppId(t)), this.notify(), this.waitForRef(t);
1928
2007
  }
1929
2008
  waitForRef(t) {
1930
2009
  return new Promise((n) => {
@@ -1961,7 +2040,7 @@ class qt {
1961
2040
  const r = this.apps[n];
1962
2041
  if (r.ref && (r.ref = void 0), this.apps.splice(n, 1), this.activeAppId === t) {
1963
2042
  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);
2043
+ this.activeAppId = o && this.apps.length > 0 ? this.apps[this.apps.length - 1].appId : null, ne._setActiveAppId(this.activeAppId);
1965
2044
  }
1966
2045
  this.notify();
1967
2046
  }
@@ -1973,7 +2052,7 @@ class qt {
1973
2052
  console.warn(`Cannot activate app "${t}": not running`);
1974
2053
  return;
1975
2054
  }
1976
- this.activeAppId !== t && (this.activeAppId = t, this.notify(), J._setActiveAppId(t));
2055
+ this.activeAppId !== t && (this.activeAppId = t, this.notify(), ne._setActiveAppId(t));
1977
2056
  }
1978
2057
  /**
1979
2058
  * Toggle an app: if active, deactivate; if inactive, activate.
@@ -1991,7 +2070,7 @@ class qt {
1991
2070
  * Get the currently active app definition.
1992
2071
  */
1993
2072
  getActiveApp() {
1994
- return this.activeAppId ? ie.get(this.activeAppId) ?? null : null;
2073
+ return this.activeAppId ? me.get(this.activeAppId) ?? null : null;
1995
2074
  }
1996
2075
  /**
1997
2076
  * Get all running apps.
@@ -2017,14 +2096,14 @@ class qt {
2017
2096
  this.listeners.forEach((t) => t());
2018
2097
  }
2019
2098
  }
2020
- const _ = new qt(), Je = ce(null);
2021
- function Xt() {
2022
- const e = ne(Je);
2099
+ const Q = new Qt(), nt = ge(null);
2100
+ function Zt() {
2101
+ const e = ce(nt);
2023
2102
  if (!e)
2024
2103
  throw new Error("useApp must be used inside an App");
2025
2104
  return e;
2026
2105
  }
2027
- function Jt({ size: e = 16 }) {
2106
+ function en({ size: e = 16 }) {
2028
2107
  return /* @__PURE__ */ N(
2029
2108
  "svg",
2030
2109
  {
@@ -2043,7 +2122,7 @@ function Jt({ size: e = 16 }) {
2043
2122
  }
2044
2123
  );
2045
2124
  }
2046
- function Zt({ title: e, onClose: t, onBack: n, toolbar: r, hideBackButton: o }) {
2125
+ function tn({ title: e, onClose: t, onBack: n, toolbar: r, hideBackButton: o }) {
2047
2126
  return /* @__PURE__ */ N("div", { className: "nc-app-title-bar", children: [
2048
2127
  /* @__PURE__ */ N("div", { className: "nc-app-title-bar-left", children: [
2049
2128
  n && !o && /* @__PURE__ */ s(
@@ -2053,18 +2132,18 @@ function Zt({ title: e, onClose: t, onBack: n, toolbar: r, hideBackButton: o })
2053
2132
  onClick: n,
2054
2133
  title: "Back",
2055
2134
  "aria-label": "Go back",
2056
- children: /* @__PURE__ */ s(Jt, { size: 16 })
2135
+ children: /* @__PURE__ */ s(en, { size: 16 })
2057
2136
  }
2058
2137
  ),
2059
2138
  /* @__PURE__ */ s("span", { className: "nc-app-title-bar-title", children: e })
2060
2139
  ] }),
2061
2140
  /* @__PURE__ */ N("div", { className: "nc-app-title-bar-right", children: [
2062
2141
  r && /* @__PURE__ */ s("div", { className: "nc-app-title-bar-toolbar", children: r }),
2063
- /* @__PURE__ */ s(Ue, { onClick: t, "aria-label": "Close application" })
2142
+ /* @__PURE__ */ s(Ze, { onClick: t, "aria-label": "Close application" })
2064
2143
  ] })
2065
2144
  ] });
2066
2145
  }
2067
- class Qt extends Me.Component {
2146
+ class nn extends ze.Component {
2068
2147
  constructor(t) {
2069
2148
  super(t), this.state = { hasError: !1 };
2070
2149
  }
@@ -2097,38 +2176,38 @@ class Qt extends Me.Component {
2097
2176
  ) : this.props.children;
2098
2177
  }
2099
2178
  }
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(() => {
2179
+ function rt({ appId: e, isActive: t, onClose: n }) {
2180
+ const { t: r } = re(), o = me.get(e), [i, a] = R(""), [c, l] = R(null), [u, f] = R(null), [b, d] = R(!1), [m, A] = R(!1);
2181
+ ze.useEffect(() => {
2103
2182
  o != null && o.titleKey && a(r(o.titleKey));
2104
2183
  }, [o, r]);
2105
- const b = V((x) => {
2106
- a(x);
2107
- }, []), w = V((x) => {
2108
- l(() => x);
2109
- }, []), k = V(() => {
2184
+ const v = Y((S) => {
2185
+ a(S);
2186
+ }, []), w = Y((S) => {
2187
+ l(() => S);
2188
+ }, []), y = Y(() => {
2110
2189
  l(null);
2111
- }, []), g = V((x) => {
2112
- f(x);
2113
- }, []), p = V(() => {
2190
+ }, []), h = Y((S) => {
2191
+ f(S);
2192
+ }, []), p = Y(() => {
2114
2193
  f(null);
2115
- }, []), h = V((x) => {
2116
- d(x);
2117
- }, []), A = V((x) => {
2118
- y(x);
2119
- }, []), C = we(() => ({
2120
- setTitle: b,
2194
+ }, []), g = Y((S) => {
2195
+ d(S);
2196
+ }, []), x = Y((S) => {
2197
+ A(S);
2198
+ }, []), C = Me(() => ({
2199
+ setTitle: v,
2121
2200
  setBackHandler: w,
2122
- clearBackHandler: k,
2123
- setToolbar: g,
2201
+ clearBackHandler: y,
2202
+ setToolbar: h,
2124
2203
  clearToolbar: p,
2125
- setHideBackButton: h,
2126
- setHideTitleBar: A,
2204
+ setHideBackButton: g,
2205
+ setHideTitleBar: x,
2127
2206
  close: n
2128
- }), [b, w, k, g, p, h, A, n]);
2207
+ }), [v, w, y, h, p, g, x, n]);
2129
2208
  if (!o)
2130
2209
  return null;
2131
- const T = o.component, P = !o.hideTitleBar && !m;
2210
+ const T = o.component, E = !o.hideTitleBar && !m;
2132
2211
  return /* @__PURE__ */ N(
2133
2212
  "div",
2134
2213
  {
@@ -2139,20 +2218,20 @@ function Ze({ appId: e, isActive: t, onClose: n }) {
2139
2218
  minHeight: 0
2140
2219
  },
2141
2220
  children: [
2142
- P && /* @__PURE__ */ s(
2143
- Zt,
2221
+ E && /* @__PURE__ */ s(
2222
+ tn,
2144
2223
  {
2145
2224
  title: i,
2146
2225
  onClose: n,
2147
2226
  onBack: c ?? void 0,
2148
2227
  toolbar: u,
2149
- hideBackButton: v
2228
+ hideBackButton: b
2150
2229
  }
2151
2230
  ),
2152
2231
  /* @__PURE__ */ s(
2153
2232
  "div",
2154
2233
  {
2155
- className: P ? "nc-app-content-wrapper" : "",
2234
+ className: E ? "nc-app-content-wrapper" : "",
2156
2235
  style: {
2157
2236
  padding: o.padding,
2158
2237
  flex: 1,
@@ -2162,8 +2241,8 @@ function Ze({ appId: e, isActive: t, onClose: n }) {
2162
2241
  backgroundColor: "var(--nc-bg-tertiary)",
2163
2242
  position: "relative"
2164
2243
  },
2165
- children: /* @__PURE__ */ s(Je.Provider, { value: C, children: /* @__PURE__ */ s(Qt, { appId: e, children: /* @__PURE__ */ s(
2166
- St,
2244
+ children: /* @__PURE__ */ s(nt.Provider, { value: C, children: /* @__PURE__ */ s(nn, { appId: e, children: /* @__PURE__ */ s(
2245
+ Mt,
2167
2246
  {
2168
2247
  fallback: /* @__PURE__ */ s(
2169
2248
  "div",
@@ -2174,7 +2253,7 @@ function Ze({ appId: e, isActive: t, onClose: n }) {
2174
2253
  justifyContent: "center",
2175
2254
  flex: 1
2176
2255
  },
2177
- children: /* @__PURE__ */ s(_e, {})
2256
+ children: /* @__PURE__ */ s(Qe, {})
2178
2257
  }
2179
2258
  ),
2180
2259
  children: /* @__PURE__ */ s(T, {})
@@ -2186,77 +2265,77 @@ function Ze({ appId: e, isActive: t, onClose: n }) {
2186
2265
  }
2187
2266
  );
2188
2267
  }
2189
- const be = 768, ve = 1024, Qe = {
2268
+ const Ce = 768, $e = 1024, ot = {
2190
2269
  isMobile: !1,
2191
2270
  isTablet: !1,
2192
2271
  isDesktop: !0,
2193
2272
  width: typeof window < "u" ? window.innerWidth : 1024,
2194
2273
  height: typeof window < "u" ? window.innerHeight : 768
2195
- }, et = ce(Qe);
2196
- function mr({ children: e }) {
2197
- const [t, n] = E(() => {
2198
- if (typeof window > "u") return Qe;
2274
+ }, st = ge(ot);
2275
+ function br({ children: e }) {
2276
+ const [t, n] = R(() => {
2277
+ if (typeof window > "u") return ot;
2199
2278
  const r = window.innerWidth, o = window.innerHeight;
2200
2279
  return {
2201
- isMobile: r < be,
2202
- isTablet: r >= be && r < ve,
2203
- isDesktop: r >= ve,
2280
+ isMobile: r < Ce,
2281
+ isTablet: r >= Ce && r < $e,
2282
+ isDesktop: r >= $e,
2204
2283
  width: r,
2205
2284
  height: o
2206
2285
  };
2207
2286
  });
2208
- return z(() => {
2287
+ return D(() => {
2209
2288
  const r = () => {
2210
2289
  const o = window.innerWidth, i = window.innerHeight;
2211
2290
  n({
2212
- isMobile: o < be,
2213
- isTablet: o >= be && o < ve,
2214
- isDesktop: o >= ve,
2291
+ isMobile: o < Ce,
2292
+ isTablet: o >= Ce && o < $e,
2293
+ isDesktop: o >= $e,
2215
2294
  width: o,
2216
2295
  height: i
2217
2296
  });
2218
2297
  };
2219
2298
  return window.addEventListener("resize", r), () => window.removeEventListener("resize", r);
2220
- }, []), /* @__PURE__ */ s(et.Provider, { value: t, children: e });
2299
+ }, []), /* @__PURE__ */ s(st.Provider, { value: t, children: e });
2221
2300
  }
2222
- function tt() {
2223
- return ne(et);
2301
+ function it() {
2302
+ return ce(st);
2224
2303
  }
2225
- const Ie = "-", en = (e) => {
2226
- const t = nn(e), {
2304
+ const Be = "-", rn = (e) => {
2305
+ const t = sn(e), {
2227
2306
  conflictingClassGroups: n,
2228
2307
  conflictingClassGroupModifiers: r
2229
2308
  } = e;
2230
2309
  return {
2231
2310
  getClassGroupId: (a) => {
2232
- const c = a.split(Ie);
2233
- return c[0] === "" && c.length !== 1 && c.shift(), nt(c, t) || tn(a);
2311
+ const c = a.split(Be);
2312
+ return c[0] === "" && c.length !== 1 && c.shift(), ct(c, t) || on(a);
2234
2313
  },
2235
2314
  getConflictingClassGroupIds: (a, c) => {
2236
2315
  const l = n[a] || [];
2237
2316
  return c && r[a] ? [...l, ...r[a]] : l;
2238
2317
  }
2239
2318
  };
2240
- }, nt = (e, t) => {
2319
+ }, ct = (e, t) => {
2241
2320
  var a;
2242
2321
  if (e.length === 0)
2243
2322
  return t.classGroupId;
2244
- const n = e[0], r = t.nextPart.get(n), o = r ? nt(e.slice(1), r) : void 0;
2323
+ const n = e[0], r = t.nextPart.get(n), o = r ? ct(e.slice(1), r) : void 0;
2245
2324
  if (o)
2246
2325
  return o;
2247
2326
  if (t.validators.length === 0)
2248
2327
  return;
2249
- const i = e.join(Ie);
2328
+ const i = e.join(Be);
2250
2329
  return (a = t.validators.find(({
2251
2330
  validator: c
2252
2331
  }) => 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(":"));
2332
+ }, Xe = /^\[(.+)\]$/, on = (e) => {
2333
+ if (Xe.test(e)) {
2334
+ const t = Xe.exec(e)[1], n = t == null ? void 0 : t.substring(0, t.indexOf(":"));
2256
2335
  if (n)
2257
2336
  return "arbitrary.." + n;
2258
2337
  }
2259
- }, nn = (e) => {
2338
+ }, sn = (e) => {
2260
2339
  const {
2261
2340
  theme: t,
2262
2341
  prefix: n
@@ -2264,19 +2343,19 @@ const Ie = "-", en = (e) => {
2264
2343
  nextPart: /* @__PURE__ */ new Map(),
2265
2344
  validators: []
2266
2345
  };
2267
- return on(Object.entries(e.classGroups), n).forEach(([i, a]) => {
2268
- Ce(a, r, i, t);
2346
+ return an(Object.entries(e.classGroups), n).forEach(([i, a]) => {
2347
+ Ee(a, r, i, t);
2269
2348
  }), r;
2270
- }, Ce = (e, t, n, r) => {
2349
+ }, Ee = (e, t, n, r) => {
2271
2350
  e.forEach((o) => {
2272
2351
  if (typeof o == "string") {
2273
- const i = o === "" ? t : Ke(t, o);
2352
+ const i = o === "" ? t : Je(t, o);
2274
2353
  i.classGroupId = n;
2275
2354
  return;
2276
2355
  }
2277
2356
  if (typeof o == "function") {
2278
- if (rn(o)) {
2279
- Ce(o(r), t, n, r);
2357
+ if (cn(o)) {
2358
+ Ee(o(r), t, n, r);
2280
2359
  return;
2281
2360
  }
2282
2361
  t.validators.push({
@@ -2286,21 +2365,21 @@ const Ie = "-", en = (e) => {
2286
2365
  return;
2287
2366
  }
2288
2367
  Object.entries(o).forEach(([i, a]) => {
2289
- Ce(a, Ke(t, i), n, r);
2368
+ Ee(a, Je(t, i), n, r);
2290
2369
  });
2291
2370
  });
2292
- }, Ke = (e, t) => {
2371
+ }, Je = (e, t) => {
2293
2372
  let n = e;
2294
- return t.split(Ie).forEach((r) => {
2373
+ return t.split(Be).forEach((r) => {
2295
2374
  n.nextPart.has(r) || n.nextPart.set(r, {
2296
2375
  nextPart: /* @__PURE__ */ new Map(),
2297
2376
  validators: []
2298
2377
  }), n = n.nextPart.get(r);
2299
2378
  }), n;
2300
- }, rn = (e) => e.isThemeGetter, on = (e, t) => t ? e.map(([n, r]) => {
2379
+ }, cn = (e) => e.isThemeGetter, an = (e, t) => t ? e.map(([n, r]) => {
2301
2380
  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
2381
  return [n, o];
2303
- }) : e, sn = (e) => {
2382
+ }) : e, ln = (e) => {
2304
2383
  if (e < 1)
2305
2384
  return {
2306
2385
  get: () => {
@@ -2324,40 +2403,40 @@ const Ie = "-", en = (e) => {
2324
2403
  n.has(i) ? n.set(i, a) : o(i, a);
2325
2404
  }
2326
2405
  };
2327
- }, rt = "!", cn = (e) => {
2406
+ }, at = "!", dn = (e) => {
2328
2407
  const {
2329
2408
  separator: t,
2330
2409
  experimentalParseClassName: n
2331
2410
  } = e, r = t.length === 1, o = t[0], i = t.length, a = (c) => {
2332
2411
  const l = [];
2333
- let u = 0, f = 0, v;
2412
+ let u = 0, f = 0, b;
2334
2413
  for (let w = 0; w < c.length; w++) {
2335
- let k = c[w];
2414
+ let y = c[w];
2336
2415
  if (u === 0) {
2337
- if (k === o && (r || c.slice(w, w + i) === t)) {
2416
+ if (y === o && (r || c.slice(w, w + i) === t)) {
2338
2417
  l.push(c.slice(f, w)), f = w + i;
2339
2418
  continue;
2340
2419
  }
2341
- if (k === "/") {
2342
- v = w;
2420
+ if (y === "/") {
2421
+ b = w;
2343
2422
  continue;
2344
2423
  }
2345
2424
  }
2346
- k === "[" ? u++ : k === "]" && u--;
2425
+ y === "[" ? u++ : y === "]" && u--;
2347
2426
  }
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;
2427
+ const d = l.length === 0 ? c : c.substring(f), m = d.startsWith(at), A = m ? d.substring(1) : d, v = b && b > f ? b - f : void 0;
2349
2428
  return {
2350
2429
  modifiers: l,
2351
2430
  hasImportantModifier: m,
2352
- baseClassName: y,
2353
- maybePostfixModifierPosition: b
2431
+ baseClassName: A,
2432
+ maybePostfixModifierPosition: v
2354
2433
  };
2355
2434
  };
2356
2435
  return n ? (c) => n({
2357
2436
  className: c,
2358
2437
  parseClassName: a
2359
2438
  }) : a;
2360
- }, an = (e) => {
2439
+ }, un = (e) => {
2361
2440
  if (e.length <= 1)
2362
2441
  return e;
2363
2442
  const t = [];
@@ -2365,120 +2444,120 @@ const Ie = "-", en = (e) => {
2365
2444
  return e.forEach((r) => {
2366
2445
  r[0] === "[" ? (t.push(...n.sort(), r), n = []) : n.push(r);
2367
2446
  }), 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) => {
2447
+ }, pn = (e) => ({
2448
+ cache: ln(e.cacheSize),
2449
+ parseClassName: dn(e),
2450
+ ...rn(e)
2451
+ }), fn = /\s+/, hn = (e, t) => {
2373
2452
  const {
2374
2453
  parseClassName: n,
2375
2454
  getClassGroupId: r,
2376
2455
  getConflictingClassGroupIds: o
2377
- } = t, i = [], a = e.trim().split(dn);
2456
+ } = t, i = [], a = e.trim().split(fn);
2378
2457
  let c = "";
2379
2458
  for (let l = a.length - 1; l >= 0; l -= 1) {
2380
2459
  const u = a[l], {
2381
2460
  modifiers: f,
2382
- hasImportantModifier: v,
2461
+ hasImportantModifier: b,
2383
2462
  baseClassName: d,
2384
2463
  maybePostfixModifierPosition: m
2385
2464
  } = n(u);
2386
- let y = !!m, b = r(y ? d.substring(0, m) : d);
2387
- if (!b) {
2388
- if (!y) {
2465
+ let A = !!m, v = r(A ? d.substring(0, m) : d);
2466
+ if (!v) {
2467
+ if (!A) {
2389
2468
  c = u + (c.length > 0 ? " " + c : c);
2390
2469
  continue;
2391
2470
  }
2392
- if (b = r(d), !b) {
2471
+ if (v = r(d), !v) {
2393
2472
  c = u + (c.length > 0 ? " " + c : c);
2394
2473
  continue;
2395
2474
  }
2396
- y = !1;
2475
+ A = !1;
2397
2476
  }
2398
- const w = an(f).join(":"), k = v ? w + rt : w, g = k + b;
2399
- if (i.includes(g))
2477
+ const w = un(f).join(":"), y = b ? w + at : w, h = y + v;
2478
+ if (i.includes(h))
2400
2479
  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);
2480
+ i.push(h);
2481
+ const p = o(v, A);
2482
+ for (let g = 0; g < p.length; ++g) {
2483
+ const x = p[g];
2484
+ i.push(y + x);
2406
2485
  }
2407
2486
  c = u + (c.length > 0 ? " " + c : c);
2408
2487
  }
2409
2488
  return c;
2410
2489
  };
2411
- function pn() {
2490
+ function mn() {
2412
2491
  let e = 0, t, n, r = "";
2413
2492
  for (; e < arguments.length; )
2414
- (t = arguments[e++]) && (n = ot(t)) && (r && (r += " "), r += n);
2493
+ (t = arguments[e++]) && (n = lt(t)) && (r && (r += " "), r += n);
2415
2494
  return r;
2416
2495
  }
2417
- const ot = (e) => {
2496
+ const lt = (e) => {
2418
2497
  if (typeof e == "string")
2419
2498
  return e;
2420
2499
  let t, n = "";
2421
2500
  for (let r = 0; r < e.length; r++)
2422
- e[r] && (t = ot(e[r])) && (n && (n += " "), n += t);
2501
+ e[r] && (t = lt(e[r])) && (n && (n += " "), n += t);
2423
2502
  return n;
2424
2503
  };
2425
- function fn(e, ...t) {
2504
+ function gn(e, ...t) {
2426
2505
  let n, r, o, i = a;
2427
2506
  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);
2507
+ const u = t.reduce((f, b) => b(f), e());
2508
+ return n = pn(u), r = n.cache.get, o = n.cache.set, i = c, c(l);
2430
2509
  }
2431
2510
  function c(l) {
2432
2511
  const u = r(l);
2433
2512
  if (u)
2434
2513
  return u;
2435
- const f = un(l, n);
2514
+ const f = hn(l, n);
2436
2515
  return o(l, f), f;
2437
2516
  }
2438
2517
  return function() {
2439
- return i(pn.apply(null, arguments));
2518
+ return i(mn.apply(null, arguments));
2440
2519
  };
2441
2520
  }
2442
- const D = (e) => {
2521
+ const O = (e) => {
2443
2522
  const t = (n) => n[e] || [];
2444
2523
  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);
2524
+ }, dt = /^\[(?:([a-z-]+):)?(.+)\]$/i, bn = /^\d+\/\d+$/, vn = /* @__PURE__ */ new Set(["px", "full", "screen"]), wn = /^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/, yn = /\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$/, xn = /^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/, kn = /^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/, Nn = /^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/, ee = (e) => he(e) || vn.has(e) || bn.test(e), se = (e) => be(e, "length", Tn), he = (e) => !!e && !Number.isNaN(Number(e)), Ie = (e) => be(e, "number", he), xe = (e) => !!e && Number.isInteger(Number(e)), An = (e) => e.endsWith("%") && he(e.slice(0, -1)), M = (e) => dt.test(e), ie = (e) => wn.test(e), Sn = /* @__PURE__ */ new Set(["length", "size", "percentage"]), Cn = (e) => be(e, Sn, ut), $n = (e) => be(e, "position", ut), Mn = /* @__PURE__ */ new Set(["image", "url"]), In = (e) => be(e, Mn, Ln), Rn = (e) => be(e, "", En), ke = () => !0, be = (e, t, n) => {
2525
+ const r = dt.exec(e);
2447
2526
  return r ? r[1] ? typeof t == "string" ? r[1] === t : t.has(r[1]) : n(r[2]) : !1;
2448
- }, Mn = (e) => (
2527
+ }, Tn = (e) => (
2449
2528
  // `colorFunctionRegex` check is necessary because color functions can have percentages in them which which would be incorrectly classified as lengths.
2450
2529
  // For example, `hsl(0 0% 0%)` would be classified as a length without this check.
2451
2530
  // 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];
2531
+ yn.test(e) && !xn.test(e)
2532
+ ), ut = () => !1, En = (e) => kn.test(e), Ln = (e) => Nn.test(e), Pn = () => {
2533
+ const e = O("colors"), t = O("spacing"), n = O("blur"), r = O("brightness"), o = O("borderColor"), i = O("borderRadius"), a = O("borderSpacing"), c = O("borderWidth"), l = O("contrast"), u = O("grayscale"), f = O("hueRotate"), b = O("invert"), d = O("gap"), m = O("gradientColorStops"), A = O("gradientColorStopPositions"), v = O("inset"), w = O("margin"), y = O("opacity"), h = O("padding"), p = O("saturate"), g = O("scale"), x = O("sepia"), C = O("skew"), T = O("space"), E = O("translate"), S = () => ["auto", "contain", "none"], L = () => ["auto", "hidden", "clip", "visible", "scroll"], k = () => ["auto", M, t], $ = () => [M, t], P = () => ["", ee, se], H = () => ["auto", he, M], ae = () => ["bottom", "center", "left", "left-bottom", "left-top", "right", "right-bottom", "right-top", "top"], X = () => ["solid", "dashed", "dotted", "double", "none"], K = () => ["normal", "multiply", "screen", "overlay", "darken", "lighten", "color-dodge", "color-burn", "hard-light", "soft-light", "difference", "exclusion", "hue", "saturation", "color", "luminosity"], _ = () => ["start", "end", "center", "between", "around", "evenly", "stretch"], U = () => ["", "0", M], j = () => ["auto", "avoid", "all", "avoid-page", "page", "left", "right", "column"], z = () => [he, M];
2455
2534
  return {
2456
2535
  cacheSize: 500,
2457
2536
  separator: ":",
2458
2537
  theme: {
2459
- colors: [de],
2460
- spacing: [q, ee],
2461
- blur: ["none", "", te, M],
2462
- brightness: Y(),
2538
+ colors: [ke],
2539
+ spacing: [ee, se],
2540
+ blur: ["none", "", ie, M],
2541
+ brightness: z(),
2463
2542
  borderColor: [e],
2464
- borderRadius: ["none", "", "full", te, M],
2543
+ borderRadius: ["none", "", "full", ie, M],
2465
2544
  borderSpacing: $(),
2466
- borderWidth: L(),
2467
- contrast: Y(),
2468
- grayscale: W(),
2469
- hueRotate: Y(),
2470
- invert: W(),
2545
+ borderWidth: P(),
2546
+ contrast: z(),
2547
+ grayscale: U(),
2548
+ hueRotate: z(),
2549
+ invert: U(),
2471
2550
  gap: $(),
2472
2551
  gradientColorStops: [e],
2473
- gradientColorStopPositions: [xn, ee],
2474
- inset: S(),
2475
- margin: S(),
2476
- opacity: Y(),
2552
+ gradientColorStopPositions: [An, se],
2553
+ inset: k(),
2554
+ margin: k(),
2555
+ opacity: z(),
2477
2556
  padding: $(),
2478
- saturate: Y(),
2479
- scale: Y(),
2480
- sepia: W(),
2481
- skew: Y(),
2557
+ saturate: z(),
2558
+ scale: z(),
2559
+ sepia: U(),
2560
+ skew: z(),
2482
2561
  space: $(),
2483
2562
  translate: $()
2484
2563
  },
@@ -2501,21 +2580,21 @@ const D = (e) => {
2501
2580
  * @see https://tailwindcss.com/docs/columns
2502
2581
  */
2503
2582
  columns: [{
2504
- columns: [te]
2583
+ columns: [ie]
2505
2584
  }],
2506
2585
  /**
2507
2586
  * Break After
2508
2587
  * @see https://tailwindcss.com/docs/break-after
2509
2588
  */
2510
2589
  "break-after": [{
2511
- "break-after": G()
2590
+ "break-after": j()
2512
2591
  }],
2513
2592
  /**
2514
2593
  * Break Before
2515
2594
  * @see https://tailwindcss.com/docs/break-before
2516
2595
  */
2517
2596
  "break-before": [{
2518
- "break-before": G()
2597
+ "break-before": j()
2519
2598
  }],
2520
2599
  /**
2521
2600
  * Break Inside
@@ -2574,49 +2653,49 @@ const D = (e) => {
2574
2653
  * @see https://tailwindcss.com/docs/object-position
2575
2654
  */
2576
2655
  "object-position": [{
2577
- object: [...F(), M]
2656
+ object: [...ae(), M]
2578
2657
  }],
2579
2658
  /**
2580
2659
  * Overflow
2581
2660
  * @see https://tailwindcss.com/docs/overflow
2582
2661
  */
2583
2662
  overflow: [{
2584
- overflow: I()
2663
+ overflow: L()
2585
2664
  }],
2586
2665
  /**
2587
2666
  * Overflow X
2588
2667
  * @see https://tailwindcss.com/docs/overflow
2589
2668
  */
2590
2669
  "overflow-x": [{
2591
- "overflow-x": I()
2670
+ "overflow-x": L()
2592
2671
  }],
2593
2672
  /**
2594
2673
  * Overflow Y
2595
2674
  * @see https://tailwindcss.com/docs/overflow
2596
2675
  */
2597
2676
  "overflow-y": [{
2598
- "overflow-y": I()
2677
+ "overflow-y": L()
2599
2678
  }],
2600
2679
  /**
2601
2680
  * Overscroll Behavior
2602
2681
  * @see https://tailwindcss.com/docs/overscroll-behavior
2603
2682
  */
2604
2683
  overscroll: [{
2605
- overscroll: x()
2684
+ overscroll: S()
2606
2685
  }],
2607
2686
  /**
2608
2687
  * Overscroll Behavior X
2609
2688
  * @see https://tailwindcss.com/docs/overscroll-behavior
2610
2689
  */
2611
2690
  "overscroll-x": [{
2612
- "overscroll-x": x()
2691
+ "overscroll-x": S()
2613
2692
  }],
2614
2693
  /**
2615
2694
  * Overscroll Behavior Y
2616
2695
  * @see https://tailwindcss.com/docs/overscroll-behavior
2617
2696
  */
2618
2697
  "overscroll-y": [{
2619
- "overscroll-y": x()
2698
+ "overscroll-y": S()
2620
2699
  }],
2621
2700
  /**
2622
2701
  * Position
@@ -2628,63 +2707,63 @@ const D = (e) => {
2628
2707
  * @see https://tailwindcss.com/docs/top-right-bottom-left
2629
2708
  */
2630
2709
  inset: [{
2631
- inset: [b]
2710
+ inset: [v]
2632
2711
  }],
2633
2712
  /**
2634
2713
  * Right / Left
2635
2714
  * @see https://tailwindcss.com/docs/top-right-bottom-left
2636
2715
  */
2637
2716
  "inset-x": [{
2638
- "inset-x": [b]
2717
+ "inset-x": [v]
2639
2718
  }],
2640
2719
  /**
2641
2720
  * Top / Bottom
2642
2721
  * @see https://tailwindcss.com/docs/top-right-bottom-left
2643
2722
  */
2644
2723
  "inset-y": [{
2645
- "inset-y": [b]
2724
+ "inset-y": [v]
2646
2725
  }],
2647
2726
  /**
2648
2727
  * Start
2649
2728
  * @see https://tailwindcss.com/docs/top-right-bottom-left
2650
2729
  */
2651
2730
  start: [{
2652
- start: [b]
2731
+ start: [v]
2653
2732
  }],
2654
2733
  /**
2655
2734
  * End
2656
2735
  * @see https://tailwindcss.com/docs/top-right-bottom-left
2657
2736
  */
2658
2737
  end: [{
2659
- end: [b]
2738
+ end: [v]
2660
2739
  }],
2661
2740
  /**
2662
2741
  * Top
2663
2742
  * @see https://tailwindcss.com/docs/top-right-bottom-left
2664
2743
  */
2665
2744
  top: [{
2666
- top: [b]
2745
+ top: [v]
2667
2746
  }],
2668
2747
  /**
2669
2748
  * Right
2670
2749
  * @see https://tailwindcss.com/docs/top-right-bottom-left
2671
2750
  */
2672
2751
  right: [{
2673
- right: [b]
2752
+ right: [v]
2674
2753
  }],
2675
2754
  /**
2676
2755
  * Bottom
2677
2756
  * @see https://tailwindcss.com/docs/top-right-bottom-left
2678
2757
  */
2679
2758
  bottom: [{
2680
- bottom: [b]
2759
+ bottom: [v]
2681
2760
  }],
2682
2761
  /**
2683
2762
  * Left
2684
2763
  * @see https://tailwindcss.com/docs/top-right-bottom-left
2685
2764
  */
2686
2765
  left: [{
2687
- left: [b]
2766
+ left: [v]
2688
2767
  }],
2689
2768
  /**
2690
2769
  * Visibility
@@ -2696,7 +2775,7 @@ const D = (e) => {
2696
2775
  * @see https://tailwindcss.com/docs/z-index
2697
2776
  */
2698
2777
  z: [{
2699
- z: ["auto", le, M]
2778
+ z: ["auto", xe, M]
2700
2779
  }],
2701
2780
  // Flexbox and Grid
2702
2781
  /**
@@ -2704,7 +2783,7 @@ const D = (e) => {
2704
2783
  * @see https://tailwindcss.com/docs/flex-basis
2705
2784
  */
2706
2785
  basis: [{
2707
- basis: S()
2786
+ basis: k()
2708
2787
  }],
2709
2788
  /**
2710
2789
  * Flex Direction
@@ -2732,28 +2811,28 @@ const D = (e) => {
2732
2811
  * @see https://tailwindcss.com/docs/flex-grow
2733
2812
  */
2734
2813
  grow: [{
2735
- grow: W()
2814
+ grow: U()
2736
2815
  }],
2737
2816
  /**
2738
2817
  * Flex Shrink
2739
2818
  * @see https://tailwindcss.com/docs/flex-shrink
2740
2819
  */
2741
2820
  shrink: [{
2742
- shrink: W()
2821
+ shrink: U()
2743
2822
  }],
2744
2823
  /**
2745
2824
  * Order
2746
2825
  * @see https://tailwindcss.com/docs/order
2747
2826
  */
2748
2827
  order: [{
2749
- order: ["first", "last", "none", le, M]
2828
+ order: ["first", "last", "none", xe, M]
2750
2829
  }],
2751
2830
  /**
2752
2831
  * Grid Template Columns
2753
2832
  * @see https://tailwindcss.com/docs/grid-template-columns
2754
2833
  */
2755
2834
  "grid-cols": [{
2756
- "grid-cols": [de]
2835
+ "grid-cols": [ke]
2757
2836
  }],
2758
2837
  /**
2759
2838
  * Grid Column Start / End
@@ -2761,7 +2840,7 @@ const D = (e) => {
2761
2840
  */
2762
2841
  "col-start-end": [{
2763
2842
  col: ["auto", {
2764
- span: ["full", le, M]
2843
+ span: ["full", xe, M]
2765
2844
  }, M]
2766
2845
  }],
2767
2846
  /**
@@ -2769,21 +2848,21 @@ const D = (e) => {
2769
2848
  * @see https://tailwindcss.com/docs/grid-column
2770
2849
  */
2771
2850
  "col-start": [{
2772
- "col-start": O()
2851
+ "col-start": H()
2773
2852
  }],
2774
2853
  /**
2775
2854
  * Grid Column End
2776
2855
  * @see https://tailwindcss.com/docs/grid-column
2777
2856
  */
2778
2857
  "col-end": [{
2779
- "col-end": O()
2858
+ "col-end": H()
2780
2859
  }],
2781
2860
  /**
2782
2861
  * Grid Template Rows
2783
2862
  * @see https://tailwindcss.com/docs/grid-template-rows
2784
2863
  */
2785
2864
  "grid-rows": [{
2786
- "grid-rows": [de]
2865
+ "grid-rows": [ke]
2787
2866
  }],
2788
2867
  /**
2789
2868
  * Grid Row Start / End
@@ -2791,7 +2870,7 @@ const D = (e) => {
2791
2870
  */
2792
2871
  "row-start-end": [{
2793
2872
  row: ["auto", {
2794
- span: [le, M]
2873
+ span: [xe, M]
2795
2874
  }, M]
2796
2875
  }],
2797
2876
  /**
@@ -2799,14 +2878,14 @@ const D = (e) => {
2799
2878
  * @see https://tailwindcss.com/docs/grid-row
2800
2879
  */
2801
2880
  "row-start": [{
2802
- "row-start": O()
2881
+ "row-start": H()
2803
2882
  }],
2804
2883
  /**
2805
2884
  * Grid Row End
2806
2885
  * @see https://tailwindcss.com/docs/grid-row
2807
2886
  */
2808
2887
  "row-end": [{
2809
- "row-end": O()
2888
+ "row-end": H()
2810
2889
  }],
2811
2890
  /**
2812
2891
  * Grid Auto Flow
@@ -2855,7 +2934,7 @@ const D = (e) => {
2855
2934
  * @see https://tailwindcss.com/docs/justify-content
2856
2935
  */
2857
2936
  "justify-content": [{
2858
- justify: ["normal", ...B()]
2937
+ justify: ["normal", ..._()]
2859
2938
  }],
2860
2939
  /**
2861
2940
  * Justify Items
@@ -2876,7 +2955,7 @@ const D = (e) => {
2876
2955
  * @see https://tailwindcss.com/docs/align-content
2877
2956
  */
2878
2957
  "align-content": [{
2879
- content: ["normal", ...B(), "baseline"]
2958
+ content: ["normal", ..._(), "baseline"]
2880
2959
  }],
2881
2960
  /**
2882
2961
  * Align Items
@@ -2897,7 +2976,7 @@ const D = (e) => {
2897
2976
  * @see https://tailwindcss.com/docs/place-content
2898
2977
  */
2899
2978
  "place-content": [{
2900
- "place-content": [...B(), "baseline"]
2979
+ "place-content": [..._(), "baseline"]
2901
2980
  }],
2902
2981
  /**
2903
2982
  * Place Items
@@ -2919,63 +2998,63 @@ const D = (e) => {
2919
2998
  * @see https://tailwindcss.com/docs/padding
2920
2999
  */
2921
3000
  p: [{
2922
- p: [g]
3001
+ p: [h]
2923
3002
  }],
2924
3003
  /**
2925
3004
  * Padding X
2926
3005
  * @see https://tailwindcss.com/docs/padding
2927
3006
  */
2928
3007
  px: [{
2929
- px: [g]
3008
+ px: [h]
2930
3009
  }],
2931
3010
  /**
2932
3011
  * Padding Y
2933
3012
  * @see https://tailwindcss.com/docs/padding
2934
3013
  */
2935
3014
  py: [{
2936
- py: [g]
3015
+ py: [h]
2937
3016
  }],
2938
3017
  /**
2939
3018
  * Padding Start
2940
3019
  * @see https://tailwindcss.com/docs/padding
2941
3020
  */
2942
3021
  ps: [{
2943
- ps: [g]
3022
+ ps: [h]
2944
3023
  }],
2945
3024
  /**
2946
3025
  * Padding End
2947
3026
  * @see https://tailwindcss.com/docs/padding
2948
3027
  */
2949
3028
  pe: [{
2950
- pe: [g]
3029
+ pe: [h]
2951
3030
  }],
2952
3031
  /**
2953
3032
  * Padding Top
2954
3033
  * @see https://tailwindcss.com/docs/padding
2955
3034
  */
2956
3035
  pt: [{
2957
- pt: [g]
3036
+ pt: [h]
2958
3037
  }],
2959
3038
  /**
2960
3039
  * Padding Right
2961
3040
  * @see https://tailwindcss.com/docs/padding
2962
3041
  */
2963
3042
  pr: [{
2964
- pr: [g]
3043
+ pr: [h]
2965
3044
  }],
2966
3045
  /**
2967
3046
  * Padding Bottom
2968
3047
  * @see https://tailwindcss.com/docs/padding
2969
3048
  */
2970
3049
  pb: [{
2971
- pb: [g]
3050
+ pb: [h]
2972
3051
  }],
2973
3052
  /**
2974
3053
  * Padding Left
2975
3054
  * @see https://tailwindcss.com/docs/padding
2976
3055
  */
2977
3056
  pl: [{
2978
- pl: [g]
3057
+ pl: [h]
2979
3058
  }],
2980
3059
  /**
2981
3060
  * Margin
@@ -3085,8 +3164,8 @@ const D = (e) => {
3085
3164
  */
3086
3165
  "max-w": [{
3087
3166
  "max-w": [M, t, "none", "full", "min", "max", "fit", "prose", {
3088
- screen: [te]
3089
- }, te]
3167
+ screen: [ie]
3168
+ }, ie]
3090
3169
  }],
3091
3170
  /**
3092
3171
  * Height
@@ -3122,7 +3201,7 @@ const D = (e) => {
3122
3201
  * @see https://tailwindcss.com/docs/font-size
3123
3202
  */
3124
3203
  "font-size": [{
3125
- text: ["base", te, ee]
3204
+ text: ["base", ie, se]
3126
3205
  }],
3127
3206
  /**
3128
3207
  * Font Smoothing
@@ -3139,14 +3218,14 @@ const D = (e) => {
3139
3218
  * @see https://tailwindcss.com/docs/font-weight
3140
3219
  */
3141
3220
  "font-weight": [{
3142
- font: ["thin", "extralight", "light", "normal", "medium", "semibold", "bold", "extrabold", "black", Ne]
3221
+ font: ["thin", "extralight", "light", "normal", "medium", "semibold", "bold", "extrabold", "black", Ie]
3143
3222
  }],
3144
3223
  /**
3145
3224
  * Font Family
3146
3225
  * @see https://tailwindcss.com/docs/font-family
3147
3226
  */
3148
3227
  "font-family": [{
3149
- font: [de]
3228
+ font: [ke]
3150
3229
  }],
3151
3230
  /**
3152
3231
  * Font Variant Numeric
@@ -3190,14 +3269,14 @@ const D = (e) => {
3190
3269
  * @see https://tailwindcss.com/docs/line-clamp
3191
3270
  */
3192
3271
  "line-clamp": [{
3193
- "line-clamp": ["none", se, Ne]
3272
+ "line-clamp": ["none", he, Ie]
3194
3273
  }],
3195
3274
  /**
3196
3275
  * Line Height
3197
3276
  * @see https://tailwindcss.com/docs/line-height
3198
3277
  */
3199
3278
  leading: [{
3200
- leading: ["none", "tight", "snug", "normal", "relaxed", "loose", q, M]
3279
+ leading: ["none", "tight", "snug", "normal", "relaxed", "loose", ee, M]
3201
3280
  }],
3202
3281
  /**
3203
3282
  * List Style Image
@@ -3233,7 +3312,7 @@ const D = (e) => {
3233
3312
  * @see https://tailwindcss.com/docs/placeholder-opacity
3234
3313
  */
3235
3314
  "placeholder-opacity": [{
3236
- "placeholder-opacity": [k]
3315
+ "placeholder-opacity": [y]
3237
3316
  }],
3238
3317
  /**
3239
3318
  * Text Alignment
@@ -3254,7 +3333,7 @@ const D = (e) => {
3254
3333
  * @see https://tailwindcss.com/docs/text-opacity
3255
3334
  */
3256
3335
  "text-opacity": [{
3257
- "text-opacity": [k]
3336
+ "text-opacity": [y]
3258
3337
  }],
3259
3338
  /**
3260
3339
  * Text Decoration
@@ -3266,21 +3345,21 @@ const D = (e) => {
3266
3345
  * @see https://tailwindcss.com/docs/text-decoration-style
3267
3346
  */
3268
3347
  "text-decoration-style": [{
3269
- decoration: [...j(), "wavy"]
3348
+ decoration: [...X(), "wavy"]
3270
3349
  }],
3271
3350
  /**
3272
3351
  * Text Decoration Thickness
3273
3352
  * @see https://tailwindcss.com/docs/text-decoration-thickness
3274
3353
  */
3275
3354
  "text-decoration-thickness": [{
3276
- decoration: ["auto", "from-font", q, ee]
3355
+ decoration: ["auto", "from-font", ee, se]
3277
3356
  }],
3278
3357
  /**
3279
3358
  * Text Underline Offset
3280
3359
  * @see https://tailwindcss.com/docs/text-underline-offset
3281
3360
  */
3282
3361
  "underline-offset": [{
3283
- "underline-offset": ["auto", q, M]
3362
+ "underline-offset": ["auto", ee, M]
3284
3363
  }],
3285
3364
  /**
3286
3365
  * Text Decoration Color
@@ -3369,7 +3448,7 @@ const D = (e) => {
3369
3448
  * @see https://tailwindcss.com/docs/background-opacity
3370
3449
  */
3371
3450
  "bg-opacity": [{
3372
- "bg-opacity": [k]
3451
+ "bg-opacity": [y]
3373
3452
  }],
3374
3453
  /**
3375
3454
  * Background Origin
@@ -3383,7 +3462,7 @@ const D = (e) => {
3383
3462
  * @see https://tailwindcss.com/docs/background-position
3384
3463
  */
3385
3464
  "bg-position": [{
3386
- bg: [...F(), An]
3465
+ bg: [...ae(), $n]
3387
3466
  }],
3388
3467
  /**
3389
3468
  * Background Repeat
@@ -3399,7 +3478,7 @@ const D = (e) => {
3399
3478
  * @see https://tailwindcss.com/docs/background-size
3400
3479
  */
3401
3480
  "bg-size": [{
3402
- bg: ["auto", "cover", "contain", Nn]
3481
+ bg: ["auto", "cover", "contain", Cn]
3403
3482
  }],
3404
3483
  /**
3405
3484
  * Background Image
@@ -3408,7 +3487,7 @@ const D = (e) => {
3408
3487
  "bg-image": [{
3409
3488
  bg: ["none", {
3410
3489
  "gradient-to": ["t", "tr", "r", "br", "b", "bl", "l", "tl"]
3411
- }, Cn]
3490
+ }, In]
3412
3491
  }],
3413
3492
  /**
3414
3493
  * Background Color
@@ -3422,21 +3501,21 @@ const D = (e) => {
3422
3501
  * @see https://tailwindcss.com/docs/gradient-color-stops
3423
3502
  */
3424
3503
  "gradient-from-pos": [{
3425
- from: [y]
3504
+ from: [A]
3426
3505
  }],
3427
3506
  /**
3428
3507
  * Gradient Color Stops Via Position
3429
3508
  * @see https://tailwindcss.com/docs/gradient-color-stops
3430
3509
  */
3431
3510
  "gradient-via-pos": [{
3432
- via: [y]
3511
+ via: [A]
3433
3512
  }],
3434
3513
  /**
3435
3514
  * Gradient Color Stops To Position
3436
3515
  * @see https://tailwindcss.com/docs/gradient-color-stops
3437
3516
  */
3438
3517
  "gradient-to-pos": [{
3439
- to: [y]
3518
+ to: [A]
3440
3519
  }],
3441
3520
  /**
3442
3521
  * Gradient Color Stops From
@@ -3633,14 +3712,14 @@ const D = (e) => {
3633
3712
  * @see https://tailwindcss.com/docs/border-opacity
3634
3713
  */
3635
3714
  "border-opacity": [{
3636
- "border-opacity": [k]
3715
+ "border-opacity": [y]
3637
3716
  }],
3638
3717
  /**
3639
3718
  * Border Style
3640
3719
  * @see https://tailwindcss.com/docs/border-style
3641
3720
  */
3642
3721
  "border-style": [{
3643
- border: [...j(), "hidden"]
3722
+ border: [...X(), "hidden"]
3644
3723
  }],
3645
3724
  /**
3646
3725
  * Divide Width X
@@ -3671,14 +3750,14 @@ const D = (e) => {
3671
3750
  * @see https://tailwindcss.com/docs/divide-opacity
3672
3751
  */
3673
3752
  "divide-opacity": [{
3674
- "divide-opacity": [k]
3753
+ "divide-opacity": [y]
3675
3754
  }],
3676
3755
  /**
3677
3756
  * Divide Style
3678
3757
  * @see https://tailwindcss.com/docs/divide-style
3679
3758
  */
3680
3759
  "divide-style": [{
3681
- divide: j()
3760
+ divide: X()
3682
3761
  }],
3683
3762
  /**
3684
3763
  * Border Color
@@ -3755,21 +3834,21 @@ const D = (e) => {
3755
3834
  * @see https://tailwindcss.com/docs/outline-style
3756
3835
  */
3757
3836
  "outline-style": [{
3758
- outline: ["", ...j()]
3837
+ outline: ["", ...X()]
3759
3838
  }],
3760
3839
  /**
3761
3840
  * Outline Offset
3762
3841
  * @see https://tailwindcss.com/docs/outline-offset
3763
3842
  */
3764
3843
  "outline-offset": [{
3765
- "outline-offset": [q, M]
3844
+ "outline-offset": [ee, M]
3766
3845
  }],
3767
3846
  /**
3768
3847
  * Outline Width
3769
3848
  * @see https://tailwindcss.com/docs/outline-width
3770
3849
  */
3771
3850
  "outline-w": [{
3772
- outline: [q, ee]
3851
+ outline: [ee, se]
3773
3852
  }],
3774
3853
  /**
3775
3854
  * Outline Color
@@ -3783,7 +3862,7 @@ const D = (e) => {
3783
3862
  * @see https://tailwindcss.com/docs/ring-width
3784
3863
  */
3785
3864
  "ring-w": [{
3786
- ring: L()
3865
+ ring: P()
3787
3866
  }],
3788
3867
  /**
3789
3868
  * Ring Width Inset
@@ -3802,14 +3881,14 @@ const D = (e) => {
3802
3881
  * @see https://tailwindcss.com/docs/ring-opacity
3803
3882
  */
3804
3883
  "ring-opacity": [{
3805
- "ring-opacity": [k]
3884
+ "ring-opacity": [y]
3806
3885
  }],
3807
3886
  /**
3808
3887
  * Ring Offset Width
3809
3888
  * @see https://tailwindcss.com/docs/ring-offset-width
3810
3889
  */
3811
3890
  "ring-offset-w": [{
3812
- "ring-offset": [q, ee]
3891
+ "ring-offset": [ee, se]
3813
3892
  }],
3814
3893
  /**
3815
3894
  * Ring Offset Color
@@ -3824,35 +3903,35 @@ const D = (e) => {
3824
3903
  * @see https://tailwindcss.com/docs/box-shadow
3825
3904
  */
3826
3905
  shadow: [{
3827
- shadow: ["", "inner", "none", te, $n]
3906
+ shadow: ["", "inner", "none", ie, Rn]
3828
3907
  }],
3829
3908
  /**
3830
3909
  * Box Shadow Color
3831
3910
  * @see https://tailwindcss.com/docs/box-shadow-color
3832
3911
  */
3833
3912
  "shadow-color": [{
3834
- shadow: [de]
3913
+ shadow: [ke]
3835
3914
  }],
3836
3915
  /**
3837
3916
  * Opacity
3838
3917
  * @see https://tailwindcss.com/docs/opacity
3839
3918
  */
3840
3919
  opacity: [{
3841
- opacity: [k]
3920
+ opacity: [y]
3842
3921
  }],
3843
3922
  /**
3844
3923
  * Mix Blend Mode
3845
3924
  * @see https://tailwindcss.com/docs/mix-blend-mode
3846
3925
  */
3847
3926
  "mix-blend": [{
3848
- "mix-blend": [...R(), "plus-lighter", "plus-darker"]
3927
+ "mix-blend": [...K(), "plus-lighter", "plus-darker"]
3849
3928
  }],
3850
3929
  /**
3851
3930
  * Background Blend Mode
3852
3931
  * @see https://tailwindcss.com/docs/background-blend-mode
3853
3932
  */
3854
3933
  "bg-blend": [{
3855
- "bg-blend": R()
3934
+ "bg-blend": K()
3856
3935
  }],
3857
3936
  // Filters
3858
3937
  /**
@@ -3889,7 +3968,7 @@ const D = (e) => {
3889
3968
  * @see https://tailwindcss.com/docs/drop-shadow
3890
3969
  */
3891
3970
  "drop-shadow": [{
3892
- "drop-shadow": ["", "none", te, M]
3971
+ "drop-shadow": ["", "none", ie, M]
3893
3972
  }],
3894
3973
  /**
3895
3974
  * Grayscale
@@ -3910,7 +3989,7 @@ const D = (e) => {
3910
3989
  * @see https://tailwindcss.com/docs/invert
3911
3990
  */
3912
3991
  invert: [{
3913
- invert: [v]
3992
+ invert: [b]
3914
3993
  }],
3915
3994
  /**
3916
3995
  * Saturate
@@ -3924,7 +4003,7 @@ const D = (e) => {
3924
4003
  * @see https://tailwindcss.com/docs/sepia
3925
4004
  */
3926
4005
  sepia: [{
3927
- sepia: [A]
4006
+ sepia: [x]
3928
4007
  }],
3929
4008
  /**
3930
4009
  * Backdrop Filter
@@ -3974,14 +4053,14 @@ const D = (e) => {
3974
4053
  * @see https://tailwindcss.com/docs/backdrop-invert
3975
4054
  */
3976
4055
  "backdrop-invert": [{
3977
- "backdrop-invert": [v]
4056
+ "backdrop-invert": [b]
3978
4057
  }],
3979
4058
  /**
3980
4059
  * Backdrop Opacity
3981
4060
  * @see https://tailwindcss.com/docs/backdrop-opacity
3982
4061
  */
3983
4062
  "backdrop-opacity": [{
3984
- "backdrop-opacity": [k]
4063
+ "backdrop-opacity": [y]
3985
4064
  }],
3986
4065
  /**
3987
4066
  * Backdrop Saturate
@@ -3995,7 +4074,7 @@ const D = (e) => {
3995
4074
  * @see https://tailwindcss.com/docs/backdrop-sepia
3996
4075
  */
3997
4076
  "backdrop-sepia": [{
3998
- "backdrop-sepia": [A]
4077
+ "backdrop-sepia": [x]
3999
4078
  }],
4000
4079
  // Tables
4001
4080
  /**
@@ -4053,7 +4132,7 @@ const D = (e) => {
4053
4132
  * @see https://tailwindcss.com/docs/transition-duration
4054
4133
  */
4055
4134
  duration: [{
4056
- duration: Y()
4135
+ duration: z()
4057
4136
  }],
4058
4137
  /**
4059
4138
  * Transition Timing Function
@@ -4067,7 +4146,7 @@ const D = (e) => {
4067
4146
  * @see https://tailwindcss.com/docs/transition-delay
4068
4147
  */
4069
4148
  delay: [{
4070
- delay: Y()
4149
+ delay: z()
4071
4150
  }],
4072
4151
  /**
4073
4152
  * Animation
@@ -4089,42 +4168,42 @@ const D = (e) => {
4089
4168
  * @see https://tailwindcss.com/docs/scale
4090
4169
  */
4091
4170
  scale: [{
4092
- scale: [h]
4171
+ scale: [g]
4093
4172
  }],
4094
4173
  /**
4095
4174
  * Scale X
4096
4175
  * @see https://tailwindcss.com/docs/scale
4097
4176
  */
4098
4177
  "scale-x": [{
4099
- "scale-x": [h]
4178
+ "scale-x": [g]
4100
4179
  }],
4101
4180
  /**
4102
4181
  * Scale Y
4103
4182
  * @see https://tailwindcss.com/docs/scale
4104
4183
  */
4105
4184
  "scale-y": [{
4106
- "scale-y": [h]
4185
+ "scale-y": [g]
4107
4186
  }],
4108
4187
  /**
4109
4188
  * Rotate
4110
4189
  * @see https://tailwindcss.com/docs/rotate
4111
4190
  */
4112
4191
  rotate: [{
4113
- rotate: [le, M]
4192
+ rotate: [xe, M]
4114
4193
  }],
4115
4194
  /**
4116
4195
  * Translate X
4117
4196
  * @see https://tailwindcss.com/docs/translate
4118
4197
  */
4119
4198
  "translate-x": [{
4120
- "translate-x": [P]
4199
+ "translate-x": [E]
4121
4200
  }],
4122
4201
  /**
4123
4202
  * Translate Y
4124
4203
  * @see https://tailwindcss.com/docs/translate
4125
4204
  */
4126
4205
  "translate-y": [{
4127
- "translate-y": [P]
4206
+ "translate-y": [E]
4128
4207
  }],
4129
4208
  /**
4130
4209
  * Skew X
@@ -4404,7 +4483,7 @@ const D = (e) => {
4404
4483
  * @see https://tailwindcss.com/docs/stroke-width
4405
4484
  */
4406
4485
  "stroke-w": [{
4407
- stroke: [q, ee, Ne]
4486
+ stroke: [ee, se, Ie]
4408
4487
  }],
4409
4488
  /**
4410
4489
  * Stroke
@@ -4479,39 +4558,39 @@ const D = (e) => {
4479
4558
  "font-size": ["leading"]
4480
4559
  }
4481
4560
  };
4482
- }, Tn = /* @__PURE__ */ fn(En);
4483
- function Pn(...e) {
4484
- return Tn($t(e));
4561
+ }, zn = /* @__PURE__ */ gn(Pn);
4562
+ function Bn(...e) {
4563
+ return zn(Rt(e));
4485
4564
  }
4486
- 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);
4565
+ function vr({ autoWidth: e = !0, className: t, style: n }) {
4566
+ const [r, o] = R(() => ne.getActiveAppId()), [i, a] = R(() => Q.getRunningApps()), { isMobile: c } = it();
4567
+ D(() => {
4568
+ const w = ne.subscribe("activeAppId", (y) => {
4569
+ o(y);
4491
4570
  });
4492
4571
  return () => {
4493
4572
  w();
4494
4573
  };
4495
- }, []), z(() => _.subscribe(() => {
4496
- a(_.getRunningApps());
4497
- }), []), z(() => {
4574
+ }, []), D(() => Q.subscribe(() => {
4575
+ a(Q.getRunningApps());
4576
+ }), []), D(() => {
4498
4577
  if (!new URLSearchParams(window.location.search).has("app")) {
4499
- const g = J.getActiveAppId();
4500
- g && !_.isRunning(g) && _.launchApp(g);
4578
+ const h = ne.getActiveAppId();
4579
+ h && !Q.isRunning(h) && Q.launchApp(h);
4501
4580
  }
4502
4581
  }, []);
4503
4582
  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 = { ...{
4583
+ Q.closeApp(w);
4584
+ }, u = r ? me.get(r) : null, b = (u == null ? void 0 : u.width) ?? 400, d = r !== null, v = { ...{
4506
4585
  overflow: "hidden",
4507
4586
  display: d ? "flex" : "none",
4508
4587
  flexDirection: "column",
4509
4588
  flexShrink: 0,
4510
4589
  // Only set width if autoWidth is enabled
4511
- ...e && d ? { width: c ? "100%" : v } : {}
4590
+ ...e && d ? { width: c ? "100%" : b } : {}
4512
4591
  }, ...n };
4513
- return /* @__PURE__ */ s("div", { className: Pn("nc-app-panel", t), style: b, children: i.map((w) => /* @__PURE__ */ s(
4514
- Ze,
4592
+ return /* @__PURE__ */ s("div", { className: Bn("nc-app-panel", t), style: v, children: i.map((w) => /* @__PURE__ */ s(
4593
+ rt,
4515
4594
  {
4516
4595
  appId: w.appId,
4517
4596
  isActive: r === w.appId,
@@ -4520,49 +4599,49 @@ function gr({ autoWidth: e = !0, className: t, style: n }) {
4520
4599
  w.appId
4521
4600
  )) });
4522
4601
  }
4523
- function br({
4602
+ function wr({
4524
4603
  pinnedAppIds: e,
4525
4604
  className: t = "",
4526
4605
  showIndicators: n = !0,
4527
4606
  side: r = "left",
4528
4607
  getBadge: o
4529
4608
  }) {
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);
4609
+ const { t: i } = re(), { isMobile: a } = it(), [c, l] = R(() => ne.getActiveAppId()), [u, f] = R(() => Q.getRunningApps());
4610
+ D(() => {
4611
+ const p = ne.subscribe("activeAppId", (g) => {
4612
+ l(g);
4534
4613
  });
4535
4614
  return () => {
4536
4615
  p();
4537
4616
  };
4538
- }, []), z(() => _.subscribe(() => {
4539
- f(_.getRunningApps());
4617
+ }, []), D(() => Q.subscribe(() => {
4618
+ f(Q.getRunningApps());
4540
4619
  }), []);
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(
4620
+ const b = (p) => {
4621
+ c === p ? Q.setActiveApp(null) : Q.launchApp(p);
4622
+ }, d = e.map((p) => me.get(p)).filter((p) => !!p), m = u.filter((p) => !e.includes(p.appId)).map((p) => ({ running: p, def: me.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) => {
4623
+ const x = o == null ? void 0 : o(p, g);
4624
+ return x ? /* @__PURE__ */ s(
4546
4625
  "span",
4547
4626
  {
4548
- className: `nc-app-taskbar-badge nc-${A.tone ?? "default"}`,
4549
- "aria-label": A.ariaLabel,
4550
- children: w(A.content)
4627
+ className: `nc-app-taskbar-badge nc-${x.tone ?? "default"}`,
4628
+ "aria-label": x.ariaLabel,
4629
+ children: w(x.content)
4551
4630
  }
4552
4631
  ) : null;
4553
- }, g = a ? 24 : 28;
4632
+ }, h = a ? 24 : 28;
4554
4633
  return /* @__PURE__ */ N("div", { className: `nc-app-taskbar ${a ? "nc-mobile" : "nc-desktop"} nc-${r} ${t}`, children: [
4555
4634
  d.map((p) => {
4556
- const h = p.icon, A = c === p.id, C = y(p.id), T = { isActive: A, isRunning: C, isPinned: !0 };
4635
+ const g = p.icon, x = c === p.id, C = A(p.id), T = { isActive: x, isRunning: C, isPinned: !0 };
4557
4636
  return /* @__PURE__ */ N(
4558
4637
  "button",
4559
4638
  {
4560
- className: `nc-app-taskbar-button ${A ? "nc-active" : ""} ${C ? "nc-running" : ""}`,
4561
- onClick: () => v(p.id),
4562
- title: b(p),
4639
+ className: `nc-app-taskbar-button ${x ? "nc-active" : ""} ${C ? "nc-running" : ""}`,
4640
+ onClick: () => b(p.id),
4641
+ title: v(p),
4563
4642
  children: [
4564
- /* @__PURE__ */ s(h, { size: g }),
4565
- k(p, T),
4643
+ /* @__PURE__ */ s(g, { size: h }),
4644
+ y(p, T),
4566
4645
  n && C && /* @__PURE__ */ s("span", { className: "nc-app-taskbar-indicator" })
4567
4646
  ]
4568
4647
  },
@@ -4570,17 +4649,17 @@ function br({
4570
4649
  );
4571
4650
  }),
4572
4651
  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 };
4652
+ m.map(({ running: p, def: g }) => {
4653
+ const x = g.icon, C = c === p.appId, T = { isActive: C, isRunning: !0, isPinned: !1 };
4575
4654
  return /* @__PURE__ */ N(
4576
4655
  "button",
4577
4656
  {
4578
4657
  className: `nc-app-taskbar-button ${C ? "nc-active" : ""} nc-running`,
4579
- onClick: () => v(p.appId),
4580
- title: b(h),
4658
+ onClick: () => b(p.appId),
4659
+ title: v(g),
4581
4660
  children: [
4582
- /* @__PURE__ */ s(A, { size: g }),
4583
- k(h, T),
4661
+ /* @__PURE__ */ s(x, { size: h }),
4662
+ y(g, T),
4584
4663
  n && /* @__PURE__ */ s("span", { className: "nc-app-taskbar-indicator" })
4585
4664
  ]
4586
4665
  },
@@ -4589,7 +4668,7 @@ function br({
4589
4668
  })
4590
4669
  ] });
4591
4670
  }
4592
- function vr({
4671
+ function yr({
4593
4672
  appId: e,
4594
4673
  open: t,
4595
4674
  onClose: n,
@@ -4613,7 +4692,7 @@ function vr({
4613
4692
  style: i,
4614
4693
  onClick: (l) => l.stopPropagation(),
4615
4694
  children: /* @__PURE__ */ s(
4616
- Ze,
4695
+ rt,
4617
4696
  {
4618
4697
  appId: e,
4619
4698
  isActive: !0,
@@ -4624,86 +4703,86 @@ function vr({
4624
4703
  )
4625
4704
  }
4626
4705
  );
4627
- return pe(c, document.body);
4706
+ return Ae(c, document.body);
4628
4707
  }
4629
- const Re = ce(null), ct = ce(null);
4630
- function wr() {
4631
- const e = ne(Re);
4708
+ const De = ge(null), pt = ge(null);
4709
+ function xr() {
4710
+ const e = ce(De);
4632
4711
  if (!e)
4633
4712
  throw new Error("useNavStack must be used within a NavStackProvider");
4634
4713
  return e;
4635
4714
  }
4636
- function yr() {
4637
- const e = ne(ct);
4715
+ function kr() {
4716
+ const e = ce(pt);
4638
4717
  if (!e)
4639
4718
  throw new Error("useNavView must be used within NavStack");
4640
4719
  return e;
4641
4720
  }
4642
- const Ee = ce(null);
4643
- 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) => {
4721
+ const We = ge(null);
4722
+ function Nr({ rootView: e, children: t }) {
4723
+ const { t: n } = re(), r = Zt(), [o, i] = R([e]), [a, c] = R([null]), l = Y((g, x) => {
4645
4724
  c((C) => {
4646
4725
  const T = [...C];
4647
- return T[h] = A, T;
4726
+ return T[g] = x, T;
4648
4727
  });
4649
- }, []), u = V((h) => {
4650
- c((A) => {
4651
- const C = [...A];
4652
- return C[h] = null, C;
4728
+ }, []), u = Y((g) => {
4729
+ c((x) => {
4730
+ const C = [...x];
4731
+ return C[g] = null, C;
4653
4732
  });
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(() => {
4733
+ }, []), f = Y((g) => {
4734
+ i((x) => [...x, g]), c((x) => [...x, null]);
4735
+ }, []), b = Y(() => {
4736
+ i((g) => g.length <= 1 ? g : g.slice(0, -1)), c((g) => g.slice(0, -1));
4737
+ }, []), d = Y(() => {
4659
4738
  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();
4739
+ }, [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) ?? "";
4740
+ D(() => {
4741
+ r.setTitle(y);
4742
+ }, [y, r]), D(() => {
4743
+ A ? r.setBackHandler(b) : r.clearBackHandler();
4744
+ }, [A, b, r]), D(() => {
4745
+ const g = a[a.length - 1];
4746
+ g ? r.setToolbar(g) : r.clearToolbar();
4668
4747
  }, [a, r]);
4669
- const g = {
4748
+ const h = {
4670
4749
  push: f,
4671
- pop: v,
4750
+ pop: b,
4672
4751
  reset: d,
4673
4752
  depth: m,
4674
- canGoBack: y,
4675
- currentTitle: k
4753
+ canGoBack: A,
4754
+ currentTitle: y
4676
4755
  }, p = {
4677
4756
  stack: o,
4678
4757
  toolbarStack: a,
4679
4758
  updateToolbar: l,
4680
4759
  clearToolbarAt: u,
4681
- topIndex: b
4760
+ topIndex: v
4682
4761
  };
4683
- return /* @__PURE__ */ s(Re.Provider, { value: g, children: /* @__PURE__ */ s(Ee.Provider, { value: p, children: t }) });
4762
+ return /* @__PURE__ */ s(De.Provider, { value: h, children: /* @__PURE__ */ s(We.Provider, { value: p, children: t }) });
4684
4763
  }
4685
- function Ln({ index: e, children: t }) {
4686
- const n = ne(Ee);
4764
+ function Dn({ index: e, children: t }) {
4765
+ const n = ce(We);
4687
4766
  if (!n)
4688
4767
  throw new Error("NavViewProvider must be used within NavStackProvider");
4689
- const { updateToolbar: r, clearToolbarAt: o, topIndex: i } = n, a = V((u) => {
4768
+ const { updateToolbar: r, clearToolbarAt: o, topIndex: i } = n, a = Y((u) => {
4690
4769
  e === i && r(e, u);
4691
- }, [e, i, r]), c = V(() => {
4770
+ }, [e, i, r]), c = Y(() => {
4692
4771
  e === i && o(e);
4693
4772
  }, [e, i, o]), l = {
4694
4773
  setToolbar: a,
4695
4774
  clearToolbar: c
4696
4775
  };
4697
- return /* @__PURE__ */ s(ct.Provider, { value: l, children: t });
4776
+ return /* @__PURE__ */ s(pt.Provider, { value: l, children: t });
4698
4777
  }
4699
- function kr() {
4700
- const e = ne(Re), t = ne(Ee);
4778
+ function Ar() {
4779
+ const e = ce(De), t = ce(We);
4701
4780
  if (!e || !t)
4702
4781
  throw new Error("NavStackContainer must be used within a NavStackProvider");
4703
4782
  const { stack: n } = t;
4704
4783
  return /* @__PURE__ */ s("div", { className: "nav-stack-container", children: /* @__PURE__ */ s("div", { className: "nav-stack-content", children: n.map((r, o) => {
4705
4784
  const i = o === n.length - 1;
4706
- return /* @__PURE__ */ s(Ln, { index: o, children: /* @__PURE__ */ s(
4785
+ return /* @__PURE__ */ s(Dn, { index: o, children: /* @__PURE__ */ s(
4707
4786
  "div",
4708
4787
  {
4709
4788
  style: { display: i ? "flex" : "none", flexDirection: "column", height: "100%" },
@@ -4713,55 +4792,55 @@ function kr() {
4713
4792
  }) }) });
4714
4793
  }
4715
4794
  export {
4716
- _e as ActivityIndicator,
4717
- Gn as Alert,
4718
- Ze as AppContainer,
4719
- Je as AppContext,
4720
- vr as AppDialog,
4721
- gr as AppPanel,
4722
- br as AppTaskbar,
4723
- Zt as AppTitleBar,
4724
- Yn as Battery,
4725
- X as Button,
4726
- Kn as ButtonGroup,
4727
- _n as Checkbox,
4728
- Ue as CloseButton,
4729
- Un as ComboBox,
4730
- Qn as ContextMenu,
4731
- ur as CsvTextArea,
4732
- er as Dialog,
4733
- oe as DialogClose,
4734
- Xn as EditButton,
4735
- Zn as Hyperlink,
4736
- tr as Input,
4737
- rr as ListGroup,
4738
- nr as ListGroupItem,
4739
- sr as MonthRangePicker,
4740
- or as MultiSelect,
4741
- kr as NavStackContainer,
4742
- xr as NavStackProvider,
4743
- Yt as Notification,
4744
- pr as NotificationContainer,
4745
- ir as NumberInput,
4746
- qn as RefreshButton,
4747
- cr as Slider,
4748
- Wt as TabPanel,
4749
- ar as TabPanels,
4750
- lr as Tabs,
4751
- dr as Toggle,
4752
- Jn as TrashButton,
4753
- mr as ViewportProvider,
4754
- ie as appRegistry,
4755
- J as appStateStore,
4756
- Pn as cn,
4757
- hr as createAppI18nFactory,
4758
- fr as notificationManager,
4759
- _ as runningAppsStore,
4760
- Kt as showNotification,
4761
- Xt as useApp,
4762
- Lt as useDialog,
4763
- wr as useNavStack,
4764
- yr as useNavView,
4765
- tt as useViewport
4795
+ Qe as ActivityIndicator,
4796
+ Kn as Alert,
4797
+ rt as AppContainer,
4798
+ nt as AppContext,
4799
+ yr as AppDialog,
4800
+ vr as AppPanel,
4801
+ wr as AppTaskbar,
4802
+ tn as AppTitleBar,
4803
+ _n as Battery,
4804
+ te as Button,
4805
+ Un as ButtonGroup,
4806
+ qn as Checkbox,
4807
+ Ze as CloseButton,
4808
+ Xn as ComboBox,
4809
+ tr as ContextMenu,
4810
+ fr as CsvTextArea,
4811
+ nr as Dialog,
4812
+ fe as DialogClose,
4813
+ Qn as EditButton,
4814
+ er as Hyperlink,
4815
+ rr as Input,
4816
+ sr as ListGroup,
4817
+ or as ListGroupItem,
4818
+ cr as MonthRangePicker,
4819
+ ir as MultiSelect,
4820
+ Ar as NavStackContainer,
4821
+ Nr as NavStackProvider,
4822
+ Ut as Notification,
4823
+ hr as NotificationContainer,
4824
+ ar as NumberInput,
4825
+ Jn as RefreshButton,
4826
+ lr as Slider,
4827
+ Ot as TabPanel,
4828
+ dr as TabPanels,
4829
+ ur as Tabs,
4830
+ pr as Toggle,
4831
+ Zn as TrashButton,
4832
+ br as ViewportProvider,
4833
+ me as appRegistry,
4834
+ ne as appStateStore,
4835
+ Bn as cn,
4836
+ gr as createAppI18nFactory,
4837
+ mr as notificationManager,
4838
+ Q as runningAppsStore,
4839
+ qt as showNotification,
4840
+ Zt as useApp,
4841
+ Dt as useDialog,
4842
+ xr as useNavStack,
4843
+ kr as useNavView,
4844
+ it as useViewport
4766
4845
  };
4767
4846
  //# sourceMappingURL=index.js.map