@llmnative/react 1.12.0 → 1.13.0

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.mjs CHANGED
@@ -1047,6 +1047,11 @@ var Kt = {
1047
1047
  Prompt: {
1048
1048
  wrapperClassName: "",
1049
1049
  className: ""
1050
+ },
1051
+ Repeat: {
1052
+ itemClassName: "",
1053
+ inlineItemClassName: "",
1054
+ addButtonClassName: ""
1050
1055
  }
1051
1056
  }, Yt = {
1052
1057
  preset: Kt,
@@ -1589,6 +1594,11 @@ var Kt = {
1589
1594
  Prompt: {
1590
1595
  wrapperClassName: "",
1591
1596
  className: ""
1597
+ },
1598
+ Repeat: {
1599
+ itemClassName: "",
1600
+ inlineItemClassName: "",
1601
+ addButtonClassName: ""
1592
1602
  }
1593
1603
  }
1594
1604
  }, Zt = {
@@ -2128,6 +2138,11 @@ var Kt = {
2128
2138
  Prompt: {
2129
2139
  wrapperClassName: "",
2130
2140
  className: ""
2141
+ },
2142
+ Repeat: {
2143
+ itemClassName: "",
2144
+ inlineItemClassName: "",
2145
+ addButtonClassName: ""
2131
2146
  }
2132
2147
  }
2133
2148
  }, Qt = {
@@ -3744,7 +3759,7 @@ var Di = "rounded-lg border border-border bg-card text-card-foreground shadow-sm
3744
3759
  }))
3745
3760
  }, e);
