@devtable/settings-form 6.21.0 → 6.22.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,35 +1,36 @@
1
- import { Modal as se, Button as x, Box as L, SegmentedControl as qr, TextInput as j, Divider as er, Group as I, NumberInput as Lr, PasswordInput as ce, useMantineTheme as Mr, Tooltip as Nr, Text as oe, LoadingOverlay as Re, Table as Pe, Stack as rr, Select as $r, Switch as Ur } from "@mantine/core";
2
- import { showNotification as $, updateNotification as O } from "@mantine/notifications";
3
- import J, { forwardRef as tr, useMemo as nr } from "react";
4
- import { useForm as ee, Controller as E } from "react-hook-form";
5
- import { PlaylistAdd as Ee, Trash as Ce, Edit as Wr } from "tabler-icons-react";
6
- import Vr from "axios";
7
- import Yr from "crypto-js";
8
- import Kr from "lodash";
1
+ import { Modal as ce, Button as k, Box as L, SegmentedControl as Mr, TextInput as j, Divider as tr, Group as I, NumberInput as Nr, PasswordInput as le, useMantineTheme as Ur, Tooltip as $r, Text as se, LoadingOverlay as Ee, Table as Ce, Stack as nr, Select as Wr, Switch as Vr } from "@mantine/core";
2
+ import { showNotification as U, updateNotification as z } from "@mantine/notifications";
3
+ import * as Q from "react";
4
+ import J, { forwardRef as ar, useMemo as ir } from "react";
5
+ import { useForm as re, Controller as E } from "react-hook-form";
6
+ import { PlaylistAdd as Te, Trash as Oe, Edit as Yr } from "tabler-icons-react";
7
+ import Kr from "axios";
8
+ import Br from "crypto-js";
9
+ import Gr from "lodash";
9
10
  import { useRequest as G } from "ahooks";
