@devtable/settings-form 13.43.2 → 13.43.3

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
- const o = "13.43.2";
1
+ const o = "13.43.3";
2
2
  export {
3
3
  o as version
4
4
  };
@@ -31,14 +31,14 @@ function tr() {
31
31
  It = 1;
32
32
  var a = G, t = Symbol.for("react.element"), s = Symbol.for("react.fragment"), n = Object.prototype.hasOwnProperty, o = a.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, i = { key: !0, ref: !0, __self: !0, __source: !0 };
33
33
  function l(c, d, f) {
34
- var m, j = {}, x = null, S = null;
35
- f !== void 0 && (x = "" + f), d.key !== void 0 && (x = "" + d.key), d.ref !== void 0 && (S = d.ref);
34
+ var m, x = {}, j = null, S = null;
35
+ f !== void 0 && (j = "" + f), d.key !== void 0 && (j = "" + d.key), d.ref !== void 0 && (S = d.ref);
36
36
  for (m in d)
37
- n.call(d, m) && !i.hasOwnProperty(m) && (j[m] = d[m]);
37
+ n.call(d, m) && !i.hasOwnProperty(m) && (x[m] = d[m]);
38
38
  if (c && c.defaultProps)
39
39
  for (m in d = c.defaultProps, d)
40
- j[m] === void 0 && (j[m] = d[m]);
41
- return { $$typeof: t, type: c, key: x, ref: S, props: j, _owner: o.current };
40
+ x[m] === void 0 && (x[m] = d[m]);
41
+ return { $$typeof: t, type: c, key: j, ref: S, props: x, _owner: o.current };
42
42
  }
43
43
  return _e.Fragment = s, _e.jsx = l, _e.jsxs = l, _e;
44
44
  }
@@ -55,7 +55,7 @@ var Se = {};
55
55
  var Mt;
