@kingsimba/nc-ui 0.1.22 → 0.1.24

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
@@ -3,7 +3,7 @@ var tt = (e, t, n) => t in e ? et(e, t, { enumerable: !0, configurable: !0, writ
3
3
  var U = (e, t, n) => tt(e, typeof t != "symbol" ? t + "" : t, n);
4
4
  import { jsx as s, jsxs as x, Fragment as nt } from "react/jsx-runtime";
5
5
  import { d as xe, E as rt, R as ot, T as st, g as it, V as ct, b as at, a as lt, c as dt } from "./GeneratedIcons-HFZmBTBT.js";
6
- import ke, { useState as T, useRef as W, useMemo as me, useEffect as B, createContext as se, useContext as J, Children as ut, isValidElement as pt, forwardRef as ft, useImperativeHandle as ht, useCallback as O, Suspense as mt } from "react";
6
+ import ke, { useState as E, useRef as W, useMemo as me, useEffect as B, createContext as se, useContext as J, Children as ut, isValidElement as pt, forwardRef as ft, useImperativeHandle as ht, useCallback as O, Suspense as mt } from "react";
7
7
  import { createPortal as ue } from "react-dom";
8
8
  import { useTranslation as Q } from "react-i18next";
9
9
  import gt from "i18next";
@@ -37,7 +37,7 @@ function He({
37
37
  );
38
38
  return n ? /* @__PURE__ */ s("div", { className: "nc-activity-indicator-overlay", children: o }) : o;
39
39
  }
40
- function K({ variant: e = "default", block: t, size: n = "default", appearance: r = "default", className: o, disabled: i, textSelectable: a, loading: c, onClick: d, children: p, ...f }) {
40
+ function K({ variant: e = "default", block: t, size: n = "default", appearance: r = "default", className: o, disabled: i, textSelectable: a, loading: c, onClick: l, children: p, ...f }) {
41
41
  const b = [
42
42
  "nc-button",
43
43
  e !== "default" ? `nc-${e}` : "",
@@ -55,14 +55,14 @@ function K({ variant: e = "default", block: t, size: n = "default", appearance:
55
55
  {
56
56
  className: b,
57
57
  disabled: i || c,
58
- onClick: (l) => {
58
+ onClick: (u) => {
59
59
  if (!c) {
60
60
  if (a) {
61
61
  const m = window.getSelection();
62
62
  if (m && m.toString().length > 0)
63
63
  return;
64
64
  }
65
- d == null || d(l);
65
+ l == null || l(u);
66
66
  }
67
67
  },
68
68
  ...f,
@@ -96,13 +96,13 @@ function Tn({
96
96
  children: i,
97
97
  onClose: a,
98
98
  className: c = "",
99
- style: d
99
+ style: l
100
100
  }) {
101
101
  const p = i ?? /* @__PURE__ */ x(nt, { children: [
102
102
  e !== void 0 && /* @__PURE__ */ s("span", { className: "nc-alert-code", children: e }),
103
103
  t
104
104
  ] });
105
- return /* @__PURE__ */ x("div", { className: `nc-alert nc-${n} ${c}`.trim(), style: d, children: [
105
+ return /* @__PURE__ */ x("div", { className: `nc-alert nc-${n} ${c}`.trim(), style: l, children: [
106
106
  /* @__PURE__ */ x("div", { className: "nc-alert-main", children: [
107
107
  /* @__PURE__ */ s("div", { className: `nc-alert-message nc-${n}`, children: p }),
108
108
  a && /* @__PURE__ */ s(
@@ -136,47 +136,47 @@ function zn({
136
136
  const o = Math.max(0, Math.min(1, Number(e) || 0));
137
137
  let i;
138
138
  r ? o < 0.1 ? i = "var(--nc-danger)" : o < 0.2 ? i = "var(--nc-warning)" : i = "var(--nc-success)" : i = n ? "#ffffff" : "#000000";
139
- const a = n ? "rgba(255, 255, 255, 0.5)" : "rgba(0, 0, 0, 0.2)", c = 24, d = 14, p = 2, f = 0, b = 12, u = 0, l = 0, m = 0, g = c, h = d, A = h - u * 2, v = g - u * 2, y = Math.max(1, Math.min(4, h / 4)), w = o === 0 ? 0 : 0.05 + o * 0.95, k = c + p + b, E = 20, z = 0.65, M = Math.max(d, E * z), N = c + p + 1, R = (d - E * z) / 2;
139
+ const a = n ? "rgba(255, 255, 255, 0.5)" : "rgba(0, 0, 0, 0.2)", c = 24, l = 14, p = 2, f = 0, b = 12, d = 0, u = 0, m = 0, h = c, g = l, k = g - d * 2, v = h - d * 2, N = Math.max(1, Math.min(4, g / 4)), w = o === 0 ? 0 : 0.05 + o * 0.95, A = c + p + b, $ = 20, L = 0.65, T = Math.max(l, $ * L), y = c + p + 1, R = (l - $ * L) / 2;
140
140
  return /* @__PURE__ */ x(
141
141
  "svg",
142
142
  {
143
143
  className: "nc-battery",
144
- width: k,
145
- height: M,
146
- viewBox: `0 0 ${k} ${M}`,
144
+ width: A,
145
+ height: T,
146
+ viewBox: `0 0 ${A} ${T}`,
147
147
  role: "img",
148
148
  "aria-label": `Battery ${o === 0 ? "-" : Math.round(o * 100) + "%"} ${t}`,
149
149
  children: [
150
150
  /* @__PURE__ */ x("defs", { children: [
151
- /* @__PURE__ */ s("mask", { id: `nc-battery-fill-mask-${o}`, children: /* @__PURE__ */ s("rect", { x: "0", y: "0", width: v * w, height: A, fill: "white" }) }),
151
+ /* @__PURE__ */ s("mask", { id: `nc-battery-fill-mask-${o}`, children: /* @__PURE__ */ s("rect", { x: "0", y: "0", width: v * w, height: k, fill: "white" }) }),
152
152
  /* @__PURE__ */ x("mask", { id: `nc-battery-text-mask-${o}`, children: [
153
- /* @__PURE__ */ s("rect", { x: "0", y: "0", width: k, height: M, fill: "white" }),
154
- /* @__PURE__ */ s("text", { x: l + g / 2, y: d - 3, fontSize: 11, fontWeight: "bold", fill: "black", textAnchor: "middle", children: o === 0 ? "-" : Math.round(o * 100) })
153
+ /* @__PURE__ */ s("rect", { x: "0", y: "0", width: A, height: T, fill: "white" }),
154
+ /* @__PURE__ */ s("text", { x: u + h / 2, y: l - 3, fontSize: 11, fontWeight: "bold", fill: "black", textAnchor: "middle", children: o === 0 ? "-" : Math.round(o * 100) })
155
155
  ] })
156
156
  ] }),
157
157
  /* @__PURE__ */ x("g", { mask: `url(#nc-battery-text-mask-${o})`, children: [
158
158
  /* @__PURE__ */ s(
159
159
  "rect",
160
160
  {
161
- x: l,
161
+ x: u,
162
162
  y: m,
163
- rx: y,
164
- ry: y,
165
- width: g,
166
- height: h,
163
+ rx: N,
164
+ ry: N,
165
+ width: h,
166
+ height: g,
167
167
  fill: a
168
168
  }
169
169
  ),
170
170
  /* @__PURE__ */ s(
171
171
  "rect",
172
172
  {
173
- x: l + u,
174
- y: m + u,
173
+ x: u + d,
174
+ y: m + d,
175
175
  width: v,
176
- height: A,
176
+ height: k,
177
177
  fill: i,
178
- rx: y,
179
- ry: y,
178
+ rx: N,
179
+ ry: N,
180
180
  mask: `url(#nc-battery-fill-mask-${o})`
181
181
  }
182
182
  ),
@@ -184,15 +184,15 @@ function zn({
184
184
  "rect",
185
185
  {
186
186
  x: c + f,
187
- y: d * 0.26,
187
+ y: l * 0.26,
188
188
  width: p,
189
- height: d * 0.48,
189
+ height: l * 0.48,
190
190
  rx: 0.8,
191
191
  ry: 0.8,
192
192
  fill: o === 1 ? i : a
193
193
  }
194
194
  ),
195
- t === "charging" ? /* @__PURE__ */ s("g", { transform: `translate(${N}, ${R}) scale(${z})`, fill: i, children: /* @__PURE__ */ s("path", { d: "M10 0 L2 11 H8 L5 20 L14 8 H8 L10 0 Z" }) }) : null
195
+ t === "charging" ? /* @__PURE__ */ s("g", { transform: `translate(${y}, ${R}) scale(${L})`, fill: i, children: /* @__PURE__ */ s("path", { d: "M10 0 L2 11 H8 L5 20 L14 8 H8 L10 0 Z" }) }) : null
196
196
  ] })
197
197
  ]
198
198
  }
@@ -205,14 +205,15 @@ function Pn({
205
205
  disabled: r,
206
206
  size: o = "default"
207
207
  }) {
208
- return /* @__PURE__ */ s("div", { className: `nc-button-group ${o === "small" ? "nc-small" : ""}`, children: n.map((i, a) => {
209
- const c = r || !!i.disabled;
208
+ return /* @__PURE__ */ s("div", { className: `nc-button-group ${o === "small" ? "nc-small" : ""}`, children: n.map((i) => {
209
+ const a = r || !!i.disabled;
210
210
  return /* @__PURE__ */ s(
211
211
  "button",
212
212
  {
213
- className: `nc-button-group-item ${e === i.key ? "nc-active" : ""} ${a < n.length - 1 ? "nc-has-border" : ""}`,
214
- onClick: () => !c && t(i.key),
215
- disabled: c,
213
+ type: "button",
214
+ className: `nc-button-group-item ${e === i.key ? "nc-active" : ""}`,
215
+ onClick: () => !a && t(i.key),
216
+ disabled: a,
216
217
  children: i.label
217
218
  },
218
219
  i.key
@@ -232,11 +233,11 @@ function wt({ size: e }) {
232
233
  ) });
233
234
  }
234
235
  function Ln({ checked: e, onChange: t, disabled: n, label: r, size: o = "default", labelColor: i, style: a, className: c = "" }) {
235
- const d = o === "small";
236
+ const l = o === "small";
236
237
  return /* @__PURE__ */ x(
237
238
  "label",
238
239
  {
239
- className: `nc-checkbox-label ${d ? "nc-small" : ""} ${n ? "nc-disabled" : ""} ${c}`.trim(),
240
+ className: `nc-checkbox-label ${l ? "nc-small" : ""} ${n ? "nc-disabled" : ""} ${c}`.trim(),
240
241
  style: a,
241
242
  onClick: (p) => {
242
243
  n || (p.preventDefault(), t(!e));
@@ -248,7 +249,7 @@ function Ln({ checked: e, onChange: t, disabled: n, label: r, size: o = "default
248
249
  role: "checkbox",
249
250
  "aria-checked": e,
250
251
  tabIndex: 0,
251
- className: `nc-checkbox-box ${d ? "nc-small" : ""} ${e ? "nc-checked" : ""}`,
252
+ className: `nc-checkbox-box ${l ? "nc-small" : ""} ${e ? "nc-checked" : ""}`,
252
253
  onKeyDown: (p) => {
253
254
  n || (p.key === "Enter" || p.key === " ") && (p.preventDefault(), t(!e));
254
255
  },
@@ -297,40 +298,40 @@ function xt({
297
298
  small: a,
298
299
  highlightedIndex: c = -1
299
300
  }) {
300
- const [d, p] = T({ top: 0, left: 0, width: 0 }), [f, b] = T(o), { t: u } = Q();
301
+ const [l, p] = E({ top: 0, left: 0, width: 0 }), [f, b] = E(o), { t: d } = Q();
301
302
  if (B(() => {
302
303
  if (e && i.current) {
303
304
  const m = i.current.getBoundingClientRect();
304
- let g = o;
305
+ let h = o;
305
306
  if (o === "bottom") {
306
- const h = window.innerHeight - m.bottom, A = m.top;
307
- h < 320 && A > h && (g = "top");
307
+ const g = window.innerHeight - m.bottom, k = m.top;
308
+ g < 320 && k > g && (h = "top");
308
309
  }
309
- b(g), p({
310
- top: g === "top" ? m.top - 4 : m.bottom + 4,
310
+ b(h), p({
311
+ top: h === "top" ? m.top - 4 : m.bottom + 4,
311
312
  left: m.left,
312
313
  width: m.width
313
314
  });
314
315
  }
315
316
  }, [e, i, o]), !e) return null;
316
- const l = /* @__PURE__ */ s(
317
+ const u = /* @__PURE__ */ s(
317
318
  "div",
318
319
  {
319
320
  className: "nc-combo-dropdown",
320
321
  style: {
321
322
  position: "fixed",
322
- top: f === "top" ? void 0 : d.top,
323
- bottom: f === "top" ? window.innerHeight - d.top : void 0,
324
- left: d.left,
325
- width: d.width,
323
+ top: f === "top" ? void 0 : l.top,
324
+ bottom: f === "top" ? window.innerHeight - l.top : void 0,
325
+ left: l.left,
326
+ width: l.width,
326
327
  zIndex: 1e3,
327
328
  maxHeight: 300,
328
329
  overflowY: "auto"
329
330
  },
330
- children: t.length === 0 ? /* @__PURE__ */ s("div", { className: `nc-combo-dropdown-option nc-no-results ${a ? "nc-small" : ""}`, children: u("common.noResults") }) : t.map((m, g) => /* @__PURE__ */ s(yt, { option: m, onChange: n, selected: m.value === r, highlighted: g === c, small: a }, m.value))
331
+ children: t.length === 0 ? /* @__PURE__ */ s("div", { className: `nc-combo-dropdown-option nc-no-results ${a ? "nc-small" : ""}`, children: d("common.noResults") }) : t.map((m, h) => /* @__PURE__ */ s(yt, { option: m, onChange: n, selected: m.value === r, highlighted: h === c, small: a }, m.value))
331
332
  }
332
333
  );
333
- return ue(l, document.body);
334
+ return ue(u, document.body);
334
335
  }
335
336
  function kt({ onClick: e, small: t }) {
336
337
  return /* @__PURE__ */ s(
@@ -365,136 +366,132 @@ function Bn({
365
366
  label: i,
366
367
  clearable: a = !0,
367
368
  allowTyping: c = !1,
368
- placement: d = "bottom",
369
+ placement: l = "bottom",
369
370
  size: p = "default",
370
371
  appearance: f = "default",
371
- style: b,
372
+ textAlign: b = "left",
373
+ style: d,
372
374
  className: u
373
375
  }) {
374
- const [l, m] = T(!1), [g, h] = T(""), [A, v] = T(-1), y = W(null), w = W(null), k = p === "small", { t: E } = Q(), z = me(() => {
375
- const $ = g.toLowerCase();
376
- return c ? r.filter((P) => P.label.toLowerCase().includes($)) : r;
376
+ const [m, h] = E(!1), [g, k] = E(""), [v, N] = E(-1), w = W(null), A = W(null), $ = p === "small", { t: L } = Q(), T = me(() => {
377
+ const M = g.toLowerCase();
378
+ return c ? r.filter((P) => P.label.toLowerCase().includes(M)) : r;
377
379
  }, [r, g, c]);
378
380
  B(() => {
379
- l && v(-1);
380
- }, [l, z]), B(() => {
381
+ m && N(-1);
382
+ }, [m, T]), B(() => {
381
383
  if (!a && !e && r.length > 0 && t) {
382
- const $ = r.find((P) => P.default) || r[0];
383
- t($.value);
384
+ const M = r.find((P) => P.default) || r[0];
385
+ t(M.value);
384
386
  }
385
387
  }, [a, e, r, t]), B(() => {
386
- function $(P) {
387
- var H;
388
- P.target instanceof Node && y.current && ((H = y.current.parentElement) != null && H.contains(P.target) || m(!1));
388
+ function M(P) {
389
+ var D;
390
+ P.target instanceof Node && w.current && ((D = w.current.parentElement) != null && D.contains(P.target) || h(!1));
389
391
  }
390
- return document.addEventListener("mousedown", $), () => document.removeEventListener("mousedown", $);
392
+ return document.addEventListener("mousedown", M), () => document.removeEventListener("mousedown", M);
391
393
  }, []);
392
- const M = r.find(($) => $.value === e), N = M && a, R = !o && !N, C = !(l && c) && !!M, S = ($, P = !1) => {
393
- var H;
394
- t == null || t($), m(!1), h(""), P && ((H = y.current) == null || H.blur());
395
- }, L = () => {
396
- t == null || t(void 0), h(""), m(!1);
397
- }, V = ($) => {
398
- if (!l) {
399
- ($.key === "ArrowDown" || $.key === "ArrowUp") && (m(!0), $.preventDefault());
394
+ const y = r.find((M) => M.value === e), R = y && a, C = !o && !R, S = `nc-align-${b}`, z = !(m && c) && !!y, F = (M, P = !1) => {
395
+ var D;
396
+ t == null || t(M), h(!1), k(""), P && ((D = w.current) == null || D.blur());
397
+ }, Z = () => {
398
+ t == null || t(void 0), k(""), h(!1);
399
+ }, G = (M) => {
400
+ if (!m) {
401
+ (M.key === "ArrowDown" || M.key === "ArrowUp") && (h(!0), M.preventDefault());
400
402
  return;
401
403
  }
402
- switch ($.key) {
404
+ switch (M.key) {
403
405
  case "ArrowDown":
404
- $.preventDefault(), v((P) => {
405
- const H = P + 1;
406
- return H >= z.length ? 0 : H;
406
+ M.preventDefault(), N((P) => {
407
+ const D = P + 1;
408
+ return D >= T.length ? 0 : D;
407
409
  });
408
410
  break;
409
411
  case "ArrowUp":
410
- $.preventDefault(), v((P) => {
411
- const H = P - 1;
412
- return H < 0 ? z.length - 1 : H;
412
+ M.preventDefault(), N((P) => {
413
+ const D = P - 1;
414
+ return D < 0 ? T.length - 1 : D;
413
415
  });
414
416
  break;
415
417
  case "Enter":
416
- $.preventDefault(), A >= 0 && A < z.length && S(z[A].value, !0);
418
+ M.preventDefault(), v >= 0 && v < T.length && F(T[v].value, !0);
417
419
  break;
418
420
  case "Escape":
419
- $.preventDefault(), m(!1), h("");
421
+ M.preventDefault(), h(!1), k("");
420
422
  break;
421
423
  }
422
424
  };
423
- return /* @__PURE__ */ x("div", { className: `nc-combo-container ${f === "transparent" ? "nc-transparent" : ""} ${u || ""}`.trim(), style: { position: "relative", ...b }, children: [
424
- i && /* @__PURE__ */ s("span", { className: `nc-label ${k ? "nc-small" : ""}`, children: i }),
425
+ return /* @__PURE__ */ x("div", { className: `nc-combo-container ${f === "transparent" ? "nc-transparent" : ""} ${S} ${u || ""}`.trim(), style: { position: "relative", ...d }, children: [
426
+ i && /* @__PURE__ */ s("span", { className: `nc-label ${$ ? "nc-small" : ""}`, children: i }),
425
427
  /* @__PURE__ */ x(
426
428
  "div",
427
429
  {
428
- ref: w,
430
+ ref: A,
429
431
  style: { position: "relative", display: "flex", alignItems: "center" },
430
- onMouseDown: ($) => {
431
- o || c && $.target === y.current || (m((P) => (!P && c && M && h(M.label), !P)), c && !l && setTimeout(() => {
432
- var P, H;
433
- (P = y.current) == null || P.focus(), (H = y.current) == null || H.select();
432
+ onMouseDown: (M) => {
433
+ o || c && M.target === w.current || (h((P) => (!P && c && y && k(y.label), !P)), c && !m && setTimeout(() => {
434
+ var P, D;
435
+ (P = w.current) == null || P.focus(), (D = w.current) == null || D.select();
434
436
  }, 0));
435
437
  },
436
438
  children: [
437
439
  /* @__PURE__ */ s(
438
440
  "input",
439
441
  {
440
- ref: y,
441
- className: `nc-input ${k ? "nc-small" : ""}`,
442
+ ref: w,
443
+ className: `nc-input ${$ ? "nc-small" : ""}`,
442
444
  placeholder: n,
443
445
  onFocus: () => {
444
- var $;
445
- !o && c && (m(!0), M && (h(M.label), setTimeout(() => {
446
+ var M;
447
+ !o && c && (h(!0), y && (k(y.label), setTimeout(() => {
446
448
  var P;
447
- return (P = y.current) == null ? void 0 : P.select();
448
- }, 0))), c || ($ = y.current) == null || $.blur();
449
+ return (P = w.current) == null ? void 0 : P.select();
450
+ }, 0))), c || (M = w.current) == null || M.blur();
449
451
  },
450
- onChange: ($) => c && h($.target.value),
451
- onKeyDown: V,
452
- value: l && c ? g : (M == null ? void 0 : M.label) || "",
452
+ onChange: (M) => c && k(M.target.value),
453
+ onKeyDown: G,
454
+ value: m && c ? g : (y == null ? void 0 : y.label) || "",
453
455
  readOnly: o || !c,
454
456
  style: {
455
457
  width: "100%",
456
- paddingRight: R || N ? k ? 32 : 44 : 12,
458
+ paddingRight: C || R ? $ ? 32 : 44 : 12,
457
459
  caretColor: c ? void 0 : "transparent",
458
460
  cursor: c ? void 0 : "pointer",
459
461
  userSelect: c ? void 0 : "none",
460
- color: C ? "transparent" : "var(--nc-text)"
462
+ color: z ? "transparent" : "var(--nc-text)"
461
463
  }
462
464
  }
463
465
  ),
464
- C && /* @__PURE__ */ x(
466
+ z && /* @__PURE__ */ x(
465
467
  "div",
466
468
  {
467
469
  "aria-hidden": !0,
470
+ className: `nc-combo-overlay ${S}`,
468
471
  style: {
469
472
  position: "absolute",
470
- left: k ? 8 : 12,
471
- right: R || N ? k ? 12 : 24 : k ? 8 : 12,
473
+ left: $ ? 8 : 12,
474
+ right: C || R ? $ ? 12 : 24 : $ ? 8 : 12,
472
475
  top: "50%",
473
476
  transform: "translateY(-50%)",
474
- pointerEvents: "none",
475
- display: "flex",
476
- alignItems: "center",
477
- gap: 6,
478
- whiteSpace: "nowrap",
479
- overflow: "hidden",
480
- textOverflow: "ellipsis"
477
+ pointerEvents: "none"
481
478
  },
482
479
  children: [
483
- /* @__PURE__ */ s("span", { className: `nc-combo-overlay-text ${k ? "nc-small" : ""}`, children: M == null ? void 0 : M.label }),
484
- (M == null ? void 0 : M.default) && /* @__PURE__ */ x("span", { className: `nc-combo-overlay-default ${k ? "nc-small" : ""}`, children: [
480
+ /* @__PURE__ */ s("span", { className: `nc-combo-overlay-text ${$ ? "nc-small" : ""}`, children: y == null ? void 0 : y.label }),
481
+ (y == null ? void 0 : y.default) && /* @__PURE__ */ x("span", { className: `nc-combo-overlay-default ${$ ? "nc-small" : ""}`, children: [
485
482
  "(",
486
- E("common.default"),
483
+ L("common.default"),
487
484
  ")"
488
485
  ] })
489
486
  ]
490
487
  }
491
488
  ),
492
- N && /* @__PURE__ */ s(kt, { onClick: L, small: k }),
493
- R && /* @__PURE__ */ s(Nt, { open: l, onClick: () => m(($) => !$), small: k })
489
+ R && /* @__PURE__ */ s(kt, { onClick: Z, small: $ }),
490
+ C && /* @__PURE__ */ s(Nt, { open: m, onClick: () => h((M) => !M), small: $ })
494
491
  ]
495
492
  }
496
493
  ),
497
- /* @__PURE__ */ s(xt, { isOpen: l, options: z, onSelect: S, selectedValue: e, placement: d, anchorRef: w, small: k, highlightedIndex: A })
494
+ /* @__PURE__ */ s(xt, { isOpen: m, options: T, onSelect: F, selectedValue: e, placement: l, anchorRef: A, small: $, highlightedIndex: v })
498
495
  ] });
499
496
  }
500
497
  function Dn({ onClick: e, loading: t = !1, disabled: n = !1, size: r = "default", title: o, "aria-label": i }) {
@@ -575,35 +572,35 @@ function Fn({
575
572
  anchor: o,
576
573
  preferredDirection: i = "down"
577
574
  }) {
578
- const a = W(null), [c, d] = T({ top: 0, left: 0 }), p = o || (r == null ? void 0 : r.current);
575
+ const a = W(null), [c, l] = E({ top: 0, left: 0 }), p = o || (r == null ? void 0 : r.current);
579
576
  if (B(() => {
580
577
  if (!e || !p || !a.current) return;
581
- const u = p.getBoundingClientRect(), l = a.current.getBoundingClientRect(), m = window.innerHeight, g = window.innerWidth, h = u.bottom + 8, A = h + l.height <= m - 8;
578
+ const d = p.getBoundingClientRect(), u = a.current.getBoundingClientRect(), m = window.innerHeight, h = window.innerWidth, g = d.bottom + 8, k = g + u.height <= m - 8;
582
579
  let v = i;
583
- (!A && i === "down" || i === "up" && A) && (v = "up");
584
- let y;
585
- v === "down" ? y = h : y = u.top - l.height - 8;
586
- let w = u.left;
587
- w + l.width > g - 8 && (w = u.right - l.width), d({
588
- top: Math.max(8, y),
580
+ (!k && i === "down" || i === "up" && k) && (v = "up");
581
+ let N;
582
+ v === "down" ? N = g : N = d.top - u.height - 8;
583
+ let w = d.left;
584
+ w + u.width > h - 8 && (w = d.right - u.width), l({
585
+ top: Math.max(8, N),
589
586
  // Ensure minimum 8px from top
590
587
  left: Math.max(8, w)
591
588
  // Ensure minimum 8px from left
592
589
  });
593
590
  }, [e, p, i]), B(() => {
594
591
  if (!e) return;
595
- const u = (m) => {
592
+ const d = (m) => {
596
593
  a.current && !a.current.contains(m.target) && p && !p.contains(m.target) && t();
597
- }, l = (m) => {
594
+ }, u = (m) => {
598
595
  m.key === "Escape" && t();
599
596
  };
600
- return document.addEventListener("mousedown", u), document.addEventListener("keydown", l), () => {
601
- document.removeEventListener("mousedown", u), document.removeEventListener("keydown", l);
597
+ return document.addEventListener("mousedown", d), document.addEventListener("keydown", u), () => {
598
+ document.removeEventListener("mousedown", d), document.removeEventListener("keydown", u);
602
599
  };
603
600
  }, [e, t, p]), !e) return null;
604
- const f = (u) => {
605
- u.type !== "separator" && !u.disabled && u.onClick && (u.onClick(), t());
606
- }, b = n.some((u) => u.icon);
601
+ const f = (d) => {
602
+ d.type !== "separator" && !d.disabled && d.onClick && (d.onClick(), t());
603
+ }, b = n.some((d) => d.icon);
607
604
  return ue(
608
605
  /* @__PURE__ */ s(
609
606
  "div",
@@ -617,35 +614,35 @@ function Fn({
617
614
  zIndex: 1e4
618
615
  },
619
616
  role: "menu",
620
- children: n.map((u) => {
621
- if (u.type === "separator")
617
+ children: n.map((d) => {
618
+ if (d.type === "separator")
622
619
  return /* @__PURE__ */ s(
623
620
  "div",
624
621
  {
625
622
  className: "nc-context-menu-separator",
626
623
  role: "separator"
627
624
  },
628
- u.id
625
+ d.id
629
626
  );
630
- const l = [
627
+ const u = [
631
628
  "nc-context-menu-item",
632
- u.variant && u.variant !== "default" ? `nc-${u.variant}` : "",
633
- u.disabled ? "nc-disabled" : "",
634
- b && !u.icon ? "nc-indented" : ""
629
+ d.variant && d.variant !== "default" ? `nc-${d.variant}` : "",
630
+ d.disabled ? "nc-disabled" : "",
631
+ b && !d.icon ? "nc-indented" : ""
635
632
  ].filter(Boolean).join(" ");
636
633
  return /* @__PURE__ */ x(
637
634
  "button",
638
635
  {
639
- className: l,
640
- onClick: () => f(u),
641
- disabled: u.disabled,
636
+ className: u,
637
+ onClick: () => f(d),
638
+ disabled: d.disabled,
642
639
  role: "menuitem",
643
640
  children: [
644
- u.icon && /* @__PURE__ */ s("span", { className: "nc-context-menu-icon", children: u.icon }),
645
- /* @__PURE__ */ s("span", { className: "nc-context-menu-label", children: u.label })
641
+ d.icon && /* @__PURE__ */ s("span", { className: "nc-context-menu-icon", children: d.icon }),
642
+ /* @__PURE__ */ s("span", { className: "nc-context-menu-label", children: d.label })
646
643
  ]
647
644
  },
648
- u.id
645
+ d.id
649
646
  );
650
647
  })
651
648
  }
@@ -675,56 +672,56 @@ function Vn({
675
672
  footerType: i = "ok-cancel",
676
673
  footer: a,
677
674
  onOk: c,
678
- onSave: d,
675
+ onSave: l,
679
676
  onDelete: p,
680
677
  onCancel: f,
681
678
  onConnect: b,
682
- closeOnOverlay: u = !0,
683
- primaryDisabled: l = !1,
679
+ closeOnOverlay: d = !0,
680
+ primaryDisabled: u = !1,
684
681
  fullScreen: m = !1,
685
- hideTitleBar: g = !1,
686
- className: h = "",
687
- onContentHeightChange: A
682
+ hideTitleBar: h = !1,
683
+ className: g = "",
684
+ onContentHeightChange: k
688
685
  }) {
689
- const v = W(null), y = W(null), { t: w } = Q(), k = { close: t }, E = (N) => {
690
- u && N.target === N.currentTarget && t();
686
+ const v = W(null), N = W(null), { t: w } = Q(), A = { close: t }, $ = (y) => {
687
+ d && y.target === y.currentTarget && t();
691
688
  };
692
689
  if (B(() => {
693
690
  e && v.current && v.current.focus();
694
691
  }, [e]), B(() => {
695
- if (!A || !y.current) return;
696
- const N = new ResizeObserver((R) => {
692
+ if (!k || !N.current) return;
693
+ const y = new ResizeObserver((R) => {
697
694
  for (const C of R) {
698
695
  const S = C.contentRect.height;
699
- A(S);
696
+ k(S);
700
697
  }
701
698
  });
702
- return N.observe(y.current), () => {
703
- N.disconnect();
699
+ return y.observe(N.current), () => {
700
+ y.disconnect();
704
701
  };
705
- }, [A]), !e) return null;
706
- const z = () => {
702
+ }, [k]), !e) return null;
703
+ const L = () => {
707
704
  switch (i) {
708
705
  case "ok":
709
- return /* @__PURE__ */ s("div", { className: "nc-dialog-footer", children: /* @__PURE__ */ s(K, { variant: "primary", onClick: c ?? t, disabled: l, children: w("common.ok") }) });
706
+ return /* @__PURE__ */ s("div", { className: "nc-dialog-footer", children: /* @__PURE__ */ s(K, { variant: "primary", onClick: c ?? t, disabled: u, children: w("common.ok") }) });
710
707
  case "ok-cancel":
711
708
  return /* @__PURE__ */ x("div", { className: "nc-dialog-footer", children: [
712
- /* @__PURE__ */ s(K, { variant: "primary", onClick: c ?? t, disabled: l, children: w("common.ok") }),
709
+ /* @__PURE__ */ s(K, { variant: "primary", onClick: c ?? t, disabled: u, children: w("common.ok") }),
713
710
  /* @__PURE__ */ s(ne, { onClick: f, children: w("common.cancel") })
714
711
  ] });
715
712
  case "save-cancel":
716
713
  return /* @__PURE__ */ x("div", { className: "nc-dialog-footer", children: [
717
- /* @__PURE__ */ s(K, { variant: "primary", onClick: d, disabled: l, children: w("common.save") }),
714
+ /* @__PURE__ */ s(K, { variant: "primary", onClick: l, disabled: u, children: w("common.save") }),
718
715
  /* @__PURE__ */ s(ne, { onClick: f, children: w("common.cancel") })
719
716
  ] });
720
717
  case "delete-cancel":
721
718
  return /* @__PURE__ */ x("div", { className: "nc-dialog-footer", children: [
722
- /* @__PURE__ */ s(K, { variant: "danger", onClick: p, disabled: l, children: w("common.delete") }),
719
+ /* @__PURE__ */ s(K, { variant: "danger", onClick: p, disabled: u, children: w("common.delete") }),
723
720
  /* @__PURE__ */ s(ne, { onClick: f, children: w("common.cancel") })
724
721
  ] });
725
722
  case "connect":
726
723
  return /* @__PURE__ */ x("div", { className: "nc-dialog-footer", children: [
727
- /* @__PURE__ */ s(K, { variant: "primary", onClick: b, disabled: l, children: w("common.connect") }),
724
+ /* @__PURE__ */ s(K, { variant: "primary", onClick: b, disabled: u, children: w("common.connect") }),
728
725
  /* @__PURE__ */ s(ne, { onClick: f, children: w("common.cancel") })
729
726
  ] });
730
727
  case "close":
@@ -738,27 +735,27 @@ function Vn({
738
735
  default:
739
736
  return null;
740
737
  }
741
- }, M = /* @__PURE__ */ s(Oe.Provider, { value: k, children: /* @__PURE__ */ s("div", { className: `nc-dialog-overlay${m ? " nc-fullscreen" : ""}`, onClick: E, children: /* @__PURE__ */ x(
738
+ }, T = /* @__PURE__ */ s(Oe.Provider, { value: A, children: /* @__PURE__ */ s("div", { className: `nc-dialog-overlay${m ? " nc-fullscreen" : ""}`, onClick: $, children: /* @__PURE__ */ x(
742
739
  "div",
743
740
  {
744
741
  ref: v,
745
- className: `nc-dialog-container ${h}`,
742
+ className: `nc-dialog-container ${g}`,
746
743
  style: o,
747
744
  tabIndex: -1,
748
745
  role: "dialog",
749
746
  "aria-modal": "true",
750
- "aria-labelledby": g ? void 0 : "nc-dialog-title",
747
+ "aria-labelledby": h ? void 0 : "nc-dialog-title",
751
748
  children: [
752
- !g && /* @__PURE__ */ x("div", { className: "nc-dialog-header", children: [
749
+ !h && /* @__PURE__ */ x("div", { className: "nc-dialog-header", children: [
753
750
  /* @__PURE__ */ s("h3", { id: "nc-dialog-title", className: "nc-dialog-title", children: n }),
754
751
  /* @__PURE__ */ s(We, { onClick: t, "aria-label": "Close dialog" })
755
752
  ] }),
756
- /* @__PURE__ */ s("div", { ref: y, className: "nc-dialog-content", children: r }),
757
- z()
753
+ /* @__PURE__ */ s("div", { ref: N, className: "nc-dialog-content", children: r }),
754
+ L()
758
755
  ]
759
756
  }
760
757
  ) }) });
761
- return m ? ue(M, document.body) : M;
758
+ return m ? ue(T, document.body) : T;
762
759
  }
763
760
  function Ct({ onClick: e, size: t = "default", rightOffset: n = 4 }) {
764
761
  const r = t === "small" ? 28 : 34;
@@ -826,85 +823,85 @@ function Gn({
826
823
  placeholder: i,
827
824
  disabled: a,
828
825
  label: c,
829
- clearable: d = !0,
826
+ clearable: l = !0,
830
827
  type: p = "text",
831
828
  className: f = "",
832
829
  size: b = "default",
833
- style: u,
834
- leadingIcon: l,
830
+ style: d,
831
+ leadingIcon: u,
835
832
  showPasswordToggle: m = !1,
836
- multiline: g = !1,
837
- rows: h = 3,
838
- validator: A,
833
+ multiline: h = !1,
834
+ rows: g = 3,
835
+ validator: k,
839
836
  showErrorMessage: v = !0
840
837
  }) {
841
- const y = W(null), w = W(null), [k, E] = T(!1), [z, M] = T(!1), N = e !== void 0, [R, C] = T(t), S = N ? e : R, L = A ? A(S) : null, V = !!L, $ = p === "password", P = $ && m && !a && !g, H = d && S && !a && z, Z = b === "small" ? 32 : 44;
842
- let Y = 12;
843
- H && P ? Y = Z * 2 : (H || P) && (Y = Z);
844
- const F = l ? b === "small" ? 28 : 34 : void 0, Ze = () => {
838
+ const N = W(null), w = W(null), [A, $] = E(!1), [L, T] = E(!1), y = e !== void 0, [R, C] = E(t), S = y ? e : R, z = k ? k(S) : null, F = !!z, Z = p === "password", G = Z && m && !a && !h, M = l && S && !a && L, P = b === "small" ? 32 : 44;
839
+ let D = 12;
840
+ M && G ? D = P * 2 : (M || G) && (D = P);
841
+ const V = u ? b === "small" ? 28 : 34 : void 0, Ze = () => {
845
842
  var te, ce;
846
- N || C(""), n == null || n(""), o == null || o(), g ? (te = w.current) == null || te.focus() : (ce = y.current) == null || ce.focus();
843
+ y || C(""), n == null || n(""), o == null || o(), h ? (te = w.current) == null || te.focus() : (ce = N.current) == null || ce.focus();
847
844
  }, Se = (te) => {
848
- te.key === "Enter" && !g && (r == null || r());
849
- }, Ie = (te) => {
845
+ te.key === "Enter" && !h && (r == null || r());
846
+ }, $e = (te) => {
850
847
  const ce = te.target.value;
851
- N || C(ce), n == null || n(ce);
848
+ y || C(ce), n == null || n(ce);
849
+ }, Ie = () => {
850
+ T(!0);
852
851
  }, Me = () => {
853
- M(!0);
854
- }, $e = () => {
855
- M(!1);
856
- }, Re = `nc-input ${b === "small" ? "nc-small " : ""} ${V ? "nc-error " : ""}${f}`;
857
- return /* @__PURE__ */ x("div", { className: "nc-col", style: { position: "relative", flex: 1, ...u }, children: [
852
+ T(!1);
853
+ }, Re = `nc-input ${b === "small" ? "nc-small " : ""} ${F ? "nc-error " : ""}${f}`;
854
+ return /* @__PURE__ */ x("div", { className: "nc-col", style: { position: "relative", flex: 1, ...d }, children: [
858
855
  c && /* @__PURE__ */ s("span", { className: "nc-label", children: c }),
859
- /* @__PURE__ */ x("div", { style: { position: "relative", display: "flex", alignItems: g ? "flex-start" : "center" }, children: [
860
- l && /* @__PURE__ */ s("span", { className: "nc-input-leading-icon", style: { height: g ? void 0 : "100%", top: g ? 10 : void 0 }, children: l }),
861
- g ? /* @__PURE__ */ s(
856
+ /* @__PURE__ */ x("div", { style: { position: "relative", display: "flex", alignItems: h ? "flex-start" : "center" }, children: [
857
+ u && /* @__PURE__ */ s("span", { className: "nc-input-leading-icon", style: { height: h ? void 0 : "100%", top: h ? 10 : void 0 }, children: u }),
858
+ h ? /* @__PURE__ */ s(
862
859
  "textarea",
863
860
  {
864
861
  ref: w,
865
862
  className: Re,
866
863
  placeholder: i,
867
864
  value: S,
868
- onChange: Ie,
865
+ onChange: $e,
869
866
  onKeyDown: Se,
870
- onFocus: Me,
871
- onBlur: $e,
867
+ onFocus: Ie,
868
+ onBlur: Me,
872
869
  readOnly: a,
873
870
  "aria-disabled": a,
874
871
  tabIndex: a ? -1 : void 0,
875
- rows: h,
872
+ rows: g,
876
873
  style: {
877
874
  width: "100%",
878
- paddingRight: Y,
879
- ...F !== void 0 ? { paddingLeft: F } : {}
875
+ paddingRight: D,
876
+ ...V !== void 0 ? { paddingLeft: V } : {}
880
877
  }
881
878
  }
882
879
  ) : /* @__PURE__ */ s(
883
880
  "input",
884
881
  {
885
- ref: y,
886
- type: $ && k ? "text" : p,
882
+ ref: N,
883
+ type: Z && A ? "text" : p,
887
884
  className: Re,
888
885
  placeholder: i,
889
886
  value: S,
890
- onChange: Ie,
887
+ onChange: $e,
891
888
  onKeyDown: Se,
892
- onFocus: Me,
893
- onBlur: $e,
889
+ onFocus: Ie,
890
+ onBlur: Me,
894
891
  readOnly: a,
895
892
  "aria-disabled": a,
896
893
  tabIndex: a ? -1 : void 0,
897
894
  style: {
898
895
  width: "100%",
899
- paddingRight: Y,
900
- ...F !== void 0 ? { paddingLeft: F } : {}
896
+ paddingRight: D,
897
+ ...V !== void 0 ? { paddingLeft: V } : {}
901
898
  }
902
899
  }
903
900
  ),
904
- H && /* @__PURE__ */ s(Ct, { onClick: Ze, size: b, rightOffset: P ? Z + 4 : 4 }),
905
- P && /* @__PURE__ */ s(St, { visible: k, onClick: () => E(!k), size: b })
901
+ M && /* @__PURE__ */ s(Ct, { onClick: Ze, size: b, rightOffset: G ? P + 4 : 4 }),
902
+ G && /* @__PURE__ */ s(St, { visible: A, onClick: () => $(!A), size: b })
906
903
  ] }),
907
- V && v && /* @__PURE__ */ s("span", { className: "nc-error-message", children: L })
904
+ F && v && /* @__PURE__ */ s("span", { className: "nc-error-message", children: z })
908
905
  ] });
909
906
  }
910
907
  function Yn({
@@ -918,14 +915,14 @@ function Yn({
918
915
  return /* @__PURE__ */ s(
919
916
  "div",
920
917
  {
921
- onClick: (d) => {
918
+ onClick: (l) => {
922
919
  if (t) {
923
920
  if (r) {
924
921
  const p = window.getSelection();
925
922
  if (p && p.toString().length > 0)
926
923
  return;
927
924
  }
928
- t(d);
925
+ t(l);
929
926
  }
930
927
  },
931
928
  onMouseDown: () => t && a(!0),
@@ -958,54 +955,54 @@ function jn({ title: e, titleTools: t, children: n, style: r }) {
958
955
  ] });
959
956
  }
960
957
  function Kn({ values: e, onChange: t, options: n, placeholder: r = "Select…", label: o }) {
961
- const [i, a] = T(!1), [c, d] = T(""), p = W(null), f = me(() => n.filter((u) => u.label.toLowerCase().includes(c.toLowerCase())), [n, c]);
958
+ const [i, a] = E(!1), [c, l] = E(""), p = W(null), f = me(() => n.filter((d) => d.label.toLowerCase().includes(c.toLowerCase())), [n, c]);
962
959
  B(() => {
963
- function u(l) {
964
- !(l.target instanceof Node) || !p.current || p.current.contains(l.target) || a(!1);
960
+ function d(u) {
961
+ !(u.target instanceof Node) || !p.current || p.current.contains(u.target) || a(!1);
965
962
  }
966
- return document.addEventListener("mousedown", u), () => document.removeEventListener("mousedown", u);
963
+ return document.addEventListener("mousedown", d), () => document.removeEventListener("mousedown", d);
967
964
  }, []);
968
- const b = (u) => {
969
- e.includes(u) ? t(e.filter((l) => l !== u)) : t([...e, u]);
965
+ const b = (d) => {
966
+ e.includes(d) ? t(e.filter((u) => u !== d)) : t([...e, d]);
970
967
  };
971
968
  return /* @__PURE__ */ x("div", { ref: p, className: "nc-col", style: { position: "relative" }, children: [
972
969
  o && /* @__PURE__ */ s("span", { className: "nc-label", children: o }),
973
970
  /* @__PURE__ */ x("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: [
974
971
  e.length === 0 && /* @__PURE__ */ s("span", { className: "nc-label", children: r }),
975
- e.map((u) => {
976
- const l = n.find((m) => m.value === u);
977
- return l ? /* @__PURE__ */ x("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: [
978
- l.label,
972
+ e.map((d) => {
973
+ const u = n.find((m) => m.value === d);
974
+ return u ? /* @__PURE__ */ x("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: [
975
+ u.label,
979
976
  /* @__PURE__ */ s(
980
977
  "button",
981
978
  {
982
979
  className: "nc-button nc-ghost",
983
980
  style: { padding: 0, minHeight: 0, height: 20, width: 20, display: "inline-flex", alignItems: "center", justifyContent: "center", border: "none" },
984
- onClick: () => b(u),
985
- "aria-label": `Remove ${l.label}`,
981
+ onClick: () => b(d),
982
+ "aria-label": `Remove ${u.label}`,
986
983
  children: "✕"
987
984
  }
988
985
  )
989
- ] }, u) : null;
986
+ ] }, d) : null;
990
987
  }),
991
988
  /* @__PURE__ */ s(
992
989
  "input",
993
990
  {
994
991
  className: "nc-input",
995
992
  value: c,
996
- onChange: (u) => d(u.target.value),
993
+ onChange: (d) => l(d.target.value),
997
994
  onFocus: () => a(!0),
998
995
  style: { minWidth: 50, border: "none", background: "transparent", padding: 4, minHeight: 32, flex: 1 }
999
996
  }
1000
997
  )
1001
998
  ] }),
1002
999
  i && /* @__PURE__ */ x("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: [
1003
- f.map((u) => {
1004
- const l = e.includes(u.value);
1005
- return /* @__PURE__ */ x("div", { className: "nc-section nc-row", style: { justifyContent: "space-between", cursor: "pointer", padding: 12 }, onMouseDown: () => b(u.value), children: [
1006
- /* @__PURE__ */ s("span", { children: u.label }),
1007
- /* @__PURE__ */ s("span", { children: l ? "✔️" : "" })
1008
- ] }, u.value);
1000
+ f.map((d) => {
1001
+ const u = e.includes(d.value);
1002
+ return /* @__PURE__ */ x("div", { className: "nc-section nc-row", style: { justifyContent: "space-between", cursor: "pointer", padding: 12 }, onMouseDown: () => b(d.value), children: [
1003
+ /* @__PURE__ */ s("span", { children: d.label }),
1004
+ /* @__PURE__ */ s("span", { children: u ? "✔️" : "" })
1005
+ ] }, d.value);
1009
1006
  }),
1010
1007
  f.length === 0 && /* @__PURE__ */ s("div", { className: "nc-section nc-label", children: "No results" })
1011
1008
  ] })
@@ -1051,51 +1048,51 @@ function _n({
1051
1048
  disabled: i = !1,
1052
1049
  size: a = "default"
1053
1050
  }) {
1054
- const [c, d] = T(!1), [p, f] = T(""), [b, u] = T(""), [l, m] = T({ top: 0, left: 0, width: 0, right: void 0 }), g = W(null), h = W(null);
1051
+ const [c, l] = E(!1), [p, f] = E(""), [b, d] = E(""), [u, m] = E({ top: 0, left: 0, width: 0, right: void 0 }), h = W(null), g = W(null);
1055
1052
  B(() => {
1056
- if (c && g.current) {
1057
- const C = g.current.getBoundingClientRect(), L = Math.max(C.width, 400);
1058
- window.innerWidth - C.left < L && C.right >= L ? m({
1053
+ if (c && h.current) {
1054
+ const C = h.current.getBoundingClientRect(), z = Math.max(C.width, 400);
1055
+ window.innerWidth - C.left < z && C.right >= z ? m({
1059
1056
  top: C.bottom + 4,
1060
1057
  left: 0,
1061
1058
  // Not used but type needs it, let's just use 0
1062
1059
  right: window.innerWidth - C.right,
1063
- width: L
1060
+ width: z
1064
1061
  }) : m({
1065
1062
  top: C.bottom + 4,
1066
1063
  left: C.left,
1067
1064
  right: void 0,
1068
- width: L
1065
+ width: z
1069
1066
  });
1070
1067
  }
1071
1068
  }, [c]), B(() => {
1072
1069
  if (!c) return;
1073
1070
  const C = (S) => {
1074
- g.current && !g.current.contains(S.target) && h.current && !h.current.contains(S.target) && d(!1);
1071
+ h.current && !h.current.contains(S.target) && g.current && !g.current.contains(S.target) && l(!1);
1075
1072
  };
1076
1073
  return document.addEventListener("mousedown", C), () => document.removeEventListener("mousedown", C);
1077
1074
  }, [c]);
1078
- const A = () => {
1079
- f(e || Te()), u(t || Te()), d(!0);
1075
+ const k = () => {
1076
+ f(e || Te()), d(t || Te()), l(!0);
1080
1077
  }, v = () => {
1081
- d(!1);
1082
- }, y = () => {
1078
+ l(!1);
1079
+ }, N = () => {
1083
1080
  const C = pe(p), S = pe(b);
1084
1081
  if (C || S)
1085
1082
  return;
1086
- const L = de(p), V = de(b);
1087
- L && V && (n == null || n(L, V)), d(!1);
1088
- }, w = e && t ? `${Ee(e)} - ${Ee(t)}` : "Select month range", k = pe(p), E = pe(b), z = de(p), M = de(b), N = z && M && z > M, R = c ? ue(
1083
+ const z = de(p), F = de(b);
1084
+ z && F && (n == null || n(z, F)), l(!1);
1085
+ }, w = e && t ? `${Ee(e)} - ${Ee(t)}` : "Select month range", A = pe(p), $ = pe(b), L = de(p), T = de(b), y = L && T && L > T, R = c ? ue(
1089
1086
  /* @__PURE__ */ s(
1090
1087
  "div",
1091
1088
  {
1092
- ref: h,
1089
+ ref: g,
1093
1090
  className: "nc-month-range-picker-popup",
1094
1091
  style: {
1095
1092
  position: "fixed",
1096
- top: l.top,
1097
- ...l.right !== void 0 ? { right: l.right } : { left: l.left },
1098
- width: l.width,
1093
+ top: u.top,
1094
+ ...u.right !== void 0 ? { right: u.right } : { left: u.left },
1095
+ width: u.width,
1099
1096
  zIndex: 1e3
1100
1097
  },
1101
1098
  children: /* @__PURE__ */ x("div", { className: "nc-month-range-picker-content", children: [
@@ -1106,13 +1103,13 @@ function _n({
1106
1103
  "input",
1107
1104
  {
1108
1105
  type: "text",
1109
- className: `nc-month-input ${k ? "nc-error" : ""}`,
1106
+ className: `nc-month-input ${A ? "nc-error" : ""}`,
1110
1107
  value: p,
1111
1108
  onChange: (C) => f(C.target.value),
1112
1109
  placeholder: "YY-M(M) or YYYY-M(M)"
1113
1110
  }
1114
1111
  ),
1115
- k && /* @__PURE__ */ s("div", { className: "nc-month-error-text", children: k })
1112
+ A && /* @__PURE__ */ s("div", { className: "nc-month-error-text", children: A })
1116
1113
  ] }),
1117
1114
  /* @__PURE__ */ x("div", { className: "nc-month-range-picker-column", children: [
1118
1115
  /* @__PURE__ */ s("label", { className: "nc-label", children: "End Month" }),
@@ -1120,23 +1117,23 @@ function _n({
1120
1117
  "input",
1121
1118
  {
1122
1119
  type: "text",
1123
- className: `nc-month-input ${E ? "nc-error" : ""}`,
1120
+ className: `nc-month-input ${$ ? "nc-error" : ""}`,
1124
1121
  value: b,
1125
- onChange: (C) => u(C.target.value),
1122
+ onChange: (C) => d(C.target.value),
1126
1123
  placeholder: "YY-M(M) or YYYY-M(M)"
1127
1124
  }
1128
1125
  ),
1129
- E && /* @__PURE__ */ s("div", { className: "nc-month-error-text", children: E })
1126
+ $ && /* @__PURE__ */ s("div", { className: "nc-month-error-text", children: $ })
1130
1127
  ] })
1131
1128
  ] }),
1132
- N && !k && !E && /* @__PURE__ */ s("div", { className: "nc-month-range-error", children: "End month must be after or equal to start month" }),
1129
+ y && !A && !$ && /* @__PURE__ */ s("div", { className: "nc-month-range-error", children: "End month must be after or equal to start month" }),
1133
1130
  /* @__PURE__ */ x("div", { className: "nc-month-range-picker-footer", children: [
1134
1131
  /* @__PURE__ */ s(
1135
1132
  K,
1136
1133
  {
1137
1134
  variant: "primary",
1138
- onClick: y,
1139
- disabled: !p || !b || !!k || !!E || !!N,
1135
+ onClick: N,
1136
+ disabled: !p || !b || !!A || !!$ || !!y,
1140
1137
  children: "Apply"
1141
1138
  }
1142
1139
  ),
@@ -1152,9 +1149,9 @@ function _n({
1152
1149
  /* @__PURE__ */ s(
1153
1150
  "button",
1154
1151
  {
1155
- ref: g,
1152
+ ref: h,
1156
1153
  className: `nc-month-range-picker-input${a === "small" ? " nc-small" : ""}`,
1157
- onClick: A,
1154
+ onClick: k,
1158
1155
  disabled: i,
1159
1156
  children: w
1160
1157
  }
@@ -1163,25 +1160,25 @@ function _n({
1163
1160
  ] });
1164
1161
  }
1165
1162
  function Un({ value: e, onChange: t, min: n, max: r, step: o = 1, label: i, disabled: a, size: c = "default" }) {
1166
- const d = c === "small", p = () => {
1167
- const u = e - o;
1168
- n !== void 0 && u < n || t(parseFloat(u.toFixed(10)));
1163
+ const l = c === "small", p = () => {
1164
+ const d = e - o;
1165
+ n !== void 0 && d < n || t(parseFloat(d.toFixed(10)));
1169
1166
  }, f = () => {
1170
- const u = e + o;
1171
- r !== void 0 && u > r || t(parseFloat(u.toFixed(10)));
1167
+ const d = e + o;
1168
+ r !== void 0 && d > r || t(parseFloat(d.toFixed(10)));
1172
1169
  };
1173
- return /* @__PURE__ */ x("div", { className: `nc-col nc-number-input-col ${d ? "nc-small" : ""}`, children: [
1174
- i && /* @__PURE__ */ s("span", { className: `nc-label ${d ? "nc-small" : ""}`, children: i }),
1175
- /* @__PURE__ */ x("div", { className: `nc-number-input-container ${d ? "nc-small" : ""}`, children: [
1170
+ return /* @__PURE__ */ x("div", { className: `nc-col nc-number-input-col ${l ? "nc-small" : ""}`, children: [
1171
+ i && /* @__PURE__ */ s("span", { className: `nc-label ${l ? "nc-small" : ""}`, children: i }),
1172
+ /* @__PURE__ */ x("div", { className: `nc-number-input-container ${l ? "nc-small" : ""}`, children: [
1176
1173
  /* @__PURE__ */ s(
1177
1174
  "input",
1178
1175
  {
1179
- className: `nc-input nc-number-input ${d ? "nc-small" : ""}`,
1176
+ className: `nc-input nc-number-input ${l ? "nc-small" : ""}`,
1180
1177
  type: "number",
1181
1178
  value: e,
1182
- onChange: (u) => {
1183
- const l = parseFloat(u.target.value);
1184
- isNaN(l) || n !== void 0 && l < n || r !== void 0 && l > r || t(l);
1179
+ onChange: (d) => {
1180
+ const u = parseFloat(d.target.value);
1181
+ isNaN(u) || n !== void 0 && u < n || r !== void 0 && u > r || t(u);
1185
1182
  },
1186
1183
  min: n,
1187
1184
  max: r,
@@ -1192,7 +1189,7 @@ function Un({ value: e, onChange: t, min: n, max: r, step: o = 1, label: i, disa
1192
1189
  /* @__PURE__ */ s(
1193
1190
  "button",
1194
1191
  {
1195
- className: `nc-button nc-ghost nc-number-input-button ${d ? "nc-small" : ""}`,
1192
+ className: `nc-button nc-ghost nc-number-input-button ${l ? "nc-small" : ""}`,
1196
1193
  onClick: p,
1197
1194
  disabled: a || n !== void 0 && e <= n,
1198
1195
  children: "−"
@@ -1201,7 +1198,7 @@ function Un({ value: e, onChange: t, min: n, max: r, step: o = 1, label: i, disa
1201
1198
  /* @__PURE__ */ s(
1202
1199
  "button",
1203
1200
  {
1204
- className: `nc-button nc-ghost nc-number-input-button ${d ? "nc-small" : ""}`,
1201
+ className: `nc-button nc-ghost nc-number-input-button ${l ? "nc-small" : ""}`,
1205
1202
  onClick: f,
1206
1203
  disabled: a || r !== void 0 && e >= r,
1207
1204
  children: "+"
@@ -1219,12 +1216,12 @@ function qn({
1219
1216
  label: i,
1220
1217
  disabled: a,
1221
1218
  showValue: c = !0,
1222
- formatValue: d = (f) => f.toString(),
1219
+ formatValue: l = (f) => f.toString(),
1223
1220
  width: p = 200
1224
1221
  }) {
1225
- const f = (u) => {
1226
- const l = parseFloat(u.target.value);
1227
- t(l);
1222
+ const f = (d) => {
1223
+ const u = parseFloat(d.target.value);
1224
+ t(u);
1228
1225
  }, b = (e - n) / (r - n) * 100;
1229
1226
  return /* @__PURE__ */ x("div", { className: "nc-col", style: { gap: 6 }, children: [
1230
1227
  i && /* @__PURE__ */ s("span", { className: "nc-label", children: i }),
@@ -1256,29 +1253,29 @@ function qn({
1256
1253
  minWidth: 60,
1257
1254
  textAlign: "right"
1258
1255
  },
1259
- children: d(e)
1256
+ children: l(e)
1260
1257
  }
1261
1258
  )
1262
1259
  ] })
1263
1260
  ] });
1264
1261
  }
1265
- const It = ({ 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" }) });
1266
- function Mt({ children: e, className: t = "", style: n }) {
1262
+ const $t = ({ 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" }) });
1263
+ function It({ children: e, className: t = "", style: n }) {
1267
1264
  return /* @__PURE__ */ s("div", { className: `nc-tab-panel ${t}`, style: n, children: e });
1268
1265
  }
1269
1266
  function Xn({ active: e, children: t, keepMounted: n = !1, className: r = "", style: o }) {
1270
1267
  const i = ut.toArray(t).filter(
1271
- (c) => pt(c) && (c.type === Mt || c.type.displayName === "TabPanel")
1268
+ (c) => pt(c) && (c.type === It || c.type.displayName === "TabPanel")
1272
1269
  );
1273
1270
  if (n)
1274
1271
  return /* @__PURE__ */ s("div", { className: `nc-tab-panels ${r}`, style: o, children: i.map((c) => {
1275
- const d = c.props.tab === e;
1272
+ const l = c.props.tab === e;
1276
1273
  return /* @__PURE__ */ s(
1277
1274
  "div",
1278
1275
  {
1279
- className: `nc-tab-panel-wrapper ${d ? "nc-active" : ""}`,
1280
- style: { display: d ? void 0 : "none" },
1281
- "aria-hidden": !d,
1276
+ className: `nc-tab-panel-wrapper ${l ? "nc-active" : ""}`,
1277
+ style: { display: l ? void 0 : "none" },
1278
+ "aria-hidden": !l,
1282
1279
  children: c
1283
1280
  },
1284
1281
  c.props.tab
@@ -1287,75 +1284,75 @@ function Xn({ active: e, children: t, keepMounted: n = !1, className: r = "", st
1287
1284
  const a = i.find((c) => c.props.tab === e);
1288
1285
  return /* @__PURE__ */ s("div", { className: `nc-tab-panels ${r}`, style: o, children: a });
1289
1286
  }
1290
- function Jn({ tabs: e, active: t, onChange: n, onClose: r, permanentTabs: o, className: i, toolbar: a, multiline: c, orientation: d = "horizontal", style: p }) {
1291
- const f = W(null), [b, u] = T(!1), [l, m] = T(!1), g = d === "verticalLeft" || d === "verticalRight", h = W(!1), A = W(0), v = W(0), y = W(!1);
1287
+ function Jn({ tabs: e, active: t, onChange: n, onClose: r, permanentTabs: o, className: i, toolbar: a, multiline: c, orientation: l = "horizontal", style: p }) {
1288
+ const f = W(null), [b, d] = E(!1), [u, m] = E(!1), h = l === "verticalLeft" || l === "verticalRight", g = W(!1), k = W(0), v = W(0), N = W(!1);
1292
1289
  B(() => {
1293
- const N = () => {
1290
+ const y = () => {
1294
1291
  if (f.current)
1295
- if (g) {
1296
- const { scrollTop: C, scrollHeight: S, clientHeight: L } = f.current;
1297
- u(C > 1), m(C < S - L - 1);
1292
+ if (h) {
1293
+ const { scrollTop: C, scrollHeight: S, clientHeight: z } = f.current;
1294
+ d(C > 1), m(C < S - z - 1);
1298
1295
  } else {
1299
- const { scrollLeft: C, scrollWidth: S, clientWidth: L } = f.current;
1300
- u(C > 1), m(C < S - L - 1);
1296
+ const { scrollLeft: C, scrollWidth: S, clientWidth: z } = f.current;
1297
+ d(C > 1), m(C < S - z - 1);
1301
1298
  }
1302
1299
  }, R = f.current;
1303
1300
  if (R)
1304
- return N(), R.addEventListener("scroll", N), window.addEventListener("resize", N), () => {
1305
- R.removeEventListener("scroll", N), window.removeEventListener("resize", N);
1301
+ return y(), R.addEventListener("scroll", y), window.addEventListener("resize", y), () => {
1302
+ R.removeEventListener("scroll", y), window.removeEventListener("resize", y);
1306
1303
  };
1307
- }, [e, g]);
1308
- const w = (N) => {
1309
- f.current && (h.current = !0, y.current = !1, A.current = g ? N.clientY : N.clientX, v.current = g ? f.current.scrollTop : f.current.scrollLeft, f.current.style.cursor = "grabbing", f.current.style.userSelect = "none");
1310
- }, k = (N) => {
1311
- if (!h.current || !f.current) return;
1312
- const R = g ? N.clientY : N.clientX, C = A.current - R;
1313
- Math.abs(C) > 3 && (y.current = !0), g ? f.current.scrollTop = v.current + C : f.current.scrollLeft = v.current + C;
1314
- }, E = () => {
1315
- f.current && (h.current = !1, f.current.style.cursor = "", f.current.style.userSelect = "");
1316
- }, z = () => {
1317
- E();
1304
+ }, [e, h]);
1305
+ const w = (y) => {
1306
+ f.current && (g.current = !0, N.current = !1, k.current = h ? y.clientY : y.clientX, v.current = h ? f.current.scrollTop : f.current.scrollLeft, f.current.style.cursor = "grabbing", f.current.style.userSelect = "none");
1307
+ }, A = (y) => {
1308
+ if (!g.current || !f.current) return;
1309
+ const R = h ? y.clientY : y.clientX, C = k.current - R;
1310
+ Math.abs(C) > 3 && (N.current = !0), h ? f.current.scrollTop = v.current + C : f.current.scrollLeft = v.current + C;
1311
+ }, $ = () => {
1312
+ f.current && (g.current = !1, f.current.style.cursor = "", f.current.style.userSelect = "");
1313
+ }, L = () => {
1314
+ $();
1318
1315
  };
1319
1316
  B(() => {
1320
- const N = f.current;
1321
- if (!N || g) return;
1317
+ const y = f.current;
1318
+ if (!y || h) return;
1322
1319
  const R = (C) => {
1323
- C.deltaY !== 0 && (C.preventDefault(), N.scrollLeft += C.deltaY * 0.3);
1320
+ C.deltaY !== 0 && (C.preventDefault(), y.scrollLeft += C.deltaY * 0.3);
1324
1321
  };
1325
- return N.addEventListener("wheel", R, { passive: !1 }), () => {
1326
- N.removeEventListener("wheel", R);
1322
+ return y.addEventListener("wheel", R, { passive: !1 }), () => {
1323
+ y.removeEventListener("wheel", R);
1327
1324
  };
1328
- }, [g]);
1329
- const M = (N) => {
1330
- y.current || n(N);
1325
+ }, [h]);
1326
+ const T = (y) => {
1327
+ N.current || n(y);
1331
1328
  };
1332
- return /* @__PURE__ */ x("div", { className: `nc-tab-container ${g ? `nc-vertical nc-${d}` : ""} ${i || ""}`, style: p, children: [
1329
+ return /* @__PURE__ */ x("div", { className: `nc-tab-container ${h ? `nc-vertical nc-${l}` : ""} ${i || ""}`, style: p, children: [
1333
1330
  /* @__PURE__ */ x("div", { className: "nc-tab-scroll-wrapper", children: [
1334
- b && /* @__PURE__ */ s("div", { className: `nc-tab-scroll-indicator ${g ? "nc-top" : "nc-left"}`, children: g ? /* @__PURE__ */ s(It, { size: 16 }) : /* @__PURE__ */ s(at, { size: 16 }) }),
1331
+ b && /* @__PURE__ */ s("div", { className: `nc-tab-scroll-indicator ${h ? "nc-top" : "nc-left"}`, children: h ? /* @__PURE__ */ s($t, { size: 16 }) : /* @__PURE__ */ s(at, { size: 16 }) }),
1335
1332
  /* @__PURE__ */ s(
1336
1333
  "div",
1337
1334
  {
1338
1335
  ref: f,
1339
1336
  className: `nc-tab-scroll ${c ? "nc-multiline" : ""}`,
1340
1337
  onMouseDown: w,
1341
- onMouseMove: k,
1342
- onMouseUp: E,
1343
- onMouseLeave: z,
1338
+ onMouseMove: A,
1339
+ onMouseUp: $,
1340
+ onMouseLeave: L,
1344
1341
  style: { cursor: "grab" },
1345
- children: e.map((N) => {
1346
- const R = typeof N == "string" ? N : N.id, C = typeof N == "string" ? N : N.label, S = r && !(o != null && o.includes(R));
1342
+ children: e.map((y) => {
1343
+ const R = typeof y == "string" ? y : y.id, C = typeof y == "string" ? y : y.label, S = r && !(o != null && o.includes(R));
1347
1344
  return /* @__PURE__ */ x(
1348
1345
  "div",
1349
1346
  {
1350
1347
  className: `nc-tab-item ${t === R ? "nc-active" : ""} ${S ? "nc-closable" : ""}`,
1351
- onClick: () => M(R),
1348
+ onClick: () => T(R),
1352
1349
  role: "button",
1353
1350
  tabIndex: 0,
1354
- onKeyDown: (L) => {
1355
- (L.key === "Enter" || L.key === " ") && n(R);
1351
+ onKeyDown: (z) => {
1352
+ (z.key === "Enter" || z.key === " ") && n(R);
1356
1353
  },
1357
1354
  children: [
1358
- /* @__PURE__ */ s("span", { className: "nc-tab-label", children: g ? C : typeof C == "string" ? C.toUpperCase() : C }),
1355
+ /* @__PURE__ */ s("span", { className: "nc-tab-label", children: h ? C : typeof C == "string" ? C.toUpperCase() : C }),
1359
1356
  S && /* @__PURE__ */ s(
1360
1357
  "span",
1361
1358
  {
@@ -1363,11 +1360,11 @@ function Jn({ tabs: e, active: t, onChange: n, onClose: r, permanentTabs: o, cla
1363
1360
  role: "button",
1364
1361
  tabIndex: 0,
1365
1362
  "aria-label": `Close ${typeof C == "string" ? C : R}`,
1366
- onClick: (L) => {
1367
- L.stopPropagation(), r(R);
1363
+ onClick: (z) => {
1364
+ z.stopPropagation(), r(R);
1368
1365
  },
1369
- onKeyDown: (L) => {
1370
- (L.key === "Enter" || L.key === " ") && (L.stopPropagation(), r(R));
1366
+ onKeyDown: (z) => {
1367
+ (z.key === "Enter" || z.key === " ") && (z.stopPropagation(), r(R));
1371
1368
  },
1372
1369
  children: /* @__PURE__ */ x("svg", { width: "14", height: "14", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round", children: [
1373
1370
  /* @__PURE__ */ s("line", { x1: "18", y1: "6", x2: "6", y2: "18" }),
@@ -1382,7 +1379,7 @@ function Jn({ tabs: e, active: t, onChange: n, onClose: r, permanentTabs: o, cla
1382
1379
  })
1383
1380
  }
1384
1381
  ),
1385
- l && /* @__PURE__ */ s("div", { className: `nc-tab-scroll-indicator ${g ? "nc-bottom" : "nc-right"}`, children: g ? /* @__PURE__ */ s(lt, { size: 16 }) : /* @__PURE__ */ s(dt, { size: 16 }) })
1382
+ u && /* @__PURE__ */ s("div", { className: `nc-tab-scroll-indicator ${h ? "nc-bottom" : "nc-right"}`, children: h ? /* @__PURE__ */ s(lt, { size: 16 }) : /* @__PURE__ */ s(dt, { size: 16 }) })
1386
1383
  ] }),
1387
1384
  a && /* @__PURE__ */ s("div", { className: "nc-tab-toolbar", children: a })
1388
1385
  ] });
@@ -1451,10 +1448,10 @@ const ze = [
1451
1448
  "var(--nc-csv-col-8)",
1452
1449
  "var(--nc-csv-col-9)"
1453
1450
  ];
1454
- function $t(e, t) {
1451
+ function Mt(e, t) {
1455
1452
  const r = e.slice(0, t).split(`
1456
- `), o = r.length, a = r[o - 1].split(" "), c = a.length, d = a[c - 1].length + 1;
1457
- return { line: o, column: c, character: d, offset: t };
1453
+ `), o = r.length, a = r[o - 1].split(" "), c = a.length, l = a[c - 1].length + 1;
1454
+ return { line: o, column: c, character: l, offset: t };
1458
1455
  }
1459
1456
  function Rt(e, t, n, r) {
1460
1457
  const o = e.split(`
@@ -1462,10 +1459,10 @@ function Rt(e, t, n, r) {
1462
1459
  let a = 0;
1463
1460
  for (let b = 0; b < i - 1; b++)
1464
1461
  a += o[b].length + 1;
1465
- const d = o[i - 1].split(" "), p = Math.max(1, Math.min(n, d.length));
1462
+ const l = o[i - 1].split(" "), p = Math.max(1, Math.min(n, l.length));
1466
1463
  for (let b = 0; b < p - 1; b++)
1467
- a += d[b].length + 1;
1468
- const f = Math.max(1, Math.min(r, d[p - 1].length + 1));
1464
+ a += l[b].length + 1;
1465
+ const f = Math.max(1, Math.min(r, l[p - 1].length + 1));
1469
1466
  return a += f - 1, a;
1470
1467
  }
1471
1468
  function Et(e, t) {
@@ -1477,65 +1474,65 @@ function Et(e, t) {
1477
1474
  return o;
1478
1475
  }
1479
1476
  const Zn = ft(
1480
- function({ value: t, onChange: n, placeholder: r, className: o, style: i, showLineNumbers: a = !1, onCursorChange: c, highlightLine: d }, p) {
1481
- const f = W(null), b = W(null), u = W(null);
1477
+ function({ value: t, onChange: n, placeholder: r, className: o, style: i, showLineNumbers: a = !1, onCursorChange: c, highlightLine: l }, p) {
1478
+ const f = W(null), b = W(null), d = W(null);
1482
1479
  ht(p, () => ({
1483
1480
  goToLine(v) {
1484
- const y = f.current;
1485
- if (!y) return;
1481
+ const N = f.current;
1482
+ if (!N) return;
1486
1483
  const w = Et(t, v);
1487
- y.focus(), y.setSelectionRange(w, w);
1488
- const k = parseFloat(getComputedStyle(y).lineHeight) || 18;
1489
- y.scrollTop = (Math.max(1, v) - 1) * k, m(), l();
1484
+ N.focus(), N.setSelectionRange(w, w);
1485
+ const A = parseFloat(getComputedStyle(N).lineHeight) || 18;
1486
+ N.scrollTop = (Math.max(1, v) - 1) * A, m(), u();
1490
1487
  },
1491
- goToPosition(v, y, w) {
1492
- const k = f.current;
1493
- if (!k) return;
1494
- const E = Rt(t, v, y, w);
1495
- k.focus(), k.setSelectionRange(E, E);
1496
- const z = parseFloat(getComputedStyle(k).lineHeight) || 18;
1497
- k.scrollTop = (Math.max(1, v) - 1) * z, m(), l();
1488
+ goToPosition(v, N, w) {
1489
+ const A = f.current;
1490
+ if (!A) return;
1491
+ const $ = Rt(t, v, N, w);
1492
+ A.focus(), A.setSelectionRange($, $);
1493
+ const L = parseFloat(getComputedStyle(A).lineHeight) || 18;
1494
+ A.scrollTop = (Math.max(1, v) - 1) * L, m(), u();
1498
1495
  }
1499
1496
  }), [t]);
1500
- const l = O(() => {
1497
+ const u = O(() => {
1501
1498
  if (!c || !f.current) return;
1502
- const v = $t(t, f.current.selectionStart);
1499
+ const v = Mt(t, f.current.selectionStart);
1503
1500
  c(v);
1504
1501
  }, [c, t]), m = O(() => {
1505
1502
  const v = f.current;
1506
- v && (b.current && (b.current.scrollTop = v.scrollTop, b.current.scrollLeft = v.scrollLeft), u.current && (u.current.scrollTop = v.scrollTop));
1503
+ v && (b.current && (b.current.scrollTop = v.scrollTop, b.current.scrollLeft = v.scrollLeft), d.current && (d.current.scrollTop = v.scrollTop));
1507
1504
  }, []);
1508
1505
  B(() => {
1509
- if (d == null || d < 1) return;
1506
+ if (l == null || l < 1) return;
1510
1507
  const v = f.current;
1511
1508
  if (!v) return;
1512
- const y = parseFloat(getComputedStyle(v).lineHeight) || 18, w = (d - 1) * y, k = w + y;
1513
- (w < v.scrollTop || k > v.scrollTop + v.clientHeight) && (v.scrollTop = w - v.clientHeight / 2 + y / 2), m();
1514
- }, [d]);
1515
- const g = me(() => t.split(`
1516
- `).length, [t]), h = () => {
1509
+ const N = parseFloat(getComputedStyle(v).lineHeight) || 18, w = (l - 1) * N, A = w + N;
1510
+ (w < v.scrollTop || A > v.scrollTop + v.clientHeight) && (v.scrollTop = w - v.clientHeight / 2 + N / 2), m();
1511
+ }, [l]);
1512
+ const h = me(() => t.split(`
1513
+ `).length, [t]), g = () => {
1517
1514
  const v = [];
1518
- for (let y = 1; y <= g; y++)
1515
+ for (let N = 1; N <= h; N++)
1519
1516
  v.push(
1520
- /* @__PURE__ */ s("div", { className: `nc-csv-line-number ${d === y ? "nc-csv-highlight" : ""}`, children: y }, y)
1517
+ /* @__PURE__ */ s("div", { className: `nc-csv-line-number ${l === N ? "nc-csv-highlight" : ""}`, children: N }, N)
1521
1518
  );
1522
- return /* @__PURE__ */ s("div", { className: "nc-csv-gutter", ref: u, children: v });
1523
- }, A = (v) => v ? v.split(`
1524
- `).map((w, k) => {
1525
- const E = w.split(" ");
1526
- return /* @__PURE__ */ x("div", { className: `nc-csv-line ${d === k + 1 ? "nc-csv-highlight" : ""}`, children: [
1527
- E.map((z, M) => /* @__PURE__ */ x("span", { children: [
1528
- M > 0 && /* @__PURE__ */ s("span", { className: "nc-csv-tab-char", children: " " }),
1529
- /* @__PURE__ */ s("span", { style: { color: ze[M % ze.length] }, children: z })
1530
- ] }, M)),
1519
+ return /* @__PURE__ */ s("div", { className: "nc-csv-gutter", ref: d, children: v });
1520
+ }, k = (v) => v ? v.split(`
1521
+ `).map((w, A) => {
1522
+ const $ = w.split(" ");
1523
+ return /* @__PURE__ */ x("div", { className: `nc-csv-line ${l === A + 1 ? "nc-csv-highlight" : ""}`, children: [
1524
+ $.map((L, T) => /* @__PURE__ */ x("span", { children: [
1525
+ T > 0 && /* @__PURE__ */ s("span", { className: "nc-csv-tab-char", children: " " }),
1526
+ /* @__PURE__ */ s("span", { style: { color: ze[T % ze.length] }, children: L })
1527
+ ] }, T)),
1531
1528
  w === "" && `
1532
1529
  `
1533
- ] }, k);
1530
+ ] }, A);
1534
1531
  }) : null;
1535
1532
  return /* @__PURE__ */ x("div", { className: `nc-csv-textarea-container ${a ? "nc-csv-with-gutter" : ""} ${o ?? ""}`, style: i, children: [
1536
- a && h(),
1533
+ a && g(),
1537
1534
  /* @__PURE__ */ x("div", { className: "nc-csv-textarea-editor", children: [
1538
- /* @__PURE__ */ s("div", { className: "nc-csv-textarea-backdrop", ref: b, children: /* @__PURE__ */ s("pre", { className: "nc-csv-textarea-highlights", children: A(t) }) }),
1535
+ /* @__PURE__ */ s("div", { className: "nc-csv-textarea-backdrop", ref: b, children: /* @__PURE__ */ s("pre", { className: "nc-csv-textarea-highlights", children: k(t) }) }),
1539
1536
  /* @__PURE__ */ s(
1540
1537
  "textarea",
1541
1538
  {
@@ -1543,12 +1540,12 @@ const Zn = ft(
1543
1540
  className: "nc-csv-textarea-input",
1544
1541
  value: t,
1545
1542
  onChange: (v) => {
1546
- n(v.target.value), requestAnimationFrame(l);
1543
+ n(v.target.value), requestAnimationFrame(u);
1547
1544
  },
1548
1545
  onScroll: m,
1549
- onSelect: l,
1550
- onKeyUp: l,
1551
- onClick: l,
1546
+ onSelect: u,
1547
+ onKeyUp: u,
1548
+ onClick: u,
1552
1549
  placeholder: r,
1553
1550
  spellCheck: !1,
1554
1551
  autoComplete: "off",
@@ -1638,9 +1635,9 @@ function Pt({ notification: e }) {
1638
1635
  );
1639
1636
  }
1640
1637
  function er() {
1641
- const [e, t] = T([]), [n, r] = T(/* @__PURE__ */ new Map()), [o, i] = T(/* @__PURE__ */ new Set()), a = W(null), c = W([]);
1638
+ const [e, t] = E([]), [n, r] = E(/* @__PURE__ */ new Map()), [o, i] = E(/* @__PURE__ */ new Set()), a = W(null), c = W([]);
1642
1639
  return B(() => Tt((p) => {
1643
- const f = new Set(c.current.map((u) => u.id)), b = p.filter((u) => !f.has(u.id)).map((u) => u.id);
1640
+ const f = new Set(c.current.map((d) => d.id)), b = p.filter((d) => !f.has(d.id)).map((d) => d.id);
1644
1641
  b.length > 0 ? (t(p), i(new Set(b)), requestAnimationFrame(() => {
1645
1642
  requestAnimationFrame(() => {
1646
1643
  i(/* @__PURE__ */ new Set());
@@ -1648,15 +1645,15 @@ function er() {
1648
1645
  })) : t(p), c.current = p;
1649
1646
  }), []), B(() => {
1650
1647
  if (!a.current) return;
1651
- const d = /* @__PURE__ */ new Map();
1648
+ const l = /* @__PURE__ */ new Map();
1652
1649
  let p = 0;
1653
1650
  const f = a.current.children;
1654
- e.forEach((b, u) => {
1655
- if (d.set(b.id, p), f[u]) {
1656
- const l = f[u].offsetHeight;
1657
- b.isRemoving || (p += l + 12);
1651
+ e.forEach((b, d) => {
1652
+ if (l.set(b.id, p), f[d]) {
1653
+ const u = f[d].offsetHeight;
1654
+ b.isRemoving || (p += u + 12);
1658
1655
  }
1659
- }), r(d);
1656
+ }), r(l);
1660
1657
  }, [e]), /* @__PURE__ */ s(
1661
1658
  "div",
1662
1659
  {
@@ -1675,8 +1672,8 @@ function er() {
1675
1672
  pointerEvents: "auto",
1676
1673
  position: "relative"
1677
1674
  },
1678
- children: e.map((d) => {
1679
- const p = o.has(d.id), f = d.isRemoving, b = n.get(d.id) || 0;
1675
+ children: e.map((l) => {
1676
+ const p = o.has(l.id), f = l.isRemoving, b = n.get(l.id) || 0;
1680
1677
  return /* @__PURE__ */ s(
1681
1678
  "div",
1682
1679
  {
@@ -1690,9 +1687,9 @@ function er() {
1690
1687
  opacity: f ? 0 : 1,
1691
1688
  width: "100%"
1692
1689
  },
1693
- children: /* @__PURE__ */ s(Pt, { notification: d })
1690
+ children: /* @__PURE__ */ s(Pt, { notification: l })
1694
1691
  },
1695
- d.id
1692
+ l.id
1696
1693
  );
1697
1694
  })
1698
1695
  }
@@ -1935,7 +1932,7 @@ class Ht {
1935
1932
  this.listeners.forEach((t) => t());
1936
1933
  }
1937
1934
  }
1938
- const G = new Ht(), Ve = se(null);
1935
+ const Y = new Ht(), Ve = se(null);
1939
1936
  function Wt() {
1940
1937
  const e = J(Ve);
1941
1938
  if (!e)
@@ -2016,37 +2013,37 @@ class Vt extends ke.Component {
2016
2013
  }
2017
2014
  }
2018
2015
  function Ge({ appId: e, isActive: t, onClose: n }) {
2019
- const { t: r } = Q(), o = oe.get(e), [i, a] = T(""), [c, d] = T(null), [p, f] = T(null), [b, u] = T(!1), [l, m] = T(!1);
2016
+ const { t: r } = Q(), o = oe.get(e), [i, a] = E(""), [c, l] = E(null), [p, f] = E(null), [b, d] = E(!1), [u, m] = E(!1);
2020
2017
  ke.useEffect(() => {
2021
2018
  o != null && o.titleKey && a(r(o.titleKey));
2022
2019
  }, [o, r]);
2023
- const g = O((N) => {
2024
- a(N);
2025
- }, []), h = O((N) => {
2026
- d(() => N);
2027
- }, []), A = O(() => {
2028
- d(null);
2029
- }, []), v = O((N) => {
2030
- f(N);
2031
- }, []), y = O(() => {
2020
+ const h = O((y) => {
2021
+ a(y);
2022
+ }, []), g = O((y) => {
2023
+ l(() => y);
2024
+ }, []), k = O(() => {
2025
+ l(null);
2026
+ }, []), v = O((y) => {
2027
+ f(y);
2028
+ }, []), N = O(() => {
2032
2029
  f(null);
2033
- }, []), w = O((N) => {
2034
- u(N);
2035
- }, []), k = O((N) => {
2036
- m(N);
2037
- }, []), E = me(() => ({
2038
- setTitle: g,
2039
- setBackHandler: h,
2040
- clearBackHandler: A,
2030
+ }, []), w = O((y) => {
2031
+ d(y);
2032
+ }, []), A = O((y) => {
2033
+ m(y);
2034
+ }, []), $ = me(() => ({
2035
+ setTitle: h,
2036
+ setBackHandler: g,
2037
+ clearBackHandler: k,
2041
2038
  setToolbar: v,
2042
- clearToolbar: y,
2039
+ clearToolbar: N,
2043
2040
  setHideBackButton: w,
2044
- setHideTitleBar: k,
2041
+ setHideTitleBar: A,
2045
2042
  close: n
2046
- }), [g, h, A, v, y, w, k, n]);
2043
+ }), [h, g, k, v, N, w, A, n]);
2047
2044
  if (!o)
2048
2045
  return null;
2049
- const z = o.component, M = !o.hideTitleBar && !l;
2046
+ const L = o.component, T = !o.hideTitleBar && !u;
2050
2047
  return /* @__PURE__ */ x(
2051
2048
  "div",
2052
2049
  {
@@ -2057,7 +2054,7 @@ function Ge({ appId: e, isActive: t, onClose: n }) {
2057
2054
  minHeight: 0
2058
2055
  },
2059
2056
  children: [
2060
- M && /* @__PURE__ */ s(
2057
+ T && /* @__PURE__ */ s(
2061
2058
  Ft,
2062
2059
  {
2063
2060
  title: i,
@@ -2070,7 +2067,7 @@ function Ge({ appId: e, isActive: t, onClose: n }) {
2070
2067
  /* @__PURE__ */ s(
2071
2068
  "div",
2072
2069
  {
2073
- className: M ? "nc-app-content-wrapper" : "",
2070
+ className: T ? "nc-app-content-wrapper" : "",
2074
2071
  style: {
2075
2072
  padding: o.padding,
2076
2073
  flex: 1,
@@ -2080,7 +2077,7 @@ function Ge({ appId: e, isActive: t, onClose: n }) {
2080
2077
  backgroundColor: "var(--nc-bg-secondary)",
2081
2078
  position: "relative"
2082
2079
  },
2083
- children: /* @__PURE__ */ s(Ve.Provider, { value: E, children: /* @__PURE__ */ s(Vt, { appId: e, children: /* @__PURE__ */ s(
2080
+ children: /* @__PURE__ */ s(Ve.Provider, { value: $, children: /* @__PURE__ */ s(Vt, { appId: e, children: /* @__PURE__ */ s(
2084
2081
  mt,
2085
2082
  {
2086
2083
  fallback: /* @__PURE__ */ s(
@@ -2095,7 +2092,7 @@ function Ge({ appId: e, isActive: t, onClose: n }) {
2095
2092
  children: /* @__PURE__ */ s(He, {})
2096
2093
  }
2097
2094
  ),
2098
- children: /* @__PURE__ */ s(z, {})
2095
+ children: /* @__PURE__ */ s(L, {})
2099
2096
  }
2100
2097
  ) }) })
2101
2098
  }
@@ -2112,7 +2109,7 @@ const fe = 768, he = 1024, Ye = {
2112
2109
  height: typeof window < "u" ? window.innerHeight : 768
2113
2110
  }, je = se(Ye);
2114
2111
  function rr({ children: e }) {
2115
- const [t, n] = T(() => {
2112
+ const [t, n] = E(() => {
2116
2113
  if (typeof window > "u") return Ye;
2117
2114
  const r = window.innerWidth, o = window.innerHeight;
2118
2115
  return {
@@ -2151,8 +2148,8 @@ const Ne = "-", Gt = (e) => {
2151
2148
  return c[0] === "" && c.length !== 1 && c.shift(), _e(c, t) || Yt(a);
2152
2149
  },
2153
2150
  getConflictingClassGroupIds: (a, c) => {
2154
- const d = n[a] || [];
2155
- return c && r[a] ? [...d, ...r[a]] : d;
2151
+ const l = n[a] || [];
2152
+ return c && r[a] ? [...l, ...r[a]] : l;
2156
2153
  }
2157
2154
  };
2158
2155
  }, _e = (e, t) => {
@@ -2247,28 +2244,28 @@ const Ne = "-", Gt = (e) => {
2247
2244
  separator: t,
2248
2245
  experimentalParseClassName: n
2249
2246
  } = e, r = t.length === 1, o = t[0], i = t.length, a = (c) => {
2250
- const d = [];
2247
+ const l = [];
2251
2248
  let p = 0, f = 0, b;
2252
- for (let h = 0; h < c.length; h++) {
2253
- let A = c[h];
2249
+ for (let g = 0; g < c.length; g++) {
2250
+ let k = c[g];
2254
2251
  if (p === 0) {
2255
- if (A === o && (r || c.slice(h, h + i) === t)) {
2256
- d.push(c.slice(f, h)), f = h + i;
2252
+ if (k === o && (r || c.slice(g, g + i) === t)) {
2253
+ l.push(c.slice(f, g)), f = g + i;
2257
2254
  continue;
2258
2255
  }
2259
- if (A === "/") {
2260
- b = h;
2256
+ if (k === "/") {
2257
+ b = g;
2261
2258
  continue;
2262
2259
  }
2263
2260
  }
2264
- A === "[" ? p++ : A === "]" && p--;
2261
+ k === "[" ? p++ : k === "]" && p--;
2265
2262
  }
2266
- const u = d.length === 0 ? c : c.substring(f), l = u.startsWith(Ue), m = l ? u.substring(1) : u, g = b && b > f ? b - f : void 0;
2263
+ const d = l.length === 0 ? c : c.substring(f), u = d.startsWith(Ue), m = u ? d.substring(1) : d, h = b && b > f ? b - f : void 0;
2267
2264
  return {
2268
- modifiers: d,
2269
- hasImportantModifier: l,
2265
+ modifiers: l,
2266
+ hasImportantModifier: u,
2270
2267
  baseClassName: m,
2271
- maybePostfixModifierPosition: g
2268
+ maybePostfixModifierPosition: h
2272
2269
  };
2273
2270
  };
2274
2271
  return n ? (c) => n({
@@ -2294,33 +2291,33 @@ const Ne = "-", Gt = (e) => {
2294
2291
  getConflictingClassGroupIds: o
2295
2292
  } = t, i = [], a = e.trim().split(Qt);
2296
2293
  let c = "";
2297
- for (let d = a.length - 1; d >= 0; d -= 1) {
2298
- const p = a[d], {
2294
+ for (let l = a.length - 1; l >= 0; l -= 1) {
2295
+ const p = a[l], {
2299
2296
  modifiers: f,
2300
2297
  hasImportantModifier: b,
2301
- baseClassName: u,
2302
- maybePostfixModifierPosition: l
2298
+ baseClassName: d,
2299
+ maybePostfixModifierPosition: u
2303
2300
  } = n(p);
2304
- let m = !!l, g = r(m ? u.substring(0, l) : u);
2305
- if (!g) {
2301
+ let m = !!u, h = r(m ? d.substring(0, u) : d);
2302
+ if (!h) {
2306
2303
  if (!m) {
2307
2304
  c = p + (c.length > 0 ? " " + c : c);
2308
2305
  continue;
2309
2306
  }
2310
- if (g = r(u), !g) {
2307
+ if (h = r(d), !h) {
2311
2308
  c = p + (c.length > 0 ? " " + c : c);
2312
2309
  continue;
2313
2310
  }
2314
2311
  m = !1;
2315
2312
  }
2316
- const h = Xt(f).join(":"), A = b ? h + Ue : h, v = A + g;
2313
+ const g = Xt(f).join(":"), k = b ? g + Ue : g, v = k + h;
2317
2314
  if (i.includes(v))
2318
2315
  continue;
2319
2316
  i.push(v);
2320
- const y = o(g, m);
2321
- for (let w = 0; w < y.length; ++w) {
2322
- const k = y[w];
2323
- i.push(A + k);
2317
+ const N = o(h, m);
2318
+ for (let w = 0; w < N.length; ++w) {
2319
+ const A = N[w];
2320
+ i.push(k + A);
2324
2321
  }
2325
2322
  c = p + (c.length > 0 ? " " + c : c);
2326
2323
  }
@@ -2342,22 +2339,22 @@ const qe = (e) => {
2342
2339
  };
2343
2340
  function tn(e, ...t) {
2344
2341
  let n, r, o, i = a;
2345
- function a(d) {
2342
+ function a(l) {
2346
2343
  const p = t.reduce((f, b) => b(f), e());
2347
- return n = Jt(p), r = n.cache.get, o = n.cache.set, i = c, c(d);
2344
+ return n = Jt(p), r = n.cache.get, o = n.cache.set, i = c, c(l);
2348
2345
  }
2349
- function c(d) {
2350
- const p = r(d);
2346
+ function c(l) {
2347
+ const p = r(l);
2351
2348
  if (p)
2352
2349
  return p;
2353
- const f = Zt(d, n);
2354
- return o(d, f), f;
2350
+ const f = Zt(l, n);
2351
+ return o(l, f), f;
2355
2352
  }
2356
2353
  return function() {
2357
2354
  return i(en.apply(null, arguments));
2358
2355
  };
2359
2356
  }
2360
- const D = (e) => {
2357
+ const H = (e) => {
2361
2358
  const t = (n) => n[e] || [];
2362
2359
  return t.isThemeGetter = !0, t;
2363
2360
  }, Xe = /^\[(?:([a-z-]+):)?(.+)\]$/i, nn = /^\d+\/\d+$/, rn = /* @__PURE__ */ new Set(["px", "full", "screen"]), on = /^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/, sn = /\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$/, cn = /^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/, an = /^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/, ln = /^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/, j = (e) => re(e) || rn.has(e) || nn.test(e), q = (e) => ie(e, "length", bn), re = (e) => !!e && !Number.isNaN(Number(e)), be = (e) => ie(e, "number", re), ae = (e) => !!e && Number.isInteger(Number(e)), dn = (e) => e.endsWith("%") && re(e.slice(0, -1)), I = (e) => Xe.test(e), X = (e) => on.test(e), un = /* @__PURE__ */ new Set(["length", "size", "percentage"]), pn = (e) => ie(e, un, Je), fn = (e) => ie(e, "position", Je), hn = /* @__PURE__ */ new Set(["image", "url"]), mn = (e) => ie(e, hn, wn), gn = (e) => ie(e, "", vn), le = () => !0, ie = (e, t, n) => {
@@ -2369,7 +2366,7 @@ const D = (e) => {
2369
2366
  // I could also use lookbehind assertion in `lengthUnitRegex` but that isn't supported widely enough.
2370
2367
  sn.test(e) && !cn.test(e)
2371
2368
  ), Je = () => !1, vn = (e) => an.test(e), wn = (e) => ln.test(e), yn = () => {
2372
- 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"), d = D("contrast"), p = D("grayscale"), f = D("hueRotate"), b = D("invert"), u = D("gap"), l = D("gradientColorStops"), m = D("gradientColorStopPositions"), g = D("inset"), h = D("margin"), A = D("opacity"), v = D("padding"), y = D("saturate"), w = D("scale"), k = D("sepia"), E = D("skew"), z = D("space"), M = D("translate"), N = () => ["auto", "contain", "none"], R = () => ["auto", "hidden", "clip", "visible", "scroll"], C = () => ["auto", I, t], S = () => [I, t], L = () => ["", j, q], V = () => ["auto", re, I], $ = () => ["bottom", "center", "left", "left-bottom", "left-top", "right", "right-bottom", "right-top", "top"], P = () => ["solid", "dashed", "dotted", "double", "none"], H = () => ["normal", "multiply", "screen", "overlay", "darken", "lighten", "color-dodge", "color-burn", "hard-light", "soft-light", "difference", "exclusion", "hue", "saturation", "color", "luminosity"], Z = () => ["start", "end", "center", "between", "around", "evenly", "stretch"], Y = () => ["", "0", I], ge = () => ["auto", "avoid", "all", "avoid-page", "page", "left", "right", "column"], F = () => [re, I];
2369
+ const e = H("colors"), t = H("spacing"), n = H("blur"), r = H("brightness"), o = H("borderColor"), i = H("borderRadius"), a = H("borderSpacing"), c = H("borderWidth"), l = H("contrast"), p = H("grayscale"), f = H("hueRotate"), b = H("invert"), d = H("gap"), u = H("gradientColorStops"), m = H("gradientColorStopPositions"), h = H("inset"), g = H("margin"), k = H("opacity"), v = H("padding"), N = H("saturate"), w = H("scale"), A = H("sepia"), $ = H("skew"), L = H("space"), T = H("translate"), y = () => ["auto", "contain", "none"], R = () => ["auto", "hidden", "clip", "visible", "scroll"], C = () => ["auto", I, t], S = () => [I, t], z = () => ["", j, q], F = () => ["auto", re, I], Z = () => ["bottom", "center", "left", "left-bottom", "left-top", "right", "right-bottom", "right-top", "top"], G = () => ["solid", "dashed", "dotted", "double", "none"], M = () => ["normal", "multiply", "screen", "overlay", "darken", "lighten", "color-dodge", "color-burn", "hard-light", "soft-light", "difference", "exclusion", "hue", "saturation", "color", "luminosity"], P = () => ["start", "end", "center", "between", "around", "evenly", "stretch"], D = () => ["", "0", I], ge = () => ["auto", "avoid", "all", "avoid-page", "page", "left", "right", "column"], V = () => [re, I];
2373
2370
  return {
2374
2371
  cacheSize: 500,
2375
2372
  separator: ":",
@@ -2377,26 +2374,26 @@ const D = (e) => {
2377
2374
  colors: [le],
2378
2375
  spacing: [j, q],
2379
2376
  blur: ["none", "", X, I],
2380
- brightness: F(),
2377
+ brightness: V(),
2381
2378
  borderColor: [e],
2382
2379
  borderRadius: ["none", "", "full", X, I],
2383
2380
  borderSpacing: S(),
2384
- borderWidth: L(),
2385
- contrast: F(),
2386
- grayscale: Y(),
2387
- hueRotate: F(),
2388
- invert: Y(),
2381
+ borderWidth: z(),
2382
+ contrast: V(),
2383
+ grayscale: D(),
2384
+ hueRotate: V(),
2385
+ invert: D(),
2389
2386
  gap: S(),
2390
2387
  gradientColorStops: [e],
2391
2388
  gradientColorStopPositions: [dn, q],
2392
2389
  inset: C(),
2393
2390
  margin: C(),
2394
- opacity: F(),
2391
+ opacity: V(),
2395
2392
  padding: S(),
2396
- saturate: F(),
2397
- scale: F(),
2398
- sepia: Y(),
2399
- skew: F(),
2393
+ saturate: V(),
2394
+ scale: V(),
2395
+ sepia: D(),
2396
+ skew: V(),
2400
2397
  space: S(),
2401
2398
  translate: S()
2402
2399
  },
@@ -2492,7 +2489,7 @@ const D = (e) => {
2492
2489
  * @see https://tailwindcss.com/docs/object-position
2493
2490
  */
2494
2491
  "object-position": [{
2495
- object: [...$(), I]
2492
+ object: [...Z(), I]
2496
2493
  }],
2497
2494
  /**
2498
2495
  * Overflow
@@ -2520,21 +2517,21 @@ const D = (e) => {
2520
2517
  * @see https://tailwindcss.com/docs/overscroll-behavior
2521
2518
  */
2522
2519
  overscroll: [{
2523
- overscroll: N()
2520
+ overscroll: y()
2524
2521
  }],
2525
2522
  /**
2526
2523
  * Overscroll Behavior X
2527
2524
  * @see https://tailwindcss.com/docs/overscroll-behavior
2528
2525
  */
2529
2526
  "overscroll-x": [{
2530
- "overscroll-x": N()
2527
+ "overscroll-x": y()
2531
2528
  }],
2532
2529
  /**
2533
2530
  * Overscroll Behavior Y
2534
2531
  * @see https://tailwindcss.com/docs/overscroll-behavior
2535
2532
  */
2536
2533
  "overscroll-y": [{
2537
- "overscroll-y": N()
2534
+ "overscroll-y": y()
2538
2535
  }],
2539
2536
  /**
2540
2537
  * Position
@@ -2546,63 +2543,63 @@ const D = (e) => {
2546
2543
  * @see https://tailwindcss.com/docs/top-right-bottom-left
2547
2544
  */
2548
2545
  inset: [{
2549
- inset: [g]
2546
+ inset: [h]
2550
2547
  }],
2551
2548
  /**
2552
2549
  * Right / Left
2553
2550
  * @see https://tailwindcss.com/docs/top-right-bottom-left
2554
2551
  */
2555
2552
  "inset-x": [{
2556
- "inset-x": [g]
2553
+ "inset-x": [h]
2557
2554
  }],
2558
2555
  /**
2559
2556
  * Top / Bottom
2560
2557
  * @see https://tailwindcss.com/docs/top-right-bottom-left
2561
2558
  */
2562
2559
  "inset-y": [{
2563
- "inset-y": [g]
2560
+ "inset-y": [h]
2564
2561
  }],
2565
2562
  /**
2566
2563
  * Start
2567
2564
  * @see https://tailwindcss.com/docs/top-right-bottom-left
2568
2565
  */
2569
2566
  start: [{
2570
- start: [g]
2567
+ start: [h]
2571
2568
  }],
2572
2569
  /**
2573
2570
  * End
2574
2571
  * @see https://tailwindcss.com/docs/top-right-bottom-left
2575
2572
  */
2576
2573
  end: [{
2577
- end: [g]
2574
+ end: [h]
2578
2575
  }],
2579
2576
  /**
2580
2577
  * Top
2581
2578
  * @see https://tailwindcss.com/docs/top-right-bottom-left
2582
2579
  */
2583
2580
  top: [{
2584
- top: [g]
2581
+ top: [h]
2585
2582
  }],
2586
2583
  /**
2587
2584
  * Right
2588
2585
  * @see https://tailwindcss.com/docs/top-right-bottom-left
2589
2586
  */
2590
2587
  right: [{
2591
- right: [g]
2588
+ right: [h]
2592
2589
  }],
2593
2590
  /**
2594
2591
  * Bottom
2595
2592
  * @see https://tailwindcss.com/docs/top-right-bottom-left
2596
2593
  */
2597
2594
  bottom: [{
2598
- bottom: [g]
2595
+ bottom: [h]
2599
2596
  }],
2600
2597
  /**
2601
2598
  * Left
2602
2599
  * @see https://tailwindcss.com/docs/top-right-bottom-left
2603
2600
  */
2604
2601
  left: [{
2605
- left: [g]
2602
+ left: [h]
2606
2603
  }],
2607
2604
  /**
2608
2605
  * Visibility
@@ -2650,14 +2647,14 @@ const D = (e) => {
2650
2647
  * @see https://tailwindcss.com/docs/flex-grow
2651
2648
  */
2652
2649
  grow: [{
2653
- grow: Y()
2650
+ grow: D()
2654
2651
  }],
2655
2652
  /**
2656
2653
  * Flex Shrink
2657
2654
  * @see https://tailwindcss.com/docs/flex-shrink
2658
2655
  */
2659
2656
  shrink: [{
2660
- shrink: Y()
2657
+ shrink: D()
2661
2658
  }],
2662
2659
  /**
2663
2660
  * Order
@@ -2687,14 +2684,14 @@ const D = (e) => {
2687
2684
  * @see https://tailwindcss.com/docs/grid-column
2688
2685
  */
2689
2686
  "col-start": [{
2690
- "col-start": V()
2687
+ "col-start": F()
2691
2688
  }],
2692
2689
  /**
2693
2690
  * Grid Column End
2694
2691
  * @see https://tailwindcss.com/docs/grid-column
2695
2692
  */
2696
2693
  "col-end": [{
2697
- "col-end": V()
2694
+ "col-end": F()
2698
2695
  }],
2699
2696
  /**
2700
2697
  * Grid Template Rows
@@ -2717,14 +2714,14 @@ const D = (e) => {
2717
2714
  * @see https://tailwindcss.com/docs/grid-row
2718
2715
  */
2719
2716
  "row-start": [{
2720
- "row-start": V()
2717
+ "row-start": F()
2721
2718
  }],
2722
2719
  /**
2723
2720
  * Grid Row End
2724
2721
  * @see https://tailwindcss.com/docs/grid-row
2725
2722
  */
2726
2723
  "row-end": [{
2727
- "row-end": V()
2724
+ "row-end": F()
2728
2725
  }],
2729
2726
  /**
2730
2727
  * Grid Auto Flow
@@ -2752,28 +2749,28 @@ const D = (e) => {
2752
2749
  * @see https://tailwindcss.com/docs/gap
2753
2750
  */
2754
2751
  gap: [{
2755
- gap: [u]
2752
+ gap: [d]
2756
2753
  }],
2757
2754
  /**
2758
2755
  * Gap X
2759
2756
  * @see https://tailwindcss.com/docs/gap
2760
2757
  */
2761
2758
  "gap-x": [{
2762
- "gap-x": [u]
2759
+ "gap-x": [d]
2763
2760
  }],
2764
2761
  /**
2765
2762
  * Gap Y
2766
2763
  * @see https://tailwindcss.com/docs/gap
2767
2764
  */
2768
2765
  "gap-y": [{
2769
- "gap-y": [u]
2766
+ "gap-y": [d]
2770
2767
  }],
2771
2768
  /**
2772
2769
  * Justify Content
2773
2770
  * @see https://tailwindcss.com/docs/justify-content
2774
2771
  */
2775
2772
  "justify-content": [{
2776
- justify: ["normal", ...Z()]
2773
+ justify: ["normal", ...P()]
2777
2774
  }],
2778
2775
  /**
2779
2776
  * Justify Items
@@ -2794,7 +2791,7 @@ const D = (e) => {
2794
2791
  * @see https://tailwindcss.com/docs/align-content
2795
2792
  */
2796
2793
  "align-content": [{
2797
- content: ["normal", ...Z(), "baseline"]
2794
+ content: ["normal", ...P(), "baseline"]
2798
2795
  }],
2799
2796
  /**
2800
2797
  * Align Items
@@ -2815,7 +2812,7 @@ const D = (e) => {
2815
2812
  * @see https://tailwindcss.com/docs/place-content
2816
2813
  */
2817
2814
  "place-content": [{
2818
- "place-content": [...Z(), "baseline"]
2815
+ "place-content": [...P(), "baseline"]
2819
2816
  }],
2820
2817
  /**
2821
2818
  * Place Items
@@ -2900,70 +2897,70 @@ const D = (e) => {
2900
2897
  * @see https://tailwindcss.com/docs/margin
2901
2898
  */
2902
2899
  m: [{
2903
- m: [h]
2900
+ m: [g]
2904
2901
  }],
2905
2902
  /**
2906
2903
  * Margin X
2907
2904
  * @see https://tailwindcss.com/docs/margin
2908
2905
  */
2909
2906
  mx: [{
2910
- mx: [h]
2907
+ mx: [g]
2911
2908
  }],
2912
2909
  /**
2913
2910
  * Margin Y
2914
2911
  * @see https://tailwindcss.com/docs/margin
2915
2912
  */
2916
2913
  my: [{
2917
- my: [h]
2914
+ my: [g]
2918
2915
  }],
2919
2916
  /**
2920
2917
  * Margin Start
2921
2918
  * @see https://tailwindcss.com/docs/margin
2922
2919
  */
2923
2920
  ms: [{
2924
- ms: [h]
2921
+ ms: [g]
2925
2922
  }],
2926
2923
  /**
2927
2924
  * Margin End
2928
2925
  * @see https://tailwindcss.com/docs/margin
2929
2926
  */
2930
2927
  me: [{
2931
- me: [h]
2928
+ me: [g]
2932
2929
  }],
2933
2930
  /**
2934
2931
  * Margin Top
2935
2932
  * @see https://tailwindcss.com/docs/margin
2936
2933
  */
2937
2934
  mt: [{
2938
- mt: [h]
2935
+ mt: [g]
2939
2936
  }],
2940
2937
  /**
2941
2938
  * Margin Right
2942
2939
  * @see https://tailwindcss.com/docs/margin
2943
2940
  */
2944
2941
  mr: [{
2945
- mr: [h]
2942
+ mr: [g]
2946
2943
  }],
2947
2944
  /**
2948
2945
  * Margin Bottom
2949
2946
  * @see https://tailwindcss.com/docs/margin
2950
2947
  */
2951
2948
  mb: [{
2952
- mb: [h]
2949
+ mb: [g]
2953
2950
  }],
2954
2951
  /**
2955
2952
  * Margin Left
2956
2953
  * @see https://tailwindcss.com/docs/margin
2957
2954
  */
2958
2955
  ml: [{
2959
- ml: [h]
2956
+ ml: [g]
2960
2957
  }],
2961
2958
  /**
2962
2959
  * Space Between X
2963
2960
  * @see https://tailwindcss.com/docs/space
2964
2961
  */
2965
2962
  "space-x": [{
2966
- "space-x": [z]
2963
+ "space-x": [L]
2967
2964
  }],
2968
2965
  /**
2969
2966
  * Space Between X Reverse
@@ -2975,7 +2972,7 @@ const D = (e) => {
2975
2972
  * @see https://tailwindcss.com/docs/space
2976
2973
  */
2977
2974
  "space-y": [{
2978
- "space-y": [z]
2975
+ "space-y": [L]
2979
2976
  }],
2980
2977
  /**
2981
2978
  * Space Between Y Reverse
@@ -3151,7 +3148,7 @@ const D = (e) => {
3151
3148
  * @see https://tailwindcss.com/docs/placeholder-opacity
3152
3149
  */
3153
3150
  "placeholder-opacity": [{
3154
- "placeholder-opacity": [A]
3151
+ "placeholder-opacity": [k]
3155
3152
  }],
3156
3153
  /**
3157
3154
  * Text Alignment
@@ -3172,7 +3169,7 @@ const D = (e) => {
3172
3169
  * @see https://tailwindcss.com/docs/text-opacity
3173
3170
  */
3174
3171
  "text-opacity": [{
3175
- "text-opacity": [A]
3172
+ "text-opacity": [k]
3176
3173
  }],
3177
3174
  /**
3178
3175
  * Text Decoration
@@ -3184,7 +3181,7 @@ const D = (e) => {
3184
3181
  * @see https://tailwindcss.com/docs/text-decoration-style
3185
3182
  */
3186
3183
  "text-decoration-style": [{
3187
- decoration: [...P(), "wavy"]
3184
+ decoration: [...G(), "wavy"]
3188
3185
  }],
3189
3186
  /**
3190
3187
  * Text Decoration Thickness
@@ -3287,7 +3284,7 @@ const D = (e) => {
3287
3284
  * @see https://tailwindcss.com/docs/background-opacity
3288
3285
  */
3289
3286
  "bg-opacity": [{
3290
- "bg-opacity": [A]
3287
+ "bg-opacity": [k]
3291
3288
  }],
3292
3289
  /**
3293
3290
  * Background Origin
@@ -3301,7 +3298,7 @@ const D = (e) => {
3301
3298
  * @see https://tailwindcss.com/docs/background-position
3302
3299
  */
3303
3300
  "bg-position": [{
3304
- bg: [...$(), fn]
3301
+ bg: [...Z(), fn]
3305
3302
  }],
3306
3303
  /**
3307
3304
  * Background Repeat
@@ -3361,21 +3358,21 @@ const D = (e) => {
3361
3358
  * @see https://tailwindcss.com/docs/gradient-color-stops
3362
3359
  */
3363
3360
  "gradient-from": [{
3364
- from: [l]
3361
+ from: [u]
3365
3362
  }],
3366
3363
  /**
3367
3364
  * Gradient Color Stops Via
3368
3365
  * @see https://tailwindcss.com/docs/gradient-color-stops
3369
3366
  */
3370
3367
  "gradient-via": [{
3371
- via: [l]
3368
+ via: [u]
3372
3369
  }],
3373
3370
  /**
3374
3371
  * Gradient Color Stops To
3375
3372
  * @see https://tailwindcss.com/docs/gradient-color-stops
3376
3373
  */
3377
3374
  "gradient-to": [{
3378
- to: [l]
3375
+ to: [u]
3379
3376
  }],
3380
3377
  // Borders
3381
3378
  /**
@@ -3551,14 +3548,14 @@ const D = (e) => {
3551
3548
  * @see https://tailwindcss.com/docs/border-opacity
3552
3549
  */
3553
3550
  "border-opacity": [{
3554
- "border-opacity": [A]
3551
+ "border-opacity": [k]
3555
3552
  }],
3556
3553
  /**
3557
3554
  * Border Style
3558
3555
  * @see https://tailwindcss.com/docs/border-style
3559
3556
  */
3560
3557
  "border-style": [{
3561
- border: [...P(), "hidden"]
3558
+ border: [...G(), "hidden"]
3562
3559
  }],
3563
3560
  /**
3564
3561
  * Divide Width X
@@ -3589,14 +3586,14 @@ const D = (e) => {
3589
3586
  * @see https://tailwindcss.com/docs/divide-opacity
3590
3587
  */
3591
3588
  "divide-opacity": [{
3592
- "divide-opacity": [A]
3589
+ "divide-opacity": [k]
3593
3590
  }],
3594
3591
  /**
3595
3592
  * Divide Style
3596
3593
  * @see https://tailwindcss.com/docs/divide-style
3597
3594
  */
3598
3595
  "divide-style": [{
3599
- divide: P()
3596
+ divide: G()
3600
3597
  }],
3601
3598
  /**
3602
3599
  * Border Color
@@ -3673,7 +3670,7 @@ const D = (e) => {
3673
3670
  * @see https://tailwindcss.com/docs/outline-style
3674
3671
  */
3675
3672
  "outline-style": [{
3676
- outline: ["", ...P()]
3673
+ outline: ["", ...G()]
3677
3674
  }],
3678
3675
  /**
3679
3676
  * Outline Offset
@@ -3701,7 +3698,7 @@ const D = (e) => {
3701
3698
  * @see https://tailwindcss.com/docs/ring-width
3702
3699
  */
3703
3700
  "ring-w": [{
3704
- ring: L()
3701
+ ring: z()
3705
3702
  }],
3706
3703
  /**
3707
3704
  * Ring Width Inset
@@ -3720,7 +3717,7 @@ const D = (e) => {
3720
3717
  * @see https://tailwindcss.com/docs/ring-opacity
3721
3718
  */
3722
3719
  "ring-opacity": [{
3723
- "ring-opacity": [A]
3720
+ "ring-opacity": [k]
3724
3721
  }],
3725
3722
  /**
3726
3723
  * Ring Offset Width
@@ -3756,21 +3753,21 @@ const D = (e) => {
3756
3753
  * @see https://tailwindcss.com/docs/opacity
3757
3754
  */
3758
3755
  opacity: [{
3759
- opacity: [A]
3756
+ opacity: [k]
3760
3757
  }],
3761
3758
  /**
3762
3759
  * Mix Blend Mode
3763
3760
  * @see https://tailwindcss.com/docs/mix-blend-mode
3764
3761
  */
3765
3762
  "mix-blend": [{
3766
- "mix-blend": [...H(), "plus-lighter", "plus-darker"]
3763
+ "mix-blend": [...M(), "plus-lighter", "plus-darker"]
3767
3764
  }],
3768
3765
  /**
3769
3766
  * Background Blend Mode
3770
3767
  * @see https://tailwindcss.com/docs/background-blend-mode
3771
3768
  */
3772
3769
  "bg-blend": [{
3773
- "bg-blend": H()
3770
+ "bg-blend": M()
3774
3771
  }],
3775
3772
  // Filters
3776
3773
  /**
@@ -3800,7 +3797,7 @@ const D = (e) => {
3800
3797
  * @see https://tailwindcss.com/docs/contrast
3801
3798
  */
3802
3799
  contrast: [{
3803
- contrast: [d]
3800
+ contrast: [l]
3804
3801
  }],
3805
3802
  /**
3806
3803
  * Drop Shadow
@@ -3835,14 +3832,14 @@ const D = (e) => {
3835
3832
  * @see https://tailwindcss.com/docs/saturate
3836
3833
  */
3837
3834
  saturate: [{
3838
- saturate: [y]
3835
+ saturate: [N]
3839
3836
  }],
3840
3837
  /**
3841
3838
  * Sepia
3842
3839
  * @see https://tailwindcss.com/docs/sepia
3843
3840
  */
3844
3841
  sepia: [{
3845
- sepia: [k]
3842
+ sepia: [A]
3846
3843
  }],
3847
3844
  /**
3848
3845
  * Backdrop Filter
@@ -3871,7 +3868,7 @@ const D = (e) => {
3871
3868
  * @see https://tailwindcss.com/docs/backdrop-contrast
3872
3869
  */
3873
3870
  "backdrop-contrast": [{
3874
- "backdrop-contrast": [d]
3871
+ "backdrop-contrast": [l]
3875
3872
  }],
3876
3873
  /**
3877
3874
  * Backdrop Grayscale
@@ -3899,21 +3896,21 @@ const D = (e) => {
3899
3896
  * @see https://tailwindcss.com/docs/backdrop-opacity
3900
3897
  */
3901
3898
  "backdrop-opacity": [{
3902
- "backdrop-opacity": [A]
3899
+ "backdrop-opacity": [k]
3903
3900
  }],
3904
3901
  /**
3905
3902
  * Backdrop Saturate
3906
3903
  * @see https://tailwindcss.com/docs/backdrop-saturate
3907
3904
  */
3908
3905
  "backdrop-saturate": [{
3909
- "backdrop-saturate": [y]
3906
+ "backdrop-saturate": [N]
3910
3907
  }],
3911
3908
  /**
3912
3909
  * Backdrop Sepia
3913
3910
  * @see https://tailwindcss.com/docs/backdrop-sepia
3914
3911
  */
3915
3912
  "backdrop-sepia": [{
3916
- "backdrop-sepia": [k]
3913
+ "backdrop-sepia": [A]
3917
3914
  }],
3918
3915
  // Tables
3919
3916
  /**
@@ -3971,7 +3968,7 @@ const D = (e) => {
3971
3968
  * @see https://tailwindcss.com/docs/transition-duration
3972
3969
  */
3973
3970
  duration: [{
3974
- duration: F()
3971
+ duration: V()
3975
3972
  }],
3976
3973
  /**
3977
3974
  * Transition Timing Function
@@ -3985,7 +3982,7 @@ const D = (e) => {
3985
3982
  * @see https://tailwindcss.com/docs/transition-delay
3986
3983
  */
3987
3984
  delay: [{
3988
- delay: F()
3985
+ delay: V()
3989
3986
  }],
3990
3987
  /**
3991
3988
  * Animation
@@ -4035,28 +4032,28 @@ const D = (e) => {
4035
4032
  * @see https://tailwindcss.com/docs/translate
4036
4033
  */
4037
4034
  "translate-x": [{
4038
- "translate-x": [M]
4035
+ "translate-x": [T]
4039
4036
  }],
4040
4037
  /**
4041
4038
  * Translate Y
4042
4039
  * @see https://tailwindcss.com/docs/translate
4043
4040
  */
4044
4041
  "translate-y": [{
4045
- "translate-y": [M]
4042
+ "translate-y": [T]
4046
4043
  }],
4047
4044
  /**
4048
4045
  * Skew X
4049
4046
  * @see https://tailwindcss.com/docs/skew
4050
4047
  */
4051
4048
  "skew-x": [{
4052
- "skew-x": [E]
4049
+ "skew-x": [$]
4053
4050
  }],
4054
4051
  /**
4055
4052
  * Skew Y
4056
4053
  * @see https://tailwindcss.com/docs/skew
4057
4054
  */
4058
4055
  "skew-y": [{
4059
- "skew-y": [E]
4056
+ "skew-y": [$]
4060
4057
  }],
4061
4058
  /**
4062
4059
  * Transform Origin
@@ -4402,40 +4399,40 @@ function kn(...e) {
4402
4399
  return xn(bt(e));
4403
4400
  }
4404
4401
  function or({ autoWidth: e = !0, className: t, style: n }) {
4405
- const [r, o] = T(() => _.getActiveAppId()), [i, a] = T(() => G.getRunningApps()), { isMobile: c } = Ke();
4402
+ const [r, o] = E(() => _.getActiveAppId()), [i, a] = E(() => Y.getRunningApps()), { isMobile: c } = Ke();
4406
4403
  B(() => {
4407
- const h = _.subscribe("activeAppId", (A) => {
4408
- o(A);
4404
+ const g = _.subscribe("activeAppId", (k) => {
4405
+ o(k);
4409
4406
  });
4410
4407
  return () => {
4411
- h();
4408
+ g();
4412
4409
  };
4413
- }, []), B(() => G.subscribe(() => {
4414
- a(G.getRunningApps());
4410
+ }, []), B(() => Y.subscribe(() => {
4411
+ a(Y.getRunningApps());
4415
4412
  }), []), B(() => {
4416
4413
  if (!new URLSearchParams(window.location.search).has("app")) {
4417
4414
  const v = _.getActiveAppId();
4418
- v && !G.isRunning(v) && G.launchApp(v);
4415
+ v && !Y.isRunning(v) && Y.launchApp(v);
4419
4416
  }
4420
4417
  }, []);
4421
- const d = (h) => {
4422
- G.closeApp(h);
4423
- }, p = r ? oe.get(r) : null, b = (p == null ? void 0 : p.width) ?? 400, u = r !== null, g = { ...{
4418
+ const l = (g) => {
4419
+ Y.closeApp(g);
4420
+ }, p = r ? oe.get(r) : null, b = (p == null ? void 0 : p.width) ?? 400, d = r !== null, h = { ...{
4424
4421
  overflow: "hidden",
4425
- display: u ? "flex" : "none",
4422
+ display: d ? "flex" : "none",
4426
4423
  flexDirection: "column",
4427
4424
  flexShrink: 0,
4428
4425
  // Only set width if autoWidth is enabled
4429
- ...e && u ? { width: c ? "100%" : b } : {}
4426
+ ...e && d ? { width: c ? "100%" : b } : {}
4430
4427
  }, ...n };
4431
- return /* @__PURE__ */ s("div", { className: kn("nc-app-panel", t), style: g, children: i.map((h) => /* @__PURE__ */ s(
4428
+ return /* @__PURE__ */ s("div", { className: kn("nc-app-panel", t), style: h, children: i.map((g) => /* @__PURE__ */ s(
4432
4429
  Ge,
4433
4430
  {
4434
- appId: h.appId,
4435
- isActive: r === h.appId,
4436
- onClose: () => d(h.appId)
4431
+ appId: g.appId,
4432
+ isActive: r === g.appId,
4433
+ onClose: () => l(g.appId)
4437
4434
  },
4438
- h.appId
4435
+ g.appId
4439
4436
  )) });
4440
4437
  }
4441
4438
  function sr({
@@ -4443,52 +4440,52 @@ function sr({
4443
4440
  className: t = "",
4444
4441
  showIndicators: n = !0
4445
4442
  }) {
4446
- const { isMobile: r } = Ke(), [o, i] = T(() => _.getActiveAppId()), [a, c] = T(() => G.getRunningApps());
4443
+ const { isMobile: r } = Ke(), [o, i] = E(() => _.getActiveAppId()), [a, c] = E(() => Y.getRunningApps());
4447
4444
  B(() => {
4448
- const l = _.subscribe("activeAppId", (m) => {
4445
+ const u = _.subscribe("activeAppId", (m) => {
4449
4446
  i(m);
4450
4447
  });
4451
4448
  return () => {
4452
- l();
4449
+ u();
4453
4450
  };
4454
- }, []), B(() => G.subscribe(() => {
4455
- c(G.getRunningApps());
4451
+ }, []), B(() => Y.subscribe(() => {
4452
+ c(Y.getRunningApps());
4456
4453
  }), []);
4457
- const d = (l) => {
4458
- o === l ? G.setActiveApp(null) : G.launchApp(l);
4459
- }, p = e.map((l) => oe.get(l)).filter((l) => !!l), f = a.filter((l) => !e.includes(l.appId)).map((l) => ({ running: l, def: oe.get(l.appId) })).filter((l) => !!l.def), b = (l) => a.some((m) => m.appId === l), u = r ? 24 : 28;
4454
+ const l = (u) => {
4455
+ o === u ? Y.setActiveApp(null) : Y.launchApp(u);
4456
+ }, p = e.map((u) => oe.get(u)).filter((u) => !!u), f = a.filter((u) => !e.includes(u.appId)).map((u) => ({ running: u, def: oe.get(u.appId) })).filter((u) => !!u.def), b = (u) => a.some((m) => m.appId === u), d = r ? 24 : 28;
4460
4457
  return /* @__PURE__ */ x("div", { className: `nc-app-taskbar ${r ? "nc-mobile" : "nc-desktop"} ${t}`, children: [
4461
- p.map((l) => {
4462
- const m = l.icon, g = o === l.id, h = b(l.id);
4458
+ p.map((u) => {
4459
+ const m = u.icon, h = o === u.id, g = b(u.id);
4463
4460
  return /* @__PURE__ */ x(
4464
4461
  "button",
4465
4462
  {
4466
- className: `nc-app-taskbar-button ${g ? "nc-active" : ""} ${h ? "nc-running" : ""}`,
4467
- onClick: () => d(l.id),
4468
- title: l.titleKey || l.id,
4463
+ className: `nc-app-taskbar-button ${h ? "nc-active" : ""} ${g ? "nc-running" : ""}`,
4464
+ onClick: () => l(u.id),
4465
+ title: u.titleKey || u.id,
4469
4466
  children: [
4470
- /* @__PURE__ */ s(m, { size: u }),
4471
- n && h && /* @__PURE__ */ s("span", { className: "nc-app-taskbar-indicator" })
4467
+ /* @__PURE__ */ s(m, { size: d }),
4468
+ n && g && /* @__PURE__ */ s("span", { className: "nc-app-taskbar-indicator" })
4472
4469
  ]
4473
4470
  },
4474
- l.id
4471
+ u.id
4475
4472
  );
4476
4473
  }),
4477
4474
  f.length > 0 && /* @__PURE__ */ s("div", { className: "nc-app-taskbar-separator" }),
4478
- f.map(({ running: l, def: m }) => {
4479
- const g = m.icon, h = o === l.appId;
4475
+ f.map(({ running: u, def: m }) => {
4476
+ const h = m.icon, g = o === u.appId;
4480
4477
  return /* @__PURE__ */ x(
4481
4478
  "button",
4482
4479
  {
4483
- className: `nc-app-taskbar-button ${h ? "nc-active" : ""} nc-running`,
4484
- onClick: () => d(l.appId),
4480
+ className: `nc-app-taskbar-button ${g ? "nc-active" : ""} nc-running`,
4481
+ onClick: () => l(u.appId),
4485
4482
  title: m.titleKey || m.id,
4486
4483
  children: [
4487
- /* @__PURE__ */ s(g, { size: u }),
4484
+ /* @__PURE__ */ s(h, { size: d }),
4488
4485
  n && /* @__PURE__ */ s("span", { className: "nc-app-taskbar-indicator" })
4489
4486
  ]
4490
4487
  },
4491
- l.appId
4488
+ u.appId
4492
4489
  );
4493
4490
  })
4494
4491
  ] });
@@ -4501,8 +4498,8 @@ function ir({
4501
4498
  className: o = "",
4502
4499
  style: i
4503
4500
  }) {
4504
- const a = (d) => {
4505
- r && d.target === d.currentTarget && n();
4501
+ const a = (l) => {
4502
+ r && l.target === l.currentTarget && n();
4506
4503
  };
4507
4504
  if (!t) return null;
4508
4505
  const c = /* @__PURE__ */ s(
@@ -4515,7 +4512,7 @@ function ir({
4515
4512
  {
4516
4513
  className: `nc-app-dialog-container ${o}`,
4517
4514
  style: i,
4518
- onClick: (d) => d.stopPropagation(),
4515
+ onClick: (l) => l.stopPropagation(),
4519
4516
  children: /* @__PURE__ */ s(
4520
4517
  Ge,
4521
4518
  {
@@ -4545,26 +4542,26 @@ function ar() {
4545
4542
  }
4546
4543
  const Ce = se(null);
4547
4544
  function lr({ rootView: e, children: t }) {
4548
- const { t: n } = Q(), r = Wt(), [o, i] = T([e]), [a, c] = T([null]), d = O((w, k) => {
4549
- c((E) => {
4550
- const z = [...E];
4551
- return z[w] = k, z;
4545
+ const { t: n } = Q(), r = Wt(), [o, i] = E([e]), [a, c] = E([null]), l = O((w, A) => {
4546
+ c(($) => {
4547
+ const L = [...$];
4548
+ return L[w] = A, L;
4552
4549
  });
4553
4550
  }, []), p = O((w) => {
4554
- c((k) => {
4555
- const E = [...k];
4556
- return E[w] = null, E;
4551
+ c((A) => {
4552
+ const $ = [...A];
4553
+ return $[w] = null, $;
4557
4554
  });
4558
4555
  }, []), f = O((w) => {
4559
- i((k) => [...k, w]), c((k) => [...k, null]);
4556
+ i((A) => [...A, w]), c((A) => [...A, null]);
4560
4557
  }, []), b = O(() => {
4561
4558
  i((w) => w.length <= 1 ? w : w.slice(0, -1)), c((w) => w.slice(0, -1));
4562
- }, []), u = O(() => {
4559
+ }, []), d = O(() => {
4563
4560
  i([e]), c([null]);
4564
- }, [e]), l = o.length, m = l > 1, g = o.length - 1, h = o[o.length - 1], A = h != null && h.titleKey ? n(h.titleKey) : (h == null ? void 0 : h.title) ?? "";
4561
+ }, [e]), u = o.length, m = u > 1, h = o.length - 1, g = o[o.length - 1], k = g != null && g.titleKey ? n(g.titleKey) : (g == null ? void 0 : g.title) ?? "";
4565
4562
  B(() => {
4566
- r.setTitle(A);
4567
- }, [A, r]), B(() => {
4563
+ r.setTitle(k);
4564
+ }, [k, r]), B(() => {
4568
4565
  m ? r.setBackHandler(b) : r.clearBackHandler();
4569
4566
  }, [m, b, r]), B(() => {
4570
4567
  const w = a[a.length - 1];
@@ -4573,18 +4570,18 @@ function lr({ rootView: e, children: t }) {
4573
4570
  const v = {
4574
4571
  push: f,
4575
4572
  pop: b,
4576
- reset: u,
4577
- depth: l,
4573
+ reset: d,
4574
+ depth: u,
4578
4575
  canGoBack: m,
4579
- currentTitle: A
4580
- }, y = {
4576
+ currentTitle: k
4577
+ }, N = {
4581
4578
  stack: o,
4582
4579
  toolbarStack: a,
4583
- updateToolbar: d,
4580
+ updateToolbar: l,
4584
4581
  clearToolbarAt: p,
4585
- topIndex: g
4582
+ topIndex: h
4586
4583
  };
4587
- return /* @__PURE__ */ s(Ae.Provider, { value: v, children: /* @__PURE__ */ s(Ce.Provider, { value: y, children: t }) });
4584
+ return /* @__PURE__ */ s(Ae.Provider, { value: v, children: /* @__PURE__ */ s(Ce.Provider, { value: N, children: t }) });
4588
4585
  }
4589
4586
  function Nn({ index: e, children: t }) {
4590
4587
  const n = J(Ce);
@@ -4594,11 +4591,11 @@ function Nn({ index: e, children: t }) {
4594
4591
  e === i && r(e, p);
4595
4592
  }, [e, i, r]), c = O(() => {
4596
4593
  e === i && o(e);
4597
- }, [e, i, o]), d = {
4594
+ }, [e, i, o]), l = {
4598
4595
  setToolbar: a,
4599
4596
  clearToolbar: c
4600
4597
  };
4601
- return /* @__PURE__ */ s(Qe.Provider, { value: d, children: t });
4598
+ return /* @__PURE__ */ s(Qe.Provider, { value: l, children: t });
4602
4599
  }
4603
4600
  function dr() {
4604
4601
  const e = J(Ae), t = J(Ce);
@@ -4649,7 +4646,7 @@ export {
4649
4646
  Un as NumberInput,
4650
4647
  Dn as RefreshButton,
4651
4648
  qn as Slider,
4652
- Mt as TabPanel,
4649
+ It as TabPanel,
4653
4650
  Xn as TabPanels,
4654
4651
  Jn as Tabs,
4655
4652
  Qn as Toggle,
@@ -4660,7 +4657,7 @@ export {
4660
4657
  kn as cn,
4661
4658
  nr as createAppI18nFactory,
4662
4659
  tr as notificationManager,
4663
- G as runningAppsStore,
4660
+ Y as runningAppsStore,
4664
4661
  Lt as showNotification,
4665
4662
  Wt as useApp,
4666
4663
  At as useDialog,