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