@crimsonsunset/jsg-logger 1.5.2 → 1.5.4

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.
@@ -0,0 +1,4588 @@
1
+ import { options, Component, createElement, Fragment, toChildArray, render, createRef, createContext, cloneElement, hydrate } from "preact";
2
+ import * as hooks from "preact/hooks";
3
+ import { useState, useRef, useReducer, useMemo, useLayoutEffect, useImperativeHandle, useId, useEffect, useDebugValue, useContext, useCallback } from "preact/hooks";
4
+ import { Pane, Text, Heading, Button, Switch, defaultTheme, ThemeProvider } from "evergreen-ui";
5
+ function _mergeNamespaces(n, m) {
6
+ for (var i = 0; i < m.length; i++) {
7
+ const e2 = m[i];
8
+ if (typeof e2 !== "string" && !Array.isArray(e2)) {
9
+ for (const k2 in e2) {
10
+ if (k2 !== "default" && !(k2 in n)) {
11
+ const d = Object.getOwnPropertyDescriptor(e2, k2);
12
+ if (d) {
13
+ Object.defineProperty(n, k2, d.get ? d : {
14
+ enumerable: true,
15
+ get: () => e2[k2]
16
+ });
17
+ }
18
+ }
19
+ }
20
+ }
21
+ }
22
+ return Object.freeze(Object.defineProperty(n, Symbol.toStringTag, { value: "Module" }));
23
+ }
24
+ var f = 0;
25
+ function u(e2, t, n, o, i, u2) {
26
+ t || (t = {});
27
+ var a, c, p = t;
28
+ if ("ref" in p) for (c in p = {}, t) "ref" == c ? a = t[c] : p[c] = t[c];
29
+ var l = { type: e2, props: p, key: n, ref: a, __k: null, __: null, __b: 0, __e: null, __c: null, constructor: void 0, __v: --f, __i: -1, __u: 0, __source: i, __self: u2 };
30
+ if ("function" == typeof e2 && (a = e2.defaultProps)) for (c in a) void 0 === p[c] && (p[c] = a[c]);
31
+ return options.vnode && options.vnode(l), l;
32
+ }
33
+ function g(n, t) {
34
+ for (var e2 in t) n[e2] = t[e2];
35
+ return n;
36
+ }
37
+ function E(n, t) {
38
+ for (var e2 in n) if ("__source" !== e2 && !(e2 in t)) return true;
39
+ for (var r2 in t) if ("__source" !== r2 && n[r2] !== t[r2]) return true;
40
+ return false;
41
+ }
42
+ function C(n, t) {
43
+ var e2 = t(), r2 = useState({ t: { __: e2, u: t } }), u2 = r2[0].t, o = r2[1];
44
+ return useLayoutEffect(function() {
45
+ u2.__ = e2, u2.u = t, x(u2) && o({ t: u2 });
46
+ }, [n, e2, t]), useEffect(function() {
47
+ return x(u2) && o({ t: u2 }), n(function() {
48
+ x(u2) && o({ t: u2 });
49
+ });
50
+ }, [n]), e2;
51
+ }
52
+ function x(n) {
53
+ var t, e2, r2 = n.u, u2 = n.__;
54
+ try {
55
+ var o = r2();
56
+ return !((t = u2) === (e2 = o) && (0 !== t || 1 / t == 1 / e2) || t != t && e2 != e2);
57
+ } catch (n2) {
58
+ return true;
59
+ }
60
+ }
61
+ function R(n) {
62
+ n();
63
+ }
64
+ function w(n) {
65
+ return n;
66
+ }
67
+ function k() {
68
+ return [false, R];
69
+ }
70
+ var I = useLayoutEffect;
71
+ function N(n, t) {
72
+ this.props = n, this.context = t;
73
+ }
74
+ function M(n, e2) {
75
+ function r2(n2) {
76
+ var t = this.props.ref, r3 = t == n2.ref;
77
+ return !r3 && t && (t.call ? t(null) : t.current = null), e2 ? !e2(this.props, n2) || !r3 : E(this.props, n2);
78
+ }
79
+ function u2(e3) {
80
+ return this.shouldComponentUpdate = r2, createElement(n, e3);
81
+ }
82
+ return u2.displayName = "Memo(" + (n.displayName || n.name) + ")", u2.prototype.isReactComponent = true, u2.__f = true, u2.type = n, u2;
83
+ }
84
+ (N.prototype = new Component()).isPureReactComponent = true, N.prototype.shouldComponentUpdate = function(n, t) {
85
+ return E(this.props, n) || E(this.state, t);
86
+ };
87
+ var T = options.__b;
88
+ options.__b = function(n) {
89
+ n.type && n.type.__f && n.ref && (n.props.ref = n.ref, n.ref = null), T && T(n);
90
+ };
91
+ var A = "undefined" != typeof Symbol && Symbol.for && Symbol.for("react.forward_ref") || 3911;
92
+ function D(n) {
93
+ function t(t2) {
94
+ var e2 = g({}, t2);
95
+ return delete e2.ref, n(e2, t2.ref || null);
96
+ }
97
+ return t.$$typeof = A, t.render = n, t.prototype.isReactComponent = t.__f = true, t.displayName = "ForwardRef(" + (n.displayName || n.name) + ")", t;
98
+ }
99
+ var L = function(n, t) {
100
+ return null == n ? null : toChildArray(toChildArray(n).map(t));
101
+ }, O = { map: L, forEach: L, count: function(n) {
102
+ return n ? toChildArray(n).length : 0;
103
+ }, only: function(n) {
104
+ var t = toChildArray(n);
105
+ if (1 !== t.length) throw "Children.only";
106
+ return t[0];
107
+ }, toArray: toChildArray }, F = options.__e;
108
+ options.__e = function(n, t, e2, r2) {
109
+ if (n.then) {
110
+ for (var u2, o = t; o = o.__; ) if ((u2 = o.__c) && u2.__c) return null == t.__e && (t.__e = e2.__e, t.__k = e2.__k), u2.__c(n, t);
111
+ }
112
+ F(n, t, e2, r2);
113
+ };
114
+ var U = options.unmount;
115
+ function V(n, t, e2) {
116
+ return n && (n.__c && n.__c.__H && (n.__c.__H.__.forEach(function(n2) {
117
+ "function" == typeof n2.__c && n2.__c();
118
+ }), n.__c.__H = null), null != (n = g({}, n)).__c && (n.__c.__P === e2 && (n.__c.__P = t), n.__c.__e = true, n.__c = null), n.__k = n.__k && n.__k.map(function(n2) {
119
+ return V(n2, t, e2);
120
+ })), n;
121
+ }
122
+ function W(n, t, e2) {
123
+ return n && e2 && (n.__v = null, n.__k = n.__k && n.__k.map(function(n2) {
124
+ return W(n2, t, e2);
125
+ }), n.__c && n.__c.__P === t && (n.__e && e2.appendChild(n.__e), n.__c.__e = true, n.__c.__P = e2)), n;
126
+ }
127
+ function P() {
128
+ this.__u = 0, this.o = null, this.__b = null;
129
+ }
130
+ function j(n) {
131
+ var t = n.__.__c;
132
+ return t && t.__a && t.__a(n);
133
+ }
134
+ function z(n) {
135
+ var e2, r2, u2;
136
+ function o(o2) {
137
+ if (e2 || (e2 = n()).then(function(n2) {
138
+ r2 = n2.default || n2;
139
+ }, function(n2) {
140
+ u2 = n2;
141
+ }), u2) throw u2;
142
+ if (!r2) throw e2;
143
+ return createElement(r2, o2);
144
+ }
145
+ return o.displayName = "Lazy", o.__f = true, o;
146
+ }
147
+ function B() {
148
+ this.i = null, this.l = null;
149
+ }
150
+ options.unmount = function(n) {
151
+ var t = n.__c;
152
+ t && t.__R && t.__R(), t && 32 & n.__u && (n.type = null), U && U(n);
153
+ }, (P.prototype = new Component()).__c = function(n, t) {
154
+ var e2 = t.__c, r2 = this;
155
+ null == r2.o && (r2.o = []), r2.o.push(e2);
156
+ var u2 = j(r2.__v), o = false, i = function() {
157
+ o || (o = true, e2.__R = null, u2 ? u2(l) : l());
158
+ };
159
+ e2.__R = i;
160
+ var l = function() {
161
+ if (!--r2.__u) {
162
+ if (r2.state.__a) {
163
+ var n2 = r2.state.__a;
164
+ r2.__v.__k[0] = W(n2, n2.__c.__P, n2.__c.__O);
165
+ }
166
+ var t2;
167
+ for (r2.setState({ __a: r2.__b = null }); t2 = r2.o.pop(); ) t2.forceUpdate();
168
+ }
169
+ };
170
+ r2.__u++ || 32 & t.__u || r2.setState({ __a: r2.__b = r2.__v.__k[0] }), n.then(i, i);
171
+ }, P.prototype.componentWillUnmount = function() {
172
+ this.o = [];
173
+ }, P.prototype.render = function(n, e2) {
174
+ if (this.__b) {
175
+ if (this.__v.__k) {
176
+ var r2 = document.createElement("div"), o = this.__v.__k[0].__c;
177
+ this.__v.__k[0] = V(this.__b, r2, o.__O = o.__P);
178
+ }
179
+ this.__b = null;
180
+ }
181
+ var i = e2.__a && createElement(Fragment, null, n.fallback);
182
+ return i && (i.__u &= -33), [createElement(Fragment, null, e2.__a ? null : n.children), i];
183
+ };
184
+ var H = function(n, t, e2) {
185
+ if (++e2[1] === e2[0] && n.l.delete(t), n.props.revealOrder && ("t" !== n.props.revealOrder[0] || !n.l.size)) for (e2 = n.i; e2; ) {
186
+ for (; e2.length > 3; ) e2.pop()();
187
+ if (e2[1] < e2[0]) break;
188
+ n.i = e2 = e2[2];
189
+ }
190
+ };
191
+ function Z(n) {
192
+ return this.getChildContext = function() {
193
+ return n.context;
194
+ }, n.children;
195
+ }
196
+ function Y(n) {
197
+ var e2 = this, r2 = n.h;
198
+ if (e2.componentWillUnmount = function() {
199
+ render(null, e2.v), e2.v = null, e2.h = null;
200
+ }, e2.h && e2.h !== r2 && e2.componentWillUnmount(), !e2.v) {
201
+ for (var u2 = e2.__v; null !== u2 && !u2.__m && null !== u2.__; ) u2 = u2.__;
202
+ e2.h = r2, e2.v = { nodeType: 1, parentNode: r2, childNodes: [], __k: { __m: u2.__m }, contains: function() {
203
+ return true;
204
+ }, insertBefore: function(n2, t) {
205
+ this.childNodes.push(n2), e2.h.insertBefore(n2, t);
206
+ }, removeChild: function(n2) {
207
+ this.childNodes.splice(this.childNodes.indexOf(n2) >>> 1, 1), e2.h.removeChild(n2);
208
+ } };
209
+ }
210
+ render(createElement(Z, { context: e2.context }, n.__v), e2.v);
211
+ }
212
+ function $(n, e2) {
213
+ var r2 = createElement(Y, { __v: n, h: e2 });
214
+ return r2.containerInfo = e2, r2;
215
+ }
216
+ (B.prototype = new Component()).__a = function(n) {
217
+ var t = this, e2 = j(t.__v), r2 = t.l.get(n);
218
+ return r2[0]++, function(u2) {
219
+ var o = function() {
220
+ t.props.revealOrder ? (r2.push(u2), H(t, n, r2)) : u2();
221
+ };
222
+ e2 ? e2(o) : o();
223
+ };
224
+ }, B.prototype.render = function(n) {
225
+ this.i = null, this.l = /* @__PURE__ */ new Map();
226
+ var t = toChildArray(n.children);
227
+ n.revealOrder && "b" === n.revealOrder[0] && t.reverse();
228
+ for (var e2 = t.length; e2--; ) this.l.set(t[e2], this.i = [1, 0, this.i]);
229
+ return n.children;
230
+ }, B.prototype.componentDidUpdate = B.prototype.componentDidMount = function() {
231
+ var n = this;
232
+ this.l.forEach(function(t, e2) {
233
+ H(n, e2, t);
234
+ });
235
+ };
236
+ var q = "undefined" != typeof Symbol && Symbol.for && Symbol.for("react.element") || 60103, G = /^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image(!S)|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/, J = /^on(Ani|Tra|Tou|BeforeInp|Compo)/, K = /[A-Z0-9]/g, Q = "undefined" != typeof document, X = function(n) {
237
+ return ("undefined" != typeof Symbol && "symbol" == typeof Symbol() ? /fil|che|rad/ : /fil|che|ra/).test(n);
238
+ };
239
+ function nn(n, t, e2) {
240
+ return null == t.__k && (t.textContent = ""), render(n, t), "function" == typeof e2 && e2(), n ? n.__c : null;
241
+ }
242
+ function tn(n, t, e2) {
243
+ return hydrate(n, t), "function" == typeof e2 && e2(), n ? n.__c : null;
244
+ }
245
+ Component.prototype.isReactComponent = {}, ["componentWillMount", "componentWillReceiveProps", "componentWillUpdate"].forEach(function(t) {
246
+ Object.defineProperty(Component.prototype, t, { configurable: true, get: function() {
247
+ return this["UNSAFE_" + t];
248
+ }, set: function(n) {
249
+ Object.defineProperty(this, t, { configurable: true, writable: true, value: n });
250
+ } });
251
+ });
252
+ var en = options.event;
253
+ function rn() {
254
+ }
255
+ function un() {
256
+ return this.cancelBubble;
257
+ }
258
+ function on() {
259
+ return this.defaultPrevented;
260
+ }
261
+ options.event = function(n) {
262
+ return en && (n = en(n)), n.persist = rn, n.isPropagationStopped = un, n.isDefaultPrevented = on, n.nativeEvent = n;
263
+ };
264
+ var ln, cn = { enumerable: false, configurable: true, get: function() {
265
+ return this.class;
266
+ } }, fn = options.vnode;
267
+ options.vnode = function(n) {
268
+ "string" == typeof n.type && function(n2) {
269
+ var t = n2.props, e2 = n2.type, u2 = {}, o = -1 === e2.indexOf("-");
270
+ for (var i in t) {
271
+ var l = t[i];
272
+ if (!("value" === i && "defaultValue" in t && null == l || Q && "children" === i && "noscript" === e2 || "class" === i || "className" === i)) {
273
+ var c = i.toLowerCase();
274
+ "defaultValue" === i && "value" in t && null == t.value ? i = "value" : "download" === i && true === l ? l = "" : "translate" === c && "no" === l ? l = false : "o" === c[0] && "n" === c[1] ? "ondoubleclick" === c ? i = "ondblclick" : "onchange" !== c || "input" !== e2 && "textarea" !== e2 || X(t.type) ? "onfocus" === c ? i = "onfocusin" : "onblur" === c ? i = "onfocusout" : J.test(i) && (i = c) : c = i = "oninput" : o && G.test(i) ? i = i.replace(K, "-$&").toLowerCase() : null === l && (l = void 0), "oninput" === c && u2[i = c] && (i = "oninputCapture"), u2[i] = l;
275
+ }
276
+ }
277
+ "select" == e2 && u2.multiple && Array.isArray(u2.value) && (u2.value = toChildArray(t.children).forEach(function(n3) {
278
+ n3.props.selected = -1 != u2.value.indexOf(n3.props.value);
279
+ })), "select" == e2 && null != u2.defaultValue && (u2.value = toChildArray(t.children).forEach(function(n3) {
280
+ n3.props.selected = u2.multiple ? -1 != u2.defaultValue.indexOf(n3.props.value) : u2.defaultValue == n3.props.value;
281
+ })), t.class && !t.className ? (u2.class = t.class, Object.defineProperty(u2, "className", cn)) : (t.className && !t.class || t.class && t.className) && (u2.class = u2.className = t.className), n2.props = u2;
282
+ }(n), n.$$typeof = q, fn && fn(n);
283
+ };
284
+ var an = options.__r;
285
+ options.__r = function(n) {
286
+ an && an(n), ln = n.__c;
287
+ };
288
+ var sn = options.diffed;
289
+ options.diffed = function(n) {
290
+ sn && sn(n);
291
+ var t = n.props, e2 = n.__e;
292
+ null != e2 && "textarea" === n.type && "value" in t && t.value !== e2.value && (e2.value = null == t.value ? "" : t.value), ln = null;
293
+ };
294
+ var hn = { ReactCurrentDispatcher: { current: { readContext: function(n) {
295
+ return ln.__n[n.__c].props.value;
296
+ }, useCallback, useContext, useDebugValue, useDeferredValue: w, useEffect, useId, useImperativeHandle, useInsertionEffect: I, useLayoutEffect, useMemo, useReducer, useRef, useState, useSyncExternalStore: C, useTransition: k } } }, vn = "18.3.1";
297
+ function dn(n) {
298
+ return createElement.bind(null, n);
299
+ }
300
+ function mn(n) {
301
+ return !!n && n.$$typeof === q;
302
+ }
303
+ function pn(n) {
304
+ return mn(n) && n.type === Fragment;
305
+ }
306
+ function yn(n) {
307
+ return !!n && !!n.displayName && ("string" == typeof n.displayName || n.displayName instanceof String) && n.displayName.startsWith("Memo(");
308
+ }
309
+ function _n(n) {
310
+ return mn(n) ? cloneElement.apply(null, arguments) : n;
311
+ }
312
+ function bn(n) {
313
+ return !!n.__k && (render(null, n), true);
314
+ }
315
+ function Sn(n) {
316
+ return n && (n.base || 1 === n.nodeType && n) || null;
317
+ }
318
+ var gn = function(n, t) {
319
+ return n(t);
320
+ }, En = function(n, t) {
321
+ return n(t);
322
+ }, Cn = Fragment, xn = mn, Rn = { useState, useId, useReducer, useEffect, useLayoutEffect, useInsertionEffect: I, useTransition: k, useDeferredValue: w, useSyncExternalStore: C, startTransition: R, useRef, useImperativeHandle, useMemo, useCallback, useContext, useDebugValue, version: "18.3.1", Children: O, render: nn, hydrate: tn, unmountComponentAtNode: bn, createPortal: $, createElement, createContext, createFactory: dn, cloneElement: _n, createRef, Fragment, isValidElement: mn, isElement: xn, isFragment: pn, isMemo: yn, findDOMNode: Sn, Component, PureComponent: N, memo: M, forwardRef: D, flushSync: En, unstable_batchedUpdates: gn, StrictMode: Cn, Suspense: P, SuspenseList: B, lazy: z, __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED: hn };
323
+ const compat_module = /* @__PURE__ */ _mergeNamespaces({
324
+ __proto__: null,
325
+ Children: O,
326
+ Component,
327
+ Fragment,
328
+ PureComponent: N,
329
+ StrictMode: Cn,
330
+ Suspense: P,
331
+ SuspenseList: B,
332
+ __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED: hn,
333
+ cloneElement: _n,
334
+ createContext,
335
+ createElement,
336
+ createFactory: dn,
337
+ createPortal: $,
338
+ createRef,
339
+ default: Rn,
340
+ findDOMNode: Sn,
341
+ flushSync: En,
342
+ forwardRef: D,
343
+ hydrate: tn,
344
+ isElement: xn,
345
+ isFragment: pn,
346
+ isMemo: yn,
347
+ isValidElement: mn,
348
+ lazy: z,
349
+ memo: M,
350
+ render: nn,
351
+ startTransition: R,
352
+ unmountComponentAtNode: bn,
353
+ unstable_batchedUpdates: gn,
354
+ useDeferredValue: w,
355
+ useInsertionEffect: I,
356
+ useSyncExternalStore: C,
357
+ useTransition: k,
358
+ version: vn
359
+ }, [hooks]);
360
+ var commonjsGlobal = typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : {};
361
+ function getDefaultExportFromCjs(x2) {
362
+ return x2 && x2.__esModule && Object.prototype.hasOwnProperty.call(x2, "default") ? x2["default"] : x2;
363
+ }
364
+ function getAugmentedNamespace(n) {
365
+ if (n.__esModule) return n;
366
+ var f2 = n.default;
367
+ if (typeof f2 == "function") {
368
+ var a = function a2() {
369
+ if (this instanceof a2) {
370
+ return Reflect.construct(f2, arguments, this.constructor);
371
+ }
372
+ return f2.apply(this, arguments);
373
+ };
374
+ a.prototype = f2.prototype;
375
+ } else a = {};
376
+ Object.defineProperty(a, "__esModule", { value: true });
377
+ Object.keys(n).forEach(function(k2) {
378
+ var d = Object.getOwnPropertyDescriptor(n, k2);
379
+ Object.defineProperty(a, k2, d.get ? d : {
380
+ enumerable: true,
381
+ get: function() {
382
+ return n[k2];
383
+ }
384
+ });
385
+ });
386
+ return a;
387
+ }
388
+ var cjs = { exports: {} };
389
+ var Draggable$2 = {};
390
+ const require$$2 = /* @__PURE__ */ getAugmentedNamespace(compat_module);
391
+ var propTypes = { exports: {} };
392
+ var reactIs = { exports: {} };
393
+ var reactIs_production_min = {};
394
+ /** @license React v16.13.1
395
+ * react-is.production.min.js
396
+ *
397
+ * Copyright (c) Facebook, Inc. and its affiliates.
398
+ *
399
+ * This source code is licensed under the MIT license found in the
400
+ * LICENSE file in the root directory of this source tree.
401
+ */
402
+ var hasRequiredReactIs_production_min;
403
+ function requireReactIs_production_min() {
404
+ if (hasRequiredReactIs_production_min) return reactIs_production_min;
405
+ hasRequiredReactIs_production_min = 1;
406
+ var b = "function" === typeof Symbol && Symbol.for, c = b ? Symbol.for("react.element") : 60103, d = b ? Symbol.for("react.portal") : 60106, e2 = b ? Symbol.for("react.fragment") : 60107, f2 = b ? Symbol.for("react.strict_mode") : 60108, g2 = b ? Symbol.for("react.profiler") : 60114, h = b ? Symbol.for("react.provider") : 60109, k2 = b ? Symbol.for("react.context") : 60110, l = b ? Symbol.for("react.async_mode") : 60111, m = b ? Symbol.for("react.concurrent_mode") : 60111, n = b ? Symbol.for("react.forward_ref") : 60112, p = b ? Symbol.for("react.suspense") : 60113, q2 = b ? Symbol.for("react.suspense_list") : 60120, r2 = b ? Symbol.for("react.memo") : 60115, t = b ? Symbol.for("react.lazy") : 60116, v = b ? Symbol.for("react.block") : 60121, w2 = b ? Symbol.for("react.fundamental") : 60117, x2 = b ? Symbol.for("react.responder") : 60118, y = b ? Symbol.for("react.scope") : 60119;
407
+ function z2(a) {
408
+ if ("object" === typeof a && null !== a) {
409
+ var u2 = a.$$typeof;
410
+ switch (u2) {
411
+ case c:
412
+ switch (a = a.type, a) {
413
+ case l:
414
+ case m:
415
+ case e2:
416
+ case g2:
417
+ case f2:
418
+ case p:
419
+ return a;
420
+ default:
421
+ switch (a = a && a.$$typeof, a) {
422
+ case k2:
423
+ case n:
424
+ case t:
425
+ case r2:
426
+ case h:
427
+ return a;
428
+ default:
429
+ return u2;
430
+ }
431
+ }
432
+ case d:
433
+ return u2;
434
+ }
435
+ }
436
+ }
437
+ function A2(a) {
438
+ return z2(a) === m;
439
+ }
440
+ reactIs_production_min.AsyncMode = l;
441
+ reactIs_production_min.ConcurrentMode = m;
442
+ reactIs_production_min.ContextConsumer = k2;
443
+ reactIs_production_min.ContextProvider = h;
444
+ reactIs_production_min.Element = c;
445
+ reactIs_production_min.ForwardRef = n;
446
+ reactIs_production_min.Fragment = e2;
447
+ reactIs_production_min.Lazy = t;
448
+ reactIs_production_min.Memo = r2;
449
+ reactIs_production_min.Portal = d;
450
+ reactIs_production_min.Profiler = g2;
451
+ reactIs_production_min.StrictMode = f2;
452
+ reactIs_production_min.Suspense = p;
453
+ reactIs_production_min.isAsyncMode = function(a) {
454
+ return A2(a) || z2(a) === l;
455
+ };
456
+ reactIs_production_min.isConcurrentMode = A2;
457
+ reactIs_production_min.isContextConsumer = function(a) {
458
+ return z2(a) === k2;
459
+ };
460
+ reactIs_production_min.isContextProvider = function(a) {
461
+ return z2(a) === h;
462
+ };
463
+ reactIs_production_min.isElement = function(a) {
464
+ return "object" === typeof a && null !== a && a.$$typeof === c;
465
+ };
466
+ reactIs_production_min.isForwardRef = function(a) {
467
+ return z2(a) === n;
468
+ };
469
+ reactIs_production_min.isFragment = function(a) {
470
+ return z2(a) === e2;
471
+ };
472
+ reactIs_production_min.isLazy = function(a) {
473
+ return z2(a) === t;
474
+ };
475
+ reactIs_production_min.isMemo = function(a) {
476
+ return z2(a) === r2;
477
+ };
478
+ reactIs_production_min.isPortal = function(a) {
479
+ return z2(a) === d;
480
+ };
481
+ reactIs_production_min.isProfiler = function(a) {
482
+ return z2(a) === g2;
483
+ };
484
+ reactIs_production_min.isStrictMode = function(a) {
485
+ return z2(a) === f2;
486
+ };
487
+ reactIs_production_min.isSuspense = function(a) {
488
+ return z2(a) === p;
489
+ };
490
+ reactIs_production_min.isValidElementType = function(a) {
491
+ return "string" === typeof a || "function" === typeof a || a === e2 || a === m || a === g2 || a === f2 || a === p || a === q2 || "object" === typeof a && null !== a && (a.$$typeof === t || a.$$typeof === r2 || a.$$typeof === h || a.$$typeof === k2 || a.$$typeof === n || a.$$typeof === w2 || a.$$typeof === x2 || a.$$typeof === y || a.$$typeof === v);
492
+ };
493
+ reactIs_production_min.typeOf = z2;
494
+ return reactIs_production_min;
495
+ }
496
+ var reactIs_development = {};
497
+ /** @license React v16.13.1
498
+ * react-is.development.js
499
+ *
500
+ * Copyright (c) Facebook, Inc. and its affiliates.
501
+ *
502
+ * This source code is licensed under the MIT license found in the
503
+ * LICENSE file in the root directory of this source tree.
504
+ */
505
+ var hasRequiredReactIs_development;
506
+ function requireReactIs_development() {
507
+ if (hasRequiredReactIs_development) return reactIs_development;
508
+ hasRequiredReactIs_development = 1;
509
+ if (process.env.NODE_ENV !== "production") {
510
+ (function() {
511
+ var hasSymbol = typeof Symbol === "function" && Symbol.for;
512
+ var REACT_ELEMENT_TYPE = hasSymbol ? Symbol.for("react.element") : 60103;
513
+ var REACT_PORTAL_TYPE = hasSymbol ? Symbol.for("react.portal") : 60106;
514
+ var REACT_FRAGMENT_TYPE = hasSymbol ? Symbol.for("react.fragment") : 60107;
515
+ var REACT_STRICT_MODE_TYPE = hasSymbol ? Symbol.for("react.strict_mode") : 60108;
516
+ var REACT_PROFILER_TYPE = hasSymbol ? Symbol.for("react.profiler") : 60114;
517
+ var REACT_PROVIDER_TYPE = hasSymbol ? Symbol.for("react.provider") : 60109;
518
+ var REACT_CONTEXT_TYPE = hasSymbol ? Symbol.for("react.context") : 60110;
519
+ var REACT_ASYNC_MODE_TYPE = hasSymbol ? Symbol.for("react.async_mode") : 60111;
520
+ var REACT_CONCURRENT_MODE_TYPE = hasSymbol ? Symbol.for("react.concurrent_mode") : 60111;
521
+ var REACT_FORWARD_REF_TYPE = hasSymbol ? Symbol.for("react.forward_ref") : 60112;
522
+ var REACT_SUSPENSE_TYPE = hasSymbol ? Symbol.for("react.suspense") : 60113;
523
+ var REACT_SUSPENSE_LIST_TYPE = hasSymbol ? Symbol.for("react.suspense_list") : 60120;
524
+ var REACT_MEMO_TYPE = hasSymbol ? Symbol.for("react.memo") : 60115;
525
+ var REACT_LAZY_TYPE = hasSymbol ? Symbol.for("react.lazy") : 60116;
526
+ var REACT_BLOCK_TYPE = hasSymbol ? Symbol.for("react.block") : 60121;
527
+ var REACT_FUNDAMENTAL_TYPE = hasSymbol ? Symbol.for("react.fundamental") : 60117;
528
+ var REACT_RESPONDER_TYPE = hasSymbol ? Symbol.for("react.responder") : 60118;
529
+ var REACT_SCOPE_TYPE = hasSymbol ? Symbol.for("react.scope") : 60119;
530
+ function isValidElementType(type) {
531
+ return typeof type === "string" || typeof type === "function" || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill.
532
+ type === REACT_FRAGMENT_TYPE || type === REACT_CONCURRENT_MODE_TYPE || type === REACT_PROFILER_TYPE || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || typeof type === "object" && type !== null && (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || type.$$typeof === REACT_FUNDAMENTAL_TYPE || type.$$typeof === REACT_RESPONDER_TYPE || type.$$typeof === REACT_SCOPE_TYPE || type.$$typeof === REACT_BLOCK_TYPE);
533
+ }
534
+ function typeOf(object) {
535
+ if (typeof object === "object" && object !== null) {
536
+ var $$typeof = object.$$typeof;
537
+ switch ($$typeof) {
538
+ case REACT_ELEMENT_TYPE:
539
+ var type = object.type;
540
+ switch (type) {
541
+ case REACT_ASYNC_MODE_TYPE:
542
+ case REACT_CONCURRENT_MODE_TYPE:
543
+ case REACT_FRAGMENT_TYPE:
544
+ case REACT_PROFILER_TYPE:
545
+ case REACT_STRICT_MODE_TYPE:
546
+ case REACT_SUSPENSE_TYPE:
547
+ return type;
548
+ default:
549
+ var $$typeofType = type && type.$$typeof;
550
+ switch ($$typeofType) {
551
+ case REACT_CONTEXT_TYPE:
552
+ case REACT_FORWARD_REF_TYPE:
553
+ case REACT_LAZY_TYPE:
554
+ case REACT_MEMO_TYPE:
555
+ case REACT_PROVIDER_TYPE:
556
+ return $$typeofType;
557
+ default:
558
+ return $$typeof;
559
+ }
560
+ }
561
+ case REACT_PORTAL_TYPE:
562
+ return $$typeof;
563
+ }
564
+ }
565
+ return void 0;
566
+ }
567
+ var AsyncMode = REACT_ASYNC_MODE_TYPE;
568
+ var ConcurrentMode = REACT_CONCURRENT_MODE_TYPE;
569
+ var ContextConsumer = REACT_CONTEXT_TYPE;
570
+ var ContextProvider = REACT_PROVIDER_TYPE;
571
+ var Element = REACT_ELEMENT_TYPE;
572
+ var ForwardRef = REACT_FORWARD_REF_TYPE;
573
+ var Fragment2 = REACT_FRAGMENT_TYPE;
574
+ var Lazy = REACT_LAZY_TYPE;
575
+ var Memo = REACT_MEMO_TYPE;
576
+ var Portal = REACT_PORTAL_TYPE;
577
+ var Profiler = REACT_PROFILER_TYPE;
578
+ var StrictMode = REACT_STRICT_MODE_TYPE;
579
+ var Suspense = REACT_SUSPENSE_TYPE;
580
+ var hasWarnedAboutDeprecatedIsAsyncMode = false;
581
+ function isAsyncMode(object) {
582
+ {
583
+ if (!hasWarnedAboutDeprecatedIsAsyncMode) {
584
+ hasWarnedAboutDeprecatedIsAsyncMode = true;
585
+ console["warn"]("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.");
586
+ }
587
+ }
588
+ return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;
589
+ }
590
+ function isConcurrentMode(object) {
591
+ return typeOf(object) === REACT_CONCURRENT_MODE_TYPE;
592
+ }
593
+ function isContextConsumer(object) {
594
+ return typeOf(object) === REACT_CONTEXT_TYPE;
595
+ }
596
+ function isContextProvider(object) {
597
+ return typeOf(object) === REACT_PROVIDER_TYPE;
598
+ }
599
+ function isElement(object) {
600
+ return typeof object === "object" && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;
601
+ }
602
+ function isForwardRef(object) {
603
+ return typeOf(object) === REACT_FORWARD_REF_TYPE;
604
+ }
605
+ function isFragment(object) {
606
+ return typeOf(object) === REACT_FRAGMENT_TYPE;
607
+ }
608
+ function isLazy(object) {
609
+ return typeOf(object) === REACT_LAZY_TYPE;
610
+ }
611
+ function isMemo(object) {
612
+ return typeOf(object) === REACT_MEMO_TYPE;
613
+ }
614
+ function isPortal(object) {
615
+ return typeOf(object) === REACT_PORTAL_TYPE;
616
+ }
617
+ function isProfiler(object) {
618
+ return typeOf(object) === REACT_PROFILER_TYPE;
619
+ }
620
+ function isStrictMode(object) {
621
+ return typeOf(object) === REACT_STRICT_MODE_TYPE;
622
+ }
623
+ function isSuspense(object) {
624
+ return typeOf(object) === REACT_SUSPENSE_TYPE;
625
+ }
626
+ reactIs_development.AsyncMode = AsyncMode;
627
+ reactIs_development.ConcurrentMode = ConcurrentMode;
628
+ reactIs_development.ContextConsumer = ContextConsumer;
629
+ reactIs_development.ContextProvider = ContextProvider;
630
+ reactIs_development.Element = Element;
631
+ reactIs_development.ForwardRef = ForwardRef;
632
+ reactIs_development.Fragment = Fragment2;
633
+ reactIs_development.Lazy = Lazy;
634
+ reactIs_development.Memo = Memo;
635
+ reactIs_development.Portal = Portal;
636
+ reactIs_development.Profiler = Profiler;
637
+ reactIs_development.StrictMode = StrictMode;
638
+ reactIs_development.Suspense = Suspense;
639
+ reactIs_development.isAsyncMode = isAsyncMode;
640
+ reactIs_development.isConcurrentMode = isConcurrentMode;
641
+ reactIs_development.isContextConsumer = isContextConsumer;
642
+ reactIs_development.isContextProvider = isContextProvider;
643
+ reactIs_development.isElement = isElement;
644
+ reactIs_development.isForwardRef = isForwardRef;
645
+ reactIs_development.isFragment = isFragment;
646
+ reactIs_development.isLazy = isLazy;
647
+ reactIs_development.isMemo = isMemo;
648
+ reactIs_development.isPortal = isPortal;
649
+ reactIs_development.isProfiler = isProfiler;
650
+ reactIs_development.isStrictMode = isStrictMode;
651
+ reactIs_development.isSuspense = isSuspense;
652
+ reactIs_development.isValidElementType = isValidElementType;
653
+ reactIs_development.typeOf = typeOf;
654
+ })();
655
+ }
656
+ return reactIs_development;
657
+ }
658
+ var hasRequiredReactIs;
659
+ function requireReactIs() {
660
+ if (hasRequiredReactIs) return reactIs.exports;
661
+ hasRequiredReactIs = 1;
662
+ if (process.env.NODE_ENV === "production") {
663
+ reactIs.exports = requireReactIs_production_min();
664
+ } else {
665
+ reactIs.exports = requireReactIs_development();
666
+ }
667
+ return reactIs.exports;
668
+ }
669
+ /*
670
+ object-assign
671
+ (c) Sindre Sorhus
672
+ @license MIT
673
+ */
674
+ var objectAssign;
675
+ var hasRequiredObjectAssign;
676
+ function requireObjectAssign() {
677
+ if (hasRequiredObjectAssign) return objectAssign;
678
+ hasRequiredObjectAssign = 1;
679
+ var getOwnPropertySymbols = Object.getOwnPropertySymbols;
680
+ var hasOwnProperty = Object.prototype.hasOwnProperty;
681
+ var propIsEnumerable = Object.prototype.propertyIsEnumerable;
682
+ function toObject(val) {
683
+ if (val === null || val === void 0) {
684
+ throw new TypeError("Object.assign cannot be called with null or undefined");
685
+ }
686
+ return Object(val);
687
+ }
688
+ function shouldUseNative() {
689
+ try {
690
+ if (!Object.assign) {
691
+ return false;
692
+ }
693
+ var test1 = new String("abc");
694
+ test1[5] = "de";
695
+ if (Object.getOwnPropertyNames(test1)[0] === "5") {
696
+ return false;
697
+ }
698
+ var test2 = {};
699
+ for (var i = 0; i < 10; i++) {
700
+ test2["_" + String.fromCharCode(i)] = i;
701
+ }
702
+ var order2 = Object.getOwnPropertyNames(test2).map(function(n) {
703
+ return test2[n];
704
+ });
705
+ if (order2.join("") !== "0123456789") {
706
+ return false;
707
+ }
708
+ var test3 = {};
709
+ "abcdefghijklmnopqrst".split("").forEach(function(letter) {
710
+ test3[letter] = letter;
711
+ });
712
+ if (Object.keys(Object.assign({}, test3)).join("") !== "abcdefghijklmnopqrst") {
713
+ return false;
714
+ }
715
+ return true;
716
+ } catch (err) {
717
+ return false;
718
+ }
719
+ }
720
+ objectAssign = shouldUseNative() ? Object.assign : function(target, source) {
721
+ var from;
722
+ var to = toObject(target);
723
+ var symbols;
724
+ for (var s = 1; s < arguments.length; s++) {
725
+ from = Object(arguments[s]);
726
+ for (var key in from) {
727
+ if (hasOwnProperty.call(from, key)) {
728
+ to[key] = from[key];
729
+ }
730
+ }
731
+ if (getOwnPropertySymbols) {
732
+ symbols = getOwnPropertySymbols(from);
733
+ for (var i = 0; i < symbols.length; i++) {
734
+ if (propIsEnumerable.call(from, symbols[i])) {
735
+ to[symbols[i]] = from[symbols[i]];
736
+ }
737
+ }
738
+ }
739
+ }
740
+ return to;
741
+ };
742
+ return objectAssign;
743
+ }
744
+ var ReactPropTypesSecret_1;
745
+ var hasRequiredReactPropTypesSecret;
746
+ function requireReactPropTypesSecret() {
747
+ if (hasRequiredReactPropTypesSecret) return ReactPropTypesSecret_1;
748
+ hasRequiredReactPropTypesSecret = 1;
749
+ var ReactPropTypesSecret = "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";
750
+ ReactPropTypesSecret_1 = ReactPropTypesSecret;
751
+ return ReactPropTypesSecret_1;
752
+ }
753
+ var has;
754
+ var hasRequiredHas;
755
+ function requireHas() {
756
+ if (hasRequiredHas) return has;
757
+ hasRequiredHas = 1;
758
+ has = Function.call.bind(Object.prototype.hasOwnProperty);
759
+ return has;
760
+ }
761
+ var checkPropTypes_1;
762
+ var hasRequiredCheckPropTypes;
763
+ function requireCheckPropTypes() {
764
+ if (hasRequiredCheckPropTypes) return checkPropTypes_1;
765
+ hasRequiredCheckPropTypes = 1;
766
+ var printWarning = function() {
767
+ };
768
+ if (process.env.NODE_ENV !== "production") {
769
+ var ReactPropTypesSecret = requireReactPropTypesSecret();
770
+ var loggedTypeFailures = {};
771
+ var has2 = requireHas();
772
+ printWarning = function(text) {
773
+ var message = "Warning: " + text;
774
+ if (typeof console !== "undefined") {
775
+ console.error(message);
776
+ }
777
+ try {
778
+ throw new Error(message);
779
+ } catch (x2) {
780
+ }
781
+ };
782
+ }
783
+ function checkPropTypes(typeSpecs, values, location, componentName, getStack) {
784
+ if (process.env.NODE_ENV !== "production") {
785
+ for (var typeSpecName in typeSpecs) {
786
+ if (has2(typeSpecs, typeSpecName)) {
787
+ var error;
788
+ try {
789
+ if (typeof typeSpecs[typeSpecName] !== "function") {
790
+ var err = Error(
791
+ (componentName || "React class") + ": " + location + " type `" + typeSpecName + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof typeSpecs[typeSpecName] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`."
792
+ );
793
+ err.name = "Invariant Violation";
794
+ throw err;
795
+ }
796
+ error = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, ReactPropTypesSecret);
797
+ } catch (ex) {
798
+ error = ex;
799
+ }
800
+ if (error && !(error instanceof Error)) {
801
+ printWarning(
802
+ (componentName || "React class") + ": type specification of " + location + " `" + typeSpecName + "` is invalid; the type checker function must return `null` or an `Error` but returned a " + typeof error + ". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."
803
+ );
804
+ }
805
+ if (error instanceof Error && !(error.message in loggedTypeFailures)) {
806
+ loggedTypeFailures[error.message] = true;
807
+ var stack = getStack ? getStack() : "";
808
+ printWarning(
809
+ "Failed " + location + " type: " + error.message + (stack != null ? stack : "")
810
+ );
811
+ }
812
+ }
813
+ }
814
+ }
815
+ }
816
+ checkPropTypes.resetWarningCache = function() {
817
+ if (process.env.NODE_ENV !== "production") {
818
+ loggedTypeFailures = {};
819
+ }
820
+ };
821
+ checkPropTypes_1 = checkPropTypes;
822
+ return checkPropTypes_1;
823
+ }
824
+ var factoryWithTypeCheckers;
825
+ var hasRequiredFactoryWithTypeCheckers;
826
+ function requireFactoryWithTypeCheckers() {
827
+ if (hasRequiredFactoryWithTypeCheckers) return factoryWithTypeCheckers;
828
+ hasRequiredFactoryWithTypeCheckers = 1;
829
+ var ReactIs = requireReactIs();
830
+ var assign = requireObjectAssign();
831
+ var ReactPropTypesSecret = requireReactPropTypesSecret();
832
+ var has2 = requireHas();
833
+ var checkPropTypes = requireCheckPropTypes();
834
+ var printWarning = function() {
835
+ };
836
+ if (process.env.NODE_ENV !== "production") {
837
+ printWarning = function(text) {
838
+ var message = "Warning: " + text;
839
+ if (typeof console !== "undefined") {
840
+ console.error(message);
841
+ }
842
+ try {
843
+ throw new Error(message);
844
+ } catch (x2) {
845
+ }
846
+ };
847
+ }
848
+ function emptyFunctionThatReturnsNull() {
849
+ return null;
850
+ }
851
+ factoryWithTypeCheckers = function(isValidElement, throwOnDirectAccess) {
852
+ var ITERATOR_SYMBOL = typeof Symbol === "function" && Symbol.iterator;
853
+ var FAUX_ITERATOR_SYMBOL = "@@iterator";
854
+ function getIteratorFn(maybeIterable) {
855
+ var iteratorFn = maybeIterable && (ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]);
856
+ if (typeof iteratorFn === "function") {
857
+ return iteratorFn;
858
+ }
859
+ }
860
+ var ANONYMOUS = "<<anonymous>>";
861
+ var ReactPropTypes = {
862
+ array: createPrimitiveTypeChecker("array"),
863
+ bigint: createPrimitiveTypeChecker("bigint"),
864
+ bool: createPrimitiveTypeChecker("boolean"),
865
+ func: createPrimitiveTypeChecker("function"),
866
+ number: createPrimitiveTypeChecker("number"),
867
+ object: createPrimitiveTypeChecker("object"),
868
+ string: createPrimitiveTypeChecker("string"),
869
+ symbol: createPrimitiveTypeChecker("symbol"),
870
+ any: createAnyTypeChecker(),
871
+ arrayOf: createArrayOfTypeChecker,
872
+ element: createElementTypeChecker(),
873
+ elementType: createElementTypeTypeChecker(),
874
+ instanceOf: createInstanceTypeChecker,
875
+ node: createNodeChecker(),
876
+ objectOf: createObjectOfTypeChecker,
877
+ oneOf: createEnumTypeChecker,
878
+ oneOfType: createUnionTypeChecker,
879
+ shape: createShapeTypeChecker,
880
+ exact: createStrictShapeTypeChecker
881
+ };
882
+ function is(x2, y) {
883
+ if (x2 === y) {
884
+ return x2 !== 0 || 1 / x2 === 1 / y;
885
+ } else {
886
+ return x2 !== x2 && y !== y;
887
+ }
888
+ }
889
+ function PropTypeError(message, data) {
890
+ this.message = message;
891
+ this.data = data && typeof data === "object" ? data : {};
892
+ this.stack = "";
893
+ }
894
+ PropTypeError.prototype = Error.prototype;
895
+ function createChainableTypeChecker(validate) {
896
+ if (process.env.NODE_ENV !== "production") {
897
+ var manualPropTypeCallCache = {};
898
+ var manualPropTypeWarningCount = 0;
899
+ }
900
+ function checkType(isRequired, props, propName, componentName, location, propFullName, secret) {
901
+ componentName = componentName || ANONYMOUS;
902
+ propFullName = propFullName || propName;
903
+ if (secret !== ReactPropTypesSecret) {
904
+ if (throwOnDirectAccess) {
905
+ var err = new Error(
906
+ "Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types"
907
+ );
908
+ err.name = "Invariant Violation";
909
+ throw err;
910
+ } else if (process.env.NODE_ENV !== "production" && typeof console !== "undefined") {
911
+ var cacheKey = componentName + ":" + propName;
912
+ if (!manualPropTypeCallCache[cacheKey] && // Avoid spamming the console because they are often not actionable except for lib authors
913
+ manualPropTypeWarningCount < 3) {
914
+ printWarning(
915
+ "You are manually calling a React.PropTypes validation function for the `" + propFullName + "` prop on `" + componentName + "`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."
916
+ );
917
+ manualPropTypeCallCache[cacheKey] = true;
918
+ manualPropTypeWarningCount++;
919
+ }
920
+ }
921
+ }
922
+ if (props[propName] == null) {
923
+ if (isRequired) {
924
+ if (props[propName] === null) {
925
+ return new PropTypeError("The " + location + " `" + propFullName + "` is marked as required " + ("in `" + componentName + "`, but its value is `null`."));
926
+ }
927
+ return new PropTypeError("The " + location + " `" + propFullName + "` is marked as required in " + ("`" + componentName + "`, but its value is `undefined`."));
928
+ }
929
+ return null;
930
+ } else {
931
+ return validate(props, propName, componentName, location, propFullName);
932
+ }
933
+ }
934
+ var chainedCheckType = checkType.bind(null, false);
935
+ chainedCheckType.isRequired = checkType.bind(null, true);
936
+ return chainedCheckType;
937
+ }
938
+ function createPrimitiveTypeChecker(expectedType) {
939
+ function validate(props, propName, componentName, location, propFullName, secret) {
940
+ var propValue = props[propName];
941
+ var propType = getPropType(propValue);
942
+ if (propType !== expectedType) {
943
+ var preciseType = getPreciseType(propValue);
944
+ return new PropTypeError(
945
+ "Invalid " + location + " `" + propFullName + "` of type " + ("`" + preciseType + "` supplied to `" + componentName + "`, expected ") + ("`" + expectedType + "`."),
946
+ { expectedType }
947
+ );
948
+ }
949
+ return null;
950
+ }
951
+ return createChainableTypeChecker(validate);
952
+ }
953
+ function createAnyTypeChecker() {
954
+ return createChainableTypeChecker(emptyFunctionThatReturnsNull);
955
+ }
956
+ function createArrayOfTypeChecker(typeChecker) {
957
+ function validate(props, propName, componentName, location, propFullName) {
958
+ if (typeof typeChecker !== "function") {
959
+ return new PropTypeError("Property `" + propFullName + "` of component `" + componentName + "` has invalid PropType notation inside arrayOf.");
960
+ }
961
+ var propValue = props[propName];
962
+ if (!Array.isArray(propValue)) {
963
+ var propType = getPropType(propValue);
964
+ return new PropTypeError("Invalid " + location + " `" + propFullName + "` of type " + ("`" + propType + "` supplied to `" + componentName + "`, expected an array."));
965
+ }
966
+ for (var i = 0; i < propValue.length; i++) {
967
+ var error = typeChecker(propValue, i, componentName, location, propFullName + "[" + i + "]", ReactPropTypesSecret);
968
+ if (error instanceof Error) {
969
+ return error;
970
+ }
971
+ }
972
+ return null;
973
+ }
974
+ return createChainableTypeChecker(validate);
975
+ }
976
+ function createElementTypeChecker() {
977
+ function validate(props, propName, componentName, location, propFullName) {
978
+ var propValue = props[propName];
979
+ if (!isValidElement(propValue)) {
980
+ var propType = getPropType(propValue);
981
+ return new PropTypeError("Invalid " + location + " `" + propFullName + "` of type " + ("`" + propType + "` supplied to `" + componentName + "`, expected a single ReactElement."));
982
+ }
983
+ return null;
984
+ }
985
+ return createChainableTypeChecker(validate);
986
+ }
987
+ function createElementTypeTypeChecker() {
988
+ function validate(props, propName, componentName, location, propFullName) {
989
+ var propValue = props[propName];
990
+ if (!ReactIs.isValidElementType(propValue)) {
991
+ var propType = getPropType(propValue);
992
+ return new PropTypeError("Invalid " + location + " `" + propFullName + "` of type " + ("`" + propType + "` supplied to `" + componentName + "`, expected a single ReactElement type."));
993
+ }
994
+ return null;
995
+ }
996
+ return createChainableTypeChecker(validate);
997
+ }
998
+ function createInstanceTypeChecker(expectedClass) {
999
+ function validate(props, propName, componentName, location, propFullName) {
1000
+ if (!(props[propName] instanceof expectedClass)) {
1001
+ var expectedClassName = expectedClass.name || ANONYMOUS;
1002
+ var actualClassName = getClassName(props[propName]);
1003
+ return new PropTypeError("Invalid " + location + " `" + propFullName + "` of type " + ("`" + actualClassName + "` supplied to `" + componentName + "`, expected ") + ("instance of `" + expectedClassName + "`."));
1004
+ }
1005
+ return null;
1006
+ }
1007
+ return createChainableTypeChecker(validate);
1008
+ }
1009
+ function createEnumTypeChecker(expectedValues) {
1010
+ if (!Array.isArray(expectedValues)) {
1011
+ if (process.env.NODE_ENV !== "production") {
1012
+ if (arguments.length > 1) {
1013
+ printWarning(
1014
+ "Invalid arguments supplied to oneOf, expected an array, got " + arguments.length + " arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."
1015
+ );
1016
+ } else {
1017
+ printWarning("Invalid argument supplied to oneOf, expected an array.");
1018
+ }
1019
+ }
1020
+ return emptyFunctionThatReturnsNull;
1021
+ }
1022
+ function validate(props, propName, componentName, location, propFullName) {
1023
+ var propValue = props[propName];
1024
+ for (var i = 0; i < expectedValues.length; i++) {
1025
+ if (is(propValue, expectedValues[i])) {
1026
+ return null;
1027
+ }
1028
+ }
1029
+ var valuesString = JSON.stringify(expectedValues, function replacer(key, value) {
1030
+ var type = getPreciseType(value);
1031
+ if (type === "symbol") {
1032
+ return String(value);
1033
+ }
1034
+ return value;
1035
+ });
1036
+ return new PropTypeError("Invalid " + location + " `" + propFullName + "` of value `" + String(propValue) + "` " + ("supplied to `" + componentName + "`, expected one of " + valuesString + "."));
1037
+ }
1038
+ return createChainableTypeChecker(validate);
1039
+ }
1040
+ function createObjectOfTypeChecker(typeChecker) {
1041
+ function validate(props, propName, componentName, location, propFullName) {
1042
+ if (typeof typeChecker !== "function") {
1043
+ return new PropTypeError("Property `" + propFullName + "` of component `" + componentName + "` has invalid PropType notation inside objectOf.");
1044
+ }
1045
+ var propValue = props[propName];
1046
+ var propType = getPropType(propValue);
1047
+ if (propType !== "object") {
1048
+ return new PropTypeError("Invalid " + location + " `" + propFullName + "` of type " + ("`" + propType + "` supplied to `" + componentName + "`, expected an object."));
1049
+ }
1050
+ for (var key in propValue) {
1051
+ if (has2(propValue, key)) {
1052
+ var error = typeChecker(propValue, key, componentName, location, propFullName + "." + key, ReactPropTypesSecret);
1053
+ if (error instanceof Error) {
1054
+ return error;
1055
+ }
1056
+ }
1057
+ }
1058
+ return null;
1059
+ }
1060
+ return createChainableTypeChecker(validate);
1061
+ }
1062
+ function createUnionTypeChecker(arrayOfTypeCheckers) {
1063
+ if (!Array.isArray(arrayOfTypeCheckers)) {
1064
+ process.env.NODE_ENV !== "production" ? printWarning("Invalid argument supplied to oneOfType, expected an instance of array.") : void 0;
1065
+ return emptyFunctionThatReturnsNull;
1066
+ }
1067
+ for (var i = 0; i < arrayOfTypeCheckers.length; i++) {
1068
+ var checker = arrayOfTypeCheckers[i];
1069
+ if (typeof checker !== "function") {
1070
+ printWarning(
1071
+ "Invalid argument supplied to oneOfType. Expected an array of check functions, but received " + getPostfixForTypeWarning(checker) + " at index " + i + "."
1072
+ );
1073
+ return emptyFunctionThatReturnsNull;
1074
+ }
1075
+ }
1076
+ function validate(props, propName, componentName, location, propFullName) {
1077
+ var expectedTypes = [];
1078
+ for (var i2 = 0; i2 < arrayOfTypeCheckers.length; i2++) {
1079
+ var checker2 = arrayOfTypeCheckers[i2];
1080
+ var checkerResult = checker2(props, propName, componentName, location, propFullName, ReactPropTypesSecret);
1081
+ if (checkerResult == null) {
1082
+ return null;
1083
+ }
1084
+ if (checkerResult.data && has2(checkerResult.data, "expectedType")) {
1085
+ expectedTypes.push(checkerResult.data.expectedType);
1086
+ }
1087
+ }
1088
+ var expectedTypesMessage = expectedTypes.length > 0 ? ", expected one of type [" + expectedTypes.join(", ") + "]" : "";
1089
+ return new PropTypeError("Invalid " + location + " `" + propFullName + "` supplied to " + ("`" + componentName + "`" + expectedTypesMessage + "."));
1090
+ }
1091
+ return createChainableTypeChecker(validate);
1092
+ }
1093
+ function createNodeChecker() {
1094
+ function validate(props, propName, componentName, location, propFullName) {
1095
+ if (!isNode(props[propName])) {
1096
+ return new PropTypeError("Invalid " + location + " `" + propFullName + "` supplied to " + ("`" + componentName + "`, expected a ReactNode."));
1097
+ }
1098
+ return null;
1099
+ }
1100
+ return createChainableTypeChecker(validate);
1101
+ }
1102
+ function invalidValidatorError(componentName, location, propFullName, key, type) {
1103
+ return new PropTypeError(
1104
+ (componentName || "React class") + ": " + location + " type `" + propFullName + "." + key + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + type + "`."
1105
+ );
1106
+ }
1107
+ function createShapeTypeChecker(shapeTypes) {
1108
+ function validate(props, propName, componentName, location, propFullName) {
1109
+ var propValue = props[propName];
1110
+ var propType = getPropType(propValue);
1111
+ if (propType !== "object") {
1112
+ return new PropTypeError("Invalid " + location + " `" + propFullName + "` of type `" + propType + "` " + ("supplied to `" + componentName + "`, expected `object`."));
1113
+ }
1114
+ for (var key in shapeTypes) {
1115
+ var checker = shapeTypes[key];
1116
+ if (typeof checker !== "function") {
1117
+ return invalidValidatorError(componentName, location, propFullName, key, getPreciseType(checker));
1118
+ }
1119
+ var error = checker(propValue, key, componentName, location, propFullName + "." + key, ReactPropTypesSecret);
1120
+ if (error) {
1121
+ return error;
1122
+ }
1123
+ }
1124
+ return null;
1125
+ }
1126
+ return createChainableTypeChecker(validate);
1127
+ }
1128
+ function createStrictShapeTypeChecker(shapeTypes) {
1129
+ function validate(props, propName, componentName, location, propFullName) {
1130
+ var propValue = props[propName];
1131
+ var propType = getPropType(propValue);
1132
+ if (propType !== "object") {
1133
+ return new PropTypeError("Invalid " + location + " `" + propFullName + "` of type `" + propType + "` " + ("supplied to `" + componentName + "`, expected `object`."));
1134
+ }
1135
+ var allKeys = assign({}, props[propName], shapeTypes);
1136
+ for (var key in allKeys) {
1137
+ var checker = shapeTypes[key];
1138
+ if (has2(shapeTypes, key) && typeof checker !== "function") {
1139
+ return invalidValidatorError(componentName, location, propFullName, key, getPreciseType(checker));
1140
+ }
1141
+ if (!checker) {
1142
+ return new PropTypeError(
1143
+ "Invalid " + location + " `" + propFullName + "` key `" + key + "` supplied to `" + componentName + "`.\nBad object: " + JSON.stringify(props[propName], null, " ") + "\nValid keys: " + JSON.stringify(Object.keys(shapeTypes), null, " ")
1144
+ );
1145
+ }
1146
+ var error = checker(propValue, key, componentName, location, propFullName + "." + key, ReactPropTypesSecret);
1147
+ if (error) {
1148
+ return error;
1149
+ }
1150
+ }
1151
+ return null;
1152
+ }
1153
+ return createChainableTypeChecker(validate);
1154
+ }
1155
+ function isNode(propValue) {
1156
+ switch (typeof propValue) {
1157
+ case "number":
1158
+ case "string":
1159
+ case "undefined":
1160
+ return true;
1161
+ case "boolean":
1162
+ return !propValue;
1163
+ case "object":
1164
+ if (Array.isArray(propValue)) {
1165
+ return propValue.every(isNode);
1166
+ }
1167
+ if (propValue === null || isValidElement(propValue)) {
1168
+ return true;
1169
+ }
1170
+ var iteratorFn = getIteratorFn(propValue);
1171
+ if (iteratorFn) {
1172
+ var iterator = iteratorFn.call(propValue);
1173
+ var step;
1174
+ if (iteratorFn !== propValue.entries) {
1175
+ while (!(step = iterator.next()).done) {
1176
+ if (!isNode(step.value)) {
1177
+ return false;
1178
+ }
1179
+ }
1180
+ } else {
1181
+ while (!(step = iterator.next()).done) {
1182
+ var entry = step.value;
1183
+ if (entry) {
1184
+ if (!isNode(entry[1])) {
1185
+ return false;
1186
+ }
1187
+ }
1188
+ }
1189
+ }
1190
+ } else {
1191
+ return false;
1192
+ }
1193
+ return true;
1194
+ default:
1195
+ return false;
1196
+ }
1197
+ }
1198
+ function isSymbol(propType, propValue) {
1199
+ if (propType === "symbol") {
1200
+ return true;
1201
+ }
1202
+ if (!propValue) {
1203
+ return false;
1204
+ }
1205
+ if (propValue["@@toStringTag"] === "Symbol") {
1206
+ return true;
1207
+ }
1208
+ if (typeof Symbol === "function" && propValue instanceof Symbol) {
1209
+ return true;
1210
+ }
1211
+ return false;
1212
+ }
1213
+ function getPropType(propValue) {
1214
+ var propType = typeof propValue;
1215
+ if (Array.isArray(propValue)) {
1216
+ return "array";
1217
+ }
1218
+ if (propValue instanceof RegExp) {
1219
+ return "object";
1220
+ }
1221
+ if (isSymbol(propType, propValue)) {
1222
+ return "symbol";
1223
+ }
1224
+ return propType;
1225
+ }
1226
+ function getPreciseType(propValue) {
1227
+ if (typeof propValue === "undefined" || propValue === null) {
1228
+ return "" + propValue;
1229
+ }
1230
+ var propType = getPropType(propValue);
1231
+ if (propType === "object") {
1232
+ if (propValue instanceof Date) {
1233
+ return "date";
1234
+ } else if (propValue instanceof RegExp) {
1235
+ return "regexp";
1236
+ }
1237
+ }
1238
+ return propType;
1239
+ }
1240
+ function getPostfixForTypeWarning(value) {
1241
+ var type = getPreciseType(value);
1242
+ switch (type) {
1243
+ case "array":
1244
+ case "object":
1245
+ return "an " + type;
1246
+ case "boolean":
1247
+ case "date":
1248
+ case "regexp":
1249
+ return "a " + type;
1250
+ default:
1251
+ return type;
1252
+ }
1253
+ }
1254
+ function getClassName(propValue) {
1255
+ if (!propValue.constructor || !propValue.constructor.name) {
1256
+ return ANONYMOUS;
1257
+ }
1258
+ return propValue.constructor.name;
1259
+ }
1260
+ ReactPropTypes.checkPropTypes = checkPropTypes;
1261
+ ReactPropTypes.resetWarningCache = checkPropTypes.resetWarningCache;
1262
+ ReactPropTypes.PropTypes = ReactPropTypes;
1263
+ return ReactPropTypes;
1264
+ };
1265
+ return factoryWithTypeCheckers;
1266
+ }
1267
+ var factoryWithThrowingShims;
1268
+ var hasRequiredFactoryWithThrowingShims;
1269
+ function requireFactoryWithThrowingShims() {
1270
+ if (hasRequiredFactoryWithThrowingShims) return factoryWithThrowingShims;
1271
+ hasRequiredFactoryWithThrowingShims = 1;
1272
+ var ReactPropTypesSecret = requireReactPropTypesSecret();
1273
+ function emptyFunction() {
1274
+ }
1275
+ function emptyFunctionWithReset() {
1276
+ }
1277
+ emptyFunctionWithReset.resetWarningCache = emptyFunction;
1278
+ factoryWithThrowingShims = function() {
1279
+ function shim(props, propName, componentName, location, propFullName, secret) {
1280
+ if (secret === ReactPropTypesSecret) {
1281
+ return;
1282
+ }
1283
+ var err = new Error(
1284
+ "Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types"
1285
+ );
1286
+ err.name = "Invariant Violation";
1287
+ throw err;
1288
+ }
1289
+ shim.isRequired = shim;
1290
+ function getShim() {
1291
+ return shim;
1292
+ }
1293
+ var ReactPropTypes = {
1294
+ array: shim,
1295
+ bigint: shim,
1296
+ bool: shim,
1297
+ func: shim,
1298
+ number: shim,
1299
+ object: shim,
1300
+ string: shim,
1301
+ symbol: shim,
1302
+ any: shim,
1303
+ arrayOf: getShim,
1304
+ element: shim,
1305
+ elementType: shim,
1306
+ instanceOf: getShim,
1307
+ node: shim,
1308
+ objectOf: getShim,
1309
+ oneOf: getShim,
1310
+ oneOfType: getShim,
1311
+ shape: getShim,
1312
+ exact: getShim,
1313
+ checkPropTypes: emptyFunctionWithReset,
1314
+ resetWarningCache: emptyFunction
1315
+ };
1316
+ ReactPropTypes.PropTypes = ReactPropTypes;
1317
+ return ReactPropTypes;
1318
+ };
1319
+ return factoryWithThrowingShims;
1320
+ }
1321
+ if (process.env.NODE_ENV !== "production") {
1322
+ var ReactIs = requireReactIs();
1323
+ var throwOnDirectAccess = true;
1324
+ propTypes.exports = requireFactoryWithTypeCheckers()(ReactIs.isElement, throwOnDirectAccess);
1325
+ } else {
1326
+ propTypes.exports = requireFactoryWithThrowingShims()();
1327
+ }
1328
+ var propTypesExports = propTypes.exports;
1329
+ var clsx = { exports: {} };
1330
+ function r(e2) {
1331
+ var o, t, f2 = "";
1332
+ if ("string" == typeof e2 || "number" == typeof e2) f2 += e2;
1333
+ else if ("object" == typeof e2) if (Array.isArray(e2)) {
1334
+ var n = e2.length;
1335
+ for (o = 0; o < n; o++) e2[o] && (t = r(e2[o])) && (f2 && (f2 += " "), f2 += t);
1336
+ } else for (t in e2) e2[t] && (f2 && (f2 += " "), f2 += t);
1337
+ return f2;
1338
+ }
1339
+ function e() {
1340
+ for (var e2, o, t = 0, f2 = "", n = arguments.length; t < n; t++) (e2 = arguments[t]) && (o = r(e2)) && (f2 && (f2 += " "), f2 += o);
1341
+ return f2;
1342
+ }
1343
+ clsx.exports = e, clsx.exports.clsx = e;
1344
+ var clsxExports = clsx.exports;
1345
+ var domFns = {};
1346
+ var shims = {};
1347
+ Object.defineProperty(shims, "__esModule", {
1348
+ value: true
1349
+ });
1350
+ shims.dontSetMe = dontSetMe;
1351
+ shims.findInArray = findInArray;
1352
+ shims.int = int;
1353
+ shims.isFunction = isFunction;
1354
+ shims.isNum = isNum;
1355
+ function findInArray(array, callback) {
1356
+ for (let i = 0, length = array.length; i < length; i++) {
1357
+ if (callback.apply(callback, [array[i], i, array])) return array[i];
1358
+ }
1359
+ }
1360
+ function isFunction(func) {
1361
+ return typeof func === "function" || Object.prototype.toString.call(func) === "[object Function]";
1362
+ }
1363
+ function isNum(num) {
1364
+ return typeof num === "number" && !isNaN(num);
1365
+ }
1366
+ function int(a) {
1367
+ return parseInt(a, 10);
1368
+ }
1369
+ function dontSetMe(props, propName, componentName) {
1370
+ if (props[propName]) {
1371
+ return new Error(`Invalid prop ${propName} passed to ${componentName} - do not set this, set it on the child.`);
1372
+ }
1373
+ }
1374
+ var getPrefix$1 = {};
1375
+ Object.defineProperty(getPrefix$1, "__esModule", {
1376
+ value: true
1377
+ });
1378
+ getPrefix$1.browserPrefixToKey = browserPrefixToKey;
1379
+ getPrefix$1.browserPrefixToStyle = browserPrefixToStyle;
1380
+ getPrefix$1.default = void 0;
1381
+ getPrefix$1.getPrefix = getPrefix;
1382
+ const prefixes = ["Moz", "Webkit", "O", "ms"];
1383
+ function getPrefix() {
1384
+ var _a, _b;
1385
+ let prop = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : "transform";
1386
+ if (typeof window === "undefined") return "";
1387
+ const style = (_b = (_a = window.document) == null ? void 0 : _a.documentElement) == null ? void 0 : _b.style;
1388
+ if (!style) return "";
1389
+ if (prop in style) return "";
1390
+ for (let i = 0; i < prefixes.length; i++) {
1391
+ if (browserPrefixToKey(prop, prefixes[i]) in style) return prefixes[i];
1392
+ }
1393
+ return "";
1394
+ }
1395
+ function browserPrefixToKey(prop, prefix) {
1396
+ return prefix ? `${prefix}${kebabToTitleCase(prop)}` : prop;
1397
+ }
1398
+ function browserPrefixToStyle(prop, prefix) {
1399
+ return prefix ? `-${prefix.toLowerCase()}-${prop}` : prop;
1400
+ }
1401
+ function kebabToTitleCase(str) {
1402
+ let out = "";
1403
+ let shouldCapitalize = true;
1404
+ for (let i = 0; i < str.length; i++) {
1405
+ if (shouldCapitalize) {
1406
+ out += str[i].toUpperCase();
1407
+ shouldCapitalize = false;
1408
+ } else if (str[i] === "-") {
1409
+ shouldCapitalize = true;
1410
+ } else {
1411
+ out += str[i];
1412
+ }
1413
+ }
1414
+ return out;
1415
+ }
1416
+ getPrefix$1.default = getPrefix();
1417
+ Object.defineProperty(domFns, "__esModule", {
1418
+ value: true
1419
+ });
1420
+ domFns.addClassName = addClassName;
1421
+ domFns.addEvent = addEvent;
1422
+ domFns.addUserSelectStyles = addUserSelectStyles;
1423
+ domFns.createCSSTransform = createCSSTransform;
1424
+ domFns.createSVGTransform = createSVGTransform;
1425
+ domFns.getTouch = getTouch;
1426
+ domFns.getTouchIdentifier = getTouchIdentifier;
1427
+ domFns.getTranslation = getTranslation;
1428
+ domFns.innerHeight = innerHeight;
1429
+ domFns.innerWidth = innerWidth;
1430
+ domFns.matchesSelector = matchesSelector;
1431
+ domFns.matchesSelectorAndParentsTo = matchesSelectorAndParentsTo;
1432
+ domFns.offsetXYFromParent = offsetXYFromParent;
1433
+ domFns.outerHeight = outerHeight;
1434
+ domFns.outerWidth = outerWidth;
1435
+ domFns.removeClassName = removeClassName;
1436
+ domFns.removeEvent = removeEvent;
1437
+ domFns.scheduleRemoveUserSelectStyles = scheduleRemoveUserSelectStyles;
1438
+ var _shims$2 = shims;
1439
+ var _getPrefix = _interopRequireWildcard$1(getPrefix$1);
1440
+ function _interopRequireWildcard$1(e2, t) {
1441
+ if ("function" == typeof WeakMap) var r2 = /* @__PURE__ */ new WeakMap(), n = /* @__PURE__ */ new WeakMap();
1442
+ return (_interopRequireWildcard$1 = function(e3, t2) {
1443
+ if (!t2 && e3 && e3.__esModule) return e3;
1444
+ var o, i, f2 = { __proto__: null, default: e3 };
1445
+ if (null === e3 || "object" != typeof e3 && "function" != typeof e3) return f2;
1446
+ if (o = t2 ? n : r2) {
1447
+ if (o.has(e3)) return o.get(e3);
1448
+ o.set(e3, f2);
1449
+ }
1450
+ for (const t3 in e3) "default" !== t3 && {}.hasOwnProperty.call(e3, t3) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e3, t3)) && (i.get || i.set) ? o(f2, t3, i) : f2[t3] = e3[t3]);
1451
+ return f2;
1452
+ })(e2, t);
1453
+ }
1454
+ let matchesSelectorFunc = "";
1455
+ function matchesSelector(el, selector) {
1456
+ if (!matchesSelectorFunc) {
1457
+ matchesSelectorFunc = (0, _shims$2.findInArray)(["matches", "webkitMatchesSelector", "mozMatchesSelector", "msMatchesSelector", "oMatchesSelector"], function(method) {
1458
+ return (0, _shims$2.isFunction)(el[method]);
1459
+ });
1460
+ }
1461
+ if (!(0, _shims$2.isFunction)(el[matchesSelectorFunc])) return false;
1462
+ return el[matchesSelectorFunc](selector);
1463
+ }
1464
+ function matchesSelectorAndParentsTo(el, selector, baseNode) {
1465
+ let node = el;
1466
+ do {
1467
+ if (matchesSelector(node, selector)) return true;
1468
+ if (node === baseNode) return false;
1469
+ node = node.parentNode;
1470
+ } while (node);
1471
+ return false;
1472
+ }
1473
+ function addEvent(el, event, handler, inputOptions) {
1474
+ if (!el) return;
1475
+ const options2 = {
1476
+ capture: true,
1477
+ ...inputOptions
1478
+ };
1479
+ if (el.addEventListener) {
1480
+ el.addEventListener(event, handler, options2);
1481
+ } else if (el.attachEvent) {
1482
+ el.attachEvent("on" + event, handler);
1483
+ } else {
1484
+ el["on" + event] = handler;
1485
+ }
1486
+ }
1487
+ function removeEvent(el, event, handler, inputOptions) {
1488
+ if (!el) return;
1489
+ const options2 = {
1490
+ capture: true,
1491
+ ...inputOptions
1492
+ };
1493
+ if (el.removeEventListener) {
1494
+ el.removeEventListener(event, handler, options2);
1495
+ } else if (el.detachEvent) {
1496
+ el.detachEvent("on" + event, handler);
1497
+ } else {
1498
+ el["on" + event] = null;
1499
+ }
1500
+ }
1501
+ function outerHeight(node) {
1502
+ let height = node.clientHeight;
1503
+ const computedStyle = node.ownerDocument.defaultView.getComputedStyle(node);
1504
+ height += (0, _shims$2.int)(computedStyle.borderTopWidth);
1505
+ height += (0, _shims$2.int)(computedStyle.borderBottomWidth);
1506
+ return height;
1507
+ }
1508
+ function outerWidth(node) {
1509
+ let width = node.clientWidth;
1510
+ const computedStyle = node.ownerDocument.defaultView.getComputedStyle(node);
1511
+ width += (0, _shims$2.int)(computedStyle.borderLeftWidth);
1512
+ width += (0, _shims$2.int)(computedStyle.borderRightWidth);
1513
+ return width;
1514
+ }
1515
+ function innerHeight(node) {
1516
+ let height = node.clientHeight;
1517
+ const computedStyle = node.ownerDocument.defaultView.getComputedStyle(node);
1518
+ height -= (0, _shims$2.int)(computedStyle.paddingTop);
1519
+ height -= (0, _shims$2.int)(computedStyle.paddingBottom);
1520
+ return height;
1521
+ }
1522
+ function innerWidth(node) {
1523
+ let width = node.clientWidth;
1524
+ const computedStyle = node.ownerDocument.defaultView.getComputedStyle(node);
1525
+ width -= (0, _shims$2.int)(computedStyle.paddingLeft);
1526
+ width -= (0, _shims$2.int)(computedStyle.paddingRight);
1527
+ return width;
1528
+ }
1529
+ function offsetXYFromParent(evt, offsetParent, scale) {
1530
+ const isBody = offsetParent === offsetParent.ownerDocument.body;
1531
+ const offsetParentRect = isBody ? {
1532
+ left: 0,
1533
+ top: 0
1534
+ } : offsetParent.getBoundingClientRect();
1535
+ const x2 = (evt.clientX + offsetParent.scrollLeft - offsetParentRect.left) / scale;
1536
+ const y = (evt.clientY + offsetParent.scrollTop - offsetParentRect.top) / scale;
1537
+ return {
1538
+ x: x2,
1539
+ y
1540
+ };
1541
+ }
1542
+ function createCSSTransform(controlPos, positionOffset) {
1543
+ const translation = getTranslation(controlPos, positionOffset, "px");
1544
+ return {
1545
+ [(0, _getPrefix.browserPrefixToKey)("transform", _getPrefix.default)]: translation
1546
+ };
1547
+ }
1548
+ function createSVGTransform(controlPos, positionOffset) {
1549
+ const translation = getTranslation(controlPos, positionOffset, "");
1550
+ return translation;
1551
+ }
1552
+ function getTranslation(_ref, positionOffset, unitSuffix) {
1553
+ let {
1554
+ x: x2,
1555
+ y
1556
+ } = _ref;
1557
+ let translation = `translate(${x2}${unitSuffix},${y}${unitSuffix})`;
1558
+ if (positionOffset) {
1559
+ const defaultX = `${typeof positionOffset.x === "string" ? positionOffset.x : positionOffset.x + unitSuffix}`;
1560
+ const defaultY = `${typeof positionOffset.y === "string" ? positionOffset.y : positionOffset.y + unitSuffix}`;
1561
+ translation = `translate(${defaultX}, ${defaultY})` + translation;
1562
+ }
1563
+ return translation;
1564
+ }
1565
+ function getTouch(e2, identifier) {
1566
+ return e2.targetTouches && (0, _shims$2.findInArray)(e2.targetTouches, (t) => identifier === t.identifier) || e2.changedTouches && (0, _shims$2.findInArray)(e2.changedTouches, (t) => identifier === t.identifier);
1567
+ }
1568
+ function getTouchIdentifier(e2) {
1569
+ if (e2.targetTouches && e2.targetTouches[0]) return e2.targetTouches[0].identifier;
1570
+ if (e2.changedTouches && e2.changedTouches[0]) return e2.changedTouches[0].identifier;
1571
+ }
1572
+ function addUserSelectStyles(doc) {
1573
+ if (!doc) return;
1574
+ let styleEl = doc.getElementById("react-draggable-style-el");
1575
+ if (!styleEl) {
1576
+ styleEl = doc.createElement("style");
1577
+ styleEl.type = "text/css";
1578
+ styleEl.id = "react-draggable-style-el";
1579
+ styleEl.innerHTML = ".react-draggable-transparent-selection *::-moz-selection {all: inherit;}\n";
1580
+ styleEl.innerHTML += ".react-draggable-transparent-selection *::selection {all: inherit;}\n";
1581
+ doc.getElementsByTagName("head")[0].appendChild(styleEl);
1582
+ }
1583
+ if (doc.body) addClassName(doc.body, "react-draggable-transparent-selection");
1584
+ }
1585
+ function scheduleRemoveUserSelectStyles(doc) {
1586
+ if (window.requestAnimationFrame) {
1587
+ window.requestAnimationFrame(() => {
1588
+ removeUserSelectStyles(doc);
1589
+ });
1590
+ } else {
1591
+ removeUserSelectStyles(doc);
1592
+ }
1593
+ }
1594
+ function removeUserSelectStyles(doc) {
1595
+ if (!doc) return;
1596
+ try {
1597
+ if (doc.body) removeClassName(doc.body, "react-draggable-transparent-selection");
1598
+ if (doc.selection) {
1599
+ doc.selection.empty();
1600
+ } else {
1601
+ const selection = (doc.defaultView || window).getSelection();
1602
+ if (selection && selection.type !== "Caret") {
1603
+ selection.removeAllRanges();
1604
+ }
1605
+ }
1606
+ } catch (e2) {
1607
+ }
1608
+ }
1609
+ function addClassName(el, className) {
1610
+ if (el.classList) {
1611
+ el.classList.add(className);
1612
+ } else {
1613
+ if (!el.className.match(new RegExp(`(?:^|\\s)${className}(?!\\S)`))) {
1614
+ el.className += ` ${className}`;
1615
+ }
1616
+ }
1617
+ }
1618
+ function removeClassName(el, className) {
1619
+ if (el.classList) {
1620
+ el.classList.remove(className);
1621
+ } else {
1622
+ el.className = el.className.replace(new RegExp(`(?:^|\\s)${className}(?!\\S)`, "g"), "");
1623
+ }
1624
+ }
1625
+ var positionFns = {};
1626
+ Object.defineProperty(positionFns, "__esModule", {
1627
+ value: true
1628
+ });
1629
+ positionFns.canDragX = canDragX;
1630
+ positionFns.canDragY = canDragY;
1631
+ positionFns.createCoreData = createCoreData;
1632
+ positionFns.createDraggableData = createDraggableData;
1633
+ positionFns.getBoundPosition = getBoundPosition;
1634
+ positionFns.getControlPosition = getControlPosition;
1635
+ positionFns.snapToGrid = snapToGrid;
1636
+ var _shims$1 = shims;
1637
+ var _domFns$1 = domFns;
1638
+ function getBoundPosition(draggable, x2, y) {
1639
+ if (!draggable.props.bounds) return [x2, y];
1640
+ let {
1641
+ bounds
1642
+ } = draggable.props;
1643
+ bounds = typeof bounds === "string" ? bounds : cloneBounds(bounds);
1644
+ const node = findDOMNode(draggable);
1645
+ if (typeof bounds === "string") {
1646
+ const {
1647
+ ownerDocument
1648
+ } = node;
1649
+ const ownerWindow = ownerDocument.defaultView;
1650
+ let boundNode;
1651
+ if (bounds === "parent") {
1652
+ boundNode = node.parentNode;
1653
+ } else {
1654
+ const rootNode = node.getRootNode();
1655
+ boundNode = rootNode.querySelector(bounds);
1656
+ }
1657
+ if (!(boundNode instanceof ownerWindow.HTMLElement)) {
1658
+ throw new Error('Bounds selector "' + bounds + '" could not find an element.');
1659
+ }
1660
+ const boundNodeEl = boundNode;
1661
+ const nodeStyle = ownerWindow.getComputedStyle(node);
1662
+ const boundNodeStyle = ownerWindow.getComputedStyle(boundNodeEl);
1663
+ bounds = {
1664
+ left: -node.offsetLeft + (0, _shims$1.int)(boundNodeStyle.paddingLeft) + (0, _shims$1.int)(nodeStyle.marginLeft),
1665
+ top: -node.offsetTop + (0, _shims$1.int)(boundNodeStyle.paddingTop) + (0, _shims$1.int)(nodeStyle.marginTop),
1666
+ right: (0, _domFns$1.innerWidth)(boundNodeEl) - (0, _domFns$1.outerWidth)(node) - node.offsetLeft + (0, _shims$1.int)(boundNodeStyle.paddingRight) - (0, _shims$1.int)(nodeStyle.marginRight),
1667
+ bottom: (0, _domFns$1.innerHeight)(boundNodeEl) - (0, _domFns$1.outerHeight)(node) - node.offsetTop + (0, _shims$1.int)(boundNodeStyle.paddingBottom) - (0, _shims$1.int)(nodeStyle.marginBottom)
1668
+ };
1669
+ }
1670
+ if ((0, _shims$1.isNum)(bounds.right)) x2 = Math.min(x2, bounds.right);
1671
+ if ((0, _shims$1.isNum)(bounds.bottom)) y = Math.min(y, bounds.bottom);
1672
+ if ((0, _shims$1.isNum)(bounds.left)) x2 = Math.max(x2, bounds.left);
1673
+ if ((0, _shims$1.isNum)(bounds.top)) y = Math.max(y, bounds.top);
1674
+ return [x2, y];
1675
+ }
1676
+ function snapToGrid(grid, pendingX, pendingY) {
1677
+ const x2 = Math.round(pendingX / grid[0]) * grid[0];
1678
+ const y = Math.round(pendingY / grid[1]) * grid[1];
1679
+ return [x2, y];
1680
+ }
1681
+ function canDragX(draggable) {
1682
+ return draggable.props.axis === "both" || draggable.props.axis === "x";
1683
+ }
1684
+ function canDragY(draggable) {
1685
+ return draggable.props.axis === "both" || draggable.props.axis === "y";
1686
+ }
1687
+ function getControlPosition(e2, touchIdentifier, draggableCore) {
1688
+ const touchObj = typeof touchIdentifier === "number" ? (0, _domFns$1.getTouch)(e2, touchIdentifier) : null;
1689
+ if (typeof touchIdentifier === "number" && !touchObj) return null;
1690
+ const node = findDOMNode(draggableCore);
1691
+ const offsetParent = draggableCore.props.offsetParent || node.offsetParent || node.ownerDocument.body;
1692
+ return (0, _domFns$1.offsetXYFromParent)(touchObj || e2, offsetParent, draggableCore.props.scale);
1693
+ }
1694
+ function createCoreData(draggable, x2, y) {
1695
+ const isStart = !(0, _shims$1.isNum)(draggable.lastX);
1696
+ const node = findDOMNode(draggable);
1697
+ if (isStart) {
1698
+ return {
1699
+ node,
1700
+ deltaX: 0,
1701
+ deltaY: 0,
1702
+ lastX: x2,
1703
+ lastY: y,
1704
+ x: x2,
1705
+ y
1706
+ };
1707
+ } else {
1708
+ return {
1709
+ node,
1710
+ deltaX: x2 - draggable.lastX,
1711
+ deltaY: y - draggable.lastY,
1712
+ lastX: draggable.lastX,
1713
+ lastY: draggable.lastY,
1714
+ x: x2,
1715
+ y
1716
+ };
1717
+ }
1718
+ }
1719
+ function createDraggableData(draggable, coreData) {
1720
+ const scale = draggable.props.scale;
1721
+ return {
1722
+ node: coreData.node,
1723
+ x: draggable.state.x + coreData.deltaX / scale,
1724
+ y: draggable.state.y + coreData.deltaY / scale,
1725
+ deltaX: coreData.deltaX / scale,
1726
+ deltaY: coreData.deltaY / scale,
1727
+ lastX: draggable.state.x,
1728
+ lastY: draggable.state.y
1729
+ };
1730
+ }
1731
+ function cloneBounds(bounds) {
1732
+ return {
1733
+ left: bounds.left,
1734
+ top: bounds.top,
1735
+ right: bounds.right,
1736
+ bottom: bounds.bottom
1737
+ };
1738
+ }
1739
+ function findDOMNode(draggable) {
1740
+ const node = draggable.findDOMNode();
1741
+ if (!node) {
1742
+ throw new Error("<DraggableCore>: Unmounted during event!");
1743
+ }
1744
+ return node;
1745
+ }
1746
+ var DraggableCore$2 = {};
1747
+ var log$1 = {};
1748
+ Object.defineProperty(log$1, "__esModule", {
1749
+ value: true
1750
+ });
1751
+ log$1.default = log;
1752
+ function log() {
1753
+ }
1754
+ Object.defineProperty(DraggableCore$2, "__esModule", {
1755
+ value: true
1756
+ });
1757
+ DraggableCore$2.default = void 0;
1758
+ var React = _interopRequireWildcard(require$$2);
1759
+ var _propTypes = _interopRequireDefault(propTypesExports);
1760
+ var _reactDom = _interopRequireDefault(require$$2);
1761
+ var _domFns = domFns;
1762
+ var _positionFns = positionFns;
1763
+ var _shims = shims;
1764
+ var _log = _interopRequireDefault(log$1);
1765
+ function _interopRequireDefault(e2) {
1766
+ return e2 && e2.__esModule ? e2 : { default: e2 };
1767
+ }
1768
+ function _interopRequireWildcard(e2, t) {
1769
+ if ("function" == typeof WeakMap) var r2 = /* @__PURE__ */ new WeakMap(), n = /* @__PURE__ */ new WeakMap();
1770
+ return (_interopRequireWildcard = function(e3, t2) {
1771
+ if (!t2 && e3 && e3.__esModule) return e3;
1772
+ var o, i, f2 = { __proto__: null, default: e3 };
1773
+ if (null === e3 || "object" != typeof e3 && "function" != typeof e3) return f2;
1774
+ if (o = t2 ? n : r2) {
1775
+ if (o.has(e3)) return o.get(e3);
1776
+ o.set(e3, f2);
1777
+ }
1778
+ for (const t3 in e3) "default" !== t3 && {}.hasOwnProperty.call(e3, t3) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e3, t3)) && (i.get || i.set) ? o(f2, t3, i) : f2[t3] = e3[t3]);
1779
+ return f2;
1780
+ })(e2, t);
1781
+ }
1782
+ function _defineProperty(e2, r2, t) {
1783
+ return (r2 = _toPropertyKey(r2)) in e2 ? Object.defineProperty(e2, r2, { value: t, enumerable: true, configurable: true, writable: true }) : e2[r2] = t, e2;
1784
+ }
1785
+ function _toPropertyKey(t) {
1786
+ var i = _toPrimitive(t, "string");
1787
+ return "symbol" == typeof i ? i : i + "";
1788
+ }
1789
+ function _toPrimitive(t, r2) {
1790
+ if ("object" != typeof t || !t) return t;
1791
+ var e2 = t[Symbol.toPrimitive];
1792
+ if (void 0 !== e2) {
1793
+ var i = e2.call(t, r2);
1794
+ if ("object" != typeof i) return i;
1795
+ throw new TypeError("@@toPrimitive must return a primitive value.");
1796
+ }
1797
+ return ("string" === r2 ? String : Number)(t);
1798
+ }
1799
+ const eventsFor = {
1800
+ touch: {
1801
+ start: "touchstart",
1802
+ move: "touchmove",
1803
+ stop: "touchend"
1804
+ },
1805
+ mouse: {
1806
+ start: "mousedown",
1807
+ move: "mousemove",
1808
+ stop: "mouseup"
1809
+ }
1810
+ };
1811
+ let dragEventFor = eventsFor.mouse;
1812
+ let DraggableCore$1 = class DraggableCore extends React.Component {
1813
+ constructor() {
1814
+ super(...arguments);
1815
+ _defineProperty(this, "dragging", false);
1816
+ _defineProperty(this, "lastX", NaN);
1817
+ _defineProperty(this, "lastY", NaN);
1818
+ _defineProperty(this, "touchIdentifier", null);
1819
+ _defineProperty(this, "mounted", false);
1820
+ _defineProperty(this, "handleDragStart", (e2) => {
1821
+ this.props.onMouseDown(e2);
1822
+ if (!this.props.allowAnyClick && typeof e2.button === "number" && e2.button !== 0) return false;
1823
+ const thisNode = this.findDOMNode();
1824
+ if (!thisNode || !thisNode.ownerDocument || !thisNode.ownerDocument.body) {
1825
+ throw new Error("<DraggableCore> not mounted on DragStart!");
1826
+ }
1827
+ const {
1828
+ ownerDocument
1829
+ } = thisNode;
1830
+ if (this.props.disabled || !(e2.target instanceof ownerDocument.defaultView.Node) || this.props.handle && !(0, _domFns.matchesSelectorAndParentsTo)(e2.target, this.props.handle, thisNode) || this.props.cancel && (0, _domFns.matchesSelectorAndParentsTo)(e2.target, this.props.cancel, thisNode)) {
1831
+ return;
1832
+ }
1833
+ if (e2.type === "touchstart" && !this.props.allowMobileScroll) e2.preventDefault();
1834
+ const touchIdentifier = (0, _domFns.getTouchIdentifier)(e2);
1835
+ this.touchIdentifier = touchIdentifier;
1836
+ const position = (0, _positionFns.getControlPosition)(e2, touchIdentifier, this);
1837
+ if (position == null) return;
1838
+ const {
1839
+ x: x2,
1840
+ y
1841
+ } = position;
1842
+ const coreEvent = (0, _positionFns.createCoreData)(this, x2, y);
1843
+ (0, _log.default)("DraggableCore: handleDragStart: %j", coreEvent);
1844
+ (0, _log.default)("calling", this.props.onStart);
1845
+ const shouldUpdate = this.props.onStart(e2, coreEvent);
1846
+ if (shouldUpdate === false || this.mounted === false) return;
1847
+ if (this.props.enableUserSelectHack) (0, _domFns.addUserSelectStyles)(ownerDocument);
1848
+ this.dragging = true;
1849
+ this.lastX = x2;
1850
+ this.lastY = y;
1851
+ (0, _domFns.addEvent)(ownerDocument, dragEventFor.move, this.handleDrag);
1852
+ (0, _domFns.addEvent)(ownerDocument, dragEventFor.stop, this.handleDragStop);
1853
+ });
1854
+ _defineProperty(this, "handleDrag", (e2) => {
1855
+ const position = (0, _positionFns.getControlPosition)(e2, this.touchIdentifier, this);
1856
+ if (position == null) return;
1857
+ let {
1858
+ x: x2,
1859
+ y
1860
+ } = position;
1861
+ if (Array.isArray(this.props.grid)) {
1862
+ let deltaX = x2 - this.lastX, deltaY = y - this.lastY;
1863
+ [deltaX, deltaY] = (0, _positionFns.snapToGrid)(this.props.grid, deltaX, deltaY);
1864
+ if (!deltaX && !deltaY) return;
1865
+ x2 = this.lastX + deltaX, y = this.lastY + deltaY;
1866
+ }
1867
+ const coreEvent = (0, _positionFns.createCoreData)(this, x2, y);
1868
+ (0, _log.default)("DraggableCore: handleDrag: %j", coreEvent);
1869
+ const shouldUpdate = this.props.onDrag(e2, coreEvent);
1870
+ if (shouldUpdate === false || this.mounted === false) {
1871
+ try {
1872
+ this.handleDragStop(new MouseEvent("mouseup"));
1873
+ } catch (err) {
1874
+ const event = document.createEvent("MouseEvents");
1875
+ event.initMouseEvent("mouseup", true, true, window, 0, 0, 0, 0, 0, false, false, false, false, 0, null);
1876
+ this.handleDragStop(event);
1877
+ }
1878
+ return;
1879
+ }
1880
+ this.lastX = x2;
1881
+ this.lastY = y;
1882
+ });
1883
+ _defineProperty(this, "handleDragStop", (e2) => {
1884
+ if (!this.dragging) return;
1885
+ const position = (0, _positionFns.getControlPosition)(e2, this.touchIdentifier, this);
1886
+ if (position == null) return;
1887
+ let {
1888
+ x: x2,
1889
+ y
1890
+ } = position;
1891
+ if (Array.isArray(this.props.grid)) {
1892
+ let deltaX = x2 - this.lastX || 0;
1893
+ let deltaY = y - this.lastY || 0;
1894
+ [deltaX, deltaY] = (0, _positionFns.snapToGrid)(this.props.grid, deltaX, deltaY);
1895
+ x2 = this.lastX + deltaX, y = this.lastY + deltaY;
1896
+ }
1897
+ const coreEvent = (0, _positionFns.createCoreData)(this, x2, y);
1898
+ const shouldContinue = this.props.onStop(e2, coreEvent);
1899
+ if (shouldContinue === false || this.mounted === false) return false;
1900
+ const thisNode = this.findDOMNode();
1901
+ if (thisNode) {
1902
+ if (this.props.enableUserSelectHack) (0, _domFns.scheduleRemoveUserSelectStyles)(thisNode.ownerDocument);
1903
+ }
1904
+ (0, _log.default)("DraggableCore: handleDragStop: %j", coreEvent);
1905
+ this.dragging = false;
1906
+ this.lastX = NaN;
1907
+ this.lastY = NaN;
1908
+ if (thisNode) {
1909
+ (0, _log.default)("DraggableCore: Removing handlers");
1910
+ (0, _domFns.removeEvent)(thisNode.ownerDocument, dragEventFor.move, this.handleDrag);
1911
+ (0, _domFns.removeEvent)(thisNode.ownerDocument, dragEventFor.stop, this.handleDragStop);
1912
+ }
1913
+ });
1914
+ _defineProperty(this, "onMouseDown", (e2) => {
1915
+ dragEventFor = eventsFor.mouse;
1916
+ return this.handleDragStart(e2);
1917
+ });
1918
+ _defineProperty(this, "onMouseUp", (e2) => {
1919
+ dragEventFor = eventsFor.mouse;
1920
+ return this.handleDragStop(e2);
1921
+ });
1922
+ _defineProperty(this, "onTouchStart", (e2) => {
1923
+ dragEventFor = eventsFor.touch;
1924
+ return this.handleDragStart(e2);
1925
+ });
1926
+ _defineProperty(this, "onTouchEnd", (e2) => {
1927
+ dragEventFor = eventsFor.touch;
1928
+ return this.handleDragStop(e2);
1929
+ });
1930
+ }
1931
+ componentDidMount() {
1932
+ this.mounted = true;
1933
+ const thisNode = this.findDOMNode();
1934
+ if (thisNode) {
1935
+ (0, _domFns.addEvent)(thisNode, eventsFor.touch.start, this.onTouchStart, {
1936
+ passive: false
1937
+ });
1938
+ }
1939
+ }
1940
+ componentWillUnmount() {
1941
+ this.mounted = false;
1942
+ const thisNode = this.findDOMNode();
1943
+ if (thisNode) {
1944
+ const {
1945
+ ownerDocument
1946
+ } = thisNode;
1947
+ (0, _domFns.removeEvent)(ownerDocument, eventsFor.mouse.move, this.handleDrag);
1948
+ (0, _domFns.removeEvent)(ownerDocument, eventsFor.touch.move, this.handleDrag);
1949
+ (0, _domFns.removeEvent)(ownerDocument, eventsFor.mouse.stop, this.handleDragStop);
1950
+ (0, _domFns.removeEvent)(ownerDocument, eventsFor.touch.stop, this.handleDragStop);
1951
+ (0, _domFns.removeEvent)(thisNode, eventsFor.touch.start, this.onTouchStart, {
1952
+ passive: false
1953
+ });
1954
+ if (this.props.enableUserSelectHack) (0, _domFns.scheduleRemoveUserSelectStyles)(ownerDocument);
1955
+ }
1956
+ }
1957
+ // React Strict Mode compatibility: if `nodeRef` is passed, we will use it instead of trying to find
1958
+ // the underlying DOM node ourselves. See the README for more information.
1959
+ findDOMNode() {
1960
+ var _a, _b, _c;
1961
+ return ((_a = this.props) == null ? void 0 : _a.nodeRef) ? (_c = (_b = this.props) == null ? void 0 : _b.nodeRef) == null ? void 0 : _c.current : _reactDom.default.findDOMNode(this);
1962
+ }
1963
+ render() {
1964
+ return /* @__PURE__ */ React.cloneElement(React.Children.only(this.props.children), {
1965
+ // Note: mouseMove handler is attached to document so it will still function
1966
+ // when the user drags quickly and leaves the bounds of the element.
1967
+ onMouseDown: this.onMouseDown,
1968
+ onMouseUp: this.onMouseUp,
1969
+ // onTouchStart is added on `componentDidMount` so they can be added with
1970
+ // {passive: false}, which allows it to cancel. See
1971
+ // https://developers.google.com/web/updates/2017/01/scrolling-intervention
1972
+ onTouchEnd: this.onTouchEnd
1973
+ });
1974
+ }
1975
+ };
1976
+ DraggableCore$2.default = DraggableCore$1;
1977
+ _defineProperty(DraggableCore$1, "displayName", "DraggableCore");
1978
+ _defineProperty(DraggableCore$1, "propTypes", {
1979
+ /**
1980
+ * `allowAnyClick` allows dragging using any mouse button.
1981
+ * By default, we only accept the left button.
1982
+ *
1983
+ * Defaults to `false`.
1984
+ */
1985
+ allowAnyClick: _propTypes.default.bool,
1986
+ /**
1987
+ * `allowMobileScroll` turns off cancellation of the 'touchstart' event
1988
+ * on mobile devices. Only enable this if you are having trouble with click
1989
+ * events. Prefer using 'handle' / 'cancel' instead.
1990
+ *
1991
+ * Defaults to `false`.
1992
+ */
1993
+ allowMobileScroll: _propTypes.default.bool,
1994
+ children: _propTypes.default.node.isRequired,
1995
+ /**
1996
+ * `disabled`, if true, stops the <Draggable> from dragging. All handlers,
1997
+ * with the exception of `onMouseDown`, will not fire.
1998
+ */
1999
+ disabled: _propTypes.default.bool,
2000
+ /**
2001
+ * By default, we add 'user-select:none' attributes to the document body
2002
+ * to prevent ugly text selection during drag. If this is causing problems
2003
+ * for your app, set this to `false`.
2004
+ */
2005
+ enableUserSelectHack: _propTypes.default.bool,
2006
+ /**
2007
+ * `offsetParent`, if set, uses the passed DOM node to compute drag offsets
2008
+ * instead of using the parent node.
2009
+ */
2010
+ offsetParent: function(props, propName) {
2011
+ if (props[propName] && props[propName].nodeType !== 1) {
2012
+ throw new Error("Draggable's offsetParent must be a DOM Node.");
2013
+ }
2014
+ },
2015
+ /**
2016
+ * `grid` specifies the x and y that dragging should snap to.
2017
+ */
2018
+ grid: _propTypes.default.arrayOf(_propTypes.default.number),
2019
+ /**
2020
+ * `handle` specifies a selector to be used as the handle that initiates drag.
2021
+ *
2022
+ * Example:
2023
+ *
2024
+ * ```jsx
2025
+ * let App = React.createClass({
2026
+ * render: function () {
2027
+ * return (
2028
+ * <Draggable handle=".handle">
2029
+ * <div>
2030
+ * <div className="handle">Click me to drag</div>
2031
+ * <div>This is some other content</div>
2032
+ * </div>
2033
+ * </Draggable>
2034
+ * );
2035
+ * }
2036
+ * });
2037
+ * ```
2038
+ */
2039
+ handle: _propTypes.default.string,
2040
+ /**
2041
+ * `cancel` specifies a selector to be used to prevent drag initialization.
2042
+ *
2043
+ * Example:
2044
+ *
2045
+ * ```jsx
2046
+ * let App = React.createClass({
2047
+ * render: function () {
2048
+ * return(
2049
+ * <Draggable cancel=".cancel">
2050
+ * <div>
2051
+ * <div className="cancel">You can't drag from here</div>
2052
+ * <div>Dragging here works fine</div>
2053
+ * </div>
2054
+ * </Draggable>
2055
+ * );
2056
+ * }
2057
+ * });
2058
+ * ```
2059
+ */
2060
+ cancel: _propTypes.default.string,
2061
+ /* If running in React Strict mode, ReactDOM.findDOMNode() is deprecated.
2062
+ * Unfortunately, in order for <Draggable> to work properly, we need raw access
2063
+ * to the underlying DOM node. If you want to avoid the warning, pass a `nodeRef`
2064
+ * as in this example:
2065
+ *
2066
+ * function MyComponent() {
2067
+ * const nodeRef = React.useRef(null);
2068
+ * return (
2069
+ * <Draggable nodeRef={nodeRef}>
2070
+ * <div ref={nodeRef}>Example Target</div>
2071
+ * </Draggable>
2072
+ * );
2073
+ * }
2074
+ *
2075
+ * This can be used for arbitrarily nested components, so long as the ref ends up
2076
+ * pointing to the actual child DOM node and not a custom component.
2077
+ */
2078
+ nodeRef: _propTypes.default.object,
2079
+ /**
2080
+ * Called when dragging starts.
2081
+ * If this function returns the boolean false, dragging will be canceled.
2082
+ */
2083
+ onStart: _propTypes.default.func,
2084
+ /**
2085
+ * Called while dragging.
2086
+ * If this function returns the boolean false, dragging will be canceled.
2087
+ */
2088
+ onDrag: _propTypes.default.func,
2089
+ /**
2090
+ * Called when dragging stops.
2091
+ * If this function returns the boolean false, the drag will remain active.
2092
+ */
2093
+ onStop: _propTypes.default.func,
2094
+ /**
2095
+ * A workaround option which can be passed if onMouseDown needs to be accessed,
2096
+ * since it'll always be blocked (as there is internal use of onMouseDown)
2097
+ */
2098
+ onMouseDown: _propTypes.default.func,
2099
+ /**
2100
+ * `scale`, if set, applies scaling while dragging an element
2101
+ */
2102
+ scale: _propTypes.default.number,
2103
+ /**
2104
+ * These properties should be defined on the child, not here.
2105
+ */
2106
+ className: _shims.dontSetMe,
2107
+ style: _shims.dontSetMe,
2108
+ transform: _shims.dontSetMe
2109
+ });
2110
+ _defineProperty(DraggableCore$1, "defaultProps", {
2111
+ allowAnyClick: false,
2112
+ // by default only accept left click
2113
+ allowMobileScroll: false,
2114
+ disabled: false,
2115
+ enableUserSelectHack: true,
2116
+ onStart: function() {
2117
+ },
2118
+ onDrag: function() {
2119
+ },
2120
+ onStop: function() {
2121
+ },
2122
+ onMouseDown: function() {
2123
+ },
2124
+ scale: 1
2125
+ });
2126
+ (function(exports) {
2127
+ Object.defineProperty(exports, "__esModule", {
2128
+ value: true
2129
+ });
2130
+ Object.defineProperty(exports, "DraggableCore", {
2131
+ enumerable: true,
2132
+ get: function() {
2133
+ return _DraggableCore.default;
2134
+ }
2135
+ });
2136
+ exports.default = void 0;
2137
+ var React2 = _interopRequireWildcard2(require$$2);
2138
+ var _propTypes2 = _interopRequireDefault2(propTypesExports);
2139
+ var _reactDom2 = _interopRequireDefault2(require$$2);
2140
+ var _clsx = clsxExports;
2141
+ var _domFns2 = domFns;
2142
+ var _positionFns2 = positionFns;
2143
+ var _shims2 = shims;
2144
+ var _DraggableCore = _interopRequireDefault2(DraggableCore$2);
2145
+ var _log2 = _interopRequireDefault2(log$1);
2146
+ function _interopRequireDefault2(e2) {
2147
+ return e2 && e2.__esModule ? e2 : { default: e2 };
2148
+ }
2149
+ function _interopRequireWildcard2(e2, t) {
2150
+ if ("function" == typeof WeakMap) var r2 = /* @__PURE__ */ new WeakMap(), n = /* @__PURE__ */ new WeakMap();
2151
+ return (_interopRequireWildcard2 = function(e3, t2) {
2152
+ if (!t2 && e3 && e3.__esModule) return e3;
2153
+ var o, i, f2 = { __proto__: null, default: e3 };
2154
+ if (null === e3 || "object" != typeof e3 && "function" != typeof e3) return f2;
2155
+ if (o = t2 ? n : r2) {
2156
+ if (o.has(e3)) return o.get(e3);
2157
+ o.set(e3, f2);
2158
+ }
2159
+ for (const t3 in e3) "default" !== t3 && {}.hasOwnProperty.call(e3, t3) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e3, t3)) && (i.get || i.set) ? o(f2, t3, i) : f2[t3] = e3[t3]);
2160
+ return f2;
2161
+ })(e2, t);
2162
+ }
2163
+ function _extends() {
2164
+ return _extends = Object.assign ? Object.assign.bind() : function(n) {
2165
+ for (var e2 = 1; e2 < arguments.length; e2++) {
2166
+ var t = arguments[e2];
2167
+ for (var r2 in t) ({}).hasOwnProperty.call(t, r2) && (n[r2] = t[r2]);
2168
+ }
2169
+ return n;
2170
+ }, _extends.apply(null, arguments);
2171
+ }
2172
+ function _defineProperty2(e2, r2, t) {
2173
+ return (r2 = _toPropertyKey2(r2)) in e2 ? Object.defineProperty(e2, r2, { value: t, enumerable: true, configurable: true, writable: true }) : e2[r2] = t, e2;
2174
+ }
2175
+ function _toPropertyKey2(t) {
2176
+ var i = _toPrimitive2(t, "string");
2177
+ return "symbol" == typeof i ? i : i + "";
2178
+ }
2179
+ function _toPrimitive2(t, r2) {
2180
+ if ("object" != typeof t || !t) return t;
2181
+ var e2 = t[Symbol.toPrimitive];
2182
+ if (void 0 !== e2) {
2183
+ var i = e2.call(t, r2);
2184
+ if ("object" != typeof i) return i;
2185
+ throw new TypeError("@@toPrimitive must return a primitive value.");
2186
+ }
2187
+ return ("string" === r2 ? String : Number)(t);
2188
+ }
2189
+ class Draggable2 extends React2.Component {
2190
+ // React 16.3+
2191
+ // Arity (props, state)
2192
+ static getDerivedStateFromProps(_ref, _ref2) {
2193
+ let {
2194
+ position
2195
+ } = _ref;
2196
+ let {
2197
+ prevPropsPosition
2198
+ } = _ref2;
2199
+ if (position && (!prevPropsPosition || position.x !== prevPropsPosition.x || position.y !== prevPropsPosition.y)) {
2200
+ (0, _log2.default)("Draggable: getDerivedStateFromProps %j", {
2201
+ position,
2202
+ prevPropsPosition
2203
+ });
2204
+ return {
2205
+ x: position.x,
2206
+ y: position.y,
2207
+ prevPropsPosition: {
2208
+ ...position
2209
+ }
2210
+ };
2211
+ }
2212
+ return null;
2213
+ }
2214
+ constructor(props) {
2215
+ super(props);
2216
+ _defineProperty2(this, "onDragStart", (e2, coreData) => {
2217
+ (0, _log2.default)("Draggable: onDragStart: %j", coreData);
2218
+ const shouldStart = this.props.onStart(e2, (0, _positionFns2.createDraggableData)(this, coreData));
2219
+ if (shouldStart === false) return false;
2220
+ this.setState({
2221
+ dragging: true,
2222
+ dragged: true
2223
+ });
2224
+ });
2225
+ _defineProperty2(this, "onDrag", (e2, coreData) => {
2226
+ if (!this.state.dragging) return false;
2227
+ (0, _log2.default)("Draggable: onDrag: %j", coreData);
2228
+ const uiData = (0, _positionFns2.createDraggableData)(this, coreData);
2229
+ const newState = {
2230
+ x: uiData.x,
2231
+ y: uiData.y,
2232
+ slackX: 0,
2233
+ slackY: 0
2234
+ };
2235
+ if (this.props.bounds) {
2236
+ const {
2237
+ x: x2,
2238
+ y
2239
+ } = newState;
2240
+ newState.x += this.state.slackX;
2241
+ newState.y += this.state.slackY;
2242
+ const [newStateX, newStateY] = (0, _positionFns2.getBoundPosition)(this, newState.x, newState.y);
2243
+ newState.x = newStateX;
2244
+ newState.y = newStateY;
2245
+ newState.slackX = this.state.slackX + (x2 - newState.x);
2246
+ newState.slackY = this.state.slackY + (y - newState.y);
2247
+ uiData.x = newState.x;
2248
+ uiData.y = newState.y;
2249
+ uiData.deltaX = newState.x - this.state.x;
2250
+ uiData.deltaY = newState.y - this.state.y;
2251
+ }
2252
+ const shouldUpdate = this.props.onDrag(e2, uiData);
2253
+ if (shouldUpdate === false) return false;
2254
+ this.setState(newState);
2255
+ });
2256
+ _defineProperty2(this, "onDragStop", (e2, coreData) => {
2257
+ if (!this.state.dragging) return false;
2258
+ const shouldContinue = this.props.onStop(e2, (0, _positionFns2.createDraggableData)(this, coreData));
2259
+ if (shouldContinue === false) return false;
2260
+ (0, _log2.default)("Draggable: onDragStop: %j", coreData);
2261
+ const newState = {
2262
+ dragging: false,
2263
+ slackX: 0,
2264
+ slackY: 0
2265
+ };
2266
+ const controlled = Boolean(this.props.position);
2267
+ if (controlled) {
2268
+ const {
2269
+ x: x2,
2270
+ y
2271
+ } = this.props.position;
2272
+ newState.x = x2;
2273
+ newState.y = y;
2274
+ }
2275
+ this.setState(newState);
2276
+ });
2277
+ this.state = {
2278
+ // Whether or not we are currently dragging.
2279
+ dragging: false,
2280
+ // Whether or not we have been dragged before.
2281
+ dragged: false,
2282
+ // Current transform x and y.
2283
+ x: props.position ? props.position.x : props.defaultPosition.x,
2284
+ y: props.position ? props.position.y : props.defaultPosition.y,
2285
+ prevPropsPosition: {
2286
+ ...props.position
2287
+ },
2288
+ // Used for compensating for out-of-bounds drags
2289
+ slackX: 0,
2290
+ slackY: 0,
2291
+ // Can only determine if SVG after mounting
2292
+ isElementSVG: false
2293
+ };
2294
+ if (props.position && !(props.onDrag || props.onStop)) {
2295
+ console.warn("A `position` was applied to this <Draggable>, without drag handlers. This will make this component effectively undraggable. Please attach `onDrag` or `onStop` handlers so you can adjust the `position` of this element.");
2296
+ }
2297
+ }
2298
+ componentDidMount() {
2299
+ if (typeof window.SVGElement !== "undefined" && this.findDOMNode() instanceof window.SVGElement) {
2300
+ this.setState({
2301
+ isElementSVG: true
2302
+ });
2303
+ }
2304
+ }
2305
+ componentWillUnmount() {
2306
+ if (this.state.dragging) {
2307
+ this.setState({
2308
+ dragging: false
2309
+ });
2310
+ }
2311
+ }
2312
+ // React Strict Mode compatibility: if `nodeRef` is passed, we will use it instead of trying to find
2313
+ // the underlying DOM node ourselves. See the README for more information.
2314
+ findDOMNode() {
2315
+ var _a, _b;
2316
+ return ((_b = (_a = this.props) == null ? void 0 : _a.nodeRef) == null ? void 0 : _b.current) ?? _reactDom2.default.findDOMNode(this);
2317
+ }
2318
+ render() {
2319
+ const {
2320
+ axis,
2321
+ bounds,
2322
+ children,
2323
+ defaultPosition,
2324
+ defaultClassName,
2325
+ defaultClassNameDragging,
2326
+ defaultClassNameDragged,
2327
+ position,
2328
+ positionOffset,
2329
+ scale,
2330
+ ...draggableCoreProps
2331
+ } = this.props;
2332
+ let style = {};
2333
+ let svgTransform = null;
2334
+ const controlled = Boolean(position);
2335
+ const draggable = !controlled || this.state.dragging;
2336
+ const validPosition = position || defaultPosition;
2337
+ const transformOpts = {
2338
+ // Set left if horizontal drag is enabled
2339
+ x: (0, _positionFns2.canDragX)(this) && draggable ? this.state.x : validPosition.x,
2340
+ // Set top if vertical drag is enabled
2341
+ y: (0, _positionFns2.canDragY)(this) && draggable ? this.state.y : validPosition.y
2342
+ };
2343
+ if (this.state.isElementSVG) {
2344
+ svgTransform = (0, _domFns2.createSVGTransform)(transformOpts, positionOffset);
2345
+ } else {
2346
+ style = (0, _domFns2.createCSSTransform)(transformOpts, positionOffset);
2347
+ }
2348
+ const className = (0, _clsx.clsx)(children.props.className || "", defaultClassName, {
2349
+ [defaultClassNameDragging]: this.state.dragging,
2350
+ [defaultClassNameDragged]: this.state.dragged
2351
+ });
2352
+ return /* @__PURE__ */ React2.createElement(_DraggableCore.default, _extends({}, draggableCoreProps, {
2353
+ onStart: this.onDragStart,
2354
+ onDrag: this.onDrag,
2355
+ onStop: this.onDragStop
2356
+ }), /* @__PURE__ */ React2.cloneElement(React2.Children.only(children), {
2357
+ className,
2358
+ style: {
2359
+ ...children.props.style,
2360
+ ...style
2361
+ },
2362
+ transform: svgTransform
2363
+ }));
2364
+ }
2365
+ }
2366
+ exports.default = Draggable2;
2367
+ _defineProperty2(Draggable2, "displayName", "Draggable");
2368
+ _defineProperty2(Draggable2, "propTypes", {
2369
+ // Accepts all props <DraggableCore> accepts.
2370
+ ..._DraggableCore.default.propTypes,
2371
+ /**
2372
+ * `axis` determines which axis the draggable can move.
2373
+ *
2374
+ * Note that all callbacks will still return data as normal. This only
2375
+ * controls flushing to the DOM.
2376
+ *
2377
+ * 'both' allows movement horizontally and vertically.
2378
+ * 'x' limits movement to horizontal axis.
2379
+ * 'y' limits movement to vertical axis.
2380
+ * 'none' limits all movement.
2381
+ *
2382
+ * Defaults to 'both'.
2383
+ */
2384
+ axis: _propTypes2.default.oneOf(["both", "x", "y", "none"]),
2385
+ /**
2386
+ * `bounds` determines the range of movement available to the element.
2387
+ * Available values are:
2388
+ *
2389
+ * 'parent' restricts movement within the Draggable's parent node.
2390
+ *
2391
+ * Alternatively, pass an object with the following properties, all of which are optional:
2392
+ *
2393
+ * {left: LEFT_BOUND, right: RIGHT_BOUND, bottom: BOTTOM_BOUND, top: TOP_BOUND}
2394
+ *
2395
+ * All values are in px.
2396
+ *
2397
+ * Example:
2398
+ *
2399
+ * ```jsx
2400
+ * let App = React.createClass({
2401
+ * render: function () {
2402
+ * return (
2403
+ * <Draggable bounds={{right: 300, bottom: 300}}>
2404
+ * <div>Content</div>
2405
+ * </Draggable>
2406
+ * );
2407
+ * }
2408
+ * });
2409
+ * ```
2410
+ */
2411
+ bounds: _propTypes2.default.oneOfType([_propTypes2.default.shape({
2412
+ left: _propTypes2.default.number,
2413
+ right: _propTypes2.default.number,
2414
+ top: _propTypes2.default.number,
2415
+ bottom: _propTypes2.default.number
2416
+ }), _propTypes2.default.string, _propTypes2.default.oneOf([false])]),
2417
+ defaultClassName: _propTypes2.default.string,
2418
+ defaultClassNameDragging: _propTypes2.default.string,
2419
+ defaultClassNameDragged: _propTypes2.default.string,
2420
+ /**
2421
+ * `defaultPosition` specifies the x and y that the dragged item should start at
2422
+ *
2423
+ * Example:
2424
+ *
2425
+ * ```jsx
2426
+ * let App = React.createClass({
2427
+ * render: function () {
2428
+ * return (
2429
+ * <Draggable defaultPosition={{x: 25, y: 25}}>
2430
+ * <div>I start with transformX: 25px and transformY: 25px;</div>
2431
+ * </Draggable>
2432
+ * );
2433
+ * }
2434
+ * });
2435
+ * ```
2436
+ */
2437
+ defaultPosition: _propTypes2.default.shape({
2438
+ x: _propTypes2.default.number,
2439
+ y: _propTypes2.default.number
2440
+ }),
2441
+ positionOffset: _propTypes2.default.shape({
2442
+ x: _propTypes2.default.oneOfType([_propTypes2.default.number, _propTypes2.default.string]),
2443
+ y: _propTypes2.default.oneOfType([_propTypes2.default.number, _propTypes2.default.string])
2444
+ }),
2445
+ /**
2446
+ * `position`, if present, defines the current position of the element.
2447
+ *
2448
+ * This is similar to how form elements in React work - if no `position` is supplied, the component
2449
+ * is uncontrolled.
2450
+ *
2451
+ * Example:
2452
+ *
2453
+ * ```jsx
2454
+ * let App = React.createClass({
2455
+ * render: function () {
2456
+ * return (
2457
+ * <Draggable position={{x: 25, y: 25}}>
2458
+ * <div>I start with transformX: 25px and transformY: 25px;</div>
2459
+ * </Draggable>
2460
+ * );
2461
+ * }
2462
+ * });
2463
+ * ```
2464
+ */
2465
+ position: _propTypes2.default.shape({
2466
+ x: _propTypes2.default.number,
2467
+ y: _propTypes2.default.number
2468
+ }),
2469
+ /**
2470
+ * These properties should be defined on the child, not here.
2471
+ */
2472
+ className: _shims2.dontSetMe,
2473
+ style: _shims2.dontSetMe,
2474
+ transform: _shims2.dontSetMe
2475
+ });
2476
+ _defineProperty2(Draggable2, "defaultProps", {
2477
+ ..._DraggableCore.default.defaultProps,
2478
+ axis: "both",
2479
+ bounds: false,
2480
+ defaultClassName: "react-draggable",
2481
+ defaultClassNameDragging: "react-draggable-dragging",
2482
+ defaultClassNameDragged: "react-draggable-dragged",
2483
+ defaultPosition: {
2484
+ x: 0,
2485
+ y: 0
2486
+ },
2487
+ scale: 1
2488
+ });
2489
+ })(Draggable$2);
2490
+ const {
2491
+ default: Draggable,
2492
+ DraggableCore: DraggableCore2
2493
+ } = Draggable$2;
2494
+ cjs.exports = Draggable;
2495
+ cjs.exports.default = Draggable;
2496
+ cjs.exports.DraggableCore = DraggableCore2;
2497
+ var cjsExports = cjs.exports;
2498
+ const Draggable$1 = /* @__PURE__ */ getDefaultExportFromCjs(cjsExports);
2499
+ function FloatingButton({ onClick, isActive, logCount = 0 }) {
2500
+ const widgetWidth = 112;
2501
+ const widgetHeight = 185;
2502
+ const positionPresets = {
2503
+ "top-left": { x: 20, y: 20 },
2504
+ "top-center": { x: window.innerWidth / 2 - widgetWidth / 2, y: 20 },
2505
+ "top-right": { x: window.innerWidth - widgetWidth - 20, y: 20 },
2506
+ "middle-left": { x: 20, y: window.innerHeight / 2 - widgetHeight / 2 },
2507
+ "middle-right": { x: window.innerWidth - widgetWidth - 20, y: window.innerHeight / 2 - widgetHeight / 2 },
2508
+ "bottom-left": { x: 20, y: window.innerHeight - widgetHeight - 20 },
2509
+ "bottom-center": { x: window.innerWidth / 2 - widgetWidth / 2, y: window.innerHeight - widgetHeight - 20 },
2510
+ "bottom-right": { x: window.innerWidth - widgetWidth - 20, y: window.innerHeight - widgetHeight - 20 }
2511
+ };
2512
+ const buttonConfig = [
2513
+ // Top row
2514
+ { id: "top-left", emoji: "↖", title: "Top Left" },
2515
+ { id: "top-center", emoji: "↑", title: "Top Center" },
2516
+ { id: "top-right", emoji: "↗", title: "Top Right" },
2517
+ // Middle row
2518
+ { id: "middle-left", emoji: "←", title: "Middle Left" },
2519
+ { id: "toggle", emoji: "🔧", title: "Toggle DevTools Panel", isToggle: true },
2520
+ { id: "middle-right", emoji: "→", title: "Middle Right" },
2521
+ // Bottom row
2522
+ { id: "bottom-left", emoji: "↙", title: "Bottom Left" },
2523
+ { id: "bottom-center", emoji: "↓", title: "Bottom Center" },
2524
+ { id: "bottom-right", emoji: "↘", title: "Bottom Right" }
2525
+ ];
2526
+ const [position, setPosition] = useState(positionPresets["bottom-right"]);
2527
+ const snapToPosition = (presetName) => {
2528
+ setPosition(positionPresets[presetName]);
2529
+ };
2530
+ const handleDragStop = (e2, data) => {
2531
+ setPosition({ x: data.x, y: data.y });
2532
+ };
2533
+ const renderButton = (config) => {
2534
+ const baseStyle = {
2535
+ cursor: "pointer",
2536
+ fontSize: "24px",
2537
+ width: "28px",
2538
+ height: "28px",
2539
+ display: "flex",
2540
+ alignItems: "center",
2541
+ justifyContent: "center",
2542
+ transition: "opacity 0.2s, transform 0.1s",
2543
+ pointerEvents: "auto",
2544
+ userSelect: "none",
2545
+ fontVariantEmoji: "text",
2546
+ textRendering: "optimizeLegibility",
2547
+ WebkitFontSmoothing: "antialiased",
2548
+ MozOsxFontSmoothing: "grayscale",
2549
+ color: "white",
2550
+ fontWeight: "bold"
2551
+ };
2552
+ if (config.isToggle) {
2553
+ return /* @__PURE__ */ u(
2554
+ "div",
2555
+ {
2556
+ onClick,
2557
+ title: config.title,
2558
+ role: "button",
2559
+ tabIndex: 0,
2560
+ style: {
2561
+ ...baseStyle,
2562
+ opacity: isActive ? 1 : 0.7
2563
+ },
2564
+ onMouseEnter: (e2) => {
2565
+ e2.currentTarget.style.opacity = "1";
2566
+ e2.currentTarget.style.transform = "scale(1.2)";
2567
+ },
2568
+ onMouseLeave: (e2) => {
2569
+ e2.currentTarget.style.opacity = isActive ? "1" : "0.7";
2570
+ e2.currentTarget.style.transform = "scale(1)";
2571
+ },
2572
+ children: config.emoji
2573
+ },
2574
+ config.id
2575
+ );
2576
+ }
2577
+ return /* @__PURE__ */ u(
2578
+ "div",
2579
+ {
2580
+ onClick: () => snapToPosition(config.id),
2581
+ title: config.title,
2582
+ role: "button",
2583
+ tabIndex: 0,
2584
+ style: {
2585
+ ...baseStyle,
2586
+ opacity: 0.6
2587
+ },
2588
+ onMouseEnter: (e2) => {
2589
+ e2.currentTarget.style.opacity = "1";
2590
+ e2.currentTarget.style.transform = "scale(1.2)";
2591
+ },
2592
+ onMouseLeave: (e2) => {
2593
+ e2.currentTarget.style.opacity = "0.6";
2594
+ e2.currentTarget.style.transform = "scale(1)";
2595
+ },
2596
+ children: config.emoji
2597
+ },
2598
+ config.id
2599
+ );
2600
+ };
2601
+ return /* @__PURE__ */ u(
2602
+ Draggable$1,
2603
+ {
2604
+ position,
2605
+ onStop: handleDragStop,
2606
+ handle: ".drag-handle",
2607
+ children: /* @__PURE__ */ u(
2608
+ Pane,
2609
+ {
2610
+ position: "fixed",
2611
+ width: "fit-content",
2612
+ background: "#1a202c",
2613
+ borderRadius: 8,
2614
+ boxShadow: "0 4px 12px rgba(0,0,0,0.4)",
2615
+ border: "1px solid #4a5568",
2616
+ zIndex: 999999,
2617
+ style: { cursor: "default", pointerEvents: "auto" },
2618
+ children: [
2619
+ /* @__PURE__ */ u(
2620
+ Pane,
2621
+ {
2622
+ className: "drag-handle",
2623
+ cursor: "grab",
2624
+ padding: 6,
2625
+ textAlign: "center",
2626
+ borderBottom: "1px solid #4a5568",
2627
+ background: "#0d1f28",
2628
+ borderTopLeftRadius: 8,
2629
+ borderTopRightRadius: 8,
2630
+ userSelect: "none",
2631
+ style: {
2632
+ transition: "background 0.2s"
2633
+ },
2634
+ onMouseEnter: (e2) => {
2635
+ e2.currentTarget.style.background = "#1a3d4d";
2636
+ },
2637
+ onMouseLeave: (e2) => {
2638
+ e2.currentTarget.style.background = "#0d1f28";
2639
+ },
2640
+ children: /* @__PURE__ */ u(Text, { size: 300, color: "#718096", fontWeight: 600, children: "⋮⋮ drag ⋮⋮" })
2641
+ }
2642
+ ),
2643
+ /* @__PURE__ */ u(
2644
+ Pane,
2645
+ {
2646
+ display: "grid",
2647
+ gridTemplateColumns: "28px 28px 28px",
2648
+ gridTemplateRows: "28px 28px 28px",
2649
+ gap: 6,
2650
+ padding: 8,
2651
+ background: "#0d1f28",
2652
+ style: { pointerEvents: "auto" },
2653
+ children: buttonConfig.map(renderButton)
2654
+ }
2655
+ ),
2656
+ /* @__PURE__ */ u(
2657
+ Pane,
2658
+ {
2659
+ padding: 6,
2660
+ textAlign: "center",
2661
+ borderTop: "1px solid #4a5568",
2662
+ background: logCount > 0 ? "#2d3748" : "#0d1f28",
2663
+ borderBottomLeftRadius: 8,
2664
+ borderBottomRightRadius: 8,
2665
+ children: /* @__PURE__ */ u(
2666
+ Text,
2667
+ {
2668
+ size: 300,
2669
+ color: logCount > 0 ? "#48bb78" : "#a0aec0",
2670
+ fontWeight: logCount > 0 ? 600 : 400,
2671
+ children: [
2672
+ "# of logs: ",
2673
+ logCount
2674
+ ]
2675
+ }
2676
+ )
2677
+ }
2678
+ )
2679
+ ]
2680
+ }
2681
+ )
2682
+ }
2683
+ );
2684
+ }
2685
+ const LOG_LEVELS = [
2686
+ { value: 0, name: "SILENT", emoji: "🔇", color: "#718096" },
2687
+ { value: 1, name: "ERROR", emoji: "🚨", color: "#E53E3E" },
2688
+ { value: 2, name: "WARN", emoji: "⚠️", color: "#DD6B20" },
2689
+ { value: 3, name: "INFO", emoji: "✨", color: "#3182CE" },
2690
+ { value: 4, name: "DEBUG", emoji: "🐛", color: "#805AD5" },
2691
+ { value: 5, name: "TRACE", emoji: "🔍", color: "#38A169" }
2692
+ ];
2693
+ const levelNameToValue = {
2694
+ "silent": 0,
2695
+ "error": 1,
2696
+ "warn": 2,
2697
+ "info": 3,
2698
+ "debug": 4,
2699
+ "trace": 5
2700
+ };
2701
+ const levelValueToName = {
2702
+ 0: "silent",
2703
+ 1: "error",
2704
+ 2: "warn",
2705
+ 3: "info",
2706
+ 4: "debug",
2707
+ 5: "trace"
2708
+ };
2709
+ function ComponentFilters({ components, loggerControls, onLevelChange }) {
2710
+ const [componentLevels, setComponentLevels] = useState({});
2711
+ useEffect(() => {
2712
+ const levels = {};
2713
+ components.forEach((name) => {
2714
+ var _a;
2715
+ const level = ((_a = loggerControls.getLevel) == null ? void 0 : _a.call(loggerControls, name)) || "info";
2716
+ levels[name] = levelNameToValue[level] ?? 3;
2717
+ });
2718
+ setComponentLevels(levels);
2719
+ }, [components, loggerControls]);
2720
+ const handleLevelChange = (componentName, sliderValue) => {
2721
+ const newLevel = levelValueToName[sliderValue];
2722
+ setComponentLevels((prev) => ({
2723
+ ...prev,
2724
+ [componentName]: sliderValue
2725
+ }));
2726
+ onLevelChange == null ? void 0 : onLevelChange(componentName, newLevel);
2727
+ };
2728
+ if (components.length === 0) {
2729
+ return /* @__PURE__ */ u(Pane, { marginBottom: 24, children: [
2730
+ /* @__PURE__ */ u(
2731
+ Heading,
2732
+ {
2733
+ size: 500,
2734
+ marginBottom: 12,
2735
+ color: "muted",
2736
+ borderBottom: "1px solid",
2737
+ borderColor: "border.muted",
2738
+ paddingBottom: 8,
2739
+ children: "📦 Components"
2740
+ }
2741
+ ),
2742
+ /* @__PURE__ */ u(Text, { color: "muted", fontStyle: "italic", children: "No components detected" })
2743
+ ] });
2744
+ }
2745
+ return /* @__PURE__ */ u(Pane, { marginBottom: 16, children: components.map((componentName) => {
2746
+ const currentLevel = componentLevels[componentName] ?? 3;
2747
+ const levelConfig = LOG_LEVELS[currentLevel];
2748
+ return /* @__PURE__ */ u(
2749
+ Pane,
2750
+ {
2751
+ paddingY: 16,
2752
+ paddingX: 16,
2753
+ marginY: 8,
2754
+ background: "#2d3748",
2755
+ borderRadius: 8,
2756
+ border: "1px solid #3a4553",
2757
+ transition: "all 0.2s",
2758
+ children: [
2759
+ /* @__PURE__ */ u(
2760
+ Pane,
2761
+ {
2762
+ display: "flex",
2763
+ alignItems: "center",
2764
+ justifyContent: "space-between",
2765
+ marginBottom: 12,
2766
+ border: "none",
2767
+ borderWidth: 0,
2768
+ outline: "none",
2769
+ boxShadow: "none",
2770
+ children: [
2771
+ /* @__PURE__ */ u(Text, { size: 400, color: "#e2e8f0", fontWeight: "600", children: componentName }),
2772
+ /* @__PURE__ */ u(
2773
+ Pane,
2774
+ {
2775
+ display: "flex",
2776
+ alignItems: "center",
2777
+ gap: 8,
2778
+ border: "none",
2779
+ borderWidth: 0,
2780
+ outline: "none",
2781
+ boxShadow: "none",
2782
+ children: [
2783
+ /* @__PURE__ */ u(Text, { fontSize: "14px", color: levelConfig.color, children: levelConfig.emoji }),
2784
+ /* @__PURE__ */ u(
2785
+ Pane,
2786
+ {
2787
+ paddingX: 8,
2788
+ paddingY: 4,
2789
+ backgroundColor: levelConfig.color,
2790
+ borderRadius: 12,
2791
+ border: "none",
2792
+ borderWidth: 0,
2793
+ outline: "none",
2794
+ boxShadow: "none",
2795
+ children: /* @__PURE__ */ u(
2796
+ Text,
2797
+ {
2798
+ fontSize: "11px",
2799
+ fontWeight: "600",
2800
+ color: "white",
2801
+ children: levelConfig.name
2802
+ }
2803
+ )
2804
+ }
2805
+ )
2806
+ ]
2807
+ }
2808
+ )
2809
+ ]
2810
+ }
2811
+ ),
2812
+ /* @__PURE__ */ u(Pane, { display: "flex", marginBottom: 12, borderRadius: 6, overflow: "hidden", children: LOG_LEVELS.map((level, index) => /* @__PURE__ */ u(
2813
+ Button,
2814
+ {
2815
+ appearance: "minimal",
2816
+ size: "small",
2817
+ height: 32,
2818
+ flex: 1,
2819
+ borderRadius: 0,
2820
+ border: "none",
2821
+ background: currentLevel === index ? level.color : "transparent",
2822
+ color: currentLevel === index ? "white" : level.color,
2823
+ onClick: () => handleLevelChange(componentName, level.value),
2824
+ title: `Set to ${level.name}`,
2825
+ style: {
2826
+ transition: "all 0.2s ease",
2827
+ fontWeight: currentLevel === index ? "600" : "400"
2828
+ },
2829
+ children: level.emoji
2830
+ },
2831
+ level.value
2832
+ )) }),
2833
+ /* @__PURE__ */ u(Pane, { display: "flex", justifyContent: "space-between", paddingX: 4, children: LOG_LEVELS.map((level, index) => /* @__PURE__ */ u(
2834
+ Text,
2835
+ {
2836
+ fontSize: "9px",
2837
+ color: currentLevel === index ? level.color : "#718096",
2838
+ fontWeight: currentLevel === index ? "600" : "400",
2839
+ textAlign: "center",
2840
+ width: `${100 / 6}%`,
2841
+ children: level.name
2842
+ },
2843
+ level.value
2844
+ )) })
2845
+ ]
2846
+ },
2847
+ componentName
2848
+ );
2849
+ }) });
2850
+ }
2851
+ function GlobalControls({ onDebugAll, onTraceAll, onReset, loggerControls }) {
2852
+ var _a, _b;
2853
+ const stats = ((_a = loggerControls.getStats) == null ? void 0 : _a.call(loggerControls)) || { total: 0, byLevel: {} };
2854
+ const configSummary = ((_b = loggerControls.getConfigSummary) == null ? void 0 : _b.call(loggerControls)) || {};
2855
+ return /* @__PURE__ */ u(Pane, { marginBottom: 16, children: [
2856
+ /* @__PURE__ */ u(Pane, { display: "flex", gap: 8, marginBottom: 16, flexWrap: "wrap", children: [
2857
+ /* @__PURE__ */ u(
2858
+ Button,
2859
+ {
2860
+ appearance: "primary",
2861
+ intent: "success",
2862
+ size: "medium",
2863
+ flex: "1",
2864
+ minWidth: 100,
2865
+ onClick: onDebugAll,
2866
+ title: "Enable debug level for all components",
2867
+ children: "🐛 Debug All"
2868
+ }
2869
+ ),
2870
+ /* @__PURE__ */ u(
2871
+ Button,
2872
+ {
2873
+ appearance: "primary",
2874
+ intent: "warning",
2875
+ size: "medium",
2876
+ flex: "1",
2877
+ minWidth: 100,
2878
+ onClick: onTraceAll,
2879
+ title: "Enable trace level for all components",
2880
+ children: "🔍 Trace All"
2881
+ }
2882
+ )
2883
+ ] }),
2884
+ /* @__PURE__ */ u(Pane, { display: "flex", gap: 8, marginBottom: 16, flexWrap: "wrap", children: [
2885
+ /* @__PURE__ */ u(
2886
+ Button,
2887
+ {
2888
+ intent: "danger",
2889
+ size: "small",
2890
+ flex: "1",
2891
+ minWidth: 80,
2892
+ onClick: onReset,
2893
+ title: "Reset all settings to defaults",
2894
+ children: "Reset All"
2895
+ }
2896
+ ),
2897
+ /* @__PURE__ */ u(
2898
+ Button,
2899
+ {
2900
+ appearance: "default",
2901
+ size: "small",
2902
+ flex: "1",
2903
+ minWidth: 80,
2904
+ onClick: () => {
2905
+ var _a2;
2906
+ const summary = (_a2 = loggerControls.getConfigSummary) == null ? void 0 : _a2.call(loggerControls);
2907
+ console.log("[JSG-DEVTOOLS] Current Config:", summary);
2908
+ alert("Config exported to console");
2909
+ },
2910
+ title: "Export current configuration to console",
2911
+ children: "Export Config"
2912
+ }
2913
+ )
2914
+ ] }),
2915
+ /* @__PURE__ */ u(
2916
+ Pane,
2917
+ {
2918
+ background: "#2d3748",
2919
+ paddingX: 12,
2920
+ paddingY: 8,
2921
+ borderRadius: 6,
2922
+ marginTop: 12,
2923
+ border: "1px solid #4a5568",
2924
+ children: [
2925
+ /* @__PURE__ */ u(Pane, { display: "flex", justifyContent: "space-between", alignItems: "center", paddingY: 2, children: [
2926
+ /* @__PURE__ */ u(Text, { size: 300, color: "#a0aec0", children: "📊 Total Logs:" }),
2927
+ /* @__PURE__ */ u(Text, { size: 300, color: "#ffffff", fontWeight: "600", children: stats.total.toString() })
2928
+ ] }),
2929
+ stats.byLevel && Object.keys(stats.byLevel).length > 0 && /* @__PURE__ */ u(Pane, { display: "flex", justifyContent: "space-between", alignItems: "center", paddingY: 2, children: [
2930
+ /* @__PURE__ */ u(Text, { size: 300, color: "#a0aec0", children: "📈 By Level:" }),
2931
+ /* @__PURE__ */ u(Text, { size: 300, color: "#e2e8f0", fontFamily: "mono", children: Object.entries(stats.byLevel).map(([level, count]) => `${level}:${count}`).join(" ") })
2932
+ ] }),
2933
+ configSummary.environment && /* @__PURE__ */ u(Pane, { display: "flex", justifyContent: "space-between", alignItems: "center", paddingY: 2, children: [
2934
+ /* @__PURE__ */ u(Text, { size: 300, color: "#a0aec0", children: "🌍 Environment:" }),
2935
+ /* @__PURE__ */ u(Text, { size: 300, color: "#ffffff", fontWeight: "600", children: configSummary.environment })
2936
+ ] }),
2937
+ configSummary.fileOverrides && /* @__PURE__ */ u(Pane, { display: "flex", justifyContent: "space-between", alignItems: "center", paddingY: 2, children: [
2938
+ /* @__PURE__ */ u(Text, { size: 300, color: "#a0aec0", children: "📁 File Overrides:" }),
2939
+ /* @__PURE__ */ u(
2940
+ Text,
2941
+ {
2942
+ size: 300,
2943
+ color: "#ffffff",
2944
+ fontWeight: "600",
2945
+ children: configSummary.fileOverrides.toString()
2946
+ }
2947
+ )
2948
+ ] })
2949
+ ]
2950
+ }
2951
+ )
2952
+ ] });
2953
+ }
2954
+ function LogPreview({ displayOptions, timestampMode }) {
2955
+ const previewStyle = {
2956
+ fontFamily: 'Monaco, Consolas, "Courier New", monospace',
2957
+ fontSize: "12px",
2958
+ lineHeight: "1.6",
2959
+ whiteSpace: "pre-wrap",
2960
+ color: "#e2e8f0"
2961
+ };
2962
+ const timestampStyle = { color: "#a0aec0" };
2963
+ const emojiStyle = { marginRight: "6px" };
2964
+ const levelStyle = { color: "#f6ad55", fontWeight: "600" };
2965
+ const componentStyle = { color: "#4299e1", fontWeight: "600" };
2966
+ const messageStyle = { color: "#e2e8f0" };
2967
+ const contextKeyStyle = { color: "#9ae6b4" };
2968
+ const contextValueStyle = { color: "#cbd5e0" };
2969
+ const getTimestamp = () => {
2970
+ switch (timestampMode) {
2971
+ case "absolute":
2972
+ return "22:15:30.1";
2973
+ case "readable":
2974
+ return "10:15 PM";
2975
+ case "relative":
2976
+ return "2s ago";
2977
+ case "disable":
2978
+ return null;
2979
+ default:
2980
+ return "22:15:30.1";
2981
+ }
2982
+ };
2983
+ const timestamp = getTimestamp();
2984
+ return /* @__PURE__ */ u(
2985
+ Pane,
2986
+ {
2987
+ background: "#2d3748",
2988
+ padding: 12,
2989
+ borderRadius: 6,
2990
+ border: "1px solid #4a5568",
2991
+ children: /* @__PURE__ */ u(Pane, { style: previewStyle, children: [
2992
+ /* @__PURE__ */ u("div", { children: [
2993
+ displayOptions.timestamp && timestamp && /* @__PURE__ */ u("span", { style: timestampStyle, children: [
2994
+ timestamp,
2995
+ " "
2996
+ ] }),
2997
+ displayOptions.emoji && /* @__PURE__ */ u("span", { style: emojiStyle, children: "🌐" }),
2998
+ displayOptions.level && /* @__PURE__ */ u("span", { style: levelStyle, children: "INFO " }),
2999
+ displayOptions.component && /* @__PURE__ */ u("span", { style: componentStyle, children: "[API] " }),
3000
+ displayOptions.message && /* @__PURE__ */ u("span", { style: messageStyle, children: "Request completed successfully" })
3001
+ ] }),
3002
+ displayOptions.jsonPayload && /* @__PURE__ */ u(Fragment, { children: [
3003
+ /* @__PURE__ */ u("div", { children: [
3004
+ /* @__PURE__ */ u("span", { style: contextKeyStyle, children: " ├─ endpoint: " }),
3005
+ /* @__PURE__ */ u("span", { style: contextValueStyle, children: "/api/users/profile" })
3006
+ ] }),
3007
+ /* @__PURE__ */ u("div", { children: [
3008
+ /* @__PURE__ */ u("span", { style: contextKeyStyle, children: " ├─ status: " }),
3009
+ /* @__PURE__ */ u("span", { style: contextValueStyle, children: "200" })
3010
+ ] }),
3011
+ /* @__PURE__ */ u("div", { children: [
3012
+ /* @__PURE__ */ u("span", { style: contextKeyStyle, children: " ├─ duration: " }),
3013
+ /* @__PURE__ */ u("span", { style: contextValueStyle, children: "145ms" })
3014
+ ] }),
3015
+ /* @__PURE__ */ u("div", { children: [
3016
+ /* @__PURE__ */ u("span", { style: contextKeyStyle, children: " └─ cached: " }),
3017
+ /* @__PURE__ */ u("span", { style: contextValueStyle, children: "false" })
3018
+ ] })
3019
+ ] }),
3020
+ displayOptions.stackTrace && /* @__PURE__ */ u(Pane, { marginTop: 8, opacity: 0.7, children: [
3021
+ /* @__PURE__ */ u("div", { style: { color: "#fc8181" }, children: " at processRequest (api.js:42:15)" }),
3022
+ /* @__PURE__ */ u("div", { style: { color: "#fc8181" }, children: " at handleRoute (router.js:128:8)" })
3023
+ ] })
3024
+ ] })
3025
+ }
3026
+ );
3027
+ }
3028
+ function DisplayControls({ loggerControls, onStateChange }) {
3029
+ const [timestampMode, setTimestampMode] = useState("absolute");
3030
+ const [displayOptions, setDisplayOptions] = useState({
3031
+ timestamp: true,
3032
+ emoji: true,
3033
+ component: true,
3034
+ level: false,
3035
+ message: true,
3036
+ jsonPayload: true,
3037
+ stackTrace: true
3038
+ });
3039
+ useEffect(() => {
3040
+ var _a, _b;
3041
+ if (loggerControls) {
3042
+ try {
3043
+ const config = (_a = loggerControls.getDisplayConfig) == null ? void 0 : _a.call(loggerControls);
3044
+ if (config) {
3045
+ setDisplayOptions((prev) => ({
3046
+ ...prev,
3047
+ ...config
3048
+ }));
3049
+ }
3050
+ const currentTimestampMode = (_b = loggerControls.getTimestampMode) == null ? void 0 : _b.call(loggerControls);
3051
+ if (currentTimestampMode) {
3052
+ setTimestampMode(currentTimestampMode);
3053
+ }
3054
+ } catch (error) {
3055
+ console.warn("[DisplayControls] Failed to load config:", error);
3056
+ }
3057
+ }
3058
+ }, [loggerControls]);
3059
+ useEffect(() => {
3060
+ if (onStateChange) {
3061
+ onStateChange({ displayOptions, timestampMode });
3062
+ }
3063
+ }, [displayOptions, timestampMode, onStateChange]);
3064
+ const handleTimestampModeChange = (mode) => {
3065
+ var _a;
3066
+ setTimestampMode(mode);
3067
+ const isVisible = mode !== "disable";
3068
+ setDisplayOptions((prev) => ({ ...prev, timestamp: isVisible }));
3069
+ try {
3070
+ (_a = loggerControls.setTimestampMode) == null ? void 0 : _a.call(loggerControls, mode);
3071
+ console.log(`[JSG-DEVTOOLS] Timestamp mode changed to: ${mode}`);
3072
+ } catch (error) {
3073
+ console.warn("[DisplayControls] Failed to set timestamp mode:", error);
3074
+ }
3075
+ };
3076
+ const handleToggle = (option) => {
3077
+ var _a;
3078
+ const newValue = !displayOptions[option];
3079
+ setDisplayOptions((prev) => ({
3080
+ ...prev,
3081
+ [option]: newValue
3082
+ }));
3083
+ try {
3084
+ (_a = loggerControls.setDisplayOption) == null ? void 0 : _a.call(loggerControls, option, newValue);
3085
+ console.log(`[JSG-DEVTOOLS] Display option '${option}' set to: ${newValue}`);
3086
+ } catch (error) {
3087
+ console.warn(`[DisplayControls] Failed to set ${option}:`, error);
3088
+ }
3089
+ };
3090
+ const handleAllOn = () => {
3091
+ var _a;
3092
+ const allOn = {
3093
+ timestamp: true,
3094
+ emoji: true,
3095
+ component: true,
3096
+ level: true,
3097
+ message: true,
3098
+ jsonPayload: true,
3099
+ stackTrace: true
3100
+ };
3101
+ setDisplayOptions(allOn);
3102
+ setTimestampMode("absolute");
3103
+ try {
3104
+ Object.entries(allOn).forEach(([key, value]) => {
3105
+ var _a2;
3106
+ (_a2 = loggerControls.setDisplayOption) == null ? void 0 : _a2.call(loggerControls, key, value);
3107
+ });
3108
+ (_a = loggerControls.setTimestampMode) == null ? void 0 : _a.call(loggerControls, "absolute");
3109
+ console.log("[JSG-DEVTOOLS] All display options enabled");
3110
+ } catch (error) {
3111
+ console.warn("[DisplayControls] Failed to enable all options:", error);
3112
+ }
3113
+ };
3114
+ const handleAllOff = () => {
3115
+ var _a;
3116
+ const allOff = {
3117
+ timestamp: false,
3118
+ emoji: false,
3119
+ component: false,
3120
+ level: false,
3121
+ message: true,
3122
+ // Keep message always on
3123
+ jsonPayload: false,
3124
+ stackTrace: false
3125
+ };
3126
+ setDisplayOptions(allOff);
3127
+ setTimestampMode("disable");
3128
+ try {
3129
+ Object.entries(allOff).forEach(([key, value]) => {
3130
+ var _a2;
3131
+ (_a2 = loggerControls.setDisplayOption) == null ? void 0 : _a2.call(loggerControls, key, value);
3132
+ });
3133
+ (_a = loggerControls.setTimestampMode) == null ? void 0 : _a.call(loggerControls, "disable");
3134
+ console.log("[JSG-DEVTOOLS] All display options disabled (message kept on)");
3135
+ } catch (error) {
3136
+ console.warn("[DisplayControls] Failed to disable all options:", error);
3137
+ }
3138
+ };
3139
+ const handleReset = () => {
3140
+ var _a;
3141
+ const defaults = {
3142
+ timestamp: true,
3143
+ emoji: true,
3144
+ component: true,
3145
+ level: false,
3146
+ message: true,
3147
+ jsonPayload: true,
3148
+ stackTrace: true
3149
+ };
3150
+ setDisplayOptions(defaults);
3151
+ setTimestampMode("absolute");
3152
+ try {
3153
+ Object.entries(defaults).forEach(([key, value]) => {
3154
+ var _a2;
3155
+ (_a2 = loggerControls.setDisplayOption) == null ? void 0 : _a2.call(loggerControls, key, value);
3156
+ });
3157
+ (_a = loggerControls.setTimestampMode) == null ? void 0 : _a.call(loggerControls, "absolute");
3158
+ console.log("[JSG-DEVTOOLS] Display options reset to defaults");
3159
+ } catch (error) {
3160
+ console.warn("[DisplayControls] Failed to reset options:", error);
3161
+ }
3162
+ };
3163
+ const timestampOptions = [
3164
+ { label: "Absolute", value: "absolute" },
3165
+ { label: "Readable", value: "readable" },
3166
+ { label: "Relative", value: "relative" },
3167
+ { label: "Off", value: "disable" }
3168
+ ];
3169
+ return /* @__PURE__ */ u(Pane, { paddingX: 20, paddingY: 16, children: [
3170
+ /* @__PURE__ */ u(Pane, { marginBottom: 12, children: /* @__PURE__ */ u(Pane, { display: "flex", gap: 4, children: timestampOptions.map((option) => /* @__PURE__ */ u(
3171
+ Button,
3172
+ {
3173
+ size: "small",
3174
+ appearance: timestampMode === option.value ? "primary" : "default",
3175
+ onClick: () => handleTimestampModeChange(option.value),
3176
+ flex: "1",
3177
+ children: option.label
3178
+ },
3179
+ option.value
3180
+ )) }) }),
3181
+ /* @__PURE__ */ u(
3182
+ Pane,
3183
+ {
3184
+ display: "grid",
3185
+ gridTemplateColumns: "1fr 1fr",
3186
+ gap: 12,
3187
+ marginBottom: 12,
3188
+ children: [
3189
+ /* @__PURE__ */ u(Pane, { display: "flex", alignItems: "center", justifyContent: "space-between", children: [
3190
+ /* @__PURE__ */ u(Text, { size: 300, color: "#e2e8f0", children: "😀 Emoji" }),
3191
+ /* @__PURE__ */ u(
3192
+ Switch,
3193
+ {
3194
+ checked: displayOptions.emoji,
3195
+ onChange: () => handleToggle("emoji"),
3196
+ height: 20
3197
+ }
3198
+ )
3199
+ ] }),
3200
+ /* @__PURE__ */ u(Pane, { display: "flex", alignItems: "center", justifyContent: "space-between", children: [
3201
+ /* @__PURE__ */ u(Text, { size: 300, color: "#e2e8f0", children: "📦 Component" }),
3202
+ /* @__PURE__ */ u(
3203
+ Switch,
3204
+ {
3205
+ checked: displayOptions.component,
3206
+ onChange: () => handleToggle("component"),
3207
+ height: 20
3208
+ }
3209
+ )
3210
+ ] }),
3211
+ /* @__PURE__ */ u(Pane, { display: "flex", alignItems: "center", justifyContent: "space-between", children: [
3212
+ /* @__PURE__ */ u(Text, { size: 300, color: "#e2e8f0", children: "📊 Level Name" }),
3213
+ /* @__PURE__ */ u(
3214
+ Switch,
3215
+ {
3216
+ checked: displayOptions.level,
3217
+ onChange: () => handleToggle("level"),
3218
+ height: 20
3219
+ }
3220
+ )
3221
+ ] }),
3222
+ /* @__PURE__ */ u(Pane, { display: "flex", alignItems: "center", justifyContent: "space-between", opacity: 0.5, children: [
3223
+ /* @__PURE__ */ u(Text, { size: 300, color: "#e2e8f0", children: "💬 Message" }),
3224
+ /* @__PURE__ */ u(
3225
+ Switch,
3226
+ {
3227
+ checked: displayOptions.message,
3228
+ disabled: true,
3229
+ height: 20
3230
+ }
3231
+ )
3232
+ ] }),
3233
+ /* @__PURE__ */ u(Pane, { display: "flex", alignItems: "center", justifyContent: "space-between", children: [
3234
+ /* @__PURE__ */ u(Text, { size: 300, color: "#e2e8f0", children: "📋 JSON Data" }),
3235
+ /* @__PURE__ */ u(
3236
+ Switch,
3237
+ {
3238
+ checked: displayOptions.jsonPayload,
3239
+ onChange: () => handleToggle("jsonPayload"),
3240
+ height: 20
3241
+ }
3242
+ )
3243
+ ] }),
3244
+ /* @__PURE__ */ u(Pane, { display: "flex", alignItems: "center", justifyContent: "space-between", children: [
3245
+ /* @__PURE__ */ u(Text, { size: 300, color: "#e2e8f0", children: "📚 Stack Trace" }),
3246
+ /* @__PURE__ */ u(
3247
+ Switch,
3248
+ {
3249
+ checked: displayOptions.stackTrace,
3250
+ onChange: () => handleToggle("stackTrace"),
3251
+ height: 20
3252
+ }
3253
+ )
3254
+ ] })
3255
+ ]
3256
+ }
3257
+ ),
3258
+ /* @__PURE__ */ u(Pane, { display: "flex", gap: 8, flexWrap: "wrap", children: [
3259
+ /* @__PURE__ */ u(
3260
+ Button,
3261
+ {
3262
+ size: "small",
3263
+ appearance: "primary",
3264
+ intent: "success",
3265
+ onClick: handleAllOn,
3266
+ flex: "1",
3267
+ minWidth: 80,
3268
+ children: "✅ All On"
3269
+ }
3270
+ ),
3271
+ /* @__PURE__ */ u(
3272
+ Button,
3273
+ {
3274
+ size: "small",
3275
+ appearance: "default",
3276
+ onClick: handleAllOff,
3277
+ flex: "1",
3278
+ minWidth: 80,
3279
+ children: "❌ All Off"
3280
+ }
3281
+ ),
3282
+ /* @__PURE__ */ u(
3283
+ Button,
3284
+ {
3285
+ size: "small",
3286
+ appearance: "default",
3287
+ onClick: handleReset,
3288
+ flex: "1",
3289
+ minWidth: 80,
3290
+ children: "↻ Reset"
3291
+ }
3292
+ )
3293
+ ] })
3294
+ ] });
3295
+ }
3296
+ function PanelContainer({
3297
+ components,
3298
+ loggerControls,
3299
+ onLevelChange,
3300
+ onGlobalDebug,
3301
+ onGlobalTrace,
3302
+ onReset,
3303
+ onClose,
3304
+ isClosing
3305
+ }) {
3306
+ const panelContainerStyle = {
3307
+ position: "fixed",
3308
+ top: "0",
3309
+ left: "0",
3310
+ width: "380px",
3311
+ // Slightly narrower since we're using segmented controls
3312
+ height: "100vh",
3313
+ zIndex: "999998",
3314
+ pointerEvents: "all",
3315
+ overflow: "auto",
3316
+ animation: isClosing ? "slideOut 0.3s ease-in" : "slideIn 0.3s ease-out"
3317
+ };
3318
+ if (!document.getElementById("jsg-devtools-styles")) {
3319
+ const styleSheet = document.createElement("style");
3320
+ styleSheet.id = "jsg-devtools-styles";
3321
+ styleSheet.textContent = `
3322
+ @keyframes slideIn {
3323
+ from { transform: translateX(-100%); }
3324
+ to { transform: translateX(0); }
3325
+ }
3326
+
3327
+ @keyframes slideOut {
3328
+ from { transform: translateX(0); }
3329
+ to { transform: translateX(-100%); }
3330
+ }
3331
+ `;
3332
+ document.head.appendChild(styleSheet);
3333
+ }
3334
+ const [previewState, setPreviewState] = useState({
3335
+ displayOptions: {
3336
+ timestamp: true,
3337
+ emoji: true,
3338
+ component: true,
3339
+ level: false,
3340
+ message: true,
3341
+ jsonPayload: true,
3342
+ stackTrace: true
3343
+ },
3344
+ timestampMode: "absolute"
3345
+ });
3346
+ const [showPreviewControls, setShowPreviewControls] = useState(true);
3347
+ return /* @__PURE__ */ u(
3348
+ Pane,
3349
+ {
3350
+ style: panelContainerStyle,
3351
+ background: "#0d1f28",
3352
+ boxShadow: "2px 0 8px rgba(0,0,0,0.3)",
3353
+ fontSize: 14,
3354
+ borderRight: "1px solid #22577a",
3355
+ children: [
3356
+ /* @__PURE__ */ u(
3357
+ Pane,
3358
+ {
3359
+ position: "sticky",
3360
+ top: 0,
3361
+ background: "#1a3d4d",
3362
+ zIndex: 999999,
3363
+ borderBottom: "1px solid #22577a",
3364
+ children: [
3365
+ /* @__PURE__ */ u(
3366
+ Pane,
3367
+ {
3368
+ paddingX: 16,
3369
+ paddingY: 12,
3370
+ display: "flex",
3371
+ justifyContent: "space-between",
3372
+ alignItems: "center",
3373
+ children: [
3374
+ /* @__PURE__ */ u(Heading, { size: 500, color: "#ffffff", fontWeight: "600", children: "🔧 Logger Controls" }),
3375
+ /* @__PURE__ */ u(Pane, { display: "flex", gap: 12, alignItems: "center", children: [
3376
+ /* @__PURE__ */ u(
3377
+ Switch,
3378
+ {
3379
+ checked: showPreviewControls,
3380
+ onChange: (e2) => setShowPreviewControls(e2.target.checked),
3381
+ height: 20
3382
+ }
3383
+ ),
3384
+ /* @__PURE__ */ u(
3385
+ Button,
3386
+ {
3387
+ appearance: "minimal",
3388
+ onClick: onClose,
3389
+ title: "Close DevTools panel",
3390
+ size: "small",
3391
+ color: "#8b949e",
3392
+ children: "×"
3393
+ }
3394
+ )
3395
+ ] })
3396
+ ]
3397
+ }
3398
+ ),
3399
+ showPreviewControls && /* @__PURE__ */ u(Fragment, { children: [
3400
+ /* @__PURE__ */ u(Pane, { paddingX: 16, paddingBottom: 12, children: /* @__PURE__ */ u(
3401
+ LogPreview,
3402
+ {
3403
+ displayOptions: previewState.displayOptions,
3404
+ timestampMode: previewState.timestampMode
3405
+ }
3406
+ ) }),
3407
+ /* @__PURE__ */ u(
3408
+ DisplayControls,
3409
+ {
3410
+ loggerControls,
3411
+ onStateChange: setPreviewState
3412
+ }
3413
+ )
3414
+ ] })
3415
+ ]
3416
+ }
3417
+ ),
3418
+ /* @__PURE__ */ u(Pane, { paddingBottom: 20, children: /* @__PURE__ */ u(Pane, { paddingX: 20, children: [
3419
+ /* @__PURE__ */ u(
3420
+ ComponentFilters,
3421
+ {
3422
+ components,
3423
+ loggerControls,
3424
+ onLevelChange
3425
+ }
3426
+ ),
3427
+ /* @__PURE__ */ u(
3428
+ GlobalControls,
3429
+ {
3430
+ onDebugAll: onGlobalDebug,
3431
+ onTraceAll: onGlobalTrace,
3432
+ onReset,
3433
+ loggerControls
3434
+ }
3435
+ )
3436
+ ] }) })
3437
+ ]
3438
+ }
3439
+ );
3440
+ }
3441
+ function DevToolsPanel({ loggerControls, onUnmount }) {
3442
+ const [isPanelOpen, setIsPanelOpen] = useState(true);
3443
+ const [isClosing, setIsClosing] = useState(false);
3444
+ const [components, setComponents] = useState([]);
3445
+ const [loggerStats, setLoggerStats] = useState({ total: 0 });
3446
+ useEffect(() => {
3447
+ var _a, _b, _c;
3448
+ if (loggerControls) {
3449
+ const componentList = ((_a = loggerControls.listComponents) == null ? void 0 : _a.call(loggerControls)) || [];
3450
+ setComponents(componentList);
3451
+ const stats = ((_b = loggerControls.getStats) == null ? void 0 : _b.call(loggerControls)) || { total: 0 };
3452
+ setLoggerStats(stats);
3453
+ const unsubscribe = (_c = loggerControls.subscribe) == null ? void 0 : _c.call(loggerControls, (logEntry, allLogs) => {
3454
+ var _a2;
3455
+ const updatedStats = ((_a2 = loggerControls.getStats) == null ? void 0 : _a2.call(loggerControls)) || { total: 0 };
3456
+ setLoggerStats(updatedStats);
3457
+ });
3458
+ return () => {
3459
+ if (unsubscribe) unsubscribe();
3460
+ };
3461
+ }
3462
+ }, [loggerControls]);
3463
+ useEffect(() => {
3464
+ if (isPanelOpen && !isClosing) {
3465
+ document.body.classList.add("jsg-devtools-panel-open");
3466
+ document.body.classList.remove("jsg-devtools-panel-closing");
3467
+ } else if (isClosing) {
3468
+ document.body.classList.remove("jsg-devtools-panel-open");
3469
+ document.body.classList.add("jsg-devtools-panel-closing");
3470
+ } else {
3471
+ document.body.classList.remove("jsg-devtools-panel-open");
3472
+ document.body.classList.remove("jsg-devtools-panel-closing");
3473
+ }
3474
+ return () => {
3475
+ document.body.classList.remove("jsg-devtools-panel-open");
3476
+ document.body.classList.remove("jsg-devtools-panel-closing");
3477
+ };
3478
+ }, [isPanelOpen, isClosing]);
3479
+ const handleClose = () => {
3480
+ setIsClosing(true);
3481
+ setTimeout(() => {
3482
+ setIsPanelOpen(false);
3483
+ setIsClosing(false);
3484
+ }, 300);
3485
+ };
3486
+ const handleTogglePanel = () => {
3487
+ if (!isPanelOpen) {
3488
+ setIsPanelOpen(true);
3489
+ } else {
3490
+ handleClose();
3491
+ }
3492
+ };
3493
+ const handleLevelChange = (componentName, newLevel) => {
3494
+ var _a;
3495
+ (_a = loggerControls.setLevel) == null ? void 0 : _a.call(loggerControls, componentName, newLevel);
3496
+ console.log(`[JSG-DEVTOOLS] Changed ${componentName} level to: ${newLevel.toUpperCase()}`);
3497
+ };
3498
+ const handleGlobalDebug = () => {
3499
+ var _a;
3500
+ (_a = loggerControls.enableDebugMode) == null ? void 0 : _a.call(loggerControls);
3501
+ console.log("[JSG-DEVTOOLS] Enabled debug mode for all components");
3502
+ };
3503
+ const handleGlobalTrace = () => {
3504
+ var _a;
3505
+ (_a = loggerControls.enableTraceMode) == null ? void 0 : _a.call(loggerControls);
3506
+ console.log("[JSG-DEVTOOLS] Enabled trace mode for all components");
3507
+ };
3508
+ const handleReset = () => {
3509
+ var _a;
3510
+ (_a = loggerControls.reset) == null ? void 0 : _a.call(loggerControls);
3511
+ console.log("[JSG-DEVTOOLS] Reset all settings to defaults");
3512
+ };
3513
+ useEffect(() => {
3514
+ if (onUnmount) {
3515
+ onUnmount(handleClose);
3516
+ }
3517
+ }, [onUnmount]);
3518
+ return /* @__PURE__ */ u("div", { children: [
3519
+ /* @__PURE__ */ u(
3520
+ FloatingButton,
3521
+ {
3522
+ onClick: handleTogglePanel,
3523
+ isActive: isPanelOpen,
3524
+ logCount: loggerStats.total
3525
+ }
3526
+ ),
3527
+ isPanelOpen && /* @__PURE__ */ u(
3528
+ PanelContainer,
3529
+ {
3530
+ components,
3531
+ loggerControls,
3532
+ onLevelChange: handleLevelChange,
3533
+ onGlobalDebug: handleGlobalDebug,
3534
+ onGlobalTrace: handleGlobalTrace,
3535
+ onReset: handleReset,
3536
+ onClose: handleClose,
3537
+ isClosing
3538
+ }
3539
+ )
3540
+ ] });
3541
+ }
3542
+ var lodash_merge = { exports: {} };
3543
+ lodash_merge.exports;
3544
+ (function(module, exports) {
3545
+ var LARGE_ARRAY_SIZE = 200;
3546
+ var HASH_UNDEFINED = "__lodash_hash_undefined__";
3547
+ var HOT_COUNT = 800, HOT_SPAN = 16;
3548
+ var MAX_SAFE_INTEGER = 9007199254740991;
3549
+ var argsTag = "[object Arguments]", arrayTag = "[object Array]", asyncTag = "[object AsyncFunction]", boolTag = "[object Boolean]", dateTag = "[object Date]", errorTag = "[object Error]", funcTag = "[object Function]", genTag = "[object GeneratorFunction]", mapTag = "[object Map]", numberTag = "[object Number]", nullTag = "[object Null]", objectTag = "[object Object]", proxyTag = "[object Proxy]", regexpTag = "[object RegExp]", setTag = "[object Set]", stringTag = "[object String]", undefinedTag = "[object Undefined]", weakMapTag = "[object WeakMap]";
3550
+ var arrayBufferTag = "[object ArrayBuffer]", dataViewTag = "[object DataView]", float32Tag = "[object Float32Array]", float64Tag = "[object Float64Array]", int8Tag = "[object Int8Array]", int16Tag = "[object Int16Array]", int32Tag = "[object Int32Array]", uint8Tag = "[object Uint8Array]", uint8ClampedTag = "[object Uint8ClampedArray]", uint16Tag = "[object Uint16Array]", uint32Tag = "[object Uint32Array]";
3551
+ var reRegExpChar = /[\\^$.*+?()[\]{}|]/g;
3552
+ var reIsHostCtor = /^\[object .+?Constructor\]$/;
3553
+ var reIsUint = /^(?:0|[1-9]\d*)$/;
3554
+ var typedArrayTags = {};
3555
+ typedArrayTags[float32Tag] = typedArrayTags[float64Tag] = typedArrayTags[int8Tag] = typedArrayTags[int16Tag] = typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] = typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] = typedArrayTags[uint32Tag] = true;
3556
+ typedArrayTags[argsTag] = typedArrayTags[arrayTag] = typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] = typedArrayTags[dataViewTag] = typedArrayTags[dateTag] = typedArrayTags[errorTag] = typedArrayTags[funcTag] = typedArrayTags[mapTag] = typedArrayTags[numberTag] = typedArrayTags[objectTag] = typedArrayTags[regexpTag] = typedArrayTags[setTag] = typedArrayTags[stringTag] = typedArrayTags[weakMapTag] = false;
3557
+ var freeGlobal = typeof commonjsGlobal == "object" && commonjsGlobal && commonjsGlobal.Object === Object && commonjsGlobal;
3558
+ var freeSelf = typeof self == "object" && self && self.Object === Object && self;
3559
+ var root = freeGlobal || freeSelf || Function("return this")();
3560
+ var freeExports = exports && !exports.nodeType && exports;
3561
+ var freeModule = freeExports && true && module && !module.nodeType && module;
3562
+ var moduleExports = freeModule && freeModule.exports === freeExports;
3563
+ var freeProcess = moduleExports && freeGlobal.process;
3564
+ var nodeUtil = function() {
3565
+ try {
3566
+ var types = freeModule && freeModule.require && freeModule.require("util").types;
3567
+ if (types) {
3568
+ return types;
3569
+ }
3570
+ return freeProcess && freeProcess.binding && freeProcess.binding("util");
3571
+ } catch (e2) {
3572
+ }
3573
+ }();
3574
+ var nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;
3575
+ function apply(func, thisArg, args) {
3576
+ switch (args.length) {
3577
+ case 0:
3578
+ return func.call(thisArg);
3579
+ case 1:
3580
+ return func.call(thisArg, args[0]);
3581
+ case 2:
3582
+ return func.call(thisArg, args[0], args[1]);
3583
+ case 3:
3584
+ return func.call(thisArg, args[0], args[1], args[2]);
3585
+ }
3586
+ return func.apply(thisArg, args);
3587
+ }
3588
+ function baseTimes(n, iteratee) {
3589
+ var index = -1, result = Array(n);
3590
+ while (++index < n) {
3591
+ result[index] = iteratee(index);
3592
+ }
3593
+ return result;
3594
+ }
3595
+ function baseUnary(func) {
3596
+ return function(value) {
3597
+ return func(value);
3598
+ };
3599
+ }
3600
+ function getValue(object, key) {
3601
+ return object == null ? void 0 : object[key];
3602
+ }
3603
+ function overArg(func, transform) {
3604
+ return function(arg) {
3605
+ return func(transform(arg));
3606
+ };
3607
+ }
3608
+ var arrayProto = Array.prototype, funcProto = Function.prototype, objectProto = Object.prototype;
3609
+ var coreJsData = root["__core-js_shared__"];
3610
+ var funcToString = funcProto.toString;
3611
+ var hasOwnProperty = objectProto.hasOwnProperty;
3612
+ var maskSrcKey = function() {
3613
+ var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || "");
3614
+ return uid ? "Symbol(src)_1." + uid : "";
3615
+ }();
3616
+ var nativeObjectToString = objectProto.toString;
3617
+ var objectCtorString = funcToString.call(Object);
3618
+ var reIsNative = RegExp(
3619
+ "^" + funcToString.call(hasOwnProperty).replace(reRegExpChar, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
3620
+ );
3621
+ var Buffer = moduleExports ? root.Buffer : void 0, Symbol2 = root.Symbol, Uint8Array = root.Uint8Array;
3622
+ Buffer ? Buffer.allocUnsafe : void 0;
3623
+ var getPrototype = overArg(Object.getPrototypeOf, Object), objectCreate = Object.create, propertyIsEnumerable = objectProto.propertyIsEnumerable, splice = arrayProto.splice, symToStringTag = Symbol2 ? Symbol2.toStringTag : void 0;
3624
+ var defineProperty = function() {
3625
+ try {
3626
+ var func = getNative(Object, "defineProperty");
3627
+ func({}, "", {});
3628
+ return func;
3629
+ } catch (e2) {
3630
+ }
3631
+ }();
3632
+ var nativeIsBuffer = Buffer ? Buffer.isBuffer : void 0, nativeMax = Math.max, nativeNow = Date.now;
3633
+ var Map2 = getNative(root, "Map"), nativeCreate = getNative(Object, "create");
3634
+ var baseCreate = /* @__PURE__ */ function() {
3635
+ function object() {
3636
+ }
3637
+ return function(proto) {
3638
+ if (!isObject(proto)) {
3639
+ return {};
3640
+ }
3641
+ if (objectCreate) {
3642
+ return objectCreate(proto);
3643
+ }
3644
+ object.prototype = proto;
3645
+ var result = new object();
3646
+ object.prototype = void 0;
3647
+ return result;
3648
+ };
3649
+ }();
3650
+ function Hash(entries) {
3651
+ var index = -1, length = entries == null ? 0 : entries.length;
3652
+ this.clear();
3653
+ while (++index < length) {
3654
+ var entry = entries[index];
3655
+ this.set(entry[0], entry[1]);
3656
+ }
3657
+ }
3658
+ function hashClear() {
3659
+ this.__data__ = nativeCreate ? nativeCreate(null) : {};
3660
+ this.size = 0;
3661
+ }
3662
+ function hashDelete(key) {
3663
+ var result = this.has(key) && delete this.__data__[key];
3664
+ this.size -= result ? 1 : 0;
3665
+ return result;
3666
+ }
3667
+ function hashGet(key) {
3668
+ var data = this.__data__;
3669
+ if (nativeCreate) {
3670
+ var result = data[key];
3671
+ return result === HASH_UNDEFINED ? void 0 : result;
3672
+ }
3673
+ return hasOwnProperty.call(data, key) ? data[key] : void 0;
3674
+ }
3675
+ function hashHas(key) {
3676
+ var data = this.__data__;
3677
+ return nativeCreate ? data[key] !== void 0 : hasOwnProperty.call(data, key);
3678
+ }
3679
+ function hashSet(key, value) {
3680
+ var data = this.__data__;
3681
+ this.size += this.has(key) ? 0 : 1;
3682
+ data[key] = nativeCreate && value === void 0 ? HASH_UNDEFINED : value;
3683
+ return this;
3684
+ }
3685
+ Hash.prototype.clear = hashClear;
3686
+ Hash.prototype["delete"] = hashDelete;
3687
+ Hash.prototype.get = hashGet;
3688
+ Hash.prototype.has = hashHas;
3689
+ Hash.prototype.set = hashSet;
3690
+ function ListCache(entries) {
3691
+ var index = -1, length = entries == null ? 0 : entries.length;
3692
+ this.clear();
3693
+ while (++index < length) {
3694
+ var entry = entries[index];
3695
+ this.set(entry[0], entry[1]);
3696
+ }
3697
+ }
3698
+ function listCacheClear() {
3699
+ this.__data__ = [];
3700
+ this.size = 0;
3701
+ }
3702
+ function listCacheDelete(key) {
3703
+ var data = this.__data__, index = assocIndexOf(data, key);
3704
+ if (index < 0) {
3705
+ return false;
3706
+ }
3707
+ var lastIndex = data.length - 1;
3708
+ if (index == lastIndex) {
3709
+ data.pop();
3710
+ } else {
3711
+ splice.call(data, index, 1);
3712
+ }
3713
+ --this.size;
3714
+ return true;
3715
+ }
3716
+ function listCacheGet(key) {
3717
+ var data = this.__data__, index = assocIndexOf(data, key);
3718
+ return index < 0 ? void 0 : data[index][1];
3719
+ }
3720
+ function listCacheHas(key) {
3721
+ return assocIndexOf(this.__data__, key) > -1;
3722
+ }
3723
+ function listCacheSet(key, value) {
3724
+ var data = this.__data__, index = assocIndexOf(data, key);
3725
+ if (index < 0) {
3726
+ ++this.size;
3727
+ data.push([key, value]);
3728
+ } else {
3729
+ data[index][1] = value;
3730
+ }
3731
+ return this;
3732
+ }
3733
+ ListCache.prototype.clear = listCacheClear;
3734
+ ListCache.prototype["delete"] = listCacheDelete;
3735
+ ListCache.prototype.get = listCacheGet;
3736
+ ListCache.prototype.has = listCacheHas;
3737
+ ListCache.prototype.set = listCacheSet;
3738
+ function MapCache(entries) {
3739
+ var index = -1, length = entries == null ? 0 : entries.length;
3740
+ this.clear();
3741
+ while (++index < length) {
3742
+ var entry = entries[index];
3743
+ this.set(entry[0], entry[1]);
3744
+ }
3745
+ }
3746
+ function mapCacheClear() {
3747
+ this.size = 0;
3748
+ this.__data__ = {
3749
+ "hash": new Hash(),
3750
+ "map": new (Map2 || ListCache)(),
3751
+ "string": new Hash()
3752
+ };
3753
+ }
3754
+ function mapCacheDelete(key) {
3755
+ var result = getMapData(this, key)["delete"](key);
3756
+ this.size -= result ? 1 : 0;
3757
+ return result;
3758
+ }
3759
+ function mapCacheGet(key) {
3760
+ return getMapData(this, key).get(key);
3761
+ }
3762
+ function mapCacheHas(key) {
3763
+ return getMapData(this, key).has(key);
3764
+ }
3765
+ function mapCacheSet(key, value) {
3766
+ var data = getMapData(this, key), size = data.size;
3767
+ data.set(key, value);
3768
+ this.size += data.size == size ? 0 : 1;
3769
+ return this;
3770
+ }
3771
+ MapCache.prototype.clear = mapCacheClear;
3772
+ MapCache.prototype["delete"] = mapCacheDelete;
3773
+ MapCache.prototype.get = mapCacheGet;
3774
+ MapCache.prototype.has = mapCacheHas;
3775
+ MapCache.prototype.set = mapCacheSet;
3776
+ function Stack(entries) {
3777
+ var data = this.__data__ = new ListCache(entries);
3778
+ this.size = data.size;
3779
+ }
3780
+ function stackClear() {
3781
+ this.__data__ = new ListCache();
3782
+ this.size = 0;
3783
+ }
3784
+ function stackDelete(key) {
3785
+ var data = this.__data__, result = data["delete"](key);
3786
+ this.size = data.size;
3787
+ return result;
3788
+ }
3789
+ function stackGet(key) {
3790
+ return this.__data__.get(key);
3791
+ }
3792
+ function stackHas(key) {
3793
+ return this.__data__.has(key);
3794
+ }
3795
+ function stackSet(key, value) {
3796
+ var data = this.__data__;
3797
+ if (data instanceof ListCache) {
3798
+ var pairs = data.__data__;
3799
+ if (!Map2 || pairs.length < LARGE_ARRAY_SIZE - 1) {
3800
+ pairs.push([key, value]);
3801
+ this.size = ++data.size;
3802
+ return this;
3803
+ }
3804
+ data = this.__data__ = new MapCache(pairs);
3805
+ }
3806
+ data.set(key, value);
3807
+ this.size = data.size;
3808
+ return this;
3809
+ }
3810
+ Stack.prototype.clear = stackClear;
3811
+ Stack.prototype["delete"] = stackDelete;
3812
+ Stack.prototype.get = stackGet;
3813
+ Stack.prototype.has = stackHas;
3814
+ Stack.prototype.set = stackSet;
3815
+ function arrayLikeKeys(value, inherited) {
3816
+ var isArr = isArray(value), isArg = !isArr && isArguments(value), isBuff = !isArr && !isArg && isBuffer(value), isType = !isArr && !isArg && !isBuff && isTypedArray(value), skipIndexes = isArr || isArg || isBuff || isType, result = skipIndexes ? baseTimes(value.length, String) : [], length = result.length;
3817
+ for (var key in value) {
3818
+ if (!(skipIndexes && // Safari 9 has enumerable `arguments.length` in strict mode.
3819
+ (key == "length" || // Node.js 0.10 has enumerable non-index properties on buffers.
3820
+ isBuff && (key == "offset" || key == "parent") || // PhantomJS 2 has enumerable non-index properties on typed arrays.
3821
+ isType && (key == "buffer" || key == "byteLength" || key == "byteOffset") || // Skip index properties.
3822
+ isIndex(key, length)))) {
3823
+ result.push(key);
3824
+ }
3825
+ }
3826
+ return result;
3827
+ }
3828
+ function assignMergeValue(object, key, value) {
3829
+ if (value !== void 0 && !eq(object[key], value) || value === void 0 && !(key in object)) {
3830
+ baseAssignValue(object, key, value);
3831
+ }
3832
+ }
3833
+ function assignValue(object, key, value) {
3834
+ var objValue = object[key];
3835
+ if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) || value === void 0 && !(key in object)) {
3836
+ baseAssignValue(object, key, value);
3837
+ }
3838
+ }
3839
+ function assocIndexOf(array, key) {
3840
+ var length = array.length;
3841
+ while (length--) {
3842
+ if (eq(array[length][0], key)) {
3843
+ return length;
3844
+ }
3845
+ }
3846
+ return -1;
3847
+ }
3848
+ function baseAssignValue(object, key, value) {
3849
+ if (key == "__proto__" && defineProperty) {
3850
+ defineProperty(object, key, {
3851
+ "configurable": true,
3852
+ "enumerable": true,
3853
+ "value": value,
3854
+ "writable": true
3855
+ });
3856
+ } else {
3857
+ object[key] = value;
3858
+ }
3859
+ }
3860
+ var baseFor = createBaseFor();
3861
+ function baseGetTag(value) {
3862
+ if (value == null) {
3863
+ return value === void 0 ? undefinedTag : nullTag;
3864
+ }
3865
+ return symToStringTag && symToStringTag in Object(value) ? getRawTag(value) : objectToString(value);
3866
+ }
3867
+ function baseIsArguments(value) {
3868
+ return isObjectLike(value) && baseGetTag(value) == argsTag;
3869
+ }
3870
+ function baseIsNative(value) {
3871
+ if (!isObject(value) || isMasked(value)) {
3872
+ return false;
3873
+ }
3874
+ var pattern = isFunction2(value) ? reIsNative : reIsHostCtor;
3875
+ return pattern.test(toSource(value));
3876
+ }
3877
+ function baseIsTypedArray(value) {
3878
+ return isObjectLike(value) && isLength(value.length) && !!typedArrayTags[baseGetTag(value)];
3879
+ }
3880
+ function baseKeysIn(object) {
3881
+ if (!isObject(object)) {
3882
+ return nativeKeysIn(object);
3883
+ }
3884
+ var isProto = isPrototype(object), result = [];
3885
+ for (var key in object) {
3886
+ if (!(key == "constructor" && (isProto || !hasOwnProperty.call(object, key)))) {
3887
+ result.push(key);
3888
+ }
3889
+ }
3890
+ return result;
3891
+ }
3892
+ function baseMerge(object, source, srcIndex, customizer, stack) {
3893
+ if (object === source) {
3894
+ return;
3895
+ }
3896
+ baseFor(source, function(srcValue, key) {
3897
+ stack || (stack = new Stack());
3898
+ if (isObject(srcValue)) {
3899
+ baseMergeDeep(object, source, key, srcIndex, baseMerge, customizer, stack);
3900
+ } else {
3901
+ var newValue = customizer ? customizer(safeGet(object, key), srcValue, key + "", object, source, stack) : void 0;
3902
+ if (newValue === void 0) {
3903
+ newValue = srcValue;
3904
+ }
3905
+ assignMergeValue(object, key, newValue);
3906
+ }
3907
+ }, keysIn);
3908
+ }
3909
+ function baseMergeDeep(object, source, key, srcIndex, mergeFunc, customizer, stack) {
3910
+ var objValue = safeGet(object, key), srcValue = safeGet(source, key), stacked = stack.get(srcValue);
3911
+ if (stacked) {
3912
+ assignMergeValue(object, key, stacked);
3913
+ return;
3914
+ }
3915
+ var newValue = customizer ? customizer(objValue, srcValue, key + "", object, source, stack) : void 0;
3916
+ var isCommon = newValue === void 0;
3917
+ if (isCommon) {
3918
+ var isArr = isArray(srcValue), isBuff = !isArr && isBuffer(srcValue), isTyped = !isArr && !isBuff && isTypedArray(srcValue);
3919
+ newValue = srcValue;
3920
+ if (isArr || isBuff || isTyped) {
3921
+ if (isArray(objValue)) {
3922
+ newValue = objValue;
3923
+ } else if (isArrayLikeObject(objValue)) {
3924
+ newValue = copyArray(objValue);
3925
+ } else if (isBuff) {
3926
+ isCommon = false;
3927
+ newValue = cloneBuffer(srcValue);
3928
+ } else if (isTyped) {
3929
+ isCommon = false;
3930
+ newValue = cloneTypedArray(srcValue);
3931
+ } else {
3932
+ newValue = [];
3933
+ }
3934
+ } else if (isPlainObject(srcValue) || isArguments(srcValue)) {
3935
+ newValue = objValue;
3936
+ if (isArguments(objValue)) {
3937
+ newValue = toPlainObject(objValue);
3938
+ } else if (!isObject(objValue) || isFunction2(objValue)) {
3939
+ newValue = initCloneObject(srcValue);
3940
+ }
3941
+ } else {
3942
+ isCommon = false;
3943
+ }
3944
+ }
3945
+ if (isCommon) {
3946
+ stack.set(srcValue, newValue);
3947
+ mergeFunc(newValue, srcValue, srcIndex, customizer, stack);
3948
+ stack["delete"](srcValue);
3949
+ }
3950
+ assignMergeValue(object, key, newValue);
3951
+ }
3952
+ function baseRest(func, start) {
3953
+ return setToString(overRest(func, start, identity), func + "");
3954
+ }
3955
+ var baseSetToString = !defineProperty ? identity : function(func, string) {
3956
+ return defineProperty(func, "toString", {
3957
+ "configurable": true,
3958
+ "enumerable": false,
3959
+ "value": constant(string),
3960
+ "writable": true
3961
+ });
3962
+ };
3963
+ function cloneBuffer(buffer, isDeep) {
3964
+ {
3965
+ return buffer.slice();
3966
+ }
3967
+ }
3968
+ function cloneArrayBuffer(arrayBuffer) {
3969
+ var result = new arrayBuffer.constructor(arrayBuffer.byteLength);
3970
+ new Uint8Array(result).set(new Uint8Array(arrayBuffer));
3971
+ return result;
3972
+ }
3973
+ function cloneTypedArray(typedArray, isDeep) {
3974
+ var buffer = cloneArrayBuffer(typedArray.buffer);
3975
+ return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length);
3976
+ }
3977
+ function copyArray(source, array) {
3978
+ var index = -1, length = source.length;
3979
+ array || (array = Array(length));
3980
+ while (++index < length) {
3981
+ array[index] = source[index];
3982
+ }
3983
+ return array;
3984
+ }
3985
+ function copyObject(source, props, object, customizer) {
3986
+ var isNew = !object;
3987
+ object || (object = {});
3988
+ var index = -1, length = props.length;
3989
+ while (++index < length) {
3990
+ var key = props[index];
3991
+ var newValue = void 0;
3992
+ if (newValue === void 0) {
3993
+ newValue = source[key];
3994
+ }
3995
+ if (isNew) {
3996
+ baseAssignValue(object, key, newValue);
3997
+ } else {
3998
+ assignValue(object, key, newValue);
3999
+ }
4000
+ }
4001
+ return object;
4002
+ }
4003
+ function createAssigner(assigner) {
4004
+ return baseRest(function(object, sources) {
4005
+ var index = -1, length = sources.length, customizer = length > 1 ? sources[length - 1] : void 0, guard = length > 2 ? sources[2] : void 0;
4006
+ customizer = assigner.length > 3 && typeof customizer == "function" ? (length--, customizer) : void 0;
4007
+ if (guard && isIterateeCall(sources[0], sources[1], guard)) {
4008
+ customizer = length < 3 ? void 0 : customizer;
4009
+ length = 1;
4010
+ }
4011
+ object = Object(object);
4012
+ while (++index < length) {
4013
+ var source = sources[index];
4014
+ if (source) {
4015
+ assigner(object, source, index, customizer);
4016
+ }
4017
+ }
4018
+ return object;
4019
+ });
4020
+ }
4021
+ function createBaseFor(fromRight) {
4022
+ return function(object, iteratee, keysFunc) {
4023
+ var index = -1, iterable = Object(object), props = keysFunc(object), length = props.length;
4024
+ while (length--) {
4025
+ var key = props[++index];
4026
+ if (iteratee(iterable[key], key, iterable) === false) {
4027
+ break;
4028
+ }
4029
+ }
4030
+ return object;
4031
+ };
4032
+ }
4033
+ function getMapData(map, key) {
4034
+ var data = map.__data__;
4035
+ return isKeyable(key) ? data[typeof key == "string" ? "string" : "hash"] : data.map;
4036
+ }
4037
+ function getNative(object, key) {
4038
+ var value = getValue(object, key);
4039
+ return baseIsNative(value) ? value : void 0;
4040
+ }
4041
+ function getRawTag(value) {
4042
+ var isOwn = hasOwnProperty.call(value, symToStringTag), tag = value[symToStringTag];
4043
+ try {
4044
+ value[symToStringTag] = void 0;
4045
+ var unmasked = true;
4046
+ } catch (e2) {
4047
+ }
4048
+ var result = nativeObjectToString.call(value);
4049
+ if (unmasked) {
4050
+ if (isOwn) {
4051
+ value[symToStringTag] = tag;
4052
+ } else {
4053
+ delete value[symToStringTag];
4054
+ }
4055
+ }
4056
+ return result;
4057
+ }
4058
+ function initCloneObject(object) {
4059
+ return typeof object.constructor == "function" && !isPrototype(object) ? baseCreate(getPrototype(object)) : {};
4060
+ }
4061
+ function isIndex(value, length) {
4062
+ var type = typeof value;
4063
+ length = length == null ? MAX_SAFE_INTEGER : length;
4064
+ return !!length && (type == "number" || type != "symbol" && reIsUint.test(value)) && (value > -1 && value % 1 == 0 && value < length);
4065
+ }
4066
+ function isIterateeCall(value, index, object) {
4067
+ if (!isObject(object)) {
4068
+ return false;
4069
+ }
4070
+ var type = typeof index;
4071
+ if (type == "number" ? isArrayLike(object) && isIndex(index, object.length) : type == "string" && index in object) {
4072
+ return eq(object[index], value);
4073
+ }
4074
+ return false;
4075
+ }
4076
+ function isKeyable(value) {
4077
+ var type = typeof value;
4078
+ return type == "string" || type == "number" || type == "symbol" || type == "boolean" ? value !== "__proto__" : value === null;
4079
+ }
4080
+ function isMasked(func) {
4081
+ return !!maskSrcKey && maskSrcKey in func;
4082
+ }
4083
+ function isPrototype(value) {
4084
+ var Ctor = value && value.constructor, proto = typeof Ctor == "function" && Ctor.prototype || objectProto;
4085
+ return value === proto;
4086
+ }
4087
+ function nativeKeysIn(object) {
4088
+ var result = [];
4089
+ if (object != null) {
4090
+ for (var key in Object(object)) {
4091
+ result.push(key);
4092
+ }
4093
+ }
4094
+ return result;
4095
+ }
4096
+ function objectToString(value) {
4097
+ return nativeObjectToString.call(value);
4098
+ }
4099
+ function overRest(func, start, transform) {
4100
+ start = nativeMax(start === void 0 ? func.length - 1 : start, 0);
4101
+ return function() {
4102
+ var args = arguments, index = -1, length = nativeMax(args.length - start, 0), array = Array(length);
4103
+ while (++index < length) {
4104
+ array[index] = args[start + index];
4105
+ }
4106
+ index = -1;
4107
+ var otherArgs = Array(start + 1);
4108
+ while (++index < start) {
4109
+ otherArgs[index] = args[index];
4110
+ }
4111
+ otherArgs[start] = transform(array);
4112
+ return apply(func, this, otherArgs);
4113
+ };
4114
+ }
4115
+ function safeGet(object, key) {
4116
+ if (key === "constructor" && typeof object[key] === "function") {
4117
+ return;
4118
+ }
4119
+ if (key == "__proto__") {
4120
+ return;
4121
+ }
4122
+ return object[key];
4123
+ }
4124
+ var setToString = shortOut(baseSetToString);
4125
+ function shortOut(func) {
4126
+ var count = 0, lastCalled = 0;
4127
+ return function() {
4128
+ var stamp = nativeNow(), remaining = HOT_SPAN - (stamp - lastCalled);
4129
+ lastCalled = stamp;
4130
+ if (remaining > 0) {
4131
+ if (++count >= HOT_COUNT) {
4132
+ return arguments[0];
4133
+ }
4134
+ } else {
4135
+ count = 0;
4136
+ }
4137
+ return func.apply(void 0, arguments);
4138
+ };
4139
+ }
4140
+ function toSource(func) {
4141
+ if (func != null) {
4142
+ try {
4143
+ return funcToString.call(func);
4144
+ } catch (e2) {
4145
+ }
4146
+ try {
4147
+ return func + "";
4148
+ } catch (e2) {
4149
+ }
4150
+ }
4151
+ return "";
4152
+ }
4153
+ function eq(value, other) {
4154
+ return value === other || value !== value && other !== other;
4155
+ }
4156
+ var isArguments = baseIsArguments(/* @__PURE__ */ function() {
4157
+ return arguments;
4158
+ }()) ? baseIsArguments : function(value) {
4159
+ return isObjectLike(value) && hasOwnProperty.call(value, "callee") && !propertyIsEnumerable.call(value, "callee");
4160
+ };
4161
+ var isArray = Array.isArray;
4162
+ function isArrayLike(value) {
4163
+ return value != null && isLength(value.length) && !isFunction2(value);
4164
+ }
4165
+ function isArrayLikeObject(value) {
4166
+ return isObjectLike(value) && isArrayLike(value);
4167
+ }
4168
+ var isBuffer = nativeIsBuffer || stubFalse;
4169
+ function isFunction2(value) {
4170
+ if (!isObject(value)) {
4171
+ return false;
4172
+ }
4173
+ var tag = baseGetTag(value);
4174
+ return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;
4175
+ }
4176
+ function isLength(value) {
4177
+ return typeof value == "number" && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
4178
+ }
4179
+ function isObject(value) {
4180
+ var type = typeof value;
4181
+ return value != null && (type == "object" || type == "function");
4182
+ }
4183
+ function isObjectLike(value) {
4184
+ return value != null && typeof value == "object";
4185
+ }
4186
+ function isPlainObject(value) {
4187
+ if (!isObjectLike(value) || baseGetTag(value) != objectTag) {
4188
+ return false;
4189
+ }
4190
+ var proto = getPrototype(value);
4191
+ if (proto === null) {
4192
+ return true;
4193
+ }
4194
+ var Ctor = hasOwnProperty.call(proto, "constructor") && proto.constructor;
4195
+ return typeof Ctor == "function" && Ctor instanceof Ctor && funcToString.call(Ctor) == objectCtorString;
4196
+ }
4197
+ var isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;
4198
+ function toPlainObject(value) {
4199
+ return copyObject(value, keysIn(value));
4200
+ }
4201
+ function keysIn(object) {
4202
+ return isArrayLike(object) ? arrayLikeKeys(object) : baseKeysIn(object);
4203
+ }
4204
+ var merge2 = createAssigner(function(object, source, srcIndex) {
4205
+ baseMerge(object, source, srcIndex);
4206
+ });
4207
+ function constant(value) {
4208
+ return function() {
4209
+ return value;
4210
+ };
4211
+ }
4212
+ function identity(value) {
4213
+ return value;
4214
+ }
4215
+ function stubFalse() {
4216
+ return false;
4217
+ }
4218
+ module.exports = merge2;
4219
+ })(lodash_merge, lodash_merge.exports);
4220
+ var lodash_mergeExports = lodash_merge.exports;
4221
+ const merge = /* @__PURE__ */ getDefaultExportFromCjs(lodash_mergeExports);
4222
+ const devToolsTheme = merge({}, defaultTheme, {
4223
+ // Color system optimized for dark DevTools
4224
+ colors: {
4225
+ // Background colors
4226
+ background: {
4227
+ tint1: "#1E1E1E",
4228
+ // Main panel background
4229
+ tint2: "#2A2A2A",
4230
+ // Card/section backgrounds
4231
+ overlay: "rgba(0,0,0,0.9)"
4232
+ // Modal overlays
4233
+ },
4234
+ // Border colors
4235
+ border: {
4236
+ default: "#333333",
4237
+ // Primary borders
4238
+ muted: "#2A2A2A"
4239
+ // Subtle borders
4240
+ },
4241
+ // Text colors
4242
+ text: {
4243
+ default: "#FFFFFF",
4244
+ // Primary text
4245
+ muted: "#CCCCCC",
4246
+ // Secondary text
4247
+ dark: "#888888"
4248
+ // Tertiary text
4249
+ },
4250
+ // Brand colors (blue-green palette)
4251
+ palette: {
4252
+ primary: {
4253
+ base: "#22577a",
4254
+ // Lapis Lazuli
4255
+ dark: "#1a3d4d",
4256
+ // Darker shade
4257
+ light: "#38a3a5"
4258
+ // Verdigris for hover
4259
+ },
4260
+ // Status colors
4261
+ success: {
4262
+ base: "#57cc99",
4263
+ // Emerald
4264
+ dark: "#38a3a5",
4265
+ // Verdigris
4266
+ light: "#80ed99"
4267
+ // Light green
4268
+ },
4269
+ warning: {
4270
+ base: "#F39C12",
4271
+ // Orange for warning states
4272
+ dark: "#D68910",
4273
+ light: "#F1C40F"
4274
+ },
4275
+ danger: {
4276
+ base: "#E74C3C",
4277
+ // Red for error states
4278
+ dark: "#C0392B",
4279
+ light: "#EC7063"
4280
+ },
4281
+ neutral: {
4282
+ base: "#95A5A6",
4283
+ // Gray for neutral states
4284
+ dark: "#7F8C8D",
4285
+ light: "#BDC3C7"
4286
+ }
4287
+ },
4288
+ // Intent colors (Evergreen's semantic colors)
4289
+ intent: {
4290
+ success: "#57cc99",
4291
+ // Emerald
4292
+ warning: "#F39C12",
4293
+ danger: "#E74C3C",
4294
+ none: "#95A5A6"
4295
+ }
4296
+ },
4297
+ // Typography system
4298
+ typography: {
4299
+ fontFamilies: {
4300
+ display: 'system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif',
4301
+ ui: 'system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif',
4302
+ mono: 'Monaco, "SF Mono", Consolas, "Liberation Mono", Menlo, monospace'
4303
+ },
4304
+ fontSizes: {
4305
+ caption: 11,
4306
+ // Small captions
4307
+ body: 13,
4308
+ // Body text (DevTools standard)
4309
+ heading: 16,
4310
+ // Section headings
4311
+ title: 20
4312
+ // Panel title
4313
+ },
4314
+ fontWeights: {
4315
+ light: 300,
4316
+ normal: 400,
4317
+ medium: 500,
4318
+ semibold: 600,
4319
+ bold: 700
4320
+ }
4321
+ },
4322
+ // Component-specific overrides
4323
+ components: {
4324
+ // Button component customization
4325
+ Button: {
4326
+ baseStyle: {
4327
+ borderRadius: "6px",
4328
+ fontWeight: 500,
4329
+ transition: "all 0.2s ease",
4330
+ cursor: "pointer",
4331
+ fontFamily: 'system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif'
4332
+ },
4333
+ appearances: {
4334
+ // Primary button (Debug All, Trace All)
4335
+ primary: {
4336
+ backgroundColor: "#22577a",
4337
+ color: "#FFFFFF",
4338
+ border: "none",
4339
+ _hover: {
4340
+ backgroundColor: "#38a3a5",
4341
+ transform: "translateY(-1px)",
4342
+ boxShadow: "0 2px 8px rgba(34, 87, 122, 0.3)"
4343
+ },
4344
+ _active: {
4345
+ backgroundColor: "#1a3d4d",
4346
+ transform: "translateY(0)",
4347
+ boxShadow: "0 1px 4px rgba(34, 87, 122, 0.3)"
4348
+ },
4349
+ _disabled: {
4350
+ backgroundColor: "#555555",
4351
+ color: "#888888",
4352
+ transform: "none",
4353
+ boxShadow: "none"
4354
+ }
4355
+ },
4356
+ // Minimal button (secondary actions)
4357
+ minimal: {
4358
+ backgroundColor: "transparent",
4359
+ color: "#CCCCCC",
4360
+ border: "1px solid #333333",
4361
+ _hover: {
4362
+ backgroundColor: "#2A2A2A",
4363
+ borderColor: "#38a3a5",
4364
+ color: "#FFFFFF"
4365
+ },
4366
+ _active: {
4367
+ backgroundColor: "#1E1E1E",
4368
+ borderColor: "#22577a"
4369
+ }
4370
+ },
4371
+ // Danger button (Reset, destructive actions)
4372
+ default: {
4373
+ backgroundColor: "#E74C3C",
4374
+ color: "#FFFFFF",
4375
+ border: "none",
4376
+ _hover: {
4377
+ backgroundColor: "#EC7063",
4378
+ transform: "translateY(-1px)"
4379
+ },
4380
+ _active: {
4381
+ backgroundColor: "#C0392B",
4382
+ transform: "translateY(0)"
4383
+ }
4384
+ }
4385
+ },
4386
+ sizes: {
4387
+ small: {
4388
+ height: 28,
4389
+ paddingX: 12,
4390
+ fontSize: 12
4391
+ },
4392
+ medium: {
4393
+ height: 32,
4394
+ paddingX: 16,
4395
+ fontSize: 13
4396
+ },
4397
+ large: {
4398
+ height: 36,
4399
+ paddingX: 20,
4400
+ fontSize: 14
4401
+ }
4402
+ }
4403
+ },
4404
+ // Switch component (for component toggles)
4405
+ Switch: {
4406
+ baseStyle: {
4407
+ backgroundColor: "#444444"
4408
+ },
4409
+ appearances: {
4410
+ default: {
4411
+ backgroundColor: "#444444",
4412
+ _checked: {
4413
+ backgroundColor: "#22577a"
4414
+ },
4415
+ _hover: {
4416
+ backgroundColor: "#555555"
4417
+ },
4418
+ _checkedHover: {
4419
+ backgroundColor: "#38a3a5"
4420
+ }
4421
+ }
4422
+ }
4423
+ },
4424
+ // Pane component (containers, panels)
4425
+ Pane: {
4426
+ baseStyle: {
4427
+ backgroundColor: "#1E1E1E",
4428
+ border: "1px solid #333333",
4429
+ borderRadius: "8px"
4430
+ }
4431
+ },
4432
+ // Card component (content cards)
4433
+ Card: {
4434
+ baseStyle: {
4435
+ backgroundColor: "#2A2A2A",
4436
+ border: "1px solid #333333",
4437
+ borderRadius: "8px",
4438
+ boxShadow: "0 2px 8px rgba(0, 0, 0, 0.15)"
4439
+ }
4440
+ },
4441
+ // Text components
4442
+ Text: {
4443
+ baseStyle: {
4444
+ color: "#FFFFFF",
4445
+ fontFamily: 'system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif'
4446
+ },
4447
+ appearances: {
4448
+ default: {
4449
+ color: "#FFFFFF"
4450
+ },
4451
+ muted: {
4452
+ color: "#CCCCCC"
4453
+ },
4454
+ disabled: {
4455
+ color: "#888888"
4456
+ }
4457
+ }
4458
+ },
4459
+ // Heading components
4460
+ Heading: {
4461
+ baseStyle: {
4462
+ color: "#38a3a5",
4463
+ fontFamily: 'system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif',
4464
+ fontWeight: 600
4465
+ }
4466
+ },
4467
+ // Badge component (for log counts)
4468
+ Badge: {
4469
+ appearances: {
4470
+ default: {
4471
+ backgroundColor: "#E74C3C",
4472
+ color: "#FFFFFF"
4473
+ }
4474
+ }
4475
+ }
4476
+ }
4477
+ });
4478
+ console.log("🎛️ JSG Logger DevTools Panel - Evergreen UI Edition");
4479
+ console.log("[JSG-DEVTOOLS] Loading from source with hot reload enabled", {
4480
+ timestamp: (/* @__PURE__ */ new Date()).toISOString(),
4481
+ version: "v2.0",
4482
+ framework: "Evergreen UI + Preact",
4483
+ loadedFrom: "devtools/src/panel-entry.jsx"
4484
+ });
4485
+ let panelInstance = null;
4486
+ let isInitialized = false;
4487
+ let closeHandler = null;
4488
+ function initializePanel() {
4489
+ if (isInitialized) {
4490
+ console.log("[JSG-DEVTOOLS] Panel already initialized");
4491
+ return panelInstance;
4492
+ }
4493
+ console.log("[JSG-DEVTOOLS] Initializing DevTools panel");
4494
+ console.log("[JSG-DEVTOOLS] devToolsTheme:", devToolsTheme);
4495
+ console.log("[JSG-DEVTOOLS] theme.colors exists?", !!(devToolsTheme == null ? void 0 : devToolsTheme.colors));
4496
+ try {
4497
+ if (!window.JSG_Logger) {
4498
+ console.warn("[JSG-DEVTOOLS] JSG Logger not found on window. Make sure logger is initialized.");
4499
+ return null;
4500
+ }
4501
+ const panelContainer = document.createElement("div");
4502
+ panelContainer.id = "jsg-devtools-panel";
4503
+ panelContainer.style.cssText = `
4504
+ position: fixed;
4505
+ top: 0;
4506
+ left: 0;
4507
+ z-index: 999999;
4508
+ pointer-events: none;
4509
+ font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
4510
+ `;
4511
+ if (!document.getElementById("jsg-devtools-body-styles")) {
4512
+ const bodyStyles = document.createElement("style");
4513
+ bodyStyles.id = "jsg-devtools-body-styles";
4514
+ bodyStyles.textContent = `
4515
+ body.jsg-devtools-panel-open {
4516
+ margin-left: 380px !important;
4517
+ transition: margin-left 0.3s ease-out !important;
4518
+ }
4519
+
4520
+ body.jsg-devtools-panel-closing {
4521
+ margin-left: 0 !important;
4522
+ transition: margin-left 0.3s ease-in !important;
4523
+ }
4524
+ `;
4525
+ document.head.appendChild(bodyStyles);
4526
+ }
4527
+ document.body.appendChild(panelContainer);
4528
+ nn(
4529
+ /* @__PURE__ */ u(ThemeProvider, { value: devToolsTheme, children: /* @__PURE__ */ u(
4530
+ DevToolsPanel,
4531
+ {
4532
+ loggerControls: window.JSG_Logger,
4533
+ onUnmount: (handler) => {
4534
+ closeHandler = handler;
4535
+ }
4536
+ }
4537
+ ) }),
4538
+ panelContainer
4539
+ );
4540
+ panelInstance = {
4541
+ container: panelContainer,
4542
+ destroy: () => destroyPanel()
4543
+ };
4544
+ isInitialized = true;
4545
+ console.log("[JSG-DEVTOOLS] Panel initialized successfully");
4546
+ return panelInstance;
4547
+ } catch (error) {
4548
+ console.error("[JSG-DEVTOOLS] Failed to initialize panel:", error);
4549
+ return null;
4550
+ }
4551
+ }
4552
+ function destroyPanel() {
4553
+ if (panelInstance == null ? void 0 : panelInstance.container) {
4554
+ if (closeHandler) {
4555
+ closeHandler();
4556
+ setTimeout(() => {
4557
+ if ((panelInstance == null ? void 0 : panelInstance.container) && document.body.contains(panelInstance.container)) {
4558
+ document.body.removeChild(panelInstance.container);
4559
+ }
4560
+ panelInstance = null;
4561
+ isInitialized = false;
4562
+ closeHandler = null;
4563
+ console.log("[JSG-DEVTOOLS] Panel destroyed with animation");
4564
+ }, 350);
4565
+ } else {
4566
+ document.body.removeChild(panelInstance.container);
4567
+ panelInstance = null;
4568
+ isInitialized = false;
4569
+ closeHandler = null;
4570
+ console.log("[JSG-DEVTOOLS] Panel destroyed");
4571
+ }
4572
+ }
4573
+ }
4574
+ function togglePanel() {
4575
+ console.log("[JSG-DEVTOOLS] Panel is always visible when loaded. Use disableDevPanel() to remove.");
4576
+ }
4577
+ if (typeof window !== "undefined") {
4578
+ window.JSG_DevTools = {
4579
+ initialize: initializePanel,
4580
+ destroy: destroyPanel,
4581
+ toggle: togglePanel
4582
+ };
4583
+ }
4584
+ export {
4585
+ initializePanel,
4586
+ togglePanel
4587
+ };
4588
+ //# sourceMappingURL=panel-entry.js.map