react-semaphor 0.0.163 → 0.0.165

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,4 @@
1
- import { P as X, b as B, j as i, Q as Nt, R as Et, U as V, V as zt, W as At, X as Ot, Y as Tt, Z as pe, _ as ke, $ as ui, J as di, O as cn, a0 as Os, a1 as Ts, a2 as Is, a3 as Fs, a4 as Ls, a5 as Ms, a6 as sr, a7 as gn, a8 as Vn, a9 as Ln, T as Hn, e as It, g as Un, aa as Ft, ab as Lt, f as je, ac as Mt, ad as Dt, ae as Pt, af as Mn, ag as We, G as C, ah as kn, ai as jn, aj as Ds, ak as Cn, w as hi, v as pi, t as Ve, al as Ps, r as Rs, N as fi, s as _s, am as Bs, B as qs, L as $n, S as Rt, z as Vs, n as ar, A as mi, u as Wn, an as Ge, ao as sn, ap as Hs, aq as Us, ar as $s, as as xi, at as gi, au as yi, av as bi, aw as ki, ax as Ws, ay as ji, az as lr, aA as Ks, aB as Ci, aC as Qs, aD as Js, aE as Gs, aF as Xs, aG as ft, aH as Ys, aI as Zs, aJ as Tn, aK as or, aL as ea, aM as na, aN as ta, aO as ra, aP as ia, aQ as tt, aR as sa, aS as cr, aT as aa, aU as ur, aV as la, aW as oa, aX as ca, aY as wi, l as ua, C as da, E as dr, d as ha, h as pa, i as fa, o as ma, aZ as xa, m as ga, a_ as ya, a$ as ba, b0 as ka, b1 as hr, b2 as ja, b3 as pr, b4 as fr, K as Ca, b5 as Si, b6 as wa, b7 as vi, b8 as Dn, b9 as Ni, ba as Sa, bb as va, bc as Na, bd as Ea, be as za, bf as Aa, bg as Ye, bh as ue, bi as de, bj as _t, bk as he, bl as Oa, bm as Ta, bn as Ia, bo as mr, bp as Fa, bq as La, br as Ma, bs as Da, bt as Pa } from "./index-4anwde0N.js";
1
+ import { P as X, b as B, j as i, Q as Nt, R as Et, U as V, V as zt, W as At, X as Ot, Y as Tt, Z as pe, _ as ke, $ as ui, J as di, O as cn, a0 as Os, a1 as Ts, a2 as Is, a3 as Fs, a4 as Ls, a5 as Ms, a6 as sr, a7 as gn, a8 as Vn, a9 as Ln, T as Hn, e as It, g as Un, aa as Ft, ab as Lt, f as je, ac as Mt, ad as Dt, ae as Pt, af as Mn, ag as We, G as C, ah as kn, ai as jn, aj as Ds, ak as Cn, w as hi, v as pi, t as Ve, al as Ps, r as Rs, N as fi, s as _s, am as Bs, B as qs, L as $n, S as Rt, z as Vs, n as ar, A as mi, u as Wn, an as Ge, ao as sn, ap as Hs, aq as Us, ar as $s, as as xi, at as gi, au as yi, av as bi, aw as ki, ax as Ws, ay as ji, az as lr, aA as Ks, aB as Ci, aC as Qs, aD as Js, aE as Gs, aF as Xs, aG as ft, aH as Ys, aI as Zs, aJ as Tn, aK as or, aL as ea, aM as na, aN as ta, aO as ra, aP as ia, aQ as tt, aR as sa, aS as cr, aT as aa, aU as ur, aV as la, aW as oa, aX as ca, aY as Si, l as ua, C as da, E as dr, d as ha, h as pa, i as fa, o as ma, aZ as xa, m as ga, a_ as ya, a$ as ba, b0 as ka, b1 as hr, b2 as ja, b3 as pr, b4 as fr, K as Ca, b5 as wi, b6 as Sa, b7 as vi, b8 as Dn, b9 as Ni, ba as wa, bb as va, bc as Na, bd as Ea, be as za, bf as Aa, bg as Ye, bh as ue, bi as de, bj as _t, bk as he, bl as Oa, bm as Ta, bn as Ia, bo as mr, bp as Fa, bq as La, br as Ma, bs as Da, bt as Pa } from "./index-H-BMnao-.js";
2
2
  import He, { useState as G, useEffect as xe, useMemo as Ra, useRef as yn } from "react";
