@devtable/settings-form 12.10.2 → 12.11.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,16 +1,17 @@
1
- import F, { useEffect as Ot, forwardRef as ut, useState as or, Component as Vr } from "react";
2
- import { Box as X, TextInput as Q, Divider as ct, Group as z, NumberInput as Wr, PasswordInput as dt, Button as D, Modal as xe, Stack as Ke, Alert as Kr, SegmentedControl as Zr, Tooltip as at, Text as ke, ActionIcon as Dt, LoadingOverlay as pt, Table as ft, Select as Xr, Switch as Qr, createStyles as lr, rem as Ve, useComponentDefaultProps as Jr, useMantineTheme as en, ScrollArea as ur, Tabs as gt, HoverCard as _t } from "@mantine/core";
1
+ import F, { useEffect as It, forwardRef as ct, useState as lr, Component as Wr } from "react";
2
+ import { Box as X, TextInput as Q, Divider as dt, Group as z, NumberInput as Kr, PasswordInput as pt, Button as I, Modal as xe, Stack as Ze, Alert as Zr, SegmentedControl as Xr, Tooltip as it, Text as ke, ActionIcon as Dt, LoadingOverlay as ft, Table as gt, Select as Qr, Switch as Jr, createStyles as ur, rem as We, useComponentDefaultProps as en, useMantineTheme as tn, ScrollArea as cr, Tabs as ht, HoverCard as At } from "@mantine/core";
3
3
  import { showNotification as oe, updateNotification as P } from "@mantine/notifications";
4
- import { Recycle as tn, AlertCircle as rn, PlaylistAdd as ht, Trash as mt, Edit as nn } from "tabler-icons-react";
5
- import * as an from "crypto-js";
6
- import sn from "axios";
4
+ import { Recycle as rn, AlertCircle as nn, PlaylistAdd as mt, Trash as bt, Edit as an } from "tabler-icons-react";
5
+ import * as sn from "crypto-js";
6
+ import on from "lodash";
7
+ import ln from "axios";
7
8
  import { useForm as me, Controller as R } from "react-hook-form";
8
- import { useBoolean as on, useRequest as Te } from "ahooks";
9
- import cr, { loader as At } from "@monaco-editor/react";
10
- import { useModals as Ze, closeAllModals as ln } from "@mantine/modals";
11
- import { IconLock as dr, IconEdit as Tt, IconNetwork as un, IconBrandMysql as cn, IconDatabase as dn, IconEye as pn } from "@tabler/icons-react";
12
- import { useClipboard as fn } from "@mantine/hooks";
13
- var jt = { exports: {} }, Ue = {};
9
+ import { IconDeviceFloppy as Pe, IconLock as dr, IconEdit as jt, IconNetwork as un, IconBrandMysql as cn, IconDatabase as dn, IconEye as pn } from "@tabler/icons-react";
10
+ import { useBoolean as fn, useRequest as Te } from "ahooks";
11
+ import pr, { loader as kt } from "@monaco-editor/react";
12
+ import { useModals as Xe, closeAllModals as gn } from "@mantine/modals";
13
+ import { useClipboard as hn } from "@mantine/hooks";
14
+ var Ct = { exports: {} }, Ge = {};
14
15
  /**
15
16
  * @license React
16
17
  * react-jsx-runtime.production.min.js
@@ -20,11 +21,11 @@ var jt = { exports: {} }, Ue = {};
20
21
  * This source code is licensed under the MIT license found in the
21
22
  * LICENSE file in the root directory of this source tree.
22
23
  */