10
- import { useModals as le, closeAllModals as Br } from "@mantine/modals";
11
- function Gr(t) {
11
+ import { useModals as ue, closeAllModals as Jr } from "@mantine/modals";
12
+ function Hr(t) {
12
13
  t = t || {};
13
14
  const n = Object.keys(t).sort(), o = [];
14
15
  for (let s = 0; s < n.length; s++) {
15
- const l = n[s];
16
- if (l != "authentication" && t[l])
17
- o.push(n[s] + "=" + (typeof t[l] == "object" ? JSON.stringify(t[l]) : t[l]));
16
+ const u = n[s];
17
+ if (u != "authentication" && t[u])
18
+ o.push(n[s] + "=" + (typeof t[u] == "object" ? JSON.stringify(t[u]) : t[u]));
18
19
  else {
19
- const i = Object.keys(t[l]).sort();
20
- for (let u = 0; u < i.length; u++) {
21
- const d = i[u];
22
- d != "sign" && t[l][d] && o.push(
23
- i[u] + "=" + (typeof t[l][d] == "object" ? JSON.stringify(t[l][d]) : t[l][d])
20
+ const i = Object.keys(t[u]).sort();
21
+ for (let l = 0; l < i.length; l++) {
22
+ const d = i[l];
23
+ d != "sign" && t[u][d] && o.push(
24
+ i[l] + "=" + (typeof t[u][d] == "object" ? JSON.stringify(t[u][d]) : t[u][d])
24
25
  );
25
26
  }
26
27
  }
27
28
  }
28
29
  return o.sort().join("&");
29
30
  }
30
- function Jr(t, n) {
31
- let o = Gr(t);
32
- return o += "&key=" + n, Yr.MD5(o).toString().toUpperCase();
31
+ function Xr(t, n) {
32
+ let o = Hr(t);
33
+ return o += "&key=" + n, Br.MD5(o).toString().toUpperCase();
33
34
  }
34
35
  const C = {
35
36
  baseURL: "http://localhost:31200",
@@ -42,7 +43,7 @@ const C = {
42
43
  return {
43
44
  app_id: this.app_id,
44
45
  nonce_str: n,
45
- sign: Jr(
46
+ sign: Xr(
46
47
  {
47
48
  app_id: this.app_id,
48
49
  nonce_str: n,
@@ -54,26 +55,26 @@ const C = {
54
55
  },
55
56
  getRequest(t) {
56
57
  return (n, o, s = {}) => {
57
- const l = window.localStorage.getItem("token"), i = {
58
+ const u = window.localStorage.getItem("token"), i = {
58
59
  "X-Requested-With": "XMLHttpRequest",
59
60
  "Content-Type": s.string ? "application/x-www-form-urlencoded" : "application/json",
60
- authorization: l ? `bearer ${l}` : "",
61
+ authorization: u ? `bearer ${u}` : "",
61
62
  ...s.headers
62
- }, u = {
63
+ }, l = {
63
64
  baseURL: this.baseURL,
64
65
  method: t,
65
66
  url: n,
66
67
  params: t === "GET" ? o : s.params,
67
68
  headers: i
68
69
  };
69
- return ["POST", "PUT"].includes(t) && (u.data = s.string ? JSON.stringify(o) : o, u.data.authentication = this.getAuthentication(u.data)), Vr(u).then((d) => d.data).catch((d) => Kr.has(d, "response.data.detail.message") ? Promise.reject(new Error(d.response.data.detail.message)) : Promise.reject(d));
70
+ return ["POST", "PUT"].includes(t) && (l.data = s.string ? JSON.stringify(o) : o, l.data.authentication = this.getAuthentication(l.data)), Kr(l).then((d) => d.data).catch((d) => Gr.has(d, "response.data.detail.message") ? Promise.reject(new Error(d.response.data.detail.message)) : Promise.reject(d));
70
71
  };
71
72
  }
72
73
  };
73
- function ue(t) {
74
+ function de(t) {
74
75
  C.baseURL !== t.apiBaseURL && (C.baseURL = t.apiBaseURL), t.app_id && (C.app_id = t.app_id), t.app_secret && (C.app_secret = t.app_secret);
75
76
  }
76
- const Hr = {
77
+ const Qr = {
77
78
  login: async (t, n) => {
78
79
  const o = {
79
80
  name: t,
@@ -120,7 +121,7 @@ const Hr = {
120
121
  if (!!t)
121
122
  return C.getRequest("POST")("/account/delete", { id: t });
122
123
  }
123
- }, Xr = {
124
+ }, Zr = {
124
125
  list: async () => await C.getRequest("POST")("/api/key/list", {
125
126
  filter: {
126
127
  search: ""
@@ -142,7 +143,7 @@ const Hr = {
142
143
  if (!!t)
143
144
  return C.getRequest("POST")("/api/key/delete", { id: t });
144
145
  }
145
- }, Qr = {
146
+ }, et = {
146
147
  list: async () => await C.getRequest("POST")("/datasource/list", {
147
148
  filter: {},
148
149
  sort: {
@@ -162,21 +163,21 @@ const Hr = {
162
163
  delete: async (t) => {
163
164
  await C.getRequest("POST")("/datasource/delete", { id: t });
164
165
  }
165
- }, Zr = {
166
+ }, rt = {
166
167
  list: async () => await C.getRequest("GET")("/role/list", {})
167
- }, k = {
168
- datasource: Qr,
169
- account: Hr,
170
- role: Zr,
171
- api_key: Xr
172
- }, de = {
168
+ }, x = {
169
+ datasource: et,
170
+ account: Qr,
171
+ role: rt,
172
+ api_key: Zr
173
+ }, fe = {
173
174
  size: "sm",
174
175
  spacing: "md",
175
176
  button: {
176
177
  size: "xs"
177
178
  }
178
179
  };
179
- var fe = { exports: {} }, Q = {};
180
+ var pe = { exports: {} }, Z = {};
180
181
  /**
181
182
  * @license React
182
183
  * react-jsx-runtime.production.min.js
@@ -186,25 +187,25 @@ var fe = { exports: {} }, Q = {};
186
187
  * This source code is licensed under the MIT license found in the
187
188
  * LICENSE file in the root directory of this source tree.
188
189
  */
189
- var Qe;
190
- function et() {
191
- if (Qe)
192
- return Q;
193
- Qe = 1;
194
- var t = J, n = Symbol.for("react.element"), o = Symbol.for("react.fragment"), s = Object.prototype.hasOwnProperty, l = t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, i = { key: !0, ref: !0, __self: !0, __source: !0 };
195
- function u(d, g, y) {
196
- var _, v = {}, f = null, A = null;
197
- y !== void 0 && (f = "" + y), g.key !== void 0 && (f = "" + g.key), g.ref !== void 0 && (A = g.ref);
198
- for (_ in g)
199
- s.call(g, _) && !i.hasOwnProperty(_) && (v[_] = g[_]);
190
+ var er;
191
+ function tt() {
192
+ if (er)
193
+ return Z;
194
+ er = 1;
195
+ var t = J, n = Symbol.for("react.element"), o = Symbol.for("react.fragment"), s = Object.prototype.hasOwnProperty, u = t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, i = { key: !0, ref: !0, __self: !0, __source: !0 };
196
+ function l(d, g, _) {
197
+ var w, m = {}, f = null, A = null;
198
+ _ !== void 0 && (f = "" + _), g.key !== void 0 && (f = "" + g.key), g.ref !== void 0 && (A = g.ref);
199
+ for (w in g)
200
+ s.call(g, w) && !i.hasOwnProperty(w) && (m[w] = g[w]);
200
201
  if (d && d.defaultProps)
201
- for (_ in g = d.defaultProps, g)
202
- v[_] === void 0 && (v[_] = g[_]);
203
- return { $$typeof: n, type: d, key: f, ref: A, props: v, _owner: l.current };
202
+ for (w in g = d.defaultProps, g)
203
+ m[w] === void 0 && (m[w] = g[w]);
204
+ return { $$typeof: n, type: d, key: f, ref: A, props: m, _owner: u.current };
204
205
  }
205
- return Q.Fragment = o, Q.jsx = u, Q.jsxs = u, Q;
206
+ return Z.Fragment = o, Z.jsx = l, Z.jsxs = l, Z;
206
207
  }
207
- var Z = {};
208
+ var ee = {};
208
209
  /**
209
210
  * @license React
210
211
  * react-jsx-runtime.development.js
@@ -214,11 +215,11 @@ var Z = {};
214
215
  * This source code is licensed under the MIT license found in the
215
216
  * LICENSE file in the root directory of this source tree.
216
217
  */
217
- var Ze;
218
- function rt() {
219
- return Ze || (Ze = 1, process.env.NODE_ENV !== "production" && function() {
220
- var t = J, n = Symbol.for("react.element"), o = Symbol.for("react.portal"), s = Symbol.for("react.fragment"), l = Symbol.for("react.strict_mode"), i = Symbol.for("react.profiler"), u = Symbol.for("react.provider"), d = Symbol.for("react.context"), g = Symbol.for("react.forward_ref"), y = Symbol.for("react.suspense"), _ = Symbol.for("react.suspense_list"), v = Symbol.for("react.memo"), f = Symbol.for("react.lazy"), A = Symbol.for("react.offscreen"), M = Symbol.iterator, V = "@@iterator";
221
- function ge(e) {
218
+ var rr;
219
+ function nt() {
220
+ return rr || (rr = 1, process.env.NODE_ENV !== "production" && function() {
221
+ var t = J, n = Symbol.for("react.element"), o = Symbol.for("react.portal"), s = Symbol.for("react.fragment"), u = Symbol.for("react.strict_mode"), i = Symbol.for("react.profiler"), l = Symbol.for("react.provider"), d = Symbol.for("react.context"), g = Symbol.for("react.forward_ref"), _ = Symbol.for("react.suspense"), w = Symbol.for("react.suspense_list"), m = Symbol.for("react.memo"), f = Symbol.for("react.lazy"), A = Symbol.for("react.offscreen"), M = Symbol.iterator, V = "@@iterator";
222
+ function me(e) {
222
223
  if (e === null || typeof e != "object")
223
224
  return null;
224
225
  var a = M && e[M] || e[V];
@@ -229,32 +230,32 @@ function rt() {
229
230
  {
230
231
  for (var a = arguments.length, c = new Array(a > 1 ? a - 1 : 0), p = 1; p < a; p++)
231
232
  c[p - 1] = arguments[p];
232
- ar("error", e, c);
233
+ or("error", e, c);
233
234
  }
234
235
  }
235
- function ar(e, a, c) {
236
+ function or(e, a, c) {
236
237
  {
237
238
  var p = N.ReactDebugCurrentFrame, b = p.getStackAddendum();
238
239
  b !== "" && (a += "%s", c = c.concat([b]));
239
- var S = c.map(function(m) {
240
- return String(m);
240
+ var y = c.map(function(v) {
241
+ return String(v);
241
242
  });
242
- S.unshift("Warning: " + a), Function.prototype.apply.call(console[e], console, S);
243
+ y.unshift("Warning: " + a), Function.prototype.apply.call(console[e], console, y);
243
244
  }
244
245
  }
245
- var ir = !1, or = !1, sr = !1, cr = !1, lr = !1, ze;
246
- ze = Symbol.for("react.module.reference");
247
- function ur(e) {
248
- return !!(typeof e == "string" || typeof e == "function" || e === s || e === i || lr || e === l || e === y || e === _ || cr || e === A || ir || or || sr || typeof e == "object" && e !== null && (e.$$typeof === f || e.$$typeof === v || e.$$typeof === u || e.$$typeof === d || e.$$typeof === g || e.$$typeof === ze || e.getModuleId !== void 0));
246
+ var sr = !1, cr = !1, lr = !1, ur = !1, dr = !1, Ae;
247
+ Ae = Symbol.for("react.module.reference");
248
+ function fr(e) {
249
+ return !!(typeof e == "string" || typeof e == "function" || e === s || e === i || dr || e === u || e === _ || e === w || ur || e === A || sr || cr || lr || typeof e == "object" && e !== null && (e.$$typeof === f || e.$$typeof === m || e.$$typeof === l || e.$$typeof === d || e.$$typeof === g || e.$$typeof === Ae || e.getModuleId !== void 0));
249
250
  }
250
- function dr(e, a, c) {
251
+ function pr(e, a, c) {
251
252
  var p = e.displayName;
252
253
  if (p)
253
254
  return p;
254
255
  var b = a.displayName || a.name || "";
255
256
  return b !== "" ? c + "(" + b + ")" : c;
256
257
  }
257
- function Oe(e) {
258
+ function xe(e) {
258
259
  return e.displayName || "Context";
259
260
  }
260
261
  function F(e) {
@@ -271,30 +272,30 @@ function rt() {
271
272
  return "Portal";
272
273
  case i:
273
274
  return "Profiler";
274
- case l:
275
+ case u:
275
276
  return "StrictMode";
276
- case y:
277
- return "Suspense";
278
277
  case _:
278
+ return "Suspense";
279
+ case w:
279
280
  return "SuspenseList";
280
281
  }
281
282
  if (typeof e == "object")
282
283
  switch (e.$$typeof) {
283
284
  case d:
284
285
  var a = e;
285
- return Oe(a) + ".Consumer";
286
- case u:
286
+ return xe(a) + ".Consumer";
287
+ case l:
287
288
  var c = e;
288
- return Oe(c._context) + ".Provider";
289
+ return xe(c._context) + ".Provider";
289
290
  case g:
290
- return dr(e, e.render, "ForwardRef");
291
- case v:
291
+ return pr(e, e.render, "ForwardRef");
292
+ case m:
292
293
  var p = e.displayName || null;
293
294
  return p !== null ? p : F(e.type) || "Memo";
294
295
  case f: {
295
- var b = e, S = b._payload, m = b._init;
296
+ var b = e, y = b._payload, v = b._init;
296
297
  try {
297
- return F(m(S));
298
+ return F(v(y));
298
299
  } catch {
299
300
  return null;
300
301
  }
@@ -302,18 +303,18 @@ function rt() {
302
303
  }
303
304
  return null;
304
305
  }
305
- var Y = Object.assign, H = 0, Ae, ke, xe, De, je, Ie, Fe;
306
- function qe() {
306
+ var Y = Object.assign, H = 0, ke, De, je, Ie, Fe, qe, Le;
307
+ function Me() {
307
308
  }
308
- qe.__reactDisabledLog = !0;
309
- function fr() {
309
+ Me.__reactDisabledLog = !0;
310
+ function gr() {
310
311
  {
311
312
  if (H === 0) {
312
- Ae = console.log, ke = console.info, xe = console.warn, De = console.error, je = console.group, Ie = console.groupCollapsed, Fe = console.groupEnd;
313
+ ke = console.log, De = console.info, je = console.warn, Ie = console.error, Fe = console.group, qe = console.groupCollapsed, Le = console.groupEnd;
313
314
  var e = {
314
315
  configurable: !0,
315
316
  enumerable: !0,
316
- value: qe,
317
+ value: Me,
317
318
  writable: !0
318
319
  };
319
320
  Object.defineProperties(console, {
@@ -329,7 +330,7 @@ function rt() {
329
330
  H++;
330
331
  }
331
332
  }
332
- function pr() {
333
+ function mr() {
333
334
  {
334
335
  if (H--, H === 0) {
335
336
  var e = {
@@ -339,87 +340,87 @@ function rt() {
339
340
  };
340
341
  Object.defineProperties(console, {
341
342
  log: Y({}, e, {
342
- value: Ae
343
+ value: ke
343
344
  }),
344
345
  info: Y({}, e, {
345
- value: ke
346
+ value: De
346
347
  }),
347
348
  warn: Y({}, e, {
348
- value: xe
349
+ value: je
349
350
  }),
350
351
  error: Y({}, e, {
351
- value: De
352
+ value: Ie
352
353
  }),
353
354
  group: Y({}, e, {
354
- value: je
355
+ value: Fe
355
356
  }),
356
357
  groupCollapsed: Y({}, e, {
357
- value: Ie
358
+ value: qe
358
359
  }),
359
360
  groupEnd: Y({}, e, {
360
- value: Fe
361
+ value: Le
361
362
  })
362
363
  });
363
364
  }
364
365
  H < 0 && T("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
365
366
  }
366
367
  }
367
- var he = N.ReactCurrentDispatcher, me;
368
- function re(e, a, c) {
368
+ var he = N.ReactCurrentDispatcher, ve;
369
+ function te(e, a, c) {
369
370
  {
370
- if (me === void 0)
371
+ if (ve === void 0)
371
372
  try {
372
373
  throw Error();
373
374
  } catch (b) {
374
375
  var p = b.stack.trim().match(/\n( *(at )?)/);
375
- me = p && p[1] || "";
376
+ ve = p && p[1] || "";
376
377
  }
377
378
  return `
378
- ` + me + e;
379
+ ` + ve + e;
379
380
  }
380
381
  }
381
- var ve = !1, te;
382
+ var be = !1, ne;
382
383
  {
383
- var gr = typeof WeakMap == "function" ? WeakMap : Map;
384
- te = new gr();
384
+ var hr = typeof WeakMap == "function" ? WeakMap : Map;
385
+ ne = new hr();
385
386
  }
386
- function Le(e, a) {
387
- if (!e || ve)
387
+ function Ne(e, a) {
388
+ if (!e || be)
388
389
  return "";
389
390
  {
390
- var c = te.get(e);
391
+ var c = ne.get(e);
391
392
  if (c !== void 0)
392
393
  return c;
393
394
  }
394
395
  var p;
395
- ve = !0;
396
+ be = !0;
396
397
  var b = Error.prepareStackTrace;
397
398
  Error.prepareStackTrace = void 0;
398
- var S;
399
- S = he.current, he.current = null, fr();
399
+ var y;
400
+ y = he.current, he.current = null, gr();
400
401
  try {
401
402
  if (a) {
402
- var m = function() {
403
+ var v = function() {
403
404
  throw Error();
404
405
  };
405
- if (Object.defineProperty(m.prototype, "props", {
406
+ if (Object.defineProperty(v.prototype, "props", {
406
407
  set: function() {
407
408
  throw Error();
408
409
  }
409
410
  }), typeof Reflect == "object" && Reflect.construct) {
410
411
  try {
411
- Reflect.construct(m, []);
412
+ Reflect.construct(v, []);
412
413
  } catch (q) {
413
414
  p = q;
414
415
  }
415
- Reflect.construct(e, [], m);
416
+ Reflect.construct(e, [], v);
416
417
  } else {
417
418
  try {
418
- m.call();
419
+ v.call();
419
420
  } catch (q) {
420
421
  p = q;
421
422
  }
422
- e.call(m.prototype);
423
+ e.call(v.prototype);
423
424
  }
424
425
  } else {
425
426
  try {
@@ -432,148 +433,148 @@ function rt() {
432
433
  } catch (q) {
433
434
  if (q && p && typeof q.stack == "string") {
434
435
  for (var h = q.stack.split(`
435
- `), z = p.stack.split(`
436
- `), R = h.length - 1, P = z.length - 1; R >= 1 && P >= 0 && h[R] !== z[P]; )
436
+ `), O = p.stack.split(`
437
+ `), R = h.length - 1, P = O.length - 1; R >= 1 && P >= 0 && h[R] !== O[P]; )
437
438
  P--;
438
439
  for (; R >= 1 && P >= 0; R--, P--)
439
- if (h[R] !== z[P]) {
440
+ if (h[R] !== O[P]) {
440
441
  if (R !== 1 || P !== 1)
441
442
  do
442
- if (R--, P--, P < 0 || h[R] !== z[P]) {
443
+ if (R--, P--, P < 0 || h[R] !== O[P]) {
443
444
  var D = `
444
445
  ` + h[R].replace(" at new ", " at ");
445
- return e.displayName && D.includes("<anonymous>") && (D = D.replace("<anonymous>", e.displayName)), typeof e == "function" && te.set(e, D), D;
446
+ return e.displayName && D.includes("<anonymous>") && (D = D.replace("<anonymous>", e.displayName)), typeof e == "function" && ne.set(e, D), D;
446
447
  }
447
448
  while (R >= 1 && P >= 0);
448
449
  break;
449
450
  }
450
451
  }
451
452
  } finally {
452
- ve = !1, he.current = S, pr(), Error.prepareStackTrace = b;
453
+ be = !1, he.current = y, mr(), Error.prepareStackTrace = b;
453
454
  }
454
- var B = e ? e.displayName || e.name : "", Xe = B ? re(B) : "";
455
- return typeof e == "function" && te.set(e, Xe), Xe;
455
+ var B = e ? e.displayName || e.name : "", Ze = B ? te(B) : "";
456
+ return typeof e == "function" && ne.set(e, Ze), Ze;
456
457
  }
457
- function hr(e, a, c) {
458
- return Le(e, !1);
458
+ function vr(e, a, c) {
459
+ return Ne(e, !1);
459
460
  }
460
- function mr(e) {
461
+ function br(e) {
461
462
  var a = e.prototype;
462
463
  return !!(a && a.isReactComponent);
463
464
  }
464
- function ne(e, a, c) {
465
+ function ae(e, a, c) {
465
466
  if (e == null)
466
467
  return "";
467
468
  if (typeof e == "function")
468
- return Le(e, mr(e));
469
+ return Ne(e, br(e));
469
470
  if (typeof e == "string")
470
- return re(e);
471
+ return te(e);
471
472
  switch (e) {
472
- case y:
473
- return re("Suspense");
474
473
  case _:
475
- return re("SuspenseList");
474
+ return te("Suspense");
475
+ case w:
476
+ return te("SuspenseList");
476
477
  }
477
478
  if (typeof e == "object")
478
479
  switch (e.$$typeof) {
479
480
  case g:
480
- return hr(e.render);
481
- case v:
482
- return ne(e.type, a, c);
481
+ return vr(e.render);
482
+ case m:
483
+ return ae(e.type, a, c);
483
484
  case f: {
484
- var p = e, b = p._payload, S = p._init;
485
+ var p = e, b = p._payload, y = p._init;
485
486
  try {
486
- return ne(S(b), a, c);
487
+ return ae(y(b), a, c);
487
488
  } catch {
488
489
  }
489
490
  }
490
491
  }
491
492
  return "";
492
493
  }
493
- var ae = Object.prototype.hasOwnProperty, Me = {}, Ne = N.ReactDebugCurrentFrame;
494
- function ie(e) {
494
+ var ie = Object.prototype.hasOwnProperty, Ue = {}, $e = N.ReactDebugCurrentFrame;
495
+ function oe(e) {
495
496
  if (e) {
496
- var a = e._owner, c = ne(e.type, e._source, a ? a.type : null);
497
- Ne.setExtraStackFrame(c);
497
+ var a = e._owner, c = ae(e.type, e._source, a ? a.type : null);
498
+ $e.setExtraStackFrame(c);
498
499
  } else
499
- Ne.setExtraStackFrame(null);
500
+ $e.setExtraStackFrame(null);
500
501
  }
501
- function vr(e, a, c, p, b) {
502
+ function wr(e, a, c, p, b) {
502
503
  {
503
- var S = Function.call.bind(ae);
504
- for (var m in e)
505
- if (S(e, m)) {
504
+ var y = Function.call.bind(ie);
505
+ for (var v in e)
506
+ if (y(e, v)) {
506
507
  var h = void 0;
507
508
  try {
508
- if (typeof e[m] != "function") {
509
- var z = Error((p || "React class") + ": " + c + " type `" + m + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof e[m] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
510
- throw z.name = "Invariant Violation", z;
509
+ if (typeof e[v] != "function") {
510
+ var O = Error((p || "React class") + ": " + c + " type `" + v + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof e[v] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
511
+ throw O.name = "Invariant Violation", O;
511
512
  }
512
- h = e[m](a, m, p, c, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
513
+ h = e[v](a, v, p, c, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
513
514
  } catch (R) {
514
515
  h = R;
515
516
  }
516
- h && !(h instanceof Error) && (ie(b), T("%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).", p || "React class", c, m, typeof h), ie(null)), h instanceof Error && !(h.message in Me) && (Me[h.message] = !0, ie(b), T("Failed %s type: %s", c, h.message), ie(null));
517
+ h && !(h instanceof Error) && (oe(b), T("%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).", p || "React class", c, v, typeof h), oe(null)), h instanceof Error && !(h.message in Ue) && (Ue[h.message] = !0, oe(b), T("Failed %s type: %s", c, h.message), oe(null));
517
518
  }
518
519
  }
519
520
  }
520
- var br = Array.isArray;
521
- function be(e) {
522
- return br(e);
521
+ var Sr = Array.isArray;
522
+ function we(e) {
523
+ return Sr(e);
523
524
  }
524
- function wr(e) {
525
+ function _r(e) {
525
526
  {
526
527
  var a = typeof Symbol == "function" && Symbol.toStringTag, c = a && e[Symbol.toStringTag] || e.constructor.name || "Object";
527
528
  return c;
528
529
  }
529
530
  }
530
- function Sr(e) {
531
+ function yr(e) {
531
532
  try {
532
- return $e(e), !1;
533
+ return We(e), !1;
533
534
  } catch {
534
535
  return !0;
535
536
  }
536
537
  }
537
- function $e(e) {
538
+ function We(e) {
538
539
  return "" + e;
539
540
  }
540
- function Ue(e) {
541
- if (Sr(e))
542
- return T("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", wr(e)), $e(e);
541
+ function Ve(e) {
542
+ if (yr(e))
543
+ return T("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", _r(e)), We(e);
543
544
  }
544
- var X = N.ReactCurrentOwner, _r = {
545
+ var X = N.ReactCurrentOwner, Rr = {
545
546
  key: !0,
546
547
  ref: !0,
547
548
  __self: !0,
548
549
  __source: !0
549
- }, We, Ve, we;
550
- we = {};
551
- function yr(e) {
552
- if (ae.call(e, "ref")) {
550
+ }, Ye, Ke, Se;
551
+ Se = {};
552
+ function Pr(e) {
553
+ if (ie.call(e, "ref")) {
553
554
  var a = Object.getOwnPropertyDescriptor(e, "ref").get;
554
555
  if (a && a.isReactWarning)
555
556
  return !1;
556
557
  }
557
558
  return e.ref !== void 0;
558
559
  }
559
- function Rr(e) {
560
- if (ae.call(e, "key")) {
560
+ function Er(e) {
561
+ if (ie.call(e, "key")) {
561
562
  var a = Object.getOwnPropertyDescriptor(e, "key").get;
562
563
  if (a && a.isReactWarning)
563
564
  return !1;
564
565
  }
565
566
  return e.key !== void 0;
566
567
  }
567
- function Pr(e, a) {
568
+ function Cr(e, a) {
568
569
  if (typeof e.ref == "string" && X.current && a && X.current.stateNode !== a) {
569
570
  var c = F(X.current.type);
570
- we[c] || (T('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', F(X.current.type), e.ref), we[c] = !0);
571
+ Se[c] || (T('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', F(X.current.type), e.ref), Se[c] = !0);
571
572
  }
572
573
  }
573
- function Er(e, a) {
574
+ function Tr(e, a) {
574
575
  {
575
576
  var c = function() {
576
- We || (We = !0, T("%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)", a));
577
+ Ye || (Ye = !0, T("%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)", a));
577
578
  };
578
579
  c.isReactWarning = !0, Object.defineProperty(e, "key", {
579
580
  get: c,
@@ -581,10 +582,10 @@ function rt() {
581
582
  });
582
583
  }
583
584
  }
584
- function Cr(e, a) {
585
+ function Or(e, a) {
585
586
  {
586
587
  var c = function() {
587
- Ve || (Ve = !0, T("%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)", a));
588
+ Ke || (Ke = !0, T("%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)", a));
588
589
  };
589
590
  c.isReactWarning = !0, Object.defineProperty(e, "ref", {
590
591
  get: c,
@@ -592,14 +593,14 @@ function rt() {
592
593
  });
593
594
  }
594
595
  }
595
- var Tr = function(e, a, c, p, b, S, m) {
596
+ var zr = function(e, a, c, p, b, y, v) {
596
597
  var h = {
597
598
  $$typeof: n,
598
599
  type: e,
599
600
  key: a,
600
601
  ref: c,
601
- props: m,
602
- _owner: S
602
+ props: v,
603
+ _owner: y
603
604
  };
604
605
  return h._store = {}, Object.defineProperty(h._store, "validated", {
605
606
  configurable: !1,
@@ -618,41 +619,41 @@ function rt() {
618
619
  value: b
619
620
  }), Object.freeze && (Object.freeze(h.props), Object.freeze(h)), h;
620
621
  };
621
- function zr(e, a, c, p, b) {
622
+ function Ar(e, a, c, p, b) {
622
623
  {
623
- var S, m = {}, h = null, z = null;
624
- c !== void 0 && (Ue(c), h = "" + c), Rr(a) && (Ue(a.key), h = "" + a.key), yr(a) && (z = a.ref, Pr(a, b));
625
- for (S in a)
626
- ae.call(a, S) && !_r.hasOwnProperty(S) && (m[S] = a[S]);
624
+ var y, v = {}, h = null, O = null;
625
+ c !== void 0 && (Ve(c), h = "" + c), Er(a) && (Ve(a.key), h = "" + a.key), Pr(a) && (O = a.ref, Cr(a, b));
626
+ for (y in a)
627
+ ie.call(a, y) && !Rr.hasOwnProperty(y) && (v[y] = a[y]);
627
628
  if (e && e.defaultProps) {
628
629
  var R = e.defaultProps;
629
- for (S in R)
630
- m[S] === void 0 && (m[S] = R[S]);
630
+ for (y in R)
631
+ v[y] === void 0 && (v[y] = R[y]);
631
632
  }
632
- if (h || z) {
633
+ if (h || O) {
633
634
  var P = typeof e == "function" ? e.displayName || e.name || "Unknown" : e;
634
- h && Er(m, P), z && Cr(m, P);
635
+ h && Tr(v, P), O && Or(v, P);
635
636
  }
636
- return Tr(e, h, z, b, p, X.current, m);
637
+ return zr(e, h, O, b, p, X.current, v);
637
638
  }
638
639
  }
639
- var Se = N.ReactCurrentOwner, Ye = N.ReactDebugCurrentFrame;
640
+ var _e = N.ReactCurrentOwner, Be = N.ReactDebugCurrentFrame;
640
641
  function K(e) {
641
642
  if (e) {
642
- var a = e._owner, c = ne(e.type, e._source, a ? a.type : null);
643
- Ye.setExtraStackFrame(c);
643
+ var a = e._owner, c = ae(e.type, e._source, a ? a.type : null);
644
+ Be.setExtraStackFrame(c);
644
645
  } else
645
- Ye.setExtraStackFrame(null);
646
+ Be.setExtraStackFrame(null);
646
647
  }
647
- var _e;
648
- _e = !1;
649
- function ye(e) {
648
+ var ye;
649
+ ye = !1;
650
+ function Re(e) {
650
651
  return typeof e == "object" && e !== null && e.$$typeof === n;
651
652
  }
652
- function Ke() {
653
+ function Ge() {
653
654
  {
654
- if (Se.current) {
655
- var e = F(Se.current.type);
655
+ if (_e.current) {
656
+ var e = F(_e.current.type);
656
657
  if (e)
657
658
  return `
658
659
 
@@ -661,7 +662,7 @@ Check the render method of \`` + e + "`.";
661
662
  return "";
662
663
  }
663
664
  }
664
- function Or(e) {
665
+ function xr(e) {
665
666
  {
666
667
  if (e !== void 0) {
667
668
  var a = e.fileName.replace(/^.*[\\\/]/, ""), c = e.lineNumber;
@@ -672,10 +673,10 @@ Check your code at ` + a + ":" + c + ".";
672
673
  return "";
673
674
  }
674
675
  }
675
- var Be = {};
676
- function Ar(e) {
676
+ var Je = {};
677
+ function kr(e) {
677
678
  {
678
- var a = Ke();
679
+ var a = Ge();
679
680
  if (!a) {
680
681
  var c = typeof e == "string" ? e : e.displayName || e.name;
681
682
  c && (a = `
@@ -685,39 +686,39 @@ Check the top-level render call using <` + c + ">.");
685
686
  return a;
686
687
  }
687
688
  }
688
- function Ge(e, a) {
689
+ function He(e, a) {
689
690
  {
690
691
  if (!e._store || e._store.validated || e.key != null)
691
692
  return;
692
693
  e._store.validated = !0;
693
- var c = Ar(a);
694
- if (Be[c])
694
+ var c = kr(a);
695
+ if (Je[c])
695
696
  return;
696
- Be[c] = !0;
697
+ Je[c] = !0;
697
698
  var p = "";
698
- e && e._owner && e._owner !== Se.current && (p = " It was passed a child from " + F(e._owner.type) + "."), K(e), T('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', c, p), K(null);
699
+ e && e._owner && e._owner !== _e.current && (p = " It was passed a child from " + F(e._owner.type) + "."), K(e), T('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', c, p), K(null);
699
700
  }
700
701
  }
701
- function Je(e, a) {
702
+ function Xe(e, a) {
702
703
  {
703
704
  if (typeof e != "object")
704
705
  return;
705
- if (be(e))
706
+ if (we(e))
706
707
  for (var c = 0; c < e.length; c++) {
707
708
  var p = e[c];
708
- ye(p) && Ge(p, a);
709
+ Re(p) && He(p, a);
709
710
  }
710
- else if (ye(e))
711
+ else if (Re(e))
711
712
  e._store && (e._store.validated = !0);
712
713
  else if (e) {
713
- var b = ge(e);
714
+ var b = me(e);
714
715
  if (typeof b == "function" && b !== e.entries)
715
- for (var S = b.call(e), m; !(m = S.next()).done; )
716
- ye(m.value) && Ge(m.value, a);
716
+ for (var y = b.call(e), v; !(v = y.next()).done; )
717
+ Re(v.value) && He(v.value, a);
717
718
  }
718
719
  }
719
720
  }
720
- function kr(e) {
721
+ function Dr(e) {
721
722
  {
722
723
  var a = e.type;
723
724
  if (a == null || typeof a == "string")
@@ -725,22 +726,22 @@ Check the top-level render call using <` + c + ">.");
725
726
  var c;
726
727
  if (typeof a == "function")
727
728
  c = a.propTypes;
728
- else if (typeof a == "object" && (a.$$typeof === g || a.$$typeof === v))
729
+ else if (typeof a == "object" && (a.$$typeof === g || a.$$typeof === m))
729
730
  c = a.propTypes;
730
731
  else
731
732
  return;
732
733
  if (c) {
733
734
  var p = F(a);
734
- vr(c, e.props, "prop", p, e);
735
- } else if (a.PropTypes !== void 0 && !_e) {
736
- _e = !0;
735
+ wr(c, e.props, "prop", p, e);
736
+ } else if (a.PropTypes !== void 0 && !ye) {
737
+ ye = !0;
737
738
  var b = F(a);
738
739
  T("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", b || "Unknown");
739
740
  }
740
741
  typeof a.getDefaultProps == "function" && !a.getDefaultProps.isReactClassApproved && T("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
741
742
  }
742
743
  }
743
- function xr(e) {
744
+ function jr(e) {
744
745
  {
745
746
  for (var a = Object.keys(e.props), c = 0; c < a.length; c++) {
746
747
  var p = a[c];
@@ -752,58 +753,58 @@ Check the top-level render call using <` + c + ">.");
752
753
  e.ref !== null && (K(e), T("Invalid attribute `ref` supplied to `React.Fragment`."), K(null));
753
754
  }
754
755
  }
755
- function He(e, a, c, p, b, S) {
756
+ function Qe(e, a, c, p, b, y) {
756
757
  {
757
- var m = ur(e);
758
- if (!m) {
758
+ var v = fr(e);
759
+ if (!v) {
759
760
  var h = "";
760
761
  (e === void 0 || typeof e == "object" && e !== null && Object.keys(e).length === 0) && (h += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
761
- var z = Or(b);
762
- z ? h += z : h += Ke();
762
+ var O = xr(b);
763
+ O ? h += O : h += Ge();
763
764
  var R;
764
- e === null ? R = "null" : be(e) ? R = "array" : e !== void 0 && e.$$typeof === n ? (R = "<" + (F(e.type) || "Unknown") + " />", h = " Did you accidentally export a JSX literal instead of a component?") : R = typeof e, T("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", R, h);
765
+ e === null ? R = "null" : we(e) ? R = "array" : e !== void 0 && e.$$typeof === n ? (R = "<" + (F(e.type) || "Unknown") + " />", h = " Did you accidentally export a JSX literal instead of a component?") : R = typeof e, T("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", R, h);
765
766
  }
766
- var P = zr(e, a, c, b, S);
767
+ var P = Ar(e, a, c, b, y);
767
768
  if (P == null)
768
769
  return P;
769
- if (m) {
770
+ if (v) {
770
771
  var D = a.children;
771
772
  if (D !== void 0)
772
773
  if (p)
773
- if (be(D)) {
774
+ if (we(D)) {
774
775
  for (var B = 0; B < D.length; B++)
775
- Je(D[B], e);
776
+ Xe(D[B], e);
776
777
  Object.freeze && Object.freeze(D);
777
778
  } else
778
779
  T("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
779
780
  else
780
- Je(D, e);
781
+ Xe(D, e);
781
782
  }
782
- return e === s ? xr(P) : kr(P), P;
783
+ return e === s ? jr(P) : Dr(P), P;
783
784
  }
784
785
  }
785
- function Dr(e, a, c) {
786
- return He(e, a, c, !0);
786
+ function Ir(e, a, c) {
787
+ return Qe(e, a, c, !0);
787
788
  }
788
- function jr(e, a, c) {
789
- return He(e, a, c, !1);
789
+ function Fr(e, a, c) {
790
+ return Qe(e, a, c, !1);
790
791
  }
791
- var Ir = jr, Fr = Dr;
792
- Z.Fragment = s, Z.jsx = Ir, Z.jsxs = Fr;
793
- }()), Z;
792
+ var qr = Fr, Lr = Ir;
793
+ ee.Fragment = s, ee.jsx = qr, ee.jsxs = Lr;
794
+ }()), ee;
794
795
  }
795
796
  (function(t) {
796
- process.env.NODE_ENV === "production" ? t.exports = et() : t.exports = rt();
797
- })(fe);
798
- const U = fe.exports.Fragment, r = fe.exports.jsx, w = fe.exports.jsxs;
799
- function tt({
797
+ process.env.NODE_ENV === "production" ? t.exports = tt() : t.exports = nt();
798
+ })(pe);
799
+ const $ = pe.exports.Fragment, r = pe.exports.jsx, S = pe.exports.jsxs;
800
+ function at({
800
801
  postSubmit: t,
801
- styles: n = de
802
+ styles: n = fe
802
803
  }) {
803
804
  const {
804
805
  control: o,
805
806
  handleSubmit: s
806
- } = ee({
807
+ } = re({
807
808
  defaultValues: {
808
809
  type: "postgresql",
809
810
  key: "",
@@ -818,27 +819,27 @@ function tt({
818
819
  });
819
820
  return /* @__PURE__ */ r(L, {
820
821
  mx: "auto",
821
- children: /* @__PURE__ */ w("form", {
822
+ children: /* @__PURE__ */ S("form", {
822
823
  onSubmit: s(async ({
823
824
  type: i,
824
- key: u,
825
+ key: l,
825
826
  config: d
826
827
  }) => {
827
- $({
828
+ U({
828
829
  id: "for-creating",
829
830
  title: "Pending",
830
831
  message: "Adding data source...",
831
832
  loading: !0
832
833
  });
833
834
  try {
834
- await k.datasource.create(i, u, d), O({
835
+ await x.datasource.create(i, l, d), z({
835
836
  id: "for-creating",
836
837
  title: "Successful",
837
838
  message: "Data source is added",
838
839
  color: "green"
839
840
  }), t();
840
841
  } catch (g) {
841
- O({
842
+ z({
842
843
  id: "for-creating",
843
844
  title: "Failed",
844
845
  message: g.message,
@@ -851,7 +852,7 @@ function tt({
851
852
  control: o,
852
853
  render: ({
853
854
  field: i
854
- }) => /* @__PURE__ */ r(qr, {
855
+ }) => /* @__PURE__ */ r(Mr, {
855
856
  fullWidth: !0,
856
857
  mb: n.spacing,
857
858
  size: n.size,
@@ -881,10 +882,10 @@ function tt({
881
882
  placeholder: "A unique name",
882
883
  ...i
883
884
  })
884
- }), /* @__PURE__ */ r(er, {
885
+ }), /* @__PURE__ */ r(tr, {
885
886
  label: "Connection Info",
886
887
  labelPosition: "center"
887
- }), /* @__PURE__ */ w(I, {
888
+ }), /* @__PURE__ */ S(I, {
888
889
  grow: !0,
889
890
  children: [/* @__PURE__ */ r(E, {
890
891
  name: "config.host",
@@ -906,7 +907,7 @@ function tt({
906
907
  control: o,
907
908
  render: ({
908
909
  field: i
909
- }) => /* @__PURE__ */ r(Lr, {
910
+ }) => /* @__PURE__ */ r(Nr, {
910
911
  mb: n.spacing,
911
912
  size: n.size,
912
913
  required: !0,
@@ -935,7 +936,7 @@ function tt({
935
936
  control: o,
936
937
  render: ({
937
938
  field: i
938
- }) => /* @__PURE__ */ r(ce, {
939
+ }) => /* @__PURE__ */ r(le, {
939
940
  mb: n.spacing,
940
941
  size: n.size,
941
942
  required: !0,
@@ -957,7 +958,7 @@ function tt({
957
958
  }), /* @__PURE__ */ r(I, {
958
959
  position: "right",
959
960
  mt: n.spacing,
960
- children: /* @__PURE__ */ r(x, {
961
+ children: /* @__PURE__ */ r(k, {
961
962
  type: "submit",
962
963
  size: n.button.size,
963
964
  children: "Save"
@@ -966,13 +967,13 @@ function tt({
966
967
  })
967
968
  });
968
969
  }
969
- function nt({
970
+ function it({
970
971
  onSuccess: t,
971
- styles: n = de
972
+ styles: n = fe
972
973
  }) {
973
- const [o, s] = J.useState(!1), l = () => s(!0), i = () => s(!1);
974
- return /* @__PURE__ */ w(U, {
975
- children: [/* @__PURE__ */ r(se, {
974
+ const [o, s] = J.useState(!1), u = () => s(!0), i = () => s(!1);
975
+ return /* @__PURE__ */ S($, {
976
+ children: [/* @__PURE__ */ r(ce, {
976
977
  overflow: "inside",
977
978
  opened: o,
978
979
  onClose: () => s(!1),
@@ -981,60 +982,69 @@ function nt({
981
982
  onDragStart: (d) => {
982
983
  d.stopPropagation();
983
984
  },
984
- children: /* @__PURE__ */ r(tt, {
985
+ children: /* @__PURE__ */ r(at, {
985
986
  postSubmit: () => {
986
987
  t(), i();
987
988
  },
988
989
  styles: n
989
990
  })
990
- }), /* @__PURE__ */ r(x, {
991
+ }), /* @__PURE__ */ r(k, {
991
992
  size: n.button.size,
992
- onClick: l,
993
- leftIcon: /* @__PURE__ */ r(Ee, {
993
+ onClick: u,
994
+ leftIcon: /* @__PURE__ */ r(Te, {
994
995
  size: 20
995
996
  }),
996
997
  children: "Add a Data Source"
997
998
  })]
998
999
  });
999
1000
  }
1000
- function at(t, n) {
1001
- if (t == null)
1002
- return {};
1003
- var o = {}, s = Object.keys(t), l, i;
1004
- for (i = 0; i < s.length; i++)
1005
- l = s[i], !(n.indexOf(l) >= 0) && (o[l] = t[l]);
1006
- return o;
1001
+ function Pe() {
1002
+ return Pe = Object.assign ? Object.assign.bind() : function(t) {
1003
+ for (var n = 1; n < arguments.length; n++) {
1004
+ var o = arguments[n];
1005
+ for (var s in o)
1006
+ Object.prototype.hasOwnProperty.call(o, s) && (t[s] = o[s]);
1007
+ }
1008
+ return t;
1009
+ }, Pe.apply(this, arguments);
1007
1010
  }
1008
- function it(t, n) {
1011
+ function ot(t, n) {
1009
1012
  if (t == null)
1010
1013
  return {};
1011
- var o = at(t, n), s, l;
1014
+ var o, s, u = function(l, d) {
1015
+ if (l == null)
1016
+ return {};
1017
+ var g, _, w = {}, m = Object.keys(l);
1018
+ for (_ = 0; _ < m.length; _++)
1019
+ g = m[_], d.indexOf(g) >= 0 || (w[g] = l[g]);
1020
+ return w;
1021
+ }(t, n);
1012
1022
  if (Object.getOwnPropertySymbols) {
1013
1023
  var i = Object.getOwnPropertySymbols(t);
1014
- for (l = 0; l < i.length; l++)
1015
- s = i[l], !(n.indexOf(s) >= 0) && (!Object.prototype.propertyIsEnumerable.call(t, s) || (o[s] = t[s]));
1024
+ for (s = 0; s < i.length; s++)
1025
+ o = i[s], n.indexOf(o) >= 0 || Object.prototype.propertyIsEnumerable.call(t, o) && (u[o] = t[o]);
1016
1026
  }
1017
- return o;
1027
+ return u;
1018
1028
  }
1019
- var ot = ["size", "color", "stroke"];
1020
- function st(t) {
1021
- var n = t.size, o = n === void 0 ? 24 : n, s = t.color, l = s === void 0 ? "currentColor" : s, i = t.stroke, u = i === void 0 ? 2 : i, d = it(t, ot);
1022
- return /* @__PURE__ */ w("svg", { xmlns: "http://www.w3.org/2000/svg", className: "icon icon-tabler icon-tabler-lock", width: o, height: o, viewBox: "0 0 24 24", strokeWidth: u, stroke: l, fill: "none", strokeLinecap: "round", strokeLinejoin: "round", ...d, children: [/* @__PURE__ */ r("path", { stroke: "none", d: "M0 0h24v24H0z", fill: "none" }), /* @__PURE__ */ r("rect", { x: 5, y: 11, width: 14, height: 10, rx: 2 }), /* @__PURE__ */ r("circle", { cx: 12, cy: 16, r: 1 }), /* @__PURE__ */ r("path", { d: "M8 11v-4a4 4 0 0 1 8 0v4" })] });
1029
+ var st = ["size", "color", "stroke"];
1030
+ function ct(t) {
1031
+ var n = t.size, o = n === void 0 ? 24 : n, s = t.color, u = s === void 0 ? "currentColor" : s, i = t.stroke, l = i === void 0 ? 2 : i, d = ot(t, st);
1032
+ return Q.createElement("svg", Pe({ xmlns: "http://www.w3.org/2000/svg", className: "icon icon-tabler icon-tabler-lock", width: o, height: o, viewBox: "0 0 24 24", strokeWidth: l, stroke: u, fill: "none", strokeLinecap: "round", strokeLinejoin: "round" }, d), Q.createElement("path", { stroke: "none", d: "M0 0h24v24H0z", fill: "none" }), Q.createElement("rect", { x: 5, y: 11, width: 14, height: 10, rx: 2 }), Q.createElement("circle", { cx: 12, cy: 16, r: 1 }), Q.createElement("path", { d: "M8 11v-4a4 4 0 0 1 8 0v4" }));
1023
1033
  }
1024
- function ct({
1034
+ function lt({
1025
1035
  id: t,
1026
1036
  name: n,
1027
1037
  isProtected: o,
1028
1038
  onSuccess: s,
1029
- styles: l = de
1039
+ styles: u = fe
1030
1040
  }) {
1031
- const i = le(), u = async () => {
1032
- !t || ($({
1041
+ const i = ue(), l = async () => {
1042
+ !t || (U({
1033
1043
  id: "for-deleting",
1034
1044
  title: "Pending",
1035
1045
  message: "Deleting data source...",
1036
1046
  loading: !0
1037
- }), await k.datasource.delete(t), O({
1047
+ }), await x.datasource.delete(t), z({
1038
1048
  id: "for-deleting",
1039
1049
  title: "Successful",
1040
1050
  message: `Data source [${n}] is deleted`,
@@ -1042,8 +1052,8 @@ function ct({
1042
1052
  }), s());
1043
1053
  }, d = () => i.openConfirmModal({
1044
1054
  title: "Delete this data source?",
1045
- children: /* @__PURE__ */ r(oe, {
1046
- size: l.size,
1055
+ children: /* @__PURE__ */ r(se, {
1056
+ size: u.size,
1047
1057
  children: "This action won't affect your database."
1048
1058
  }),
1049
1059
  labels: {
@@ -1051,9 +1061,9 @@ function ct({
1051
1061
  cancel: "Cancel"
1052
1062
  },
1053
1063
  onCancel: () => console.log("Cancel"),
1054
- onConfirm: u
1055
- }), g = Mr();
1056
- return o ? /* @__PURE__ */ r(Nr, {
1064
+ onConfirm: l
1065
+ }), g = Ur();
1066
+ return o ? /* @__PURE__ */ r($r, {
1057
1067
  withArrow: !0,
1058
1068
  events: {
1059
1069
  hover: !0,
@@ -1062,59 +1072,59 @@ function ct({
1062
1072
  },
1063
1073
  label: "This is a preset datasource, it can not be deleted",
1064
1074
  children: /* @__PURE__ */ r("span", {
1065
- children: /* @__PURE__ */ r(st, {
1075
+ children: /* @__PURE__ */ r(ct, {
1066
1076
  size: 16,
1067
1077
  color: g.colors.gray[7]
1068
1078
  })
1069
1079
  })
1070
- }) : /* @__PURE__ */ r(x, {
1071
- size: l.button.size,
1080
+ }) : /* @__PURE__ */ r(k, {
1081
+ size: u.button.size,
1072
1082
  color: "red",
1073
1083
  onClick: d,
1074
- leftIcon: /* @__PURE__ */ r(Ce, {
1084
+ leftIcon: /* @__PURE__ */ r(Oe, {
1075
1085
  size: 20
1076
1086
  }),
1077
1087
  children: "Delete"
1078
1088
  });
1079
1089
  }
1080
- function Ot({
1081
- styles: t = de,
1090
+ function At({
1091
+ styles: t = fe,
1082
1092
  config: n
1083
1093
  }) {
1084
- ue(n);
1094
+ de(n);
1085
1095
  const {
1086
1096
  data: o = [],
1087
1097
  loading: s,
1088
- refresh: l
1098
+ refresh: u
1089
1099
  } = G(async () => {
1090
1100
  const {
1091
1101
  data: i
1092
- } = await k.datasource.list();
1102
+ } = await x.datasource.list();
1093
1103
  return i;
1094
1104
  }, {
1095
1105
  refreshDeps: []
1096
1106
  });
1097
- return /* @__PURE__ */ w(U, {
1107
+ return /* @__PURE__ */ S($, {
1098
1108
  children: [/* @__PURE__ */ r(I, {
1099
1109
  pt: t.spacing,
1100
1110
  position: "right",
1101
- children: /* @__PURE__ */ r(nt, {
1102
- onSuccess: l
1111
+ children: /* @__PURE__ */ r(it, {
1112
+ onSuccess: u
1103
1113
  })
1104
- }), /* @__PURE__ */ w(L, {
1114
+ }), /* @__PURE__ */ S(L, {
1105
1115
  mt: t.spacing,
1106
1116
  sx: {
1107
1117
  position: "relative"
1108
1118
  },
1109
- children: [/* @__PURE__ */ r(Re, {
1119
+ children: [/* @__PURE__ */ r(Ee, {
1110
1120
  visible: s
1111
- }), /* @__PURE__ */ w(Pe, {
1121
+ }), /* @__PURE__ */ S(Ce, {
1112
1122
  horizontalSpacing: t.spacing,
1113
1123
  verticalSpacing: t.spacing,
1114
1124
  fontSize: t.size,
1115
1125
  highlightOnHover: !0,
1116
1126
  children: [/* @__PURE__ */ r("thead", {
1117
- children: /* @__PURE__ */ w("tr", {
1127
+ children: /* @__PURE__ */ S("tr", {
1118
1128
  children: [/* @__PURE__ */ r("th", {
1119
1129
  children: "Type"
1120
1130
  }), /* @__PURE__ */ r("th", {
@@ -1126,60 +1136,60 @@ function Ot({
1126
1136
  }), /* @__PURE__ */ r("tbody", {
1127
1137
  children: o.map(({
1128
1138
  id: i,
1129
- key: u,
1139
+ key: l,
1130
1140
  type: d,
1131
1141
  is_preset: g
1132
- }) => /* @__PURE__ */ w("tr", {
1142
+ }) => /* @__PURE__ */ S("tr", {
1133
1143
  children: [/* @__PURE__ */ r("td", {
1134
1144
  width: 200,
1135
1145
  children: d
1136
1146
  }), /* @__PURE__ */ r("td", {
1137
- children: u
1147
+ children: l
1138
1148
  }), /* @__PURE__ */ r("td", {
1139
1149
  width: 200,
1140
1150
  children: /* @__PURE__ */ r(I, {
1141
1151
  position: "left",
1142
- children: /* @__PURE__ */ r(ct, {
1152
+ children: /* @__PURE__ */ r(lt, {
1143
1153
  isProtected: g,
1144
1154
  id: i,
1145
- name: u,
1146
- onSuccess: l
1155
+ name: l,
1156
+ onSuccess: u
1147
1157
  })
1148
1158
  })
1149
1159
  })]
1150
- }, u))
1160
+ }, l))
1151
1161
  })]
1152
1162
  })]
1153
1163
  })]
1154
1164
  });
1155
1165
  }
1156
- const lt = tr(({
1166
+ const ut = ar(({
1157
1167
  label: t,
1158
1168
  value: n,
1159
1169
  description: o,
1160
1170
  ...s
1161
- }, l) => /* @__PURE__ */ w(rr, {
1171
+ }, u) => /* @__PURE__ */ S(nr, {
1162
1172
  spacing: 2,
1163
- ref: l,
1173
+ ref: u,
1164
1174
  ...s,
1165
- children: [/* @__PURE__ */ r(oe, {
1175
+ children: [/* @__PURE__ */ r(se, {
1166
1176
  size: "sm",
1167
1177
  children: t
1168
- }), /* @__PURE__ */ r(oe, {
1178
+ }), /* @__PURE__ */ r(se, {
1169
1179
  size: "xs",
1170
1180
  color: "dimmed",
1171
1181
  className: "role-description",
1172
1182
  children: o
1173
1183
  })]
1174
- })), Te = tr(({
1184
+ })), ze = ar(({
1175
1185
  styles: t,
1176
1186
  value: n,
1177
1187
  onChange: o
1178
1188
  }, s) => {
1179
1189
  const {
1180
- data: l = [],
1190
+ data: u = [],
1181
1191
  loading: i
1182
- } = G(async () => (await k.role.list()).map((d) => ({
1192
+ } = G(async () => (await x.role.list()).map((d) => ({
1183
1193
  label: d.name,
1184
1194
  value: d.id,
1185
1195
  description: d.description,
@@ -1187,14 +1197,14 @@ const lt = tr(({
1187
1197
  })), {
1188
1198
  refreshDeps: []
1189
1199
  });
1190
- return /* @__PURE__ */ r($r, {
1200
+ return /* @__PURE__ */ r(Wr, {
1191
1201
  ref: s,
1192
1202
  mb: t.spacing,
1193
1203
  size: t.size,
1194
1204
  required: !0,
1195
1205
  label: "Role",
1196
- itemComponent: lt,
1197
- data: l,
1206
+ itemComponent: ut,
1207
+ data: u,
1198
1208
  disabled: i,
1199
1209
  styles: () => ({
1200
1210
  item: {
@@ -1217,15 +1227,15 @@ const lt = tr(({
1217
1227
  size: "xs"
1218
1228
  }
1219
1229
  };
1220
- function ut({
1230
+ function dt({
1221
1231
  postSubmit: t,
1222
1232
  styles: n = W,
1223
1233
  initialRoleID: o
1224
1234
  }) {
1225
1235
  const {
1226
1236
  control: s,
1227
- handleSubmit: l
1228
- } = ee({
1237
+ handleSubmit: u
1238
+ } = re({
1229
1239
  defaultValues: {
1230
1240
  name: "",
1231
1241
  email: "",
@@ -1235,30 +1245,30 @@ function ut({
1235
1245
  });
1236
1246
  return /* @__PURE__ */ r(L, {
1237
1247
  mx: "auto",
1238
- children: /* @__PURE__ */ w("form", {
1239
- onSubmit: l(async ({
1240
- name: u,
1248
+ children: /* @__PURE__ */ S("form", {
1249
+ onSubmit: u(async ({
1250
+ name: l,
1241
1251
  email: d,
1242
1252
  password: g,
1243
- role_id: y
1253
+ role_id: _
1244
1254
  }) => {
1245
1255
  try {
1246
- $({
1256
+ U({
1247
1257
  id: "for-creating",
1248
1258
  title: "Pending",
1249
1259
  message: "Adding account...",
1250
1260
  loading: !0
1251
- }), await k.account.create(u, d, g, y), O({
1261
+ }), await x.account.create(l, d, g, _), z({
1252
1262
  id: "for-creating",
1253
1263
  title: "Successful",
1254
1264
  message: "Account is added",
1255
1265
  color: "green"
1256
1266
  }), t();
1257
- } catch (_) {
1258
- O({
1267
+ } catch (w) {
1268
+ z({
1259
1269
  id: "for-creating",
1260
1270
  title: "Failed",
1261
- message: _.message,
1271
+ message: w.message,
1262
1272
  color: "red"
1263
1273
  });
1264
1274
  }
@@ -1267,52 +1277,52 @@ function ut({
1267
1277
  name: "name",
1268
1278
  control: s,
1269
1279
  render: ({
1270
- field: u
1280
+ field: l
1271
1281
  }) => /* @__PURE__ */ r(j, {
1272
1282
  mb: n.spacing,
1273
1283
  size: n.size,
1274
1284
  required: !0,
1275
1285
  label: "Username",
1276
- ...u
1286
+ ...l
1277
1287
  })
1278
1288
  }), /* @__PURE__ */ r(E, {
1279
1289
  name: "email",
1280
1290
  control: s,
1281
1291
  render: ({
1282
- field: u
1292
+ field: l
1283
1293
  }) => /* @__PURE__ */ r(j, {
1284
1294
  mb: n.spacing,
1285
1295
  size: n.size,
1286
1296
  required: !0,
1287
1297
  label: "Email",
1288
- ...u
1298
+ ...l
1289
1299
  })
1290
1300
  }), /* @__PURE__ */ r(E, {
1291
1301
  name: "password",
1292
1302
  control: s,
1293
1303
  render: ({
1294
- field: u
1295
- }) => /* @__PURE__ */ r(ce, {
1304
+ field: l
1305
+ }) => /* @__PURE__ */ r(le, {
1296
1306
  mb: n.spacing,
1297
1307
  size: n.size,
1298
1308
  required: !0,
1299
1309
  label: "Password",
1300
1310
  description: "Password must be at least 8 characters long",
1301
- ...u
1311
+ ...l
1302
1312
  })
1303
1313
  }), /* @__PURE__ */ r(E, {
1304
1314
  name: "role_id",
1305
1315
  control: s,
1306
1316
  render: ({
1307
- field: u
1308
- }) => /* @__PURE__ */ r(Te, {
1317
+ field: l
1318
+ }) => /* @__PURE__ */ r(ze, {
1309
1319
  styles: n,
1310
- ...u
1320
+ ...l
1311
1321
  })
1312
1322
  }), /* @__PURE__ */ r(I, {
1313
1323
  position: "right",
1314
1324
  mt: n.spacing,
1315
- children: /* @__PURE__ */ r(x, {
1325
+ children: /* @__PURE__ */ r(k, {
1316
1326
  type: "submit",
1317
1327
  size: n.button.size,
1318
1328
  children: "Save"
@@ -1321,62 +1331,62 @@ function ut({
1321
1331
  })
1322
1332
  });
1323
1333
  }
1324
- function dt({
1334
+ function ft({
1325
1335
  onSuccess: t,
1326
1336
  styles: n = W,
1327
1337
  initialRoleID: o
1328
1338
  }) {
1329
- const [s, l] = J.useState(!1), i = () => l(!0), u = () => l(!1);
1330
- return /* @__PURE__ */ w(U, {
1331
- children: [/* @__PURE__ */ r(se, {
1339
+ const [s, u] = J.useState(!1), i = () => u(!0), l = () => u(!1);
1340
+ return /* @__PURE__ */ S($, {
1341
+ children: [/* @__PURE__ */ r(ce, {
1332
1342
  overflow: "inside",
1333
1343
  opened: s,
1334
- onClose: () => l(!1),
1344
+ onClose: () => u(!1),
1335
1345
  title: "Add an Account",
1336
1346
  trapFocus: !0,
1337
1347
  onDragStart: (g) => {
1338
1348
  g.stopPropagation();
1339
1349
  },
1340
- children: /* @__PURE__ */ r(ut, {
1350
+ children: /* @__PURE__ */ r(dt, {
1341
1351
  postSubmit: () => {
1342
- t(), u();
1352
+ t(), l();
1343
1353
  },
1344
1354
  styles: n,
1345
1355
  initialRoleID: o
1346
1356
  })
1347
- }), /* @__PURE__ */ r(x, {
1357
+ }), /* @__PURE__ */ r(k, {
1348
1358
  size: n.button.size,
1349
1359
  onClick: i,
1350
- leftIcon: /* @__PURE__ */ r(Ee, {
1360
+ leftIcon: /* @__PURE__ */ r(Te, {
1351
1361
  size: 20
1352
1362
  }),
1353
1363
  children: "Add an Account"
1354
1364
  })]
1355
1365
  });
1356
1366
  }
1357
- function ft({
1367
+ function pt({
1358
1368
  id: t,
1359
1369
  name: n,
1360
1370
  onSuccess: o,
1361
1371
  styles: s = W
1362
1372
  }) {
1363
- const l = le(), i = async () => {
1373
+ const u = ue(), i = async () => {
1364
1374
  if (!!t) {
1365
- $({
1375
+ U({
1366
1376
  id: "for-deleting",
1367
1377
  title: "Pending",
1368
1378
  message: "Deleting account...",
1369
1379
  loading: !0
1370
1380
  });
1371
1381
  try {
1372
- await k.account.delete(t), O({
1382
+ await x.account.delete(t), z({
1373
1383
  id: "for-deleting",
1374
1384
  title: "Successful",
1375
1385
  message: `Account [${n}] is deleted`,
1376
1386
  color: "green"
1377
1387
  }), o();
1378
1388
  } catch (d) {
1379
- O({
1389
+ z({
1380
1390
  id: "for-deleting",
1381
1391
  title: "Failed",
1382
1392
  message: d.message,
@@ -1384,7 +1394,7 @@ function ft({
1384
1394
  });
1385
1395
  }
1386
1396
  }
1387
- }, u = () => l.openConfirmModal({
1397
+ }, l = () => u.openConfirmModal({
1388
1398
  title: "Delete this account?",
1389
1399
  labels: {
1390
1400
  confirm: "Confirm",
@@ -1393,29 +1403,29 @@ function ft({
1393
1403
  onCancel: () => console.log("Cancel"),
1394
1404
  onConfirm: i
1395
1405
  });
1396
- return /* @__PURE__ */ r(x, {
1406
+ return /* @__PURE__ */ r(k, {
1397
1407
  size: s.button.size,
1398
1408
  color: "red",
1399
- onClick: u,
1400
- leftIcon: /* @__PURE__ */ r(Ce, {
1409
+ onClick: l,
1410
+ leftIcon: /* @__PURE__ */ r(Oe, {
1401
1411
  size: 20
1402
1412
  }),
1403
1413
  children: "Delete"
1404
1414
  });
1405
1415
  }
1406
- function pt({
1416
+ function gt({
1407
1417
  id: t,
1408
1418
  name: n,
1409
1419
  email: o,
1410
1420
  role_id: s,
1411
- postSubmit: l,
1421
+ postSubmit: u,
1412
1422
  styles: i = W
1413
1423
  }) {
1414
1424
  const {
1415
- control: u,
1425
+ control: l,
1416
1426
  handleSubmit: d,
1417
1427
  watch: g
1418
- } = ee({
1428
+ } = re({
1419
1429
  defaultValues: {
1420
1430
  name: n,
1421
1431
  email: o,
@@ -1423,48 +1433,48 @@ function pt({
1423
1433
  reset_password: !1,
1424
1434
  new_password: ""
1425
1435
  }
1426
- }), y = async ({
1436
+ }), _ = async ({
1427
1437
  name: f,
1428
1438
  email: A,
1429
1439
  role_id: M,
1430
1440
  reset_password: V,
1431
- new_password: ge
1441
+ new_password: me
1432
1442
  }) => {
1433
1443
  try {
1434
- $({
1444
+ U({
1435
1445
  id: "for-updating",
1436
1446
  title: "Pending",
1437
1447
  message: "Updating account...",
1438
1448
  loading: !0
1439
- }), await k.account.edit({
1449
+ }), await x.account.edit({
1440
1450
  id: t,
1441
1451
  name: f,
1442
1452
  email: A,
1443
1453
  role_id: M,
1444
1454
  reset_password: V,
1445
- new_password: ge
1446
- }), O({
1455
+ new_password: me
1456
+ }), z({
1447
1457
  id: "for-updating",
1448
1458
  title: "Successful",
1449
1459
  message: "Account is updated",
1450
1460
  color: "green"
1451
- }), l();
1461
+ }), u();
1452
1462
  } catch (N) {
1453
- O({
1463
+ z({
1454
1464
  id: "for-updating",
1455
1465
  title: "Failed",
1456
1466
  message: N.message,
1457
1467
  color: "red"
1458
1468
  });
1459
1469
  }
1460
- }, [_, v] = g(["reset_password", "new_password"]);
1470
+ }, [w, m] = g(["reset_password", "new_password"]);
1461
1471
  return /* @__PURE__ */ r(L, {
1462
1472
  mx: "auto",
1463
- children: /* @__PURE__ */ w("form", {
1464
- onSubmit: d(y),
1473
+ children: /* @__PURE__ */ S("form", {
1474
+ onSubmit: d(_),
1465
1475
  children: [/* @__PURE__ */ r(E, {
1466
1476
  name: "name",
1467
- control: u,
1477
+ control: l,
1468
1478
  render: ({
1469
1479
  field: f
1470
1480
  }) => /* @__PURE__ */ r(j, {
@@ -1476,7 +1486,7 @@ function pt({
1476
1486
  })
1477
1487
  }), /* @__PURE__ */ r(E, {
1478
1488
  name: "email",
1479
- control: u,
1489
+ control: l,
1480
1490
  render: ({
1481
1491
  field: f
1482
1492
  }) => /* @__PURE__ */ r(j, {
@@ -1488,24 +1498,24 @@ function pt({
1488
1498
  })
1489
1499
  }), /* @__PURE__ */ r(E, {
1490
1500
  name: "role_id",
1491
- control: u,
1501
+ control: l,
1492
1502
  render: ({
1493
1503
  field: f
1494
- }) => /* @__PURE__ */ r(Te, {
1504
+ }) => /* @__PURE__ */ r(ze, {
1495
1505
  styles: i,
1496
1506
  ...f
1497
1507
  })
1498
- }), /* @__PURE__ */ r(er, {
1508
+ }), /* @__PURE__ */ r(tr, {
1499
1509
  my: 20,
1500
1510
  variant: "dashed",
1501
1511
  label: "",
1502
1512
  labelPosition: "center"
1503
1513
  }), /* @__PURE__ */ r(E, {
1504
1514
  name: "reset_password",
1505
- control: u,
1515
+ control: l,
1506
1516
  render: ({
1507
1517
  field: f
1508
- }) => /* @__PURE__ */ r(Ur, {
1518
+ }) => /* @__PURE__ */ r(Vr, {
1509
1519
  mb: i.spacing,
1510
1520
  size: i.size,
1511
1521
  label: "Reset password",
@@ -1517,12 +1527,12 @@ function pt({
1517
1527
  }
1518
1528
  }
1519
1529
  })
1520
- }), _ && /* @__PURE__ */ r(E, {
1530
+ }), w && /* @__PURE__ */ r(E, {
1521
1531
  name: "new_password",
1522
- control: u,
1532
+ control: l,
1523
1533
  render: ({
1524
1534
  field: f
1525
- }) => /* @__PURE__ */ r(ce, {
1535
+ }) => /* @__PURE__ */ r(le, {
1526
1536
  autoComplete: "off",
1527
1537
  mb: i.spacing,
1528
1538
  size: i.size,
@@ -1534,7 +1544,7 @@ function pt({
1534
1544
  }), /* @__PURE__ */ r(I, {
1535
1545
  position: "right",
1536
1546
  mt: i.spacing,
1537
- children: /* @__PURE__ */ r(x, {
1547
+ children: /* @__PURE__ */ r(k, {
1538
1548
  type: "submit",
1539
1549
  size: i.button.size,
1540
1550
  children: "Submit"
@@ -1543,92 +1553,92 @@ function pt({
1543
1553
  })
1544
1554
  });
1545
1555
  }
1546
- function gt({
1556
+ function mt({
1547
1557
  account: t,
1548
1558
  onSuccess: n,
1549
1559
  styles: o = W
1550
1560
  }) {
1551
- const [s, l] = J.useState(!1), i = () => l(!0), u = () => l(!1), d = () => {
1552
- n(), u();
1561
+ const [s, u] = J.useState(!1), i = () => u(!0), l = () => u(!1), d = () => {
1562
+ n(), l();
1553
1563
  };
1554
- return /* @__PURE__ */ w(U, {
1555
- children: [/* @__PURE__ */ r(se, {
1564
+ return /* @__PURE__ */ S($, {
1565
+ children: [/* @__PURE__ */ r(ce, {
1556
1566
  overflow: "inside",
1557
1567
  opened: s,
1558
- onClose: () => l(!1),
1568
+ onClose: () => u(!1),
1559
1569
  title: `Editing ${t.name}`,
1560
1570
  trapFocus: !0,
1561
1571
  onDragStart: (g) => {
1562
1572
  g.stopPropagation();
1563
1573
  },
1564
- children: /* @__PURE__ */ r(pt, {
1574
+ children: /* @__PURE__ */ r(gt, {
1565
1575
  ...t,
1566
1576
  postSubmit: d,
1567
1577
  styles: o
1568
1578
  })
1569
- }), /* @__PURE__ */ r(x, {
1579
+ }), /* @__PURE__ */ r(k, {
1570
1580
  size: o.button.size,
1571
1581
  onClick: i,
1572
- leftIcon: /* @__PURE__ */ r(Wr, {
1582
+ leftIcon: /* @__PURE__ */ r(Yr, {
1573
1583
  size: 20
1574
1584
  }),
1575
1585
  children: "Edit"
1576
1586
  })]
1577
1587
  });
1578
1588
  }
1579
- function At({
1589
+ function xt({
1580
1590
  styles: t = W,
1581
1591
  config: n
1582
1592
  }) {
1583
- var y, _;
1584
- ue(n);
1593
+ var _, w;
1594
+ de(n);
1585
1595
  const {
1586
1596
  data: o = [],
1587
1597
  loading: s,
1588
- refresh: l
1598
+ refresh: u
1589
1599
  } = G(async () => {
1590
1600
  const {
1591
- data: v
1592
- } = await k.account.list();
1593
- return v;
1601
+ data: m
1602
+ } = await x.account.list();
1603
+ return m;
1594
1604
  }, {
1595
1605
  refreshDeps: []
1596
1606
  }), {
1597
1607
  data: i = [],
1598
- loading: u
1599
- } = G(async () => (await k.role.list()).map((f) => ({
1608
+ loading: l
1609
+ } = G(async () => (await x.role.list()).map((f) => ({
1600
1610
  label: f.name,
1601
1611
  value: f.id,
1602
1612
  description: f.description,
1603
1613
  disabled: f.id === 50
1604
1614
  })), {
1605
1615
  refreshDeps: []
1606
- }), d = nr(() => i.reduce((v, f) => (v.set(f.value, f.label), v), /* @__PURE__ */ new Map()), [i]), g = (v) => {
1616
+ }), d = ir(() => i.reduce((m, f) => (m.set(f.value, f.label), m), /* @__PURE__ */ new Map()), [i]), g = (m) => {
1607
1617
  var f;
1608
- return (f = d.get(v)) != null ? f : v;
1618
+ return (f = d.get(m)) != null ? f : m;
1609
1619
  };
1610
- return /* @__PURE__ */ w(U, {
1620
+ return /* @__PURE__ */ S($, {
1611
1621
  children: [/* @__PURE__ */ r(I, {
1612
1622
  pt: t.spacing,
1613
1623
  position: "right",
1614
- children: /* @__PURE__ */ r(dt, {
1615
- onSuccess: l,
1616
- initialRoleID: (_ = (y = i == null ? void 0 : i[0]) == null ? void 0 : y.value) != null ? _ : 0
1624
+ children: /* @__PURE__ */ r(ft, {
1625
+ onSuccess: u,
1626
+ initialRoleID: (w = (_ = i == null ? void 0 : i[0]) == null ? void 0 : _.value) != null ? w : 0
1617
1627
  })
1618
- }), /* @__PURE__ */ w(L, {
1628
+ }), /* @__PURE__ */ S(L, {
1619
1629
  mt: t.spacing,
1620
1630
  sx: {
1621
1631
  position: "relative"
1622
1632
  },
1623
- children: [/* @__PURE__ */ r(Re, {
1624
- visible: s || u
1625
- }), /* @__PURE__ */ w(Pe, {
1633
+ children: [/* @__PURE__ */ r(Ee, {
1634
+ visible: s || l
1635
+ }), /* @__PURE__ */ S(Ce, {
1626
1636
  horizontalSpacing: t.spacing,
1627
1637
  verticalSpacing: t.spacing,
1628
1638
  fontSize: t.size,
1629
1639
  highlightOnHover: !0,
1630
1640
  children: [/* @__PURE__ */ r("thead", {
1631
- children: /* @__PURE__ */ w("tr", {
1641
+ children: /* @__PURE__ */ S("tr", {
1632
1642
  children: [/* @__PURE__ */ r("th", {
1633
1643
  children: "Username"
1634
1644
  }), /* @__PURE__ */ r("th", {
@@ -1640,14 +1650,14 @@ function At({
1640
1650
  })]
1641
1651
  })
1642
1652
  }), /* @__PURE__ */ r("tbody", {
1643
- children: o.map((v) => {
1653
+ children: o.map((m) => {
1644
1654
  const {
1645
1655
  id: f,
1646
1656
  name: A,
1647
1657
  email: M,
1648
1658
  role_id: V
1649
- } = v;
1650
- return /* @__PURE__ */ w("tr", {
1659
+ } = m;
1660
+ return /* @__PURE__ */ S("tr", {
1651
1661
  children: [/* @__PURE__ */ r("td", {
1652
1662
  width: 200,
1653
1663
  children: A
@@ -1659,15 +1669,15 @@ function At({
1659
1669
  children: g(V)
1660
1670
  }), /* @__PURE__ */ r("td", {
1661
1671
  width: 200,
1662
- children: /* @__PURE__ */ w(I, {
1672
+ children: /* @__PURE__ */ S(I, {
1663
1673
  position: "left",
1664
- children: [/* @__PURE__ */ r(gt, {
1665
- account: v,
1666
- onSuccess: l
1667
- }), /* @__PURE__ */ r(ft, {
1674
+ children: [/* @__PURE__ */ r(mt, {
1675
+ account: m,
1676
+ onSuccess: u
1677
+ }), /* @__PURE__ */ r(pt, {
1668
1678
  id: f,
1669
1679
  name: A,
1670
- onSuccess: l
1680
+ onSuccess: u
1671
1681
  })]
1672
1682
  })
1673
1683
  })]
@@ -1685,7 +1695,7 @@ function ht({
1685
1695
  const {
1686
1696
  control: o,
1687
1697
  handleSubmit: s
1688
- } = ee({
1698
+ } = re({
1689
1699
  defaultValues: {
1690
1700
  name: "",
1691
1701
  password: ""
@@ -1693,27 +1703,27 @@ function ht({
1693
1703
  });
1694
1704
  return /* @__PURE__ */ r(L, {
1695
1705
  mx: "auto",
1696
- children: /* @__PURE__ */ w("form", {
1706
+ children: /* @__PURE__ */ S("form", {
1697
1707
  onSubmit: s(async ({
1698
1708
  name: i,
1699
- password: u
1709
+ password: l
1700
1710
  }) => {
1701
1711
  try {
1702
- $({
1712
+ U({
1703
1713
  id: "for-login",
1704
1714
  title: "Pending",
1705
1715
  message: "Loggin in...",
1706
1716
  loading: !0
1707
1717
  });
1708
- const d = await k.account.login(i, u);
1709
- window.localStorage.setItem("token", d.token), O({
1718
+ const d = await x.account.login(i, l);
1719
+ window.localStorage.setItem("token", d.token), z({
1710
1720
  id: "for-login",
1711
1721
  title: "Successful",
1712
1722
  message: "Logged in",
1713
1723
  color: "green"
1714
1724
  }), t(d);
1715
1725
  } catch (d) {
1716
- O({
1726
+ z({
1717
1727
  id: "for-login",
1718
1728
  title: "Login Failed",
1719
1729
  message: d.message,
@@ -1738,7 +1748,7 @@ function ht({
1738
1748
  control: o,
1739
1749
  render: ({
1740
1750
  field: i
1741
- }) => /* @__PURE__ */ r(ce, {
1751
+ }) => /* @__PURE__ */ r(le, {
1742
1752
  mb: n.spacing,
1743
1753
  size: n.size,
1744
1754
  required: !0,
@@ -1748,7 +1758,7 @@ function ht({
1748
1758
  }), /* @__PURE__ */ r(I, {
1749
1759
  position: "right",
1750
1760
  mt: n.spacing,
1751
- children: /* @__PURE__ */ r(x, {
1761
+ children: /* @__PURE__ */ r(k, {
1752
1762
  type: "submit",
1753
1763
  size: n.button.size,
1754
1764
  children: "Submit"
@@ -1762,7 +1772,7 @@ function kt({
1762
1772
  config: n,
1763
1773
  onSuccess: o
1764
1774
  }) {
1765
- return ue(n), /* @__PURE__ */ r(U, {
1775
+ return de(n), /* @__PURE__ */ r($, {
1766
1776
  children: /* @__PURE__ */ r(L, {
1767
1777
  mt: t.spacing,
1768
1778
  sx: {
@@ -1775,22 +1785,22 @@ function kt({
1775
1785
  })
1776
1786
  });
1777
1787
  }
1778
- const pe = {
1788
+ const ge = {
1779
1789
  size: "sm",
1780
1790
  spacing: "md",
1781
1791
  button: {
1782
1792
  size: "xs"
1783
1793
  }
1784
1794
  };
1785
- function mt({
1795
+ function vt({
1786
1796
  postSubmit: t,
1787
- styles: n = pe,
1797
+ styles: n = ge,
1788
1798
  initialRoleID: o
1789
1799
  }) {
1790
1800
  const {
1791
1801
  control: s,
1792
- handleSubmit: l
1793
- } = ee({
1802
+ handleSubmit: u
1803
+ } = re({
1794
1804
  defaultValues: {
1795
1805
  name: "",
1796
1806
  role_id: o
@@ -1798,13 +1808,13 @@ function mt({
1798
1808
  });
1799
1809
  return /* @__PURE__ */ r(L, {
1800
1810
  mx: "auto",
1801
- children: /* @__PURE__ */ w("form", {
1802
- onSubmit: l(async ({
1803
- name: u,
1811
+ children: /* @__PURE__ */ S("form", {
1812
+ onSubmit: u(async ({
1813
+ name: l,
1804
1814
  role_id: d
1805
1815
  }) => {
1806
1816
  try {
1807
- $({
1817
+ U({
1808
1818
  id: "for-creating",
1809
1819
  title: "Pending",
1810
1820
  message: "Adding API Key...",
@@ -1812,16 +1822,16 @@ function mt({
1812
1822
  });
1813
1823
  const {
1814
1824
  app_id: g,
1815
- app_secret: y
1816
- } = await k.api_key.create(u, d);
1817
- O({
1825
+ app_secret: _
1826
+ } = await x.api_key.create(l, d);
1827
+ z({
1818
1828
  id: "for-creating",
1819
1829
  title: "Successful",
1820
1830
  message: "API Key is added",
1821
1831
  color: "green"
1822
- }), t(g, y);
1832
+ }), t(g, _);
1823
1833
  } catch (g) {
1824
- O({
1834
+ z({
1825
1835
  id: "for-creating",
1826
1836
  title: "Failed",
1827
1837
  message: g.message,
@@ -1833,27 +1843,27 @@ function mt({
1833
1843
  name: "name",
1834
1844
  control: s,
1835
1845
  render: ({
1836
- field: u
1846
+ field: l
1837
1847
  }) => /* @__PURE__ */ r(j, {
1838
1848
  mb: n.spacing,
1839
1849
  size: n.size,
1840
1850
  required: !0,
1841
1851
  label: "Name",
1842
- ...u
1852
+ ...l
1843
1853
  })
1844
1854
  }), /* @__PURE__ */ r(E, {
1845
1855
  name: "role_id",
1846
1856
  control: s,
1847
1857
  render: ({
1848
- field: u
1849
- }) => /* @__PURE__ */ r(Te, {
1858
+ field: l
1859
+ }) => /* @__PURE__ */ r(ze, {
1850
1860
  styles: n,
1851
- ...u
1861
+ ...l
1852
1862
  })
1853
1863
  }), /* @__PURE__ */ r(I, {
1854
1864
  position: "right",
1855
1865
  mt: n.spacing,
1856
- children: /* @__PURE__ */ r(x, {
1866
+ children: /* @__PURE__ */ r(k, {
1857
1867
  type: "submit",
1858
1868
  size: n.button.size,
1859
1869
  children: "Save"
@@ -1862,32 +1872,32 @@ function mt({
1862
1872
  })
1863
1873
  });
1864
1874
  }
1865
- function vt({
1875
+ function bt({
1866
1876
  onSuccess: t,
1867
- styles: n = pe,
1877
+ styles: n = ge,
1868
1878
  initialRoleID: o
1869
1879
  }) {
1870
- const s = le(), [l, i] = J.useState(!1), u = () => i(!0), d = () => i(!1);
1871
- return /* @__PURE__ */ w(U, {
1872
- children: [/* @__PURE__ */ r(se, {
1880
+ const s = ue(), [u, i] = J.useState(!1), l = () => i(!0), d = () => i(!1);
1881
+ return /* @__PURE__ */ S($, {
1882
+ children: [/* @__PURE__ */ r(ce, {
1873
1883
  overflow: "inside",
1874
- opened: l,
1884
+ opened: u,
1875
1885
  onClose: () => i(!1),
1876
1886
  title: "Add an API Key",
1877
1887
  trapFocus: !0,
1878
- onDragStart: (y) => {
1879
- y.stopPropagation();
1888
+ onDragStart: (_) => {
1889
+ _.stopPropagation();
1880
1890
  },
1881
- children: /* @__PURE__ */ r(mt, {
1882
- postSubmit: (y, _) => {
1891
+ children: /* @__PURE__ */ r(vt, {
1892
+ postSubmit: (_, w) => {
1883
1893
  d(), s.openModal({
1884
1894
  title: "API Key is generated",
1885
- children: /* @__PURE__ */ w(rr, {
1886
- children: [/* @__PURE__ */ r(oe, {
1895
+ children: /* @__PURE__ */ S(nr, {
1896
+ children: [/* @__PURE__ */ r(se, {
1887
1897
  color: "dimmed",
1888
1898
  children: "Make sure you save it - you won't be able to access it again."
1889
1899
  }), /* @__PURE__ */ r(j, {
1890
- defaultValue: y,
1900
+ defaultValue: _,
1891
1901
  disabled: !0,
1892
1902
  label: "APP ID",
1893
1903
  styles: {
@@ -1896,7 +1906,7 @@ function vt({
1896
1906
  }
1897
1907
  }
1898
1908
  }), /* @__PURE__ */ r(j, {
1899
- defaultValue: _,
1909
+ defaultValue: w,
1900
1910
  disabled: !0,
1901
1911
  label: "APP Secret",
1902
1912
  styles: {
@@ -1904,10 +1914,10 @@ function vt({
1904
1914
  cursor: "text !important"
1905
1915
  }
1906
1916
  }
1907
- }), /* @__PURE__ */ r(x, {
1917
+ }), /* @__PURE__ */ r(k, {
1908
1918
  size: "sm",
1909
1919
  onClick: () => {
1910
- Br();
1920
+ Jr();
1911
1921
  },
1912
1922
  children: "I've saved this API Key"
1913
1923
  })]
@@ -1920,39 +1930,39 @@ function vt({
1920
1930
  styles: n,
1921
1931
  initialRoleID: o
1922
1932
  })
1923
- }), /* @__PURE__ */ r(x, {
1933
+ }), /* @__PURE__ */ r(k, {
1924
1934
  size: n.button.size,
1925
- onClick: u,
1926
- leftIcon: /* @__PURE__ */ r(Ee, {
1935
+ onClick: l,
1936
+ leftIcon: /* @__PURE__ */ r(Te, {
1927
1937
  size: 20
1928
1938
  }),
1929
1939
  children: "Add an API Key"
1930
1940
  })]
1931
1941
  });
1932
1942
  }
1933
- function bt({
1943
+ function wt({
1934
1944
  id: t,
1935
1945
  name: n,
1936
1946
  onSuccess: o,
1937
- styles: s = pe
1947
+ styles: s = ge
1938
1948
  }) {
1939
- const l = le(), i = async () => {
1949
+ const u = ue(), i = async () => {
1940
1950
  if (!!t) {
1941
- $({
1951
+ U({
1942
1952
  id: "for-deleting",
1943
1953
  title: "Pending",
1944
1954
  message: "Deleting API Key...",
1945
1955
  loading: !0
1946
1956
  });
1947
1957
  try {
1948
- await k.api_key.delete(t), O({
1958
+ await x.api_key.delete(t), z({
1949
1959
  id: "for-deleting",
1950
1960
  title: "Successful",
1951
1961
  message: `API Key [${n}] is deleted`,
1952
1962
  color: "green"
1953
1963
  }), o();
1954
1964
  } catch (d) {
1955
- O({
1965
+ z({
1956
1966
  id: "for-deleting",
1957
1967
  title: "Failed",
1958
1968
  message: d.message,
@@ -1960,7 +1970,7 @@ function bt({
1960
1970
  });
1961
1971
  }
1962
1972
  }
1963
- }, u = () => l.openConfirmModal({
1973
+ }, l = () => u.openConfirmModal({
1964
1974
  title: "Delete this api-key?",
1965
1975
  labels: {
1966
1976
  confirm: "Confirm",
@@ -1969,69 +1979,69 @@ function bt({
1969
1979
  onCancel: () => console.log("Cancel"),
1970
1980
  onConfirm: i
1971
1981
  });
1972
- return /* @__PURE__ */ r(x, {
1982
+ return /* @__PURE__ */ r(k, {
1973
1983
  size: s.button.size,
1974
1984
  color: "red",
1975
- onClick: u,
1976
- leftIcon: /* @__PURE__ */ r(Ce, {
1985
+ onClick: l,
1986
+ leftIcon: /* @__PURE__ */ r(Oe, {
1977
1987
  size: 20
1978
1988
  }),
1979
1989
  children: "Delete"
1980
1990
  });
1981
1991
  }
1982
- function xt({
1983
- styles: t = pe,
1992
+ function Dt({
1993
+ styles: t = ge,
1984
1994
  config: n
1985
1995
  }) {
1986
- var y, _;
1987
- ue(n);
1996
+ var _, w;
1997
+ de(n);
1988
1998
  const {
1989
1999
  data: o = [],
1990
2000
  loading: s,
1991
- refresh: l
2001
+ refresh: u
1992
2002
  } = G(async () => {
1993
2003
  const {
1994
- data: v
1995
- } = await k.api_key.list();
1996
- return v;
2004
+ data: m
2005
+ } = await x.api_key.list();
2006
+ return m;
1997
2007
  }, {
1998
2008
  refreshDeps: []
1999
2009
  }), {
2000
2010
  data: i = [],
2001
- loading: u
2002
- } = G(async () => (await k.role.list()).map((f) => ({
2011
+ loading: l
2012
+ } = G(async () => (await x.role.list()).map((f) => ({
2003
2013
  label: f.name,
2004
2014
  value: f.id,
2005
2015
  description: f.description,
2006
2016
  disabled: f.id === 50
2007
2017
  })), {
2008
2018
  refreshDeps: []
2009
- }), d = nr(() => i.reduce((v, f) => (v.set(f.value, f.label), v), /* @__PURE__ */ new Map()), [i]), g = (v) => {
2019
+ }), d = ir(() => i.reduce((m, f) => (m.set(f.value, f.label), m), /* @__PURE__ */ new Map()), [i]), g = (m) => {
2010
2020
  var f;
2011
- return (f = d.get(v)) != null ? f : v;
2021
+ return (f = d.get(m)) != null ? f : m;
2012
2022
  };
2013
- return /* @__PURE__ */ w(U, {
2023
+ return /* @__PURE__ */ S($, {
2014
2024
  children: [/* @__PURE__ */ r(I, {
2015
2025
  pt: t.spacing,
2016
2026
  position: "right",
2017
- children: /* @__PURE__ */ r(vt, {
2018
- onSuccess: l,
2019
- initialRoleID: (_ = (y = i == null ? void 0 : i[0]) == null ? void 0 : y.value) != null ? _ : 0
2027
+ children: /* @__PURE__ */ r(bt, {
2028
+ onSuccess: u,
2029
+ initialRoleID: (w = (_ = i == null ? void 0 : i[0]) == null ? void 0 : _.value) != null ? w : 0
2020
2030
  })
2021
- }), /* @__PURE__ */ w(L, {
2031
+ }), /* @__PURE__ */ S(L, {
2022
2032
  mt: t.spacing,
2023
2033
  sx: {
2024
2034
  position: "relative"
2025
2035
  },
2026
- children: [/* @__PURE__ */ r(Re, {
2027
- visible: s || u
2028
- }), /* @__PURE__ */ w(Pe, {
2036
+ children: [/* @__PURE__ */ r(Ee, {
2037
+ visible: s || l
2038
+ }), /* @__PURE__ */ S(Ce, {
2029
2039
  horizontalSpacing: t.spacing,
2030
2040
  verticalSpacing: t.spacing,
2031
2041
  fontSize: t.size,
2032
2042
  highlightOnHover: !0,
2033
2043
  children: [/* @__PURE__ */ r("thead", {
2034
- children: /* @__PURE__ */ w("tr", {
2044
+ children: /* @__PURE__ */ S("tr", {
2035
2045
  children: [/* @__PURE__ */ r("th", {
2036
2046
  children: "Name"
2037
2047
  }), /* @__PURE__ */ r("th", {
@@ -2043,14 +2053,14 @@ function xt({
2043
2053
  })]
2044
2054
  })
2045
2055
  }), /* @__PURE__ */ r("tbody", {
2046
- children: o.map((v) => {
2056
+ children: o.map((m) => {
2047
2057
  const {
2048
2058
  id: f,
2049
2059
  name: A,
2050
2060
  app_id: M,
2051
2061
  role_id: V
2052
- } = v;
2053
- return /* @__PURE__ */ w("tr", {
2062
+ } = m;
2063
+ return /* @__PURE__ */ S("tr", {
2054
2064
  children: [/* @__PURE__ */ r("td", {
2055
2065
  width: 200,
2056
2066
  children: A
@@ -2064,10 +2074,10 @@ function xt({
2064
2074
  width: 200,
2065
2075
  children: /* @__PURE__ */ r(I, {
2066
2076
  position: "left",
2067
- children: /* @__PURE__ */ r(bt, {
2077
+ children: /* @__PURE__ */ r(wt, {
2068
2078
  id: f,
2069
2079
  name: A,
2070
- onSuccess: l
2080
+ onSuccess: u
2071
2081
  })
2072
2082
  })
2073
2083
  })]
@@ -2079,14 +2089,14 @@ function xt({
2079
2089
  });
2080
2090
  }
2081
2091
  export {
2082
- xt as APIKeyList,
2083
- At as AccountList,
2084
- vt as AddAPIKey,
2085
- dt as AddAccount,
2086
- nt as AddDataSource,
2087
- Ot as DataSourceList,
2088
- bt as DeleteAPIKey,
2089
- ft as DeleteAccount,
2090
- ct as DeleteDataSource,
2092
+ Dt as APIKeyList,
2093
+ xt as AccountList,
2094
+ bt as AddAPIKey,
2095
+ ft as AddAccount,
2096
+ it as AddDataSource,
2097
+ At as DataSourceList,
2098
+ wt as DeleteAPIKey,
2099
+ pt as DeleteAccount,
2100
+ lt as DeleteDataSource,
2091
2101
  kt as Login
2092
2102
  };