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