@motiadev/plugin-logs 0.9.4-beta.150 → 0.9.4-beta.151-852305

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.js CHANGED
@@ -1,58 +1,49 @@
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) => {
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 n = /* @__PURE__ */ new Set(), r = (d, g) => {
8
- const m = typeof d == "function" ? d(t) : d;
9
- if (!Object.is(m, t)) {
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 = g ?? (typeof m != "object" || m === null) ? m : Object.assign({}, t, m), n.forEach((E) => E(t, y));
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: r, getState: l, getInitialState: () => u, subscribe: (d) => (n.add(d), () => n.delete(d)) }, u = t = e(r, l, c);
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
- }, Et = (e) => e ? Re(e) : Re, At = (e) => e;
16
- function St(e, t = At) {
17
- const n = K.useSyncExternalStore(
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(n), n;
22
+ return K.useDebugValue(r), r;
23
23
  }
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) => ({
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((n) => ({
31
- logs: [t, ...n.logs]
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
- })), 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);
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
- * @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;
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(r, l, i) {
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: r,
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 = n, X.jsxs = n, X;
61
+ return X.Fragment = t, X.jsx = r, X.jsxs = r, X;
71
62
  }
72
63
  var Q = {};
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() {
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 === Y ? null : s.displayName || s.name || null;
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 C:
73
+ case N:
92
74
  return "Fragment";
93
- case A:
75
+ case D:
94
76
  return "Profiler";
95
- case N:
77
+ case E:
96
78
  return "StrictMode";
97
- case h:
79
+ case A:
98
80
  return "Suspense";
99
- case S:
81
+ case x:
100
82
  return "SuspenseList";
101
- case O:
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 w:
90
+ case C:
109
91
  return "Portal";
110
- case P:
111
- return (s.displayName || "Context") + ".Provider";
112
- case D:
92
+ case h:
93
+ return s.displayName || "Context";
94
+ case I:
113
95
  return (s._context.displayName || "Context") + ".Consumer";
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;
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(p));
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 n(s) {
113
+ function r(s) {
132
114
  try {
133
115
  t(s);
134
- var p = !1;
116
+ var g = !1;
135
117
  } catch {
136
- p = !0;
118
+ g = !0;
137
119
  }
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,
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
- f
126
+ m
145
127
  ), t(s);
146
128
  }
147
129
  }
148
- function r(s) {
149
- if (s === C) return "<>";
150
- if (typeof s == "object" && s !== null && s.$$typeof === H)
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 p = e(s);
154
- return p ? "<" + p + ">" : "<...>";
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 = R.A;
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 (L.call(s, "key")) {
168
- var p = Object.getOwnPropertyDescriptor(s, "key").get;
169
- if (p && p.isReactWarning) return !1;
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, p) {
174
- function b() {
175
- T || (T = !0, console.error(
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
- p
159
+ g
178
160
  ));
179
161
  }
180
- b.isReactWarning = !0, Object.defineProperty(s, "key", {
181
- get: b,
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 $[s] || ($[s] = !0, console.error(
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, p, b, f, j, z, le, ce) {
192
- return b = z.ref, s = {
193
- $$typeof: E,
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: p,
196
- props: z,
197
- _owner: j
198
- }, (b !== void 0 ? b : null) !== null ? Object.defineProperty(s, "ref", {
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: le
198
+ value: Y
216
199
  }), Object.defineProperty(s, "_debugTask", {
217
200
  configurable: !1,
218
201
  enumerable: !1,
219
202
  writable: !0,
220
- value: ce
203
+ value: le
221
204
  }), Object.freeze && (Object.freeze(s.props), Object.freeze(s)), s;
222
205
  }
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);
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 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";
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
- f = 0 < q.length ? "{key: someKey, " + q.join(": ..., ") + ": ...}" : "{key: someKey}", M[I + f] || (q = 0 < q.length ? "{" + q.join(": ..., ") + ": ...}" : "{}", console.error(
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
- f,
249
- I,
231
+ m,
232
+ R,
250
233
  q,
251
- I
252
- ), M[I + f] = !0);
234
+ R
235
+ ), S[R + m] = !0);
253
236
  }
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,
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
- I,
265
- z,
266
- j,
247
+ R,
248
+ f,
267
249
  l(),
268
- b,
269
- le,
270
- ce
250
+ Y,
251
+ le
271
252
  );
272
253
  }
