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