3
3
  /**
4
4
  * @license lucide-react v0.379.0 - ISC
@@ -474,21 +474,21 @@ function ul() {
474
474
  const p = cn(s.id), g = JSON.parse(localStorage.getItem(p) || "[]");
475
475
  o(g);
476
476
  const b = g.find(
477
- (S) => S.default
477
+ (w) => w.default
478
478
  );
479
479
  b && b.name === l && r(b.name);
480
480
  }, [e, s, l]);
481
481
  function d(p) {
482
482
  if (p === t)
483
483
  return;
484
- const g = a.find((S) => S.name === p), b = g == null ? void 0 : g.template;
484
+ const g = a.find((w) => w.name === p), b = g == null ? void 0 : g.template;
485
485
  b && (c(b), u(g.filterValues || []), h(p === "Original" ? "" : p)), r(p);
486
486
  }
487
487
  function f(p) {
488
- const g = cn(s.id), S = JSON.parse(localStorage.getItem(g) || "[]").filter(
488
+ const g = cn(s.id), w = JSON.parse(localStorage.getItem(g) || "[]").filter(
489
489
  (k) => k.name !== p
490
490
  );
491
- localStorage.setItem(g, JSON.stringify(S)), o(S);
491
+ localStorage.setItem(g, JSON.stringify(w)), o(w);
492
492
  }
493
493
  return /* @__PURE__ */ i.jsxs(Os, { open: e, onOpenChange: n, children: [
494
494
  /* @__PURE__ */ i.jsx(Ts, { asChild: !0, children: /* @__PURE__ */ i.jsx(V, { variant: "outline", className: "h-7 p-2", children: /* @__PURE__ */ i.jsx(Ua, { className: "h-4 w-4", strokeWidth: 1.5 }) }) }),
@@ -611,7 +611,7 @@ function hl() {
611
611
  }, b = () => {
612
612
  d(!0);
613
613
  };
614
- function S() {
614
+ function w() {
615
615
  if (!e || e === "")
616
616
  return;
617
617
  const k = di(n), v = cn(n.id), N = JSON.parse(localStorage.getItem(v) || "[]"), F = N.findIndex(
@@ -686,7 +686,7 @@ function hl() {
686
686
  {
687
687
  className: "h-7 p-2",
688
688
  variant: "outline",
689
- onClick: S,
689
+ onClick: w,
690
690
  size: "sm",
691
691
  children: /* @__PURE__ */ i.jsx(tl, { className: "h-4 w-4", strokeWidth: 1.5 })
692
692
  }
@@ -937,7 +937,7 @@ function ml(e, n) {
937
937
  }
938
938
  const {
939
939
  data: b,
940
- isLoading: S,
940
+ isLoading: w,
941
941
  isError: k
942
942
  } = Ge({
943
943
  queryKey: ["connections"],
@@ -951,7 +951,7 @@ function ml(e, n) {
951
951
  (M) => M.id === s
952
952
  ), N = v == null ? void 0 : v.type, F = (v == null ? void 0 : v.type) === "API" || (v == null ? void 0 : v.type) === "S3", {
953
953
  data: T,
954
- isLoading: w,
954
+ isLoading: S,
955
955
  isFetching: P,
956
956
  isError: Q,
957
957
  refetch: W
@@ -1051,7 +1051,7 @@ function ml(e, n) {
1051
1051
  function re(M) {
1052
1052
  d(M), f("");
1053
1053
  }
1054
- function we(M) {
1054
+ function Se(M) {
1055
1055
  h(M), d(""), f("");
1056
1056
  }
1057
1057
  function fe(M) {
@@ -1079,10 +1079,10 @@ function ml(e, n) {
1079
1079
  }));
1080
1080
  return {
1081
1081
  connectionItems: oe,
1082
- isConnectionsLoading: S,
1082
+ isConnectionsLoading: w,
1083
1083
  isConnectionsError: k,
1084
1084
  databaseItems: me,
1085
- isDatabasesLoadingOrFetching: w || P,
1085
+ isDatabasesLoadingOrFetching: S || P,
1086
1086
  isDatabaseError: Q,
1087
1087
  schemaItems: Te,
1088
1088
  isSchemaLoadingOrFetching: O || A,
@@ -1098,7 +1098,7 @@ function ml(e, n) {
1098
1098
  tableName: se,
1099
1099
  schemaName: ye,
1100
1100
  handleConnectionChange: fe,
1101
- handleDatabaseChange: we,
1101
+ handleDatabaseChange: Se,
1102
1102
  handleSchemaChange: re
1103
1103
  };
1104
1104
  }
@@ -1125,13 +1125,13 @@ function Fi({
1125
1125
  isDatabasesLoadingOrFetching: p,
1126
1126
  isDatabaseError: g,
1127
1127
  isSchemaLoadingOrFetching: b,
1128
- isSchemaError: S,
1128
+ isSchemaError: w,
1129
1129
  isColumnsError: k,
1130
1130
  isColumnsLoadingOrFetching: v,
1131
1131
  isTableLoadingOrFetching: N,
1132
1132
  isTableError: F,
1133
1133
  connectionType: T,
1134
- isNonDbConnection: w,
1134
+ isNonDbConnection: S,
1135
1135
  handleConnectionChange: P,
1136
1136
  handleDatabaseChange: Q,
1137
1137
  handleSchemaChange: W,
@@ -1170,7 +1170,7 @@ function Fi({
1170
1170
  En,
1171
1171
  {
1172
1172
  onChange: W,
1173
- isError: S,
1173
+ isError: w,
1174
1174
  isLoading: b,
1175
1175
  items: o,
1176
1176
  value: r || "",
@@ -1355,18 +1355,18 @@ function kl(e, n) {
1355
1355
  (t.padRight ? " " : "") + "," + (t.padLeft === !1 ? "" : " ")
1356
1356
  ).trim();
1357
1357
  }
1358
- const jl = /^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u, Cl = /^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u, wl = {};
1358
+ const jl = /^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u, Cl = /^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u, Sl = {};
1359
1359
  function xr(e, n) {
1360
- return ((n || wl).jsx ? Cl : jl).test(e);
1360
+ return ((n || Sl).jsx ? Cl : jl).test(e);
1361
1361
  }
1362
- const Sl = /[ \t\n\f\r]/g;
1362
+ const wl = /[ \t\n\f\r]/g;
1363
1363
  function vl(e) {
1364
1364
  return typeof e == "object" ? e.type === "text" ? gr(e.value) : !1 : gr(e);
1365
1365
  }
1366
1366
  function gr(e) {
1367
- return e.replace(Sl, "") === "";
1367
+ return e.replace(wl, "") === "";
1368
1368
  }
1369
- class wn {
1369
+ class Sn {
1370
1370
  /**
1371
1371
  * @constructor
1372
1372
  * @param {Properties} property
@@ -1377,15 +1377,15 @@ class wn {
1377
1377
  this.property = n, this.normal = t, r && (this.space = r);
1378
1378
  }
1379
1379
  }
1380
- wn.prototype.property = {};
1381
- wn.prototype.normal = {};
1382
- wn.prototype.space = null;
1380
+ Sn.prototype.property = {};
1381
+ Sn.prototype.normal = {};
1382
+ Sn.prototype.space = null;
1383
1383
  function Li(e, n) {
1384
1384
  const t = {}, r = {};
1385
1385
  let s = -1;
1386
1386
  for (; ++s < e.length; )
1387
1387
  Object.assign(t, e[s].property), Object.assign(r, e[s].normal);
1388
- return new wn(t, r, n);
1388
+ return new Sn(t, r, n);
1389
1389
  }
1390
1390
  function gt(e) {
1391
1391
  return e.toLowerCase();
@@ -1460,7 +1460,7 @@ function un(e) {
1460
1460
  );
1461
1461
  e.mustUseProperty && e.mustUseProperty.includes(r) && (l.mustUseProperty = !0), n[r] = l, t[gt(r)] = r, t[gt(l.attribute)] = r;
1462
1462
  }
1463
- return new wn(n, t, e.space);
1463
+ return new Sn(n, t, e.space);
1464
1464
  }
1465
1465
  const Di = un({
1466
1466
  space: "xlink",
@@ -2527,8 +2527,8 @@ var Vi = {}, kr = /\/\*[^*]*\*+([^/*][^*]*\*+)*\//g, Rl = /\n/g, _l = /^\s*/, Bl
2527
2527
  function s(g) {
2528
2528
  var b = g.match(Rl);
2529
2529
  b && (t += b.length);
2530
- var S = g.lastIndexOf($l);
2531
- r = ~S ? g.length - S : r + g.length;
2530
+ var w = g.lastIndexOf($l);
2531
+ r = ~w ? g.length - w : r + g.length;
2532
2532
  }
2533
2533
  function l() {
2534
2534
  var g = { line: t, column: r };
@@ -2550,8 +2550,8 @@ var Vi = {}, kr = /\/\*[^*]*\*+([^/*][^*]*\*+)*\//g, Rl = /\n/g, _l = /^\s*/, Bl
2550
2550
  function c(g) {
2551
2551
  var b = g.exec(e);
2552
2552
  if (b) {
2553
- var S = b[0];
2554
- return s(S), e = e.slice(S.length), b;
2553
+ var w = b[0];
2554
+ return s(w), e = e.slice(w.length), b;
2555
2555
  }
2556
2556
  }
2557
2557
  function u() {
@@ -2570,10 +2570,10 @@ var Vi = {}, kr = /\/\*[^*]*\*+([^/*][^*]*\*+)*\//g, Rl = /\n/g, _l = /^\s*/, Bl
2570
2570
  ++b;
2571
2571
  if (b += 2, Xe === e.charAt(b - 1))
2572
2572
  return o("End of comment missing");
2573
- var S = e.slice(2, b - 2);
2574
- return r += 2, s(S), e = e.slice(b), r += 2, g({
2573
+ var w = e.slice(2, b - 2);
2574
+ return r += 2, s(w), e = e.slice(b), r += 2, g({
2575
2575
  type: Wl,
2576
- comment: S
2576
+ comment: w
2577
2577
  });
2578
2578
  }
2579
2579
  }
@@ -2582,10 +2582,10 @@ var Vi = {}, kr = /\/\*[^*]*\*+([^/*][^*]*\*+)*\//g, Rl = /\n/g, _l = /^\s*/, Bl
2582
2582
  if (b) {
2583
2583
  if (d(), !c(ql))
2584
2584
  return o("property missing ':'");
2585
- var S = c(Vl), k = g({
2585
+ var w = c(Vl), k = g({
2586
2586
  type: Kl,
2587
- property: wr(b[0].replace(kr, Xe)),
2588
- value: S ? wr(S[0].replace(kr, Xe)) : Xe
2587
+ property: Sr(b[0].replace(kr, Xe)),
2588
+ value: w ? Sr(w[0].replace(kr, Xe)) : Xe
2589
2589
  });
2590
2590
  return c(Hl), k;
2591
2591
  }
@@ -2599,7 +2599,7 @@ var Vi = {}, kr = /\/\*[^*]*\*+([^/*][^*]*\*+)*\//g, Rl = /\n/g, _l = /^\s*/, Bl
2599
2599
  }
2600
2600
  return u(), p();
2601
2601
  };
2602
- function wr(e) {
2602
+ function Sr(e) {
2603
2603
  return e ? e.replace(Ul, Xe) : Xe;
2604
2604
  }
2605
2605
  var Jl = lr && lr.__importDefault || function(e) {
@@ -2619,8 +2619,8 @@ function Xl(e, n) {
2619
2619
  }
2620
2620
  }), t;
2621
2621
  }
2622
- var Sr = Vi.default = Xl;
2623
- const Yl = Sr.default || Sr, Hi = Ui("end"), $t = Ui("start");
2622
+ var wr = Vi.default = Xl;
2623
+ const Yl = wr.default || wr, Hi = Ui("end"), $t = Ui("start");
2624
2624
  function Ui(e) {
2625
2625
  return n;
2626
2626
  function n(t) {
@@ -3056,9 +3056,9 @@ const it = {
3056
3056
  "track",
3057
3057
  "video"
3058
3058
  ]
3059
- }, wo = {};
3060
- function So(e, n) {
3061
- const t = n || wo, r = typeof t.includeImageAlt == "boolean" ? t.includeImageAlt : !0, s = typeof t.includeHtml == "boolean" ? t.includeHtml : !0;
3059
+ }, So = {};
3060
+ function wo(e, n) {
3061
+ const t = n || So, r = typeof t.includeImageAlt == "boolean" ? t.includeImageAlt : !0, s = typeof t.includeHtml == "boolean" ? t.includeHtml : !0;
3062
3062
  return Ji(e, r, s);
3063
3063
  }
3064
3064
  function Ji(e, n, t) {
@@ -3267,16 +3267,16 @@ function Po(e) {
3267
3267
  if (r++, n.containerState._closeFlow) {
3268
3268
  n.containerState._closeFlow = void 0, s && v();
3269
3269
  const F = n.events.length;
3270
- let T = F, w;
3270
+ let T = F, S;
3271
3271
  for (; T--; )
3272
3272
  if (n.events[T][0] === "exit" && n.events[T][1].type === "chunkFlow") {
3273
- w = n.events[T][1].end;
3273
+ S = n.events[T][1].end;
3274
3274
  break;
3275
3275
  }
3276
3276
  k(r);
3277
3277
  let P = F;
3278
3278
  for (; P < n.events.length; )
3279
- n.events[P][1].end = Object.assign({}, w), P++;
3279
+ n.events[P][1].end = Object.assign({}, S), P++;
3280
3280
  return Me(
3281
3281
  n.events,
3282
3282
  T + 1,
@@ -3329,21 +3329,21 @@ function Po(e) {
3329
3329
  }
3330
3330
  function b(N) {
3331
3331
  if (N === null) {
3332
- S(e.exit("chunkFlow"), !0), k(0), e.consume(N);
3332
+ w(e.exit("chunkFlow"), !0), k(0), e.consume(N);
3333
3333
  return;
3334
3334
  }
3335
- return R(N) ? (e.consume(N), S(e.exit("chunkFlow")), r = 0, n.interrupt = void 0, o) : (e.consume(N), b);
3335
+ return R(N) ? (e.consume(N), w(e.exit("chunkFlow")), r = 0, n.interrupt = void 0, o) : (e.consume(N), b);
3336
3336
  }
3337
- function S(N, F) {
3337
+ function w(N, F) {
3338
3338
  const T = n.sliceStream(N);
3339
3339
  if (F && T.push(null), N.previous = l, l && (l.next = N), l = N, s.defineSkip(N.start), s.write(T), n.parser.lazy[N.start.line]) {
3340
- let w = s.events.length;
3341
- for (; w--; )
3340
+ let S = s.events.length;
3341
+ for (; S--; )
3342
3342
  if (
3343
3343
  // The token starts before the line ending…
3344
- s.events[w][1].start.offset < a && // …and either is not ended yet…
3345
- (!s.events[w][1].end || // …or ends after it.
3346
- s.events[w][1].end.offset > a)
3344
+ s.events[S][1].start.offset < a && // …and either is not ended yet…
3345
+ (!s.events[S][1].end || // …or ends after it.
3346
+ s.events[S][1].end.offset > a)
3347
3347
  )
3348
3348
  return;
3349
3349
  const P = n.events.length;
@@ -3356,14 +3356,14 @@ function Po(e) {
3356
3356
  }
3357
3357
  W = !0;
3358
3358
  }
3359
- for (k(r), w = P; w < n.events.length; )
3360
- n.events[w][1].end = Object.assign({}, q), w++;
3359
+ for (k(r), S = P; S < n.events.length; )
3360
+ n.events[S][1].end = Object.assign({}, q), S++;
3361
3361
  Me(
3362
3362
  n.events,
3363
3363
  Q + 1,
3364
3364
  0,
3365
3365
  n.events.slice(P)
3366
- ), n.events.length = w;
3366
+ ), n.events.length = S;
3367
3367
  }
3368
3368
  }
3369
3369
  function k(N) {
@@ -3628,77 +3628,77 @@ function Jo(e, n, t) {
3628
3628
  };
3629
3629
  let l = 0, a = 0, o;
3630
3630
  return c;
3631
- function c(w) {
3632
- return u(w);
3631
+ function c(S) {
3632
+ return u(S);
3633
3633
  }
3634
- function u(w) {
3634
+ function u(S) {
3635
3635
  const P = r.events[r.events.length - 1];
3636
- return l = P && P[1].type === "linePrefix" ? P[2].sliceSerialize(P[1], !0).length : 0, o = w, e.enter("codeFenced"), e.enter("codeFencedFence"), e.enter("codeFencedFenceSequence"), h(w);
3636
+ return l = P && P[1].type === "linePrefix" ? P[2].sliceSerialize(P[1], !0).length : 0, o = S, e.enter("codeFenced"), e.enter("codeFencedFence"), e.enter("codeFencedFenceSequence"), h(S);
3637
3637
  }
3638
- function h(w) {
3639
- return w === o ? (a++, e.consume(w), h) : a < 3 ? t(w) : (e.exit("codeFencedFenceSequence"), Y(w) ? te(e, d, "whitespace")(w) : d(w));
3638
+ function h(S) {
3639
+ return S === o ? (a++, e.consume(S), h) : a < 3 ? t(S) : (e.exit("codeFencedFenceSequence"), Y(S) ? te(e, d, "whitespace")(S) : d(S));
3640
3640
  }
3641
- function d(w) {
3642
- return w === null || R(w) ? (e.exit("codeFencedFence"), r.interrupt ? n(w) : e.check(Fr, b, F)(w)) : (e.enter("codeFencedFenceInfo"), e.enter("chunkString", {
3641
+ function d(S) {
3642
+ return S === null || R(S) ? (e.exit("codeFencedFence"), r.interrupt ? n(S) : e.check(Fr, b, F)(S)) : (e.enter("codeFencedFenceInfo"), e.enter("chunkString", {
3643
3643
  contentType: "string"
3644
- }), f(w));
3644
+ }), f(S));
3645
3645
  }
3646
- function f(w) {
3647
- return w === null || R(w) ? (e.exit("chunkString"), e.exit("codeFencedFenceInfo"), d(w)) : Y(w) ? (e.exit("chunkString"), e.exit("codeFencedFenceInfo"), te(e, p, "whitespace")(w)) : w === 96 && w === o ? t(w) : (e.consume(w), f);
3646
+ function f(S) {
3647
+ return S === null || R(S) ? (e.exit("chunkString"), e.exit("codeFencedFenceInfo"), d(S)) : Y(S) ? (e.exit("chunkString"), e.exit("codeFencedFenceInfo"), te(e, p, "whitespace")(S)) : S === 96 && S === o ? t(S) : (e.consume(S), f);
3648
3648
  }
3649
- function p(w) {
3650
- return w === null || R(w) ? d(w) : (e.enter("codeFencedFenceMeta"), e.enter("chunkString", {
3649
+ function p(S) {
3650
+ return S === null || R(S) ? d(S) : (e.enter("codeFencedFenceMeta"), e.enter("chunkString", {
3651
3651
  contentType: "string"
3652
- }), g(w));
3652
+ }), g(S));
3653
3653
  }
3654
- function g(w) {
3655
- return w === null || R(w) ? (e.exit("chunkString"), e.exit("codeFencedFenceMeta"), d(w)) : w === 96 && w === o ? t(w) : (e.consume(w), g);
3654
+ function g(S) {
3655
+ return S === null || R(S) ? (e.exit("chunkString"), e.exit("codeFencedFenceMeta"), d(S)) : S === 96 && S === o ? t(S) : (e.consume(S), g);
3656
3656
  }
3657
- function b(w) {
3658
- return e.attempt(s, F, S)(w);
3657
+ function b(S) {
3658
+ return e.attempt(s, F, w)(S);
3659
3659
  }
3660
- function S(w) {
3661
- return e.enter("lineEnding"), e.consume(w), e.exit("lineEnding"), k;
3660
+ function w(S) {
3661
+ return e.enter("lineEnding"), e.consume(S), e.exit("lineEnding"), k;
3662
3662
  }
3663
- function k(w) {
3664
- return l > 0 && Y(w) ? te(
3663
+ function k(S) {
3664
+ return l > 0 && Y(S) ? te(
3665
3665
  e,
3666
3666
  v,
3667
3667
  "linePrefix",
3668
3668
  l + 1
3669
- )(w) : v(w);
3669
+ )(S) : v(S);
3670
3670
  }
3671
- function v(w) {
3672
- return w === null || R(w) ? e.check(Fr, b, F)(w) : (e.enter("codeFlowValue"), N(w));
3671
+ function v(S) {
3672
+ return S === null || R(S) ? e.check(Fr, b, F)(S) : (e.enter("codeFlowValue"), N(S));
3673
3673
  }
3674
- function N(w) {
3675
- return w === null || R(w) ? (e.exit("codeFlowValue"), v(w)) : (e.consume(w), N);
3674
+ function N(S) {
3675
+ return S === null || R(S) ? (e.exit("codeFlowValue"), v(S)) : (e.consume(S), N);
3676
3676
  }
3677
- function F(w) {
3678
- return e.exit("codeFenced"), n(w);
3677
+ function F(S) {
3678
+ return e.exit("codeFenced"), n(S);
3679
3679
  }
3680
- function T(w, P, Q) {
3680
+ function T(S, P, Q) {
3681
3681
  let W = 0;
3682
3682
  return q;
3683
3683
  function q(_) {
3684
- return w.enter("lineEnding"), w.consume(_), w.exit("lineEnding"), O;
3684
+ return S.enter("lineEnding"), S.consume(_), S.exit("lineEnding"), O;
3685
3685
  }
3686
3686
  function O(_) {
3687
- return w.enter("codeFencedFence"), Y(_) ? te(
3688
- w,
3687
+ return S.enter("codeFencedFence"), Y(_) ? te(
3688
+ S,
3689
3689
  A,
3690
3690
  "linePrefix",
3691
3691
  r.parser.constructs.disable.null.includes("codeIndented") ? void 0 : 4
3692
3692
  )(_) : A(_);
3693
3693
  }
3694
3694
  function A(_) {
3695
- return _ === o ? (w.enter("codeFencedFenceSequence"), K(_)) : Q(_);
3695
+ return _ === o ? (S.enter("codeFencedFenceSequence"), K(_)) : Q(_);
3696
3696
  }
3697
3697
  function K(_) {
3698
- return _ === o ? (W++, w.consume(_), K) : W >= a ? (w.exit("codeFencedFenceSequence"), Y(_) ? te(w, J, "whitespace")(_) : J(_)) : Q(_);
3698
+ return _ === o ? (W++, S.consume(_), K) : W >= a ? (S.exit("codeFencedFenceSequence"), Y(_) ? te(S, J, "whitespace")(_) : J(_)) : Q(_);
3699
3699
  }
3700
3700
  function J(_) {
3701
- return _ === null || R(_) ? (w.exit("codeFencedFence"), P(_)) : Q(_);
3701
+ return _ === null || R(_) ? (S.exit("codeFencedFence"), P(_)) : Q(_);
3702
3702
  }
3703
3703
  }
3704
3704
  }
@@ -3815,7 +3815,7 @@ function ic(e, n) {
3815
3815
  let s = n - 1;
3816
3816
  const l = [], a = t._tokenizer || r.parser[t.contentType](t.start), o = a.events, c = [], u = {};
3817
3817
  let h, d, f = -1, p = t, g = 0, b = 0;
3818
- const S = [b];
3818
+ const w = [b];
3819
3819
  for (; p; ) {
3820
3820
  for (; e[++s][1] !== p; )
3821
3821
  ;
@@ -3823,9 +3823,9 @@ function ic(e, n) {
3823
3823
  }
3824
3824
  for (p = t; ++f < o.length; )
3825
3825
  // Find a void token that includes a break.
3826
- o[f][0] === "exit" && o[f - 1][0] === "enter" && o[f][1].type === o[f - 1][1].type && o[f][1].start.line !== o[f][1].end.line && (b = f + 1, S.push(b), p._tokenizer = void 0, p.previous = void 0, p = p.next);
3827
- for (a.events = [], p ? (p._tokenizer = void 0, p.previous = void 0) : S.pop(), f = S.length; f--; ) {
3828
- const k = o.slice(S[f], S[f + 1]), v = l.pop();
3826
+ o[f][0] === "exit" && o[f - 1][0] === "enter" && o[f][1].type === o[f - 1][1].type && o[f][1].start.line !== o[f][1].end.line && (b = f + 1, w.push(b), p._tokenizer = void 0, p.previous = void 0, p = p.next);
3827
+ for (a.events = [], p ? (p._tokenizer = void 0, p.previous = void 0) : w.pop(), f = w.length; f--; ) {
3828
+ const k = o.slice(w[f], w[f + 1]), v = l.pop();
3829
3829
  c.unshift([v, v + k.length - 1]), Me(e, v, 2, k);
3830
3830
  }
3831
3831
  for (f = -1; ++f < c.length; )
@@ -3901,9 +3901,9 @@ function ts(e, n, t, r, s, l, a, o, c) {
3901
3901
  return k === 60 || k === 62 || k === 92 ? (e.consume(k), p) : p(k);
3902
3902
  }
3903
3903
  function b(k) {
3904
- return !h && (k === null || k === 41 || Ce(k)) ? (e.exit("chunkString"), e.exit(o), e.exit(a), e.exit(r), n(k)) : h < u && k === 40 ? (e.consume(k), h++, b) : k === 41 ? (e.consume(k), h--, b) : k === null || k === 32 || k === 40 || kt(k) ? t(k) : (e.consume(k), k === 92 ? S : b);
3904
+ return !h && (k === null || k === 41 || Ce(k)) ? (e.exit("chunkString"), e.exit(o), e.exit(a), e.exit(r), n(k)) : h < u && k === 40 ? (e.consume(k), h++, b) : k === 41 ? (e.consume(k), h--, b) : k === null || k === 32 || k === 40 || kt(k) ? t(k) : (e.consume(k), k === 92 ? w : b);
3905
3905
  }
3906
- function S(k) {
3906
+ function w(k) {
3907
3907
  return k === 40 || k === 41 || k === 92 ? (e.consume(k), b) : b(k);
3908
3908
  }
3909
3909
  }
@@ -4165,8 +4165,8 @@ const bc = [
4165
4165
  "ul"
4166
4166
  ], Mr = ["pre", "script", "style", "textarea"], kc = {
4167
4167
  name: "htmlFlow",
4168
- tokenize: Sc,
4169
- resolveTo: wc,
4168
+ tokenize: wc,
4169
+ resolveTo: Sc,
4170
4170
  concrete: !0
4171
4171
  }, jc = {
4172
4172
  tokenize: Nc,
@@ -4175,13 +4175,13 @@ const bc = [
4175
4175
  tokenize: vc,
4176
4176
  partial: !0
4177
4177
  };
4178
- function wc(e) {
4178
+ function Sc(e) {
4179
4179
  let n = e.length;
4180
4180
  for (; n-- && !(e[n][0] === "enter" && e[n][1].type === "htmlFlow"); )
4181
4181
  ;
4182
4182
  return n > 1 && e[n - 2][1].type === "linePrefix" && (e[n][1].start = e[n - 2][1].start, e[n + 1][1].start = e[n - 2][1].start, e.splice(n - 2, 2)), e;
4183
4183
  }
4184
- function Sc(e, n, t) {
4184
+ function wc(e, n, t) {
4185
4185
  const r = this;
4186
4186
  let s, l, a, o, c;
4187
4187
  return u;
@@ -4192,7 +4192,7 @@ function Sc(e, n, t) {
4192
4192
  return e.enter("htmlFlow"), e.enter("htmlFlowData"), e.consume(x), d;
4193
4193
  }
4194
4194
  function d(x) {
4195
- return x === 33 ? (e.consume(x), f) : x === 47 ? (e.consume(x), l = !0, b) : x === 63 ? (e.consume(x), s = 3, r.interrupt ? n : m) : Le(x) ? (e.consume(x), a = String.fromCharCode(x), S) : t(x);
4195
+ return x === 33 ? (e.consume(x), f) : x === 47 ? (e.consume(x), l = !0, b) : x === 63 ? (e.consume(x), s = 3, r.interrupt ? n : m) : Le(x) ? (e.consume(x), a = String.fromCharCode(x), w) : t(x);
4196
4196
  }
4197
4197
  function f(x) {
4198
4198
  return x === 45 ? (e.consume(x), s = 2, p) : x === 91 ? (e.consume(x), s = 5, o = 0, g) : Le(x) ? (e.consume(x), s = 4, r.interrupt ? n : m) : t(x);
@@ -4205,14 +4205,14 @@ function Sc(e, n, t) {
4205
4205
  return x === se.charCodeAt(o++) ? (e.consume(x), o === se.length ? r.interrupt ? n : A : g) : t(x);
4206
4206
  }
4207
4207
  function b(x) {
4208
- return Le(x) ? (e.consume(x), a = String.fromCharCode(x), S) : t(x);
4208
+ return Le(x) ? (e.consume(x), a = String.fromCharCode(x), w) : t(x);
4209
4209
  }
4210
- function S(x) {
4210
+ function w(x) {
4211
4211
  if (x === null || x === 47 || x === 62 || Ce(x)) {
4212
4212
  const se = x === 47, ye = a.toLowerCase();
4213
4213
  return !se && !l && Mr.includes(ye) ? (s = 1, r.interrupt ? n(x) : A(x)) : bc.includes(a.toLowerCase()) ? (s = 6, se ? (e.consume(x), k) : r.interrupt ? n(x) : A(x)) : (s = 7, r.interrupt && !r.parser.lazy[r.now().line] ? t(x) : l ? v(x) : N(x));
4214
4214
  }
4215
- return x === 45 || Ee(x) ? (e.consume(x), a += String.fromCharCode(x), S) : t(x);
4215
+ return x === 45 || Ee(x) ? (e.consume(x), a += String.fromCharCode(x), w) : t(x);
4216
4216
  }
4217
4217
  function k(x) {
4218
4218
  return x === 62 ? (e.consume(x), r.interrupt ? n : A) : t(x);
@@ -4227,10 +4227,10 @@ function Sc(e, n, t) {
4227
4227
  return x === 45 || x === 46 || x === 58 || x === 95 || Ee(x) ? (e.consume(x), F) : T(x);
4228
4228
  }
4229
4229
  function T(x) {
4230
- return x === 61 ? (e.consume(x), w) : Y(x) ? (e.consume(x), T) : N(x);
4230
+ return x === 61 ? (e.consume(x), S) : Y(x) ? (e.consume(x), T) : N(x);
4231
4231
  }
4232
- function w(x) {
4233
- return x === null || x === 60 || x === 61 || x === 62 || x === 96 ? t(x) : x === 34 || x === 39 ? (e.consume(x), c = x, P) : Y(x) ? (e.consume(x), w) : Q(x);
4232
+ function S(x) {
4233
+ return x === null || x === 60 || x === 61 || x === 62 || x === 96 ? t(x) : x === 34 || x === 39 ? (e.consume(x), c = x, P) : Y(x) ? (e.consume(x), S) : Q(x);
4234
4234
  }
4235
4235
  function P(x) {
4236
4236
  return x === c ? (e.consume(x), c = null, W) : x === null || R(x) ? t(x) : (e.consume(x), P);
@@ -4343,9 +4343,9 @@ function zc(e, n, t) {
4343
4343
  return m === ee.charCodeAt(l++) ? (e.consume(m), l === ee.length ? b : g) : t(m);
4344
4344
  }
4345
4345
  function b(m) {
4346
- return m === null ? t(m) : m === 93 ? (e.consume(m), S) : R(m) ? (a = b, I(m)) : (e.consume(m), b);
4346
+ return m === null ? t(m) : m === 93 ? (e.consume(m), w) : R(m) ? (a = b, I(m)) : (e.consume(m), b);
4347
4347
  }
4348
- function S(m) {
4348
+ function w(m) {
4349
4349
  return m === 93 ? (e.consume(m), k) : b(m);
4350
4350
  }
4351
4351
  function k(m) {
@@ -4361,10 +4361,10 @@ function zc(e, n, t) {
4361
4361
  return m === 62 ? Z(m) : N(m);
4362
4362
  }
4363
4363
  function T(m) {
4364
- return Le(m) ? (e.consume(m), w) : t(m);
4364
+ return Le(m) ? (e.consume(m), S) : t(m);
4365
4365
  }
4366
- function w(m) {
4367
- return m === 45 || Ee(m) ? (e.consume(m), w) : P(m);
4366
+ function S(m) {
4367
+ return m === 45 || Ee(m) ? (e.consume(m), S) : P(m);
4368
4368
  }
4369
4369
  function P(m) {
4370
4370
  return R(m) ? (a = P, I(m)) : Y(m) ? (e.consume(m), P) : Z(m);
@@ -4965,8 +4965,8 @@ function su(e, n, t) {
4965
4965
  enter: N,
4966
4966
  exit: F,
4967
4967
  attempt: P(T),
4968
- check: P(w),
4969
- interrupt: P(w, {
4968
+ check: P(S),
4969
+ interrupt: P(S, {
4970
4970
  interrupt: !0
4971
4971
  })
4972
4972
  }, u = {
@@ -4984,7 +4984,7 @@ function su(e, n, t) {
4984
4984
  let h = n.tokenize.call(u, c);
4985
4985
  return n.resolveAll && l.push(n), u;
4986
4986
  function d(O) {
4987
- return a = ze(a, O), S(), a[a.length - 1] !== null ? [] : (Q(n, 0), u.events = Gt(l, u.events, u), u.events);
4987
+ return a = ze(a, O), w(), a[a.length - 1] !== null ? [] : (Q(n, 0), u.events = Gt(l, u.events, u), u.events);
4988
4988
  }
4989
4989
  function f(O, A) {
4990
4990
  return lu(p(O), A);
@@ -5005,7 +5005,7 @@ function su(e, n, t) {
5005
5005
  function b(O) {
5006
5006
  s[O.line] = O.column, q();
5007
5007
  }
5008
- function S() {
5008
+ function w() {
5009
5009
  let O;
5010
5010
  for (; r._index < a.length; ) {
5011
5011
  const A = a[r._index];
@@ -5033,7 +5033,7 @@ function su(e, n, t) {
5033
5033
  function T(O, A) {
5034
5034
  Q(O, A.from);
5035
5035
  }
5036
- function w(O, A) {
5036
+ function S(O, A) {
5037
5037
  A.restore();
5038
5038
  }
5039
5039
  function P(O, A) {
@@ -5045,8 +5045,8 @@ function su(e, n, t) {
5045
5045
  le([J])
5046
5046
  ) : ee(J);
5047
5047
  function ee(re) {
5048
- return we;
5049
- function we(fe) {
5048
+ return Se;
5049
+ function Se(fe) {
5050
5050
  const oe = fe !== null && re[fe], me = fe !== null && re.null, Te = [
5051
5051
  // To do: add more extension tests.
5052
5052
  /* c8 ignore next 2 */
@@ -5060,8 +5060,8 @@ function su(e, n, t) {
5060
5060
  return I = re, D = 0, re.length === 0 ? Z : x(re[D]);
5061
5061
  }
5062
5062
  function x(re) {
5063
- return we;
5064
- function we(fe) {
5063
+ return Se;
5064
+ function Se(fe) {
5065
5065
  return m = W(), z = re, re.partial || (u.currentConstruct = re), re.name && u.parser.constructs.disable.null.includes(re.name) ? ye() : re.tokenize.call(
5066
5066
  // If we do have fields, create an object w/ `context` as its
5067
5067
  // prototype.
@@ -5289,9 +5289,9 @@ function ku() {
5289
5289
  }
5290
5290
  const ju = /\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;
5291
5291
  function Cu(e) {
5292
- return e.replace(ju, wu);
5292
+ return e.replace(ju, Su);
5293
5293
  }
5294
- function wu(e, n, t) {
5294
+ function Su(e, n, t) {
5295
5295
  if (n)
5296
5296
  return n;
5297
5297
  if (t.charCodeAt(0) === 35) {
@@ -5301,7 +5301,7 @@ function wu(e, n, t) {
5301
5301
  return Jt(t) || e;
5302
5302
  }
5303
5303
  const ls = {}.hasOwnProperty;
5304
- function Su(e, n, t) {
5304
+ function wu(e, n, t) {
5305
5305
  return typeof n != "string" && (t = n, n = void 0), vu(t)(
5306
5306
  bu(
5307
5307
  yu(t).document().write(ku()(e, n, !0))
@@ -5360,13 +5360,13 @@ function vu(e) {
5360
5360
  atxHeadingSequence: T,
5361
5361
  autolink: c(),
5362
5362
  autolinkEmail: fe,
5363
- autolinkProtocol: we,
5363
+ autolinkProtocol: Se,
5364
5364
  blockQuote: c(),
5365
5365
  characterEscapeValue: q,
5366
5366
  characterReferenceMarkerHexadecimal: ye,
5367
5367
  characterReferenceMarkerNumeric: ye,
5368
5368
  characterReferenceValue: re,
5369
- codeFenced: c(S),
5369
+ codeFenced: c(w),
5370
5370
  codeFencedFence: b,
5371
5371
  codeFencedFenceInfo: p,
5372
5372
  codeFencedFenceMeta: g,
@@ -5401,7 +5401,7 @@ function vu(e) {
5401
5401
  resource: le,
5402
5402
  setextHeading: c(Q),
5403
5403
  setextHeadingLineSequence: P,
5404
- setextHeadingText: w,
5404
+ setextHeadingText: S,
5405
5405
  strong: c(),
5406
5406
  thematicBreak: c()
5407
5407
  }
@@ -5494,13 +5494,13 @@ function vu(e) {
5494
5494
  }
5495
5495
  if (!$ && ae[0] === "enter" && ae[1].type === "listItemPrefix" || $ === -1 && ae[0] === "exit" && (ae[1].type === "listUnordered" || ae[1].type === "listOrdered")) {
5496
5496
  if (Re) {
5497
- let Se = H;
5498
- for (Oe = void 0; Se--; ) {
5499
- const ve = j[Se];
5497
+ let we = H;
5498
+ for (Oe = void 0; we--; ) {
5499
+ const ve = j[we];
5500
5500
  if (ve[1].type === "lineEnding" || ve[1].type === "lineEndingBlank") {
5501
5501
  if (ve[0] === "exit")
5502
5502
  continue;
5503
- Oe && (j[Oe][1].type = "lineEndingBlank", ie = !0), ve[1].type = "lineEnding", Oe = Se;
5503
+ Oe && (j[Oe][1].type = "lineEndingBlank", ie = !0), ve[1].type = "lineEnding", Oe = we;
5504
5504
  } else if (!(ve[1].type === "linePrefix" || ve[1].type === "blockQuotePrefix" || ve[1].type === "blockQuotePrefixWhitespace" || ve[1].type === "blockQuoteMarker" || ve[1].type === "listItemIndent"))
5505
5505
  break;
5506
5506
  }
@@ -5510,14 +5510,14 @@ function vu(e) {
5510
5510
  ), j.splice(Oe || H, 0, ["exit", Re, ae[2]]), H++, L++;
5511
5511
  }
5512
5512
  if (ae[1].type === "listItemPrefix") {
5513
- const Se = {
5513
+ const we = {
5514
5514
  type: "listItem",
5515
5515
  _spread: !1,
5516
5516
  start: Object.assign({}, ae[1].start),
5517
5517
  // @ts-expect-error: we’ll add `end` in a second.
5518
5518
  end: void 0
5519
5519
  };
5520
- Re = Se, j.splice(H, 0, ["enter", Se, ae[2]]), H++, L++, Qe = void 0, Ue = !0;
5520
+ Re = we, j.splice(H, 0, ["enter", we, ae[2]]), H++, L++, Qe = void 0, Ue = !0;
5521
5521
  }
5522
5522
  }
5523
5523
  }
@@ -5562,7 +5562,7 @@ function vu(e) {
5562
5562
  L.position.end = $e(j.end);
5563
5563
  }
5564
5564
  function h() {
5565
- return So(this.stack.pop());
5565
+ return wo(this.stack.pop());
5566
5566
  }
5567
5567
  function d() {
5568
5568
  this.data.expectingFirstListItemValue = !0;
@@ -5584,7 +5584,7 @@ function vu(e) {
5584
5584
  function b() {
5585
5585
  this.data.flowCodeInside || (this.buffer(), this.data.flowCodeInside = !0);
5586
5586
  }
5587
- function S() {
5587
+ function w() {
5588
5588
  const j = this.resume(), y = this.stack[this.stack.length - 1];
5589
5589
  y.value = j.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g, ""), this.data.flowCodeInside = void 0;
5590
5590
  }
@@ -5613,7 +5613,7 @@ function vu(e) {
5613
5613
  y.depth = L;
5614
5614
  }
5615
5615
  }
5616
- function w() {
5616
+ function S() {
5617
5617
  this.data.setextHeadingSlurpLineEnding = !0;
5618
5618
  }
5619
5619
  function P(j) {
@@ -5723,7 +5723,7 @@ function vu(e) {
5723
5723
  const $ = this.stack.pop();
5724
5724
  $.value += H, $.position.end = $e(j.end);
5725
5725
  }
5726
- function we(j) {
5726
+ function Se(j) {
5727
5727
  q.call(this, j);
5728
5728
  const y = this.stack[this.stack.length - 1];
5729
5729
  y.url = this.sliceSerialize(j);
@@ -5901,7 +5901,7 @@ function Eu(e) {
5901
5901
  const n = this;
5902
5902
  n.parser = t;
5903
5903
  function t(r) {
5904
- return Su(r, {
5904
+ return wu(r, {
5905
5905
  ...n.data("settings"),
5906
5906
  ...e,
5907
5907
  // Note: these options are not in the readme.
@@ -6453,10 +6453,10 @@ function ad(e) {
6453
6453
  children: Array.isArray(v) ? v : [v]
6454
6454
  });
6455
6455
  }
6456
- const S = h[h.length - 1];
6457
- if (S && S.type === "element" && S.tagName === "p") {
6458
- const v = S.children[S.children.length - 1];
6459
- v && v.type === "text" ? v.value += " " : S.children.push({ type: "text", value: " " }), S.children.push(...g);
6456
+ const w = h[h.length - 1];
6457
+ if (w && w.type === "element" && w.tagName === "p") {
6458
+ const v = w.children[w.children.length - 1];
6459
+ v && v.type === "text" ? v.value += " " : w.children.push({ type: "text", value: " " }), w.children.push(...g);
6460
6460
  } else
6461
6461
  h.push(...g);
6462
6462
  const k = {
@@ -6603,7 +6603,7 @@ function fd(e, n, t, r) {
6603
6603
  }
6604
6604
  return f;
6605
6605
  function f() {
6606
- let p = ms, g, b, S;
6606
+ let p = ms, g, b, w;
6607
6607
  if ((!n || l(c, u, h[h.length - 1] || void 0)) && (p = md(t(c, h)), p[0] === $r))
6608
6608
  return p;
6609
6609
  if ("children" in c && c.children) {
@@ -6612,9 +6612,9 @@ function fd(e, n, t, r) {
6612
6612
  c
6613
6613
  );
6614
6614
  if (k.children && p[0] !== pd)
6615
- for (b = (r ? k.children.length : -1) + a, S = h.concat(k); b > -1 && b < k.children.length; ) {
6615
+ for (b = (r ? k.children.length : -1) + a, w = h.concat(k); b > -1 && b < k.children.length; ) {
6616
6616
  const v = k.children[b];
6617
- if (g = o(v, b, S)(), g[0] === $r)
6617
+ if (g = o(v, b, w)(), g[0] === $r)
6618
6618
  return g;
6619
6619
  b = typeof g[1] == "number" ? g[1] : b + a;
6620
6620
  }
@@ -6634,7 +6634,7 @@ function xs(e, n, t, r) {
6634
6634
  return a(c, d, h);
6635
6635
  }
6636
6636
  }
6637
- const wt = {}.hasOwnProperty, xd = {};
6637
+ const St = {}.hasOwnProperty, xd = {};
6638
6638
  function gd(e, n) {
6639
6639
  const t = n || xd, r = /* @__PURE__ */ new Map(), s = /* @__PURE__ */ new Map(), l = /* @__PURE__ */ new Map(), a = { ...Zu, ...t.handlers }, o = {
6640
6640
  all: u,
@@ -6657,11 +6657,11 @@ function gd(e, n) {
6657
6657
  }), o;
6658
6658
  function c(h, d) {
6659
6659
  const f = h.type, p = o.handlers[f];
6660
- if (wt.call(o.handlers, f) && p)
6660
+ if (St.call(o.handlers, f) && p)
6661
6661
  return p(o, h, d);
6662
6662
  if (o.options.passThrough && o.options.passThrough.includes(f)) {
6663
6663
  if ("children" in h) {
6664
- const { children: b, ...S } = h, k = _n(S);
6664
+ const { children: b, ...w } = h, k = _n(w);
6665
6665
  return k.children = o.all(h), k;
6666
6666
  }
6667
6667
  return _n(h);
@@ -6706,7 +6706,7 @@ function bd(e, n) {
6706
6706
  return t;
6707
6707
  }
6708
6708
  function kd(e, n) {
6709
- const t = n.data || {}, r = "value" in n && !(wt.call(t, "hProperties") || wt.call(t, "hChildren")) ? { type: "text", value: n.value } : {
6709
+ const t = n.data || {}, r = "value" in n && !(St.call(t, "hProperties") || St.call(t, "hChildren")) ? { type: "text", value: n.value } : {
6710
6710
  type: "element",
6711
6711
  tagName: "div",
6712
6712
  properties: {},
@@ -6780,7 +6780,7 @@ var Fn = Object.prototype.hasOwnProperty, gs = Object.prototype.toString, Jr = O
6780
6780
  } else
6781
6781
  return;
6782
6782
  return n[t];
6783
- }, wd = function e() {
6783
+ }, Sd = function e() {
6784
6784
  var n, t, r, s, l, a, o = arguments[0], c = 1, u = arguments.length, h = !1;
6785
6785
  for (typeof o == "boolean" && (h = o, o = arguments[1] || {}, c = 2), (o == null || typeof o != "object" && typeof o != "function") && (o = {}); c < u; ++c)
6786
6786
  if (n = arguments[c], n != null)
@@ -6788,14 +6788,14 @@ var Fn = Object.prototype.hasOwnProperty, gs = Object.prototype.toString, Jr = O
6788
6788
  r = ei(o, t), s = ei(n, t), o !== s && (h && s && (Yr(s) || (l = Xr(s))) ? (l ? (l = !1, a = r && Xr(r) ? r : []) : a = r && Yr(r) ? r : {}, Zr(o, { name: t, newValue: e(h, a, s) })) : typeof s < "u" && Zr(o, { name: t, newValue: s }));
6789
6789
  return o;
6790
6790
  };
6791
- const lt = /* @__PURE__ */ Ks(wd);
6792
- function St(e) {
6791
+ const lt = /* @__PURE__ */ Ks(Sd);
6792
+ function wt(e) {
6793
6793
  if (typeof e != "object" || e === null)
6794
6794
  return !1;
6795
6795
  const n = Object.getPrototypeOf(e);
6796
6796
  return (n === null || n === Object.prototype || Object.getPrototypeOf(n) === null) && !(Symbol.toStringTag in e) && !(Symbol.iterator in e);
6797
6797
  }
6798
- function Sd() {
6798
+ function wd() {
6799
6799
  const e = [], n = { run: t, use: r };
6800
6800
  return n;
6801
6801
  function t(...s) {
@@ -6855,7 +6855,7 @@ const Fe = { basename: Nd, dirname: Ed, extname: zd, join: Ad, sep: "/" };
6855
6855
  function Nd(e, n) {
6856
6856
  if (n !== void 0 && typeof n != "string")
6857
6857
  throw new TypeError('"ext" argument must be a string');
6858
- Sn(e);
6858
+ wn(e);
6859
6859
  let t = 0, r = -1, s = e.length, l;
6860
6860
  if (n === void 0 || n.length === 0 || n.length > e.length) {
6861
6861
  for (; s--; )
@@ -6882,7 +6882,7 @@ function Nd(e, n) {
6882
6882
  return t === r ? r = a : r < 0 && (r = e.length), e.slice(t, r);
6883
6883
  }
6884
6884
  function Ed(e) {
6885
- if (Sn(e), e.length === 0)
6885
+ if (wn(e), e.length === 0)
6886
6886
  return ".";
6887
6887
  let n = -1, t = e.length, r;
6888
6888
  for (; --t; )
@@ -6896,7 +6896,7 @@ function Ed(e) {
6896
6896
  return n < 0 ? e.codePointAt(0) === 47 ? "/" : "." : n === 1 && e.codePointAt(0) === 47 ? "//" : e.slice(0, n);
6897
6897
  }
6898
6898
  function zd(e) {
6899
- Sn(e);
6899
+ wn(e);
6900
6900
  let n = e.length, t = -1, r = 0, s = -1, l = 0, a;
6901
6901
  for (; n--; ) {
6902
6902
  const o = e.codePointAt(n);
@@ -6916,11 +6916,11 @@ function zd(e) {
6916
6916
  function Ad(...e) {
6917
6917
  let n = -1, t;
6918
6918
  for (; ++n < e.length; )
6919
- Sn(e[n]), e[n] && (t = t === void 0 ? e[n] : t + "/" + e[n]);
6919
+ wn(e[n]), e[n] && (t = t === void 0 ? e[n] : t + "/" + e[n]);
6920
6920
  return t === void 0 ? "." : Od(t);
6921
6921
  }
6922
6922
  function Od(e) {
6923
- Sn(e);
6923
+ wn(e);
6924
6924
  const n = e.codePointAt(0) === 47;
6925
6925
  let t = Td(e, !n);
6926
6926
  return t.length === 0 && !n && (t = "."), t.length > 0 && e.codePointAt(e.length - 1) === 47 && (t += "/"), n ? "/" + t : t;
@@ -6958,7 +6958,7 @@ function Td(e, n) {
6958
6958
  }
6959
6959
  return t;
6960
6960
  }
6961
- function Sn(e) {
6961
+ function wn(e) {
6962
6962
  if (typeof e != "string")
6963
6963
  throw new TypeError(
6964
6964
  "Path must be a string. Received " + JSON.stringify(e)
@@ -7439,7 +7439,7 @@ class tr extends Pd {
7439
7439
  * Create a processor.
7440
7440
  */
7441
7441
  constructor() {
7442
- super("copy"), this.Compiler = void 0, this.Parser = void 0, this.attachers = [], this.compiler = void 0, this.freezeIndex = -1, this.frozen = void 0, this.namespace = {}, this.parser = void 0, this.transformers = Sd();
7442
+ super("copy"), this.Compiler = void 0, this.Parser = void 0, this.attachers = [], this.compiler = void 0, this.freezeIndex = -1, this.frozen = void 0, this.namespace = {}, this.parser = void 0, this.transformers = wd();
7443
7443
  }
7444
7444
  /**
7445
7445
  * Copy a processor.
@@ -7912,7 +7912,7 @@ class tr extends Pd {
7912
7912
  else if (h.length > 0) {
7913
7913
  let [p, ...g] = h;
7914
7914
  const b = r[f][1];
7915
- St(b) && St(p) && (p = lt(!0, b, p)), r[f] = [u, p, ...g];
7915
+ wt(b) && wt(p) && (p = lt(!0, b, p)), r[f] = [u, p, ...g];
7916
7916
  }
7917
7917
  }
7918
7918
  }
@@ -7933,7 +7933,7 @@ function pt(e, n) {
7933
7933
  );
7934
7934
  }
7935
7935
  function ti(e) {
7936
- if (!St(e) || typeof e.type != "string")
7936
+ if (!wt(e) || typeof e.type != "string")
7937
7937
  throw new TypeError("Expected node, got `" + e + "`");
7938
7938
  }
7939
7939
  function ri(e, n, t) {
@@ -7993,17 +7993,17 @@ function Wd(e) {
7993
7993
  for (const v of $d)
7994
7994
  Object.hasOwn(e, v.from) && ("" + v.from + (v.to ? "use `" + v.to + "` instead" : "remove it") + Hd + v.id, void 0);
7995
7995
  const b = p.parse(g);
7996
- let S = p.runSync(b, g);
7997
- return s && (S = {
7996
+ let w = p.runSync(b, g);
7997
+ return s && (w = {
7998
7998
  type: "element",
7999
7999
  tagName: "div",
8000
8000
  properties: { className: s },
8001
8001
  // Assume no doctypes.
8002
8002
  children: (
8003
8003
  /** @type {Array<ElementContent>} */
8004
- S.type === "root" ? S.children : [S]
8004
+ w.type === "root" ? w.children : [w]
8005
8005
  )
8006
- }), xs(S, k), so(S, {
8006
+ }), xs(w, k), so(w, {
8007
8007
  Fragment: i.Fragment,
8008
8008
  components: l,
8009
8009
  ignoreInvalidStyle: !0,
@@ -8019,8 +8019,8 @@ function Wd(e) {
8019
8019
  let T;
8020
8020
  for (T in it)
8021
8021
  if (Object.hasOwn(it, T) && Object.hasOwn(v.properties, T)) {
8022
- const w = v.properties[T], P = it[T];
8023
- (P === null || P.includes(v.tagName)) && (v.properties[T] = f(String(w || ""), T, v));
8022
+ const S = v.properties[T], P = it[T];
8023
+ (P === null || P.includes(v.tagName)) && (v.properties[T] = f(String(S || ""), T, v));
8024
8024
  }
8025
8025
  }
8026
8026
  if (v.type === "element") {
@@ -8094,7 +8094,7 @@ function Jd({
8094
8094
  triggerAIRun: s,
8095
8095
  setTriggerAIRun: l
8096
8096
  }) {
8097
- const a = yn(null), o = yn(null), { authToken: c } = Wn(), [u, h] = G(!1), d = C((z) => z.actions.setCardSql), f = B((z) => z.dashboard.baseQueries), p = C((z) => z.actions.setRunSql), g = C((z) => z.actions.setCardType), [b, S] = G([]), k = C((z) => z.currentColumns), v = C((z) => z.card.sql), N = C((z) => z.selectedTableName), F = `
8097
+ const a = yn(null), o = yn(null), { authToken: c } = Wn(), [u, h] = G(!1), d = C((z) => z.actions.setCardSql), f = B((z) => z.dashboard.baseQueries), p = C((z) => z.actions.setRunSql), g = C((z) => z.actions.setCardType), [b, w] = G([]), k = C((z) => z.currentColumns), v = C((z) => z.card.sql), N = C((z) => z.selectedTableName), F = `
8098
8098
  ${t}
8099
8099
 
8100
8100
  Database Query Dialect: ${N === "api" || N === "s3" ? "DuckDb" : ""}
@@ -8102,7 +8102,7 @@ function Jd({
8102
8102
  Table Columns: ${k == null ? void 0 : k.map((z) => `${z.column_name} | ${z.data_type}`).join(", ")}
8103
8103
  User SQL: ${v}
8104
8104
  ${f && `Base Queries: ${JSON.stringify(f)} `}`, T = ` When the user asks for a specific chart please use the following query structure to generate the chart query. Do not make up the column names. Use only the table columns provided above for the query. Replace x-axis, y-axis, and lables with the appropriate column names.
8105
- Visual Query Syntax: ${Qd}`, { data: w, isLoading: P, isFetching: Q, isError: W, refetch: q } = Ge({
8105
+ Visual Query Syntax: ${Qd}`, { data: S, isLoading: P, isFetching: Q, isError: W, refetch: q } = Ge({
8106
8106
  queryKey: ["ai-query"],
8107
8107
  queryFn: () => sn(
8108
8108
  "https://semaphor.cloud/api/v1/ai",
@@ -8136,8 +8136,8 @@ function Jd({
8136
8136
  return !0;
8137
8137
  }
8138
8138
  xe(() => {
8139
- w && S((z) => [...z, { role: "ai", content: w.response }]);
8140
- }, [w]), xe(() => {
8139
+ S && w((z) => [...z, { role: "ai", content: S.response }]);
8140
+ }, [S]), xe(() => {
8141
8141
  const z = setTimeout(() => {
8142
8142
  var m;
8143
8143
  o.current && (o.current.scroll({
@@ -8148,7 +8148,7 @@ function Jd({
8148
8148
  return () => clearTimeout(z);
8149
8149
  }, [b]);
8150
8150
  function A() {
8151
- t && (S((z) => [...z, { role: "user", content: t }]), O(t) && h(!0), r(""), q());
8151
+ t && (w((z) => [...z, { role: "user", content: t }]), O(t) && h(!0), r(""), q());
8152
8152
  }
8153
8153
  xe(() => {
8154
8154
  s && (A(), l(!1));
@@ -8226,7 +8226,7 @@ function Jd({
8226
8226
  {
8227
8227
  className: "w-full overflow-auto py-1",
8228
8228
  components: Z,
8229
- children: w == null ? void 0 : w.response
8229
+ children: S == null ? void 0 : S.response
8230
8230
  },
8231
8231
  m
8232
8232
  ) }) : /* @__PURE__ */ i.jsx("div", {}, m));
@@ -8417,7 +8417,7 @@ function rh(e) {
8417
8417
  function ih() {
8418
8418
  const { theme: e } = Gs(), n = yn(), t = yn(), [r, s] = G(!1), [l, a] = G(!1), [o, c] = G(!1), [u, h] = G(""), [d, f] = G(!1), { authToken: p } = Wn();
8419
8419
  B((y) => y.selectedSheetId);
8420
- const g = B((y) => y.dashboard.baseQueries), b = C((y) => y.card), S = B((y) => y.theme), k = C((y) => y.isShowingVisual), v = C(
8420
+ const g = B((y) => y.dashboard.baseQueries), b = C((y) => y.card), w = B((y) => y.theme), k = C((y) => y.isShowingVisual), v = C(
8421
8421
  (y) => y.selectedConnectionId
8422
8422
  ), N = C(
8423
8423
  (y) => y.selectedDatabaseName
@@ -8427,7 +8427,7 @@ function ih() {
8427
8427
  B(
8428
8428
  (y) => y.actions.updateFrameCard
8429
8429
  );
8430
- const T = C((y) => y.selectedTableName), w = C((y) => y.card.sql), P = C((y) => y.card.python), Q = Xs(w, g), W = C((y) => y.selectedConnectionId), q = C((y) => y.frame), O = C((y) => y.filterValues), A = C((y) => y.applyFilters), {
8430
+ const T = C((y) => y.selectedTableName), S = C((y) => y.card.sql), P = C((y) => y.card.python), Q = Xs(S, g), W = C((y) => y.selectedConnectionId), q = C((y) => y.frame), O = C((y) => y.filterValues), A = C((y) => y.applyFilters), {
8431
8431
  setCardCustomCfg: K,
8432
8432
  setQueryResultColumns: J,
8433
8433
  setFilterValues: _,
@@ -8438,7 +8438,7 @@ function ih() {
8438
8438
  setCardPreferences: m
8439
8439
  } = C((y) => y.actions), ee = C((y) => y.onSave), le = C(
8440
8440
  (y) => y.actions.setApplyFilters
8441
- ), x = C((y) => y.onClose), se = C((y) => y.actions.setCardData), ye = C((y) => y.actions.setSqlGen), re = C((y) => y.runSql), we = C((y) => y.actions.setRunSql), fe = C(
8441
+ ), x = C((y) => y.onClose), se = C((y) => y.actions.setCardData), ye = C((y) => y.actions.setSqlGen), re = C((y) => y.runSql), Se = C((y) => y.actions.setRunSql), fe = C(
8442
8442
  (y) => y.actions.setIsSqlRunning
8443
8443
  ), {
8444
8444
  data: oe,
@@ -8470,8 +8470,8 @@ function ih() {
8470
8470
  J(y);
8471
8471
  }
8472
8472
  }, [oe, se, J, z]), xe(() => {
8473
- re && (Ie(), we(!1));
8474
- }, [re, Ie, we]), xe(() => {
8473
+ re && (Ie(), Se(!1));
8474
+ }, [re, Ie, Se]), xe(() => {
8475
8475
  (me || Te) && fe(!0), (De || nn) && fe(!1), De ? (D(Pe.message), se([]), J([]), z("")) : D("");
8476
8476
  }, [
8477
8477
  me,
@@ -8493,8 +8493,8 @@ function ih() {
8493
8493
  t.current = y;
8494
8494
  };
8495
8495
  function vn() {
8496
- let y = w;
8497
- w && !w.includes("{{") && (y = xl(w), Z(y));
8496
+ let y = S;
8497
+ S && !S.includes("{{") && (y = xl(S), Z(y));
8498
8498
  const L = {
8499
8499
  ...b,
8500
8500
  lastSelectedSchema: F,
@@ -8522,9 +8522,9 @@ function ih() {
8522
8522
  return Yn(L);
8523
8523
  }
8524
8524
  function Yn(y) {
8525
- const [L, H, $] = y.split(" "), ie = parseFloat(L), Re = parseFloat(H), Oe = parseFloat($), Qe = Re / 100, Ue = Oe / 100, ae = (1 - Math.abs(2 * Ue - 1)) * Qe, Se = ae * (1 - Math.abs(ie / 60 % 2 - 1)), ve = Ue - ae / 2;
8525
+ const [L, H, $] = y.split(" "), ie = parseFloat(L), Re = parseFloat(H), Oe = parseFloat($), Qe = Re / 100, Ue = Oe / 100, ae = (1 - Math.abs(2 * Ue - 1)) * Qe, we = ae * (1 - Math.abs(ie / 60 % 2 - 1)), ve = Ue - ae / 2;
8526
8526
  let _e = 0, Be = 0, qe = 0;
8527
- 0 <= ie && ie < 60 ? (_e = ae, Be = Se, qe = 0) : 60 <= ie && ie < 120 ? (_e = Se, Be = ae, qe = 0) : 120 <= ie && ie < 180 ? (_e = 0, Be = ae, qe = Se) : 180 <= ie && ie < 240 ? (_e = 0, Be = Se, qe = ae) : 240 <= ie && ie < 300 ? (_e = Se, Be = 0, qe = ae) : 300 <= ie && ie < 360 && (_e = ae, Be = 0, qe = Se), _e = Math.round((_e + ve) * 255), Be = Math.round((Be + ve) * 255), qe = Math.round((qe + ve) * 255);
8527
+ 0 <= ie && ie < 60 ? (_e = ae, Be = we, qe = 0) : 60 <= ie && ie < 120 ? (_e = we, Be = ae, qe = 0) : 120 <= ie && ie < 180 ? (_e = 0, Be = ae, qe = we) : 180 <= ie && ie < 240 ? (_e = 0, Be = we, qe = ae) : 240 <= ie && ie < 300 ? (_e = we, Be = 0, qe = ae) : 300 <= ie && ie < 360 && (_e = ae, Be = 0, qe = we), _e = Math.round((_e + ve) * 255), Be = Math.round((Be + ve) * 255), qe = Math.round((qe + ve) * 255);
8528
8528
  const et = (As) => {
8529
8529
  const nt = As.toString(16);
8530
8530
  return nt.length == 1 ? "0" + nt : nt;
@@ -8534,7 +8534,7 @@ function ih() {
8534
8534
  xe(() => {
8535
8535
  const y = n.current, L = t.current;
8536
8536
  if (y) {
8537
- const H = window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light", $ = S === "system" ? H : S;
8537
+ const H = window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light", $ = w === "system" ? H : w;
8538
8538
  y.editor.defineTheme("default", {
8539
8539
  // base: theme === 'light' ? 'hc-light' : 'vs-dark',
8540
8540
  base: $ === "light" ? "vs" : "vs-dark",
@@ -8553,7 +8553,7 @@ function ih() {
8553
8553
  }
8554
8554
  ), () => {
8555
8555
  };
8556
- }, [e, S, n.current]);
8556
+ }, [e, w, n.current]);
8557
8557
  function Nn(y) {
8558
8558
  n.current = y;
8559
8559
  }
@@ -8660,7 +8660,7 @@ function ih() {
8660
8660
  onChange: (y) => {
8661
8661
  Z(y);
8662
8662
  },
8663
- value: w,
8663
+ value: S,
8664
8664
  options: {
8665
8665
  minimap: {
8666
8666
  enabled: !1
@@ -8924,7 +8924,7 @@ function js({
8924
8924
  ]), !r.id)
8925
8925
  return null;
8926
8926
  let l;
8927
- return r.data && r.data.length > 0 && (l = wi({
8927
+ return r.data && r.data.length > 0 && (l = Si({
8928
8928
  data: r.data,
8929
8929
  cardType: r.type,
8930
8930
  cfg: r.cfg,
@@ -8977,18 +8977,18 @@ function js({
8977
8977
  );
8978
8978
  }
8979
8979
  function ah() {
8980
- const [e, n] = G(!1), [t, r] = G(""), [s, l] = G(""), [a, o] = G(""), c = C((S) => S.card), u = C(
8981
- (S) => S.card.customCfg
8980
+ const [e, n] = G(!1), [t, r] = G(""), [s, l] = G(""), [a, o] = G(""), c = C((w) => w.card), u = C(
8981
+ (w) => w.card.customCfg
8982
8982
  ), h = C(
8983
- (S) => S.actions.setCardCustomCfg
8983
+ (w) => w.actions.setCardCustomCfg
8984
8984
  );
8985
- function d(S) {
8985
+ function d(w) {
8986
8986
  var N, F;
8987
8987
  const k = {
8988
- ...S,
8988
+ ...w,
8989
8989
  data: {
8990
- ...S == null ? void 0 : S.data,
8991
- datasets: (F = (N = S == null ? void 0 : S.data) == null ? void 0 : N.datasets) == null ? void 0 : F.map((T) => ({
8990
+ ...w == null ? void 0 : w.data,
8991
+ datasets: (F = (N = w == null ? void 0 : w.data) == null ? void 0 : N.datasets) == null ? void 0 : F.map((T) => ({
8992
8992
  ...T,
8993
8993
  data: []
8994
8994
  }))
@@ -8999,33 +8999,33 @@ function ah() {
8999
8999
  function f() {
9000
9000
  if (!c.data || c.data.length === 0)
9001
9001
  return;
9002
- const S = wi({
9002
+ const w = Si({
9003
9003
  data: c.data,
9004
9004
  cardType: c.type,
9005
9005
  cfg: c.cfg,
9006
9006
  preferences: c.preferences
9007
9007
  });
9008
- S && (r(JSON.stringify(S, null, 1)), u && l(JSON.stringify(u, null, 1)));
9008
+ w && (r(JSON.stringify(w, null, 1)), u && l(JSON.stringify(u, null, 1)));
9009
9009
  }
9010
9010
  function p() {
9011
9011
  if (s)
9012
9012
  try {
9013
- const S = JSON.parse(s);
9014
- return S ? (h(S), o(""), l(""), S) : void 0;
9015
- } catch (S) {
9016
- console.log(S), o("Invalid JSON");
9013
+ const w = JSON.parse(s);
9014
+ return w ? (h(w), o(""), l(""), w) : void 0;
9015
+ } catch (w) {
9016
+ console.log(w), o("Invalid JSON");
9017
9017
  }
9018
9018
  }
9019
9019
  function g() {
9020
9020
  l(""), h(null);
9021
9021
  }
9022
9022
  function b() {
9023
- let S;
9023
+ let w;
9024
9024
  if (u) {
9025
9025
  const k = fr.cloneDeep(c.cfg), v = fr.merge(k, u);
9026
- return S = d(v), S;
9026
+ return w = d(v), w;
9027
9027
  }
9028
- return t ? (S = d(JSON.parse(t)), S) : "";
9028
+ return t ? (w = d(JSON.parse(t)), w) : "";
9029
9029
  }
9030
9030
  return /* @__PURE__ */ i.jsxs(Nt, { open: e, onOpenChange: n, children: [
9031
9031
  /* @__PURE__ */ i.jsx(Et, { asChild: !0, children: /* @__PURE__ */ i.jsx(
@@ -9121,7 +9121,7 @@ function ah() {
9121
9121
  },
9122
9122
  defaultLanguage: "json",
9123
9123
  value: b(),
9124
- onChange: (S) => l(S)
9124
+ onChange: (w) => l(w)
9125
9125
  }
9126
9126
  )
9127
9127
  }
@@ -9150,10 +9150,10 @@ function ah() {
9150
9150
  function Cs(e) {
9151
9151
  return en({ tag: "svg", attr: { viewBox: "0 0 1024 1024" }, child: [{ tag: "path", attr: { d: "M926.8 397.1l-396-288a31.81 31.81 0 0 0-37.6 0l-396 288a31.99 31.99 0 0 0-11.6 35.8l151.3 466a32 32 0 0 0 30.4 22.1h489.5c13.9 0 26.1-8.9 30.4-22.1l151.3-466c4.2-13.2-.5-27.6-11.7-35.8zM838.6 417l-98.5 32-200-144.7V199.9L838.6 417zM466 567.2l-89.1 122.3-55.2-169.2L466 567.2zm-116.3-96.8L484 373.3v140.8l-134.3-43.7zM512 599.2l93.9 128.9H418.1L512 599.2zm28.1-225.9l134.2 97.1L540.1 514V373.3zM558 567.2l144.3-46.9-55.2 169.2L558 567.2zm-74-367.3v104.4L283.9 449l-98.5-32L484 199.9zM169.3 470.8l86.5 28.1 80.4 246.4-53.8 73.9-113.1-348.4zM327.1 853l50.3-69h269.3l50.3 69H327.1zm414.5-33.8l-53.8-73.9 80.4-246.4 86.5-28.1-113.1 348.4z" }, child: [] }] })(e);
9152
9152
  }
9153
- function ws(e) {
9153
+ function Ss(e) {
9154
9154
  return en({ tag: "svg", attr: { viewBox: "0 0 256 256", fill: "currentColor" }, child: [{ tag: "path", attr: { d: "M137.39,24.06A16,16,0,0,0,120,40V80.67a15.86,15.86,0,0,0,13.25,15.76A32,32,0,1,1,96,129.68c-.41-8.22,1.27-15,5-20.26h0a15.86,15.86,0,0,0-1.69-20.47L71.69,60.68a16,16,0,0,0-23.63,1.1A103.6,103.6,0,0,0,55,202.05,103.24,103.24,0,0,0,128,232h1.49A104.3,104.3,0,0,0,232,129.48C232.75,75.18,191.19,28.88,137.39,24.06ZM60.32,71.94l27.61,28.19,0,.06A43.29,43.29,0,0,0,80.44,120H40.36A87.13,87.13,0,0,1,60.32,71.94ZM40.37,136h40.3A48,48,0,0,0,120,175.34v40.3A88,88,0,0,1,40.37,136Zm149.77,54.14A87.45,87.45,0,0,1,136,215.61V175.34a47.55,47.55,0,0,0,24.73-12.23A48,48,0,0,0,136,80.66L136,40c45.52,4.08,80.67,43.28,80,89.25A87.45,87.45,0,0,1,190.14,190.14Z" }, child: [] }] })(e);
9155
9155
  }
9156
- function Ss(e) {
9156
+ function ws(e) {
9157
9157
  return en({ tag: "svg", attr: { viewBox: "0 0 256 256", fill: "currentColor" }, child: [{ tag: "path", attr: { d: "M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm87.63,96H191.48A64.1,64.1,0,0,0,136,64.52V40.37A88.13,88.13,0,0,1,215.63,120ZM120,120H80.68A48.09,48.09,0,0,1,120,80.68Zm0,16v39.32A48.09,48.09,0,0,1,80.68,136Zm16,0h39.32A48.09,48.09,0,0,1,136,175.32Zm0-16V80.68A48.09,48.09,0,0,1,175.32,120ZM120,40.37V64.52A64.1,64.1,0,0,0,64.52,120H40.37A88.13,88.13,0,0,1,120,40.37ZM40.37,136H64.52A64.1,64.1,0,0,0,120,191.48v24.15A88.13,88.13,0,0,1,40.37,136ZM136,215.63V191.48A64.1,64.1,0,0,0,191.48,136h24.15A88.13,88.13,0,0,1,136,215.63Z" }, child: [] }] })(e);
9158
9158
  }
9159
9159
  function vs(e) {
@@ -9231,7 +9231,7 @@ function lh() {
9231
9231
  {
9232
9232
  onClick: () => a("doughnut"),
9233
9233
  variant: "ghost",
9234
- children: /* @__PURE__ */ i.jsx(ws, { className: "size-5", strokeWidth: 1 })
9234
+ children: /* @__PURE__ */ i.jsx(Ss, { className: "size-5", strokeWidth: 1 })
9235
9235
  }
9236
9236
  ),
9237
9237
  /* @__PURE__ */ i.jsx(
@@ -9253,7 +9253,7 @@ function lh() {
9253
9253
  {
9254
9254
  onClick: () => a("polarArea"),
9255
9255
  variant: "ghost",
9256
- children: /* @__PURE__ */ i.jsx(Ss, { className: "size-5" })
9256
+ children: /* @__PURE__ */ i.jsx(ws, { className: "size-5" })
9257
9257
  }
9258
9258
  ),
9259
9259
  /* @__PURE__ */ i.jsx(
@@ -9290,11 +9290,11 @@ function oh({ chartType: e, className: n }) {
9290
9290
  case "bubble":
9291
9291
  return /* @__PURE__ */ i.jsx(vs, { className: n });
9292
9292
  case "doughnut":
9293
- return /* @__PURE__ */ i.jsx(ws, { className: n });
9293
+ return /* @__PURE__ */ i.jsx(Ss, { className: n });
9294
9294
  case "stackedBar":
9295
9295
  return /* @__PURE__ */ i.jsx(Ns, { className: "size-4 text-foreground/70" });
9296
9296
  case "polarArea":
9297
- return /* @__PURE__ */ i.jsx(Ss, { className: n });
9297
+ return /* @__PURE__ */ i.jsx(ws, { className: n });
9298
9298
  case "kpi":
9299
9299
  return /* @__PURE__ */ i.jsx(Es, { className: n });
9300
9300
  default:
@@ -9358,7 +9358,7 @@ function uh() {
9358
9358
  className: "bg-muted p-2 font-mono text-sm"
9359
9359
  }
9360
9360
  ),
9361
- /* @__PURE__ */ i.jsx(Si, { className: "mb-2" })
9361
+ /* @__PURE__ */ i.jsx(wi, { className: "mb-2" })
9362
9362
  ] });
9363
9363
  }
9364
9364
  function dh() {
@@ -9368,7 +9368,7 @@ function dh() {
9368
9368
  return /* @__PURE__ */ i.jsxs("div", { className: "flex items-center space-x-2", children: [
9369
9369
  /* @__PURE__ */ i.jsx(pe, { htmlFor: "visualize", children: "Chart" }),
9370
9370
  /* @__PURE__ */ i.jsx(
9371
- wa,
9371
+ Sa,
9372
9372
  {
9373
9373
  checked: e,
9374
9374
  onCheckedChange: () => n(!e),
@@ -9559,16 +9559,16 @@ function hh() {
9559
9559
  ((K = (A = (O = t == null ? void 0 : t.chartOptions) == null ? void 0 : O.scales) == null ? void 0 : A[r]) == null ? void 0 : K.min) || ""
9560
9560
  ), [c, u] = G(
9561
9561
  ((Z = (_ = (J = t == null ? void 0 : t.chartOptions) == null ? void 0 : J.scales) == null ? void 0 : _[r]) == null ? void 0 : Z.max) || ""
9562
- ), [h, d] = G(a || c ? "custom" : "auto"), [f, p] = G(""), [g, b] = G(""), [S, k] = G(""), [v, N] = G(""), [F, T] = G(""), w = C(
9562
+ ), [h, d] = G(a || c ? "custom" : "auto"), [f, p] = G(""), [g, b] = G(""), [w, k] = G(""), [v, N] = G(""), [F, T] = G(""), S = C(
9563
9563
  (I) => I.actions.setCardPreferences
9564
9564
  );
9565
9565
  xe(() => {
9566
- var I, D, z, m, ee, le, x, se, ye, re, we, fe, oe, me;
9566
+ var I, D, z, m, ee, le, x, se, ye, re, Se, fe, oe, me;
9567
9567
  l(ci(t)), o(
9568
9568
  ((z = (D = (I = t == null ? void 0 : t.chartOptions) == null ? void 0 : I.scales) == null ? void 0 : D[r]) == null ? void 0 : z.min) === 0 ? 0 : ""
9569
9569
  ), u(((le = (ee = (m = t == null ? void 0 : t.chartOptions) == null ? void 0 : m.scales) == null ? void 0 : ee[r]) == null ? void 0 : le.max) || ""), p(
9570
9570
  ((re = (ye = (se = (x = t == null ? void 0 : t.chartOptions) == null ? void 0 : x.scales) == null ? void 0 : se[r]) == null ? void 0 : ye.ticks) == null ? void 0 : re.stepSize) || ""
9571
- ), b(((we = t == null ? void 0 : t.numberAxisFormat) == null ? void 0 : we.format) || ""), k(((fe = t == null ? void 0 : t.numberAxisFormat) == null ? void 0 : fe.suffix) || ""), N(((oe = t == null ? void 0 : t.numberAxisFormat) == null ? void 0 : oe.currency) || ""), T(((me = t == null ? void 0 : t.numberAxisFormat) == null ? void 0 : me.locale) || "");
9571
+ ), b(((Se = t == null ? void 0 : t.numberAxisFormat) == null ? void 0 : Se.format) || ""), k(((fe = t == null ? void 0 : t.numberAxisFormat) == null ? void 0 : fe.suffix) || ""), N(((oe = t == null ? void 0 : t.numberAxisFormat) == null ? void 0 : oe.currency) || ""), T(((me = t == null ? void 0 : t.numberAxisFormat) == null ? void 0 : me.locale) || "");
9572
9572
  }, [e, t, r]);
9573
9573
  function P(I, D) {
9574
9574
  return D === "" || /^[0-9\b]+$/.test(D) ? Number(D) : Number(I);
@@ -9590,7 +9590,7 @@ function hh() {
9590
9590
  /* @__PURE__ */ i.jsx(
9591
9591
  ke,
9592
9592
  {
9593
- value: S,
9593
+ value: w,
9594
9594
  placeholder: "M",
9595
9595
  onChange: (I) => k(I.target.value),
9596
9596
  id: "unit",
@@ -9699,15 +9699,15 @@ function hh() {
9699
9699
  },
9700
9700
  numberAxisFormat: {
9701
9701
  format: g,
9702
- suffix: S,
9702
+ suffix: w,
9703
9703
  currency: v,
9704
9704
  locale: F
9705
9705
  }
9706
9706
  };
9707
- w(D);
9707
+ S(D);
9708
9708
  }
9709
9709
  return /* @__PURE__ */ i.jsxs(kn, { onOpenChange: (I) => n(I), children: [
9710
- /* @__PURE__ */ i.jsx(jn, { asChild: !0, children: /* @__PURE__ */ i.jsx(Sa, { className: "size-4 cursor-pointer text-muted-foreground hover:text-foreground" }) }),
9710
+ /* @__PURE__ */ i.jsx(jn, { asChild: !0, children: /* @__PURE__ */ i.jsx(wa, { className: "size-4 cursor-pointer text-muted-foreground hover:text-foreground" }) }),
9711
9711
  /* @__PURE__ */ i.jsx(Cn, { align: "center", className: "max-w-65", children: /* @__PURE__ */ i.jsxs("div", { className: "grid gap-4", children: [
9712
9712
  /* @__PURE__ */ i.jsxs("div", { className: "space-y-2", children: [
9713
9713
  /* @__PURE__ */ i.jsx("h4", { className: "font-medium leading-none", children: "Scale Options" }),
@@ -9977,7 +9977,7 @@ function fh({ col: e, idx: n }) {
9977
9977
  }
9978
9978
  ),
9979
9979
  /* @__PURE__ */ i.jsx(
9980
- Si,
9980
+ wi,
9981
9981
  {
9982
9982
  orientation: "vertical",
9983
9983
  className: "invisible size-4 cursor-pointer py-2 text-muted-foreground hover:text-foreground group-hover:visible"
@@ -10431,7 +10431,7 @@ function Ch() {
10431
10431
  /* @__PURE__ */ i.jsx("div", {})
10432
10432
  ] });
10433
10433
  }
10434
- function wh({
10434
+ function Sh({
10435
10435
  cardType: e
10436
10436
  }) {
10437
10437
  return /* @__PURE__ */ i.jsx("div", { className: "px-6 py-2 space-y-6", children: /* @__PURE__ */ i.jsxs(Ye, { defaultValue: ["item-2"], type: "multiple", children: [
@@ -10469,7 +10469,7 @@ function wh({
10469
10469
  ] })
10470
10470
  ] }) });
10471
10471
  }
10472
- function Sh() {
10472
+ function wh() {
10473
10473
  return /* @__PURE__ */ i.jsx("div", { className: "space-y-6 px-6 py-2", children: /* @__PURE__ */ i.jsxs(Ye, { defaultValue: ["item-2"], type: "multiple", children: [
10474
10474
  /* @__PURE__ */ i.jsxs(ue, { value: "item-1", children: [
10475
10475
  /* @__PURE__ */ i.jsx(de, { children: "Stacked Chart" }),
@@ -10522,7 +10522,7 @@ function Nh() {
10522
10522
  function n(t) {
10523
10523
  switch (t) {
10524
10524
  case "stackedBar":
10525
- return /* @__PURE__ */ i.jsx(Sh, {});
10525
+ return /* @__PURE__ */ i.jsx(wh, {});
10526
10526
  case "kpi":
10527
10527
  return /* @__PURE__ */ i.jsx(Ch, {});
10528
10528
  case "line":
@@ -10532,7 +10532,7 @@ function Nh() {
10532
10532
  case "doughnut":
10533
10533
  case "polarArea":
10534
10534
  case "radar":
10535
- return /* @__PURE__ */ i.jsx(wh, { cardType: t });
10535
+ return /* @__PURE__ */ i.jsx(Sh, { cardType: t });
10536
10536
  case "bubble":
10537
10537
  case "scatter":
10538
10538
  return /* @__PURE__ */ i.jsx(xh, { cardType: t });
@@ -10630,10 +10630,10 @@ function Oh({
10630
10630
  (d) => d.actions.removeFilterValue
10631
10631
  );
10632
10632
  function h(d) {
10633
- const f = Ve(d.column_name), p = Ve(r || ""), g = Ve(s || ""), b = Ve(n), S = mi(
10633
+ const f = Ve(d.column_name), p = Ve(r || ""), g = Ve(s || ""), b = Ve(n), w = mi(
10634
10634
  g,
10635
10635
  b
10636
- ), k = `${S}.${f}`;
10636
+ ), k = `${w}.${f}`;
10637
10637
  console.log(
10638
10638
  "find",
10639
10639
  k,
@@ -10659,27 +10659,25 @@ function Oh({
10659
10659
  operation: "in",
10660
10660
  sql: mr(
10661
10661
  d.data_type,
10662
- S,
10662
+ w,
10663
10663
  f
10664
10664
  )
10665
10665
  //DATE_DATA_TYPES.includes(column.data_type) ? dateSql : sql,
10666
10666
  });
10667
10667
  return;
10668
10668
  }
10669
- if (!t || !r || !l)
10670
- throw new Error("missing connectionId, database, or table");
10671
10669
  o({
10672
10670
  id: Ln(),
10673
- column: `${S}.${f}`,
10671
+ column: `${w}.${f}`,
10674
10672
  title: d.column_name,
10675
10673
  dataType: d.data_type,
10676
- table: l,
10677
- database: r,
10678
- connectionId: t,
10674
+ table: l || "",
10675
+ database: r || "NA",
10676
+ connectionId: t || "",
10679
10677
  operation: "in",
10680
10678
  sql: mr(
10681
10679
  d.data_type,
10682
- S,
10680
+ w,
10683
10681
  f
10684
10682
  )
10685
10683
  //DATE_DATA_TYPES.includes(column.data_type) ? dateSql : sql,