273
- function m(s) {
274
- typeof s == "object" && s !== null && s.$$typeof === E && s._store && (s._store.validated = 1);
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 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() {
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
- y = {
263
+ w = {
280
264
  react_stack_bottom_frame: function(s) {
281
265
  return s();
282
266
  }
283
267
  };
284
- var T, $ = {}, k = y.react_stack_bottom_frame.bind(
285
- y,
268
+ var M, _ = {}, U = w.react_stack_bottom_frame.bind(
269
+ w,
286
270
  i
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(
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
- p,
293
- b,
294
- !1,
276
+ g,
295
277
  f,
296
- j,
297
- z ? Error("react-stack-top-frame") : k,
298
- z ? Z(r(s)) : V
278
+ !1,
279
+ m ? Error("react-stack-top-frame") : U,
280
+ m ? T(n(s)) : F
299
281
  );
300
- }, Q.jsxs = function(s, p, b, f, j) {
301
- var z = 1e4 > R.recentlyCreatedOwnerStacks++;
302
- return g(
282
+ }, Q.jsxs = function(s, g, f) {
283
+ var m = 1e4 > L.recentlyCreatedOwnerStacks++;
284
+ return p(
303
285
  s,
304
- p,
305
- b,
306
- !0,
286
+ g,
307
287
  f,
308
- j,
309
- z ? Error("react-stack-top-frame") : k,
310
- z ? Z(r(s)) : V
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 Ie;
316
- function It() {
317
- return Ie || (Ie = 1, process.env.NODE_ENV === "production" ? ae.exports = Lt() : ae.exports = Dt()), ae.exports;
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 = 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(
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, n, r) => r ? r.toUpperCase() : n.toLowerCase()
329
- ), Pe = (e) => {
330
- const t = $t(e);
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
- }, st = (...e) => e.filter((t, n, r) => !!t && t.trim() !== "" && r.indexOf(t) === n).join(" ").trim(), Mt = (e) => {
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: n = 2,
365
- absoluteStrokeWidth: r,
326
+ strokeWidth: r = 2,
327
+ absoluteStrokeWidth: n,
366
328
  className: l = "",
367
329
  children: i,
368
330
  iconNode: o,
369
331
  ...c
370
- }, u) => fe(
332
+ }, u) => ue(
371
333
  "svg",
372
334
  {
373
335
  ref: u,
374
- ...Ft,
336
+ ...Mt,
375
337
  width: t,
376
338
  height: t,
377
339
  stroke: e,
378
- strokeWidth: r ? Number(n) * 24 / Number(t) : n,
379
- className: st("lucide", l),
380
- ...!i && !Mt(c) && { "aria-hidden": "true" },
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, g]) => fe(d, g)),
346
+ ...o.map(([d, p]) => ue(d, p)),
385
347
  ...Array.isArray(i) ? i : [i]
386
348
  ]
387
349
  )
388
350
  );
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, {
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: st(
401
- `lucide-${Pt(Pe(e))}`,
356
+ className: at(
357
+ `lucide-${It(Ie(e))}`,
402
358
  `lucide-${e}`,
403
- r
359
+ n
404
360
  ),
405
361
  ...l
406
362
  })
407
363
  );