3746
3761
  }, Ii = ({ menuKey: e, as: n = "ul", badges: r = {}, before: i = void 0, after: a = void 0, wrapperClassName: o = void 0, className: s = void 0, headerClassName: c = void 0, itemClassName: u = void 0, linkClassName: d = void 0, iconClassName: f = void 0, textClassName: p = void 0, badgeClassName: m = void 0, arrowClassName: g = void 0, submenuClassName: _ = void 0 }) => {
3747
- let y = Uh(e), b = Y("menu"), x = ({ item: e, index: i }) => {
3762
+ let y = Hh(e), b = Y("menu"), x = ({ item: e, index: i }) => {
3748
3763
  let [a, o] = h(e.active);
3749
3764
  l(() => {
3750
3765
  o(e.active);
@@ -12434,68 +12449,69 @@ var Id = {}, Ld = ({ children: e, appearance: n = void 0, controller: r = void 0
12434
12449
  onKeyDownCapture: Ue,
12435
12450
  onKeyDown: Ue
12436
12451
  }, Ye));
12437
- }, Rd = "rounded-xl border border-border/60 bg-card/80 shadow-sm", zd = "flex items-center justify-between gap-3 border-b border-border/50 px-3 py-2", Bd = "text-xs font-medium uppercase tracking-[0.14em] text-muted-foreground", Vd = "px-3 py-3", Hd = "h-7 w-7 rounded-md bg-transparent p-0 text-muted-foreground hover:bg-destructive/10 hover:text-destructive", Ud = ({ name: e, children: n, onChange: r, onAdd: i, onRemove: a, className: o, layout: s = "horizontal", minItems: c = void 0, maxItems: l = void 0, label: u = void 0, labelPosition: d = "top", hideRemoveButton: f = !1, readOnly: m = !1 }) => {
12452
+ }, Rd = "flex items-center justify-between gap-3 border-b border-border/50 px-3 py-2", zd = "text-xs font-medium uppercase tracking-[0.14em] text-muted-foreground", Bd = "px-3 py-3", Vd = "h-7 w-7 rounded-md bg-transparent p-0 text-muted-foreground hover:bg-destructive/10 hover:text-destructive", Hd = ({ name: e, children: n, onChange: r, onAdd: i, onRemove: a, className: o, layout: s = "horizontal", minItems: c = void 0, maxItems: l = void 0, label: u = void 0, labelPosition: d = "top", hideRemoveButton: f = !1, readOnly: m = !1 }) => {
12438
12453
  let { value: h, handleChange: g } = Dd({
12439
12454
  name: e,
12440
12455
  onChange: r
12441
- }), _ = Array.isArray(h) ? h : [], v = (t, r) => Ad({
12456
+ }), _ = Array.isArray(h) ? h : [], v = Y("repeat"), y = X("rounded-xl border border-border/60 bg-card/80 shadow-sm", v.Repeat.itemClassName), b = (t, r) => Ad({
12442
12457
  children: typeof n == "function" ? n({
12443
12458
  record: _[t],
12444
12459
  records: _,
12445
12460
  index: t,
12446
- remove: () => S(t)
12461
+ remove: () => w(t)
12447
12462
  }) : n,
12448
12463
  parentName: `${e}.${t}`,
12449
12464
  wrapperClassName: r
12450
- }), y = (e, n) => {
12465
+ }), x = (e, n) => {
12451
12466
  switch (s) {
12452
- case "horizontal": return /* @__PURE__ */ t.createElement("div", { className: Rd }, /* @__PURE__ */ t.createElement("div", { className: zd }, /* @__PURE__ */ t.createElement("span", { className: Bd }, "#", e + 1), n && !f ? /* @__PURE__ */ t.createElement(Hr, {
12453
- className: Hd,
12467
+ case "horizontal": return /* @__PURE__ */ t.createElement("div", { className: y }, /* @__PURE__ */ t.createElement("div", { className: Rd }, /* @__PURE__ */ t.createElement("span", { className: zd }, "#", e + 1), n && !f ? /* @__PURE__ */ t.createElement(Hr, {
12468
+ className: Vd,
12454
12469
  icon: "x",
12455
- onClick: () => S(e)
12470
+ onClick: () => w(e)
12456
12471
  }) : /* @__PURE__ */ t.createElement("span", {
12457
12472
  className: "h-7 w-7",
12458
12473
  "aria-hidden": "true"
12459
- })), /* @__PURE__ */ t.createElement("div", { className: Vd }, v(e)));
12474
+ })), /* @__PURE__ */ t.createElement("div", { className: Bd }, b(e)));
12460
12475
  case "vertical": return /* @__PURE__ */ t.createElement(t.Fragment, null);
12461
- case "inline": return /* @__PURE__ */ t.createElement("div", { className: X(Rd, "px-3 py-2") }, /* @__PURE__ */ t.createElement("div", { className: "flex items-start gap-2" }, /* @__PURE__ */ t.createElement("div", { className: "flex-1 min-w-0" }, v(e, "!mb-0")), n && !f && /* @__PURE__ */ t.createElement(Hr, {
12462
- className: X(Hd, "mt-1 shrink-0"),
12476
+ case "inline": return /* @__PURE__ */ t.createElement("div", { className: X(y, "px-3 py-2", v.Repeat.inlineItemClassName) }, /* @__PURE__ */ t.createElement("div", { className: "flex items-start gap-2" }, /* @__PURE__ */ t.createElement("div", { className: "flex-1 min-w-0" }, b(e, "!mb-0")), n && !f && /* @__PURE__ */ t.createElement(Hr, {
12477
+ className: X(Vd, "mt-1 shrink-0"),
12463
12478
  icon: "x",
12464
- onClick: () => S(e)
12479
+ onClick: () => w(e)
12465
12480
  })));
12466
12481
  }
12467
- }, b = (_.length > 0 ? _ : Array.from({ length: c || 0 }, () => ({})))?.map((n, r) => {
12482
+ }, S = (_.length > 0 ? _ : Array.from({ length: c || 0 }, () => ({})))?.map((n, r) => {
12468
12483
  let i = !m && r >= (c || 0);
12469
- return /* @__PURE__ */ t.createElement(t.Fragment, { key: `${e}-${r}` }, y(r, i));
12470
- }), x = () => {
12471
- let t = _.length > 0 ? [..._, {}] : Array.from({ length: b.length + 1 }, () => ({}));
12484
+ return /* @__PURE__ */ t.createElement(t.Fragment, { key: `${e}-${r}` }, x(r, i));
12485
+ }), C = () => {
12486
+ let t = _.length > 0 ? [..._, {}] : Array.from({ length: S.length + 1 }, () => ({}));
12472
12487
  i?.(t), g({ target: {
12473
12488
  name: `${e}.${t.length - 1}`,
12474
12489
  value: {}
12475
12490
  } });
12476
- }, S = (t) => {
12491
+ }, w = (t) => {
12477
12492
  a?.(t), g({ target: { name: `${e}.${t}` } });
12478
- }, C = p(() => m ? null : !l || b.length < l ? u && d === "bottom" ? /* @__PURE__ */ t.createElement(Hr, {
12493
+ }, T = p(() => m ? null : !l || S.length < l ? u && d === "bottom" ? /* @__PURE__ */ t.createElement(Hr, {
12479
12494
  icon: "plus",
12480
12495
  label: u,
12481
12496
  variant: "link",
12482
- className: "w-full justify-start gap-1 rounded-lg border border-dashed border-border/60 px-3 py-2 text-sm text-muted-foreground hover:border-border hover:bg-muted/40 hover:text-foreground",
12483
- onClick: x
12497
+ className: X("w-full justify-start gap-1 rounded-lg border border-dashed border-border/60 px-3 py-2 text-sm text-muted-foreground hover:border-border hover:bg-muted/40 hover:text-foreground", v.Repeat.addButtonClassName),
12498
+ onClick: C
12484
12499
  }) : /* @__PURE__ */ t.createElement(Hr, {
12485
12500
  icon: "plus",
12486
12501
  label: u ? void 0 : "Add",
12487
12502
  variant: u ? "link" : "secondary",
12488
- className: u ? "h-8 w-8 rounded-lg p-0 text-muted-foreground hover:bg-muted/50 hover:text-foreground" : void 0,
12489
- onClick: x
12503
+ className: u ? X("h-8 w-8 rounded-lg p-0 text-muted-foreground hover:bg-muted/50 hover:text-foreground", v.Repeat.addButtonClassName) : void 0,
12504
+ onClick: C
12490
12505
  }) : null, [
12491
12506
  m,
12492
12507
  l,
12493
- b.length,
12508
+ S.length,
12494
12509
  u,
12495
- d
12510
+ d,
12511
+ v.Repeat.addButtonClassName
12496
12512
  ]);
12497
- return /* @__PURE__ */ t.createElement("div", { className: X("space-y-3", o) }, u && d === "top" && /* @__PURE__ */ t.createElement("div", { className: "flex items-center justify-between gap-3" }, /* @__PURE__ */ t.createElement("span", { className: "text-sm font-medium text-foreground" }, u), C), b, !u && C, u && d === "bottom" && C);
12498
- }, Wd = {
12513
+ return /* @__PURE__ */ t.createElement("div", { className: X("space-y-3", o) }, u && d === "top" && /* @__PURE__ */ t.createElement("div", { className: "flex items-center justify-between gap-3" }, /* @__PURE__ */ t.createElement("span", { className: "text-sm font-medium text-foreground" }, u), T), S, !u && T, u && d === "bottom" && T);
12514
+ }, Ud = {
12499
12515
  default: {
12500
12516
  shellClassName: "space-y-4",
12501
12517
  menuClassName: "flex flex-wrap items-end gap-2 border-b border-border/70",
@@ -12542,19 +12558,19 @@ var Id = {}, Ld = ({ children: e, appearance: n = void 0, controller: r = void 0
12542
12558
  inactiveTriggerClassName: "text-muted-foreground hover:bg-background/80 hover:text-foreground"
12543
12559
  }
12544
12560
  };
12545
- function Gd(e) {
12546
- return Wd[e];
12561
+ function Wd(e) {
12562
+ return Ud[e];
12547
12563
  }
12548
- function Kd(e, t, n) {
12549
- let r = Gd(e), i = Y("tab");
12564
+ function Gd(e, t, n) {
12565
+ let r = Wd(e), i = Y("tab");
12550
12566
  return X("cursor-pointer", r.triggerClassName, i.Tab.triggerClassName, t ? r.activeTriggerClassName : r.inactiveTriggerClassName, t ? i.Tab.activeTriggerClassName : i.Tab.inactiveTriggerClassName, n);
12551
12567
  }
12552
- function qd(e) {
12568
+ function Kd(e) {
12553
12569
  return X("min-h-0 min-w-0 h-full overflow-x-hidden overflow-y-auto", Y("tab").Tab.contentClassName, e);
12554
12570
  }
12555
- var Jd = {
12571
+ var qd = {
12556
12572
  default: ({ menu: e, content: n, menuClassName: r, contentClassName: i }) => {
12557
- let a = Gd("default"), o = Y("tab");
12573
+ let a = Wd("default"), o = Y("tab");
12558
12574
  return /* @__PURE__ */ t.createElement("div", { className: a.shellClassName }, /* @__PURE__ */ t.createElement("div", {
12559
12575
  role: "tablist",
12560
12576
  "aria-orientation": "horizontal",
@@ -12562,7 +12578,7 @@ var Jd = {
12562
12578
  }, e), /* @__PURE__ */ t.createElement("div", { className: X(a.contentClassName, o.Tab.contentClassName, i) }, n));
12563
12579
  },
12564
12580
  top: ({ menu: e, content: n, menuClassName: r, contentClassName: i }) => {
12565
- let a = Gd("top"), o = Y("tab");
12581
+ let a = Wd("top"), o = Y("tab");
12566
12582
  return /* @__PURE__ */ t.createElement("div", { className: a.shellClassName }, /* @__PURE__ */ t.createElement("div", {
12567
12583
  role: "tablist",
12568
12584
  "aria-orientation": "horizontal",
@@ -12570,7 +12586,7 @@ var Jd = {
12570
12586
  }, e), /* @__PURE__ */ t.createElement("div", { className: X(a.contentClassName, o.Tab.contentClassName, i) }, n));
12571
12587
  },
12572
12588
  left: ({ menu: e, content: n, menuClassName: r, contentClassName: i }) => {
12573
- let a = Gd("left"), o = Y("tab");
12589
+ let a = Wd("left"), o = Y("tab");
12574
12590
  return /* @__PURE__ */ t.createElement("div", { className: a.shellClassName }, /* @__PURE__ */ t.createElement("div", {
12575
12591
  role: "tablist",
12576
12592
  "aria-orientation": "vertical",
@@ -12578,7 +12594,7 @@ var Jd = {
12578
12594
  }, e), /* @__PURE__ */ t.createElement("div", { className: X(a.contentClassName, o.Tab.contentClassName, i) }, n));
12579
12595
  },
12580
12596
  right: ({ menu: e, content: n, menuClassName: r, contentClassName: i }) => {
12581
- let a = Gd("right"), o = Y("tab");
12597
+ let a = Wd("right"), o = Y("tab");
12582
12598
  return /* @__PURE__ */ t.createElement("div", { className: a.shellClassName }, /* @__PURE__ */ t.createElement("div", {
12583
12599
  role: "tablist",
12584
12600
  "aria-orientation": "vertical",
@@ -12586,23 +12602,23 @@ var Jd = {
12586
12602
  }, e), /* @__PURE__ */ t.createElement("div", { className: X(a.contentClassName, o.Tab.contentClassName, i) }, n));
12587
12603
  },
12588
12604
  bottom: ({ menu: e, content: n, menuClassName: r, contentClassName: i }) => {
12589
- let a = Gd("bottom"), o = Y("tab");
12605
+ let a = Wd("bottom"), o = Y("tab");
12590
12606
  return /* @__PURE__ */ t.createElement("div", { className: a.shellClassName }, /* @__PURE__ */ t.createElement("div", { className: X(a.contentClassName, o.Tab.contentClassName, i) }, n), /* @__PURE__ */ t.createElement("div", {
12591
12607
  role: "tablist",
12592
12608
  "aria-orientation": "horizontal",
12593
12609
  className: X(a.menuClassName, o.Tab.menuClassName, r)
12594
12610
  }, e));
12595
12611
  }
12596
- }, Yd = () => null, Xd = ({ children: e, motion: n }) => {
12612
+ }, Jd = () => null, Yd = ({ children: e, motion: n }) => {
12597
12613
  let r = Y("tab"), i = cr(void 0, n ?? r.Tab.motion?.enter ?? "fadeUp", r.Tab.motion?.enter ?? "fadeUp");
12598
12614
  return /* @__PURE__ */ t.createElement("div", {
12599
12615
  style: i,
12600
- className: qd()
12616
+ className: Kd()
12601
12617
  }, e);
12602
- }, Zd = ({ children: e, defaultIndex: r = 0, onChange: i, layout: a = "default", menuClassName: o = void 0, contentClassName: s = void 0, before: c = void 0, after: l = void 0, wrapperClassName: u = void 0, className: d = void 0, motion: f = void 0 }) => {
12618
+ }, Xd = ({ children: e, defaultIndex: r = 0, onChange: i, layout: a = "default", menuClassName: o = void 0, contentClassName: s = void 0, before: c = void 0, after: l = void 0, wrapperClassName: u = void 0, className: d = void 0, motion: f = void 0 }) => {
12603
12619
  let [m, g] = h(r), _ = (e) => {
12604
12620
  g(e), i?.(e);
12605
- }, v = n.toArray(e).filter((e) => t.isValidElement(e) && e.type === Yd), y = p(() => Gd(a), [a]), b = Jd[a], x = Y("tab");
12621
+ }, v = n.toArray(e).filter((e) => t.isValidElement(e) && e.type === Jd), y = p(() => Wd(a), [a]), b = qd[a], x = Y("tab");
12606
12622
  return /* @__PURE__ */ t.createElement(Z, { className: X(x.Tab.wrapperClassName, u) }, c, /* @__PURE__ */ t.createElement("div", { className: X("min-w-0", x.Tab.className, d) }, /* @__PURE__ */ t.createElement(b, {
12607
12623
  menuClassName: o,
12608
12624
  contentClassName: s,
@@ -12614,9 +12630,9 @@ var Jd = {
12614
12630
  role: "tab",
12615
12631
  "aria-selected": n === m,
12616
12632
  onClick: () => _(n),
12617
- className: Kd(a, n === m)
12633
+ className: Gd(a, n === m)
12618
12634
  }, e.props.label))),
12619
- content: /* @__PURE__ */ t.createElement(Xd, {
12635
+ content: /* @__PURE__ */ t.createElement(Yd, {
12620
12636
  key: m,
12621
12637
  motion: f
12622
12638
  }, v[m]?.props?.children)
@@ -12624,7 +12640,7 @@ var Jd = {
12624
12640
  };
12625
12641
  //#endregion
12626
12642
  //#region src/components/ui/useRecordSelection.ts
12627
- function Qd({ records: e, selectedKeys: t, onSelectionChange: n, getRecordKey: r }) {
12643
+ function Zd({ records: e, selectedKeys: t, onSelectionChange: n, getRecordKey: r }) {
12628
12644
  let i = t, a = i !== void 0 && !!n, [o, c] = h(i ?? []);
12629
12645
  l(() => {
12630
12646
  i !== void 0 && !a && c(i);
@@ -12666,7 +12682,7 @@ function Qd({ records: e, selectedKeys: t, onSelectionChange: n, getRecordKey: r
12666
12682
  }
12667
12683
  //#endregion
12668
12684
  //#region src/components/ui/useStableRecordKey.ts
12669
- function $d(e, t) {
12685
+ function Qd(e, t) {
12670
12686
  let n = m(/* @__PURE__ */ new WeakMap()), r = m(0);
12671
12687
  return s((i, a) => {
12672
12688
  if (t != null) {
@@ -12682,7 +12698,7 @@ function $d(e, t) {
12682
12698
  }
12683
12699
  //#endregion
12684
12700
  //#region src/components/ui/Table.tsx
12685
- function ef({ columns: e = void 0, records: n = void 0, footer: r = void 0, onRowClick: i = void 0, onReorder: a = void 0, onSelectionChange: o = void 0, selection: c = "multiple", sortable: d = !1, pagination: f = void 0, activeKey: g = void 0, selectedKeys: _ = void 0, groupBy: v = void 0, recordId: y = void 0, before: b = void 0, after: x = void 0, wrapperClassName: S = void 0, className: C = void 0, headerClassName: w = void 0, bodyClassName: T = void 0, footerClassName: A = void 0, heightClassName: j = void 0, scrollClassName: M = void 0, selectedClassName: N = void 0, renderCell: P = void 0 }) {
12701
+ function $d({ columns: e = void 0, records: n = void 0, footer: r = void 0, onRowClick: i = void 0, onReorder: a = void 0, onSelectionChange: o = void 0, selection: c = "multiple", sortable: d = !1, pagination: f = void 0, activeKey: g = void 0, selectedKeys: _ = void 0, groupBy: v = void 0, recordId: y = void 0, before: b = void 0, after: x = void 0, wrapperClassName: S = void 0, className: C = void 0, headerClassName: w = void 0, bodyClassName: T = void 0, footerClassName: A = void 0, heightClassName: j = void 0, scrollClassName: M = void 0, selectedClassName: N = void 0, renderCell: P = void 0 }) {
12686
12702
  let F = Y("table"), I = Fn("table"), L = N || F.Table.selectedClassName, [R, z] = h(n || []), B = p(() => {
12687
12703
  if (!(!d || typeof d == "boolean")) return d;
12688
12704
  }, [typeof d == "object" ? d?.dir : void 0, typeof d == "object" ? d?.field : void 0]), V = d !== !1, [H, U] = h(B), [W, ee] = h(null), [G, te] = h(null), [ne, re] = h(null), [K, ie] = h(null), [ae, oe] = h(null), se = m(!1), ce = s((e) => {
@@ -12695,7 +12711,7 @@ function ef({ columns: e = void 0, records: n = void 0, footer: r = void 0, onRo
12695
12711
  }, [pe?.field, pe?.dir]), l(() => {
12696
12712
  !fe || se.current || (console.warn("Table: `onReorder` cannot be combined with sortable sorting on the same view. Manual reorder takes precedence and sorting is ignored."), se.current = !0);
12697
12713
  }, [fe]);
12698
- let me = $d("row", y), he = s((e, t) => me(e, t), [me]), { activeSelectedKeys: ge, selectionState: _e, showSelection: ve, updateSelection: ye } = Qd({
12714
+ let me = Qd("row", y), he = s((e, t) => me(e, t), [me]), { activeSelectedKeys: ge, selectionState: _e, showSelection: ve, updateSelection: ye } = Zd({
12699
12715
  records: R,
12700
12716
  selectedKeys: _,
12701
12717
  onSelectionChange: o,
@@ -12847,7 +12863,7 @@ function ef({ columns: e = void 0, records: n = void 0, footer: r = void 0, onRo
12847
12863
  width: "1%",
12848
12864
  whiteSpace: "nowrap"
12849
12865
  }
12850
- }))), Ne = /* @__PURE__ */ t.createElement(Kp, {
12866
+ }))), Ne = /* @__PURE__ */ t.createElement(Gp, {
12851
12867
  records: be,
12852
12868
  appendTo: W,
12853
12869
  wrapperClassName: "px-3 pt-4 pb-2",
@@ -12948,36 +12964,36 @@ function ef({ columns: e = void 0, records: n = void 0, footer: r = void 0, onRo
12948
12964
  }
12949
12965
  //#endregion
12950
12966
  //#region src/components/ui/LayoutBuilder.tsx
12951
- var tf = 12, nf = 12, rf = (e, t, n) => Math.max(t, Math.min(n, e)), af = (e) => {
12967
+ var ef = 12, tf = 12, nf = (e, t, n) => Math.max(t, Math.min(n, e)), rf = (e) => {
12952
12968
  if (!e) return "";
12953
12969
  let t = e.trim().replace(/^\{/, "").replace(/\}$/, "").trim(), n = t.split(".");
12954
12970
  return (n[n.length - 1] || t).trim();
12955
- }, of = (e, t) => {
12956
- let n = e - t.left, r = t.width / tf;
12957
- return rf(Math.floor(n / r), 0, tf - 1);
12958
- }, sf = () => `${Date.now()}_${Math.random().toString(16).slice(2)}`, cf = (e, t, n) => {
12971
+ }, af = (e, t) => {
12972
+ let n = e - t.left, r = t.width / ef;
12973
+ return nf(Math.floor(n / r), 0, ef - 1);
12974
+ }, of = () => `${Date.now()}_${Math.random().toString(16).slice(2)}`, sf = (e, t, n) => {
12959
12975
  let r = (e) => {
12960
12976
  let r = e + t;
12961
- return r > tf ? !1 : !n.some((t) => {
12977
+ return r > ef ? !1 : !n.some((t) => {
12962
12978
  let n = e, i = r, a = t.colStart;
12963
12979
  return n < t.colStart + t.colSpan && a < i;
12964
12980
  });
12965
12981
  };
12966
- for (let n = e; n <= tf - t; n++) if (r(n)) return n;
12967
- for (let e = 0; e <= tf - t; e++) if (r(e)) return e;
12982
+ for (let n = e; n <= ef - t; n++) if (r(n)) return n;
12983
+ for (let e = 0; e <= ef - t; e++) if (r(e)) return e;
12968
12984
  return null;
12969
- }, lf = (e, t, n) => {
12985
+ }, cf = (e, t, n) => {
12970
12986
  let r = e.find((e) => e.id === t);
12971
12987
  if (!r) return e;
12972
- let i = e.filter((e) => e.id !== t), a = cf(rf(n, 0, tf - r.colSpan), r.colSpan, i);
12988
+ let i = e.filter((e) => e.id !== t), a = sf(nf(n, 0, ef - r.colSpan), r.colSpan, i);
12973
12989
  return a === null ? e : e.map((e) => e.id === t ? {
12974
12990
  ...e,
12975
12991
  colStart: a
12976
12992
  } : e);
12977
- }, uf = (e, t, n) => {
12993
+ }, lf = (e, t, n) => {
12978
12994
  let r = e.find((e) => e.id === t);
12979
12995
  if (!r) return e;
12980
- let i = e.filter((e) => e.id !== t), a = rf(n, 1, tf - r.colStart), o = (e) => {
12996
+ let i = e.filter((e) => e.id !== t), a = nf(n, 1, ef - r.colStart), o = (e) => {
12981
12997
  let t = r.colStart, n = r.colStart + e;
12982
12998
  return i.some((e) => {
12983
12999
  let r = e.colStart, i = e.colStart + e.colSpan;
@@ -12989,7 +13005,7 @@ var tf = 12, nf = 12, rf = (e, t, n) => Math.max(t, Math.min(n, e)), af = (e) =>
12989
13005
  ...e,
12990
13006
  colSpan: a
12991
13007
  } : e);
12992
- }, df = (e, t, n) => {
13008
+ }, uf = (e, t, n) => {
12993
13009
  if (n <= 0) return null;
12994
13010
  let r = e.map((e) => {
12995
13011
  let n = e.colStart + e.colSpan / 2;
@@ -13001,7 +13017,7 @@ var tf = 12, nf = 12, rf = (e, t, n) => Math.max(t, Math.min(n, e)), af = (e) =>
13001
13017
  for (let t of r) {
13002
13018
  if (t.colSpan - 1 < n) continue;
13003
13019
  let r = t.colSpan - n, i = t.colStart + r;
13004
- if (!(i < 0 || i + n > tf)) return {
13020
+ if (!(i < 0 || i + n > ef)) return {
13005
13021
  nextItems: e.map((e) => e.id === t.id ? {
13006
13022
  ...e,
13007
13023
  colSpan: r
@@ -13010,7 +13026,7 @@ var tf = 12, nf = 12, rf = (e, t, n) => Math.max(t, Math.min(n, e)), af = (e) =>
13010
13026
  };
13011
13027
  }
13012
13028
  return null;
13013
- }, ff = o(({ name: e, defaultSpan: n = 1, heightPx: r = 100 }, i) => {
13029
+ }, df = o(({ name: e, defaultSpan: n = 1, heightPx: r = 100 }, i) => {
13014
13030
  let a = m(null), o = Fn("layout"), { value: s, handleChange: c } = Dd({
13015
13031
  name: e,
13016
13032
  defaultValue: []
@@ -13030,39 +13046,39 @@ var tf = 12, nf = 12, rf = (e, t, n) => Math.max(t, Math.min(n, e)), af = (e) =>
13030
13046
  setValue: (e) => f(e),
13031
13047
  clear: () => f([])
13032
13048
  }));
13033
- let w = p(() => Array.from({ length: tf }, (e, t) => t), []), T = (e) => {
13049
+ let w = p(() => Array.from({ length: ef }, (e, t) => t), []), T = (e) => {
13034
13050
  e.preventDefault();
13035
13051
  }, E = (e) => {
13036
13052
  if (e.preventDefault(), e.dataTransfer.getData("application/x-layoutbuilder-internal")) {
13037
13053
  _(null);
13038
13054
  return;
13039
13055
  }
13040
- if (u.length >= nf) {
13056
+ if (u.length >= tf) {
13041
13057
  C(o.maxElements);
13042
13058
  return;
13043
13059
  }
13044
13060
  let t = a.current;
13045
13061
  if (!t) return;
13046
- let r = t.getBoundingClientRect(), i = of(e.clientX, r), s = af(e.dataTransfer.getData("text/plain") || e.dataTransfer.getData("label") || "") || "unknown", c = rf(n, 1, tf), l = cf(rf(i, 0, tf - c), c, u);
13062
+ let r = t.getBoundingClientRect(), i = af(e.clientX, r), s = rf(e.dataTransfer.getData("text/plain") || e.dataTransfer.getData("label") || "") || "unknown", c = nf(n, 1, ef), l = sf(nf(i, 0, ef - c), c, u);
13047
13063
  if (l !== null) {
13048
13064
  f((e) => [...e, {
13049
- id: sf(),
13065
+ id: of(),
13050
13066
  fieldName: s,
13051
13067
  colStart: l,
13052
13068
  colSpan: c
13053
13069
  }]);
13054
13070
  return;
13055
13071
  }
13056
- if (!df(u, i, c)) {
13072
+ if (!uf(u, i, c)) {
13057
13073
  C(o.noSpace);
13058
13074
  return;
13059
13075
  }
13060
13076
  f((e) => {
13061
- if (e.length >= nf) return C(o.maxElements), e;
13062
- let t = df(e, i, c);
13077
+ if (e.length >= tf) return C(o.maxElements), e;
13078
+ let t = uf(e, i, c);
13063
13079
  if (!t) return C(o.noSpace), e;
13064
13080
  let n = {
13065
- id: sf(),
13081
+ id: of(),
13066
13082
  fieldName: s,
13067
13083
  colStart: t.insertCol,
13068
13084
  colSpan: c
@@ -13075,8 +13091,8 @@ var tf = 12, nf = 12, rf = (e, t, n) => Math.max(t, Math.min(n, e)), af = (e) =>
13075
13091
  if (e.preventDefault(), !g) return;
13076
13092
  let t = a.current;
13077
13093
  if (!t) return;
13078
- let n = t.getBoundingClientRect(), r = of(e.clientX, n);
13079
- f((e) => lf(e, g, r));
13094
+ let n = t.getBoundingClientRect(), r = af(e.clientX, n);
13095
+ f((e) => cf(e, g, r));
13080
13096
  }, k = () => _(null), A = (e) => (t) => {
13081
13097
  t.stopPropagation(), t.preventDefault();
13082
13098
  let n = u.find((t) => t.id === e);
@@ -13089,8 +13105,8 @@ var tf = 12, nf = 12, rf = (e, t, n) => Math.max(t, Math.min(n, e)), af = (e) =>
13089
13105
  if (!v) return;
13090
13106
  let t = a.current;
13091
13107
  if (!t) return;
13092
- let n = t.getBoundingClientRect().width / tf, r = e.clientX - v.startClientX, i = Math.round(r / n), o = v.startSpan + i;
13093
- f((e) => uf(e, v.id, o));
13108
+ let n = t.getBoundingClientRect().width / ef, r = e.clientX - v.startClientX, i = Math.round(r / n), o = v.startSpan + i;
13109
+ f((e) => lf(e, v.id, o));
13094
13110
  }, M = () => {
13095
13111
  v && y(null);
13096
13112
  }, N = (e) => f((t) => t.filter((t) => t.id !== e));
@@ -13127,7 +13143,7 @@ var tf = 12, nf = 12, rf = (e, t, n) => Math.max(t, Math.min(n, e)), af = (e) =>
13127
13143
  position: "absolute",
13128
13144
  top: 0,
13129
13145
  bottom: 0,
13130
- left: `${e / tf * 100}%`,
13146
+ left: `${e / ef * 100}%`,
13131
13147
  width: 1,
13132
13148
  background: "rgba(255, 255, 255, 0.06)",
13133
13149
  pointerEvents: "none"
@@ -13140,8 +13156,8 @@ var tf = 12, nf = 12, rf = (e, t, n) => Math.max(t, Math.min(n, e)), af = (e) =>
13140
13156
  position: "absolute",
13141
13157
  top: 12,
13142
13158
  bottom: 12,
13143
- left: `${e.colStart / tf * 100}%`,
13144
- width: `${e.colSpan / tf * 100}%`,
13159
+ left: `${e.colStart / ef * 100}%`,
13160
+ width: `${e.colSpan / ef * 100}%`,
13145
13161
  padding: 10,
13146
13162
  borderRadius: 12,
13147
13163
  border: "1px solid rgba(255, 255, 255, 0.18)",
@@ -13193,25 +13209,25 @@ var tf = 12, nf = 12, rf = (e, t, n) => Math.max(t, Math.min(n, e)), af = (e) =>
13193
13209
  justifyContent: "center",
13194
13210
  pointerEvents: "none"
13195
13211
  } }, o.dragHere)));
13196
- }), pf = a(void 0);
13197
- function mf({ config: e, children: n }) {
13198
- return /* @__PURE__ */ t.createElement(pf.Provider, { value: e }, n);
13212
+ }), ff = a(void 0);
13213
+ function pf({ config: e, children: n }) {
13214
+ return /* @__PURE__ */ t.createElement(ff.Provider, { value: e }, n);
13199
13215
  }
13200
- function hf() {
13201
- return c(pf);
13216
+ function mf() {
13217
+ return c(ff);
13202
13218
  }
13203
13219
  //#endregion
13204
13220
  //#region src/providers/googleMaps/loadGoogleMaps.ts
13205
- var gf, _f;
13206
- function vf(e) {
13221
+ var hf, gf;
13222
+ function _f(e) {
13207
13223
  if (typeof window > "u") return Promise.reject(/* @__PURE__ */ Error("loadGoogleMaps can only run in the browser"));
13208
13224
  if (!e.apiKey) return Promise.reject(/* @__PURE__ */ Error("GoogleMapsConfig.apiKey is required"));
13209
- if (_f !== void 0 && _f !== e.apiKey) return Promise.reject(/* @__PURE__ */ Error("loadGoogleMaps was already initialized with a different apiKey"));
13225
+ if (gf !== void 0 && gf !== e.apiKey) return Promise.reject(/* @__PURE__ */ Error("loadGoogleMaps was already initialized with a different apiKey"));
13210
13226
  if (window.google?.maps?.places) return Promise.resolve(window.google);
13211
- if (gf) return gf;
13212
- _f = e.apiKey;
13227
+ if (hf) return hf;
13228
+ gf = e.apiKey;
13213
13229
  let t = `__googleMapsLoader_${Math.random().toString(36).slice(2)}`;
13214
- return gf = new Promise((n, r) => {
13230
+ return hf = new Promise((n, r) => {
13215
13231
  window[t] = () => {
13216
13232
  delete window[t], window.google?.maps?.places ? n(window.google) : r(/* @__PURE__ */ Error("Google Maps script loaded but the places library is unavailable"));
13217
13233
  };
@@ -13224,54 +13240,54 @@ function vf(e) {
13224
13240
  ...e.language ? { language: e.language } : {},
13225
13241
  ...e.region ? { region: e.region } : {}
13226
13242
  }).toString()}`, i.async = !0, i.onerror = () => r(/* @__PURE__ */ Error("Failed to load the Google Maps script")), document.head.appendChild(i);
13227
- }), gf;
13243
+ }), hf;
13228
13244
  }
13229
13245
  //#endregion
13230
13246
  //#region src/components/ui/fields/AddressAutocomplete.tsx
13231
- var yf = {
13247
+ var vf = {
13232
13248
  lat: 41.8719,
13233
13249
  lng: 12.5674
13234
- }, bf = 5;
13235
- function xf(e) {
13250
+ }, yf = 5;
13251
+ function bf(e) {
13236
13252
  return (e ?? []).map((e) => ({
13237
13253
  longText: e.longText ?? "",
13238
13254
  shortText: e.shortText ?? e.longText ?? "",
13239
13255
  types: e.types
13240
13256
  }));
13241
13257
  }
13242
- function Sf(e) {
13258
+ function xf(e) {
13243
13259
  return e.map((e) => ({
13244
13260
  longText: e.long_name,
13245
13261
  shortText: e.short_name,
13246
13262
  types: e.types
13247
13263
  }));
13248
13264
  }
13249
- function Cf(e, t, n = !0) {
13265
+ function Sf(e, t, n = !0) {
13250
13266
  let r = e.find((e) => e.types.includes(t));
13251
13267
  if (r) return (n ? r.longText : r.shortText) || void 0;
13252
13268
  }
13253
- function wf(e, t, n, r) {
13254
- let i = Cf(e, "street_number"), a = Cf(e, "route");
13269
+ function Cf(e, t, n, r) {
13270
+ let i = Sf(e, "street_number"), a = Sf(e, "route");
13255
13271
  return {
13256
13272
  street: [a, i].filter(Boolean).join(", ") || a || void 0,
13257
- city: Cf(e, "locality") ?? Cf(e, "postal_town") ?? Cf(e, "sublocality"),
13258
- state: Cf(e, "administrative_area_level_2", !1) ?? Cf(e, "administrative_area_level_1", !1),
13259
- zip: Cf(e, "postal_code"),
13260
- country: Cf(e, "country"),
13261
- countryCode: Cf(e, "country", !1),
13273
+ city: Sf(e, "locality") ?? Sf(e, "postal_town") ?? Sf(e, "sublocality"),
13274
+ state: Sf(e, "administrative_area_level_2", !1) ?? Sf(e, "administrative_area_level_1", !1),
13275
+ zip: Sf(e, "postal_code"),
13276
+ country: Sf(e, "country"),
13277
+ countryCode: Sf(e, "country", !1),
13262
13278
  lat: t,
13263
13279
  lng: n,
13264
13280
  formatted: r
13265
13281
  };
13266
13282
  }
13267
- function Tf(e) {
13268
- return wf(xf(e.addressComponents), e.location?.lat(), e.location?.lng(), e.formattedAddress ?? void 0);
13283
+ function wf(e) {
13284
+ return Cf(bf(e.addressComponents), e.location?.lat(), e.location?.lng(), e.formattedAddress ?? void 0);
13269
13285
  }
13270
- function Ef(e) {
13271
- return wf(Sf(e.address_components), e.geometry.location.lat(), e.geometry.location.lng(), e.formatted_address);
13286
+ function Tf(e) {
13287
+ return Cf(xf(e.address_components), e.geometry.location.lat(), e.geometry.location.lng(), e.formatted_address);
13272
13288
  }
13273
- var Df = ({ name: e, label: n = void 0, required: r = !1, placeholder: i = void 0, disabled: a = !1, feedback: o = void 0, countries: s = void 0, language: c = void 0, region: d = void 0, validator: f = void 0, onSelect: p = void 0, fieldNames: g = void 0, map: _ = !1, id: v = void 0, labelClassName: y = void 0, inheritWrapperClassName: b = !0, wrapperClassName: x = void 0, className: S = void 0, menuClassName: C = void 0, itemClassName: w = void 0, mapClassName: T = void 0 }) => {
13274
- let E = Fn("addressAutocomplete"), D = Y("addressAutocomplete"), O = hf(), k = {
13289
+ var Ef = ({ name: e, label: n = void 0, required: r = !1, placeholder: i = void 0, disabled: a = !1, feedback: o = void 0, countries: s = void 0, language: c = void 0, region: d = void 0, validator: f = void 0, onSelect: p = void 0, fieldNames: g = void 0, map: _ = !1, id: v = void 0, labelClassName: y = void 0, inheritWrapperClassName: b = !0, wrapperClassName: x = void 0, className: S = void 0, menuClassName: C = void 0, itemClassName: w = void 0, mapClassName: T = void 0 }) => {
13290
+ let E = Fn("addressAutocomplete"), D = Y("addressAutocomplete"), O = mf(), k = {
13275
13291
  street: g?.street ?? `${e}.street`,
13276
13292
  city: g?.city ?? `${e}.city`,
13277
13293
  state: g?.state ?? `${e}.state`,
@@ -13310,7 +13326,7 @@ var Df = ({ name: e, label: n = void 0, required: r = !1, placeholder: i = void
13310
13326
  let n = window.setTimeout(() => {
13311
13327
  (async () => {
13312
13328
  try {
13313
- let n = await vf({
13329
+ let n = await _f({
13314
13330
  apiKey: O.apiKey,
13315
13331
  language: c ?? O.language,
13316
13332
  region: d ?? O.region
@@ -13390,7 +13406,7 @@ var Df = ({ name: e, label: n = void 0, required: r = !1, placeholder: i = void
13390
13406
  if (!_e.current) return;
13391
13407
  let t = (await _e.current.geocode({ location: e })).results[0];
13392
13408
  if (!t) return;
13393
- ye(Ef(t)), ue(null);
13409
+ ye(Tf(t)), ue(null);
13394
13410
  } catch (e) {
13395
13411
  ue(e instanceof Error ? e.message : E.loadError);
13396
13412
  }
@@ -13412,7 +13428,7 @@ var Df = ({ name: e, label: n = void 0, required: r = !1, placeholder: i = void
13412
13428
  let t = e.join(", "), n = window.setTimeout(() => {
13413
13429
  (async () => {
13414
13430
  try {
13415
- let e = await vf({
13431
+ let e = await _f({
13416
13432
  apiKey: O.apiKey,
13417
13433
  language: c ?? O.language,
13418
13434
  region: d ?? O.region
@@ -13423,7 +13439,7 @@ var Df = ({ name: e, label: n = void 0, required: r = !1, placeholder: i = void
13423
13439
  region: d ?? O.region
13424
13440
  })).results[0];
13425
13441
  if (!n) return;
13426
- let r = Ef(n), i = r.formatted ?? t;
13442
+ let r = Tf(n), i = r.formatted ?? t;
13427
13443
  if (re(i), A.handleChange({ target: {
13428
13444
  name: k.formatted,
13429
13445
  value: i
@@ -13454,7 +13470,7 @@ var Df = ({ name: e, label: n = void 0, required: r = !1, placeholder: i = void
13454
13470
  ]), l(() => {
13455
13471
  if (!W || !O || !pe.current || he.current) return;
13456
13472
  let e = !1;
13457
- return vf({
13473
+ return _f({
13458
13474
  apiKey: O.apiKey,
13459
13475
  language: c ?? O.language,
13460
13476
  region: d ?? O.region
@@ -13464,7 +13480,7 @@ var Df = ({ name: e, label: n = void 0, required: r = !1, placeholder: i = void
13464
13480
  let n = typeof L.value == "number" && typeof R.value == "number", r = n ? {
13465
13481
  lat: L.value,
13466
13482
  lng: R.value
13467
- } : yf, i = typeof z.value == "number" ? z.value : n ? G : bf, a = new t.maps.Map(pe.current, {
13483
+ } : vf, i = typeof z.value == "number" ? z.value : n ? G : yf, a = new t.maps.Map(pe.current, {
13468
13484
  center: r,
13469
13485
  zoom: i,
13470
13486
  streetViewControl: !1,
@@ -13499,7 +13515,7 @@ var Df = ({ name: e, label: n = void 0, required: r = !1, placeholder: i = void
13499
13515
  "location",
13500
13516
  "formattedAddress"
13501
13517
  ] });
13502
- let n = Tf(t);
13518
+ let n = wf(t);
13503
13519
  ye(n, W ? G : void 0);
13504
13520
  let r = me.current;
13505
13521
  if (W && r && he.current && n.lat !== void 0 && n.lng !== void 0) {
@@ -13568,7 +13584,7 @@ var Df = ({ name: e, label: n = void 0, required: r = !1, placeholder: i = void
13568
13584
  size: 14,
13569
13585
  className: "mt-0.5 shrink-0 text-muted-foreground"
13570
13586
  }), /* @__PURE__ */ t.createElement("span", { className: "min-w-0 truncate" }, e.text))))), ee === "below" && we, B ? /* @__PURE__ */ t.createElement(hs, { message: B }) : o && /* @__PURE__ */ t.createElement("div", { className: "mt-1 text-xs text-muted-foreground" }, o));
13571
- }, Of = ({ name: e, onDataLoaded: n, onClear: r = void 0, onParseField: i = void 0, label: a = void 0, icon: o = "upload", delimiter: s = void 0, normalizeKeys: c = !1, removeEmptyFields: l = !1, required: u = !1, before: d = void 0, after: f = void 0, wrapperClassName: p = void 0, className: g = void 0 }) => {
13587
+ }, Df = ({ name: e, onDataLoaded: n, onClear: r = void 0, onParseField: i = void 0, label: a = void 0, icon: o = "upload", delimiter: s = void 0, normalizeKeys: c = !1, removeEmptyFields: l = !1, required: u = !1, before: d = void 0, after: f = void 0, wrapperClassName: p = void 0, className: g = void 0 }) => {
13572
13588
  let _ = Fn("upload"), [v, y] = h(null), [b, x] = h(!1), [S, C] = h(null), w = m(null), T = ([e, t]) => {
13573
13589
  if (![
13574
13590
  "",
@@ -13653,14 +13669,14 @@ var Df = ({ name: e, label: n = void 0, required: r = !1, placeholder: i = void
13653
13669
  };
13654
13670
  //#endregion
13655
13671
  //#region src/components/blocks/ListCard.tsx
13656
- function kf(e) {
13672
+ function Of(e) {
13657
13673
  return e ? typeof e == "string" ? /* @__PURE__ */ t.createElement(Q, {
13658
13674
  name: e,
13659
13675
  size: 16
13660
13676
  }) : e : null;
13661
13677
  }
13662
- function Af({ title: e = void 0, description: n = void 0, meta: r = void 0, badge: i = void 0, icon: a = void 0, trailing: o = void 0, footer: s = void 0, children: c = void 0, href: l = void 0, external: u = !1, active: d = !1, disabled: f = !1, dashed: p = !1, compact: m = !1, align: h = "start", onClick: g = void 0, before: _ = void 0, after: y = void 0, wrapperClassName: b = void 0, className: x = void 0, titleClassName: S = void 0, descriptionClassName: C = void 0, metaClassName: w = void 0, badgeClassName: T = void 0, leadingClassName: E = void 0, bodyClassName: D = void 0, headerClassName: O = void 0, trailingClassName: k = void 0, footerClassName: A = void 0, style: j = void 0, motion: M = void 0 }) {
13663
- let N = Y("listCard"), P = !!l || !!g, F = sr(f || !P, j, M ?? N.ListCard.motion?.press ?? "press"), I = kf(a), L = s ?? c, R = X("flex w-full gap-3 rounded-xl border border-border/60 bg-background p-4 text-left transition-[background-color,border-color,box-shadow,color] duration-150", h === "center" ? "items-center" : "items-start", P && !f && "cursor-pointer", N.ListCard.className, d ? N.ListCard.activeClassName : N.ListCard.inactiveClassName, f && N.ListCard.disabledClassName, p && N.ListCard.dashedClassName, m && N.ListCard.compactClassName, x), z = /* @__PURE__ */ t.createElement(t.Fragment, null, I ? /* @__PURE__ */ t.createElement("div", { className: X("mt-0.5 flex h-10 w-10 shrink-0 items-center justify-center rounded-lg bg-primary/10 text-primary", h === "center" && "mt-0", N.ListCard.leadingClassName, E) }, I) : null, /* @__PURE__ */ t.createElement("div", { className: X("min-w-0 flex-1", N.ListCard.bodyClassName, D) }, e || i ? /* @__PURE__ */ t.createElement("div", { className: X("flex items-center gap-2", N.ListCard.headerClassName, O) }, e ? /* @__PURE__ */ t.createElement("div", { className: X("min-w-0 flex-1 truncate text-sm font-semibold text-foreground", N.ListCard.titleClassName, S) }, e) : /* @__PURE__ */ t.createElement("div", { className: "flex-1" }), i ? /* @__PURE__ */ t.createElement("div", { className: X("shrink-0", N.ListCard.badgeClassName, T) }, i) : null) : null, n ? /* @__PURE__ */ t.createElement("div", { className: X("mt-1 text-sm text-muted-foreground", N.ListCard.descriptionClassName, C) }, n) : null, r ? /* @__PURE__ */ t.createElement("div", { className: X("mt-1 text-xs text-muted-foreground", N.ListCard.metaClassName, w) }, r) : null, L ? /* @__PURE__ */ t.createElement("div", { className: X("mt-3", N.ListCard.footerClassName, A) }, L) : null), o ? /* @__PURE__ */ t.createElement("div", { className: X("shrink-0 self-center", N.ListCard.trailingClassName, k) }, o) : null), B = (e) => {
13678
+ function kf({ title: e = void 0, description: n = void 0, meta: r = void 0, badge: i = void 0, icon: a = void 0, trailing: o = void 0, footer: s = void 0, children: c = void 0, href: l = void 0, external: u = !1, active: d = !1, disabled: f = !1, dashed: p = !1, compact: m = !1, align: h = "start", onClick: g = void 0, before: _ = void 0, after: y = void 0, wrapperClassName: b = void 0, className: x = void 0, titleClassName: S = void 0, descriptionClassName: C = void 0, metaClassName: w = void 0, badgeClassName: T = void 0, leadingClassName: E = void 0, bodyClassName: D = void 0, headerClassName: O = void 0, trailingClassName: k = void 0, footerClassName: A = void 0, style: j = void 0, motion: M = void 0 }) {
13679
+ let N = Y("listCard"), P = !!l || !!g, F = sr(f || !P, j, M ?? N.ListCard.motion?.press ?? "press"), I = Of(a), L = s ?? c, R = X("flex w-full gap-3 rounded-xl border border-border/60 bg-background p-4 text-left transition-[background-color,border-color,box-shadow,color] duration-150", h === "center" ? "items-center" : "items-start", P && !f && "cursor-pointer", N.ListCard.className, d ? N.ListCard.activeClassName : N.ListCard.inactiveClassName, f && N.ListCard.disabledClassName, p && N.ListCard.dashedClassName, m && N.ListCard.compactClassName, x), z = /* @__PURE__ */ t.createElement(t.Fragment, null, I ? /* @__PURE__ */ t.createElement("div", { className: X("mt-0.5 flex h-10 w-10 shrink-0 items-center justify-center rounded-lg bg-primary/10 text-primary", h === "center" && "mt-0", N.ListCard.leadingClassName, E) }, I) : null, /* @__PURE__ */ t.createElement("div", { className: X("min-w-0 flex-1", N.ListCard.bodyClassName, D) }, e || i ? /* @__PURE__ */ t.createElement("div", { className: X("flex items-center gap-2", N.ListCard.headerClassName, O) }, e ? /* @__PURE__ */ t.createElement("div", { className: X("min-w-0 flex-1 truncate text-sm font-semibold text-foreground", N.ListCard.titleClassName, S) }, e) : /* @__PURE__ */ t.createElement("div", { className: "flex-1" }), i ? /* @__PURE__ */ t.createElement("div", { className: X("shrink-0", N.ListCard.badgeClassName, T) }, i) : null) : null, n ? /* @__PURE__ */ t.createElement("div", { className: X("mt-1 text-sm text-muted-foreground", N.ListCard.descriptionClassName, C) }, n) : null, r ? /* @__PURE__ */ t.createElement("div", { className: X("mt-1 text-xs text-muted-foreground", N.ListCard.metaClassName, w) }, r) : null, L ? /* @__PURE__ */ t.createElement("div", { className: X("mt-3", N.ListCard.footerClassName, A) }, L) : null), o ? /* @__PURE__ */ t.createElement("div", { className: X("shrink-0 self-center", N.ListCard.trailingClassName, k) }, o) : null), B = (e) => {
13664
13680
  if (f) {
13665
13681
  e.preventDefault(), e.stopPropagation();
13666
13682
  return;
@@ -13696,8 +13712,8 @@ function Af({ title: e = void 0, description: n = void 0, meta: r = void 0, badg
13696
13712
  }
13697
13713
  //#endregion
13698
13714
  //#region src/components/blocks/SideNav.tsx
13699
- var jf = 208, Mf = 52;
13700
- function Nf(e) {
13715
+ var Af = 208, jf = 52;
13716
+ function Mf(e) {
13701
13717
  return e.map((e) => ({
13702
13718
  path: e.path,
13703
13719
  title: e.title,
@@ -13705,13 +13721,13 @@ function Nf(e) {
13705
13721
  group: e.group,
13706
13722
  end: e.end,
13707
13723
  badge: e.badge,
13708
- children: e.children ? Nf(e.children) : void 0
13724
+ children: e.children ? Mf(e.children) : void 0
13709
13725
  }));
13710
13726
  }
13711
- function Pf(e, t, n) {
13727
+ function Nf(e, t, n) {
13712
13728
  return n ? e === t : e === t || t !== "/" && e.startsWith(t + "/");
13713
13729
  }
13714
- function Ff(e) {
13730
+ function Pf(e) {
13715
13731
  let t = /* @__PURE__ */ new Map();
13716
13732
  for (let n of e) {
13717
13733
  let e = n.group ?? "General";
@@ -13722,27 +13738,27 @@ function Ff(e) {
13722
13738
  items: t
13723
13739
  }));
13724
13740
  }
13725
- function If({ value: e }) {
13741
+ function Ff({ value: e }) {
13726
13742
  let n = Y("sideNav");
13727
13743
  return /* @__PURE__ */ t.createElement("span", { className: X("ml-auto shrink-0 text-[10px] font-semibold leading-none px-1.5 py-[3px] rounded-full bg-primary/15 text-primary", n.SideNav.itemBadgeClassName) }, e);
13728
13744
  }
13729
- function Lf({ children: e, open: n }) {
13745
+ function If({ children: e, open: n }) {
13730
13746
  let { pathname: r } = x(), i = Y("sideNav");
13731
13747
  return /* @__PURE__ */ t.createElement("div", { style: {
13732
13748
  maxHeight: n ? `${e.length * 34 + 8}px` : "0px",
13733
13749
  overflow: "hidden",
13734
13750
  transition: "max-height 200ms ease"
13735
13751
  } }, /* @__PURE__ */ t.createElement("div", { className: "py-0.5 space-y-0.5" }, e.map((e) => {
13736
- let n = Pf(r, e.path, e.end);
13752
+ let n = Nf(r, e.path, e.end);
13737
13753
  return /* @__PURE__ */ t.createElement(v, {
13738
13754
  key: e.path,
13739
13755
  to: e.path,
13740
13756
  className: X("flex items-center rounded-md pl-9 pr-3 py-[6px] text-sm transition-colors", i.SideNav.subItemClassName, n ? i.SideNav.subItemActiveClassName : i.SideNav.subItemInactiveClassName)
13741
- }, /* @__PURE__ */ t.createElement("span", { className: "flex-1 truncate" }, e.title), e.badge !== void 0 && /* @__PURE__ */ t.createElement(If, { value: e.badge }));
13757
+ }, /* @__PURE__ */ t.createElement("span", { className: "flex-1 truncate" }, e.title), e.badge !== void 0 && /* @__PURE__ */ t.createElement(Ff, { value: e.badge }));
13742
13758
  })));
13743
13759
  }
13744
- function Rf({ item: e, expanded: n, open: r, showIcons: i, onToggle: a }) {
13745
- let { pathname: o } = x(), s = Y("sideNav"), c = (e.children?.length ?? 0) > 0, l = Pf(o, e.path, e.end), u = c && e.children.some((e) => Pf(o, e.path, e.end)), d = l ? s.SideNav.itemActiveClassName : u ? s.SideNav.itemChildActiveClassName : s.SideNav.itemInactiveClassName, f = i ? /* @__PURE__ */ t.createElement("span", { className: X("relative shrink-0 flex items-center justify-center w-[18px] h-[18px]", s.SideNav.itemIconClassName) }, e.icon ? /* @__PURE__ */ t.createElement(Q, {
13760
+ function Lf({ item: e, expanded: n, open: r, showIcons: i, onToggle: a }) {
13761
+ let { pathname: o } = x(), s = Y("sideNav"), c = (e.children?.length ?? 0) > 0, l = Nf(o, e.path, e.end), u = c && e.children.some((e) => Nf(o, e.path, e.end)), d = l ? s.SideNav.itemActiveClassName : u ? s.SideNav.itemChildActiveClassName : s.SideNav.itemInactiveClassName, f = i ? /* @__PURE__ */ t.createElement("span", { className: X("relative shrink-0 flex items-center justify-center w-[18px] h-[18px]", s.SideNav.itemIconClassName) }, e.icon ? /* @__PURE__ */ t.createElement(Q, {
13746
13762
  name: e.icon,
13747
13763
  size: 17
13748
13764
  }) : /* @__PURE__ */ t.createElement("span", { className: "w-1.5 h-1.5 rounded-full bg-current opacity-30" }), !n && e.badge !== void 0 && /* @__PURE__ */ t.createElement("span", { className: X("absolute -top-0.5 -right-1 w-[7px] h-[7px] rounded-full bg-primary ring-1 ring-background", s.SideNav.itemCollapsedBadgeClassName) })) : null, p = {
@@ -13759,7 +13775,7 @@ function Rf({ item: e, expanded: n, open: r, showIcons: i, onToggle: a }) {
13759
13775
  }, f, /* @__PURE__ */ t.createElement("span", {
13760
13776
  style: p,
13761
13777
  className: s.SideNav.itemTextClassName
13762
- }, e.title), n && e.badge !== void 0 && /* @__PURE__ */ t.createElement(If, { value: e.badge })), n && /* @__PURE__ */ t.createElement("button", {
13778
+ }, e.title), n && e.badge !== void 0 && /* @__PURE__ */ t.createElement(Ff, { value: e.badge })), n && /* @__PURE__ */ t.createElement("button", {
13763
13779
  onClick: () => a(e.path),
13764
13780
  className: X("shrink-0 flex items-center justify-center w-6 h-6 rounded transition-colors text-muted-foreground/50 hover:text-foreground hover:bg-accent", s.SideNav.itemToggleClassName),
13765
13781
  title: r ? "Collapse" : "Expand"
@@ -13769,7 +13785,7 @@ function Rf({ item: e, expanded: n, open: r, showIcons: i, onToggle: a }) {
13769
13785
  } }, /* @__PURE__ */ t.createElement(Q, {
13770
13786
  name: "chevron-down",
13771
13787
  size: 13
13772
- })))), n && /* @__PURE__ */ t.createElement(Lf, {
13788
+ })))), n && /* @__PURE__ */ t.createElement(If, {
13773
13789
  children: e.children,
13774
13790
  open: r
13775
13791
  })) : /* @__PURE__ */ t.createElement(v, {
@@ -13779,14 +13795,14 @@ function Rf({ item: e, expanded: n, open: r, showIcons: i, onToggle: a }) {
13779
13795
  }, f, /* @__PURE__ */ t.createElement("span", {
13780
13796
  style: p,
13781
13797
  className: s.SideNav.itemTextClassName
13782
- }, e.title), n && e.badge !== void 0 && /* @__PURE__ */ t.createElement(If, { value: e.badge }));
13798
+ }, e.title), n && e.badge !== void 0 && /* @__PURE__ */ t.createElement(Ff, { value: e.badge }));
13783
13799
  }
13784
- function zf({ group: e, expanded: n, openItems: r, showIcons: i, onToggle: a }) {
13800
+ function Rf({ group: e, expanded: n, openItems: r, showIcons: i, onToggle: a }) {
13785
13801
  let o = e.key === "General", s = Y("sideNav");
13786
13802
  return /* @__PURE__ */ t.createElement("div", { className: "mb-1" }, !o && /* @__PURE__ */ t.createElement("div", {
13787
13803
  style: { height: n ? void 0 : "1px" },
13788
13804
  className: n ? "px-2 pb-0.5 pt-3 first:pt-1" : X("mx-2 my-2 bg-border/40", s.SideNav.groupDividerClassName)
13789
- }, n && /* @__PURE__ */ t.createElement("span", { className: X("text-[10.5px] font-semibold uppercase tracking-widest text-muted-foreground/50 select-none", s.SideNav.groupLabelClassName) }, e.key)), /* @__PURE__ */ t.createElement("div", { className: "space-y-0.5" }, e.items.map((e) => /* @__PURE__ */ t.createElement(Rf, {
13805
+ }, n && /* @__PURE__ */ t.createElement("span", { className: X("text-[10.5px] font-semibold uppercase tracking-widest text-muted-foreground/50 select-none", s.SideNav.groupLabelClassName) }, e.key)), /* @__PURE__ */ t.createElement("div", { className: "space-y-0.5" }, e.items.map((e) => /* @__PURE__ */ t.createElement(Lf, {
13790
13806
  key: e.path,
13791
13807
  item: e,
13792
13808
  expanded: n,
@@ -13795,8 +13811,8 @@ function zf({ group: e, expanded: n, openItems: r, showIcons: i, onToggle: a })
13795
13811
  onToggle: a
13796
13812
  }))));
13797
13813
  }
13798
- function Bf({ menuKey: e, items: n, defaultCollapsed: r = !1, collapsed: i, onCollapsedChange: a, showIcons: o = !0, showCollapseButton: c = !0, footer: u, header: d, embedded: f = !1 }) {
13799
- let { pathname: p } = x(), g = Y("sideNav"), _ = Uh(e ?? ""), v = n ?? (e ? Nf(_) : []), y = i !== void 0, [b, S] = h(r), C = i === void 0 ? b : i, w = s((e) => {
13814
+ function zf({ menuKey: e, items: n, defaultCollapsed: r = !1, collapsed: i, onCollapsedChange: a, showIcons: o = !0, showCollapseButton: c = !0, footer: u, header: d, embedded: f = !1 }) {
13815
+ let { pathname: p } = x(), g = Y("sideNav"), _ = Hh(e ?? ""), v = n ?? (e ? Mf(_) : []), y = i !== void 0, [b, S] = h(r), C = i === void 0 ? b : i, w = s((e) => {
13800
13816
  let t = typeof e == "function" ? e(C) : e;
13801
13817
  y ? a?.(t) : S(t);
13802
13818
  }, [
@@ -13808,7 +13824,7 @@ function Bf({ menuKey: e, items: n, defaultCollapsed: r = !1, collapsed: i, onCo
13808
13824
  O((e) => {
13809
13825
  let t = new Set(e);
13810
13826
  return v.forEach((e) => {
13811
- e.children?.some((e) => Pf(p, e.path, e.end)) && t.add(e.path);
13827
+ e.children?.some((e) => Nf(p, e.path, e.end)) && t.add(e.path);
13812
13828
  }), t;
13813
13829
  });
13814
13830
  }, [p]);
@@ -13823,8 +13839,8 @@ function Bf({ menuKey: e, items: n, defaultCollapsed: r = !1, collapsed: i, onCo
13823
13839
  C && (k.current = setTimeout(() => E(!1), 80));
13824
13840
  };
13825
13841
  if (v.length === 0) return null;
13826
- let P = Ff(v);
13827
- return f ? /* @__PURE__ */ t.createElement("nav", { className: X("px-1.5 py-2", g.SideNav.navClassName) }, P.map((e) => /* @__PURE__ */ t.createElement(zf, {
13842
+ let P = Pf(v);
13843
+ return f ? /* @__PURE__ */ t.createElement("nav", { className: X("px-1.5 py-2", g.SideNav.navClassName) }, P.map((e) => /* @__PURE__ */ t.createElement(Rf, {
13828
13844
  key: e.key,
13829
13845
  group: e,
13830
13846
  expanded: !0,
@@ -13834,7 +13850,7 @@ function Bf({ menuKey: e, items: n, defaultCollapsed: r = !1, collapsed: i, onCo
13834
13850
  }))) : /* @__PURE__ */ t.createElement("div", {
13835
13851
  className: X("min-h-0", g.SideNav.wrapperClassName),
13836
13852
  style: {
13837
- width: C ? Mf : jf,
13853
+ width: C ? jf : Af,
13838
13854
  height: "100%",
13839
13855
  transition: "width 220ms cubic-bezier(0.4,0,0.2,1)",
13840
13856
  flexShrink: 0,
@@ -13842,7 +13858,7 @@ function Bf({ menuKey: e, items: n, defaultCollapsed: r = !1, collapsed: i, onCo
13842
13858
  }
13843
13859
  }, /* @__PURE__ */ t.createElement("aside", {
13844
13860
  style: {
13845
- width: A ? jf : Mf,
13861
+ width: A ? Af : jf,
13846
13862
  transition: "width 220ms cubic-bezier(0.4,0,0.2,1)",
13847
13863
  position: C ? "absolute" : "sticky",
13848
13864
  top: 0,
@@ -13863,7 +13879,7 @@ function Bf({ menuKey: e, items: n, defaultCollapsed: r = !1, collapsed: i, onCo
13863
13879
  overflow: "hidden",
13864
13880
  transition: "opacity 150ms ease, max-width 200ms ease"
13865
13881
  }
13866
- }, /* @__PURE__ */ t.createElement("div", { className: "min-w-0 flex-1" }, d)), /* @__PURE__ */ t.createElement("nav", { className: X("min-h-0 flex-1 overflow-y-auto overflow-x-hidden px-1.5 py-2", g.SideNav.navClassName) }, P.map((e) => /* @__PURE__ */ t.createElement(zf, {
13882
+ }, /* @__PURE__ */ t.createElement("div", { className: "min-w-0 flex-1" }, d)), /* @__PURE__ */ t.createElement("nav", { className: X("min-h-0 flex-1 overflow-y-auto overflow-x-hidden px-1.5 py-2", g.SideNav.navClassName) }, P.map((e) => /* @__PURE__ */ t.createElement(Rf, {
13867
13883
  key: e.key,
13868
13884
  group: e,
13869
13885
  expanded: A,
@@ -13890,7 +13906,7 @@ function Bf({ menuKey: e, items: n, defaultCollapsed: r = !1, collapsed: i, onCo
13890
13906
  }
13891
13907
  //#endregion
13892
13908
  //#region src/components/widgets/grid-core/useGridDBRecords.ts
13893
- function Vf({ path: e, where: t, order: n, fieldMap: r }) {
13909
+ function Bf({ path: e, where: t, order: n, fieldMap: r }) {
13894
13910
  let i = Ti(), [a, o] = h([]), s = p(() => {
13895
13911
  if (!(!t && !n && !r)) return {
13896
13912
  where: t,
@@ -13910,13 +13926,13 @@ function Vf({ path: e, where: t, order: n, fieldMap: r }) {
13910
13926
  }
13911
13927
  //#endregion
13912
13928
  //#region src/components/widgets/grid-core/resolveGridPathFromUrl.ts
13913
- function Hf(e) {
13929
+ function Vf(e) {
13914
13930
  if (e) return e;
13915
13931
  }
13916
13932
  //#endregion
13917
13933
  //#region src/components/widgets/grid-core/GridDB.tsx
13918
- function Uf({ path: e, fromUrl: n, where: r, order: i, fieldMap: a, recordId: o = za, ...s }) {
13919
- let c = x(), l = n ? Hf(c.pathname) : e, u = Vf({
13934
+ function Hf({ path: e, fromUrl: n, where: r, order: i, fieldMap: a, recordId: o = za, ...s }) {
13935
+ let c = x(), l = n ? Vf(c.pathname) : e, u = Bf({
13920
13936
  path: l,
13921
13937
  where: r,
13922
13938
  order: i,
@@ -13931,7 +13947,7 @@ function Uf({ path: e, fromUrl: n, where: r, order: i, fieldMap: a, recordId: o
13931
13947
  dir: n
13932
13948
  };
13933
13949
  }, [i]), f = s.sortable === void 0 || s.sortable === !0 ? d ?? s.sortable : s.sortable;
13934
- return /* @__PURE__ */ t.createElement(om, {
13950
+ return /* @__PURE__ */ t.createElement(am, {
13935
13951
  ...s,
13936
13952
  records: u,
13937
13953
  recordId: o,
@@ -13941,22 +13957,22 @@ function Uf({ path: e, fromUrl: n, where: r, order: i, fieldMap: a, recordId: o
13941
13957
  }
13942
13958
  //#endregion
13943
13959
  //#region src/components/widgets/grid-core/utils.ts
13944
- var Wf = (e) => e.replace(/[^a-zA-Z0-9_-]/g, "-").replace(/-+/g, "-").replace(/^-|-$/g, ""), Gf = (e) => (t) => {
13960
+ var Uf = (e) => e.replace(/[^a-zA-Z0-9_-]/g, "-").replace(/-+/g, "-").replace(/^-|-$/g, ""), Wf = (e) => (t) => {
13945
13961
  if (typeof e == "function") return String(e(t));
13946
13962
  let n = t[e];
13947
13963
  return n == null || n === "" ? "" : String(n);
13948
- }, Kf = (e, t) => {
13964
+ }, Gf = (e, t) => {
13949
13965
  if (e == null || e === "text") return t;
13950
13966
  if (e === "boolean") return t ? "Yes" : "No";
13951
13967
  if (e === "json") return t == null ? "" : JSON.stringify(t, null, 2);
13952
13968
  if (e === "badge" || e === "image" || e === "email") return t;
13953
13969
  let n = et[e === "datetime" ? "dateTime" : e];
13954
13970
  return n ? n(t) : t;
13955
- }, qf = (e, t) => typeof e.render == "function" ? e.render(t) : Kf(e.render, t.value), Jf = (e) => ({
13971
+ }, Kf = (e, t) => typeof e.render == "function" ? e.render(t) : Gf(e.render, t.value), qf = (e) => ({
13956
13972
  key: e,
13957
13973
  label: et.toCamel(e, " "),
13958
13974
  sortable: !0
13959
- }), Yf = (e, n) => {
13975
+ }), Jf = (e, n) => {
13960
13976
  let r = [], i = (e) => {
13961
13977
  t.Children.forEach(e, (e) => {
13962
13978
  if (!t.isValidElement(e)) return;
@@ -13965,25 +13981,25 @@ var Wf = (e) => e.replace(/[^a-zA-Z0-9_-]/g, "-").replace(/-+/g, "-").replace(/^
13965
13981
  });
13966
13982
  };
13967
13983
  return i(Array.isArray(e) ? e : [e]), r;
13968
- }, Xf = (e, n, r) => {
13984
+ }, Yf = (e, n, r) => {
13969
13985
  if (e?.length) return e;
13970
13986
  if (t.isValidElement(r)) {
13971
- let e = Yf(r, (e) => Jf(e.name));
13987
+ let e = Jf(r, (e) => qf(e.name));
13972
13988
  if (e.length > 0) return e;
13973
13989
  }
13974
13990
  let i = n[0];
13975
- return i ? Object.entries(i).reduce((e, [n, r]) => (n.startsWith("_") || (t.isValidElement(r) || typeof r != "object" || Array.isArray(r)) && e.push(Jf(n)), e), []) : [];
13976
- }, Zf = (e, t) => Array.isArray(e) ? e.reduce((e, t) => (t === "delete" ? e[t] = { kind: "delete" } : e[t] = { kind: "modal" }, e), {}) : e ? Object.entries(e).reduce((e, [t, n]) => (n && (e[t] = n), e), {}) : t ? {
13991
+ return i ? Object.entries(i).reduce((e, [n, r]) => (n.startsWith("_") || (t.isValidElement(r) || typeof r != "object" || Array.isArray(r)) && e.push(qf(n)), e), []) : [];
13992
+ }, Xf = (e, t) => Array.isArray(e) ? e.reduce((e, t) => (t === "delete" ? e[t] = { kind: "delete" } : e[t] = { kind: "modal" }, e), {}) : e ? Object.entries(e).reduce((e, [t, n]) => (n && (e[t] = n), e), {}) : t ? {
13977
13993
  add: { kind: "modal" },
13978
13994
  edit: { kind: "modal" },
13979
13995
  delete: { kind: "delete" }
13980
- } : {}, Qf = (e, t) => e?.visible ? typeof e.visible == "function" ? e.visible(t) : e.visible : !0, $f = (e, t) => e?.disabled ? typeof e.disabled == "function" ? e.disabled(t) : e.disabled : !1, ep = (e, t, n) => t?.label ? t.label : e === "add" ? n?.add ?? "Add" : e === "edit" ? n?.edit ?? "Edit" : e === "delete" ? n?.delete ?? "Delete" : et.toCamel(e, " "), tp = (e) => {
13996
+ } : {}, Zf = (e, t) => e?.visible ? typeof e.visible == "function" ? e.visible(t) : e.visible : !0, Qf = (e, t) => e?.disabled ? typeof e.disabled == "function" ? e.disabled(t) : e.disabled : !1, $f = (e, t, n) => t?.label ? t.label : e === "add" ? n?.add ?? "Add" : e === "edit" ? n?.edit ?? "Edit" : e === "delete" ? n?.delete ?? "Delete" : et.toCamel(e, " "), ep = (e) => {
13981
13997
  if (!(!e || typeof e == "boolean")) return e;
13982
13998
  };
13983
13999
  //#endregion
13984
14000
  //#region src/components/widgets/grid-core/GridTableView.tsx
13985
- function np({ records: e, recordId: n, columns: r, runAction: i, sortable: a, pagination: o, selection: c = !1, selectedKeys: u, onSelectionChange: d, onRowClick: f, reorderable: h = !1, onReorder: g, activeKey: _, groupBy: v, wrapperClassName: y, className: b, heightClassName: x, scrollClassName: S, headerClassName: C, before: w, after: T }) {
13986
- let E = p(() => Gf(n), [n]), D = m(/* @__PURE__ */ new Map()), O = p(() => e.reduce((e, t) => (e.set(E(t), t), e), /* @__PURE__ */ new Map()), [E, e]), k = p(() => r.reduce((e, t) => (e.set(String(t.key), t), e), /* @__PURE__ */ new Map()), [r]);
14001
+ function tp({ records: e, recordId: n, columns: r, runAction: i, sortable: a, pagination: o, selection: c = !1, selectedKeys: u, onSelectionChange: d, onRowClick: f, reorderable: h = !1, onReorder: g, activeKey: _, groupBy: v, wrapperClassName: y, className: b, heightClassName: x, scrollClassName: S, headerClassName: C, before: w, after: T }) {
14002
+ let E = p(() => Wf(n), [n]), D = m(/* @__PURE__ */ new Map()), O = p(() => e.reduce((e, t) => (e.set(E(t), t), e), /* @__PURE__ */ new Map()), [E, e]), k = p(() => r.reduce((e, t) => (e.set(String(t.key), t), e), /* @__PURE__ */ new Map()), [r]);
13987
14003
  l(() => {
13988
14004
  let t = new Set(e.map((e) => E(e)));
13989
14005
  for (let e of D.current.keys()) t.has(e) || D.current.delete(e);
@@ -13993,7 +14009,7 @@ function np({ records: e, recordId: n, columns: r, runAction: i, sortable: a, pa
13993
14009
  if (!o) return Mt(r, t);
13994
14010
  let s = Mt(r, t), c = D.current.get(a) ?? /* @__PURE__ */ new Map(), l = c.get(t), u = typeof o.render == "function";
13995
14011
  if (l && l.recordRef === r && l.valueRef === s && l.renderRef === o.render && (!u || l.rowIndex === n)) return l.output;
13996
- let d = qf(o, {
14012
+ let d = Kf(o, {
13997
14013
  record: r,
13998
14014
  value: s,
13999
14015
  key: t,
@@ -14012,7 +14028,7 @@ function np({ records: e, recordId: n, columns: r, runAction: i, sortable: a, pa
14012
14028
  E,
14013
14029
  i
14014
14030
  ]);
14015
- return /* @__PURE__ */ t.createElement(ef, {
14031
+ return /* @__PURE__ */ t.createElement($d, {
14016
14032
  columns: r.map((e) => ({
14017
14033
  key: String(e.key),
14018
14034
  label: e.label,
@@ -14070,20 +14086,20 @@ function np({ records: e, recordId: n, columns: r, runAction: i, sortable: a, pa
14070
14086
  }
14071
14087
  //#endregion
14072
14088
  //#region src/Head.tsx
14073
- var rp = a(null), ip = 0, ap = "LLM Native", op = {
14089
+ var np = a(null), rp = 0, ip = "LLM Native", ap = {
14074
14090
  charset: "UTF-8",
14075
14091
  viewport: "width=device-width, initial-scale=1.0"
14076
- }, sp = { lang: "en" };
14077
- function cp(e, t) {
14092
+ }, op = { lang: "en" };
14093
+ function sp(e, t) {
14078
14094
  return t.includes(":") ? t : `${e}:${t}`;
14079
14095
  }
14080
- function lp(e) {
14096
+ function cp(e) {
14081
14097
  return Array.isArray(e) ? e.join(", ") : e;
14082
14098
  }
14083
- function up(e) {
14084
- return e === "siteName" ? "og:site_name" : cp("og", e);
14099
+ function lp(e) {
14100
+ return e === "siteName" ? "og:site_name" : sp("og", e);
14085
14101
  }
14086
- function dp(e) {
14102
+ function up(e) {
14087
14103
  return [
14088
14104
  ...e.canonical ? [{
14089
14105
  rel: "canonical",
@@ -14101,7 +14117,7 @@ function dp(e) {
14101
14117
  ...e.links ?? []
14102
14118
  ];
14103
14119
  }
14104
- function fp(e) {
14120
+ function dp(e) {
14105
14121
  return [...e.prev ? [{
14106
14122
  rel: "prev",
14107
14123
  href: e.prev
@@ -14110,7 +14126,7 @@ function fp(e) {
14110
14126
  href: e.next
14111
14127
  }] : []];
14112
14128
  }
14113
- function pp(e) {
14129
+ function fp(e) {
14114
14130
  return (e.alternates ?? []).map((e) => ({
14115
14131
  rel: "alternate",
14116
14132
  href: e.href,
@@ -14120,28 +14136,28 @@ function pp(e) {
14120
14136
  title: e.title
14121
14137
  }));
14122
14138
  }
14123
- function mp(e, t, n) {
14139
+ function pp(e, t, n) {
14124
14140
  return {
14125
14141
  name: {
14126
14142
  description: e.description,
14127
14143
  ...e.meta ?? {},
14128
14144
  robots: n.robots ?? e.meta?.robots,
14129
14145
  googlebot: n.googlebot,
14130
- keywords: lp(n.keywords),
14146
+ keywords: cp(n.keywords),
14131
14147
  author: n.author,
14132
14148
  publisher: n.publisher,
14133
14149
  referrer: n.referrer,
14134
14150
  ...n.meta ?? {},
14135
- ...Object.fromEntries(Object.entries(t.twitter ?? {}).map(([e, t]) => [cp("twitter", e), t]))
14151
+ ...Object.fromEntries(Object.entries(t.twitter ?? {}).map(([e, t]) => [sp("twitter", e), t]))
14136
14152
  },
14137
- property: Object.fromEntries(Object.entries(t.openGraph ?? {}).map(([e, t]) => [up(e), t]))
14153
+ property: Object.fromEntries(Object.entries(t.openGraph ?? {}).map(([e, t]) => [lp(e), t]))
14138
14154
  };
14139
14155
  }
14140
- function hp(e, t, n, r) {
14156
+ function mp(e, t, n, r) {
14141
14157
  return [
14142
- ...dp(t),
14143
- ...fp(r),
14144
- ...pp(n),
14158
+ ...up(t),
14159
+ ...dp(r),
14160
+ ...fp(n),
14145
14161
  ...e.canonical && !t.canonical ? [{
14146
14162
  rel: "canonical",
14147
14163
  href: e.canonical
@@ -14149,7 +14165,7 @@ function hp(e, t, n, r) {
14149
14165
  ...e.links ?? []
14150
14166
  ];
14151
14167
  }
14152
- function gp(e) {
14168
+ function hp(e) {
14153
14169
  return [...(e.fonts ?? []).flatMap((e) => [
14154
14170
  ...(e.dnsPrefetch ?? []).map((e) => ({
14155
14171
  rel: "dns-prefetch",
@@ -14176,7 +14192,7 @@ function gp(e) {
14176
14192
  }
14177
14193
  ])];
14178
14194
  }
14179
- function _p(e) {
14195
+ function gp(e) {
14180
14196
  return [
14181
14197
  ...e.manifest ? [{
14182
14198
  rel: "manifest",
@@ -14193,7 +14209,7 @@ function _p(e) {
14193
14209
  ...e.icons ?? []
14194
14210
  ];
14195
14211
  }
14196
- function vp(e) {
14212
+ function _p(e) {
14197
14213
  return {
14198
14214
  "theme-color": e.themeColor,
14199
14215
  "msapplication-TileColor": e.backgroundColor,
@@ -14205,27 +14221,27 @@ function vp(e) {
14205
14221
  "apple-mobile-web-app-status-bar-style": e.appleMobileWebAppStatusBarStyle
14206
14222
  };
14207
14223
  }
14208
- function yp(e) {
14224
+ function vp(e) {
14209
14225
  return Array.isArray(e.jsonLd) ? e.jsonLd : e.jsonLd ? [e.jsonLd] : [];
14210
14226
  }
14211
- function bp(e) {
14227
+ function yp(e) {
14212
14228
  return Object.fromEntries(Object.entries(e).filter(([, e]) => !!e));
14213
14229
  }
14214
- function xp(e) {
14230
+ function bp(e) {
14215
14231
  let { inline: t, ...n } = e;
14216
14232
  return Object.fromEntries(Object.entries(n).filter(([, e]) => e !== void 0 && e !== !1));
14217
14233
  }
14218
- function Sp(e) {
14234
+ function xp(e) {
14219
14235
  let { inline: t, ...n } = e;
14220
14236
  return Object.fromEntries(Object.entries(n).filter(([, e]) => e !== void 0 && e !== !1));
14221
14237
  }
14222
- function Cp({ appName: e, metadata: n, social: r, links: i, pagination: a, language: o, document: s, assets: c, pwa: l, schemaOrg: u }) {
14238
+ function Sp({ appName: e, metadata: n, social: r, links: i, pagination: a, language: o, document: s, assets: c, pwa: l, schemaOrg: u }) {
14223
14239
  if (globalThis.document === void 0) return null;
14224
- let d = mp(n, r, s), f = vp(l), p = [
14225
- ...hp(i, s, o, a),
14226
- ...gp(c),
14227
- ..._p(l)
14228
- ], m = yp(u);
14240
+ let d = pp(n, r, s), f = _p(l), p = [
14241
+ ...mp(i, s, o, a),
14242
+ ...hp(c),
14243
+ ...gp(l)
14244
+ ], m = vp(u);
14229
14245
  return j(/* @__PURE__ */ t.createElement(t.Fragment, null, s.charset ? /* @__PURE__ */ t.createElement("meta", {
14230
14246
  charSet: s.charset,
14231
14247
  "data-rfs-head": "document"
@@ -14259,12 +14275,12 @@ function Cp({ appName: e, metadata: n, social: r, links: i, pagination: a, langu
14259
14275
  "data-rfs-head": "pwa"
14260
14276
  }) : null), p.map((e, n) => /* @__PURE__ */ t.createElement("link", {
14261
14277
  key: `${e.rel}:${e.href ?? n}`,
14262
- ...bp(e),
14278
+ ...yp(e),
14263
14279
  "data-rfs-head": "link"
14264
14280
  })), (c.styles ?? []).map((e, n) => /* @__PURE__ */ t.createElement(t.Fragment, { key: `style:${e.href ?? n}` }, e.href ? /* @__PURE__ */ t.createElement("link", {
14265
14281
  rel: "stylesheet",
14266
14282
  href: e.href,
14267
- ...Sp(e),
14283
+ ...xp(e),
14268
14284
  "data-rfs-head": "asset-style"
14269
14285
  }) : null, e.inline ? /* @__PURE__ */ t.createElement("style", {
14270
14286
  id: e.id,
@@ -14273,7 +14289,7 @@ function Cp({ appName: e, metadata: n, social: r, links: i, pagination: a, langu
14273
14289
  title: e.title,
14274
14290
  "data-rfs-head": "asset-style"
14275
14291
  }, e.inline) : null)), (c.scripts ?? []).map((e, n) => /* @__PURE__ */ t.createElement(t.Fragment, { key: `script:${e.src ?? n}` }, e.src ? /* @__PURE__ */ t.createElement("script", {
14276
- ...xp(e),
14292
+ ...bp(e),
14277
14293
  "data-rfs-head": "asset-script"
14278
14294
  }) : null, e.inline ? /* @__PURE__ */ t.createElement("script", {
14279
14295
  type: e.type,
@@ -14286,15 +14302,15 @@ function Cp({ appName: e, metadata: n, social: r, links: i, pagination: a, langu
14286
14302
  "data-rfs-head": "schema-org"
14287
14303
  }, JSON.stringify(e)))), globalThis.document.head);
14288
14304
  }
14289
- function wp({ appName: e = ap, children: n }) {
14290
- let r = e || "LLM Native", i = t.useRef(globalThis.document === void 0 ? "" : globalThis.document.documentElement.lang), a = t.useRef(globalThis.document === void 0 ? "" : globalThis.document.documentElement.dir), [o, c] = h({}), [u, d] = h([]), [f, m] = h({}), [g, _] = h({}), [v, y] = h({}), [b, x] = h(sp), [S, C] = h(op), [w, T] = h({}), [E, D] = h({}), [O, k] = h({}), A = s(() => c({}), []), j = s((e, t) => {
14305
+ function Cp({ appName: e = ip, children: n }) {
14306
+ let r = e || "LLM Native", i = t.useRef(globalThis.document === void 0 ? "" : globalThis.document.documentElement.lang), a = t.useRef(globalThis.document === void 0 ? "" : globalThis.document.documentElement.dir), [o, c] = h({}), [u, d] = h([]), [f, m] = h({}), [g, _] = h({}), [v, y] = h({}), [b, x] = h(op), [S, C] = h(ap), [w, T] = h({}), [E, D] = h({}), [O, k] = h({}), A = s(() => c({}), []), j = s((e, t) => {
14291
14307
  d((n) => [...n.filter((t) => t.id !== e), {
14292
14308
  id: e,
14293
14309
  metadata: t
14294
14310
  }]);
14295
14311
  }, []), M = s((e) => {
14296
14312
  d((t) => t.filter((t) => t.id !== e));
14297
- }, []), N = s(() => m({}), []), P = s(() => _({}), []), F = s(() => y({}), []), I = s(() => x(sp), []), L = s(() => C(op), []), R = s(() => T({}), []), z = s(() => D({}), []), B = s(() => k({}), []);
14313
+ }, []), N = s(() => m({}), []), P = s(() => _({}), []), F = s(() => y({}), []), I = s(() => x(op), []), L = s(() => C(ap), []), R = s(() => T({}), []), z = s(() => D({}), []), B = s(() => k({}), []);
14298
14314
  l(() => {
14299
14315
  globalThis.document !== void 0 && (globalThis.document.documentElement.lang = b.lang ?? i.current, globalThis.document.documentElement.dir = b.dir ?? a.current);
14300
14316
  }, [b.lang, b.dir]);
@@ -14354,7 +14370,7 @@ function wp({ appName: e = ap, children: n }) {
14354
14370
  z,
14355
14371
  B
14356
14372
  ]);
14357
- return /* @__PURE__ */ t.createElement(rp.Provider, { value: H }, n, /* @__PURE__ */ t.createElement(Cp, {
14373
+ return /* @__PURE__ */ t.createElement(np.Provider, { value: H }, n, /* @__PURE__ */ t.createElement(Sp, {
14358
14374
  appName: r,
14359
14375
  metadata: V,
14360
14376
  social: f,
@@ -14367,16 +14383,16 @@ function wp({ appName: e = ap, children: n }) {
14367
14383
  schemaOrg: O
14368
14384
  }));
14369
14385
  }
14370
- function Tp() {
14371
- return c(rp);
14386
+ function wp() {
14387
+ return c(np);
14372
14388
  }
14373
- function Ep(e) {
14389
+ function Tp(e) {
14374
14390
  return JSON.stringify(e ?? {});
14375
14391
  }
14376
- function Dp(e) {
14377
- let n = Tp(), r = t.useRef(null);
14378
- r.current ||= (ip += 1, `metadata-${ip}`);
14379
- let i = Ep(e);
14392
+ function Ep(e) {
14393
+ let n = wp(), r = t.useRef(null);
14394
+ r.current ||= (rp += 1, `metadata-${rp}`);
14395
+ let i = Tp(e);
14380
14396
  return l(() => {
14381
14397
  if (!n || !e) return;
14382
14398
  let t = r.current;
@@ -14387,40 +14403,40 @@ function Dp(e) {
14387
14403
  i
14388
14404
  ]), n;
14389
14405
  }
14390
- function Op(e) {
14391
- let t = Tp(), n = Ep(e);
14406
+ function Dp(e) {
14407
+ let t = wp(), n = Tp(e);
14392
14408
  return l(() => {
14393
14409
  if (!t || !e) return;
14394
14410
  let n = t.social;
14395
14411
  return t.setSocialHead(e), () => t.setSocialHead(n);
14396
14412
  }, [t?.setSocialHead, n]), t;
14397
14413
  }
14398
- function kp(e) {
14399
- let t = Tp(), n = Ep(e);
14414
+ function Op(e) {
14415
+ let t = wp(), n = Tp(e);
14400
14416
  return l(() => {
14401
14417
  if (!t || !e) return;
14402
14418
  let n = t.links;
14403
14419
  return t.setHeadLinks(e), () => t.setHeadLinks(n);
14404
14420
  }, [t?.setHeadLinks, n]), t;
14405
14421
  }
14406
- function Ap(e) {
14407
- let t = Tp(), n = Ep(e);
14422
+ function kp(e) {
14423
+ let t = wp(), n = Tp(e);
14408
14424
  return l(() => {
14409
14425
  if (!t || !e) return;
14410
14426
  let n = t.pagination;
14411
14427
  return t.setPaginationHead(e), () => t.setPaginationHead(n);
14412
14428
  }, [t?.setPaginationHead, n]), t;
14413
14429
  }
14414
- function jp(e) {
14415
- let t = Tp(), n = Ep(e);
14430
+ function Ap(e) {
14431
+ let t = wp(), n = Tp(e);
14416
14432
  return l(() => {
14417
14433
  if (!t || !e) return;
14418
14434
  let n = t.language;
14419
14435
  return t.setLanguageHead(e), () => t.setLanguageHead(n);
14420
14436
  }, [t?.setLanguageHead, n]), t;
14421
14437
  }
14422
- function Mp(e) {
14423
- let t = Tp(), n = Ep(e);
14438
+ function jp(e) {
14439
+ let t = wp(), n = Tp(e);
14424
14440
  return l(() => {
14425
14441
  if (!t || !e) return;
14426
14442
  let n = t.document;
@@ -14430,39 +14446,39 @@ function Mp(e) {
14430
14446
  }), () => t.setDocumentHead(n);
14431
14447
  }, [t?.setDocumentHead, n]), t;
14432
14448
  }
14433
- function Np(e) {
14434
- let t = Tp(), n = Ep(e);
14449
+ function Mp(e) {
14450
+ let t = wp(), n = Tp(e);
14435
14451
  return l(() => {
14436
14452
  if (!t || !e) return;
14437
14453
  let n = t.assets;
14438
14454
  return t.setAssetsHead(e), () => t.setAssetsHead(n);
14439
14455
  }, [t?.setAssetsHead, n]), t;
14440
14456
  }
14441
- function Pp(e) {
14442
- let t = Tp(), n = Ep(e);
14457
+ function Np(e) {
14458
+ let t = wp(), n = Tp(e);
14443
14459
  return l(() => {
14444
14460
  if (!t || !e) return;
14445
14461
  let n = t.pwa;
14446
14462
  return t.setPwaHead(e), () => t.setPwaHead(n);
14447
14463
  }, [t?.setPwaHead, n]), t;
14448
14464
  }
14449
- function Fp(e) {
14450
- let t = Tp(), n = Ep(e);
14465
+ function Pp(e) {
14466
+ let t = wp(), n = Tp(e);
14451
14467
  return l(() => {
14452
14468
  if (!t || !e) return;
14453
14469
  let n = t.schemaOrg;
14454
14470
  return t.setSchemaOrg(e), () => t.setSchemaOrg(n);
14455
14471
  }, [t?.setSchemaOrg, n]), t;
14456
14472
  }
14457
- function Ip(e) {
14458
- return Dp(e), null;
14473
+ function Fp(e) {
14474
+ return Ep(e), null;
14459
14475
  }
14460
14476
  //#endregion
14461
14477
  //#region src/components/widgets/MarkdownReader.tsx
14462
- var Lp = (e) => /^(https?:)?\/\//.test(e) || e.startsWith("mailto:") || e.startsWith("tel:"), Rp = (e) => !!e && !Lp(e) && !e.startsWith("#"), zp = (e) => e.startsWith("#"), Bp = (e) => typeof e == "string" || typeof e == "number" ? String(e) : Array.isArray(e) ? e.map(Bp).join("") : t.isValidElement(e) ? Bp(e.props.children) : "", Vp = (e) => {
14478
+ var Ip = (e) => /^(https?:)?\/\//.test(e) || e.startsWith("mailto:") || e.startsWith("tel:"), Lp = (e) => !!e && !Ip(e) && !e.startsWith("#"), Rp = (e) => e.startsWith("#"), zp = (e) => typeof e == "string" || typeof e == "number" ? String(e) : Array.isArray(e) ? e.map(zp).join("") : t.isValidElement(e) ? zp(e.props.children) : "", Bp = (e) => {
14463
14479
  if (t.isValidElement(e)) return /language-([\w-]+)/.exec(e.props.className || "")?.[1];
14464
14480
  };
14465
- function Hp({ code: e, language: n }) {
14481
+ function Vp({ code: e, language: n }) {
14466
14482
  let [r, i] = t.useState(!1), a = Fn("code");
14467
14483
  return /* @__PURE__ */ t.createElement("div", { className: "relative my-4 overflow-hidden rounded-md border bg-muted/50" }, /* @__PURE__ */ t.createElement("div", { className: "flex h-9 items-center justify-between border-b px-3" }, /* @__PURE__ */ t.createElement("span", { className: "text-xs font-medium text-muted-foreground" }, n || a.codeLanguageDefault), /* @__PURE__ */ t.createElement("button", {
14468
14484
  type: "button",
@@ -14472,7 +14488,7 @@ function Hp({ code: e, language: n }) {
14472
14488
  }
14473
14489
  }, r ? a.copied : a.copy)), /* @__PURE__ */ t.createElement("pre", { className: "m-0 overflow-x-auto p-4 text-xs leading-relaxed" }, /* @__PURE__ */ t.createElement("code", { className: n ? `language-${n}` : void 0 }, e)));
14474
14490
  }
14475
- var Up = (e) => ({
14491
+ var Hp = (e) => ({
14476
14492
  h1: ({ className: e, ...n }) => /* @__PURE__ */ t.createElement("h1", {
14477
14493
  className: X("mt-8 scroll-m-20 text-3xl font-bold tracking-normal first:mt-0 [&>a]:no-underline [&>a:hover]:opacity-80", e),
14478
14494
  ...n
@@ -14526,18 +14542,18 @@ var Up = (e) => ({
14526
14542
  ...n
14527
14543
  }),
14528
14544
  a: ({ className: n, href: r = "", onClick: i, ...a }) => /* @__PURE__ */ t.createElement("a", {
14529
- className: X(zp(r) ? "text-primary no-underline transition-opacity hover:opacity-80" : "font-medium text-primary no-underline transition-opacity hover:opacity-80", n),
14545
+ className: X(Rp(r) ? "text-primary no-underline transition-opacity hover:opacity-80" : "font-medium text-primary no-underline transition-opacity hover:opacity-80", n),
14530
14546
  href: r,
14531
- target: Lp(r) ? "_blank" : void 0,
14532
- rel: Lp(r) ? "noreferrer" : void 0,
14547
+ target: Ip(r) ? "_blank" : void 0,
14548
+ rel: Ip(r) ? "noreferrer" : void 0,
14533
14549
  onClick: (t) => {
14534
- i?.(t), !t.defaultPrevented && e && Rp(r) && (t.preventDefault(), e(r, t));
14550
+ i?.(t), !t.defaultPrevented && e && Lp(r) && (t.preventDefault(), e(r, t));
14535
14551
  },
14536
14552
  ...a
14537
14553
  }),
14538
- pre: ({ children: e }) => /* @__PURE__ */ t.createElement(Hp, {
14539
- code: Bp(e).replace(/\n$/, ""),
14540
- language: Vp(e)
14554
+ pre: ({ children: e }) => /* @__PURE__ */ t.createElement(Vp, {
14555
+ code: zp(e).replace(/\n$/, ""),
14556
+ language: Bp(e)
14541
14557
  }),
14542
14558
  code: ({ className: e, children: n, ...r }) => typeof e == "string" && e.startsWith("language-") ? /* @__PURE__ */ t.createElement("code", {
14543
14559
  className: e,
@@ -14552,13 +14568,13 @@ var Up = (e) => ({
14552
14568
  ...n
14553
14569
  })
14554
14570
  });
14555
- function Wp({ content: e, components: n, className: r, wrapperClassName: i, metadata: a, onInternalLinkClick: o }) {
14571
+ function Up({ content: e, components: n, className: r, wrapperClassName: i, metadata: a, onInternalLinkClick: o }) {
14556
14572
  let s = t.useMemo(() => e.match(/^#[ \t]+(.+)/m)?.[1]?.trim(), [e]);
14557
- Dp(a || s ? {
14573
+ Ep(a || s ? {
14558
14574
  ...a ?? {},
14559
14575
  title: a?.title ?? s
14560
14576
  } : void 0);
14561
- let c = t.useMemo(() => Up(o), [o]);
14577
+ let c = t.useMemo(() => Hp(o), [o]);
14562
14578
  return /* @__PURE__ */ t.createElement("div", { className: X("rf-markdown-reader max-w-none text-sm text-foreground", i, r) }, /* @__PURE__ */ t.createElement(ke, {
14563
14579
  remarkPlugins: [Ae],
14564
14580
  rehypePlugins: [
@@ -14574,7 +14590,7 @@ function Wp({ content: e, components: n, className: r, wrapperClassName: i, meta
14574
14590
  }
14575
14591
  //#endregion
14576
14592
  //#region src/components/widgets/TabDynamic.tsx
14577
- var Gp = ({ children: e, name: n, onChange: r = void 0, onAdd: i = void 0, onRemove: a = void 0, label: o = "Tab", min: s = 1, max: c = void 0, activeIndex: l = 0, title: u = void 0, readOnly: d = !1, tabPosition: f = "default" }) => {
14593
+ var Wp = ({ children: e, name: n, onChange: r = void 0, onAdd: i = void 0, onRemove: a = void 0, label: o = "Tab", min: s = 1, max: c = void 0, activeIndex: l = 0, title: u = void 0, readOnly: d = !1, tabPosition: f = "default" }) => {
14578
14594
  let { value: m, handleChange: g } = Dd({
14579
14595
  name: n,
14580
14596
  onChange: r
@@ -14605,7 +14621,7 @@ var Gp = ({ children: e, name: n, onChange: r = void 0, onAdd: i = void 0, onRem
14605
14621
  }, E = (e) => {
14606
14622
  let t = S.length - 1;
14607
14623
  a?.(e), g({ target: { name: `${n}.${e}` } }), v >= t && y((e) => e - 1), x((e) => e + 1);
14608
- }, D = Jd[f], O = Gd(f);
14624
+ }, D = qd[f], O = Wd(f);
14609
14625
  return /* @__PURE__ */ t.createElement("div", null, u && /* @__PURE__ */ t.createElement("h3", null, u), /* @__PURE__ */ t.createElement(D, {
14610
14626
  menu: /* @__PURE__ */ t.createElement(t.Fragment, null, S?.map((e, r) => /* @__PURE__ */ t.createElement("div", {
14611
14627
  key: `${n}-${r}`,
@@ -14615,7 +14631,7 @@ var Gp = ({ children: e, name: n, onChange: r = void 0, onAdd: i = void 0, onRem
14615
14631
  role: "tab",
14616
14632
  "aria-selected": r === v,
14617
14633
  onClick: () => y(r),
14618
- className: Kd(f, r === v, !d && S.length - 1 >= s && r === v ? "pr-9" : void 0)
14634
+ className: Gd(f, r === v, !d && S.length - 1 >= s && r === v ? "pr-9" : void 0)
14619
14635
  }, e), !d && S.length - 1 >= s && r === v && /* @__PURE__ */ t.createElement(Hr, {
14620
14636
  className: "absolute right-2 top-1/2 -translate-y-1/2 p-1 text-current opacity-70 hover:opacity-100",
14621
14637
  icon: "x",
@@ -14624,14 +14640,14 @@ var Gp = ({ children: e, name: n, onChange: r = void 0, onAdd: i = void 0, onRem
14624
14640
  key: S.length + 1,
14625
14641
  className: O.itemClassName
14626
14642
  }, /* @__PURE__ */ t.createElement(Hr, {
14627
- className: Kd(f, !1, "border border-dashed border-border/70 justify-center"),
14643
+ className: Gd(f, !1, "border border-dashed border-border/70 justify-center"),
14628
14644
  icon: "plus",
14629
14645
  title: "Add tab",
14630
14646
  onClick: T
14631
14647
  }))),
14632
- content: /* @__PURE__ */ t.createElement("div", { className: qd() }, w)
14648
+ content: /* @__PURE__ */ t.createElement("div", { className: Kd() }, w)
14633
14649
  }));
14634
- }, Kp = ({ records: e, children: n, limit: r = void 0, page: i = void 0, maxPageButtons: a = void 0, appendTo: o = void 0, before: s = void 0, after: c = void 0, className: u = void 0, wrapperClassName: d = void 0, scrollToTopOnChange: f = void 0, scrollBehavior: m = void 0, align: g = void 0, sticky: _ = void 0 }) => {
14650
+ }, Gp = ({ records: e, children: n, limit: r = void 0, page: i = void 0, maxPageButtons: a = void 0, appendTo: o = void 0, before: s = void 0, after: c = void 0, className: u = void 0, wrapperClassName: d = void 0, scrollToTopOnChange: f = void 0, scrollBehavior: m = void 0, align: g = void 0, sticky: _ = void 0 }) => {
14635
14651
  let v = Y("pagination"), y = Fn("common"), [b, x] = h(i || 1), S = r || e.length, C = Math.ceil(e.length / S), w = (b - 1) * S, T = w + S, E = p(() => e.slice(w, T), [
14636
14652
  e,
14637
14653
  w,
@@ -14695,7 +14711,7 @@ var Gp = ({ children: e, name: n, onChange: r = void 0, onAdd: i = void 0, onRem
14695
14711
  className: X("inline-flex h-9 min-w-[2.25rem] items-center justify-center rounded-md border bg-background px-3 text-sm transition-colors", A === "disabled" ? "pointer-events-none opacity-40" : "cursor-pointer hover:bg-accent hover:text-accent-foreground")
14696
14712
  }, /* @__PURE__ */ t.createElement("span", null, "»"))))), c);
14697
14713
  return /* @__PURE__ */ t.createElement(t.Fragment, null, n(E, w), o ? j(P, o) : o === void 0 && P);
14698
- }, qp = ({ records: e = void 0, header: n = void 0, footer: r = void 0, overlays: i = void 0, renderItem: a = void 0, onRowClick: o = void 0, onSelectionChange: c = void 0, sortable: u = !1, pagination: d = void 0, gap: f = void 0, columns: g = void 0, groupBy: _ = void 0, selectedKeys: v = void 0, before: y = void 0, after: b = void 0, wrapperClassName: x = void 0, className: S = void 0, headerClassName: C = void 0, scrollClassName: w = void 0, bodyClassName: T = void 0, footerClassName: E = void 0, selectedClassName: D = void 0 }) => {
14714
+ }, Kp = ({ records: e = void 0, header: n = void 0, footer: r = void 0, overlays: i = void 0, renderItem: a = void 0, onRowClick: o = void 0, onSelectionChange: c = void 0, sortable: u = !1, pagination: d = void 0, gap: f = void 0, columns: g = void 0, groupBy: _ = void 0, selectedKeys: v = void 0, before: y = void 0, after: b = void 0, wrapperClassName: x = void 0, className: S = void 0, headerClassName: C = void 0, scrollClassName: w = void 0, bodyClassName: T = void 0, footerClassName: E = void 0, selectedClassName: D = void 0 }) => {
14699
14715
  let O = Y("gallery"), k = Fn("gallery"), A = Fn("common"), j = D || O.Gallery.selectedClassName, [M, N] = h(null), P = s((e) => {
14700
14716
  e && N(e);
14701
14717
  }, []), F = f ?? O.Gallery.gap, I = g ?? O.Gallery.rowCols, L = {
@@ -14720,7 +14736,7 @@ var Gp = ({ children: e, name: n, onChange: r = void 0, onAdd: i = void 0, onRem
14720
14736
  typeof u == "object" ? u?.dir : void 0,
14721
14737
  typeof u == "object" ? u?.field : void 0,
14722
14738
  u
14723
- ]), W = $d("item"), ee = s((e, t) => W(e, t), [W]), { activeSelectedKeys: G, showSelection: te, updateSelection: ne } = Qd({
14739
+ ]), W = Qd("item"), ee = s((e, t) => W(e, t), [W]), { activeSelectedKeys: G, showSelection: te, updateSelection: ne } = Zd({
14724
14740
  records: H,
14725
14741
  selectedKeys: v,
14726
14742
  onSelectionChange: c,
@@ -14904,7 +14920,7 @@ var Gp = ({ children: e, name: n, onChange: r = void 0, onAdd: i = void 0, onRem
14904
14920
  _,
14905
14921
  U
14906
14922
  ]);
14907
- return me === void 0 ? /* @__PURE__ */ t.createElement("p", { className: "p-4" }, /* @__PURE__ */ t.createElement("span", { className: "mr-2 inline-block h-4 w-4 animate-spin rounded-full border-2 border-current border-t-transparent" }), A.loading) : me.length === 0 ? /* @__PURE__ */ t.createElement("p", { className: "p-4" }, A.noDataFound) : /* @__PURE__ */ t.createElement("div", { className: X("flex items-stretch gap-3", x || O.Gallery.wrapperClassName) }, y && /* @__PURE__ */ t.createElement("div", { className: "gallery-before flex shrink-0 items-center self-stretch" }, y), /* @__PURE__ */ t.createElement(Z, { className: X("min-w-0 flex-1 flex flex-col", S || O.Gallery.className) }, n && /* @__PURE__ */ t.createElement("div", { className: C || O.Gallery.headerClassName }, n), /* @__PURE__ */ t.createElement(Z, { className: X("min-w-0 flex-1", w || O.Gallery.scrollClassName) }, /* @__PURE__ */ t.createElement(Kp, {
14923
+ return me === void 0 ? /* @__PURE__ */ t.createElement("p", { className: "p-4" }, /* @__PURE__ */ t.createElement("span", { className: "mr-2 inline-block h-4 w-4 animate-spin rounded-full border-2 border-current border-t-transparent" }), A.loading) : me.length === 0 ? /* @__PURE__ */ t.createElement("p", { className: "p-4" }, A.noDataFound) : /* @__PURE__ */ t.createElement("div", { className: X("flex items-stretch gap-3", x || O.Gallery.wrapperClassName) }, y && /* @__PURE__ */ t.createElement("div", { className: "gallery-before flex shrink-0 items-center self-stretch" }, y), /* @__PURE__ */ t.createElement(Z, { className: X("min-w-0 flex-1 flex flex-col", S || O.Gallery.className) }, n && /* @__PURE__ */ t.createElement("div", { className: C || O.Gallery.headerClassName }, n), /* @__PURE__ */ t.createElement(Z, { className: X("min-w-0 flex-1", w || O.Gallery.scrollClassName) }, /* @__PURE__ */ t.createElement(Gp, {
14908
14924
  records: me,
14909
14925
  appendTo: M,
14910
14926
  wrapperClassName: "px-3 pt-4 pb-2",
@@ -14925,12 +14941,12 @@ var Gp = ({ children: e, name: n, onChange: r = void 0, onAdd: i = void 0, onRem
14925
14941
  };
14926
14942
  //#endregion
14927
14943
  //#region src/components/widgets/grid-core/GridGalleryView.tsx
14928
- function Jp({ records: e, recordId: n, sortable: r, pagination: i, selection: a = !1, selectedKeys: o, onSelectionChange: s, onRowClick: c, groupBy: l, wrapperClassName: u, before: d, after: f, columns: m, overlays: h, renderItem: g }) {
14929
- let _ = p(() => Gf(n), [n]), v = p(() => e.reduce((e, t) => (e.set(_(t), t), e), /* @__PURE__ */ new Map()), [_, e]), y = p(() => e.map((e) => ({
14944
+ function qp({ records: e, recordId: n, sortable: r, pagination: i, selection: a = !1, selectedKeys: o, onSelectionChange: s, onRowClick: c, groupBy: l, wrapperClassName: u, before: d, after: f, columns: m, overlays: h, renderItem: g }) {
14945
+ let _ = p(() => Wf(n), [n]), v = p(() => e.reduce((e, t) => (e.set(_(t), t), e), /* @__PURE__ */ new Map()), [_, e]), y = p(() => e.map((e) => ({
14930
14946
  ...e,
14931
14947
  [za]: _(e)
14932
14948
  })), [e, _]);
14933
- return /* @__PURE__ */ t.createElement(qp, {
14949
+ return /* @__PURE__ */ t.createElement(Kp, {
14934
14950
  records: y,
14935
14951
  overlays: h,
14936
14952
  renderItem: g ? (e, t, n) => g(e, t, n) : void 0,
@@ -14966,8 +14982,8 @@ function Jp({ records: e, recordId: n, sortable: r, pagination: i, selection: a
14966
14982
  }
14967
14983
  //#endregion
14968
14984
  //#region src/components/widgets/grid-core/useGridActions.tsx
14969
- function Yp({ actions: e, form: n, editDeepLink: r, preparedRecords: i, recordId: a, sourcePath: o, db: c, onSave: d, onDelete: f, onComplete: m, audit: g = !1 }) {
14970
- let _ = x(), v = S(), y = u(), b = _d(), C = p(() => Gf(a), [a]), w = p(() => Zf(e, !!n), [e, n]), [T, E] = h(null), D = p(() => `${Wf(o || "grid-records")}-${Wf(y)}`, [y, o]), O = s(() => {
14985
+ function Jp({ actions: e, form: n, editDeepLink: r, preparedRecords: i, recordId: a, sourcePath: o, db: c, onSave: d, onDelete: f, onComplete: m, audit: g = !1 }) {
14986
+ let _ = x(), v = S(), y = u(), b = _d(), C = p(() => Wf(a), [a]), w = p(() => Xf(e, !!n), [e, n]), [T, E] = h(null), D = p(() => `${Uf(o || "grid-records")}-${Uf(y)}`, [y, o]), O = s(() => {
14971
14987
  E(null), r && _.hash.startsWith(`#${D}:`) && v({
14972
14988
  pathname: _.pathname,
14973
14989
  search: _.search,
@@ -14998,7 +15014,7 @@ function Yp({ actions: e, form: n, editDeepLink: r, preparedRecords: i, recordId
14998
15014
  o
14999
15015
  ]), A = s(async () => b.save(), [b]), j = s(async (e, t) => {
15000
15016
  let n = w[e];
15001
- if (!n || !Qf(n, t) || $f(n, t)) return;
15017
+ if (!n || !Zf(n, t) || Qf(n, t)) return;
15002
15018
  let i = {
15003
15019
  actionKey: e,
15004
15020
  record: t,
@@ -15160,8 +15176,8 @@ function Yp({ actions: e, form: n, editDeepLink: r, preparedRecords: i, recordId
15160
15176
  }
15161
15177
  //#endregion
15162
15178
  //#region src/components/widgets/grid-core/useGridColumns.ts
15163
- function Xp({ columns: e, records: t, form: n }) {
15164
- return p(() => Xf(e, t, n), [
15179
+ function Yp({ columns: e, records: t, form: n }) {
15180
+ return p(() => Yf(e, t, n), [
15165
15181
  e,
15166
15182
  n,
15167
15183
  t
@@ -15169,7 +15185,7 @@ function Xp({ columns: e, records: t, form: n }) {
15169
15185
  }
15170
15186
  //#endregion
15171
15187
  //#region src/components/widgets/grid-core/useGridPreparedRecords.ts
15172
- function Zp({ records: e, onLoad: t }) {
15188
+ function Xp({ records: e, onLoad: t }) {
15173
15189
  let [n, r] = h(e), [i, a] = h(!1);
15174
15190
  return l(() => {
15175
15191
  if (!t) {
@@ -15192,7 +15208,7 @@ function Zp({ records: e, onLoad: t }) {
15192
15208
  }
15193
15209
  //#endregion
15194
15210
  //#region src/components/widgets/grid-core/useGridSelection.ts
15195
- function Qp({ selection: e }) {
15211
+ function Zp({ selection: e }) {
15196
15212
  let t = e !== null && e !== !1 && typeof e == "object", n = e ? typeof e == "string" ? e : e.mode : !1, r = t ? e.defaultKeys : void 0, i = t ? e.onChange : void 0, [a, o] = h(r ?? []), [c, u] = h([]);
15197
15213
  l(() => {
15198
15214
  o(r ?? []), u([]);
@@ -15225,7 +15241,7 @@ function Qp({ selection: e }) {
15225
15241
  }
15226
15242
  //#endregion
15227
15243
  //#region src/components/widgets/grid-core/GridCore.tsx
15228
- var $p = (e, t, n, r, i) => t?.kind === "delete" ? typeof t.title == "function" ? t.title(n) : t.title || r : t?.kind === "modal" ? typeof t.title == "function" ? t.title(n) : t.title || ep(e, t, i) : ep(e, t, i), em = (e) => {
15244
+ var Qp = (e, t, n, r, i) => t?.kind === "delete" ? typeof t.title == "function" ? t.title(n) : t.title || r : t?.kind === "modal" ? typeof t.title == "function" ? t.title(n) : t.title || $f(e, t, i) : $f(e, t, i), $p = (e) => {
15229
15245
  switch (e.kind) {
15230
15246
  case "select": return "";
15231
15247
  case "multiselect": return [];
@@ -15239,7 +15255,7 @@ var $p = (e, t, n, r, i) => t?.kind === "delete" ? typeof t.title == "function"
15239
15255
  };
15240
15256
  default: return e.defaultValue ?? !1;
15241
15257
  }
15242
- }, tm = (e, t) => {
15258
+ }, em = (e, t) => {
15243
15259
  switch (e.kind) {
15244
15260
  case "select": return typeof t == "string" && t !== "";
15245
15261
  case "multiselect": return Array.isArray(t) && t.length > 0;
@@ -15253,7 +15269,7 @@ var $p = (e, t, n, r, i) => t?.kind === "delete" ? typeof t.title == "function"
15253
15269
  }
15254
15270
  default: return !!t != !!(e.defaultValue ?? !1);
15255
15271
  }
15256
- }, nm = (e, t, n) => {
15272
+ }, tm = (e, t, n) => {
15257
15273
  switch (e.kind) {
15258
15274
  case "select": return e.predicate(t, n);
15259
15275
  case "multiselect": return e.predicate(t, n);
@@ -15261,7 +15277,7 @@ var $p = (e, t, n, r, i) => t?.kind === "delete" ? typeof t.title == "function"
15261
15277
  case "numberRange": return e.predicate(t, n);
15262
15278
  default: return e.predicate(t, n);
15263
15279
  }
15264
- }, rm = (e, t, n) => {
15280
+ }, nm = (e, t, n) => {
15265
15281
  switch (e.kind) {
15266
15282
  case "select": {
15267
15283
  let n = e.options.find((e) => e.value === t);
@@ -15285,10 +15301,10 @@ var $p = (e, t, n, r, i) => t?.kind === "delete" ? typeof t.title == "function"
15285
15301
  }
15286
15302
  default: return e.label;
15287
15303
  }
15288
- }, im = "w-full rounded-md border border-input bg-background px-2 py-1.5 text-sm placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring";
15289
- function am({ filter: e, value: n, onChange: r, dict: i }) {
15304
+ }, rm = "w-full rounded-md border border-input bg-background px-2 py-1.5 text-sm placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring";
15305
+ function im({ filter: e, value: n, onChange: r, dict: i }) {
15290
15306
  if (e.kind === "select") return /* @__PURE__ */ t.createElement("label", { className: "flex flex-col gap-1.5" }, /* @__PURE__ */ t.createElement("span", { className: "text-sm font-medium text-foreground" }, e.label), /* @__PURE__ */ t.createElement("select", {
15291
- className: im,
15307
+ className: rm,
15292
15308
  value: n,
15293
15309
  onChange: (e) => r(e.target.value)
15294
15310
  }, /* @__PURE__ */ t.createElement("option", { value: "" }, i.filtersSelectPlaceholder), e.options.map((e) => /* @__PURE__ */ t.createElement("option", {
@@ -15310,7 +15326,7 @@ function am({ filter: e, value: n, onChange: r, dict: i }) {
15310
15326
  let a = n;
15311
15327
  return /* @__PURE__ */ t.createElement("div", { className: "flex flex-col gap-1.5" }, /* @__PURE__ */ t.createElement("span", { className: "text-sm font-medium text-foreground" }, e.label), /* @__PURE__ */ t.createElement("div", { className: "flex flex-col gap-2" }, /* @__PURE__ */ t.createElement("label", { className: "flex flex-col gap-1" }, /* @__PURE__ */ t.createElement("span", { className: "text-xs text-muted-foreground" }, i.filtersRangeFrom), /* @__PURE__ */ t.createElement("input", {
15312
15328
  type: "date",
15313
- className: im,
15329
+ className: rm,
15314
15330
  value: a.from,
15315
15331
  onChange: (e) => r({
15316
15332
  ...a,
@@ -15318,7 +15334,7 @@ function am({ filter: e, value: n, onChange: r, dict: i }) {
15318
15334
  })
15319
15335
  })), /* @__PURE__ */ t.createElement("label", { className: "flex flex-col gap-1" }, /* @__PURE__ */ t.createElement("span", { className: "text-xs text-muted-foreground" }, i.filtersRangeTo), /* @__PURE__ */ t.createElement("input", {
15320
15336
  type: "date",
15321
- className: im,
15337
+ className: rm,
15322
15338
  value: a.to,
15323
15339
  onChange: (e) => r({
15324
15340
  ...a,
@@ -15330,7 +15346,7 @@ function am({ filter: e, value: n, onChange: r, dict: i }) {
15330
15346
  let a = n;
15331
15347
  return /* @__PURE__ */ t.createElement("div", { className: "flex flex-col gap-1.5" }, /* @__PURE__ */ t.createElement("span", { className: "text-sm font-medium text-foreground" }, e.label), /* @__PURE__ */ t.createElement("div", { className: "flex flex-col gap-2" }, /* @__PURE__ */ t.createElement("label", { className: "flex flex-col gap-1" }, /* @__PURE__ */ t.createElement("span", { className: "text-xs text-muted-foreground" }, i.filtersRangeMin), /* @__PURE__ */ t.createElement("input", {
15332
15348
  type: "number",
15333
- className: im,
15349
+ className: rm,
15334
15350
  value: a.min ?? "",
15335
15351
  onChange: (e) => r({
15336
15352
  ...a,
@@ -15338,7 +15354,7 @@ function am({ filter: e, value: n, onChange: r, dict: i }) {
15338
15354
  })
15339
15355
  })), /* @__PURE__ */ t.createElement("label", { className: "flex flex-col gap-1" }, /* @__PURE__ */ t.createElement("span", { className: "text-xs text-muted-foreground" }, i.filtersRangeMax), /* @__PURE__ */ t.createElement("input", {
15340
15356
  type: "number",
15341
- className: im,
15357
+ className: rm,
15342
15358
  value: a.max ?? "",
15343
15359
  onChange: (e) => r({
15344
15360
  ...a,
@@ -15357,15 +15373,15 @@ function am({ filter: e, value: n, onChange: r, dict: i }) {
15357
15373
  className: X("pointer-events-none absolute inset-0 rounded-full transition-colors duration-200 ease-out peer-focus-visible:ring-2 peer-focus-visible:ring-ring peer-focus-visible:ring-offset-2", a ? "bg-primary" : "bg-muted-foreground/35")
15358
15374
  }, /* @__PURE__ */ t.createElement("span", { className: X("pointer-events-none absolute top-0.5 left-0.5 h-4 w-4 rounded-full bg-background shadow-sm transition-transform duration-200 ease-out", a && "translate-x-4") }))), /* @__PURE__ */ t.createElement("span", { className: "text-sm text-foreground" }, e.label));
15359
15375
  }
15360
- function om({ records: e, recordId: n, sourcePath: r, columns: i, actions: a, form: o, editDeepLink: c, header: u, footer: d, view: f = "table", views: m, sticky: g, wrapperClassName: _, cardClassName: v, bodyClassName: y, loading: b = !1, title: x, before: S, after: C, sortable: w = !0, pagination: T, selection: E, onRowClick: D, reorderable: O = !1, onReorder: k, groupBy: A, searchable: j, filters: M, onSave: N, onDelete: P, onComplete: F, audit: I = !1, onLoad: L }) {
15361
- let R = Y("grid"), z = Fn("grid"), B = Fn("common"), V = p(() => ({ add: z.buttonAdd }), [z.buttonAdd]), H = Ti(), { preparedRecords: U, loading: W } = Zp({
15376
+ function am({ records: e, recordId: n, sourcePath: r, columns: i, actions: a, form: o, editDeepLink: c, header: u, footer: d, view: f = "table", views: m, sticky: g, wrapperClassName: _, cardClassName: v, bodyClassName: y, loading: b = !1, title: x, before: S, after: C, sortable: w = !0, pagination: T, selection: E, onRowClick: D, reorderable: O = !1, onReorder: k, groupBy: A, searchable: j, filters: M, onSave: N, onDelete: P, onComplete: F, audit: I = !1, onLoad: L }) {
15377
+ let R = Y("grid"), z = Fn("grid"), B = Fn("common"), V = p(() => ({ add: z.buttonAdd }), [z.buttonAdd]), H = Ti(), { preparedRecords: U, loading: W } = Xp({
15362
15378
  records: e,
15363
15379
  onLoad: L
15364
- }), ee = Xp({
15380
+ }), ee = Yp({
15365
15381
  columns: i,
15366
15382
  records: U,
15367
15383
  form: o
15368
- }), [G, te] = h(() => Object.fromEntries((M ?? []).map((e) => [e.key, em(e)]))), [ne, re] = h(!1), K = s((e, t) => {
15384
+ }), [G, te] = h(() => Object.fromEntries((M ?? []).map((e) => [e.key, $p(e)]))), [ne, re] = h(!1), K = s((e, t) => {
15369
15385
  te((n) => ({
15370
15386
  ...n,
15371
15387
  [e]: t
@@ -15373,9 +15389,9 @@ function om({ records: e, recordId: n, sourcePath: r, columns: i, actions: a, fo
15373
15389
  }, []), ie = s((e) => {
15374
15390
  te((t) => ({
15375
15391
  ...t,
15376
- [e.key]: em(e)
15392
+ [e.key]: $p(e)
15377
15393
  }));
15378
- }, []), ae = (M ?? []).filter((e) => tm(e, G[e.key] ?? em(e))), oe = p(() => !M || M.length === 0 ? U : U.filter((e) => M.every((t) => nm(t, e, G[t.key] ?? em(t)))), [
15394
+ }, []), ae = (M ?? []).filter((e) => em(e, G[e.key] ?? $p(e))), oe = p(() => !M || M.length === 0 ? U : U.filter((e) => M.every((t) => tm(t, e, G[t.key] ?? $p(t)))), [
15379
15395
  U,
15380
15396
  M,
15381
15397
  G
@@ -15390,7 +15406,7 @@ function om({ records: e, recordId: n, sourcePath: r, columns: i, actions: a, fo
15390
15406
  key: e.key,
15391
15407
  variant: "info",
15392
15408
  className: "inline-flex items-center gap-1"
15393
- }, rm(e, G[e.key] ?? em(e), z), /* @__PURE__ */ t.createElement(Hr, {
15409
+ }, nm(e, G[e.key] ?? $p(e), z), /* @__PURE__ */ t.createElement(Hr, {
15394
15410
  icon: "x",
15395
15411
  variant: "link",
15396
15412
  ariaLabel: `${z.filtersClearAll} ${e.label}`,
@@ -15405,12 +15421,12 @@ function om({ records: e, recordId: n, sourcePath: r, columns: i, actions: a, fo
15405
15421
  label: z.filtersClearAll,
15406
15422
  variant: "link",
15407
15423
  disabled: ae.length === 0,
15408
- onClick: () => te(Object.fromEntries(M.map((e) => [e.key, em(e)])))
15424
+ onClick: () => te(Object.fromEntries(M.map((e) => [e.key, $p(e)])))
15409
15425
  })
15410
- }, /* @__PURE__ */ t.createElement("div", { className: "flex flex-col gap-5" }, M.map((e) => /* @__PURE__ */ t.createElement(am, {
15426
+ }, /* @__PURE__ */ t.createElement("div", { className: "flex flex-col gap-5" }, M.map((e) => /* @__PURE__ */ t.createElement(im, {
15411
15427
  key: e.key,
15412
15428
  filter: e,
15413
- value: G[e.key] ?? em(e),
15429
+ value: G[e.key] ?? $p(e),
15414
15430
  onChange: (t) => K(e.key, t),
15415
15431
  dict: z
15416
15432
  })))) : null, de = j === !0 ? {} : j || void 0, [fe, q] = h(""), pe = p(() => {
@@ -15469,7 +15485,7 @@ function om({ records: e, recordId: n, sourcePath: r, columns: i, actions: a, fo
15469
15485
  _e.overlays,
15470
15486
  _e.renderItem,
15471
15487
  Oe
15472
- ]), { mode: Ae, activeSelectionKeys: je, selectionState: Me, handleSelectionChange: Ne } = Qp({ selection: E }), { normalizedActions: Pe, activeAction: Fe, activeActionConfig: J, activeActionBody: Ie, activeKey: Le, runAction: Re, close: ze, getActionContext: Be, getModalActionContext: Ve, getRecordKey: He, formController: Ue } = Yp({
15488
+ ]), { mode: Ae, activeSelectionKeys: je, selectionState: Me, handleSelectionChange: Ne } = Zp({ selection: E }), { normalizedActions: Pe, activeAction: Fe, activeActionConfig: J, activeActionBody: Ie, activeKey: Le, runAction: Re, close: ze, getActionContext: Be, getModalActionContext: Ve, getRecordKey: He, formController: Ue } = Jp({
15473
15489
  actions: a,
15474
15490
  form: o,
15475
15491
  editDeepLink: c,
@@ -15499,18 +15515,18 @@ function om({ records: e, recordId: n, sourcePath: r, columns: i, actions: a, fo
15499
15515
  Re
15500
15516
  ]), qe = D || Ge ? Ke : void 0, Je = s((e, n, r) => {
15501
15517
  let i = Pe[e];
15502
- return !i || !Qf(i, n) ? null : /* @__PURE__ */ t.createElement(Hr, {
15518
+ return !i || !Zf(i, n) ? null : /* @__PURE__ */ t.createElement(Hr, {
15503
15519
  className: r || (e === "add" ? "btn-primary" : void 0),
15504
15520
  icon: i.icon,
15505
- label: ep(e, i, V),
15506
- disabled: $f(i, n),
15521
+ label: $f(e, i, V),
15522
+ disabled: Qf(i, n),
15507
15523
  onClick: () => Re(e, n)
15508
15524
  });
15509
15525
  }, [
15510
15526
  Pe,
15511
15527
  Re,
15512
15528
  V
15513
- ]), Ye = p(() => Object.entries(Pe).filter(([e, t]) => e !== "edit" && e !== "delete" && Qf(t, void 0)).map(([e]) => e), [Pe]), Xe = p(() => ({
15529
+ ]), Ye = p(() => Object.entries(Pe).filter(([e, t]) => e !== "edit" && e !== "delete" && Zf(t, void 0)).map(([e]) => e), [Pe]), Xe = p(() => ({
15514
15530
  title: x,
15515
15531
  records: U,
15516
15532
  selection: Me,
@@ -15603,7 +15619,7 @@ function om({ records: e, recordId: n, sourcePath: r, columns: i, actions: a, fo
15603
15619
  if (J.footer === !1) return !1;
15604
15620
  if (!(J.footer === void 0 || !rt)) return typeof J.footer == "function" ? J.footer(rt) : J.footer;
15605
15621
  }
15606
- }, [J, rt]), ot = tp(w);
15622
+ }, [J, rt]), ot = ep(w);
15607
15623
  return /* @__PURE__ */ t.createElement(t.Fragment, null, /* @__PURE__ */ t.createElement(ji, {
15608
15624
  wrapperClassName: _,
15609
15625
  header: tt,
@@ -15613,7 +15629,7 @@ function om({ records: e, recordId: n, sourcePath: r, columns: i, actions: a, fo
15613
15629
  bodyClassName: X(R.Grid.Card.bodyClassName, y),
15614
15630
  footerClassName: R.Grid.Card.footerClassName,
15615
15631
  loading: b || W
15616
- }, ve === "gallery" ? /* @__PURE__ */ t.createElement(Jp, {
15632
+ }, ve === "gallery" ? /* @__PURE__ */ t.createElement(qp, {
15617
15633
  records: pe,
15618
15634
  recordId: n,
15619
15635
  sortable: ot || w,
@@ -15629,7 +15645,7 @@ function om({ records: e, recordId: n, sourcePath: r, columns: i, actions: a, fo
15629
15645
  columns: _e.columns,
15630
15646
  overlays: ke,
15631
15647
  renderItem: _e.renderItem
15632
- }) : /* @__PURE__ */ t.createElement(np, {
15648
+ }) : /* @__PURE__ */ t.createElement(tp, {
15633
15649
  records: pe,
15634
15650
  recordId: n,
15635
15651
  columns: Ce,
@@ -15655,7 +15671,7 @@ function om({ records: e, recordId: n, sourcePath: r, columns: i, actions: a, fo
15655
15671
  size: (J.kind === "modal" || J.kind === "delete") && J.size || R.Grid.Modal.size,
15656
15672
  position: (J.kind === "modal" || J.kind === "delete") && J.position || R.Grid.Modal.position,
15657
15673
  header: it,
15658
- title: $p(Fe.actionKey, J, J.kind === "modal" || J.kind === "delete" ? Ve(Fe.actionKey, Fe.record) : Be(Fe.actionKey, Fe.record), z.deleteConfirm, V),
15674
+ title: Qp(Fe.actionKey, J, J.kind === "modal" || J.kind === "delete" ? Ve(Fe.actionKey, Fe.record) : Be(Fe.actionKey, Fe.record), z.deleteConfirm, V),
15659
15675
  onClose: ze,
15660
15676
  onSave: J.kind === "modal" && J.footer === void 0 && (Fe.actionKey === "add" || Fe.actionKey === "edit") ? (e) => Ue.save(e) : void 0,
15661
15677
  onDelete: J.kind === "delete" ? async () => {
@@ -15683,18 +15699,18 @@ function om({ records: e, recordId: n, sourcePath: r, columns: i, actions: a, fo
15683
15699
  }
15684
15700
  //#endregion
15685
15701
  //#region src/components/widgets/grid-core/GridArray.tsx
15686
- function sm(e) {
15687
- return /* @__PURE__ */ t.createElement(om, e);
15702
+ function om(e) {
15703
+ return /* @__PURE__ */ t.createElement(am, e);
15688
15704
  }
15689
15705
  //#endregion
15690
15706
  //#region src/components/widgets/Grid.tsx
15691
- function cm(e) {
15692
- return "records" in e ? /* @__PURE__ */ t.createElement(sm, e) : /* @__PURE__ */ t.createElement(Uf, e);
15707
+ function sm(e) {
15708
+ return "records" in e ? /* @__PURE__ */ t.createElement(om, e) : /* @__PURE__ */ t.createElement(Hf, e);
15693
15709
  }
15694
15710
  //#endregion
15695
15711
  //#region src/pages/Users.tsx
15696
- function lm() {
15697
- return /* @__PURE__ */ t.createElement(cm, {
15712
+ function cm() {
15713
+ return /* @__PURE__ */ t.createElement(sm, {
15698
15714
  path: "/users",
15699
15715
  recordId: (e) => `${e.email ?? ""}`.replace("@", "-"),
15700
15716
  form: /* @__PURE__ */ t.createElement(t.Fragment, null, /* @__PURE__ */ t.createElement(vs, {
@@ -15721,10 +15737,10 @@ function lm() {
15721
15737
  }
15722
15738
  //#endregion
15723
15739
  //#region src/pages/NotFound.tsx
15724
- var um = () => {
15740
+ var lm = () => {
15725
15741
  let e = Fn("common");
15726
15742
  return /* @__PURE__ */ t.createElement("div", { className: "flex flex-col justify-center items-center vh-100" }, /* @__PURE__ */ t.createElement("h1", null, "404"), /* @__PURE__ */ t.createElement("p", null, e.notFoundMessage), /* @__PURE__ */ t.createElement(v, { to: "/" }, /* @__PURE__ */ t.createElement(Q, { name: "house-door" }), " ", e.goHome));
15727
- }, dm = ({ size: e = 28 }) => /* @__PURE__ */ t.createElement("svg", {
15743
+ }, um = ({ size: e = 28 }) => /* @__PURE__ */ t.createElement("svg", {
15728
15744
  xmlns: "http://www.w3.org/2000/svg",
15729
15745
  width: e,
15730
15746
  height: e,
@@ -15744,7 +15760,7 @@ var um = () => {
15744
15760
  x2: "12.01",
15745
15761
  y1: "17",
15746
15762
  y2: "17"
15747
- })), fm = ({ open: e }) => /* @__PURE__ */ t.createElement("svg", {
15763
+ })), dm = ({ open: e }) => /* @__PURE__ */ t.createElement("svg", {
15748
15764
  xmlns: "http://www.w3.org/2000/svg",
15749
15765
  width: "13",
15750
15766
  height: "13",
@@ -15759,7 +15775,7 @@ var um = () => {
15759
15775
  transform: e ? "rotate(180deg)" : "none",
15760
15776
  flexShrink: 0
15761
15777
  }
15762
- }, /* @__PURE__ */ t.createElement("polyline", { points: "6 9 12 15 18 9" })), pm = () => /* @__PURE__ */ t.createElement("svg", {
15778
+ }, /* @__PURE__ */ t.createElement("polyline", { points: "6 9 12 15 18 9" })), fm = () => /* @__PURE__ */ t.createElement("svg", {
15763
15779
  xmlns: "http://www.w3.org/2000/svg",
15764
15780
  width: "13",
15765
15781
  height: "13",
@@ -15776,7 +15792,7 @@ var um = () => {
15776
15792
  y: "8",
15777
15793
  rx: "2",
15778
15794
  ry: "2"
15779
- }), /* @__PURE__ */ t.createElement("path", { d: "M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2" })), mm = () => /* @__PURE__ */ t.createElement("svg", {
15795
+ }), /* @__PURE__ */ t.createElement("path", { d: "M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2" })), pm = () => /* @__PURE__ */ t.createElement("svg", {
15780
15796
  xmlns: "http://www.w3.org/2000/svg",
15781
15797
  width: "13",
15782
15798
  height: "13",
@@ -15786,7 +15802,7 @@ var um = () => {
15786
15802
  strokeWidth: "2",
15787
15803
  strokeLinecap: "round",
15788
15804
  strokeLinejoin: "round"
15789
- }, /* @__PURE__ */ t.createElement("path", { d: "m22 2-7 20-4-9-9-4Z" }), /* @__PURE__ */ t.createElement("path", { d: "M22 2 11 13" })), hm = () => /* @__PURE__ */ t.createElement("svg", {
15805
+ }, /* @__PURE__ */ t.createElement("path", { d: "m22 2-7 20-4-9-9-4Z" }), /* @__PURE__ */ t.createElement("path", { d: "M22 2 11 13" })), mm = () => /* @__PURE__ */ t.createElement("svg", {
15790
15806
  xmlns: "http://www.w3.org/2000/svg",
15791
15807
  width: "14",
15792
15808
  height: "14",
@@ -15796,7 +15812,7 @@ var um = () => {
15796
15812
  strokeWidth: "2",
15797
15813
  strokeLinecap: "round",
15798
15814
  strokeLinejoin: "round"
15799
- }, /* @__PURE__ */ t.createElement("path", { d: "m8 2 1.88 1.88M14.12 3.88 16 2" }), /* @__PURE__ */ t.createElement("path", { d: "M9 7.13v-1a3.003 3.003 0 1 1 6 0v1" }), /* @__PURE__ */ t.createElement("path", { d: "M12 20c-3.3 0-6-2.7-6-6v-3a4 4 0 0 1 4-4h4a4 4 0 0 1 4 4v3c0 3.3-2.7 6-6 6z" }), /* @__PURE__ */ t.createElement("path", { d: "M12 20v-9" }), /* @__PURE__ */ t.createElement("path", { d: "M6.53 9C4.6 8.8 3 7.1 3 5" }), /* @__PURE__ */ t.createElement("path", { d: "M6 13H2" }), /* @__PURE__ */ t.createElement("path", { d: "M3 21c0-2.1 1.7-3.9 3.8-4" }), /* @__PURE__ */ t.createElement("path", { d: "M20.97 5c0 2.1-1.6 3.8-3.5 4" }), /* @__PURE__ */ t.createElement("path", { d: "M22 13h-4" }), /* @__PURE__ */ t.createElement("path", { d: "M17.2 17c2.1.1 3.8 1.9 3.8 4" })), gm = (e, t) => ({
15815
+ }, /* @__PURE__ */ t.createElement("path", { d: "m8 2 1.88 1.88M14.12 3.88 16 2" }), /* @__PURE__ */ t.createElement("path", { d: "M9 7.13v-1a3.003 3.003 0 1 1 6 0v1" }), /* @__PURE__ */ t.createElement("path", { d: "M12 20c-3.3 0-6-2.7-6-6v-3a4 4 0 0 1 4-4h4a4 4 0 0 1 4 4v3c0 3.3-2.7 6-6 6z" }), /* @__PURE__ */ t.createElement("path", { d: "M12 20v-9" }), /* @__PURE__ */ t.createElement("path", { d: "M6.53 9C4.6 8.8 3 7.1 3 5" }), /* @__PURE__ */ t.createElement("path", { d: "M6 13H2" }), /* @__PURE__ */ t.createElement("path", { d: "M3 21c0-2.1 1.7-3.9 3.8-4" }), /* @__PURE__ */ t.createElement("path", { d: "M20.97 5c0 2.1-1.6 3.8-3.5 4" }), /* @__PURE__ */ t.createElement("path", { d: "M22 13h-4" }), /* @__PURE__ */ t.createElement("path", { d: "M17.2 17c2.1.1 3.8 1.9 3.8 4" })), hm = (e, t) => ({
15800
15816
  error: {
15801
15817
  message: e.message,
15802
15818
  stack: e.stack ?? ""
@@ -15807,8 +15823,8 @@ var um = () => {
15807
15823
  userAgent: typeof navigator < "u" ? navigator.userAgent : "",
15808
15824
  timestamp: (/* @__PURE__ */ new Date()).toISOString()
15809
15825
  }
15810
- }), _m = (e, t) => {
15811
- let n = gm(e, t);
15826
+ }), gm = (e, t) => {
15827
+ let n = hm(e, t);
15812
15828
  return [
15813
15829
  `Error: ${n.error.message}`,
15814
15830
  "",
@@ -15823,7 +15839,7 @@ var um = () => {
15823
15839
  `Timestamp: ${n.context.timestamp}`,
15824
15840
  `Agent: ${n.context.userAgent}`
15825
15841
  ].join("\n");
15826
- }, vm = class extends t.Component {
15842
+ }, _m = class extends t.Component {
15827
15843
  constructor(e) {
15828
15844
  super(e), this.state = {
15829
15845
  error: null,
@@ -15845,7 +15861,7 @@ var um = () => {
15845
15861
  };
15846
15862
  copy = () => {
15847
15863
  let { error: e, errorInfo: t } = this.state;
15848
- e && navigator.clipboard?.writeText(_m(e, t)).then(() => {
15864
+ e && navigator.clipboard?.writeText(gm(e, t)).then(() => {
15849
15865
  this.setState({ copied: !0 }), setTimeout(() => this.setState({ copied: !1 }), 2e3);
15850
15866
  });
15851
15867
  };
@@ -15854,7 +15870,7 @@ var um = () => {
15854
15870
  !e || !n || (this.setState({ reportState: "sending" }), fetch(n, {
15855
15871
  method: "POST",
15856
15872
  headers: { "Content-Type": "application/json" },
15857
- body: JSON.stringify(gm(e, t))
15873
+ body: JSON.stringify(hm(e, t))
15858
15874
  }).then((e) => this.setState({ reportState: e.ok ? "sent" : "failed" })).catch(() => this.setState({ reportState: "failed" })));
15859
15875
  };
15860
15876
  render() {
@@ -15864,16 +15880,16 @@ var um = () => {
15864
15880
  if (typeof s == "function") return s(e, this.reset);
15865
15881
  if (s != null) return s;
15866
15882
  let d = (e.stack ?? e.message).split("\n").map((e) => e.trim()).filter(Boolean), f = (n?.componentStack ?? "").split("\n").map((e) => e.trim()).filter(Boolean), p = l ? "flex min-h-screen flex-col items-center justify-center bg-background p-8" : "flex min-h-[calc(100vh-4rem)] flex-col items-center justify-center p-8";
15867
- return /* @__PURE__ */ t.createElement("div", { className: p }, /* @__PURE__ */ t.createElement("div", { className: "flex w-full max-w-xl flex-col gap-4 rounded-xl border border-destructive/25 bg-destructive/5 p-6" }, /* @__PURE__ */ t.createElement("div", { className: "flex items-start gap-4" }, /* @__PURE__ */ t.createElement("div", { className: "flex h-11 w-11 shrink-0 items-center justify-center rounded-full bg-destructive/12 text-destructive" }, /* @__PURE__ */ t.createElement(dm, { size: 22 })), /* @__PURE__ */ t.createElement("div", null, /* @__PURE__ */ t.createElement("p", { className: "text-sm font-semibold text-foreground" }, "This page ran into a problem"), /* @__PURE__ */ t.createElement("p", { className: "mt-0.5 text-xs text-muted-foreground" }, "An unexpected error occurred while rendering this content."))), /* @__PURE__ */ t.createElement("div", { className: "rounded-lg border bg-background/60" }, /* @__PURE__ */ t.createElement("button", {
15883
+ return /* @__PURE__ */ t.createElement("div", { className: p }, /* @__PURE__ */ t.createElement("div", { className: "flex w-full max-w-xl flex-col gap-4 rounded-xl border border-destructive/25 bg-destructive/5 p-6" }, /* @__PURE__ */ t.createElement("div", { className: "flex items-start gap-4" }, /* @__PURE__ */ t.createElement("div", { className: "flex h-11 w-11 shrink-0 items-center justify-center rounded-full bg-destructive/12 text-destructive" }, /* @__PURE__ */ t.createElement(um, { size: 22 })), /* @__PURE__ */ t.createElement("div", null, /* @__PURE__ */ t.createElement("p", { className: "text-sm font-semibold text-foreground" }, "This page ran into a problem"), /* @__PURE__ */ t.createElement("p", { className: "mt-0.5 text-xs text-muted-foreground" }, "An unexpected error occurred while rendering this content."))), /* @__PURE__ */ t.createElement("div", { className: "rounded-lg border bg-background/60" }, /* @__PURE__ */ t.createElement("button", {
15868
15884
  onClick: () => this.setState((e) => ({ detailsOpen: !e.detailsOpen })),
15869
15885
  className: "flex w-full items-center gap-2 px-3 py-2.5 text-left text-xs font-medium text-muted-foreground transition-colors hover:text-foreground"
15870
- }, /* @__PURE__ */ t.createElement(fm, { open: r }), "Technical details", /* @__PURE__ */ t.createElement("span", { className: "ml-auto truncate max-w-[280px] font-mono text-[11px] text-muted-foreground/70" }, e.message)), r && /* @__PURE__ */ t.createElement("div", { className: "border-t" }, /* @__PURE__ */ t.createElement("pre", { className: "max-h-48 overflow-y-auto px-3 py-3 text-[11px] leading-relaxed text-muted-foreground font-mono whitespace-before-wrap break-all" }, d.join("\n")))), u && /* @__PURE__ */ t.createElement("div", { className: "rounded-lg border border-amber-200/60 bg-amber-50/40 dark:border-amber-900/40 dark:bg-amber-950/20" }, /* @__PURE__ */ t.createElement("button", {
15886
+ }, /* @__PURE__ */ t.createElement(dm, { open: r }), "Technical details", /* @__PURE__ */ t.createElement("span", { className: "ml-auto truncate max-w-[280px] font-mono text-[11px] text-muted-foreground/70" }, e.message)), r && /* @__PURE__ */ t.createElement("div", { className: "border-t" }, /* @__PURE__ */ t.createElement("pre", { className: "max-h-48 overflow-y-auto px-3 py-3 text-[11px] leading-relaxed text-muted-foreground font-mono whitespace-before-wrap break-all" }, d.join("\n")))), u && /* @__PURE__ */ t.createElement("div", { className: "rounded-lg border border-amber-200/60 bg-amber-50/40 dark:border-amber-900/40 dark:bg-amber-950/20" }, /* @__PURE__ */ t.createElement("button", {
15871
15887
  onClick: () => this.setState((e) => ({ debugOpen: !e.debugOpen })),
15872
15888
  className: "flex w-full items-center gap-2 px-3 py-2.5 text-left text-xs font-medium text-amber-700 dark:text-amber-400 transition-colors hover:opacity-80"
15873
- }, /* @__PURE__ */ t.createElement(hm, null), /* @__PURE__ */ t.createElement(fm, { open: i }), "Debug information", /* @__PURE__ */ t.createElement("span", { className: "ml-auto text-[10px] font-normal opacity-60" }, "DEV")), i && /* @__PURE__ */ t.createElement("div", { className: "border-t border-amber-200/60 dark:border-amber-900/40 px-3 py-3 space-y-3" }, /* @__PURE__ */ t.createElement("div", { className: "space-y-1" }, /* @__PURE__ */ t.createElement("p", { className: "text-[10px] font-semibold uppercase tracking-wide text-amber-700/70 dark:text-amber-400/70" }, "Context"), /* @__PURE__ */ t.createElement("dl", { className: "grid grid-cols-[5rem_1fr] gap-x-2 gap-y-0.5 text-[11px] font-mono" }, /* @__PURE__ */ t.createElement("dt", { className: "text-muted-foreground" }, "URL"), /* @__PURE__ */ t.createElement("dd", { className: "truncate text-foreground" }, typeof window < "u" ? window.location.href : "-"), /* @__PURE__ */ t.createElement("dt", { className: "text-muted-foreground" }, "Time"), /* @__PURE__ */ t.createElement("dd", { className: "text-foreground" }, (/* @__PURE__ */ new Date()).toISOString()), /* @__PURE__ */ t.createElement("dt", { className: "text-muted-foreground" }, "Agent"), /* @__PURE__ */ t.createElement("dd", { className: "truncate text-foreground opacity-70" }, typeof navigator < "u" ? navigator.userAgent : "-"))), f.length > 0 && /* @__PURE__ */ t.createElement("div", { className: "space-y-1" }, /* @__PURE__ */ t.createElement("p", { className: "text-[10px] font-semibold uppercase tracking-wide text-amber-700/70 dark:text-amber-400/70" }, "Component tree"), /* @__PURE__ */ t.createElement("pre", { className: "max-h-36 overflow-y-auto text-[11px] font-mono leading-relaxed text-foreground/80 whitespace-before-wrap" }, f.join("\n"))), /* @__PURE__ */ t.createElement("button", {
15889
+ }, /* @__PURE__ */ t.createElement(mm, null), /* @__PURE__ */ t.createElement(dm, { open: i }), "Debug information", /* @__PURE__ */ t.createElement("span", { className: "ml-auto text-[10px] font-normal opacity-60" }, "DEV")), i && /* @__PURE__ */ t.createElement("div", { className: "border-t border-amber-200/60 dark:border-amber-900/40 px-3 py-3 space-y-3" }, /* @__PURE__ */ t.createElement("div", { className: "space-y-1" }, /* @__PURE__ */ t.createElement("p", { className: "text-[10px] font-semibold uppercase tracking-wide text-amber-700/70 dark:text-amber-400/70" }, "Context"), /* @__PURE__ */ t.createElement("dl", { className: "grid grid-cols-[5rem_1fr] gap-x-2 gap-y-0.5 text-[11px] font-mono" }, /* @__PURE__ */ t.createElement("dt", { className: "text-muted-foreground" }, "URL"), /* @__PURE__ */ t.createElement("dd", { className: "truncate text-foreground" }, typeof window < "u" ? window.location.href : "-"), /* @__PURE__ */ t.createElement("dt", { className: "text-muted-foreground" }, "Time"), /* @__PURE__ */ t.createElement("dd", { className: "text-foreground" }, (/* @__PURE__ */ new Date()).toISOString()), /* @__PURE__ */ t.createElement("dt", { className: "text-muted-foreground" }, "Agent"), /* @__PURE__ */ t.createElement("dd", { className: "truncate text-foreground opacity-70" }, typeof navigator < "u" ? navigator.userAgent : "-"))), f.length > 0 && /* @__PURE__ */ t.createElement("div", { className: "space-y-1" }, /* @__PURE__ */ t.createElement("p", { className: "text-[10px] font-semibold uppercase tracking-wide text-amber-700/70 dark:text-amber-400/70" }, "Component tree"), /* @__PURE__ */ t.createElement("pre", { className: "max-h-36 overflow-y-auto text-[11px] font-mono leading-relaxed text-foreground/80 whitespace-before-wrap" }, f.join("\n"))), /* @__PURE__ */ t.createElement("button", {
15874
15890
  onClick: this.copy,
15875
15891
  className: "flex items-center gap-1.5 rounded border px-2.5 py-1 text-[11px] font-medium transition-colors hover:bg-accent"
15876
- }, /* @__PURE__ */ t.createElement(pm, null), a ? "Copied!" : "Copy debug info"))), /* @__PURE__ */ t.createElement("div", { className: "flex flex-wrap items-center gap-2" }, /* @__PURE__ */ t.createElement("button", {
15892
+ }, /* @__PURE__ */ t.createElement(fm, null), a ? "Copied!" : "Copy debug info"))), /* @__PURE__ */ t.createElement("div", { className: "flex flex-wrap items-center gap-2" }, /* @__PURE__ */ t.createElement("button", {
15877
15893
  onClick: this.reset,
15878
15894
  className: "rounded-md border bg-background px-4 py-1.5 text-sm font-medium shadow-sm transition-colors hover:bg-accent"
15879
15895
  }, "Try again"), /* @__PURE__ */ t.createElement("a", {
@@ -15883,15 +15899,15 @@ var um = () => {
15883
15899
  onClick: this.sendReport,
15884
15900
  disabled: o === "sending" || o === "sent",
15885
15901
  className: "ml-auto flex items-center gap-1.5 rounded-md border px-4 py-1.5 text-sm font-medium transition-colors hover:bg-accent disabled:opacity-50"
15886
- }, /* @__PURE__ */ t.createElement(mm, null), o === "idle" && "Send report", o === "sending" && "Sending...", o === "sent" && "Report sent ✓", o === "failed" && "Failed - retry"))));
15902
+ }, /* @__PURE__ */ t.createElement(pm, null), o === "idle" && "Send report", o === "sending" && "Sending...", o === "sent" && "Report sent ✓", o === "failed" && "Failed - retry"))));
15887
15903
  }
15888
- }, ym = async () => {
15904
+ }, vm = async () => {
15889
15905
  window.google?.accounts?.id || (vt([{
15890
15906
  src: "https://accounts.google.com/gsi/client",
15891
15907
  async: !0,
15892
15908
  clean: !0
15893
15909
  }]), await new Promise((e) => setTimeout(e, 0)));
15894
- }, bm = class {
15910
+ }, ym = class {
15895
15911
  getConfigurationState() {
15896
15912
  return oi("GoogleAuthProvider", ai(Oa("oAuth2"), ["clientId"], "google.oAuth2."));
15897
15913
  }
@@ -15914,7 +15930,7 @@ var um = () => {
15914
15930
  async signIn(e = {}) {
15915
15931
  let t = Oa("oAuth2");
15916
15932
  if (!this.isConfigured() || !t?.clientId) throw Error("GoogleAuthProvider: missing google.oAuth2.clientId configuration.");
15917
- return await ym(), new Promise((n, r) => {
15933
+ return await vm(), new Promise((n, r) => {
15918
15934
  if (!window.google?.accounts?.id) {
15919
15935
  r(/* @__PURE__ */ Error("GoogleAuthProvider: Google Identity Services script is not available."));
15920
15936
  return;
@@ -15995,41 +16011,41 @@ var um = () => {
15995
16011
  isAuthenticated() {
15996
16012
  return !!this.getUser();
15997
16013
  }
15998
- }, xm = a(null), Sm = ({ registry: e, defaultKey: n, children: r }) => {
16014
+ }, bm = a(null), xm = ({ registry: e, defaultKey: n, children: r }) => {
15999
16015
  let i = p(() => ({
16000
16016
  registry: e,
16001
16017
  defaultKey: n
16002
16018
  }), [e, n]);
16003
- return /* @__PURE__ */ t.createElement(xm.Provider, { value: i }, r);
16004
- }, Cm = (e) => {
16005
- let t = c(xm);
16019
+ return /* @__PURE__ */ t.createElement(bm.Provider, { value: i }, r);
16020
+ }, Sm = (e) => {
16021
+ let t = c(bm);
16006
16022
  if (!t) return null;
16007
16023
  let n = e ?? t.defaultKey;
16008
16024
  return t.registry[n] ?? null;
16009
- }, wm = a(null), Tm = ({ registry: e, defaultKey: n, children: r }) => {
16025
+ }, Cm = a(null), wm = ({ registry: e, defaultKey: n, children: r }) => {
16010
16026
  let i = p(() => ({
16011
16027
  registry: e,
16012
16028
  defaultKey: n
16013
16029
  }), [e, n]);
16014
- return /* @__PURE__ */ t.createElement(wm.Provider, { value: i }, r);
16015
- }, Em = (e) => {
16016
- let t = c(wm);
16030
+ return /* @__PURE__ */ t.createElement(Cm.Provider, { value: i }, r);
16031
+ }, Tm = (e) => {
16032
+ let t = c(Cm);
16017
16033
  if (!t) throw Error("useCredentialsProvider must be used inside <App providers={...} />.");
16018
16034
  let n = e ?? t.defaultKey, r = t.registry[n];
16019
16035
  if (!r) throw Error(`CredentialsProvider '${n}' is not registered. Available: ${Object.keys(t.registry).join(", ")}`);
16020
16036
  return r;
16021
- }, Dm = {
16037
+ }, Em = {
16022
16038
  key: "@key",
16023
16039
  value: "@value"
16024
- }, Om = () => Ie(), km = (e, t, n) => {
16040
+ }, Dm = () => Ie(), Om = (e, t, n) => {
16025
16041
  let r = `Error during ${e}: ${String(t)}`;
16026
16042
  if (n) throw Error(r);
16027
16043
  console.error(r);
16028
- }, Am = (e, t) => {
16044
+ }, km = (e, t) => {
16029
16045
  if (!e || !(t in e)) return e;
16030
16046
  let { [t]: n, ...r } = e;
16031
16047
  return Object.keys(r).length ? r : void 0;
16032
- }, jm = (e) => {
16048
+ }, Am = (e) => {
16033
16049
  let t = typeof e == "object" && e && !Array.isArray(e) ? e : Array.isArray(e) ? { in: e } : { eq: e }, n;
16034
16050
  return t.gt !== void 0 && (n = {
16035
16051
  ...n,
@@ -16047,28 +16063,28 @@ var um = () => {
16047
16063
  condition: t,
16048
16064
  clientCondition: n
16049
16065
  };
16050
- }, Mm = (e, t) => {
16066
+ }, jm = (e, t) => {
16051
16067
  switch (t) {
16052
- case Dm.key: return Ve(e, ze());
16053
- case Dm.value: return Ve(e, Be());
16068
+ case Em.key: return Ve(e, ze());
16069
+ case Em.value: return Ve(e, Be());
16054
16070
  default: return Ve(e, Re(t));
16055
16071
  }
16056
- }, Nm = (e, t, n) => {
16072
+ }, Mm = (e, t, n) => {
16057
16073
  let [r] = Object.entries(t || {});
16058
16074
  if (!r) return {
16059
16075
  dbRef: e,
16060
16076
  clientWhere: n
16061
16077
  };
16062
- let [i] = r, a = Mm(e, i), o = n?.[i];
16078
+ let [i] = r, a = jm(e, i), o = n?.[i];
16063
16079
  if (o == null) return {
16064
16080
  dbRef: a,
16065
16081
  clientWhere: n
16066
16082
  };
16067
- let { condition: s, clientCondition: c } = jm(o);
16083
+ let { condition: s, clientCondition: c } = Am(o);
16068
16084
  switch (!0) {
16069
16085
  case s.eq !== void 0: return {
16070
16086
  dbRef: Ve(a, Fe(s.eq)),
16071
- clientWhere: Am(n, i)
16087
+ clientWhere: km(n, i)
16072
16088
  };
16073
16089
  case s.gte !== void 0 && s.lte !== void 0:
16074
16090
  a = Ve(a, Ge(s.gte), Pe(s.lte));
@@ -16098,11 +16114,11 @@ var um = () => {
16098
16114
  return {
16099
16115
  dbRef: a,
16100
16116
  clientWhere: c ? {
16101
- ...Am(n, i) || {},
16117
+ ...km(n, i) || {},
16102
16118
  [i]: c
16103
- } : Am(n, i)
16119
+ } : km(n, i)
16104
16120
  };
16105
- }, Pm = (e, t) => {
16121
+ }, Nm = (e, t) => {
16106
16122
  if (!t) return e;
16107
16123
  let n = t.split("."), r = e;
16108
16124
  for (let e of n) {
@@ -16110,10 +16126,10 @@ var um = () => {
16110
16126
  r = r[e];
16111
16127
  }
16112
16128
  return r;
16113
- }, Fm = (e, t) => e === t ? 0 : e == null ? -1 : t == null ? 1 : typeof e == "number" && typeof t == "number" ? e - t : typeof e == "boolean" && typeof t == "boolean" ? Number(e) - Number(t) : globalThis.String(e).localeCompare(globalThis.String(t), void 0, {
16129
+ }, Pm = (e, t) => e === t ? 0 : e == null ? -1 : t == null ? 1 : typeof e == "number" && typeof t == "number" ? e - t : typeof e == "boolean" && typeof t == "boolean" ? Number(e) - Number(t) : globalThis.String(e).localeCompare(globalThis.String(t), void 0, {
16114
16130
  numeric: !0,
16115
16131
  sensitivity: "base"
16116
- }), Im = (e, t) => {
16132
+ }), Fm = (e, t) => {
16117
16133
  let n = typeof t == "object" && t && !Array.isArray(t) ? t : { eq: t };
16118
16134
  for (let [t, r] of Object.entries(n)) switch (t) {
16119
16135
  case "eq":
@@ -16140,23 +16156,23 @@ var um = () => {
16140
16156
  default: return !1;
16141
16157
  }
16142
16158
  return !0;
16143
- }, Lm = (e, t, n) => {
16159
+ }, Im = (e, t, n) => {
16144
16160
  let [r, ...i] = Object.entries(n || {}), a = Object.entries(t || {}), o = Object.entries(e);
16145
- if (a.length && (o = o.filter(([, e]) => a.every(([t, n]) => Im(Pm(e, t), n)))), r) {
16161
+ if (a.length && (o = o.filter(([, e]) => a.every(([t, n]) => Fm(Nm(e, t), n)))), r) {
16146
16162
  let e = [r, ...i];
16147
16163
  o.sort((t, n) => {
16148
16164
  for (let [r, i] of e) {
16149
- let e = Fm(Pm(t[1], r), Pm(n[1], r));
16165
+ let e = Pm(Nm(t[1], r), Nm(n[1], r));
16150
16166
  if (e) return i === "desc" ? -e : e;
16151
16167
  }
16152
16168
  return 0;
16153
16169
  });
16154
16170
  }
16155
16171
  return Object.fromEntries(o);
16156
- }, Rm = async (e) => {
16157
- let t = await Fa()?.currentUser?.getIdToken().catch(() => void 0), n = new URL(`${e}.json`, He(Om()).toString());
16172
+ }, Lm = async (e) => {
16173
+ let t = await Fa()?.currentUser?.getIdToken().catch(() => void 0), n = new URL(`${e}.json`, He(Dm()).toString());
16158
16174
  return n.searchParams.set("shallow", "true"), t && n.searchParams.set("auth", t), n.toString();
16159
- }, zm = class e {
16175
+ }, Rm = class e {
16160
16176
  static listenerRegistered = !1;
16161
16177
  constructor() {
16162
16178
  !e.listenerRegistered && typeof wa == "function" && (e.listenerRegistered = !0, wa((e) => {
@@ -16171,43 +16187,43 @@ var um = () => {
16171
16187
  }
16172
16188
  readShallow = async (e, t = !1) => {
16173
16189
  try {
16174
- let t = await Rm(e), n = await fetch(t);
16190
+ let t = await Lm(e), n = await fetch(t);
16175
16191
  if (!n.ok) throw Error(`${n.status} ${n.statusText}`);
16176
16192
  let r = await n.json();
16177
16193
  return r ? Object.keys(r) : [];
16178
16194
  } catch (n) {
16179
- return km(`reading SHALLOW data in Firebase for ${e}`, n, t), [];
16195
+ return Om(`reading SHALLOW data in Firebase for ${e}`, n, t), [];
16180
16196
  }
16181
16197
  };
16182
16198
  read = async (e, { where: t, order: n, toArray: r = !1, exception: i = !1 } = {}) => {
16183
- let { dbRef: a, clientWhere: o } = Nm(He(Om(), e), n, t);
16199
+ let { dbRef: a, clientWhere: o } = Mm(He(Dm(), e), n, t);
16184
16200
  try {
16185
16201
  let t = await J(a);
16186
16202
  if (t.exists()) {
16187
16203
  `${e}`;
16188
- let i = Lm(t.val(), o, n);
16204
+ let i = Im(t.val(), o, n);
16189
16205
  return r ? Object.values(i) : i;
16190
- } else i && km(`Data not found in Firebase for path ${e}`, null, i);
16206
+ } else i && Om(`Data not found in Firebase for path ${e}`, null, i);
16191
16207
  } catch (t) {
16192
- km(`reading data in Firebase for ${e}`, t, i);
16208
+ Om(`reading data in Firebase for ${e}`, t, i);
16193
16209
  }
16194
16210
  };
16195
16211
  update = async (e, t, n = !1) => {
16196
16212
  try {
16197
- await Ke(He(Om(), e), t), `${e}`;
16213
+ await Ke(He(Dm(), e), t), `${e}`;
16198
16214
  } catch (t) {
16199
- km(`updating data in Firebase for ${e}`, t, n);
16215
+ Om(`updating data in Firebase for ${e}`, t, n);
16200
16216
  }
16201
16217
  };
16202
16218
  set = async (e, t, n = !1) => {
16203
16219
  try {
16204
- await We(He(Om(), e), t), `${e}`;
16220
+ await We(He(Dm(), e), t), `${e}`;
16205
16221
  } catch (t) {
16206
- km(`updating data in Firebase for ${e}`, t, n);
16222
+ Om(`updating data in Firebase for ${e}`, t, n);
16207
16223
  }
16208
16224
  };
16209
16225
  setChunks = async (e, t, { chunkSize: n = 1e3, purge: r = !1, onProgress: i } = {}) => {
16210
- let a = He(Om(), e);
16226
+ let a = He(Dm(), e);
16211
16227
  try {
16212
16228
  r && (await Ue(a), i?.(0, 0, `Purging existing data at ${e}`));
16213
16229
  let o = Object.entries(Nt(t)), s = Math.ceil(o.length / n);
@@ -16217,14 +16233,14 @@ var um = () => {
16217
16233
  i?.(t, s, `Saving chunk ${t}/${s}`);
16218
16234
  }
16219
16235
  } catch (t) {
16220
- km(`setting data in chunks in Firebase for ${e}`, t, !1);
16236
+ Om(`setting data in chunks in Firebase for ${e}`, t, !1);
16221
16237
  }
16222
16238
  };
16223
16239
  remove = async (e, t = !1) => {
16224
16240
  try {
16225
- await Ue(He(Om(), e)), `${e}`;
16241
+ await Ue(He(Dm(), e)), `${e}`;
16226
16242
  } catch (n) {
16227
- km(`removing data from Firebase for ${e}`, n, t);
16243
+ Om(`removing data from Firebase for ${e}`, n, t);
16228
16244
  }
16229
16245
  };
16230
16246
  count = async (e) => (await this.readShallow(e)).length;
@@ -16232,14 +16248,14 @@ var um = () => {
16232
16248
  let o = Fa();
16233
16249
  if (!o || !e) return () => void 0;
16234
16250
  let s = () => {
16235
- let { dbRef: o, clientWhere: s } = Nm(He(Om(), e), r, n);
16251
+ let { dbRef: o, clientWhere: s } = Mm(He(Dm(), e), r, n);
16236
16252
  return Le(o, (e) => {
16237
16253
  let n = e.val();
16238
16254
  if (!n) {
16239
16255
  t([]);
16240
16256
  return;
16241
16257
  }
16242
- let o = a ? a(Lm(n, s, r)) : Lm(n, s, r), c = Object.entries(o);
16258
+ let o = a ? a(Im(n, s, r)) : Im(n, s, r), c = Object.entries(o);
16243
16259
  if (!i) {
16244
16260
  t(c.map(([e, t], n) => typeof t == "object" && t ? {
16245
16261
  _index: n,
@@ -16248,22 +16264,22 @@ var um = () => {
16248
16264
  } : {
16249
16265
  _index: n,
16250
16266
  [za]: e,
16251
- [Dm.value]: t
16267
+ [Em.value]: t
16252
16268
  }));
16253
16269
  return;
16254
16270
  }
16255
16271
  let l = Object.keys(i);
16256
16272
  t(c.map(([e, t], n) => {
16257
16273
  let r = typeof t == "object" && t ? {
16258
- [Dm.key]: e,
16274
+ [Em.key]: e,
16259
16275
  ...t
16260
16276
  } : {
16261
- [Dm.key]: e,
16262
- [Dm.value]: t
16277
+ [Em.key]: e,
16278
+ [Em.value]: t
16263
16279
  }, a = {};
16264
16280
  for (let n of l) {
16265
16281
  let o = i[n];
16266
- a[n] = o.includes("{") ? et.parse(r, o) : o === Dm.key ? e : o === Dm.value ? t : r[o];
16282
+ a[n] = o.includes("{") ? et.parse(r, o) : o === Em.key ? e : o === Em.value ? t : r[o];
16267
16283
  }
16268
16284
  return {
16269
16285
  [za]: e,
@@ -16280,10 +16296,10 @@ var um = () => {
16280
16296
  };
16281
16297
  };
16282
16298
  };
16283
- new zm();
16299
+ new Rm();
16284
16300
  //#endregion
16285
16301
  //#region src/providers/auth/firebase/FirebaseAuthProvider.ts
16286
- var Bm = {
16302
+ var zm = {
16287
16303
  github: "github.com",
16288
16304
  apple: "apple.com",
16289
16305
  microsoft: "microsoft.com",
@@ -16291,10 +16307,10 @@ var Bm = {
16291
16307
  twitter: "twitter.com",
16292
16308
  facebook: "facebook.com"
16293
16309
  };
16294
- function Vm(e) {
16295
- return new R(Bm[e] ?? e);
16310
+ function Bm(e) {
16311
+ return new R(zm[e] ?? e);
16296
16312
  }
16297
- function Hm(e) {
16313
+ function Vm(e) {
16298
16314
  return e ? {
16299
16315
  uid: e.uid,
16300
16316
  email: e.email ?? void 0,
@@ -16303,7 +16319,7 @@ function Hm(e) {
16303
16319
  isAnonymous: e.isAnonymous
16304
16320
  } : null;
16305
16321
  }
16306
- var Um = class {
16322
+ var Hm = class {
16307
16323
  options;
16308
16324
  appName;
16309
16325
  initPromise;
@@ -16317,7 +16333,7 @@ var Um = class {
16317
16333
  return this.getConfigurationState().configured;
16318
16334
  }
16319
16335
  getUser() {
16320
- return Hm(Fa(this.appName)?.currentUser ?? null);
16336
+ return Vm(Fa(this.appName)?.currentUser ?? null);
16321
16337
  }
16322
16338
  isAuthenticated() {
16323
16339
  return !!this.getUser();
@@ -16329,18 +16345,18 @@ var Um = class {
16329
16345
  let n = e.method ?? "password";
16330
16346
  if (n === "anonymous") {
16331
16347
  let { user: e } = await ee(t);
16332
- return Hm(e);
16348
+ return Vm(e);
16333
16349
  }
16334
16350
  if (n === "oauth") {
16335
16351
  let { provider: n } = e;
16336
16352
  if (!n) throw Error("FirebaseAuthProvider.signIn: provider is required for oauth");
16337
- let { user: r } = await re(t, Vm(n));
16338
- return Hm(r);
16353
+ let { user: r } = await re(t, Bm(n));
16354
+ return Vm(r);
16339
16355
  }
16340
16356
  let { email: r, password: i } = e;
16341
16357
  if (!r || !i) throw Error("FirebaseAuthProvider.signIn: email and password are required");
16342
16358
  let { user: a } = await ne(t, r, i);
16343
- return Hm(a);
16359
+ return Vm(a);
16344
16360
  }
16345
16361
  async signOut() {
16346
16362
  await this.initPromise;
@@ -16351,7 +16367,7 @@ var Um = class {
16351
16367
  onAuthChange(e) {
16352
16368
  if (!this.options.config) {
16353
16369
  let t = Fa(this.appName);
16354
- return t ? H(t, (t) => e(Hm(t))) : (e(null), () => {});
16370
+ return t ? H(t, (t) => e(Vm(t))) : (e(null), () => {});
16355
16371
  }
16356
16372
  let t = () => {}, n = !1;
16357
16373
  return this.initPromise.then(() => {
@@ -16361,7 +16377,7 @@ var Um = class {
16361
16377
  e(null);
16362
16378
  return;
16363
16379
  }
16364
- t = H(r, (t) => e(Hm(t)));
16380
+ t = H(r, (t) => e(Vm(t)));
16365
16381
  }), () => {
16366
16382
  n = !0, t();
16367
16383
  };
@@ -16379,26 +16395,26 @@ var Um = class {
16379
16395
  let { claims: n } = await t.currentUser.getIdTokenResult(e);
16380
16396
  return n;
16381
16397
  }
16382
- }, Wm = "https://oauth2.googleapis.com/token";
16383
- function Gm(e) {
16398
+ }, Um = "https://oauth2.googleapis.com/token";
16399
+ function Wm(e) {
16384
16400
  let t = e.replace(/-----BEGIN PRIVATE KEY-----/, "").replace(/-----END PRIVATE KEY-----/, "").replace(/\s+/g, ""), n = atob(t), r = new Uint8Array(n.length);
16385
16401
  for (let e = 0; e < n.length; e++) r[e] = n.charCodeAt(e);
16386
16402
  return r.buffer;
16387
16403
  }
16388
- function Km(e) {
16404
+ function Gm(e) {
16389
16405
  return btoa(typeof e == "string" ? e : String.fromCharCode(...new Uint8Array(e))).replace(/\+/g, "-").replace(/\//g, "_").replace(/=+$/, "");
16390
16406
  }
16391
- async function qm(e, t) {
16392
- let n = `${Km(JSON.stringify({
16407
+ async function Km(e, t) {
16408
+ let n = `${Gm(JSON.stringify({
16393
16409
  alg: "RS256",
16394
16410
  typ: "JWT"
16395
- }))}.${Km(JSON.stringify(e))}`, r = await crypto.subtle.importKey("pkcs8", Gm(t), {
16411
+ }))}.${Gm(JSON.stringify(e))}`, r = await crypto.subtle.importKey("pkcs8", Wm(t), {
16396
16412
  name: "RSASSA-PKCS1-v1_5",
16397
16413
  hash: "SHA-256"
16398
16414
  }, !1, ["sign"]);
16399
- return `${n}.${Km(await crypto.subtle.sign("RSASSA-PKCS1-v1_5", r, new TextEncoder().encode(n)))}`;
16415
+ return `${n}.${Gm(await crypto.subtle.sign("RSASSA-PKCS1-v1_5", r, new TextEncoder().encode(n)))}`;
16400
16416
  }
16401
- var Jm = class {
16417
+ var qm = class {
16402
16418
  config;
16403
16419
  cache = /* @__PURE__ */ new Map();
16404
16420
  constructor(e) {
@@ -16407,13 +16423,13 @@ var Jm = class {
16407
16423
  async getToken(e = "https://www.googleapis.com/auth/cloud-platform") {
16408
16424
  let t = this.cache.get(e);
16409
16425
  if (t && t.expiresAt > Date.now() + 6e4) return t.token;
16410
- let n = Math.floor(Date.now() / 1e3), r = await qm({
16426
+ let n = Math.floor(Date.now() / 1e3), r = await Km({
16411
16427
  iss: this.config.client_email,
16412
16428
  scope: e,
16413
- aud: Wm,
16429
+ aud: Um,
16414
16430
  iat: n,
16415
16431
  exp: n + 3600
16416
- }, this.config.private_key), i = await fetch(Wm, {
16432
+ }, this.config.private_key), i = await fetch(Um, {
16417
16433
  method: "POST",
16418
16434
  headers: { "Content-Type": "application/x-www-form-urlencoded" },
16419
16435
  body: new URLSearchParams({
@@ -16431,7 +16447,7 @@ var Jm = class {
16431
16447
  expiresAt: Date.now() + (a.expires_in ?? 3600) * 1e3
16432
16448
  }), a.access_token;
16433
16449
  }
16434
- }, Ym = "www.dropbox.com/oauth2", Xm = class {
16450
+ }, Jm = "www.dropbox.com/oauth2", Ym = class {
16435
16451
  config;
16436
16452
  constructor(e) {
16437
16453
  this.config = e;
@@ -16455,7 +16471,7 @@ var Jm = class {
16455
16471
  async signIn(e = {}) {
16456
16472
  if (!this.isConfigured()) throw Error("DropboxAuthProvider: missing dropbox.clientId configuration.");
16457
16473
  return pi({
16458
- authServer: Ym,
16474
+ authServer: Jm,
16459
16475
  clientID: this.config.clientId,
16460
16476
  scopes: e.scopes,
16461
16477
  refreshParamName: "token_access_type"
@@ -16476,7 +16492,7 @@ var Jm = class {
16476
16492
  isAuthenticated() {
16477
16493
  return this.isConfigured() ? !!vi(this.config.clientId)?.access_token : !1;
16478
16494
  }
16479
- }, Zm = (e) => {
16495
+ }, Xm = (e) => {
16480
16496
  let t = Oa("oAuth2");
16481
16497
  if (!t) return console.warn("GoogleAuth: Missing oAuth2.clientId in configuration"), Promise.reject("Google client ID not found");
16482
16498
  let n = e.join(" "), r = `googleAccessToken::${n}`, i = `googleExpiresAt::${n}`;
@@ -16493,8 +16509,8 @@ var Jm = class {
16493
16509
  };
16494
16510
  //#endregion
16495
16511
  //#region src/providers/email/google/email.ts
16496
- async function Qm({ to: e, bcc: t, subject: n, message: r }) {
16497
- let i = await Zm(["https://www.googleapis.com/auth/gmail.send"]), a = [`To: ${e.join(", ")}`];
16512
+ async function Zm({ to: e, bcc: t, subject: n, message: r }) {
16513
+ let i = await Xm(["https://www.googleapis.com/auth/gmail.send"]), a = [`To: ${e.join(", ")}`];
16498
16514
  t && t.length && a.push(`Bcc: ${t.join(", ")}`);
16499
16515
  let o = [
16500
16516
  ...a,
@@ -16519,7 +16535,7 @@ async function Qm({ to: e, bcc: t, subject: n, message: r }) {
16519
16535
  }
16520
16536
  //#endregion
16521
16537
  //#region src/providers/email/google/GmailEmailProvider.ts
16522
- var $m = class {
16538
+ var Qm = class {
16523
16539
  getConfigurationState() {
16524
16540
  return oi("GmailEmailProvider", ai(Oa("oAuth2"), ["clientId"], "google.oAuth2."));
16525
16541
  }
@@ -16528,7 +16544,7 @@ var $m = class {
16528
16544
  }
16529
16545
  async send(e) {
16530
16546
  if (!this.isConfigured()) throw Error(this.getConfigurationState().reason || "GmailEmailProvider is not configured.");
16531
- await Qm({
16547
+ await Zm({
16532
16548
  to: Array.isArray(e.to) ? e.to : [e.to],
16533
16549
  bcc: e.bcc ? Array.isArray(e.bcc) ? e.bcc : [e.bcc] : void 0,
16534
16550
  subject: e.subject,
@@ -16538,7 +16554,7 @@ var $m = class {
16538
16554
  };
16539
16555
  //#endregion
16540
16556
  //#region src/providers/auth/supabase/SupabaseAuthProvider.ts
16541
- function eh(e) {
16557
+ function $m(e) {
16542
16558
  return e ? {
16543
16559
  uid: e.id,
16544
16560
  email: e.email ?? void 0,
@@ -16547,7 +16563,7 @@ function eh(e) {
16547
16563
  raw: e
16548
16564
  } : null;
16549
16565
  }
16550
- var th = class {
16566
+ var eh = class {
16551
16567
  config;
16552
16568
  get client() {
16553
16569
  return Za(this.config.url, this.config.anonKey);
@@ -16562,7 +16578,7 @@ var th = class {
16562
16578
  return this.getConfigurationState().configured;
16563
16579
  }
16564
16580
  getUser() {
16565
- return eh((this.client.auth?._session ?? null)?.user ?? null);
16581
+ return $m((this.client.auth?._session ?? null)?.user ?? null);
16566
16582
  }
16567
16583
  isAuthenticated() {
16568
16584
  return !!this.getUser();
@@ -16572,7 +16588,7 @@ var th = class {
16572
16588
  if (t === "anonymous") {
16573
16589
  let { data: e, error: t } = await this.client.auth.signInAnonymously();
16574
16590
  if (t) throw t;
16575
- return eh(e.user);
16591
+ return $m(e.user);
16576
16592
  }
16577
16593
  if (t === "magic_link") {
16578
16594
  let t = e.email;
@@ -16601,7 +16617,7 @@ var th = class {
16601
16617
  password: r
16602
16618
  });
16603
16619
  if (a) throw a;
16604
- return eh(i.user);
16620
+ return $m(i.user);
16605
16621
  }
16606
16622
  async signOut() {
16607
16623
  let { error: e } = await this.client.auth.signOut();
@@ -16609,10 +16625,10 @@ var th = class {
16609
16625
  }
16610
16626
  onAuthChange(e) {
16611
16627
  this.client.auth.getSession().then(({ data: t }) => {
16612
- e(eh(t.session?.user ?? null));
16628
+ e($m(t.session?.user ?? null));
16613
16629
  });
16614
16630
  let { data: { subscription: t } } = this.client.auth.onAuthStateChange((t, n) => {
16615
- e(eh(n?.user ?? null));
16631
+ e($m(n?.user ?? null));
16616
16632
  });
16617
16633
  return () => t.unsubscribe();
16618
16634
  }
@@ -16623,15 +16639,15 @@ var th = class {
16623
16639
  if (!n) throw Error("SupabaseAuthProvider: no active session");
16624
16640
  return n;
16625
16641
  }
16626
- }, nh = "https://api.anthropic.com/v1/models", rh = "https://api.anthropic.com/v1/messages";
16627
- function ih(e) {
16642
+ }, th = "https://api.anthropic.com/v1/models", nh = "https://api.anthropic.com/v1/messages";
16643
+ function rh(e) {
16628
16644
  return {
16629
16645
  name: e.name,
16630
16646
  description: e.description,
16631
16647
  input_schema: e.inputSchema
16632
16648
  };
16633
16649
  }
16634
- function ah(e) {
16650
+ function ih(e) {
16635
16651
  if (e.role === "user") return {
16636
16652
  role: "user",
16637
16653
  content: e.content
@@ -16663,7 +16679,7 @@ function ah(e) {
16663
16679
  }))
16664
16680
  };
16665
16681
  }
16666
- function oh(e) {
16682
+ function ah(e) {
16667
16683
  let t = e?.content;
16668
16684
  if (!Array.isArray(t)) return null;
16669
16685
  let n = t.filter((e) => e?.type === "text").map((e) => String(e.text ?? "")), r = t.filter((e) => e?.type === "tool_use");
@@ -16682,7 +16698,7 @@ function oh(e) {
16682
16698
  text: i
16683
16699
  } : null;
16684
16700
  }
16685
- var sh = {
16701
+ var oh = {
16686
16702
  id: "anthropic",
16687
16703
  label: "Anthropic",
16688
16704
  description: "Claude models via the Anthropic API.",
@@ -16706,7 +16722,7 @@ var sh = {
16706
16722
  supportsDocuments: !0
16707
16723
  },
16708
16724
  discoverModels: async (e) => {
16709
- let t = await Wt(nh, { headers: {
16725
+ let t = await Wt(th, { headers: {
16710
16726
  "x-api-key": e,
16711
16727
  "anthropic-version": "2023-06-01"
16712
16728
  } }, al);
@@ -16734,7 +16750,7 @@ var sh = {
16734
16750
  type: "text",
16735
16751
  text: n.prompt
16736
16752
  }] : n.prompt;
16737
- return oh(await Wt(rh, {
16753
+ return ah(await Wt(nh, {
16738
16754
  method: "POST",
16739
16755
  headers: {
16740
16756
  "x-api-key": t,
@@ -16745,18 +16761,18 @@ var sh = {
16745
16761
  model: n.model,
16746
16762
  max_tokens: 4096,
16747
16763
  ...n.role ? { system: Jc.parseRole(n.role, n) } : {},
16748
- messages: [...(n.history ?? []).map(ah), ...n.prompt ? [{
16764
+ messages: [...(n.history ?? []).map(ih), ...n.prompt ? [{
16749
16765
  role: "user",
16750
16766
  content: i
16751
16767
  }] : []],
16752
- ...n.tools?.length ? { tools: n.tools.map(ih) } : {},
16768
+ ...n.tools?.length ? { tools: n.tools.map(rh) } : {},
16753
16769
  ...typeof n.temperature == "number" ? { temperature: n.temperature } : {}
16754
16770
  },
16755
16771
  signal: n.signal
16756
16772
  }, al));
16757
16773
  }
16758
- }, ch = (e) => e.replace(/\/+$/, "");
16759
- function lh(e) {
16774
+ }, sh = (e) => e.replace(/\/+$/, "");
16775
+ function ch(e) {
16760
16776
  return {
16761
16777
  type: "function",
16762
16778
  function: {
@@ -16766,7 +16782,7 @@ function lh(e) {
16766
16782
  }
16767
16783
  };
16768
16784
  }
16769
- function uh(e) {
16785
+ function lh(e) {
16770
16786
  if (typeof e != "string") return {};
16771
16787
  try {
16772
16788
  return JSON.parse(e);
@@ -16774,7 +16790,7 @@ function uh(e) {
16774
16790
  return {};
16775
16791
  }
16776
16792
  }
16777
- function dh(e) {
16793
+ function uh(e) {
16778
16794
  return e.role === "user" ? [{
16779
16795
  role: "user",
16780
16796
  content: e.content
@@ -16795,7 +16811,7 @@ function dh(e) {
16795
16811
  content: typeof e.output == "string" ? e.output : JSON.stringify(e.output)
16796
16812
  }));
16797
16813
  }
16798
- function fh(e) {
16814
+ function dh(e) {
16799
16815
  let t = e?.choices?.[0]?.message;
16800
16816
  if (!t) return null;
16801
16817
  let n = Array.isArray(t.tool_calls) ? t.tool_calls : [];
@@ -16808,7 +16824,7 @@ function fh(e) {
16808
16824
  return {
16809
16825
  id: String(e.id),
16810
16826
  name: String(t.name ?? ""),
16811
- input: uh(t.arguments)
16827
+ input: lh(t.arguments)
16812
16828
  };
16813
16829
  }),
16814
16830
  text: e || void 0
@@ -16820,8 +16836,8 @@ function fh(e) {
16820
16836
  text: r
16821
16837
  } : null;
16822
16838
  }
16823
- var ph = ({ id: t, label: n, description: r, configKey: i, requiredConfigKeys: a, defaultModel: o, fallbackModels: s, baseUrl: c, modelsUrl: l, chatCompletionsUrl: u, dashboardUrl: d, credentialsHint: f, validateApiKey: p }) => {
16824
- let m = ch(c), h = l || `${m}/models`, g = u || `${m}/chat/completions`;
16839
+ var fh = ({ id: t, label: n, description: r, configKey: i, requiredConfigKeys: a, defaultModel: o, fallbackModels: s, baseUrl: c, modelsUrl: l, chatCompletionsUrl: u, dashboardUrl: d, credentialsHint: f, validateApiKey: p }) => {
16840
+ let m = sh(c), h = l || `${m}/models`, g = u || `${m}/chat/completions`;
16825
16841
  return {
16826
16842
  id: t,
16827
16843
  label: n,
@@ -16898,22 +16914,22 @@ var ph = ({ id: t, label: n, description: r, configKey: i, requiredConfigKeys: a
16898
16914
  role: "system",
16899
16915
  content: Jc.parseRole(r.role, r)
16900
16916
  }] : [],
16901
- ...(r.history ?? []).flatMap(dh),
16917
+ ...(r.history ?? []).flatMap(uh),
16902
16918
  ...r.prompt ? [{
16903
16919
  role: "user",
16904
16920
  content: a
16905
16921
  }] : []
16906
16922
  ],
16907
- ...r.tools?.length ? { tools: r.tools.map(lh) } : {},
16923
+ ...r.tools?.length ? { tools: r.tools.map(ch) } : {},
16908
16924
  ...typeof r.temperature == "number" ? { temperature: r.temperature } : {}
16909
16925
  },
16910
16926
  signal: r.signal
16911
16927
  }, al);
16912
16928
  if (!o) throw dl(n);
16913
- return fh(o);
16929
+ return dh(o);
16914
16930
  }
16915
16931
  };
16916
- }, mh = ph({
16932
+ }, ph = fh({
16917
16933
  id: "deepseek",
16918
16934
  label: "DeepSeek",
16919
16935
  description: "Cost-efficient reasoning and chat models.",
@@ -16923,15 +16939,15 @@ var ph = ({ id: t, label: n, description: r, configKey: i, requiredConfigKeys: a
16923
16939
  baseUrl: "https://api.deepseek.com",
16924
16940
  dashboardUrl: "https://platform.deepseek.com/api_keys",
16925
16941
  credentialsHint: "DeepSeek platform → API Keys → Create new API key."
16926
- }), hh = "https://generativelanguage.googleapis.com/v1beta/models", gh = "https://generativelanguage.googleapis.com/v1beta/models";
16927
- function _h(e) {
16942
+ }), mh = "https://generativelanguage.googleapis.com/v1beta/models", hh = "https://generativelanguage.googleapis.com/v1beta/models";
16943
+ function gh(e) {
16928
16944
  return [{ function_declarations: e.map((e) => ({
16929
16945
  name: e.name,
16930
16946
  description: e.description,
16931
16947
  parameters: e.inputSchema
16932
16948
  })) }];
16933
16949
  }
16934
- function vh(e) {
16950
+ function _h(e) {
16935
16951
  if (e.role === "user") return {
16936
16952
  role: "user",
16937
16953
  parts: [{ text: e.content }]
@@ -16956,7 +16972,7 @@ function vh(e) {
16956
16972
  } }))
16957
16973
  };
16958
16974
  }
16959
- function yh(e) {
16975
+ function vh(e) {
16960
16976
  let t = e?.candidates?.[0]?.content?.parts;
16961
16977
  if (!Array.isArray(t)) return null;
16962
16978
  let n = t.filter((e) => typeof e?.text == "string").map((e) => e.text), r = t.filter((e) => e?.functionCall);
@@ -16975,7 +16991,7 @@ function yh(e) {
16975
16991
  text: i
16976
16992
  } : null;
16977
16993
  }
16978
- var bh = {
16994
+ var yh = {
16979
16995
  id: "gemini",
16980
16996
  label: "Gemini",
16981
16997
  description: "Google's multimodal Gemini model family.",
@@ -16999,12 +17015,12 @@ var bh = {
16999
17015
  supportsDocuments: !0
17000
17016
  },
17001
17017
  discoverModels: async (e) => {
17002
- let t = await Wt(`${hh}?key=${e}`, null, al);
17018
+ let t = await Wt(`${mh}?key=${e}`, null, al);
17003
17019
  return Array.isArray(t?.models) ? t.models.map((e) => e.name?.replace(/^models\//, "")).filter(Boolean) : [];
17004
17020
  },
17005
17021
  validateApiKey: async (e) => {
17006
17022
  try {
17007
- let t = await Wt(`${hh}?key=${e}`, null, al);
17023
+ let t = await Wt(`${mh}?key=${e}`, null, al);
17008
17024
  return t === null ? {
17009
17025
  valid: !1,
17010
17026
  error: "Nessuna risposta dal server (CORS o rete)"
@@ -17025,22 +17041,22 @@ var bh = {
17025
17041
  mime_type: e.mimeType,
17026
17042
  data: e.base64
17027
17043
  } }), { text: n.prompt }];
17028
- return yh(await Wt(`${gh}/${n.model}:generateContent?key=${t}`, {
17044
+ return vh(await Wt(`${hh}/${n.model}:generateContent?key=${t}`, {
17029
17045
  method: "POST",
17030
17046
  headers: n.logId ? { [e]: n.logId } : void 0,
17031
17047
  body: {
17032
- contents: [...(n.history ?? []).map(vh), ...n.prompt ? [{
17048
+ contents: [...(n.history ?? []).map(_h), ...n.prompt ? [{
17033
17049
  role: "user",
17034
17050
  parts: r
17035
17051
  }] : []],
17036
17052
  ...n.role ? { systemInstruction: { parts: [{ text: Jc.parseRole(n.role, n) }] } } : {},
17037
- ...n.tools?.length ? { tools: _h(n.tools) } : {},
17053
+ ...n.tools?.length ? { tools: gh(n.tools) } : {},
17038
17054
  generationConfig: typeof n.temperature == "number" ? { temperature: n.temperature } : void 0
17039
17055
  },
17040
17056
  signal: n.signal
17041
17057
  }, al));
17042
17058
  }
17043
- }, xh = ph({
17059
+ }, bh = fh({
17044
17060
  id: "mistral",
17045
17061
  label: "Mistral",
17046
17062
  description: "European-hosted open and commercial language models.",
@@ -17054,7 +17070,7 @@ var bh = {
17054
17070
  baseUrl: "https://api.mistral.ai/v1",
17055
17071
  dashboardUrl: "https://console.mistral.ai/api-keys",
17056
17072
  credentialsHint: "Mistral Console → API Keys → Create new key."
17057
- }), Sh = ph({
17073
+ }), xh = fh({
17058
17074
  id: "openai",
17059
17075
  label: "OpenAI",
17060
17076
  description: "GPT models via the OpenAI API.",
@@ -17072,7 +17088,7 @@ var bh = {
17072
17088
  baseUrl: "https://api.openai.com/v1",
17073
17089
  dashboardUrl: "https://platform.openai.com/api-keys",
17074
17090
  credentialsHint: "OpenAI dashboard → API keys → Create new secret key."
17075
- }), Ch = "https://opencode.ai/zen/v1/models", wh = "https://opencode.ai/zen/v1/chat/completions", Th = {
17091
+ }), Sh = "https://opencode.ai/zen/v1/models", Ch = "https://opencode.ai/zen/v1/chat/completions", wh = {
17076
17092
  id: "opencode",
17077
17093
  label: "OpenCode",
17078
17094
  description: "OpenCode Zen — a curated set of coding-focused models.",
@@ -17104,7 +17120,7 @@ var bh = {
17104
17120
  supportsDocuments: !0
17105
17121
  },
17106
17122
  discoverModels: async (e) => {
17107
- let t = await Wt(Ch, { headers: { Authorization: `Bearer ${e}` } }, al);
17123
+ let t = await Wt(Sh, { headers: { Authorization: `Bearer ${e}` } }, al);
17108
17124
  return (Array.isArray(t?.data) ? t.data : Array.isArray(t?.models) ? t.models : Array.isArray(t) ? t : []).map((e) => e.id).filter((e) => typeof e == "string" && e.length > 0);
17109
17125
  },
17110
17126
  complete: async (t, n) => {
@@ -17120,7 +17136,7 @@ var bh = {
17120
17136
  }).concat({
17121
17137
  type: "text",
17122
17138
  text: n.prompt
17123
- }) : n.prompt, a = await Wt(wh, {
17139
+ }) : n.prompt, a = await Wt(Ch, {
17124
17140
  method: "POST",
17125
17141
  headers: {
17126
17142
  Authorization: `Bearer ${t}`,
@@ -17133,21 +17149,21 @@ var bh = {
17133
17149
  role: "system",
17134
17150
  content: Jc.parseRole(n.role, n)
17135
17151
  }] : [],
17136
- ...(n.history ?? []).flatMap(dh),
17152
+ ...(n.history ?? []).flatMap(uh),
17137
17153
  ...n.prompt ? [{
17138
17154
  role: "user",
17139
17155
  content: i
17140
17156
  }] : []
17141
17157
  ],
17142
- ...n.tools?.length ? { tools: n.tools.map(lh) } : {},
17158
+ ...n.tools?.length ? { tools: n.tools.map(ch) } : {},
17143
17159
  ...typeof n.temperature == "number" ? { temperature: n.temperature } : {}
17144
17160
  },
17145
17161
  signal: n.signal
17146
17162
  }, al);
17147
17163
  if (!a) throw dl("OpenCode");
17148
- return fh(a);
17164
+ return dh(a);
17149
17165
  }
17150
- }, Eh = ph({
17166
+ }, Th = fh({
17151
17167
  id: "openrouter",
17152
17168
  label: "OpenRouter",
17153
17169
  description: "Unified access to many model providers through one API.",
@@ -17181,10 +17197,10 @@ var bh = {
17181
17197
  };
17182
17198
  }
17183
17199
  }
17184
- }), Dh = {
17200
+ }), Eh = {
17185
17201
  dbRealtime: {
17186
17202
  service: "data",
17187
- create: () => new zm()
17203
+ create: () => new Rm()
17188
17204
  },
17189
17205
  firestoreDb: {
17190
17206
  service: "data",
@@ -17196,26 +17212,26 @@ var bh = {
17196
17212
  },
17197
17213
  firebaseAuth: {
17198
17214
  service: "auth",
17199
- create: () => new Um()
17215
+ create: () => new Hm()
17200
17216
  }
17201
- }, Oh = {
17217
+ }, Dh = {
17202
17218
  googleAuth: {
17203
17219
  service: "auth",
17204
- create: () => new bm()
17220
+ create: () => new ym()
17205
17221
  },
17206
17222
  gmail: {
17207
17223
  service: "email",
17208
- create: () => new $m()
17224
+ create: () => new Qm()
17209
17225
  },
17210
17226
  googleServiceAccount: {
17211
17227
  service: "credentials",
17212
- create: (e) => new Jm(e.serviceAccount),
17228
+ create: (e) => new qm(e.serviceAccount),
17213
17229
  when: (e) => !!e.serviceAccount
17214
17230
  }
17215
- }, kh = { dropboxAuth: {
17231
+ }, Oh = { dropboxAuth: {
17216
17232
  service: "auth",
17217
- create: (e) => new Xm(e)
17218
- } }, Ah = {
17233
+ create: (e) => new Ym(e)
17234
+ } }, kh = {
17219
17235
  supabaseDb: {
17220
17236
  service: "data",
17221
17237
  create: (e) => new co(e)
@@ -17226,32 +17242,32 @@ var bh = {
17226
17242
  },
17227
17243
  supabaseAuth: {
17228
17244
  service: "auth",
17229
- create: (e) => new th(e)
17245
+ create: (e) => new eh(e)
17230
17246
  }
17231
- }, jh = { mock: {
17247
+ }, Ah = { mock: {
17232
17248
  service: "data",
17233
17249
  create: (e) => new go(e?.data)
17234
- } }, Mh = (e, t) => ({
17250
+ } }, jh = (e, t) => ({
17235
17251
  service: "ai",
17236
17252
  create: (n) => new _l(e, n?.[t] || ""),
17237
17253
  when: (e) => !!e?.[t]
17238
- }), Nh = {
17239
- firebase: Dh,
17240
- google: Oh,
17241
- dropbox: kh,
17242
- supabase: Ah,
17243
- mock: jh,
17254
+ }), Mh = {
17255
+ firebase: Eh,
17256
+ google: Dh,
17257
+ dropbox: Oh,
17258
+ supabase: kh,
17259
+ mock: Ah,
17244
17260
  ai: {
17245
- openai: Mh(Sh, "openaiApiKey"),
17246
- openrouter: Mh(Eh, "openRouterApiKey"),
17247
- opencode: Mh(Th, "openCodeApiKey"),
17248
- deepseek: Mh(mh, "deepSeekApiKey"),
17249
- gemini: Mh(bh, "geminiApiKey"),
17250
- anthropic: Mh(sh, "anthropicApiKey"),
17251
- mistral: Mh(xh, "mistralApiKey")
17261
+ openai: jh(xh, "openaiApiKey"),
17262
+ openrouter: jh(Th, "openRouterApiKey"),
17263
+ opencode: jh(wh, "openCodeApiKey"),
17264
+ deepseek: jh(ph, "deepSeekApiKey"),
17265
+ gemini: jh(yh, "geminiApiKey"),
17266
+ anthropic: jh(oh, "anthropicApiKey"),
17267
+ mistral: jh(bh, "mistralApiKey")
17252
17268
  }
17253
- }, Ph = () => /* @__PURE__ */ t.createElement("div", { className: "flex min-h-[calc(100vh-4rem)] items-center justify-center" }, /* @__PURE__ */ t.createElement("div", { className: "h-8 w-8 animate-spin rounded-full border-2 border-muted border-t-primary" }));
17254
- function Fh(e, t) {
17269
+ }, Nh = () => /* @__PURE__ */ t.createElement("div", { className: "flex min-h-[calc(100vh-4rem)] items-center justify-center" }, /* @__PURE__ */ t.createElement("div", { className: "h-8 w-8 animate-spin rounded-full border-2 border-muted border-t-primary" }));
17270
+ function Ph(e, t) {
17255
17271
  if (!t) return;
17256
17272
  let n = t, r = typeof t == "object" && !Array.isArray(t) ? Object.entries(n) : [];
17257
17273
  if (r.length > 0 && r.every(([, e]) => typeof e == "object" && !!e)) {
@@ -17260,10 +17276,10 @@ function Fh(e, t) {
17260
17276
  }
17261
17277
  e.custom = t;
17262
17278
  }
17263
- function Ih(e, t, n = "default") {
17279
+ function Fh(e, t, n = "default") {
17264
17280
  return t && e[t] ? t : Object.keys(e)[0] ?? n;
17265
17281
  }
17266
- function Lh(e = {}) {
17282
+ function Ih(e = {}) {
17267
17283
  let t = {
17268
17284
  data: {},
17269
17285
  storage: {},
@@ -17272,24 +17288,24 @@ function Lh(e = {}) {
17272
17288
  ai: {},
17273
17289
  credentials: {}
17274
17290
  }, n = (e) => t[e] ??= {};
17275
- for (let [t, r] of Object.entries(Nh)) {
17291
+ for (let [t, r] of Object.entries(Mh)) {
17276
17292
  let i = e[t];
17277
17293
  if (i !== void 0) for (let [e, t] of Object.entries(r)) t.when && !t.when(i) || (n(t.service)[e] = t.create(i));
17278
17294
  }
17279
- for (let [t, r] of Object.entries(e.custom ?? {})) Fh(n(t), r);
17280
- Object.keys(t.data).length === 0 && (t.data.mock = new go()), Object.keys(t.auth).length === 0 && (t.auth.googleAuth = new bm());
17295
+ for (let [t, r] of Object.entries(e.custom ?? {})) Ph(n(t), r);
17296
+ Object.keys(t.data).length === 0 && (t.data.mock = new go()), Object.keys(t.auth).length === 0 && (t.auth.googleAuth = new ym());
17281
17297
  let r = e.services ?? {}, i = {};
17282
17298
  for (let [e, n] of Object.entries(t)) i[e] = {
17283
17299
  registry: n,
17284
- defaultKey: Ih(n, r[e])
17300
+ defaultKey: Fh(n, r[e])
17285
17301
  };
17286
17302
  return i;
17287
17303
  }
17288
- var Rh = {}, zh = (e) => {
17289
- Rh = e;
17290
- }, Bh = (e) => Rh[e] || [];
17291
- function Vh({ contextProviders: e, providers: n = {}, appName: r = "LLM Native", scrapeConfig: i, iconProvider: a, googleMaps: o, themeProvider: s, i18n: c, children: l, errorReportUrl: u, debug: d, basename: f }) {
17292
- let [p, g] = h(() => Lh(n)), v = m(p);
17304
+ var Lh = {}, Rh = (e) => {
17305
+ Lh = e;
17306
+ }, zh = (e) => Lh[e] || [];
17307
+ function Bh({ contextProviders: e, providers: n = {}, appName: r = "LLM Native", scrapeConfig: i, iconProvider: a, googleMaps: o, themeProvider: s, i18n: c, children: l, errorReportUrl: u, debug: d, basename: f }) {
17308
+ let [p, g] = h(() => Ih(n)), v = m(p);
17293
17309
  v.current = p;
17294
17310
  let y = m(void 0);
17295
17311
  y.current ||= (async (e, t, n) => {
@@ -17306,7 +17322,7 @@ function Vh({ contextProviders: e, providers: n = {}, appName: r = "LLM Native",
17306
17322
  })));
17307
17323
  });
17308
17324
  let b = y.current, x = e ?? t.Fragment;
17309
- return /* @__PURE__ */ t.createElement(vm, {
17325
+ return /* @__PURE__ */ t.createElement(_m, {
17310
17326
  fullPage: !0,
17311
17327
  reportUrl: u,
17312
17328
  debug: d
@@ -17328,10 +17344,10 @@ function Vh({ contextProviders: e, providers: n = {}, appName: r = "LLM Native",
17328
17344
  } }, /* @__PURE__ */ t.createElement(ga, {
17329
17345
  registries: p,
17330
17346
  setProvider: b
17331
- }, /* @__PURE__ */ t.createElement(ti, p.auth, /* @__PURE__ */ t.createElement(Tm, p.credentials, /* @__PURE__ */ t.createElement(wi, p.data, /* @__PURE__ */ t.createElement(cc, p.storage, /* @__PURE__ */ t.createElement(Sm, p.email, /* @__PURE__ */ t.createElement(Qc, p.ai, /* @__PURE__ */ t.createElement(Sr, { config: a }, /* @__PURE__ */ t.createElement(mf, { config: o }, /* @__PURE__ */ t.createElement(wp, { appName: r }, /* @__PURE__ */ t.createElement(Pn, { config: c }, /* @__PURE__ */ t.createElement(xn, { config: s }, /* @__PURE__ */ t.createElement(x, null, l))))))))))))))));
17347
+ }, /* @__PURE__ */ t.createElement(ti, p.auth, /* @__PURE__ */ t.createElement(wm, p.credentials, /* @__PURE__ */ t.createElement(wi, p.data, /* @__PURE__ */ t.createElement(cc, p.storage, /* @__PURE__ */ t.createElement(xm, p.email, /* @__PURE__ */ t.createElement(Qc, p.ai, /* @__PURE__ */ t.createElement(Sr, { config: a }, /* @__PURE__ */ t.createElement(pf, { config: o }, /* @__PURE__ */ t.createElement(Cp, { appName: r }, /* @__PURE__ */ t.createElement(Pn, { config: c }, /* @__PURE__ */ t.createElement(xn, { config: s }, /* @__PURE__ */ t.createElement(x, null, l))))))))))))))));
17332
17348
  }
17333
- function Hh({ importPage: e, LayoutDefault: n = void 0, menuConfig: r = {}, children: a, ...o }) {
17334
- zh(r);
17349
+ function Vh({ importPage: e, LayoutDefault: n = void 0, menuConfig: r = {}, children: a, ...o }) {
17350
+ Rh(r);
17335
17351
  let s = ({ children: e }) => /* @__PURE__ */ t.createElement(t.Fragment, null, e), c = ({ pageSource: e, message: n }) => /* @__PURE__ */ t.createElement(Io, { variant: "warning" }, "Missing Page: ", e, n && /* @__PURE__ */ t.createElement("code", { className: "ml-2" }, n));
17336
17352
  function l(r, a, l) {
17337
17353
  let u = `./pages${a.component ? "/" + a.component : a.path === "/" ? "/Home" : et.toCamel(a.path.split("*")[0])}.js`, d = a.page || t.lazy(() => e(u).then((e) => typeof e.default == "function" ? { default: e.default } : (console.warn(`⚠️ Invalid default export in ${u}`), { default: () => /* @__PURE__ */ t.createElement(c, { pageSource: u }) })).catch((e) => (console.error(`❌ Failed to load ${u}:`, e), { default: () => /* @__PURE__ */ t.createElement(c, {
@@ -17341,32 +17357,32 @@ function Hh({ importPage: e, LayoutDefault: n = void 0, menuConfig: r = {}, chil
17341
17357
  return /* @__PURE__ */ t.createElement(y, {
17342
17358
  key: `${r}-${l}`,
17343
17359
  path: a.path,
17344
- element: /* @__PURE__ */ t.createElement(f, null, /* @__PURE__ */ t.createElement(vm, {
17360
+ element: /* @__PURE__ */ t.createElement(f, null, /* @__PURE__ */ t.createElement(_m, {
17345
17361
  key: a.path,
17346
17362
  reportUrl: o.errorReportUrl,
17347
17363
  debug: o.debug
17348
- }, /* @__PURE__ */ t.createElement(i, { fallback: /* @__PURE__ */ t.createElement(Ph, null) }, /* @__PURE__ */ t.createElement(d, null))))
17364
+ }, /* @__PURE__ */ t.createElement(i, { fallback: /* @__PURE__ */ t.createElement(Nh, null) }, /* @__PURE__ */ t.createElement(d, null))))
17349
17365
  });
17350
17366
  }
17351
17367
  let u = (e) => Object.keys(e).flatMap((t) => e[t].flatMap((e, n) => [e.path && l(t, e, n), e.children && u({ children: e.children })].filter(Boolean)));
17352
- return /* @__PURE__ */ t.createElement(Vh, o, a, /* @__PURE__ */ t.createElement(b, null, /* @__PURE__ */ t.createElement(y, {
17368
+ return /* @__PURE__ */ t.createElement(Bh, o, a, /* @__PURE__ */ t.createElement(b, null, /* @__PURE__ */ t.createElement(y, {
17353
17369
  path: ci,
17354
17370
  element: /* @__PURE__ */ t.createElement(hi, null)
17355
17371
  }), /* @__PURE__ */ t.createElement(t.Fragment, null, u({
17356
17372
  default: [{ path: "/" }],
17357
- ...Rh,
17373
+ ...Lh,
17358
17374
  _auth: [{
17359
17375
  path: "/users",
17360
- page: lm,
17376
+ page: cm,
17361
17377
  layout: n
17362
17378
  }]
17363
17379
  })), /* @__PURE__ */ t.createElement(y, {
17364
17380
  path: "*",
17365
- element: /* @__PURE__ */ t.createElement(um, null)
17381
+ element: /* @__PURE__ */ t.createElement(lm, null)
17366
17382
  })));
17367
17383
  }
17368
- var Uh = (e) => {
17369
- let t = Bh(e), n = x(), r = (e) => e.map((e) => {
17384
+ var Hh = (e) => {
17385
+ let t = zh(e), n = x(), r = (e) => e.map((e) => {
17370
17386
  let t = n.pathname === e.path, i = e.children ? r(e.children) : [], a = t || i.some((e) => e.active);
17371
17387
  return {
17372
17388
  ...e,
@@ -17375,7 +17391,7 @@ var Uh = (e) => {
17375
17391
  };
17376
17392
  });
17377
17393
  return p(() => r(t), [n.pathname]);
17378
- }, Wh = {
17394
+ }, Uh = {
17379
17395
  common: {
17380
17396
  save: "Salva",
17381
17397
  cancel: "Annulla",
@@ -17542,7 +17558,7 @@ var Uh = (e) => {
17542
17558
  notConfigured: "La ricerca indirizzi non è configurata (manca la API key Google Maps).",
17543
17559
  loadError: "Impossibile caricare la ricerca indirizzi."
17544
17560
  }
17545
- }, Gh = {
17561
+ }, Wh = {
17546
17562
  common: {
17547
17563
  save: "Speichern",
17548
17564
  cancel: "Abbrechen",
@@ -17709,7 +17725,7 @@ var Uh = (e) => {
17709
17725
  notConfigured: "Adresssuche ist nicht konfiguriert (Google Maps API-Schlüssel fehlt).",
17710
17726
  loadError: "Adresssuche konnte nicht geladen werden."
17711
17727
  }
17712
- }, Kh = {
17728
+ }, Gh = {
17713
17729
  common: {
17714
17730
  save: "Сохранить",
17715
17731
  cancel: "Отменить",
@@ -17876,7 +17892,7 @@ var Uh = (e) => {
17876
17892
  notConfigured: "Поиск адресов не настроен (отсутствует ключ Google Maps API).",
17877
17893
  loadError: "Не удалось загрузить поиск адресов."
17878
17894
  }
17879
- }, qh = {
17895
+ }, Kh = {
17880
17896
  common: {
17881
17897
  save: "保存",
17882
17898
  cancel: "取消",
@@ -18043,7 +18059,7 @@ var Uh = (e) => {
18043
18059
  notConfigured: "地址搜索未配置(缺少 Google Maps API 密钥)。",
18044
18060
  loadError: "无法加载地址搜索。"
18045
18061
  }
18046
- }, Jh = {
18062
+ }, qh = {
18047
18063
  common: {
18048
18064
  save: "حفظ",
18049
18065
  cancel: "إلغاء",
@@ -18210,22 +18226,22 @@ var Uh = (e) => {
18210
18226
  notConfigured: "البحث عن العناوين غير مُعد (مفتاح Google Maps API مفقود).",
18211
18227
  loadError: "تعذر تحميل البحث عن العناوين."
18212
18228
  }
18213
- }, Yh = /* @__PURE__ */ Je({
18214
- ar: () => Jh,
18215
- de: () => Gh,
18229
+ }, Jh = /* @__PURE__ */ Je({
18230
+ ar: () => qh,
18231
+ de: () => Wh,
18216
18232
  en: () => wn,
18217
- it: () => Wh,
18218
- ru: () => Kh,
18219
- zh: () => qh
18220
- }), Xh = (e) => ya("api", e);
18233
+ it: () => Uh,
18234
+ ru: () => Gh,
18235
+ zh: () => Kh
18236
+ }), Yh = (e) => ya("api", e);
18221
18237
  //#endregion
18222
18238
  //#region src/providers/api/direct.ts
18223
- async function Zh(e) {
18239
+ async function Xh(e) {
18224
18240
  if (!e.ok) throw Error(`ApiProvider request failed: ${e.status} ${e.statusText}`);
18225
18241
  let t = await e.text();
18226
18242
  return t ? JSON.parse(t) : void 0;
18227
18243
  }
18228
- var Qh = class {
18244
+ var Zh = class {
18229
18245
  config;
18230
18246
  constructor(e) {
18231
18247
  this.config = e;
@@ -18240,7 +18256,7 @@ var Qh = class {
18240
18256
  ...e.body,
18241
18257
  ...this.config.body
18242
18258
  };
18243
- return Zh(await al(n.toString(), {
18259
+ return Xh(await al(n.toString(), {
18244
18260
  method: t,
18245
18261
  headers: {
18246
18262
  "Content-Type": "application/json",
@@ -18249,7 +18265,7 @@ var Qh = class {
18249
18265
  body: t === "GET" || t === "HEAD" ? void 0 : JSON.stringify(r)
18250
18266
  }));
18251
18267
  }
18252
- }, $h = class {
18268
+ }, Qh = class {
18253
18269
  resolver;
18254
18270
  constructor(e) {
18255
18271
  this.resolver = e;
@@ -18257,7 +18273,7 @@ var Qh = class {
18257
18273
  async fetch(e) {
18258
18274
  return this.resolver(e);
18259
18275
  }
18260
- }, eg = class {
18276
+ }, $h = class {
18261
18277
  config;
18262
18278
  constructor(e) {
18263
18279
  this.config = e;
@@ -18268,7 +18284,7 @@ var Qh = class {
18268
18284
  request: e
18269
18285
  }, void 0, this.config.region);
18270
18286
  }
18271
- }, tg = class {
18287
+ }, eg = class {
18272
18288
  config;
18273
18289
  constructor(e) {
18274
18290
  this.config = e;
@@ -18281,7 +18297,7 @@ var Qh = class {
18281
18297
  if (n) throw n;
18282
18298
  return t;
18283
18299
  }
18284
- }, ng = [
18300
+ }, tg = [
18285
18301
  {
18286
18302
  id: "resend",
18287
18303
  label: "Resend",
@@ -18392,7 +18408,7 @@ var Qh = class {
18392
18408
  ],
18393
18409
  credentialsHint: "Ask your mail host or hosting provider for the SMTP host, port, and credentials."
18394
18410
  }
18395
- ], rg = [
18411
+ ], ng = [
18396
18412
  {
18397
18413
  id: "cloudflare_pages",
18398
18414
  label: "Cloudflare Pages",
@@ -18622,15 +18638,15 @@ var Qh = class {
18622
18638
  description: "No vendor — packages the build as a downloadable archive for self-hosting anywhere else.",
18623
18639
  credentialFields: []
18624
18640
  }
18625
- ], ig = [
18626
- Sh,
18627
- Eh,
18641
+ ], rg = [
18642
+ xh,
18628
18643
  Th,
18629
- mh,
18644
+ wh,
18645
+ ph,
18646
+ yh,
18647
+ oh,
18630
18648
  bh,
18631
- sh,
18632
- xh,
18633
- ph({
18649
+ fh({
18634
18650
  id: "glm",
18635
18651
  label: "ZhipuAI (GLM)",
18636
18652
  description: "Zhipu AI's GLM model family.",
@@ -18647,7 +18663,7 @@ var Qh = class {
18647
18663
  dashboardUrl: "https://bigmodel.cn/usercenter/apikeys",
18648
18664
  credentialsHint: "Zhipu BigModel → User Center → API Keys → Create Key."
18649
18665
  })
18650
- ], ag = (e) => ({
18666
+ ], ig = (e) => ({
18651
18667
  id: e.id,
18652
18668
  label: e.label,
18653
18669
  description: e.description ?? "",
@@ -18658,7 +18674,7 @@ var Qh = class {
18658
18674
  }],
18659
18675
  credentialsUrl: e.dashboardUrl,
18660
18676
  credentialsHint: e.credentialsHint
18661
- }), og = ig.map(ag), sg = {
18677
+ }), ag = rg.map(ig), og = {
18662
18678
  id: "openai-compatible",
18663
18679
  label: "OpenAI-compatible",
18664
18680
  description: "Any OpenAI-compatible endpoint (self-hosted or third-party).",
@@ -18672,9 +18688,9 @@ var Qh = class {
18672
18688
  type: "text",
18673
18689
  placeholder: "https://api.example.com/v1"
18674
18690
  }]
18675
- }, cg = (e) => {
18691
+ }, sg = (e) => {
18676
18692
  let t = e?.openAICompatible?.baseUrl?.trim();
18677
- return t ? [ph({
18693
+ return t ? [fh({
18678
18694
  id: "openai-compatible",
18679
18695
  label: e?.openAICompatible?.label?.trim() || "OpenAI-compatible",
18680
18696
  description: "Any OpenAI-compatible endpoint (self-hosted or third-party).",
@@ -18686,35 +18702,35 @@ var Qh = class {
18686
18702
  modelsUrl: e?.openAICompatible?.modelsUrl?.trim() || void 0,
18687
18703
  chatCompletionsUrl: e?.openAICompatible?.chatCompletionsUrl?.trim() || void 0
18688
18704
  })] : [];
18689
- }, lg = (e) => e ? [...ig, ...cg(e)].reduce((t, n) => {
18705
+ }, cg = (e) => e ? [...rg, ...sg(e)].reduce((t, n) => {
18690
18706
  let r = n.id === "openai-compatible" ? e.openAICompatible?.apiKey?.trim() || "" : typeof n.configKey == "string" && typeof e[n.configKey] == "string" ? String(e[n.configKey] || "").trim() : "";
18691
18707
  return r && (t[n.id] = new _l(n, r)), t;
18692
- }, {}) : {}, ug = void 0;
18708
+ }, {}) : {}, lg = void 0;
18693
18709
  typeof wa == "function" && wa((e) => {
18694
- ug = e.google;
18710
+ lg = e.google;
18695
18711
  });
18696
- var dg = {
18712
+ var ug = {
18697
18713
  ita: "geoTargetConstants/2380",
18698
18714
  rome: "geoTargetConstants/1033236",
18699
18715
  mil: "geoTargetConstants/1033239",
18700
18716
  nap: "geoTargetConstants/1033245",
18701
18717
  tor: "geoTargetConstants/1033247"
18702
- }, fg = {
18718
+ }, dg = {
18703
18719
  it: "languageConstants/1000",
18704
18720
  en: "languageConstants/1001",
18705
18721
  fr: "languageConstants/1002",
18706
18722
  es: "languageConstants/1003",
18707
18723
  de: "languageConstants/1005"
18708
18724
  };
18709
- function pg(e) {
18710
- return dg[e.toLowerCase()] || "geoTargetConstants/2380";
18725
+ function fg(e) {
18726
+ return ug[e.toLowerCase()] || "geoTargetConstants/2380";
18711
18727
  }
18712
- function mg(e) {
18713
- return fg[e.toLowerCase()] || "languageConstants/1000";
18728
+ function pg(e) {
18729
+ return dg[e.toLowerCase()] || "languageConstants/1000";
18714
18730
  }
18715
- async function hg({ keyword: e, googleAdsAccountId: t, geoCode: n = "ita", languageCode: r = "it" }) {
18716
- if (!ug?.developerToken) return console.error("\n❌ Google Ads API: developerToken non configurato.\n\nPer ottenere un developerToken segui questi passaggi:\n\n1️⃣ Vai su https://ads.google.com/aw/apicenter\n2️⃣ Seleziona o crea un account Google Ads Manager (MCC) se non ne hai uno.\n3️⃣ Vai alla sezione \"Strumenti e impostazioni\" → \"Accesso API\" (o \"API Center\").\n4️⃣ Clicca su \"Richiedi accesso API\" se non l'hai ancora fatto.\n5️⃣ Copia il valore del tuo Developer Token (è un identificatore simile a: 'ABc123456789xyz').\n6️⃣ Inseriscilo nel tuo file di configurazione, nella sezione:\n config.google.developerToken\n\nℹ️ Attenzione: Inizialmente il token sarà in modalità di test. Per usarlo in produzione, dovrai richiedere l'approvazione da Google Ads.\n"), [];
18717
- let i = await Zm(["https://www.googleapis.com/auth/adwords"]), a = pg(n), o = mg(r), s = `https://googleads.googleapis.com/v13/customers/${t}:generateKeywordIdeas`, c = {
18731
+ async function mg({ keyword: e, googleAdsAccountId: t, geoCode: n = "ita", languageCode: r = "it" }) {
18732
+ if (!lg?.developerToken) return console.error("\n❌ Google Ads API: developerToken non configurato.\n\nPer ottenere un developerToken segui questi passaggi:\n\n1️⃣ Vai su https://ads.google.com/aw/apicenter\n2️⃣ Seleziona o crea un account Google Ads Manager (MCC) se non ne hai uno.\n3️⃣ Vai alla sezione \"Strumenti e impostazioni\" → \"Accesso API\" (o \"API Center\").\n4️⃣ Clicca su \"Richiedi accesso API\" se non l'hai ancora fatto.\n5️⃣ Copia il valore del tuo Developer Token (è un identificatore simile a: 'ABc123456789xyz').\n6️⃣ Inseriscilo nel tuo file di configurazione, nella sezione:\n config.google.developerToken\n\nℹ️ Attenzione: Inizialmente il token sarà in modalità di test. Per usarlo in produzione, dovrai richiedere l'approvazione da Google Ads.\n"), [];
18733
+ let i = await Xm(["https://www.googleapis.com/auth/adwords"]), a = fg(n), o = pg(r), s = `https://googleads.googleapis.com/v13/customers/${t}:generateKeywordIdeas`, c = {
18718
18734
  keywordSeed: { keywords: [e] },
18719
18735
  geoTargetConstants: [a],
18720
18736
  language: o
@@ -18722,7 +18738,7 @@ async function hg({ keyword: e, googleAdsAccountId: t, geoCode: n = "ita", langu
18722
18738
  method: "POST",
18723
18739
  headers: {
18724
18740
  Authorization: `Bearer ${i}`,
18725
- "developer-token": ug.developerToken,
18741
+ "developer-token": lg.developerToken,
18726
18742
  "Content-Type": "application/json"
18727
18743
  },
18728
18744
  body: JSON.stringify(c)
@@ -18740,7 +18756,7 @@ async function hg({ keyword: e, googleAdsAccountId: t, geoCode: n = "ita", langu
18740
18756
  }
18741
18757
  //#endregion
18742
18758
  //#region src/providers/seo/google/trend.ts
18743
- async function gg(e, t = "IT", n = "today 12-m") {
18759
+ async function hg(e, t = "IT", n = "today 12-m") {
18744
18760
  let r = `https://trends.google.com/trends/api/explore?hl=en-US&tz=0&req=${encodeURIComponent(JSON.stringify({
18745
18761
  comparisonItem: [{
18746
18762
  keyword: e,
@@ -18760,7 +18776,7 @@ async function gg(e, t = "IT", n = "today 12-m") {
18760
18776
  }))
18761
18777
  };
18762
18778
  }
18763
- async function _g(e, t = "IT", n = "today 12-m") {
18779
+ async function gg(e, t = "IT", n = "today 12-m") {
18764
18780
  let r = `https://trends.google.com/trends/api/explore?hl=en-US&tz=0&req=${encodeURIComponent(JSON.stringify({
18765
18781
  comparisonItem: [{
18766
18782
  keyword: e,
@@ -18786,13 +18802,13 @@ async function _g(e, t = "IT", n = "today 12-m") {
18786
18802
  }
18787
18803
  //#endregion
18788
18804
  //#region src/providers/storage/dropbox.tsx
18789
- var vg = 5e3, yg = "https://www.dropbox.com/home", bg = void 0;
18805
+ var _g = 5e3, vg = "https://www.dropbox.com/home", yg = void 0;
18790
18806
  typeof wa == "function" && wa((e) => {
18791
- bg = e.dropbox;
18807
+ yg = e.dropbox;
18792
18808
  });
18793
- var xg = async (e, t, n = {}) => {
18794
- if (!bg) return console.error("DropBox: Config not found"), null;
18795
- let r = await bi(bg.clientId);
18809
+ var bg = async (e, t, n = {}) => {
18810
+ if (!yg) return console.error("DropBox: Config not found"), null;
18811
+ let r = await bi(yg.clientId);
18796
18812
  if (!r) throw Error("DropBox: Access token not found");
18797
18813
  return await fetch(e, {
18798
18814
  method: "POST",
@@ -18805,12 +18821,12 @@ var xg = async (e, t, n = {}) => {
18805
18821
  }).catch((e) => (console.error("There was a problem with the fetch operation:", e), null)).finally(() => {
18806
18822
  console.log("DropBox: Fetch operation completed");
18807
18823
  });
18808
- }, Sg = async (e, t, n = {}) => {
18809
- if (!bg) {
18824
+ }, xg = async (e, t, n = {}) => {
18825
+ if (!yg) {
18810
18826
  console.error("DropBox: Config not found");
18811
18827
  return;
18812
18828
  }
18813
- let r = await bi(bg.clientId);
18829
+ let r = await bi(yg.clientId);
18814
18830
  if (!r) {
18815
18831
  console.error("DropBox: Access token not found");
18816
18832
  return;
@@ -18835,47 +18851,47 @@ var xg = async (e, t, n = {}) => {
18835
18851
  }).finally(() => {
18836
18852
  console.log("DropBox: Fetch operation completed", e, t);
18837
18853
  });
18838
- }, Cg = (e, t = !1) => {
18839
- let n = bg?.rootPath || "";
18840
- return (t ? yg : "") + (e.startsWith(n) ? e : n + e);
18841
- }, wg = async (e, t = "", n = !1) => {
18854
+ }, Sg = (e, t = !1) => {
18855
+ let n = yg?.rootPath || "";
18856
+ return (t ? vg : "") + (e.startsWith(n) ? e : n + e);
18857
+ }, Cg = async (e, t = "", n = !1) => {
18842
18858
  let r = {};
18843
- return (await Rg.listFolders({
18859
+ return (await Lg.listFolders({
18844
18860
  path: `${e + t}`,
18845
18861
  recursive: !0
18846
18862
  })).forEach((e) => {
18847
18863
  e[".tag"] !== "folder" && (r[n ? ri.changeFilename(e.path_display, { ext: "" }) : e.path_display] = e.name);
18848
18864
  }), r;
18849
- }, Tg = async (e, t) => {
18865
+ }, wg = async (e, t) => {
18850
18866
  if (!e.async_job_id) return Promise.reject(e);
18851
18867
  let n, r = !0;
18852
- for (; r;) await ut(100), n = await Sg(`https://api.dropboxapi.com/2/${t}/check`, { async_job_id: e.async_job_id }), console.log("DropBox: Check folders response: ", n), n?.[".tag"] !== "in_progress" && (r = !1);
18868
+ for (; r;) await ut(100), n = await xg(`https://api.dropboxapi.com/2/${t}/check`, { async_job_id: e.async_job_id }), console.log("DropBox: Check folders response: ", n), n?.[".tag"] !== "in_progress" && (r = !1);
18853
18869
  return n?.[".tag"] === "complete" ? Promise.resolve(n.entries) : Promise.reject(n);
18854
- }, Eg = async (e, t = "") => {
18855
- let n = "files/create_folder_batch", r = await Sg(`https://api.dropboxapi.com/2/${n}`, {
18870
+ }, Tg = async (e, t = "") => {
18871
+ let n = "files/create_folder_batch", r = await xg(`https://api.dropboxapi.com/2/${n}`, {
18856
18872
  autorename: !1,
18857
18873
  force_async: !0,
18858
- paths: e.map((e) => Cg(t + e))
18874
+ paths: e.map((e) => Sg(t + e))
18859
18875
  });
18860
- return r ? Tg(r, n) : void 0;
18861
- }, Dg = async (e, t = "") => {
18862
- let n = "files/create_folder_batch", r = await Sg(`https://api.dropboxapi.com/2/${n}`, { entries: e.map((e) => ({ path: Cg(t + e) })) });
18863
- return r ? Tg(r, n) : void 0;
18864
- }, Og = async (e, t) => Sg("https://api.dropboxapi.com/2/files/tags/add", {
18876
+ return r ? wg(r, n) : void 0;
18877
+ }, Eg = async (e, t = "") => {
18878
+ let n = "files/create_folder_batch", r = await xg(`https://api.dropboxapi.com/2/${n}`, { entries: e.map((e) => ({ path: Sg(t + e) })) });
18879
+ return r ? wg(r, n) : void 0;
18880
+ }, Dg = async (e, t) => xg("https://api.dropboxapi.com/2/files/tags/add", {
18865
18881
  path: e,
18866
18882
  tag_text: t.toLowerCase().replaceAll(/[^a-z0-9]/g, "")
18867
- }), kg = async (e, t = "") => {
18868
- for (let n in e) for (let r of e[n]) await Og(Cg(t + n), r);
18869
- }, Ag = async ({ path: e = "", recursive: t = !1 } = {}) => {
18870
- let n = [], r = async ({ path: e, cursor: t, recursive: n }) => e ? await Sg("https://api.dropboxapi.com/2/files/list_folder", {
18883
+ }), Og = async (e, t = "") => {
18884
+ for (let n in e) for (let r of e[n]) await Dg(Sg(t + n), r);
18885
+ }, kg = async ({ path: e = "", recursive: t = !1 } = {}) => {
18886
+ let n = [], r = async ({ path: e, cursor: t, recursive: n }) => e ? await xg("https://api.dropboxapi.com/2/files/list_folder", {
18871
18887
  include_deleted: !1,
18872
18888
  include_has_explicit_shared_members: !1,
18873
18889
  include_media_info: !1,
18874
18890
  include_mounted_folders: !0,
18875
18891
  include_non_downloadable_files: !0,
18876
- path: Cg(e),
18892
+ path: Sg(e),
18877
18893
  recursive: n
18878
- }) : await Sg("https://api.dropboxapi.com/2/files/list_folder/continue", { cursor: t }), i = {
18894
+ }) : await xg("https://api.dropboxapi.com/2/files/list_folder/continue", { cursor: t }), i = {
18879
18895
  has_more: !0,
18880
18896
  cursor: "",
18881
18897
  entries: []
@@ -18888,44 +18904,44 @@ var xg = async (e, t, n = {}) => {
18888
18904
  recursive: t
18889
18905
  }), i && n.push(...i.entries);
18890
18906
  return n;
18891
- }, jg = async (e) => {
18892
- let t = async (e) => await Sg("https://api.dropboxapi.com/2/files/copy_batch_v2", {
18907
+ }, Ag = async (e) => {
18908
+ let t = async (e) => await xg("https://api.dropboxapi.com/2/files/copy_batch_v2", {
18893
18909
  entries: e,
18894
18910
  autorename: !1
18895
- }), n = async (e) => await Sg("https://api.dropboxapi.com/2/files/copy_batch/check_v2", { async_job_id: e }), r = [], i = [];
18911
+ }), n = async (e) => await xg("https://api.dropboxapi.com/2/files/copy_batch/check_v2", { async_job_id: e }), r = [], i = [];
18896
18912
  for (let a = 0; a < e.length; a += 900) {
18897
18913
  i = e.slice(a, a + 900).map((e) => ({
18898
- from_path: Cg(e.from),
18899
- to_path: Cg(e.to)
18914
+ from_path: Sg(e.from),
18915
+ to_path: Sg(e.to)
18900
18916
  }));
18901
18917
  let o = await t(i);
18902
18918
  if (!o) continue;
18903
18919
  if (o.error) throw Error(`Error starting copy: ${o.error}`);
18904
18920
  let s = o;
18905
- for (; s?.[".tag"] === "async_job_id" || s?.[".tag"] === "in_progress";) await ut(vg), s = await n(o.async_job_id ?? "");
18921
+ for (; s?.[".tag"] === "async_job_id" || s?.[".tag"] === "in_progress";) await ut(_g), s = await n(o.async_job_id ?? "");
18906
18922
  if (s?.[".tag"] === "failed") throw Error(`Copy operation failed: ${s[".tag"]}`);
18907
18923
  s?.[".tag"] === "complete" && s.entries && r.push(...s.entries);
18908
18924
  }
18909
18925
  return r.filter((e) => e[".tag"] === "failure").map((e) => e.failure);
18910
- }, Mg = async (e) => {
18911
- let t = async (e) => await Sg("https://api.dropboxapi.com/2/files/move_v2", {
18926
+ }, jg = async (e) => {
18927
+ let t = async (e) => await xg("https://api.dropboxapi.com/2/files/move_v2", {
18912
18928
  ...e,
18913
18929
  autorename: !0
18914
18930
  });
18915
18931
  for (let n of e) await t({
18916
- from_path: Cg(n.from),
18917
- to_path: Cg(n.to)
18932
+ from_path: Sg(n.from),
18933
+ to_path: Sg(n.to)
18918
18934
  });
18919
- }, Ng = async ({ thumbnailsRequest: e = [], size: t = "w64h64", format: n = "jpeg", mode: r = "strict" }, i) => {
18935
+ }, Mg = async ({ thumbnailsRequest: e = [], size: t = "w64h64", format: n = "jpeg", mode: r = "strict" }, i) => {
18920
18936
  let a = {}, o = [];
18921
18937
  for (let s = 0; s < e.length; s += 25) {
18922
18938
  let c = e.slice(s, s + 25), l = c.map((e) => ({
18923
- path: Cg(e.path),
18939
+ path: Sg(e.path),
18924
18940
  format: n,
18925
18941
  size: t,
18926
18942
  mode: r
18927
18943
  }));
18928
- await ut(100), o.push(Sg("https://content.dropboxapi.com/2/files/get_thumbnail_batch", { entries: l }).then((e) => {
18944
+ await ut(100), o.push(xg("https://content.dropboxapi.com/2/files/get_thumbnail_batch", { entries: l }).then((e) => {
18929
18945
  if (!e) return;
18930
18946
  let n = e.entries.reduce((e, n, r) => {
18931
18947
  let i = c[r].path, [a, o] = t.replace("w", "").split("h").map(Number), s = n;
@@ -18944,7 +18960,7 @@ var xg = async (e, t, n = {}) => {
18944
18960
  }));
18945
18961
  }
18946
18962
  return Promise.all(o).then(() => a);
18947
- }, Pg = (e, t = "application/octet-stream", n = 512) => {
18963
+ }, Ng = (e, t = "application/octet-stream", n = 512) => {
18948
18964
  let r = atob(e), i = [];
18949
18965
  for (let e = 0; e < r.length; e += n) {
18950
18966
  let t = r.slice(e, e + n), a = Array(t.length);
@@ -18953,11 +18969,11 @@ var xg = async (e, t, n = {}) => {
18953
18969
  i.push(o);
18954
18970
  }
18955
18971
  return new Blob(i, { type: t });
18956
- }, Fg = async (e, t) => {
18972
+ }, Pg = async (e, t) => {
18957
18973
  try {
18958
18974
  let n = t.split(",")[1];
18959
- xg("https://content.dropboxapi.com/2/files/upload", Pg(n, "application/octet-stream"), { "Dropbox-API-Arg": JSON.stringify({
18960
- path: Cg(e),
18975
+ bg("https://content.dropboxapi.com/2/files/upload", Ng(n, "application/octet-stream"), { "Dropbox-API-Arg": JSON.stringify({
18976
+ path: Sg(e),
18961
18977
  mode: "overwrite",
18962
18978
  autorename: !0,
18963
18979
  mute: !1
@@ -18967,12 +18983,12 @@ var xg = async (e, t, n = {}) => {
18967
18983
  } catch (e) {
18968
18984
  console.error("Errore durante il caricamento su Dropbox:", e);
18969
18985
  }
18970
- }, Ig = (e = !1) => bg ? _i(bg.clientId, e) : !1, Lg = (e = {}) => {
18971
- if (!bg) return /* @__PURE__ */ t.createElement("div", {
18986
+ }, Fg = (e = !1) => yg ? _i(yg.clientId, e) : !1, Ig = (e = {}) => {
18987
+ if (!yg) return /* @__PURE__ */ t.createElement("div", {
18972
18988
  title: "DropBox: configurazione mancante. Recupera il \"Client ID\" accedendo a https://www.dropbox.com/developers, vai su \"App Console\", seleziona un'app esistente o chiedi il Client ID a chi ha configurato il sistema.",
18973
18989
  className: "text-danger flex items-center gap-2"
18974
18990
  }, /* @__PURE__ */ t.createElement(Q, { name: "warning" }), /* @__PURE__ */ t.createElement("span", null, "Dropbox non configurato"));
18975
- let n = Ig(!0);
18991
+ let n = Fg(!0);
18976
18992
  return /* @__PURE__ */ t.createElement(Si, {
18977
18993
  provider: "dropboxAuth",
18978
18994
  intent: "connect",
@@ -18984,33 +19000,33 @@ var xg = async (e, t, n = {}) => {
18984
19000
  title: n ? "DropBox Connected" : "DropBox Disconnected"
18985
19001
  }
18986
19002
  });
18987
- }, Rg = {
19003
+ }, Lg = {
18988
19004
  setRootPath: (e) => {
18989
- bg && (bg.rootPath = e);
19005
+ yg && (yg.rootPath = e);
18990
19006
  },
18991
- resolvePath: Cg,
18992
- createFolders: Eg,
18993
- deleteBulk: Dg,
18994
- addTags: kg,
18995
- listFolders: Ag,
18996
- getThumbnails: Ng,
18997
- search: wg,
18998
- upload: Fg,
18999
- copy: jg,
19000
- move: Mg
19001
- }, zg = "https://api.serpapi.com/search", Bg = "google", Vg = "google_images", Hg = "google_autocomplete", Ug = "google_trends", Wg = "google_maps", Gg = "google_maps_photos", Kg = "google_maps_reviews", qg = {
19007
+ resolvePath: Sg,
19008
+ createFolders: Tg,
19009
+ deleteBulk: Eg,
19010
+ addTags: Og,
19011
+ listFolders: kg,
19012
+ getThumbnails: Mg,
19013
+ search: Cg,
19014
+ upload: Pg,
19015
+ copy: Ag,
19016
+ move: jg
19017
+ }, Rg = "https://api.serpapi.com/search", zg = "google", Bg = "google_images", Vg = "google_autocomplete", Hg = "google_trends", Ug = "google_maps", Wg = "google_maps_photos", Gg = "google_maps_reviews", Kg = {
19002
19018
  engine: null,
19003
19019
  device: null,
19004
19020
  no_cache: !1,
19005
19021
  async: !1,
19006
19022
  output: "json"
19007
- }, Jg = { q: null }, Yg = {
19023
+ }, qg = { q: null }, Jg = {
19008
19024
  tbs: null,
19009
19025
  safe: "active",
19010
19026
  nfpr: 0,
19011
19027
  filter: 1
19012
19028
  };
19013
- function Xg(e) {
19029
+ function Yg(e) {
19014
19030
  let t = Rc(), n = Rc(!0), r = zc(!0), i = {
19015
19031
  location: t,
19016
19032
  uule: null
@@ -19028,13 +19044,13 @@ function Xg(e) {
19028
19044
  hl: r
19029
19045
  };
19030
19046
  return {
19031
- [Bg]: {
19032
- ...qg,
19047
+ [zg]: {
19048
+ ...Kg,
19033
19049
  ...i,
19034
19050
  ...o,
19035
- ...Yg,
19036
19051
  ...Jg,
19037
- engine: Bg,
19052
+ ...qg,
19053
+ engine: zg,
19038
19054
  ludocid: null,
19039
19055
  lsig: null,
19040
19056
  kgmid: null,
@@ -19043,29 +19059,29 @@ function Xg(e) {
19043
19059
  start: null,
19044
19060
  num: null
19045
19061
  },
19046
- [Vg]: {
19047
- ...qg,
19062
+ [Bg]: {
19063
+ ...Kg,
19048
19064
  ...i,
19049
19065
  ...o,
19050
- ...Yg,
19051
19066
  ...Jg,
19052
- engine: Vg,
19067
+ ...qg,
19068
+ engine: Bg,
19053
19069
  chips: null,
19054
19070
  ijn: null
19055
19071
  },
19056
- [Hg]: {
19057
- ...qg,
19072
+ [Vg]: {
19073
+ ...Kg,
19058
19074
  ...o,
19059
- ...Jg,
19060
- engine: Hg,
19075
+ ...qg,
19076
+ engine: Vg,
19061
19077
  cp: null,
19062
19078
  client: null
19063
19079
  },
19064
- [Ug]: {
19065
- ...qg,
19080
+ [Hg]: {
19081
+ ...Kg,
19066
19082
  ...a,
19067
- ...Jg,
19068
- engine: Ug,
19083
+ ...qg,
19084
+ engine: Hg,
19069
19085
  data_type: null,
19070
19086
  tz: null,
19071
19087
  cat: null,
@@ -19073,73 +19089,73 @@ function Xg(e) {
19073
19089
  date: null,
19074
19090
  csv: null
19075
19091
  },
19076
- [Wg]: {
19077
- ...qg,
19092
+ [Ug]: {
19093
+ ...Kg,
19078
19094
  ...i,
19079
19095
  ...o,
19080
- ...Yg,
19081
19096
  ...Jg,
19097
+ ...qg,
19098
+ engine: Ug
19099
+ },
19100
+ [Wg]: {
19101
+ ...Kg,
19102
+ ...s,
19082
19103
  engine: Wg
19083
19104
  },
19084
19105
  [Gg]: {
19085
- ...qg,
19106
+ ...Kg,
19086
19107
  ...s,
19087
19108
  engine: Gg
19088
- },
19089
- [Kg]: {
19090
- ...qg,
19091
- ...s,
19092
- engine: Kg
19093
19109
  }
19094
19110
  }[e] ?? {};
19095
19111
  }
19096
- var Zg = void 0;
19112
+ var Xg = void 0;
19097
19113
  typeof wa == "function" && wa((e) => {
19098
- Zg = e.scrape;
19114
+ Xg = e.scrape;
19099
19115
  });
19100
- function Qg(e) {
19116
+ function Zg(e) {
19101
19117
  let t = {};
19102
19118
  for (let n in e) e[n] !== null && (t[n] = e[n]);
19103
19119
  return t;
19104
19120
  }
19105
- var $g = 0;
19106
- function e_(e = !1) {
19107
- let t = Zg?.serpApiKey?.split(",").map((e) => e.trim()).filter(Boolean) || [];
19108
- return t.length === 0 ? null : (e && $g++, $g < t.length ? t[$g] : null);
19121
+ var Qg = 0;
19122
+ function $g(e = !1) {
19123
+ let t = Xg?.serpApiKey?.split(",").map((e) => e.trim()).filter(Boolean) || [];
19124
+ return t.length === 0 ? null : (e && Qg++, Qg < t.length ? t[Qg] : null);
19109
19125
  }
19110
- var t_ = async (e, t) => {
19126
+ var e_ = async (e, t) => {
19111
19127
  let n = (n) => {
19112
- let r = Qg({
19113
- ...Xg(t),
19128
+ let r = Zg({
19129
+ ...Yg(t),
19114
19130
  api_key: n,
19115
19131
  q: e
19116
19132
  });
19117
- return console.log(zg, r), `${zg}?${new URLSearchParams(r)}`;
19118
- }, r = e_();
19133
+ return console.log(Rg, r), `${Rg}?${new URLSearchParams(r)}`;
19134
+ }, r = $g();
19119
19135
  for (; r;) try {
19120
19136
  return await Wt(n(r));
19121
19137
  } catch (e) {
19122
19138
  if (e?.error === "quota_exceeded") {
19123
- console.warn(`SerpApi: invalid api key: ${r}`, e), r = e_(!0);
19139
+ console.warn(`SerpApi: invalid api key: ${r}`, e), r = $g(!0);
19124
19140
  continue;
19125
19141
  }
19126
19142
  throw console.error(`SerpApi: ${r}`, e), e;
19127
19143
  }
19128
19144
  return null;
19129
- }, n_ = async (e, t, n) => {
19145
+ }, t_ = async (e, t, n) => {
19130
19146
  let r = `${ka}/${ct(t)}/${ct(e)}`, i = await n.read(r);
19131
19147
  if (i) return i;
19132
- let a = await t_(e, t);
19148
+ let a = await e_(e, t);
19133
19149
  return a ? n.set(r, a) : console.warn(`SerpApi ${t}: No Result`), a ?? {};
19134
- }, r_ = (e) => ({
19135
- googleSearch: async (t) => n_(t, Bg, e),
19136
- googleImages: async (t) => n_(t, Vg, e),
19137
- googleAutocomplete: async (t) => n_(t, Hg, e),
19138
- googleTrends: async (t) => n_(t, Ug, e),
19139
- googleMaps: async (t) => n_(t, Wg, e),
19140
- googleMapsPhotos: async (t) => n_(t, Gg, e),
19141
- googleMapsReviews: async (t) => n_(t, Kg, e)
19142
- }), i_ = {
19150
+ }, n_ = (e) => ({
19151
+ googleSearch: async (t) => t_(t, zg, e),
19152
+ googleImages: async (t) => t_(t, Bg, e),
19153
+ googleAutocomplete: async (t) => t_(t, Vg, e),
19154
+ googleTrends: async (t) => t_(t, Hg, e),
19155
+ googleMaps: async (t) => t_(t, Ug, e),
19156
+ googleMapsPhotos: async (t) => t_(t, Wg, e),
19157
+ googleMapsReviews: async (t) => t_(t, Gg, e)
19158
+ }), r_ = {
19143
19159
  "+": "+",
19144
19160
  "﹢": "+",
19145
19161
  "-": "-",
@@ -19214,7 +19230,7 @@ var t_ = async (e, t) => {
19214
19230
  x: "x",
19215
19231
  y: "y",
19216
19232
  z: "z"
19217
- }, a_ = {
19233
+ }, i_ = {
19218
19234
  email: {
19219
19235
  description: "Email: no spaces -> Lower/Trim",
19220
19236
  transformations: [{
@@ -19260,7 +19276,7 @@ var t_ = async (e, t) => {
19260
19276
  transformations: [],
19261
19277
  mask: ["toSlug"]
19262
19278
  }
19263
- }, o_ = [
19279
+ }, a_ = [
19264
19280
  {
19265
19281
  pattern: "email*",
19266
19282
  use: "email"
@@ -19277,24 +19293,24 @@ var t_ = async (e, t) => {
19277
19293
  pattern: "date*",
19278
19294
  use: "date"
19279
19295
  }
19280
- ], s_ = new RegExp(Object.keys(i_).join("|"), "g");
19281
- function c_(e) {
19282
- return e ? e.normalize("NFKC").replace(s_, (e) => i_[e] ?? e) : "";
19296
+ ], o_ = new RegExp(Object.keys(r_).join("|"), "g");
19297
+ function s_(e) {
19298
+ return e ? e.normalize("NFKC").replace(o_, (e) => r_[e] ?? e) : "";
19283
19299
  }
19284
- var l_ = class {
19300
+ var c_ = class {
19285
19301
  config;
19286
19302
  matches;
19287
19303
  constructor(e = {}, t = []) {
19288
19304
  this.config = {
19289
- ...a_,
19305
+ ...i_,
19290
19306
  ...e
19291
- }, this.matches = [...o_, ...t];
19307
+ }, this.matches = [...a_, ...t];
19292
19308
  }
19293
19309
  apply(e, t, n = !1) {
19294
19310
  let r = this.config[e];
19295
19311
  if (!r) return n ? It(t) : t;
19296
19312
  let i = t;
19297
- i = c_(String(i ?? ""));
19313
+ i = s_(String(i ?? ""));
19298
19314
  let a = r.exclusions;
19299
19315
  if (Array.isArray(a) && a.length) {
19300
19316
  let e = String(i).toLowerCase();
@@ -19353,7 +19369,7 @@ var l_ = class {
19353
19369
  };
19354
19370
  //#endregion
19355
19371
  //#region src/libs/csv.ts
19356
- function u_(e, t) {
19372
+ function l_(e, t) {
19357
19373
  let n = Oe.parse(e, {
19358
19374
  header: !0,
19359
19375
  skipEmptyLines: !0,
@@ -19366,6 +19382,6 @@ function u_(e, t) {
19366
19382
  };
19367
19383
  }
19368
19384
  //#endregion
19369
- export { Qc as AIProvider, ig as AI_PROVIDER_DEFINITIONS, og as AI_PROVIDER_DESCRIPTORS, Hr as ActionButton, Df as AddressAutocomplete, Io as Alert, Hh as App, Vh as AppProvider, zi as AsyncDropdown, Si as AuthButton, ti as AuthProvider, Js as Autocomplete, sn as BUILT_IN_THEMES, nn as BUILT_IN_THEME_IDS, Ur as BackLink, Qn as Badge, Zn as BadgeOverlay, Ki as Brand, ea as Breadcrumbs, wl as CONTEXT_MENU_SEARCH_THRESHOLD, ji as Card, ta as Carousel, Gl as Chatbot, js as Checkbox, Ys as Checklist, Go as Code, Mu as CodeEditor, pu as CodeSyntaxError, Jn as Col, Ss as Color, nd as Component, rd as ComponentBlock, Kn as Container, Bl as ContextMenu, yc as CropImage, op as DEFAULT_DOCUMENT_HEAD, ap as DEFAULT_HEAD_APP_NAME, sp as DEFAULT_LANGUAGE_HEAD, Is as DEFAULT_ORDER, wi as DataProvider, Cs as Date, Ts as DateTime, Qh as DirectApiProviderAdapter, Lg as DropBoxConnectButton, Xm as DropboxAuthProvider, Ri as Dropdown, Bi as DropdownButton, Ui as DropdownDivider, Hi as DropdownHeader, Vi as DropdownItem, Wi as DropdownMenu, ng as EMAIL_PROVIDER_DEFINITIONS, bs as Email, Sm as EmailProvider, hs as FieldError, Ec as FileNameEditor, eg as FirebaseApiProviderAdapter, Um as FirebaseAuthProvider, zm as FirebaseDataProvider, So as FirebaseStorageProvider, Ya as FirestoreDataProvider, jd as Form, gd as FormControllerContext, qp as Gallery, $m as GmailEmailProvider, Wr as GoSite, bm as GoogleAuthProvider, mf as GoogleMapsProvider, Jm as GoogleServiceAccountProvider, cm as Grid, sm as GridArray, om as GridCore, Uf as GridDB, Jp as GridGalleryView, np as GridTableView, Ip as Head, wp as HeadProvider, As as Hidden, Pn as I18nProvider, Q as Icon, Sr as IconProvider, Gi as Image, ii as ImageAvatar, dc as ImageEditor, pc as ImageField, _s as Input, Ns as Label, ff as LayoutBuilder, Af as ListCard, Fs as ListGroup, Ei as Loader, Vr as LoadingButton, qo as LocaleSwitcher, dr as LucideIconProvider, Wp as MarkdownReader, Ii as Menu, $h as MockApiProviderAdapter, go as MockDataProvider, Mi as Modal, Fi as ModalOk, Pi as ModalYesNo, Ds as Month, i_ as NORMALIZE_MAP, na as Notifications, ys as Number, sg as OPENAI_COMPATIBLE_PROVIDER_DESCRIPTOR, zs as Order, rg as PUBLISH_PROVIDER_DEFINITIONS, lm as PageUsers, Kp as Pagination, xs as Password, $o as Percentage, mr as PhosphorIconProvider, ru as Prompt, Kl as PromptMode, Cl as PromptUtils, No as ProviderSwitcher, Os as Range, Gr as ReferSite, Ud as Repeat, ed as RichText, qn as Row, l_ as Sanitizer, ia as Search, qs as Select, Bf as SideNav, cc as StorageProvider, vs as String, tg as SupabaseApiProviderAdapter, th as SupabaseAuthProvider, co as SupabaseDataProvider, Co as SupabaseStorageProvider, Ms as Switch, Zd as Tab, Gp as TabDynamic, Yd as TabItem, Jd as TabLayouts, ef as Table, Ps as TextArea, ma as ThemeSwitcher, ws as Time, sa as Toolbar, Of as UploadCSV, Pc as UploadDocument, Fc as UploadImage, ks as Url, Es as Week, Z as Wrapper, xt as arrayUnique, Et as arraysEqual, Tt as base64Encode, At as base64ToBlob, jt as base64ToUrl, qi as buildBreadcrumbSchema, Ll as buildTextCommandContext, Er as buttonBaseClass, kr as buttonDangerClass, Pr as buttonDarkClass, Mr as buttonInfoClass, Nr as buttonLightClass, zr as buttonLinkClass, Lr as buttonOutlineDangerClass, Fr as buttonOutlinePrimaryClass, Ir as buttonOutlineSecondaryClass, Rr as buttonOutlineSuccessClass, Dr as buttonPrimaryClass, Or as buttonSecondaryClass, Ar as buttonSuccessClass, jr as buttonWarningClass, Ra as callFirebaseFunction, ht as checkConditions, Nt as cleanRecord, X as cn, il as configureProxy, et as converter, it as copyToClipboard, gt as crc32, lg as createAIProviderRegistry, rr as createMotionTransition, En as createTranslations, rt as decodeJWT, Tn as defineLocaleMessages, lt as dirname, Rg as dropBox, ft as eventClosest, Wt as fetchJson, Ut as fetchRest, Gt as fetchWithRetry, ss as fieldAddonClass, is as fieldControlBaseClass, rs as fieldFeedbackClass, os as fieldGroupClass, ns as fieldLabelClass, as as fieldTextAreaBaseClass, Yc as formatAIModelRef, dt as generateUniqueId, gl as getAIModelCatalog, bi as getAccessToken, Pl as getAutoClosedSuffixLength, Cu as getCodeValidationResult, Nc as getFileUrl, Zr as getGlobalVars, gg as getGoogleTrendsData, _g as getGoogleTrendsRelated, hg as getKeywordIdeas, si as getProviderConfigurationState, Mt as getRecordValue, Gd as getTabLayoutConfig, qd as getTabPaneClassName, Kd as getTabTriggerClassName, Zm as googleGetAccessToken, Nl as hasAutoClosedSuffix, Dn as interpolate, yt as intersectObjects, Yn as isBadgeDescriptor, St as isEmpty, Ot as isInteractiveElement, sl as isProxyEnabled, vf as loadGoogleMaps, vt as loadScripts, Yh as locales, Fl as matchCommandTrigger, Xn as normalizeBadgeProps, ct as normalizeKey, ot as normalizePath, c_ as normalizeVisualChars, Xc as parseAIModelRef, u_ as parseCsvText, ri as path, al as proxyFetch, Ft as recordsEqual, To as registerProviderSessionFactory, $r as removeGlobalVars, kt as render2Base64, mt as replacePlaceholders, bt as replaceVariables, ir as resolveMotionEffect, fu as runPrompt, wt as safeClone, Dt as sanitizeKey, r_ as scrape, Qm as sendEmail, Qr as setGlobalVars, ut as sleep, It as smartTypeCast, pt as substrCount, ag as toProviderDescriptor, at as trimPath, st as trimSlash, _t as ucfirst, $c as useAIProvider, el as useAIProviderRegistry, _i as useAccessToken, Xh as useApiProvider, Np as useAssetsHead, ni as useAuthProvider, Em as useCredentialsProvider, Ti as useDataProvider, Mp as useDocumentHead, Ig as useDropBoxConnect, ts as useEditorHeight, Cm as useEmailProvider, cr as useEnterMotion, Dc as useFileUploadCore, vd as useFormActions, Dd as useFormContext, _d as useFormController, Xr as useGlobalVars, hf as useGoogleMapsConfig, Dp as useHead, kp as useHeadLinks, Fn as useI18n, wr as useIconController, Cr as useIconProvider, ec as useImage, jp as useLanguageHead, Uh as useMenu, ar as useMotionEffect, or as useMotionState, Ap as usePaginationHead, sr as usePressMotion, ya as useProvider, jo as useProviderSession, ol as useProxy, Pp as usePwaHead, Fp as useSchemaOrgHead, va as useSetProvider, Op as useSocialHead, lc as useStorageProvider, Y as useTheme, Cn as useThemeController, Su as validateCodeSyntax };
19385
+ export { Qc as AIProvider, rg as AI_PROVIDER_DEFINITIONS, ag as AI_PROVIDER_DESCRIPTORS, Hr as ActionButton, Ef as AddressAutocomplete, Io as Alert, Vh as App, Bh as AppProvider, zi as AsyncDropdown, Si as AuthButton, ti as AuthProvider, Js as Autocomplete, sn as BUILT_IN_THEMES, nn as BUILT_IN_THEME_IDS, Ur as BackLink, Qn as Badge, Zn as BadgeOverlay, Ki as Brand, ea as Breadcrumbs, wl as CONTEXT_MENU_SEARCH_THRESHOLD, ji as Card, ta as Carousel, Gl as Chatbot, js as Checkbox, Ys as Checklist, Go as Code, Mu as CodeEditor, pu as CodeSyntaxError, Jn as Col, Ss as Color, nd as Component, rd as ComponentBlock, Kn as Container, Bl as ContextMenu, yc as CropImage, ap as DEFAULT_DOCUMENT_HEAD, ip as DEFAULT_HEAD_APP_NAME, op as DEFAULT_LANGUAGE_HEAD, Is as DEFAULT_ORDER, wi as DataProvider, Cs as Date, Ts as DateTime, Zh as DirectApiProviderAdapter, Ig as DropBoxConnectButton, Ym as DropboxAuthProvider, Ri as Dropdown, Bi as DropdownButton, Ui as DropdownDivider, Hi as DropdownHeader, Vi as DropdownItem, Wi as DropdownMenu, tg as EMAIL_PROVIDER_DEFINITIONS, bs as Email, xm as EmailProvider, hs as FieldError, Ec as FileNameEditor, $h as FirebaseApiProviderAdapter, Hm as FirebaseAuthProvider, Rm as FirebaseDataProvider, So as FirebaseStorageProvider, Ya as FirestoreDataProvider, jd as Form, gd as FormControllerContext, Kp as Gallery, Qm as GmailEmailProvider, Wr as GoSite, ym as GoogleAuthProvider, pf as GoogleMapsProvider, qm as GoogleServiceAccountProvider, sm as Grid, om as GridArray, am as GridCore, Hf as GridDB, qp as GridGalleryView, tp as GridTableView, Fp as Head, Cp as HeadProvider, As as Hidden, Pn as I18nProvider, Q as Icon, Sr as IconProvider, Gi as Image, ii as ImageAvatar, dc as ImageEditor, pc as ImageField, _s as Input, Ns as Label, df as LayoutBuilder, kf as ListCard, Fs as ListGroup, Ei as Loader, Vr as LoadingButton, qo as LocaleSwitcher, dr as LucideIconProvider, Up as MarkdownReader, Ii as Menu, Qh as MockApiProviderAdapter, go as MockDataProvider, Mi as Modal, Fi as ModalOk, Pi as ModalYesNo, Ds as Month, r_ as NORMALIZE_MAP, na as Notifications, ys as Number, og as OPENAI_COMPATIBLE_PROVIDER_DESCRIPTOR, zs as Order, ng as PUBLISH_PROVIDER_DEFINITIONS, cm as PageUsers, Gp as Pagination, xs as Password, $o as Percentage, mr as PhosphorIconProvider, ru as Prompt, Kl as PromptMode, Cl as PromptUtils, No as ProviderSwitcher, Os as Range, Gr as ReferSite, Hd as Repeat, ed as RichText, qn as Row, c_ as Sanitizer, ia as Search, qs as Select, zf as SideNav, cc as StorageProvider, vs as String, eg as SupabaseApiProviderAdapter, eh as SupabaseAuthProvider, co as SupabaseDataProvider, Co as SupabaseStorageProvider, Ms as Switch, Xd as Tab, Wp as TabDynamic, Jd as TabItem, qd as TabLayouts, $d as Table, Ps as TextArea, ma as ThemeSwitcher, ws as Time, sa as Toolbar, Df as UploadCSV, Pc as UploadDocument, Fc as UploadImage, ks as Url, Es as Week, Z as Wrapper, xt as arrayUnique, Et as arraysEqual, Tt as base64Encode, At as base64ToBlob, jt as base64ToUrl, qi as buildBreadcrumbSchema, Ll as buildTextCommandContext, Er as buttonBaseClass, kr as buttonDangerClass, Pr as buttonDarkClass, Mr as buttonInfoClass, Nr as buttonLightClass, zr as buttonLinkClass, Lr as buttonOutlineDangerClass, Fr as buttonOutlinePrimaryClass, Ir as buttonOutlineSecondaryClass, Rr as buttonOutlineSuccessClass, Dr as buttonPrimaryClass, Or as buttonSecondaryClass, Ar as buttonSuccessClass, jr as buttonWarningClass, Ra as callFirebaseFunction, ht as checkConditions, Nt as cleanRecord, X as cn, il as configureProxy, et as converter, it as copyToClipboard, gt as crc32, cg as createAIProviderRegistry, rr as createMotionTransition, En as createTranslations, rt as decodeJWT, Tn as defineLocaleMessages, lt as dirname, Lg as dropBox, ft as eventClosest, Wt as fetchJson, Ut as fetchRest, Gt as fetchWithRetry, ss as fieldAddonClass, is as fieldControlBaseClass, rs as fieldFeedbackClass, os as fieldGroupClass, ns as fieldLabelClass, as as fieldTextAreaBaseClass, Yc as formatAIModelRef, dt as generateUniqueId, gl as getAIModelCatalog, bi as getAccessToken, Pl as getAutoClosedSuffixLength, Cu as getCodeValidationResult, Nc as getFileUrl, Zr as getGlobalVars, hg as getGoogleTrendsData, gg as getGoogleTrendsRelated, mg as getKeywordIdeas, si as getProviderConfigurationState, Mt as getRecordValue, Wd as getTabLayoutConfig, Kd as getTabPaneClassName, Gd as getTabTriggerClassName, Xm as googleGetAccessToken, Nl as hasAutoClosedSuffix, Dn as interpolate, yt as intersectObjects, Yn as isBadgeDescriptor, St as isEmpty, Ot as isInteractiveElement, sl as isProxyEnabled, _f as loadGoogleMaps, vt as loadScripts, Jh as locales, Fl as matchCommandTrigger, Xn as normalizeBadgeProps, ct as normalizeKey, ot as normalizePath, s_ as normalizeVisualChars, Xc as parseAIModelRef, l_ as parseCsvText, ri as path, al as proxyFetch, Ft as recordsEqual, To as registerProviderSessionFactory, $r as removeGlobalVars, kt as render2Base64, mt as replacePlaceholders, bt as replaceVariables, ir as resolveMotionEffect, fu as runPrompt, wt as safeClone, Dt as sanitizeKey, n_ as scrape, Zm as sendEmail, Qr as setGlobalVars, ut as sleep, It as smartTypeCast, pt as substrCount, ig as toProviderDescriptor, at as trimPath, st as trimSlash, _t as ucfirst, $c as useAIProvider, el as useAIProviderRegistry, _i as useAccessToken, Yh as useApiProvider, Mp as useAssetsHead, ni as useAuthProvider, Tm as useCredentialsProvider, Ti as useDataProvider, jp as useDocumentHead, Fg as useDropBoxConnect, ts as useEditorHeight, Sm as useEmailProvider, cr as useEnterMotion, Dc as useFileUploadCore, vd as useFormActions, Dd as useFormContext, _d as useFormController, Xr as useGlobalVars, mf as useGoogleMapsConfig, Ep as useHead, Op as useHeadLinks, Fn as useI18n, wr as useIconController, Cr as useIconProvider, ec as useImage, Ap as useLanguageHead, Hh as useMenu, ar as useMotionEffect, or as useMotionState, kp as usePaginationHead, sr as usePressMotion, ya as useProvider, jo as useProviderSession, ol as useProxy, Np as usePwaHead, Pp as useSchemaOrgHead, va as useSetProvider, Dp as useSocialHead, lc as useStorageProvider, Y as useTheme, Cn as useThemeController, Su as validateCodeSyntax };
19370
19386
 
19371
19387
  //# sourceMappingURL=index.mjs.map