23
- var Xt;
24
- function gn() {
25
- if (Xt)
26
- return Ue;
27
- Xt = 1;
24
+ var Qt;
25
+ function mn() {
26
+ if (Qt)
27
+ return Ge;
28
+ Qt = 1;
28
29
  var e = F, t = Symbol.for("react.element"), r = Symbol.for("react.fragment"), n = Object.prototype.hasOwnProperty, i = e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, s = { key: !0, ref: !0, __self: !0, __source: !0 };
29
30
  function l(d, p, f) {
30
31
  var h, c = {}, u = null, g = null;
@@ -36,9 +37,9 @@ function gn() {
36
37
  c[h] === void 0 && (c[h] = p[h]);
37
38
  return { $$typeof: t, type: d, key: u, ref: g, props: c, _owner: i.current };
38
39
  }
39
- return Ue.Fragment = r, Ue.jsx = l, Ue.jsxs = l, Ue;
40
+ return Ge.Fragment = r, Ge.jsx = l, Ge.jsxs = l, Ge;
40
41
  }
41
- var Ge = {};
42
+ var He = {};
42
43
  /**
43
44
  * @license React
44
45
  * react-jsx-runtime.development.js
@@ -48,9 +49,9 @@ var Ge = {};
48
49
  * This source code is licensed under the MIT license found in the
49
50
  * LICENSE file in the root directory of this source tree.
50
51
  */
51
- var Qt;
52
- function hn() {
53
- return Qt || (Qt = 1, process.env.NODE_ENV !== "production" && function() {
52
+ var Jt;
53
+ function bn() {
54
+ return Jt || (Jt = 1, process.env.NODE_ENV !== "production" && function() {
54
55
  var e = F, t = Symbol.for("react.element"), r = Symbol.for("react.portal"), n = Symbol.for("react.fragment"), i = Symbol.for("react.strict_mode"), s = Symbol.for("react.profiler"), l = Symbol.for("react.provider"), d = Symbol.for("react.context"), p = Symbol.for("react.forward_ref"), f = Symbol.for("react.suspense"), h = Symbol.for("react.suspense_list"), c = Symbol.for("react.memo"), u = Symbol.for("react.lazy"), g = Symbol.for("react.offscreen"), v = Symbol.iterator, m = "@@iterator";
55
56
  function x(o) {
56
57
  if (o === null || typeof o != "object")
@@ -70,10 +71,10 @@ function hn() {
70
71
  {
71
72
  var A = w.ReactDebugCurrentFrame, C = A.getStackAddendum();
72
73
  C !== "" && (y += "%s", E = E.concat([C]));
73
- var I = E.map(function(j) {
74
+ var D = E.map(function(j) {
74
75
  return String(j);
75
76
  });
76
- I.unshift("Warning: " + y), Function.prototype.apply.call(console[o], console, I);
77
+ D.unshift("Warning: " + y), Function.prototype.apply.call(console[o], console, D);
77
78
  }
78
79
  }
79
80
  var k = !1, H = !1, J = !1, N = !1, q = !1, $;
@@ -130,9 +131,9 @@ function hn() {
130
131
  var A = o.displayName || null;
131
132
  return A !== null ? A : B(o.type) || "Memo";
132
133
  case u: {
133
- var C = o, I = C._payload, j = C._init;
134
+ var C = o, D = C._payload, j = C._init;
134
135
  try {
135
- return B(j(I));
136
+ return B(j(D));
136
137
  } catch {
137
138
  return null;
138
139
  }
@@ -202,18 +203,18 @@ function hn() {
202
203
  M < 0 && S("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
203
204
  }
204
205
  }
205
- var ge = w.ReactCurrentDispatcher, Me;
206
+ var ge = w.ReactCurrentDispatcher, Be;
206
207
  function je(o, y, E) {
207
208
  {
208
- if (Me === void 0)
209
+ if (Be === void 0)
209
210
  try {
210
211
  throw Error();
211
212
  } catch (C) {
212
213
  var A = C.stack.trim().match(/\n( *(at )?)/);
213
- Me = A && A[1] || "";
214
+ Be = A && A[1] || "";
214
215
  }
215
216
  return `
216
- ` + Me + o;
217
+ ` + Be + o;
217
218
  }
218
219
  }
219
220
  var Ce = !1, _e;
@@ -221,7 +222,7 @@ function hn() {
221
222
  var Re = typeof WeakMap == "function" ? WeakMap : Map;
222
223
  _e = new Re();
223
224
  }
224
- function $t(o, y) {
225
+ function zt(o, y) {
225
226
  if (!o || Ce)
226
227
  return "";
227
228
  {
@@ -233,8 +234,8 @@ function hn() {
233
234
  Ce = !0;
234
235
  var C = Error.prepareStackTrace;
235
236
  Error.prepareStackTrace = void 0;
236
- var I;
237
- I = ge.current, ge.current = null, fe();
237
+ var D;
238
+ D = ge.current, ge.current = null, fe();
238
239
  try {
239
240
  if (y) {
240
241
  var j = function() {
@@ -287,23 +288,23 @@ function hn() {
287
288
  }
288
289
  }
289
290
  } finally {
290
- Ce = !1, ge.current = I, Ee(), Error.prepareStackTrace = C;
291
+ Ce = !1, ge.current = D, Ee(), Error.prepareStackTrace = C;
291
292
  }
292
- var De = o ? o.displayName || o.name : "", Zt = De ? je(De) : "";
293
- return typeof o == "function" && _e.set(o, Zt), Zt;
293
+ var Ie = o ? o.displayName || o.name : "", Xt = Ie ? je(Ie) : "";
294
+ return typeof o == "function" && _e.set(o, Xt), Xt;
294
295
  }
295
- function Ar(o, y, E) {
296
- return $t(o, !1);
296
+ function kr(o, y, E) {
297
+ return zt(o, !1);
297
298
  }
298
- function kr(o) {
299
+ function Tr(o) {
299
300
  var y = o.prototype;
300
301
  return !!(y && y.isReactComponent);
301
302
  }
302
- function Je(o, y, E) {
303
+ function et(o, y, E) {
303
304
  if (o == null)
304
305
  return "";
305
306
  if (typeof o == "function")
306
- return $t(o, kr(o));
307
+ return zt(o, Tr(o));
307
308
  if (typeof o == "string")
308
309
  return je(o);
309
310
  switch (o) {
@@ -315,32 +316,32 @@ function hn() {
315
316
  if (typeof o == "object")
316
317
  switch (o.$$typeof) {
317
318
  case p:
318
- return Ar(o.render);
319
+ return kr(o.render);
319
320
  case c:
320
- return Je(o.type, y, E);
321
+ return et(o.type, y, E);
321
322
  case u: {
322
- var A = o, C = A._payload, I = A._init;
323
+ var A = o, C = A._payload, D = A._init;
323
324
  try {
324
- return Je(I(C), y, E);
325
+ return et(D(C), y, E);
325
326
  } catch {
326
327
  }
327
328
  }
328
329
  }
329
330
  return "";
330
331
  }
331
- var et = Object.prototype.hasOwnProperty, zt = {}, Pt = w.ReactDebugCurrentFrame;
332
- function tt(o) {
332
+ var tt = Object.prototype.hasOwnProperty, Pt = {}, Mt = w.ReactDebugCurrentFrame;
333
+ function rt(o) {
333
334
  if (o) {
334
- var y = o._owner, E = Je(o.type, o._source, y ? y.type : null);
335
- Pt.setExtraStackFrame(E);
335
+ var y = o._owner, E = et(o.type, o._source, y ? y.type : null);
336
+ Mt.setExtraStackFrame(E);
336
337
  } else
337
- Pt.setExtraStackFrame(null);
338
+ Mt.setExtraStackFrame(null);
338
339
  }
339
- function Tr(o, y, E, A, C) {
340
+ function jr(o, y, E, A, C) {
340
341
  {
341
- var I = Function.call.bind(et);
342
+ var D = Function.call.bind(tt);
342
343
  for (var j in o)
343
- if (I(o, j)) {
344
+ if (D(o, j)) {
344
345
  var T = void 0;
345
346
  try {
346
347
  if (typeof o[j] != "function") {
@@ -351,67 +352,67 @@ function hn() {
351
352
  } catch (U) {
352
353
  T = U;
353
354
  }
354
- T && !(T instanceof Error) && (tt(C), S("%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).", A || "React class", E, j, typeof T), tt(null)), T instanceof Error && !(T.message in zt) && (zt[T.message] = !0, tt(C), S("Failed %s type: %s", E, T.message), tt(null));
355
+ T && !(T instanceof Error) && (rt(C), S("%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).", A || "React class", E, j, typeof T), rt(null)), T instanceof Error && !(T.message in Pt) && (Pt[T.message] = !0, rt(C), S("Failed %s type: %s", E, T.message), rt(null));
355
356
  }
356
357
  }
357
358
  }
358
- var jr = Array.isArray;
359
- function yt(o) {
360
- return jr(o);
359
+ var Cr = Array.isArray;
360
+ function St(o) {
361
+ return Cr(o);
361
362
  }
362
- function Cr(o) {
363
+ function Rr(o) {
363
364
  {
364
365
  var y = typeof Symbol == "function" && Symbol.toStringTag, E = y && o[Symbol.toStringTag] || o.constructor.name || "Object";
365
366
  return E;
366
367
  }
367
368
  }
368
- function Rr(o) {
369
+ function Or(o) {
369
370
  try {
370
- return Mt(o), !1;
371
+ return Bt(o), !1;
371
372
  } catch {
372
373
  return !0;
373
374
  }
374
375
  }
375
- function Mt(o) {
376
+ function Bt(o) {
376
377
  return "" + o;
377
378
  }
378
- function Bt(o) {
379
- if (Rr(o))
380
- return S("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", Cr(o)), Mt(o);
379
+ function Ut(o) {
380
+ if (Or(o))
381
+ return S("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", Rr(o)), Bt(o);
381
382
  }
382
- var Be = w.ReactCurrentOwner, Or = {
383
+ var Ue = w.ReactCurrentOwner, Ir = {
383
384
  key: !0,
384
385
  ref: !0,
385
386
  __self: !0,
386
387
  __source: !0
387
- }, Ut, Gt, St;
388
- St = {};
388
+ }, Gt, Ht, xt;
389
+ xt = {};
389
390
  function Dr(o) {
390
- if (et.call(o, "ref")) {
391
+ if (tt.call(o, "ref")) {
391
392
  var y = Object.getOwnPropertyDescriptor(o, "ref").get;
392
393
  if (y && y.isReactWarning)
393
394
  return !1;
394
395
  }
395
396
  return o.ref !== void 0;
396
397
  }
397
- function Ir(o) {
398
- if (et.call(o, "key")) {
398
+ function Lr(o) {
399
+ if (tt.call(o, "key")) {
399
400
  var y = Object.getOwnPropertyDescriptor(o, "key").get;
400
401
  if (y && y.isReactWarning)
401
402
  return !1;
402
403
  }
403
404
  return o.key !== void 0;
404
405
  }
405
- function Lr(o, y) {
406
- if (typeof o.ref == "string" && Be.current && y && Be.current.stateNode !== y) {
407
- var E = B(Be.current.type);
408
- St[E] || (S('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', B(Be.current.type), o.ref), St[E] = !0);
406
+ function Fr(o, y) {
407
+ if (typeof o.ref == "string" && Ue.current && y && Ue.current.stateNode !== y) {
408
+ var E = B(Ue.current.type);
409
+ xt[E] || (S('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', B(Ue.current.type), o.ref), xt[E] = !0);
409
410
  }
410
411
  }
411
- function Fr(o, y) {
412
+ function Nr(o, y) {
412
413
  {
413
414
  var E = function() {
414
- Ut || (Ut = !0, S("%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)", y));
415
+ Gt || (Gt = !0, S("%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)", y));
415
416
  };
416
417
  E.isReactWarning = !0, Object.defineProperty(o, "key", {
417
418
  get: E,
@@ -419,10 +420,10 @@ function hn() {
419
420
  });
420
421
  }
421
422
  }
422
- function Nr(o, y) {
423
+ function $r(o, y) {
423
424
  {
424
425
  var E = function() {
425
- Gt || (Gt = !0, S("%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)", y));
426
+ Ht || (Ht = !0, S("%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)", y));
426
427
  };
427
428
  E.isReactWarning = !0, Object.defineProperty(o, "ref", {
428
429
  get: E,
@@ -430,7 +431,7 @@ function hn() {
430
431
  });
431
432
  }
432
433
  }
433
- var $r = function(o, y, E, A, C, I, j) {
434
+ var zr = function(o, y, E, A, C, D, j) {
434
435
  var T = {
435
436
  // This tag allows us to uniquely identify this as a React Element
436
437
  $$typeof: t,
@@ -440,7 +441,7 @@ function hn() {
440
441
  ref: E,
441
442
  props: j,
442
443
  // Record the component responsible for creating this element.
443
- _owner: I
444
+ _owner: D
444
445
  };
445
446
  return T._store = {}, Object.defineProperty(T._store, "validated", {
446
447
  configurable: !1,
@@ -459,41 +460,41 @@ function hn() {
459
460
  value: C
460
461
  }), Object.freeze && (Object.freeze(T.props), Object.freeze(T)), T;
461
462
  };
462
- function zr(o, y, E, A, C) {
463
+ function Pr(o, y, E, A, C) {
463
464
  {
464
- var I, j = {}, T = null, ne = null;
465
- E !== void 0 && (Bt(E), T = "" + E), Ir(y) && (Bt(y.key), T = "" + y.key), Dr(y) && (ne = y.ref, Lr(y, C));
466
- for (I in y)
467
- et.call(y, I) && !Or.hasOwnProperty(I) && (j[I] = y[I]);
465
+ var D, j = {}, T = null, ne = null;
466
+ E !== void 0 && (Ut(E), T = "" + E), Lr(y) && (Ut(y.key), T = "" + y.key), Dr(y) && (ne = y.ref, Fr(y, C));
467
+ for (D in y)
468
+ tt.call(y, D) && !Ir.hasOwnProperty(D) && (j[D] = y[D]);
468
469
  if (o && o.defaultProps) {
469
470
  var U = o.defaultProps;
470
- for (I in U)
471
- j[I] === void 0 && (j[I] = U[I]);
471
+ for (D in U)
472
+ j[D] === void 0 && (j[D] = U[D]);
472
473
  }
473
474
  if (T || ne) {
474
475
  var Y = typeof o == "function" ? o.displayName || o.name || "Unknown" : o;
475
- T && Fr(j, Y), ne && Nr(j, Y);
476
+ T && Nr(j, Y), ne && $r(j, Y);
476
477
  }
477
- return $r(o, T, ne, C, A, Be.current, j);
478
+ return zr(o, T, ne, C, A, Ue.current, j);
478
479
  }
479
480
  }
480
- var xt = w.ReactCurrentOwner, Ht = w.ReactDebugCurrentFrame;
481
+ var wt = w.ReactCurrentOwner, qt = w.ReactDebugCurrentFrame;
481
482
  function Oe(o) {
482
483
  if (o) {
483
- var y = o._owner, E = Je(o.type, o._source, y ? y.type : null);
484
- Ht.setExtraStackFrame(E);
484
+ var y = o._owner, E = et(o.type, o._source, y ? y.type : null);
485
+ qt.setExtraStackFrame(E);
485
486
  } else
486
- Ht.setExtraStackFrame(null);
487
+ qt.setExtraStackFrame(null);
487
488
  }
488
- var wt;
489
- wt = !1;
490
- function Et(o) {
489
+ var Et;
490
+ Et = !1;
491
+ function _t(o) {
491
492
  return typeof o == "object" && o !== null && o.$$typeof === t;
492
493
  }
493
- function qt() {
494
+ function Yt() {
494
495
  {
495
- if (xt.current) {
496
- var o = B(xt.current.type);
496
+ if (wt.current) {
497
+ var o = B(wt.current.type);
497
498
  if (o)
498
499
  return `
499
500
 
@@ -502,7 +503,7 @@ Check the render method of \`` + o + "`.";
502
503
  return "";
503
504
  }
504
505
  }
505
- function Pr(o) {
506
+ function Mr(o) {
506
507
  {
507
508
  if (o !== void 0) {
508
509
  var y = o.fileName.replace(/^.*[\\\/]/, ""), E = o.lineNumber;
@@ -513,10 +514,10 @@ Check your code at ` + y + ":" + E + ".";
513
514
  return "";
514
515
  }
515
516
  }
516
- var Yt = {};
517
- function Mr(o) {
517
+ var Vt = {};
518
+ function Br(o) {
518
519
  {
519
- var y = qt();
520
+ var y = Yt();
520
521
  if (!y) {
521
522
  var E = typeof o == "string" ? o : o.displayName || o.name;
522
523
  E && (y = `
@@ -526,39 +527,39 @@ Check the top-level render call using <` + E + ">.");
526
527
  return y;
527
528
  }
528
529
  }
529
- function Vt(o, y) {
530
+ function Wt(o, y) {
530
531
  {
531
532
  if (!o._store || o._store.validated || o.key != null)
532
533
  return;
533
534
  o._store.validated = !0;
534
- var E = Mr(y);
535
- if (Yt[E])
535
+ var E = Br(y);
536
+ if (Vt[E])
536
537
  return;
537
- Yt[E] = !0;
538
+ Vt[E] = !0;
538
539
  var A = "";
539
- o && o._owner && o._owner !== xt.current && (A = " It was passed a child from " + B(o._owner.type) + "."), Oe(o), S('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', E, A), Oe(null);
540
+ o && o._owner && o._owner !== wt.current && (A = " It was passed a child from " + B(o._owner.type) + "."), Oe(o), S('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', E, A), Oe(null);
540
541
  }
541
542
  }
542
- function Wt(o, y) {
543
+ function Kt(o, y) {
543
544
  {
544
545
  if (typeof o != "object")
545
546
  return;
546
- if (yt(o))
547
+ if (St(o))
547
548
  for (var E = 0; E < o.length; E++) {
548
549
  var A = o[E];
549
- Et(A) && Vt(A, y);
550
+ _t(A) && Wt(A, y);
550
551
  }
551
- else if (Et(o))
552
+ else if (_t(o))
552
553
  o._store && (o._store.validated = !0);
553
554
  else if (o) {
554
555
  var C = x(o);
555
556
  if (typeof C == "function" && C !== o.entries)
556
- for (var I = C.call(o), j; !(j = I.next()).done; )
557
- Et(j.value) && Vt(j.value, y);
557
+ for (var D = C.call(o), j; !(j = D.next()).done; )
558
+ _t(j.value) && Wt(j.value, y);
558
559
  }
559
560
  }
560
561
  }
561
- function Br(o) {
562
+ function Ur(o) {
562
563
  {
563
564
  var y = o.type;
564
565
  if (y == null || typeof y == "string")
@@ -574,16 +575,16 @@ Check the top-level render call using <` + E + ">.");
574
575
  return;
575
576
  if (E) {
576
577
  var A = B(y);
577
- Tr(E, o.props, "prop", A, o);
578
- } else if (y.PropTypes !== void 0 && !wt) {
579
- wt = !0;
578
+ jr(E, o.props, "prop", A, o);
579
+ } else if (y.PropTypes !== void 0 && !Et) {
580
+ Et = !0;
580
581
  var C = B(y);
581
582
  S("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", C || "Unknown");
582
583
  }
583
584
  typeof y.getDefaultProps == "function" && !y.getDefaultProps.isReactClassApproved && S("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
584
585
  }
585
586
  }
586
- function Ur(o) {
587
+ function Gr(o) {
587
588
  {
588
589
  for (var y = Object.keys(o.props), E = 0; E < y.length; E++) {
589
590
  var A = y[E];
@@ -595,49 +596,49 @@ Check the top-level render call using <` + E + ">.");
595
596
  o.ref !== null && (Oe(o), S("Invalid attribute `ref` supplied to `React.Fragment`."), Oe(null));
596
597
  }
597
598
  }
598
- function Kt(o, y, E, A, C, I) {
599
+ function Zt(o, y, E, A, C, D) {
599
600
  {
600
601
  var j = te(o);
601
602
  if (!j) {
602
603
  var T = "";
603
604
  (o === void 0 || typeof o == "object" && o !== null && Object.keys(o).length === 0) && (T += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
604
- var ne = Pr(C);
605
- ne ? T += ne : T += qt();
605
+ var ne = Mr(C);
606
+ ne ? T += ne : T += Yt();
606
607
  var U;
607
- o === null ? U = "null" : yt(o) ? U = "array" : o !== void 0 && o.$$typeof === t ? (U = "<" + (B(o.type) || "Unknown") + " />", T = " Did you accidentally export a JSX literal instead of a component?") : U = typeof o, S("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", U, T);
608
+ o === null ? U = "null" : St(o) ? U = "array" : o !== void 0 && o.$$typeof === t ? (U = "<" + (B(o.type) || "Unknown") + " />", T = " Did you accidentally export a JSX literal instead of a component?") : U = typeof o, S("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", U, T);
608
609
  }
609
- var Y = zr(o, y, E, C, I);
610
+ var Y = Pr(o, y, E, C, D);
610
611
  if (Y == null)
611
612
  return Y;
612
613
  if (j) {
613
614
  var se = y.children;
614
615
  if (se !== void 0)
615
616
  if (A)
616
- if (yt(se)) {
617
- for (var De = 0; De < se.length; De++)
618
- Wt(se[De], o);
617
+ if (St(se)) {
618
+ for (var Ie = 0; Ie < se.length; Ie++)
619
+ Kt(se[Ie], o);
619
620
  Object.freeze && Object.freeze(se);
620
621
  } else
621
622
  S("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
622
623
  else
623
- Wt(se, o);
624
+ Kt(se, o);
624
625
  }
625
- return o === n ? Ur(Y) : Br(Y), Y;
626
+ return o === n ? Gr(Y) : Ur(Y), Y;
626
627
  }
627
628
  }
628
- function Gr(o, y, E) {
629
- return Kt(o, y, E, !0);
630
- }
631
629
  function Hr(o, y, E) {
632
- return Kt(o, y, E, !1);
630
+ return Zt(o, y, E, !0);
633
631
  }
634
- var qr = Hr, Yr = Gr;
635
- Ge.Fragment = n, Ge.jsx = qr, Ge.jsxs = Yr;
636
- }()), Ge;
632
+ function qr(o, y, E) {
633
+ return Zt(o, y, E, !1);
634
+ }
635
+ var Yr = qr, Vr = Hr;
636
+ He.Fragment = n, He.jsx = Yr, He.jsxs = Vr;
637
+ }()), He;
637
638
  }
638
- process.env.NODE_ENV === "production" ? jt.exports = gn() : jt.exports = hn();
639
- var a = jt.exports;
640
- function mn(e) {
639
+ process.env.NODE_ENV === "production" ? Ct.exports = mn() : Ct.exports = bn();
640
+ var a = Ct.exports;
641
+ function vn(e) {
641
642
  e = e || {};
642
643
  const t = Object.keys(e).sort(), r = [];
643
644
  for (let n = 0; n < t.length; n++) {
@@ -654,11 +655,11 @@ function mn(e) {
654
655
  }
655
656
  return r.sort().join("&");
656
657
  }
657
- function bn(e, t) {
658
- let r = mn(e);
659
- return r += "&key=" + t, an.MD5(r).toString().toUpperCase();
658
+ function yn(e, t) {
659
+ let r = vn(e);
660
+ return r += "&key=" + t, sn.MD5(r).toString().toUpperCase();
660
661
  }
661
- class vn {
662
+ class Sn {
662
663
  constructor() {
663
664
  this.type = "default_api_client", this.baseURL = "http://localhost:31200", this.app_id = "", this.app_secret = "";
664
665
  }
@@ -669,7 +670,7 @@ class vn {
669
670
  return {
670
671
  app_id: this.app_id,
671
672
  nonce_str: r,
672
- sign: bn({
673
+ sign: yn({
673
674
  app_id: this.app_id,
674
675
  nonce_str: r,
675
676
  ...t
@@ -679,7 +680,10 @@ class vn {
679
680
  getRequest(t, r) {
680
681
  return (n, i, s, l) => {
681
682
  const d = this.buildHeader(s), p = this.buildAxiosConfig(t, n, i, s, d, r);
682
- return sn(p).then((f) => l ? f : f.data).catch((f) => Promise.reject(f));
683
+ return ln(p).then((f) => l ? f : f.data).catch((f) => {
684
+ const h = on.get(f, "response.data.detail.message", f.message);
685
+ return Promise.reject(new Error(h));
686
+ });
683
687
  };
684
688
  }
685
689
  get(t) {
@@ -712,7 +716,7 @@ class vn {
712
716
  };
713
717
  }
714
718
  }
715
- class yn {
719
+ class xn {
716
720
  constructor(t) {
717
721
  this.implementation = t;
718
722
  }
@@ -729,11 +733,11 @@ class yn {
729
733
  return this.getRequest("PUT", t);
730
734
  }
731
735
  }
732
- const Ye = new vn(), Sn = new yn(Ye), G = Sn;
733
- function Xe(e) {
734
- Ye.baseURL !== e.apiBaseURL && (Ye.baseURL = e.apiBaseURL), e.app_id && (Ye.app_id = e.app_id), e.app_secret && (Ye.app_secret = e.app_secret);
736
+ const Ve = new Sn(), wn = new xn(Ve), G = wn;
737
+ function Qe(e) {
738
+ Ve.baseURL !== e.apiBaseURL && (Ve.baseURL = e.apiBaseURL), e.app_id && (Ve.app_id = e.app_id), e.app_secret && (Ve.app_secret = e.app_secret);
735
739
  }
736
- const xn = {
740
+ const En = {
737
741
  login: async (e, t) => {
738
742
  const r = {
739
743
  name: e,
@@ -789,7 +793,7 @@ const xn = {
789
793
  id: e
790
794
  }, {});
791
795
  }
792
- }, wn = {
796
+ }, _n = {
793
797
  list: async () => await G.post()("/api/key/list", {
794
798
  filter: {
795
799
  search: ""
@@ -813,7 +817,7 @@ const xn = {
813
817
  id: e
814
818
  }, {});
815
819
  }
816
- }, En = {
820
+ }, An = {
817
821
  list: async () => await G.post()("/datasource/list", {
818
822
  filter: {},
819
823
  sort: [{
@@ -839,11 +843,11 @@ const xn = {
839
843
  id: e
840
844
  }, {});
841
845
  }
842
- }, _n = {
846
+ }, kn = {
843
847
  list: async () => await G.get()("/role/list", {}, {})
844
848
  };
845
- var pr = 60, fr = pr * 60, gr = fr * 24, An = gr * 7, ze = 1e3, kt = pr * ze, Jt = fr * ze, kn = gr * ze, Tn = An * ze, It = "millisecond", Le = "second", Fe = "minute", Ne = "hour", ve = "day", nt = "week", le = "month", hr = "quarter", ye = "year", $e = "date", jn = "YYYY-MM-DDTHH:mm:ssZ", er = "Invalid Date", Cn = /^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/, Rn = /\[([^\]]+)]|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;
846
- const On = {
849
+ var fr = 60, gr = fr * 60, hr = gr * 24, Tn = hr * 7, ze = 1e3, Tt = fr * ze, er = gr * ze, jn = hr * ze, Cn = Tn * ze, Lt = "millisecond", Le = "second", Fe = "minute", Ne = "hour", ve = "day", at = "week", le = "month", mr = "quarter", ye = "year", $e = "date", Rn = "YYYY-MM-DDTHH:mm:ssZ", tr = "Invalid Date", On = /^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/, In = /\[([^\]]+)]|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;
850
+ const Dn = {
847
851
  name: "en",
848
852
  weekdays: "Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),
849
853
  months: "January_February_March_April_May_June_July_August_September_October_November_December".split("_"),
@@ -852,52 +856,52 @@ const On = {
852
856
  return "[" + t + (r[(n - 20) % 10] || r[n] || r[0]) + "]";
853
857
  }
854
858
  };
855
- var Ct = function(t, r, n) {
859
+ var Rt = function(t, r, n) {
856
860
  var i = String(t);
857
861
  return !i || i.length >= r ? t : "" + Array(r + 1 - i.length).join(n) + t;
858
- }, Dn = function(t) {
862
+ }, Ln = function(t) {
859
863
  var r = -t.utcOffset(), n = Math.abs(r), i = Math.floor(n / 60), s = n % 60;
860
- return (r <= 0 ? "+" : "-") + Ct(i, 2, "0") + ":" + Ct(s, 2, "0");
861
- }, In = function e(t, r) {
864
+ return (r <= 0 ? "+" : "-") + Rt(i, 2, "0") + ":" + Rt(s, 2, "0");
865
+ }, Fn = function e(t, r) {
862
866
  if (t.date() < r.date())
863
867
  return -e(r, t);
864
868
  var n = (r.year() - t.year()) * 12 + (r.month() - t.month()), i = t.clone().add(n, le), s = r - i < 0, l = t.clone().add(n + (s ? -1 : 1), le);
865
869
  return +(-(n + (r - i) / (s ? i - l : l - i)) || 0);
866
- }, Ln = function(t) {
870
+ }, Nn = function(t) {
867
871
  return t < 0 ? Math.ceil(t) || 0 : Math.floor(t);
868
- }, Fn = function(t) {
872
+ }, $n = function(t) {
869
873
  var r = {
870
874
  M: le,
871
875
  y: ye,
872
- w: nt,
876
+ w: at,
873
877
  d: ve,
874
878
  D: $e,
875
879
  h: Ne,
876
880
  m: Fe,
877
881
  s: Le,
878
- ms: It,
879
- Q: hr
882
+ ms: Lt,
883
+ Q: mr
880
884
  };
881
885
  return r[t] || String(t || "").toLowerCase().replace(/s$/, "");
882
- }, Nn = function(t) {
886
+ }, zn = function(t) {
883
887
  return t === void 0;
884
888
  };
885
- const $n = {
886
- s: Ct,
887
- z: Dn,
888
- m: In,
889
- a: Ln,
890
- p: Fn,
891
- u: Nn
889
+ const Pn = {
890
+ s: Rt,
891
+ z: Ln,
892
+ m: Fn,
893
+ a: Nn,
894
+ p: $n,
895
+ u: zn
892
896
  };
893
- var We = "en", Ae = {};
894
- Ae[We] = On;
895
- var Lt = function(t) {
896
- return t instanceof bt;
897
- }, it = function e(t, r, n) {
897
+ var Ke = "en", Ae = {};
898
+ Ae[Ke] = Dn;
899
+ var Ft = function(t) {
900
+ return t instanceof vt;
901
+ }, st = function e(t, r, n) {
898
902
  var i;
899
903
  if (!t)
900
- return We;
904
+ return Ke;
901
905
  if (typeof t == "string") {
902
906
  var s = t.toLowerCase();
903
907
  Ae[s] && (i = s), r && (Ae[s] = r, i = s);
@@ -908,13 +912,13 @@ var Lt = function(t) {
908
912
  var d = t.name;
909
913
  Ae[d] = t, i = d;
910
914
  }
911
- return !n && i && (We = i), i || !n && We;
915
+ return !n && i && (Ke = i), i || !n && Ke;
912
916
  }, K = function(t, r) {
913
- if (Lt(t))
917
+ if (Ft(t))
914
918
  return t.clone();
915
919
  var n = typeof r == "object" ? r : {};
916
- return n.date = t, n.args = arguments, new bt(n);
917
- }, zn = function(t, r) {
920
+ return n.date = t, n.args = arguments, new vt(n);
921
+ }, Mn = function(t, r) {
918
922
  return K(t, {
919
923
  locale: r.$L,
920
924
  utc: r.$u,
@@ -922,11 +926,11 @@ var Lt = function(t) {
922
926
  $offset: r.$offset
923
927
  // todo: refactor; do not use this.$offset in you code
924
928
  });
925
- }, O = $n;
926
- O.l = it;
927
- O.i = Lt;
928
- O.w = zn;
929
- var Pn = function(t) {
929
+ }, O = Pn;
930
+ O.l = st;
931
+ O.i = Ft;
932
+ O.w = Mn;
933
+ var Bn = function(t) {
930
934
  var r = t.date, n = t.utc;
931
935
  if (r === null)
932
936
  return /* @__PURE__ */ new Date(NaN);
@@ -935,27 +939,27 @@ var Pn = function(t) {
935
939
  if (r instanceof Date)
936
940
  return new Date(r);
937
941
  if (typeof r == "string" && !/Z$/i.test(r)) {
938
- var i = r.match(Cn);
942
+ var i = r.match(On);
939
943
  if (i) {
940
944
  var s = i[2] - 1 || 0, l = (i[7] || "0").substring(0, 3);
941
945
  return n ? new Date(Date.UTC(i[1], s, i[3] || 1, i[4] || 0, i[5] || 0, i[6] || 0, l)) : new Date(i[1], s, i[3] || 1, i[4] || 0, i[5] || 0, i[6] || 0, l);
942
946
  }
943
947
  }
944
948
  return new Date(r);
945
- }, bt = /* @__PURE__ */ function() {
949
+ }, vt = /* @__PURE__ */ function() {
946
950
  function e(r) {
947
- this.$L = it(r.locale, null, !0), this.parse(r);
951
+ this.$L = st(r.locale, null, !0), this.parse(r);
948
952
  }
949
953
  var t = e.prototype;
950
954
  return t.parse = function(n) {
951
- this.$d = Pn(n), this.$x = n.x || {}, this.init();
955
+ this.$d = Bn(n), this.$x = n.x || {}, this.init();
952
956
  }, t.init = function() {
953
957
  var n = this.$d;
954
958
  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();
955
959
  }, t.$utils = function() {
956
960
  return O;
957
961
  }, t.isValid = function() {
958
- return this.$d.toString() !== er;
962
+ return this.$d.toString() !== tr;
959
963
  }, t.isSame = function(n, i) {
960
964
  var s = K(n);
961
965
  return this.startOf(i) <= s && s <= this.endOf(i);
@@ -986,7 +990,7 @@ var Pn = function(t) {
986
990
  return l ? p(1, 0) : p(31, 11);
987
991
  case le:
988
992
  return l ? p(1, c) : p(0, c + 1);
989
- case nt: {
993
+ case at: {
990
994
  var v = this.$locale().weekStart || 0, m = (h < v ? h + 7 : h) - v;
991
995
  return p(l ? u - m : u + (6 - m), c);
992
996
  }
@@ -1005,7 +1009,7 @@ var Pn = function(t) {
1005
1009
  }, t.endOf = function(n) {
1006
1010
  return this.startOf(n, !1);
1007
1011
  }, t.$set = function(n, i) {
1008
- var s, l = O.p(n), d = "set" + (this.$u ? "UTC" : ""), p = (s = {}, s[ve] = d + "Date", s[$e] = d + "Date", s[le] = d + "Month", s[ye] = d + "FullYear", s[Ne] = d + "Hours", s[Fe] = d + "Minutes", s[Le] = d + "Seconds", s[It] = d + "Milliseconds", s)[l], f = l === ve ? this.$D + (i - this.$W) : i;
1012
+ var s, l = O.p(n), d = "set" + (this.$u ? "UTC" : ""), p = (s = {}, s[ve] = d + "Date", s[$e] = d + "Date", s[le] = d + "Month", s[ye] = d + "FullYear", s[Ne] = d + "Hours", s[Fe] = d + "Minutes", s[Le] = d + "Seconds", s[Lt] = d + "Milliseconds", s)[l], f = l === ve ? this.$D + (i - this.$W) : i;
1009
1013
  if (l === le || l === ye) {
1010
1014
  var h = this.clone().set($e, 1);
1011
1015
  h.$d[p](f), h.init(), this.$d = h.set($e, Math.min(this.$D, h.daysInMonth())).$d;
@@ -1029,17 +1033,17 @@ var Pn = function(t) {
1029
1033
  return this.set(ye, this.$y + n);
1030
1034
  if (d === ve)
1031
1035
  return p(1);
1032
- if (d === nt)
1036
+ if (d === at)
1033
1037
  return p(7);
1034
- var f = (l = {}, l[Fe] = kt, l[Ne] = Jt, l[Le] = ze, l)[d] || 1, h = this.$d.getTime() + n * f;
1038
+ var f = (l = {}, l[Fe] = Tt, l[Ne] = er, l[Le] = ze, l)[d] || 1, h = this.$d.getTime() + n * f;
1035
1039
  return O.w(h, this);
1036
1040
  }, t.subtract = function(n, i) {
1037
1041
  return this.add(n * -1, i);
1038
1042
  }, t.format = function(n) {
1039
1043
  var i = this, s = this.$locale();
1040
1044
  if (!this.isValid())
1041
- return s.invalidDate || er;
1042
- var l = n || jn, d = O.z(this), p = this.$H, f = this.$m, h = this.$M, c = s.weekdays, u = s.months, g = s.meridiem, v = function(_, k, H, J) {
1045
+ return s.invalidDate || tr;
1046
+ var l = n || Rn, d = O.z(this), p = this.$H, f = this.$m, h = this.$M, c = s.weekdays, u = s.months, g = s.meridiem, v = function(_, k, H, J) {
1043
1047
  return _ && (_[k] || _(i, l)) || H[k].slice(0, J);
1044
1048
  }, m = function(_) {
1045
1049
  return O.s(p % 12 || 12, _, "0");
@@ -1099,13 +1103,13 @@ var Pn = function(t) {
1099
1103
  }
1100
1104
  return null;
1101
1105
  };
1102
- return l.replace(Rn, function(S, _) {
1106
+ return l.replace(In, function(S, _) {
1103
1107
  return _ || w(S) || d.replace(":", "");
1104
1108
  });
1105
1109
  }, t.utcOffset = function() {
1106
1110
  return -Math.round(this.$d.getTimezoneOffset() / 15) * 15;
1107
1111
  }, t.diff = function(n, i, s) {
1108
- var l = this, d = O.p(i), p = K(n), f = (p.utcOffset() - this.utcOffset()) * kt, h = this - p, c = function() {
1112
+ var l = this, d = O.p(i), p = K(n), f = (p.utcOffset() - this.utcOffset()) * Tt, h = this - p, c = function() {
1109
1113
  return O.m(l, p);
1110
1114
  }, u;
1111
1115
  switch (d) {
@@ -1115,20 +1119,20 @@ var Pn = function(t) {
1115
1119
  case le:
1116
1120
  u = c();
1117
1121
  break;
1118
- case hr:
1122
+ case mr:
1119
1123
  u = c() / 3;
1120
1124
  break;
1121
- case nt:
1122
- u = (h - f) / Tn;
1125
+ case at:
1126
+ u = (h - f) / Cn;
1123
1127
  break;
1124
1128
  case ve:
1125
- u = (h - f) / kn;
1129
+ u = (h - f) / jn;
1126
1130
  break;
1127
1131
  case Ne:
1128
- u = h / Jt;
1132
+ u = h / er;
1129
1133
  break;
1130
1134
  case Fe:
1131
- u = h / kt;
1135
+ u = h / Tt;
1132
1136
  break;
1133
1137
  case Le:
1134
1138
  u = h / ze;
@@ -1145,7 +1149,7 @@ var Pn = function(t) {
1145
1149
  }, t.locale = function(n, i) {
1146
1150
  if (!n)
1147
1151
  return this.$L;
1148
- var s = this.clone(), l = it(n, i, !0);
1152
+ var s = this.clone(), l = st(n, i, !0);
1149
1153
  return l && (s.$L = l), s;
1150
1154
  }, t.clone = function() {
1151
1155
  return O.w(this.$d, this);
@@ -1158,25 +1162,25 @@ var Pn = function(t) {
1158
1162
  }, t.toString = function() {
1159
1163
  return this.$d.toUTCString();
1160
1164
  }, e;
1161
- }(), mr = bt.prototype;
1162
- K.prototype = mr;
1163
- [["$ms", It], ["$s", Le], ["$m", Fe], ["$H", Ne], ["$W", ve], ["$M", le], ["$y", ye], ["$D", $e]].forEach(function(e) {
1164
- mr[e[1]] = function(t) {
1165
+ }(), br = vt.prototype;
1166
+ K.prototype = br;
1167
+ [["$ms", Lt], ["$s", Le], ["$m", Fe], ["$H", Ne], ["$W", ve], ["$M", le], ["$y", ye], ["$D", $e]].forEach(function(e) {
1168
+ br[e[1]] = function(t) {
1165
1169
  return this.$g(t, e[0], e[1]);
1166
1170
  };
1167
1171
  });
1168
1172
  K.extend = function(e, t) {
1169
- return e.$i || (e(t, bt, K), e.$i = !0), K;
1173
+ return e.$i || (e(t, vt, K), e.$i = !0), K;
1170
1174
  };
1171
- K.locale = it;
1172
- K.isDayjs = Lt;
1175
+ K.locale = st;
1176
+ K.isDayjs = Ft;
1173
1177
  K.unix = function(e) {
1174
1178
  return K(e * 1e3);
1175
1179
  };
1176
- K.en = Ae[We];
1180
+ K.en = Ae[Ke];
1177
1181
  K.Ls = Ae;
1178
1182
  K.p = {};
1179
- const Mn = {
1183
+ const Un = {
1180
1184
  list: async ({
1181
1185
  pagination: e
1182
1186
  }, t) => {
@@ -1200,11 +1204,11 @@ const Mn = {
1200
1204
  id: e
1201
1205
  }, {})
1202
1206
  }, Z = {
1203
- datasource: En,
1204
- account: xn,
1205
- role: _n,
1206
- api_key: wn,
1207
- sql_snippet: Mn
1207
+ datasource: An,
1208
+ account: En,
1209
+ role: kn,
1210
+ api_key: _n,
1211
+ sql_snippet: Un
1208
1212
  }, de = {
1209
1213
  size: "sm",
1210
1214
  spacing: "md",
@@ -1212,7 +1216,7 @@ const Mn = {
1212
1216
  size: "xs"
1213
1217
  }
1214
1218
  };
1215
- function Bn({
1219
+ function Gn({
1216
1220
  submit: e,
1217
1221
  styles: t = de,
1218
1222
  type: r
@@ -1234,13 +1238,13 @@ function Bn({
1234
1238
  }
1235
1239
  }
1236
1240
  });
1237
- return Ot(() => {
1241
+ return It(() => {
1238
1242
  i("type", r);
1239
1243
  }, [i, r]), /* @__PURE__ */ a.jsx(X, { mx: "auto", children: /* @__PURE__ */ a.jsxs("form", { onSubmit: s(e), children: [
1240
1244
  /* @__PURE__ */ a.jsx(R, { name: "key", control: n, render: ({
1241
1245
  field: l
1242
1246
  }) => /* @__PURE__ */ a.jsx(Q, { mb: t.spacing, size: t.size, required: !0, label: "Name", placeholder: "A unique name", ...l }) }),
1243
- /* @__PURE__ */ a.jsx(ct, { label: "Connection Info", labelPosition: "center" }),
1247
+ /* @__PURE__ */ a.jsx(dt, { label: "Connection Info", labelPosition: "center" }),
1244
1248
  /* @__PURE__ */ a.jsxs(z, { grow: !0, children: [
1245
1249
  /* @__PURE__ */ a.jsx(R, { name: "config.host", control: n, render: ({
1246
1250
  field: l
@@ -1251,7 +1255,7 @@ function Bn({
1251
1255
  field: l
1252
1256
  }) => (
1253
1257
  // @ts-expect-error type of onChange
1254
- /* @__PURE__ */ a.jsx(Wr, { mb: t.spacing, size: t.size, required: !0, label: "Port", hideControls: !0, sx: {
1258
+ /* @__PURE__ */ a.jsx(Kr, { mb: t.spacing, size: t.size, required: !0, label: "Port", hideControls: !0, sx: {
1255
1259
  width: "8em"
1256
1260
  }, ...l })
1257
1261
  ) })
@@ -1261,14 +1265,14 @@ function Bn({
1261
1265
  }) => /* @__PURE__ */ a.jsx(Q, { mb: t.spacing, size: t.size, required: !0, label: "Username", ...l }) }),
1262
1266
  /* @__PURE__ */ a.jsx(R, { name: "config.password", control: n, render: ({
1263
1267
  field: l
1264
- }) => /* @__PURE__ */ a.jsx(dt, { mb: t.spacing, size: t.size, required: !0, label: "Password", ...l }) }),
1268
+ }) => /* @__PURE__ */ a.jsx(pt, { mb: t.spacing, size: t.size, required: !0, label: "Password", ...l }) }),
1265
1269
  /* @__PURE__ */ a.jsx(R, { name: "config.database", control: n, render: ({
1266
1270
  field: l
1267
1271
  }) => /* @__PURE__ */ a.jsx(Q, { mb: t.spacing, size: t.size, required: !0, label: "Database", ...l }) }),
1268
- /* @__PURE__ */ a.jsx(z, { position: "right", mt: t.spacing, children: /* @__PURE__ */ a.jsx(D, { type: "submit", size: t.button.size, children: "Save" }) })
1272
+ /* @__PURE__ */ a.jsx(z, { position: "right", mt: t.spacing, children: /* @__PURE__ */ a.jsx(I, { type: "submit", color: "green", leftIcon: /* @__PURE__ */ a.jsx(Pe, { size: 16 }), size: t.button.size, children: "Submit" }) })
1269
1273
  ] }) });
1270
1274
  }
1271
- const Un = ({
1275
+ const Hn = ({
1272
1276
  value: e,
1273
1277
  onChange: t
1274
1278
  }) => {
@@ -1277,12 +1281,12 @@ const Un = ({
1277
1281
  };
1278
1282
  return /* @__PURE__ */ a.jsx(X, { sx: {
1279
1283
  position: "relative"
1280
- }, children: /* @__PURE__ */ a.jsx(cr, { height: "500px", defaultLanguage: "javascript", value: e, onChange: r, theme: "vs-dark", options: {
1284
+ }, children: /* @__PURE__ */ a.jsx(pr, { height: "500px", defaultLanguage: "javascript", value: e, onChange: r, theme: "vs-dark", options: {
1281
1285
  minimap: {
1282
1286
  enabled: !1
1283
1287
  }
1284
1288
  } }) });
1285
- }, st = ut(({
1289
+ }, ot = ct(({
1286
1290
  value: e,
1287
1291
  onChange: t,
1288
1292
  label: r,
@@ -1293,37 +1297,37 @@ const Un = ({
1293
1297
  const [d, {
1294
1298
  setTrue: p,
1295
1299
  setFalse: f
1296
- }] = on(), [h, c] = or(e), u = () => {
1300
+ }] = fn(), [h, c] = lr(e), u = () => {
1297
1301
  f(), t(h);
1298
1302
  }, g = () => {
1299
1303
  f(), c(e);
1300
1304
  }, v = () => {
1301
1305
  c(i);
1302
1306
  };
1303
- return Ot(() => {
1307
+ return It(() => {
1304
1308
  c(e);
1305
1309
  }, [e]), /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
1306
- /* @__PURE__ */ a.jsx(D, { variant: "filled", size: s.button.size, onClick: p, sx: {
1310
+ /* @__PURE__ */ a.jsx(I, { variant: "filled", size: s.button.size, onClick: p, sx: {
1307
1311
  flexGrow: 1
1308
1312
  }, children: r }),
1309
- /* @__PURE__ */ a.jsx(xe, { size: 800, title: n, opened: d, onClose: f, closeOnClickOutside: !1, withCloseButton: !1, children: d && /* @__PURE__ */ a.jsxs(Ke, { children: [
1310
- /* @__PURE__ */ a.jsx(Un, { value: h, onChange: c }),
1313
+ /* @__PURE__ */ a.jsx(xe, { size: 800, title: n, opened: d, onClose: f, closeOnClickOutside: !1, withCloseButton: !1, children: d && /* @__PURE__ */ a.jsxs(Ze, { children: [
1314
+ /* @__PURE__ */ a.jsx(Hn, { value: h, onChange: c }),
1311
1315
  /* @__PURE__ */ a.jsxs(z, { position: "apart", children: [
1312
- /* @__PURE__ */ a.jsx(D, { onClick: v, color: "red", leftIcon: /* @__PURE__ */ a.jsx(tn, { size: 20 }), children: "Reset" }),
1316
+ /* @__PURE__ */ a.jsx(I, { onClick: v, color: "red", leftIcon: /* @__PURE__ */ a.jsx(rn, { size: 20 }), children: "Reset" }),
1313
1317
  /* @__PURE__ */ a.jsxs(z, { position: "right", children: [
1314
- /* @__PURE__ */ a.jsx(D, { onClick: g, variant: "subtle", children: "Cancel" }),
1315
- /* @__PURE__ */ a.jsx(D, { onClick: u, children: "OK" })
1318
+ /* @__PURE__ */ a.jsx(I, { onClick: g, variant: "subtle", children: "Cancel" }),
1319
+ /* @__PURE__ */ a.jsx(I, { onClick: u, children: "OK" })
1316
1320
  ] })
1317
1321
  ] })
1318
1322
  ] }) })
1319
1323
  ] });
1320
- }), rt = {
1324
+ }), nt = {
1321
1325
  pre: ["function pre_process({ method, url, params, headers, data }, utils) {", " // your code goes here", " return { method, url, params, headers, data }", "}"].join(`
1322
1326
  `),
1323
1327
  post: ["function post_process(res, utils) {", " // your code goes here", " return data", "}"].join(`
1324
1328
  `)
1325
1329
  };
1326
- function Gn({
1330
+ function qn({
1327
1331
  submit: e,
1328
1332
  styles: t = de
1329
1333
  }) {
@@ -1338,8 +1342,8 @@ function Gn({
1338
1342
  config: {
1339
1343
  host: "",
1340
1344
  processing: {
1341
- pre: rt.pre,
1342
- post: rt.post
1345
+ pre: nt.pre,
1346
+ post: nt.post
1343
1347
  }
1344
1348
  }
1345
1349
  }
@@ -1348,7 +1352,7 @@ function Gn({
1348
1352
  /* @__PURE__ */ a.jsx(R, { name: "key", control: r, render: ({
1349
1353
  field: s
1350
1354
  }) => /* @__PURE__ */ a.jsx(Q, { mb: t.spacing, size: t.size, required: !0, label: "Name", placeholder: "A unique name", ...s }) }),
1351
- /* @__PURE__ */ a.jsx(ct, { label: "Connection Info", labelPosition: "center" }),
1355
+ /* @__PURE__ */ a.jsx(dt, { label: "Connection Info", labelPosition: "center" }),
1352
1356
  /* @__PURE__ */ a.jsx(R, { name: "config.host", control: r, render: ({
1353
1357
  field: s
1354
1358
  }) => /* @__PURE__ */ a.jsx(Q, { mb: t.spacing, size: t.size, label: "Base URL", sx: {
@@ -1357,28 +1361,28 @@ function Gn({
1357
1361
  /* @__PURE__ */ a.jsxs(z, { grow: !0, children: [
1358
1362
  /* @__PURE__ */ a.jsx(R, { name: "config.processing.pre", control: r, render: ({
1359
1363
  field: s
1360
- }) => /* @__PURE__ */ a.jsx(st, { label: "Pre Processing", modalTitle: "This function will run before sending the request (for scenarios like encryption)", defaultValue: rt.pre, ...s, styles: t }) }),
1364
+ }) => /* @__PURE__ */ a.jsx(ot, { label: "Pre Processing", modalTitle: "This function will run before sending the request (for scenarios like encryption)", defaultValue: nt.pre, ...s, styles: t }) }),
1361
1365
  /* @__PURE__ */ a.jsx(R, { name: "config.processing.post", control: r, render: ({
1362
1366
  field: s
1363
- }) => /* @__PURE__ */ a.jsx(st, { label: "Post Processing", modalTitle: "This function will run after sending the request (for scenarios like decryption)", defaultValue: rt.post, ...s, styles: t }) })
1367
+ }) => /* @__PURE__ */ a.jsx(ot, { label: "Post Processing", modalTitle: "This function will run after sending the request (for scenarios like decryption)", defaultValue: nt.post, ...s, styles: t }) })
1364
1368
  ] }),
1365
- /* @__PURE__ */ a.jsx(z, { position: "right", mt: t.spacing, children: /* @__PURE__ */ a.jsx(D, { type: "submit", size: t.button.size, children: "Save" }) })
1369
+ /* @__PURE__ */ a.jsx(z, { position: "right", mt: t.spacing, children: /* @__PURE__ */ a.jsx(I, { type: "submit", size: t.button.size, children: "Save" }) })
1366
1370
  ] }) });
1367
1371
  }
1368
- function Hn({
1372
+ function Yn({
1369
1373
  styles: e = de
1370
1374
  }) {
1371
- return /* @__PURE__ */ a.jsx(X, { mx: "auto", children: /* @__PURE__ */ a.jsxs(Kr, { mt: e.spacing, icon: /* @__PURE__ */ a.jsx(rn, { size: 16 }), children: [
1375
+ return /* @__PURE__ */ a.jsx(X, { mx: "auto", children: /* @__PURE__ */ a.jsxs(Zr, { mt: e.spacing, icon: /* @__PURE__ */ a.jsx(nn, { size: 16 }), children: [
1372
1376
  "Only ",
1373
1377
  /* @__PURE__ */ a.jsx("b", { children: "SELECT" }),
1374
1378
  " privilege is needed."
1375
1379
  ] }) });
1376
1380
  }
1377
- function qn({
1381
+ function Vn({
1378
1382
  postSubmit: e,
1379
1383
  styles: t = de
1380
1384
  }) {
1381
- const [r, n] = or("postgresql"), i = async ({
1385
+ const [r, n] = lr("postgresql"), i = async ({
1382
1386
  type: d,
1383
1387
  key: p,
1384
1388
  config: f
@@ -1413,7 +1417,7 @@ function qn({
1413
1417
  }
1414
1418
  }, s = r === "postgresql" || r === "mysql", l = r === "http";
1415
1419
  return /* @__PURE__ */ a.jsxs(X, { mx: "auto", children: [
1416
- /* @__PURE__ */ a.jsx(Zr, { fullWidth: !0, mb: t.spacing, size: t.size, data: [{
1420
+ /* @__PURE__ */ a.jsx(Xr, { fullWidth: !0, mb: t.spacing, size: t.size, data: [{
1417
1421
  label: "PostgreSQL",
1418
1422
  value: "postgresql"
1419
1423
  }, {
@@ -1423,12 +1427,12 @@ function qn({
1423
1427
  label: "HTTP",
1424
1428
  value: "http"
1425
1429
  }], value: r, onChange: (d) => n(d) }),
1426
- s && /* @__PURE__ */ a.jsx(Hn, { styles: t }),
1427
- s && /* @__PURE__ */ a.jsx(Bn, { submit: i, styles: t, type: r }),
1428
- l && /* @__PURE__ */ a.jsx(Gn, { submit: i, styles: t })
1430
+ s && /* @__PURE__ */ a.jsx(Yn, { styles: t }),
1431
+ s && /* @__PURE__ */ a.jsx(Gn, { submit: i, styles: t, type: r }),
1432
+ l && /* @__PURE__ */ a.jsx(qn, { submit: i, styles: t })
1429
1433
  ] });
1430
1434
  }
1431
- function Yn({
1435
+ function Wn({
1432
1436
  onSuccess: e,
1433
1437
  styles: t = de
1434
1438
  }) {
@@ -1438,32 +1442,32 @@ function Yn({
1438
1442
  return /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
1439
1443
  /* @__PURE__ */ a.jsx(xe, { opened: r, onClose: () => n(!1), title: "Add a data source", trapFocus: !0, onDragStart: (d) => {
1440
1444
  d.stopPropagation();
1441
- }, children: /* @__PURE__ */ a.jsx(qn, { postSubmit: l, styles: t }) }),
1442
- /* @__PURE__ */ a.jsx(D, { size: t.button.size, onClick: i, leftIcon: /* @__PURE__ */ a.jsx(ht, { size: 20 }), children: "Add a Data Source" })
1445
+ }, children: /* @__PURE__ */ a.jsx(Vn, { postSubmit: l, styles: t }) }),
1446
+ /* @__PURE__ */ a.jsx(I, { size: t.button.size, onClick: i, leftIcon: /* @__PURE__ */ a.jsx(mt, { size: 20 }), children: "Add a Data Source" })
1443
1447
  ] });
1444
1448
  }
1445
- const Vn = (e) => e.replace(/([^:])(\/\/+)/g, "$1/");
1446
- function Wn(e) {
1447
- Ot(() => {
1448
- if (At.__getMonacoInstance())
1449
+ const Kn = (e) => e.replace(/([^:])(\/\/+)/g, "$1/");
1450
+ function Zn(e) {
1451
+ It(() => {
1452
+ if (kt.__getMonacoInstance())
1449
1453
  return;
1450
1454
  console.log("loading monaco for @devtable/settings-form");
1451
- const r = Vn(e);
1452
- At.config({
1455
+ const r = Kn(e);
1456
+ kt.config({
1453
1457
  paths: {
1454
1458
  vs: r
1455
1459
  }
1456
- }), At.init().then((n) => console.log("monaco instance:", n));
1460
+ }), kt.init().then((n) => console.log("monaco instance:", n));
1457
1461
  }, []);
1458
1462
  }
1459
- function Kn({
1463
+ function Xn({
1460
1464
  id: e,
1461
1465
  name: t,
1462
1466
  isProtected: r,
1463
1467
  onSuccess: n,
1464
1468
  styles: i = de
1465
1469
  }) {
1466
- const s = Ze(), l = async () => {
1470
+ const s = Xe(), l = async () => {
1467
1471
  e && (oe({
1468
1472
  id: "for-deleting",
1469
1473
  title: "Pending",
@@ -1487,21 +1491,21 @@ function Kn({
1487
1491
  onCancel: () => console.log("Cancel"),
1488
1492
  onConfirm: l
1489
1493
  });
1490
- return r ? /* @__PURE__ */ a.jsx(at, { withArrow: !0, events: {
1494
+ return r ? /* @__PURE__ */ a.jsx(it, { withArrow: !0, events: {
1491
1495
  hover: !0,
1492
1496
  touch: !1,
1493
1497
  focus: !1
1494
- }, label: "This is a preset datasource, it can not be deleted", children: /* @__PURE__ */ a.jsx(D, { size: i.button.size, color: "gray", variant: "light", leftIcon: /* @__PURE__ */ a.jsx(dr, { size: 16 }), sx: {
1498
+ }, label: "This is a preset datasource, it can not be deleted", children: /* @__PURE__ */ a.jsx(I, { size: i.button.size, color: "gray", variant: "light", leftIcon: /* @__PURE__ */ a.jsx(dr, { size: 16 }), sx: {
1495
1499
  transform: "none !important"
1496
- }, children: "Delete" }) }) : /* @__PURE__ */ a.jsx(D, { size: i.button.size, color: "red", onClick: d, leftIcon: /* @__PURE__ */ a.jsx(mt, { size: 16 }), children: "Delete" });
1500
+ }, children: "Delete" }) }) : /* @__PURE__ */ a.jsx(I, { size: i.button.size, color: "red", onClick: d, leftIcon: /* @__PURE__ */ a.jsx(bt, { size: 16 }), children: "Delete" });
1497
1501
  }
1498
- const tr = {
1502
+ const rr = {
1499
1503
  pre: ["function pre_process({ method, url, params, headers, data }, utils) {", " // your code goes here", " return { method, url, params, headers, data }", "}"].join(`
1500
1504
  `),
1501
1505
  post: ["function post_process(res, utils) {", " // your code goes here", " return data", "}"].join(`
1502
1506
  `)
1503
1507
  };
1504
- function Zn({
1508
+ function Qn({
1505
1509
  name: e,
1506
1510
  config: t,
1507
1511
  submit: r,
@@ -1517,7 +1521,7 @@ function Zn({
1517
1521
  });
1518
1522
  return /* @__PURE__ */ a.jsx(X, { mx: "auto", children: /* @__PURE__ */ a.jsxs("form", { onSubmit: s(r), children: [
1519
1523
  /* @__PURE__ */ a.jsx(Q, { mb: n.spacing, size: n.size, required: !0, label: "Name", value: e, readOnly: !0 }),
1520
- /* @__PURE__ */ a.jsx(ct, { label: "Connection Info", labelPosition: "center" }),
1524
+ /* @__PURE__ */ a.jsx(dt, { label: "Connection Info", labelPosition: "center" }),
1521
1525
  /* @__PURE__ */ a.jsx(R, { name: "config.host", control: i, render: ({
1522
1526
  field: l
1523
1527
  }) => /* @__PURE__ */ a.jsx(Q, { mb: n.spacing, size: n.size, label: "Base URL", sx: {
@@ -1526,15 +1530,15 @@ function Zn({
1526
1530
  /* @__PURE__ */ a.jsxs(z, { grow: !0, children: [
1527
1531
  /* @__PURE__ */ a.jsx(R, { name: "config.processing.pre", control: i, render: ({
1528
1532
  field: l
1529
- }) => /* @__PURE__ */ a.jsx(st, { label: "Pre Processing", modalTitle: "This function will run before sending the request (for scenarios like encryption)", defaultValue: tr.pre, ...l, styles: n }) }),
1533
+ }) => /* @__PURE__ */ a.jsx(ot, { label: "Pre Processing", modalTitle: "This function will run before sending the request (for scenarios like encryption)", defaultValue: rr.pre, ...l, styles: n }) }),
1530
1534
  /* @__PURE__ */ a.jsx(R, { name: "config.processing.post", control: i, render: ({
1531
1535
  field: l
1532
- }) => /* @__PURE__ */ a.jsx(st, { label: "Post Processing", modalTitle: "This function will run after sending the request (for scenarios like decryption)", defaultValue: tr.post, ...l, styles: n }) })
1536
+ }) => /* @__PURE__ */ a.jsx(ot, { label: "Post Processing", modalTitle: "This function will run after sending the request (for scenarios like decryption)", defaultValue: rr.post, ...l, styles: n }) })
1533
1537
  ] }),
1534
- /* @__PURE__ */ a.jsx(z, { position: "right", mt: n.spacing, children: /* @__PURE__ */ a.jsx(D, { type: "submit", size: n.button.size, children: "Save" }) })
1538
+ /* @__PURE__ */ a.jsx(z, { position: "right", mt: n.spacing, children: /* @__PURE__ */ a.jsx(I, { type: "submit", color: "green", leftIcon: /* @__PURE__ */ a.jsx(Pe, { size: 16 }), size: n.button.size, children: "Submit" }) })
1535
1539
  ] }) });
1536
1540
  }
1537
- function Xn({
1541
+ function Jn({
1538
1542
  dataSource: e,
1539
1543
  postSubmit: t,
1540
1544
  styles: r = de
@@ -1569,9 +1573,9 @@ function Xn({
1569
1573
  });
1570
1574
  }
1571
1575
  };
1572
- return e.config ? /* @__PURE__ */ a.jsx(X, { mx: "auto", children: /* @__PURE__ */ a.jsx(Zn, { name: e.key, config: e.config, submit: n, styles: r }) }) : (console.error(new Error("unexpected empty config of a http datasource")), null);
1576
+ return e.config ? /* @__PURE__ */ a.jsx(X, { mx: "auto", children: /* @__PURE__ */ a.jsx(Qn, { name: e.key, config: e.config, submit: n, styles: r }) }) : (console.error(new Error("unexpected empty config of a http datasource")), null);
1573
1577
  }
1574
- function Qn({
1578
+ function ea({
1575
1579
  dataSource: e,
1576
1580
  onSuccess: t,
1577
1581
  styles: r = de
@@ -1579,52 +1583,52 @@ function Qn({
1579
1583
  const [n, i] = F.useState(!1), s = () => i(!0), l = () => i(!1), d = () => {
1580
1584
  t(), l();
1581
1585
  };
1582
- return e.is_preset ? /* @__PURE__ */ a.jsx(at, { withArrow: !0, events: {
1586
+ return e.is_preset ? /* @__PURE__ */ a.jsx(it, { withArrow: !0, events: {
1583
1587
  hover: !0,
1584
1588
  touch: !1,
1585
1589
  focus: !1
1586
- }, label: "This is a preset datasource, it can not be changed", children: /* @__PURE__ */ a.jsx(D, { size: r.button.size, color: "gray", variant: "light", leftIcon: /* @__PURE__ */ a.jsx(dr, { size: 16 }), sx: {
1590
+ }, label: "This is a preset datasource, it can not be changed", children: /* @__PURE__ */ a.jsx(I, { size: r.button.size, color: "gray", variant: "light", leftIcon: /* @__PURE__ */ a.jsx(dr, { size: 16 }), sx: {
1587
1591
  transform: "none !important"
1588
- }, children: "Edit" }) }) : e.type !== "http" ? /* @__PURE__ */ a.jsx(at, { withArrow: !0, events: {
1592
+ }, children: "Edit" }) }) : e.type !== "http" ? /* @__PURE__ */ a.jsx(it, { withArrow: !0, events: {
1589
1593
  hover: !0,
1590
1594
  touch: !1,
1591
1595
  focus: !1
1592
- }, label: "Only HTTP datasources can be edited", children: /* @__PURE__ */ a.jsx(D, { size: r.button.size, color: "gray", variant: "light", leftIcon: /* @__PURE__ */ a.jsx(Tt, { size: 16 }), sx: {
1596
+ }, label: "Only HTTP datasources can be edited", children: /* @__PURE__ */ a.jsx(I, { size: r.button.size, color: "gray", variant: "light", leftIcon: /* @__PURE__ */ a.jsx(jt, { size: 16 }), sx: {
1593
1597
  transform: "none !important"
1594
1598
  }, children: "Edit" }) }) : /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
1595
1599
  /* @__PURE__ */ a.jsx(xe, { opened: n, onClose: () => i(!1), title: "Add a data source", trapFocus: !0, onDragStart: (p) => {
1596
1600
  p.stopPropagation();
1597
- }, children: /* @__PURE__ */ a.jsx(Xn, { dataSource: e, postSubmit: d, styles: r }) }),
1598
- /* @__PURE__ */ a.jsx(D, { size: r.button.size, color: "blue", onClick: s, leftIcon: /* @__PURE__ */ a.jsx(Tt, { size: 16 }), children: "Edit" })
1601
+ }, children: /* @__PURE__ */ a.jsx(Jn, { dataSource: e, postSubmit: d, styles: r }) }),
1602
+ /* @__PURE__ */ a.jsx(I, { size: r.button.size, color: "blue", onClick: s, leftIcon: /* @__PURE__ */ a.jsx(jt, { size: 16 }), children: "Edit" })
1599
1603
  ] });
1600
1604
  }
1601
- const Jn = {
1605
+ const ta = {
1602
1606
  http: "HTTP",
1603
1607
  mysql: "MySQL",
1604
1608
  postgresql: "PostgreSQL"
1605
- }, ea = {
1609
+ }, ra = {
1606
1610
  http: /* @__PURE__ */ a.jsx(un, {}),
1607
1611
  mysql: /* @__PURE__ */ a.jsx(cn, {}),
1608
1612
  postgresql: /* @__PURE__ */ a.jsx(dn, {})
1609
1613
  };
1610
- function ta({
1614
+ function na({
1611
1615
  type: e
1612
1616
  }) {
1613
1617
  return /* @__PURE__ */ a.jsxs(z, { children: [
1614
1618
  /* @__PURE__ */ a.jsx(Dt, { size: "xs", sx: {
1615
1619
  transform: "none !important"
1616
- }, children: ea[e] }),
1620
+ }, children: ra[e] }),
1617
1621
  /* @__PURE__ */ a.jsx(ke, { sx: {
1618
1622
  cusor: "default",
1619
1623
  userSelect: "none"
1620
- }, children: Jn[e] })
1624
+ }, children: ta[e] })
1621
1625
  ] });
1622
1626
  }
1623
- function ti({
1627
+ function ai({
1624
1628
  styles: e = de,
1625
1629
  config: t
1626
1630
  }) {
1627
- Wn(t.monacoPath), Xe(t);
1631
+ Zn(t.monacoPath), Qe(t);
1628
1632
  const {
1629
1633
  data: r = [],
1630
1634
  loading: n,
@@ -1638,12 +1642,12 @@ function ti({
1638
1642
  refreshDeps: []
1639
1643
  });
1640
1644
  return /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
1641
- /* @__PURE__ */ a.jsx(z, { pt: e.spacing, position: "right", children: /* @__PURE__ */ a.jsx(Yn, { onSuccess: i }) }),
1645
+ /* @__PURE__ */ a.jsx(z, { pt: e.spacing, position: "right", children: /* @__PURE__ */ a.jsx(Wn, { onSuccess: i }) }),
1642
1646
  /* @__PURE__ */ a.jsxs(X, { mt: e.spacing, sx: {
1643
1647
  position: "relative"
1644
1648
  }, children: [
1645
- /* @__PURE__ */ a.jsx(pt, { visible: n }),
1646
- /* @__PURE__ */ a.jsxs(ft, { horizontalSpacing: e.spacing, verticalSpacing: e.spacing, fontSize: e.size, highlightOnHover: !0, children: [
1649
+ /* @__PURE__ */ a.jsx(ft, { visible: n }),
1650
+ /* @__PURE__ */ a.jsxs(gt, { horizontalSpacing: e.spacing, verticalSpacing: e.spacing, fontSize: e.size, highlightOnHover: !0, children: [
1647
1651
  /* @__PURE__ */ a.jsx("thead", { children: /* @__PURE__ */ a.jsxs("tr", { children: [
1648
1652
  /* @__PURE__ */ a.jsx("th", { children: "Type" }),
1649
1653
  /* @__PURE__ */ a.jsx("th", { children: "Name" }),
@@ -1657,11 +1661,11 @@ function ti({
1657
1661
  is_preset: f
1658
1662
  } = s;
1659
1663
  return /* @__PURE__ */ a.jsxs("tr", { children: [
1660
- /* @__PURE__ */ a.jsx("td", { width: 200, children: /* @__PURE__ */ a.jsx(ta, { type: p }) }),
1664
+ /* @__PURE__ */ a.jsx("td", { width: 200, children: /* @__PURE__ */ a.jsx(na, { type: p }) }),
1661
1665
  /* @__PURE__ */ a.jsx("td", { children: d }),
1662
1666
  /* @__PURE__ */ a.jsx("td", { width: 400, children: /* @__PURE__ */ a.jsxs(z, { position: "left", children: [
1663
- /* @__PURE__ */ a.jsx(Qn, { dataSource: s, onSuccess: i, styles: e }),
1664
- /* @__PURE__ */ a.jsx(Kn, { isProtected: f, id: l, name: d, onSuccess: i, styles: e })
1667
+ /* @__PURE__ */ a.jsx(ea, { dataSource: s, onSuccess: i, styles: e }),
1668
+ /* @__PURE__ */ a.jsx(Xn, { isProtected: f, id: l, name: d, onSuccess: i, styles: e })
1665
1669
  ] }) })
1666
1670
  ] }, d);
1667
1671
  }) })
@@ -1669,15 +1673,15 @@ function ti({
1669
1673
  ] })
1670
1674
  ] });
1671
1675
  }
1672
- const ra = ut(({
1676
+ const aa = ct(({
1673
1677
  label: e,
1674
1678
  value: t,
1675
1679
  description: r,
1676
1680
  ...n
1677
- }, i) => /* @__PURE__ */ a.jsxs(Ke, { spacing: 2, ref: i, ...n, children: [
1681
+ }, i) => /* @__PURE__ */ a.jsxs(Ze, { spacing: 2, ref: i, ...n, children: [
1678
1682
  /* @__PURE__ */ a.jsx(ke, { size: "sm", children: e }),
1679
1683
  /* @__PURE__ */ a.jsx(ke, { size: "xs", color: "dimmed", className: "role-description", children: r })
1680
- ] })), Ft = ut(({
1684
+ ] })), Nt = ct(({
1681
1685
  styles: e,
1682
1686
  value: t,
1683
1687
  onChange: r
@@ -1693,7 +1697,7 @@ const ra = ut(({
1693
1697
  })), {
1694
1698
  refreshDeps: []
1695
1699
  });
1696
- return /* @__PURE__ */ a.jsx(Xr, { ref: n, mb: e.spacing, size: e.size, required: !0, label: "Role", itemComponent: ra, data: i, disabled: s, styles: () => ({
1700
+ return /* @__PURE__ */ a.jsx(Qr, { ref: n, mb: e.spacing, size: e.size, required: !0, label: "Role", itemComponent: aa, data: i, disabled: s, styles: () => ({
1697
1701
  item: {
1698
1702
  "&[data-selected]": {
1699
1703
  "&, &:hover": {
@@ -1711,7 +1715,7 @@ const ra = ut(({
1711
1715
  size: "xs"
1712
1716
  }
1713
1717
  };
1714
- function na({
1718
+ function ia({
1715
1719
  postSubmit: e,
1716
1720
  styles: t = we,
1717
1721
  initialRoleID: r
@@ -1765,14 +1769,14 @@ function na({
1765
1769
  }) => /* @__PURE__ */ a.jsx(Q, { mb: t.spacing, size: t.size, required: !0, label: "Email", ...l }) }),
1766
1770
  /* @__PURE__ */ a.jsx(R, { name: "password", control: n, render: ({
1767
1771
  field: l
1768
- }) => /* @__PURE__ */ a.jsx(dt, { mb: t.spacing, size: t.size, required: !0, label: "Password", description: "Password must be at least 8 characters long", ...l }) }),
1772
+ }) => /* @__PURE__ */ a.jsx(pt, { mb: t.spacing, size: t.size, required: !0, label: "Password", description: "Password must be at least 8 characters long", ...l }) }),
1769
1773
  /* @__PURE__ */ a.jsx(R, { name: "role_id", control: n, render: ({
1770
1774
  field: l
1771
- }) => /* @__PURE__ */ a.jsx(Ft, { styles: t, ...l }) }),
1772
- /* @__PURE__ */ a.jsx(z, { position: "right", mt: t.spacing, children: /* @__PURE__ */ a.jsx(D, { type: "submit", size: t.button.size, children: "Save" }) })
1775
+ }) => /* @__PURE__ */ a.jsx(Nt, { styles: t, ...l }) }),
1776
+ /* @__PURE__ */ a.jsx(z, { position: "right", mt: t.spacing, children: /* @__PURE__ */ a.jsx(I, { type: "submit", color: "green", leftIcon: /* @__PURE__ */ a.jsx(Pe, { size: 16 }), size: t.button.size, children: "Submit" }) })
1773
1777
  ] }) });
1774
1778
  }
1775
- function aa({
1779
+ function sa({
1776
1780
  onSuccess: e,
1777
1781
  styles: t = we,
1778
1782
  initialRoleID: r
@@ -1783,17 +1787,17 @@ function aa({
1783
1787
  return /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
1784
1788
  /* @__PURE__ */ a.jsx(xe, { opened: n, onClose: () => i(!1), title: "Add an Account", trapFocus: !0, onDragStart: (p) => {
1785
1789
  p.stopPropagation();
1786
- }, children: /* @__PURE__ */ a.jsx(na, { postSubmit: d, styles: t, initialRoleID: r }) }),
1787
- /* @__PURE__ */ a.jsx(D, { size: t.button.size, onClick: s, leftIcon: /* @__PURE__ */ a.jsx(ht, { size: 20 }), children: "Add an Account" })
1790
+ }, children: /* @__PURE__ */ a.jsx(ia, { postSubmit: d, styles: t, initialRoleID: r }) }),
1791
+ /* @__PURE__ */ a.jsx(I, { size: t.button.size, onClick: s, leftIcon: /* @__PURE__ */ a.jsx(mt, { size: 20 }), children: "Add an Account" })
1788
1792
  ] });
1789
1793
  }
1790
- function ia({
1794
+ function oa({
1791
1795
  id: e,
1792
1796
  name: t,
1793
1797
  onSuccess: r,
1794
1798
  styles: n = we
1795
1799
  }) {
1796
- const i = Ze(), s = async () => {
1800
+ const i = Xe(), s = async () => {
1797
1801
  if (e) {
1798
1802
  oe({
1799
1803
  id: "for-deleting",
@@ -1829,9 +1833,9 @@ function ia({
1829
1833
  onCancel: () => console.log("Cancel"),
1830
1834
  onConfirm: s
1831
1835
  });
1832
- return /* @__PURE__ */ a.jsx(D, { size: n.button.size, color: "red", onClick: l, leftIcon: /* @__PURE__ */ a.jsx(mt, { size: 20 }), children: "Delete" });
1836
+ return /* @__PURE__ */ a.jsx(I, { size: n.button.size, color: "red", onClick: l, leftIcon: /* @__PURE__ */ a.jsx(bt, { size: 20 }), children: "Delete" });
1833
1837
  }
1834
- function sa({
1838
+ function la({
1835
1839
  id: e,
1836
1840
  name: t,
1837
1841
  email: r,
@@ -1898,11 +1902,11 @@ function sa({
1898
1902
  }) => /* @__PURE__ */ a.jsx(Q, { mb: s.spacing, size: s.size, required: !0, label: "Email", ...u }) }),
1899
1903
  /* @__PURE__ */ a.jsx(R, { name: "role_id", control: l, render: ({
1900
1904
  field: u
1901
- }) => /* @__PURE__ */ a.jsx(Ft, { styles: s, ...u }) }),
1902
- /* @__PURE__ */ a.jsx(ct, { my: 20, variant: "dashed", label: "", labelPosition: "center" }),
1905
+ }) => /* @__PURE__ */ a.jsx(Nt, { styles: s, ...u }) }),
1906
+ /* @__PURE__ */ a.jsx(dt, { my: 20, variant: "dashed", label: "", labelPosition: "center" }),
1903
1907
  /* @__PURE__ */ a.jsx(R, { name: "reset_password", control: l, render: ({
1904
1908
  field: u
1905
- }) => /* @__PURE__ */ a.jsx(Qr, { mb: s.spacing, size: s.size, label: "Reset password", checked: u.value, onChange: (g) => u.onChange(g.currentTarget.checked), styles: {
1909
+ }) => /* @__PURE__ */ a.jsx(Jr, { mb: s.spacing, size: s.size, label: "Reset password", checked: u.value, onChange: (g) => u.onChange(g.currentTarget.checked), styles: {
1906
1910
  label: {
1907
1911
  verticalAlign: "middle"
1908
1912
  }
@@ -1914,13 +1918,13 @@ function sa({
1914
1918
  control: l,
1915
1919
  render: ({
1916
1920
  field: u
1917
- }) => /* @__PURE__ */ a.jsx(dt, { autoComplete: "off", mb: s.spacing, size: s.size, required: !0, description: "Password must be at least 8 characters long", label: "New Password", ...u })
1921
+ }) => /* @__PURE__ */ a.jsx(pt, { autoComplete: "off", mb: s.spacing, size: s.size, required: !0, description: "Password must be at least 8 characters long", label: "New Password", ...u })
1918
1922
  }
1919
1923
  ),
1920
- /* @__PURE__ */ a.jsx(z, { position: "right", mt: s.spacing, children: /* @__PURE__ */ a.jsx(D, { type: "submit", size: s.button.size, children: "Submit" }) })
1924
+ /* @__PURE__ */ a.jsx(z, { position: "right", mt: s.spacing, children: /* @__PURE__ */ a.jsx(I, { type: "submit", color: "green", leftIcon: /* @__PURE__ */ a.jsx(Pe, { size: 16 }), size: s.button.size, children: "Submit" }) })
1921
1925
  ] }) });
1922
1926
  }
1923
- function oa({
1927
+ function ua({
1924
1928
  account: e,
1925
1929
  onSuccess: t,
1926
1930
  styles: r = we
@@ -1931,16 +1935,16 @@ function oa({
1931
1935
  return /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
1932
1936
  /* @__PURE__ */ a.jsx(xe, { opened: n, onClose: () => i(!1), title: `Editing ${e.name}`, trapFocus: !0, onDragStart: (p) => {
1933
1937
  p.stopPropagation();
1934
- }, children: /* @__PURE__ */ a.jsx(sa, { ...e, postSubmit: d, styles: r }) }),
1935
- /* @__PURE__ */ a.jsx(D, { size: r.button.size, onClick: s, leftIcon: /* @__PURE__ */ a.jsx(nn, { size: 20 }), children: "Edit" })
1938
+ }, children: /* @__PURE__ */ a.jsx(la, { ...e, postSubmit: d, styles: r }) }),
1939
+ /* @__PURE__ */ a.jsx(I, { size: r.button.size, onClick: s, leftIcon: /* @__PURE__ */ a.jsx(an, { size: 20 }), children: "Edit" })
1936
1940
  ] });
1937
1941
  }
1938
- function ri({
1942
+ function ii({
1939
1943
  styles: e = we,
1940
1944
  config: t
1941
1945
  }) {
1942
1946
  var d;
1943
- Xe(t);
1947
+ Qe(t);
1944
1948
  const {
1945
1949
  data: r = [],
1946
1950
  loading: n,
@@ -1964,12 +1968,12 @@ function ri({
1964
1968
  refreshDeps: []
1965
1969
  });
1966
1970
  return /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
1967
- /* @__PURE__ */ a.jsx(z, { pt: e.spacing, position: "right", children: /* @__PURE__ */ a.jsx(aa, { onSuccess: i, initialRoleID: ((d = s == null ? void 0 : s[0]) == null ? void 0 : d.value) ?? "INACTIVE" }) }),
1971
+ /* @__PURE__ */ a.jsx(z, { pt: e.spacing, position: "right", children: /* @__PURE__ */ a.jsx(sa, { onSuccess: i, initialRoleID: ((d = s == null ? void 0 : s[0]) == null ? void 0 : d.value) ?? "INACTIVE" }) }),
1968
1972
  /* @__PURE__ */ a.jsxs(X, { mt: e.spacing, sx: {
1969
1973
  position: "relative"
1970
1974
  }, children: [
1971
- /* @__PURE__ */ a.jsx(pt, { visible: n || l }),
1972
- /* @__PURE__ */ a.jsxs(ft, { horizontalSpacing: e.spacing, verticalSpacing: e.spacing, fontSize: e.size, highlightOnHover: !0, children: [
1975
+ /* @__PURE__ */ a.jsx(ft, { visible: n || l }),
1976
+ /* @__PURE__ */ a.jsxs(gt, { horizontalSpacing: e.spacing, verticalSpacing: e.spacing, fontSize: e.size, highlightOnHover: !0, children: [
1973
1977
  /* @__PURE__ */ a.jsx("thead", { children: /* @__PURE__ */ a.jsxs("tr", { children: [
1974
1978
  /* @__PURE__ */ a.jsx("th", { children: "Username" }),
1975
1979
  /* @__PURE__ */ a.jsx("th", { children: "Email" }),
@@ -1988,8 +1992,8 @@ function ri({
1988
1992
  /* @__PURE__ */ a.jsx("td", { width: 200, children: c }),
1989
1993
  /* @__PURE__ */ a.jsx("td", { width: 200, children: u }),
1990
1994
  /* @__PURE__ */ a.jsx("td", { width: 200, children: /* @__PURE__ */ a.jsxs(z, { position: "left", children: [
1991
- /* @__PURE__ */ a.jsx(oa, { account: p, onSuccess: i }),
1992
- /* @__PURE__ */ a.jsx(ia, { id: f, name: h, onSuccess: i })
1995
+ /* @__PURE__ */ a.jsx(ua, { account: p, onSuccess: i }),
1996
+ /* @__PURE__ */ a.jsx(oa, { id: f, name: h, onSuccess: i })
1993
1997
  ] }) })
1994
1998
  ] }, f);
1995
1999
  }) })
@@ -1997,7 +2001,7 @@ function ri({
1997
2001
  ] })
1998
2002
  ] });
1999
2003
  }
2000
- function la({
2004
+ function ca({
2001
2005
  postSubmit: e,
2002
2006
  styles: t = we
2003
2007
  }) {
@@ -2045,29 +2049,29 @@ function la({
2045
2049
  }) => /* @__PURE__ */ a.jsx(Q, { mb: t.spacing, size: t.size, required: !0, label: "Username", ...s }) }),
2046
2050
  /* @__PURE__ */ a.jsx(R, { name: "password", control: r, render: ({
2047
2051
  field: s
2048
- }) => /* @__PURE__ */ a.jsx(dt, { mb: t.spacing, size: t.size, required: !0, label: "Password", ...s }) }),
2049
- /* @__PURE__ */ a.jsx(z, { position: "right", mt: t.spacing, children: /* @__PURE__ */ a.jsx(D, { type: "submit", size: t.button.size, children: "Submit" }) })
2052
+ }) => /* @__PURE__ */ a.jsx(pt, { mb: t.spacing, size: t.size, required: !0, label: "Password", ...s }) }),
2053
+ /* @__PURE__ */ a.jsx(z, { position: "right", mt: t.spacing, children: /* @__PURE__ */ a.jsx(I, { type: "submit", size: t.button.size, children: "Submit" }) })
2050
2054
  ] }) });
2051
2055
  }
2052
- function ni({
2056
+ function si({
2053
2057
  styles: e = we,
2054
2058
  config: t,
2055
2059
  onSuccess: r
2056
2060
  }) {
2057
- return Xe(t), /* @__PURE__ */ a.jsx(a.Fragment, { children: /* @__PURE__ */ a.jsx(X, { mt: e.spacing, sx: {
2061
+ return Qe(t), /* @__PURE__ */ a.jsx(a.Fragment, { children: /* @__PURE__ */ a.jsx(X, { mt: e.spacing, sx: {
2058
2062
  position: "relative"
2059
- }, children: /* @__PURE__ */ a.jsx(la, { styles: e, postSubmit: r }) }) });
2063
+ }, children: /* @__PURE__ */ a.jsx(ca, { styles: e, postSubmit: r }) }) });
2060
2064
  }
2061
- const vt = {
2065
+ const yt = {
2062
2066
  size: "sm",
2063
2067
  spacing: "md",
2064
2068
  button: {
2065
2069
  size: "xs"
2066
2070
  }
2067
2071
  };
2068
- function ua({
2072
+ function da({
2069
2073
  postSubmit: e,
2070
- styles: t = vt,
2074
+ styles: t = yt,
2071
2075
  initialRoleID: r
2072
2076
  }) {
2073
2077
  const {
@@ -2117,19 +2121,19 @@ function ua({
2117
2121
  }) => /* @__PURE__ */ a.jsx(Q, { mb: t.spacing, size: t.size, required: !0, label: "Name", ...l }) }),
2118
2122
  /* @__PURE__ */ a.jsx(R, { name: "role_id", control: n, render: ({
2119
2123
  field: l
2120
- }) => /* @__PURE__ */ a.jsx(Ft, { styles: t, ...l }) }),
2121
- /* @__PURE__ */ a.jsx(z, { position: "right", mt: t.spacing, children: /* @__PURE__ */ a.jsx(D, { type: "submit", size: t.button.size, children: "Save" }) })
2124
+ }) => /* @__PURE__ */ a.jsx(Nt, { styles: t, ...l }) }),
2125
+ /* @__PURE__ */ a.jsx(z, { position: "right", mt: t.spacing, children: /* @__PURE__ */ a.jsx(I, { type: "submit", size: t.button.size, children: "Save" }) })
2122
2126
  ] }) });
2123
2127
  }
2124
- function ca({
2128
+ function pa({
2125
2129
  onSuccess: e,
2126
- styles: t = vt,
2130
+ styles: t = yt,
2127
2131
  initialRoleID: r
2128
2132
  }) {
2129
- const n = Ze(), [i, s] = F.useState(!1), l = () => s(!0), d = () => s(!1), p = (f, h) => {
2133
+ const n = Xe(), [i, s] = F.useState(!1), l = () => s(!0), d = () => s(!1), p = (f, h) => {
2130
2134
  d(), n.openModal({
2131
2135
  title: "API Key is generated",
2132
- children: /* @__PURE__ */ a.jsxs(Ke, { children: [
2136
+ children: /* @__PURE__ */ a.jsxs(Ze, { children: [
2133
2137
  /* @__PURE__ */ a.jsx(ke, { color: "dimmed", children: "Make sure you save it - you won't be able to access it again." }),
2134
2138
  /* @__PURE__ */ a.jsx(Q, { defaultValue: f, disabled: !0, label: "APP ID", styles: {
2135
2139
  input: {
@@ -2141,8 +2145,8 @@ function ca({
2141
2145
  cursor: "text !important"
2142
2146
  }
2143
2147
  } }),
2144
- /* @__PURE__ */ a.jsx(D, { size: "sm", onClick: () => {
2145
- ln();
2148
+ /* @__PURE__ */ a.jsx(I, { size: "sm", onClick: () => {
2149
+ gn();
2146
2150
  }, children: "I've saved this API Key" })
2147
2151
  ] }),
2148
2152
  onClose: () => {
@@ -2153,17 +2157,17 @@ function ca({
2153
2157
  return /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
2154
2158
  /* @__PURE__ */ a.jsx(xe, { opened: i, onClose: () => s(!1), title: "Add an API Key", trapFocus: !0, onDragStart: (f) => {
2155
2159
  f.stopPropagation();
2156
- }, children: /* @__PURE__ */ a.jsx(ua, { postSubmit: p, styles: t, initialRoleID: r }) }),
2157
- /* @__PURE__ */ a.jsx(D, { size: t.button.size, onClick: l, leftIcon: /* @__PURE__ */ a.jsx(ht, { size: 20 }), children: "Add an API Key" })
2160
+ }, children: /* @__PURE__ */ a.jsx(da, { postSubmit: p, styles: t, initialRoleID: r }) }),
2161
+ /* @__PURE__ */ a.jsx(I, { size: t.button.size, onClick: l, leftIcon: /* @__PURE__ */ a.jsx(mt, { size: 20 }), children: "Add an API Key" })
2158
2162
  ] });
2159
2163
  }
2160
- function da({
2164
+ function fa({
2161
2165
  id: e,
2162
2166
  name: t,
2163
2167
  onSuccess: r,
2164
- styles: n = vt
2168
+ styles: n = yt
2165
2169
  }) {
2166
- const i = Ze(), s = async () => {
2170
+ const i = Xe(), s = async () => {
2167
2171
  if (e) {
2168
2172
  oe({
2169
2173
  id: "for-deleting",
@@ -2199,14 +2203,14 @@ function da({
2199
2203
  onCancel: () => console.log("Cancel"),
2200
2204
  onConfirm: s
2201
2205
  });
2202
- return /* @__PURE__ */ a.jsx(D, { size: n.button.size, color: "red", onClick: l, leftIcon: /* @__PURE__ */ a.jsx(mt, { size: 20 }), children: "Delete" });
2206
+ return /* @__PURE__ */ a.jsx(I, { size: n.button.size, color: "red", onClick: l, leftIcon: /* @__PURE__ */ a.jsx(bt, { size: 20 }), children: "Delete" });
2203
2207
  }
2204
- function ai({
2205
- styles: e = vt,
2208
+ function oi({
2209
+ styles: e = yt,
2206
2210
  config: t
2207
2211
  }) {
2208
2212
  var d;
2209
- Xe(t);
2213
+ Qe(t);
2210
2214
  const {
2211
2215
  data: r = [],
2212
2216
  loading: n,
@@ -2230,12 +2234,12 @@ function ai({
2230
2234
  refreshDeps: []
2231
2235
  });
2232
2236
  return /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
2233
- /* @__PURE__ */ a.jsx(z, { pt: e.spacing, position: "right", children: /* @__PURE__ */ a.jsx(ca, { onSuccess: i, initialRoleID: ((d = s == null ? void 0 : s[0]) == null ? void 0 : d.value) ?? "INACTIVE" }) }),
2237
+ /* @__PURE__ */ a.jsx(z, { pt: e.spacing, position: "right", children: /* @__PURE__ */ a.jsx(pa, { onSuccess: i, initialRoleID: ((d = s == null ? void 0 : s[0]) == null ? void 0 : d.value) ?? "INACTIVE" }) }),
2234
2238
  /* @__PURE__ */ a.jsxs(X, { mt: e.spacing, sx: {
2235
2239
  position: "relative"
2236
2240
  }, children: [
2237
- /* @__PURE__ */ a.jsx(pt, { visible: n || l }),
2238
- /* @__PURE__ */ a.jsxs(ft, { horizontalSpacing: e.spacing, verticalSpacing: e.spacing, fontSize: e.size, highlightOnHover: !0, children: [
2241
+ /* @__PURE__ */ a.jsx(ft, { visible: n || l }),
2242
+ /* @__PURE__ */ a.jsxs(gt, { horizontalSpacing: e.spacing, verticalSpacing: e.spacing, fontSize: e.size, highlightOnHover: !0, children: [
2239
2243
  /* @__PURE__ */ a.jsx("thead", { children: /* @__PURE__ */ a.jsxs("tr", { children: [
2240
2244
  /* @__PURE__ */ a.jsx("th", { children: "Name" }),
2241
2245
  /* @__PURE__ */ a.jsx("th", { children: "APP ID" }),
@@ -2253,14 +2257,14 @@ function ai({
2253
2257
  /* @__PURE__ */ a.jsx("td", { width: 200, children: h }),
2254
2258
  /* @__PURE__ */ a.jsx("td", { width: 200, children: c }),
2255
2259
  /* @__PURE__ */ a.jsx("td", { width: 200, children: u }),
2256
- /* @__PURE__ */ a.jsx("td", { width: 200, children: /* @__PURE__ */ a.jsx(z, { position: "left", children: /* @__PURE__ */ a.jsx(da, { id: f, name: h, onSuccess: i }) }) })
2260
+ /* @__PURE__ */ a.jsx("td", { width: 200, children: /* @__PURE__ */ a.jsx(z, { position: "left", children: /* @__PURE__ */ a.jsx(fa, { id: f, name: h, onSuccess: i }) }) })
2257
2261
  ] }, f);
2258
2262
  }) })
2259
2263
  ] })
2260
2264
  ] })
2261
2265
  ] });
2262
2266
  }
2263
- const br = ({
2267
+ const vr = ({
2264
2268
  value: e,
2265
2269
  onChange: t,
2266
2270
  height: r = "200px",
@@ -2269,7 +2273,7 @@ const br = ({
2269
2273
  const i = (l) => {
2270
2274
  console.log("changing"), t == null || t(l ?? "");
2271
2275
  }, s = !t;
2272
- return /* @__PURE__ */ a.jsx(cr, { className: "minimal-monaco-editor", height: r, defaultLanguage: n, value: e, onChange: s ? void 0 : i, theme: "vs-dark", options: {
2276
+ return /* @__PURE__ */ a.jsx(pr, { className: "minimal-monaco-editor", height: r, defaultLanguage: n, value: e, onChange: s ? void 0 : i, theme: "vs-dark", options: {
2273
2277
  lineNumbers: "off",
2274
2278
  folding: !1,
2275
2279
  lineDecorationsWidth: 20,
@@ -2280,16 +2284,16 @@ const br = ({
2280
2284
  },
2281
2285
  readOnly: s || !t
2282
2286
  } });
2283
- }, Pe = {
2287
+ }, Me = {
2284
2288
  size: "sm",
2285
2289
  spacing: "md",
2286
2290
  button: {
2287
2291
  size: "xs"
2288
2292
  }
2289
2293
  };
2290
- function pa({
2294
+ function ga({
2291
2295
  postSubmit: e,
2292
- styles: t = Pe
2296
+ styles: t = Me
2293
2297
  }) {
2294
2298
  const {
2295
2299
  control: r,
@@ -2330,18 +2334,18 @@ function pa({
2330
2334
  }) => /* @__PURE__ */ a.jsx(Q, { mb: t.spacing, size: t.size, required: !0, label: "Name", ...s }) }),
2331
2335
  /* @__PURE__ */ a.jsx(R, { name: "content", control: r, render: ({
2332
2336
  field: s
2333
- }) => /* @__PURE__ */ a.jsxs(Ke, { spacing: 4, children: [
2337
+ }) => /* @__PURE__ */ a.jsxs(Ze, { spacing: 4, children: [
2334
2338
  /* @__PURE__ */ a.jsx(ke, { size: 14, fw: 500, color: "#212529", sx: {
2335
2339
  cursor: "default"
2336
2340
  }, children: "Content" }),
2337
- /* @__PURE__ */ a.jsx(br, { height: "600px", ...s })
2341
+ /* @__PURE__ */ a.jsx(vr, { height: "600px", ...s })
2338
2342
  ] }) }),
2339
- /* @__PURE__ */ a.jsx(z, { position: "right", mt: t.spacing, children: /* @__PURE__ */ a.jsx(D, { type: "submit", size: t.button.size, children: "Save" }) })
2343
+ /* @__PURE__ */ a.jsx(z, { position: "right", mt: t.spacing, children: /* @__PURE__ */ a.jsx(I, { type: "submit", color: "green", leftIcon: /* @__PURE__ */ a.jsx(Pe, { size: 16 }), size: t.button.size, children: "Submit" }) })
2340
2344
  ] }) });
2341
2345
  }
2342
- function fa({
2346
+ function ha({
2343
2347
  onSuccess: e,
2344
- styles: t = Pe
2348
+ styles: t = Me
2345
2349
  }) {
2346
2350
  const [r, n] = F.useState(!1), i = () => n(!0), s = () => n(!1), l = () => {
2347
2351
  s(), e();
@@ -2349,13 +2353,13 @@ function fa({
2349
2353
  return /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
2350
2354
  /* @__PURE__ */ a.jsx(xe, { opened: r, onClose: () => n(!1), title: "Add a SQL Snippet", trapFocus: !0, onDragStart: (d) => {
2351
2355
  d.stopPropagation();
2352
- }, size: "80vw", children: /* @__PURE__ */ a.jsx(pa, { postSubmit: l, styles: t }) }),
2353
- /* @__PURE__ */ a.jsx(D, { size: t.button.size, onClick: i, leftIcon: /* @__PURE__ */ a.jsx(ht, { size: 18 }), children: "Add a SQL Snippet" })
2356
+ }, size: "80vw", children: /* @__PURE__ */ a.jsx(ga, { postSubmit: l, styles: t }) }),
2357
+ /* @__PURE__ */ a.jsx(I, { size: t.button.size, onClick: i, leftIcon: /* @__PURE__ */ a.jsx(mt, { size: 18 }), children: "Add a SQL Snippet" })
2354
2358
  ] });
2355
2359
  }
2356
- function ga({
2360
+ function ma({
2357
2361
  postSubmit: e,
2358
- styles: t = Pe,
2362
+ styles: t = Me,
2359
2363
  id: r,
2360
2364
  content: n
2361
2365
  }) {
@@ -2398,18 +2402,18 @@ function ga({
2398
2402
  }) => /* @__PURE__ */ a.jsx(Q, { mb: t.spacing, size: t.size, required: !0, label: "Name", ...d }) }),
2399
2403
  /* @__PURE__ */ a.jsx(R, { name: "content", control: i, render: ({
2400
2404
  field: d
2401
- }) => /* @__PURE__ */ a.jsxs(Ke, { spacing: 4, children: [
2405
+ }) => /* @__PURE__ */ a.jsxs(Ze, { spacing: 4, children: [
2402
2406
  /* @__PURE__ */ a.jsx(ke, { size: 14, fw: 500, color: "#212529", sx: {
2403
2407
  cursor: "default"
2404
2408
  }, children: "Content" }),
2405
- /* @__PURE__ */ a.jsx(br, { height: "600px", ...d })
2409
+ /* @__PURE__ */ a.jsx(vr, { height: "600px", ...d })
2406
2410
  ] }) }),
2407
- /* @__PURE__ */ a.jsx(z, { position: "right", mt: t.spacing, children: /* @__PURE__ */ a.jsx(D, { type: "submit", size: t.button.size, children: "Save" }) })
2411
+ /* @__PURE__ */ a.jsx(z, { position: "right", mt: t.spacing, children: /* @__PURE__ */ a.jsx(I, { type: "submit", color: "green", leftIcon: /* @__PURE__ */ a.jsx(Pe, { size: 16 }), size: t.button.size, children: "Submit" }) })
2408
2412
  ] }) });
2409
2413
  }
2410
- function ha({
2414
+ function ba({
2411
2415
  onSuccess: e,
2412
- styles: t = Pe,
2416
+ styles: t = Me,
2413
2417
  ...r
2414
2418
  }) {
2415
2419
  const [n, i] = F.useState(!1), s = () => i(!0), l = () => i(!1), d = () => {
@@ -2418,8 +2422,8 @@ function ha({
2418
2422
  return /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
2419
2423
  /* @__PURE__ */ a.jsx(xe, { opened: n, onClose: () => i(!1), title: "Edit a SQL Snippet", trapFocus: !0, onDragStart: (p) => {
2420
2424
  p.stopPropagation();
2421
- }, size: "80vw", children: /* @__PURE__ */ a.jsx(ga, { postSubmit: d, styles: t, ...r }) }),
2422
- /* @__PURE__ */ a.jsx(D, { size: t.button.size, onClick: s, leftIcon: /* @__PURE__ */ a.jsx(Tt, { size: 18 }), children: "Edit" })
2425
+ }, size: "80vw", children: /* @__PURE__ */ a.jsx(ma, { postSubmit: d, styles: t, ...r }) }),
2426
+ /* @__PURE__ */ a.jsx(I, { size: t.button.size, onClick: s, leftIcon: /* @__PURE__ */ a.jsx(jt, { size: 18 }), children: "Edit" })
2423
2427
  ] });
2424
2428
  }
2425
2429
  /**
@@ -2430,7 +2434,7 @@ function ha({
2430
2434
  * @namespace
2431
2435
  * @public
2432
2436
  */
2433
- var Rt = function() {
2437
+ var Ot = function() {
2434
2438
  var e = /(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i, t = 0, r = {}, n = {
2435
2439
  /**
2436
2440
  * A namespace for utility methods.
@@ -2926,8 +2930,8 @@ var Rt = function() {
2926
2930
  return u;
2927
2931
  }
2928
2932
  return n;
2929
- }(), b = Rt;
2930
- Rt.default = Rt;
2933
+ }(), b = Ot;
2934
+ Ot.default = Ot;
2931
2935
  b.languages.markup = {
2932
2936
  comment: {
2933
2937
  pattern: /<!--(?:(?!<!--)[\s\S])*?-->/,
@@ -5395,7 +5399,7 @@ b.languages.wasm = {
5395
5399
  number: /[+-]?\b(?:\d(?:_?\d)*(?:\.\d(?:_?\d)*)?(?:[eE][+-]?\d(?:_?\d)*)?|0x[\da-fA-F](?:_?[\da-fA-F])*(?:\.[\da-fA-F](?:_?[\da-fA-D])*)?(?:[pP][+-]?\d(?:_?\d)*)?)\b|\binf\b|\bnan(?::0x[\da-fA-F](?:_?[\da-fA-D])*)?\b/,
5396
5400
  punctuation: /[()]/
5397
5401
  };
5398
- var ma = {
5402
+ var va = {
5399
5403
  plain: {
5400
5404
  backgroundColor: "#2a2734",
5401
5405
  color: "#9a86fd"
@@ -5462,13 +5466,13 @@ var ma = {
5462
5466
  }
5463
5467
  }]
5464
5468
  };
5465
- const ba = ma;
5466
- var va = {
5469
+ const ya = va;
5470
+ var Sa = {
5467
5471
  // $FlowFixMe
5468
5472
  Prism: b,
5469
- theme: ba
5473
+ theme: ya
5470
5474
  };
5471
- function He(e, t, r) {
5475
+ function qe(e, t, r) {
5472
5476
  return t in e ? Object.defineProperty(e, t, {
5473
5477
  value: r,
5474
5478
  enumerable: !0,
@@ -5486,7 +5490,7 @@ function Se() {
5486
5490
  return e;
5487
5491
  }, Se.apply(this, arguments);
5488
5492
  }
5489
- var ya = /\r\n|\r|\n/, rr = function(e) {
5493
+ var xa = /\r\n|\r|\n/, nr = function(e) {
5490
5494
  e.length === 0 ? e.push({
5491
5495
  types: ["plain"],
5492
5496
  content: `
@@ -5494,32 +5498,32 @@ var ya = /\r\n|\r|\n/, rr = function(e) {
5494
5498
  empty: !0
5495
5499
  }) : e.length === 1 && e[0].content === "" && (e[0].content = `
5496
5500
  `, e[0].empty = !0);
5497
- }, nr = function(e, t) {
5501
+ }, ar = function(e, t) {
5498
5502
  var r = e.length;
5499
5503
  return r > 0 && e[r - 1] === t ? e : e.concat(t);
5500
- }, Sa = function(e) {
5504
+ }, wa = function(e) {
5501
5505
  for (var t = [[]], r = [e], n = [0], i = [e.length], s = 0, l = 0, d = [], p = [d]; l > -1; ) {
5502
5506
  for (; (s = n[l]++) < i[l]; ) {
5503
5507
  var f = void 0, h = t[l], c = r[l], u = c[s];
5504
- if (typeof u == "string" ? (h = l > 0 ? h : ["plain"], f = u) : (h = nr(h, u.type), u.alias && (h = nr(h, u.alias)), f = u.content), typeof f != "string") {
5508
+ if (typeof u == "string" ? (h = l > 0 ? h : ["plain"], f = u) : (h = ar(h, u.type), u.alias && (h = ar(h, u.alias)), f = u.content), typeof f != "string") {
5505
5509
  l++, t.push(h), r.push(f), n.push(0), i.push(f.length);
5506
5510
  continue;
5507
5511
  }
5508
- var g = f.split(ya), v = g.length;
5512
+ var g = f.split(xa), v = g.length;
5509
5513
  d.push({
5510
5514
  types: h,
5511
5515
  content: g[0]
5512
5516
  });
5513
5517
  for (var m = 1; m < v; m++)
5514
- rr(d), p.push(d = []), d.push({
5518
+ nr(d), p.push(d = []), d.push({
5515
5519
  types: h,
5516
5520
  content: g[m]
5517
5521
  });
5518
5522
  }
5519
5523
  l--, t.pop(), r.pop(), n.pop(), i.pop();
5520
5524
  }
5521
- return rr(d), p;
5522
- }, xa = function(e, t) {
5525
+ return nr(d), p;
5526
+ }, Ea = function(e, t) {
5523
5527
  var r = e.plain, n = /* @__PURE__ */ Object.create(null), i = e.styles.reduce(function(s, l) {
5524
5528
  var d = l.languages, p = l.style;
5525
5529
  return d && !d.includes(t) || l.types.forEach(function(f) {
@@ -5531,30 +5535,30 @@ var ya = /\r\n|\r|\n/, rr = function(e) {
5531
5535
  backgroundColor: null
5532
5536
  }), i;
5533
5537
  };
5534
- function ar(e, t) {
5538
+ function ir(e, t) {
5535
5539
  var r = {};
5536
5540
  for (var n in e)
5537
5541
  Object.prototype.hasOwnProperty.call(e, n) && t.indexOf(n) === -1 && (r[n] = e[n]);
5538
5542
  return r;
5539
5543
  }
5540
- var wa = /* @__PURE__ */ function(e) {
5544
+ var _a = /* @__PURE__ */ function(e) {
5541
5545
  function t() {
5542
5546
  for (var r = this, n = [], i = arguments.length; i--; )
5543
5547
  n[i] = arguments[i];
5544
- e.apply(this, n), He(this, "getThemeDict", function(s) {
5548
+ e.apply(this, n), qe(this, "getThemeDict", function(s) {
5545
5549
  if (r.themeDict !== void 0 && s.theme === r.prevTheme && s.language === r.prevLanguage)
5546
5550
  return r.themeDict;
5547
5551
  r.prevTheme = s.theme, r.prevLanguage = s.language;
5548
- var l = s.theme ? xa(s.theme, s.language) : void 0;
5552
+ var l = s.theme ? Ea(s.theme, s.language) : void 0;
5549
5553
  return r.themeDict = l;
5550
- }), He(this, "getLineProps", function(s) {
5551
- var l = s.key, d = s.className, p = s.style, f = ar(s, ["key", "className", "style", "line"]), h = f, c = Se({}, h, {
5554
+ }), qe(this, "getLineProps", function(s) {
5555
+ var l = s.key, d = s.className, p = s.style, f = ir(s, ["key", "className", "style", "line"]), h = f, c = Se({}, h, {
5552
5556
  className: "token-line",
5553
5557
  style: void 0,
5554
5558
  key: void 0
5555
5559
  }), u = r.getThemeDict(r.props);
5556
5560
  return u !== void 0 && (c.style = u.plain), p !== void 0 && (c.style = c.style !== void 0 ? Se({}, c.style, p) : p), l !== void 0 && (c.key = l), d && (c.className += " " + d), c;
5557
- }), He(this, "getStyleForToken", function(s) {
5561
+ }), qe(this, "getStyleForToken", function(s) {
5558
5562
  var l = s.types, d = s.empty, p = l.length, f = r.getThemeDict(r.props);
5559
5563
  if (f !== void 0) {
5560
5564
  {
@@ -5572,15 +5576,15 @@ var wa = /* @__PURE__ */ function(e) {
5572
5576
  });
5573
5577
  return Object.assign.apply(Object, [h].concat(c));
5574
5578
  }
5575
- }), He(this, "getTokenProps", function(s) {
5576
- var l = s.key, d = s.className, p = s.style, f = s.token, h = ar(s, ["key", "className", "style", "token"]), c = h, u = Se({}, c, {
5579
+ }), qe(this, "getTokenProps", function(s) {
5580
+ var l = s.key, d = s.className, p = s.style, f = s.token, h = ir(s, ["key", "className", "style", "token"]), c = h, u = Se({}, c, {
5577
5581
  className: "token " + f.types.join(" "),
5578
5582
  children: f.content,
5579
5583
  style: r.getStyleForToken(f),
5580
5584
  key: void 0
5581
5585
  });
5582
5586
  return p !== void 0 && (u.style = u.style !== void 0 ? Se({}, u.style, p) : p), l !== void 0 && (u.key = l), d && (u.className += " " + d), u;
5583
- }), He(this, "tokenize", function(s, l, d, p) {
5587
+ }), qe(this, "tokenize", function(s, l, d, p) {
5584
5588
  var f = {
5585
5589
  code: l,
5586
5590
  grammar: d,
@@ -5593,7 +5597,7 @@ var wa = /* @__PURE__ */ function(e) {
5593
5597
  });
5594
5598
  }
5595
5599
  return e && (t.__proto__ = e), t.prototype = Object.create(e && e.prototype), t.prototype.constructor = t, t.prototype.render = function() {
5596
- var n = this.props, i = n.Prism, s = n.language, l = n.code, d = n.children, p = this.getThemeDict(this.props), f = i.languages[s], h = f !== void 0 ? this.tokenize(i, l, f, s) : [l], c = Sa(h);
5600
+ var n = this.props, i = n.Prism, s = n.language, l = n.code, d = n.children, p = this.getThemeDict(this.props), f = i.languages[s], h = f !== void 0 ? this.tokenize(i, l, f, s) : [l], c = wa(h);
5597
5601
  return d({
5598
5602
  tokens: c,
5599
5603
  className: "prism-code language-" + s,
@@ -5602,9 +5606,9 @@ var wa = /* @__PURE__ */ function(e) {
5602
5606
  getTokenProps: this.getTokenProps
5603
5607
  });
5604
5608
  }, t;
5605
- }(Vr);
5606
- const Ea = wa;
5607
- function vr({ copied: e }) {
5609
+ }(Wr);
5610
+ const Aa = _a;
5611
+ function yr({ copied: e }) {
5608
5612
  return /* @__PURE__ */ F.createElement("svg", {
5609
5613
  viewBox: "0 0 15 15",
5610
5614
  fill: "none",
@@ -5622,8 +5626,8 @@ function vr({ copied: e }) {
5622
5626
  clipRule: "evenodd"
5623
5627
  }));
5624
5628
  }
5625
- vr.displayName = "@mantine/prism/CopyIcon";
5626
- const _a = (e) => ({
5629
+ yr.displayName = "@mantine/prism/CopyIcon";
5630
+ const ka = (e) => ({
5627
5631
  plain: {
5628
5632
  color: e.colors.gray[4],
5629
5633
  backgroundColor: e.colors.dark[8]
@@ -5708,7 +5712,7 @@ const _a = (e) => ({
5708
5712
  }
5709
5713
  }
5710
5714
  ]
5711
- }), Aa = (e) => ({
5715
+ }), Ta = (e) => ({
5712
5716
  plain: {
5713
5717
  color: e.colors.gray[9],
5714
5718
  backgroundColor: e.fn.rgba(e.colors.gray[0], 0.65)
@@ -5799,8 +5803,8 @@ const _a = (e) => ({
5799
5803
  }
5800
5804
  }
5801
5805
  ]
5802
- }), ka = (e, t) => t === "dark" ? _a(e) : Aa(e);
5803
- var Ta = lr((e, { colorScheme: t, native: r, maxLineSize: n, radius: i }) => ({
5806
+ }), ja = (e, t) => t === "dark" ? ka(e) : Ta(e);
5807
+ var Ca = ur((e, { colorScheme: t, native: r, maxLineSize: n, radius: i }) => ({
5804
5808
  scrollArea: {},
5805
5809
  root: {
5806
5810
  position: "relative"
@@ -5810,7 +5814,7 @@ var Ta = lr((e, { colorScheme: t, native: r, maxLineSize: n, radius: i }) => ({
5810
5814
  position: "relative",
5811
5815
  fontFamily: e.fontFamilyMonospace,
5812
5816
  lineHeight: 1.7,
5813
- fontSize: Ve(13),
5817
+ fontSize: We(13),
5814
5818
  overflowX: r ? "auto" : void 0,
5815
5819
  borderRadius: e.fn.radius(i),
5816
5820
  padding: `${e.spacing.sm} 0`,
@@ -5837,7 +5841,7 @@ var Ta = lr((e, { colorScheme: t, native: r, maxLineSize: n, radius: i }) => ({
5837
5841
  lineNumber: {
5838
5842
  color: t === "dark" ? e.colors.dark[4] : e.colors.gray[4],
5839
5843
  textAlign: "right",
5840
- width: `calc(8 * ${Ve(n)})`,
5844
+ width: `calc(8 * ${We(n)})`,
5841
5845
  marginRight: e.dir === "ltr" ? e.spacing.xs : void 0,
5842
5846
  marginLeft: e.dir === "rtl" ? e.spacing.xs : void 0,
5843
5847
  userSelect: "none"
@@ -5846,34 +5850,34 @@ var Ta = lr((e, { colorScheme: t, native: r, maxLineSize: n, radius: i }) => ({
5846
5850
  width: "100%"
5847
5851
  }
5848
5852
  }));
5849
- const ja = Ta;
5850
- var Ca = Object.defineProperty, Ra = Object.defineProperties, Oa = Object.getOwnPropertyDescriptors, ot = Object.getOwnPropertySymbols, yr = Object.prototype.hasOwnProperty, Sr = Object.prototype.propertyIsEnumerable, ir = (e, t, r) => t in e ? Ca(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r, Ie = (e, t) => {
5853
+ const Ra = Ca;
5854
+ var Oa = Object.defineProperty, Ia = Object.defineProperties, Da = Object.getOwnPropertyDescriptors, lt = Object.getOwnPropertySymbols, Sr = Object.prototype.hasOwnProperty, xr = Object.prototype.propertyIsEnumerable, sr = (e, t, r) => t in e ? Oa(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r, De = (e, t) => {
5851
5855
  for (var r in t || (t = {}))
5852
- yr.call(t, r) && ir(e, r, t[r]);
5853
- if (ot)
5854
- for (var r of ot(t))
5855
- Sr.call(t, r) && ir(e, r, t[r]);
5856
+ Sr.call(t, r) && sr(e, r, t[r]);
5857
+ if (lt)
5858
+ for (var r of lt(t))
5859
+ xr.call(t, r) && sr(e, r, t[r]);
5856
5860
  return e;
5857
- }, qe = (e, t) => Ra(e, Oa(t)), Da = (e, t) => {
5861
+ }, Ye = (e, t) => Ia(e, Da(t)), La = (e, t) => {
5858
5862
  var r = {};
5859
5863
  for (var n in e)
5860
- yr.call(e, n) && t.indexOf(n) < 0 && (r[n] = e[n]);
5861
- if (e != null && ot)
5862
- for (var n of ot(e))
5863
- t.indexOf(n) < 0 && Sr.call(e, n) && (r[n] = e[n]);
5864
+ Sr.call(e, n) && t.indexOf(n) < 0 && (r[n] = e[n]);
5865
+ if (e != null && lt)
5866
+ for (var n of lt(e))
5867
+ t.indexOf(n) < 0 && xr.call(e, n) && (r[n] = e[n]);
5864
5868
  return r;
5865
5869
  };
5866
- const Ia = {
5870
+ const Fa = {
5867
5871
  noCopy: !1,
5868
5872
  copyLabel: "Copy code",
5869
5873
  copiedLabel: "Copied",
5870
5874
  withLineNumbers: !1,
5871
5875
  trim: !0,
5872
5876
  highlightLines: {},
5873
- scrollAreaComponent: ur,
5874
- getPrismTheme: ka
5875
- }, Nt = ut((e, t) => {
5876
- const r = Jr("Prism", Ia, e), {
5877
+ scrollAreaComponent: cr,
5878
+ getPrismTheme: ja
5879
+ }, $t = ct((e, t) => {
5880
+ const r = en("Prism", Fa, e), {
5877
5881
  className: n,
5878
5882
  children: i,
5879
5883
  language: s,
@@ -5891,7 +5895,7 @@ const Ia = {
5891
5895
  radius: w,
5892
5896
  getPrismTheme: S,
5893
5897
  variant: _
5894
- } = r, k = Da(r, [
5898
+ } = r, k = La(r, [
5895
5899
  "className",
5896
5900
  "children",
5897
5901
  "language",
@@ -5910,18 +5914,18 @@ const Ia = {
5910
5914
  "getPrismTheme",
5911
5915
  "variant"
5912
5916
  ]), H = m && typeof i == "string" ? i.trim() : i, J = H.split(`
5913
- `).length.toString().length, N = en(), q = fn(), $ = v || N.colorScheme, { classes: te, cx: L } = ja({
5917
+ `).length.toString().length, N = tn(), q = hn(), $ = v || N.colorScheme, { classes: te, cx: L } = Ra({
5914
5918
  colorScheme: $,
5915
- native: g !== ur,
5919
+ native: g !== cr,
5916
5920
  maxLineSize: J,
5917
5921
  radius: w
5918
5922
  }, { name: "Prism", classNames: d, styles: p, unstyled: x, variant: _ });
5919
- return /* @__PURE__ */ F.createElement(X, qe(Ie({
5923
+ return /* @__PURE__ */ F.createElement(X, Ye(De({
5920
5924
  className: L(te.root, n),
5921
5925
  ref: t
5922
5926
  }, k), {
5923
5927
  translate: "no"
5924
- }), !l && /* @__PURE__ */ F.createElement(at, {
5928
+ }), !l && /* @__PURE__ */ F.createElement(it, {
5925
5929
  label: q.copied ? h : f,
5926
5930
  position: "left",
5927
5931
  withArrow: !0,
@@ -5934,9 +5938,9 @@ const Ia = {
5934
5938
  "aria-label": q.copied ? h : f,
5935
5939
  onClick: () => q.copy(H),
5936
5940
  unstyled: x
5937
- }, /* @__PURE__ */ F.createElement(vr, {
5941
+ }, /* @__PURE__ */ F.createElement(yr, {
5938
5942
  copied: q.copied
5939
- }))), /* @__PURE__ */ F.createElement(Ea, qe(Ie({}, va), {
5943
+ }))), /* @__PURE__ */ F.createElement(Aa, Ye(De({}, Sa), {
5940
5944
  theme: S(N, $),
5941
5945
  code: H,
5942
5946
  language: s
@@ -5959,9 +5963,9 @@ const Ia = {
5959
5963
  `)
5960
5964
  return null;
5961
5965
  const ie = re + 1, fe = M({ line: W, key: re }), Ee = ie in u, ge = $ === "dark" ? N.fn.rgba(N.fn.themeColor((ue = u[ie]) == null ? void 0 : ue.color, 9), 0.25) : N.fn.themeColor((ce = u[ie]) == null ? void 0 : ce.color, 0);
5962
- return /* @__PURE__ */ F.createElement("div", qe(Ie({}, fe), {
5966
+ return /* @__PURE__ */ F.createElement("div", Ye(De({}, fe), {
5963
5967
  className: L(te.line, fe.className),
5964
- style: Ie({}, Ee ? { backgroundColor: ge } : null)
5968
+ style: De({}, Ee ? { backgroundColor: ge } : null)
5965
5969
  }), c && /* @__PURE__ */ F.createElement("div", {
5966
5970
  className: te.lineNumber,
5967
5971
  style: {
@@ -5969,24 +5973,24 @@ const Ia = {
5969
5973
  }
5970
5974
  }, ((be = u[ie]) == null ? void 0 : be.label) || ie), /* @__PURE__ */ F.createElement("div", {
5971
5975
  className: te.lineContent
5972
- }, W.map((Me, je) => {
5976
+ }, W.map((Be, je) => {
5973
5977
  var Ce, _e;
5974
- const Re = ae({ token: Me, key: je });
5975
- return /* @__PURE__ */ F.createElement("span", qe(Ie({}, Re), {
5976
- style: qe(Ie({}, Re.style), {
5978
+ const Re = ae({ token: Be, key: je });
5979
+ return /* @__PURE__ */ F.createElement("span", Ye(De({}, Re), {
5980
+ style: Ye(De({}, Re.style), {
5977
5981
  color: Ee ? N.fn.themeColor((Ce = u[ie]) == null ? void 0 : Ce.color, $ === "dark" ? 5 : 8) : (_e = Re == null ? void 0 : Re.style) == null ? void 0 : _e.color
5978
5982
  })
5979
5983
  }));
5980
5984
  })));
5981
5985
  }).filter(Boolean)))));
5982
5986
  });
5983
- Nt.displayName = "@mantine/prism/Prism";
5984
- var La = lr((e, { radius: t }) => ({
5987
+ $t.displayName = "@mantine/prism/Prism";
5988
+ var Na = ur((e, { radius: t }) => ({
5985
5989
  tab: {
5986
5990
  paddingLeft: e.spacing.sm,
5987
5991
  paddingRight: e.spacing.sm,
5988
- height: Ve(34),
5989
- border: `${Ve(1)} solid ${e.colorScheme === "dark" ? e.colors.dark[5] : e.colors.gray[3]}`,
5992
+ height: We(34),
5993
+ border: `${We(1)} solid ${e.colorScheme === "dark" ? e.colors.dark[5] : e.colors.gray[3]}`,
5990
5994
  borderBottom: 0,
5991
5995
  fontSize: e.fontSizes.sm,
5992
5996
  color: e.colorScheme === "dark" ? e.colors.dark[1] : e.colors.gray[7],
@@ -6016,7 +6020,7 @@ var La = lr((e, { radius: t }) => ({
6016
6020
  borderRadius: e.fn.radius(t),
6017
6021
  borderTopRightRadius: 0,
6018
6022
  borderTopLeftRadius: 0,
6019
- border: `${Ve(1)} solid ${e.colorScheme === "dark" ? e.colors.dark[4] : e.colors.gray[3]}`,
6023
+ border: `${We(1)} solid ${e.colorScheme === "dark" ? e.colors.dark[4] : e.colors.gray[3]}`,
6020
6024
  borderTop: 0,
6021
6025
  overflow: "hidden"
6022
6026
  },
@@ -6026,32 +6030,32 @@ var La = lr((e, { radius: t }) => ({
6026
6030
  border: 0
6027
6031
  }
6028
6032
  }));
6029
- const xr = La;
6030
- var Fa = Object.defineProperty, Na = Object.defineProperties, $a = Object.getOwnPropertyDescriptors, lt = Object.getOwnPropertySymbols, wr = Object.prototype.hasOwnProperty, Er = Object.prototype.propertyIsEnumerable, sr = (e, t, r) => t in e ? Fa(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r, _r = (e, t) => {
6033
+ const wr = Na;
6034
+ var $a = Object.defineProperty, za = Object.defineProperties, Pa = Object.getOwnPropertyDescriptors, ut = Object.getOwnPropertySymbols, Er = Object.prototype.hasOwnProperty, _r = Object.prototype.propertyIsEnumerable, or = (e, t, r) => t in e ? $a(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r, Ar = (e, t) => {
6031
6035
  for (var r in t || (t = {}))
6032
- wr.call(t, r) && sr(e, r, t[r]);
6033
- if (lt)
6034
- for (var r of lt(t))
6035
- Er.call(t, r) && sr(e, r, t[r]);
6036
+ Er.call(t, r) && or(e, r, t[r]);
6037
+ if (ut)
6038
+ for (var r of ut(t))
6039
+ _r.call(t, r) && or(e, r, t[r]);
6036
6040
  return e;
6037
- }, za = (e, t) => Na(e, $a(t)), Pa = (e, t) => {
6041
+ }, Ma = (e, t) => za(e, Pa(t)), Ba = (e, t) => {
6038
6042
  var r = {};
6039
6043
  for (var n in e)
6040
- wr.call(e, n) && t.indexOf(n) < 0 && (r[n] = e[n]);
6041
- if (e != null && lt)
6042
- for (var n of lt(e))
6043
- t.indexOf(n) < 0 && Er.call(e, n) && (r[n] = e[n]);
6044
+ Er.call(e, n) && t.indexOf(n) < 0 && (r[n] = e[n]);
6045
+ if (e != null && ut)
6046
+ for (var n of ut(e))
6047
+ t.indexOf(n) < 0 && _r.call(e, n) && (r[n] = e[n]);
6044
6048
  return r;
6045
6049
  };
6046
- function Ma(e) {
6047
- const { classes: t } = xr({ radius: e.radius });
6048
- return /* @__PURE__ */ F.createElement(gt, za(_r({}, e), {
6050
+ function Ua(e) {
6051
+ const { classes: t } = wr({ radius: e.radius });
6052
+ return /* @__PURE__ */ F.createElement(ht, Ma(Ar({}, e), {
6049
6053
  variant: "outline",
6050
6054
  classNames: { tab: t.tab },
6051
6055
  translate: "no"
6052
6056
  }));
6053
6057
  }
6054
- function Ba(e) {
6058
+ function Ga(e) {
6055
6059
  var t = e, {
6056
6060
  language: r,
6057
6061
  children: n,
@@ -6066,7 +6070,7 @@ function Ba(e) {
6066
6070
  getPrismTheme: u,
6067
6071
  colorScheme: g,
6068
6072
  variant: v
6069
- } = t, m = Pa(t, [
6073
+ } = t, m = Ba(t, [
6070
6074
  "language",
6071
6075
  "children",
6072
6076
  "radius",
@@ -6081,8 +6085,8 @@ function Ba(e) {
6081
6085
  "colorScheme",
6082
6086
  "variant"
6083
6087
  ]);
6084
- const { classes: x } = xr({ radius: i });
6085
- return /* @__PURE__ */ F.createElement(gt.Panel, _r({}, m), /* @__PURE__ */ F.createElement(Nt, {
6088
+ const { classes: x } = wr({ radius: i });
6089
+ return /* @__PURE__ */ F.createElement(ht.Panel, Ar({}, m), /* @__PURE__ */ F.createElement($t, {
6086
6090
  language: r,
6087
6091
  classNames: { root: x.prism, code: x.code },
6088
6092
  radius: i,
@@ -6098,17 +6102,17 @@ function Ba(e) {
6098
6102
  variant: v
6099
6103
  }, n));
6100
6104
  }
6101
- const Qe = Nt;
6102
- Qe.Tabs = Ma;
6103
- Qe.Tab = gt.Tab;
6104
- Qe.TabsList = gt.List;
6105
- Qe.Panel = Ba;
6106
- function Ua({
6105
+ const Je = $t;
6106
+ Je.Tabs = Ua;
6107
+ Je.Tab = ht.Tab;
6108
+ Je.TabsList = ht.List;
6109
+ Je.Panel = Ga;
6110
+ function Ha({
6107
6111
  id: e,
6108
6112
  onSuccess: t,
6109
- styles: r = Pe
6113
+ styles: r = Me
6110
6114
  }) {
6111
- const n = Ze(), i = async () => {
6115
+ const n = Xe(), i = async () => {
6112
6116
  if (e) {
6113
6117
  oe({
6114
6118
  id: "for-deleting",
@@ -6147,21 +6151,21 @@ function Ua({
6147
6151
  color: "red"
6148
6152
  }
6149
6153
  });
6150
- return /* @__PURE__ */ a.jsx(D, { size: r.button.size, color: "red", onClick: s, leftIcon: /* @__PURE__ */ a.jsx(mt, { size: 20 }), children: "Delete" });
6154
+ return /* @__PURE__ */ a.jsx(I, { size: r.button.size, color: "red", onClick: s, leftIcon: /* @__PURE__ */ a.jsx(bt, { size: 20 }), children: "Delete" });
6151
6155
  }
6152
- function Ga({
6156
+ function qa({
6153
6157
  content: e
6154
6158
  }) {
6155
- return /* @__PURE__ */ a.jsxs(_t, { width: "60vw", shadow: "md", children: [
6156
- /* @__PURE__ */ a.jsx(_t.Target, { children: /* @__PURE__ */ a.jsx(Dt, { size: 16, children: /* @__PURE__ */ a.jsx(pn, {}) }) }),
6157
- /* @__PURE__ */ a.jsx(_t.Dropdown, { children: /* @__PURE__ */ a.jsx(Qe, { language: "sql", noCopy: !0, withLineNumbers: !0, children: e }) })
6159
+ return /* @__PURE__ */ a.jsxs(At, { width: "60vw", shadow: "md", children: [
6160
+ /* @__PURE__ */ a.jsx(At.Target, { children: /* @__PURE__ */ a.jsx(Dt, { size: 16, children: /* @__PURE__ */ a.jsx(pn, {}) }) }),
6161
+ /* @__PURE__ */ a.jsx(At.Dropdown, { children: /* @__PURE__ */ a.jsx(Je, { language: "sql", noCopy: !0, withLineNumbers: !0, children: e }) })
6158
6162
  ] });
6159
6163
  }
6160
- function ii({
6161
- styles: e = Pe,
6164
+ function li({
6165
+ styles: e = Me,
6162
6166
  config: t
6163
6167
  }) {
6164
- Xe(t);
6168
+ Qe(t);
6165
6169
  const {
6166
6170
  data: r = [],
6167
6171
  loading: n,
@@ -6180,12 +6184,12 @@ function ii({
6180
6184
  refreshDeps: []
6181
6185
  });
6182
6186
  return /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
6183
- /* @__PURE__ */ a.jsx(z, { pt: e.spacing, position: "right", children: /* @__PURE__ */ a.jsx(fa, { onSuccess: i }) }),
6187
+ /* @__PURE__ */ a.jsx(z, { pt: e.spacing, position: "right", children: /* @__PURE__ */ a.jsx(ha, { onSuccess: i }) }),
6184
6188
  /* @__PURE__ */ a.jsxs(X, { mt: e.spacing, sx: {
6185
6189
  position: "relative"
6186
6190
  }, children: [
6187
- /* @__PURE__ */ a.jsx(pt, { visible: n }),
6188
- /* @__PURE__ */ a.jsxs(ft, { horizontalSpacing: e.spacing, verticalSpacing: e.spacing, fontSize: e.size, highlightOnHover: !0, children: [
6191
+ /* @__PURE__ */ a.jsx(ft, { visible: n }),
6192
+ /* @__PURE__ */ a.jsxs(gt, { horizontalSpacing: e.spacing, verticalSpacing: e.spacing, fontSize: e.size, highlightOnHover: !0, children: [
6189
6193
  /* @__PURE__ */ a.jsx("thead", { children: /* @__PURE__ */ a.jsxs("tr", { children: [
6190
6194
  /* @__PURE__ */ a.jsx("th", { children: "Name" }),
6191
6195
  /* @__PURE__ */ a.jsx("th", {}),
@@ -6202,12 +6206,12 @@ function ii({
6202
6206
  } = s;
6203
6207
  return /* @__PURE__ */ a.jsxs("tr", { children: [
6204
6208
  /* @__PURE__ */ a.jsx("td", { children: l }),
6205
- /* @__PURE__ */ a.jsx("td", { width: 50, children: /* @__PURE__ */ a.jsx(Ga, { content: d }) }),
6209
+ /* @__PURE__ */ a.jsx("td", { width: 50, children: /* @__PURE__ */ a.jsx(qa, { content: d }) }),
6206
6210
  /* @__PURE__ */ a.jsx("td", { width: 200, children: p }),
6207
6211
  /* @__PURE__ */ a.jsx("td", { width: 200, children: f }),
6208
6212
  /* @__PURE__ */ a.jsx("td", { width: 400, children: /* @__PURE__ */ a.jsxs(z, { position: "left", children: [
6209
- /* @__PURE__ */ a.jsx(ha, { ...s, onSuccess: i }),
6210
- /* @__PURE__ */ a.jsx(Ua, { id: l, onSuccess: i })
6213
+ /* @__PURE__ */ a.jsx(ba, { ...s, onSuccess: i }),
6214
+ /* @__PURE__ */ a.jsx(Ha, { id: l, onSuccess: i })
6211
6215
  ] }) })
6212
6216
  ] }, l);
6213
6217
  }) })
@@ -6215,28 +6219,28 @@ function ii({
6215
6219
  ] })
6216
6220
  ] });
6217
6221
  }
6218
- const si = () => import("./package-10cf4bd1.mjs").then(({
6222
+ const ui = () => import("./package-e95cf677.mjs").then(({
6219
6223
  version: e
6220
6224
  }) => (console.log(`[@devtable/dashboard] version: ${e}`), e));
6221
6225
  export {
6222
6226
  G as APIClient,
6223
- ai as APIKeyList,
6224
- ri as AccountList,
6225
- ca as AddAPIKey,
6226
- aa as AddAccount,
6227
- Yn as AddDataSource,
6228
- fa as AddSQLSnippet,
6229
- ti as DataSourceList,
6230
- vn as DefaultApiClient,
6231
- da as DeleteAPIKey,
6232
- ia as DeleteAccount,
6233
- Kn as DeleteDataSource,
6234
- Ua as DeleteSQLSnippet,
6235
- yn as FacadeApiClient,
6236
- ni as Login,
6237
- ii as SQLSnippetList,
6238
- ha as UpdateSQLSnippet,
6239
- Xe as configureAPIClient,
6240
- Sn as facadeApiClient,
6241
- si as getVersion
6227
+ oi as APIKeyList,
6228
+ ii as AccountList,
6229
+ pa as AddAPIKey,
6230
+ sa as AddAccount,
6231
+ Wn as AddDataSource,
6232
+ ha as AddSQLSnippet,
6233
+ ai as DataSourceList,
6234
+ Sn as DefaultApiClient,
6235
+ fa as DeleteAPIKey,
6236
+ oa as DeleteAccount,
6237
+ Xn as DeleteDataSource,
6238
+ Ha as DeleteSQLSnippet,
6239
+ xn as FacadeApiClient,
6240
+ si as Login,
6241
+ li as SQLSnippetList,
6242
+ ba as UpdateSQLSnippet,
6243
+ Qe as configureAPIClient,
6244
+ wn as facadeApiClient,
6245
+ ui as getVersion
6242
6246
  };