@devtable/settings-form 8.13.1 → 8.13.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,89 +1,95 @@
1
- import { Box as me, TextInput as fe, Divider as Pr, Group as se, NumberInput as Vt, PasswordInput as tr, Button as oe, Modal as Be, Stack as Rr, SegmentedControl as Bt, useMantineTheme as Kt, Tooltip as Ht, Text as Ze, LoadingOverlay as _r, Table as xr, Select as Gt, Switch as Jt } from "@mantine/core";
2
- import { showNotification as _e, updateNotification as le } from "@mantine/notifications";
3
- import * as Fe from "react";
4
- import ze, { useEffect as we, memo as dt, useRef as ue, useState as Ie, useCallback as Tr, forwardRef as Cr, useMemo as pt } from "react";
5
- import { Recycle as Xt, PlaylistAdd as jr, Trash as Ar, Edit as Qt } from "tabler-icons-react";
6
- import Zt from "axios";
7
- import en from "crypto-js";
8
- import rn from "lodash";
9
- import { useForm as De, Controller as J } from "react-hook-form";
10
- import { useBoolean as tn, useRequest as ke } from "ahooks";
11
- import * as nn from "monaco-editor";
12
- import { useModals as nr, closeAllModals as on } from "@mantine/modals";
13
- function an(e) {
14
- e = e || {};
15
- const r = Object.keys(e).sort(), t = [];
16
- for (let o = 0; o < r.length; o++) {
17
- const s = r[o];
18
- if (s != "authentication" && e[s])
19
- t.push(r[o] + "=" + (typeof e[s] == "object" ? JSON.stringify(e[s]) : e[s]));
1
+ import { Box as F, TextInput as D, Divider as Te, Group as O, NumberInput as $r, PasswordInput as de, Button as T, Modal as ne, Stack as ze, SegmentedControl as Yr, useMantineTheme as Kr, Tooltip as Br, Text as ue, LoadingOverlay as Oe, Table as Ae, Select as Gr, Switch as Hr } from "@mantine/core";
2
+ import { showNotification as W, updateNotification as x } from "@mantine/notifications";
3
+ import * as ee from "react";
4
+ import H, { useEffect as cr, forwardRef as ke, useState as lr, useMemo as ur } from "react";
5
+ import { Recycle as Jr, PlaylistAdd as xe, Trash as De, Edit as Xr } from "tabler-icons-react";
6
+ import Qr from "axios";
7
+ import Zr from "crypto-js";
8
+ import et from "lodash";
9
+ import { useForm as J, Controller as R } from "react-hook-form";
10
+ import { useBoolean as rt, useRequest as G } from "ahooks";
11
+ import tt, { loader as Ee } from "@monaco-editor/react";
12
+ import * as nt from "monaco-editor";
13
+ import it from "monaco-editor/esm/vs/editor/editor.worker?worker";
14
+ import at from "monaco-editor/esm/vs/language/css/css.worker?worker";
15
+ import ot from "monaco-editor/esm/vs/language/html/html.worker?worker";
16
+ import st from "monaco-editor/esm/vs/language/json/json.worker?worker";
17
+ import ct from "monaco-editor/esm/vs/language/typescript/ts.worker?worker";
18
+ import { useModals as fe, closeAllModals as lt } from "@mantine/modals";
19
+ function ut(t) {
20
+ t = t || {};
21
+ const n = Object.keys(t).sort(), a = [];
22
+ for (let o = 0; o < n.length; o++) {
23
+ const l = n[o];
24
+ if (l != "authentication" && t[l])
25
+ a.push(n[o] + "=" + (typeof t[l] == "object" ? JSON.stringify(t[l]) : t[l]));
20
26
  else {
21
- const i = Object.keys(e[s]).sort();
22
- for (let c = 0; c < i.length; c++) {
23
- const u = i[c];
24
- u != "sign" && e[s][u] && t.push(
25
- i[c] + "=" + (typeof e[s][u] == "object" ? JSON.stringify(e[s][u]) : e[s][u])
27
+ const s = Object.keys(t[l]).sort();
28
+ for (let c = 0; c < s.length; c++) {
29
+ const d = s[c];
30
+ d != "sign" && t[l][d] && a.push(
31
+ s[c] + "=" + (typeof t[l][d] == "object" ? JSON.stringify(t[l][d]) : t[l][d])
26
32
  );
27
33
  }
28
34
  }
29
35
  }
30
- return t.sort().join("&");
36
+ return a.sort().join("&");
31
37
  }
32
- function sn(e, r) {
33
- let t = an(e);
34
- return t += "&key=" + r, en.MD5(t).toString().toUpperCase();
38
+ function dt(t, n) {
39
+ let a = ut(t);
40
+ return a += "&key=" + n, Zr.MD5(a).toString().toUpperCase();
35
41
  }
36
- const ne = {
42
+ const C = {
37
43
  baseURL: "http://localhost:31200",
38
44
  app_id: "",
39
45
  app_secret: "",
40
- getAuthentication(e) {
46
+ getAuthentication(t) {
41
47
  if (!this.app_id || !this.app_secret)
42
48
  return;
43
- const r = new Date().getTime().toString();
49
+ const n = new Date().getTime().toString();
44
50
  return {
45
51
  app_id: this.app_id,
46
- nonce_str: r,
47
- sign: sn(
52
+ nonce_str: n,
53
+ sign: dt(
48
54
  {
49
55
  app_id: this.app_id,
50
- nonce_str: r,
51
- ...e
56
+ nonce_str: n,
57
+ ...t
52
58
  },
53
59
  this.app_secret
54
60
  )
55
61
  };
56
62
  },
57
- getRequest(e) {
58
- return (r, t, o = {}) => {
59
- const s = window.localStorage.getItem("token"), i = {
63
+ getRequest(t) {
64
+ return (n, a, o = {}) => {
65
+ const l = window.localStorage.getItem("token"), s = {
60
66
  "X-Requested-With": "XMLHttpRequest",
61
67
  "Content-Type": o.string ? "application/x-www-form-urlencoded" : "application/json",
62
- authorization: s ? `bearer ${s}` : "",
68
+ authorization: l ? `bearer ${l}` : "",
63
69
  ...o.headers
64
70
  }, c = {
65
71
  baseURL: this.baseURL,
66
- method: e,
67
- url: r,
68
- params: e === "GET" ? t : o.params,
69
- headers: i
72
+ method: t,
73
+ url: n,
74
+ params: t === "GET" ? a : o.params,
75
+ headers: s
70
76
  };
71
- return ["POST", "PUT"].includes(e) && (c.data = o.string ? JSON.stringify(t) : t, c.data.authentication = this.getAuthentication(c.data)), Zt(c).then((u) => u.data).catch((u) => rn.has(u, "response.data.detail.message") ? Promise.reject(new Error(u.response.data.detail.message)) : Promise.reject(u));
77
+ return ["POST", "PUT"].includes(t) && (c.data = o.string ? JSON.stringify(a) : a, c.data.authentication = this.getAuthentication(c.data)), Qr(c).then((d) => d.data).catch((d) => et.has(d, "response.data.detail.message") ? Promise.reject(new Error(d.response.data.detail.message)) : Promise.reject(d));
72
78
  };
73
79
  }
74
80
  };
75
- function or(e) {
76
- ne.baseURL !== e.apiBaseURL && (ne.baseURL = e.apiBaseURL), e.app_id && (ne.app_id = e.app_id), e.app_secret && (ne.app_secret = e.app_secret);
77
- }
78
- const cn = {
79
- login: async (e, r) => {
80
- const t = {
81
- name: e,
82
- password: r
81
+ function pe(t) {
82
+ 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);
83
+ }
84
+ const ft = {
85
+ login: async (t, n) => {
86
+ const a = {
87
+ name: t,
88
+ password: n
83
89
  };
84
- return await ne.getRequest("POST")("/account/login", t);
90
+ return await C.getRequest("POST")("/account/login", a);
85
91
  },
86
- list: async () => await ne.getRequest("POST")("/account/list", {
92
+ list: async () => await C.getRequest("POST")("/account/list", {
87
93
  filter: {},
88
94
  sort: [
89
95
  {
@@ -96,34 +102,34 @@ const cn = {
96
102
  pagesize: 100
97
103
  }
98
104
  }),
99
- get: async () => await ne.getRequest("GET")("/account/get", {}),
100
- update: async (e, r) => {
101
- const t = {
102
- name: e,
103
- email: r
105
+ get: async () => await C.getRequest("GET")("/account/get", {}),
106
+ update: async (t, n) => {
107
+ const a = {
108
+ name: t,
109
+ email: n
104
110
  };
105
- return await ne.getRequest("PUT")("/account/update", t);
111
+ return await C.getRequest("PUT")("/account/update", a);
106
112
  },
107
- changepassword: async (e, r) => {
108
- const t = {
109
- old_password: e,
110
- new_password: r
113
+ changepassword: async (t, n) => {
114
+ const a = {
115
+ old_password: t,
116
+ new_password: n
111
117
  };
112
- return await ne.getRequest("POST")("/account/changepassword", t);
118
+ return await C.getRequest("POST")("/account/changepassword", a);
113
119
  },
114
- create: async (e, r, t, o) => await ne.getRequest("POST")("/account/create", {
115
- name: e,
116
- email: r,
117
- password: t,
120
+ create: async (t, n, a, o) => await C.getRequest("POST")("/account/create", {
121
+ name: t,
122
+ email: n,
123
+ password: a,
118
124
  role_id: o
119
125
  }),
120
- edit: async (e) => (e.reset_password || (e.new_password = void 0), await ne.getRequest("PUT")("/account/edit", e)),
121
- delete: async (e) => {
122
- if (!!e)
123
- return ne.getRequest("POST")("/account/delete", { id: e });
126
+ edit: async (t) => (t.reset_password || (t.new_password = void 0), await C.getRequest("PUT")("/account/edit", t)),
127
+ delete: async (t) => {
128
+ if (!!t)
129
+ return C.getRequest("POST")("/account/delete", { id: t });
124
130
  }
125
- }, un = {
126
- list: async () => await ne.getRequest("POST")("/api/key/list", {
131
+ }, pt = {
132
+ list: async () => await C.getRequest("POST")("/api/key/list", {
127
133
  filter: {
128
134
  search: ""
129
135
  },
@@ -138,16 +144,16 @@ const cn = {
138
144
  pagesize: 100
139
145
  }
140
146
  }),
141
- create: async (e, r) => ne.getRequest("POST")("/api/key/create", {
142
- name: e,
143
- role_id: r
147
+ create: async (t, n) => C.getRequest("POST")("/api/key/create", {
148
+ name: t,
149
+ role_id: n
144
150
  }),
145
- delete: async (e) => {
146
- if (!!e)
147
- return ne.getRequest("POST")("/api/key/delete", { id: e });
151
+ delete: async (t) => {
152
+ if (!!t)
153
+ return C.getRequest("POST")("/api/key/delete", { id: t });
148
154
  }
149
- }, ln = {
150
- list: async () => await ne.getRequest("POST")("/datasource/list", {
155
+ }, gt = {
156
+ list: async () => await C.getRequest("POST")("/datasource/list", {
151
157
  filter: {},
152
158
  sort: [
153
159
  {
@@ -160,29 +166,29 @@ const cn = {
160
166
  pagesize: 100
161
167
  }
162
168
  }),
163
- create: async (e, r, t) => await ne.getRequest("POST")("/datasource/create", {
164
- type: e,
165
- key: r,
166
- config: t
169
+ create: async (t, n, a) => await C.getRequest("POST")("/datasource/create", {
170
+ type: t,
171
+ key: n,
172
+ config: a
167
173
  }),
168
- delete: async (e) => {
169
- await ne.getRequest("POST")("/datasource/delete", { id: e });
174
+ delete: async (t) => {
175
+ await C.getRequest("POST")("/datasource/delete", { id: t });
170
176
  }
171
- }, fn = {
172
- list: async () => await ne.getRequest("GET")("/role/list", {})
173
- }, de = {
174
- datasource: ln,
175
- account: cn,
176
- role: fn,
177
- api_key: un
178
- }, qe = {
177
+ }, mt = {
178
+ list: async () => await C.getRequest("GET")("/role/list", {})
179
+ }, j = {
180
+ datasource: gt,
181
+ account: ft,
182
+ role: mt,
183
+ api_key: pt
184
+ }, X = {
179
185
  size: "sm",
180
186
  spacing: "md",
181
187
  button: {
182
188
  size: "xs"
183
189
  }
184
190
  };
185
- var ir = { exports: {} }, Le = {};
191
+ var ge = { exports: {} }, re = {};
186
192
  /**
187
193
  * @license React
188
194
  * react-jsx-runtime.production.min.js
@@ -192,25 +198,25 @@ var ir = { exports: {} }, Le = {};
192
198
  * This source code is licensed under the MIT license found in the
193
199
  * LICENSE file in the root directory of this source tree.
194
200
  */
195
- var Hr;
196
- function dn() {
197
- if (Hr)
198
- return Le;
199
- Hr = 1;
200
- var e = ze, r = Symbol.for("react.element"), t = Symbol.for("react.fragment"), o = Object.prototype.hasOwnProperty, s = e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, i = { key: !0, ref: !0, __self: !0, __source: !0 };
201
- function c(u, d, v) {
202
- var y, h = {}, m = null, x = null;
203
- v !== void 0 && (m = "" + v), d.key !== void 0 && (m = "" + d.key), d.ref !== void 0 && (x = d.ref);
204
- for (y in d)
205
- o.call(d, y) && !i.hasOwnProperty(y) && (h[y] = d[y]);
206
- if (u && u.defaultProps)
207
- for (y in d = u.defaultProps, d)
208
- h[y] === void 0 && (h[y] = d[y]);
209
- return { $$typeof: r, type: u, key: m, ref: x, props: h, _owner: s.current };
201
+ var ar;
202
+ function ht() {
203
+ if (ar)
204
+ return re;
205
+ ar = 1;
206
+ var t = H, n = Symbol.for("react.element"), a = Symbol.for("react.fragment"), o = Object.prototype.hasOwnProperty, l = t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, s = { key: !0, ref: !0, __self: !0, __source: !0 };
207
+ function c(d, p, b) {
208
+ var S, m = {}, f = null, z = null;
209
+ b !== void 0 && (f = "" + b), p.key !== void 0 && (f = "" + p.key), p.ref !== void 0 && (z = p.ref);
210
+ for (S in p)
211
+ o.call(p, S) && !s.hasOwnProperty(S) && (m[S] = p[S]);
212
+ if (d && d.defaultProps)
213
+ for (S in p = d.defaultProps, p)
214
+ m[S] === void 0 && (m[S] = p[S]);
215
+ return { $$typeof: n, type: d, key: f, ref: z, props: m, _owner: l.current };
210
216
  }
211
- return Le.Fragment = t, Le.jsx = c, Le.jsxs = c, Le;
217
+ return re.Fragment = a, re.jsx = c, re.jsxs = c, re;
212
218
  }
213
- var We = {};
219
+ var te = {};
214
220
  /**
215
221
  * @license React
216
222
  * react-jsx-runtime.development.js
@@ -220,87 +226,87 @@ var We = {};
220
226
  * This source code is licensed under the MIT license found in the
221
227
  * LICENSE file in the root directory of this source tree.
222
228
  */
223
- var Gr;
224
- function pn() {
225
- return Gr || (Gr = 1, process.env.NODE_ENV !== "production" && function() {
226
- var e = ze, r = Symbol.for("react.element"), t = Symbol.for("react.portal"), o = Symbol.for("react.fragment"), s = Symbol.for("react.strict_mode"), i = Symbol.for("react.profiler"), c = Symbol.for("react.provider"), u = Symbol.for("react.context"), d = Symbol.for("react.forward_ref"), v = Symbol.for("react.suspense"), y = Symbol.for("react.suspense_list"), h = Symbol.for("react.memo"), m = Symbol.for("react.lazy"), x = Symbol.for("react.offscreen"), Y = Symbol.iterator, z = "@@iterator";
227
- function G(n) {
228
- if (n === null || typeof n != "object")
229
+ var or;
230
+ function vt() {
231
+ return or || (or = 1, process.env.NODE_ENV !== "production" && function() {
232
+ var t = H, n = Symbol.for("react.element"), a = Symbol.for("react.portal"), o = Symbol.for("react.fragment"), l = Symbol.for("react.strict_mode"), s = Symbol.for("react.profiler"), c = Symbol.for("react.provider"), d = Symbol.for("react.context"), p = Symbol.for("react.forward_ref"), b = Symbol.for("react.suspense"), S = Symbol.for("react.suspense_list"), m = Symbol.for("react.memo"), f = Symbol.for("react.lazy"), z = Symbol.for("react.offscreen"), q = Symbol.iterator, $ = "@@iterator";
233
+ function he(e) {
234
+ if (e === null || typeof e != "object")
229
235
  return null;
230
- var f = Y && n[Y] || n[z];
231
- return typeof f == "function" ? f : null;
236
+ var i = q && e[q] || e[$];
237
+ return typeof i == "function" ? i : null;
232
238
  }
233
- var K = e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
234
- function D(n) {
239
+ var U = t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
240
+ function A(e) {
235
241
  {
236
- for (var f = arguments.length, b = new Array(f > 1 ? f - 1 : 0), E = 1; E < f; E++)
237
- b[E - 1] = arguments[E];
238
- H("error", n, b);
242
+ for (var i = arguments.length, u = new Array(i > 1 ? i - 1 : 0), g = 1; g < i; g++)
243
+ u[g - 1] = arguments[g];
244
+ dr("error", e, u);
239
245
  }
240
246
  }
241
- function H(n, f, b) {
247
+ function dr(e, i, u) {
242
248
  {
243
- var E = K.ReactDebugCurrentFrame, L = E.getStackAddendum();
244
- L !== "" && (f += "%s", b = b.concat([L]));
245
- var V = b.map(function(q) {
246
- return String(q);
249
+ var g = U.ReactDebugCurrentFrame, _ = g.getStackAddendum();
250
+ _ !== "" && (i += "%s", u = u.concat([_]));
251
+ var y = u.map(function(w) {
252
+ return String(w);
247
253
  });
248
- V.unshift("Warning: " + f), Function.prototype.apply.call(console[n], console, V);
254
+ y.unshift("Warning: " + i), Function.prototype.apply.call(console[e], console, y);
249
255
  }
250
256
  }
251
- var N = !1, p = !1, X = !1, ee = !1, Se = !1, Q;
252
- Q = Symbol.for("react.module.reference");
253
- function F(n) {
254
- return !!(typeof n == "string" || typeof n == "function" || n === o || n === i || Se || n === s || n === v || n === y || ee || n === x || N || p || X || typeof n == "object" && n !== null && (n.$$typeof === m || n.$$typeof === h || n.$$typeof === c || n.$$typeof === u || n.$$typeof === d || n.$$typeof === Q || n.getModuleId !== void 0));
257
+ var fr = !1, pr = !1, gr = !1, mr = !1, hr = !1, Ie;
258
+ Ie = Symbol.for("react.module.reference");
259
+ function vr(e) {
260
+ return !!(typeof e == "string" || typeof e == "function" || e === o || e === s || hr || e === l || e === b || e === S || mr || e === z || fr || pr || gr || typeof e == "object" && e !== null && (e.$$typeof === f || e.$$typeof === m || e.$$typeof === c || e.$$typeof === d || e.$$typeof === p || e.$$typeof === Ie || e.getModuleId !== void 0));
255
261
  }
256
- function ge(n, f, b) {
257
- var E = n.displayName;
258
- if (E)
259
- return E;
260
- var L = f.displayName || f.name || "";
261
- return L !== "" ? b + "(" + L + ")" : b;
262
+ function br(e, i, u) {
263
+ var g = e.displayName;
264
+ if (g)
265
+ return g;
266
+ var _ = i.displayName || i.name || "";
267
+ return _ !== "" ? u + "(" + _ + ")" : u;
262
268
  }
263
- function be(n) {
264
- return n.displayName || "Context";
269
+ function Fe(e) {
270
+ return e.displayName || "Context";
265
271
  }
266
- function ie(n) {
267
- if (n == null)
272
+ function L(e) {
273
+ if (e == null)
268
274
  return null;
269
- if (typeof n.tag == "number" && D("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof n == "function")
270
- return n.displayName || n.name || null;
271
- if (typeof n == "string")
272
- return n;
273
- switch (n) {
275
+ if (typeof e.tag == "number" && A("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof e == "function")
276
+ return e.displayName || e.name || null;
277
+ if (typeof e == "string")
278
+ return e;
279
+ switch (e) {
274
280
  case o:
275
281
  return "Fragment";
276
- case t:
282
+ case a:
277
283
  return "Portal";
278
- case i:
279
- return "Profiler";
280
284
  case s:
285
+ return "Profiler";
286
+ case l:
281
287
  return "StrictMode";
282
- case v:
288
+ case b:
283
289
  return "Suspense";
284
- case y:
290
+ case S:
285
291
  return "SuspenseList";
286
292
  }
287
- if (typeof n == "object")
288
- switch (n.$$typeof) {
289
- case u:
290
- var f = n;
291
- return be(f) + ".Consumer";
292
- case c:
293
- var b = n;
294
- return be(b._context) + ".Provider";
293
+ if (typeof e == "object")
294
+ switch (e.$$typeof) {
295
295
  case d:
296
- return ge(n, n.render, "ForwardRef");
297
- case h:
298
- var E = n.displayName || null;
299
- return E !== null ? E : ie(n.type) || "Memo";
300
- case m: {
301
- var L = n, V = L._payload, q = L._init;
296
+ var i = e;
297
+ return Fe(i) + ".Consumer";
298
+ case c:
299
+ var u = e;
300
+ return Fe(u._context) + ".Provider";
301
+ case p:
302
+ return br(e, e.render, "ForwardRef");
303
+ case m:
304
+ var g = e.displayName || null;
305
+ return g !== null ? g : L(e.type) || "Memo";
306
+ case f: {
307
+ var _ = e, y = _._payload, w = _._init;
302
308
  try {
303
- return ie(q(V));
309
+ return L(w(y));
304
310
  } catch {
305
311
  return null;
306
312
  }
@@ -308,512 +314,512 @@ function pn() {
308
314
  }
309
315
  return null;
310
316
  }
311
- var k = Object.assign, B = 0, te, pe, Ee, Pe, l, g, T;
312
- function O() {
317
+ var Y = Object.assign, Q = 0, qe, Le, Me, Ne, Ue, We, Ve;
318
+ function $e() {
313
319
  }
314
- O.__reactDisabledLog = !0;
315
- function P() {
320
+ $e.__reactDisabledLog = !0;
321
+ function wr() {
316
322
  {
317
- if (B === 0) {
318
- te = console.log, pe = console.info, Ee = console.warn, Pe = console.error, l = console.group, g = console.groupCollapsed, T = console.groupEnd;
319
- var n = {
323
+ if (Q === 0) {
324
+ qe = console.log, Le = console.info, Me = console.warn, Ne = console.error, Ue = console.group, We = console.groupCollapsed, Ve = console.groupEnd;
325
+ var e = {
320
326
  configurable: !0,
321
327
  enumerable: !0,
322
- value: O,
328
+ value: $e,
323
329
  writable: !0
324
330
  };
325
331
  Object.defineProperties(console, {
326
- info: n,
327
- log: n,
328
- warn: n,
329
- error: n,
330
- group: n,
331
- groupCollapsed: n,
332
- groupEnd: n
332
+ info: e,
333
+ log: e,
334
+ warn: e,
335
+ error: e,
336
+ group: e,
337
+ groupCollapsed: e,
338
+ groupEnd: e
333
339
  });
334
340
  }
335
- B++;
341
+ Q++;
336
342
  }
337
343
  }
338
- function C() {
344
+ function Sr() {
339
345
  {
340
- if (B--, B === 0) {
341
- var n = {
346
+ if (Q--, Q === 0) {
347
+ var e = {
342
348
  configurable: !0,
343
349
  enumerable: !0,
344
350
  writable: !0
345
351
  };
346
352
  Object.defineProperties(console, {
347
- log: k({}, n, {
348
- value: te
353
+ log: Y({}, e, {
354
+ value: qe
349
355
  }),
350
- info: k({}, n, {
351
- value: pe
356
+ info: Y({}, e, {
357
+ value: Le
352
358
  }),
353
- warn: k({}, n, {
354
- value: Ee
359
+ warn: Y({}, e, {
360
+ value: Me
355
361
  }),
356
- error: k({}, n, {
357
- value: Pe
362
+ error: Y({}, e, {
363
+ value: Ne
358
364
  }),
359
- group: k({}, n, {
360
- value: l
365
+ group: Y({}, e, {
366
+ value: Ue
361
367
  }),
362
- groupCollapsed: k({}, n, {
363
- value: g
368
+ groupCollapsed: Y({}, e, {
369
+ value: We
364
370
  }),
365
- groupEnd: k({}, n, {
366
- value: T
371
+ groupEnd: Y({}, e, {
372
+ value: Ve
367
373
  })
368
374
  });
369
375
  }
370
- B < 0 && D("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
376
+ Q < 0 && A("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
371
377
  }
372
378
  }
373
- var R = K.ReactCurrentDispatcher, _;
374
- function j(n, f, b) {
379
+ var ve = U.ReactCurrentDispatcher, be;
380
+ function ie(e, i, u) {
375
381
  {
376
- if (_ === void 0)
382
+ if (be === void 0)
377
383
  try {
378
384
  throw Error();
379
- } catch (L) {
380
- var E = L.stack.trim().match(/\n( *(at )?)/);
381
- _ = E && E[1] || "";
385
+ } catch (_) {
386
+ var g = _.stack.trim().match(/\n( *(at )?)/);
387
+ be = g && g[1] || "";
382
388
  }
383
389
  return `
384
- ` + _ + n;
390
+ ` + be + e;
385
391
  }
386
392
  }
387
- var $ = !1, A;
393
+ var we = !1, ae;
388
394
  {
389
- var ae = typeof WeakMap == "function" ? WeakMap : Map;
390
- A = new ae();
395
+ var _r = typeof WeakMap == "function" ? WeakMap : Map;
396
+ ae = new _r();
391
397
  }
392
- function w(n, f) {
393
- if (!n || $)
398
+ function Ye(e, i) {
399
+ if (!e || we)
394
400
  return "";
395
401
  {
396
- var b = A.get(n);
397
- if (b !== void 0)
398
- return b;
402
+ var u = ae.get(e);
403
+ if (u !== void 0)
404
+ return u;
399
405
  }
400
- var E;
401
- $ = !0;
402
- var L = Error.prepareStackTrace;
406
+ var g;
407
+ we = !0;
408
+ var _ = Error.prepareStackTrace;
403
409
  Error.prepareStackTrace = void 0;
404
- var V;
405
- V = R.current, R.current = null, P();
410
+ var y;
411
+ y = ve.current, ve.current = null, wr();
406
412
  try {
407
- if (f) {
408
- var q = function() {
413
+ if (i) {
414
+ var w = function() {
409
415
  throw Error();
410
416
  };
411
- if (Object.defineProperty(q.prototype, "props", {
417
+ if (Object.defineProperty(w.prototype, "props", {
412
418
  set: function() {
413
419
  throw Error();
414
420
  }
415
421
  }), typeof Reflect == "object" && Reflect.construct) {
416
422
  try {
417
- Reflect.construct(q, []);
418
- } catch (Te) {
419
- E = Te;
423
+ Reflect.construct(w, []);
424
+ } catch (M) {
425
+ g = M;
420
426
  }
421
- Reflect.construct(n, [], q);
427
+ Reflect.construct(e, [], w);
422
428
  } else {
423
429
  try {
424
- q.call();
425
- } catch (Te) {
426
- E = Te;
430
+ w.call();
431
+ } catch (M) {
432
+ g = M;
427
433
  }
428
- n.call(q.prototype);
434
+ e.call(w.prototype);
429
435
  }
430
436
  } else {
431
437
  try {
432
438
  throw Error();
433
- } catch (Te) {
434
- E = Te;
439
+ } catch (M) {
440
+ g = M;
435
441
  }
436
- n();
442
+ e();
437
443
  }
438
- } catch (Te) {
439
- if (Te && E && typeof Te.stack == "string") {
440
- for (var M = Te.stack.split(`
441
- `), ce = E.stack.split(`
442
- `), Z = M.length - 1, re = ce.length - 1; Z >= 1 && re >= 0 && M[Z] !== ce[re]; )
443
- re--;
444
- for (; Z >= 1 && re >= 0; Z--, re--)
445
- if (M[Z] !== ce[re]) {
446
- if (Z !== 1 || re !== 1)
444
+ } catch (M) {
445
+ if (M && g && typeof M.stack == "string") {
446
+ for (var h = M.stack.split(`
447
+ `), k = g.stack.split(`
448
+ `), P = h.length - 1, E = k.length - 1; P >= 1 && E >= 0 && h[P] !== k[E]; )
449
+ E--;
450
+ for (; P >= 1 && E >= 0; P--, E--)
451
+ if (h[P] !== k[E]) {
452
+ if (P !== 1 || E !== 1)
447
453
  do
448
- if (Z--, re--, re < 0 || M[Z] !== ce[re]) {
449
- var ve = `
450
- ` + M[Z].replace(" at new ", " at ");
451
- return n.displayName && ve.includes("<anonymous>") && (ve = ve.replace("<anonymous>", n.displayName)), typeof n == "function" && A.set(n, ve), ve;
454
+ if (P--, E--, E < 0 || h[P] !== k[E]) {
455
+ var I = `
456
+ ` + h[P].replace(" at new ", " at ");
457
+ return e.displayName && I.includes("<anonymous>") && (I = I.replace("<anonymous>", e.displayName)), typeof e == "function" && ae.set(e, I), I;
452
458
  }
453
- while (Z >= 1 && re >= 0);
459
+ while (P >= 1 && E >= 0);
454
460
  break;
455
461
  }
456
462
  }
457
463
  } finally {
458
- $ = !1, R.current = V, C(), Error.prepareStackTrace = L;
464
+ we = !1, ve.current = y, Sr(), Error.prepareStackTrace = _;
459
465
  }
460
- var Me = n ? n.displayName || n.name : "", Kr = Me ? j(Me) : "";
461
- return typeof n == "function" && A.set(n, Kr), Kr;
466
+ var B = e ? e.displayName || e.name : "", ir = B ? ie(B) : "";
467
+ return typeof e == "function" && ae.set(e, ir), ir;
462
468
  }
463
- function he(n, f, b) {
464
- return w(n, !1);
469
+ function yr(e, i, u) {
470
+ return Ye(e, !1);
465
471
  }
466
- function je(n) {
467
- var f = n.prototype;
468
- return !!(f && f.isReactComponent);
472
+ function Rr(e) {
473
+ var i = e.prototype;
474
+ return !!(i && i.isReactComponent);
469
475
  }
470
- function Ce(n, f, b) {
471
- if (n == null)
476
+ function oe(e, i, u) {
477
+ if (e == null)
472
478
  return "";
473
- if (typeof n == "function")
474
- return w(n, je(n));
475
- if (typeof n == "string")
476
- return j(n);
477
- switch (n) {
478
- case v:
479
- return j("Suspense");
480
- case y:
481
- return j("SuspenseList");
479
+ if (typeof e == "function")
480
+ return Ye(e, Rr(e));
481
+ if (typeof e == "string")
482
+ return ie(e);
483
+ switch (e) {
484
+ case b:
485
+ return ie("Suspense");
486
+ case S:
487
+ return ie("SuspenseList");
482
488
  }
483
- if (typeof n == "object")
484
- switch (n.$$typeof) {
485
- case d:
486
- return he(n.render);
487
- case h:
488
- return Ce(n.type, f, b);
489
- case m: {
490
- var E = n, L = E._payload, V = E._init;
489
+ if (typeof e == "object")
490
+ switch (e.$$typeof) {
491
+ case p:
492
+ return yr(e.render);
493
+ case m:
494
+ return oe(e.type, i, u);
495
+ case f: {
496
+ var g = e, _ = g._payload, y = g._init;
491
497
  try {
492
- return Ce(V(L), f, b);
498
+ return oe(y(_), i, u);
493
499
  } catch {
494
500
  }
495
501
  }
496
502
  }
497
503
  return "";
498
504
  }
499
- var He = Object.prototype.hasOwnProperty, zr = {}, Dr = K.ReactDebugCurrentFrame;
500
- function Ge(n) {
501
- if (n) {
502
- var f = n._owner, b = Ce(n.type, n._source, f ? f.type : null);
503
- Dr.setExtraStackFrame(b);
505
+ var se = Object.prototype.hasOwnProperty, Ke = {}, Be = U.ReactDebugCurrentFrame;
506
+ function ce(e) {
507
+ if (e) {
508
+ var i = e._owner, u = oe(e.type, e._source, i ? i.type : null);
509
+ Be.setExtraStackFrame(u);
504
510
  } else
505
- Dr.setExtraStackFrame(null);
511
+ Be.setExtraStackFrame(null);
506
512
  }
507
- function Pt(n, f, b, E, L) {
513
+ function Pr(e, i, u, g, _) {
508
514
  {
509
- var V = Function.call.bind(He);
510
- for (var q in n)
511
- if (V(n, q)) {
512
- var M = void 0;
515
+ var y = Function.call.bind(se);
516
+ for (var w in e)
517
+ if (y(e, w)) {
518
+ var h = void 0;
513
519
  try {
514
- if (typeof n[q] != "function") {
515
- var ce = Error((E || "React class") + ": " + b + " type `" + q + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof n[q] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
516
- throw ce.name = "Invariant Violation", ce;
520
+ if (typeof e[w] != "function") {
521
+ var k = Error((g || "React class") + ": " + u + " type `" + w + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof e[w] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
522
+ throw k.name = "Invariant Violation", k;
517
523
  }
518
- M = n[q](f, q, E, b, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
519
- } catch (Z) {
520
- M = Z;
524
+ h = e[w](i, w, g, u, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
525
+ } catch (P) {
526
+ h = P;
521
527
  }
522
- M && !(M instanceof Error) && (Ge(L), D("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", E || "React class", b, q, typeof M), Ge(null)), M instanceof Error && !(M.message in zr) && (zr[M.message] = !0, Ge(L), D("Failed %s type: %s", b, M.message), Ge(null));
528
+ h && !(h instanceof Error) && (ce(_), A("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", g || "React class", u, w, typeof h), ce(null)), h instanceof Error && !(h.message in Ke) && (Ke[h.message] = !0, ce(_), A("Failed %s type: %s", u, h.message), ce(null));
523
529
  }
524
530
  }
525
531
  }
526
- var Rt = Array.isArray;
527
- function cr(n) {
528
- return Rt(n);
532
+ var Er = Array.isArray;
533
+ function Se(e) {
534
+ return Er(e);
529
535
  }
530
- function _t(n) {
536
+ function Cr(e) {
531
537
  {
532
- var f = typeof Symbol == "function" && Symbol.toStringTag, b = f && n[Symbol.toStringTag] || n.constructor.name || "Object";
533
- return b;
538
+ var i = typeof Symbol == "function" && Symbol.toStringTag, u = i && e[Symbol.toStringTag] || e.constructor.name || "Object";
539
+ return u;
534
540
  }
535
541
  }
536
- function xt(n) {
542
+ function Tr(e) {
537
543
  try {
538
- return qr(n), !1;
544
+ return Ge(e), !1;
539
545
  } catch {
540
546
  return !0;
541
547
  }
542
548
  }
543
- function qr(n) {
544
- return "" + n;
549
+ function Ge(e) {
550
+ return "" + e;
545
551
  }
546
- function $r(n) {
547
- if (xt(n))
548
- return D("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", _t(n)), qr(n);
552
+ function He(e) {
553
+ if (Tr(e))
554
+ return A("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", Cr(e)), Ge(e);
549
555
  }
550
- var $e = K.ReactCurrentOwner, Ct = {
556
+ var Z = U.ReactCurrentOwner, zr = {
551
557
  key: !0,
552
558
  ref: !0,
553
559
  __self: !0,
554
560
  __source: !0
555
- }, Fr, Lr, ur;
556
- ur = {};
557
- function jt(n) {
558
- if (He.call(n, "ref")) {
559
- var f = Object.getOwnPropertyDescriptor(n, "ref").get;
560
- if (f && f.isReactWarning)
561
+ }, Je, Xe, _e;
562
+ _e = {};
563
+ function Or(e) {
564
+ if (se.call(e, "ref")) {
565
+ var i = Object.getOwnPropertyDescriptor(e, "ref").get;
566
+ if (i && i.isReactWarning)
561
567
  return !1;
562
568
  }
563
- return n.ref !== void 0;
569
+ return e.ref !== void 0;
564
570
  }
565
- function At(n) {
566
- if (He.call(n, "key")) {
567
- var f = Object.getOwnPropertyDescriptor(n, "key").get;
568
- if (f && f.isReactWarning)
571
+ function Ar(e) {
572
+ if (se.call(e, "key")) {
573
+ var i = Object.getOwnPropertyDescriptor(e, "key").get;
574
+ if (i && i.isReactWarning)
569
575
  return !1;
570
576
  }
571
- return n.key !== void 0;
577
+ return e.key !== void 0;
572
578
  }
573
- function Mt(n, f) {
574
- if (typeof n.ref == "string" && $e.current && f && $e.current.stateNode !== f) {
575
- var b = ie($e.current.type);
576
- ur[b] || (D('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref', ie($e.current.type), n.ref), ur[b] = !0);
579
+ function kr(e, i) {
580
+ if (typeof e.ref == "string" && Z.current && i && Z.current.stateNode !== i) {
581
+ var u = L(Z.current.type);
582
+ _e[u] || (A('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', L(Z.current.type), e.ref), _e[u] = !0);
577
583
  }
578
584
  }
579
- function It(n, f) {
585
+ function xr(e, i) {
580
586
  {
581
- var b = function() {
582
- Fr || (Fr = !0, D("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", f));
587
+ var u = function() {
588
+ Je || (Je = !0, A("%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)", i));
583
589
  };
584
- b.isReactWarning = !0, Object.defineProperty(n, "key", {
585
- get: b,
590
+ u.isReactWarning = !0, Object.defineProperty(e, "key", {
591
+ get: u,
586
592
  configurable: !0
587
593
  });
588
594
  }
589
595
  }
590
- function kt(n, f) {
596
+ function Dr(e, i) {
591
597
  {
592
- var b = function() {
593
- Lr || (Lr = !0, D("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", f));
598
+ var u = function() {
599
+ Xe || (Xe = !0, A("%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)", i));
594
600
  };
595
- b.isReactWarning = !0, Object.defineProperty(n, "ref", {
596
- get: b,
601
+ u.isReactWarning = !0, Object.defineProperty(e, "ref", {
602
+ get: u,
597
603
  configurable: !0
598
604
  });
599
605
  }
600
606
  }
601
- var zt = function(n, f, b, E, L, V, q) {
602
- var M = {
603
- $$typeof: r,
604
- type: n,
605
- key: f,
606
- ref: b,
607
- props: q,
608
- _owner: V
607
+ var jr = function(e, i, u, g, _, y, w) {
608
+ var h = {
609
+ $$typeof: n,
610
+ type: e,
611
+ key: i,
612
+ ref: u,
613
+ props: w,
614
+ _owner: y
609
615
  };
610
- return M._store = {}, Object.defineProperty(M._store, "validated", {
616
+ return h._store = {}, Object.defineProperty(h._store, "validated", {
611
617
  configurable: !1,
612
618
  enumerable: !1,
613
619
  writable: !0,
614
620
  value: !1
615
- }), Object.defineProperty(M, "_self", {
621
+ }), Object.defineProperty(h, "_self", {
616
622
  configurable: !1,
617
623
  enumerable: !1,
618
624
  writable: !1,
619
- value: E
620
- }), Object.defineProperty(M, "_source", {
625
+ value: g
626
+ }), Object.defineProperty(h, "_source", {
621
627
  configurable: !1,
622
628
  enumerable: !1,
623
629
  writable: !1,
624
- value: L
625
- }), Object.freeze && (Object.freeze(M.props), Object.freeze(M)), M;
630
+ value: _
631
+ }), Object.freeze && (Object.freeze(h.props), Object.freeze(h)), h;
626
632
  };
627
- function Dt(n, f, b, E, L) {
633
+ function Ir(e, i, u, g, _) {
628
634
  {
629
- var V, q = {}, M = null, ce = null;
630
- b !== void 0 && ($r(b), M = "" + b), At(f) && ($r(f.key), M = "" + f.key), jt(f) && (ce = f.ref, Mt(f, L));
631
- for (V in f)
632
- He.call(f, V) && !Ct.hasOwnProperty(V) && (q[V] = f[V]);
633
- if (n && n.defaultProps) {
634
- var Z = n.defaultProps;
635
- for (V in Z)
636
- q[V] === void 0 && (q[V] = Z[V]);
635
+ var y, w = {}, h = null, k = null;
636
+ u !== void 0 && (He(u), h = "" + u), Ar(i) && (He(i.key), h = "" + i.key), Or(i) && (k = i.ref, kr(i, _));
637
+ for (y in i)
638
+ se.call(i, y) && !zr.hasOwnProperty(y) && (w[y] = i[y]);
639
+ if (e && e.defaultProps) {
640
+ var P = e.defaultProps;
641
+ for (y in P)
642
+ w[y] === void 0 && (w[y] = P[y]);
637
643
  }
638
- if (M || ce) {
639
- var re = typeof n == "function" ? n.displayName || n.name || "Unknown" : n;
640
- M && It(q, re), ce && kt(q, re);
644
+ if (h || k) {
645
+ var E = typeof e == "function" ? e.displayName || e.name || "Unknown" : e;
646
+ h && xr(w, E), k && Dr(w, E);
641
647
  }
642
- return zt(n, M, ce, L, E, $e.current, q);
648
+ return jr(e, h, k, _, g, Z.current, w);
643
649
  }
644
650
  }
645
- var lr = K.ReactCurrentOwner, Wr = K.ReactDebugCurrentFrame;
646
- function Ae(n) {
647
- if (n) {
648
- var f = n._owner, b = Ce(n.type, n._source, f ? f.type : null);
649
- Wr.setExtraStackFrame(b);
651
+ var ye = U.ReactCurrentOwner, Qe = U.ReactDebugCurrentFrame;
652
+ function K(e) {
653
+ if (e) {
654
+ var i = e._owner, u = oe(e.type, e._source, i ? i.type : null);
655
+ Qe.setExtraStackFrame(u);
650
656
  } else
651
- Wr.setExtraStackFrame(null);
657
+ Qe.setExtraStackFrame(null);
652
658
  }
653
- var fr;
654
- fr = !1;
655
- function dr(n) {
656
- return typeof n == "object" && n !== null && n.$$typeof === r;
659
+ var Re;
660
+ Re = !1;
661
+ function Pe(e) {
662
+ return typeof e == "object" && e !== null && e.$$typeof === n;
657
663
  }
658
- function Ur() {
664
+ function Ze() {
659
665
  {
660
- if (lr.current) {
661
- var n = ie(lr.current.type);
662
- if (n)
666
+ if (ye.current) {
667
+ var e = L(ye.current.type);
668
+ if (e)
663
669
  return `
664
670
 
665
- Check the render method of \`` + n + "`.";
671
+ Check the render method of \`` + e + "`.";
666
672
  }
667
673
  return "";
668
674
  }
669
675
  }
670
- function qt(n) {
676
+ function Fr(e) {
671
677
  {
672
- if (n !== void 0) {
673
- var f = n.fileName.replace(/^.*[\\\/]/, ""), b = n.lineNumber;
678
+ if (e !== void 0) {
679
+ var i = e.fileName.replace(/^.*[\\\/]/, ""), u = e.lineNumber;
674
680
  return `
675
681
 
676
- Check your code at ` + f + ":" + b + ".";
682
+ Check your code at ` + i + ":" + u + ".";
677
683
  }
678
684
  return "";
679
685
  }
680
686
  }
681
- var Yr = {};
682
- function $t(n) {
687
+ var er = {};
688
+ function qr(e) {
683
689
  {
684
- var f = Ur();
685
- if (!f) {
686
- var b = typeof n == "string" ? n : n.displayName || n.name;
687
- b && (f = `
690
+ var i = Ze();
691
+ if (!i) {
692
+ var u = typeof e == "string" ? e : e.displayName || e.name;
693
+ u && (i = `
688
694
 
689
- Check the top-level render call using <` + b + ">.");
695
+ Check the top-level render call using <` + u + ">.");
690
696
  }
691
- return f;
697
+ return i;
692
698
  }
693
699
  }
694
- function Nr(n, f) {
700
+ function rr(e, i) {
695
701
  {
696
- if (!n._store || n._store.validated || n.key != null)
702
+ if (!e._store || e._store.validated || e.key != null)
697
703
  return;
698
- n._store.validated = !0;
699
- var b = $t(f);
700
- if (Yr[b])
704
+ e._store.validated = !0;
705
+ var u = qr(i);
706
+ if (er[u])
701
707
  return;
702
- Yr[b] = !0;
703
- var E = "";
704
- n && n._owner && n._owner !== lr.current && (E = " It was passed a child from " + ie(n._owner.type) + "."), Ae(n), D('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', b, E), Ae(null);
708
+ er[u] = !0;
709
+ var g = "";
710
+ e && e._owner && e._owner !== ye.current && (g = " It was passed a child from " + L(e._owner.type) + "."), K(e), A('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', u, g), K(null);
705
711
  }
706
712
  }
707
- function Vr(n, f) {
713
+ function tr(e, i) {
708
714
  {
709
- if (typeof n != "object")
715
+ if (typeof e != "object")
710
716
  return;
711
- if (cr(n))
712
- for (var b = 0; b < n.length; b++) {
713
- var E = n[b];
714
- dr(E) && Nr(E, f);
717
+ if (Se(e))
718
+ for (var u = 0; u < e.length; u++) {
719
+ var g = e[u];
720
+ Pe(g) && rr(g, i);
715
721
  }
716
- else if (dr(n))
717
- n._store && (n._store.validated = !0);
718
- else if (n) {
719
- var L = G(n);
720
- if (typeof L == "function" && L !== n.entries)
721
- for (var V = L.call(n), q; !(q = V.next()).done; )
722
- dr(q.value) && Nr(q.value, f);
722
+ else if (Pe(e))
723
+ e._store && (e._store.validated = !0);
724
+ else if (e) {
725
+ var _ = he(e);
726
+ if (typeof _ == "function" && _ !== e.entries)
727
+ for (var y = _.call(e), w; !(w = y.next()).done; )
728
+ Pe(w.value) && rr(w.value, i);
723
729
  }
724
730
  }
725
731
  }
726
- function Ft(n) {
732
+ function Lr(e) {
727
733
  {
728
- var f = n.type;
729
- if (f == null || typeof f == "string")
734
+ var i = e.type;
735
+ if (i == null || typeof i == "string")
730
736
  return;
731
- var b;
732
- if (typeof f == "function")
733
- b = f.propTypes;
734
- else if (typeof f == "object" && (f.$$typeof === d || f.$$typeof === h))
735
- b = f.propTypes;
737
+ var u;
738
+ if (typeof i == "function")
739
+ u = i.propTypes;
740
+ else if (typeof i == "object" && (i.$$typeof === p || i.$$typeof === m))
741
+ u = i.propTypes;
736
742
  else
737
743
  return;
738
- if (b) {
739
- var E = ie(f);
740
- Pt(b, n.props, "prop", E, n);
741
- } else if (f.PropTypes !== void 0 && !fr) {
742
- fr = !0;
743
- var L = ie(f);
744
- D("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", L || "Unknown");
744
+ if (u) {
745
+ var g = L(i);
746
+ Pr(u, e.props, "prop", g, e);
747
+ } else if (i.PropTypes !== void 0 && !Re) {
748
+ Re = !0;
749
+ var _ = L(i);
750
+ A("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", _ || "Unknown");
745
751
  }
746
- typeof f.getDefaultProps == "function" && !f.getDefaultProps.isReactClassApproved && D("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
752
+ typeof i.getDefaultProps == "function" && !i.getDefaultProps.isReactClassApproved && A("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
747
753
  }
748
754
  }
749
- function Lt(n) {
755
+ function Mr(e) {
750
756
  {
751
- for (var f = Object.keys(n.props), b = 0; b < f.length; b++) {
752
- var E = f[b];
753
- if (E !== "children" && E !== "key") {
754
- Ae(n), D("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", E), Ae(null);
757
+ for (var i = Object.keys(e.props), u = 0; u < i.length; u++) {
758
+ var g = i[u];
759
+ if (g !== "children" && g !== "key") {
760
+ K(e), A("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", g), K(null);
755
761
  break;
756
762
  }
757
763
  }
758
- n.ref !== null && (Ae(n), D("Invalid attribute `ref` supplied to `React.Fragment`."), Ae(null));
764
+ e.ref !== null && (K(e), A("Invalid attribute `ref` supplied to `React.Fragment`."), K(null));
759
765
  }
760
766
  }
761
- function Br(n, f, b, E, L, V) {
767
+ function nr(e, i, u, g, _, y) {
762
768
  {
763
- var q = F(n);
764
- if (!q) {
765
- var M = "";
766
- (n === void 0 || typeof n == "object" && n !== null && Object.keys(n).length === 0) && (M += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
767
- var ce = qt(L);
768
- ce ? M += ce : M += Ur();
769
- var Z;
770
- n === null ? Z = "null" : cr(n) ? Z = "array" : n !== void 0 && n.$$typeof === r ? (Z = "<" + (ie(n.type) || "Unknown") + " />", M = " Did you accidentally export a JSX literal instead of a component?") : Z = typeof n, D("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", Z, M);
769
+ var w = vr(e);
770
+ if (!w) {
771
+ var h = "";
772
+ (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.");
773
+ var k = Fr(_);
774
+ k ? h += k : h += Ze();
775
+ var P;
776
+ e === null ? P = "null" : Se(e) ? P = "array" : e !== void 0 && e.$$typeof === n ? (P = "<" + (L(e.type) || "Unknown") + " />", h = " Did you accidentally export a JSX literal instead of a component?") : P = typeof e, A("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", P, h);
771
777
  }
772
- var re = Dt(n, f, b, L, V);
773
- if (re == null)
774
- return re;
775
- if (q) {
776
- var ve = f.children;
777
- if (ve !== void 0)
778
- if (E)
779
- if (cr(ve)) {
780
- for (var Me = 0; Me < ve.length; Me++)
781
- Vr(ve[Me], n);
782
- Object.freeze && Object.freeze(ve);
778
+ var E = Ir(e, i, u, _, y);
779
+ if (E == null)
780
+ return E;
781
+ if (w) {
782
+ var I = i.children;
783
+ if (I !== void 0)
784
+ if (g)
785
+ if (Se(I)) {
786
+ for (var B = 0; B < I.length; B++)
787
+ tr(I[B], e);
788
+ Object.freeze && Object.freeze(I);
783
789
  } else
784
- D("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
790
+ A("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
785
791
  else
786
- Vr(ve, n);
792
+ tr(I, e);
787
793
  }
788
- return n === o ? Lt(re) : Ft(re), re;
794
+ return e === o ? Mr(E) : Lr(E), E;
789
795
  }
790
796
  }
791
- function Wt(n, f, b) {
792
- return Br(n, f, b, !0);
797
+ function Nr(e, i, u) {
798
+ return nr(e, i, u, !0);
793
799
  }
794
- function Ut(n, f, b) {
795
- return Br(n, f, b, !1);
800
+ function Ur(e, i, u) {
801
+ return nr(e, i, u, !1);
796
802
  }
797
- var Yt = Ut, Nt = Wt;
798
- We.Fragment = o, We.jsx = Yt, We.jsxs = Nt;
799
- }()), We;
803
+ var Wr = Ur, Vr = Nr;
804
+ te.Fragment = o, te.jsx = Wr, te.jsxs = Vr;
805
+ }()), te;
800
806
  }
801
- (function(e) {
802
- process.env.NODE_ENV === "production" ? e.exports = dn() : e.exports = pn();
803
- })(ir);
804
- const Oe = ir.exports.Fragment, a = ir.exports.jsx, I = ir.exports.jsxs;
805
- function gn({
806
- submit: e,
807
- styles: r = qe,
808
- type: t
807
+ (function(t) {
808
+ process.env.NODE_ENV === "production" ? t.exports = ht() : t.exports = vt();
809
+ })(ge);
810
+ const N = ge.exports.Fragment, r = ge.exports.jsx, v = ge.exports.jsxs;
811
+ function bt({
812
+ submit: t,
813
+ styles: n = X,
814
+ type: a
809
815
  }) {
810
816
  const {
811
817
  control: o,
812
- setValue: s,
813
- handleSubmit: i
814
- } = De({
818
+ setValue: l,
819
+ handleSubmit: s
820
+ } = J({
815
821
  defaultValues: {
816
- type: t,
822
+ type: a,
817
823
  key: "",
818
824
  config: {
819
825
  host: "",
@@ -824,38 +830,38 @@ function gn({
824
830
  }
825
831
  }
826
832
  });
827
- return we(() => {
828
- s("type", t);
829
- }, [s, t]), /* @__PURE__ */ a(me, {
833
+ return cr(() => {
834
+ l("type", a);
835
+ }, [l, a]), /* @__PURE__ */ r(F, {
830
836
  mx: "auto",
831
- children: /* @__PURE__ */ I("form", {
832
- onSubmit: i(e),
833
- children: [/* @__PURE__ */ a(J, {
837
+ children: /* @__PURE__ */ v("form", {
838
+ onSubmit: s(t),
839
+ children: [/* @__PURE__ */ r(R, {
834
840
  name: "key",
835
841
  control: o,
836
842
  render: ({
837
843
  field: c
838
- }) => /* @__PURE__ */ a(fe, {
839
- mb: r.spacing,
840
- size: r.size,
844
+ }) => /* @__PURE__ */ r(D, {
845
+ mb: n.spacing,
846
+ size: n.size,
841
847
  required: !0,
842
848
  label: "Name",
843
849
  placeholder: "A unique name",
844
850
  ...c
845
851
  })
846
- }), /* @__PURE__ */ a(Pr, {
852
+ }), /* @__PURE__ */ r(Te, {
847
853
  label: "Connection Info",
848
854
  labelPosition: "center"
849
- }), /* @__PURE__ */ I(se, {
855
+ }), /* @__PURE__ */ v(O, {
850
856
  grow: !0,
851
- children: [/* @__PURE__ */ a(J, {
857
+ children: [/* @__PURE__ */ r(R, {
852
858
  name: "config.host",
853
859
  control: o,
854
860
  render: ({
855
861
  field: c
856
- }) => /* @__PURE__ */ a(fe, {
857
- mb: r.spacing,
858
- size: r.size,
862
+ }) => /* @__PURE__ */ r(D, {
863
+ mb: n.spacing,
864
+ size: n.size,
859
865
  required: !0,
860
866
  label: "Host",
861
867
  sx: {
@@ -863,14 +869,14 @@ function gn({
863
869
  },
864
870
  ...c
865
871
  })
866
- }), /* @__PURE__ */ a(J, {
872
+ }), /* @__PURE__ */ r(R, {
867
873
  name: "config.port",
868
874
  control: o,
869
875
  render: ({
870
876
  field: c
871
- }) => /* @__PURE__ */ a(Vt, {
872
- mb: r.spacing,
873
- size: r.size,
877
+ }) => /* @__PURE__ */ r($r, {
878
+ mb: n.spacing,
879
+ size: n.size,
874
880
  required: !0,
875
881
  label: "Port",
876
882
  hideControls: !0,
@@ -880,1497 +886,76 @@ function gn({
880
886
  ...c
881
887
  })
882
888
  })]
883
- }), /* @__PURE__ */ a(J, {
889
+ }), /* @__PURE__ */ r(R, {
884
890
  name: "config.username",
885
891
  control: o,
886
892
  render: ({
887
893
  field: c
888
- }) => /* @__PURE__ */ a(fe, {
889
- mb: r.spacing,
890
- size: r.size,
894
+ }) => /* @__PURE__ */ r(D, {
895
+ mb: n.spacing,
896
+ size: n.size,
891
897
  required: !0,
892
898
  label: "Username",
893
899
  ...c
894
900
  })
895
- }), /* @__PURE__ */ a(J, {
901
+ }), /* @__PURE__ */ r(R, {
896
902
  name: "config.password",
897
903
  control: o,
898
904
  render: ({
899
905
  field: c
900
- }) => /* @__PURE__ */ a(tr, {
901
- mb: r.spacing,
902
- size: r.size,
906
+ }) => /* @__PURE__ */ r(de, {
907
+ mb: n.spacing,
908
+ size: n.size,
903
909
  required: !0,
904
910
  label: "Password",
905
911
  ...c
906
912
  })
907
- }), /* @__PURE__ */ a(J, {
913
+ }), /* @__PURE__ */ r(R, {
908
914
  name: "config.database",
909
915
  control: o,
910
916
  render: ({
911
917
  field: c
912
- }) => /* @__PURE__ */ a(fe, {
913
- mb: r.spacing,
914
- size: r.size,
918
+ }) => /* @__PURE__ */ r(D, {
919
+ mb: n.spacing,
920
+ size: n.size,
915
921
  required: !0,
916
922
  label: "Database",
917
923
  ...c
918
924
  })
919
- }), /* @__PURE__ */ a(se, {
925
+ }), /* @__PURE__ */ r(O, {
920
926
  position: "right",
921
- mt: r.spacing,
922
- children: /* @__PURE__ */ a(oe, {
927
+ mt: n.spacing,
928
+ children: /* @__PURE__ */ r(T, {
923
929
  type: "submit",
924
- size: r.button.size,
930
+ size: n.button.size,
925
931
  children: "Save"
926
932
  })
927
933
  })]
928
934
  })
929
935
  });
930
936
  }
931
- function hn(e, r, t) {
932
- return r in e ? Object.defineProperty(e, r, {
933
- value: t,
934
- enumerable: !0,
935
- configurable: !0,
936
- writable: !0
937
- }) : e[r] = t, e;
938
- }
939
- function Jr(e, r) {
940
- var t = Object.keys(e);
941
- if (Object.getOwnPropertySymbols) {
942
- var o = Object.getOwnPropertySymbols(e);
943
- r && (o = o.filter(function(s) {
944
- return Object.getOwnPropertyDescriptor(e, s).enumerable;
945
- })), t.push.apply(t, o);
946
- }
947
- return t;
948
- }
949
- function Xr(e) {
950
- for (var r = 1; r < arguments.length; r++) {
951
- var t = arguments[r] != null ? arguments[r] : {};
952
- r % 2 ? Jr(Object(t), !0).forEach(function(o) {
953
- hn(e, o, t[o]);
954
- }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : Jr(Object(t)).forEach(function(o) {
955
- Object.defineProperty(e, o, Object.getOwnPropertyDescriptor(t, o));
956
- });
957
- }
958
- return e;
959
- }
960
- function vn(e, r) {
961
- if (e == null)
962
- return {};
963
- var t = {}, o = Object.keys(e), s, i;
964
- for (i = 0; i < o.length; i++)
965
- s = o[i], !(r.indexOf(s) >= 0) && (t[s] = e[s]);
966
- return t;
967
- }
968
- function mn(e, r) {
969
- if (e == null)
970
- return {};
971
- var t = vn(e, r), o, s;
972
- if (Object.getOwnPropertySymbols) {
973
- var i = Object.getOwnPropertySymbols(e);
974
- for (s = 0; s < i.length; s++)
975
- o = i[s], !(r.indexOf(o) >= 0) && (!Object.prototype.propertyIsEnumerable.call(e, o) || (t[o] = e[o]));
976
- }
977
- return t;
978
- }
979
- function bn(e, r) {
980
- return yn(e) || wn(e, r) || Sn(e, r) || En();
981
- }
982
- function yn(e) {
983
- if (Array.isArray(e))
984
- return e;
985
- }
986
- function wn(e, r) {
987
- if (!(typeof Symbol > "u" || !(Symbol.iterator in Object(e)))) {
988
- var t = [], o = !0, s = !1, i = void 0;
989
- try {
990
- for (var c = e[Symbol.iterator](), u; !(o = (u = c.next()).done) && (t.push(u.value), !(r && t.length === r)); o = !0)
991
- ;
992
- } catch (d) {
993
- s = !0, i = d;
994
- } finally {
995
- try {
996
- !o && c.return != null && c.return();
997
- } finally {
998
- if (s)
999
- throw i;
1000
- }
1001
- }
1002
- return t;
1003
- }
1004
- }
1005
- function Sn(e, r) {
1006
- if (!!e) {
1007
- if (typeof e == "string")
1008
- return Qr(e, r);
1009
- var t = Object.prototype.toString.call(e).slice(8, -1);
1010
- if (t === "Object" && e.constructor && (t = e.constructor.name), t === "Map" || t === "Set")
1011
- return Array.from(e);
1012
- if (t === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))
1013
- return Qr(e, r);
1014
- }
1015
- }
1016
- function Qr(e, r) {
1017
- (r == null || r > e.length) && (r = e.length);
1018
- for (var t = 0, o = new Array(r); t < r; t++)
1019
- o[t] = e[t];
1020
- return o;
1021
- }
1022
- function En() {
1023
- throw new TypeError(`Invalid attempt to destructure non-iterable instance.
1024
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
1025
- }
1026
- function Tn(e, r, t) {
1027
- return r in e ? Object.defineProperty(e, r, {
1028
- value: t,
1029
- enumerable: !0,
1030
- configurable: !0,
1031
- writable: !0
1032
- }) : e[r] = t, e;
1033
- }
1034
- function Zr(e, r) {
1035
- var t = Object.keys(e);
1036
- if (Object.getOwnPropertySymbols) {
1037
- var o = Object.getOwnPropertySymbols(e);
1038
- r && (o = o.filter(function(s) {
1039
- return Object.getOwnPropertyDescriptor(e, s).enumerable;
1040
- })), t.push.apply(t, o);
1041
- }
1042
- return t;
1043
- }
1044
- function et(e) {
1045
- for (var r = 1; r < arguments.length; r++) {
1046
- var t = arguments[r] != null ? arguments[r] : {};
1047
- r % 2 ? Zr(Object(t), !0).forEach(function(o) {
1048
- Tn(e, o, t[o]);
1049
- }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : Zr(Object(t)).forEach(function(o) {
1050
- Object.defineProperty(e, o, Object.getOwnPropertyDescriptor(t, o));
1051
- });
1052
- }
1053
- return e;
1054
- }
1055
- function On() {
1056
- for (var e = arguments.length, r = new Array(e), t = 0; t < e; t++)
1057
- r[t] = arguments[t];
1058
- return function(o) {
1059
- return r.reduceRight(function(s, i) {
1060
- return i(s);
1061
- }, o);
1062
- };
1063
- }
1064
- function Ue(e) {
1065
- return function r() {
1066
- for (var t = this, o = arguments.length, s = new Array(o), i = 0; i < o; i++)
1067
- s[i] = arguments[i];
1068
- return s.length >= e.length ? e.apply(this, s) : function() {
1069
- for (var c = arguments.length, u = new Array(c), d = 0; d < c; d++)
1070
- u[d] = arguments[d];
1071
- return r.apply(t, [].concat(s, u));
1072
- };
1073
- };
1074
- }
1075
- function er(e) {
1076
- return {}.toString.call(e).includes("Object");
1077
- }
1078
- function Pn(e) {
1079
- return !Object.keys(e).length;
1080
- }
1081
- function Ve(e) {
1082
- return typeof e == "function";
1083
- }
1084
- function Rn(e, r) {
1085
- return Object.prototype.hasOwnProperty.call(e, r);
1086
- }
1087
- function _n(e, r) {
1088
- return er(r) || Re("changeType"), Object.keys(r).some(function(t) {
1089
- return !Rn(e, t);
1090
- }) && Re("changeField"), r;
1091
- }
1092
- function xn(e) {
1093
- Ve(e) || Re("selectorType");
1094
- }
1095
- function Cn(e) {
1096
- Ve(e) || er(e) || Re("handlerType"), er(e) && Object.values(e).some(function(r) {
1097
- return !Ve(r);
1098
- }) && Re("handlersType");
1099
- }
1100
- function jn(e) {
1101
- e || Re("initialIsRequired"), er(e) || Re("initialType"), Pn(e) && Re("initialContent");
1102
- }
1103
- function An(e, r) {
1104
- throw new Error(e[r] || e.default);
1105
- }
1106
- var Mn = {
1107
- initialIsRequired: "initial state is required",
1108
- initialType: "initial state should be an object",
1109
- initialContent: "initial state shouldn't be an empty object",
1110
- handlerType: "handler should be an object or a function",
1111
- handlersType: "all handlers should be a functions",
1112
- selectorType: "selector should be a function",
1113
- changeType: "provided value of changes should be an object",
1114
- changeField: 'it seams you want to change a field in the state which is not specified in the "initial" state',
1115
- default: "an unknown error accured in `state-local` package"
1116
- }, Re = Ue(An)(Mn), Je = {
1117
- changes: _n,
1118
- selector: xn,
1119
- handler: Cn,
1120
- initial: jn
1121
- };
1122
- function In(e) {
1123
- var r = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
1124
- Je.initial(e), Je.handler(r);
1125
- var t = {
1126
- current: e
1127
- }, o = Ue(Dn)(t, r), s = Ue(zn)(t), i = Ue(Je.changes)(e), c = Ue(kn)(t);
1128
- function u() {
1129
- var v = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : function(y) {
1130
- return y;
1131
- };
1132
- return Je.selector(v), v(t.current);
1133
- }
1134
- function d(v) {
1135
- On(o, s, i, c)(v);
1136
- }
1137
- return [u, d];
1138
- }
1139
- function kn(e, r) {
1140
- return Ve(r) ? r(e.current) : r;
1141
- }
1142
- function zn(e, r) {
1143
- return e.current = et(et({}, e.current), r), r;
1144
- }
1145
- function Dn(e, r, t) {
1146
- return Ve(r) ? r(e.current) : Object.keys(t).forEach(function(o) {
1147
- var s;
1148
- return (s = r[o]) === null || s === void 0 ? void 0 : s.call(r, e.current[o]);
1149
- }), t;
1150
- }
1151
- var qn = {
1152
- create: In
1153
- }, $n = {
1154
- paths: {
1155
- vs: "https://cdn.jsdelivr.net/npm/monaco-editor@0.33.0/min/vs"
1156
- }
1157
- };
1158
- function Fn(e) {
1159
- return function r() {
1160
- for (var t = this, o = arguments.length, s = new Array(o), i = 0; i < o; i++)
1161
- s[i] = arguments[i];
1162
- return s.length >= e.length ? e.apply(this, s) : function() {
1163
- for (var c = arguments.length, u = new Array(c), d = 0; d < c; d++)
1164
- u[d] = arguments[d];
1165
- return r.apply(t, [].concat(s, u));
1166
- };
1167
- };
1168
- }
1169
- function Ln(e) {
1170
- return {}.toString.call(e).includes("Object");
1171
- }
1172
- function Wn(e) {
1173
- return e || rt("configIsRequired"), Ln(e) || rt("configType"), e.urls ? (Un(), {
1174
- paths: {
1175
- vs: e.urls.monacoBase
1176
- }
1177
- }) : e;
1178
- }
1179
- function Un() {
1180
- console.warn(gt.deprecation);
1181
- }
1182
- function Yn(e, r) {
1183
- throw new Error(e[r] || e.default);
1184
- }
1185
- var gt = {
1186
- configIsRequired: "the configuration object is required",
1187
- configType: "the configuration object should be an object",
1188
- default: "an unknown error accured in `@monaco-editor/loader` package",
1189
- deprecation: `Deprecation warning!
1190
- You are using deprecated way of configuration.
1191
-
1192
- Instead of using
1193
- monaco.config({ urls: { monacoBase: '...' } })
1194
- use
1195
- monaco.config({ paths: { vs: '...' } })
1196
-
1197
- For more please check the link https://github.com/suren-atoyan/monaco-loader#config
1198
- `
1199
- }, rt = Fn(Yn)(gt), Nn = {
1200
- config: Wn
1201
- }, Vn = function() {
1202
- for (var r = arguments.length, t = new Array(r), o = 0; o < r; o++)
1203
- t[o] = arguments[o];
1204
- return function(s) {
1205
- return t.reduceRight(function(i, c) {
1206
- return c(i);
1207
- }, s);
1208
- };
1209
- };
1210
- function ht(e, r) {
1211
- return Object.keys(r).forEach(function(t) {
1212
- r[t] instanceof Object && e[t] && Object.assign(r[t], ht(e[t], r[t]));
1213
- }), Xr(Xr({}, e), r);
1214
- }
1215
- var Bn = {
1216
- type: "cancelation",
1217
- msg: "operation is manually canceled"
1218
- };
1219
- function pr(e) {
1220
- var r = !1, t = new Promise(function(o, s) {
1221
- e.then(function(i) {
1222
- return r ? s(Bn) : o(i);
1223
- }), e.catch(s);
1224
- });
1225
- return t.cancel = function() {
1226
- return r = !0;
1227
- }, t;
1228
- }
1229
- var Kn = qn.create({
1230
- config: $n,
1231
- isInitialized: !1,
1232
- resolve: null,
1233
- reject: null,
1234
- monaco: null
1235
- }), vt = bn(Kn, 2), Ke = vt[0], ar = vt[1];
1236
- function Hn(e) {
1237
- var r = Nn.config(e), t = r.monaco, o = mn(r, ["monaco"]);
1238
- ar(function(s) {
1239
- return {
1240
- config: ht(s.config, o),
1241
- monaco: t
1242
- };
1243
- });
1244
- }
1245
- function Gn() {
1246
- var e = Ke(function(r) {
1247
- var t = r.monaco, o = r.isInitialized, s = r.resolve;
1248
- return {
1249
- monaco: t,
1250
- isInitialized: o,
1251
- resolve: s
1252
- };
1253
- });
1254
- if (!e.isInitialized) {
1255
- if (ar({
1256
- isInitialized: !0
1257
- }), e.monaco)
1258
- return e.resolve(e.monaco), pr(gr);
1259
- if (window.monaco && window.monaco.editor)
1260
- return mt(window.monaco), e.resolve(window.monaco), pr(gr);
1261
- Vn(Jn, Qn)(Zn);
1262
- }
1263
- return pr(gr);
1264
- }
1265
- function Jn(e) {
1266
- return document.body.appendChild(e);
1267
- }
1268
- function Xn(e) {
1269
- var r = document.createElement("script");
1270
- return e && (r.src = e), r;
1271
- }
1272
- function Qn(e) {
1273
- var r = Ke(function(o) {
1274
- var s = o.config, i = o.reject;
1275
- return {
1276
- config: s,
1277
- reject: i
1278
- };
1279
- }), t = Xn("".concat(r.config.paths.vs, "/loader.js"));
1280
- return t.onload = function() {
1281
- return e();
1282
- }, t.onerror = r.reject, t;
1283
- }
1284
- function Zn() {
1285
- var e = Ke(function(t) {
1286
- var o = t.config, s = t.resolve, i = t.reject;
1287
- return {
1288
- config: o,
1289
- resolve: s,
1290
- reject: i
1291
- };
1292
- }), r = window.require;
1293
- r.config(e.config), r(["vs/editor/editor.main"], function(t) {
1294
- mt(t), e.resolve(t);
1295
- }, function(t) {
1296
- e.reject(t);
1297
- });
1298
- }
1299
- function mt(e) {
1300
- Ke().monaco || ar({
1301
- monaco: e
1302
- });
1303
- }
1304
- function eo() {
1305
- return Ke(function(e) {
1306
- var r = e.monaco;
1307
- return r;
1308
- });
1309
- }
1310
- var gr = new Promise(function(e, r) {
1311
- return ar({
1312
- resolve: e,
1313
- reject: r
1314
- });
1315
- }), Ye = {
1316
- config: Hn,
1317
- init: Gn,
1318
- __getMonacoInstance: eo
1319
- }, S = { exports: {} }, hr = { exports: {} }, W = {};
1320
- /** @license React v16.13.1
1321
- * react-is.production.min.js
1322
- *
1323
- * Copyright (c) Facebook, Inc. and its affiliates.
1324
- *
1325
- * This source code is licensed under the MIT license found in the
1326
- * LICENSE file in the root directory of this source tree.
1327
- */
1328
- var tt;
1329
- function ro() {
1330
- if (tt)
1331
- return W;
1332
- tt = 1;
1333
- var e = typeof Symbol == "function" && Symbol.for, r = e ? Symbol.for("react.element") : 60103, t = e ? Symbol.for("react.portal") : 60106, o = e ? Symbol.for("react.fragment") : 60107, s = e ? Symbol.for("react.strict_mode") : 60108, i = e ? Symbol.for("react.profiler") : 60114, c = e ? Symbol.for("react.provider") : 60109, u = e ? Symbol.for("react.context") : 60110, d = e ? Symbol.for("react.async_mode") : 60111, v = e ? Symbol.for("react.concurrent_mode") : 60111, y = e ? Symbol.for("react.forward_ref") : 60112, h = e ? Symbol.for("react.suspense") : 60113, m = e ? Symbol.for("react.suspense_list") : 60120, x = e ? Symbol.for("react.memo") : 60115, Y = e ? Symbol.for("react.lazy") : 60116, z = e ? Symbol.for("react.block") : 60121, G = e ? Symbol.for("react.fundamental") : 60117, K = e ? Symbol.for("react.responder") : 60118, D = e ? Symbol.for("react.scope") : 60119;
1334
- function H(p) {
1335
- if (typeof p == "object" && p !== null) {
1336
- var X = p.$$typeof;
1337
- switch (X) {
1338
- case r:
1339
- switch (p = p.type, p) {
1340
- case d:
1341
- case v:
1342
- case o:
1343
- case i:
1344
- case s:
1345
- case h:
1346
- return p;
1347
- default:
1348
- switch (p = p && p.$$typeof, p) {
1349
- case u:
1350
- case y:
1351
- case Y:
1352
- case x:
1353
- case c:
1354
- return p;
1355
- default:
1356
- return X;
1357
- }
1358
- }
1359
- case t:
1360
- return X;
1361
- }
1362
- }
1363
- }
1364
- function N(p) {
1365
- return H(p) === v;
1366
- }
1367
- return W.AsyncMode = d, W.ConcurrentMode = v, W.ContextConsumer = u, W.ContextProvider = c, W.Element = r, W.ForwardRef = y, W.Fragment = o, W.Lazy = Y, W.Memo = x, W.Portal = t, W.Profiler = i, W.StrictMode = s, W.Suspense = h, W.isAsyncMode = function(p) {
1368
- return N(p) || H(p) === d;
1369
- }, W.isConcurrentMode = N, W.isContextConsumer = function(p) {
1370
- return H(p) === u;
1371
- }, W.isContextProvider = function(p) {
1372
- return H(p) === c;
1373
- }, W.isElement = function(p) {
1374
- return typeof p == "object" && p !== null && p.$$typeof === r;
1375
- }, W.isForwardRef = function(p) {
1376
- return H(p) === y;
1377
- }, W.isFragment = function(p) {
1378
- return H(p) === o;
1379
- }, W.isLazy = function(p) {
1380
- return H(p) === Y;
1381
- }, W.isMemo = function(p) {
1382
- return H(p) === x;
1383
- }, W.isPortal = function(p) {
1384
- return H(p) === t;
1385
- }, W.isProfiler = function(p) {
1386
- return H(p) === i;
1387
- }, W.isStrictMode = function(p) {
1388
- return H(p) === s;
1389
- }, W.isSuspense = function(p) {
1390
- return H(p) === h;
1391
- }, W.isValidElementType = function(p) {
1392
- return typeof p == "string" || typeof p == "function" || p === o || p === v || p === i || p === s || p === h || p === m || typeof p == "object" && p !== null && (p.$$typeof === Y || p.$$typeof === x || p.$$typeof === c || p.$$typeof === u || p.$$typeof === y || p.$$typeof === G || p.$$typeof === K || p.$$typeof === D || p.$$typeof === z);
1393
- }, W.typeOf = H, W;
1394
- }
1395
- var U = {};
1396
- /** @license React v16.13.1
1397
- * react-is.development.js
1398
- *
1399
- * Copyright (c) Facebook, Inc. and its affiliates.
1400
- *
1401
- * This source code is licensed under the MIT license found in the
1402
- * LICENSE file in the root directory of this source tree.
1403
- */
1404
- var nt;
1405
- function to() {
1406
- return nt || (nt = 1, process.env.NODE_ENV !== "production" && function() {
1407
- var e = typeof Symbol == "function" && Symbol.for, r = e ? Symbol.for("react.element") : 60103, t = e ? Symbol.for("react.portal") : 60106, o = e ? Symbol.for("react.fragment") : 60107, s = e ? Symbol.for("react.strict_mode") : 60108, i = e ? Symbol.for("react.profiler") : 60114, c = e ? Symbol.for("react.provider") : 60109, u = e ? Symbol.for("react.context") : 60110, d = e ? Symbol.for("react.async_mode") : 60111, v = e ? Symbol.for("react.concurrent_mode") : 60111, y = e ? Symbol.for("react.forward_ref") : 60112, h = e ? Symbol.for("react.suspense") : 60113, m = e ? Symbol.for("react.suspense_list") : 60120, x = e ? Symbol.for("react.memo") : 60115, Y = e ? Symbol.for("react.lazy") : 60116, z = e ? Symbol.for("react.block") : 60121, G = e ? Symbol.for("react.fundamental") : 60117, K = e ? Symbol.for("react.responder") : 60118, D = e ? Symbol.for("react.scope") : 60119;
1408
- function H(w) {
1409
- return typeof w == "string" || typeof w == "function" || w === o || w === v || w === i || w === s || w === h || w === m || typeof w == "object" && w !== null && (w.$$typeof === Y || w.$$typeof === x || w.$$typeof === c || w.$$typeof === u || w.$$typeof === y || w.$$typeof === G || w.$$typeof === K || w.$$typeof === D || w.$$typeof === z);
1410
- }
1411
- function N(w) {
1412
- if (typeof w == "object" && w !== null) {
1413
- var he = w.$$typeof;
1414
- switch (he) {
1415
- case r:
1416
- var je = w.type;
1417
- switch (je) {
1418
- case d:
1419
- case v:
1420
- case o:
1421
- case i:
1422
- case s:
1423
- case h:
1424
- return je;
1425
- default:
1426
- var Ce = je && je.$$typeof;
1427
- switch (Ce) {
1428
- case u:
1429
- case y:
1430
- case Y:
1431
- case x:
1432
- case c:
1433
- return Ce;
1434
- default:
1435
- return he;
1436
- }
1437
- }
1438
- case t:
1439
- return he;
1440
- }
1441
- }
1442
- }
1443
- var p = d, X = v, ee = u, Se = c, Q = r, F = y, ge = o, be = Y, ie = x, k = t, B = i, te = s, pe = h, Ee = !1;
1444
- function Pe(w) {
1445
- return Ee || (Ee = !0, console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")), l(w) || N(w) === d;
1446
- }
1447
- function l(w) {
1448
- return N(w) === v;
1449
- }
1450
- function g(w) {
1451
- return N(w) === u;
1452
- }
1453
- function T(w) {
1454
- return N(w) === c;
1455
- }
1456
- function O(w) {
1457
- return typeof w == "object" && w !== null && w.$$typeof === r;
1458
- }
1459
- function P(w) {
1460
- return N(w) === y;
1461
- }
1462
- function C(w) {
1463
- return N(w) === o;
1464
- }
1465
- function R(w) {
1466
- return N(w) === Y;
1467
- }
1468
- function _(w) {
1469
- return N(w) === x;
1470
- }
1471
- function j(w) {
1472
- return N(w) === t;
1473
- }
1474
- function $(w) {
1475
- return N(w) === i;
1476
- }
1477
- function A(w) {
1478
- return N(w) === s;
1479
- }
1480
- function ae(w) {
1481
- return N(w) === h;
1482
- }
1483
- U.AsyncMode = p, U.ConcurrentMode = X, U.ContextConsumer = ee, U.ContextProvider = Se, U.Element = Q, U.ForwardRef = F, U.Fragment = ge, U.Lazy = be, U.Memo = ie, U.Portal = k, U.Profiler = B, U.StrictMode = te, U.Suspense = pe, U.isAsyncMode = Pe, U.isConcurrentMode = l, U.isContextConsumer = g, U.isContextProvider = T, U.isElement = O, U.isForwardRef = P, U.isFragment = C, U.isLazy = R, U.isMemo = _, U.isPortal = j, U.isProfiler = $, U.isStrictMode = A, U.isSuspense = ae, U.isValidElementType = H, U.typeOf = N;
1484
- }()), U;
1485
- }
1486
- var ot;
1487
- function bt() {
1488
- return ot || (ot = 1, function(e) {
1489
- process.env.NODE_ENV === "production" ? e.exports = ro() : e.exports = to();
1490
- }(hr)), hr.exports;
1491
- }
1492
- /*
1493
- object-assign
1494
- (c) Sindre Sorhus
1495
- @license MIT
1496
- */
1497
- var vr, it;
1498
- function no() {
1499
- if (it)
1500
- return vr;
1501
- it = 1;
1502
- var e = Object.getOwnPropertySymbols, r = Object.prototype.hasOwnProperty, t = Object.prototype.propertyIsEnumerable;
1503
- function o(i) {
1504
- if (i == null)
1505
- throw new TypeError("Object.assign cannot be called with null or undefined");
1506
- return Object(i);
1507
- }
1508
- function s() {
1509
- try {
1510
- if (!Object.assign)
1511
- return !1;
1512
- var i = new String("abc");
1513
- if (i[5] = "de", Object.getOwnPropertyNames(i)[0] === "5")
1514
- return !1;
1515
- for (var c = {}, u = 0; u < 10; u++)
1516
- c["_" + String.fromCharCode(u)] = u;
1517
- var d = Object.getOwnPropertyNames(c).map(function(y) {
1518
- return c[y];
1519
- });
1520
- if (d.join("") !== "0123456789")
1521
- return !1;
1522
- var v = {};
1523
- return "abcdefghijklmnopqrst".split("").forEach(function(y) {
1524
- v[y] = y;
1525
- }), Object.keys(Object.assign({}, v)).join("") === "abcdefghijklmnopqrst";
1526
- } catch {
1527
- return !1;
1528
- }
1529
- }
1530
- return vr = s() ? Object.assign : function(i, c) {
1531
- for (var u, d = o(i), v, y = 1; y < arguments.length; y++) {
1532
- u = Object(arguments[y]);
1533
- for (var h in u)
1534
- r.call(u, h) && (d[h] = u[h]);
1535
- if (e) {
1536
- v = e(u);
1537
- for (var m = 0; m < v.length; m++)
1538
- t.call(u, v[m]) && (d[v[m]] = u[v[m]]);
1539
- }
1540
- }
1541
- return d;
1542
- }, vr;
1543
- }
1544
- var mr, at;
1545
- function Mr() {
1546
- if (at)
1547
- return mr;
1548
- at = 1;
1549
- var e = "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";
1550
- return mr = e, mr;
1551
- }
1552
- var br, st;
1553
- function yt() {
1554
- return st || (st = 1, br = Function.call.bind(Object.prototype.hasOwnProperty)), br;
1555
- }
1556
- var yr, ct;
1557
- function oo() {
1558
- if (ct)
1559
- return yr;
1560
- ct = 1;
1561
- var e = function() {
1562
- };
1563
- if (process.env.NODE_ENV !== "production") {
1564
- var r = Mr(), t = {}, o = yt();
1565
- e = function(i) {
1566
- var c = "Warning: " + i;
1567
- typeof console < "u" && console.error(c);
1568
- try {
1569
- throw new Error(c);
1570
- } catch {
1571
- }
1572
- };
1573
- }
1574
- function s(i, c, u, d, v) {
1575
- if (process.env.NODE_ENV !== "production") {
1576
- for (var y in i)
1577
- if (o(i, y)) {
1578
- var h;
1579
- try {
1580
- if (typeof i[y] != "function") {
1581
- var m = Error(
1582
- (d || "React class") + ": " + u + " type `" + y + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof i[y] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`."
1583
- );
1584
- throw m.name = "Invariant Violation", m;
1585
- }
1586
- h = i[y](c, y, d, u, null, r);
1587
- } catch (Y) {
1588
- h = Y;
1589
- }
1590
- if (h && !(h instanceof Error) && e(
1591
- (d || "React class") + ": type specification of " + u + " `" + y + "` is invalid; the type checker function must return `null` or an `Error` but returned a " + typeof h + ". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."
1592
- ), h instanceof Error && !(h.message in t)) {
1593
- t[h.message] = !0;
1594
- var x = v ? v() : "";
1595
- e(
1596
- "Failed " + u + " type: " + h.message + (x != null ? x : "")
1597
- );
1598
- }
1599
- }
1600
- }
1601
- }
1602
- return s.resetWarningCache = function() {
1603
- process.env.NODE_ENV !== "production" && (t = {});
1604
- }, yr = s, yr;
1605
- }
1606
- var wr, ut;
1607
- function io() {
1608
- if (ut)
1609
- return wr;
1610
- ut = 1;
1611
- var e = bt(), r = no(), t = Mr(), o = yt(), s = oo(), i = function() {
1612
- };
1613
- process.env.NODE_ENV !== "production" && (i = function(u) {
1614
- var d = "Warning: " + u;
1615
- typeof console < "u" && console.error(d);
1616
- try {
1617
- throw new Error(d);
1618
- } catch {
1619
- }
1620
- });
1621
- function c() {
1622
- return null;
1623
- }
1624
- return wr = function(u, d) {
1625
- var v = typeof Symbol == "function" && Symbol.iterator, y = "@@iterator";
1626
- function h(l) {
1627
- var g = l && (v && l[v] || l[y]);
1628
- if (typeof g == "function")
1629
- return g;
1630
- }
1631
- var m = "<<anonymous>>", x = {
1632
- array: K("array"),
1633
- bigint: K("bigint"),
1634
- bool: K("boolean"),
1635
- func: K("function"),
1636
- number: K("number"),
1637
- object: K("object"),
1638
- string: K("string"),
1639
- symbol: K("symbol"),
1640
- any: D(),
1641
- arrayOf: H,
1642
- element: N(),
1643
- elementType: p(),
1644
- instanceOf: X,
1645
- node: F(),
1646
- objectOf: Se,
1647
- oneOf: ee,
1648
- oneOfType: Q,
1649
- shape: be,
1650
- exact: ie
1651
- };
1652
- function Y(l, g) {
1653
- return l === g ? l !== 0 || 1 / l === 1 / g : l !== l && g !== g;
1654
- }
1655
- function z(l, g) {
1656
- this.message = l, this.data = g && typeof g == "object" ? g : {}, this.stack = "";
1657
- }
1658
- z.prototype = Error.prototype;
1659
- function G(l) {
1660
- if (process.env.NODE_ENV !== "production")
1661
- var g = {}, T = 0;
1662
- function O(C, R, _, j, $, A, ae) {
1663
- if (j = j || m, A = A || _, ae !== t) {
1664
- if (d) {
1665
- var w = new Error(
1666
- "Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types"
1667
- );
1668
- throw w.name = "Invariant Violation", w;
1669
- } else if (process.env.NODE_ENV !== "production" && typeof console < "u") {
1670
- var he = j + ":" + _;
1671
- !g[he] && T < 3 && (i(
1672
- "You are manually calling a React.PropTypes validation function for the `" + A + "` prop on `" + j + "`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."
1673
- ), g[he] = !0, T++);
1674
- }
1675
- }
1676
- return R[_] == null ? C ? R[_] === null ? new z("The " + $ + " `" + A + "` is marked as required " + ("in `" + j + "`, but its value is `null`.")) : new z("The " + $ + " `" + A + "` is marked as required in " + ("`" + j + "`, but its value is `undefined`.")) : null : l(R, _, j, $, A);
1677
- }
1678
- var P = O.bind(null, !1);
1679
- return P.isRequired = O.bind(null, !0), P;
1680
- }
1681
- function K(l) {
1682
- function g(T, O, P, C, R, _) {
1683
- var j = T[O], $ = te(j);
1684
- if ($ !== l) {
1685
- var A = pe(j);
1686
- return new z(
1687
- "Invalid " + C + " `" + R + "` of type " + ("`" + A + "` supplied to `" + P + "`, expected ") + ("`" + l + "`."),
1688
- { expectedType: l }
1689
- );
1690
- }
1691
- return null;
1692
- }
1693
- return G(g);
1694
- }
1695
- function D() {
1696
- return G(c);
1697
- }
1698
- function H(l) {
1699
- function g(T, O, P, C, R) {
1700
- if (typeof l != "function")
1701
- return new z("Property `" + R + "` of component `" + P + "` has invalid PropType notation inside arrayOf.");
1702
- var _ = T[O];
1703
- if (!Array.isArray(_)) {
1704
- var j = te(_);
1705
- return new z("Invalid " + C + " `" + R + "` of type " + ("`" + j + "` supplied to `" + P + "`, expected an array."));
1706
- }
1707
- for (var $ = 0; $ < _.length; $++) {
1708
- var A = l(_, $, P, C, R + "[" + $ + "]", t);
1709
- if (A instanceof Error)
1710
- return A;
1711
- }
1712
- return null;
1713
- }
1714
- return G(g);
1715
- }
1716
- function N() {
1717
- function l(g, T, O, P, C) {
1718
- var R = g[T];
1719
- if (!u(R)) {
1720
- var _ = te(R);
1721
- return new z("Invalid " + P + " `" + C + "` of type " + ("`" + _ + "` supplied to `" + O + "`, expected a single ReactElement."));
1722
- }
1723
- return null;
1724
- }
1725
- return G(l);
1726
- }
1727
- function p() {
1728
- function l(g, T, O, P, C) {
1729
- var R = g[T];
1730
- if (!e.isValidElementType(R)) {
1731
- var _ = te(R);
1732
- return new z("Invalid " + P + " `" + C + "` of type " + ("`" + _ + "` supplied to `" + O + "`, expected a single ReactElement type."));
1733
- }
1734
- return null;
1735
- }
1736
- return G(l);
1737
- }
1738
- function X(l) {
1739
- function g(T, O, P, C, R) {
1740
- if (!(T[O] instanceof l)) {
1741
- var _ = l.name || m, j = Pe(T[O]);
1742
- return new z("Invalid " + C + " `" + R + "` of type " + ("`" + j + "` supplied to `" + P + "`, expected ") + ("instance of `" + _ + "`."));
1743
- }
1744
- return null;
1745
- }
1746
- return G(g);
1747
- }
1748
- function ee(l) {
1749
- if (!Array.isArray(l))
1750
- return process.env.NODE_ENV !== "production" && (arguments.length > 1 ? i(
1751
- "Invalid arguments supplied to oneOf, expected an array, got " + arguments.length + " arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."
1752
- ) : i("Invalid argument supplied to oneOf, expected an array.")), c;
1753
- function g(T, O, P, C, R) {
1754
- for (var _ = T[O], j = 0; j < l.length; j++)
1755
- if (Y(_, l[j]))
1756
- return null;
1757
- var $ = JSON.stringify(l, function(ae, w) {
1758
- var he = pe(w);
1759
- return he === "symbol" ? String(w) : w;
1760
- });
1761
- return new z("Invalid " + C + " `" + R + "` of value `" + String(_) + "` " + ("supplied to `" + P + "`, expected one of " + $ + "."));
1762
- }
1763
- return G(g);
1764
- }
1765
- function Se(l) {
1766
- function g(T, O, P, C, R) {
1767
- if (typeof l != "function")
1768
- return new z("Property `" + R + "` of component `" + P + "` has invalid PropType notation inside objectOf.");
1769
- var _ = T[O], j = te(_);
1770
- if (j !== "object")
1771
- return new z("Invalid " + C + " `" + R + "` of type " + ("`" + j + "` supplied to `" + P + "`, expected an object."));
1772
- for (var $ in _)
1773
- if (o(_, $)) {
1774
- var A = l(_, $, P, C, R + "." + $, t);
1775
- if (A instanceof Error)
1776
- return A;
1777
- }
1778
- return null;
1779
- }
1780
- return G(g);
1781
- }
1782
- function Q(l) {
1783
- if (!Array.isArray(l))
1784
- return process.env.NODE_ENV !== "production" && i("Invalid argument supplied to oneOfType, expected an instance of array."), c;
1785
- for (var g = 0; g < l.length; g++) {
1786
- var T = l[g];
1787
- if (typeof T != "function")
1788
- return i(
1789
- "Invalid argument supplied to oneOfType. Expected an array of check functions, but received " + Ee(T) + " at index " + g + "."
1790
- ), c;
1791
- }
1792
- function O(P, C, R, _, j) {
1793
- for (var $ = [], A = 0; A < l.length; A++) {
1794
- var ae = l[A], w = ae(P, C, R, _, j, t);
1795
- if (w == null)
1796
- return null;
1797
- w.data && o(w.data, "expectedType") && $.push(w.data.expectedType);
1798
- }
1799
- var he = $.length > 0 ? ", expected one of type [" + $.join(", ") + "]" : "";
1800
- return new z("Invalid " + _ + " `" + j + "` supplied to " + ("`" + R + "`" + he + "."));
1801
- }
1802
- return G(O);
1803
- }
1804
- function F() {
1805
- function l(g, T, O, P, C) {
1806
- return k(g[T]) ? null : new z("Invalid " + P + " `" + C + "` supplied to " + ("`" + O + "`, expected a ReactNode."));
1807
- }
1808
- return G(l);
1809
- }
1810
- function ge(l, g, T, O, P) {
1811
- return new z(
1812
- (l || "React class") + ": " + g + " type `" + T + "." + O + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + P + "`."
1813
- );
1814
- }
1815
- function be(l) {
1816
- function g(T, O, P, C, R) {
1817
- var _ = T[O], j = te(_);
1818
- if (j !== "object")
1819
- return new z("Invalid " + C + " `" + R + "` of type `" + j + "` " + ("supplied to `" + P + "`, expected `object`."));
1820
- for (var $ in l) {
1821
- var A = l[$];
1822
- if (typeof A != "function")
1823
- return ge(P, C, R, $, pe(A));
1824
- var ae = A(_, $, P, C, R + "." + $, t);
1825
- if (ae)
1826
- return ae;
1827
- }
1828
- return null;
1829
- }
1830
- return G(g);
1831
- }
1832
- function ie(l) {
1833
- function g(T, O, P, C, R) {
1834
- var _ = T[O], j = te(_);
1835
- if (j !== "object")
1836
- return new z("Invalid " + C + " `" + R + "` of type `" + j + "` " + ("supplied to `" + P + "`, expected `object`."));
1837
- var $ = r({}, T[O], l);
1838
- for (var A in $) {
1839
- var ae = l[A];
1840
- if (o(l, A) && typeof ae != "function")
1841
- return ge(P, C, R, A, pe(ae));
1842
- if (!ae)
1843
- return new z(
1844
- "Invalid " + C + " `" + R + "` key `" + A + "` supplied to `" + P + "`.\nBad object: " + JSON.stringify(T[O], null, " ") + `
1845
- Valid keys: ` + JSON.stringify(Object.keys(l), null, " ")
1846
- );
1847
- var w = ae(_, A, P, C, R + "." + A, t);
1848
- if (w)
1849
- return w;
1850
- }
1851
- return null;
1852
- }
1853
- return G(g);
1854
- }
1855
- function k(l) {
1856
- switch (typeof l) {
1857
- case "number":
1858
- case "string":
1859
- case "undefined":
1860
- return !0;
1861
- case "boolean":
1862
- return !l;
1863
- case "object":
1864
- if (Array.isArray(l))
1865
- return l.every(k);
1866
- if (l === null || u(l))
1867
- return !0;
1868
- var g = h(l);
1869
- if (g) {
1870
- var T = g.call(l), O;
1871
- if (g !== l.entries) {
1872
- for (; !(O = T.next()).done; )
1873
- if (!k(O.value))
1874
- return !1;
1875
- } else
1876
- for (; !(O = T.next()).done; ) {
1877
- var P = O.value;
1878
- if (P && !k(P[1]))
1879
- return !1;
1880
- }
1881
- } else
1882
- return !1;
1883
- return !0;
1884
- default:
1885
- return !1;
1886
- }
1887
- }
1888
- function B(l, g) {
1889
- return l === "symbol" ? !0 : g ? g["@@toStringTag"] === "Symbol" || typeof Symbol == "function" && g instanceof Symbol : !1;
1890
- }
1891
- function te(l) {
1892
- var g = typeof l;
1893
- return Array.isArray(l) ? "array" : l instanceof RegExp ? "object" : B(g, l) ? "symbol" : g;
1894
- }
1895
- function pe(l) {
1896
- if (typeof l > "u" || l === null)
1897
- return "" + l;
1898
- var g = te(l);
1899
- if (g === "object") {
1900
- if (l instanceof Date)
1901
- return "date";
1902
- if (l instanceof RegExp)
1903
- return "regexp";
1904
- }
1905
- return g;
1906
- }
1907
- function Ee(l) {
1908
- var g = pe(l);
1909
- switch (g) {
1910
- case "array":
1911
- case "object":
1912
- return "an " + g;
1913
- case "boolean":
1914
- case "date":
1915
- case "regexp":
1916
- return "a " + g;
1917
- default:
1918
- return g;
1919
- }
1920
- }
1921
- function Pe(l) {
1922
- return !l.constructor || !l.constructor.name ? m : l.constructor.name;
1923
- }
1924
- return x.checkPropTypes = s, x.resetWarningCache = s.resetWarningCache, x.PropTypes = x, x;
1925
- }, wr;
1926
- }
1927
- var Sr, lt;
1928
- function ao() {
1929
- if (lt)
1930
- return Sr;
1931
- lt = 1;
1932
- var e = Mr();
1933
- function r() {
1934
- }
1935
- function t() {
1936
- }
1937
- return t.resetWarningCache = r, Sr = function() {
1938
- function o(c, u, d, v, y, h) {
1939
- if (h !== e) {
1940
- var m = new Error(
1941
- "Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types"
1942
- );
1943
- throw m.name = "Invariant Violation", m;
1944
- }
1945
- }
1946
- o.isRequired = o;
1947
- function s() {
1948
- return o;
1949
- }
1950
- var i = {
1951
- array: o,
1952
- bigint: o,
1953
- bool: o,
1954
- func: o,
1955
- number: o,
1956
- object: o,
1957
- string: o,
1958
- symbol: o,
1959
- any: o,
1960
- arrayOf: s,
1961
- element: o,
1962
- elementType: o,
1963
- instanceOf: s,
1964
- node: o,
1965
- objectOf: s,
1966
- oneOf: s,
1967
- oneOfType: s,
1968
- shape: s,
1969
- exact: s,
1970
- checkPropTypes: t,
1971
- resetWarningCache: r
1972
- };
1973
- return i.PropTypes = i, i;
1974
- }, Sr;
1975
- }
1976
- if (process.env.NODE_ENV !== "production") {
1977
- var so = bt(), co = !0;
1978
- S.exports = io()(so.isElement, co);
1979
- } else
1980
- S.exports = ao()();
1981
- const uo = {
1982
- display: "flex",
1983
- height: "100%",
1984
- width: "100%",
1985
- justifyContent: "center",
1986
- alignItems: "center"
1987
- };
1988
- function lo({
1989
- content: e
1990
- }) {
1991
- return /* @__PURE__ */ a("div", {
1992
- style: uo,
1993
- children: e
1994
- });
1995
- }
1996
- const Er = {
1997
- wrapper: {
1998
- display: "flex",
1999
- position: "relative",
2000
- textAlign: "initial"
2001
- },
2002
- fullWidth: {
2003
- width: "100%"
2004
- },
2005
- hide: {
2006
- display: "none"
2007
- }
2008
- };
2009
- function wt({
2010
- width: e,
2011
- height: r,
2012
- isEditorReady: t,
2013
- loading: o,
2014
- _ref: s,
2015
- className: i,
2016
- wrapperProps: c
2017
- }) {
2018
- return /* @__PURE__ */ I("section", {
2019
- style: {
2020
- ...Er.wrapper,
2021
- width: e,
2022
- height: r
2023
- },
2024
- ...c,
2025
- children: [!t && /* @__PURE__ */ a(lo, {
2026
- content: o
2027
- }), /* @__PURE__ */ a("div", {
2028
- ref: s,
2029
- style: {
2030
- ...Er.fullWidth,
2031
- ...!t && Er.hide
2032
- },
2033
- className: i
2034
- })]
2035
- });
2036
- }
2037
- wt.propTypes = {
2038
- width: S.exports.oneOfType([S.exports.number, S.exports.string]).isRequired,
2039
- height: S.exports.oneOfType([S.exports.number, S.exports.string]).isRequired,
2040
- loading: S.exports.oneOfType([S.exports.element, S.exports.string]).isRequired,
2041
- isEditorReady: S.exports.bool.isRequired,
2042
- className: S.exports.string,
2043
- wrapperProps: S.exports.object
2044
- };
2045
- var St = /* @__PURE__ */ dt(wt);
2046
- function Et(e) {
2047
- we(e, []);
2048
- }
2049
- function ye(e, r, t = !0) {
2050
- const o = ue(!0);
2051
- we(o.current || !t ? () => {
2052
- o.current = !1;
2053
- } : e, r);
2054
- }
2055
- function Ne() {
2056
- }
2057
- function rr(e, r, t, o) {
2058
- return fo(e, o) || po(e, r, t, o);
2059
- }
2060
- function fo(e, r) {
2061
- return e.editor.getModel(Tt(e, r));
2062
- }
2063
- function po(e, r, t, o) {
2064
- return e.editor.createModel(r, t, o && Tt(e, o));
2065
- }
2066
- function Tt(e, r) {
2067
- return e.Uri.parse(r);
2068
- }
2069
- function go(e) {
2070
- return e === void 0;
2071
- }
2072
- function Ot({
2073
- original: e,
2074
- modified: r,
2075
- language: t,
2076
- originalLanguage: o,
2077
- modifiedLanguage: s,
2078
- originalModelPath: i,
2079
- modifiedModelPath: c,
2080
- keepCurrentOriginalModel: u,
2081
- keepCurrentModifiedModel: d,
2082
- theme: v,
2083
- loading: y,
2084
- options: h,
2085
- height: m,
2086
- width: x,
2087
- className: Y,
2088
- wrapperProps: z,
2089
- beforeMount: G,
2090
- onMount: K
2091
- }) {
2092
- const [D, H] = Ie(!1), [N, p] = Ie(!0), X = ue(null), ee = ue(null), Se = ue(null), Q = ue(K), F = ue(G);
2093
- Et(() => {
2094
- const k = Ye.init();
2095
- return k.then((B) => (ee.current = B) && p(!1)).catch((B) => (B == null ? void 0 : B.type) !== "cancelation" && console.error("Monaco initialization: error:", B)), () => X.current ? ie() : k.cancel();
2096
- }), ye(() => {
2097
- const k = X.current.getModifiedEditor();
2098
- k.getOption(ee.current.editor.EditorOption.readOnly) ? k.setValue(r) : r !== k.getValue() && (k.executeEdits("", [{
2099
- range: k.getModel().getFullModelRange(),
2100
- text: r,
2101
- forceMoveMarkers: !0
2102
- }]), k.pushUndoStop());
2103
- }, [r], D), ye(() => {
2104
- X.current.getModel().original.setValue(e);
2105
- }, [e], D), ye(() => {
2106
- const {
2107
- original: k,
2108
- modified: B
2109
- } = X.current.getModel();
2110
- ee.current.editor.setModelLanguage(k, o || t), ee.current.editor.setModelLanguage(B, s || t);
2111
- }, [t, o, s], D), ye(() => {
2112
- ee.current.editor.setTheme(v);
2113
- }, [v], D), ye(() => {
2114
- X.current.updateOptions(h);
2115
- }, [h], D);
2116
- const ge = Tr(() => {
2117
- F.current(ee.current);
2118
- const k = rr(ee.current, e, o || t, i), B = rr(ee.current, r, s || t, c);
2119
- X.current.setModel({
2120
- original: k,
2121
- modified: B
2122
- });
2123
- }, [t, r, s, e, o, i, c]), be = Tr(() => {
2124
- X.current = ee.current.editor.createDiffEditor(Se.current, {
2125
- automaticLayout: !0,
2126
- ...h
2127
- }), ge(), ee.current.editor.setTheme(v), H(!0);
2128
- }, [h, v, ge]);
2129
- we(() => {
2130
- D && Q.current(X.current, ee.current);
2131
- }, [D]), we(() => {
2132
- !N && !D && be();
2133
- }, [N, D, be]);
2134
- function ie() {
2135
- const k = X.current.getModel();
2136
- if (!u) {
2137
- var B;
2138
- (B = k.original) === null || B === void 0 || B.dispose();
2139
- }
2140
- if (!d) {
2141
- var te;
2142
- (te = k.modified) === null || te === void 0 || te.dispose();
2143
- }
2144
- X.current.dispose();
2145
- }
2146
- return /* @__PURE__ */ a(St, {
2147
- width: x,
2148
- height: m,
2149
- isEditorReady: D,
2150
- loading: y,
2151
- _ref: Se,
2152
- className: Y,
2153
- wrapperProps: z
2154
- });
2155
- }
2156
- Ot.propTypes = {
2157
- original: S.exports.string,
2158
- modified: S.exports.string,
2159
- language: S.exports.string,
2160
- originalLanguage: S.exports.string,
2161
- modifiedLanguage: S.exports.string,
2162
- originalModelPath: S.exports.string,
2163
- modifiedModelPath: S.exports.string,
2164
- keepCurrentOriginalModel: S.exports.bool,
2165
- keepCurrentModifiedModel: S.exports.bool,
2166
- theme: S.exports.string,
2167
- loading: S.exports.oneOfType([S.exports.element, S.exports.string]),
2168
- options: S.exports.object,
2169
- width: S.exports.oneOfType([S.exports.number, S.exports.string]),
2170
- height: S.exports.oneOfType([S.exports.number, S.exports.string]),
2171
- className: S.exports.string,
2172
- wrapperProps: S.exports.object,
2173
- beforeMount: S.exports.func,
2174
- onMount: S.exports.func
2175
- };
2176
- Ot.defaultProps = {
2177
- theme: "light",
2178
- loading: "Loading...",
2179
- options: {},
2180
- keepCurrentOriginalModel: !1,
2181
- keepCurrentModifiedModel: !1,
2182
- width: "100%",
2183
- height: "100%",
2184
- wrapperProps: {},
2185
- beforeMount: Ne,
2186
- onMount: Ne
2187
- };
2188
- function ho(e) {
2189
- const r = ue();
2190
- return we(() => {
2191
- r.current = e;
2192
- }, [e]), r.current;
2193
- }
2194
- const Xe = /* @__PURE__ */ new Map();
2195
- function Ir({
2196
- defaultValue: e,
2197
- defaultLanguage: r,
2198
- defaultPath: t,
2199
- value: o,
2200
- language: s,
2201
- path: i,
2202
- theme: c,
2203
- line: u,
2204
- loading: d,
2205
- options: v,
2206
- overrideServices: y,
2207
- saveViewState: h,
2208
- keepCurrentModel: m,
2209
- width: x,
2210
- height: Y,
2211
- className: z,
2212
- wrapperProps: G,
2213
- beforeMount: K,
2214
- onMount: D,
2215
- onChange: H,
2216
- onValidate: N
2217
- }) {
2218
- const [p, X] = Ie(!1), [ee, Se] = Ie(!0), Q = ue(null), F = ue(null), ge = ue(null), be = ue(D), ie = ue(K), k = ue(null), B = ue(o), te = ho(i), pe = ue(!1);
2219
- Et(() => {
2220
- const l = Ye.init();
2221
- return l.then((g) => (Q.current = g) && Se(!1)).catch((g) => (g == null ? void 0 : g.type) !== "cancelation" && console.error("Monaco initialization: error:", g)), () => F.current ? Pe() : l.cancel();
2222
- }), ye(() => {
2223
- const l = rr(Q.current, e || o, r || s, i);
2224
- l !== F.current.getModel() && (h && Xe.set(te, F.current.saveViewState()), F.current.setModel(l), h && F.current.restoreViewState(Xe.get(i)));
2225
- }, [i], p), ye(() => {
2226
- F.current.updateOptions(v);
2227
- }, [v], p), ye(() => {
2228
- F.current.getOption(Q.current.editor.EditorOption.readOnly) ? F.current.setValue(o) : o !== F.current.getValue() && (F.current.executeEdits("", [{
2229
- range: F.current.getModel().getFullModelRange(),
2230
- text: o,
2231
- forceMoveMarkers: !0
2232
- }]), F.current.pushUndoStop());
2233
- }, [o], p), ye(() => {
2234
- Q.current.editor.setModelLanguage(F.current.getModel(), s);
2235
- }, [s], p), ye(() => {
2236
- go(u) || F.current.revealLine(u);
2237
- }, [u], p), ye(() => {
2238
- Q.current.editor.setTheme(c);
2239
- }, [c], p);
2240
- const Ee = Tr(() => {
2241
- if (!pe.current) {
2242
- ie.current(Q.current);
2243
- const l = i || t, g = rr(Q.current, o || e, r || s, l);
2244
- F.current = Q.current.editor.create(ge.current, {
2245
- model: g,
2246
- automaticLayout: !0,
2247
- ...v
2248
- }, y), h && F.current.restoreViewState(Xe.get(l)), Q.current.editor.setTheme(c), X(!0), pe.current = !0;
2249
- }
2250
- }, [e, r, t, o, s, i, v, y, h, c]);
2251
- we(() => {
2252
- p && be.current(F.current, Q.current);
2253
- }, [p]), we(() => {
2254
- !ee && !p && Ee();
2255
- }, [ee, p, Ee]), B.current = o, we(() => {
2256
- if (p && H) {
2257
- var l, g;
2258
- (l = k.current) === null || l === void 0 || l.dispose(), k.current = (g = F.current) === null || g === void 0 ? void 0 : g.onDidChangeModelContent((T) => {
2259
- H(F.current.getValue(), T);
2260
- });
2261
- }
2262
- }, [p, H]), we(() => {
2263
- if (p) {
2264
- const l = Q.current.editor.onDidChangeMarkers((g) => {
2265
- var T;
2266
- const O = (T = F.current.getModel()) === null || T === void 0 ? void 0 : T.uri;
2267
- if (O && g.find((C) => C.path === O.path)) {
2268
- const C = Q.current.editor.getModelMarkers({
2269
- resource: O
2270
- });
2271
- N == null || N(C);
2272
- }
2273
- });
2274
- return () => {
2275
- l == null || l.dispose();
2276
- };
2277
- }
2278
- }, [p, N]);
2279
- function Pe() {
2280
- var l;
2281
- if ((l = k.current) === null || l === void 0 || l.dispose(), m)
2282
- h && Xe.set(i, F.current.saveViewState());
2283
- else {
2284
- var g;
2285
- (g = F.current.getModel()) === null || g === void 0 || g.dispose();
2286
- }
2287
- F.current.dispose();
2288
- }
2289
- return /* @__PURE__ */ a(St, {
2290
- width: x,
2291
- height: Y,
2292
- isEditorReady: p,
2293
- loading: d,
2294
- _ref: ge,
2295
- className: z,
2296
- wrapperProps: G
2297
- });
2298
- }
2299
- Ir.propTypes = {
2300
- defaultValue: S.exports.string,
2301
- defaultPath: S.exports.string,
2302
- defaultLanguage: S.exports.string,
2303
- value: S.exports.string,
2304
- language: S.exports.string,
2305
- path: S.exports.string,
2306
- theme: S.exports.string,
2307
- line: S.exports.number,
2308
- loading: S.exports.oneOfType([S.exports.element, S.exports.string]),
2309
- options: S.exports.object,
2310
- overrideServices: S.exports.object,
2311
- saveViewState: S.exports.bool,
2312
- keepCurrentModel: S.exports.bool,
2313
- width: S.exports.oneOfType([S.exports.number, S.exports.string]),
2314
- height: S.exports.oneOfType([S.exports.number, S.exports.string]),
2315
- className: S.exports.string,
2316
- wrapperProps: S.exports.object,
2317
- beforeMount: S.exports.func,
2318
- onMount: S.exports.func,
2319
- onChange: S.exports.func,
2320
- onValidate: S.exports.func
2321
- };
2322
- Ir.defaultProps = {
2323
- theme: "light",
2324
- loading: "Loading...",
2325
- options: {},
2326
- overrideServices: {},
2327
- saveViewState: !0,
2328
- keepCurrentModel: !1,
2329
- width: "100%",
2330
- height: "100%",
2331
- wrapperProps: {},
2332
- beforeMount: Ne,
2333
- onMount: Ne,
2334
- onValidate: Ne
2335
- };
2336
- var vo = /* @__PURE__ */ dt(Ir);
2337
- function mo() {
2338
- return new Worker("/assets/editor.worker.64456f42.js");
2339
- }
2340
- function bo() {
2341
- return new Worker("/assets/css.worker.72a68640.js");
2342
- }
2343
- function yo() {
2344
- return new Worker("/assets/html.worker.76e8b0f3.js");
2345
- }
2346
- function wo() {
2347
- return new Worker("/assets/json.worker.e7a84e5c.js");
2348
- }
2349
- function So() {
2350
- return new Worker("/assets/ts.worker.b3dc4cb9.js");
2351
- }
2352
937
  self.MonacoEnvironment = {
2353
- getWorker(e, r) {
2354
- return r === "json" ? new wo() : r === "css" || r === "scss" || r === "less" ? new bo() : r === "html" || r === "handlebars" || r === "razor" ? new yo() : r === "typescript" || r === "javascript" ? new So() : new mo();
938
+ getWorker(t, n) {
939
+ return n === "json" ? new st() : n === "css" || n === "scss" || n === "less" ? new at() : n === "html" || n === "handlebars" || n === "razor" ? new ot() : n === "typescript" || n === "javascript" ? new ct() : new it();
2355
940
  }
2356
941
  };
2357
- function Eo() {
2358
- Ye.__getMonacoInstance() || (console.log("loading monaco"), Ye.config({ monaco: nn }), Ye.init().then((r) => console.log("here is the monaco instance:", r)));
2359
- }
2360
- Eo();
2361
- const To = ({
2362
- value: e,
2363
- onChange: r
2364
- }) => /* @__PURE__ */ a(me, {
942
+ function wt() {
943
+ Ee.__getMonacoInstance() || (console.log("loading monaco"), Ee.config({ monaco: nt }), Ee.init().then((n) => console.log("here is the monaco instance:", n)));
944
+ }
945
+ wt();
946
+ const St = ({
947
+ value: t,
948
+ onChange: n
949
+ }) => /* @__PURE__ */ r(F, {
2365
950
  sx: {
2366
951
  position: "relative"
2367
952
  },
2368
- children: /* @__PURE__ */ a(vo, {
953
+ children: /* @__PURE__ */ r(tt, {
2369
954
  height: "500px",
2370
955
  defaultLanguage: "javascript",
2371
- value: e,
956
+ value: t,
2372
957
  onChange: (o) => {
2373
- !o || r(o);
958
+ !o || n(o);
2374
959
  },
2375
960
  theme: "vs-dark",
2376
961
  options: {
@@ -2379,63 +964,63 @@ const To = ({
2379
964
  }
2380
965
  }
2381
966
  })
2382
- }), ft = Cr(({
2383
- value: e,
2384
- onChange: r,
2385
- label: t,
967
+ }), sr = ke(({
968
+ value: t,
969
+ onChange: n,
970
+ label: a,
2386
971
  modalTitle: o,
2387
- defaultValue: s,
2388
- styles: i
972
+ defaultValue: l,
973
+ styles: s
2389
974
  }, c) => {
2390
- const [u, {
2391
- setTrue: d,
2392
- setFalse: v
2393
- }] = tn(), [y, h] = Ie(e), m = () => {
2394
- v(), r(y);
2395
- }, x = () => {
2396
- v(), h(e);
2397
- }, Y = () => {
2398
- h(s);
975
+ const [d, {
976
+ setTrue: p,
977
+ setFalse: b
978
+ }] = rt(), [S, m] = lr(t), f = () => {
979
+ b(), n(S);
980
+ }, z = () => {
981
+ b(), m(t);
982
+ }, q = () => {
983
+ m(l);
2399
984
  };
2400
- return we(() => {
2401
- h(e);
2402
- }, [e]), /* @__PURE__ */ I(Oe, {
2403
- children: [/* @__PURE__ */ a(oe, {
985
+ return cr(() => {
986
+ m(t);
987
+ }, [t]), /* @__PURE__ */ v(N, {
988
+ children: [/* @__PURE__ */ r(T, {
2404
989
  variant: "filled",
2405
- size: i.button.size,
2406
- onClick: d,
990
+ size: s.button.size,
991
+ onClick: p,
2407
992
  sx: {
2408
993
  flexGrow: 1
2409
994
  },
2410
- children: t
2411
- }), /* @__PURE__ */ a(Be, {
995
+ children: a
996
+ }), /* @__PURE__ */ r(ne, {
2412
997
  size: 800,
2413
998
  title: o,
2414
- opened: u,
2415
- onClose: v,
999
+ opened: d,
1000
+ onClose: b,
2416
1001
  closeOnClickOutside: !1,
2417
1002
  withCloseButton: !1,
2418
- children: u && /* @__PURE__ */ I(Rr, {
2419
- children: [/* @__PURE__ */ a(To, {
2420
- value: y,
2421
- onChange: h
2422
- }), /* @__PURE__ */ I(se, {
1003
+ children: d && /* @__PURE__ */ v(ze, {
1004
+ children: [/* @__PURE__ */ r(St, {
1005
+ value: S,
1006
+ onChange: m
1007
+ }), /* @__PURE__ */ v(O, {
2423
1008
  position: "apart",
2424
- children: [/* @__PURE__ */ a(oe, {
2425
- onClick: Y,
1009
+ children: [/* @__PURE__ */ r(T, {
1010
+ onClick: q,
2426
1011
  color: "red",
2427
- leftIcon: /* @__PURE__ */ a(Xt, {
1012
+ leftIcon: /* @__PURE__ */ r(Jr, {
2428
1013
  size: 20
2429
1014
  }),
2430
1015
  children: "Rest"
2431
- }), /* @__PURE__ */ I(se, {
1016
+ }), /* @__PURE__ */ v(O, {
2432
1017
  position: "right",
2433
- children: [/* @__PURE__ */ a(oe, {
2434
- onClick: x,
1018
+ children: [/* @__PURE__ */ r(T, {
1019
+ onClick: z,
2435
1020
  variant: "subtle",
2436
1021
  children: "Cancel"
2437
- }), /* @__PURE__ */ a(oe, {
2438
- onClick: m,
1022
+ }), /* @__PURE__ */ r(T, {
1023
+ onClick: f,
2439
1024
  children: "OK"
2440
1025
  })]
2441
1026
  })]
@@ -2443,117 +1028,117 @@ const To = ({
2443
1028
  })
2444
1029
  })]
2445
1030
  });
2446
- }), Qe = {
1031
+ }), le = {
2447
1032
  pre: ["function pre_process({ method, url, params, headers, data }, utils) {", " // your code goes here", " return { method, url, params, headers, data }", "}"].join(`
2448
1033
  `),
2449
1034
  post: ["function post_process(res, utils) {", " // your code goes here", " return data", "}"].join(`
2450
1035
  `)
2451
1036
  };
2452
- function Oo({
2453
- submit: e,
2454
- styles: r = qe
1037
+ function _t({
1038
+ submit: t,
1039
+ styles: n = X
2455
1040
  }) {
2456
1041
  const {
2457
- control: t,
1042
+ control: a,
2458
1043
  setValue: o,
2459
- handleSubmit: s
2460
- } = De({
1044
+ handleSubmit: l
1045
+ } = J({
2461
1046
  defaultValues: {
2462
1047
  type: "http",
2463
1048
  key: "",
2464
1049
  config: {
2465
1050
  host: "",
2466
1051
  processing: {
2467
- pre: Qe.pre,
2468
- post: Qe.post
1052
+ pre: le.pre,
1053
+ post: le.post
2469
1054
  }
2470
1055
  }
2471
1056
  }
2472
1057
  });
2473
- return /* @__PURE__ */ a(me, {
1058
+ return /* @__PURE__ */ r(F, {
2474
1059
  mx: "auto",
2475
- children: /* @__PURE__ */ I("form", {
2476
- onSubmit: s(e),
2477
- children: [/* @__PURE__ */ a(J, {
1060
+ children: /* @__PURE__ */ v("form", {
1061
+ onSubmit: l(t),
1062
+ children: [/* @__PURE__ */ r(R, {
2478
1063
  name: "key",
2479
- control: t,
1064
+ control: a,
2480
1065
  render: ({
2481
- field: i
2482
- }) => /* @__PURE__ */ a(fe, {
2483
- mb: r.spacing,
2484
- size: r.size,
1066
+ field: s
1067
+ }) => /* @__PURE__ */ r(D, {
1068
+ mb: n.spacing,
1069
+ size: n.size,
2485
1070
  required: !0,
2486
1071
  label: "Name",
2487
1072
  placeholder: "A unique name",
2488
- ...i
1073
+ ...s
2489
1074
  })
2490
- }), /* @__PURE__ */ a(Pr, {
1075
+ }), /* @__PURE__ */ r(Te, {
2491
1076
  label: "Connection Info",
2492
1077
  labelPosition: "center"
2493
- }), /* @__PURE__ */ a(J, {
1078
+ }), /* @__PURE__ */ r(R, {
2494
1079
  name: "config.host",
2495
- control: t,
1080
+ control: a,
2496
1081
  render: ({
2497
- field: i
2498
- }) => /* @__PURE__ */ a(fe, {
2499
- mb: r.spacing,
2500
- size: r.size,
1082
+ field: s
1083
+ }) => /* @__PURE__ */ r(D, {
1084
+ mb: n.spacing,
1085
+ size: n.size,
2501
1086
  required: !0,
2502
1087
  label: "Base URL",
2503
1088
  sx: {
2504
1089
  flexGrow: 1
2505
1090
  },
2506
- ...i
1091
+ ...s
2507
1092
  })
2508
- }), /* @__PURE__ */ I(se, {
1093
+ }), /* @__PURE__ */ v(O, {
2509
1094
  grow: !0,
2510
- children: [/* @__PURE__ */ a(J, {
1095
+ children: [/* @__PURE__ */ r(R, {
2511
1096
  name: "config.processing.pre",
2512
- control: t,
1097
+ control: a,
2513
1098
  render: ({
2514
- field: i
2515
- }) => /* @__PURE__ */ a(ft, {
1099
+ field: s
1100
+ }) => /* @__PURE__ */ r(sr, {
2516
1101
  label: "Pre Processing",
2517
1102
  modalTitle: "This function will run before sending the request (for scenarios like encryption)",
2518
- defaultValue: Qe.pre,
2519
- ...i,
2520
- styles: r
1103
+ defaultValue: le.pre,
1104
+ ...s,
1105
+ styles: n
2521
1106
  })
2522
- }), /* @__PURE__ */ a(J, {
1107
+ }), /* @__PURE__ */ r(R, {
2523
1108
  name: "config.processing.post",
2524
- control: t,
1109
+ control: a,
2525
1110
  render: ({
2526
- field: i
2527
- }) => /* @__PURE__ */ a(ft, {
1111
+ field: s
1112
+ }) => /* @__PURE__ */ r(sr, {
2528
1113
  label: "Post Processing",
2529
1114
  modalTitle: "This function will run after sending the request (for scenarios like decryption)",
2530
- defaultValue: Qe.post,
2531
- ...i,
2532
- styles: r
1115
+ defaultValue: le.post,
1116
+ ...s,
1117
+ styles: n
2533
1118
  })
2534
1119
  })]
2535
- }), /* @__PURE__ */ a(se, {
1120
+ }), /* @__PURE__ */ r(O, {
2536
1121
  position: "right",
2537
- mt: r.spacing,
2538
- children: /* @__PURE__ */ a(oe, {
1122
+ mt: n.spacing,
1123
+ children: /* @__PURE__ */ r(T, {
2539
1124
  type: "submit",
2540
- size: r.button.size,
1125
+ size: n.button.size,
2541
1126
  children: "Save"
2542
1127
  })
2543
1128
  })]
2544
1129
  })
2545
1130
  });
2546
1131
  }
2547
- function Po({
2548
- postSubmit: e,
2549
- styles: r = qe
1132
+ function yt({
1133
+ postSubmit: t,
1134
+ styles: n = X
2550
1135
  }) {
2551
- const [t, o] = Ie("postgresql"), s = async ({
2552
- type: u,
2553
- key: d,
2554
- config: v
1136
+ const [a, o] = lr("postgresql"), l = async ({
1137
+ type: d,
1138
+ key: p,
1139
+ config: b
2555
1140
  }) => {
2556
- _e({
1141
+ W({
2557
1142
  id: "for-creating",
2558
1143
  title: "Pending",
2559
1144
  message: "Adding data source...",
@@ -2561,30 +1146,30 @@ function Po({
2561
1146
  });
2562
1147
  try {
2563
1148
  console.log({
2564
- type: u,
2565
- key: d,
2566
- config: v
2567
- }), await de.datasource.create(u, d, v), le({
1149
+ type: d,
1150
+ key: p,
1151
+ config: b
1152
+ }), await j.datasource.create(d, p, b), x({
2568
1153
  id: "for-creating",
2569
1154
  title: "Successful",
2570
1155
  message: "Data source is added",
2571
1156
  color: "green"
2572
- }), e();
2573
- } catch (y) {
2574
- le({
1157
+ }), t();
1158
+ } catch (S) {
1159
+ x({
2575
1160
  id: "for-creating",
2576
1161
  title: "Failed",
2577
- message: y.message,
1162
+ message: S.message,
2578
1163
  color: "red"
2579
1164
  });
2580
1165
  }
2581
- }, i = t === "postgresql" || t === "mysql", c = t === "http";
2582
- return /* @__PURE__ */ I(me, {
1166
+ }, s = a === "postgresql" || a === "mysql", c = a === "http";
1167
+ return /* @__PURE__ */ v(F, {
2583
1168
  mx: "auto",
2584
- children: [/* @__PURE__ */ a(Bt, {
1169
+ children: [/* @__PURE__ */ r(Yr, {
2585
1170
  fullWidth: !0,
2586
- mb: r.spacing,
2587
- size: r.size,
1171
+ mb: n.spacing,
1172
+ size: n.size,
2588
1173
  data: [{
2589
1174
  label: "PostgreSQL",
2590
1175
  value: "postgresql"
@@ -2595,105 +1180,105 @@ function Po({
2595
1180
  label: "HTTP",
2596
1181
  value: "http"
2597
1182
  }],
2598
- value: t,
2599
- onChange: (u) => o(u)
2600
- }), i && /* @__PURE__ */ a(gn, {
2601
- submit: s,
2602
- styles: r,
2603
- type: t
2604
- }), c && /* @__PURE__ */ a(Oo, {
2605
- submit: s,
2606
- styles: r
1183
+ value: a,
1184
+ onChange: (d) => o(d)
1185
+ }), s && /* @__PURE__ */ r(bt, {
1186
+ submit: l,
1187
+ styles: n,
1188
+ type: a
1189
+ }), c && /* @__PURE__ */ r(_t, {
1190
+ submit: l,
1191
+ styles: n
2607
1192
  })]
2608
1193
  });
2609
1194
  }
2610
- function Ro({
2611
- onSuccess: e,
2612
- styles: r = qe
1195
+ function Rt({
1196
+ onSuccess: t,
1197
+ styles: n = X
2613
1198
  }) {
2614
- const [t, o] = ze.useState(!1), s = () => o(!0), i = () => o(!1);
2615
- return /* @__PURE__ */ I(Oe, {
2616
- children: [/* @__PURE__ */ a(Be, {
1199
+ const [a, o] = H.useState(!1), l = () => o(!0), s = () => o(!1);
1200
+ return /* @__PURE__ */ v(N, {
1201
+ children: [/* @__PURE__ */ r(ne, {
2617
1202
  overflow: "inside",
2618
- opened: t,
1203
+ opened: a,
2619
1204
  onClose: () => o(!1),
2620
1205
  title: "Add a data source",
2621
1206
  trapFocus: !0,
2622
- onDragStart: (u) => {
2623
- u.stopPropagation();
1207
+ onDragStart: (d) => {
1208
+ d.stopPropagation();
2624
1209
  },
2625
- children: /* @__PURE__ */ a(Po, {
1210
+ children: /* @__PURE__ */ r(yt, {
2626
1211
  postSubmit: () => {
2627
- e(), i();
1212
+ t(), s();
2628
1213
  },
2629
- styles: r
1214
+ styles: n
2630
1215
  })
2631
- }), /* @__PURE__ */ a(oe, {
2632
- size: r.button.size,
2633
- onClick: s,
2634
- leftIcon: /* @__PURE__ */ a(jr, {
1216
+ }), /* @__PURE__ */ r(T, {
1217
+ size: n.button.size,
1218
+ onClick: l,
1219
+ leftIcon: /* @__PURE__ */ r(xe, {
2635
1220
  size: 20
2636
1221
  }),
2637
1222
  children: "Add a Data Source"
2638
1223
  })]
2639
1224
  });
2640
1225
  }
2641
- function Or() {
2642
- return Or = Object.assign ? Object.assign.bind() : function(e) {
2643
- for (var r = 1; r < arguments.length; r++) {
2644
- var t = arguments[r];
2645
- for (var o in t)
2646
- Object.prototype.hasOwnProperty.call(t, o) && (e[o] = t[o]);
1226
+ function Ce() {
1227
+ return Ce = Object.assign ? Object.assign.bind() : function(t) {
1228
+ for (var n = 1; n < arguments.length; n++) {
1229
+ var a = arguments[n];
1230
+ for (var o in a)
1231
+ Object.prototype.hasOwnProperty.call(a, o) && (t[o] = a[o]);
2647
1232
  }
2648
- return e;
2649
- }, Or.apply(this, arguments);
1233
+ return t;
1234
+ }, Ce.apply(this, arguments);
2650
1235
  }
2651
- function _o(e, r) {
2652
- if (e == null)
1236
+ function Pt(t, n) {
1237
+ if (t == null)
2653
1238
  return {};
2654
- var t, o, s = function(c, u) {
1239
+ var a, o, l = function(c, d) {
2655
1240
  if (c == null)
2656
1241
  return {};
2657
- var d, v, y = {}, h = Object.keys(c);
2658
- for (v = 0; v < h.length; v++)
2659
- d = h[v], u.indexOf(d) >= 0 || (y[d] = c[d]);
2660
- return y;
2661
- }(e, r);
1242
+ var p, b, S = {}, m = Object.keys(c);
1243
+ for (b = 0; b < m.length; b++)
1244
+ p = m[b], d.indexOf(p) >= 0 || (S[p] = c[p]);
1245
+ return S;
1246
+ }(t, n);
2662
1247
  if (Object.getOwnPropertySymbols) {
2663
- var i = Object.getOwnPropertySymbols(e);
2664
- for (o = 0; o < i.length; o++)
2665
- t = i[o], r.indexOf(t) >= 0 || Object.prototype.propertyIsEnumerable.call(e, t) && (s[t] = e[t]);
1248
+ var s = Object.getOwnPropertySymbols(t);
1249
+ for (o = 0; o < s.length; o++)
1250
+ a = s[o], n.indexOf(a) >= 0 || Object.prototype.propertyIsEnumerable.call(t, a) && (l[a] = t[a]);
2666
1251
  }
2667
- return s;
1252
+ return l;
2668
1253
  }
2669
- var xo = ["size", "color", "stroke"];
2670
- function Co(e) {
2671
- var r = e.size, t = r === void 0 ? 24 : r, o = e.color, s = o === void 0 ? "currentColor" : o, i = e.stroke, c = i === void 0 ? 2 : i, u = _o(e, xo);
2672
- return Fe.createElement("svg", Or({ xmlns: "http://www.w3.org/2000/svg", className: "icon icon-tabler icon-tabler-lock", width: t, height: t, viewBox: "0 0 24 24", strokeWidth: c, stroke: s, fill: "none", strokeLinecap: "round", strokeLinejoin: "round" }, u), Fe.createElement("path", { stroke: "none", d: "M0 0h24v24H0z", fill: "none" }), Fe.createElement("rect", { x: 5, y: 11, width: 14, height: 10, rx: 2 }), Fe.createElement("circle", { cx: 12, cy: 16, r: 1 }), Fe.createElement("path", { d: "M8 11v-4a4 4 0 0 1 8 0v4" }));
1254
+ var Et = ["size", "color", "stroke"];
1255
+ function Ct(t) {
1256
+ var n = t.size, a = n === void 0 ? 24 : n, o = t.color, l = o === void 0 ? "currentColor" : o, s = t.stroke, c = s === void 0 ? 2 : s, d = Pt(t, Et);
1257
+ return ee.createElement("svg", Ce({ xmlns: "http://www.w3.org/2000/svg", className: "icon icon-tabler icon-tabler-lock", width: a, height: a, viewBox: "0 0 24 24", strokeWidth: c, stroke: l, fill: "none", strokeLinecap: "round", strokeLinejoin: "round" }, d), ee.createElement("path", { stroke: "none", d: "M0 0h24v24H0z", fill: "none" }), ee.createElement("rect", { x: 5, y: 11, width: 14, height: 10, rx: 2 }), ee.createElement("circle", { cx: 12, cy: 16, r: 1 }), ee.createElement("path", { d: "M8 11v-4a4 4 0 0 1 8 0v4" }));
2673
1258
  }
2674
- function jo({
2675
- id: e,
2676
- name: r,
2677
- isProtected: t,
1259
+ function Tt({
1260
+ id: t,
1261
+ name: n,
1262
+ isProtected: a,
2678
1263
  onSuccess: o,
2679
- styles: s = qe
1264
+ styles: l = X
2680
1265
  }) {
2681
- const i = nr(), c = async () => {
2682
- !e || (_e({
1266
+ const s = fe(), c = async () => {
1267
+ !t || (W({
2683
1268
  id: "for-deleting",
2684
1269
  title: "Pending",
2685
1270
  message: "Deleting data source...",
2686
1271
  loading: !0
2687
- }), await de.datasource.delete(e), le({
1272
+ }), await j.datasource.delete(t), x({
2688
1273
  id: "for-deleting",
2689
1274
  title: "Successful",
2690
- message: `Data source [${r}] is deleted`,
1275
+ message: `Data source [${n}] is deleted`,
2691
1276
  color: "green"
2692
1277
  }), o());
2693
- }, u = () => i.openConfirmModal({
1278
+ }, d = () => s.openConfirmModal({
2694
1279
  title: "Delete this data source?",
2695
- children: /* @__PURE__ */ a(Ze, {
2696
- size: s.size,
1280
+ children: /* @__PURE__ */ r(ue, {
1281
+ size: l.size,
2697
1282
  children: "This action won't affect your database."
2698
1283
  }),
2699
1284
  labels: {
@@ -2702,8 +1287,8 @@ function jo({
2702
1287
  },
2703
1288
  onCancel: () => console.log("Cancel"),
2704
1289
  onConfirm: c
2705
- }), d = Kt();
2706
- return t ? /* @__PURE__ */ a(Ht, {
1290
+ }), p = Kr();
1291
+ return a ? /* @__PURE__ */ r(Br, {
2707
1292
  withArrow: !0,
2708
1293
  events: {
2709
1294
  hover: !0,
@@ -2711,89 +1296,89 @@ function jo({
2711
1296
  focus: !1
2712
1297
  },
2713
1298
  label: "This is a preset datasource, it can not be deleted",
2714
- children: /* @__PURE__ */ a("span", {
2715
- children: /* @__PURE__ */ a(Co, {
1299
+ children: /* @__PURE__ */ r("span", {
1300
+ children: /* @__PURE__ */ r(Ct, {
2716
1301
  size: 16,
2717
- color: d.colors.gray[7]
1302
+ color: p.colors.gray[7]
2718
1303
  })
2719
1304
  })
2720
- }) : /* @__PURE__ */ a(oe, {
2721
- size: s.button.size,
1305
+ }) : /* @__PURE__ */ r(T, {
1306
+ size: l.button.size,
2722
1307
  color: "red",
2723
- onClick: u,
2724
- leftIcon: /* @__PURE__ */ a(Ar, {
1308
+ onClick: d,
1309
+ leftIcon: /* @__PURE__ */ r(De, {
2725
1310
  size: 20
2726
1311
  }),
2727
1312
  children: "Delete"
2728
1313
  });
2729
1314
  }
2730
- function Xo({
2731
- styles: e = qe,
2732
- config: r
1315
+ function en({
1316
+ styles: t = X,
1317
+ config: n
2733
1318
  }) {
2734
- or(r);
1319
+ pe(n);
2735
1320
  const {
2736
- data: t = [],
1321
+ data: a = [],
2737
1322
  loading: o,
2738
- refresh: s
2739
- } = ke(async () => {
1323
+ refresh: l
1324
+ } = G(async () => {
2740
1325
  const {
2741
- data: i
2742
- } = await de.datasource.list();
2743
- return i;
1326
+ data: s
1327
+ } = await j.datasource.list();
1328
+ return s;
2744
1329
  }, {
2745
1330
  refreshDeps: []
2746
1331
  });
2747
- return /* @__PURE__ */ I(Oe, {
2748
- children: [/* @__PURE__ */ a(se, {
2749
- pt: e.spacing,
1332
+ return /* @__PURE__ */ v(N, {
1333
+ children: [/* @__PURE__ */ r(O, {
1334
+ pt: t.spacing,
2750
1335
  position: "right",
2751
- children: /* @__PURE__ */ a(Ro, {
2752
- onSuccess: s
1336
+ children: /* @__PURE__ */ r(Rt, {
1337
+ onSuccess: l
2753
1338
  })
2754
- }), /* @__PURE__ */ I(me, {
2755
- mt: e.spacing,
1339
+ }), /* @__PURE__ */ v(F, {
1340
+ mt: t.spacing,
2756
1341
  sx: {
2757
1342
  position: "relative"
2758
1343
  },
2759
- children: [/* @__PURE__ */ a(_r, {
1344
+ children: [/* @__PURE__ */ r(Oe, {
2760
1345
  visible: o
2761
- }), /* @__PURE__ */ I(xr, {
2762
- horizontalSpacing: e.spacing,
2763
- verticalSpacing: e.spacing,
2764
- fontSize: e.size,
1346
+ }), /* @__PURE__ */ v(Ae, {
1347
+ horizontalSpacing: t.spacing,
1348
+ verticalSpacing: t.spacing,
1349
+ fontSize: t.size,
2765
1350
  highlightOnHover: !0,
2766
- children: [/* @__PURE__ */ a("thead", {
2767
- children: /* @__PURE__ */ I("tr", {
2768
- children: [/* @__PURE__ */ a("th", {
1351
+ children: [/* @__PURE__ */ r("thead", {
1352
+ children: /* @__PURE__ */ v("tr", {
1353
+ children: [/* @__PURE__ */ r("th", {
2769
1354
  children: "Type"
2770
- }), /* @__PURE__ */ a("th", {
1355
+ }), /* @__PURE__ */ r("th", {
2771
1356
  children: "Name"
2772
- }), /* @__PURE__ */ a("th", {
1357
+ }), /* @__PURE__ */ r("th", {
2773
1358
  children: "Action"
2774
1359
  })]
2775
1360
  })
2776
- }), /* @__PURE__ */ a("tbody", {
2777
- children: t.map(({
2778
- id: i,
1361
+ }), /* @__PURE__ */ r("tbody", {
1362
+ children: a.map(({
1363
+ id: s,
2779
1364
  key: c,
2780
- type: u,
2781
- is_preset: d
2782
- }) => /* @__PURE__ */ I("tr", {
2783
- children: [/* @__PURE__ */ a("td", {
1365
+ type: d,
1366
+ is_preset: p
1367
+ }) => /* @__PURE__ */ v("tr", {
1368
+ children: [/* @__PURE__ */ r("td", {
2784
1369
  width: 200,
2785
- children: u
2786
- }), /* @__PURE__ */ a("td", {
1370
+ children: d
1371
+ }), /* @__PURE__ */ r("td", {
2787
1372
  children: c
2788
- }), /* @__PURE__ */ a("td", {
1373
+ }), /* @__PURE__ */ r("td", {
2789
1374
  width: 200,
2790
- children: /* @__PURE__ */ a(se, {
1375
+ children: /* @__PURE__ */ r(O, {
2791
1376
  position: "left",
2792
- children: /* @__PURE__ */ a(jo, {
2793
- isProtected: d,
2794
- id: i,
1377
+ children: /* @__PURE__ */ r(Tt, {
1378
+ isProtected: p,
1379
+ id: s,
2795
1380
  name: c,
2796
- onSuccess: s
1381
+ onSuccess: l
2797
1382
  })
2798
1383
  })
2799
1384
  })]
@@ -2803,49 +1388,49 @@ function Xo({
2803
1388
  })]
2804
1389
  });
2805
1390
  }
2806
- const Ao = Cr(({
2807
- label: e,
2808
- value: r,
2809
- description: t,
1391
+ const zt = ke(({
1392
+ label: t,
1393
+ value: n,
1394
+ description: a,
2810
1395
  ...o
2811
- }, s) => /* @__PURE__ */ I(Rr, {
1396
+ }, l) => /* @__PURE__ */ v(ze, {
2812
1397
  spacing: 2,
2813
- ref: s,
1398
+ ref: l,
2814
1399
  ...o,
2815
- children: [/* @__PURE__ */ a(Ze, {
1400
+ children: [/* @__PURE__ */ r(ue, {
2816
1401
  size: "sm",
2817
- children: e
2818
- }), /* @__PURE__ */ a(Ze, {
1402
+ children: t
1403
+ }), /* @__PURE__ */ r(ue, {
2819
1404
  size: "xs",
2820
1405
  color: "dimmed",
2821
1406
  className: "role-description",
2822
- children: t
1407
+ children: a
2823
1408
  })]
2824
- })), kr = Cr(({
2825
- styles: e,
2826
- value: r,
2827
- onChange: t
1409
+ })), je = ke(({
1410
+ styles: t,
1411
+ value: n,
1412
+ onChange: a
2828
1413
  }, o) => {
2829
1414
  const {
2830
- data: s = [],
2831
- loading: i
2832
- } = ke(async () => (await de.role.list()).map((u) => ({
2833
- label: u.name,
2834
- value: u.id,
2835
- description: u.description,
2836
- disabled: u.id === 50
1415
+ data: l = [],
1416
+ loading: s
1417
+ } = G(async () => (await j.role.list()).map((d) => ({
1418
+ label: d.name,
1419
+ value: d.id,
1420
+ description: d.description,
1421
+ disabled: d.id === 50
2837
1422
  })), {
2838
1423
  refreshDeps: []
2839
1424
  });
2840
- return /* @__PURE__ */ a(Gt, {
1425
+ return /* @__PURE__ */ r(Gr, {
2841
1426
  ref: o,
2842
- mb: e.spacing,
2843
- size: e.size,
1427
+ mb: t.spacing,
1428
+ size: t.size,
2844
1429
  required: !0,
2845
1430
  label: "Role",
2846
- itemComponent: Ao,
2847
- data: s,
2848
- disabled: i,
1431
+ itemComponent: zt,
1432
+ data: l,
1433
+ disabled: s,
2849
1434
  styles: () => ({
2850
1435
  item: {
2851
1436
  "&[data-selected]": {
@@ -2857,687 +1442,687 @@ const Ao = Cr(({
2857
1442
  }
2858
1443
  }
2859
1444
  }),
2860
- value: r,
2861
- onChange: t
1445
+ value: n,
1446
+ onChange: a
2862
1447
  });
2863
- }), xe = {
1448
+ }), V = {
2864
1449
  size: "sm",
2865
1450
  spacing: "md",
2866
1451
  button: {
2867
1452
  size: "xs"
2868
1453
  }
2869
1454
  };
2870
- function Mo({
2871
- postSubmit: e,
2872
- styles: r = xe,
2873
- initialRoleID: t
1455
+ function Ot({
1456
+ postSubmit: t,
1457
+ styles: n = V,
1458
+ initialRoleID: a
2874
1459
  }) {
2875
1460
  const {
2876
1461
  control: o,
2877
- handleSubmit: s
2878
- } = De({
1462
+ handleSubmit: l
1463
+ } = J({
2879
1464
  defaultValues: {
2880
1465
  name: "",
2881
1466
  email: "",
2882
- role_id: t,
1467
+ role_id: a,
2883
1468
  password: ""
2884
1469
  }
2885
1470
  });
2886
- return /* @__PURE__ */ a(me, {
1471
+ return /* @__PURE__ */ r(F, {
2887
1472
  mx: "auto",
2888
- children: /* @__PURE__ */ I("form", {
2889
- onSubmit: s(async ({
1473
+ children: /* @__PURE__ */ v("form", {
1474
+ onSubmit: l(async ({
2890
1475
  name: c,
2891
- email: u,
2892
- password: d,
2893
- role_id: v
1476
+ email: d,
1477
+ password: p,
1478
+ role_id: b
2894
1479
  }) => {
2895
1480
  try {
2896
- _e({
1481
+ W({
2897
1482
  id: "for-creating",
2898
1483
  title: "Pending",
2899
1484
  message: "Adding account...",
2900
1485
  loading: !0
2901
- }), await de.account.create(c, u, d, v), le({
1486
+ }), await j.account.create(c, d, p, b), x({
2902
1487
  id: "for-creating",
2903
1488
  title: "Successful",
2904
1489
  message: "Account is added",
2905
1490
  color: "green"
2906
- }), e();
2907
- } catch (y) {
2908
- le({
1491
+ }), t();
1492
+ } catch (S) {
1493
+ x({
2909
1494
  id: "for-creating",
2910
1495
  title: "Failed",
2911
- message: y.message,
1496
+ message: S.message,
2912
1497
  color: "red"
2913
1498
  });
2914
1499
  }
2915
1500
  }),
2916
- children: [/* @__PURE__ */ a(J, {
1501
+ children: [/* @__PURE__ */ r(R, {
2917
1502
  name: "name",
2918
1503
  control: o,
2919
1504
  render: ({
2920
1505
  field: c
2921
- }) => /* @__PURE__ */ a(fe, {
2922
- mb: r.spacing,
2923
- size: r.size,
1506
+ }) => /* @__PURE__ */ r(D, {
1507
+ mb: n.spacing,
1508
+ size: n.size,
2924
1509
  required: !0,
2925
1510
  label: "Username",
2926
1511
  ...c
2927
1512
  })
2928
- }), /* @__PURE__ */ a(J, {
1513
+ }), /* @__PURE__ */ r(R, {
2929
1514
  name: "email",
2930
1515
  control: o,
2931
1516
  render: ({
2932
1517
  field: c
2933
- }) => /* @__PURE__ */ a(fe, {
2934
- mb: r.spacing,
2935
- size: r.size,
1518
+ }) => /* @__PURE__ */ r(D, {
1519
+ mb: n.spacing,
1520
+ size: n.size,
2936
1521
  required: !0,
2937
1522
  label: "Email",
2938
1523
  ...c
2939
1524
  })
2940
- }), /* @__PURE__ */ a(J, {
1525
+ }), /* @__PURE__ */ r(R, {
2941
1526
  name: "password",
2942
1527
  control: o,
2943
1528
  render: ({
2944
1529
  field: c
2945
- }) => /* @__PURE__ */ a(tr, {
2946
- mb: r.spacing,
2947
- size: r.size,
1530
+ }) => /* @__PURE__ */ r(de, {
1531
+ mb: n.spacing,
1532
+ size: n.size,
2948
1533
  required: !0,
2949
1534
  label: "Password",
2950
1535
  description: "Password must be at least 8 characters long",
2951
1536
  ...c
2952
1537
  })
2953
- }), /* @__PURE__ */ a(J, {
1538
+ }), /* @__PURE__ */ r(R, {
2954
1539
  name: "role_id",
2955
1540
  control: o,
2956
1541
  render: ({
2957
1542
  field: c
2958
- }) => /* @__PURE__ */ a(kr, {
2959
- styles: r,
1543
+ }) => /* @__PURE__ */ r(je, {
1544
+ styles: n,
2960
1545
  ...c
2961
1546
  })
2962
- }), /* @__PURE__ */ a(se, {
1547
+ }), /* @__PURE__ */ r(O, {
2963
1548
  position: "right",
2964
- mt: r.spacing,
2965
- children: /* @__PURE__ */ a(oe, {
1549
+ mt: n.spacing,
1550
+ children: /* @__PURE__ */ r(T, {
2966
1551
  type: "submit",
2967
- size: r.button.size,
1552
+ size: n.button.size,
2968
1553
  children: "Save"
2969
1554
  })
2970
1555
  })]
2971
1556
  })
2972
1557
  });
2973
1558
  }
2974
- function Io({
2975
- onSuccess: e,
2976
- styles: r = xe,
2977
- initialRoleID: t
1559
+ function At({
1560
+ onSuccess: t,
1561
+ styles: n = V,
1562
+ initialRoleID: a
2978
1563
  }) {
2979
- const [o, s] = ze.useState(!1), i = () => s(!0), c = () => s(!1);
2980
- return /* @__PURE__ */ I(Oe, {
2981
- children: [/* @__PURE__ */ a(Be, {
1564
+ const [o, l] = H.useState(!1), s = () => l(!0), c = () => l(!1);
1565
+ return /* @__PURE__ */ v(N, {
1566
+ children: [/* @__PURE__ */ r(ne, {
2982
1567
  overflow: "inside",
2983
1568
  opened: o,
2984
- onClose: () => s(!1),
1569
+ onClose: () => l(!1),
2985
1570
  title: "Add an Account",
2986
1571
  trapFocus: !0,
2987
- onDragStart: (d) => {
2988
- d.stopPropagation();
1572
+ onDragStart: (p) => {
1573
+ p.stopPropagation();
2989
1574
  },
2990
- children: /* @__PURE__ */ a(Mo, {
1575
+ children: /* @__PURE__ */ r(Ot, {
2991
1576
  postSubmit: () => {
2992
- e(), c();
1577
+ t(), c();
2993
1578
  },
2994
- styles: r,
2995
- initialRoleID: t
1579
+ styles: n,
1580
+ initialRoleID: a
2996
1581
  })
2997
- }), /* @__PURE__ */ a(oe, {
2998
- size: r.button.size,
2999
- onClick: i,
3000
- leftIcon: /* @__PURE__ */ a(jr, {
1582
+ }), /* @__PURE__ */ r(T, {
1583
+ size: n.button.size,
1584
+ onClick: s,
1585
+ leftIcon: /* @__PURE__ */ r(xe, {
3001
1586
  size: 20
3002
1587
  }),
3003
1588
  children: "Add an Account"
3004
1589
  })]
3005
1590
  });
3006
1591
  }
3007
- function ko({
3008
- id: e,
3009
- name: r,
3010
- onSuccess: t,
3011
- styles: o = xe
1592
+ function kt({
1593
+ id: t,
1594
+ name: n,
1595
+ onSuccess: a,
1596
+ styles: o = V
3012
1597
  }) {
3013
- const s = nr(), i = async () => {
3014
- if (!!e) {
3015
- _e({
1598
+ const l = fe(), s = async () => {
1599
+ if (!!t) {
1600
+ W({
3016
1601
  id: "for-deleting",
3017
1602
  title: "Pending",
3018
1603
  message: "Deleting account...",
3019
1604
  loading: !0
3020
1605
  });
3021
1606
  try {
3022
- await de.account.delete(e), le({
1607
+ await j.account.delete(t), x({
3023
1608
  id: "for-deleting",
3024
1609
  title: "Successful",
3025
- message: `Account [${r}] is deleted`,
1610
+ message: `Account [${n}] is deleted`,
3026
1611
  color: "green"
3027
- }), t();
3028
- } catch (u) {
3029
- le({
1612
+ }), a();
1613
+ } catch (d) {
1614
+ x({
3030
1615
  id: "for-deleting",
3031
1616
  title: "Failed",
3032
- message: u.message,
1617
+ message: d.message,
3033
1618
  color: "red"
3034
1619
  });
3035
1620
  }
3036
1621
  }
3037
- }, c = () => s.openConfirmModal({
1622
+ }, c = () => l.openConfirmModal({
3038
1623
  title: "Delete this account?",
3039
1624
  labels: {
3040
1625
  confirm: "Confirm",
3041
1626
  cancel: "Cancel"
3042
1627
  },
3043
1628
  onCancel: () => console.log("Cancel"),
3044
- onConfirm: i
1629
+ onConfirm: s
3045
1630
  });
3046
- return /* @__PURE__ */ a(oe, {
1631
+ return /* @__PURE__ */ r(T, {
3047
1632
  size: o.button.size,
3048
1633
  color: "red",
3049
1634
  onClick: c,
3050
- leftIcon: /* @__PURE__ */ a(Ar, {
1635
+ leftIcon: /* @__PURE__ */ r(De, {
3051
1636
  size: 20
3052
1637
  }),
3053
1638
  children: "Delete"
3054
1639
  });
3055
1640
  }
3056
- function zo({
3057
- id: e,
3058
- name: r,
3059
- email: t,
1641
+ function xt({
1642
+ id: t,
1643
+ name: n,
1644
+ email: a,
3060
1645
  role_id: o,
3061
- postSubmit: s,
3062
- styles: i = xe
1646
+ postSubmit: l,
1647
+ styles: s = V
3063
1648
  }) {
3064
1649
  const {
3065
1650
  control: c,
3066
- handleSubmit: u,
3067
- watch: d
3068
- } = De({
1651
+ handleSubmit: d,
1652
+ watch: p
1653
+ } = J({
3069
1654
  defaultValues: {
3070
- name: r,
3071
- email: t,
1655
+ name: n,
1656
+ email: a,
3072
1657
  role_id: o,
3073
1658
  reset_password: !1,
3074
1659
  new_password: ""
3075
1660
  }
3076
- }), v = async ({
3077
- name: m,
3078
- email: x,
3079
- role_id: Y,
3080
- reset_password: z,
3081
- new_password: G
1661
+ }), b = async ({
1662
+ name: f,
1663
+ email: z,
1664
+ role_id: q,
1665
+ reset_password: $,
1666
+ new_password: he
3082
1667
  }) => {
3083
1668
  try {
3084
- _e({
1669
+ W({
3085
1670
  id: "for-updating",
3086
1671
  title: "Pending",
3087
1672
  message: "Updating account...",
3088
1673
  loading: !0
3089
- }), await de.account.edit({
3090
- id: e,
3091
- name: m,
3092
- email: x,
3093
- role_id: Y,
3094
- reset_password: z,
3095
- new_password: G
3096
- }), le({
1674
+ }), await j.account.edit({
1675
+ id: t,
1676
+ name: f,
1677
+ email: z,
1678
+ role_id: q,
1679
+ reset_password: $,
1680
+ new_password: he
1681
+ }), x({
3097
1682
  id: "for-updating",
3098
1683
  title: "Successful",
3099
1684
  message: "Account is updated",
3100
1685
  color: "green"
3101
- }), s();
3102
- } catch (K) {
3103
- le({
1686
+ }), l();
1687
+ } catch (U) {
1688
+ x({
3104
1689
  id: "for-updating",
3105
1690
  title: "Failed",
3106
- message: K.message,
1691
+ message: U.message,
3107
1692
  color: "red"
3108
1693
  });
3109
1694
  }
3110
- }, [y, h] = d(["reset_password", "new_password"]);
3111
- return /* @__PURE__ */ a(me, {
1695
+ }, [S, m] = p(["reset_password", "new_password"]);
1696
+ return /* @__PURE__ */ r(F, {
3112
1697
  mx: "auto",
3113
- children: /* @__PURE__ */ I("form", {
3114
- onSubmit: u(v),
3115
- children: [/* @__PURE__ */ a(J, {
1698
+ children: /* @__PURE__ */ v("form", {
1699
+ onSubmit: d(b),
1700
+ children: [/* @__PURE__ */ r(R, {
3116
1701
  name: "name",
3117
1702
  control: c,
3118
1703
  render: ({
3119
- field: m
3120
- }) => /* @__PURE__ */ a(fe, {
3121
- mb: i.spacing,
3122
- size: i.size,
1704
+ field: f
1705
+ }) => /* @__PURE__ */ r(D, {
1706
+ mb: s.spacing,
1707
+ size: s.size,
3123
1708
  required: !0,
3124
1709
  label: "Username",
3125
- ...m
1710
+ ...f
3126
1711
  })
3127
- }), /* @__PURE__ */ a(J, {
1712
+ }), /* @__PURE__ */ r(R, {
3128
1713
  name: "email",
3129
1714
  control: c,
3130
1715
  render: ({
3131
- field: m
3132
- }) => /* @__PURE__ */ a(fe, {
3133
- mb: i.spacing,
3134
- size: i.size,
1716
+ field: f
1717
+ }) => /* @__PURE__ */ r(D, {
1718
+ mb: s.spacing,
1719
+ size: s.size,
3135
1720
  required: !0,
3136
1721
  label: "Email",
3137
- ...m
1722
+ ...f
3138
1723
  })
3139
- }), /* @__PURE__ */ a(J, {
1724
+ }), /* @__PURE__ */ r(R, {
3140
1725
  name: "role_id",
3141
1726
  control: c,
3142
1727
  render: ({
3143
- field: m
3144
- }) => /* @__PURE__ */ a(kr, {
3145
- styles: i,
3146
- ...m
1728
+ field: f
1729
+ }) => /* @__PURE__ */ r(je, {
1730
+ styles: s,
1731
+ ...f
3147
1732
  })
3148
- }), /* @__PURE__ */ a(Pr, {
1733
+ }), /* @__PURE__ */ r(Te, {
3149
1734
  my: 20,
3150
1735
  variant: "dashed",
3151
1736
  label: "",
3152
1737
  labelPosition: "center"
3153
- }), /* @__PURE__ */ a(J, {
1738
+ }), /* @__PURE__ */ r(R, {
3154
1739
  name: "reset_password",
3155
1740
  control: c,
3156
1741
  render: ({
3157
- field: m
3158
- }) => /* @__PURE__ */ a(Jt, {
3159
- mb: i.spacing,
3160
- size: i.size,
1742
+ field: f
1743
+ }) => /* @__PURE__ */ r(Hr, {
1744
+ mb: s.spacing,
1745
+ size: s.size,
3161
1746
  label: "Reset password",
3162
- checked: m.value,
3163
- onChange: (x) => m.onChange(x.currentTarget.checked),
1747
+ checked: f.value,
1748
+ onChange: (z) => f.onChange(z.currentTarget.checked),
3164
1749
  styles: {
3165
1750
  label: {
3166
1751
  verticalAlign: "middle"
3167
1752
  }
3168
1753
  }
3169
1754
  })
3170
- }), y && /* @__PURE__ */ a(J, {
1755
+ }), S && /* @__PURE__ */ r(R, {
3171
1756
  name: "new_password",
3172
1757
  control: c,
3173
1758
  render: ({
3174
- field: m
3175
- }) => /* @__PURE__ */ a(tr, {
1759
+ field: f
1760
+ }) => /* @__PURE__ */ r(de, {
3176
1761
  autoComplete: "off",
3177
- mb: i.spacing,
3178
- size: i.size,
1762
+ mb: s.spacing,
1763
+ size: s.size,
3179
1764
  required: !0,
3180
1765
  description: "Password must be at least 8 characters long",
3181
1766
  label: "New Password",
3182
- ...m
1767
+ ...f
3183
1768
  })
3184
- }), /* @__PURE__ */ a(se, {
1769
+ }), /* @__PURE__ */ r(O, {
3185
1770
  position: "right",
3186
- mt: i.spacing,
3187
- children: /* @__PURE__ */ a(oe, {
1771
+ mt: s.spacing,
1772
+ children: /* @__PURE__ */ r(T, {
3188
1773
  type: "submit",
3189
- size: i.button.size,
1774
+ size: s.button.size,
3190
1775
  children: "Submit"
3191
1776
  })
3192
1777
  })]
3193
1778
  })
3194
1779
  });
3195
1780
  }
3196
- function Do({
3197
- account: e,
3198
- onSuccess: r,
3199
- styles: t = xe
1781
+ function Dt({
1782
+ account: t,
1783
+ onSuccess: n,
1784
+ styles: a = V
3200
1785
  }) {
3201
- const [o, s] = ze.useState(!1), i = () => s(!0), c = () => s(!1), u = () => {
3202
- r(), c();
1786
+ const [o, l] = H.useState(!1), s = () => l(!0), c = () => l(!1), d = () => {
1787
+ n(), c();
3203
1788
  };
3204
- return /* @__PURE__ */ I(Oe, {
3205
- children: [/* @__PURE__ */ a(Be, {
1789
+ return /* @__PURE__ */ v(N, {
1790
+ children: [/* @__PURE__ */ r(ne, {
3206
1791
  overflow: "inside",
3207
1792
  opened: o,
3208
- onClose: () => s(!1),
3209
- title: `Editing ${e.name}`,
1793
+ onClose: () => l(!1),
1794
+ title: `Editing ${t.name}`,
3210
1795
  trapFocus: !0,
3211
- onDragStart: (d) => {
3212
- d.stopPropagation();
1796
+ onDragStart: (p) => {
1797
+ p.stopPropagation();
3213
1798
  },
3214
- children: /* @__PURE__ */ a(zo, {
3215
- ...e,
3216
- postSubmit: u,
3217
- styles: t
1799
+ children: /* @__PURE__ */ r(xt, {
1800
+ ...t,
1801
+ postSubmit: d,
1802
+ styles: a
3218
1803
  })
3219
- }), /* @__PURE__ */ a(oe, {
3220
- size: t.button.size,
3221
- onClick: i,
3222
- leftIcon: /* @__PURE__ */ a(Qt, {
1804
+ }), /* @__PURE__ */ r(T, {
1805
+ size: a.button.size,
1806
+ onClick: s,
1807
+ leftIcon: /* @__PURE__ */ r(Xr, {
3223
1808
  size: 20
3224
1809
  }),
3225
1810
  children: "Edit"
3226
1811
  })]
3227
1812
  });
3228
1813
  }
3229
- function Qo({
3230
- styles: e = xe,
3231
- config: r
1814
+ function rn({
1815
+ styles: t = V,
1816
+ config: n
3232
1817
  }) {
3233
- var v, y;
3234
- or(r);
1818
+ var b, S;
1819
+ pe(n);
3235
1820
  const {
3236
- data: t = [],
1821
+ data: a = [],
3237
1822
  loading: o,
3238
- refresh: s
3239
- } = ke(async () => {
1823
+ refresh: l
1824
+ } = G(async () => {
3240
1825
  const {
3241
- data: h
3242
- } = await de.account.list();
3243
- return h;
1826
+ data: m
1827
+ } = await j.account.list();
1828
+ return m;
3244
1829
  }, {
3245
1830
  refreshDeps: []
3246
1831
  }), {
3247
- data: i = [],
1832
+ data: s = [],
3248
1833
  loading: c
3249
- } = ke(async () => (await de.role.list()).map((m) => ({
3250
- label: m.name,
3251
- value: m.id,
3252
- description: m.description,
3253
- disabled: m.id === 50
1834
+ } = G(async () => (await j.role.list()).map((f) => ({
1835
+ label: f.name,
1836
+ value: f.id,
1837
+ description: f.description,
1838
+ disabled: f.id === 50
3254
1839
  })), {
3255
1840
  refreshDeps: []
3256
- }), u = pt(() => i.reduce((h, m) => (h.set(m.value, m.label), h), /* @__PURE__ */ new Map()), [i]), d = (h) => {
3257
- var m;
3258
- return (m = u.get(h)) != null ? m : h;
1841
+ }), d = ur(() => s.reduce((m, f) => (m.set(f.value, f.label), m), /* @__PURE__ */ new Map()), [s]), p = (m) => {
1842
+ var f;
1843
+ return (f = d.get(m)) != null ? f : m;
3259
1844
  };
3260
- return /* @__PURE__ */ I(Oe, {
3261
- children: [/* @__PURE__ */ a(se, {
3262
- pt: e.spacing,
1845
+ return /* @__PURE__ */ v(N, {
1846
+ children: [/* @__PURE__ */ r(O, {
1847
+ pt: t.spacing,
3263
1848
  position: "right",
3264
- children: /* @__PURE__ */ a(Io, {
3265
- onSuccess: s,
3266
- initialRoleID: (y = (v = i == null ? void 0 : i[0]) == null ? void 0 : v.value) != null ? y : 0
1849
+ children: /* @__PURE__ */ r(At, {
1850
+ onSuccess: l,
1851
+ initialRoleID: (S = (b = s == null ? void 0 : s[0]) == null ? void 0 : b.value) != null ? S : 0
3267
1852
  })
3268
- }), /* @__PURE__ */ I(me, {
3269
- mt: e.spacing,
1853
+ }), /* @__PURE__ */ v(F, {
1854
+ mt: t.spacing,
3270
1855
  sx: {
3271
1856
  position: "relative"
3272
1857
  },
3273
- children: [/* @__PURE__ */ a(_r, {
1858
+ children: [/* @__PURE__ */ r(Oe, {
3274
1859
  visible: o || c
3275
- }), /* @__PURE__ */ I(xr, {
3276
- horizontalSpacing: e.spacing,
3277
- verticalSpacing: e.spacing,
3278
- fontSize: e.size,
1860
+ }), /* @__PURE__ */ v(Ae, {
1861
+ horizontalSpacing: t.spacing,
1862
+ verticalSpacing: t.spacing,
1863
+ fontSize: t.size,
3279
1864
  highlightOnHover: !0,
3280
- children: [/* @__PURE__ */ a("thead", {
3281
- children: /* @__PURE__ */ I("tr", {
3282
- children: [/* @__PURE__ */ a("th", {
1865
+ children: [/* @__PURE__ */ r("thead", {
1866
+ children: /* @__PURE__ */ v("tr", {
1867
+ children: [/* @__PURE__ */ r("th", {
3283
1868
  children: "Username"
3284
- }), /* @__PURE__ */ a("th", {
1869
+ }), /* @__PURE__ */ r("th", {
3285
1870
  children: "Email"
3286
- }), /* @__PURE__ */ a("th", {
1871
+ }), /* @__PURE__ */ r("th", {
3287
1872
  children: "Role"
3288
- }), /* @__PURE__ */ a("th", {
1873
+ }), /* @__PURE__ */ r("th", {
3289
1874
  children: "Action"
3290
1875
  })]
3291
1876
  })
3292
- }), /* @__PURE__ */ a("tbody", {
3293
- children: t.map((h) => {
1877
+ }), /* @__PURE__ */ r("tbody", {
1878
+ children: a.map((m) => {
3294
1879
  const {
3295
- id: m,
3296
- name: x,
3297
- email: Y,
3298
- role_id: z
3299
- } = h;
3300
- return /* @__PURE__ */ I("tr", {
3301
- children: [/* @__PURE__ */ a("td", {
1880
+ id: f,
1881
+ name: z,
1882
+ email: q,
1883
+ role_id: $
1884
+ } = m;
1885
+ return /* @__PURE__ */ v("tr", {
1886
+ children: [/* @__PURE__ */ r("td", {
3302
1887
  width: 200,
3303
- children: x
3304
- }), /* @__PURE__ */ a("td", {
1888
+ children: z
1889
+ }), /* @__PURE__ */ r("td", {
3305
1890
  width: 200,
3306
- children: Y
3307
- }), /* @__PURE__ */ a("td", {
1891
+ children: q
1892
+ }), /* @__PURE__ */ r("td", {
3308
1893
  width: 200,
3309
- children: d(z)
3310
- }), /* @__PURE__ */ a("td", {
1894
+ children: p($)
1895
+ }), /* @__PURE__ */ r("td", {
3311
1896
  width: 200,
3312
- children: /* @__PURE__ */ I(se, {
1897
+ children: /* @__PURE__ */ v(O, {
3313
1898
  position: "left",
3314
- children: [/* @__PURE__ */ a(Do, {
3315
- account: h,
3316
- onSuccess: s
3317
- }), /* @__PURE__ */ a(ko, {
3318
- id: m,
3319
- name: x,
3320
- onSuccess: s
1899
+ children: [/* @__PURE__ */ r(Dt, {
1900
+ account: m,
1901
+ onSuccess: l
1902
+ }), /* @__PURE__ */ r(kt, {
1903
+ id: f,
1904
+ name: z,
1905
+ onSuccess: l
3321
1906
  })]
3322
1907
  })
3323
1908
  })]
3324
- }, m);
1909
+ }, f);
3325
1910
  })
3326
1911
  })]
3327
1912
  })]
3328
1913
  })]
3329
1914
  });
3330
1915
  }
3331
- function qo({
3332
- postSubmit: e,
3333
- styles: r = xe
1916
+ function jt({
1917
+ postSubmit: t,
1918
+ styles: n = V
3334
1919
  }) {
3335
1920
  const {
3336
- control: t,
1921
+ control: a,
3337
1922
  handleSubmit: o
3338
- } = De({
1923
+ } = J({
3339
1924
  defaultValues: {
3340
1925
  name: "",
3341
1926
  password: ""
3342
1927
  }
3343
1928
  });
3344
- return /* @__PURE__ */ a(me, {
1929
+ return /* @__PURE__ */ r(F, {
3345
1930
  mx: "auto",
3346
- children: /* @__PURE__ */ I("form", {
1931
+ children: /* @__PURE__ */ v("form", {
3347
1932
  onSubmit: o(async ({
3348
- name: i,
1933
+ name: s,
3349
1934
  password: c
3350
1935
  }) => {
3351
1936
  try {
3352
- _e({
1937
+ W({
3353
1938
  id: "for-login",
3354
1939
  title: "Pending",
3355
1940
  message: "Loggin in...",
3356
1941
  loading: !0
3357
1942
  });
3358
- const u = await de.account.login(i, c);
3359
- window.localStorage.setItem("token", u.token), le({
1943
+ const d = await j.account.login(s, c);
1944
+ window.localStorage.setItem("token", d.token), x({
3360
1945
  id: "for-login",
3361
1946
  title: "Successful",
3362
1947
  message: "Logged in",
3363
1948
  color: "green"
3364
- }), e(u);
3365
- } catch (u) {
3366
- le({
1949
+ }), t(d);
1950
+ } catch (d) {
1951
+ x({
3367
1952
  id: "for-login",
3368
1953
  title: "Login Failed",
3369
- message: u.message,
1954
+ message: d.message,
3370
1955
  color: "red"
3371
1956
  });
3372
1957
  }
3373
1958
  }),
3374
- children: [/* @__PURE__ */ a(J, {
1959
+ children: [/* @__PURE__ */ r(R, {
3375
1960
  name: "name",
3376
- control: t,
1961
+ control: a,
3377
1962
  render: ({
3378
- field: i
3379
- }) => /* @__PURE__ */ a(fe, {
3380
- mb: r.spacing,
3381
- size: r.size,
1963
+ field: s
1964
+ }) => /* @__PURE__ */ r(D, {
1965
+ mb: n.spacing,
1966
+ size: n.size,
3382
1967
  required: !0,
3383
1968
  label: "Username",
3384
- ...i
1969
+ ...s
3385
1970
  })
3386
- }), /* @__PURE__ */ a(J, {
1971
+ }), /* @__PURE__ */ r(R, {
3387
1972
  name: "password",
3388
- control: t,
1973
+ control: a,
3389
1974
  render: ({
3390
- field: i
3391
- }) => /* @__PURE__ */ a(tr, {
3392
- mb: r.spacing,
3393
- size: r.size,
1975
+ field: s
1976
+ }) => /* @__PURE__ */ r(de, {
1977
+ mb: n.spacing,
1978
+ size: n.size,
3394
1979
  required: !0,
3395
1980
  label: "Password",
3396
- ...i
1981
+ ...s
3397
1982
  })
3398
- }), /* @__PURE__ */ a(se, {
1983
+ }), /* @__PURE__ */ r(O, {
3399
1984
  position: "right",
3400
- mt: r.spacing,
3401
- children: /* @__PURE__ */ a(oe, {
1985
+ mt: n.spacing,
1986
+ children: /* @__PURE__ */ r(T, {
3402
1987
  type: "submit",
3403
- size: r.button.size,
1988
+ size: n.button.size,
3404
1989
  children: "Submit"
3405
1990
  })
3406
1991
  })]
3407
1992
  })
3408
1993
  });
3409
1994
  }
3410
- function Zo({
3411
- styles: e = xe,
3412
- config: r,
3413
- onSuccess: t
1995
+ function tn({
1996
+ styles: t = V,
1997
+ config: n,
1998
+ onSuccess: a
3414
1999
  }) {
3415
- return or(r), /* @__PURE__ */ a(Oe, {
3416
- children: /* @__PURE__ */ a(me, {
3417
- mt: e.spacing,
2000
+ return pe(n), /* @__PURE__ */ r(N, {
2001
+ children: /* @__PURE__ */ r(F, {
2002
+ mt: t.spacing,
3418
2003
  sx: {
3419
2004
  position: "relative"
3420
2005
  },
3421
- children: /* @__PURE__ */ a(qo, {
3422
- styles: e,
3423
- postSubmit: t
2006
+ children: /* @__PURE__ */ r(jt, {
2007
+ styles: t,
2008
+ postSubmit: a
3424
2009
  })
3425
2010
  })
3426
2011
  });
3427
2012
  }
3428
- const sr = {
2013
+ const me = {
3429
2014
  size: "sm",
3430
2015
  spacing: "md",
3431
2016
  button: {
3432
2017
  size: "xs"
3433
2018
  }
3434
2019
  };
3435
- function $o({
3436
- postSubmit: e,
3437
- styles: r = sr,
3438
- initialRoleID: t
2020
+ function It({
2021
+ postSubmit: t,
2022
+ styles: n = me,
2023
+ initialRoleID: a
3439
2024
  }) {
3440
2025
  const {
3441
2026
  control: o,
3442
- handleSubmit: s
3443
- } = De({
2027
+ handleSubmit: l
2028
+ } = J({
3444
2029
  defaultValues: {
3445
2030
  name: "",
3446
- role_id: t
2031
+ role_id: a
3447
2032
  }
3448
2033
  });
3449
- return /* @__PURE__ */ a(me, {
2034
+ return /* @__PURE__ */ r(F, {
3450
2035
  mx: "auto",
3451
- children: /* @__PURE__ */ I("form", {
3452
- onSubmit: s(async ({
2036
+ children: /* @__PURE__ */ v("form", {
2037
+ onSubmit: l(async ({
3453
2038
  name: c,
3454
- role_id: u
2039
+ role_id: d
3455
2040
  }) => {
3456
2041
  try {
3457
- _e({
2042
+ W({
3458
2043
  id: "for-creating",
3459
2044
  title: "Pending",
3460
2045
  message: "Adding API Key...",
3461
2046
  loading: !0
3462
2047
  });
3463
2048
  const {
3464
- app_id: d,
3465
- app_secret: v
3466
- } = await de.api_key.create(c, u);
3467
- le({
2049
+ app_id: p,
2050
+ app_secret: b
2051
+ } = await j.api_key.create(c, d);
2052
+ x({
3468
2053
  id: "for-creating",
3469
2054
  title: "Successful",
3470
2055
  message: "API Key is added",
3471
2056
  color: "green"
3472
- }), e(d, v);
3473
- } catch (d) {
3474
- le({
2057
+ }), t(p, b);
2058
+ } catch (p) {
2059
+ x({
3475
2060
  id: "for-creating",
3476
2061
  title: "Failed",
3477
- message: d.message,
2062
+ message: p.message,
3478
2063
  color: "red"
3479
2064
  });
3480
2065
  }
3481
2066
  }),
3482
- children: [/* @__PURE__ */ a(J, {
2067
+ children: [/* @__PURE__ */ r(R, {
3483
2068
  name: "name",
3484
2069
  control: o,
3485
2070
  render: ({
3486
2071
  field: c
3487
- }) => /* @__PURE__ */ a(fe, {
3488
- mb: r.spacing,
3489
- size: r.size,
2072
+ }) => /* @__PURE__ */ r(D, {
2073
+ mb: n.spacing,
2074
+ size: n.size,
3490
2075
  required: !0,
3491
2076
  label: "Name",
3492
2077
  ...c
3493
2078
  })
3494
- }), /* @__PURE__ */ a(J, {
2079
+ }), /* @__PURE__ */ r(R, {
3495
2080
  name: "role_id",
3496
2081
  control: o,
3497
2082
  render: ({
3498
2083
  field: c
3499
- }) => /* @__PURE__ */ a(kr, {
3500
- styles: r,
2084
+ }) => /* @__PURE__ */ r(je, {
2085
+ styles: n,
3501
2086
  ...c
3502
2087
  })
3503
- }), /* @__PURE__ */ a(se, {
2088
+ }), /* @__PURE__ */ r(O, {
3504
2089
  position: "right",
3505
- mt: r.spacing,
3506
- children: /* @__PURE__ */ a(oe, {
2090
+ mt: n.spacing,
2091
+ children: /* @__PURE__ */ r(T, {
3507
2092
  type: "submit",
3508
- size: r.button.size,
2093
+ size: n.button.size,
3509
2094
  children: "Save"
3510
2095
  })
3511
2096
  })]
3512
2097
  })
3513
2098
  });
3514
2099
  }
3515
- function Fo({
3516
- onSuccess: e,
3517
- styles: r = sr,
3518
- initialRoleID: t
2100
+ function Ft({
2101
+ onSuccess: t,
2102
+ styles: n = me,
2103
+ initialRoleID: a
3519
2104
  }) {
3520
- const o = nr(), [s, i] = ze.useState(!1), c = () => i(!0), u = () => i(!1);
3521
- return /* @__PURE__ */ I(Oe, {
3522
- children: [/* @__PURE__ */ a(Be, {
2105
+ const o = fe(), [l, s] = H.useState(!1), c = () => s(!0), d = () => s(!1);
2106
+ return /* @__PURE__ */ v(N, {
2107
+ children: [/* @__PURE__ */ r(ne, {
3523
2108
  overflow: "inside",
3524
- opened: s,
3525
- onClose: () => i(!1),
2109
+ opened: l,
2110
+ onClose: () => s(!1),
3526
2111
  title: "Add an API Key",
3527
2112
  trapFocus: !0,
3528
- onDragStart: (v) => {
3529
- v.stopPropagation();
2113
+ onDragStart: (b) => {
2114
+ b.stopPropagation();
3530
2115
  },
3531
- children: /* @__PURE__ */ a($o, {
3532
- postSubmit: (v, y) => {
3533
- u(), o.openModal({
2116
+ children: /* @__PURE__ */ r(It, {
2117
+ postSubmit: (b, S) => {
2118
+ d(), o.openModal({
3534
2119
  title: "API Key is generated",
3535
- children: /* @__PURE__ */ I(Rr, {
3536
- children: [/* @__PURE__ */ a(Ze, {
2120
+ children: /* @__PURE__ */ v(ze, {
2121
+ children: [/* @__PURE__ */ r(ue, {
3537
2122
  color: "dimmed",
3538
2123
  children: "Make sure you save it - you won't be able to access it again."
3539
- }), /* @__PURE__ */ a(fe, {
3540
- defaultValue: v,
2124
+ }), /* @__PURE__ */ r(D, {
2125
+ defaultValue: b,
3541
2126
  disabled: !0,
3542
2127
  label: "APP ID",
3543
2128
  styles: {
@@ -3545,8 +2130,8 @@ function Fo({
3545
2130
  cursor: "text !important"
3546
2131
  }
3547
2132
  }
3548
- }), /* @__PURE__ */ a(fe, {
3549
- defaultValue: y,
2133
+ }), /* @__PURE__ */ r(D, {
2134
+ defaultValue: S,
3550
2135
  disabled: !0,
3551
2136
  label: "APP Secret",
3552
2137
  styles: {
@@ -3554,191 +2139,191 @@ function Fo({
3554
2139
  cursor: "text !important"
3555
2140
  }
3556
2141
  }
3557
- }), /* @__PURE__ */ a(oe, {
2142
+ }), /* @__PURE__ */ r(T, {
3558
2143
  size: "sm",
3559
2144
  onClick: () => {
3560
- on();
2145
+ lt();
3561
2146
  },
3562
2147
  children: "I've saved this API Key"
3563
2148
  })]
3564
2149
  }),
3565
2150
  onClose: () => {
3566
- e();
2151
+ t();
3567
2152
  }
3568
2153
  });
3569
2154
  },
3570
- styles: r,
3571
- initialRoleID: t
2155
+ styles: n,
2156
+ initialRoleID: a
3572
2157
  })
3573
- }), /* @__PURE__ */ a(oe, {
3574
- size: r.button.size,
2158
+ }), /* @__PURE__ */ r(T, {
2159
+ size: n.button.size,
3575
2160
  onClick: c,
3576
- leftIcon: /* @__PURE__ */ a(jr, {
2161
+ leftIcon: /* @__PURE__ */ r(xe, {
3577
2162
  size: 20
3578
2163
  }),
3579
2164
  children: "Add an API Key"
3580
2165
  })]
3581
2166
  });
3582
2167
  }
3583
- function Lo({
3584
- id: e,
3585
- name: r,
3586
- onSuccess: t,
3587
- styles: o = sr
2168
+ function qt({
2169
+ id: t,
2170
+ name: n,
2171
+ onSuccess: a,
2172
+ styles: o = me
3588
2173
  }) {
3589
- const s = nr(), i = async () => {
3590
- if (!!e) {
3591
- _e({
2174
+ const l = fe(), s = async () => {
2175
+ if (!!t) {
2176
+ W({
3592
2177
  id: "for-deleting",
3593
2178
  title: "Pending",
3594
2179
  message: "Deleting API Key...",
3595
2180
  loading: !0
3596
2181
  });
3597
2182
  try {
3598
- await de.api_key.delete(e), le({
2183
+ await j.api_key.delete(t), x({
3599
2184
  id: "for-deleting",
3600
2185
  title: "Successful",
3601
- message: `API Key [${r}] is deleted`,
2186
+ message: `API Key [${n}] is deleted`,
3602
2187
  color: "green"
3603
- }), t();
3604
- } catch (u) {
3605
- le({
2188
+ }), a();
2189
+ } catch (d) {
2190
+ x({
3606
2191
  id: "for-deleting",
3607
2192
  title: "Failed",
3608
- message: u.message,
2193
+ message: d.message,
3609
2194
  color: "red"
3610
2195
  });
3611
2196
  }
3612
2197
  }
3613
- }, c = () => s.openConfirmModal({
2198
+ }, c = () => l.openConfirmModal({
3614
2199
  title: "Delete this api-key?",
3615
2200
  labels: {
3616
2201
  confirm: "Confirm",
3617
2202
  cancel: "Cancel"
3618
2203
  },
3619
2204
  onCancel: () => console.log("Cancel"),
3620
- onConfirm: i
2205
+ onConfirm: s
3621
2206
  });
3622
- return /* @__PURE__ */ a(oe, {
2207
+ return /* @__PURE__ */ r(T, {
3623
2208
  size: o.button.size,
3624
2209
  color: "red",
3625
2210
  onClick: c,
3626
- leftIcon: /* @__PURE__ */ a(Ar, {
2211
+ leftIcon: /* @__PURE__ */ r(De, {
3627
2212
  size: 20
3628
2213
  }),
3629
2214
  children: "Delete"
3630
2215
  });
3631
2216
  }
3632
- function ei({
3633
- styles: e = sr,
3634
- config: r
2217
+ function nn({
2218
+ styles: t = me,
2219
+ config: n
3635
2220
  }) {
3636
- var v, y;
3637
- or(r);
2221
+ var b, S;
2222
+ pe(n);
3638
2223
  const {
3639
- data: t = [],
2224
+ data: a = [],
3640
2225
  loading: o,
3641
- refresh: s
3642
- } = ke(async () => {
2226
+ refresh: l
2227
+ } = G(async () => {
3643
2228
  const {
3644
- data: h
3645
- } = await de.api_key.list();
3646
- return h;
2229
+ data: m
2230
+ } = await j.api_key.list();
2231
+ return m;
3647
2232
  }, {
3648
2233
  refreshDeps: []
3649
2234
  }), {
3650
- data: i = [],
2235
+ data: s = [],
3651
2236
  loading: c
3652
- } = ke(async () => (await de.role.list()).map((m) => ({
3653
- label: m.name,
3654
- value: m.id,
3655
- description: m.description,
3656
- disabled: m.id === 50
2237
+ } = G(async () => (await j.role.list()).map((f) => ({
2238
+ label: f.name,
2239
+ value: f.id,
2240
+ description: f.description,
2241
+ disabled: f.id === 50
3657
2242
  })), {
3658
2243
  refreshDeps: []
3659
- }), u = pt(() => i.reduce((h, m) => (h.set(m.value, m.label), h), /* @__PURE__ */ new Map()), [i]), d = (h) => {
3660
- var m;
3661
- return (m = u.get(h)) != null ? m : h;
2244
+ }), d = ur(() => s.reduce((m, f) => (m.set(f.value, f.label), m), /* @__PURE__ */ new Map()), [s]), p = (m) => {
2245
+ var f;
2246
+ return (f = d.get(m)) != null ? f : m;
3662
2247
  };
3663
- return /* @__PURE__ */ I(Oe, {
3664
- children: [/* @__PURE__ */ a(se, {
3665
- pt: e.spacing,
2248
+ return /* @__PURE__ */ v(N, {
2249
+ children: [/* @__PURE__ */ r(O, {
2250
+ pt: t.spacing,
3666
2251
  position: "right",
3667
- children: /* @__PURE__ */ a(Fo, {
3668
- onSuccess: s,
3669
- initialRoleID: (y = (v = i == null ? void 0 : i[0]) == null ? void 0 : v.value) != null ? y : 0
2252
+ children: /* @__PURE__ */ r(Ft, {
2253
+ onSuccess: l,
2254
+ initialRoleID: (S = (b = s == null ? void 0 : s[0]) == null ? void 0 : b.value) != null ? S : 0
3670
2255
  })
3671
- }), /* @__PURE__ */ I(me, {
3672
- mt: e.spacing,
2256
+ }), /* @__PURE__ */ v(F, {
2257
+ mt: t.spacing,
3673
2258
  sx: {
3674
2259
  position: "relative"
3675
2260
  },
3676
- children: [/* @__PURE__ */ a(_r, {
2261
+ children: [/* @__PURE__ */ r(Oe, {
3677
2262
  visible: o || c
3678
- }), /* @__PURE__ */ I(xr, {
3679
- horizontalSpacing: e.spacing,
3680
- verticalSpacing: e.spacing,
3681
- fontSize: e.size,
2263
+ }), /* @__PURE__ */ v(Ae, {
2264
+ horizontalSpacing: t.spacing,
2265
+ verticalSpacing: t.spacing,
2266
+ fontSize: t.size,
3682
2267
  highlightOnHover: !0,
3683
- children: [/* @__PURE__ */ a("thead", {
3684
- children: /* @__PURE__ */ I("tr", {
3685
- children: [/* @__PURE__ */ a("th", {
2268
+ children: [/* @__PURE__ */ r("thead", {
2269
+ children: /* @__PURE__ */ v("tr", {
2270
+ children: [/* @__PURE__ */ r("th", {
3686
2271
  children: "Name"
3687
- }), /* @__PURE__ */ a("th", {
2272
+ }), /* @__PURE__ */ r("th", {
3688
2273
  children: "APP ID"
3689
- }), /* @__PURE__ */ a("th", {
2274
+ }), /* @__PURE__ */ r("th", {
3690
2275
  children: "Role"
3691
- }), /* @__PURE__ */ a("th", {
2276
+ }), /* @__PURE__ */ r("th", {
3692
2277
  children: "Action"
3693
2278
  })]
3694
2279
  })
3695
- }), /* @__PURE__ */ a("tbody", {
3696
- children: t.map((h) => {
2280
+ }), /* @__PURE__ */ r("tbody", {
2281
+ children: a.map((m) => {
3697
2282
  const {
3698
- id: m,
3699
- name: x,
3700
- app_id: Y,
3701
- role_id: z
3702
- } = h;
3703
- return /* @__PURE__ */ I("tr", {
3704
- children: [/* @__PURE__ */ a("td", {
2283
+ id: f,
2284
+ name: z,
2285
+ app_id: q,
2286
+ role_id: $
2287
+ } = m;
2288
+ return /* @__PURE__ */ v("tr", {
2289
+ children: [/* @__PURE__ */ r("td", {
3705
2290
  width: 200,
3706
- children: x
3707
- }), /* @__PURE__ */ a("td", {
2291
+ children: z
2292
+ }), /* @__PURE__ */ r("td", {
3708
2293
  width: 200,
3709
- children: Y
3710
- }), /* @__PURE__ */ a("td", {
2294
+ children: q
2295
+ }), /* @__PURE__ */ r("td", {
3711
2296
  width: 200,
3712
- children: d(z)
3713
- }), /* @__PURE__ */ a("td", {
2297
+ children: p($)
2298
+ }), /* @__PURE__ */ r("td", {
3714
2299
  width: 200,
3715
- children: /* @__PURE__ */ a(se, {
2300
+ children: /* @__PURE__ */ r(O, {
3716
2301
  position: "left",
3717
- children: /* @__PURE__ */ a(Lo, {
3718
- id: m,
3719
- name: x,
3720
- onSuccess: s
2302
+ children: /* @__PURE__ */ r(qt, {
2303
+ id: f,
2304
+ name: z,
2305
+ onSuccess: l
3721
2306
  })
3722
2307
  })
3723
2308
  })]
3724
- }, m);
2309
+ }, f);
3725
2310
  })
3726
2311
  })]
3727
2312
  })]
3728
2313
  })]
3729
2314
  });
3730
2315
  }
3731
- const ri = () => import("./package.b74d5f91.mjs").then(({ version: e }) => (console.log(`[@devtable/dashboard] version: ${e}`), e));
2316
+ const an = () => import("./package.1eb31380.mjs").then(({ version: t }) => (console.log(`[@devtable/dashboard] version: ${t}`), t));
3732
2317
  export {
3733
- ei as APIKeyList,
3734
- Qo as AccountList,
3735
- Fo as AddAPIKey,
3736
- Io as AddAccount,
3737
- Ro as AddDataSource,
3738
- Xo as DataSourceList,
3739
- Lo as DeleteAPIKey,
3740
- ko as DeleteAccount,
3741
- jo as DeleteDataSource,
3742
- Zo as Login,
3743
- ri as getVersion
2318
+ nn as APIKeyList,
2319
+ rn as AccountList,
2320
+ Ft as AddAPIKey,
2321
+ At as AddAccount,
2322
+ Rt as AddDataSource,
2323
+ en as DataSourceList,
2324
+ qt as DeleteAPIKey,
2325
+ kt as DeleteAccount,
2326
+ Tt as DeleteDataSource,
2327
+ tn as Login,
2328
+ an as getVersion
3744
2329
  };