408
- return n.displayName = Pe(e), n;
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
- ], 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 = [
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
- ], 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 = [
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
- ], ot = Ee("x", Yt), it = (e) => {
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 Bt(e, t, n, r) {
382
+ function Yt(e, t, r, n) {
445
383
  function l(i) {
446
- return i instanceof n ? i : new n(function(o) {
384
+ return i instanceof r ? i : new r(function(o) {
447
385
  o(i);
448
386
  });
449
387
  }
450
- return new (n || (n = Promise))(function(i, o) {
451
- function c(g) {
388
+ return new (r || (r = Promise))(function(i, o) {
389
+ function c(p) {
452
390
  try {
453
- d(r.next(g));
454
- } catch (m) {
455
- o(m);
391
+ d(n.next(p));
392
+ } catch (v) {
393
+ o(v);
456
394
  }
457
395
  }
458
- function u(g) {
396
+ function u(p) {
459
397
  try {
460
- d(r.throw(g));
461
- } catch (m) {
462
- o(m);
398
+ d(n.throw(p));
399
+ } catch (v) {
400
+ o(v);
463
401
  }
464
402
  }
465
- function d(g) {
466
- g.done ? i(g.value) : l(g.value).then(c, u);
403
+ function d(p) {
404
+ p.done ? i(p.value) : l(p.value).then(c, u);
467
405
  }
468
- d((r = r.apply(e, [])).next());
406
+ d((n = n.apply(e, [])).next());
469
407
  });
470
408
  }
471
- var Wt = function() {
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, n = [], r = 0; r < e.rangeCount; r++)
477
- n.push(e.getRangeAt(r));
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 || n.forEach(function(l) {
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
- }, Jt = Wt, $e = {
431
+ }, Wt = Bt, Pe = {
494
432
  "text/plain": "Text",
495
433
  "text/html": "Url",
496
434
  default: "Text"
497
- }, qt = "Copy to clipboard: #{key}, Enter";
498
- function Kt(e) {
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 Gt(e, t) {
503
- var n, r, l, i, o, c, u = !1;
504
- t || (t = {}), n = t.debug || !1;
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 = 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);
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
- g.clipboardData.clearData(), g.clipboardData.setData(t.format, e);
514
- t.onCopy && (g.preventDefault(), t.onCopy(g.clipboardData));
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 (g) {
521
- n && console.error("unable to copy using execCommand: ", g), n && console.warn("trying IE specific stuff");
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 (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);
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 Xt = Gt;
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 Qt(e, t) {
477
+ function Xt(e, t) {
540
478
  if (typeof e == "string")
541
479
  return e;
542
480
  try {
543
- return JSON.stringify(e, (n, r) => {
544
- switch (typeof r) {
481
+ return JSON.stringify(e, (r, n) => {
482
+ switch (typeof n) {
545
483
  case "bigint":
546
- return String(r) + "n";
484
+ return String(n) + "n";
547
485
  case "number":
548
486
  case "boolean":
549
487
  case "object":
550
488
  case "string":
551
- return r;
489
+ return n;
552
490
  default:
553
- return String(r);
491
+ return String(n);
554
492
  }
555
493
  }, t);
556
- } catch (n) {
557
- return `${n.name}: ${n.message}` || "JSON.stringify failed";
494
+ } catch (r) {
495
+ return `${r.name}: ${r.message}` || "JSON.stringify failed";
558
496
  }
559
497
  }
560
- function en(e) {
561
- return Bt(this, void 0, void 0, function* () {
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
- Xt(e);
503
+ Gt(e);
566
504
  }
567
505
  });
568
506
  }
569
- function Me(e, t, n, r, l, i) {
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 r == "boolean")
573
- return r;
574
- if (typeof r == "number" && t > r)
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 r == "function") {
578
- const c = Ae(r, [{ node: e, depth: t, indexOrName: n, size: o }]);
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 Fe(e, t, n, r, l, i) {
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 r == "boolean")
588
- return r;
589
- if (typeof r == "number" && t > r)
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 r == "function") {
593
- const c = Ae(r, [{ node: e, depth: t, indexOrName: n, size: o }]);
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, n) {
600
- return typeof e == "boolean" ? e : !!(typeof e == "number" && t > e || e === "collapsed" && n || e === "expanded" && !n);
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 Ae(e, t) {
540
+ function Ee(e, t) {
603
541
  try {
604
542
  return e(...t);
605
- } catch (n) {
606
- reportError(n);
543
+ } catch (r) {
544
+ reportError(r);
607
545
  }
608
546
  }
609
- function lt(e) {
547
+ function it(e) {
610
548
  if (e === !0 || B(e) && e.add === !0)
611
549
  return !0;
612
550
  }
613
- function He(e) {
551
+ function Fe(e) {
614
552
  if (e === !0 || B(e) && e.edit === !0)
615
553
  return !0;
616
554
  }
617
- function Se(e) {
555
+ function Ae(e) {
618
556
  if (e === !0 || B(e) && e.delete === !0)
619
557
  return !0;
620
558
  }
621
- function tn(e) {
559
+ function er(e) {
622
560
  return typeof e == "function";
623
561
  }
624
- function ct(e) {
562
+ function lt(e) {
625
563
  return !e || e.add === void 0 || !!e.add;
626
564
  }
627
- function Ue(e) {
565
+ function He(e) {
628
566
  return !e || e.edit === void 0 || !!e.edit;
629
567
  }
630
- function ke(e) {
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 nn(e) {
574
+ function tr(e) {
637
575
  return !e || e.matchesURL === void 0 || !!e.matchesURL;
638
576
  }
639
- function rn(e, t) {
577
+ function rr(e, t) {
640
578
  return e === "string" ? t.trim().replace(/^\"([\s\S]+?)\"$/, "$1") : t;
641
579
  }
642
- var Ze;
643
- function de() {
644
- return de = Object.assign ? Object.assign.bind() : function(e) {
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 n = arguments[t];
647
- for (var r in n)
648
- Object.prototype.hasOwnProperty.call(n, r) && (e[r] = n[r]);
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
- }, de.apply(this, arguments);
589
+ }, fe.apply(this, arguments);
652
590
  }
653
591
  var _e = function(t) {
654
- return /* @__PURE__ */ _.createElement("svg", de({
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), Ze || (Ze = /* @__PURE__ */ _.createElement("path", {
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
- }, Ve;
665
- function pe() {
666
- return pe = Object.assign ? Object.assign.bind() : function(e) {
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 n = arguments[t];
669
- for (var r in n)
670
- Object.prototype.hasOwnProperty.call(n, r) && (e[r] = n[r]);
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
- }, pe.apply(this, arguments);
611
+ }, de.apply(this, arguments);
674
612
  }
675
- var an = function(t) {
676
- return /* @__PURE__ */ _.createElement("svg", pe({
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), Ve || (Ve = /* @__PURE__ */ _.createElement("path", {
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
- }, ze, Ye;
687
- function ge() {
688
- return ge = Object.assign ? Object.assign.bind() : function(e) {
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 n = arguments[t];
691
- for (var r in n)
692
- Object.prototype.hasOwnProperty.call(n, r) && (e[r] = n[r]);
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
- }, ge.apply(this, arguments);
633
+ }, pe.apply(this, arguments);
696
634
  }
697
- var sn = function(t) {
698
- return /* @__PURE__ */ _.createElement("svg", ge({
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), ze || (ze = /* @__PURE__ */ _.createElement("path", {
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
- })), Ye || (Ye = /* @__PURE__ */ _.createElement("path", {
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: n, CopyComponent: r, CopiedComponent: l } = J(W), [i, o] = F(!1), c = (u) => {
651
+ const { customizeCopy: r, CopyComponent: n, CopiedComponent: l } = J(W), [i, o] = H(!1), c = (u) => {
714
652
  u.stopPropagation();
715
- const d = n(e, t);
716
- typeof d == "string" && d && en(d), o(!0), setTimeout(() => o(!1), 3e3);
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(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" });
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 me({ indexOrName: e, value: t, depth: n, deleteHandle: r, editHandle: l, parent: i, parentPath: o }) {
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(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 })] }));
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 Be, We;
725
- function ve() {
726
- return ve = Object.assign ? Object.assign.bind() : function(e) {
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 n = arguments[t];
729
- for (var r in n)
730
- Object.prototype.hasOwnProperty.call(n, r) && (e[r] = n[r]);
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
- }, ve.apply(this, arguments);
671
+ }, me.apply(this, arguments);
734
672
  }
735
- var Te = function(t) {
736
- return /* @__PURE__ */ _.createElement("svg", ve({
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), Be || (Be = /* @__PURE__ */ _.createElement("path", {
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
- })), We || (We = /* @__PURE__ */ _.createElement("path", {
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
- }, Je, qe;
750
- function he() {
751
- return he = Object.assign ? Object.assign.bind() : function(e) {
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 n = arguments[t];
754
- for (var r in n)
755
- Object.prototype.hasOwnProperty.call(n, r) && (e[r] = n[r]);
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
- }, he.apply(this, arguments);
696
+ }, ve.apply(this, arguments);
759
697
  }
760
- var ut = function(t) {
761
- return /* @__PURE__ */ _.createElement("svg", he({
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), Je || (Je = /* @__PURE__ */ _.createElement("path", {
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
- })), qe || (qe = /* @__PURE__ */ _.createElement("path", {
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
- }, Ke, Ge;
775
- function je() {
776
- return je = Object.assign ? Object.assign.bind() : function(e) {
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 n = arguments[t];
779
- for (var r in n)
780
- Object.prototype.hasOwnProperty.call(n, r) && (e[r] = n[r]);
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
- }, je.apply(this, arguments);
721
+ }, he.apply(this, arguments);
784
722
  }
785
- var Ne = function(t) {
786
- return /* @__PURE__ */ _.createElement("svg", je({
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), Ke || (Ke = /* @__PURE__ */ _.createElement("path", {
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
- })), Ge || (Ge = /* @__PURE__ */ _.createElement("path", {
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
- }, Xe, Qe;
800
- function be() {
801
- return be = Object.assign ? Object.assign.bind() : function(e) {
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 n = arguments[t];
804
- for (var r in n)
805
- Object.prototype.hasOwnProperty.call(n, r) && (e[r] = n[r]);
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
- }, be.apply(this, arguments);
746
+ }, je.apply(this, arguments);
809
747
  }
810
- var Oe = function(t) {
811
- return /* @__PURE__ */ _.createElement("svg", be({
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), Xe || (Xe = /* @__PURE__ */ _.createElement("path", {
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
- })), Qe || (Qe = /* @__PURE__ */ _.createElement("path", {
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 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({
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: H,
830
- depth: n,
831
- src: g,
832
- indexOrName: S,
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: 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: "]" })] });
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 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 = [];
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: 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({
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: w,
854
- indexOrName: r,
791
+ src: b,
792
+ indexOrName: n,
855
793
  parentType: "array",
856
794
  parentPath: o
857
795
  });
858
- }, [O, Y] = F(!1), R = () => {
796
+ }, [O, V] = H(!1), P = () => {
859
797
  const T = e;
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"] }))] });
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 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);
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
- 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,
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: w,
821
+ src: b,
884
822
  indexOrName: f,
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) => {
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, 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({
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: w,
895
- indexOrName: n,
896
- parentType: S ? "object" : "array",
897
- parentPath: h
832
+ src: b,
833
+ indexOrName: r,
834
+ parentType: A ? "object" : "array",
835
+ parentPath: j
898
836
  });
899
- }, [T, $] = F(!1), k = Ce(null), V = () => {
837
+ }, [T, M] = H(!1), _ = xe(null), U = () => {
900
838
  var f;
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 }));
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 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 });
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
- }, 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(() => {
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 = 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) });
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 un = K.forwardRef(({ str: e, className: t, ctrlClick: n }, r) => {
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] = F(!0), d = Ce(null);
861
+ const [c, u] = H(!0), d = xe(null);
924
862
  i = i > 0 ? i : 0;
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);
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 && ((w = C.anchorNode) === null || w === void 0 ? void 0 : w.parentElement) === d.current)
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: n }, { children: ['"', e, '"'] }));
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: 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, '"'] }));
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 ? [g.slice(0, i), m] : e, '"'] }));
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 E = i, w = i + 1, C = g, N = 1;
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++, E--, w++;
895
+ N++, w--, b++;
958
896
  }
959
- return a.jsxs("span", Object.assign({ ref: d, onClick: y, className: t + " cursor-pointer" }, { children: ['"', c ? [C, m] : e, '"'] }));
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 et;
964
- function ye() {
965
- return ye = Object.assign ? Object.assign.bind() : function(e) {
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 n = arguments[t];
968
- for (var r in n)
969
- Object.prototype.hasOwnProperty.call(n, r) && (e[r] = n[r]);
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
- }, ye.apply(this, arguments);
910
+ }, be.apply(this, arguments);
973
911
  }
974
- var fn = function(t) {
975
- return /* @__PURE__ */ _.createElement("svg", ye({
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), et || (et = /* @__PURE__ */ _.createElement("path", {
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
- }, tt, nt;
986
- function we() {
987
- return we = Object.assign ? Object.assign.bind() : function(e) {
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 n = arguments[t];
990
- for (var r in n)
991
- Object.prototype.hasOwnProperty.call(n, r) && (e[r] = n[r]);
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
- }, we.apply(this, arguments);
932
+ }, ye.apply(this, arguments);
995
933
  }
996
- var dn = function(t) {
997
- return /* @__PURE__ */ _.createElement("svg", we({
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), tt || (tt = /* @__PURE__ */ _.createElement("path", {
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
- })), nt || (nt = /* @__PURE__ */ _.createElement("path", {
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 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 });
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(cn, { parent: l, node: e, depth: t, indexOrName: r, deleteHandle: n, parentPath: o, customOptions: typeof v == "object" ? v : void 0 });
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 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();
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
- }, U = ne(() => {
1031
- let f = R.current.innerText;
968
+ }, $ = re(() => {
969
+ let f = P.current.innerText;
1032
970
  try {
1033
- const j = JSON.parse(f);
1034
- i && i(r, j, e, o);
971
+ const m = JSON.parse(f);
972
+ i && i(n, m, e, o);
1035
973
  } catch {
1036
- const z = rn(h, f);
1037
- i && i(r, z, e, o);
974
+ const Y = rr(j, f);
975
+ i && i(n, Y, e, o);
1038
976
  }
1039
- H(!1);
1040
- }, [i, r, e, o, h]), Z = () => {
1041
- H(!1), Y(!1);
977
+ Z(!1);
978
+ }, [i, n, e, o, j]), z = () => {
979
+ Z(!1), V(!1);
1042
980
  }, T = () => {
1043
- Y(!1), n && n(r, o), m && m({
981
+ V(!1), r && r(n, o), v && v({
1044
982
  value: e,
1045
983
  depth: t,
1046
- src: g,
1047
- indexOrName: r,
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: g,
1053
- indexOrName: r,
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
- }, $ = 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) => {
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, 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) {
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
- s = "json-view--number";
1005
+ S = "json-view--number";
1068
1006
  break;
1069
1007
  case "boolean":
1070
- s = "json-view--boolean";
1008
+ S = "json-view--boolean";
1071
1009
  break;
1072
1010
  case "object":
1073
- s = "json-view--null";
1011
+ S = "json-view--null";
1074
1012
  break;
1075
1013
  }
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] });
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 dt = /^(((ht|f)tps?):\/\/)?([^!@#$%^&*?.\s-]([^!@#$%^&*?.\s]{0,63}[^!@#$%^&*?.\s])?\.)+[a-z]{2,6}\/?/, W = mt({
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: dt,
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 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,
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: n,
1120
- customizeCollapseStringUI: r,
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: g,
1128
- onAdd: m,
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: A,
1071
+ displaySize: E,
1134
1072
  displayArrayIndex: D,
1135
- matchesURL: h,
1136
- urlRegExp: S,
1073
+ matchesURL: j,
1074
+ urlRegExp: A,
1137
1075
  ignoreLargeArray: x,
1138
- CopyComponent: H,
1076
+ CopyComponent: Z,
1139
1077
  CopiedComponent: O,
1140
- EditComponent: Y,
1141
- CancelComponent: R,
1078
+ EditComponent: V,
1079
+ CancelComponent: P,
1142
1080
  DoneComponent: L,
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,
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: k,
1150
- indexOrName: M,
1087
+ src: _,
1088
+ indexOrName: F,
1151
1089
  parentType: null,
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,
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: k,
1159
- indexOrName: M,
1096
+ src: _,
1097
+ indexOrName: F,
1160
1098
  parentType: null,
1161
- parentPath: s
1099
+ parentPath: S
1162
1100
  }), y && y({
1163
1101
  depth: 1,
1164
- src: k,
1165
- indexOrName: M,
1102
+ src: _,
1103
+ indexOrName: F,
1166
1104
  parentType: null,
1167
1105
  type: "delete",
1168
- parentPath: s
1106
+ parentPath: S
1169
1107
  });
1170
1108
  }, parentPath: [] }) })) }));
1171
1109
  }
1172
- const gn = ["id", "msg", "time", "level", "step", "flows", "traceId"], mn = ({ log: e, onClose: t }) => {
1173
- const [n, r] = F(!1), l = se(() => {
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) => !gn.includes(o));
1177
- return r(i.length > 0), i.reduce(
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
- ht,
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(ot, {}), onClick: t, label: "Close" }],
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(at, { level: e.level }),
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: it(e.time) },
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: n && /* @__PURE__ */ a.jsx(pn, { src: l, theme: "default", enableClipboard: !0 })
1140
+ children: r && /* @__PURE__ */ a.jsx(fr, { src: l, theme: "default", enableClipboard: !0 })
1203
1141
  }
1204
1142
  ) : null;
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]);
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
- jt,
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(Zt, { className: "absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-muted-foreground/50" }),
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
- ot,
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(bt, { variant: "default", onClick: t, className: "h-[34px]", children: [
1234
- /* @__PURE__ */ a.jsx(zt, {}),
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(yt, { children: /* @__PURE__ */ a.jsx(wt, { className: "font-mono font-medium", children: c.map((u, d) => /* @__PURE__ */ a.jsxs(
1239
- xt,
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: 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
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: () => r(u.id),
1184
+ onClick: () => n(u.id),
1247
1185
  children: [
1248
1186
  /* @__PURE__ */ a.jsxs(
1249
- re,
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(at, { level: u.level }),
1255
- it(u.time)
1192
+ /* @__PURE__ */ a.jsx(nt, { level: u.level }),
1193
+ ot(u.time)
1256
1194
  ]
1257
1195
  }
1258
1196
  ),
1259
1197
  /* @__PURE__ */ a.jsx(
1260
- re,
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(re, { "data-testid": `step-${d}`, "aria-label": u.step, className: "whitespace-nowrap", children: u.step }),
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
- re,
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(mn, { log: l, onClose: () => r(void 0) })
1221
+ /* @__PURE__ */ a.jsx(pr, { log: l, onClose: () => n(void 0) })
1284
1222
  ] });
1285
1223
  };
1286
- Rt();
1224
+ Ot();
1287
1225
  export {
1288
- bn as LogsPage
1226
+ hr as LogsPage
1289
1227
  };