56
56
  function nr() {
57
57
  return Mt || (Mt = 1, process.env.NODE_ENV !== "production" && function() {
58
- var a = G, t = Symbol.for("react.element"), s = Symbol.for("react.portal"), n = Symbol.for("react.fragment"), o = Symbol.for("react.strict_mode"), i = Symbol.for("react.profiler"), l = Symbol.for("react.provider"), c = Symbol.for("react.context"), d = Symbol.for("react.forward_ref"), f = Symbol.for("react.suspense"), m = Symbol.for("react.suspense_list"), j = Symbol.for("react.memo"), x = Symbol.for("react.lazy"), S = Symbol.for("react.offscreen"), L = Symbol.iterator, V = "@@iterator";
58
+ var a = G, t = Symbol.for("react.element"), s = Symbol.for("react.portal"), n = Symbol.for("react.fragment"), o = Symbol.for("react.strict_mode"), i = Symbol.for("react.profiler"), l = Symbol.for("react.provider"), c = Symbol.for("react.context"), d = Symbol.for("react.forward_ref"), f = Symbol.for("react.suspense"), m = Symbol.for("react.suspense_list"), x = Symbol.for("react.memo"), j = Symbol.for("react.lazy"), S = Symbol.for("react.offscreen"), L = Symbol.iterator, V = "@@iterator";
59
59
  function X(r) {
60
60
  if (r === null || typeof r != "object")
61
61
  return null;
@@ -83,7 +83,7 @@ function nr() {
83
83
  var Z = !1, le = !1, Ve = !1, en = !1, tn = !1, ut;
84
84
  ut = Symbol.for("react.module.reference");
85
85
  function nn(r) {
86
- return !!(typeof r == "string" || typeof r == "function" || r === n || r === i || tn || r === o || r === f || r === m || en || r === S || Z || le || Ve || typeof r == "object" && r !== null && (r.$$typeof === x || r.$$typeof === j || r.$$typeof === l || r.$$typeof === c || r.$$typeof === d || // This needs to include all possible module reference object
86
+ return !!(typeof r == "string" || typeof r == "function" || r === n || r === i || tn || r === o || r === f || r === m || en || r === S || Z || le || Ve || typeof r == "object" && r !== null && (r.$$typeof === j || r.$$typeof === x || r.$$typeof === l || r.$$typeof === c || r.$$typeof === d || // This needs to include all possible module reference object
87
87
  // types supported by any Flight configuration anywhere since
88
88
  // we don't know which Flight build this will end up being used
89
89
  // with.
@@ -130,10 +130,10 @@ function nr() {
130
130
  return ft(p._context) + ".Provider";
131
131
  case d:
132
132
  return rn(r, r.render, "ForwardRef");
133
- case j:
133
+ case x:
134
134
  var g = r.displayName || null;
135
135
  return g !== null ? g : B(r.type) || "Memo";
136
- case x: {
136
+ case j: {
137
137
  var _ = r, z = _._payload, b = _._init;
138
138
  try {
139
139
  return B(b(z));
@@ -320,9 +320,9 @@ function nr() {
320
320
  switch (r.$$typeof) {
321
321
  case d:
322
322
  return cn(r.render);
323
- case j:
323
+ case x:
324
324
  return Pe(r.type, u, p);
325
- case x: {
325
+ case j: {
326
326
  var g = r, _ = g._payload, z = g._init;
327
327
  try {
328
328
  return Pe(z(_), u, p);
@@ -572,7 +572,7 @@ Check the top-level render call using <` + p + ">.");
572
572
  p = u.propTypes;
573
573
  else if (typeof u == "object" && (u.$$typeof === d || // Note: Memo only checks outer props here.
574
574
  // Inner props are checked in the reconciler.
575
- u.$$typeof === j))
575
+ u.$$typeof === x))
576
576
  p = u.propTypes;
577
577
  else
578
578
  return;
@@ -701,8 +701,8 @@ class sr {
701
701
  return kt(d).then((f) => l ? f : f.data).catch((f) => {
702
702
  if (kt.isCancel(f))
703
703
  return Promise.reject(f);
704
- const m = Gn.get(f, "response.data.detail.message", f.message);
705
- return Promise.reject(new Error(m));
704
+ const m = f, x = Gn.get(m, "response.data.detail.message", m.message);
705
+ return Promise.reject(new Error(x));
706
706
  });
707
707
  };
708
708
  }
@@ -1004,15 +1004,15 @@ var zr = function(t) {
1004
1004
  i.toDate("s"),
1005
1005
  (l ? F : Z).slice(w)
1006
1006
  ), i);
1007
- }, m = this.$W, j = this.$M, x = this.$D, S = "set" + (this.$u ? "UTC" : "");
1007
+ }, m = this.$W, x = this.$M, j = this.$D, S = "set" + (this.$u ? "UTC" : "");
1008
1008
  switch (c) {
1009
1009
  case te:
1010
1010
  return l ? d(1, 0) : d(31, 11);
1011
1011
  case W:
1012
- return l ? d(1, j) : d(0, j + 1);
1012
+ return l ? d(1, x) : d(0, x + 1);
1013
1013
  case Oe: {
1014
1014
  var L = this.$locale().weekStart || 0, V = (m < L ? m + 7 : m) - L;
1015
- return d(l ? x - V : x + (6 - V), j);
1015
+ return d(l ? j - V : j + (6 - V), x);
1016
1016
  }
1017
1017
  case ee:
1018
1018
  case he:
@@ -1043,9 +1043,9 @@ var zr = function(t) {
1043
1043
  }, t.add = function(n, o) {
1044
1044
  var i = this, l;
1045
1045
  n = Number(n);
1046
- var c = T.p(o), d = function(x) {
1046
+ var c = T.p(o), d = function(j) {
1047
1047
  var S = $(i);
1048
- return T.w(S.date(S.date() + Math.round(x * n)), i);
1048
+ return T.w(S.date(S.date() + Math.round(j * n)), i);
1049
1049
  };
1050
1050
  if (c === W)
1051
1051
  return this.set(W, this.$M + n);
@@ -1063,7 +1063,7 @@ var zr = function(t) {
1063
1063
  var o = this, i = this.$locale();
1064
1064
  if (!this.isValid())
1065
1065
  return i.invalidDate || Lt;
1066
- var l = n || gr, c = T.z(this), d = this.$H, f = this.$m, m = this.$M, j = i.weekdays, x = i.months, S = i.meridiem, L = function(F, Z, le, Ve) {
1066
+ var l = n || gr, c = T.z(this), d = this.$H, f = this.$m, m = this.$M, x = i.weekdays, j = i.months, S = i.meridiem, L = function(F, Z, le, Ve) {
1067
1067
  return F && (F[Z] || F(o, l)) || le[Z].slice(0, Ve);
1068
1068
  }, V = function(F) {
1069
1069
  return T.s(d % 12 || 12, F, "0");
@@ -1081,9 +1081,9 @@ var zr = function(t) {
1081
1081
  case "MM":
1082
1082
  return T.s(m + 1, 2, "0");
1083
1083
  case "MMM":
1084
- return L(i.monthsShort, m, x, 3);
1084
+ return L(i.monthsShort, m, j, 3);
1085
1085
  case "MMMM":
1086
- return L(x, m);
1086
+ return L(j, m);
1087
1087
  case "D":
1088
1088
  return o.$D;
1089
1089
  case "DD":
@@ -1091,11 +1091,11 @@ var zr = function(t) {
1091
1091
  case "d":
1092
1092
  return String(o.$W);
1093
1093
  case "dd":
1094
- return L(i.weekdaysMin, o.$W, j, 2);
1094
+ return L(i.weekdaysMin, o.$W, x, 2);
1095
1095
  case "ddd":
1096
- return L(i.weekdaysShort, o.$W, j, 3);
1096
+ return L(i.weekdaysShort, o.$W, x, 3);
1097
1097
  case "dddd":
1098
- return j[o.$W];
1098
+ return x[o.$W];
1099
1099
  case "H":
1100
1100
  return String(d);
1101
1101
  case "HH":
@@ -1129,39 +1129,39 @@ var zr = function(t) {
1129
1129
  }, t.utcOffset = function() {
1130
1130
  return -Math.round(this.$d.getTimezoneOffset() / 15) * 15;
1131
1131
  }, t.diff = function(n, o, i) {
1132
- var l = this, c = T.p(o), d = $(n), f = (d.utcOffset() - this.utcOffset()) * rt, m = this - d, j = function() {
1132
+ var l = this, c = T.p(o), d = $(n), f = (d.utcOffset() - this.utcOffset()) * rt, m = this - d, x = function() {
1133
1133
  return T.m(l, d);
1134
- }, x;
1134
+ }, j;
1135
1135
  switch (c) {
1136
1136
  case te:
1137
- x = j() / 12;
1137
+ j = x() / 12;
1138
1138
  break;
1139
1139
  case W:
1140
- x = j();
1140
+ j = x();
1141
1141
  break;
1142
1142
  case Qt:
1143
- x = j() / 3;
1143
+ j = x() / 3;
1144
1144
  break;
1145
1145
  case Oe:
1146
- x = (m - f) / hr;
1146
+ j = (m - f) / hr;
1147
1147
  break;
1148
1148
  case ee:
1149
- x = (m - f) / mr;
1149
+ j = (m - f) / mr;
1150
1150
  break;
1151
1151
  case me:
1152
- x = m / Ft;
1152
+ j = m / Ft;
1153
1153
  break;
1154
1154
  case pe:
1155
- x = m / rt;
1155
+ j = m / rt;
1156
1156
  break;
1157
1157
  case fe:
1158
- x = m / ge;
1158
+ j = m / ge;
1159
1159
  break;
1160
1160
  default:
1161
- x = m;
1161
+ j = m;
1162
1162
  break;
1163
1163
  }
1164
- return i ? x : T.a(x);
1164
+ return i ? j : T.a(j);
1165
1165
  }, t.daysInMonth = function() {
1166
1166
  return this.endOf(W).$D;
1167
1167
  }, t.$locale = function() {
@@ -1666,21 +1666,21 @@ const Ir = ({
1666
1666
  } = C(), [d, {
1667
1667
  setTrue: f,
1668
1668
  setFalse: m
1669
- }] = Xn(), [j, x] = Ut(a), S = () => {
1670
- m(), t(j);
1669
+ }] = Xn(), [x, j] = Ut(a), S = () => {
1670
+ m(), t(x);
1671
1671
  }, L = () => {
1672
- m(), x(a);
1672
+ m(), j(a);
1673
1673
  }, V = () => {
1674
- x(o);
1674
+ j(o);
1675
1675
  };
1676
1676
  return Me(() => {
1677
- x(a);
1677
+ j(a);
1678
1678
  }, [a]), /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
1679
1679
  /* @__PURE__ */ e.jsx(O, { color: "grape", variant: "filled", leftSection: /* @__PURE__ */ e.jsx(Ln, { size: 16 }), size: i.button.size, onClick: f, sx: {
1680
1680
  flexGrow: 1
1681
1681
  }, children: s }),
1682
1682
  /* @__PURE__ */ e.jsx(ne, { size: 800, title: n, opened: d, onClose: m, closeOnClickOutside: !1, withCloseButton: !1, children: d && /* @__PURE__ */ e.jsxs(Ce, { children: [
1683
- /* @__PURE__ */ e.jsx(Ir, { value: j, onChange: x }),
1683
+ /* @__PURE__ */ e.jsx(Ir, { value: x, onChange: j }),
1684
1684
  /* @__PURE__ */ e.jsxs(D, { justify: "space-between", children: [
1685
1685
  /* @__PURE__ */ e.jsx(O, { size: i.button.size, onClick: V, color: "red", leftSection: /* @__PURE__ */ e.jsx(qn, { size: 20 }), children: c("common.actions.reset_to_default") }),
1686
1686
  /* @__PURE__ */ e.jsxs(D, { justify: "flex-end", children: [
@@ -1749,7 +1749,7 @@ function Fr({
1749
1749
  } = C(), [n, o] = Ut("postgresql"), i = async ({
1750
1750
  type: f,
1751
1751
  key: m,
1752
- config: j
1752
+ config: x
1753
1753
  }) => {
1754
1754
  Y({
1755
1755
  id: "for-creating",
@@ -1762,19 +1762,19 @@ function Fr({
1762
1762
  console.log({
1763
1763
  type: f,
1764
1764
  key: m,
1765
- config: j
1766
- }), await k.datasource.create(f, m, j), E({
1765
+ config: x
1766
+ }), await k.datasource.create(f, m, x), E({
1767
1767
  id: "for-creating",
1768
1768
  title: s("common.state.successful"),
1769
1769
  message: s("datasource.state.added"),
1770
1770
  color: "green",
1771
1771
  autoClose: !0
1772
1772
  }), a();
1773
- } catch (x) {
1774
- console.error(x), E({
1773
+ } catch (j) {
1774
+ console.error(j), E({
1775
1775
  id: "for-creating",
1776
1776
  title: s("common.state.failed"),
1777
- message: x.message,
1777
+ message: j.message,
1778
1778
  color: "red",
1779
1779
  autoClose: !0
1780
1780
  });
@@ -2131,11 +2131,11 @@ function Kr({
2131
2131
  color: "green",
2132
2132
  autoClose: !0
2133
2133
  }), a();
2134
- } catch (j) {
2134
+ } catch (x) {
2135
2135
  E({
2136
2136
  id: "for-creating",
2137
2137
  title: n("common.state.failed"),
2138
- message: j.message,
2138
+ message: x.message,
2139
2139
  color: "red",
2140
2140
  autoClose: !0
2141
2141
  });
@@ -2288,7 +2288,7 @@ function Qr({
2288
2288
  autoClose: !0
2289
2289
  });
2290
2290
  }
2291
- }, [j, x] = f(["reset_password", "new_password"]);
2291
+ }, [x, j] = f(["reset_password", "new_password"]);
2292
2292
  return /* @__PURE__ */ e.jsx(M, { mx: "auto", mb: 10, children: /* @__PURE__ */ e.jsxs("form", { onSubmit: d(m), children: [
2293
2293
  /* @__PURE__ */ e.jsx(y, { name: "name", control: c, render: ({
2294
2294
  field: S
@@ -2307,7 +2307,7 @@ function Qr({
2307
2307
  verticalAlign: "middle"
2308
2308
  }
2309
2309
  } }) }),
2310
- j && /* @__PURE__ */ e.jsx(
2310
+ x && /* @__PURE__ */ e.jsx(
2311
2311
  y,
2312
2312
  {
2313
2313
  name: "new_password",
@@ -2384,13 +2384,13 @@ const Ca = ze("AccountList", ({
2384
2384
  const {
2385
2385
  id: f,
2386
2386
  name: m,
2387
- email: j,
2388
- role_id: x
2387
+ email: x,
2388
+ role_id: j
2389
2389
  } = d;
2390
2390
  return /* @__PURE__ */ e.jsxs(h.Tr, { children: [
2391
2391
  /* @__PURE__ */ e.jsx(h.Td, { width: 200, children: m }),
2392
- /* @__PURE__ */ e.jsx(h.Td, { width: 200, children: j }),
2393
2392
  /* @__PURE__ */ e.jsx(h.Td, { width: 200, children: x }),
2393
+ /* @__PURE__ */ e.jsx(h.Td, { width: 200, children: j }),
2394
2394
  /* @__PURE__ */ e.jsx(h.Td, { width: 200, children: /* @__PURE__ */ e.jsxs(D, { justify: "flex-start", children: [
2395
2395
  /* @__PURE__ */ e.jsx(Xr, { account: d, onSuccess: o }),
2396
2396
  /* @__PURE__ */ e.jsx(Jr, { id: f, name: m, onSuccess: o })
@@ -2532,7 +2532,7 @@ function ta({
2532
2532
  }) {
2533
2533
  const {
2534
2534
  t: n
2535
- } = C(), o = Te(), [i, l] = G.useState(!1), c = () => l(!0), d = () => l(!1), f = (m, j) => {
2535
+ } = C(), o = Te(), [i, l] = G.useState(!1), c = () => l(!0), d = () => l(!1), f = (m, x) => {
2536
2536
  d(), o.openModal({
2537
2537
  title: n("api_key.save.title"),
2538
2538
  children: /* @__PURE__ */ e.jsxs(Ce, { children: [
@@ -2542,7 +2542,7 @@ function ta({
2542
2542
  cursor: "text !important"
2543
2543
  }
2544
2544
  } }),
2545
- /* @__PURE__ */ e.jsx(I, { defaultValue: j, disabled: !0, label: n("api_key.app_secret"), styles: {
2545
+ /* @__PURE__ */ e.jsx(I, { defaultValue: x, disabled: !0, label: n("api_key.app_secret"), styles: {
2546
2546
  input: {
2547
2547
  cursor: "text !important"
2548
2548
  }
@@ -2663,13 +2663,13 @@ const za = ze("APIKeyList", ({
2663
2663
  const {
2664
2664
  id: f,
2665
2665
  name: m,
2666
- app_id: j,
2667
- role_id: x
2666
+ app_id: x,
2667
+ role_id: j
2668
2668
  } = d;
2669
2669
  return /* @__PURE__ */ e.jsxs(h.Tr, { children: [
2670
2670
  /* @__PURE__ */ e.jsx(h.Td, { width: 200, children: m }),
2671
- /* @__PURE__ */ e.jsx(h.Td, { width: 200, children: j }),
2672
2671
  /* @__PURE__ */ e.jsx(h.Td, { width: 200, children: x }),
2672
+ /* @__PURE__ */ e.jsx(h.Td, { width: 200, children: j }),
2673
2673
  /* @__PURE__ */ e.jsx(h.Td, { width: 200, children: /* @__PURE__ */ e.jsx(D, { justify: "flex-start", children: /* @__PURE__ */ e.jsx(na, { id: f, name: m, onSuccess: o }) }) })
2674
2674
  ] }, f);
2675
2675
  }) })
@@ -2948,7 +2948,7 @@ const Da = ze("DataSourceList", ({
2948
2948
  ] })
2949
2949
  ] })
2950
2950
  ] });
2951
- }), Ea = () => import("./package-2159b00e.mjs").then(({
2951
+ }), Ea = () => import("./package-9339767b.mjs").then(({
2952
2952
  version: a
2953
2953
  }) => (console.log(`[@devtable/settings-form] version: ${a}`), a));
2954
2954
  export {
@@ -1,4 +1,4 @@
1
- (function(x,P){typeof exports=="object"&&typeof module<"u"?P(exports,require("react"),require("@mantine/core"),require("@mantine/notifications"),require("@tabler/icons-react"),require("react-i18next"),require("crypto-js"),require("lodash"),require("axios"),require("react-hook-form"),require("@monaco-editor/react"),require("i18next"),require("i18next-browser-languagedetector"),require("intl-pluralrules"),require("ahooks"),require("@mantine/modals"),require("@mantine/code-highlight")):typeof define=="function"&&define.amd?define(["exports","react","@mantine/core","@mantine/notifications","@tabler/icons-react","react-i18next","crypto-js","lodash","axios","react-hook-form","@monaco-editor/react","i18next","i18next-browser-languagedetector","intl-pluralrules","ahooks","@mantine/modals","@mantine/code-highlight"],P):(x=typeof globalThis<"u"?globalThis:x||self,P(x["settings-form"]={},x.react,x["@mantine/core"],x["@mantine/notifications"],x["@tabler/icons-react"],x["react-i18next"],x.CryptoJS,x._,x.axios,x["react-hook-form"],x["@monaco-editor/react"],x.i18next,x["i18next-browser-languagedetector"],x["intl-pluralrules"],x.ahooks,x["@mantine/modals"],x["@mantine/code-highlight"]))})(this,function(x,P,o,T,A,w,Yt,Vt,Qe,v,fe,Gt,Wt,Aa,K,ae,Kt){"use strict";function Qt(r){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(r){for(const s in r)if(s!=="default"){const n=Object.getOwnPropertyDescriptor(r,s);Object.defineProperty(t,s,n.get?n:{enumerable:!0,get:()=>r[s]})}}return t.default=r,Object.freeze(t)}const Jt=Qt(Yt);var Oe={exports:{}},me={};/**
1
+ (function(x,P){typeof exports=="object"&&typeof module<"u"?P(exports,require("react"),require("@mantine/core"),require("@mantine/notifications"),require("@tabler/icons-react"),require("react-i18next"),require("crypto-js"),require("lodash"),require("axios"),require("react-hook-form"),require("@monaco-editor/react"),require("i18next"),require("i18next-browser-languagedetector"),require("intl-pluralrules"),require("ahooks"),require("@mantine/modals"),require("@mantine/code-highlight")):typeof define=="function"&&define.amd?define(["exports","react","@mantine/core","@mantine/notifications","@tabler/icons-react","react-i18next","crypto-js","lodash","axios","react-hook-form","@monaco-editor/react","i18next","i18next-browser-languagedetector","intl-pluralrules","ahooks","@mantine/modals","@mantine/code-highlight"],P):(x=typeof globalThis<"u"?globalThis:x||self,P(x["settings-form"]={},x.react,x["@mantine/core"],x["@mantine/notifications"],x["@tabler/icons-react"],x["react-i18next"],x.CryptoJS,x._,x.axios,x["react-hook-form"],x["@monaco-editor/react"],x.i18next,x["i18next-browser-languagedetector"],x["intl-pluralrules"],x.ahooks,x["@mantine/modals"],x["@mantine/code-highlight"]))})(this,function(x,P,o,T,A,w,Yt,Vt,Qe,j,fe,Gt,Wt,Aa,K,ae,Kt){"use strict";function Qt(r){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(r){for(const s in r)if(s!=="default"){const n=Object.getOwnPropertyDescriptor(r,s);Object.defineProperty(t,s,n.get?n:{enumerable:!0,get:()=>r[s]})}}return t.default=r,Object.freeze(t)}const Jt=Qt(Yt);var Oe={exports:{}},me={};/**
2
2
  * @license React
3
3
  * react-jsx-runtime.production.min.js
4
4
  *
@@ -6,7 +6,7 @@
6
6
  *
7
7
  * This source code is licensed under the MIT license found in the
8
8
  * LICENSE file in the root directory of this source tree.
9
- */var Je;function Ht(){if(Je)return me;Je=1;var r=P,t=Symbol.for("react.element"),s=Symbol.for("react.fragment"),n=Object.prototype.hasOwnProperty,i=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,l={key:!0,ref:!0,__self:!0,__source:!0};function c(u,d,f){var h,j={},b=null,C=null;f!==void 0&&(b=""+f),d.key!==void 0&&(b=""+d.key),d.ref!==void 0&&(C=d.ref);for(h in d)n.call(d,h)&&!l.hasOwnProperty(h)&&(j[h]=d[h]);if(u&&u.defaultProps)for(h in d=u.defaultProps,d)j[h]===void 0&&(j[h]=d[h]);return{$$typeof:t,type:u,key:b,ref:C,props:j,_owner:i.current}}return me.Fragment=s,me.jsx=c,me.jsxs=c,me}var he={};/**
9
+ */var Je;function Ht(){if(Je)return me;Je=1;var r=P,t=Symbol.for("react.element"),s=Symbol.for("react.fragment"),n=Object.prototype.hasOwnProperty,i=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,l={key:!0,ref:!0,__self:!0,__source:!0};function c(u,d,f){var h,b={},v=null,C=null;f!==void 0&&(v=""+f),d.key!==void 0&&(v=""+d.key),d.ref!==void 0&&(C=d.ref);for(h in d)n.call(d,h)&&!l.hasOwnProperty(h)&&(b[h]=d[h]);if(u&&u.defaultProps)for(h in d=u.defaultProps,d)b[h]===void 0&&(b[h]=d[h]);return{$$typeof:t,type:u,key:v,ref:C,props:b,_owner:i.current}}return me.Fragment=s,me.jsx=c,me.jsxs=c,me}var he={};/**
10
10
  * @license React
11
11
  * react-jsx-runtime.development.js
12
12
  *
@@ -14,23 +14,23 @@
14
14
  *
15
15
  * This source code is licensed under the MIT license found in the
16
16
  * LICENSE file in the root directory of this source tree.
17
- */var He;function Xt(){return He||(He=1,process.env.NODE_ENV!=="production"&&function(){var r=P,t=Symbol.for("react.element"),s=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),l=Symbol.for("react.profiler"),c=Symbol.for("react.provider"),u=Symbol.for("react.context"),d=Symbol.for("react.forward_ref"),f=Symbol.for("react.suspense"),h=Symbol.for("react.suspense_list"),j=Symbol.for("react.memo"),b=Symbol.for("react.lazy"),C=Symbol.for("react.offscreen"),q=Symbol.iterator,Y="@@iterator";function X(a){if(a===null||typeof a!="object")return null;var p=q&&a[q]||a[Y];return typeof p=="function"?p:null}var k=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function D(a){{for(var p=arguments.length,m=new Array(p>1?p-1:0),g=1;g<p;g++)m[g-1]=arguments[g];L("error",a,m)}}function L(a,p,m){{var g=k.ReactDebugCurrentFrame,y=g.getStackAddendum();y!==""&&(p+="%s",m=m.concat([y]));var E=m.map(function(S){return String(S)});E.unshift("Warning: "+p),Function.prototype.apply.call(console[a],console,E)}}var Z=!1,ce=!1,ke=!1,Zn=!1,ea=!1,jt;jt=Symbol.for("react.module.reference");function ta(a){return!!(typeof a=="string"||typeof a=="function"||a===n||a===l||ea||a===i||a===f||a===h||Zn||a===C||Z||ce||ke||typeof a=="object"&&a!==null&&(a.$$typeof===b||a.$$typeof===j||a.$$typeof===c||a.$$typeof===u||a.$$typeof===d||a.$$typeof===jt||a.getModuleId!==void 0))}function na(a,p,m){var g=a.displayName;if(g)return g;var y=p.displayName||p.name||"";return y!==""?m+"("+y+")":m}function _t(a){return a.displayName||"Context"}function G(a){if(a==null)return null;if(typeof a.tag=="number"&&D("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof a=="function")return a.displayName||a.name||null;if(typeof a=="string")return a;switch(a){case n:return"Fragment";case s:return"Portal";case l:return"Profiler";case i:return"StrictMode";case f:return"Suspense";case h:return"SuspenseList"}if(typeof a=="object")switch(a.$$typeof){case u:var p=a;return _t(p)+".Consumer";case c:var m=a;return _t(m._context)+".Provider";case d:return na(a,a.render,"ForwardRef");case j:var g=a.displayName||null;return g!==null?g:G(a.type)||"Memo";case b:{var y=a,E=y._payload,S=y._init;try{return G(S(E))}catch{return null}}}return null}var te=Object.assign,ve=0,Tt,St,wt,yt,Ct,Dt,zt;function Et(){}Et.__reactDisabledLog=!0;function aa(){{if(ve===0){Tt=console.log,St=console.info,wt=console.warn,yt=console.error,Ct=console.group,Dt=console.groupCollapsed,zt=console.groupEnd;var a={configurable:!0,enumerable:!0,value:Et,writable:!0};Object.defineProperties(console,{info:a,log:a,warn:a,error:a,group:a,groupCollapsed:a,groupEnd:a})}ve++}}function ra(){{if(ve--,ve===0){var a={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:te({},a,{value:Tt}),info:te({},a,{value:St}),warn:te({},a,{value:wt}),error:te({},a,{value:yt}),group:te({},a,{value:Ct}),groupCollapsed:te({},a,{value:Dt}),groupEnd:te({},a,{value:zt})})}ve<0&&D("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var Ne=k.ReactCurrentDispatcher,Fe;function ze(a,p,m){{if(Fe===void 0)try{throw Error()}catch(y){var g=y.stack.trim().match(/\n( *(at )?)/);Fe=g&&g[1]||""}return`
17
+ */var He;function Xt(){return He||(He=1,process.env.NODE_ENV!=="production"&&function(){var r=P,t=Symbol.for("react.element"),s=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),l=Symbol.for("react.profiler"),c=Symbol.for("react.provider"),u=Symbol.for("react.context"),d=Symbol.for("react.forward_ref"),f=Symbol.for("react.suspense"),h=Symbol.for("react.suspense_list"),b=Symbol.for("react.memo"),v=Symbol.for("react.lazy"),C=Symbol.for("react.offscreen"),q=Symbol.iterator,Y="@@iterator";function X(a){if(a===null||typeof a!="object")return null;var p=q&&a[q]||a[Y];return typeof p=="function"?p:null}var k=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function D(a){{for(var p=arguments.length,m=new Array(p>1?p-1:0),g=1;g<p;g++)m[g-1]=arguments[g];L("error",a,m)}}function L(a,p,m){{var g=k.ReactDebugCurrentFrame,y=g.getStackAddendum();y!==""&&(p+="%s",m=m.concat([y]));var E=m.map(function(S){return String(S)});E.unshift("Warning: "+p),Function.prototype.apply.call(console[a],console,E)}}var Z=!1,ce=!1,ke=!1,Zn=!1,ea=!1,jt;jt=Symbol.for("react.module.reference");function ta(a){return!!(typeof a=="string"||typeof a=="function"||a===n||a===l||ea||a===i||a===f||a===h||Zn||a===C||Z||ce||ke||typeof a=="object"&&a!==null&&(a.$$typeof===v||a.$$typeof===b||a.$$typeof===c||a.$$typeof===u||a.$$typeof===d||a.$$typeof===jt||a.getModuleId!==void 0))}function na(a,p,m){var g=a.displayName;if(g)return g;var y=p.displayName||p.name||"";return y!==""?m+"("+y+")":m}function _t(a){return a.displayName||"Context"}function G(a){if(a==null)return null;if(typeof a.tag=="number"&&D("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof a=="function")return a.displayName||a.name||null;if(typeof a=="string")return a;switch(a){case n:return"Fragment";case s:return"Portal";case l:return"Profiler";case i:return"StrictMode";case f:return"Suspense";case h:return"SuspenseList"}if(typeof a=="object")switch(a.$$typeof){case u:var p=a;return _t(p)+".Consumer";case c:var m=a;return _t(m._context)+".Provider";case d:return na(a,a.render,"ForwardRef");case b:var g=a.displayName||null;return g!==null?g:G(a.type)||"Memo";case v:{var y=a,E=y._payload,S=y._init;try{return G(S(E))}catch{return null}}}return null}var te=Object.assign,ve=0,Tt,St,wt,yt,Ct,Dt,zt;function Et(){}Et.__reactDisabledLog=!0;function aa(){{if(ve===0){Tt=console.log,St=console.info,wt=console.warn,yt=console.error,Ct=console.group,Dt=console.groupCollapsed,zt=console.groupEnd;var a={configurable:!0,enumerable:!0,value:Et,writable:!0};Object.defineProperties(console,{info:a,log:a,warn:a,error:a,group:a,groupCollapsed:a,groupEnd:a})}ve++}}function ra(){{if(ve--,ve===0){var a={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:te({},a,{value:Tt}),info:te({},a,{value:St}),warn:te({},a,{value:wt}),error:te({},a,{value:yt}),group:te({},a,{value:Ct}),groupCollapsed:te({},a,{value:Dt}),groupEnd:te({},a,{value:zt})})}ve<0&&D("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var Ne=k.ReactCurrentDispatcher,Fe;function ze(a,p,m){{if(Fe===void 0)try{throw Error()}catch(y){var g=y.stack.trim().match(/\n( *(at )?)/);Fe=g&&g[1]||""}return`
18
18
  `+Fe+a}}var Be=!1,Ee;{var sa=typeof WeakMap=="function"?WeakMap:Map;Ee=new sa}function At(a,p){if(!a||Be)return"";{var m=Ee.get(a);if(m!==void 0)return m}var g;Be=!0;var y=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var E;E=Ne.current,Ne.current=null,aa();try{if(p){var S=function(){throw Error()};if(Object.defineProperty(S.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(S,[])}catch(F){g=F}Reflect.construct(a,[],S)}else{try{S.call()}catch(F){g=F}a.call(S.prototype)}}else{try{throw Error()}catch(F){g=F}a()}}catch(F){if(F&&g&&typeof F.stack=="string"){for(var _=F.stack.split(`
19
19
  `),N=g.stack.split(`
20
20
  `),$=_.length-1,M=N.length-1;$>=1&&M>=0&&_[$]!==N[M];)M--;for(;$>=1&&M>=0;$--,M--)if(_[$]!==N[M]){if($!==1||M!==1)do if($--,M--,M<0||_[$]!==N[M]){var B=`
21
- `+_[$].replace(" at new "," at ");return a.displayName&&B.includes("<anonymous>")&&(B=B.replace("<anonymous>",a.displayName)),typeof a=="function"&&Ee.set(a,B),B}while($>=1&&M>=0);break}}}finally{Be=!1,Ne.current=E,ra(),Error.prepareStackTrace=y}var pe=a?a.displayName||a.name:"",ne=pe?ze(pe):"";return typeof a=="function"&&Ee.set(a,ne),ne}function ia(a,p,m){return At(a,!1)}function oa(a){var p=a.prototype;return!!(p&&p.isReactComponent)}function Ae(a,p,m){if(a==null)return"";if(typeof a=="function")return At(a,oa(a));if(typeof a=="string")return ze(a);switch(a){case f:return ze("Suspense");case h:return ze("SuspenseList")}if(typeof a=="object")switch(a.$$typeof){case d:return ia(a.render);case j:return Ae(a.type,p,m);case b:{var g=a,y=g._payload,E=g._init;try{return Ae(E(y),p,m)}catch{}}}return""}var je=Object.prototype.hasOwnProperty,Pt={},Ot=k.ReactDebugCurrentFrame;function Pe(a){if(a){var p=a._owner,m=Ae(a.type,a._source,p?p.type:null);Ot.setExtraStackFrame(m)}else Ot.setExtraStackFrame(null)}function la(a,p,m,g,y){{var E=Function.call.bind(je);for(var S in a)if(E(a,S)){var _=void 0;try{if(typeof a[S]!="function"){var N=Error((g||"React class")+": "+m+" type `"+S+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof a[S]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw N.name="Invariant Violation",N}_=a[S](p,S,g,m,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch($){_=$}_&&!(_ instanceof Error)&&(Pe(y),D("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",g||"React class",m,S,typeof _),Pe(null)),_ instanceof Error&&!(_.message in Pt)&&(Pt[_.message]=!0,Pe(y),D("Failed %s type: %s",m,_.message),Pe(null))}}}var ua=Array.isArray;function Ue(a){return ua(a)}function ca(a){{var p=typeof Symbol=="function"&&Symbol.toStringTag,m=p&&a[Symbol.toStringTag]||a.constructor.name||"Object";return m}}function da(a){try{return $t(a),!1}catch{return!0}}function $t(a){return""+a}function Mt(a){if(da(a))return D("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",ca(a)),$t(a)}var _e=k.ReactCurrentOwner,pa={key:!0,ref:!0,__self:!0,__source:!0},It,Rt,Ye;Ye={};function fa(a){if(je.call(a,"ref")){var p=Object.getOwnPropertyDescriptor(a,"ref").get;if(p&&p.isReactWarning)return!1}return a.ref!==void 0}function ma(a){if(je.call(a,"key")){var p=Object.getOwnPropertyDescriptor(a,"key").get;if(p&&p.isReactWarning)return!1}return a.key!==void 0}function ha(a,p){if(typeof a.ref=="string"&&_e.current&&p&&_e.current.stateNode!==p){var m=G(_e.current.type);Ye[m]||(D('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',G(_e.current.type),a.ref),Ye[m]=!0)}}function ga(a,p){{var m=function(){It||(It=!0,D("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",p))};m.isReactWarning=!0,Object.defineProperty(a,"key",{get:m,configurable:!0})}}function xa(a,p){{var m=function(){Rt||(Rt=!0,D("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",p))};m.isReactWarning=!0,Object.defineProperty(a,"ref",{get:m,configurable:!0})}}var ba=function(a,p,m,g,y,E,S){var _={$$typeof:t,type:a,key:p,ref:m,props:S,_owner:E};return _._store={},Object.defineProperty(_._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(_,"_self",{configurable:!1,enumerable:!1,writable:!1,value:g}),Object.defineProperty(_,"_source",{configurable:!1,enumerable:!1,writable:!1,value:y}),Object.freeze&&(Object.freeze(_.props),Object.freeze(_)),_};function va(a,p,m,g,y){{var E,S={},_=null,N=null;m!==void 0&&(Mt(m),_=""+m),ma(p)&&(Mt(p.key),_=""+p.key),fa(p)&&(N=p.ref,ha(p,y));for(E in p)je.call(p,E)&&!pa.hasOwnProperty(E)&&(S[E]=p[E]);if(a&&a.defaultProps){var $=a.defaultProps;for(E in $)S[E]===void 0&&(S[E]=$[E])}if(_||N){var M=typeof a=="function"?a.displayName||a.name||"Unknown":a;_&&ga(S,M),N&&xa(S,M)}return ba(a,_,N,y,g,_e.current,S)}}var Ve=k.ReactCurrentOwner,Lt=k.ReactDebugCurrentFrame;function de(a){if(a){var p=a._owner,m=Ae(a.type,a._source,p?p.type:null);Lt.setExtraStackFrame(m)}else Lt.setExtraStackFrame(null)}var Ge;Ge=!1;function We(a){return typeof a=="object"&&a!==null&&a.$$typeof===t}function qt(){{if(Ve.current){var a=G(Ve.current.type);if(a)return`
21
+ `+_[$].replace(" at new "," at ");return a.displayName&&B.includes("<anonymous>")&&(B=B.replace("<anonymous>",a.displayName)),typeof a=="function"&&Ee.set(a,B),B}while($>=1&&M>=0);break}}}finally{Be=!1,Ne.current=E,ra(),Error.prepareStackTrace=y}var pe=a?a.displayName||a.name:"",ne=pe?ze(pe):"";return typeof a=="function"&&Ee.set(a,ne),ne}function ia(a,p,m){return At(a,!1)}function oa(a){var p=a.prototype;return!!(p&&p.isReactComponent)}function Ae(a,p,m){if(a==null)return"";if(typeof a=="function")return At(a,oa(a));if(typeof a=="string")return ze(a);switch(a){case f:return ze("Suspense");case h:return ze("SuspenseList")}if(typeof a=="object")switch(a.$$typeof){case d:return ia(a.render);case b:return Ae(a.type,p,m);case v:{var g=a,y=g._payload,E=g._init;try{return Ae(E(y),p,m)}catch{}}}return""}var je=Object.prototype.hasOwnProperty,Pt={},Ot=k.ReactDebugCurrentFrame;function Pe(a){if(a){var p=a._owner,m=Ae(a.type,a._source,p?p.type:null);Ot.setExtraStackFrame(m)}else Ot.setExtraStackFrame(null)}function la(a,p,m,g,y){{var E=Function.call.bind(je);for(var S in a)if(E(a,S)){var _=void 0;try{if(typeof a[S]!="function"){var N=Error((g||"React class")+": "+m+" type `"+S+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof a[S]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw N.name="Invariant Violation",N}_=a[S](p,S,g,m,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch($){_=$}_&&!(_ instanceof Error)&&(Pe(y),D("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",g||"React class",m,S,typeof _),Pe(null)),_ instanceof Error&&!(_.message in Pt)&&(Pt[_.message]=!0,Pe(y),D("Failed %s type: %s",m,_.message),Pe(null))}}}var ua=Array.isArray;function Ue(a){return ua(a)}function ca(a){{var p=typeof Symbol=="function"&&Symbol.toStringTag,m=p&&a[Symbol.toStringTag]||a.constructor.name||"Object";return m}}function da(a){try{return $t(a),!1}catch{return!0}}function $t(a){return""+a}function Mt(a){if(da(a))return D("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",ca(a)),$t(a)}var _e=k.ReactCurrentOwner,pa={key:!0,ref:!0,__self:!0,__source:!0},It,Rt,Ye;Ye={};function fa(a){if(je.call(a,"ref")){var p=Object.getOwnPropertyDescriptor(a,"ref").get;if(p&&p.isReactWarning)return!1}return a.ref!==void 0}function ma(a){if(je.call(a,"key")){var p=Object.getOwnPropertyDescriptor(a,"key").get;if(p&&p.isReactWarning)return!1}return a.key!==void 0}function ha(a,p){if(typeof a.ref=="string"&&_e.current&&p&&_e.current.stateNode!==p){var m=G(_e.current.type);Ye[m]||(D('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',G(_e.current.type),a.ref),Ye[m]=!0)}}function ga(a,p){{var m=function(){It||(It=!0,D("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",p))};m.isReactWarning=!0,Object.defineProperty(a,"key",{get:m,configurable:!0})}}function xa(a,p){{var m=function(){Rt||(Rt=!0,D("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",p))};m.isReactWarning=!0,Object.defineProperty(a,"ref",{get:m,configurable:!0})}}var ba=function(a,p,m,g,y,E,S){var _={$$typeof:t,type:a,key:p,ref:m,props:S,_owner:E};return _._store={},Object.defineProperty(_._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(_,"_self",{configurable:!1,enumerable:!1,writable:!1,value:g}),Object.defineProperty(_,"_source",{configurable:!1,enumerable:!1,writable:!1,value:y}),Object.freeze&&(Object.freeze(_.props),Object.freeze(_)),_};function va(a,p,m,g,y){{var E,S={},_=null,N=null;m!==void 0&&(Mt(m),_=""+m),ma(p)&&(Mt(p.key),_=""+p.key),fa(p)&&(N=p.ref,ha(p,y));for(E in p)je.call(p,E)&&!pa.hasOwnProperty(E)&&(S[E]=p[E]);if(a&&a.defaultProps){var $=a.defaultProps;for(E in $)S[E]===void 0&&(S[E]=$[E])}if(_||N){var M=typeof a=="function"?a.displayName||a.name||"Unknown":a;_&&ga(S,M),N&&xa(S,M)}return ba(a,_,N,y,g,_e.current,S)}}var Ve=k.ReactCurrentOwner,Lt=k.ReactDebugCurrentFrame;function de(a){if(a){var p=a._owner,m=Ae(a.type,a._source,p?p.type:null);Lt.setExtraStackFrame(m)}else Lt.setExtraStackFrame(null)}var Ge;Ge=!1;function We(a){return typeof a=="object"&&a!==null&&a.$$typeof===t}function qt(){{if(Ve.current){var a=G(Ve.current.type);if(a)return`
22
22
 
23
23
  Check the render method of \``+a+"`."}return""}}function ja(a){{if(a!==void 0){var p=a.fileName.replace(/^.*[\\\/]/,""),m=a.lineNumber;return`
24
24
 
25
25
  Check your code at `+p+":"+m+"."}return""}}var kt={};function _a(a){{var p=qt();if(!p){var m=typeof a=="string"?a:a.displayName||a.name;m&&(p=`
26
26
 
27
- Check the top-level render call using <`+m+">.")}return p}}function Nt(a,p){{if(!a._store||a._store.validated||a.key!=null)return;a._store.validated=!0;var m=_a(p);if(kt[m])return;kt[m]=!0;var g="";a&&a._owner&&a._owner!==Ve.current&&(g=" It was passed a child from "+G(a._owner.type)+"."),de(a),D('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',m,g),de(null)}}function Ft(a,p){{if(typeof a!="object")return;if(Ue(a))for(var m=0;m<a.length;m++){var g=a[m];We(g)&&Nt(g,p)}else if(We(a))a._store&&(a._store.validated=!0);else if(a){var y=X(a);if(typeof y=="function"&&y!==a.entries)for(var E=y.call(a),S;!(S=E.next()).done;)We(S.value)&&Nt(S.value,p)}}}function Ta(a){{var p=a.type;if(p==null||typeof p=="string")return;var m;if(typeof p=="function")m=p.propTypes;else if(typeof p=="object"&&(p.$$typeof===d||p.$$typeof===j))m=p.propTypes;else return;if(m){var g=G(p);la(m,a.props,"prop",g,a)}else if(p.PropTypes!==void 0&&!Ge){Ge=!0;var y=G(p);D("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",y||"Unknown")}typeof p.getDefaultProps=="function"&&!p.getDefaultProps.isReactClassApproved&&D("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function Sa(a){{for(var p=Object.keys(a.props),m=0;m<p.length;m++){var g=p[m];if(g!=="children"&&g!=="key"){de(a),D("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",g),de(null);break}}a.ref!==null&&(de(a),D("Invalid attribute `ref` supplied to `React.Fragment`."),de(null))}}var Bt={};function Ut(a,p,m,g,y,E){{var S=ta(a);if(!S){var _="";(a===void 0||typeof a=="object"&&a!==null&&Object.keys(a).length===0)&&(_+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var N=ja(y);N?_+=N:_+=qt();var $;a===null?$="null":Ue(a)?$="array":a!==void 0&&a.$$typeof===t?($="<"+(G(a.type)||"Unknown")+" />",_=" Did you accidentally export a JSX literal instead of a component?"):$=typeof a,D("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",$,_)}var M=va(a,p,m,y,E);if(M==null)return M;if(S){var B=p.children;if(B!==void 0)if(g)if(Ue(B)){for(var pe=0;pe<B.length;pe++)Ft(B[pe],a);Object.freeze&&Object.freeze(B)}else D("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else Ft(B,a)}if(je.call(p,"key")){var ne=G(a),F=Object.keys(p).filter(function(Ea){return Ea!=="key"}),Ke=F.length>0?"{key: someKey, "+F.join(": ..., ")+": ...}":"{key: someKey}";if(!Bt[ne+Ke]){var za=F.length>0?"{"+F.join(": ..., ")+": ...}":"{}";D(`A props object containing a "key" prop is being spread into JSX:
27
+ Check the top-level render call using <`+m+">.")}return p}}function Nt(a,p){{if(!a._store||a._store.validated||a.key!=null)return;a._store.validated=!0;var m=_a(p);if(kt[m])return;kt[m]=!0;var g="";a&&a._owner&&a._owner!==Ve.current&&(g=" It was passed a child from "+G(a._owner.type)+"."),de(a),D('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',m,g),de(null)}}function Ft(a,p){{if(typeof a!="object")return;if(Ue(a))for(var m=0;m<a.length;m++){var g=a[m];We(g)&&Nt(g,p)}else if(We(a))a._store&&(a._store.validated=!0);else if(a){var y=X(a);if(typeof y=="function"&&y!==a.entries)for(var E=y.call(a),S;!(S=E.next()).done;)We(S.value)&&Nt(S.value,p)}}}function Ta(a){{var p=a.type;if(p==null||typeof p=="string")return;var m;if(typeof p=="function")m=p.propTypes;else if(typeof p=="object"&&(p.$$typeof===d||p.$$typeof===b))m=p.propTypes;else return;if(m){var g=G(p);la(m,a.props,"prop",g,a)}else if(p.PropTypes!==void 0&&!Ge){Ge=!0;var y=G(p);D("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",y||"Unknown")}typeof p.getDefaultProps=="function"&&!p.getDefaultProps.isReactClassApproved&&D("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function Sa(a){{for(var p=Object.keys(a.props),m=0;m<p.length;m++){var g=p[m];if(g!=="children"&&g!=="key"){de(a),D("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",g),de(null);break}}a.ref!==null&&(de(a),D("Invalid attribute `ref` supplied to `React.Fragment`."),de(null))}}var Bt={};function Ut(a,p,m,g,y,E){{var S=ta(a);if(!S){var _="";(a===void 0||typeof a=="object"&&a!==null&&Object.keys(a).length===0)&&(_+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var N=ja(y);N?_+=N:_+=qt();var $;a===null?$="null":Ue(a)?$="array":a!==void 0&&a.$$typeof===t?($="<"+(G(a.type)||"Unknown")+" />",_=" Did you accidentally export a JSX literal instead of a component?"):$=typeof a,D("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",$,_)}var M=va(a,p,m,y,E);if(M==null)return M;if(S){var B=p.children;if(B!==void 0)if(g)if(Ue(B)){for(var pe=0;pe<B.length;pe++)Ft(B[pe],a);Object.freeze&&Object.freeze(B)}else D("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else Ft(B,a)}if(je.call(p,"key")){var ne=G(a),F=Object.keys(p).filter(function(Ea){return Ea!=="key"}),Ke=F.length>0?"{key: someKey, "+F.join(": ..., ")+": ...}":"{key: someKey}";if(!Bt[ne+Ke]){var za=F.length>0?"{"+F.join(": ..., ")+": ...}":"{}";D(`A props object containing a "key" prop is being spread into JSX:
28
28
  let props = %s;
29
29
  <%s {...props} />
30
30
  React keys must be passed directly to JSX without using spread:
31
31
  let props = %s;
32
- <%s key={someKey} {...props} />`,Ke,ne,za,ne),Bt[ne+Ke]=!0}}return a===n?Sa(M):Ta(M),M}}function wa(a,p,m){return Ut(a,p,m,!0)}function ya(a,p,m){return Ut(a,p,m,!1)}var Ca=ya,Da=wa;he.Fragment=n,he.jsx=Ca,he.jsxs=Da}()),he}process.env.NODE_ENV==="production"?Oe.exports=Ht():Oe.exports=Xt();var e=Oe.exports;function Zt(r){r=r||{};const t=Object.keys(r).sort(),s=[];for(let n=0;n<t.length;n++){const i=t[n];if(i!="authentication"&&r[i])s.push(t[n]+"="+(typeof r[i]=="object"?JSON.stringify(r[i]):r[i]));else{const l=Object.keys(r[i]).sort();for(let c=0;c<l.length;c++){const u=l[c];u!="sign"&&r[i][u]&&s.push(l[c]+"="+(typeof r[i][u]=="object"?JSON.stringify(r[i][u]):r[i][u]))}}}return s.sort().join("&")}function en(r,t){let s=Zt(r);return s+="&key="+t,Jt.MD5(s).toString().toUpperCase()}class Xe{constructor(){this.type="default_api_client",this.baseURL="http://localhost:31200",this.app_id="",this.app_secret=""}getAuthentication(t){if(!this.app_id||!this.app_secret)return;const s=new Date().getTime().toString();return{app_id:this.app_id,nonce_str:s,sign:en({app_id:this.app_id,nonce_str:s,...t},this.app_secret)}}getRequest(t,s){return(n,i,l,c)=>{const u=this.buildHeader(l),d=this.buildAxiosConfig(t,n,i,l,u,s);return Qe(d).then(f=>c?f:f.data).catch(f=>{if(Qe.isCancel(f))return Promise.reject(f);const h=Vt.get(f,"response.data.detail.message",f.message);return Promise.reject(new Error(h))})}}get(t){return this.getRequest("GET",t)}post(t){return this.getRequest("POST",t)}put(t){return this.getRequest("PUT",t)}buildAxiosConfig(t,s,n,i,l,c){const u={baseURL:this.baseURL,method:t,url:s,params:t==="GET"?n:i.params,headers:l,signal:c};return["POST","PUT"].includes(t)&&(u.data=i.string?JSON.stringify(n):n,u.data.authentication=this.getAuthentication(u.data)),u}buildHeader(t){const s=window.localStorage.getItem("token");return{"X-Requested-With":"XMLHttpRequest","Content-Type":t.string?"application/x-www-form-urlencoded":"application/json",authorization:s?`bearer ${s}`:"",...t.headers}}}class Ze{constructor(t){this.implementation=t}getRequest(t,s){return this.implementation.getRequest(t,s)}get(t){return this.getRequest("GET",t)}post(t){return this.getRequest("POST",t)}put(t){return this.getRequest("PUT",t)}}const ge=new Xe,et=new Ze(ge),O=et;function tt(r){ge.baseURL!==r.apiBaseURL&&(ge.baseURL=r.apiBaseURL),r.app_id&&(ge.app_id=r.app_id),r.app_secret&&(ge.app_secret=r.app_secret)}const tn={login:async(r,t)=>{const s={name:r,password:t};return await O.post()("/account/login",s,{})},list:async()=>await O.post()("/account/list",{filter:{},sort:[{field:"name",order:"ASC"}],pagination:{page:1,pagesize:100}},{}),get:async()=>await O.get()("/account/get",{},{}),update:async(r,t)=>{const s={name:r.trim(),email:t.trim()};return await O.put()("/account/update",s,{})},changepassword:async(r,t)=>{const s={old_password:r.trim(),new_password:t.trim()};return await O.post()("/account/changepassword",s,{})},create:async(r,t,s,n)=>await O.post()("/account/create",{name:r.trim(),email:t.trim(),password:s.trim(),role_id:n},{}),edit:async r=>(r.reset_password||(r.new_password=void 0),await O.put()("/account/edit",r,{})),delete:async r=>{if(r)return O.post()("/account/delete",{id:r},{})}},nn={list:async()=>await O.post()("/api/key/list",{filter:{search:""},sort:[{field:"name",order:"ASC"}],pagination:{page:1,pagesize:100}},{}),create:async(r,t)=>O.post()("/api/key/create",{name:r,role_id:t},{}),delete:async r=>{if(r)return O.post()("/api/key/delete",{id:r},{})}},an={list:async()=>await O.post()("/datasource/list",{filter:{},sort:[{field:"create_time",order:"ASC"}],pagination:{page:1,pagesize:100}},{}),create:async(r,t,s)=>await O.post()("/datasource/create",{type:r,key:t,config:s},{}),update:async(r,t)=>await O.put()("/datasource/update",{id:r,config:t},{}),delete:async r=>{await O.post()("/datasource/delete",{id:r},{})}},rn={list:async()=>await O.get()("/role/list",{},{})};var nt=60,at=nt*60,rt=at*24,sn=rt*7,re=1e3,$e=nt*re,st=at*re,on=rt*re,ln=sn*re,Me="millisecond",se="second",ie="minute",oe="hour",Q="day",Te="week",U="month",it="quarter",J="year",le="date",un="YYYY-MM-DDTHH:mm:ssZ",ot="Invalid Date",cn=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,dn=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g;const pn={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(t){var s=["th","st","nd","rd"],n=t%100;return"["+t+(s[(n-20)%10]||s[n]||s[0])+"]"}};var Ie=function(t,s,n){var i=String(t);return!i||i.length>=s?t:""+Array(s+1-i.length).join(n)+t},fn=function(t){var s=-t.utcOffset(),n=Math.abs(s),i=Math.floor(n/60),l=n%60;return(s<=0?"+":"-")+Ie(i,2,"0")+":"+Ie(l,2,"0")},mn=function r(t,s){if(t.date()<s.date())return-r(s,t);var n=(s.year()-t.year())*12+(s.month()-t.month()),i=t.clone().add(n,U),l=s-i<0,c=t.clone().add(n+(l?-1:1),U);return+(-(n+(s-i)/(l?i-c:c-i))||0)},hn=function(t){return t<0?Math.ceil(t)||0:Math.floor(t)},gn=function(t){var s={M:U,y:J,w:Te,d:Q,D:le,h:oe,m:ie,s:se,ms:Me,Q:it};return s[t]||String(t||"").toLowerCase().replace(/s$/,"")},xn=function(t){return t===void 0};const bn={s:Ie,z:fn,m:mn,a:hn,p:gn,u:xn};var xe="en",ee={};ee[xe]=pn;var Re=function(t){return t instanceof we},Se=function r(t,s,n){var i;if(!t)return xe;if(typeof t=="string"){var l=t.toLowerCase();ee[l]&&(i=l),s&&(ee[l]=s,i=l);var c=t.split("-");if(!i&&c.length>1)return r(c[0])}else{var u=t.name;ee[u]=t,i=u}return!n&&i&&(xe=i),i||!n&&xe},I=function(t,s){if(Re(t))return t.clone();var n=typeof s=="object"?s:{};return n.date=t,n.args=arguments,new we(n)},vn=function(t,s){return I(t,{locale:s.$L,utc:s.$u,x:s.$x,$offset:s.$offset})},z=bn;z.l=Se,z.i=Re,z.w=vn;var jn=function(t){var s=t.date,n=t.utc;if(s===null)return new Date(NaN);if(z.u(s))return new Date;if(s instanceof Date)return new Date(s);if(typeof s=="string"&&!/Z$/i.test(s)){var i=s.match(cn);if(i){var l=i[2]-1||0,c=(i[7]||"0").substring(0,3);return n?new Date(Date.UTC(i[1],l,i[3]||1,i[4]||0,i[5]||0,i[6]||0,c)):new Date(i[1],l,i[3]||1,i[4]||0,i[5]||0,i[6]||0,c)}}return new Date(s)},we=function(){function r(s){this.$L=Se(s.locale,null,!0),this.parse(s)}var t=r.prototype;return t.parse=function(n){this.$d=jn(n),this.$x=n.x||{},this.init()},t.init=function(){var n=this.$d;this.$y=n.getFullYear(),this.$M=n.getMonth(),this.$D=n.getDate(),this.$W=n.getDay(),this.$H=n.getHours(),this.$m=n.getMinutes(),this.$s=n.getSeconds(),this.$ms=n.getMilliseconds()},t.$utils=function(){return z},t.isValid=function(){return this.$d.toString()!==ot},t.isSame=function(n,i){var l=I(n);return this.startOf(i)<=l&&l<=this.endOf(i)},t.isAfter=function(n,i){return I(n)<this.startOf(i)},t.isBefore=function(n,i){return this.endOf(i)<I(n)},t.$g=function(n,i,l){return z.u(n)?this[i]:this.set(l,n)},t.unix=function(){return Math.floor(this.valueOf()/1e3)},t.valueOf=function(){return this.$d.getTime()},t.startOf=function(n,i){var l=this,c=z.u(i)?!0:i,u=z.p(n),d=function(k,D){var L=z.w(l.$u?Date.UTC(l.$y,D,k):new Date(l.$y,D,k),l);return c?L:L.endOf(Q)},f=function(k,D){var L=[0,0,0,0],Z=[23,59,59,999];return z.w(l.toDate()[k].apply(l.toDate("s"),(c?L:Z).slice(D)),l)},h=this.$W,j=this.$M,b=this.$D,C="set"+(this.$u?"UTC":"");switch(u){case J:return c?d(1,0):d(31,11);case U:return c?d(1,j):d(0,j+1);case Te:{var q=this.$locale().weekStart||0,Y=(h<q?h+7:h)-q;return d(c?b-Y:b+(6-Y),j)}case Q:case le:return f(C+"Hours",0);case oe:return f(C+"Minutes",1);case ie:return f(C+"Seconds",2);case se:return f(C+"Milliseconds",3);default:return this.clone()}},t.endOf=function(n){return this.startOf(n,!1)},t.$set=function(n,i){var l,c=z.p(n),u="set"+(this.$u?"UTC":""),d=(l={},l[Q]=u+"Date",l[le]=u+"Date",l[U]=u+"Month",l[J]=u+"FullYear",l[oe]=u+"Hours",l[ie]=u+"Minutes",l[se]=u+"Seconds",l[Me]=u+"Milliseconds",l)[c],f=c===Q?this.$D+(i-this.$W):i;if(c===U||c===J){var h=this.clone().set(le,1);h.$d[d](f),h.init(),this.$d=h.set(le,Math.min(this.$D,h.daysInMonth())).$d}else d&&this.$d[d](f);return this.init(),this},t.set=function(n,i){return this.clone().$set(n,i)},t.get=function(n){return this[z.p(n)]()},t.add=function(n,i){var l=this,c;n=Number(n);var u=z.p(i),d=function(b){var C=I(l);return z.w(C.date(C.date()+Math.round(b*n)),l)};if(u===U)return this.set(U,this.$M+n);if(u===J)return this.set(J,this.$y+n);if(u===Q)return d(1);if(u===Te)return d(7);var f=(c={},c[ie]=$e,c[oe]=st,c[se]=re,c)[u]||1,h=this.$d.getTime()+n*f;return z.w(h,this)},t.subtract=function(n,i){return this.add(n*-1,i)},t.format=function(n){var i=this,l=this.$locale();if(!this.isValid())return l.invalidDate||ot;var c=n||un,u=z.z(this),d=this.$H,f=this.$m,h=this.$M,j=l.weekdays,b=l.months,C=l.meridiem,q=function(L,Z,ce,ke){return L&&(L[Z]||L(i,c))||ce[Z].slice(0,ke)},Y=function(L){return z.s(d%12||12,L,"0")},X=C||function(D,L,Z){var ce=D<12?"AM":"PM";return Z?ce.toLowerCase():ce},k=function(L){switch(L){case"YY":return String(i.$y).slice(-2);case"YYYY":return z.s(i.$y,4,"0");case"M":return h+1;case"MM":return z.s(h+1,2,"0");case"MMM":return q(l.monthsShort,h,b,3);case"MMMM":return q(b,h);case"D":return i.$D;case"DD":return z.s(i.$D,2,"0");case"d":return String(i.$W);case"dd":return q(l.weekdaysMin,i.$W,j,2);case"ddd":return q(l.weekdaysShort,i.$W,j,3);case"dddd":return j[i.$W];case"H":return String(d);case"HH":return z.s(d,2,"0");case"h":return Y(1);case"hh":return Y(2);case"a":return X(d,f,!0);case"A":return X(d,f,!1);case"m":return String(f);case"mm":return z.s(f,2,"0");case"s":return String(i.$s);case"ss":return z.s(i.$s,2,"0");case"SSS":return z.s(i.$ms,3,"0");case"Z":return u}return null};return c.replace(dn,function(D,L){return L||k(D)||u.replace(":","")})},t.utcOffset=function(){return-Math.round(this.$d.getTimezoneOffset()/15)*15},t.diff=function(n,i,l){var c=this,u=z.p(i),d=I(n),f=(d.utcOffset()-this.utcOffset())*$e,h=this-d,j=function(){return z.m(c,d)},b;switch(u){case J:b=j()/12;break;case U:b=j();break;case it:b=j()/3;break;case Te:b=(h-f)/ln;break;case Q:b=(h-f)/on;break;case oe:b=h/st;break;case ie:b=h/$e;break;case se:b=h/re;break;default:b=h;break}return l?b:z.a(b)},t.daysInMonth=function(){return this.endOf(U).$D},t.$locale=function(){return ee[this.$L]},t.locale=function(n,i){if(!n)return this.$L;var l=this.clone(),c=Se(n,i,!0);return c&&(l.$L=c),l},t.clone=function(){return z.w(this.$d,this)},t.toDate=function(){return new Date(this.valueOf())},t.toJSON=function(){return this.isValid()?this.toISOString():null},t.toISOString=function(){return this.$d.toISOString()},t.toString=function(){return this.$d.toUTCString()},r}(),lt=we.prototype;I.prototype=lt,[["$ms",Me],["$s",se],["$m",ie],["$H",oe],["$W",Q],["$M",U],["$y",J],["$D",le]].forEach(function(r){lt[r[1]]=function(t){return this.$g(t,r[0],r[1])}}),I.extend=function(r,t){return r.$i||(r(t,we,I),r.$i=!0),I},I.locale=Se,I.isDayjs=Re,I.unix=function(r){return I(r*1e3)},I.en=ee[xe],I.Ls=ee,I.p={};const R={datasource:an,account:tn,role:rn,api_key:nn,sql_snippet:{list:async({pagination:r},t)=>{const s=await O.post(t)("/sql_snippet/list",{sort:[{field:"update_time",order:"DESC"}],pagination:r},{});return s.data.forEach(n=>{n.create_time=I(n.create_time).format("YYYY-MM-DD HH:mm:ss"),n.update_time=I(n.update_time).format("YYYY-MM-DD HH:mm:ss")}),s},get:async(r,t)=>await O.post(t)("/sql_snippet/get",{id:r},{}),create:async(r,t)=>await O.post(t)("/sql_snippet/create",r,{}),update:async(r,t)=>await O.put(t)("/sql_snippet/update",r,{}),delete:async(r,t)=>O.post(t)("/sql_snippet/delete",{id:r},{})}},V={size:"sm",spacing:"md",button:{size:"xs"}};function _n({styles:r=V}){return e.jsx(o.Box,{mx:"auto",children:e.jsx(o.Alert,{mt:r.spacing,icon:e.jsx(A.IconAlertCircle,{size:16}),children:e.jsxs(w.Trans,{i18nKey:"datasource.db.permission_tip",children:["Only ",e.jsx("b",{children:"SELECT"})," privilege is needed."]})})})}const ut=({value:r,onChange:t,height:s="200px",defaultLanguage:n="sql"})=>{const i=c=>{console.log("changing"),t==null||t(c??"")},l=!t;return e.jsx(fe,{className:"minimal-monaco-editor",height:s,defaultLanguage:n,value:r,onChange:l?void 0:i,theme:"vs-dark",options:{lineNumbers:"off",folding:!1,lineDecorationsWidth:20,lineNumbersMinChars:0,wordWrap:"on",minimap:{enabled:!1},readOnly:l||!t}})};function W({size:r,disabled:t}){const{t:s}=w.useTranslation();return e.jsx(o.Button,{type:"submit",color:"green",leftSection:e.jsx(A.IconDeviceFloppy,{size:16}),size:r,disabled:t,children:s("common.actions.submit")})}const Tn={translation:{datasource:{label:"Data Source",add:"Add a data source",edit:"Edit data source",connection_info:"Connection Info",db:{host:"Host",port:"Port",username:"Username",password:"Password",database:"Database",permission_tip:"Only <1>SELECT</1> privilege is needed."},cant_edit:{db:"Only HTTP datasources can be edited",preset:"This is a preset datasource, it can not be changed"},delete:{title:"Delete this data source?",hint:"This action won't affect your database or HTTP service.",cant_delete_preset:"This is a preset datasource, it can not be deleted"},http:{base_url:"Base URL",processing:{pre:{label:"Pre processing of queries",description:"This function will run before sending the request (for scenarios like encryption)"},post:{label:"Post processing of queries",description:"This function will run after getting a response (for scenarios like decryption)"}}},state:{adding:"Adding data source...",added:"Data source is added",updating:"Updating data source...",updated:"Data source is updated",deleting:"Deleting data source...",deleted:"Data source [{{name}}] is deleted"}},account:{label:"Account",add:"Add an account",edit:"Edit account",editing_xx:"Editing account [{{name}}]",username:"Username",email:"Email",password:"Password",password_hint:"Password must be at least 8 characters long",new_password:"New password",reset_password:"Reset password",state:{adding:"Adding account...",added:"Account is added",updating:"Updating account...",updated:"Account is updated",deleting:"Deleting account...",deleted:"Account [{{name}}] is deleted",logging_in:"Logging in...",logged_in:"Logged in"},delete:"Delete this account?"},global_sql_snippet:{label:"Global SQL Snippet",add:"Add a snippet",edit:"Edit snippet",content:"Content",description:"Global SQL Snippets are shared among dashboards",state:{adding:"Adding snippet...",added:"Snippet is added",updating:"Updating snippet...",updated:"Snippet is updated",deleting:"Deleting snippet...",deleted:"Snippet [{{name}}] is deleted"},delete:"Delete this snippet?"},api_key:{label:"API Key",add:"Add an API Key",edit:"Edit API key",app_id:"APP ID",app_secret:"APP Secret",state:{adding:"Adding API key...",added:"API key is added",updating:"Updating API key...",updated:"API Key is updated",deleting:"Deleting API key...",deleted:"API key [{{name}}] is deleted"},save:{title:"API Key is generated",warn:"Make sure you save it - you won't be able to access it again.",saved:"I've saved this API Key"},delete:"Delete this key?"},role:{label:"Role"},common:{type:"Type",name:"Name",name_placeholder:"A unique name",created_at:"Created At",updated_at:"Updated At",state:{pending:"Pending",successful:"Successful",failed:"Failed"},action:"Action",actions:{edit:"Edit",delete:"Delete",submit:"Submit",reset_to_default:"Reset to default",cancel:"Cancel",save:"Save",confirm:"Confirm"}}}},Sn={translation:{datasource:{label:"数据源",add:"添加数据源",edit:"编辑数据源",connection_info:"连接信息",db:{host:"主机(host)",port:"端口(port)",username:"用户名(username)",password:"密码(password)",database:"数据库(database)",permission_tip:"只需具备 <1>SELECT</1> 权限"},cant_edit:{db:"只有HTTP数据源可以编辑",preset:"这是预设数据源,不可编辑"},delete:{title:"删除这个数据源?",hint:"此操作不会影响您的数据库或HTTP服务",cant_delete_preset:"这是预设数据源,不可删除"},http:{base_url:"访问地址",processing:{pre:{label:"查询请求预处理",description:"此函数在请求发起前执行(例如加密场景)"},post:{label:"查询请求后处理",description:"此函数在请求获得响应后执行(例如解密场景)"}}},state:{adding:"正在添加数据源...",added:"数据源已添加",updating:"正在更新数据源...",updated:"数据源已更新",deleting:"正在删除数据源...",deleted:'数据源"{{name}}"已删除'}},account:{label:"账户",add:"添加账户",edit:"编辑账户",editing_xx:'正在编辑账户 "{{name}}"',username:"用户名",email:"邮箱",password:"密码",password_hint:"密码得至少包含8个字符",new_password:"新密码",reset_password:"重置密码",state:{adding:"正在添加账户...",added:"账户已添加",updating:"正在更新账户...",updated:"账户已更新",deleting:"正在删除账户...",deleted:'账户"{{name}}"已删除',logging_in:"正在登录...",logged_in:"已登录"},delete:"删除这个账户?"},global_sql_snippet:{label:"全局SQL片段",add:"添加片段",edit:"编辑片段",content:"SQL片段内容",description:"在制作任何看板时,既可以制订该看板自己的SQL片段,也可以使用这里的全局SQL片段",state:{adding:"正在添加片段...",added:"片段已添加",updating:"正在更新片段...",updated:"片段已更新",deleting:"正在删除片段...",deleted:'片段"{{name}}"已删除'},delete:"删除这个片段?"},api_key:{label:"API令牌",add:"添加令牌",edit:"编辑令牌",app_id:"应用ID",app_secret:"应用密钥",state:{adding:"正在添加令牌...",added:"令牌已添加",updating:"正在更新令牌...",updated:"令牌已更新",deleting:"正在删除令牌...",deleted:'令牌"{{name}}"已删除'},save:{title:"API令牌已生成",warn:"此信息只出现一次,请务必保存",saved:"我已保存"},delete:"删除这个片段?"},role:{label:"角色"},common:{type:"类型",name:"名称",name_placeholder:"名称须唯一",created_at:"创建时间",updated_at:"更新时间",state:{pending:"处理中",successful:"成功",failed:"失败"},action:"动作",actions:{edit:"编辑",delete:"删除",submit:"提交",reset_to_default:"还原为默认值",cancel:"取消",save:"保存",confirm:"确认"}}}},Le=Gt.createInstance({debug:!1,fallbackLng:"en",interpolation:{escapeValue:!1},resources:{en:Tn,zh:Sn}}).use(Wt).use(w.initReactI18next);Le.init();function wn({lang:r,children:t}){return P.useEffect(()=>{Le.changeLanguage(r)},[r]),e.jsx(w.I18nextProvider,{i18n:Le,children:t})}const yn=r=>r.replace(/([^:])(\/\/+)/g,"$1/");function Cn(r){P.useEffect(()=>{if(fe.loader.__getMonacoInstance())return;console.log("loading monaco for @devtable/settings-form");const s=yn(r);fe.loader.config({paths:{vs:s}}),fe.loader.init().then(n=>console.log("monaco instance:",n))},[])}function be(r,t){const s=n=>{const{lang:i,config:l,...c}=n;return tt(l),Cn(l.monacoPath),e.jsx(P.Suspense,{fallback:e.jsx(o.Loader,{color:"gray"}),children:e.jsx(wn,{lang:i,children:e.jsx(t,{...c})})})};return s.displayName=`withEntry(${r})`,s}function Dn({submit:r,styles:t=V,type:s}){const{t:n}=w.useTranslation(),{control:i,setValue:l,handleSubmit:c}=v.useForm({defaultValues:{type:s,key:"",config:{host:"",port:5432,username:"",password:"",database:""}}});return P.useEffect(()=>{l("type",s)},[l,s]),e.jsx(o.Box,{mx:"auto",children:e.jsxs("form",{onSubmit:c(r),children:[e.jsx(v.Controller,{name:"key",control:i,render:({field:u})=>e.jsx(o.TextInput,{mb:t.spacing,size:t.size,required:!0,label:n("common.name"),placeholder:n("common.name_placeholder"),...u})}),e.jsx(o.Divider,{label:n("datasource.connection_info"),labelPosition:"center"}),e.jsxs(o.Group,{grow:!0,children:[e.jsx(v.Controller,{name:"config.host",control:i,render:({field:u})=>e.jsx(o.TextInput,{mb:t.spacing,size:t.size,required:!0,label:n("datasource.db.host"),sx:{flexGrow:1},...u})}),e.jsx(v.Controller,{name:"config.port",control:i,render:({field:u})=>e.jsx(o.NumberInput,{mb:t.spacing,size:t.size,required:!0,label:n("datasource.db.port"),hideControls:!0,sx:{width:"8em"},...u})})]}),e.jsx(v.Controller,{name:"config.username",control:i,render:({field:u})=>e.jsx(o.TextInput,{mb:t.spacing,size:t.size,required:!0,label:n("datasource.db.username"),...u})}),e.jsx(v.Controller,{name:"config.password",control:i,render:({field:u})=>e.jsx(o.PasswordInput,{mb:t.spacing,size:t.size,required:!0,label:n("datasource.db.password"),...u})}),e.jsx(v.Controller,{name:"config.database",control:i,render:({field:u})=>e.jsx(o.TextInput,{mb:t.spacing,size:t.size,required:!0,label:n("datasource.db.database"),...u})}),e.jsx(o.Group,{justify:"flex-end",mt:t.spacing,children:e.jsx(W,{size:t.button.size})})]})})}const zn=({value:r,onChange:t})=>{const s=n=>{n&&t(n)};return e.jsx(o.Box,{sx:{position:"relative"},children:e.jsx(fe,{height:"500px",defaultLanguage:"javascript",value:r,onChange:s,theme:"vs-dark",options:{minimap:{enabled:!1}}})})},ye=P.forwardRef(({value:r,onChange:t,label:s,modalTitle:n,defaultValue:i,styles:l},c)=>{const{t:u}=w.useTranslation(),[d,{setTrue:f,setFalse:h}]=K.useBoolean(),[j,b]=P.useState(r),C=()=>{h(),t(j)},q=()=>{h(),b(r)},Y=()=>{b(i)};return P.useEffect(()=>{b(r)},[r]),e.jsxs(e.Fragment,{children:[e.jsx(o.Button,{color:"grape",variant:"filled",leftSection:e.jsx(A.IconMathFunction,{size:16}),size:l.button.size,onClick:f,sx:{flexGrow:1},children:s}),e.jsx(o.Modal,{size:800,title:n,opened:d,onClose:h,closeOnClickOutside:!1,withCloseButton:!1,children:d&&e.jsxs(o.Stack,{children:[e.jsx(zn,{value:j,onChange:b}),e.jsxs(o.Group,{justify:"space-between",children:[e.jsx(o.Button,{size:l.button.size,onClick:Y,color:"red",leftSection:e.jsx(A.IconRecycle,{size:20}),children:u("common.actions.reset_to_default")}),e.jsxs(o.Group,{justify:"flex-end",children:[e.jsx(o.Button,{size:l.button.size,onClick:q,variant:"subtle",children:u("common.actions.cancel")}),e.jsx(o.Button,{size:l.button.size,color:"green",leftSection:e.jsx(A.IconDeviceFloppy,{size:16}),onClick:C,children:u("common.actions.save")})]})]})]})})]})}),Ce={pre:["function pre_process({ method, url, params, headers, data }, utils) {"," // your code goes here"," return { method, url, params, headers, data }","}"].join(`
32
+ <%s key={someKey} {...props} />`,Ke,ne,za,ne),Bt[ne+Ke]=!0}}return a===n?Sa(M):Ta(M),M}}function wa(a,p,m){return Ut(a,p,m,!0)}function ya(a,p,m){return Ut(a,p,m,!1)}var Ca=ya,Da=wa;he.Fragment=n,he.jsx=Ca,he.jsxs=Da}()),he}process.env.NODE_ENV==="production"?Oe.exports=Ht():Oe.exports=Xt();var e=Oe.exports;function Zt(r){r=r||{};const t=Object.keys(r).sort(),s=[];for(let n=0;n<t.length;n++){const i=t[n];if(i!="authentication"&&r[i])s.push(t[n]+"="+(typeof r[i]=="object"?JSON.stringify(r[i]):r[i]));else{const l=Object.keys(r[i]).sort();for(let c=0;c<l.length;c++){const u=l[c];u!="sign"&&r[i][u]&&s.push(l[c]+"="+(typeof r[i][u]=="object"?JSON.stringify(r[i][u]):r[i][u]))}}}return s.sort().join("&")}function en(r,t){let s=Zt(r);return s+="&key="+t,Jt.MD5(s).toString().toUpperCase()}class Xe{constructor(){this.type="default_api_client",this.baseURL="http://localhost:31200",this.app_id="",this.app_secret=""}getAuthentication(t){if(!this.app_id||!this.app_secret)return;const s=new Date().getTime().toString();return{app_id:this.app_id,nonce_str:s,sign:en({app_id:this.app_id,nonce_str:s,...t},this.app_secret)}}getRequest(t,s){return(n,i,l,c)=>{const u=this.buildHeader(l),d=this.buildAxiosConfig(t,n,i,l,u,s);return Qe(d).then(f=>c?f:f.data).catch(f=>{if(Qe.isCancel(f))return Promise.reject(f);const h=f,b=Vt.get(h,"response.data.detail.message",h.message);return Promise.reject(new Error(b))})}}get(t){return this.getRequest("GET",t)}post(t){return this.getRequest("POST",t)}put(t){return this.getRequest("PUT",t)}buildAxiosConfig(t,s,n,i,l,c){const u={baseURL:this.baseURL,method:t,url:s,params:t==="GET"?n:i.params,headers:l,signal:c};return["POST","PUT"].includes(t)&&(u.data=i.string?JSON.stringify(n):n,u.data.authentication=this.getAuthentication(u.data)),u}buildHeader(t){const s=window.localStorage.getItem("token");return{"X-Requested-With":"XMLHttpRequest","Content-Type":t.string?"application/x-www-form-urlencoded":"application/json",authorization:s?`bearer ${s}`:"",...t.headers}}}class Ze{constructor(t){this.implementation=t}getRequest(t,s){return this.implementation.getRequest(t,s)}get(t){return this.getRequest("GET",t)}post(t){return this.getRequest("POST",t)}put(t){return this.getRequest("PUT",t)}}const ge=new Xe,et=new Ze(ge),O=et;function tt(r){ge.baseURL!==r.apiBaseURL&&(ge.baseURL=r.apiBaseURL),r.app_id&&(ge.app_id=r.app_id),r.app_secret&&(ge.app_secret=r.app_secret)}const tn={login:async(r,t)=>{const s={name:r,password:t};return await O.post()("/account/login",s,{})},list:async()=>await O.post()("/account/list",{filter:{},sort:[{field:"name",order:"ASC"}],pagination:{page:1,pagesize:100}},{}),get:async()=>await O.get()("/account/get",{},{}),update:async(r,t)=>{const s={name:r.trim(),email:t.trim()};return await O.put()("/account/update",s,{})},changepassword:async(r,t)=>{const s={old_password:r.trim(),new_password:t.trim()};return await O.post()("/account/changepassword",s,{})},create:async(r,t,s,n)=>await O.post()("/account/create",{name:r.trim(),email:t.trim(),password:s.trim(),role_id:n},{}),edit:async r=>(r.reset_password||(r.new_password=void 0),await O.put()("/account/edit",r,{})),delete:async r=>{if(r)return O.post()("/account/delete",{id:r},{})}},nn={list:async()=>await O.post()("/api/key/list",{filter:{search:""},sort:[{field:"name",order:"ASC"}],pagination:{page:1,pagesize:100}},{}),create:async(r,t)=>O.post()("/api/key/create",{name:r,role_id:t},{}),delete:async r=>{if(r)return O.post()("/api/key/delete",{id:r},{})}},an={list:async()=>await O.post()("/datasource/list",{filter:{},sort:[{field:"create_time",order:"ASC"}],pagination:{page:1,pagesize:100}},{}),create:async(r,t,s)=>await O.post()("/datasource/create",{type:r,key:t,config:s},{}),update:async(r,t)=>await O.put()("/datasource/update",{id:r,config:t},{}),delete:async r=>{await O.post()("/datasource/delete",{id:r},{})}},rn={list:async()=>await O.get()("/role/list",{},{})};var nt=60,at=nt*60,rt=at*24,sn=rt*7,re=1e3,$e=nt*re,st=at*re,on=rt*re,ln=sn*re,Me="millisecond",se="second",ie="minute",oe="hour",Q="day",Te="week",U="month",it="quarter",J="year",le="date",un="YYYY-MM-DDTHH:mm:ssZ",ot="Invalid Date",cn=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,dn=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g;const pn={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(t){var s=["th","st","nd","rd"],n=t%100;return"["+t+(s[(n-20)%10]||s[n]||s[0])+"]"}};var Ie=function(t,s,n){var i=String(t);return!i||i.length>=s?t:""+Array(s+1-i.length).join(n)+t},fn=function(t){var s=-t.utcOffset(),n=Math.abs(s),i=Math.floor(n/60),l=n%60;return(s<=0?"+":"-")+Ie(i,2,"0")+":"+Ie(l,2,"0")},mn=function r(t,s){if(t.date()<s.date())return-r(s,t);var n=(s.year()-t.year())*12+(s.month()-t.month()),i=t.clone().add(n,U),l=s-i<0,c=t.clone().add(n+(l?-1:1),U);return+(-(n+(s-i)/(l?i-c:c-i))||0)},hn=function(t){return t<0?Math.ceil(t)||0:Math.floor(t)},gn=function(t){var s={M:U,y:J,w:Te,d:Q,D:le,h:oe,m:ie,s:se,ms:Me,Q:it};return s[t]||String(t||"").toLowerCase().replace(/s$/,"")},xn=function(t){return t===void 0};const bn={s:Ie,z:fn,m:mn,a:hn,p:gn,u:xn};var xe="en",ee={};ee[xe]=pn;var Re=function(t){return t instanceof we},Se=function r(t,s,n){var i;if(!t)return xe;if(typeof t=="string"){var l=t.toLowerCase();ee[l]&&(i=l),s&&(ee[l]=s,i=l);var c=t.split("-");if(!i&&c.length>1)return r(c[0])}else{var u=t.name;ee[u]=t,i=u}return!n&&i&&(xe=i),i||!n&&xe},I=function(t,s){if(Re(t))return t.clone();var n=typeof s=="object"?s:{};return n.date=t,n.args=arguments,new we(n)},vn=function(t,s){return I(t,{locale:s.$L,utc:s.$u,x:s.$x,$offset:s.$offset})},z=bn;z.l=Se,z.i=Re,z.w=vn;var jn=function(t){var s=t.date,n=t.utc;if(s===null)return new Date(NaN);if(z.u(s))return new Date;if(s instanceof Date)return new Date(s);if(typeof s=="string"&&!/Z$/i.test(s)){var i=s.match(cn);if(i){var l=i[2]-1||0,c=(i[7]||"0").substring(0,3);return n?new Date(Date.UTC(i[1],l,i[3]||1,i[4]||0,i[5]||0,i[6]||0,c)):new Date(i[1],l,i[3]||1,i[4]||0,i[5]||0,i[6]||0,c)}}return new Date(s)},we=function(){function r(s){this.$L=Se(s.locale,null,!0),this.parse(s)}var t=r.prototype;return t.parse=function(n){this.$d=jn(n),this.$x=n.x||{},this.init()},t.init=function(){var n=this.$d;this.$y=n.getFullYear(),this.$M=n.getMonth(),this.$D=n.getDate(),this.$W=n.getDay(),this.$H=n.getHours(),this.$m=n.getMinutes(),this.$s=n.getSeconds(),this.$ms=n.getMilliseconds()},t.$utils=function(){return z},t.isValid=function(){return this.$d.toString()!==ot},t.isSame=function(n,i){var l=I(n);return this.startOf(i)<=l&&l<=this.endOf(i)},t.isAfter=function(n,i){return I(n)<this.startOf(i)},t.isBefore=function(n,i){return this.endOf(i)<I(n)},t.$g=function(n,i,l){return z.u(n)?this[i]:this.set(l,n)},t.unix=function(){return Math.floor(this.valueOf()/1e3)},t.valueOf=function(){return this.$d.getTime()},t.startOf=function(n,i){var l=this,c=z.u(i)?!0:i,u=z.p(n),d=function(k,D){var L=z.w(l.$u?Date.UTC(l.$y,D,k):new Date(l.$y,D,k),l);return c?L:L.endOf(Q)},f=function(k,D){var L=[0,0,0,0],Z=[23,59,59,999];return z.w(l.toDate()[k].apply(l.toDate("s"),(c?L:Z).slice(D)),l)},h=this.$W,b=this.$M,v=this.$D,C="set"+(this.$u?"UTC":"");switch(u){case J:return c?d(1,0):d(31,11);case U:return c?d(1,b):d(0,b+1);case Te:{var q=this.$locale().weekStart||0,Y=(h<q?h+7:h)-q;return d(c?v-Y:v+(6-Y),b)}case Q:case le:return f(C+"Hours",0);case oe:return f(C+"Minutes",1);case ie:return f(C+"Seconds",2);case se:return f(C+"Milliseconds",3);default:return this.clone()}},t.endOf=function(n){return this.startOf(n,!1)},t.$set=function(n,i){var l,c=z.p(n),u="set"+(this.$u?"UTC":""),d=(l={},l[Q]=u+"Date",l[le]=u+"Date",l[U]=u+"Month",l[J]=u+"FullYear",l[oe]=u+"Hours",l[ie]=u+"Minutes",l[se]=u+"Seconds",l[Me]=u+"Milliseconds",l)[c],f=c===Q?this.$D+(i-this.$W):i;if(c===U||c===J){var h=this.clone().set(le,1);h.$d[d](f),h.init(),this.$d=h.set(le,Math.min(this.$D,h.daysInMonth())).$d}else d&&this.$d[d](f);return this.init(),this},t.set=function(n,i){return this.clone().$set(n,i)},t.get=function(n){return this[z.p(n)]()},t.add=function(n,i){var l=this,c;n=Number(n);var u=z.p(i),d=function(v){var C=I(l);return z.w(C.date(C.date()+Math.round(v*n)),l)};if(u===U)return this.set(U,this.$M+n);if(u===J)return this.set(J,this.$y+n);if(u===Q)return d(1);if(u===Te)return d(7);var f=(c={},c[ie]=$e,c[oe]=st,c[se]=re,c)[u]||1,h=this.$d.getTime()+n*f;return z.w(h,this)},t.subtract=function(n,i){return this.add(n*-1,i)},t.format=function(n){var i=this,l=this.$locale();if(!this.isValid())return l.invalidDate||ot;var c=n||un,u=z.z(this),d=this.$H,f=this.$m,h=this.$M,b=l.weekdays,v=l.months,C=l.meridiem,q=function(L,Z,ce,ke){return L&&(L[Z]||L(i,c))||ce[Z].slice(0,ke)},Y=function(L){return z.s(d%12||12,L,"0")},X=C||function(D,L,Z){var ce=D<12?"AM":"PM";return Z?ce.toLowerCase():ce},k=function(L){switch(L){case"YY":return String(i.$y).slice(-2);case"YYYY":return z.s(i.$y,4,"0");case"M":return h+1;case"MM":return z.s(h+1,2,"0");case"MMM":return q(l.monthsShort,h,v,3);case"MMMM":return q(v,h);case"D":return i.$D;case"DD":return z.s(i.$D,2,"0");case"d":return String(i.$W);case"dd":return q(l.weekdaysMin,i.$W,b,2);case"ddd":return q(l.weekdaysShort,i.$W,b,3);case"dddd":return b[i.$W];case"H":return String(d);case"HH":return z.s(d,2,"0");case"h":return Y(1);case"hh":return Y(2);case"a":return X(d,f,!0);case"A":return X(d,f,!1);case"m":return String(f);case"mm":return z.s(f,2,"0");case"s":return String(i.$s);case"ss":return z.s(i.$s,2,"0");case"SSS":return z.s(i.$ms,3,"0");case"Z":return u}return null};return c.replace(dn,function(D,L){return L||k(D)||u.replace(":","")})},t.utcOffset=function(){return-Math.round(this.$d.getTimezoneOffset()/15)*15},t.diff=function(n,i,l){var c=this,u=z.p(i),d=I(n),f=(d.utcOffset()-this.utcOffset())*$e,h=this-d,b=function(){return z.m(c,d)},v;switch(u){case J:v=b()/12;break;case U:v=b();break;case it:v=b()/3;break;case Te:v=(h-f)/ln;break;case Q:v=(h-f)/on;break;case oe:v=h/st;break;case ie:v=h/$e;break;case se:v=h/re;break;default:v=h;break}return l?v:z.a(v)},t.daysInMonth=function(){return this.endOf(U).$D},t.$locale=function(){return ee[this.$L]},t.locale=function(n,i){if(!n)return this.$L;var l=this.clone(),c=Se(n,i,!0);return c&&(l.$L=c),l},t.clone=function(){return z.w(this.$d,this)},t.toDate=function(){return new Date(this.valueOf())},t.toJSON=function(){return this.isValid()?this.toISOString():null},t.toISOString=function(){return this.$d.toISOString()},t.toString=function(){return this.$d.toUTCString()},r}(),lt=we.prototype;I.prototype=lt,[["$ms",Me],["$s",se],["$m",ie],["$H",oe],["$W",Q],["$M",U],["$y",J],["$D",le]].forEach(function(r){lt[r[1]]=function(t){return this.$g(t,r[0],r[1])}}),I.extend=function(r,t){return r.$i||(r(t,we,I),r.$i=!0),I},I.locale=Se,I.isDayjs=Re,I.unix=function(r){return I(r*1e3)},I.en=ee[xe],I.Ls=ee,I.p={};const R={datasource:an,account:tn,role:rn,api_key:nn,sql_snippet:{list:async({pagination:r},t)=>{const s=await O.post(t)("/sql_snippet/list",{sort:[{field:"update_time",order:"DESC"}],pagination:r},{});return s.data.forEach(n=>{n.create_time=I(n.create_time).format("YYYY-MM-DD HH:mm:ss"),n.update_time=I(n.update_time).format("YYYY-MM-DD HH:mm:ss")}),s},get:async(r,t)=>await O.post(t)("/sql_snippet/get",{id:r},{}),create:async(r,t)=>await O.post(t)("/sql_snippet/create",r,{}),update:async(r,t)=>await O.put(t)("/sql_snippet/update",r,{}),delete:async(r,t)=>O.post(t)("/sql_snippet/delete",{id:r},{})}},V={size:"sm",spacing:"md",button:{size:"xs"}};function _n({styles:r=V}){return e.jsx(o.Box,{mx:"auto",children:e.jsx(o.Alert,{mt:r.spacing,icon:e.jsx(A.IconAlertCircle,{size:16}),children:e.jsxs(w.Trans,{i18nKey:"datasource.db.permission_tip",children:["Only ",e.jsx("b",{children:"SELECT"})," privilege is needed."]})})})}const ut=({value:r,onChange:t,height:s="200px",defaultLanguage:n="sql"})=>{const i=c=>{console.log("changing"),t==null||t(c??"")},l=!t;return e.jsx(fe,{className:"minimal-monaco-editor",height:s,defaultLanguage:n,value:r,onChange:l?void 0:i,theme:"vs-dark",options:{lineNumbers:"off",folding:!1,lineDecorationsWidth:20,lineNumbersMinChars:0,wordWrap:"on",minimap:{enabled:!1},readOnly:l||!t}})};function W({size:r,disabled:t}){const{t:s}=w.useTranslation();return e.jsx(o.Button,{type:"submit",color:"green",leftSection:e.jsx(A.IconDeviceFloppy,{size:16}),size:r,disabled:t,children:s("common.actions.submit")})}const Tn={translation:{datasource:{label:"Data Source",add:"Add a data source",edit:"Edit data source",connection_info:"Connection Info",db:{host:"Host",port:"Port",username:"Username",password:"Password",database:"Database",permission_tip:"Only <1>SELECT</1> privilege is needed."},cant_edit:{db:"Only HTTP datasources can be edited",preset:"This is a preset datasource, it can not be changed"},delete:{title:"Delete this data source?",hint:"This action won't affect your database or HTTP service.",cant_delete_preset:"This is a preset datasource, it can not be deleted"},http:{base_url:"Base URL",processing:{pre:{label:"Pre processing of queries",description:"This function will run before sending the request (for scenarios like encryption)"},post:{label:"Post processing of queries",description:"This function will run after getting a response (for scenarios like decryption)"}}},state:{adding:"Adding data source...",added:"Data source is added",updating:"Updating data source...",updated:"Data source is updated",deleting:"Deleting data source...",deleted:"Data source [{{name}}] is deleted"}},account:{label:"Account",add:"Add an account",edit:"Edit account",editing_xx:"Editing account [{{name}}]",username:"Username",email:"Email",password:"Password",password_hint:"Password must be at least 8 characters long",new_password:"New password",reset_password:"Reset password",state:{adding:"Adding account...",added:"Account is added",updating:"Updating account...",updated:"Account is updated",deleting:"Deleting account...",deleted:"Account [{{name}}] is deleted",logging_in:"Logging in...",logged_in:"Logged in"},delete:"Delete this account?"},global_sql_snippet:{label:"Global SQL Snippet",add:"Add a snippet",edit:"Edit snippet",content:"Content",description:"Global SQL Snippets are shared among dashboards",state:{adding:"Adding snippet...",added:"Snippet is added",updating:"Updating snippet...",updated:"Snippet is updated",deleting:"Deleting snippet...",deleted:"Snippet [{{name}}] is deleted"},delete:"Delete this snippet?"},api_key:{label:"API Key",add:"Add an API Key",edit:"Edit API key",app_id:"APP ID",app_secret:"APP Secret",state:{adding:"Adding API key...",added:"API key is added",updating:"Updating API key...",updated:"API Key is updated",deleting:"Deleting API key...",deleted:"API key [{{name}}] is deleted"},save:{title:"API Key is generated",warn:"Make sure you save it - you won't be able to access it again.",saved:"I've saved this API Key"},delete:"Delete this key?"},role:{label:"Role"},common:{type:"Type",name:"Name",name_placeholder:"A unique name",created_at:"Created At",updated_at:"Updated At",state:{pending:"Pending",successful:"Successful",failed:"Failed"},action:"Action",actions:{edit:"Edit",delete:"Delete",submit:"Submit",reset_to_default:"Reset to default",cancel:"Cancel",save:"Save",confirm:"Confirm"}}}},Sn={translation:{datasource:{label:"数据源",add:"添加数据源",edit:"编辑数据源",connection_info:"连接信息",db:{host:"主机(host)",port:"端口(port)",username:"用户名(username)",password:"密码(password)",database:"数据库(database)",permission_tip:"只需具备 <1>SELECT</1> 权限"},cant_edit:{db:"只有HTTP数据源可以编辑",preset:"这是预设数据源,不可编辑"},delete:{title:"删除这个数据源?",hint:"此操作不会影响您的数据库或HTTP服务",cant_delete_preset:"这是预设数据源,不可删除"},http:{base_url:"访问地址",processing:{pre:{label:"查询请求预处理",description:"此函数在请求发起前执行(例如加密场景)"},post:{label:"查询请求后处理",description:"此函数在请求获得响应后执行(例如解密场景)"}}},state:{adding:"正在添加数据源...",added:"数据源已添加",updating:"正在更新数据源...",updated:"数据源已更新",deleting:"正在删除数据源...",deleted:'数据源"{{name}}"已删除'}},account:{label:"账户",add:"添加账户",edit:"编辑账户",editing_xx:'正在编辑账户 "{{name}}"',username:"用户名",email:"邮箱",password:"密码",password_hint:"密码得至少包含8个字符",new_password:"新密码",reset_password:"重置密码",state:{adding:"正在添加账户...",added:"账户已添加",updating:"正在更新账户...",updated:"账户已更新",deleting:"正在删除账户...",deleted:'账户"{{name}}"已删除',logging_in:"正在登录...",logged_in:"已登录"},delete:"删除这个账户?"},global_sql_snippet:{label:"全局SQL片段",add:"添加片段",edit:"编辑片段",content:"SQL片段内容",description:"在制作任何看板时,既可以制订该看板自己的SQL片段,也可以使用这里的全局SQL片段",state:{adding:"正在添加片段...",added:"片段已添加",updating:"正在更新片段...",updated:"片段已更新",deleting:"正在删除片段...",deleted:'片段"{{name}}"已删除'},delete:"删除这个片段?"},api_key:{label:"API令牌",add:"添加令牌",edit:"编辑令牌",app_id:"应用ID",app_secret:"应用密钥",state:{adding:"正在添加令牌...",added:"令牌已添加",updating:"正在更新令牌...",updated:"令牌已更新",deleting:"正在删除令牌...",deleted:'令牌"{{name}}"已删除'},save:{title:"API令牌已生成",warn:"此信息只出现一次,请务必保存",saved:"我已保存"},delete:"删除这个片段?"},role:{label:"角色"},common:{type:"类型",name:"名称",name_placeholder:"名称须唯一",created_at:"创建时间",updated_at:"更新时间",state:{pending:"处理中",successful:"成功",failed:"失败"},action:"动作",actions:{edit:"编辑",delete:"删除",submit:"提交",reset_to_default:"还原为默认值",cancel:"取消",save:"保存",confirm:"确认"}}}},Le=Gt.createInstance({debug:!1,fallbackLng:"en",interpolation:{escapeValue:!1},resources:{en:Tn,zh:Sn}}).use(Wt).use(w.initReactI18next);Le.init();function wn({lang:r,children:t}){return P.useEffect(()=>{Le.changeLanguage(r)},[r]),e.jsx(w.I18nextProvider,{i18n:Le,children:t})}const yn=r=>r.replace(/([^:])(\/\/+)/g,"$1/");function Cn(r){P.useEffect(()=>{if(fe.loader.__getMonacoInstance())return;console.log("loading monaco for @devtable/settings-form");const s=yn(r);fe.loader.config({paths:{vs:s}}),fe.loader.init().then(n=>console.log("monaco instance:",n))},[])}function be(r,t){const s=n=>{const{lang:i,config:l,...c}=n;return tt(l),Cn(l.monacoPath),e.jsx(P.Suspense,{fallback:e.jsx(o.Loader,{color:"gray"}),children:e.jsx(wn,{lang:i,children:e.jsx(t,{...c})})})};return s.displayName=`withEntry(${r})`,s}function Dn({submit:r,styles:t=V,type:s}){const{t:n}=w.useTranslation(),{control:i,setValue:l,handleSubmit:c}=j.useForm({defaultValues:{type:s,key:"",config:{host:"",port:5432,username:"",password:"",database:""}}});return P.useEffect(()=>{l("type",s)},[l,s]),e.jsx(o.Box,{mx:"auto",children:e.jsxs("form",{onSubmit:c(r),children:[e.jsx(j.Controller,{name:"key",control:i,render:({field:u})=>e.jsx(o.TextInput,{mb:t.spacing,size:t.size,required:!0,label:n("common.name"),placeholder:n("common.name_placeholder"),...u})}),e.jsx(o.Divider,{label:n("datasource.connection_info"),labelPosition:"center"}),e.jsxs(o.Group,{grow:!0,children:[e.jsx(j.Controller,{name:"config.host",control:i,render:({field:u})=>e.jsx(o.TextInput,{mb:t.spacing,size:t.size,required:!0,label:n("datasource.db.host"),sx:{flexGrow:1},...u})}),e.jsx(j.Controller,{name:"config.port",control:i,render:({field:u})=>e.jsx(o.NumberInput,{mb:t.spacing,size:t.size,required:!0,label:n("datasource.db.port"),hideControls:!0,sx:{width:"8em"},...u})})]}),e.jsx(j.Controller,{name:"config.username",control:i,render:({field:u})=>e.jsx(o.TextInput,{mb:t.spacing,size:t.size,required:!0,label:n("datasource.db.username"),...u})}),e.jsx(j.Controller,{name:"config.password",control:i,render:({field:u})=>e.jsx(o.PasswordInput,{mb:t.spacing,size:t.size,required:!0,label:n("datasource.db.password"),...u})}),e.jsx(j.Controller,{name:"config.database",control:i,render:({field:u})=>e.jsx(o.TextInput,{mb:t.spacing,size:t.size,required:!0,label:n("datasource.db.database"),...u})}),e.jsx(o.Group,{justify:"flex-end",mt:t.spacing,children:e.jsx(W,{size:t.button.size})})]})})}const zn=({value:r,onChange:t})=>{const s=n=>{n&&t(n)};return e.jsx(o.Box,{sx:{position:"relative"},children:e.jsx(fe,{height:"500px",defaultLanguage:"javascript",value:r,onChange:s,theme:"vs-dark",options:{minimap:{enabled:!1}}})})},ye=P.forwardRef(({value:r,onChange:t,label:s,modalTitle:n,defaultValue:i,styles:l},c)=>{const{t:u}=w.useTranslation(),[d,{setTrue:f,setFalse:h}]=K.useBoolean(),[b,v]=P.useState(r),C=()=>{h(),t(b)},q=()=>{h(),v(r)},Y=()=>{v(i)};return P.useEffect(()=>{v(r)},[r]),e.jsxs(e.Fragment,{children:[e.jsx(o.Button,{color:"grape",variant:"filled",leftSection:e.jsx(A.IconMathFunction,{size:16}),size:l.button.size,onClick:f,sx:{flexGrow:1},children:s}),e.jsx(o.Modal,{size:800,title:n,opened:d,onClose:h,closeOnClickOutside:!1,withCloseButton:!1,children:d&&e.jsxs(o.Stack,{children:[e.jsx(zn,{value:b,onChange:v}),e.jsxs(o.Group,{justify:"space-between",children:[e.jsx(o.Button,{size:l.button.size,onClick:Y,color:"red",leftSection:e.jsx(A.IconRecycle,{size:20}),children:u("common.actions.reset_to_default")}),e.jsxs(o.Group,{justify:"flex-end",children:[e.jsx(o.Button,{size:l.button.size,onClick:q,variant:"subtle",children:u("common.actions.cancel")}),e.jsx(o.Button,{size:l.button.size,color:"green",leftSection:e.jsx(A.IconDeviceFloppy,{size:16}),onClick:C,children:u("common.actions.save")})]})]})]})})]})}),Ce={pre:["function pre_process({ method, url, params, headers, data }, utils) {"," // your code goes here"," return { method, url, params, headers, data }","}"].join(`
33
33
  `),post:["function post_process(res, utils) {"," // your code goes here"," return data","}"].join(`
34
- `)};function En({submit:r,styles:t=V}){const{t:s}=w.useTranslation(),{control:n,setValue:i,handleSubmit:l}=v.useForm({defaultValues:{type:"http",key:"",config:{host:"",processing:{pre:Ce.pre,post:Ce.post}}}});return e.jsx(o.Box,{mx:"auto",children:e.jsxs("form",{onSubmit:l(r),children:[e.jsx(v.Controller,{name:"key",control:n,render:({field:c})=>e.jsx(o.TextInput,{mb:t.spacing,size:t.size,required:!0,label:s("common.name"),placeholder:s("common.name_placeholder"),...c})}),e.jsx(o.Divider,{label:s("datasource.connection_info"),labelPosition:"center"}),e.jsx(v.Controller,{name:"config.host",control:n,render:({field:c})=>e.jsx(o.TextInput,{mb:t.spacing,size:t.size,label:s("datasource.http.base_url"),sx:{flexGrow:1},...c})}),e.jsxs(o.Group,{grow:!0,children:[e.jsx(v.Controller,{name:"config.processing.pre",control:n,render:({field:c})=>e.jsx(ye,{label:s("datasource.http.processing.pre.label"),modalTitle:s("datasource.http.processing.pre.description"),defaultValue:Ce.pre,...c,styles:t})}),e.jsx(v.Controller,{name:"config.processing.post",control:n,render:({field:c})=>e.jsx(ye,{label:s("datasource.http.processing.post.label"),modalTitle:s("datasource.http.processing.post.description"),defaultValue:Ce.post,...c,styles:t})})]}),e.jsx(o.Group,{justify:"flex-end",mt:t.spacing,children:e.jsx(W,{size:t.button.size})})]})})}function An({postSubmit:r,styles:t=V}){const{t:s}=w.useTranslation(),[n,i]=P.useState("postgresql"),l=async({type:f,key:h,config:j})=>{T.showNotification({id:"for-creating",title:s("common.state.pending"),message:s("datasource.state.adding"),loading:!0,autoClose:!1});try{console.log({type:f,key:h,config:j}),await R.datasource.create(f,h,j),T.updateNotification({id:"for-creating",title:s("common.state.successful"),message:s("datasource.state.added"),color:"green",autoClose:!0}),r()}catch(b){console.error(b),T.updateNotification({id:"for-creating",title:s("common.state.failed"),message:b.message,color:"red",autoClose:!0})}},c=f=>{i(f)},u=n==="postgresql"||n==="mysql",d=n==="http";return e.jsxs(o.Box,{mx:"auto",children:[e.jsx(o.SegmentedControl,{fullWidth:!0,mb:t.spacing,size:t.size,data:[{label:"PostgreSQL",value:"postgresql"},{label:"MySQL",value:"mysql"},{label:"HTTP",value:"http"}],value:n,onChange:c}),u&&e.jsx(_n,{styles:t}),u&&e.jsx(Dn,{submit:l,styles:t,type:n}),d&&e.jsx(En,{submit:l,styles:t})]})}function ct({onSuccess:r,styles:t=V}){const{t:s}=w.useTranslation(),[n,i]=P.useState(!1),l=()=>i(!0),c=()=>i(!1),u=()=>{r(),c()};return e.jsxs(e.Fragment,{children:[e.jsx(o.Modal,{opened:n,onClose:()=>i(!1),title:s("datasource.add"),trapFocus:!0,onDragStart:d=>{d.stopPropagation()},children:e.jsx(An,{postSubmit:u,styles:t})}),e.jsx(o.Button,{size:t.button.size,onClick:l,leftSection:e.jsx(A.IconPlaylistAdd,{size:20}),children:s("datasource.add")})]})}const Pn={http:"HTTP",mysql:"MySQL",postgresql:"PostgreSQL"},On={http:e.jsx(A.IconNetwork,{}),mysql:e.jsx(A.IconBrandMysql,{}),postgresql:e.jsx(A.IconDatabase,{})};function $n({type:r}){return e.jsxs(o.Group,{children:[e.jsx(o.ActionIcon,{variant:"subtle",size:"xs",sx:{transform:"none !important"},children:On[r]}),e.jsx(o.Text,{sx:{cusor:"default",userSelect:"none"},children:Pn[r]})]})}function dt({id:r,name:t,isProtected:s,onSuccess:n,styles:i=V}){const{t:l}=w.useTranslation(),c=ae.useModals(),u=async()=>{r&&(T.showNotification({id:"for-deleting",title:l("common.state.pending"),message:l("datasource.state.deleting"),loading:!0,autoClose:!1}),await R.datasource.delete(r),T.updateNotification({id:"for-deleting",title:l("common.state.successful"),message:l("datasource.state.deleted",{name:t}),color:"green",autoClose:!0}),n())},d=()=>c.openConfirmModal({title:l("datasource.delete.title"),children:e.jsx(o.Text,{size:i.size,children:l("datasource.delete.hint")}),labels:{confirm:l("common.actions.confirm"),cancel:l("common.actions.cancel")},onCancel:()=>console.log("Cancel"),onConfirm:u,cancelProps:{size:i.button.size},confirmProps:{color:"red",size:i.button.size}});return s?e.jsx(o.Tooltip,{withArrow:!0,events:{hover:!0,touch:!1,focus:!1},label:l("datasource.delete.cant_delete_preset"),children:e.jsx(o.Button,{size:i.button.size,color:"gray",variant:"light",leftSection:e.jsx(A.IconLock,{size:16}),sx:{transform:"none !important"},children:l("common.actions.delete")})}):e.jsx(o.Button,{size:i.button.size,color:"red",onClick:d,leftSection:e.jsx(A.IconTrash,{size:16}),children:l("common.actions.delete")})}const pt={pre:["function pre_process({ method, url, params, headers, data }, utils) {"," // your code goes here"," return { method, url, params, headers, data }","}"].join(`
34
+ `)};function En({submit:r,styles:t=V}){const{t:s}=w.useTranslation(),{control:n,setValue:i,handleSubmit:l}=j.useForm({defaultValues:{type:"http",key:"",config:{host:"",processing:{pre:Ce.pre,post:Ce.post}}}});return e.jsx(o.Box,{mx:"auto",children:e.jsxs("form",{onSubmit:l(r),children:[e.jsx(j.Controller,{name:"key",control:n,render:({field:c})=>e.jsx(o.TextInput,{mb:t.spacing,size:t.size,required:!0,label:s("common.name"),placeholder:s("common.name_placeholder"),...c})}),e.jsx(o.Divider,{label:s("datasource.connection_info"),labelPosition:"center"}),e.jsx(j.Controller,{name:"config.host",control:n,render:({field:c})=>e.jsx(o.TextInput,{mb:t.spacing,size:t.size,label:s("datasource.http.base_url"),sx:{flexGrow:1},...c})}),e.jsxs(o.Group,{grow:!0,children:[e.jsx(j.Controller,{name:"config.processing.pre",control:n,render:({field:c})=>e.jsx(ye,{label:s("datasource.http.processing.pre.label"),modalTitle:s("datasource.http.processing.pre.description"),defaultValue:Ce.pre,...c,styles:t})}),e.jsx(j.Controller,{name:"config.processing.post",control:n,render:({field:c})=>e.jsx(ye,{label:s("datasource.http.processing.post.label"),modalTitle:s("datasource.http.processing.post.description"),defaultValue:Ce.post,...c,styles:t})})]}),e.jsx(o.Group,{justify:"flex-end",mt:t.spacing,children:e.jsx(W,{size:t.button.size})})]})})}function An({postSubmit:r,styles:t=V}){const{t:s}=w.useTranslation(),[n,i]=P.useState("postgresql"),l=async({type:f,key:h,config:b})=>{T.showNotification({id:"for-creating",title:s("common.state.pending"),message:s("datasource.state.adding"),loading:!0,autoClose:!1});try{console.log({type:f,key:h,config:b}),await R.datasource.create(f,h,b),T.updateNotification({id:"for-creating",title:s("common.state.successful"),message:s("datasource.state.added"),color:"green",autoClose:!0}),r()}catch(v){console.error(v),T.updateNotification({id:"for-creating",title:s("common.state.failed"),message:v.message,color:"red",autoClose:!0})}},c=f=>{i(f)},u=n==="postgresql"||n==="mysql",d=n==="http";return e.jsxs(o.Box,{mx:"auto",children:[e.jsx(o.SegmentedControl,{fullWidth:!0,mb:t.spacing,size:t.size,data:[{label:"PostgreSQL",value:"postgresql"},{label:"MySQL",value:"mysql"},{label:"HTTP",value:"http"}],value:n,onChange:c}),u&&e.jsx(_n,{styles:t}),u&&e.jsx(Dn,{submit:l,styles:t,type:n}),d&&e.jsx(En,{submit:l,styles:t})]})}function ct({onSuccess:r,styles:t=V}){const{t:s}=w.useTranslation(),[n,i]=P.useState(!1),l=()=>i(!0),c=()=>i(!1),u=()=>{r(),c()};return e.jsxs(e.Fragment,{children:[e.jsx(o.Modal,{opened:n,onClose:()=>i(!1),title:s("datasource.add"),trapFocus:!0,onDragStart:d=>{d.stopPropagation()},children:e.jsx(An,{postSubmit:u,styles:t})}),e.jsx(o.Button,{size:t.button.size,onClick:l,leftSection:e.jsx(A.IconPlaylistAdd,{size:20}),children:s("datasource.add")})]})}const Pn={http:"HTTP",mysql:"MySQL",postgresql:"PostgreSQL"},On={http:e.jsx(A.IconNetwork,{}),mysql:e.jsx(A.IconBrandMysql,{}),postgresql:e.jsx(A.IconDatabase,{})};function $n({type:r}){return e.jsxs(o.Group,{children:[e.jsx(o.ActionIcon,{variant:"subtle",size:"xs",sx:{transform:"none !important"},children:On[r]}),e.jsx(o.Text,{sx:{cusor:"default",userSelect:"none"},children:Pn[r]})]})}function dt({id:r,name:t,isProtected:s,onSuccess:n,styles:i=V}){const{t:l}=w.useTranslation(),c=ae.useModals(),u=async()=>{r&&(T.showNotification({id:"for-deleting",title:l("common.state.pending"),message:l("datasource.state.deleting"),loading:!0,autoClose:!1}),await R.datasource.delete(r),T.updateNotification({id:"for-deleting",title:l("common.state.successful"),message:l("datasource.state.deleted",{name:t}),color:"green",autoClose:!0}),n())},d=()=>c.openConfirmModal({title:l("datasource.delete.title"),children:e.jsx(o.Text,{size:i.size,children:l("datasource.delete.hint")}),labels:{confirm:l("common.actions.confirm"),cancel:l("common.actions.cancel")},onCancel:()=>console.log("Cancel"),onConfirm:u,cancelProps:{size:i.button.size},confirmProps:{color:"red",size:i.button.size}});return s?e.jsx(o.Tooltip,{withArrow:!0,events:{hover:!0,touch:!1,focus:!1},label:l("datasource.delete.cant_delete_preset"),children:e.jsx(o.Button,{size:i.button.size,color:"gray",variant:"light",leftSection:e.jsx(A.IconLock,{size:16}),sx:{transform:"none !important"},children:l("common.actions.delete")})}):e.jsx(o.Button,{size:i.button.size,color:"red",onClick:d,leftSection:e.jsx(A.IconTrash,{size:16}),children:l("common.actions.delete")})}const pt={pre:["function pre_process({ method, url, params, headers, data }, utils) {"," // your code goes here"," return { method, url, params, headers, data }","}"].join(`
35
35
  `),post:["function post_process(resp, utils) {"," return resp.data","}"].join(`
36
- `)};function Mn({name:r,config:t,submit:s,styles:n=V}){const{t:i}=w.useTranslation(),{control:l,handleSubmit:c}=v.useForm({defaultValues:{config:t}});return e.jsx(o.Box,{mx:"auto",children:e.jsxs("form",{onSubmit:c(s),children:[e.jsx(o.TextInput,{mb:n.spacing,size:n.size,required:!0,label:i("common.name"),value:r,readOnly:!0}),e.jsx(o.Divider,{label:i("datasource.connection_info"),labelPosition:"center"}),e.jsx(v.Controller,{name:"config.host",control:l,render:({field:u})=>e.jsx(o.TextInput,{mb:n.spacing,size:n.size,label:i("datasource.http.base_url"),sx:{flexGrow:1},...u})}),e.jsxs(o.Group,{grow:!0,children:[e.jsx(v.Controller,{name:"config.processing.pre",control:l,render:({field:u})=>e.jsx(ye,{label:i("datasource.http.processing.pre.label"),modalTitle:i("datasource.http.processing.pre.description"),defaultValue:pt.pre,...u,styles:n})}),e.jsx(v.Controller,{name:"config.processing.post",control:l,render:({field:u})=>e.jsx(ye,{label:i("datasource.http.processing.post.label"),modalTitle:i("datasource.http.processing.post.description"),defaultValue:pt.post,...u,styles:n})})]}),e.jsx(o.Group,{justify:"flex-end",mt:n.spacing,children:e.jsx(W,{size:n.button.size})})]})})}function In({dataSource:r,postSubmit:t,styles:s=V}){const{t:n}=w.useTranslation(),i=async({config:l})=>{T.showNotification({id:"for-updating",title:n("common.state.pending"),message:n("datasource.state.updating"),loading:!0,autoClose:!1});try{console.log({config:l}),await R.datasource.update(r.id,l),T.updateNotification({id:"for-updating",title:n("common.state.successful"),message:n("datasource.state.updated"),color:"green",autoClose:!0}),t()}catch(c){T.updateNotification({id:"for-updating",title:n("common.state.failed"),message:c.message,color:"red",autoClose:!0})}};return r.config?e.jsx(o.Box,{mx:"auto",children:e.jsx(Mn,{name:r.key,config:r.config,submit:i,styles:s})}):(console.error(new Error("unexpected empty config of a http datasource")),null)}function Rn({dataSource:r,onSuccess:t,styles:s=V}){const{t:n}=w.useTranslation(),[i,l]=P.useState(!1),c=()=>l(!0),u=()=>l(!1),d=()=>{t(),u()};return r.is_preset?e.jsx(o.Tooltip,{withArrow:!0,events:{hover:!0,touch:!1,focus:!1},label:n("datasource.cant_edit.preset"),children:e.jsx(o.Button,{size:s.button.size,color:"gray",variant:"light",leftSection:e.jsx(A.IconLock,{size:16}),sx:{transform:"none !important"},children:n("common.actions.edit")})}):r.type!=="http"?e.jsx(o.Tooltip,{withArrow:!0,events:{hover:!0,touch:!1,focus:!1},label:n("datasource.cant_edit.db"),children:e.jsx(o.Button,{size:s.button.size,color:"gray",variant:"light",leftSection:e.jsx(A.IconEdit,{size:16}),sx:{transform:"none !important"},children:n("common.actions.edit")})}):e.jsxs(e.Fragment,{children:[e.jsx(o.Modal,{opened:i,onClose:()=>l(!1),title:n("datasource.edit"),trapFocus:!0,onDragStart:f=>{f.stopPropagation()},children:e.jsx(In,{dataSource:r,postSubmit:d,styles:s})}),e.jsx(o.Button,{size:s.button.size,color:"blue",onClick:c,leftSection:e.jsx(A.IconEdit,{size:16}),children:n("common.actions.edit")})]})}const Ln=be("DataSourceList",({styles:r=V})=>{const{t}=w.useTranslation(),{data:s=[],loading:n,refresh:i}=K.useRequest(async()=>{const{data:l}=await R.datasource.list();return l},{refreshDeps:[]});return e.jsxs(e.Fragment,{children:[e.jsx(o.Group,{pt:r.spacing,justify:"flex-end",children:e.jsx(ct,{onSuccess:i})}),e.jsxs(o.Box,{mt:r.spacing,sx:{position:"relative"},children:[e.jsx(o.LoadingOverlay,{visible:n}),e.jsxs(o.Table,{horizontalSpacing:r.spacing,verticalSpacing:r.spacing,fz:r.size,highlightOnHover:!0,children:[e.jsx(o.Table.Thead,{children:e.jsxs(o.Table.Tr,{children:[e.jsx(o.Table.Th,{children:t("common.type")}),e.jsx(o.Table.Th,{children:t("common.name")}),e.jsx(o.Table.Th,{children:t("common.action")})]})}),e.jsx(o.Table.Tbody,{children:s.map(l=>{const{id:c,key:u,type:d,is_preset:f}=l;return e.jsxs(o.Table.Tr,{children:[e.jsx(o.Table.Td,{width:200,children:e.jsx($n,{type:d})}),e.jsx(o.Table.Td,{children:u}),e.jsx(o.Table.Td,{width:400,children:e.jsxs(o.Group,{justify:"flex-start",children:[e.jsx(Rn,{dataSource:l,onSuccess:i,styles:r}),e.jsx(dt,{isProtected:f,id:c,name:u,onSuccess:i,styles:r})]})})]},u)})})]})]})]})}),qn=({option:r,...t})=>{const{label:s,value:n,description:i}=r;return e.jsxs(o.Stack,{gap:2,...t,children:[e.jsx(o.Text,{size:"sm",children:s}),e.jsx(o.Text,{size:"xs",c:"dimmed",className:"role-description",children:i})]})},qe=P.forwardRef(({styles:r,value:t,onChange:s},n)=>{const{t:i}=w.useTranslation(),{data:l=[],loading:c}=K.useRequest(async()=>(await R.role.list()).map(d=>({label:d.id,value:d.id,description:d.description,disabled:d.id==="SUPERADMIN"})),{refreshDeps:[]});return e.jsx(o.Select,{ref:n,mb:r.spacing,size:r.size,required:!0,label:i("role.label"),renderOption:qn,data:l,disabled:c,styles:()=>({item:{"&[data-selected]":{"&, &:hover":{".role-description":{color:"rgba(255,255,255,.8)"}}}}}),value:t,onChange:u=>u!==null&&s(u),comboboxProps:{withinPortal:!0},maxDropdownHeight:500})}),H={size:"sm",spacing:"md",button:{size:"xs"}};function kn({postSubmit:r,styles:t=H,initialRoleID:s}){const{t:n}=w.useTranslation(),{control:i,handleSubmit:l}=v.useForm({defaultValues:{name:"",email:"",role_id:s,password:""}}),c=async({name:u,email:d,password:f,role_id:h})=>{try{T.showNotification({id:"for-creating",title:n("common.state.pending"),message:n("account.state.adding"),loading:!0,autoClose:!1}),await R.account.create(u,d,f,h),T.updateNotification({id:"for-creating",title:n("common.state.successful"),message:n("account.state.added"),color:"green",autoClose:!0}),r()}catch(j){T.updateNotification({id:"for-creating",title:n("common.state.failed"),message:j.message,color:"red",autoClose:!0})}};return e.jsx(o.Box,{mx:"auto",mb:10,children:e.jsxs("form",{onSubmit:l(c),children:[e.jsx(v.Controller,{name:"name",control:i,render:({field:u})=>e.jsx(o.TextInput,{mb:t.spacing,size:t.size,required:!0,label:n("account.username"),...u})}),e.jsx(v.Controller,{name:"email",control:i,render:({field:u})=>e.jsx(o.TextInput,{mb:t.spacing,size:t.size,required:!0,label:n("account.email"),...u})}),e.jsx(v.Controller,{name:"password",control:i,render:({field:u})=>e.jsx(o.PasswordInput,{mb:t.spacing,size:t.size,required:!0,label:n("account.password"),description:n("account.password_hint"),...u})}),e.jsx(v.Controller,{name:"role_id",control:i,render:({field:u})=>e.jsx(qe,{styles:t,...u})}),e.jsx(o.Group,{justify:"flex-end",mt:t.spacing,children:e.jsx(W,{size:t.button.size})})]})})}function ft({onSuccess:r,styles:t=H,initialRoleID:s}){const{t:n}=w.useTranslation(),[i,l]=P.useState(!1),c=()=>l(!0),u=()=>l(!1),d=()=>{r(),u()};return e.jsxs(e.Fragment,{children:[e.jsx(o.Modal,{opened:i,onClose:()=>l(!1),title:n("account.add"),trapFocus:!0,onDragStart:f=>{f.stopPropagation()},children:e.jsx(kn,{postSubmit:d,styles:t,initialRoleID:s})}),e.jsx(o.Button,{size:t.button.size,onClick:c,leftSection:e.jsx(A.IconPlaylistAdd,{size:20}),children:n("account.add")})]})}function mt({id:r,name:t,onSuccess:s,styles:n=H}){const{t:i}=w.useTranslation(),l=ae.useModals(),c=async()=>{if(r){T.showNotification({id:"for-deleting",title:i("common.state.pending"),message:i("account.state.deleting"),loading:!0,autoClose:!1});try{await R.account.delete(r),T.updateNotification({id:"for-deleting",title:i("common.state.successful"),message:i("account.state.deleted",{name:t}),color:"green",autoClose:!0}),s()}catch(d){T.updateNotification({id:"for-deleting",title:i("common.state.failed"),message:d.message,color:"red",autoClose:!0})}}},u=()=>l.openConfirmModal({title:i("account.delete"),labels:{confirm:i("common.actions.confirm"),cancel:i("common.actions.cancel")},onCancel:()=>console.log("Cancel"),onConfirm:c,cancelProps:{size:n.button.size},confirmProps:{color:"red",size:n.button.size}});return e.jsx(o.Button,{size:n.button.size,color:"red",onClick:u,leftSection:e.jsx(A.IconTrash,{size:20}),children:i("common.actions.delete")})}function Nn({id:r,name:t,email:s,role_id:n,postSubmit:i,styles:l=H}){const{t:c}=w.useTranslation(),{control:u,handleSubmit:d,watch:f}=v.useForm({defaultValues:{name:t,email:s,role_id:n,reset_password:!1,new_password:""}}),h=async({name:C,email:q,role_id:Y,reset_password:X,new_password:k})=>{try{T.showNotification({id:"for-updating",title:c("common.state.pending"),message:c("account.state.updating"),loading:!0,autoClose:!1}),await R.account.edit({id:r,name:C.trim(),email:q.trim(),role_id:Y,reset_password:X,new_password:k.trim()}),T.updateNotification({id:"for-updating",title:c("common.state.successful"),message:c("account.state.updated"),color:"green",autoClose:!0}),i()}catch(D){T.updateNotification({id:"for-updating",title:c("common.state.failed"),message:D.message,color:"red",autoClose:!0})}},[j,b]=f(["reset_password","new_password"]);return e.jsx(o.Box,{mx:"auto",mb:10,children:e.jsxs("form",{onSubmit:d(h),children:[e.jsx(v.Controller,{name:"name",control:u,render:({field:C})=>e.jsx(o.TextInput,{mb:l.spacing,size:l.size,required:!0,label:c("account.username"),...C})}),e.jsx(v.Controller,{name:"email",control:u,render:({field:C})=>e.jsx(o.TextInput,{mb:l.spacing,size:l.size,required:!0,label:c("account.email"),...C})}),e.jsx(v.Controller,{name:"role_id",control:u,render:({field:C})=>e.jsx(qe,{styles:l,...C})}),e.jsx(o.Divider,{my:20,variant:"dashed",label:"",labelPosition:"center"}),e.jsx(v.Controller,{name:"reset_password",control:u,render:({field:C})=>e.jsx(o.Switch,{mb:l.spacing,size:l.size,label:c("account.reset_password"),checked:C.value,onChange:q=>C.onChange(q.currentTarget.checked),styles:{label:{verticalAlign:"middle"}}})}),j&&e.jsx(v.Controller,{name:"new_password",control:u,render:({field:C})=>e.jsx(o.PasswordInput,{autoComplete:"off",mb:l.spacing,size:l.size,required:!0,description:c("account.password_hint"),label:c("account.new_password"),...C})}),e.jsx(o.Group,{justify:"flex-end",mt:l.spacing,children:e.jsx(W,{size:l.button.size})})]})})}function Fn({account:r,onSuccess:t,styles:s=H}){const{t:n}=w.useTranslation(),[i,l]=P.useState(!1),c=()=>l(!0),u=()=>l(!1),d=()=>{t(),u()};return e.jsxs(e.Fragment,{children:[e.jsx(o.Modal,{opened:i,onClose:()=>l(!1),title:n("account.editing_xx",{name:r.name}),trapFocus:!0,onDragStart:f=>{f.stopPropagation()},children:e.jsx(Nn,{...r,postSubmit:d,styles:s})}),e.jsx(o.Button,{size:s.button.size,onClick:c,leftSection:e.jsx(A.IconEdit,{size:20}),children:n("common.actions.edit")})]})}const Bn=be("AccountList",({styles:r=H})=>{var u;const{t}=w.useTranslation(),{data:s=[],loading:n,refresh:i}=K.useRequest(async()=>{const{data:d}=await R.account.list();return d},{refreshDeps:[]}),{data:l=[],loading:c}=K.useRequest(async()=>(await R.role.list()).map(f=>({label:f.id,value:f.id,description:f.description,disabled:f.id==="SUPERADMIN"})),{refreshDeps:[]});return e.jsxs(e.Fragment,{children:[e.jsx(o.Group,{pt:r.spacing,justify:"flex-end",children:e.jsx(ft,{onSuccess:i,initialRoleID:((u=l==null?void 0:l[0])==null?void 0:u.value)??"INACTIVE"})}),e.jsxs(o.Box,{mt:r.spacing,sx:{position:"relative"},children:[e.jsx(o.LoadingOverlay,{visible:n||c}),e.jsxs(o.Table,{horizontalSpacing:r.spacing,verticalSpacing:r.spacing,fz:r.size,highlightOnHover:!0,children:[e.jsx(o.Table.Thead,{children:e.jsxs(o.Table.Tr,{children:[e.jsx(o.Table.Th,{children:t("account.username")}),e.jsx(o.Table.Th,{children:t("account.email")}),e.jsx(o.Table.Th,{children:t("role.label")}),e.jsx(o.Table.Th,{children:t("common.action")})]})}),e.jsx(o.Table.Tbody,{children:s.map(d=>{const{id:f,name:h,email:j,role_id:b}=d;return e.jsxs(o.Table.Tr,{children:[e.jsx(o.Table.Td,{width:200,children:h}),e.jsx(o.Table.Td,{width:200,children:j}),e.jsx(o.Table.Td,{width:200,children:b}),e.jsx(o.Table.Td,{width:200,children:e.jsxs(o.Group,{justify:"flex-start",children:[e.jsx(Fn,{account:d,onSuccess:i}),e.jsx(mt,{id:f,name:h,onSuccess:i})]})})]},f)})})]})]})]})});function Un({postSubmit:r,styles:t=H}){const{t:s}=w.useTranslation(),{control:n,handleSubmit:i}=v.useForm({defaultValues:{name:"",password:""}}),l=async({name:c,password:u})=>{try{T.showNotification({id:"for-login",title:s("common.state.pending"),message:s("account.state.logging_in"),loading:!0,autoClose:!1});const d=await R.account.login(c.trim(),u.trim());window.localStorage.setItem("token",d.token),T.updateNotification({id:"for-login",title:s("common.state.successful"),message:s("account.state.logged_in"),color:"green",autoClose:!0}),r(d)}catch(d){T.updateNotification({id:"for-login",title:s("common.state.failed"),message:d.message,color:"red",autoClose:!0})}};return e.jsx(o.Box,{mx:"auto",children:e.jsxs("form",{onSubmit:i(l),children:[e.jsx(v.Controller,{name:"name",control:n,render:({field:c})=>e.jsx(o.TextInput,{mb:t.spacing,size:t.size,required:!0,label:s("account.username"),...c})}),e.jsx(v.Controller,{name:"password",control:n,render:({field:c})=>e.jsx(o.PasswordInput,{mb:t.spacing,size:t.size,required:!0,label:s("account.password"),...c})}),e.jsx(o.Group,{justify:"flex-end",mt:t.spacing,children:e.jsx(W,{size:t.button.size})})]})})}const Yn=be("Login",({styles:r=H,onSuccess:t})=>e.jsx(e.Fragment,{children:e.jsx(o.Box,{mt:r.spacing,sx:{position:"relative"},children:e.jsx(Un,{styles:r,postSubmit:t})})})),De={size:"sm",spacing:"md",button:{size:"xs"}};function Vn({postSubmit:r,styles:t=De,initialRoleID:s}){const{t:n}=w.useTranslation(),{control:i,handleSubmit:l}=v.useForm({defaultValues:{name:"",role_id:s}}),c=async({name:u,role_id:d})=>{try{T.showNotification({id:"for-creating",title:n("common.state.pending"),message:n("api_key.state.adding"),loading:!0,autoClose:!1});const{app_id:f,app_secret:h}=await R.api_key.create(u,d);T.updateNotification({id:"for-creating",title:n("common.state.successful"),message:n("api_key.state.added"),color:"green",autoClose:!0}),r(f,h)}catch(f){T.updateNotification({id:"for-creating",title:n("common.state.failed"),message:f.message,color:"red",autoClose:!0})}};return e.jsx(o.Box,{mx:"auto",mb:10,children:e.jsxs("form",{onSubmit:l(c),children:[e.jsx(v.Controller,{name:"name",control:i,render:({field:u})=>e.jsx(o.TextInput,{mb:t.spacing,size:t.size,required:!0,label:n("common.name"),...u})}),e.jsx(v.Controller,{name:"role_id",control:i,render:({field:u})=>e.jsx(qe,{styles:t,...u})}),e.jsx(o.Group,{justify:"flex-end",mt:t.spacing,children:e.jsx(W,{size:t.button.size})})]})})}function ht({onSuccess:r,styles:t=De,initialRoleID:s}){const{t:n}=w.useTranslation(),i=ae.useModals(),[l,c]=P.useState(!1),u=()=>c(!0),d=()=>c(!1),f=(h,j)=>{d(),i.openModal({title:n("api_key.save.title"),children:e.jsxs(o.Stack,{children:[e.jsx(o.Text,{size:"sm",c:"dimmed",children:n("api_key.save.warn")}),e.jsx(o.TextInput,{defaultValue:h,disabled:!0,label:n("api_key.app_id"),styles:{input:{cursor:"text !important"}}}),e.jsx(o.TextInput,{defaultValue:j,disabled:!0,label:n("api_key.app_secret"),styles:{input:{cursor:"text !important"}}}),e.jsx(o.Button,{size:"sm",onClick:()=>{ae.closeAllModals()},children:n("api_key.save.saved")})]}),onClose:()=>{r()}})};return e.jsxs(e.Fragment,{children:[e.jsx(o.Modal,{opened:l,onClose:()=>c(!1),title:n("api_key.add"),trapFocus:!0,onDragStart:h=>{h.stopPropagation()},children:e.jsx(Vn,{postSubmit:f,styles:t,initialRoleID:s})}),e.jsx(o.Button,{size:t.button.size,onClick:u,leftSection:e.jsx(A.IconPlaylistAdd,{size:20}),children:n("api_key.add")})]})}function gt({id:r,name:t,onSuccess:s,styles:n=De}){const{t:i}=w.useTranslation(),l=ae.useModals(),c=async()=>{if(r){T.showNotification({id:"for-deleting",title:i("common.state.pending"),message:i("global_sql_snippet.state.deleting"),loading:!0,autoClose:!1});try{await R.api_key.delete(r),T.updateNotification({id:"for-deleting",title:i("common.state.successful"),message:i("global_sql_snippet.state.deleted",{name:t}),color:"green",autoClose:!0}),s()}catch(d){T.updateNotification({id:"for-deleting",title:i("common.state.failed"),message:d.message,color:"red",autoClose:!0})}}},u=()=>l.openConfirmModal({title:i("api_key.delete"),labels:{confirm:i("common.actions.confirm"),cancel:i("common.actions.cancel")},onCancel:()=>console.log("Cancel"),onConfirm:c,cancelProps:{size:n.button.size},confirmProps:{color:"red",size:n.button.size}});return e.jsx(o.Button,{size:n.button.size,color:"red",onClick:u,leftSection:e.jsx(A.IconTrash,{size:20}),children:i("common.actions.delete")})}const Gn=be("APIKeyList",({styles:r=De})=>{var u;const{t}=w.useTranslation(),{data:s=[],loading:n,refresh:i}=K.useRequest(async()=>{const{data:d}=await R.api_key.list();return d},{refreshDeps:[]}),{data:l=[],loading:c}=K.useRequest(async()=>(await R.role.list()).map(f=>({label:f.id,value:f.id,description:f.description,disabled:f.id==="SUPERADMIN"})),{refreshDeps:[]});return e.jsxs(e.Fragment,{children:[e.jsx(o.Group,{pt:r.spacing,justify:"flex-end",children:e.jsx(ht,{onSuccess:i,initialRoleID:((u=l==null?void 0:l[0])==null?void 0:u.value)??"INACTIVE"})}),e.jsxs(o.Box,{mt:r.spacing,sx:{position:"relative"},children:[e.jsx(o.LoadingOverlay,{visible:n||c}),e.jsxs(o.Table,{horizontalSpacing:r.spacing,verticalSpacing:r.spacing,fz:r.size,highlightOnHover:!0,children:[e.jsx(o.Table.Thead,{children:e.jsxs(o.Table.Tr,{children:[e.jsx(o.Table.Th,{children:t("common.name")}),e.jsx(o.Table.Th,{children:t("api_key.app_id")}),e.jsx(o.Table.Th,{children:t("role.label")}),e.jsx(o.Table.Th,{children:t("common.action")})]})}),e.jsx(o.Table.Tbody,{children:s.map(d=>{const{id:f,name:h,app_id:j,role_id:b}=d;return e.jsxs(o.Table.Tr,{children:[e.jsx(o.Table.Td,{width:200,children:h}),e.jsx(o.Table.Td,{width:200,children:j}),e.jsx(o.Table.Td,{width:200,children:b}),e.jsx(o.Table.Td,{width:200,children:e.jsx(o.Group,{justify:"flex-start",children:e.jsx(gt,{id:f,name:h,onSuccess:i})})})]},f)})})]})]})]})}),ue={size:"sm",spacing:"md",button:{size:"xs"}};function Wn({postSubmit:r,styles:t=ue}){const{t:s}=w.useTranslation(),{control:n,handleSubmit:i}=v.useForm({defaultValues:{id:"",content:""}}),l=async c=>{try{T.showNotification({id:"for-creating",title:s("common.state.pending"),message:s("global_sql_snippet.state.adding"),loading:!0,autoClose:!1}),await R.sql_snippet.create(c),T.updateNotification({id:"for-creating",title:s("common.state.successful"),message:s("global_sql_snippet.state.added"),color:"green",autoClose:!0}),r()}catch(u){T.updateNotification({id:"for-creating",title:s("common.state.failed"),message:u.message,color:"red",autoClose:!0})}};return e.jsx(o.Box,{mx:"auto",children:e.jsxs("form",{onSubmit:i(l),children:[e.jsx(v.Controller,{name:"id",control:n,render:({field:c})=>e.jsx(o.TextInput,{mb:t.spacing,size:t.size,required:!0,label:s("common.name"),placeholder:s("common.name_placeholder"),...c})}),e.jsx(v.Controller,{name:"content",control:n,render:({field:c})=>e.jsxs(o.Stack,{gap:4,children:[e.jsx(o.Text,{size:"14px",fw:500,c:"#212529",sx:{cursor:"default"},children:s("global_sql_snippet.content")}),e.jsx(ut,{height:"600px",...c})]})}),e.jsx(o.Group,{justify:"flex-end",mt:t.spacing,children:e.jsx(W,{size:t.button.size})})]})})}function xt({onSuccess:r,styles:t=ue}){const{t:s}=w.useTranslation(),[n,i]=P.useState(!1),l=()=>i(!0),c=()=>i(!1),u=()=>{c(),r()};return e.jsxs(e.Fragment,{children:[e.jsx(o.Modal,{opened:n,onClose:()=>i(!1),title:s("global_sql_snippet.add"),trapFocus:!0,onDragStart:d=>{d.stopPropagation()},size:"80vw",children:e.jsx(Wn,{postSubmit:u,styles:t})}),e.jsx(o.Button,{size:t.button.size,onClick:l,leftSection:e.jsx(A.IconPlaylistAdd,{size:18}),children:s("global_sql_snippet.add")})]})}function Kn({postSubmit:r,styles:t=ue,id:s,content:n}){const{t:i}=w.useTranslation(),{control:l,handleSubmit:c}=v.useForm({defaultValues:{id:s,content:n}}),u=async d=>{try{T.showNotification({id:"for-updating",title:i("common.state.pending"),message:i("global_sql_snippet.state.updating"),loading:!0,autoClose:!1}),await R.sql_snippet.update(d),T.updateNotification({id:"for-updating",title:i("common.state.successful"),message:i("global_sql_snippet.state.updated"),color:"green",autoClose:!0}),r()}catch(f){T.updateNotification({id:"for-updating",title:i("common.state.failed"),message:f.message,color:"red",autoClose:!0})}};return e.jsx(o.Box,{mx:"auto",children:e.jsxs("form",{onSubmit:c(u),children:[e.jsx(v.Controller,{name:"id",control:l,render:({field:d})=>e.jsx(o.TextInput,{mb:t.spacing,size:t.size,required:!0,label:i("common.name"),placeholder:i("common.name_placeholder"),...d})}),e.jsx(v.Controller,{name:"content",control:l,render:({field:d})=>e.jsxs(o.Stack,{gap:4,children:[e.jsx(o.Text,{size:"14px",fw:500,c:"#212529",sx:{cursor:"default"},children:i("global_sql_snippet.content")}),e.jsx(ut,{height:"600px",...d})]})}),e.jsx(o.Group,{justify:"flex-end",mt:t.spacing,children:e.jsx(W,{size:t.button.size})})]})})}function bt({onSuccess:r,styles:t=ue,...s}){const{t:n}=w.useTranslation(),[i,l]=P.useState(!1),c=()=>l(!0),u=()=>l(!1),d=()=>{u(),r()};return e.jsxs(e.Fragment,{children:[e.jsx(o.Modal,{opened:i,onClose:()=>l(!1),title:n("global_sql_snippet.edit"),trapFocus:!0,onDragStart:f=>{f.stopPropagation()},size:"80vw",children:e.jsx(Kn,{postSubmit:d,styles:t,...s})}),e.jsx(o.Button,{size:t.button.size,onClick:c,leftSection:e.jsx(A.IconEdit,{size:18}),children:n("common.actions.edit")})]})}function vt({id:r,onSuccess:t,styles:s=ue}){const{t:n}=w.useTranslation(),i=ae.useModals(),l=async()=>{if(r){T.showNotification({id:"for-deleting",title:n("common.state.pending"),message:n("global_sql_snippet.state.deleting"),loading:!0,autoClose:!1});try{await R.sql_snippet.delete(r),T.updateNotification({id:"for-deleting",title:n("common.state.successful"),message:n("global_sql_snippet.state.deleted",{name:r}),color:"green",autoClose:!0}),t()}catch(u){T.updateNotification({id:"for-deleting",title:n("common.state.failed"),message:u.message,color:"red",autoClose:!0})}}},c=()=>i.openConfirmModal({title:n("global_sql_snippet.delete"),labels:{confirm:n("common.actions.confirm"),cancel:n("common.actions.cancel")},onCancel:()=>console.log("Cancel"),onConfirm:l,cancelProps:{size:s.button.size},confirmProps:{color:"red",size:s.button.size}});return e.jsx(o.Button,{size:s.button.size,color:"red",onClick:c,leftSection:e.jsx(A.IconTrash,{size:20}),children:n("common.actions.edit")})}function Qn({content:r}){return e.jsxs(o.HoverCard,{width:"60vw",shadow:"md",children:[e.jsx(o.HoverCard.Target,{children:e.jsx(o.ActionIcon,{variant:"subtle",size:16,children:e.jsx(A.IconEye,{})})}),e.jsx(o.HoverCard.Dropdown,{children:e.jsx(Kt.CodeHighlight,{code:r,language:"sql",withCopyButton:!1})})]})}const Jn=be("DataSourceList",({styles:r=ue})=>{const{t}=w.useTranslation(),{data:s=[],loading:n,refresh:i}=K.useRequest(async()=>{const{data:l}=await R.sql_snippet.list({pagination:{page:1,pagesize:10}});return l},{refreshDeps:[]});return e.jsxs(e.Fragment,{children:[e.jsxs(o.Group,{pt:r.spacing,justify:"space-between",children:[e.jsx(o.Alert,{children:t("global_sql_snippet.description")}),e.jsx(xt,{onSuccess:i})]}),e.jsxs(o.Box,{mt:r.spacing,sx:{position:"relative"},children:[e.jsx(o.LoadingOverlay,{visible:n}),e.jsxs(o.Table,{horizontalSpacing:r.spacing,verticalSpacing:r.spacing,fz:r.size,highlightOnHover:!0,children:[e.jsx(o.Table.Thead,{children:e.jsxs(o.Table.Tr,{children:[e.jsx(o.Table.Th,{children:t("common.name")}),e.jsx(o.Table.Th,{}),e.jsx(o.Table.Th,{children:t("common.created_at")}),e.jsx(o.Table.Th,{children:t("common.updated_at")}),e.jsx(o.Table.Th,{children:t("common.action")})]})}),e.jsx(o.Table.Tbody,{children:s.map(l=>{const{id:c,content:u,create_time:d,update_time:f}=l;return e.jsxs(o.Table.Tr,{children:[e.jsx(o.Table.Td,{children:c}),e.jsx(o.Table.Td,{width:50,children:e.jsx(Qn,{content:u})}),e.jsx(o.Table.Td,{width:200,children:d}),e.jsx(o.Table.Td,{width:200,children:f}),e.jsx(o.Table.Td,{width:400,children:e.jsxs(o.Group,{justify:"flex-start",children:[e.jsx(bt,{...l,onSuccess:i}),e.jsx(vt,{id:c,onSuccess:i})]})})]},c)})})]})]})]})}),Hn=()=>Promise.resolve().then(()=>Xn).then(({version:r})=>(console.log(`[@devtable/settings-form] version: ${r}`),r)),Xn=Object.freeze(Object.defineProperty({__proto__:null,version:"13.43.2"},Symbol.toStringTag,{value:"Module"}));x.APIClient=O,x.APIKeyList=Gn,x.AccountList=Bn,x.AddAPIKey=ht,x.AddAccount=ft,x.AddDataSource=ct,x.AddSQLSnippet=xt,x.DataSourceList=Ln,x.DefaultApiClient=Xe,x.DeleteAPIKey=gt,x.DeleteAccount=mt,x.DeleteDataSource=dt,x.DeleteSQLSnippet=vt,x.FacadeApiClient=Ze,x.Login=Yn,x.SQLSnippetList=Jn,x.UpdateSQLSnippet=bt,x.configureAPIClient=tt,x.facadeApiClient=et,x.getVersion=Hn,Object.defineProperty(x,Symbol.toStringTag,{value:"Module"})});
36
+ `)};function Mn({name:r,config:t,submit:s,styles:n=V}){const{t:i}=w.useTranslation(),{control:l,handleSubmit:c}=j.useForm({defaultValues:{config:t}});return e.jsx(o.Box,{mx:"auto",children:e.jsxs("form",{onSubmit:c(s),children:[e.jsx(o.TextInput,{mb:n.spacing,size:n.size,required:!0,label:i("common.name"),value:r,readOnly:!0}),e.jsx(o.Divider,{label:i("datasource.connection_info"),labelPosition:"center"}),e.jsx(j.Controller,{name:"config.host",control:l,render:({field:u})=>e.jsx(o.TextInput,{mb:n.spacing,size:n.size,label:i("datasource.http.base_url"),sx:{flexGrow:1},...u})}),e.jsxs(o.Group,{grow:!0,children:[e.jsx(j.Controller,{name:"config.processing.pre",control:l,render:({field:u})=>e.jsx(ye,{label:i("datasource.http.processing.pre.label"),modalTitle:i("datasource.http.processing.pre.description"),defaultValue:pt.pre,...u,styles:n})}),e.jsx(j.Controller,{name:"config.processing.post",control:l,render:({field:u})=>e.jsx(ye,{label:i("datasource.http.processing.post.label"),modalTitle:i("datasource.http.processing.post.description"),defaultValue:pt.post,...u,styles:n})})]}),e.jsx(o.Group,{justify:"flex-end",mt:n.spacing,children:e.jsx(W,{size:n.button.size})})]})})}function In({dataSource:r,postSubmit:t,styles:s=V}){const{t:n}=w.useTranslation(),i=async({config:l})=>{T.showNotification({id:"for-updating",title:n("common.state.pending"),message:n("datasource.state.updating"),loading:!0,autoClose:!1});try{console.log({config:l}),await R.datasource.update(r.id,l),T.updateNotification({id:"for-updating",title:n("common.state.successful"),message:n("datasource.state.updated"),color:"green",autoClose:!0}),t()}catch(c){T.updateNotification({id:"for-updating",title:n("common.state.failed"),message:c.message,color:"red",autoClose:!0})}};return r.config?e.jsx(o.Box,{mx:"auto",children:e.jsx(Mn,{name:r.key,config:r.config,submit:i,styles:s})}):(console.error(new Error("unexpected empty config of a http datasource")),null)}function Rn({dataSource:r,onSuccess:t,styles:s=V}){const{t:n}=w.useTranslation(),[i,l]=P.useState(!1),c=()=>l(!0),u=()=>l(!1),d=()=>{t(),u()};return r.is_preset?e.jsx(o.Tooltip,{withArrow:!0,events:{hover:!0,touch:!1,focus:!1},label:n("datasource.cant_edit.preset"),children:e.jsx(o.Button,{size:s.button.size,color:"gray",variant:"light",leftSection:e.jsx(A.IconLock,{size:16}),sx:{transform:"none !important"},children:n("common.actions.edit")})}):r.type!=="http"?e.jsx(o.Tooltip,{withArrow:!0,events:{hover:!0,touch:!1,focus:!1},label:n("datasource.cant_edit.db"),children:e.jsx(o.Button,{size:s.button.size,color:"gray",variant:"light",leftSection:e.jsx(A.IconEdit,{size:16}),sx:{transform:"none !important"},children:n("common.actions.edit")})}):e.jsxs(e.Fragment,{children:[e.jsx(o.Modal,{opened:i,onClose:()=>l(!1),title:n("datasource.edit"),trapFocus:!0,onDragStart:f=>{f.stopPropagation()},children:e.jsx(In,{dataSource:r,postSubmit:d,styles:s})}),e.jsx(o.Button,{size:s.button.size,color:"blue",onClick:c,leftSection:e.jsx(A.IconEdit,{size:16}),children:n("common.actions.edit")})]})}const Ln=be("DataSourceList",({styles:r=V})=>{const{t}=w.useTranslation(),{data:s=[],loading:n,refresh:i}=K.useRequest(async()=>{const{data:l}=await R.datasource.list();return l},{refreshDeps:[]});return e.jsxs(e.Fragment,{children:[e.jsx(o.Group,{pt:r.spacing,justify:"flex-end",children:e.jsx(ct,{onSuccess:i})}),e.jsxs(o.Box,{mt:r.spacing,sx:{position:"relative"},children:[e.jsx(o.LoadingOverlay,{visible:n}),e.jsxs(o.Table,{horizontalSpacing:r.spacing,verticalSpacing:r.spacing,fz:r.size,highlightOnHover:!0,children:[e.jsx(o.Table.Thead,{children:e.jsxs(o.Table.Tr,{children:[e.jsx(o.Table.Th,{children:t("common.type")}),e.jsx(o.Table.Th,{children:t("common.name")}),e.jsx(o.Table.Th,{children:t("common.action")})]})}),e.jsx(o.Table.Tbody,{children:s.map(l=>{const{id:c,key:u,type:d,is_preset:f}=l;return e.jsxs(o.Table.Tr,{children:[e.jsx(o.Table.Td,{width:200,children:e.jsx($n,{type:d})}),e.jsx(o.Table.Td,{children:u}),e.jsx(o.Table.Td,{width:400,children:e.jsxs(o.Group,{justify:"flex-start",children:[e.jsx(Rn,{dataSource:l,onSuccess:i,styles:r}),e.jsx(dt,{isProtected:f,id:c,name:u,onSuccess:i,styles:r})]})})]},u)})})]})]})]})}),qn=({option:r,...t})=>{const{label:s,value:n,description:i}=r;return e.jsxs(o.Stack,{gap:2,...t,children:[e.jsx(o.Text,{size:"sm",children:s}),e.jsx(o.Text,{size:"xs",c:"dimmed",className:"role-description",children:i})]})},qe=P.forwardRef(({styles:r,value:t,onChange:s},n)=>{const{t:i}=w.useTranslation(),{data:l=[],loading:c}=K.useRequest(async()=>(await R.role.list()).map(d=>({label:d.id,value:d.id,description:d.description,disabled:d.id==="SUPERADMIN"})),{refreshDeps:[]});return e.jsx(o.Select,{ref:n,mb:r.spacing,size:r.size,required:!0,label:i("role.label"),renderOption:qn,data:l,disabled:c,styles:()=>({item:{"&[data-selected]":{"&, &:hover":{".role-description":{color:"rgba(255,255,255,.8)"}}}}}),value:t,onChange:u=>u!==null&&s(u),comboboxProps:{withinPortal:!0},maxDropdownHeight:500})}),H={size:"sm",spacing:"md",button:{size:"xs"}};function kn({postSubmit:r,styles:t=H,initialRoleID:s}){const{t:n}=w.useTranslation(),{control:i,handleSubmit:l}=j.useForm({defaultValues:{name:"",email:"",role_id:s,password:""}}),c=async({name:u,email:d,password:f,role_id:h})=>{try{T.showNotification({id:"for-creating",title:n("common.state.pending"),message:n("account.state.adding"),loading:!0,autoClose:!1}),await R.account.create(u,d,f,h),T.updateNotification({id:"for-creating",title:n("common.state.successful"),message:n("account.state.added"),color:"green",autoClose:!0}),r()}catch(b){T.updateNotification({id:"for-creating",title:n("common.state.failed"),message:b.message,color:"red",autoClose:!0})}};return e.jsx(o.Box,{mx:"auto",mb:10,children:e.jsxs("form",{onSubmit:l(c),children:[e.jsx(j.Controller,{name:"name",control:i,render:({field:u})=>e.jsx(o.TextInput,{mb:t.spacing,size:t.size,required:!0,label:n("account.username"),...u})}),e.jsx(j.Controller,{name:"email",control:i,render:({field:u})=>e.jsx(o.TextInput,{mb:t.spacing,size:t.size,required:!0,label:n("account.email"),...u})}),e.jsx(j.Controller,{name:"password",control:i,render:({field:u})=>e.jsx(o.PasswordInput,{mb:t.spacing,size:t.size,required:!0,label:n("account.password"),description:n("account.password_hint"),...u})}),e.jsx(j.Controller,{name:"role_id",control:i,render:({field:u})=>e.jsx(qe,{styles:t,...u})}),e.jsx(o.Group,{justify:"flex-end",mt:t.spacing,children:e.jsx(W,{size:t.button.size})})]})})}function ft({onSuccess:r,styles:t=H,initialRoleID:s}){const{t:n}=w.useTranslation(),[i,l]=P.useState(!1),c=()=>l(!0),u=()=>l(!1),d=()=>{r(),u()};return e.jsxs(e.Fragment,{children:[e.jsx(o.Modal,{opened:i,onClose:()=>l(!1),title:n("account.add"),trapFocus:!0,onDragStart:f=>{f.stopPropagation()},children:e.jsx(kn,{postSubmit:d,styles:t,initialRoleID:s})}),e.jsx(o.Button,{size:t.button.size,onClick:c,leftSection:e.jsx(A.IconPlaylistAdd,{size:20}),children:n("account.add")})]})}function mt({id:r,name:t,onSuccess:s,styles:n=H}){const{t:i}=w.useTranslation(),l=ae.useModals(),c=async()=>{if(r){T.showNotification({id:"for-deleting",title:i("common.state.pending"),message:i("account.state.deleting"),loading:!0,autoClose:!1});try{await R.account.delete(r),T.updateNotification({id:"for-deleting",title:i("common.state.successful"),message:i("account.state.deleted",{name:t}),color:"green",autoClose:!0}),s()}catch(d){T.updateNotification({id:"for-deleting",title:i("common.state.failed"),message:d.message,color:"red",autoClose:!0})}}},u=()=>l.openConfirmModal({title:i("account.delete"),labels:{confirm:i("common.actions.confirm"),cancel:i("common.actions.cancel")},onCancel:()=>console.log("Cancel"),onConfirm:c,cancelProps:{size:n.button.size},confirmProps:{color:"red",size:n.button.size}});return e.jsx(o.Button,{size:n.button.size,color:"red",onClick:u,leftSection:e.jsx(A.IconTrash,{size:20}),children:i("common.actions.delete")})}function Nn({id:r,name:t,email:s,role_id:n,postSubmit:i,styles:l=H}){const{t:c}=w.useTranslation(),{control:u,handleSubmit:d,watch:f}=j.useForm({defaultValues:{name:t,email:s,role_id:n,reset_password:!1,new_password:""}}),h=async({name:C,email:q,role_id:Y,reset_password:X,new_password:k})=>{try{T.showNotification({id:"for-updating",title:c("common.state.pending"),message:c("account.state.updating"),loading:!0,autoClose:!1}),await R.account.edit({id:r,name:C.trim(),email:q.trim(),role_id:Y,reset_password:X,new_password:k.trim()}),T.updateNotification({id:"for-updating",title:c("common.state.successful"),message:c("account.state.updated"),color:"green",autoClose:!0}),i()}catch(D){T.updateNotification({id:"for-updating",title:c("common.state.failed"),message:D.message,color:"red",autoClose:!0})}},[b,v]=f(["reset_password","new_password"]);return e.jsx(o.Box,{mx:"auto",mb:10,children:e.jsxs("form",{onSubmit:d(h),children:[e.jsx(j.Controller,{name:"name",control:u,render:({field:C})=>e.jsx(o.TextInput,{mb:l.spacing,size:l.size,required:!0,label:c("account.username"),...C})}),e.jsx(j.Controller,{name:"email",control:u,render:({field:C})=>e.jsx(o.TextInput,{mb:l.spacing,size:l.size,required:!0,label:c("account.email"),...C})}),e.jsx(j.Controller,{name:"role_id",control:u,render:({field:C})=>e.jsx(qe,{styles:l,...C})}),e.jsx(o.Divider,{my:20,variant:"dashed",label:"",labelPosition:"center"}),e.jsx(j.Controller,{name:"reset_password",control:u,render:({field:C})=>e.jsx(o.Switch,{mb:l.spacing,size:l.size,label:c("account.reset_password"),checked:C.value,onChange:q=>C.onChange(q.currentTarget.checked),styles:{label:{verticalAlign:"middle"}}})}),b&&e.jsx(j.Controller,{name:"new_password",control:u,render:({field:C})=>e.jsx(o.PasswordInput,{autoComplete:"off",mb:l.spacing,size:l.size,required:!0,description:c("account.password_hint"),label:c("account.new_password"),...C})}),e.jsx(o.Group,{justify:"flex-end",mt:l.spacing,children:e.jsx(W,{size:l.button.size})})]})})}function Fn({account:r,onSuccess:t,styles:s=H}){const{t:n}=w.useTranslation(),[i,l]=P.useState(!1),c=()=>l(!0),u=()=>l(!1),d=()=>{t(),u()};return e.jsxs(e.Fragment,{children:[e.jsx(o.Modal,{opened:i,onClose:()=>l(!1),title:n("account.editing_xx",{name:r.name}),trapFocus:!0,onDragStart:f=>{f.stopPropagation()},children:e.jsx(Nn,{...r,postSubmit:d,styles:s})}),e.jsx(o.Button,{size:s.button.size,onClick:c,leftSection:e.jsx(A.IconEdit,{size:20}),children:n("common.actions.edit")})]})}const Bn=be("AccountList",({styles:r=H})=>{var u;const{t}=w.useTranslation(),{data:s=[],loading:n,refresh:i}=K.useRequest(async()=>{const{data:d}=await R.account.list();return d},{refreshDeps:[]}),{data:l=[],loading:c}=K.useRequest(async()=>(await R.role.list()).map(f=>({label:f.id,value:f.id,description:f.description,disabled:f.id==="SUPERADMIN"})),{refreshDeps:[]});return e.jsxs(e.Fragment,{children:[e.jsx(o.Group,{pt:r.spacing,justify:"flex-end",children:e.jsx(ft,{onSuccess:i,initialRoleID:((u=l==null?void 0:l[0])==null?void 0:u.value)??"INACTIVE"})}),e.jsxs(o.Box,{mt:r.spacing,sx:{position:"relative"},children:[e.jsx(o.LoadingOverlay,{visible:n||c}),e.jsxs(o.Table,{horizontalSpacing:r.spacing,verticalSpacing:r.spacing,fz:r.size,highlightOnHover:!0,children:[e.jsx(o.Table.Thead,{children:e.jsxs(o.Table.Tr,{children:[e.jsx(o.Table.Th,{children:t("account.username")}),e.jsx(o.Table.Th,{children:t("account.email")}),e.jsx(o.Table.Th,{children:t("role.label")}),e.jsx(o.Table.Th,{children:t("common.action")})]})}),e.jsx(o.Table.Tbody,{children:s.map(d=>{const{id:f,name:h,email:b,role_id:v}=d;return e.jsxs(o.Table.Tr,{children:[e.jsx(o.Table.Td,{width:200,children:h}),e.jsx(o.Table.Td,{width:200,children:b}),e.jsx(o.Table.Td,{width:200,children:v}),e.jsx(o.Table.Td,{width:200,children:e.jsxs(o.Group,{justify:"flex-start",children:[e.jsx(Fn,{account:d,onSuccess:i}),e.jsx(mt,{id:f,name:h,onSuccess:i})]})})]},f)})})]})]})]})});function Un({postSubmit:r,styles:t=H}){const{t:s}=w.useTranslation(),{control:n,handleSubmit:i}=j.useForm({defaultValues:{name:"",password:""}}),l=async({name:c,password:u})=>{try{T.showNotification({id:"for-login",title:s("common.state.pending"),message:s("account.state.logging_in"),loading:!0,autoClose:!1});const d=await R.account.login(c.trim(),u.trim());window.localStorage.setItem("token",d.token),T.updateNotification({id:"for-login",title:s("common.state.successful"),message:s("account.state.logged_in"),color:"green",autoClose:!0}),r(d)}catch(d){T.updateNotification({id:"for-login",title:s("common.state.failed"),message:d.message,color:"red",autoClose:!0})}};return e.jsx(o.Box,{mx:"auto",children:e.jsxs("form",{onSubmit:i(l),children:[e.jsx(j.Controller,{name:"name",control:n,render:({field:c})=>e.jsx(o.TextInput,{mb:t.spacing,size:t.size,required:!0,label:s("account.username"),...c})}),e.jsx(j.Controller,{name:"password",control:n,render:({field:c})=>e.jsx(o.PasswordInput,{mb:t.spacing,size:t.size,required:!0,label:s("account.password"),...c})}),e.jsx(o.Group,{justify:"flex-end",mt:t.spacing,children:e.jsx(W,{size:t.button.size})})]})})}const Yn=be("Login",({styles:r=H,onSuccess:t})=>e.jsx(e.Fragment,{children:e.jsx(o.Box,{mt:r.spacing,sx:{position:"relative"},children:e.jsx(Un,{styles:r,postSubmit:t})})})),De={size:"sm",spacing:"md",button:{size:"xs"}};function Vn({postSubmit:r,styles:t=De,initialRoleID:s}){const{t:n}=w.useTranslation(),{control:i,handleSubmit:l}=j.useForm({defaultValues:{name:"",role_id:s}}),c=async({name:u,role_id:d})=>{try{T.showNotification({id:"for-creating",title:n("common.state.pending"),message:n("api_key.state.adding"),loading:!0,autoClose:!1});const{app_id:f,app_secret:h}=await R.api_key.create(u,d);T.updateNotification({id:"for-creating",title:n("common.state.successful"),message:n("api_key.state.added"),color:"green",autoClose:!0}),r(f,h)}catch(f){T.updateNotification({id:"for-creating",title:n("common.state.failed"),message:f.message,color:"red",autoClose:!0})}};return e.jsx(o.Box,{mx:"auto",mb:10,children:e.jsxs("form",{onSubmit:l(c),children:[e.jsx(j.Controller,{name:"name",control:i,render:({field:u})=>e.jsx(o.TextInput,{mb:t.spacing,size:t.size,required:!0,label:n("common.name"),...u})}),e.jsx(j.Controller,{name:"role_id",control:i,render:({field:u})=>e.jsx(qe,{styles:t,...u})}),e.jsx(o.Group,{justify:"flex-end",mt:t.spacing,children:e.jsx(W,{size:t.button.size})})]})})}function ht({onSuccess:r,styles:t=De,initialRoleID:s}){const{t:n}=w.useTranslation(),i=ae.useModals(),[l,c]=P.useState(!1),u=()=>c(!0),d=()=>c(!1),f=(h,b)=>{d(),i.openModal({title:n("api_key.save.title"),children:e.jsxs(o.Stack,{children:[e.jsx(o.Text,{size:"sm",c:"dimmed",children:n("api_key.save.warn")}),e.jsx(o.TextInput,{defaultValue:h,disabled:!0,label:n("api_key.app_id"),styles:{input:{cursor:"text !important"}}}),e.jsx(o.TextInput,{defaultValue:b,disabled:!0,label:n("api_key.app_secret"),styles:{input:{cursor:"text !important"}}}),e.jsx(o.Button,{size:"sm",onClick:()=>{ae.closeAllModals()},children:n("api_key.save.saved")})]}),onClose:()=>{r()}})};return e.jsxs(e.Fragment,{children:[e.jsx(o.Modal,{opened:l,onClose:()=>c(!1),title:n("api_key.add"),trapFocus:!0,onDragStart:h=>{h.stopPropagation()},children:e.jsx(Vn,{postSubmit:f,styles:t,initialRoleID:s})}),e.jsx(o.Button,{size:t.button.size,onClick:u,leftSection:e.jsx(A.IconPlaylistAdd,{size:20}),children:n("api_key.add")})]})}function gt({id:r,name:t,onSuccess:s,styles:n=De}){const{t:i}=w.useTranslation(),l=ae.useModals(),c=async()=>{if(r){T.showNotification({id:"for-deleting",title:i("common.state.pending"),message:i("global_sql_snippet.state.deleting"),loading:!0,autoClose:!1});try{await R.api_key.delete(r),T.updateNotification({id:"for-deleting",title:i("common.state.successful"),message:i("global_sql_snippet.state.deleted",{name:t}),color:"green",autoClose:!0}),s()}catch(d){T.updateNotification({id:"for-deleting",title:i("common.state.failed"),message:d.message,color:"red",autoClose:!0})}}},u=()=>l.openConfirmModal({title:i("api_key.delete"),labels:{confirm:i("common.actions.confirm"),cancel:i("common.actions.cancel")},onCancel:()=>console.log("Cancel"),onConfirm:c,cancelProps:{size:n.button.size},confirmProps:{color:"red",size:n.button.size}});return e.jsx(o.Button,{size:n.button.size,color:"red",onClick:u,leftSection:e.jsx(A.IconTrash,{size:20}),children:i("common.actions.delete")})}const Gn=be("APIKeyList",({styles:r=De})=>{var u;const{t}=w.useTranslation(),{data:s=[],loading:n,refresh:i}=K.useRequest(async()=>{const{data:d}=await R.api_key.list();return d},{refreshDeps:[]}),{data:l=[],loading:c}=K.useRequest(async()=>(await R.role.list()).map(f=>({label:f.id,value:f.id,description:f.description,disabled:f.id==="SUPERADMIN"})),{refreshDeps:[]});return e.jsxs(e.Fragment,{children:[e.jsx(o.Group,{pt:r.spacing,justify:"flex-end",children:e.jsx(ht,{onSuccess:i,initialRoleID:((u=l==null?void 0:l[0])==null?void 0:u.value)??"INACTIVE"})}),e.jsxs(o.Box,{mt:r.spacing,sx:{position:"relative"},children:[e.jsx(o.LoadingOverlay,{visible:n||c}),e.jsxs(o.Table,{horizontalSpacing:r.spacing,verticalSpacing:r.spacing,fz:r.size,highlightOnHover:!0,children:[e.jsx(o.Table.Thead,{children:e.jsxs(o.Table.Tr,{children:[e.jsx(o.Table.Th,{children:t("common.name")}),e.jsx(o.Table.Th,{children:t("api_key.app_id")}),e.jsx(o.Table.Th,{children:t("role.label")}),e.jsx(o.Table.Th,{children:t("common.action")})]})}),e.jsx(o.Table.Tbody,{children:s.map(d=>{const{id:f,name:h,app_id:b,role_id:v}=d;return e.jsxs(o.Table.Tr,{children:[e.jsx(o.Table.Td,{width:200,children:h}),e.jsx(o.Table.Td,{width:200,children:b}),e.jsx(o.Table.Td,{width:200,children:v}),e.jsx(o.Table.Td,{width:200,children:e.jsx(o.Group,{justify:"flex-start",children:e.jsx(gt,{id:f,name:h,onSuccess:i})})})]},f)})})]})]})]})}),ue={size:"sm",spacing:"md",button:{size:"xs"}};function Wn({postSubmit:r,styles:t=ue}){const{t:s}=w.useTranslation(),{control:n,handleSubmit:i}=j.useForm({defaultValues:{id:"",content:""}}),l=async c=>{try{T.showNotification({id:"for-creating",title:s("common.state.pending"),message:s("global_sql_snippet.state.adding"),loading:!0,autoClose:!1}),await R.sql_snippet.create(c),T.updateNotification({id:"for-creating",title:s("common.state.successful"),message:s("global_sql_snippet.state.added"),color:"green",autoClose:!0}),r()}catch(u){T.updateNotification({id:"for-creating",title:s("common.state.failed"),message:u.message,color:"red",autoClose:!0})}};return e.jsx(o.Box,{mx:"auto",children:e.jsxs("form",{onSubmit:i(l),children:[e.jsx(j.Controller,{name:"id",control:n,render:({field:c})=>e.jsx(o.TextInput,{mb:t.spacing,size:t.size,required:!0,label:s("common.name"),placeholder:s("common.name_placeholder"),...c})}),e.jsx(j.Controller,{name:"content",control:n,render:({field:c})=>e.jsxs(o.Stack,{gap:4,children:[e.jsx(o.Text,{size:"14px",fw:500,c:"#212529",sx:{cursor:"default"},children:s("global_sql_snippet.content")}),e.jsx(ut,{height:"600px",...c})]})}),e.jsx(o.Group,{justify:"flex-end",mt:t.spacing,children:e.jsx(W,{size:t.button.size})})]})})}function xt({onSuccess:r,styles:t=ue}){const{t:s}=w.useTranslation(),[n,i]=P.useState(!1),l=()=>i(!0),c=()=>i(!1),u=()=>{c(),r()};return e.jsxs(e.Fragment,{children:[e.jsx(o.Modal,{opened:n,onClose:()=>i(!1),title:s("global_sql_snippet.add"),trapFocus:!0,onDragStart:d=>{d.stopPropagation()},size:"80vw",children:e.jsx(Wn,{postSubmit:u,styles:t})}),e.jsx(o.Button,{size:t.button.size,onClick:l,leftSection:e.jsx(A.IconPlaylistAdd,{size:18}),children:s("global_sql_snippet.add")})]})}function Kn({postSubmit:r,styles:t=ue,id:s,content:n}){const{t:i}=w.useTranslation(),{control:l,handleSubmit:c}=j.useForm({defaultValues:{id:s,content:n}}),u=async d=>{try{T.showNotification({id:"for-updating",title:i("common.state.pending"),message:i("global_sql_snippet.state.updating"),loading:!0,autoClose:!1}),await R.sql_snippet.update(d),T.updateNotification({id:"for-updating",title:i("common.state.successful"),message:i("global_sql_snippet.state.updated"),color:"green",autoClose:!0}),r()}catch(f){T.updateNotification({id:"for-updating",title:i("common.state.failed"),message:f.message,color:"red",autoClose:!0})}};return e.jsx(o.Box,{mx:"auto",children:e.jsxs("form",{onSubmit:c(u),children:[e.jsx(j.Controller,{name:"id",control:l,render:({field:d})=>e.jsx(o.TextInput,{mb:t.spacing,size:t.size,required:!0,label:i("common.name"),placeholder:i("common.name_placeholder"),...d})}),e.jsx(j.Controller,{name:"content",control:l,render:({field:d})=>e.jsxs(o.Stack,{gap:4,children:[e.jsx(o.Text,{size:"14px",fw:500,c:"#212529",sx:{cursor:"default"},children:i("global_sql_snippet.content")}),e.jsx(ut,{height:"600px",...d})]})}),e.jsx(o.Group,{justify:"flex-end",mt:t.spacing,children:e.jsx(W,{size:t.button.size})})]})})}function bt({onSuccess:r,styles:t=ue,...s}){const{t:n}=w.useTranslation(),[i,l]=P.useState(!1),c=()=>l(!0),u=()=>l(!1),d=()=>{u(),r()};return e.jsxs(e.Fragment,{children:[e.jsx(o.Modal,{opened:i,onClose:()=>l(!1),title:n("global_sql_snippet.edit"),trapFocus:!0,onDragStart:f=>{f.stopPropagation()},size:"80vw",children:e.jsx(Kn,{postSubmit:d,styles:t,...s})}),e.jsx(o.Button,{size:t.button.size,onClick:c,leftSection:e.jsx(A.IconEdit,{size:18}),children:n("common.actions.edit")})]})}function vt({id:r,onSuccess:t,styles:s=ue}){const{t:n}=w.useTranslation(),i=ae.useModals(),l=async()=>{if(r){T.showNotification({id:"for-deleting",title:n("common.state.pending"),message:n("global_sql_snippet.state.deleting"),loading:!0,autoClose:!1});try{await R.sql_snippet.delete(r),T.updateNotification({id:"for-deleting",title:n("common.state.successful"),message:n("global_sql_snippet.state.deleted",{name:r}),color:"green",autoClose:!0}),t()}catch(u){T.updateNotification({id:"for-deleting",title:n("common.state.failed"),message:u.message,color:"red",autoClose:!0})}}},c=()=>i.openConfirmModal({title:n("global_sql_snippet.delete"),labels:{confirm:n("common.actions.confirm"),cancel:n("common.actions.cancel")},onCancel:()=>console.log("Cancel"),onConfirm:l,cancelProps:{size:s.button.size},confirmProps:{color:"red",size:s.button.size}});return e.jsx(o.Button,{size:s.button.size,color:"red",onClick:c,leftSection:e.jsx(A.IconTrash,{size:20}),children:n("common.actions.edit")})}function Qn({content:r}){return e.jsxs(o.HoverCard,{width:"60vw",shadow:"md",children:[e.jsx(o.HoverCard.Target,{children:e.jsx(o.ActionIcon,{variant:"subtle",size:16,children:e.jsx(A.IconEye,{})})}),e.jsx(o.HoverCard.Dropdown,{children:e.jsx(Kt.CodeHighlight,{code:r,language:"sql",withCopyButton:!1})})]})}const Jn=be("DataSourceList",({styles:r=ue})=>{const{t}=w.useTranslation(),{data:s=[],loading:n,refresh:i}=K.useRequest(async()=>{const{data:l}=await R.sql_snippet.list({pagination:{page:1,pagesize:10}});return l},{refreshDeps:[]});return e.jsxs(e.Fragment,{children:[e.jsxs(o.Group,{pt:r.spacing,justify:"space-between",children:[e.jsx(o.Alert,{children:t("global_sql_snippet.description")}),e.jsx(xt,{onSuccess:i})]}),e.jsxs(o.Box,{mt:r.spacing,sx:{position:"relative"},children:[e.jsx(o.LoadingOverlay,{visible:n}),e.jsxs(o.Table,{horizontalSpacing:r.spacing,verticalSpacing:r.spacing,fz:r.size,highlightOnHover:!0,children:[e.jsx(o.Table.Thead,{children:e.jsxs(o.Table.Tr,{children:[e.jsx(o.Table.Th,{children:t("common.name")}),e.jsx(o.Table.Th,{}),e.jsx(o.Table.Th,{children:t("common.created_at")}),e.jsx(o.Table.Th,{children:t("common.updated_at")}),e.jsx(o.Table.Th,{children:t("common.action")})]})}),e.jsx(o.Table.Tbody,{children:s.map(l=>{const{id:c,content:u,create_time:d,update_time:f}=l;return e.jsxs(o.Table.Tr,{children:[e.jsx(o.Table.Td,{children:c}),e.jsx(o.Table.Td,{width:50,children:e.jsx(Qn,{content:u})}),e.jsx(o.Table.Td,{width:200,children:d}),e.jsx(o.Table.Td,{width:200,children:f}),e.jsx(o.Table.Td,{width:400,children:e.jsxs(o.Group,{justify:"flex-start",children:[e.jsx(bt,{...l,onSuccess:i}),e.jsx(vt,{id:c,onSuccess:i})]})})]},c)})})]})]})]})}),Hn=()=>Promise.resolve().then(()=>Xn).then(({version:r})=>(console.log(`[@devtable/settings-form] version: ${r}`),r)),Xn=Object.freeze(Object.defineProperty({__proto__:null,version:"13.43.3"},Symbol.toStringTag,{value:"Module"}));x.APIClient=O,x.APIKeyList=Gn,x.AccountList=Bn,x.AddAPIKey=ht,x.AddAccount=ft,x.AddDataSource=ct,x.AddSQLSnippet=xt,x.DataSourceList=Ln,x.DefaultApiClient=Xe,x.DeleteAPIKey=gt,x.DeleteAccount=mt,x.DeleteDataSource=dt,x.DeleteSQLSnippet=vt,x.FacadeApiClient=Ze,x.Login=Yn,x.SQLSnippetList=Jn,x.UpdateSQLSnippet=bt,x.configureAPIClient=tt,x.facadeApiClient=et,x.getVersion=Hn,Object.defineProperty(x,Symbol.toStringTag,{value:"Module"})});
package/dist/stats.html CHANGED
@@ -4822,7 +4822,7 @@ var drawChart = (function (exports) {
4822
4822
  </script>
4823
4823
  <script>
4824
4824
  /*<!--*/
4825
- const data = {"version":2,"tree":{"name":"root","children":[{"name":"settings-form.umd.js","children":[{"name":"\u0000/Users/leto/github/merico-dev/table/node_modules/react","children":[{"uid":"79aaa552-1","name":"jsx-runtime.js?commonjs-module"},{"name":"cjs","children":[{"uid":"79aaa552-3","name":"react-jsx-runtime.production.min.js?commonjs-exports"},{"uid":"79aaa552-7","name":"react-jsx-runtime.development.js?commonjs-exports"}]}]},{"name":"Users/leto/github/merico-dev/table","children":[{"name":"node_modules","children":[{"name":"react","children":[{"name":"cjs","children":[{"uid":"79aaa552-5","name":"react-jsx-runtime.production.min.js"},{"uid":"79aaa552-9","name":"react-jsx-runtime.development.js"}]},{"uid":"79aaa552-11","name":"jsx-runtime.js"}]},{"name":"dayjs/esm","children":[{"uid":"79aaa552-29","name":"constant.js"},{"name":"locale/en.js","uid":"79aaa552-31"},{"uid":"79aaa552-33","name":"utils.js"},{"uid":"79aaa552-35","name":"index.js"}]}]},{"name":"shared/src/api-client","children":[{"uid":"79aaa552-13","name":"utils.ts"},{"uid":"79aaa552-15","name":"default-api-client.ts"},{"uid":"79aaa552-17","name":"facade-api-client.ts"}]}]},{"name":"src","children":[{"name":"api-caller","children":[{"uid":"79aaa552-19","name":"request.ts"},{"uid":"79aaa552-21","name":"account.ts"},{"uid":"79aaa552-23","name":"api-key.ts"},{"uid":"79aaa552-25","name":"datasource.ts"},{"uid":"79aaa552-27","name":"role.ts"},{"uid":"79aaa552-37","name":"sql_snippet.ts"},{"uid":"79aaa552-39","name":"index.ts"}]},{"name":"datasource","children":[{"uid":"79aaa552-41","name":"styles.ts"},{"name":"add-data-source","children":[{"uid":"79aaa552-43","name":"db-permission-tips.tsx"},{"name":"forms","children":[{"uid":"79aaa552-61","name":"database.tsx"},{"uid":"79aaa552-67","name":"http.tsx"}]},{"uid":"79aaa552-69","name":"index.tsx"}]},{"name":"components","children":[{"name":"function-string-field","children":[{"uid":"79aaa552-63","name":"function-string-editor.tsx"},{"uid":"79aaa552-65","name":"index.tsx"}]},{"uid":"79aaa552-71","name":"data-source-icon.tsx"}]},{"uid":"79aaa552-73","name":"delete-data-source.tsx"},{"name":"edit-data-source","children":[{"name":"forms/http.tsx","uid":"79aaa552-75"},{"uid":"79aaa552-77","name":"index.tsx"}]},{"uid":"79aaa552-79","name":"data-source-list.tsx"}]},{"name":"components","children":[{"uid":"79aaa552-45","name":"minimal-mocaco-editor.tsx"},{"uid":"79aaa552-47","name":"submit-form-button.tsx"},{"uid":"79aaa552-59","name":"with-entry.tsx"}]},{"name":"i18n","children":[{"uid":"79aaa552-49","name":"en.ts"},{"uid":"79aaa552-51","name":"zh.ts"},{"uid":"79aaa552-53","name":"i18n.ts"},{"uid":"79aaa552-55","name":"i18next-context.tsx"}]},{"name":"utils/load-monaco-editor.ts","uid":"79aaa552-57"},{"name":"account","children":[{"uid":"79aaa552-81","name":"role-selector.tsx"},{"uid":"79aaa552-83","name":"styles.ts"},{"uid":"79aaa552-85","name":"add-account.tsx"},{"uid":"79aaa552-87","name":"delete-account.tsx"},{"uid":"79aaa552-89","name":"edit-account.tsx"},{"uid":"79aaa552-91","name":"account-list.tsx"},{"name":"login","children":[{"uid":"79aaa552-93","name":"form.tsx"},{"uid":"79aaa552-95","name":"index.tsx"}]}]},{"name":"api-key","children":[{"uid":"79aaa552-97","name":"styles.ts"},{"uid":"79aaa552-99","name":"add-api-key.tsx"},{"uid":"79aaa552-101","name":"delete-api-key.tsx"},{"uid":"79aaa552-103","name":"api-key-list.tsx"}]},{"name":"sql_snippet","children":[{"uid":"79aaa552-105","name":"styles.ts"},{"uid":"79aaa552-107","name":"add-sql_snippet.tsx"},{"uid":"79aaa552-109","name":"update-sql_snippet.tsx"},{"uid":"79aaa552-111","name":"delete-sql_snippet.tsx"},{"uid":"79aaa552-113","name":"sql_snippet-list.tsx"}]},{"uid":"79aaa552-115","name":"index.ts"}]},{"uid":"79aaa552-117","name":"package.json"}]}],"isRoot":true},"nodeParts":{"79aaa552-1":{"renderedLength":33,"gzipLength":0,"brotliLength":0,"metaUid":"79aaa552-0"},"79aaa552-3":{"renderedLength":42,"gzipLength":0,"brotliLength":0,"metaUid":"79aaa552-2"},"79aaa552-5":{"renderedLength":1217,"gzipLength":0,"brotliLength":0,"metaUid":"79aaa552-4"},"79aaa552-7":{"renderedLength":39,"gzipLength":0,"brotliLength":0,"metaUid":"79aaa552-6"},"79aaa552-9":{"renderedLength":46244,"gzipLength":0,"brotliLength":0,"metaUid":"79aaa552-8"},"79aaa552-11":{"renderedLength":237,"gzipLength":0,"brotliLength":0,"metaUid":"79aaa552-10"},"79aaa552-13":{"renderedLength":949,"gzipLength":0,"brotliLength":0,"metaUid":"79aaa552-12"},"79aaa552-15":{"renderedLength":2229,"gzipLength":0,"brotliLength":0,"metaUid":"79aaa552-14"},"79aaa552-17":{"renderedLength":422,"gzipLength":0,"brotliLength":0,"metaUid":"79aaa552-16"},"79aaa552-19":{"renderedLength":426,"gzipLength":0,"brotliLength":0,"metaUid":"79aaa552-18"},"79aaa552-21":{"renderedLength":1913,"gzipLength":0,"brotliLength":0,"metaUid":"79aaa552-20"},"79aaa552-23":{"renderedLength":641,"gzipLength":0,"brotliLength":0,"metaUid":"79aaa552-22"},"79aaa552-25":{"renderedLength":730,"gzipLength":0,"brotliLength":0,"metaUid":"79aaa552-24"},"79aaa552-27":{"renderedLength":132,"gzipLength":0,"brotliLength":0,"metaUid":"79aaa552-26"},"79aaa552-29":{"renderedLength":1011,"gzipLength":0,"brotliLength":0,"metaUid":"79aaa552-28"},"79aaa552-31":{"renderedLength":496,"gzipLength":0,"brotliLength":0,"metaUid":"79aaa552-30"},"79aaa552-33":{"renderedLength":1623,"gzipLength":0,"brotliLength":0,"metaUid":"79aaa552-32"},"79aaa552-35":{"renderedLength":14006,"gzipLength":0,"brotliLength":0,"metaUid":"79aaa552-34"},"79aaa552-37":{"renderedLength":1079,"gzipLength":0,"brotliLength":0,"metaUid":"79aaa552-36"},"79aaa552-39":{"renderedLength":94,"gzipLength":0,"brotliLength":0,"metaUid":"79aaa552-38"},"79aaa552-41":{"renderedLength":104,"gzipLength":0,"brotliLength":0,"metaUid":"79aaa552-40"},"79aaa552-43":{"renderedLength":570,"gzipLength":0,"brotliLength":0,"metaUid":"79aaa552-42"},"79aaa552-45":{"renderedLength":682,"gzipLength":0,"brotliLength":0,"metaUid":"79aaa552-44"},"79aaa552-47":{"renderedLength":370,"gzipLength":0,"brotliLength":0,"metaUid":"79aaa552-46"},"79aaa552-49":{"renderedLength":4266,"gzipLength":0,"brotliLength":0,"metaUid":"79aaa552-48"},"79aaa552-51":{"renderedLength":4276,"gzipLength":0,"brotliLength":0,"metaUid":"79aaa552-50"},"79aaa552-53":{"renderedLength":253,"gzipLength":0,"brotliLength":0,"metaUid":"79aaa552-52"},"79aaa552-55":{"renderedLength":246,"gzipLength":0,"brotliLength":0,"metaUid":"79aaa552-54"},"79aaa552-57":{"renderedLength":551,"gzipLength":0,"brotliLength":0,"metaUid":"79aaa552-56"},"79aaa552-59":{"renderedLength":625,"gzipLength":0,"brotliLength":0,"metaUid":"79aaa552-58"},"79aaa552-61":{"renderedLength":3109,"gzipLength":0,"brotliLength":0,"metaUid":"79aaa552-60"},"79aaa552-63":{"renderedLength":502,"gzipLength":0,"brotliLength":0,"metaUid":"79aaa552-62"},"79aaa552-65":{"renderedLength":2398,"gzipLength":0,"brotliLength":0,"metaUid":"79aaa552-64"},"79aaa552-67":{"renderedLength":2894,"gzipLength":0,"brotliLength":0,"metaUid":"79aaa552-66"},"79aaa552-69":{"renderedLength":3130,"gzipLength":0,"brotliLength":0,"metaUid":"79aaa552-68"},"79aaa552-71":{"renderedLength":809,"gzipLength":0,"brotliLength":0,"metaUid":"79aaa552-70"},"79aaa552-73":{"renderedLength":2217,"gzipLength":0,"brotliLength":0,"metaUid":"79aaa552-72"},"79aaa552-75":{"renderedLength":2514,"gzipLength":0,"brotliLength":0,"metaUid":"79aaa552-74"},"79aaa552-77":{"renderedLength":3551,"gzipLength":0,"brotliLength":0,"metaUid":"79aaa552-76"},"79aaa552-79":{"renderedLength":2641,"gzipLength":0,"brotliLength":0,"metaUid":"79aaa552-78"},"79aaa552-81":{"renderedLength":1553,"gzipLength":0,"brotliLength":0,"metaUid":"79aaa552-80"},"79aaa552-83":{"renderedLength":104,"gzipLength":0,"brotliLength":0,"metaUid":"79aaa552-82"},"79aaa552-85":{"renderedLength":3804,"gzipLength":0,"brotliLength":0,"metaUid":"79aaa552-84"},"79aaa552-87":{"renderedLength":1778,"gzipLength":0,"brotliLength":0,"metaUid":"79aaa552-86"},"79aaa552-89":{"renderedLength":4916,"gzipLength":0,"brotliLength":0,"metaUid":"79aaa552-88"},"79aaa552-91":{"renderedLength":3158,"gzipLength":0,"brotliLength":0,"metaUid":"79aaa552-90"},"79aaa552-93":{"renderedLength":2210,"gzipLength":0,"brotliLength":0,"metaUid":"79aaa552-92"},"79aaa552-95":{"renderedLength":397,"gzipLength":0,"brotliLength":0,"metaUid":"79aaa552-94"},"79aaa552-97":{"renderedLength":104,"gzipLength":0,"brotliLength":0,"metaUid":"79aaa552-96"},"79aaa552-99":{"renderedLength":4207,"gzipLength":0,"brotliLength":0,"metaUid":"79aaa552-98"},"79aaa552-101":{"renderedLength":1799,"gzipLength":0,"brotliLength":0,"metaUid":"79aaa552-100"},"79aaa552-103":{"renderedLength":3016,"gzipLength":0,"brotliLength":0,"metaUid":"79aaa552-102"},"79aaa552-105":{"renderedLength":102,"gzipLength":0,"brotliLength":0,"metaUid":"79aaa552-104"},"79aaa552-107":{"renderedLength":3370,"gzipLength":0,"brotliLength":0,"metaUid":"79aaa552-106"},"79aaa552-109":{"renderedLength":3409,"gzipLength":0,"brotliLength":0,"metaUid":"79aaa552-108"},"79aaa552-111":{"renderedLength":1808,"gzipLength":0,"brotliLength":0,"metaUid":"79aaa552-110"},"79aaa552-113":{"renderedLength":3839,"gzipLength":0,"brotliLength":0,"metaUid":"79aaa552-112"},"79aaa552-115":{"renderedLength":187,"gzipLength":0,"brotliLength":0,"metaUid":"79aaa552-114"},"79aaa552-117":{"renderedLength":28,"gzipLength":0,"brotliLength":0,"metaUid":"79aaa552-116"}},"nodeMetas":{"79aaa552-0":{"id":"\u0000/Users/leto/github/merico-dev/table/node_modules/react/jsx-runtime.js?commonjs-module","moduleParts":{"settings-form.umd.js":"79aaa552-1"},"imported":[],"importedBy":[{"uid":"79aaa552-10"}]},"79aaa552-2":{"id":"\u0000/Users/leto/github/merico-dev/table/node_modules/react/cjs/react-jsx-runtime.production.min.js?commonjs-exports","moduleParts":{"settings-form.umd.js":"79aaa552-3"},"imported":[],"importedBy":[{"uid":"79aaa552-4"}]},"79aaa552-4":{"id":"/Users/leto/github/merico-dev/table/node_modules/react/cjs/react-jsx-runtime.production.min.js","moduleParts":{"settings-form.umd.js":"79aaa552-5"},"imported":[{"uid":"79aaa552-139"},{"uid":"79aaa552-2"},{"uid":"79aaa552-142"}],"importedBy":[{"uid":"79aaa552-10"}]},"79aaa552-6":{"id":"\u0000/Users/leto/github/merico-dev/table/node_modules/react/cjs/react-jsx-runtime.development.js?commonjs-exports","moduleParts":{"settings-form.umd.js":"79aaa552-7"},"imported":[],"importedBy":[{"uid":"79aaa552-8"}]},"79aaa552-8":{"id":"/Users/leto/github/merico-dev/table/node_modules/react/cjs/react-jsx-runtime.development.js","moduleParts":{"settings-form.umd.js":"79aaa552-9"},"imported":[{"uid":"79aaa552-139"},{"uid":"79aaa552-6"},{"uid":"79aaa552-142"}],"importedBy":[{"uid":"79aaa552-10"}]},"79aaa552-10":{"id":"/Users/leto/github/merico-dev/table/node_modules/react/jsx-runtime.js","moduleParts":{"settings-form.umd.js":"79aaa552-11"},"imported":[{"uid":"79aaa552-139"},{"uid":"79aaa552-0"},{"uid":"79aaa552-4"},{"uid":"79aaa552-8"}],"importedBy":[{"uid":"79aaa552-68"},{"uid":"79aaa552-78"},{"uid":"79aaa552-72"},{"uid":"79aaa552-84"},{"uid":"79aaa552-90"},{"uid":"79aaa552-86"},{"uid":"79aaa552-94"},{"uid":"79aaa552-98"},{"uid":"79aaa552-102"},{"uid":"79aaa552-100"},{"uid":"79aaa552-106"},{"uid":"79aaa552-108"},{"uid":"79aaa552-112"},{"uid":"79aaa552-110"},{"uid":"79aaa552-42"},{"uid":"79aaa552-60"},{"uid":"79aaa552-66"},{"uid":"79aaa552-70"},{"uid":"79aaa552-76"},{"uid":"79aaa552-80"},{"uid":"79aaa552-88"},{"uid":"79aaa552-92"},{"uid":"79aaa552-44"},{"uid":"79aaa552-64"},{"uid":"79aaa552-46"},{"uid":"79aaa552-58"},{"uid":"79aaa552-74"},{"uid":"79aaa552-62"},{"uid":"79aaa552-54"}]},"79aaa552-12":{"id":"/Users/leto/github/merico-dev/table/shared/src/api-client/utils.ts","moduleParts":{"settings-form.umd.js":"79aaa552-13"},"imported":[{"uid":"79aaa552-143"}],"importedBy":[{"uid":"79aaa552-138"},{"uid":"79aaa552-14"}]},"79aaa552-14":{"id":"/Users/leto/github/merico-dev/table/shared/src/api-client/default-api-client.ts","moduleParts":{"settings-form.umd.js":"79aaa552-15"},"imported":[{"uid":"79aaa552-144"},{"uid":"79aaa552-12"},{"uid":"79aaa552-145"}],"importedBy":[{"uid":"79aaa552-138"}]},"79aaa552-16":{"id":"/Users/leto/github/merico-dev/table/shared/src/api-client/facade-api-client.ts","moduleParts":{"settings-form.umd.js":"79aaa552-17"},"imported":[],"importedBy":[{"uid":"79aaa552-138"}]},"79aaa552-18":{"id":"/src/api-caller/request.ts","moduleParts":{"settings-form.umd.js":"79aaa552-19"},"imported":[{"uid":"79aaa552-127"}],"importedBy":[{"uid":"79aaa552-114"},{"uid":"79aaa552-20"},{"uid":"79aaa552-22"},{"uid":"79aaa552-24"},{"uid":"79aaa552-26"},{"uid":"79aaa552-36"},{"uid":"79aaa552-58"}]},"79aaa552-20":{"id":"/src/api-caller/account.ts","moduleParts":{"settings-form.umd.js":"79aaa552-21"},"imported":[{"uid":"79aaa552-18"}],"importedBy":[{"uid":"79aaa552-38"}]},"79aaa552-22":{"id":"/src/api-caller/api-key.ts","moduleParts":{"settings-form.umd.js":"79aaa552-23"},"imported":[{"uid":"79aaa552-18"}],"importedBy":[{"uid":"79aaa552-38"}]},"79aaa552-24":{"id":"/src/api-caller/datasource.ts","moduleParts":{"settings-form.umd.js":"79aaa552-25"},"imported":[{"uid":"79aaa552-18"}],"importedBy":[{"uid":"79aaa552-38"}]},"79aaa552-26":{"id":"/src/api-caller/role.ts","moduleParts":{"settings-form.umd.js":"79aaa552-27"},"imported":[{"uid":"79aaa552-18"}],"importedBy":[{"uid":"79aaa552-38"}]},"79aaa552-28":{"id":"/Users/leto/github/merico-dev/table/node_modules/dayjs/esm/constant.js","moduleParts":{"settings-form.umd.js":"79aaa552-29"},"imported":[],"importedBy":[{"uid":"79aaa552-34"},{"uid":"79aaa552-32"}]},"79aaa552-30":{"id":"/Users/leto/github/merico-dev/table/node_modules/dayjs/esm/locale/en.js","moduleParts":{"settings-form.umd.js":"79aaa552-31"},"imported":[],"importedBy":[{"uid":"79aaa552-34"}]},"79aaa552-32":{"id":"/Users/leto/github/merico-dev/table/node_modules/dayjs/esm/utils.js","moduleParts":{"settings-form.umd.js":"79aaa552-33"},"imported":[{"uid":"79aaa552-28"}],"importedBy":[{"uid":"79aaa552-34"}]},"79aaa552-34":{"id":"/Users/leto/github/merico-dev/table/node_modules/dayjs/esm/index.js","moduleParts":{"settings-form.umd.js":"79aaa552-35"},"imported":[{"uid":"79aaa552-28"},{"uid":"79aaa552-30"},{"uid":"79aaa552-32"}],"importedBy":[{"uid":"79aaa552-36"}]},"79aaa552-36":{"id":"/src/api-caller/sql_snippet.ts","moduleParts":{"settings-form.umd.js":"79aaa552-37"},"imported":[{"uid":"79aaa552-34"},{"uid":"79aaa552-18"}],"importedBy":[{"uid":"79aaa552-38"}]},"79aaa552-38":{"id":"/src/api-caller/index.ts","moduleParts":{"settings-form.umd.js":"79aaa552-39"},"imported":[{"uid":"79aaa552-20"},{"uid":"79aaa552-22"},{"uid":"79aaa552-24"},{"uid":"79aaa552-26"},{"uid":"79aaa552-36"}],"importedBy":[{"uid":"79aaa552-68"},{"uid":"79aaa552-78"},{"uid":"79aaa552-72"},{"uid":"79aaa552-84"},{"uid":"79aaa552-90"},{"uid":"79aaa552-86"},{"uid":"79aaa552-98"},{"uid":"79aaa552-102"},{"uid":"79aaa552-100"},{"uid":"79aaa552-106"},{"uid":"79aaa552-108"},{"uid":"79aaa552-112"},{"uid":"79aaa552-110"},{"uid":"79aaa552-76"},{"uid":"79aaa552-80"},{"uid":"79aaa552-88"},{"uid":"79aaa552-92"}]},"79aaa552-40":{"id":"/src/datasource/styles.ts","moduleParts":{"settings-form.umd.js":"79aaa552-41"},"imported":[],"importedBy":[{"uid":"79aaa552-68"},{"uid":"79aaa552-78"},{"uid":"79aaa552-72"},{"uid":"79aaa552-42"},{"uid":"79aaa552-60"},{"uid":"79aaa552-66"},{"uid":"79aaa552-76"},{"uid":"79aaa552-74"}]},"79aaa552-42":{"id":"/src/datasource/add-data-source/db-permission-tips.tsx","moduleParts":{"settings-form.umd.js":"79aaa552-43"},"imported":[{"uid":"79aaa552-10"},{"uid":"79aaa552-128"},{"uid":"79aaa552-130"},{"uid":"79aaa552-132"},{"uid":"79aaa552-40"}],"importedBy":[{"uid":"79aaa552-68"}]},"79aaa552-44":{"id":"/src/components/minimal-mocaco-editor.tsx","moduleParts":{"settings-form.umd.js":"79aaa552-45"},"imported":[{"uid":"79aaa552-10"},{"uid":"79aaa552-140"}],"importedBy":[{"uid":"79aaa552-106"},{"uid":"79aaa552-108"},{"uid":"79aaa552-134"}]},"79aaa552-46":{"id":"/src/components/submit-form-button.tsx","moduleParts":{"settings-form.umd.js":"79aaa552-47"},"imported":[{"uid":"79aaa552-10"},{"uid":"79aaa552-128"},{"uid":"79aaa552-130"},{"uid":"79aaa552-132"}],"importedBy":[{"uid":"79aaa552-134"}]},"79aaa552-48":{"id":"/src/i18n/en.ts","moduleParts":{"settings-form.umd.js":"79aaa552-49"},"imported":[],"importedBy":[{"uid":"79aaa552-52"}]},"79aaa552-50":{"id":"/src/i18n/zh.ts","moduleParts":{"settings-form.umd.js":"79aaa552-51"},"imported":[],"importedBy":[{"uid":"79aaa552-52"}]},"79aaa552-52":{"id":"/src/i18n/i18n.ts","moduleParts":{"settings-form.umd.js":"79aaa552-53"},"imported":[{"uid":"79aaa552-146"},{"uid":"79aaa552-132"},{"uid":"79aaa552-147"},{"uid":"79aaa552-148"},{"uid":"79aaa552-48"},{"uid":"79aaa552-50"}],"importedBy":[{"uid":"79aaa552-54"}]},"79aaa552-54":{"id":"/src/i18n/i18next-context.tsx","moduleParts":{"settings-form.umd.js":"79aaa552-55"},"imported":[{"uid":"79aaa552-10"},{"uid":"79aaa552-131"},{"uid":"79aaa552-132"},{"uid":"79aaa552-52"}],"importedBy":[{"uid":"79aaa552-58"}]},"79aaa552-56":{"id":"/src/utils/load-monaco-editor.ts","moduleParts":{"settings-form.umd.js":"79aaa552-57"},"imported":[{"uid":"79aaa552-140"},{"uid":"79aaa552-131"}],"importedBy":[{"uid":"79aaa552-58"}]},"79aaa552-58":{"id":"/src/components/with-entry.tsx","moduleParts":{"settings-form.umd.js":"79aaa552-59"},"imported":[{"uid":"79aaa552-10"},{"uid":"79aaa552-131"},{"uid":"79aaa552-18"},{"uid":"79aaa552-54"},{"uid":"79aaa552-56"},{"uid":"79aaa552-128"}],"importedBy":[{"uid":"79aaa552-134"}]},"79aaa552-60":{"id":"/src/datasource/add-data-source/forms/database.tsx","moduleParts":{"settings-form.umd.js":"79aaa552-61"},"imported":[{"uid":"79aaa552-10"},{"uid":"79aaa552-128"},{"uid":"79aaa552-131"},{"uid":"79aaa552-136"},{"uid":"79aaa552-134"},{"uid":"79aaa552-40"},{"uid":"79aaa552-132"}],"importedBy":[{"uid":"79aaa552-68"}]},"79aaa552-62":{"id":"/src/datasource/components/function-string-field/function-string-editor.tsx","moduleParts":{"settings-form.umd.js":"79aaa552-63"},"imported":[{"uid":"79aaa552-10"},{"uid":"79aaa552-128"},{"uid":"79aaa552-140"}],"importedBy":[{"uid":"79aaa552-64"}]},"79aaa552-64":{"id":"/src/datasource/components/function-string-field/index.tsx","moduleParts":{"settings-form.umd.js":"79aaa552-65"},"imported":[{"uid":"79aaa552-10"},{"uid":"79aaa552-128"},{"uid":"79aaa552-130"},{"uid":"79aaa552-133"},{"uid":"79aaa552-131"},{"uid":"79aaa552-132"},{"uid":"79aaa552-62"}],"importedBy":[{"uid":"79aaa552-66"},{"uid":"79aaa552-74"}]},"79aaa552-66":{"id":"/src/datasource/add-data-source/forms/http.tsx","moduleParts":{"settings-form.umd.js":"79aaa552-67"},"imported":[{"uid":"79aaa552-10"},{"uid":"79aaa552-128"},{"uid":"79aaa552-136"},{"uid":"79aaa552-40"},{"uid":"79aaa552-64"},{"uid":"79aaa552-134"},{"uid":"79aaa552-132"}],"importedBy":[{"uid":"79aaa552-68"}]},"79aaa552-68":{"id":"/src/datasource/add-data-source/index.tsx","moduleParts":{"settings-form.umd.js":"79aaa552-69"},"imported":[{"uid":"79aaa552-10"},{"uid":"79aaa552-128"},{"uid":"79aaa552-129"},{"uid":"79aaa552-130"},{"uid":"79aaa552-131"},{"uid":"79aaa552-132"},{"uid":"79aaa552-38"},{"uid":"79aaa552-40"},{"uid":"79aaa552-42"},{"uid":"79aaa552-60"},{"uid":"79aaa552-66"}],"importedBy":[{"uid":"79aaa552-118"},{"uid":"79aaa552-78"}]},"79aaa552-70":{"id":"/src/datasource/components/data-source-icon.tsx","moduleParts":{"settings-form.umd.js":"79aaa552-71"},"imported":[{"uid":"79aaa552-10"},{"uid":"79aaa552-130"},{"uid":"79aaa552-128"}],"importedBy":[{"uid":"79aaa552-78"}]},"79aaa552-72":{"id":"/src/datasource/delete-data-source.tsx","moduleParts":{"settings-form.umd.js":"79aaa552-73"},"imported":[{"uid":"79aaa552-10"},{"uid":"79aaa552-128"},{"uid":"79aaa552-135"},{"uid":"79aaa552-129"},{"uid":"79aaa552-130"},{"uid":"79aaa552-132"},{"uid":"79aaa552-38"},{"uid":"79aaa552-40"}],"importedBy":[{"uid":"79aaa552-118"},{"uid":"79aaa552-78"}]},"79aaa552-74":{"id":"/src/datasource/edit-data-source/forms/http.tsx","moduleParts":{"settings-form.umd.js":"79aaa552-75"},"imported":[{"uid":"79aaa552-10"},{"uid":"79aaa552-128"},{"uid":"79aaa552-136"},{"uid":"79aaa552-132"},{"uid":"79aaa552-134"},{"uid":"79aaa552-64"},{"uid":"79aaa552-40"}],"importedBy":[{"uid":"79aaa552-76"}]},"79aaa552-76":{"id":"/src/datasource/edit-data-source/index.tsx","moduleParts":{"settings-form.umd.js":"79aaa552-77"},"imported":[{"uid":"79aaa552-10"},{"uid":"79aaa552-128"},{"uid":"79aaa552-129"},{"uid":"79aaa552-130"},{"uid":"79aaa552-131"},{"uid":"79aaa552-38"},{"uid":"79aaa552-40"},{"uid":"79aaa552-74"},{"uid":"79aaa552-132"}],"importedBy":[{"uid":"79aaa552-78"}]},"79aaa552-78":{"id":"/src/datasource/data-source-list.tsx","moduleParts":{"settings-form.umd.js":"79aaa552-79"},"imported":[{"uid":"79aaa552-10"},{"uid":"79aaa552-128"},{"uid":"79aaa552-133"},{"uid":"79aaa552-132"},{"uid":"79aaa552-38"},{"uid":"79aaa552-134"},{"uid":"79aaa552-68"},{"uid":"79aaa552-70"},{"uid":"79aaa552-72"},{"uid":"79aaa552-76"},{"uid":"79aaa552-40"}],"importedBy":[{"uid":"79aaa552-118"}]},"79aaa552-80":{"id":"/src/account/role-selector.tsx","moduleParts":{"settings-form.umd.js":"79aaa552-81"},"imported":[{"uid":"79aaa552-10"},{"uid":"79aaa552-128"},{"uid":"79aaa552-133"},{"uid":"79aaa552-131"},{"uid":"79aaa552-132"},{"uid":"79aaa552-38"}],"importedBy":[{"uid":"79aaa552-84"},{"uid":"79aaa552-98"},{"uid":"79aaa552-88"}]},"79aaa552-82":{"id":"/src/account/styles.ts","moduleParts":{"settings-form.umd.js":"79aaa552-83"},"imported":[],"importedBy":[{"uid":"79aaa552-84"},{"uid":"79aaa552-90"},{"uid":"79aaa552-86"},{"uid":"79aaa552-94"},{"uid":"79aaa552-88"},{"uid":"79aaa552-92"}]},"79aaa552-84":{"id":"/src/account/add-account.tsx","moduleParts":{"settings-form.umd.js":"79aaa552-85"},"imported":[{"uid":"79aaa552-10"},{"uid":"79aaa552-128"},{"uid":"79aaa552-129"},{"uid":"79aaa552-131"},{"uid":"79aaa552-136"},{"uid":"79aaa552-130"},{"uid":"79aaa552-38"},{"uid":"79aaa552-134"},{"uid":"79aaa552-80"},{"uid":"79aaa552-82"},{"uid":"79aaa552-132"}],"importedBy":[{"uid":"79aaa552-119"},{"uid":"79aaa552-90"}]},"79aaa552-86":{"id":"/src/account/delete-account.tsx","moduleParts":{"settings-form.umd.js":"79aaa552-87"},"imported":[{"uid":"79aaa552-10"},{"uid":"79aaa552-128"},{"uid":"79aaa552-135"},{"uid":"79aaa552-129"},{"uid":"79aaa552-130"},{"uid":"79aaa552-132"},{"uid":"79aaa552-38"},{"uid":"79aaa552-82"}],"importedBy":[{"uid":"79aaa552-119"},{"uid":"79aaa552-90"}]},"79aaa552-88":{"id":"/src/account/edit-account.tsx","moduleParts":{"settings-form.umd.js":"79aaa552-89"},"imported":[{"uid":"79aaa552-10"},{"uid":"79aaa552-128"},{"uid":"79aaa552-129"},{"uid":"79aaa552-130"},{"uid":"79aaa552-131"},{"uid":"79aaa552-136"},{"uid":"79aaa552-132"},{"uid":"79aaa552-38"},{"uid":"79aaa552-134"},{"uid":"79aaa552-80"},{"uid":"79aaa552-82"}],"importedBy":[{"uid":"79aaa552-90"}]},"79aaa552-90":{"id":"/src/account/account-list.tsx","moduleParts":{"settings-form.umd.js":"79aaa552-91"},"imported":[{"uid":"79aaa552-10"},{"uid":"79aaa552-128"},{"uid":"79aaa552-133"},{"uid":"79aaa552-132"},{"uid":"79aaa552-38"},{"uid":"79aaa552-134"},{"uid":"79aaa552-84"},{"uid":"79aaa552-86"},{"uid":"79aaa552-88"},{"uid":"79aaa552-82"}],"importedBy":[{"uid":"79aaa552-119"}]},"79aaa552-92":{"id":"/src/account/login/form.tsx","moduleParts":{"settings-form.umd.js":"79aaa552-93"},"imported":[{"uid":"79aaa552-10"},{"uid":"79aaa552-128"},{"uid":"79aaa552-129"},{"uid":"79aaa552-136"},{"uid":"79aaa552-38"},{"uid":"79aaa552-82"},{"uid":"79aaa552-134"},{"uid":"79aaa552-132"}],"importedBy":[{"uid":"79aaa552-94"}]},"79aaa552-94":{"id":"/src/account/login/index.tsx","moduleParts":{"settings-form.umd.js":"79aaa552-95"},"imported":[{"uid":"79aaa552-10"},{"uid":"79aaa552-128"},{"uid":"79aaa552-134"},{"uid":"79aaa552-82"},{"uid":"79aaa552-92"}],"importedBy":[{"uid":"79aaa552-119"}]},"79aaa552-96":{"id":"/src/api-key/styles.ts","moduleParts":{"settings-form.umd.js":"79aaa552-97"},"imported":[],"importedBy":[{"uid":"79aaa552-98"},{"uid":"79aaa552-102"},{"uid":"79aaa552-100"}]},"79aaa552-98":{"id":"/src/api-key/add-api-key.tsx","moduleParts":{"settings-form.umd.js":"79aaa552-99"},"imported":[{"uid":"79aaa552-10"},{"uid":"79aaa552-128"},{"uid":"79aaa552-135"},{"uid":"79aaa552-129"},{"uid":"79aaa552-131"},{"uid":"79aaa552-136"},{"uid":"79aaa552-80"},{"uid":"79aaa552-38"},{"uid":"79aaa552-134"},{"uid":"79aaa552-96"},{"uid":"79aaa552-132"},{"uid":"79aaa552-130"}],"importedBy":[{"uid":"79aaa552-120"},{"uid":"79aaa552-102"}]},"79aaa552-100":{"id":"/src/api-key/delete-api-key.tsx","moduleParts":{"settings-form.umd.js":"79aaa552-101"},"imported":[{"uid":"79aaa552-10"},{"uid":"79aaa552-128"},{"uid":"79aaa552-135"},{"uid":"79aaa552-129"},{"uid":"79aaa552-130"},{"uid":"79aaa552-132"},{"uid":"79aaa552-38"},{"uid":"79aaa552-96"}],"importedBy":[{"uid":"79aaa552-120"},{"uid":"79aaa552-102"}]},"79aaa552-102":{"id":"/src/api-key/api-key-list.tsx","moduleParts":{"settings-form.umd.js":"79aaa552-103"},"imported":[{"uid":"79aaa552-10"},{"uid":"79aaa552-128"},{"uid":"79aaa552-133"},{"uid":"79aaa552-132"},{"uid":"79aaa552-38"},{"uid":"79aaa552-134"},{"uid":"79aaa552-98"},{"uid":"79aaa552-100"},{"uid":"79aaa552-96"}],"importedBy":[{"uid":"79aaa552-120"}]},"79aaa552-104":{"id":"/src/sql_snippet/styles.ts","moduleParts":{"settings-form.umd.js":"79aaa552-105"},"imported":[],"importedBy":[{"uid":"79aaa552-106"},{"uid":"79aaa552-108"},{"uid":"79aaa552-112"},{"uid":"79aaa552-110"}]},"79aaa552-106":{"id":"/src/sql_snippet/add-sql_snippet.tsx","moduleParts":{"settings-form.umd.js":"79aaa552-107"},"imported":[{"uid":"79aaa552-10"},{"uid":"79aaa552-128"},{"uid":"79aaa552-129"},{"uid":"79aaa552-130"},{"uid":"79aaa552-131"},{"uid":"79aaa552-136"},{"uid":"79aaa552-132"},{"uid":"79aaa552-38"},{"uid":"79aaa552-134"},{"uid":"79aaa552-44"},{"uid":"79aaa552-104"}],"importedBy":[{"uid":"79aaa552-121"},{"uid":"79aaa552-112"}]},"79aaa552-108":{"id":"/src/sql_snippet/update-sql_snippet.tsx","moduleParts":{"settings-form.umd.js":"79aaa552-109"},"imported":[{"uid":"79aaa552-10"},{"uid":"79aaa552-128"},{"uid":"79aaa552-129"},{"uid":"79aaa552-130"},{"uid":"79aaa552-131"},{"uid":"79aaa552-136"},{"uid":"79aaa552-38"},{"uid":"79aaa552-44"},{"uid":"79aaa552-104"},{"uid":"79aaa552-134"},{"uid":"79aaa552-132"}],"importedBy":[{"uid":"79aaa552-121"},{"uid":"79aaa552-112"}]},"79aaa552-110":{"id":"/src/sql_snippet/delete-sql_snippet.tsx","moduleParts":{"settings-form.umd.js":"79aaa552-111"},"imported":[{"uid":"79aaa552-10"},{"uid":"79aaa552-128"},{"uid":"79aaa552-135"},{"uid":"79aaa552-129"},{"uid":"79aaa552-130"},{"uid":"79aaa552-132"},{"uid":"79aaa552-38"},{"uid":"79aaa552-104"}],"importedBy":[{"uid":"79aaa552-121"},{"uid":"79aaa552-112"}]},"79aaa552-112":{"id":"/src/sql_snippet/sql_snippet-list.tsx","moduleParts":{"settings-form.umd.js":"79aaa552-113"},"imported":[{"uid":"79aaa552-10"},{"uid":"79aaa552-128"},{"uid":"79aaa552-137"},{"uid":"79aaa552-133"},{"uid":"79aaa552-38"},{"uid":"79aaa552-106"},{"uid":"79aaa552-110"},{"uid":"79aaa552-104"},{"uid":"79aaa552-130"},{"uid":"79aaa552-132"},{"uid":"79aaa552-134"},{"uid":"79aaa552-108"}],"importedBy":[{"uid":"79aaa552-121"}]},"79aaa552-114":{"id":"/src/index.ts","moduleParts":{"settings-form.umd.js":"79aaa552-115"},"imported":[{"uid":"79aaa552-118"},{"uid":"79aaa552-119"},{"uid":"79aaa552-120"},{"uid":"79aaa552-121"},{"uid":"79aaa552-18"},{"uid":"79aaa552-122"},{"uid":"79aaa552-123"},{"uid":"79aaa552-124"},{"uid":"79aaa552-125"},{"uid":"79aaa552-126"},{"uid":"79aaa552-116","dynamic":true}],"importedBy":[],"isEntry":true},"79aaa552-116":{"id":"/package.json","moduleParts":{"settings-form.umd.js":"79aaa552-117"},"imported":[],"importedBy":[{"uid":"79aaa552-114"}]},"79aaa552-118":{"id":"/src/datasource/index.tsx","moduleParts":{},"imported":[{"uid":"79aaa552-68"},{"uid":"79aaa552-78"},{"uid":"79aaa552-72"}],"importedBy":[{"uid":"79aaa552-114"}]},"79aaa552-119":{"id":"/src/account/index.tsx","moduleParts":{},"imported":[{"uid":"79aaa552-84"},{"uid":"79aaa552-90"},{"uid":"79aaa552-86"},{"uid":"79aaa552-94"}],"importedBy":[{"uid":"79aaa552-114"}]},"79aaa552-120":{"id":"/src/api-key/index.tsx","moduleParts":{},"imported":[{"uid":"79aaa552-98"},{"uid":"79aaa552-102"},{"uid":"79aaa552-100"}],"importedBy":[{"uid":"79aaa552-114"}]},"79aaa552-121":{"id":"/src/sql_snippet/index.tsx","moduleParts":{},"imported":[{"uid":"79aaa552-106"},{"uid":"79aaa552-108"},{"uid":"79aaa552-112"},{"uid":"79aaa552-110"}],"importedBy":[{"uid":"79aaa552-114"}]},"79aaa552-122":{"id":"/src/api-caller/account.typed.ts","moduleParts":{},"imported":[],"importedBy":[{"uid":"79aaa552-114"}]},"79aaa552-123":{"id":"/src/api-caller/api-key.typed.ts","moduleParts":{},"imported":[],"importedBy":[{"uid":"79aaa552-114"}]},"79aaa552-124":{"id":"/src/api-caller/datasource.typed.ts","moduleParts":{},"imported":[],"importedBy":[{"uid":"79aaa552-114"}]},"79aaa552-125":{"id":"/src/api-caller/role.typed.ts","moduleParts":{},"imported":[],"importedBy":[{"uid":"79aaa552-114"}]},"79aaa552-126":{"id":"/src/api-caller/sql_snippet.typed.ts","moduleParts":{},"imported":[],"importedBy":[{"uid":"79aaa552-114"}]},"79aaa552-127":{"id":"/Users/leto/github/merico-dev/table/shared/src/index.ts","moduleParts":{},"imported":[{"uid":"79aaa552-138"}],"importedBy":[{"uid":"79aaa552-18"}]},"79aaa552-128":{"id":"@mantine/core","moduleParts":{},"imported":[],"importedBy":[{"uid":"79aaa552-68"},{"uid":"79aaa552-78"},{"uid":"79aaa552-72"},{"uid":"79aaa552-84"},{"uid":"79aaa552-90"},{"uid":"79aaa552-86"},{"uid":"79aaa552-94"},{"uid":"79aaa552-98"},{"uid":"79aaa552-102"},{"uid":"79aaa552-100"},{"uid":"79aaa552-106"},{"uid":"79aaa552-108"},{"uid":"79aaa552-112"},{"uid":"79aaa552-110"},{"uid":"79aaa552-42"},{"uid":"79aaa552-60"},{"uid":"79aaa552-66"},{"uid":"79aaa552-70"},{"uid":"79aaa552-76"},{"uid":"79aaa552-80"},{"uid":"79aaa552-88"},{"uid":"79aaa552-92"},{"uid":"79aaa552-64"},{"uid":"79aaa552-46"},{"uid":"79aaa552-58"},{"uid":"79aaa552-74"},{"uid":"79aaa552-62"}],"isExternal":true},"79aaa552-129":{"id":"@mantine/notifications","moduleParts":{},"imported":[],"importedBy":[{"uid":"79aaa552-68"},{"uid":"79aaa552-72"},{"uid":"79aaa552-84"},{"uid":"79aaa552-86"},{"uid":"79aaa552-98"},{"uid":"79aaa552-100"},{"uid":"79aaa552-106"},{"uid":"79aaa552-108"},{"uid":"79aaa552-110"},{"uid":"79aaa552-76"},{"uid":"79aaa552-88"},{"uid":"79aaa552-92"}],"isExternal":true},"79aaa552-130":{"id":"@tabler/icons-react","moduleParts":{},"imported":[],"importedBy":[{"uid":"79aaa552-68"},{"uid":"79aaa552-72"},{"uid":"79aaa552-84"},{"uid":"79aaa552-86"},{"uid":"79aaa552-98"},{"uid":"79aaa552-100"},{"uid":"79aaa552-106"},{"uid":"79aaa552-108"},{"uid":"79aaa552-112"},{"uid":"79aaa552-110"},{"uid":"79aaa552-42"},{"uid":"79aaa552-70"},{"uid":"79aaa552-76"},{"uid":"79aaa552-88"},{"uid":"79aaa552-64"},{"uid":"79aaa552-46"}],"isExternal":true},"79aaa552-131":{"id":"react","moduleParts":{},"imported":[],"importedBy":[{"uid":"79aaa552-68"},{"uid":"79aaa552-84"},{"uid":"79aaa552-98"},{"uid":"79aaa552-106"},{"uid":"79aaa552-108"},{"uid":"79aaa552-60"},{"uid":"79aaa552-76"},{"uid":"79aaa552-80"},{"uid":"79aaa552-88"},{"uid":"79aaa552-64"},{"uid":"79aaa552-58"},{"uid":"79aaa552-142"},{"uid":"79aaa552-54"},{"uid":"79aaa552-56"}],"isExternal":true},"79aaa552-132":{"id":"react-i18next","moduleParts":{},"imported":[],"importedBy":[{"uid":"79aaa552-68"},{"uid":"79aaa552-78"},{"uid":"79aaa552-72"},{"uid":"79aaa552-84"},{"uid":"79aaa552-90"},{"uid":"79aaa552-86"},{"uid":"79aaa552-98"},{"uid":"79aaa552-102"},{"uid":"79aaa552-100"},{"uid":"79aaa552-106"},{"uid":"79aaa552-108"},{"uid":"79aaa552-112"},{"uid":"79aaa552-110"},{"uid":"79aaa552-42"},{"uid":"79aaa552-60"},{"uid":"79aaa552-66"},{"uid":"79aaa552-76"},{"uid":"79aaa552-80"},{"uid":"79aaa552-88"},{"uid":"79aaa552-92"},{"uid":"79aaa552-64"},{"uid":"79aaa552-46"},{"uid":"79aaa552-74"},{"uid":"79aaa552-54"},{"uid":"79aaa552-52"}],"isExternal":true},"79aaa552-133":{"id":"ahooks","moduleParts":{},"imported":[],"importedBy":[{"uid":"79aaa552-78"},{"uid":"79aaa552-90"},{"uid":"79aaa552-102"},{"uid":"79aaa552-112"},{"uid":"79aaa552-80"},{"uid":"79aaa552-64"}],"isExternal":true},"79aaa552-134":{"id":"/src/components/index.ts","moduleParts":{},"imported":[{"uid":"79aaa552-44"},{"uid":"79aaa552-46"},{"uid":"79aaa552-58"}],"importedBy":[{"uid":"79aaa552-78"},{"uid":"79aaa552-84"},{"uid":"79aaa552-90"},{"uid":"79aaa552-94"},{"uid":"79aaa552-98"},{"uid":"79aaa552-102"},{"uid":"79aaa552-106"},{"uid":"79aaa552-108"},{"uid":"79aaa552-112"},{"uid":"79aaa552-60"},{"uid":"79aaa552-66"},{"uid":"79aaa552-88"},{"uid":"79aaa552-92"},{"uid":"79aaa552-74"}]},"79aaa552-135":{"id":"@mantine/modals","moduleParts":{},"imported":[],"importedBy":[{"uid":"79aaa552-72"},{"uid":"79aaa552-86"},{"uid":"79aaa552-98"},{"uid":"79aaa552-100"},{"uid":"79aaa552-110"}],"isExternal":true},"79aaa552-136":{"id":"react-hook-form","moduleParts":{},"imported":[],"importedBy":[{"uid":"79aaa552-84"},{"uid":"79aaa552-98"},{"uid":"79aaa552-106"},{"uid":"79aaa552-108"},{"uid":"79aaa552-60"},{"uid":"79aaa552-66"},{"uid":"79aaa552-88"},{"uid":"79aaa552-92"},{"uid":"79aaa552-74"}],"isExternal":true},"79aaa552-137":{"id":"@mantine/code-highlight","moduleParts":{},"imported":[],"importedBy":[{"uid":"79aaa552-112"}],"isExternal":true},"79aaa552-138":{"id":"/Users/leto/github/merico-dev/table/shared/src/api-client/index.ts","moduleParts":{},"imported":[{"uid":"79aaa552-141"},{"uid":"79aaa552-12"},{"uid":"79aaa552-14"},{"uid":"79aaa552-16"}],"importedBy":[{"uid":"79aaa552-127"}]},"79aaa552-139":{"id":"\u0000commonjsHelpers.js","moduleParts":{},"imported":[],"importedBy":[{"uid":"79aaa552-10"},{"uid":"79aaa552-4"},{"uid":"79aaa552-8"}]},"79aaa552-140":{"id":"@monaco-editor/react","moduleParts":{},"imported":[],"importedBy":[{"uid":"79aaa552-44"},{"uid":"79aaa552-62"},{"uid":"79aaa552-56"}],"isExternal":true},"79aaa552-141":{"id":"/Users/leto/github/merico-dev/table/shared/src/api-client/types.ts","moduleParts":{},"imported":[],"importedBy":[{"uid":"79aaa552-138"}]},"79aaa552-142":{"id":"\u0000react?commonjs-external","moduleParts":{},"imported":[{"uid":"79aaa552-131"}],"importedBy":[{"uid":"79aaa552-4"},{"uid":"79aaa552-8"}]},"79aaa552-143":{"id":"crypto-js","moduleParts":{},"imported":[],"importedBy":[{"uid":"79aaa552-12"}],"isExternal":true},"79aaa552-144":{"id":"lodash","moduleParts":{},"imported":[],"importedBy":[{"uid":"79aaa552-14"}],"isExternal":true},"79aaa552-145":{"id":"axios","moduleParts":{},"imported":[],"importedBy":[{"uid":"79aaa552-14"}],"isExternal":true},"79aaa552-146":{"id":"i18next","moduleParts":{},"imported":[],"importedBy":[{"uid":"79aaa552-52"}],"isExternal":true},"79aaa552-147":{"id":"i18next-browser-languagedetector","moduleParts":{},"imported":[],"importedBy":[{"uid":"79aaa552-52"}],"isExternal":true},"79aaa552-148":{"id":"intl-pluralrules","moduleParts":{},"imported":[],"importedBy":[{"uid":"79aaa552-52"}],"isExternal":true}},"env":{"rollup":"3.29.4"},"options":{"gzip":false,"brotli":false,"sourcemap":false}};
4825
+ const data = {"version":2,"tree":{"name":"root","children":[{"name":"settings-form.umd.js","children":[{"name":"\u0000/Users/leto/github/merico-dev/table/node_modules/react","children":[{"uid":"481d9154-1","name":"jsx-runtime.js?commonjs-module"},{"name":"cjs","children":[{"uid":"481d9154-3","name":"react-jsx-runtime.production.min.js?commonjs-exports"},{"uid":"481d9154-7","name":"react-jsx-runtime.development.js?commonjs-exports"}]}]},{"name":"Users/leto/github/merico-dev/table","children":[{"name":"node_modules","children":[{"name":"react","children":[{"name":"cjs","children":[{"uid":"481d9154-5","name":"react-jsx-runtime.production.min.js"},{"uid":"481d9154-9","name":"react-jsx-runtime.development.js"}]},{"uid":"481d9154-11","name":"jsx-runtime.js"}]},{"name":"dayjs/esm","children":[{"uid":"481d9154-29","name":"constant.js"},{"name":"locale/en.js","uid":"481d9154-31"},{"uid":"481d9154-33","name":"utils.js"},{"uid":"481d9154-35","name":"index.js"}]}]},{"name":"shared/src/api-client","children":[{"uid":"481d9154-13","name":"utils.ts"},{"uid":"481d9154-15","name":"default-api-client.ts"},{"uid":"481d9154-17","name":"facade-api-client.ts"}]}]},{"name":"src","children":[{"name":"api-caller","children":[{"uid":"481d9154-19","name":"request.ts"},{"uid":"481d9154-21","name":"account.ts"},{"uid":"481d9154-23","name":"api-key.ts"},{"uid":"481d9154-25","name":"datasource.ts"},{"uid":"481d9154-27","name":"role.ts"},{"uid":"481d9154-37","name":"sql_snippet.ts"},{"uid":"481d9154-39","name":"index.ts"}]},{"name":"datasource","children":[{"uid":"481d9154-41","name":"styles.ts"},{"name":"add-data-source","children":[{"uid":"481d9154-43","name":"db-permission-tips.tsx"},{"name":"forms","children":[{"uid":"481d9154-61","name":"database.tsx"},{"uid":"481d9154-67","name":"http.tsx"}]},{"uid":"481d9154-69","name":"index.tsx"}]},{"name":"components","children":[{"name":"function-string-field","children":[{"uid":"481d9154-63","name":"function-string-editor.tsx"},{"uid":"481d9154-65","name":"index.tsx"}]},{"uid":"481d9154-71","name":"data-source-icon.tsx"}]},{"uid":"481d9154-73","name":"delete-data-source.tsx"},{"name":"edit-data-source","children":[{"name":"forms/http.tsx","uid":"481d9154-75"},{"uid":"481d9154-77","name":"index.tsx"}]},{"uid":"481d9154-79","name":"data-source-list.tsx"}]},{"name":"components","children":[{"uid":"481d9154-45","name":"minimal-mocaco-editor.tsx"},{"uid":"481d9154-47","name":"submit-form-button.tsx"},{"uid":"481d9154-59","name":"with-entry.tsx"}]},{"name":"i18n","children":[{"uid":"481d9154-49","name":"en.ts"},{"uid":"481d9154-51","name":"zh.ts"},{"uid":"481d9154-53","name":"i18n.ts"},{"uid":"481d9154-55","name":"i18next-context.tsx"}]},{"name":"utils/load-monaco-editor.ts","uid":"481d9154-57"},{"name":"account","children":[{"uid":"481d9154-81","name":"role-selector.tsx"},{"uid":"481d9154-83","name":"styles.ts"},{"uid":"481d9154-85","name":"add-account.tsx"},{"uid":"481d9154-87","name":"delete-account.tsx"},{"uid":"481d9154-89","name":"edit-account.tsx"},{"uid":"481d9154-91","name":"account-list.tsx"},{"name":"login","children":[{"uid":"481d9154-93","name":"form.tsx"},{"uid":"481d9154-95","name":"index.tsx"}]}]},{"name":"api-key","children":[{"uid":"481d9154-97","name":"styles.ts"},{"uid":"481d9154-99","name":"add-api-key.tsx"},{"uid":"481d9154-101","name":"delete-api-key.tsx"},{"uid":"481d9154-103","name":"api-key-list.tsx"}]},{"name":"sql_snippet","children":[{"uid":"481d9154-105","name":"styles.ts"},{"uid":"481d9154-107","name":"add-sql_snippet.tsx"},{"uid":"481d9154-109","name":"update-sql_snippet.tsx"},{"uid":"481d9154-111","name":"delete-sql_snippet.tsx"},{"uid":"481d9154-113","name":"sql_snippet-list.tsx"}]},{"uid":"481d9154-115","name":"index.ts"}]},{"uid":"481d9154-117","name":"package.json"}]}],"isRoot":true},"nodeParts":{"481d9154-1":{"renderedLength":33,"gzipLength":0,"brotliLength":0,"metaUid":"481d9154-0"},"481d9154-3":{"renderedLength":42,"gzipLength":0,"brotliLength":0,"metaUid":"481d9154-2"},"481d9154-5":{"renderedLength":1217,"gzipLength":0,"brotliLength":0,"metaUid":"481d9154-4"},"481d9154-7":{"renderedLength":39,"gzipLength":0,"brotliLength":0,"metaUid":"481d9154-6"},"481d9154-9":{"renderedLength":46244,"gzipLength":0,"brotliLength":0,"metaUid":"481d9154-8"},"481d9154-11":{"renderedLength":237,"gzipLength":0,"brotliLength":0,"metaUid":"481d9154-10"},"481d9154-13":{"renderedLength":949,"gzipLength":0,"brotliLength":0,"metaUid":"481d9154-12"},"481d9154-15":{"renderedLength":2262,"gzipLength":0,"brotliLength":0,"metaUid":"481d9154-14"},"481d9154-17":{"renderedLength":422,"gzipLength":0,"brotliLength":0,"metaUid":"481d9154-16"},"481d9154-19":{"renderedLength":426,"gzipLength":0,"brotliLength":0,"metaUid":"481d9154-18"},"481d9154-21":{"renderedLength":1913,"gzipLength":0,"brotliLength":0,"metaUid":"481d9154-20"},"481d9154-23":{"renderedLength":641,"gzipLength":0,"brotliLength":0,"metaUid":"481d9154-22"},"481d9154-25":{"renderedLength":730,"gzipLength":0,"brotliLength":0,"metaUid":"481d9154-24"},"481d9154-27":{"renderedLength":132,"gzipLength":0,"brotliLength":0,"metaUid":"481d9154-26"},"481d9154-29":{"renderedLength":1011,"gzipLength":0,"brotliLength":0,"metaUid":"481d9154-28"},"481d9154-31":{"renderedLength":496,"gzipLength":0,"brotliLength":0,"metaUid":"481d9154-30"},"481d9154-33":{"renderedLength":1623,"gzipLength":0,"brotliLength":0,"metaUid":"481d9154-32"},"481d9154-35":{"renderedLength":14006,"gzipLength":0,"brotliLength":0,"metaUid":"481d9154-34"},"481d9154-37":{"renderedLength":1079,"gzipLength":0,"brotliLength":0,"metaUid":"481d9154-36"},"481d9154-39":{"renderedLength":94,"gzipLength":0,"brotliLength":0,"metaUid":"481d9154-38"},"481d9154-41":{"renderedLength":104,"gzipLength":0,"brotliLength":0,"metaUid":"481d9154-40"},"481d9154-43":{"renderedLength":570,"gzipLength":0,"brotliLength":0,"metaUid":"481d9154-42"},"481d9154-45":{"renderedLength":682,"gzipLength":0,"brotliLength":0,"metaUid":"481d9154-44"},"481d9154-47":{"renderedLength":370,"gzipLength":0,"brotliLength":0,"metaUid":"481d9154-46"},"481d9154-49":{"renderedLength":4266,"gzipLength":0,"brotliLength":0,"metaUid":"481d9154-48"},"481d9154-51":{"renderedLength":4276,"gzipLength":0,"brotliLength":0,"metaUid":"481d9154-50"},"481d9154-53":{"renderedLength":253,"gzipLength":0,"brotliLength":0,"metaUid":"481d9154-52"},"481d9154-55":{"renderedLength":246,"gzipLength":0,"brotliLength":0,"metaUid":"481d9154-54"},"481d9154-57":{"renderedLength":551,"gzipLength":0,"brotliLength":0,"metaUid":"481d9154-56"},"481d9154-59":{"renderedLength":625,"gzipLength":0,"brotliLength":0,"metaUid":"481d9154-58"},"481d9154-61":{"renderedLength":3109,"gzipLength":0,"brotliLength":0,"metaUid":"481d9154-60"},"481d9154-63":{"renderedLength":502,"gzipLength":0,"brotliLength":0,"metaUid":"481d9154-62"},"481d9154-65":{"renderedLength":2398,"gzipLength":0,"brotliLength":0,"metaUid":"481d9154-64"},"481d9154-67":{"renderedLength":2894,"gzipLength":0,"brotliLength":0,"metaUid":"481d9154-66"},"481d9154-69":{"renderedLength":3130,"gzipLength":0,"brotliLength":0,"metaUid":"481d9154-68"},"481d9154-71":{"renderedLength":809,"gzipLength":0,"brotliLength":0,"metaUid":"481d9154-70"},"481d9154-73":{"renderedLength":2217,"gzipLength":0,"brotliLength":0,"metaUid":"481d9154-72"},"481d9154-75":{"renderedLength":2514,"gzipLength":0,"brotliLength":0,"metaUid":"481d9154-74"},"481d9154-77":{"renderedLength":3551,"gzipLength":0,"brotliLength":0,"metaUid":"481d9154-76"},"481d9154-79":{"renderedLength":2641,"gzipLength":0,"brotliLength":0,"metaUid":"481d9154-78"},"481d9154-81":{"renderedLength":1553,"gzipLength":0,"brotliLength":0,"metaUid":"481d9154-80"},"481d9154-83":{"renderedLength":104,"gzipLength":0,"brotliLength":0,"metaUid":"481d9154-82"},"481d9154-85":{"renderedLength":3804,"gzipLength":0,"brotliLength":0,"metaUid":"481d9154-84"},"481d9154-87":{"renderedLength":1778,"gzipLength":0,"brotliLength":0,"metaUid":"481d9154-86"},"481d9154-89":{"renderedLength":4916,"gzipLength":0,"brotliLength":0,"metaUid":"481d9154-88"},"481d9154-91":{"renderedLength":3158,"gzipLength":0,"brotliLength":0,"metaUid":"481d9154-90"},"481d9154-93":{"renderedLength":2210,"gzipLength":0,"brotliLength":0,"metaUid":"481d9154-92"},"481d9154-95":{"renderedLength":397,"gzipLength":0,"brotliLength":0,"metaUid":"481d9154-94"},"481d9154-97":{"renderedLength":104,"gzipLength":0,"brotliLength":0,"metaUid":"481d9154-96"},"481d9154-99":{"renderedLength":4207,"gzipLength":0,"brotliLength":0,"metaUid":"481d9154-98"},"481d9154-101":{"renderedLength":1799,"gzipLength":0,"brotliLength":0,"metaUid":"481d9154-100"},"481d9154-103":{"renderedLength":3016,"gzipLength":0,"brotliLength":0,"metaUid":"481d9154-102"},"481d9154-105":{"renderedLength":102,"gzipLength":0,"brotliLength":0,"metaUid":"481d9154-104"},"481d9154-107":{"renderedLength":3370,"gzipLength":0,"brotliLength":0,"metaUid":"481d9154-106"},"481d9154-109":{"renderedLength":3409,"gzipLength":0,"brotliLength":0,"metaUid":"481d9154-108"},"481d9154-111":{"renderedLength":1808,"gzipLength":0,"brotliLength":0,"metaUid":"481d9154-110"},"481d9154-113":{"renderedLength":3839,"gzipLength":0,"brotliLength":0,"metaUid":"481d9154-112"},"481d9154-115":{"renderedLength":187,"gzipLength":0,"brotliLength":0,"metaUid":"481d9154-114"},"481d9154-117":{"renderedLength":28,"gzipLength":0,"brotliLength":0,"metaUid":"481d9154-116"}},"nodeMetas":{"481d9154-0":{"id":"\u0000/Users/leto/github/merico-dev/table/node_modules/react/jsx-runtime.js?commonjs-module","moduleParts":{"settings-form.umd.js":"481d9154-1"},"imported":[],"importedBy":[{"uid":"481d9154-10"}]},"481d9154-2":{"id":"\u0000/Users/leto/github/merico-dev/table/node_modules/react/cjs/react-jsx-runtime.production.min.js?commonjs-exports","moduleParts":{"settings-form.umd.js":"481d9154-3"},"imported":[],"importedBy":[{"uid":"481d9154-4"}]},"481d9154-4":{"id":"/Users/leto/github/merico-dev/table/node_modules/react/cjs/react-jsx-runtime.production.min.js","moduleParts":{"settings-form.umd.js":"481d9154-5"},"imported":[{"uid":"481d9154-139"},{"uid":"481d9154-2"},{"uid":"481d9154-142"}],"importedBy":[{"uid":"481d9154-10"}]},"481d9154-6":{"id":"\u0000/Users/leto/github/merico-dev/table/node_modules/react/cjs/react-jsx-runtime.development.js?commonjs-exports","moduleParts":{"settings-form.umd.js":"481d9154-7"},"imported":[],"importedBy":[{"uid":"481d9154-8"}]},"481d9154-8":{"id":"/Users/leto/github/merico-dev/table/node_modules/react/cjs/react-jsx-runtime.development.js","moduleParts":{"settings-form.umd.js":"481d9154-9"},"imported":[{"uid":"481d9154-139"},{"uid":"481d9154-6"},{"uid":"481d9154-142"}],"importedBy":[{"uid":"481d9154-10"}]},"481d9154-10":{"id":"/Users/leto/github/merico-dev/table/node_modules/react/jsx-runtime.js","moduleParts":{"settings-form.umd.js":"481d9154-11"},"imported":[{"uid":"481d9154-139"},{"uid":"481d9154-0"},{"uid":"481d9154-4"},{"uid":"481d9154-8"}],"importedBy":[{"uid":"481d9154-68"},{"uid":"481d9154-78"},{"uid":"481d9154-72"},{"uid":"481d9154-84"},{"uid":"481d9154-90"},{"uid":"481d9154-86"},{"uid":"481d9154-94"},{"uid":"481d9154-98"},{"uid":"481d9154-102"},{"uid":"481d9154-100"},{"uid":"481d9154-106"},{"uid":"481d9154-108"},{"uid":"481d9154-112"},{"uid":"481d9154-110"},{"uid":"481d9154-42"},{"uid":"481d9154-60"},{"uid":"481d9154-66"},{"uid":"481d9154-70"},{"uid":"481d9154-76"},{"uid":"481d9154-80"},{"uid":"481d9154-88"},{"uid":"481d9154-92"},{"uid":"481d9154-44"},{"uid":"481d9154-64"},{"uid":"481d9154-46"},{"uid":"481d9154-58"},{"uid":"481d9154-74"},{"uid":"481d9154-62"},{"uid":"481d9154-54"}]},"481d9154-12":{"id":"/Users/leto/github/merico-dev/table/shared/src/api-client/utils.ts","moduleParts":{"settings-form.umd.js":"481d9154-13"},"imported":[{"uid":"481d9154-143"}],"importedBy":[{"uid":"481d9154-138"},{"uid":"481d9154-14"}]},"481d9154-14":{"id":"/Users/leto/github/merico-dev/table/shared/src/api-client/default-api-client.ts","moduleParts":{"settings-form.umd.js":"481d9154-15"},"imported":[{"uid":"481d9154-144"},{"uid":"481d9154-12"},{"uid":"481d9154-145"}],"importedBy":[{"uid":"481d9154-138"}]},"481d9154-16":{"id":"/Users/leto/github/merico-dev/table/shared/src/api-client/facade-api-client.ts","moduleParts":{"settings-form.umd.js":"481d9154-17"},"imported":[],"importedBy":[{"uid":"481d9154-138"}]},"481d9154-18":{"id":"/src/api-caller/request.ts","moduleParts":{"settings-form.umd.js":"481d9154-19"},"imported":[{"uid":"481d9154-127"}],"importedBy":[{"uid":"481d9154-114"},{"uid":"481d9154-20"},{"uid":"481d9154-22"},{"uid":"481d9154-24"},{"uid":"481d9154-26"},{"uid":"481d9154-36"},{"uid":"481d9154-58"}]},"481d9154-20":{"id":"/src/api-caller/account.ts","moduleParts":{"settings-form.umd.js":"481d9154-21"},"imported":[{"uid":"481d9154-18"}],"importedBy":[{"uid":"481d9154-38"}]},"481d9154-22":{"id":"/src/api-caller/api-key.ts","moduleParts":{"settings-form.umd.js":"481d9154-23"},"imported":[{"uid":"481d9154-18"}],"importedBy":[{"uid":"481d9154-38"}]},"481d9154-24":{"id":"/src/api-caller/datasource.ts","moduleParts":{"settings-form.umd.js":"481d9154-25"},"imported":[{"uid":"481d9154-18"}],"importedBy":[{"uid":"481d9154-38"}]},"481d9154-26":{"id":"/src/api-caller/role.ts","moduleParts":{"settings-form.umd.js":"481d9154-27"},"imported":[{"uid":"481d9154-18"}],"importedBy":[{"uid":"481d9154-38"}]},"481d9154-28":{"id":"/Users/leto/github/merico-dev/table/node_modules/dayjs/esm/constant.js","moduleParts":{"settings-form.umd.js":"481d9154-29"},"imported":[],"importedBy":[{"uid":"481d9154-34"},{"uid":"481d9154-32"}]},"481d9154-30":{"id":"/Users/leto/github/merico-dev/table/node_modules/dayjs/esm/locale/en.js","moduleParts":{"settings-form.umd.js":"481d9154-31"},"imported":[],"importedBy":[{"uid":"481d9154-34"}]},"481d9154-32":{"id":"/Users/leto/github/merico-dev/table/node_modules/dayjs/esm/utils.js","moduleParts":{"settings-form.umd.js":"481d9154-33"},"imported":[{"uid":"481d9154-28"}],"importedBy":[{"uid":"481d9154-34"}]},"481d9154-34":{"id":"/Users/leto/github/merico-dev/table/node_modules/dayjs/esm/index.js","moduleParts":{"settings-form.umd.js":"481d9154-35"},"imported":[{"uid":"481d9154-28"},{"uid":"481d9154-30"},{"uid":"481d9154-32"}],"importedBy":[{"uid":"481d9154-36"}]},"481d9154-36":{"id":"/src/api-caller/sql_snippet.ts","moduleParts":{"settings-form.umd.js":"481d9154-37"},"imported":[{"uid":"481d9154-34"},{"uid":"481d9154-18"}],"importedBy":[{"uid":"481d9154-38"}]},"481d9154-38":{"id":"/src/api-caller/index.ts","moduleParts":{"settings-form.umd.js":"481d9154-39"},"imported":[{"uid":"481d9154-20"},{"uid":"481d9154-22"},{"uid":"481d9154-24"},{"uid":"481d9154-26"},{"uid":"481d9154-36"}],"importedBy":[{"uid":"481d9154-68"},{"uid":"481d9154-78"},{"uid":"481d9154-72"},{"uid":"481d9154-84"},{"uid":"481d9154-90"},{"uid":"481d9154-86"},{"uid":"481d9154-98"},{"uid":"481d9154-102"},{"uid":"481d9154-100"},{"uid":"481d9154-106"},{"uid":"481d9154-108"},{"uid":"481d9154-112"},{"uid":"481d9154-110"},{"uid":"481d9154-76"},{"uid":"481d9154-80"},{"uid":"481d9154-88"},{"uid":"481d9154-92"}]},"481d9154-40":{"id":"/src/datasource/styles.ts","moduleParts":{"settings-form.umd.js":"481d9154-41"},"imported":[],"importedBy":[{"uid":"481d9154-68"},{"uid":"481d9154-78"},{"uid":"481d9154-72"},{"uid":"481d9154-42"},{"uid":"481d9154-60"},{"uid":"481d9154-66"},{"uid":"481d9154-76"},{"uid":"481d9154-74"}]},"481d9154-42":{"id":"/src/datasource/add-data-source/db-permission-tips.tsx","moduleParts":{"settings-form.umd.js":"481d9154-43"},"imported":[{"uid":"481d9154-10"},{"uid":"481d9154-128"},{"uid":"481d9154-130"},{"uid":"481d9154-132"},{"uid":"481d9154-40"}],"importedBy":[{"uid":"481d9154-68"}]},"481d9154-44":{"id":"/src/components/minimal-mocaco-editor.tsx","moduleParts":{"settings-form.umd.js":"481d9154-45"},"imported":[{"uid":"481d9154-10"},{"uid":"481d9154-140"}],"importedBy":[{"uid":"481d9154-106"},{"uid":"481d9154-108"},{"uid":"481d9154-134"}]},"481d9154-46":{"id":"/src/components/submit-form-button.tsx","moduleParts":{"settings-form.umd.js":"481d9154-47"},"imported":[{"uid":"481d9154-10"},{"uid":"481d9154-128"},{"uid":"481d9154-130"},{"uid":"481d9154-132"}],"importedBy":[{"uid":"481d9154-134"}]},"481d9154-48":{"id":"/src/i18n/en.ts","moduleParts":{"settings-form.umd.js":"481d9154-49"},"imported":[],"importedBy":[{"uid":"481d9154-52"}]},"481d9154-50":{"id":"/src/i18n/zh.ts","moduleParts":{"settings-form.umd.js":"481d9154-51"},"imported":[],"importedBy":[{"uid":"481d9154-52"}]},"481d9154-52":{"id":"/src/i18n/i18n.ts","moduleParts":{"settings-form.umd.js":"481d9154-53"},"imported":[{"uid":"481d9154-146"},{"uid":"481d9154-132"},{"uid":"481d9154-147"},{"uid":"481d9154-148"},{"uid":"481d9154-48"},{"uid":"481d9154-50"}],"importedBy":[{"uid":"481d9154-54"}]},"481d9154-54":{"id":"/src/i18n/i18next-context.tsx","moduleParts":{"settings-form.umd.js":"481d9154-55"},"imported":[{"uid":"481d9154-10"},{"uid":"481d9154-131"},{"uid":"481d9154-132"},{"uid":"481d9154-52"}],"importedBy":[{"uid":"481d9154-58"}]},"481d9154-56":{"id":"/src/utils/load-monaco-editor.ts","moduleParts":{"settings-form.umd.js":"481d9154-57"},"imported":[{"uid":"481d9154-140"},{"uid":"481d9154-131"}],"importedBy":[{"uid":"481d9154-58"}]},"481d9154-58":{"id":"/src/components/with-entry.tsx","moduleParts":{"settings-form.umd.js":"481d9154-59"},"imported":[{"uid":"481d9154-10"},{"uid":"481d9154-131"},{"uid":"481d9154-18"},{"uid":"481d9154-54"},{"uid":"481d9154-56"},{"uid":"481d9154-128"}],"importedBy":[{"uid":"481d9154-134"}]},"481d9154-60":{"id":"/src/datasource/add-data-source/forms/database.tsx","moduleParts":{"settings-form.umd.js":"481d9154-61"},"imported":[{"uid":"481d9154-10"},{"uid":"481d9154-128"},{"uid":"481d9154-131"},{"uid":"481d9154-136"},{"uid":"481d9154-134"},{"uid":"481d9154-40"},{"uid":"481d9154-132"}],"importedBy":[{"uid":"481d9154-68"}]},"481d9154-62":{"id":"/src/datasource/components/function-string-field/function-string-editor.tsx","moduleParts":{"settings-form.umd.js":"481d9154-63"},"imported":[{"uid":"481d9154-10"},{"uid":"481d9154-128"},{"uid":"481d9154-140"}],"importedBy":[{"uid":"481d9154-64"}]},"481d9154-64":{"id":"/src/datasource/components/function-string-field/index.tsx","moduleParts":{"settings-form.umd.js":"481d9154-65"},"imported":[{"uid":"481d9154-10"},{"uid":"481d9154-128"},{"uid":"481d9154-130"},{"uid":"481d9154-133"},{"uid":"481d9154-131"},{"uid":"481d9154-132"},{"uid":"481d9154-62"}],"importedBy":[{"uid":"481d9154-66"},{"uid":"481d9154-74"}]},"481d9154-66":{"id":"/src/datasource/add-data-source/forms/http.tsx","moduleParts":{"settings-form.umd.js":"481d9154-67"},"imported":[{"uid":"481d9154-10"},{"uid":"481d9154-128"},{"uid":"481d9154-136"},{"uid":"481d9154-40"},{"uid":"481d9154-64"},{"uid":"481d9154-134"},{"uid":"481d9154-132"}],"importedBy":[{"uid":"481d9154-68"}]},"481d9154-68":{"id":"/src/datasource/add-data-source/index.tsx","moduleParts":{"settings-form.umd.js":"481d9154-69"},"imported":[{"uid":"481d9154-10"},{"uid":"481d9154-128"},{"uid":"481d9154-129"},{"uid":"481d9154-130"},{"uid":"481d9154-131"},{"uid":"481d9154-132"},{"uid":"481d9154-38"},{"uid":"481d9154-40"},{"uid":"481d9154-42"},{"uid":"481d9154-60"},{"uid":"481d9154-66"}],"importedBy":[{"uid":"481d9154-118"},{"uid":"481d9154-78"}]},"481d9154-70":{"id":"/src/datasource/components/data-source-icon.tsx","moduleParts":{"settings-form.umd.js":"481d9154-71"},"imported":[{"uid":"481d9154-10"},{"uid":"481d9154-130"},{"uid":"481d9154-128"}],"importedBy":[{"uid":"481d9154-78"}]},"481d9154-72":{"id":"/src/datasource/delete-data-source.tsx","moduleParts":{"settings-form.umd.js":"481d9154-73"},"imported":[{"uid":"481d9154-10"},{"uid":"481d9154-128"},{"uid":"481d9154-135"},{"uid":"481d9154-129"},{"uid":"481d9154-130"},{"uid":"481d9154-132"},{"uid":"481d9154-38"},{"uid":"481d9154-40"}],"importedBy":[{"uid":"481d9154-118"},{"uid":"481d9154-78"}]},"481d9154-74":{"id":"/src/datasource/edit-data-source/forms/http.tsx","moduleParts":{"settings-form.umd.js":"481d9154-75"},"imported":[{"uid":"481d9154-10"},{"uid":"481d9154-128"},{"uid":"481d9154-136"},{"uid":"481d9154-132"},{"uid":"481d9154-134"},{"uid":"481d9154-64"},{"uid":"481d9154-40"}],"importedBy":[{"uid":"481d9154-76"}]},"481d9154-76":{"id":"/src/datasource/edit-data-source/index.tsx","moduleParts":{"settings-form.umd.js":"481d9154-77"},"imported":[{"uid":"481d9154-10"},{"uid":"481d9154-128"},{"uid":"481d9154-129"},{"uid":"481d9154-130"},{"uid":"481d9154-131"},{"uid":"481d9154-38"},{"uid":"481d9154-40"},{"uid":"481d9154-74"},{"uid":"481d9154-132"}],"importedBy":[{"uid":"481d9154-78"}]},"481d9154-78":{"id":"/src/datasource/data-source-list.tsx","moduleParts":{"settings-form.umd.js":"481d9154-79"},"imported":[{"uid":"481d9154-10"},{"uid":"481d9154-128"},{"uid":"481d9154-133"},{"uid":"481d9154-132"},{"uid":"481d9154-38"},{"uid":"481d9154-134"},{"uid":"481d9154-68"},{"uid":"481d9154-70"},{"uid":"481d9154-72"},{"uid":"481d9154-76"},{"uid":"481d9154-40"}],"importedBy":[{"uid":"481d9154-118"}]},"481d9154-80":{"id":"/src/account/role-selector.tsx","moduleParts":{"settings-form.umd.js":"481d9154-81"},"imported":[{"uid":"481d9154-10"},{"uid":"481d9154-128"},{"uid":"481d9154-133"},{"uid":"481d9154-131"},{"uid":"481d9154-132"},{"uid":"481d9154-38"}],"importedBy":[{"uid":"481d9154-84"},{"uid":"481d9154-98"},{"uid":"481d9154-88"}]},"481d9154-82":{"id":"/src/account/styles.ts","moduleParts":{"settings-form.umd.js":"481d9154-83"},"imported":[],"importedBy":[{"uid":"481d9154-84"},{"uid":"481d9154-90"},{"uid":"481d9154-86"},{"uid":"481d9154-94"},{"uid":"481d9154-88"},{"uid":"481d9154-92"}]},"481d9154-84":{"id":"/src/account/add-account.tsx","moduleParts":{"settings-form.umd.js":"481d9154-85"},"imported":[{"uid":"481d9154-10"},{"uid":"481d9154-128"},{"uid":"481d9154-129"},{"uid":"481d9154-131"},{"uid":"481d9154-136"},{"uid":"481d9154-130"},{"uid":"481d9154-38"},{"uid":"481d9154-134"},{"uid":"481d9154-80"},{"uid":"481d9154-82"},{"uid":"481d9154-132"}],"importedBy":[{"uid":"481d9154-119"},{"uid":"481d9154-90"}]},"481d9154-86":{"id":"/src/account/delete-account.tsx","moduleParts":{"settings-form.umd.js":"481d9154-87"},"imported":[{"uid":"481d9154-10"},{"uid":"481d9154-128"},{"uid":"481d9154-135"},{"uid":"481d9154-129"},{"uid":"481d9154-130"},{"uid":"481d9154-132"},{"uid":"481d9154-38"},{"uid":"481d9154-82"}],"importedBy":[{"uid":"481d9154-119"},{"uid":"481d9154-90"}]},"481d9154-88":{"id":"/src/account/edit-account.tsx","moduleParts":{"settings-form.umd.js":"481d9154-89"},"imported":[{"uid":"481d9154-10"},{"uid":"481d9154-128"},{"uid":"481d9154-129"},{"uid":"481d9154-130"},{"uid":"481d9154-131"},{"uid":"481d9154-136"},{"uid":"481d9154-132"},{"uid":"481d9154-38"},{"uid":"481d9154-134"},{"uid":"481d9154-80"},{"uid":"481d9154-82"}],"importedBy":[{"uid":"481d9154-90"}]},"481d9154-90":{"id":"/src/account/account-list.tsx","moduleParts":{"settings-form.umd.js":"481d9154-91"},"imported":[{"uid":"481d9154-10"},{"uid":"481d9154-128"},{"uid":"481d9154-133"},{"uid":"481d9154-132"},{"uid":"481d9154-38"},{"uid":"481d9154-134"},{"uid":"481d9154-84"},{"uid":"481d9154-86"},{"uid":"481d9154-88"},{"uid":"481d9154-82"}],"importedBy":[{"uid":"481d9154-119"}]},"481d9154-92":{"id":"/src/account/login/form.tsx","moduleParts":{"settings-form.umd.js":"481d9154-93"},"imported":[{"uid":"481d9154-10"},{"uid":"481d9154-128"},{"uid":"481d9154-129"},{"uid":"481d9154-136"},{"uid":"481d9154-38"},{"uid":"481d9154-82"},{"uid":"481d9154-134"},{"uid":"481d9154-132"}],"importedBy":[{"uid":"481d9154-94"}]},"481d9154-94":{"id":"/src/account/login/index.tsx","moduleParts":{"settings-form.umd.js":"481d9154-95"},"imported":[{"uid":"481d9154-10"},{"uid":"481d9154-128"},{"uid":"481d9154-134"},{"uid":"481d9154-82"},{"uid":"481d9154-92"}],"importedBy":[{"uid":"481d9154-119"}]},"481d9154-96":{"id":"/src/api-key/styles.ts","moduleParts":{"settings-form.umd.js":"481d9154-97"},"imported":[],"importedBy":[{"uid":"481d9154-98"},{"uid":"481d9154-102"},{"uid":"481d9154-100"}]},"481d9154-98":{"id":"/src/api-key/add-api-key.tsx","moduleParts":{"settings-form.umd.js":"481d9154-99"},"imported":[{"uid":"481d9154-10"},{"uid":"481d9154-128"},{"uid":"481d9154-135"},{"uid":"481d9154-129"},{"uid":"481d9154-131"},{"uid":"481d9154-136"},{"uid":"481d9154-80"},{"uid":"481d9154-38"},{"uid":"481d9154-134"},{"uid":"481d9154-96"},{"uid":"481d9154-132"},{"uid":"481d9154-130"}],"importedBy":[{"uid":"481d9154-120"},{"uid":"481d9154-102"}]},"481d9154-100":{"id":"/src/api-key/delete-api-key.tsx","moduleParts":{"settings-form.umd.js":"481d9154-101"},"imported":[{"uid":"481d9154-10"},{"uid":"481d9154-128"},{"uid":"481d9154-135"},{"uid":"481d9154-129"},{"uid":"481d9154-130"},{"uid":"481d9154-132"},{"uid":"481d9154-38"},{"uid":"481d9154-96"}],"importedBy":[{"uid":"481d9154-120"},{"uid":"481d9154-102"}]},"481d9154-102":{"id":"/src/api-key/api-key-list.tsx","moduleParts":{"settings-form.umd.js":"481d9154-103"},"imported":[{"uid":"481d9154-10"},{"uid":"481d9154-128"},{"uid":"481d9154-133"},{"uid":"481d9154-132"},{"uid":"481d9154-38"},{"uid":"481d9154-134"},{"uid":"481d9154-98"},{"uid":"481d9154-100"},{"uid":"481d9154-96"}],"importedBy":[{"uid":"481d9154-120"}]},"481d9154-104":{"id":"/src/sql_snippet/styles.ts","moduleParts":{"settings-form.umd.js":"481d9154-105"},"imported":[],"importedBy":[{"uid":"481d9154-106"},{"uid":"481d9154-108"},{"uid":"481d9154-112"},{"uid":"481d9154-110"}]},"481d9154-106":{"id":"/src/sql_snippet/add-sql_snippet.tsx","moduleParts":{"settings-form.umd.js":"481d9154-107"},"imported":[{"uid":"481d9154-10"},{"uid":"481d9154-128"},{"uid":"481d9154-129"},{"uid":"481d9154-130"},{"uid":"481d9154-131"},{"uid":"481d9154-136"},{"uid":"481d9154-132"},{"uid":"481d9154-38"},{"uid":"481d9154-134"},{"uid":"481d9154-44"},{"uid":"481d9154-104"}],"importedBy":[{"uid":"481d9154-121"},{"uid":"481d9154-112"}]},"481d9154-108":{"id":"/src/sql_snippet/update-sql_snippet.tsx","moduleParts":{"settings-form.umd.js":"481d9154-109"},"imported":[{"uid":"481d9154-10"},{"uid":"481d9154-128"},{"uid":"481d9154-129"},{"uid":"481d9154-130"},{"uid":"481d9154-131"},{"uid":"481d9154-136"},{"uid":"481d9154-38"},{"uid":"481d9154-44"},{"uid":"481d9154-104"},{"uid":"481d9154-134"},{"uid":"481d9154-132"}],"importedBy":[{"uid":"481d9154-121"},{"uid":"481d9154-112"}]},"481d9154-110":{"id":"/src/sql_snippet/delete-sql_snippet.tsx","moduleParts":{"settings-form.umd.js":"481d9154-111"},"imported":[{"uid":"481d9154-10"},{"uid":"481d9154-128"},{"uid":"481d9154-135"},{"uid":"481d9154-129"},{"uid":"481d9154-130"},{"uid":"481d9154-132"},{"uid":"481d9154-38"},{"uid":"481d9154-104"}],"importedBy":[{"uid":"481d9154-121"},{"uid":"481d9154-112"}]},"481d9154-112":{"id":"/src/sql_snippet/sql_snippet-list.tsx","moduleParts":{"settings-form.umd.js":"481d9154-113"},"imported":[{"uid":"481d9154-10"},{"uid":"481d9154-128"},{"uid":"481d9154-137"},{"uid":"481d9154-133"},{"uid":"481d9154-38"},{"uid":"481d9154-106"},{"uid":"481d9154-110"},{"uid":"481d9154-104"},{"uid":"481d9154-130"},{"uid":"481d9154-132"},{"uid":"481d9154-134"},{"uid":"481d9154-108"}],"importedBy":[{"uid":"481d9154-121"}]},"481d9154-114":{"id":"/src/index.ts","moduleParts":{"settings-form.umd.js":"481d9154-115"},"imported":[{"uid":"481d9154-118"},{"uid":"481d9154-119"},{"uid":"481d9154-120"},{"uid":"481d9154-121"},{"uid":"481d9154-18"},{"uid":"481d9154-122"},{"uid":"481d9154-123"},{"uid":"481d9154-124"},{"uid":"481d9154-125"},{"uid":"481d9154-126"},{"uid":"481d9154-116","dynamic":true}],"importedBy":[],"isEntry":true},"481d9154-116":{"id":"/package.json","moduleParts":{"settings-form.umd.js":"481d9154-117"},"imported":[],"importedBy":[{"uid":"481d9154-114"}]},"481d9154-118":{"id":"/src/datasource/index.tsx","moduleParts":{},"imported":[{"uid":"481d9154-68"},{"uid":"481d9154-78"},{"uid":"481d9154-72"}],"importedBy":[{"uid":"481d9154-114"}]},"481d9154-119":{"id":"/src/account/index.tsx","moduleParts":{},"imported":[{"uid":"481d9154-84"},{"uid":"481d9154-90"},{"uid":"481d9154-86"},{"uid":"481d9154-94"}],"importedBy":[{"uid":"481d9154-114"}]},"481d9154-120":{"id":"/src/api-key/index.tsx","moduleParts":{},"imported":[{"uid":"481d9154-98"},{"uid":"481d9154-102"},{"uid":"481d9154-100"}],"importedBy":[{"uid":"481d9154-114"}]},"481d9154-121":{"id":"/src/sql_snippet/index.tsx","moduleParts":{},"imported":[{"uid":"481d9154-106"},{"uid":"481d9154-108"},{"uid":"481d9154-112"},{"uid":"481d9154-110"}],"importedBy":[{"uid":"481d9154-114"}]},"481d9154-122":{"id":"/src/api-caller/account.typed.ts","moduleParts":{},"imported":[],"importedBy":[{"uid":"481d9154-114"}]},"481d9154-123":{"id":"/src/api-caller/api-key.typed.ts","moduleParts":{},"imported":[],"importedBy":[{"uid":"481d9154-114"}]},"481d9154-124":{"id":"/src/api-caller/datasource.typed.ts","moduleParts":{},"imported":[],"importedBy":[{"uid":"481d9154-114"}]},"481d9154-125":{"id":"/src/api-caller/role.typed.ts","moduleParts":{},"imported":[],"importedBy":[{"uid":"481d9154-114"}]},"481d9154-126":{"id":"/src/api-caller/sql_snippet.typed.ts","moduleParts":{},"imported":[],"importedBy":[{"uid":"481d9154-114"}]},"481d9154-127":{"id":"/Users/leto/github/merico-dev/table/shared/src/index.ts","moduleParts":{},"imported":[{"uid":"481d9154-138"}],"importedBy":[{"uid":"481d9154-18"}]},"481d9154-128":{"id":"@mantine/core","moduleParts":{},"imported":[],"importedBy":[{"uid":"481d9154-68"},{"uid":"481d9154-78"},{"uid":"481d9154-72"},{"uid":"481d9154-84"},{"uid":"481d9154-90"},{"uid":"481d9154-86"},{"uid":"481d9154-94"},{"uid":"481d9154-98"},{"uid":"481d9154-102"},{"uid":"481d9154-100"},{"uid":"481d9154-106"},{"uid":"481d9154-108"},{"uid":"481d9154-112"},{"uid":"481d9154-110"},{"uid":"481d9154-42"},{"uid":"481d9154-60"},{"uid":"481d9154-66"},{"uid":"481d9154-70"},{"uid":"481d9154-76"},{"uid":"481d9154-80"},{"uid":"481d9154-88"},{"uid":"481d9154-92"},{"uid":"481d9154-64"},{"uid":"481d9154-46"},{"uid":"481d9154-58"},{"uid":"481d9154-74"},{"uid":"481d9154-62"}],"isExternal":true},"481d9154-129":{"id":"@mantine/notifications","moduleParts":{},"imported":[],"importedBy":[{"uid":"481d9154-68"},{"uid":"481d9154-72"},{"uid":"481d9154-84"},{"uid":"481d9154-86"},{"uid":"481d9154-98"},{"uid":"481d9154-100"},{"uid":"481d9154-106"},{"uid":"481d9154-108"},{"uid":"481d9154-110"},{"uid":"481d9154-76"},{"uid":"481d9154-88"},{"uid":"481d9154-92"}],"isExternal":true},"481d9154-130":{"id":"@tabler/icons-react","moduleParts":{},"imported":[],"importedBy":[{"uid":"481d9154-68"},{"uid":"481d9154-72"},{"uid":"481d9154-84"},{"uid":"481d9154-86"},{"uid":"481d9154-98"},{"uid":"481d9154-100"},{"uid":"481d9154-106"},{"uid":"481d9154-108"},{"uid":"481d9154-112"},{"uid":"481d9154-110"},{"uid":"481d9154-42"},{"uid":"481d9154-70"},{"uid":"481d9154-76"},{"uid":"481d9154-88"},{"uid":"481d9154-64"},{"uid":"481d9154-46"}],"isExternal":true},"481d9154-131":{"id":"react","moduleParts":{},"imported":[],"importedBy":[{"uid":"481d9154-68"},{"uid":"481d9154-84"},{"uid":"481d9154-98"},{"uid":"481d9154-106"},{"uid":"481d9154-108"},{"uid":"481d9154-60"},{"uid":"481d9154-76"},{"uid":"481d9154-80"},{"uid":"481d9154-88"},{"uid":"481d9154-64"},{"uid":"481d9154-58"},{"uid":"481d9154-142"},{"uid":"481d9154-54"},{"uid":"481d9154-56"}],"isExternal":true},"481d9154-132":{"id":"react-i18next","moduleParts":{},"imported":[],"importedBy":[{"uid":"481d9154-68"},{"uid":"481d9154-78"},{"uid":"481d9154-72"},{"uid":"481d9154-84"},{"uid":"481d9154-90"},{"uid":"481d9154-86"},{"uid":"481d9154-98"},{"uid":"481d9154-102"},{"uid":"481d9154-100"},{"uid":"481d9154-106"},{"uid":"481d9154-108"},{"uid":"481d9154-112"},{"uid":"481d9154-110"},{"uid":"481d9154-42"},{"uid":"481d9154-60"},{"uid":"481d9154-66"},{"uid":"481d9154-76"},{"uid":"481d9154-80"},{"uid":"481d9154-88"},{"uid":"481d9154-92"},{"uid":"481d9154-64"},{"uid":"481d9154-46"},{"uid":"481d9154-74"},{"uid":"481d9154-54"},{"uid":"481d9154-52"}],"isExternal":true},"481d9154-133":{"id":"ahooks","moduleParts":{},"imported":[],"importedBy":[{"uid":"481d9154-78"},{"uid":"481d9154-90"},{"uid":"481d9154-102"},{"uid":"481d9154-112"},{"uid":"481d9154-80"},{"uid":"481d9154-64"}],"isExternal":true},"481d9154-134":{"id":"/src/components/index.ts","moduleParts":{},"imported":[{"uid":"481d9154-44"},{"uid":"481d9154-46"},{"uid":"481d9154-58"}],"importedBy":[{"uid":"481d9154-78"},{"uid":"481d9154-84"},{"uid":"481d9154-90"},{"uid":"481d9154-94"},{"uid":"481d9154-98"},{"uid":"481d9154-102"},{"uid":"481d9154-106"},{"uid":"481d9154-108"},{"uid":"481d9154-112"},{"uid":"481d9154-60"},{"uid":"481d9154-66"},{"uid":"481d9154-88"},{"uid":"481d9154-92"},{"uid":"481d9154-74"}]},"481d9154-135":{"id":"@mantine/modals","moduleParts":{},"imported":[],"importedBy":[{"uid":"481d9154-72"},{"uid":"481d9154-86"},{"uid":"481d9154-98"},{"uid":"481d9154-100"},{"uid":"481d9154-110"}],"isExternal":true},"481d9154-136":{"id":"react-hook-form","moduleParts":{},"imported":[],"importedBy":[{"uid":"481d9154-84"},{"uid":"481d9154-98"},{"uid":"481d9154-106"},{"uid":"481d9154-108"},{"uid":"481d9154-60"},{"uid":"481d9154-66"},{"uid":"481d9154-88"},{"uid":"481d9154-92"},{"uid":"481d9154-74"}],"isExternal":true},"481d9154-137":{"id":"@mantine/code-highlight","moduleParts":{},"imported":[],"importedBy":[{"uid":"481d9154-112"}],"isExternal":true},"481d9154-138":{"id":"/Users/leto/github/merico-dev/table/shared/src/api-client/index.ts","moduleParts":{},"imported":[{"uid":"481d9154-141"},{"uid":"481d9154-12"},{"uid":"481d9154-14"},{"uid":"481d9154-16"}],"importedBy":[{"uid":"481d9154-127"}]},"481d9154-139":{"id":"\u0000commonjsHelpers.js","moduleParts":{},"imported":[],"importedBy":[{"uid":"481d9154-10"},{"uid":"481d9154-4"},{"uid":"481d9154-8"}]},"481d9154-140":{"id":"@monaco-editor/react","moduleParts":{},"imported":[],"importedBy":[{"uid":"481d9154-44"},{"uid":"481d9154-62"},{"uid":"481d9154-56"}],"isExternal":true},"481d9154-141":{"id":"/Users/leto/github/merico-dev/table/shared/src/api-client/types.ts","moduleParts":{},"imported":[],"importedBy":[{"uid":"481d9154-138"}]},"481d9154-142":{"id":"\u0000react?commonjs-external","moduleParts":{},"imported":[{"uid":"481d9154-131"}],"importedBy":[{"uid":"481d9154-4"},{"uid":"481d9154-8"}]},"481d9154-143":{"id":"crypto-js","moduleParts":{},"imported":[],"importedBy":[{"uid":"481d9154-12"}],"isExternal":true},"481d9154-144":{"id":"lodash","moduleParts":{},"imported":[],"importedBy":[{"uid":"481d9154-14"}],"isExternal":true},"481d9154-145":{"id":"axios","moduleParts":{},"imported":[],"importedBy":[{"uid":"481d9154-14"}],"isExternal":true},"481d9154-146":{"id":"i18next","moduleParts":{},"imported":[],"importedBy":[{"uid":"481d9154-52"}],"isExternal":true},"481d9154-147":{"id":"i18next-browser-languagedetector","moduleParts":{},"imported":[],"importedBy":[{"uid":"481d9154-52"}],"isExternal":true},"481d9154-148":{"id":"intl-pluralrules","moduleParts":{},"imported":[],"importedBy":[{"uid":"481d9154-52"}],"isExternal":true}},"env":{"rollup":"3.29.4"},"options":{"gzip":false,"brotli":false,"sourcemap":false}};
4826
4826
 
4827
4827
  const run = () => {
4828
4828
  const width = window.innerWidth;
package/dist/version.json CHANGED
@@ -1,4 +1,4 @@
1
1
  {
2
- "semver": "13.43.2",
3
- "version": "d987a067a754a2587c56a31f101df5ef47838c31"
2
+ "semver": "13.43.3",
3
+ "version": "07cb749d051ff01c625cc8c5b866f348ea08e40f"
4
4
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@devtable/settings-form",
3
- "version": "13.43.2",
3
+ "version": "13.43.3",
4
4
  "license": "Apache-2.0",
5
5
  "publishConfig": {
6
6
  "access": "public",