@motiadev/plugin-logs 0.9.4-beta.150 → 0.9.4-beta.151-216335
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/components/logs-page.d.ts.map +1 -1
- package/dist/index.cjs +2 -53
- package/dist/index.js +547 -609
- package/dist/plugin-logs.css +1 -1
- package/package.json +7 -7
package/dist/index.js
CHANGED
|
@@ -1,58 +1,49 @@
|
|
|
1
|
-
import { Stream as
|
|
2
|
-
import * as
|
|
3
|
-
import K, { forwardRef as rt, createElement as
|
|
4
|
-
import { Sidebar as
|
|
5
|
-
const
|
|
1
|
+
import { Stream as pt } from "@motiadev/stream-client-browser";
|
|
2
|
+
import * as k from "react";
|
|
3
|
+
import K, { forwardRef as rt, createElement as ue, useState as H, useCallback as re, useEffect as we, createContext as gt, useContext as J, isValidElement as mt, useRef as xe, useMemo as se } from "react";
|
|
4
|
+
import { Sidebar as vt, LevelDot as nt, Input as ht, Button as jt, Table as bt, TableBody as yt, TableRow as wt, cn as xt, TableCell as ne } from "@motiadev/ui";
|
|
5
|
+
const Oe = (e) => {
|
|
6
6
|
let t;
|
|
7
|
-
const
|
|
8
|
-
const
|
|
9
|
-
if (!Object.is(
|
|
7
|
+
const r = /* @__PURE__ */ new Set(), n = (d, p) => {
|
|
8
|
+
const v = typeof d == "function" ? d(t) : d;
|
|
9
|
+
if (!Object.is(v, t)) {
|
|
10
10
|
const y = t;
|
|
11
|
-
t =
|
|
11
|
+
t = p ?? (typeof v != "object" || v === null) ? v : Object.assign({}, t, v), r.forEach((w) => w(t, y));
|
|
12
12
|
}
|
|
13
|
-
}, l = () => t, c = { setState:
|
|
13
|
+
}, l = () => t, c = { setState: n, getState: l, getInitialState: () => u, subscribe: (d) => (r.add(d), () => r.delete(d)) }, u = t = e(n, l, c);
|
|
14
14
|
return c;
|
|
15
|
-
},
|
|
16
|
-
function
|
|
17
|
-
const
|
|
15
|
+
}, Ct = ((e) => e ? Oe(e) : Oe), Et = (e) => e;
|
|
16
|
+
function At(e, t = Et) {
|
|
17
|
+
const r = K.useSyncExternalStore(
|
|
18
18
|
e.subscribe,
|
|
19
19
|
K.useCallback(() => t(e.getState()), [e, t]),
|
|
20
20
|
K.useCallback(() => t(e.getInitialState()), [e, t])
|
|
21
21
|
);
|
|
22
|
-
return K.useDebugValue(
|
|
22
|
+
return K.useDebugValue(r), r;
|
|
23
23
|
}
|
|
24
|
-
const
|
|
25
|
-
const t =
|
|
26
|
-
return Object.assign(
|
|
27
|
-
}, _t = (e) =>
|
|
24
|
+
const St = (e) => {
|
|
25
|
+
const t = Ct(e), r = (n) => At(t, n);
|
|
26
|
+
return Object.assign(r, t), r;
|
|
27
|
+
}, _t = ((e) => St), ee = _t()((e) => ({
|
|
28
28
|
logs: [],
|
|
29
29
|
selectedLogId: void 0,
|
|
30
|
-
addLog: (t) => e((
|
|
31
|
-
logs: [t, ...
|
|
30
|
+
addLog: (t) => e((r) => ({
|
|
31
|
+
logs: [t, ...r.logs]
|
|
32
32
|
})),
|
|
33
33
|
resetLogs: () => {
|
|
34
34
|
e({ logs: [] });
|
|
35
35
|
},
|
|
36
36
|
selectLogId: (t) => e({ selectedLogId: t })
|
|
37
|
-
})),
|
|
38
|
-
new
|
|
37
|
+
})), kt = "__motia.logs", Tt = "default", Nt = "log", Ot = () => {
|
|
38
|
+
new pt(window.location.origin.replace("http", "ws")).subscribeGroup(kt, Tt).onEvent(Nt, ee.getState().addLog);
|
|
39
39
|
};
|
|
40
40
|
var ae = { exports: {} }, X = {};
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
46
|
-
*
|
|
47
|
-
* This source code is licensed under the MIT license found in the
|
|
48
|
-
* LICENSE file in the root directory of this source tree.
|
|
49
|
-
*/
|
|
50
|
-
var Le;
|
|
51
|
-
function Lt() {
|
|
52
|
-
if (Le) return X;
|
|
53
|
-
Le = 1;
|
|
41
|
+
var Re;
|
|
42
|
+
function Rt() {
|
|
43
|
+
if (Re) return X;
|
|
44
|
+
Re = 1;
|
|
54
45
|
var e = Symbol.for("react.transitional.element"), t = Symbol.for("react.fragment");
|
|
55
|
-
function n
|
|
46
|
+
function r(n, l, i) {
|
|
56
47
|
var o = null;
|
|
57
48
|
if (i !== void 0 && (o = "" + i), l.key !== void 0 && (o = "" + l.key), "key" in l) {
|
|
58
49
|
i = {};
|
|
@@ -61,65 +52,56 @@ function Lt() {
|
|
|
61
52
|
} else i = l;
|
|
62
53
|
return l = i.ref, {
|
|
63
54
|
$$typeof: e,
|
|
64
|
-
type:
|
|
55
|
+
type: n,
|
|
65
56
|
key: o,
|
|
66
57
|
ref: l !== void 0 ? l : null,
|
|
67
58
|
props: i
|
|
68
59
|
};
|
|
69
60
|
}
|
|
70
|
-
return X.Fragment = t, X.jsx =
|
|
61
|
+
return X.Fragment = t, X.jsx = r, X.jsxs = r, X;
|
|
71
62
|
}
|
|
72
63
|
var Q = {};
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
*
|
|
77
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
78
|
-
*
|
|
79
|
-
* This source code is licensed under the MIT license found in the
|
|
80
|
-
* LICENSE file in the root directory of this source tree.
|
|
81
|
-
*/
|
|
82
|
-
var De;
|
|
83
|
-
function Dt() {
|
|
84
|
-
return De || (De = 1, process.env.NODE_ENV !== "production" && function() {
|
|
64
|
+
var Le;
|
|
65
|
+
function Lt() {
|
|
66
|
+
return Le || (Le = 1, process.env.NODE_ENV !== "production" && (function() {
|
|
85
67
|
function e(s) {
|
|
86
68
|
if (s == null) return null;
|
|
87
69
|
if (typeof s == "function")
|
|
88
|
-
return s.$$typeof ===
|
|
70
|
+
return s.$$typeof === P ? null : s.displayName || s.name || null;
|
|
89
71
|
if (typeof s == "string") return s;
|
|
90
72
|
switch (s) {
|
|
91
|
-
case
|
|
73
|
+
case N:
|
|
92
74
|
return "Fragment";
|
|
93
|
-
case
|
|
75
|
+
case D:
|
|
94
76
|
return "Profiler";
|
|
95
|
-
case
|
|
77
|
+
case E:
|
|
96
78
|
return "StrictMode";
|
|
97
|
-
case
|
|
79
|
+
case A:
|
|
98
80
|
return "Suspense";
|
|
99
|
-
case
|
|
81
|
+
case x:
|
|
100
82
|
return "SuspenseList";
|
|
101
|
-
case
|
|
83
|
+
case V:
|
|
102
84
|
return "Activity";
|
|
103
85
|
}
|
|
104
86
|
if (typeof s == "object")
|
|
105
87
|
switch (typeof s.tag == "number" && console.error(
|
|
106
88
|
"Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."
|
|
107
89
|
), s.$$typeof) {
|
|
108
|
-
case
|
|
90
|
+
case C:
|
|
109
91
|
return "Portal";
|
|
110
|
-
case
|
|
111
|
-
return
|
|
112
|
-
case
|
|
92
|
+
case h:
|
|
93
|
+
return s.displayName || "Context";
|
|
94
|
+
case I:
|
|
113
95
|
return (s._context.displayName || "Context") + ".Consumer";
|
|
114
|
-
case
|
|
115
|
-
var
|
|
116
|
-
return s = s.displayName, s || (s =
|
|
117
|
-
case
|
|
118
|
-
return
|
|
119
|
-
case
|
|
120
|
-
|
|
96
|
+
case j:
|
|
97
|
+
var g = s.render;
|
|
98
|
+
return s = s.displayName, s || (s = g.displayName || g.name || "", s = s !== "" ? "ForwardRef(" + s + ")" : "ForwardRef"), s;
|
|
99
|
+
case Z:
|
|
100
|
+
return g = s.displayName || null, g !== null ? g : e(s.type) || "Memo";
|
|
101
|
+
case O:
|
|
102
|
+
g = s._payload, s = s._init;
|
|
121
103
|
try {
|
|
122
|
-
return e(s(
|
|
104
|
+
return e(s(g));
|
|
123
105
|
} catch {
|
|
124
106
|
}
|
|
125
107
|
}
|
|
@@ -128,74 +110,75 @@ function Dt() {
|
|
|
128
110
|
function t(s) {
|
|
129
111
|
return "" + s;
|
|
130
112
|
}
|
|
131
|
-
function
|
|
113
|
+
function r(s) {
|
|
132
114
|
try {
|
|
133
115
|
t(s);
|
|
134
|
-
var
|
|
116
|
+
var g = !1;
|
|
135
117
|
} catch {
|
|
136
|
-
|
|
118
|
+
g = !0;
|
|
137
119
|
}
|
|
138
|
-
if (
|
|
139
|
-
|
|
140
|
-
var
|
|
141
|
-
return
|
|
142
|
-
|
|
120
|
+
if (g) {
|
|
121
|
+
g = console;
|
|
122
|
+
var f = g.error, m = typeof Symbol == "function" && Symbol.toStringTag && s[Symbol.toStringTag] || s.constructor.name || "Object";
|
|
123
|
+
return f.call(
|
|
124
|
+
g,
|
|
143
125
|
"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
|
|
144
|
-
|
|
126
|
+
m
|
|
145
127
|
), t(s);
|
|
146
128
|
}
|
|
147
129
|
}
|
|
148
|
-
function
|
|
149
|
-
if (s ===
|
|
150
|
-
if (typeof s == "object" && s !== null && s.$$typeof ===
|
|
130
|
+
function n(s) {
|
|
131
|
+
if (s === N) return "<>";
|
|
132
|
+
if (typeof s == "object" && s !== null && s.$$typeof === O)
|
|
151
133
|
return "<...>";
|
|
152
134
|
try {
|
|
153
|
-
var
|
|
154
|
-
return
|
|
135
|
+
var g = e(s);
|
|
136
|
+
return g ? "<" + g + ">" : "<...>";
|
|
155
137
|
} catch {
|
|
156
138
|
return "<...>";
|
|
157
139
|
}
|
|
158
140
|
}
|
|
159
141
|
function l() {
|
|
160
|
-
var s =
|
|
142
|
+
var s = L.A;
|
|
161
143
|
return s === null ? null : s.getOwner();
|
|
162
144
|
}
|
|
163
145
|
function i() {
|
|
164
146
|
return Error("react-stack-top-frame");
|
|
165
147
|
}
|
|
166
148
|
function o(s) {
|
|
167
|
-
if (
|
|
168
|
-
var
|
|
169
|
-
if (
|
|
149
|
+
if ($.call(s, "key")) {
|
|
150
|
+
var g = Object.getOwnPropertyDescriptor(s, "key").get;
|
|
151
|
+
if (g && g.isReactWarning) return !1;
|
|
170
152
|
}
|
|
171
153
|
return s.key !== void 0;
|
|
172
154
|
}
|
|
173
|
-
function c(s,
|
|
174
|
-
function
|
|
175
|
-
|
|
155
|
+
function c(s, g) {
|
|
156
|
+
function f() {
|
|
157
|
+
M || (M = !0, console.error(
|
|
176
158
|
"%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://react.dev/link/special-props)",
|
|
177
|
-
|
|
159
|
+
g
|
|
178
160
|
));
|
|
179
161
|
}
|
|
180
|
-
|
|
181
|
-
get:
|
|
162
|
+
f.isReactWarning = !0, Object.defineProperty(s, "key", {
|
|
163
|
+
get: f,
|
|
182
164
|
configurable: !0
|
|
183
165
|
});
|
|
184
166
|
}
|
|
185
167
|
function u() {
|
|
186
168
|
var s = e(this.type);
|
|
187
|
-
return
|
|
169
|
+
return _[s] || (_[s] = !0, console.error(
|
|
188
170
|
"Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release."
|
|
189
171
|
)), s = this.props.ref, s !== void 0 ? s : null;
|
|
190
172
|
}
|
|
191
|
-
function d(s,
|
|
192
|
-
|
|
193
|
-
|
|
173
|
+
function d(s, g, f, m, Y, le) {
|
|
174
|
+
var R = f.ref;
|
|
175
|
+
return s = {
|
|
176
|
+
$$typeof: b,
|
|
194
177
|
type: s,
|
|
195
|
-
key:
|
|
196
|
-
props:
|
|
197
|
-
_owner:
|
|
198
|
-
}, (
|
|
178
|
+
key: g,
|
|
179
|
+
props: f,
|
|
180
|
+
_owner: m
|
|
181
|
+
}, (R !== void 0 ? R : null) !== null ? Object.defineProperty(s, "ref", {
|
|
199
182
|
enumerable: !1,
|
|
200
183
|
get: u
|
|
201
184
|
}) : Object.defineProperty(s, "ref", { enumerable: !1, value: null }), s._store = {}, Object.defineProperty(s._store, "validated", {
|
|
@@ -212,135 +195,120 @@ function Dt() {
|
|
|
212
195
|
configurable: !1,
|
|
213
196
|
enumerable: !1,
|
|
214
197
|
writable: !0,
|
|
215
|
-
value:
|
|
198
|
+
value: Y
|
|
216
199
|
}), Object.defineProperty(s, "_debugTask", {
|
|
217
200
|
configurable: !1,
|
|
218
201
|
enumerable: !1,
|
|
219
202
|
writable: !0,
|
|
220
|
-
value:
|
|
203
|
+
value: le
|
|
221
204
|
}), Object.freeze && (Object.freeze(s.props), Object.freeze(s)), s;
|
|
222
205
|
}
|
|
223
|
-
function
|
|
224
|
-
var
|
|
225
|
-
if (
|
|
226
|
-
if (
|
|
227
|
-
if (
|
|
228
|
-
for (
|
|
229
|
-
|
|
230
|
-
Object.freeze && Object.freeze(
|
|
206
|
+
function p(s, g, f, m, Y, le) {
|
|
207
|
+
var R = g.children;
|
|
208
|
+
if (R !== void 0)
|
|
209
|
+
if (m)
|
|
210
|
+
if (z(R)) {
|
|
211
|
+
for (m = 0; m < R.length; m++)
|
|
212
|
+
v(R[m]);
|
|
213
|
+
Object.freeze && Object.freeze(R);
|
|
231
214
|
} else
|
|
232
215
|
console.error(
|
|
233
216
|
"React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."
|
|
234
217
|
);
|
|
235
|
-
else
|
|
236
|
-
if (
|
|
237
|
-
|
|
238
|
-
var q = Object.keys(
|
|
239
|
-
return
|
|
218
|
+
else v(R);
|
|
219
|
+
if ($.call(g, "key")) {
|
|
220
|
+
R = e(s);
|
|
221
|
+
var q = Object.keys(g).filter(function(dt) {
|
|
222
|
+
return dt !== "key";
|
|
240
223
|
});
|
|
241
|
-
|
|
224
|
+
m = 0 < q.length ? "{key: someKey, " + q.join(": ..., ") + ": ...}" : "{key: someKey}", S[R + m] || (q = 0 < q.length ? "{" + q.join(": ..., ") + ": ...}" : "{}", console.error(
|
|
242
225
|
`A props object containing a "key" prop is being spread into JSX:
|
|
243
226
|
let props = %s;
|
|
244
227
|
<%s {...props} />
|
|
245
228
|
React keys must be passed directly to JSX without using spread:
|
|
246
229
|
let props = %s;
|
|
247
230
|
<%s key={someKey} {...props} />`,
|
|
248
|
-
|
|
249
|
-
|
|
231
|
+
m,
|
|
232
|
+
R,
|
|
250
233
|
q,
|
|
251
|
-
|
|
252
|
-
),
|
|
234
|
+
R
|
|
235
|
+
), S[R + m] = !0);
|
|
253
236
|
}
|
|
254
|
-
if (
|
|
255
|
-
|
|
256
|
-
for (var
|
|
257
|
-
|
|
258
|
-
} else
|
|
259
|
-
return
|
|
260
|
-
|
|
237
|
+
if (R = null, f !== void 0 && (r(f), R = "" + f), o(g) && (r(g.key), R = "" + g.key), "key" in g) {
|
|
238
|
+
f = {};
|
|
239
|
+
for (var ce in g)
|
|
240
|
+
ce !== "key" && (f[ce] = g[ce]);
|
|
241
|
+
} else f = g;
|
|
242
|
+
return R && c(
|
|
243
|
+
f,
|
|
261
244
|
typeof s == "function" ? s.displayName || s.name || "Unknown" : s
|
|
262
245
|
), d(
|
|
263
246
|
s,
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
j,
|
|
247
|
+
R,
|
|
248
|
+
f,
|
|
267
249
|
l(),
|
|
268
|
-
|
|
269
|
-
le
|
|
270
|
-
ce
|
|
250
|
+
Y,
|
|
251
|
+
le
|
|
271
252
|
);
|
|
272
253
|
}
|
|
273
|
-
function
|
|
274
|
-
typeof s == "object" && s !== null && s.$$typeof ===
|
|
254
|
+
function v(s) {
|
|
255
|
+
y(s) ? s._store && (s._store.validated = 1) : typeof s == "object" && s !== null && s.$$typeof === O && (s._payload.status === "fulfilled" ? y(s._payload.value) && s._payload.value._store && (s._payload.value._store.validated = 1) : s._store && (s._store.validated = 1));
|
|
256
|
+
}
|
|
257
|
+
function y(s) {
|
|
258
|
+
return typeof s == "object" && s !== null && s.$$typeof === b;
|
|
275
259
|
}
|
|
276
|
-
var
|
|
260
|
+
var w = K, b = Symbol.for("react.transitional.element"), C = Symbol.for("react.portal"), N = Symbol.for("react.fragment"), E = Symbol.for("react.strict_mode"), D = Symbol.for("react.profiler"), I = Symbol.for("react.consumer"), h = Symbol.for("react.context"), j = Symbol.for("react.forward_ref"), A = Symbol.for("react.suspense"), x = Symbol.for("react.suspense_list"), Z = Symbol.for("react.memo"), O = Symbol.for("react.lazy"), V = Symbol.for("react.activity"), P = Symbol.for("react.client.reference"), L = w.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, $ = Object.prototype.hasOwnProperty, z = Array.isArray, T = console.createTask ? console.createTask : function() {
|
|
277
261
|
return null;
|
|
278
262
|
};
|
|
279
|
-
|
|
263
|
+
w = {
|
|
280
264
|
react_stack_bottom_frame: function(s) {
|
|
281
265
|
return s();
|
|
282
266
|
}
|
|
283
267
|
};
|
|
284
|
-
var
|
|
285
|
-
|
|
268
|
+
var M, _ = {}, U = w.react_stack_bottom_frame.bind(
|
|
269
|
+
w,
|
|
286
270
|
i
|
|
287
|
-
)(),
|
|
288
|
-
Q.Fragment =
|
|
289
|
-
var
|
|
290
|
-
return
|
|
271
|
+
)(), F = T(n(i)), S = {};
|
|
272
|
+
Q.Fragment = N, Q.jsx = function(s, g, f) {
|
|
273
|
+
var m = 1e4 > L.recentlyCreatedOwnerStacks++;
|
|
274
|
+
return p(
|
|
291
275
|
s,
|
|
292
|
-
|
|
293
|
-
b,
|
|
294
|
-
!1,
|
|
276
|
+
g,
|
|
295
277
|
f,
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
278
|
+
!1,
|
|
279
|
+
m ? Error("react-stack-top-frame") : U,
|
|
280
|
+
m ? T(n(s)) : F
|
|
299
281
|
);
|
|
300
|
-
}, Q.jsxs = function(s,
|
|
301
|
-
var
|
|
302
|
-
return
|
|
282
|
+
}, Q.jsxs = function(s, g, f) {
|
|
283
|
+
var m = 1e4 > L.recentlyCreatedOwnerStacks++;
|
|
284
|
+
return p(
|
|
303
285
|
s,
|
|
304
|
-
|
|
305
|
-
b,
|
|
306
|
-
!0,
|
|
286
|
+
g,
|
|
307
287
|
f,
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
288
|
+
!0,
|
|
289
|
+
m ? Error("react-stack-top-frame") : U,
|
|
290
|
+
m ? T(n(s)) : F
|
|
311
291
|
);
|
|
312
292
|
};
|
|
313
|
-
}()), Q;
|
|
293
|
+
})()), Q;
|
|
314
294
|
}
|
|
315
|
-
var
|
|
316
|
-
function
|
|
317
|
-
return
|
|
295
|
+
var De;
|
|
296
|
+
function Dt() {
|
|
297
|
+
return De || (De = 1, process.env.NODE_ENV === "production" ? ae.exports = Rt() : ae.exports = Lt()), ae.exports;
|
|
318
298
|
}
|
|
319
|
-
var a =
|
|
320
|
-
|
|
321
|
-
* @license lucide-react v0.545.0 - ISC
|
|
322
|
-
*
|
|
323
|
-
* This source code is licensed under the ISC license.
|
|
324
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
325
|
-
*/
|
|
326
|
-
const Pt = (e) => e.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase(), $t = (e) => e.replace(
|
|
299
|
+
var a = Dt();
|
|
300
|
+
const It = (e) => e.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase(), Pt = (e) => e.replace(
|
|
327
301
|
/^([A-Z])|[\s-_]+(\w)/g,
|
|
328
|
-
(t,
|
|
329
|
-
),
|
|
330
|
-
const t =
|
|
302
|
+
(t, r, n) => n ? n.toUpperCase() : r.toLowerCase()
|
|
303
|
+
), Ie = (e) => {
|
|
304
|
+
const t = Pt(e);
|
|
331
305
|
return t.charAt(0).toUpperCase() + t.slice(1);
|
|
332
|
-
},
|
|
306
|
+
}, at = (...e) => e.filter((t, r, n) => !!t && t.trim() !== "" && n.indexOf(t) === r).join(" ").trim(), $t = (e) => {
|
|
333
307
|
for (const t in e)
|
|
334
308
|
if (t.startsWith("aria-") || t === "role" || t === "title")
|
|
335
309
|
return !0;
|
|
336
310
|
};
|
|
337
|
-
|
|
338
|
-
* @license lucide-react v0.545.0 - ISC
|
|
339
|
-
*
|
|
340
|
-
* This source code is licensed under the ISC license.
|
|
341
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
342
|
-
*/
|
|
343
|
-
var Ft = {
|
|
311
|
+
var Mt = {
|
|
344
312
|
xmlns: "http://www.w3.org/2000/svg",
|
|
345
313
|
width: 24,
|
|
346
314
|
height: 24,
|
|
@@ -351,130 +319,100 @@ var Ft = {
|
|
|
351
319
|
strokeLinecap: "round",
|
|
352
320
|
strokeLinejoin: "round"
|
|
353
321
|
};
|
|
354
|
-
|
|
355
|
-
* @license lucide-react v0.545.0 - ISC
|
|
356
|
-
*
|
|
357
|
-
* This source code is licensed under the ISC license.
|
|
358
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
359
|
-
*/
|
|
360
|
-
const Ht = rt(
|
|
322
|
+
const Ft = rt(
|
|
361
323
|
({
|
|
362
324
|
color: e = "currentColor",
|
|
363
325
|
size: t = 24,
|
|
364
|
-
strokeWidth:
|
|
365
|
-
absoluteStrokeWidth:
|
|
326
|
+
strokeWidth: r = 2,
|
|
327
|
+
absoluteStrokeWidth: n,
|
|
366
328
|
className: l = "",
|
|
367
329
|
children: i,
|
|
368
330
|
iconNode: o,
|
|
369
331
|
...c
|
|
370
|
-
}, u) =>
|
|
332
|
+
}, u) => ue(
|
|
371
333
|
"svg",
|
|
372
334
|
{
|
|
373
335
|
ref: u,
|
|
374
|
-
...
|
|
336
|
+
...Mt,
|
|
375
337
|
width: t,
|
|
376
338
|
height: t,
|
|
377
339
|
stroke: e,
|
|
378
|
-
strokeWidth:
|
|
379
|
-
className:
|
|
380
|
-
...!i &&
|
|
340
|
+
strokeWidth: n ? Number(r) * 24 / Number(t) : r,
|
|
341
|
+
className: at("lucide", l),
|
|
342
|
+
...!i && !$t(c) && { "aria-hidden": "true" },
|
|
381
343
|
...c
|
|
382
344
|
},
|
|
383
345
|
[
|
|
384
|
-
...o.map(([d,
|
|
346
|
+
...o.map(([d, p]) => ue(d, p)),
|
|
385
347
|
...Array.isArray(i) ? i : [i]
|
|
386
348
|
]
|
|
387
349
|
)
|
|
388
350
|
);
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
* This source code is licensed under the ISC license.
|
|
393
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
394
|
-
*/
|
|
395
|
-
const Ee = (e, t) => {
|
|
396
|
-
const n = rt(
|
|
397
|
-
({ className: r, ...l }, i) => fe(Ht, {
|
|
351
|
+
const Ce = (e, t) => {
|
|
352
|
+
const r = rt(
|
|
353
|
+
({ className: n, ...l }, i) => ue(Ft, {
|
|
398
354
|
ref: i,
|
|
399
355
|
iconNode: t,
|
|
400
|
-
className:
|
|
401
|
-
`lucide-${
|
|
356
|
+
className: at(
|
|
357
|
+
`lucide-${It(Ie(e))}`,
|
|
402
358
|
`lucide-${e}`,
|
|
403
|
-
|
|
359
|
+
n
|
|
404
360
|
),
|
|
405
361
|
...l
|
|
406
362
|
})
|
|
407
363
|
);
|
|
408
|
-
return
|
|
364
|
+
return r.displayName = Ie(e), r;
|
|
409
365
|
};
|
|
410
|
-
|
|
411
|
-
* @license lucide-react v0.545.0 - ISC
|
|
412
|
-
*
|
|
413
|
-
* This source code is licensed under the ISC license.
|
|
414
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
415
|
-
*/
|
|
416
|
-
const Ut = [
|
|
366
|
+
const Ht = [
|
|
417
367
|
["path", { d: "m21 21-4.34-4.34", key: "14j7rj" }],
|
|
418
368
|
["circle", { cx: "11", cy: "11", r: "8", key: "4ej97u" }]
|
|
419
|
-
],
|
|
420
|
-
|
|
421
|
-
* @license lucide-react v0.545.0 - ISC
|
|
422
|
-
*
|
|
423
|
-
* This source code is licensed under the ISC license.
|
|
424
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
425
|
-
*/
|
|
426
|
-
const Vt = [
|
|
369
|
+
], Ut = Ce("search", Ht);
|
|
370
|
+
const Zt = [
|
|
427
371
|
["path", { d: "M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6", key: "miytrc" }],
|
|
428
372
|
["path", { d: "M3 6h18", key: "d0wm0j" }],
|
|
429
373
|
["path", { d: "M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2", key: "e791ji" }]
|
|
430
|
-
],
|
|
431
|
-
|
|
432
|
-
* @license lucide-react v0.545.0 - ISC
|
|
433
|
-
*
|
|
434
|
-
* This source code is licensed under the ISC license.
|
|
435
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
436
|
-
*/
|
|
437
|
-
const Yt = [
|
|
374
|
+
], Vt = Ce("trash", Zt);
|
|
375
|
+
const zt = [
|
|
438
376
|
["path", { d: "M18 6 6 18", key: "1bl5f8" }],
|
|
439
377
|
["path", { d: "m6 6 12 12", key: "d8bk6v" }]
|
|
440
|
-
],
|
|
378
|
+
], st = Ce("x", zt), ot = (e) => {
|
|
441
379
|
const t = new Date(Number(e));
|
|
442
380
|
return `${t.toLocaleDateString("en-US", { year: void 0, month: "short", day: "2-digit" })}, ${t.toLocaleTimeString("en-US", { hour: "2-digit", minute: "2-digit", second: "2-digit", hourCycle: "h24" })}.${t.getMilliseconds().toString().padStart(3, "0")}`;
|
|
443
381
|
};
|
|
444
|
-
function
|
|
382
|
+
function Yt(e, t, r, n) {
|
|
445
383
|
function l(i) {
|
|
446
|
-
return i instanceof
|
|
384
|
+
return i instanceof r ? i : new r(function(o) {
|
|
447
385
|
o(i);
|
|
448
386
|
});
|
|
449
387
|
}
|
|
450
|
-
return new (
|
|
451
|
-
function c(
|
|
388
|
+
return new (r || (r = Promise))(function(i, o) {
|
|
389
|
+
function c(p) {
|
|
452
390
|
try {
|
|
453
|
-
d(
|
|
454
|
-
} catch (
|
|
455
|
-
o(
|
|
391
|
+
d(n.next(p));
|
|
392
|
+
} catch (v) {
|
|
393
|
+
o(v);
|
|
456
394
|
}
|
|
457
395
|
}
|
|
458
|
-
function u(
|
|
396
|
+
function u(p) {
|
|
459
397
|
try {
|
|
460
|
-
d(
|
|
461
|
-
} catch (
|
|
462
|
-
o(
|
|
398
|
+
d(n.throw(p));
|
|
399
|
+
} catch (v) {
|
|
400
|
+
o(v);
|
|
463
401
|
}
|
|
464
402
|
}
|
|
465
|
-
function d(
|
|
466
|
-
|
|
403
|
+
function d(p) {
|
|
404
|
+
p.done ? i(p.value) : l(p.value).then(c, u);
|
|
467
405
|
}
|
|
468
|
-
d((
|
|
406
|
+
d((n = n.apply(e, [])).next());
|
|
469
407
|
});
|
|
470
408
|
}
|
|
471
|
-
var
|
|
409
|
+
var Bt = function() {
|
|
472
410
|
var e = document.getSelection();
|
|
473
411
|
if (!e.rangeCount)
|
|
474
412
|
return function() {
|
|
475
413
|
};
|
|
476
|
-
for (var t = document.activeElement,
|
|
477
|
-
|
|
414
|
+
for (var t = document.activeElement, r = [], n = 0; n < e.rangeCount; n++)
|
|
415
|
+
r.push(e.getRangeAt(n));
|
|
478
416
|
switch (t.tagName.toUpperCase()) {
|
|
479
417
|
// .toUpperCase handles XHTML
|
|
480
418
|
case "INPUT":
|
|
@@ -486,601 +424,601 @@ var Wt = function() {
|
|
|
486
424
|
break;
|
|
487
425
|
}
|
|
488
426
|
return e.removeAllRanges(), function() {
|
|
489
|
-
e.type === "Caret" && e.removeAllRanges(), e.rangeCount ||
|
|
427
|
+
e.type === "Caret" && e.removeAllRanges(), e.rangeCount || r.forEach(function(l) {
|
|
490
428
|
e.addRange(l);
|
|
491
429
|
}), t && t.focus();
|
|
492
430
|
};
|
|
493
|
-
},
|
|
431
|
+
}, Wt = Bt, Pe = {
|
|
494
432
|
"text/plain": "Text",
|
|
495
433
|
"text/html": "Url",
|
|
496
434
|
default: "Text"
|
|
497
|
-
},
|
|
498
|
-
function
|
|
435
|
+
}, Jt = "Copy to clipboard: #{key}, Enter";
|
|
436
|
+
function qt(e) {
|
|
499
437
|
var t = (/mac os x/i.test(navigator.userAgent) ? "⌘" : "Ctrl") + "+C";
|
|
500
438
|
return e.replace(/#{\s*key\s*}/g, t);
|
|
501
439
|
}
|
|
502
|
-
function
|
|
503
|
-
var
|
|
504
|
-
t || (t = {}),
|
|
440
|
+
function Kt(e, t) {
|
|
441
|
+
var r, n, l, i, o, c, u = !1;
|
|
442
|
+
t || (t = {}), r = t.debug || !1;
|
|
505
443
|
try {
|
|
506
|
-
l =
|
|
507
|
-
if (
|
|
508
|
-
if (
|
|
509
|
-
|
|
510
|
-
var
|
|
511
|
-
window.clipboardData.setData(
|
|
444
|
+
l = Wt(), i = document.createRange(), o = document.getSelection(), c = document.createElement("span"), c.textContent = e, c.ariaHidden = "true", c.style.all = "unset", c.style.position = "fixed", c.style.top = 0, c.style.clip = "rect(0, 0, 0, 0)", c.style.whiteSpace = "pre", c.style.webkitUserSelect = "text", c.style.MozUserSelect = "text", c.style.msUserSelect = "text", c.style.userSelect = "text", c.addEventListener("copy", function(p) {
|
|
445
|
+
if (p.stopPropagation(), t.format)
|
|
446
|
+
if (p.preventDefault(), typeof p.clipboardData > "u") {
|
|
447
|
+
r && console.warn("unable to use e.clipboardData"), r && console.warn("trying IE specific stuff"), window.clipboardData.clearData();
|
|
448
|
+
var v = Pe[t.format] || Pe.default;
|
|
449
|
+
window.clipboardData.setData(v, e);
|
|
512
450
|
} else
|
|
513
|
-
|
|
514
|
-
t.onCopy && (
|
|
451
|
+
p.clipboardData.clearData(), p.clipboardData.setData(t.format, e);
|
|
452
|
+
t.onCopy && (p.preventDefault(), t.onCopy(p.clipboardData));
|
|
515
453
|
}), document.body.appendChild(c), i.selectNodeContents(c), o.addRange(i);
|
|
516
454
|
var d = document.execCommand("copy");
|
|
517
455
|
if (!d)
|
|
518
456
|
throw new Error("copy command was unsuccessful");
|
|
519
457
|
u = !0;
|
|
520
|
-
} catch (
|
|
521
|
-
|
|
458
|
+
} catch (p) {
|
|
459
|
+
r && console.error("unable to copy using execCommand: ", p), r && console.warn("trying IE specific stuff");
|
|
522
460
|
try {
|
|
523
461
|
window.clipboardData.setData(t.format || "text", e), t.onCopy && t.onCopy(window.clipboardData), u = !0;
|
|
524
|
-
} catch (
|
|
525
|
-
|
|
462
|
+
} catch (v) {
|
|
463
|
+
r && console.error("unable to copy using clipboardData: ", v), r && console.error("falling back to prompt"), n = qt("message" in t ? t.message : Jt), window.prompt(n, e);
|
|
526
464
|
}
|
|
527
465
|
} finally {
|
|
528
466
|
o && (typeof o.removeRange == "function" ? o.removeRange(i) : o.removeAllRanges()), c && document.body.removeChild(c), l();
|
|
529
467
|
}
|
|
530
468
|
return u;
|
|
531
469
|
}
|
|
532
|
-
var
|
|
470
|
+
var Gt = Kt;
|
|
533
471
|
function B(e) {
|
|
534
472
|
return Object.prototype.toString.call(e) === "[object Object]";
|
|
535
473
|
}
|
|
536
474
|
function te(e) {
|
|
537
475
|
return Array.isArray(e) ? e.length : B(e) ? Object.keys(e).length : 0;
|
|
538
476
|
}
|
|
539
|
-
function
|
|
477
|
+
function Xt(e, t) {
|
|
540
478
|
if (typeof e == "string")
|
|
541
479
|
return e;
|
|
542
480
|
try {
|
|
543
|
-
return JSON.stringify(e, (
|
|
544
|
-
switch (typeof
|
|
481
|
+
return JSON.stringify(e, (r, n) => {
|
|
482
|
+
switch (typeof n) {
|
|
545
483
|
case "bigint":
|
|
546
|
-
return String(
|
|
484
|
+
return String(n) + "n";
|
|
547
485
|
case "number":
|
|
548
486
|
case "boolean":
|
|
549
487
|
case "object":
|
|
550
488
|
case "string":
|
|
551
|
-
return
|
|
489
|
+
return n;
|
|
552
490
|
default:
|
|
553
|
-
return String(
|
|
491
|
+
return String(n);
|
|
554
492
|
}
|
|
555
493
|
}, t);
|
|
556
|
-
} catch (
|
|
557
|
-
return `${
|
|
494
|
+
} catch (r) {
|
|
495
|
+
return `${r.name}: ${r.message}` || "JSON.stringify failed";
|
|
558
496
|
}
|
|
559
497
|
}
|
|
560
|
-
function
|
|
561
|
-
return
|
|
498
|
+
function Qt(e) {
|
|
499
|
+
return Yt(this, void 0, void 0, function* () {
|
|
562
500
|
try {
|
|
563
501
|
yield navigator.clipboard.writeText(e);
|
|
564
502
|
} catch {
|
|
565
|
-
|
|
503
|
+
Gt(e);
|
|
566
504
|
}
|
|
567
505
|
});
|
|
568
506
|
}
|
|
569
|
-
function
|
|
507
|
+
function $e(e, t, r, n, l, i) {
|
|
570
508
|
if (i && i.collapsed !== void 0)
|
|
571
509
|
return !!i.collapsed;
|
|
572
|
-
if (typeof
|
|
573
|
-
return
|
|
574
|
-
if (typeof
|
|
510
|
+
if (typeof n == "boolean")
|
|
511
|
+
return n;
|
|
512
|
+
if (typeof n == "number" && t > n)
|
|
575
513
|
return !0;
|
|
576
514
|
const o = te(e);
|
|
577
|
-
if (typeof
|
|
578
|
-
const c =
|
|
515
|
+
if (typeof n == "function") {
|
|
516
|
+
const c = Ee(n, [{ node: e, depth: t, indexOrName: r, size: o }]);
|
|
579
517
|
if (typeof c == "boolean")
|
|
580
518
|
return c;
|
|
581
519
|
}
|
|
582
520
|
return !!(Array.isArray(e) && o > l || B(e) && o > l);
|
|
583
521
|
}
|
|
584
|
-
function
|
|
522
|
+
function Me(e, t, r, n, l, i) {
|
|
585
523
|
if (i && i.collapsed !== void 0)
|
|
586
524
|
return !!i.collapsed;
|
|
587
|
-
if (typeof
|
|
588
|
-
return
|
|
589
|
-
if (typeof
|
|
525
|
+
if (typeof n == "boolean")
|
|
526
|
+
return n;
|
|
527
|
+
if (typeof n == "number" && t > n)
|
|
590
528
|
return !0;
|
|
591
529
|
const o = Math.ceil(e.length / 100);
|
|
592
|
-
if (typeof
|
|
593
|
-
const c =
|
|
530
|
+
if (typeof n == "function") {
|
|
531
|
+
const c = Ee(n, [{ node: e, depth: t, indexOrName: r, size: o }]);
|
|
594
532
|
if (typeof c == "boolean")
|
|
595
533
|
return c;
|
|
596
534
|
}
|
|
597
535
|
return !!(Array.isArray(e) && o > l || B(e) && o > l);
|
|
598
536
|
}
|
|
599
|
-
function G(e, t,
|
|
600
|
-
return typeof e == "boolean" ? e : !!(typeof e == "number" && t > e || e === "collapsed" &&
|
|
537
|
+
function G(e, t, r) {
|
|
538
|
+
return typeof e == "boolean" ? e : !!(typeof e == "number" && t > e || e === "collapsed" && r || e === "expanded" && !r);
|
|
601
539
|
}
|
|
602
|
-
function
|
|
540
|
+
function Ee(e, t) {
|
|
603
541
|
try {
|
|
604
542
|
return e(...t);
|
|
605
|
-
} catch (
|
|
606
|
-
reportError(
|
|
543
|
+
} catch (r) {
|
|
544
|
+
reportError(r);
|
|
607
545
|
}
|
|
608
546
|
}
|
|
609
|
-
function
|
|
547
|
+
function it(e) {
|
|
610
548
|
if (e === !0 || B(e) && e.add === !0)
|
|
611
549
|
return !0;
|
|
612
550
|
}
|
|
613
|
-
function
|
|
551
|
+
function Fe(e) {
|
|
614
552
|
if (e === !0 || B(e) && e.edit === !0)
|
|
615
553
|
return !0;
|
|
616
554
|
}
|
|
617
|
-
function
|
|
555
|
+
function Ae(e) {
|
|
618
556
|
if (e === !0 || B(e) && e.delete === !0)
|
|
619
557
|
return !0;
|
|
620
558
|
}
|
|
621
|
-
function
|
|
559
|
+
function er(e) {
|
|
622
560
|
return typeof e == "function";
|
|
623
561
|
}
|
|
624
|
-
function
|
|
562
|
+
function lt(e) {
|
|
625
563
|
return !e || e.add === void 0 || !!e.add;
|
|
626
564
|
}
|
|
627
|
-
function
|
|
565
|
+
function He(e) {
|
|
628
566
|
return !e || e.edit === void 0 || !!e.edit;
|
|
629
567
|
}
|
|
630
|
-
function
|
|
568
|
+
function Se(e) {
|
|
631
569
|
return !e || e.delete === void 0 || !!e.delete;
|
|
632
570
|
}
|
|
633
571
|
function oe(e) {
|
|
634
572
|
return !e || e.enableClipboard === void 0 || !!e.enableClipboard;
|
|
635
573
|
}
|
|
636
|
-
function
|
|
574
|
+
function tr(e) {
|
|
637
575
|
return !e || e.matchesURL === void 0 || !!e.matchesURL;
|
|
638
576
|
}
|
|
639
|
-
function
|
|
577
|
+
function rr(e, t) {
|
|
640
578
|
return e === "string" ? t.trim().replace(/^\"([\s\S]+?)\"$/, "$1") : t;
|
|
641
579
|
}
|
|
642
|
-
var
|
|
643
|
-
function
|
|
644
|
-
return
|
|
580
|
+
var Ue;
|
|
581
|
+
function fe() {
|
|
582
|
+
return fe = Object.assign ? Object.assign.bind() : function(e) {
|
|
645
583
|
for (var t = 1; t < arguments.length; t++) {
|
|
646
|
-
var
|
|
647
|
-
for (var
|
|
648
|
-
Object.prototype.hasOwnProperty.call(
|
|
584
|
+
var r = arguments[t];
|
|
585
|
+
for (var n in r)
|
|
586
|
+
Object.prototype.hasOwnProperty.call(r, n) && (e[n] = r[n]);
|
|
649
587
|
}
|
|
650
588
|
return e;
|
|
651
|
-
},
|
|
589
|
+
}, fe.apply(this, arguments);
|
|
652
590
|
}
|
|
653
591
|
var _e = function(t) {
|
|
654
|
-
return /* @__PURE__ */
|
|
592
|
+
return /* @__PURE__ */ k.createElement("svg", fe({
|
|
655
593
|
xmlns: "http://www.w3.org/2000/svg",
|
|
656
594
|
width: 16,
|
|
657
595
|
height: 16,
|
|
658
596
|
fill: "none",
|
|
659
597
|
viewBox: "0 0 16 16"
|
|
660
|
-
}, t),
|
|
598
|
+
}, t), Ue || (Ue = /* @__PURE__ */ k.createElement("path", {
|
|
661
599
|
fill: "currentColor",
|
|
662
600
|
d: "M12.473 5.806a.666.666 0 0 0-.946 0L8.473 8.86a.667.667 0 0 1-.946 0L4.473 5.806a.667.667 0 1 0-.946.94l3.06 3.06a2 2 0 0 0 2.826 0l3.06-3.06a.667.667 0 0 0 0-.94Z"
|
|
663
601
|
})));
|
|
664
|
-
},
|
|
665
|
-
function
|
|
666
|
-
return
|
|
602
|
+
}, Ze;
|
|
603
|
+
function de() {
|
|
604
|
+
return de = Object.assign ? Object.assign.bind() : function(e) {
|
|
667
605
|
for (var t = 1; t < arguments.length; t++) {
|
|
668
|
-
var
|
|
669
|
-
for (var
|
|
670
|
-
Object.prototype.hasOwnProperty.call(
|
|
606
|
+
var r = arguments[t];
|
|
607
|
+
for (var n in r)
|
|
608
|
+
Object.prototype.hasOwnProperty.call(r, n) && (e[n] = r[n]);
|
|
671
609
|
}
|
|
672
610
|
return e;
|
|
673
|
-
},
|
|
611
|
+
}, de.apply(this, arguments);
|
|
674
612
|
}
|
|
675
|
-
var
|
|
676
|
-
return /* @__PURE__ */
|
|
613
|
+
var nr = function(t) {
|
|
614
|
+
return /* @__PURE__ */ k.createElement("svg", de({
|
|
677
615
|
xmlns: "http://www.w3.org/2000/svg",
|
|
678
616
|
width: 24,
|
|
679
617
|
height: 24,
|
|
680
618
|
fill: "none",
|
|
681
619
|
viewBox: "0 0 24 24"
|
|
682
|
-
}, t),
|
|
620
|
+
}, t), Ze || (Ze = /* @__PURE__ */ k.createElement("path", {
|
|
683
621
|
fill: "currentColor",
|
|
684
622
|
d: "M17.542 2.5h-4.75a3.963 3.963 0 0 0-3.959 3.958v4.75a3.963 3.963 0 0 0 3.959 3.959h4.75a3.963 3.963 0 0 0 3.958-3.959v-4.75A3.963 3.963 0 0 0 17.542 2.5Zm2.375 8.708a2.378 2.378 0 0 1-2.375 2.375h-4.75a2.378 2.378 0 0 1-2.375-2.375v-4.75a2.378 2.378 0 0 1 2.375-2.375h4.75a2.378 2.378 0 0 1 2.375 2.375v4.75Zm-4.75 6.334a3.963 3.963 0 0 1-3.959 3.958h-4.75A3.963 3.963 0 0 1 2.5 17.542v-4.75a3.963 3.963 0 0 1 3.958-3.959.791.791 0 1 1 0 1.584 2.378 2.378 0 0 0-2.375 2.375v4.75a2.378 2.378 0 0 0 2.375 2.375h4.75a2.378 2.378 0 0 0 2.375-2.375.792.792 0 1 1 1.584 0Z"
|
|
685
623
|
})));
|
|
686
|
-
},
|
|
687
|
-
function
|
|
688
|
-
return
|
|
624
|
+
}, Ve, ze;
|
|
625
|
+
function pe() {
|
|
626
|
+
return pe = Object.assign ? Object.assign.bind() : function(e) {
|
|
689
627
|
for (var t = 1; t < arguments.length; t++) {
|
|
690
|
-
var
|
|
691
|
-
for (var
|
|
692
|
-
Object.prototype.hasOwnProperty.call(
|
|
628
|
+
var r = arguments[t];
|
|
629
|
+
for (var n in r)
|
|
630
|
+
Object.prototype.hasOwnProperty.call(r, n) && (e[n] = r[n]);
|
|
693
631
|
}
|
|
694
632
|
return e;
|
|
695
|
-
},
|
|
633
|
+
}, pe.apply(this, arguments);
|
|
696
634
|
}
|
|
697
|
-
var
|
|
698
|
-
return /* @__PURE__ */
|
|
635
|
+
var ar = function(t) {
|
|
636
|
+
return /* @__PURE__ */ k.createElement("svg", pe({
|
|
699
637
|
xmlns: "http://www.w3.org/2000/svg",
|
|
700
638
|
width: 24,
|
|
701
639
|
height: 24,
|
|
702
640
|
fill: "none",
|
|
703
641
|
viewBox: "0 0 24 24"
|
|
704
|
-
}, t),
|
|
642
|
+
}, t), Ve || (Ve = /* @__PURE__ */ k.createElement("path", {
|
|
705
643
|
fill: "currentColor",
|
|
706
644
|
d: "M17.25 3H6.75A3.755 3.755 0 0 0 3 6.75v10.5A3.754 3.754 0 0 0 6.75 21h10.5A3.754 3.754 0 0 0 21 17.25V6.75A3.755 3.755 0 0 0 17.25 3Zm2.25 14.25a2.25 2.25 0 0 1-2.25 2.25H6.75a2.25 2.25 0 0 1-2.25-2.25V6.75A2.25 2.25 0 0 1 6.75 4.5h10.5a2.25 2.25 0 0 1 2.25 2.25v10.5Z"
|
|
707
|
-
})),
|
|
645
|
+
})), ze || (ze = /* @__PURE__ */ k.createElement("path", {
|
|
708
646
|
fill: "#14C786",
|
|
709
647
|
d: "M10.312 14.45 7.83 11.906a.625.625 0 0 0-.896 0 .659.659 0 0 0 0 .918l2.481 2.546a1.264 1.264 0 0 0 .896.381 1.237 1.237 0 0 0 .895-.38l5.858-6.011a.658.658 0 0 0 0-.919.625.625 0 0 0-.896 0l-5.857 6.01Z"
|
|
710
648
|
})));
|
|
711
649
|
};
|
|
712
650
|
function ie({ node: e, nodeMeta: t }) {
|
|
713
|
-
const { customizeCopy:
|
|
651
|
+
const { customizeCopy: r, CopyComponent: n, CopiedComponent: l } = J(W), [i, o] = H(!1), c = (u) => {
|
|
714
652
|
u.stopPropagation();
|
|
715
|
-
const d =
|
|
716
|
-
typeof d == "string" && d &&
|
|
653
|
+
const d = r(e, t);
|
|
654
|
+
typeof d == "string" && d && Qt(d), o(!0), setTimeout(() => o(!1), 3e3);
|
|
717
655
|
};
|
|
718
|
-
return i ? typeof l == "function" ? a.jsx(l, { className: "json-view--copy", style: { display: "inline-block" } }) : a.jsx(
|
|
656
|
+
return i ? typeof l == "function" ? a.jsx(l, { className: "json-view--copy", style: { display: "inline-block" } }) : a.jsx(ar, { className: "json-view--copy", style: { display: "inline-block" } }) : typeof n == "function" ? a.jsx(n, { onClick: c, className: "json-view--copy" }) : a.jsx(nr, { onClick: c, className: "json-view--copy" });
|
|
719
657
|
}
|
|
720
|
-
function
|
|
658
|
+
function ge({ indexOrName: e, value: t, depth: r, deleteHandle: n, editHandle: l, parent: i, parentPath: o }) {
|
|
721
659
|
const { displayArrayIndex: c } = J(W), u = Array.isArray(i);
|
|
722
|
-
return a.jsxs("div", Object.assign({ className: "json-view--pair" }, { children: [!u || u && c ? a.jsxs(a.Fragment, { children: [a.jsx("span", Object.assign({ className: typeof e == "number" ? "json-view--index" : "json-view--property" }, { children: e })), ":", " "] }) : a.jsx(a.Fragment, {}), a.jsx(
|
|
660
|
+
return a.jsxs("div", Object.assign({ className: "json-view--pair" }, { children: [!u || u && c ? a.jsxs(a.Fragment, { children: [a.jsx("span", Object.assign({ className: typeof e == "number" ? "json-view--index" : "json-view--property" }, { children: e })), ":", " "] }) : a.jsx(a.Fragment, {}), a.jsx(ut, { node: t, depth: r + 1, deleteHandle: (d, p) => n(d, p), editHandle: (d, p, v, y) => l(d, p, v, y), parent: i, indexOrName: e, parentPath: o })] }));
|
|
723
661
|
}
|
|
724
|
-
var
|
|
725
|
-
function
|
|
726
|
-
return
|
|
662
|
+
var Ye, Be;
|
|
663
|
+
function me() {
|
|
664
|
+
return me = Object.assign ? Object.assign.bind() : function(e) {
|
|
727
665
|
for (var t = 1; t < arguments.length; t++) {
|
|
728
|
-
var
|
|
729
|
-
for (var
|
|
730
|
-
Object.prototype.hasOwnProperty.call(
|
|
666
|
+
var r = arguments[t];
|
|
667
|
+
for (var n in r)
|
|
668
|
+
Object.prototype.hasOwnProperty.call(r, n) && (e[n] = r[n]);
|
|
731
669
|
}
|
|
732
670
|
return e;
|
|
733
|
-
},
|
|
671
|
+
}, me.apply(this, arguments);
|
|
734
672
|
}
|
|
735
|
-
var
|
|
736
|
-
return /* @__PURE__ */
|
|
673
|
+
var ke = function(t) {
|
|
674
|
+
return /* @__PURE__ */ k.createElement("svg", me({
|
|
737
675
|
xmlns: "http://www.w3.org/2000/svg",
|
|
738
676
|
width: 24,
|
|
739
677
|
height: 24,
|
|
740
678
|
fill: "none",
|
|
741
679
|
viewBox: "0 0 24 24"
|
|
742
|
-
}, t),
|
|
680
|
+
}, t), Ye || (Ye = /* @__PURE__ */ k.createElement("path", {
|
|
743
681
|
fill: "currentColor",
|
|
744
682
|
d: "M18.75 6h-2.325a3.757 3.757 0 0 0-3.675-3h-1.5a3.757 3.757 0 0 0-3.675 3H5.25a.75.75 0 0 0 0 1.5H6v9.75A3.754 3.754 0 0 0 9.75 21h4.5A3.754 3.754 0 0 0 18 17.25V7.5h.75a.75.75 0 1 0 0-1.5Zm-7.5-1.5h1.5A2.255 2.255 0 0 1 14.872 6H9.128a2.255 2.255 0 0 1 2.122-1.5Zm5.25 12.75a2.25 2.25 0 0 1-2.25 2.25h-4.5a2.25 2.25 0 0 1-2.25-2.25V7.5h9v9.75Z"
|
|
745
|
-
})),
|
|
683
|
+
})), Be || (Be = /* @__PURE__ */ k.createElement("path", {
|
|
746
684
|
fill: "#DA0000",
|
|
747
685
|
d: "M10.5 16.5a.75.75 0 0 0 .75-.75v-4.5a.75.75 0 1 0-1.5 0v4.5a.75.75 0 0 0 .75.75ZM13.5 16.5a.75.75 0 0 0 .75-.75v-4.5a.75.75 0 1 0-1.5 0v4.5a.75.75 0 0 0 .75.75Z"
|
|
748
686
|
})));
|
|
749
|
-
},
|
|
750
|
-
function
|
|
751
|
-
return
|
|
687
|
+
}, We, Je;
|
|
688
|
+
function ve() {
|
|
689
|
+
return ve = Object.assign ? Object.assign.bind() : function(e) {
|
|
752
690
|
for (var t = 1; t < arguments.length; t++) {
|
|
753
|
-
var
|
|
754
|
-
for (var
|
|
755
|
-
Object.prototype.hasOwnProperty.call(
|
|
691
|
+
var r = arguments[t];
|
|
692
|
+
for (var n in r)
|
|
693
|
+
Object.prototype.hasOwnProperty.call(r, n) && (e[n] = r[n]);
|
|
756
694
|
}
|
|
757
695
|
return e;
|
|
758
|
-
},
|
|
696
|
+
}, ve.apply(this, arguments);
|
|
759
697
|
}
|
|
760
|
-
var
|
|
761
|
-
return /* @__PURE__ */
|
|
698
|
+
var ct = function(t) {
|
|
699
|
+
return /* @__PURE__ */ k.createElement("svg", ve({
|
|
762
700
|
xmlns: "http://www.w3.org/2000/svg",
|
|
763
701
|
width: 24,
|
|
764
702
|
height: 24,
|
|
765
703
|
fill: "none",
|
|
766
704
|
viewBox: "0 0 24 24"
|
|
767
|
-
}, t),
|
|
705
|
+
}, t), We || (We = /* @__PURE__ */ k.createElement("path", {
|
|
768
706
|
fill: "currentColor",
|
|
769
707
|
d: "M21 6.75v10.5A3.754 3.754 0 0 1 17.25 21H6.75A3.754 3.754 0 0 1 3 17.25V6.75A3.754 3.754 0 0 1 6.75 3h10.5A3.754 3.754 0 0 1 21 6.75Zm-1.5 0c0-1.24-1.01-2.25-2.25-2.25H6.75C5.51 4.5 4.5 5.51 4.5 6.75v10.5c0 1.24 1.01 2.25 2.25 2.25h10.5c1.24 0 2.25-1.01 2.25-2.25V6.75Z"
|
|
770
|
-
})),
|
|
708
|
+
})), Je || (Je = /* @__PURE__ */ k.createElement("path", {
|
|
771
709
|
fill: "#14C786",
|
|
772
710
|
d: "M15 12.75a.75.75 0 1 0 0-1.5h-2.25V9a.75.75 0 1 0-1.5 0v2.25H9a.75.75 0 1 0 0 1.5h2.25V15a.75.75 0 1 0 1.5 0v-2.25H15Z"
|
|
773
711
|
})));
|
|
774
|
-
},
|
|
775
|
-
function
|
|
776
|
-
return
|
|
712
|
+
}, qe, Ke;
|
|
713
|
+
function he() {
|
|
714
|
+
return he = Object.assign ? Object.assign.bind() : function(e) {
|
|
777
715
|
for (var t = 1; t < arguments.length; t++) {
|
|
778
|
-
var
|
|
779
|
-
for (var
|
|
780
|
-
Object.prototype.hasOwnProperty.call(
|
|
716
|
+
var r = arguments[t];
|
|
717
|
+
for (var n in r)
|
|
718
|
+
Object.prototype.hasOwnProperty.call(r, n) && (e[n] = r[n]);
|
|
781
719
|
}
|
|
782
720
|
return e;
|
|
783
|
-
},
|
|
721
|
+
}, he.apply(this, arguments);
|
|
784
722
|
}
|
|
785
|
-
var
|
|
786
|
-
return /* @__PURE__ */
|
|
723
|
+
var Te = function(t) {
|
|
724
|
+
return /* @__PURE__ */ k.createElement("svg", he({
|
|
787
725
|
xmlns: "http://www.w3.org/2000/svg",
|
|
788
726
|
width: 24,
|
|
789
727
|
height: 24,
|
|
790
728
|
fill: "none",
|
|
791
729
|
viewBox: "0 0 24 24"
|
|
792
|
-
}, t),
|
|
730
|
+
}, t), qe || (qe = /* @__PURE__ */ k.createElement("path", {
|
|
793
731
|
fill: "currentColor",
|
|
794
732
|
d: "M12 3a9 9 0 1 0 9 9 9.01 9.01 0 0 0-9-9Zm0 16.5a7.5 7.5 0 1 1 7.5-7.5 7.509 7.509 0 0 1-7.5 7.5Z"
|
|
795
|
-
})),
|
|
733
|
+
})), Ke || (Ke = /* @__PURE__ */ k.createElement("path", {
|
|
796
734
|
fill: "#14C786",
|
|
797
735
|
d: "m10.85 13.96-1.986-2.036a.5.5 0 0 0-.716 0 .527.527 0 0 0 0 .735l1.985 2.036a1.01 1.01 0 0 0 .717.305.99.99 0 0 0 .716-.305l4.686-4.808a.526.526 0 0 0 0-.735.5.5 0 0 0-.716 0l-4.687 4.809Z"
|
|
798
736
|
})));
|
|
799
|
-
},
|
|
800
|
-
function
|
|
801
|
-
return
|
|
737
|
+
}, Ge, Xe;
|
|
738
|
+
function je() {
|
|
739
|
+
return je = Object.assign ? Object.assign.bind() : function(e) {
|
|
802
740
|
for (var t = 1; t < arguments.length; t++) {
|
|
803
|
-
var
|
|
804
|
-
for (var
|
|
805
|
-
Object.prototype.hasOwnProperty.call(
|
|
741
|
+
var r = arguments[t];
|
|
742
|
+
for (var n in r)
|
|
743
|
+
Object.prototype.hasOwnProperty.call(r, n) && (e[n] = r[n]);
|
|
806
744
|
}
|
|
807
745
|
return e;
|
|
808
|
-
},
|
|
746
|
+
}, je.apply(this, arguments);
|
|
809
747
|
}
|
|
810
|
-
var
|
|
811
|
-
return /* @__PURE__ */
|
|
748
|
+
var Ne = function(t) {
|
|
749
|
+
return /* @__PURE__ */ k.createElement("svg", je({
|
|
812
750
|
xmlns: "http://www.w3.org/2000/svg",
|
|
813
751
|
width: 24,
|
|
814
752
|
height: 24,
|
|
815
753
|
fill: "none",
|
|
816
754
|
viewBox: "0 0 24 24"
|
|
817
|
-
}, t),
|
|
755
|
+
}, t), Ge || (Ge = /* @__PURE__ */ k.createElement("path", {
|
|
818
756
|
fill: "#DA0000",
|
|
819
757
|
d: "M15 9a.75.75 0 0 0-1.06 0L12 10.94 10.06 9A.75.75 0 0 0 9 10.06L10.94 12 9 13.94A.75.75 0 0 0 10.06 15L12 13.06 13.94 15A.75.75 0 0 0 15 13.94L13.06 12 15 10.06A.75.75 0 0 0 15 9Z"
|
|
820
|
-
})),
|
|
758
|
+
})), Xe || (Xe = /* @__PURE__ */ k.createElement("path", {
|
|
821
759
|
fill: "currentColor",
|
|
822
760
|
d: "M12 3a9 9 0 1 0 9 9 9.01 9.01 0 0 0-9-9Zm0 16.5a7.5 7.5 0 1 1 7.5-7.5 7.509 7.509 0 0 1-7.5 7.5Z"
|
|
823
761
|
})));
|
|
824
762
|
};
|
|
825
|
-
function
|
|
826
|
-
const { enableClipboard: d, src:
|
|
827
|
-
e[
|
|
763
|
+
function sr({ originNode: e, node: t, depth: r, index: n, deleteHandle: l, customOptions: i, startIndex: o, parent: c, parentPath: u }) {
|
|
764
|
+
const { enableClipboard: d, src: p, onEdit: v, onChange: y, forceUpdate: w, displaySize: b, CustomOperation: C } = J(W), N = [...u, String(n)], [E, D] = H(!0), I = re((A, x, Z) => {
|
|
765
|
+
e[A] = x, v && v({
|
|
828
766
|
newValue: x,
|
|
829
|
-
oldValue:
|
|
830
|
-
depth:
|
|
831
|
-
src:
|
|
832
|
-
indexOrName:
|
|
767
|
+
oldValue: Z,
|
|
768
|
+
depth: r,
|
|
769
|
+
src: p,
|
|
770
|
+
indexOrName: A,
|
|
833
771
|
parentType: "array",
|
|
834
772
|
parentPath: u
|
|
835
|
-
}), y && y({ type: "edit", depth:
|
|
836
|
-
}, [t,
|
|
837
|
-
e.splice(
|
|
838
|
-
},
|
|
839
|
-
return a.jsxs("div", { children: [a.jsx("span", { children: "[" }),
|
|
773
|
+
}), y && y({ type: "edit", depth: r, src: p, indexOrName: A, parentType: "array", parentPath: u }), w();
|
|
774
|
+
}, [t, v, y, w]), h = (A) => {
|
|
775
|
+
e.splice(A, 1), l && l(A, u), w();
|
|
776
|
+
}, j = a.jsxs(a.Fragment, { children: [!E && a.jsxs("span", Object.assign({ onClick: () => D(!0), className: "jv-size-chevron" }, { children: [G(b, r, E) && a.jsxs("span", Object.assign({ className: "jv-size" }, { children: [te(t), " Items"] })), a.jsx(_e, { className: "jv-chevron" })] })), !E && d && oe(i) && a.jsx(ie, { node: t, nodeMeta: { depth: r, indexOrName: n, parent: c, parentPath: u, currentPath: N } }), typeof C == "function" ? a.jsx(C, { node: t }) : null] });
|
|
777
|
+
return a.jsxs("div", { children: [a.jsx("span", { children: "[" }), j, E ? a.jsxs("button", Object.assign({ onClick: () => D(!1), className: "jv-button" }, { children: [o, " ... ", o + t.length - 1] })) : a.jsx("div", Object.assign({ className: "jv-indent" }, { children: t.map((A, x) => a.jsx(ge, { indexOrName: x + o, value: A, depth: r, parent: t, deleteHandle: h, editHandle: I, parentPath: u }, String(n) + String(x))) })), a.jsx("span", { children: "]" })] });
|
|
840
778
|
}
|
|
841
|
-
function
|
|
842
|
-
const c = typeof
|
|
779
|
+
function or({ node: e, depth: t, deleteHandle: r, indexOrName: n, customOptions: l, parent: i, parentPath: o }) {
|
|
780
|
+
const c = typeof n < "u" ? [...o, String(n)] : o, u = [];
|
|
843
781
|
for (let T = 0; T < e.length; T += 100)
|
|
844
782
|
u.push(e.slice(T, T + 100));
|
|
845
|
-
const { collapsed: d, enableClipboard:
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
}, [d,
|
|
849
|
-
const [
|
|
850
|
-
x(!1),
|
|
783
|
+
const { collapsed: d, enableClipboard: p, collapseObjectsAfterLength: v, editable: y, onDelete: w, src: b, onAdd: C, CustomOperation: N, onChange: E, forceUpdate: D, displaySize: I } = J(W), [h, j] = H(Me(e, t, n, d, v, l));
|
|
784
|
+
we(() => {
|
|
785
|
+
j(Me(e, t, n, d, v, l));
|
|
786
|
+
}, [d, v]);
|
|
787
|
+
const [A, x] = H(!1), Z = () => {
|
|
788
|
+
x(!1), r && r(n, o), w && w({ value: e, depth: t, src: b, indexOrName: n, parentType: "array", parentPath: o }), E && E({
|
|
851
789
|
type: "delete",
|
|
852
790
|
depth: t,
|
|
853
|
-
src:
|
|
854
|
-
indexOrName:
|
|
791
|
+
src: b,
|
|
792
|
+
indexOrName: n,
|
|
855
793
|
parentType: "array",
|
|
856
794
|
parentPath: o
|
|
857
795
|
});
|
|
858
|
-
}, [O,
|
|
796
|
+
}, [O, V] = H(!1), P = () => {
|
|
859
797
|
const T = e;
|
|
860
|
-
T.push(null), C && C({ indexOrName: T.length - 1, depth: t, src:
|
|
861
|
-
}, L =
|
|
862
|
-
x(!1),
|
|
863
|
-
},
|
|
864
|
-
|
|
865
|
-
} }), !
|
|
866
|
-
return a.jsxs(a.Fragment, { children: [a.jsx("span", { children: "[" }),
|
|
798
|
+
T.push(null), C && C({ indexOrName: T.length - 1, depth: t, src: b, parentType: "array", parentPath: o }), E && E({ type: "add", indexOrName: T.length - 1, depth: t, src: b, parentType: "array", parentPath: o }), D();
|
|
799
|
+
}, L = A || O, $ = () => {
|
|
800
|
+
x(!1), V(!1);
|
|
801
|
+
}, z = a.jsxs(a.Fragment, { children: [!h && !L && a.jsxs("span", Object.assign({ onClick: () => j(!0), className: "jv-size-chevron" }, { children: [G(I, t, h) && a.jsxs("span", Object.assign({ className: "jv-size" }, { children: [e.length, " Items"] })), a.jsx(_e, { className: "jv-chevron" })] })), L && a.jsx(Te, { className: "json-view--edit", style: { display: "inline-block" }, onClick: O ? P : Z }), L && a.jsx(Ne, { className: "json-view--edit", style: { display: "inline-block" }, onClick: $ }), !h && !L && p && oe(l) && a.jsx(ie, { node: e, nodeMeta: { depth: t, indexOrName: n, parent: i, parentPath: o, currentPath: c } }), !h && !L && it(y) && lt(l) && a.jsx(ct, { className: "json-view--edit", onClick: () => {
|
|
802
|
+
P();
|
|
803
|
+
} }), !h && !L && Ae(y) && Se(l) && r && a.jsx(ke, { className: "json-view--edit", onClick: () => x(!0) }), typeof N == "function" ? a.jsx(N, { node: e }) : null] });
|
|
804
|
+
return a.jsxs(a.Fragment, { children: [a.jsx("span", { children: "[" }), z, h ? a.jsx("button", Object.assign({ onClick: () => j(!1), className: "jv-button" }, { children: "..." })) : a.jsx("div", Object.assign({ className: "jv-indent" }, { children: u.map((T, M) => a.jsx(sr, { originNode: e, node: T, depth: t, index: M, startIndex: M * 100, deleteHandle: r, customOptions: l, parentPath: o }, String(n) + String(M))) })), a.jsx("span", { children: "]" }), h && G(I, t, h) && a.jsxs("span", Object.assign({ onClick: () => j(!1), className: "jv-size" }, { children: [e.length, " Items"] }))] });
|
|
867
805
|
}
|
|
868
|
-
function
|
|
869
|
-
const { collapsed: c, onCollapse: u, enableClipboard: d, ignoreLargeArray:
|
|
870
|
-
if (!
|
|
871
|
-
return a.jsx(
|
|
872
|
-
const
|
|
873
|
-
u?.({ isCollapsing: !f, node: e, depth: t, indexOrName:
|
|
806
|
+
function ir({ node: e, depth: t, indexOrName: r, deleteHandle: n, customOptions: l, parent: i, parentPath: o }) {
|
|
807
|
+
const { collapsed: c, onCollapse: u, enableClipboard: d, ignoreLargeArray: p, collapseObjectsAfterLength: v, editable: y, onDelete: w, src: b, onAdd: C, onEdit: N, onChange: E, forceUpdate: D, displaySize: I, CustomOperation: h } = J(W), j = typeof r < "u" ? [...o, String(r)] : o;
|
|
808
|
+
if (!p && Array.isArray(e) && e.length > 100)
|
|
809
|
+
return a.jsx(or, { node: e, depth: t, indexOrName: r, deleteHandle: n, customOptions: l, parentPath: j });
|
|
810
|
+
const A = B(e), [x, Z] = H($e(e, t, r, c, v, l)), O = (f) => {
|
|
811
|
+
u?.({ isCollapsing: !f, node: e, depth: t, indexOrName: r }), Z(f);
|
|
874
812
|
};
|
|
875
|
-
|
|
876
|
-
O(
|
|
877
|
-
}, [c,
|
|
878
|
-
const
|
|
879
|
-
Array.isArray(e) ? e[+f] =
|
|
880
|
-
newValue:
|
|
881
|
-
oldValue:
|
|
813
|
+
we(() => {
|
|
814
|
+
O($e(e, t, r, c, v, l));
|
|
815
|
+
}, [c, v]);
|
|
816
|
+
const V = re((f, m, Y) => {
|
|
817
|
+
Array.isArray(e) ? e[+f] = m : e && (e[f] = m), N && N({
|
|
818
|
+
newValue: m,
|
|
819
|
+
oldValue: Y,
|
|
882
820
|
depth: t,
|
|
883
|
-
src:
|
|
821
|
+
src: b,
|
|
884
822
|
indexOrName: f,
|
|
885
|
-
parentType:
|
|
886
|
-
parentPath:
|
|
887
|
-
}),
|
|
888
|
-
}, [e, N,
|
|
823
|
+
parentType: A ? "object" : "array",
|
|
824
|
+
parentPath: j
|
|
825
|
+
}), E && E({ type: "edit", depth: t, src: b, indexOrName: f, parentType: A ? "object" : "array", parentPath: j }), D();
|
|
826
|
+
}, [e, N, E, D]), P = (f) => {
|
|
889
827
|
Array.isArray(e) ? e.splice(+f, 1) : e && delete e[f], D();
|
|
890
|
-
}, [L,
|
|
891
|
-
|
|
828
|
+
}, [L, $] = H(!1), z = () => {
|
|
829
|
+
$(!1), n && n(r, j), w && w({ value: e, depth: t, src: b, indexOrName: r, parentType: A ? "object" : "array", parentPath: j }), E && E({
|
|
892
830
|
type: "delete",
|
|
893
831
|
depth: t,
|
|
894
|
-
src:
|
|
895
|
-
indexOrName:
|
|
896
|
-
parentType:
|
|
897
|
-
parentPath:
|
|
832
|
+
src: b,
|
|
833
|
+
indexOrName: r,
|
|
834
|
+
parentType: A ? "object" : "array",
|
|
835
|
+
parentPath: j
|
|
898
836
|
});
|
|
899
|
-
}, [T,
|
|
837
|
+
}, [T, M] = H(!1), _ = xe(null), U = () => {
|
|
900
838
|
var f;
|
|
901
|
-
if (
|
|
902
|
-
const
|
|
903
|
-
|
|
839
|
+
if (A) {
|
|
840
|
+
const m = (f = _.current) === null || f === void 0 ? void 0 : f.value;
|
|
841
|
+
m && (e[m] = null, _.current && (_.current.value = ""), M(!1), C && C({ indexOrName: m, depth: t, src: b, parentType: "object", parentPath: j }), E && E({ type: "add", indexOrName: m, depth: t, src: b, parentType: "object", parentPath: j }));
|
|
904
842
|
} else if (Array.isArray(e)) {
|
|
905
|
-
const
|
|
906
|
-
|
|
843
|
+
const m = e;
|
|
844
|
+
m.push(null), C && C({ indexOrName: m.length - 1, depth: t, src: b, parentType: "array", parentPath: j }), E && E({ type: "add", indexOrName: m.length - 1, depth: t, src: b, parentType: "array", parentPath: j });
|
|
907
845
|
}
|
|
908
846
|
D();
|
|
909
|
-
},
|
|
910
|
-
f.key === "Enter" ? (f.preventDefault(),
|
|
911
|
-
},
|
|
912
|
-
|
|
913
|
-
},
|
|
914
|
-
|
|
847
|
+
}, F = (f) => {
|
|
848
|
+
f.key === "Enter" ? (f.preventDefault(), U()) : f.key === "Escape" && s();
|
|
849
|
+
}, S = L || T, s = () => {
|
|
850
|
+
$(!1), M(!1);
|
|
851
|
+
}, g = a.jsxs(a.Fragment, { children: [!x && !S && a.jsxs("span", Object.assign({ onClick: () => O(!0), className: "jv-size-chevron" }, { children: [G(I, t, x) && a.jsxs("span", Object.assign({ className: "jv-size" }, { children: [te(e), " Items"] })), a.jsx(_e, { className: "jv-chevron" })] })), T && A && a.jsx("input", { className: "json-view--input", placeholder: "property", ref: _, onKeyDown: F }), S && a.jsx(Te, { className: "json-view--edit", style: { display: "inline-block" }, onClick: T ? U : z }), S && a.jsx(Ne, { className: "json-view--edit", style: { display: "inline-block" }, onClick: s }), !x && !S && d && oe(l) && a.jsx(ie, { node: e, nodeMeta: { depth: t, indexOrName: r, parent: i, parentPath: o, currentPath: j } }), !x && !S && it(y) && lt(l) && a.jsx(ct, { className: "json-view--edit", onClick: () => {
|
|
852
|
+
A ? (M(!0), setTimeout(() => {
|
|
915
853
|
var f;
|
|
916
|
-
return (f =
|
|
917
|
-
})) :
|
|
918
|
-
} }), !x && !
|
|
919
|
-
return Array.isArray(e) ? a.jsxs(a.Fragment, { children: [a.jsx("span", { children: "[" }),
|
|
854
|
+
return (f = _.current) === null || f === void 0 ? void 0 : f.focus();
|
|
855
|
+
})) : U();
|
|
856
|
+
} }), !x && !S && Ae(y) && Se(l) && n && a.jsx(ke, { className: "json-view--edit", onClick: () => $(!0) }), typeof h == "function" ? a.jsx(h, { node: e }) : null] });
|
|
857
|
+
return Array.isArray(e) ? a.jsxs(a.Fragment, { children: [a.jsx("span", { children: "[" }), g, x ? a.jsx("button", Object.assign({ onClick: () => O(!1), className: "jv-button" }, { children: "..." })) : a.jsx("div", Object.assign({ className: "jv-indent" }, { children: e.map((f, m) => a.jsx(ge, { indexOrName: m, value: f, depth: t, parent: e, deleteHandle: P, editHandle: V, parentPath: j }, String(r) + String(m))) })), a.jsx("span", { children: "]" }), x && G(I, t, x) && a.jsxs("span", Object.assign({ onClick: () => O(!1), className: "jv-size" }, { children: [te(e), " Items"] }))] }) : A ? a.jsxs(a.Fragment, { children: [a.jsx("span", { children: "{" }), g, x ? a.jsx("button", Object.assign({ onClick: () => O(!1), className: "jv-button" }, { children: "..." })) : a.jsx("div", Object.assign({ className: "jv-indent" }, { children: Object.entries(e).map(([f, m]) => a.jsx(ge, { indexOrName: f, value: m, depth: t, parent: e, deleteHandle: P, editHandle: V, parentPath: j }, String(r) + String(f))) })), a.jsx("span", { children: "}" }), x && G(I, t, x) && a.jsxs("span", Object.assign({ onClick: () => O(!1), className: "jv-size" }, { children: [te(e), " Items"] }))] }) : a.jsx("span", { children: String(e) });
|
|
920
858
|
}
|
|
921
|
-
const
|
|
859
|
+
const lr = K.forwardRef(({ str: e, className: t, ctrlClick: r }, n) => {
|
|
922
860
|
let { collapseStringMode: l, collapseStringsAfterLength: i, customizeCollapseStringUI: o } = J(W);
|
|
923
|
-
const [c, u] =
|
|
861
|
+
const [c, u] = H(!0), d = xe(null);
|
|
924
862
|
i = i > 0 ? i : 0;
|
|
925
|
-
const
|
|
926
|
-
var
|
|
927
|
-
if ((
|
|
928
|
-
|
|
863
|
+
const p = e.replace(/\s+/g, " "), v = typeof o == "function" ? o(p, c) : typeof o == "string" ? o : "...", y = (w) => {
|
|
864
|
+
var b;
|
|
865
|
+
if ((w.ctrlKey || w.metaKey) && r)
|
|
866
|
+
r(w);
|
|
929
867
|
else {
|
|
930
868
|
const C = window.getSelection();
|
|
931
|
-
if (C && C.anchorOffset !== C.focusOffset && ((
|
|
869
|
+
if (C && C.anchorOffset !== C.focusOffset && ((b = C.anchorNode) === null || b === void 0 ? void 0 : b.parentElement) === d.current)
|
|
932
870
|
return;
|
|
933
871
|
u(!c);
|
|
934
872
|
}
|
|
935
873
|
};
|
|
936
874
|
if (e.length <= i)
|
|
937
|
-
return a.jsxs("span", Object.assign({ ref: d, className: t, onClick:
|
|
875
|
+
return a.jsxs("span", Object.assign({ ref: d, className: t, onClick: r }, { children: ['"', e, '"'] }));
|
|
938
876
|
if (l === "address")
|
|
939
|
-
return e.length <= 10 ? a.jsxs("span", Object.assign({ ref: d, className: t, onClick:
|
|
877
|
+
return e.length <= 10 ? a.jsxs("span", Object.assign({ ref: d, className: t, onClick: r }, { children: ['"', e, '"'] })) : a.jsxs("span", Object.assign({ ref: d, onClick: y, className: t + " cursor-pointer" }, { children: ['"', c ? [p.slice(0, 6), v, p.slice(-4)] : e, '"'] }));
|
|
940
878
|
if (l === "directly")
|
|
941
|
-
return a.jsxs("span", Object.assign({ ref: d, onClick: y, className: t + " cursor-pointer" }, { children: ['"', c ? [
|
|
879
|
+
return a.jsxs("span", Object.assign({ ref: d, onClick: y, className: t + " cursor-pointer" }, { children: ['"', c ? [p.slice(0, i), v] : e, '"'] }));
|
|
942
880
|
if (l === "word") {
|
|
943
|
-
let
|
|
881
|
+
let w = i, b = i + 1, C = p, N = 1;
|
|
944
882
|
for (; ; ) {
|
|
945
|
-
if (/\W/.test(e[E])) {
|
|
946
|
-
C = e.slice(0, E);
|
|
947
|
-
break;
|
|
948
|
-
}
|
|
949
883
|
if (/\W/.test(e[w])) {
|
|
950
884
|
C = e.slice(0, w);
|
|
951
885
|
break;
|
|
952
886
|
}
|
|
887
|
+
if (/\W/.test(e[b])) {
|
|
888
|
+
C = e.slice(0, b);
|
|
889
|
+
break;
|
|
890
|
+
}
|
|
953
891
|
if (N === 6) {
|
|
954
892
|
C = e.slice(0, i);
|
|
955
893
|
break;
|
|
956
894
|
}
|
|
957
|
-
N++,
|
|
895
|
+
N++, w--, b++;
|
|
958
896
|
}
|
|
959
|
-
return a.jsxs("span", Object.assign({ ref: d, onClick: y, className: t + " cursor-pointer" }, { children: ['"', c ? [C,
|
|
897
|
+
return a.jsxs("span", Object.assign({ ref: d, onClick: y, className: t + " cursor-pointer" }, { children: ['"', c ? [C, v] : e, '"'] }));
|
|
960
898
|
}
|
|
961
899
|
return a.jsxs("span", Object.assign({ ref: d, className: t }, { children: ['"', e, '"'] }));
|
|
962
900
|
});
|
|
963
|
-
var
|
|
964
|
-
function
|
|
965
|
-
return
|
|
901
|
+
var Qe;
|
|
902
|
+
function be() {
|
|
903
|
+
return be = Object.assign ? Object.assign.bind() : function(e) {
|
|
966
904
|
for (var t = 1; t < arguments.length; t++) {
|
|
967
|
-
var
|
|
968
|
-
for (var
|
|
969
|
-
Object.prototype.hasOwnProperty.call(
|
|
905
|
+
var r = arguments[t];
|
|
906
|
+
for (var n in r)
|
|
907
|
+
Object.prototype.hasOwnProperty.call(r, n) && (e[n] = r[n]);
|
|
970
908
|
}
|
|
971
909
|
return e;
|
|
972
|
-
},
|
|
910
|
+
}, be.apply(this, arguments);
|
|
973
911
|
}
|
|
974
|
-
var
|
|
975
|
-
return /* @__PURE__ */
|
|
912
|
+
var cr = function(t) {
|
|
913
|
+
return /* @__PURE__ */ k.createElement("svg", be({
|
|
976
914
|
xmlns: "http://www.w3.org/2000/svg",
|
|
977
915
|
width: 24,
|
|
978
916
|
height: 24,
|
|
979
917
|
fill: "none",
|
|
980
918
|
viewBox: "0 0 24 24"
|
|
981
|
-
}, t),
|
|
919
|
+
}, t), Qe || (Qe = /* @__PURE__ */ k.createElement("path", {
|
|
982
920
|
fill: "currentColor",
|
|
983
921
|
d: "M17.25 3H6.75A3.754 3.754 0 0 0 3 6.75v10.5A3.754 3.754 0 0 0 6.75 21h10.5A3.754 3.754 0 0 0 21 17.25V6.75A3.754 3.754 0 0 0 17.25 3Zm2.25 14.25c0 1.24-1.01 2.25-2.25 2.25H6.75c-1.24 0-2.25-1.01-2.25-2.25V6.75c0-1.24 1.01-2.25 2.25-2.25h10.5c1.24 0 2.25 1.01 2.25 2.25v10.5Zm-6.09-9.466-5.031 5.03a2.981 2.981 0 0 0-.879 2.121v1.19c0 .415.336.75.75.75h1.19c.8 0 1.554-.312 2.12-.879l5.03-5.03a2.252 2.252 0 0 0 0-3.182c-.85-.85-2.331-.85-3.18 0Zm-2.91 7.151c-.28.28-.666.44-1.06.44H9v-.44c0-.4.156-.777.44-1.06l3.187-3.188 1.06 1.061-3.187 3.188Zm5.03-5.03-.782.783-1.06-1.061.782-.782a.766.766 0 0 1 1.06 0 .75.75 0 0 1 0 1.06Z"
|
|
984
922
|
})));
|
|
985
|
-
},
|
|
986
|
-
function
|
|
987
|
-
return
|
|
923
|
+
}, et, tt;
|
|
924
|
+
function ye() {
|
|
925
|
+
return ye = Object.assign ? Object.assign.bind() : function(e) {
|
|
988
926
|
for (var t = 1; t < arguments.length; t++) {
|
|
989
|
-
var
|
|
990
|
-
for (var
|
|
991
|
-
Object.prototype.hasOwnProperty.call(
|
|
927
|
+
var r = arguments[t];
|
|
928
|
+
for (var n in r)
|
|
929
|
+
Object.prototype.hasOwnProperty.call(r, n) && (e[n] = r[n]);
|
|
992
930
|
}
|
|
993
931
|
return e;
|
|
994
|
-
},
|
|
932
|
+
}, ye.apply(this, arguments);
|
|
995
933
|
}
|
|
996
|
-
var
|
|
997
|
-
return /* @__PURE__ */
|
|
934
|
+
var ur = function(t) {
|
|
935
|
+
return /* @__PURE__ */ k.createElement("svg", ye({
|
|
998
936
|
xmlns: "http://www.w3.org/2000/svg",
|
|
999
937
|
width: 24,
|
|
1000
938
|
height: 24,
|
|
1001
939
|
fill: "none",
|
|
1002
940
|
viewBox: "0 0 24 24"
|
|
1003
|
-
}, t),
|
|
941
|
+
}, t), et || (et = /* @__PURE__ */ k.createElement("path", {
|
|
1004
942
|
fill: "currentColor",
|
|
1005
943
|
d: "M6.75 3h5.5v1.5h-5.5C5.51 4.5 4.5 5.51 4.5 6.75v10.5c0 1.24 1.01 2.25 2.25 2.25h10.5c1.24 0 2.25-1.01 2.25-2.25v-5.5H21v5.5A3.754 3.754 0 0 1 17.25 21H6.75A3.754 3.754 0 0 1 3 17.25V6.75A3.754 3.754 0 0 1 6.75 3Z"
|
|
1006
|
-
})),
|
|
944
|
+
})), tt || (tt = /* @__PURE__ */ k.createElement("path", {
|
|
1007
945
|
fill: "currentColor",
|
|
1008
946
|
d: "M20.013 3h-3.946a.987.987 0 0 0 0 1.973h1.564l-6.342 6.342a1.004 1.004 0 0 0 0 1.396 1.004 1.004 0 0 0 1.396 0l6.342-6.342v1.564a.987.987 0 0 0 1.973 0V3.987A.987.987 0 0 0 20.013 3Z"
|
|
1009
947
|
})));
|
|
1010
948
|
};
|
|
1011
|
-
function
|
|
1012
|
-
const { collapseStringsAfterLength: c, enableClipboard: u, editable: d, src:
|
|
1013
|
-
let
|
|
1014
|
-
if (typeof
|
|
1015
|
-
if (
|
|
1016
|
-
return
|
|
1017
|
-
if (
|
|
1018
|
-
const
|
|
1019
|
-
return a.jsx(
|
|
949
|
+
function ut({ node: e, depth: t, deleteHandle: r, indexOrName: n, parent: l, editHandle: i, parentPath: o }) {
|
|
950
|
+
const { collapseStringsAfterLength: c, enableClipboard: u, editable: d, src: p, onDelete: v, onChange: y, customizeNode: w, matchesURL: b, urlRegExp: C, EditComponent: N, DoneComponent: E, CancelComponent: D, CustomOperation: I } = J(W);
|
|
951
|
+
let h;
|
|
952
|
+
if (typeof w == "function" && (h = Ee(w, [{ node: e, depth: t, indexOrName: n }])), h) {
|
|
953
|
+
if (mt(h))
|
|
954
|
+
return h;
|
|
955
|
+
if (er(h)) {
|
|
956
|
+
const j = h;
|
|
957
|
+
return a.jsx(j, { node: e, depth: t, indexOrName: n });
|
|
1020
958
|
}
|
|
1021
959
|
}
|
|
1022
960
|
if (Array.isArray(e) || B(e))
|
|
1023
|
-
return a.jsx(
|
|
961
|
+
return a.jsx(ir, { parent: l, node: e, depth: t, indexOrName: n, deleteHandle: r, parentPath: o, customOptions: typeof h == "object" ? h : void 0 });
|
|
1024
962
|
{
|
|
1025
|
-
const
|
|
1026
|
-
|
|
1027
|
-
var f,
|
|
1028
|
-
(f = window.getSelection()) === null || f === void 0 || f.selectAllChildren(
|
|
963
|
+
const j = typeof e, A = typeof n < "u" ? [...o, String(n)] : o, [x, Z] = H(!1), [O, V] = H(!1), P = xe(null), L = () => {
|
|
964
|
+
Z(!0), setTimeout(() => {
|
|
965
|
+
var f, m;
|
|
966
|
+
(f = window.getSelection()) === null || f === void 0 || f.selectAllChildren(P.current), (m = P.current) === null || m === void 0 || m.focus();
|
|
1029
967
|
});
|
|
1030
|
-
},
|
|
1031
|
-
let f =
|
|
968
|
+
}, $ = re(() => {
|
|
969
|
+
let f = P.current.innerText;
|
|
1032
970
|
try {
|
|
1033
|
-
const
|
|
1034
|
-
i && i(
|
|
971
|
+
const m = JSON.parse(f);
|
|
972
|
+
i && i(n, m, e, o);
|
|
1035
973
|
} catch {
|
|
1036
|
-
const
|
|
1037
|
-
i && i(
|
|
974
|
+
const Y = rr(j, f);
|
|
975
|
+
i && i(n, Y, e, o);
|
|
1038
976
|
}
|
|
1039
|
-
|
|
1040
|
-
}, [i,
|
|
1041
|
-
|
|
977
|
+
Z(!1);
|
|
978
|
+
}, [i, n, e, o, j]), z = () => {
|
|
979
|
+
Z(!1), V(!1);
|
|
1042
980
|
}, T = () => {
|
|
1043
|
-
|
|
981
|
+
V(!1), r && r(n, o), v && v({
|
|
1044
982
|
value: e,
|
|
1045
983
|
depth: t,
|
|
1046
|
-
src:
|
|
1047
|
-
indexOrName:
|
|
984
|
+
src: p,
|
|
985
|
+
indexOrName: n,
|
|
1048
986
|
parentType: Array.isArray(l) ? "array" : "object",
|
|
1049
987
|
parentPath: o
|
|
1050
988
|
}), y && y({
|
|
1051
989
|
depth: t,
|
|
1052
|
-
src:
|
|
1053
|
-
indexOrName:
|
|
990
|
+
src: p,
|
|
991
|
+
indexOrName: n,
|
|
1054
992
|
parentType: Array.isArray(l) ? "array" : "object",
|
|
1055
993
|
type: "delete",
|
|
1056
994
|
parentPath: o
|
|
1057
995
|
});
|
|
1058
|
-
},
|
|
1059
|
-
f.key === "Enter" ? (f.preventDefault(),
|
|
1060
|
-
}, [
|
|
996
|
+
}, M = re((f) => {
|
|
997
|
+
f.key === "Enter" ? (f.preventDefault(), $()) : f.key === "Escape" && z();
|
|
998
|
+
}, [$]), _ = x || O, U = !_ && Fe(d) && He(h) && i ? (f) => {
|
|
1061
999
|
(f.ctrlKey || f.metaKey) && L();
|
|
1062
|
-
} : void 0,
|
|
1063
|
-
let
|
|
1064
|
-
switch (
|
|
1000
|
+
} : void 0, F = a.jsxs(a.Fragment, { children: [_ && (typeof E == "function" ? a.jsx(E, { className: "json-view--edit", style: { display: "inline-block" }, onClick: O ? T : $ }) : a.jsx(Te, { className: "json-view--edit", style: { display: "inline-block" }, onClick: O ? T : $ })), _ && (typeof D == "function" ? a.jsx(D, { className: "json-view--edit", style: { display: "inline-block" }, onClick: z }) : a.jsx(Ne, { className: "json-view--edit", style: { display: "inline-block" }, onClick: z })), !_ && u && oe(h) && a.jsx(ie, { node: e, nodeMeta: { depth: t, indexOrName: n, parent: l, parentPath: o, currentPath: A } }), !_ && b && j === "string" && C.test(e) && tr(h) && a.jsx("a", Object.assign({ href: e, target: "_blank", className: "json-view--link" }, { children: a.jsx(ur, {}) })), !_ && Fe(d) && He(h) && i && (typeof N == "function" ? a.jsx(N, { className: "json-view--edit", onClick: L }) : a.jsx(cr, { className: "json-view--edit", onClick: L })), !_ && Ae(d) && Se(h) && r && a.jsx(ke, { className: "json-view--edit", onClick: () => V(!0) }), typeof I == "function" ? a.jsx(I, { node: e }) : null] });
|
|
1001
|
+
let S = "json-view--string";
|
|
1002
|
+
switch (j) {
|
|
1065
1003
|
case "number":
|
|
1066
1004
|
case "bigint":
|
|
1067
|
-
|
|
1005
|
+
S = "json-view--number";
|
|
1068
1006
|
break;
|
|
1069
1007
|
case "boolean":
|
|
1070
|
-
|
|
1008
|
+
S = "json-view--boolean";
|
|
1071
1009
|
break;
|
|
1072
1010
|
case "object":
|
|
1073
|
-
|
|
1011
|
+
S = "json-view--null";
|
|
1074
1012
|
break;
|
|
1075
1013
|
}
|
|
1076
|
-
typeof
|
|
1077
|
-
let
|
|
1078
|
-
|
|
1079
|
-
const
|
|
1080
|
-
return
|
|
1014
|
+
typeof h?.className == "string" && (S += " " + h.className), O && (S += " json-view--deleting");
|
|
1015
|
+
let s = String(e);
|
|
1016
|
+
j === "bigint" && (s += "n");
|
|
1017
|
+
const g = se(() => a.jsx("span", { contentEditable: !0, className: S, dangerouslySetInnerHTML: { __html: j === "string" ? `"${s}"` : s }, ref: P, onKeyDown: M }), [s, j, M]);
|
|
1018
|
+
return j === "string" ? a.jsxs(a.Fragment, { children: [x ? g : e.length > c ? a.jsx(lr, { str: e, ref: P, className: S, ctrlClick: U }) : a.jsxs("span", Object.assign({ className: S, onClick: U }, { children: ['"', s, '"'] })), F] }) : a.jsxs(a.Fragment, { children: [x ? g : a.jsx("span", Object.assign({ className: S, onClick: U }, { children: s })), F] });
|
|
1081
1019
|
}
|
|
1082
1020
|
}
|
|
1083
|
-
const
|
|
1021
|
+
const ft = /^(((ht|f)tps?):\/\/)?([^!@#$%^&*?.\s-]([^!@#$%^&*?.\s]{0,63}[^!@#$%^&*?.\s])?\.)+[a-z]{2,6}\/?/, W = gt({
|
|
1084
1022
|
src: void 0,
|
|
1085
1023
|
collapseStringsAfterLength: 99,
|
|
1086
1024
|
collapseStringMode: "directly",
|
|
@@ -1097,12 +1035,12 @@ const dt = /^(((ht|f)tps?):\/\/)?([^!@#$%^&*?.\s-]([^!@#$%^&*?.\s]{0,63}[^!@#$%^
|
|
|
1097
1035
|
forceUpdate: () => {
|
|
1098
1036
|
},
|
|
1099
1037
|
customizeNode: void 0,
|
|
1100
|
-
customizeCopy: () => {
|
|
1101
|
-
},
|
|
1038
|
+
customizeCopy: (() => {
|
|
1039
|
+
}),
|
|
1102
1040
|
displaySize: void 0,
|
|
1103
1041
|
displayArrayIndex: !0,
|
|
1104
1042
|
matchesURL: !1,
|
|
1105
|
-
urlRegExp:
|
|
1043
|
+
urlRegExp: ft,
|
|
1106
1044
|
ignoreLargeArray: !1,
|
|
1107
1045
|
CopyComponent: void 0,
|
|
1108
1046
|
CopiedComponent: void 0,
|
|
@@ -1111,108 +1049,108 @@ const dt = /^(((ht|f)tps?):\/\/)?([^!@#$%^&*?.\s-]([^!@#$%^&*?.\s]{0,63}[^!@#$%^
|
|
|
1111
1049
|
DoneComponent: void 0,
|
|
1112
1050
|
CustomOperation: void 0
|
|
1113
1051
|
});
|
|
1114
|
-
function
|
|
1115
|
-
const [
|
|
1116
|
-
return
|
|
1117
|
-
src:
|
|
1052
|
+
function fr({ src: e, collapseStringsAfterLength: t = 99, collapseStringMode: r = "directly", customizeCollapseStringUI: n, collapseObjectsAfterLength: l = 99, collapsed: i, onCollapse: o, enableClipboard: c = !0, editable: u = !1, onEdit: d, onDelete: p, onAdd: v, onChange: y, dark: w = !1, theme: b = "default", customizeNode: C, customizeCopy: N = (z) => Xt(z), displaySize: E, displayArrayIndex: D = !0, style: I, className: h, matchesURL: j = !1, urlRegExp: A = ft, ignoreLargeArray: x = !1, CopyComponent: Z, CopiedComponent: O, EditComponent: V, CancelComponent: P, DoneComponent: L, CustomOperation: $ }) {
|
|
1053
|
+
const [z, T] = H(0), M = re(() => T((F) => ++F), []), [_, U] = H(e);
|
|
1054
|
+
return we(() => U(e), [e]), a.jsx(W.Provider, Object.assign({ value: {
|
|
1055
|
+
src: _,
|
|
1118
1056
|
collapseStringsAfterLength: t,
|
|
1119
|
-
collapseStringMode:
|
|
1120
|
-
customizeCollapseStringUI:
|
|
1057
|
+
collapseStringMode: r,
|
|
1058
|
+
customizeCollapseStringUI: n,
|
|
1121
1059
|
collapseObjectsAfterLength: l,
|
|
1122
1060
|
collapsed: i,
|
|
1123
1061
|
onCollapse: o,
|
|
1124
1062
|
enableClipboard: c,
|
|
1125
1063
|
editable: u,
|
|
1126
1064
|
onEdit: d,
|
|
1127
|
-
onDelete:
|
|
1128
|
-
onAdd:
|
|
1065
|
+
onDelete: p,
|
|
1066
|
+
onAdd: v,
|
|
1129
1067
|
onChange: y,
|
|
1130
|
-
forceUpdate:
|
|
1068
|
+
forceUpdate: M,
|
|
1131
1069
|
customizeNode: C,
|
|
1132
1070
|
customizeCopy: N,
|
|
1133
|
-
displaySize:
|
|
1071
|
+
displaySize: E,
|
|
1134
1072
|
displayArrayIndex: D,
|
|
1135
|
-
matchesURL:
|
|
1136
|
-
urlRegExp:
|
|
1073
|
+
matchesURL: j,
|
|
1074
|
+
urlRegExp: A,
|
|
1137
1075
|
ignoreLargeArray: x,
|
|
1138
|
-
CopyComponent:
|
|
1076
|
+
CopyComponent: Z,
|
|
1139
1077
|
CopiedComponent: O,
|
|
1140
|
-
EditComponent:
|
|
1141
|
-
CancelComponent:
|
|
1078
|
+
EditComponent: V,
|
|
1079
|
+
CancelComponent: P,
|
|
1142
1080
|
DoneComponent: L,
|
|
1143
|
-
CustomOperation:
|
|
1144
|
-
} }, { children: a.jsx("code", Object.assign({ className: "json-view" + (
|
|
1145
|
-
|
|
1146
|
-
newValue:
|
|
1147
|
-
oldValue:
|
|
1081
|
+
CustomOperation: $
|
|
1082
|
+
} }, { children: a.jsx("code", Object.assign({ className: "json-view" + (w ? " dark" : "") + (b && b !== "default" ? " json-view_" + b : "") + (h ? " " + h : ""), style: I }, { children: a.jsx(ut, { node: _, depth: 1, editHandle: (F, S, s, g) => {
|
|
1083
|
+
U(S), d && d({
|
|
1084
|
+
newValue: S,
|
|
1085
|
+
oldValue: s,
|
|
1148
1086
|
depth: 1,
|
|
1149
|
-
src:
|
|
1150
|
-
indexOrName:
|
|
1087
|
+
src: _,
|
|
1088
|
+
indexOrName: F,
|
|
1151
1089
|
parentType: null,
|
|
1152
|
-
parentPath:
|
|
1153
|
-
}), y && y({ type: "edit", depth: 1, src:
|
|
1154
|
-
}, deleteHandle: (
|
|
1155
|
-
|
|
1156
|
-
value:
|
|
1090
|
+
parentPath: g
|
|
1091
|
+
}), y && y({ type: "edit", depth: 1, src: _, indexOrName: F, parentType: null, parentPath: g });
|
|
1092
|
+
}, deleteHandle: (F, S) => {
|
|
1093
|
+
U(void 0), p && p({
|
|
1094
|
+
value: _,
|
|
1157
1095
|
depth: 1,
|
|
1158
|
-
src:
|
|
1159
|
-
indexOrName:
|
|
1096
|
+
src: _,
|
|
1097
|
+
indexOrName: F,
|
|
1160
1098
|
parentType: null,
|
|
1161
|
-
parentPath:
|
|
1099
|
+
parentPath: S
|
|
1162
1100
|
}), y && y({
|
|
1163
1101
|
depth: 1,
|
|
1164
|
-
src:
|
|
1165
|
-
indexOrName:
|
|
1102
|
+
src: _,
|
|
1103
|
+
indexOrName: F,
|
|
1166
1104
|
parentType: null,
|
|
1167
1105
|
type: "delete",
|
|
1168
|
-
parentPath:
|
|
1106
|
+
parentPath: S
|
|
1169
1107
|
});
|
|
1170
1108
|
}, parentPath: [] }) })) }));
|
|
1171
1109
|
}
|
|
1172
|
-
const
|
|
1173
|
-
const [
|
|
1110
|
+
const dr = ["id", "msg", "time", "level", "step", "flows", "traceId"], pr = ({ log: e, onClose: t }) => {
|
|
1111
|
+
const [r, n] = H(!1), l = se(() => {
|
|
1174
1112
|
if (!e)
|
|
1175
1113
|
return null;
|
|
1176
|
-
const i = Object.keys(e ?? {}).filter((o) => !
|
|
1177
|
-
return
|
|
1114
|
+
const i = Object.keys(e ?? {}).filter((o) => !dr.includes(o));
|
|
1115
|
+
return n(i.length > 0), i.reduce(
|
|
1178
1116
|
(o, c) => (o[c] = e[c], o),
|
|
1179
1117
|
{}
|
|
1180
1118
|
);
|
|
1181
1119
|
}, [e]);
|
|
1182
1120
|
return e ? /* @__PURE__ */ a.jsx(
|
|
1183
|
-
|
|
1121
|
+
vt,
|
|
1184
1122
|
{
|
|
1185
1123
|
onClose: t,
|
|
1186
1124
|
title: "Logs Details",
|
|
1187
1125
|
subtitle: "Details including custom properties",
|
|
1188
|
-
actions: [{ icon: /* @__PURE__ */ a.jsx(
|
|
1126
|
+
actions: [{ icon: /* @__PURE__ */ a.jsx(st, {}), onClick: t, label: "Close" }],
|
|
1189
1127
|
details: [
|
|
1190
1128
|
{
|
|
1191
1129
|
label: "Level",
|
|
1192
1130
|
value: /* @__PURE__ */ a.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
1193
|
-
/* @__PURE__ */ a.jsx(
|
|
1131
|
+
/* @__PURE__ */ a.jsx(nt, { level: e.level }),
|
|
1194
1132
|
/* @__PURE__ */ a.jsx("div", { className: "capitalize", children: e.level })
|
|
1195
1133
|
] })
|
|
1196
1134
|
},
|
|
1197
|
-
{ label: "Time", value:
|
|
1135
|
+
{ label: "Time", value: ot(e.time) },
|
|
1198
1136
|
{ label: "Step", value: e.step },
|
|
1199
1137
|
{ label: "Flows", value: e.flows.join(", ") },
|
|
1200
1138
|
{ label: "Trace ID", value: e.traceId }
|
|
1201
1139
|
],
|
|
1202
|
-
children:
|
|
1140
|
+
children: r && /* @__PURE__ */ a.jsx(fr, { src: l, theme: "default", enableClipboard: !0 })
|
|
1203
1141
|
}
|
|
1204
1142
|
) : null;
|
|
1205
|
-
},
|
|
1206
|
-
const e = ee((u) => u.logs), t = ee((u) => u.resetLogs),
|
|
1207
|
-
() =>
|
|
1208
|
-
[e,
|
|
1209
|
-
), [i, o] =
|
|
1143
|
+
}, hr = () => {
|
|
1144
|
+
const e = ee((u) => u.logs), t = ee((u) => u.resetLogs), r = ee((u) => u.selectedLogId), n = ee((u) => u.selectLogId), l = se(
|
|
1145
|
+
() => r ? e.find((u) => u.id === r) : void 0,
|
|
1146
|
+
[e, r]
|
|
1147
|
+
), [i, o] = H(""), c = se(() => e.filter((u) => u.msg.toLowerCase().includes(i.toLowerCase()) || u.traceId.toLowerCase().includes(i.toLowerCase()) || u.step.toLowerCase().includes(i.toLowerCase())), [e, i]);
|
|
1210
1148
|
return /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
|
|
1211
1149
|
/* @__PURE__ */ a.jsxs("div", { className: "grid grid-rows-[auto_1fr] h-full", "data-testid": "logs-container", children: [
|
|
1212
1150
|
/* @__PURE__ */ a.jsxs("div", { className: "flex p-2 border-b gap-2", "data-testid": "logs-search-container", children: [
|
|
1213
1151
|
/* @__PURE__ */ a.jsxs("div", { className: "flex-1 relative", children: [
|
|
1214
1152
|
/* @__PURE__ */ a.jsx(
|
|
1215
|
-
|
|
1153
|
+
ht,
|
|
1216
1154
|
{
|
|
1217
1155
|
variant: "shade",
|
|
1218
1156
|
value: i,
|
|
@@ -1221,43 +1159,43 @@ const gn = ["id", "msg", "time", "level", "step", "flows", "traceId"], mn = ({ l
|
|
|
1221
1159
|
placeholder: "Search by Trace ID or Message"
|
|
1222
1160
|
}
|
|
1223
1161
|
),
|
|
1224
|
-
/* @__PURE__ */ a.jsx(
|
|
1162
|
+
/* @__PURE__ */ a.jsx(Ut, { className: "absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-muted-foreground/50" }),
|
|
1225
1163
|
/* @__PURE__ */ a.jsx(
|
|
1226
|
-
|
|
1164
|
+
st,
|
|
1227
1165
|
{
|
|
1228
1166
|
className: "cursor-pointer absolute right-3 top-1/2 -translate-y-1/2 w-4 h-4 text-muted-foreground/50 hover:text-muted-foreground",
|
|
1229
1167
|
onClick: () => o("")
|
|
1230
1168
|
}
|
|
1231
1169
|
)
|
|
1232
1170
|
] }),
|
|
1233
|
-
/* @__PURE__ */ a.jsxs(
|
|
1234
|
-
/* @__PURE__ */ a.jsx(
|
|
1171
|
+
/* @__PURE__ */ a.jsxs(jt, { variant: "default", onClick: t, className: "h-[34px]", children: [
|
|
1172
|
+
/* @__PURE__ */ a.jsx(Vt, {}),
|
|
1235
1173
|
" Clear"
|
|
1236
1174
|
] })
|
|
1237
1175
|
] }),
|
|
1238
|
-
/* @__PURE__ */ a.jsx(
|
|
1239
|
-
|
|
1176
|
+
/* @__PURE__ */ a.jsx(bt, { children: /* @__PURE__ */ a.jsx(yt, { className: "font-mono font-medium", children: c.map((u, d) => /* @__PURE__ */ a.jsxs(
|
|
1177
|
+
wt,
|
|
1240
1178
|
{
|
|
1241
1179
|
"data-testid": "log-row",
|
|
1242
|
-
className:
|
|
1243
|
-
"bg-muted-foreground/10 hover:bg-muted-foreground/20":
|
|
1244
|
-
"hover:bg-muted-foreground/10":
|
|
1180
|
+
className: xt("font-mono font-semibold cursor-pointer border-0", {
|
|
1181
|
+
"bg-muted-foreground/10 hover:bg-muted-foreground/20": r === u.id,
|
|
1182
|
+
"hover:bg-muted-foreground/10": r !== u.id
|
|
1245
1183
|
}),
|
|
1246
|
-
onClick: () =>
|
|
1184
|
+
onClick: () => n(u.id),
|
|
1247
1185
|
children: [
|
|
1248
1186
|
/* @__PURE__ */ a.jsxs(
|
|
1249
|
-
|
|
1187
|
+
ne,
|
|
1250
1188
|
{
|
|
1251
1189
|
"data-testid": `time-${d}`,
|
|
1252
1190
|
className: "whitespace-nowrap flex items-center gap-2 text-muted-foreground",
|
|
1253
1191
|
children: [
|
|
1254
|
-
/* @__PURE__ */ a.jsx(
|
|
1255
|
-
|
|
1192
|
+
/* @__PURE__ */ a.jsx(nt, { level: u.level }),
|
|
1193
|
+
ot(u.time)
|
|
1256
1194
|
]
|
|
1257
1195
|
}
|
|
1258
1196
|
),
|
|
1259
1197
|
/* @__PURE__ */ a.jsx(
|
|
1260
|
-
|
|
1198
|
+
ne,
|
|
1261
1199
|
{
|
|
1262
1200
|
"data-testid": `trace-${u.traceId}`,
|
|
1263
1201
|
className: "whitespace-nowrap cursor-pointer hover:text-primary text-muted-foreground",
|
|
@@ -1265,9 +1203,9 @@ const gn = ["id", "msg", "time", "level", "step", "flows", "traceId"], mn = ({ l
|
|
|
1265
1203
|
children: u.traceId
|
|
1266
1204
|
}
|
|
1267
1205
|
),
|
|
1268
|
-
/* @__PURE__ */ a.jsx(
|
|
1206
|
+
/* @__PURE__ */ a.jsx(ne, { "data-testid": `step-${d}`, "aria-label": u.step, className: "whitespace-nowrap", children: u.step }),
|
|
1269
1207
|
/* @__PURE__ */ a.jsx(
|
|
1270
|
-
|
|
1208
|
+
ne,
|
|
1271
1209
|
{
|
|
1272
1210
|
"data-testid": `msg-${d}`,
|
|
1273
1211
|
"aria-label": u.msg,
|
|
@@ -1280,10 +1218,10 @@ const gn = ["id", "msg", "time", "level", "step", "flows", "traceId"], mn = ({ l
|
|
|
1280
1218
|
d
|
|
1281
1219
|
)) }) })
|
|
1282
1220
|
] }),
|
|
1283
|
-
/* @__PURE__ */ a.jsx(
|
|
1221
|
+
/* @__PURE__ */ a.jsx(pr, { log: l, onClose: () => n(void 0) })
|
|
1284
1222
|
] });
|
|
1285
1223
|
};
|
|
1286
|
-
|
|
1224
|
+
Ot();
|
|
1287
1225
|
export {
|
|
1288
|
-
|
|
1226
|
+
hr as LogsPage
|
|
1289
1227
|
};
|