@concavejs/devtools 0.0.1-alpha.5 → 0.0.1-alpha.6

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,2961 @@
1
+ import { jsxs as n, jsx as t, Fragment as G } from "react/jsx-runtime";
2
+ import ae from "react-dom";
3
+ import ie, { useState as _, useMemo as it, useRef as ft, useEffect as J, useCallback as V } from "react";
4
+ let mt = null;
5
+ function Vt() {
6
+ if (mt !== null) return mt;
7
+ try {
8
+ const o = "__concave_test__";
9
+ localStorage.setItem(o, "1"), localStorage.removeItem(o), mt = !0;
10
+ } catch {
11
+ mt = !1;
12
+ }
13
+ return mt;
14
+ }
15
+ function Ot(o) {
16
+ if (!Vt()) return null;
17
+ try {
18
+ return localStorage.getItem(o);
19
+ } catch {
20
+ return null;
21
+ }
22
+ }
23
+ function jt(o, r) {
24
+ if (Vt())
25
+ try {
26
+ localStorage.setItem(o, r);
27
+ } catch {
28
+ }
29
+ }
30
+ function Ht(o) {
31
+ if (Vt())
32
+ try {
33
+ localStorage.removeItem(o);
34
+ } catch {
35
+ }
36
+ }
37
+ const se = "0.0.1-alpha.5", Wt = {
38
+ version: se
39
+ }, oe = Wt.version.length > 0 ? Wt.version : "0.0.0", ne = oe;
40
+ oe.split("-")[0];
41
+ const le = "concave-devtools-events", de = "concave-devtools-settings", Gt = 200;
42
+ class St {
43
+ events = [];
44
+ maxEvents;
45
+ listeners = /* @__PURE__ */ new Set();
46
+ focusListeners = /* @__PURE__ */ new Set();
47
+ settingsListeners = /* @__PURE__ */ new Set();
48
+ subscriptions = /* @__PURE__ */ new Map();
49
+ snapshots = [];
50
+ maxSnapshots = 50;
51
+ isPaused = !1;
52
+ focusedEventId = null;
53
+ storageKey;
54
+ settingsKey;
55
+ persistenceEnabled;
56
+ recentEventIds = /* @__PURE__ */ new Set();
57
+ persistTimer = null;
58
+ settings = {
59
+ persistEvents: !0,
60
+ maxEvents: 1e3,
61
+ captureLogLines: !0,
62
+ autoPauseOnError: !1,
63
+ wsLatencyMs: 0,
64
+ wsJitterMs: 0
65
+ };
66
+ static MIN_EVENTS = 100;
67
+ static MAX_EVENTS = 1e4;
68
+ constructor(r = 1e3, a = "global") {
69
+ const s = typeof r == "number" ? { maxEvents: r, storageScope: a } : r, l = (s.storageScope ?? "global").trim() || "global";
70
+ this.storageKey = `${le}:${l}`, this.settingsKey = `${de}:${l}`, this.persistenceEnabled = s.enablePersistence !== !1, this.maxEvents = s.maxEvents ?? 1e3, this.persistenceEnabled || (this.settings.persistEvents = !1), this.loadSettings(), this.persistenceEnabled || (this.settings.persistEvents = !1), this.loadPersistedEvents();
71
+ }
72
+ /**
73
+ * Add an event to the store
74
+ */
75
+ addEvent(r) {
76
+ if (!this.isPaused && !(r.type === "log" && !this.settings.captureLogLines) && !this.recentEventIds.has(r.id)) {
77
+ if (this.recentEventIds.add(r.id), this.recentEventIds.size > Gt) {
78
+ const a = this.recentEventIds.size - Gt, s = this.recentEventIds.values();
79
+ for (let l = 0; l < a; l++)
80
+ this.recentEventIds.delete(s.next().value);
81
+ }
82
+ if (this.reconcilePendingOperation(r), this.events.push(r), this.events.length > this.maxEvents + 100 && (this.events = this.events.slice(-this.maxEvents)), r.type === "subscription")
83
+ this.updateSubscription(r);
84
+ else if (r.type === "query" && r.status === "success") {
85
+ const a = this.subscriptions.get(r.queryId);
86
+ a && (a.previousValue = a.currentValue, a.updateCount++, a.lastUpdate = r.timestamp, a.currentValue = r.result, a.status = "active");
87
+ } else if (r.type === "query" && r.status === "error") {
88
+ const a = this.subscriptions.get(r.queryId);
89
+ a && (a.status = "error", a.error = r.error);
90
+ }
91
+ this.settings.autoPauseOnError && !this.isPaused && ("status" in r && r.status === "error" || r.type === "log" && r.level === "error") && (this.isPaused = !0), this.persistenceEnabled && this.settings.persistEvents && !this.persistTimer && (this.persistTimer = setTimeout(() => {
92
+ this.persistTimer = null, this.persistEvents();
93
+ }, 500)), this.listeners.forEach((a) => {
94
+ a(r);
95
+ });
96
+ }
97
+ }
98
+ /**
99
+ * Subscribe to new events
100
+ */
101
+ subscribe(r) {
102
+ return this.listeners.add(r), () => this.listeners.delete(r);
103
+ }
104
+ /**
105
+ * Subscribe to focus/navigation changes across panels
106
+ */
107
+ subscribeFocus(r) {
108
+ return this.focusListeners.add(r), () => this.focusListeners.delete(r);
109
+ }
110
+ /**
111
+ * Subscribe to settings changes
112
+ */
113
+ subscribeSettings(r) {
114
+ return this.settingsListeners.add(r), () => this.settingsListeners.delete(r);
115
+ }
116
+ /**
117
+ * Set the currently focused event (for cross-panel navigation)
118
+ */
119
+ setFocusedEventId(r) {
120
+ this.focusedEventId = r, this.focusListeners.forEach((a) => {
121
+ a(r);
122
+ });
123
+ }
124
+ /**
125
+ * Get focused event id
126
+ */
127
+ getFocusedEventId() {
128
+ return this.focusedEventId;
129
+ }
130
+ /**
131
+ * Get all events
132
+ */
133
+ getAllEvents() {
134
+ return [...this.events];
135
+ }
136
+ /**
137
+ * Get events by type
138
+ */
139
+ getEventsByType(r) {
140
+ return this.events.filter((a) => a.type === r);
141
+ }
142
+ /**
143
+ * Get recent events
144
+ */
145
+ getRecentEvents(r) {
146
+ return this.events.slice(-r);
147
+ }
148
+ /**
149
+ * Get events for a specific function
150
+ */
151
+ getEventsByFunction(r) {
152
+ return this.events.filter((a) => "udfPath" in a ? a.udfPath === r : !1);
153
+ }
154
+ /**
155
+ * Get active subscriptions
156
+ */
157
+ getActiveSubscriptions() {
158
+ return Array.from(this.subscriptions.values()).filter((r) => r.status === "active" || r.status === "error");
159
+ }
160
+ /**
161
+ * Get subscription by query ID
162
+ */
163
+ getSubscription(r) {
164
+ return this.subscriptions.get(r);
165
+ }
166
+ /**
167
+ * Calculate performance metrics
168
+ */
169
+ getPerformanceMetrics() {
170
+ const r = (x) => {
171
+ const w = typeof x == "number" ? x : typeof x == "string" ? Number(x) : Number.NaN;
172
+ return !Number.isFinite(w) || w < 0 ? null : w;
173
+ }, a = (x) => {
174
+ const w = [];
175
+ for (const g of x) {
176
+ if (g.status !== "success") continue;
177
+ const f = r(g.endToEndDurationMs ?? g.duration);
178
+ f !== null && w.push({ event: g, duration: f });
179
+ }
180
+ return w;
181
+ }, s = a(this.getEventsByType("query")), l = a(this.getEventsByType("mutation")), u = a(this.getEventsByType("action")), c = (x) => x.length === 0 ? 0 : x.reduce((g, f) => g + f, 0) / x.length, m = (x, w) => {
182
+ if (x.length === 0) return 0;
183
+ const g = [...x].sort((M, S) => M - S), f = Math.floor(g.length * w);
184
+ return g[Math.min(f, g.length - 1)] || 0;
185
+ }, E = [
186
+ ...s.map(({ event: x, duration: w }) => ({
187
+ type: "query",
188
+ eventId: x.id,
189
+ udfPath: x.udfPath,
190
+ duration: w,
191
+ timestamp: x.timestamp
192
+ })),
193
+ ...l.map(({ event: x, duration: w }) => ({
194
+ type: "mutation",
195
+ eventId: x.id,
196
+ udfPath: x.udfPath,
197
+ duration: w,
198
+ timestamp: x.timestamp
199
+ })),
200
+ ...u.map(({ event: x, duration: w }) => ({
201
+ type: "action",
202
+ eventId: x.id,
203
+ udfPath: x.udfPath,
204
+ duration: w,
205
+ timestamp: x.timestamp
206
+ }))
207
+ ].sort((x, w) => w.duration - x.duration).slice(0, 10), k = s.map(({ duration: x }) => x), C = l.map(({ duration: x }) => x), h = u.map(({ duration: x }) => x);
208
+ return {
209
+ totalQueries: s.length,
210
+ totalMutations: l.length,
211
+ totalActions: u.length,
212
+ avgQueryDuration: c(k),
213
+ avgMutationDuration: c(C),
214
+ avgActionDuration: c(h),
215
+ p50QueryDuration: m(k, 0.5),
216
+ p50MutationDuration: m(C, 0.5),
217
+ p50ActionDuration: m(h, 0.5),
218
+ p90QueryDuration: m(k, 0.9),
219
+ p90MutationDuration: m(C, 0.9),
220
+ p90ActionDuration: m(h, 0.9),
221
+ p95QueryDuration: m(k, 0.95),
222
+ p95MutationDuration: m(C, 0.95),
223
+ p95ActionDuration: m(h, 0.95),
224
+ p99QueryDuration: m(k, 0.99),
225
+ p99MutationDuration: m(C, 0.99),
226
+ p99ActionDuration: m(h, 0.99),
227
+ slowestOperations: E
228
+ };
229
+ }
230
+ /**
231
+ * Clear all events
232
+ */
233
+ clear() {
234
+ this.events = [], this.subscriptions.clear(), this.snapshots = [], this.setFocusedEventId(null), this.recentEventIds.clear(), Ht(this.storageKey), this.listeners.forEach((r) => {
235
+ r({
236
+ id: "clear",
237
+ timestamp: Date.now(),
238
+ type: "log",
239
+ level: "info",
240
+ message: "DevTools cleared"
241
+ });
242
+ });
243
+ }
244
+ /**
245
+ * Pause event capture
246
+ */
247
+ pause() {
248
+ this.isPaused = !0;
249
+ }
250
+ /**
251
+ * Resume event capture
252
+ */
253
+ resume() {
254
+ this.isPaused = !1;
255
+ }
256
+ /**
257
+ * Check if paused
258
+ */
259
+ isPausedState() {
260
+ return this.isPaused;
261
+ }
262
+ /**
263
+ * Create a snapshot of current state (for time-travel)
264
+ */
265
+ createSnapshot() {
266
+ const r = {
267
+ timestamp: Date.now(),
268
+ events: [...this.events],
269
+ subscriptions: Array.from(this.subscriptions.entries())
270
+ };
271
+ this.snapshots.push(r), this.snapshots.length > this.maxSnapshots && this.snapshots.shift();
272
+ }
273
+ /**
274
+ * Restore from a snapshot
275
+ */
276
+ restoreSnapshot(r) {
277
+ const a = this.snapshots.find((s) => s.timestamp === r);
278
+ return a ? (this.events = [...a.events], this.subscriptions = new Map(a.subscriptions), this.setFocusedEventId(null), this.listeners.forEach((s) => {
279
+ s({
280
+ id: "restore",
281
+ timestamp: Date.now(),
282
+ type: "log",
283
+ level: "info",
284
+ message: `Restored to snapshot from ${new Date(r).toLocaleTimeString()}`
285
+ });
286
+ }), !0) : !1;
287
+ }
288
+ /**
289
+ * Get all snapshots
290
+ */
291
+ getSnapshots() {
292
+ return [...this.snapshots];
293
+ }
294
+ /**
295
+ * Export session data
296
+ */
297
+ exportSession() {
298
+ return {
299
+ version: ne,
300
+ exportedAt: Date.now(),
301
+ events: [...this.events],
302
+ subscriptions: Array.from(this.subscriptions.entries()),
303
+ metadata: {
304
+ userAgent: navigator.userAgent,
305
+ url: window.location.href
306
+ }
307
+ };
308
+ }
309
+ /**
310
+ * Import session data
311
+ */
312
+ importSession(r) {
313
+ try {
314
+ if (!r || typeof r != "object" || !r.version || !r.events)
315
+ throw new Error("Invalid session format");
316
+ if (this.events = [], this.subscriptions.clear(), this.setFocusedEventId(null), this.events = this.sanitizeEvents(r.events).slice(-this.maxEvents), Array.isArray(r.subscriptions)) {
317
+ const a = r.subscriptions.filter(
318
+ (s) => Array.isArray(s) && s.length === 2 && typeof s[0] == "number" && Number.isFinite(s[0]) && typeof s[1] == "object" && s[1] !== null
319
+ );
320
+ this.subscriptions = new Map(a);
321
+ }
322
+ return this.listeners.forEach((a) => {
323
+ a({
324
+ id: "import",
325
+ timestamp: Date.now(),
326
+ type: "log",
327
+ level: "info",
328
+ message: `Imported ${this.events.length} events`
329
+ });
330
+ }), !0;
331
+ } catch (a) {
332
+ return console.error("[DevTools] Failed to import session:", a), !1;
333
+ }
334
+ }
335
+ /**
336
+ * Save settings
337
+ */
338
+ saveSettings(r) {
339
+ this.settings = { ...this.settings, ...r }, this.persistenceEnabled || (this.settings.persistEvents = !1);
340
+ const a = this.normalizeMaxEvents(this.settings.maxEvents);
341
+ this.settings.maxEvents !== a && (this.settings.maxEvents = a), a !== this.maxEvents && (this.maxEvents = a), this.events.length > this.maxEvents && (this.events = this.events.slice(-this.maxEvents)), this.syncLatencyConfig(), this.persistenceEnabled && jt(this.settingsKey, JSON.stringify(this.settings)), this.notifySettingsChanged();
342
+ }
343
+ /**
344
+ * Get settings
345
+ */
346
+ getSettings() {
347
+ return { ...this.settings };
348
+ }
349
+ /**
350
+ * Whether this store supports local persistence
351
+ */
352
+ isPersistenceEnabled() {
353
+ return this.persistenceEnabled;
354
+ }
355
+ /**
356
+ * Load settings from localStorage
357
+ */
358
+ loadSettings() {
359
+ if (this.persistenceEnabled) {
360
+ try {
361
+ const r = Ot(this.settingsKey);
362
+ r && (this.settings = { ...this.settings, ...JSON.parse(r) }, this.maxEvents = this.normalizeMaxEvents(this.settings.maxEvents), this.settings.maxEvents = this.maxEvents);
363
+ } catch (r) {
364
+ console.warn("[DevTools] Failed to load settings:", r);
365
+ }
366
+ this.syncLatencyConfig();
367
+ }
368
+ }
369
+ /**
370
+ * Push latency settings to the shared window config object
371
+ * that the WebSocket interceptors read on every send/receive.
372
+ */
373
+ syncLatencyConfig() {
374
+ try {
375
+ window.__concaveDevToolsLatencyConfig = {
376
+ latencyMs: this.settings.wsLatencyMs || 0,
377
+ jitterMs: this.settings.wsJitterMs || 0
378
+ };
379
+ } catch {
380
+ }
381
+ }
382
+ notifySettingsChanged() {
383
+ const r = this.getSettings();
384
+ this.settingsListeners.forEach((a) => {
385
+ a(r);
386
+ });
387
+ }
388
+ /**
389
+ * Persist events to localStorage
390
+ */
391
+ persistEvents() {
392
+ if (!(!this.persistenceEnabled || !this.settings.persistEvents))
393
+ try {
394
+ const r = this.events.slice(-100);
395
+ jt(this.storageKey, JSON.stringify(r));
396
+ } catch (r) {
397
+ console.warn("[DevTools] Failed to persist events:", r);
398
+ }
399
+ }
400
+ /**
401
+ * Load persisted events from localStorage
402
+ */
403
+ loadPersistedEvents() {
404
+ if (!(!this.persistenceEnabled || !this.settings.persistEvents))
405
+ try {
406
+ const r = Ot(this.storageKey);
407
+ if (r) {
408
+ const a = this.sanitizeEvents(JSON.parse(r));
409
+ this.events = a.slice(-this.maxEvents);
410
+ }
411
+ } catch (r) {
412
+ console.warn("[DevTools] Failed to load persisted events:", r), Ht(this.storageKey);
413
+ }
414
+ }
415
+ /**
416
+ * Update subscription tracking
417
+ */
418
+ updateSubscription(r) {
419
+ r.status === "added" ? this.subscriptions.set(r.queryId, {
420
+ queryId: r.queryId,
421
+ udfPath: r.udfPath,
422
+ args: r.args,
423
+ componentPath: r.componentPath,
424
+ addedAt: r.timestamp,
425
+ updateCount: 0,
426
+ lastUpdate: r.timestamp,
427
+ status: "active"
428
+ }) : r.status === "removed" && this.subscriptions.delete(r.queryId);
429
+ }
430
+ sanitizeEvents(r) {
431
+ return Array.isArray(r) ? r.filter((a) => this.isEventLike(a)) : [];
432
+ }
433
+ isEventLike(r) {
434
+ if (!r || typeof r != "object") return !1;
435
+ const a = r;
436
+ return !(typeof a.id != "string" || typeof a.type != "string" || typeof a.timestamp != "number" || !Number.isFinite(a.timestamp));
437
+ }
438
+ normalizeMaxEvents(r) {
439
+ const a = typeof r == "number" ? r : Number(r);
440
+ if (!Number.isFinite(a))
441
+ return 1e3;
442
+ const s = Math.round(a);
443
+ return Math.min(St.MAX_EVENTS, Math.max(St.MIN_EVENTS, s));
444
+ }
445
+ isOperationEvent(r) {
446
+ return r.type === "query" || r.type === "mutation" || r.type === "action";
447
+ }
448
+ isTerminalOperationEvent(r) {
449
+ return this.isOperationEvent(r) && (r.status === "success" || r.status === "error");
450
+ }
451
+ isMatchingPendingOperation(r, a) {
452
+ return !this.isOperationEvent(r) || r.type !== a.type || r.status !== "pending" ? !1 : a.type === "query" ? r.type === "query" && r.queryId === a.queryId : r.type !== "query" && r.requestId === a.requestId;
453
+ }
454
+ reconcilePendingOperation(r) {
455
+ this.isTerminalOperationEvent(r) && this.events.length !== 0 && (this.events = this.events.filter((a) => !this.isMatchingPendingOperation(a, r)));
456
+ }
457
+ }
458
+ let At = null;
459
+ function ce() {
460
+ return At || (At = new St()), At;
461
+ }
462
+ const pe = "#f97316", ue = 6, xe = "M16 6 Q 9.2 13.3 8 22 Q 16 19 24 22 Q 22.8 13.3 16 6 Z";
463
+ function O(o) {
464
+ const r = document.featurePolicy ?? document.permissionsPolicy;
465
+ (r ? r.allowsFeature("clipboard-write") : !0) && navigator.clipboard?.writeText ? navigator.clipboard.writeText(o).then(Tt, () => {
466
+ Xt(o), Tt();
467
+ }) : (Xt(o), Tt());
468
+ }
469
+ function Tt() {
470
+ const o = document.createElement("div");
471
+ o.textContent = "Copied!", o.style.cssText = "position:fixed;bottom:16px;left:50%;transform:translateX(-50%);z-index:99999999;padding:4px 12px;border-radius:6px;font:500 11px/1.4 system-ui,sans-serif;color:#e4e4e7;background:rgba(39,39,42,0.95);border:1px solid rgba(63,63,70,0.6);box-shadow:0 4px 12px rgba(0,0,0,0.4);pointer-events:none;animation:dt-fade-in 0.15s ease-out;opacity:1;transition:opacity 0.2s;", document.body.appendChild(o), setTimeout(() => {
472
+ o.style.opacity = "0";
473
+ }, 600), setTimeout(() => {
474
+ o.remove();
475
+ }, 800);
476
+ }
477
+ function Xt(o) {
478
+ const r = document.createElement("textarea");
479
+ r.value = o, r.style.cssText = "position:fixed;opacity:0;pointer-events:none;", document.body.appendChild(r), r.select();
480
+ try {
481
+ document.execCommand("copy");
482
+ } catch {
483
+ }
484
+ document.body.removeChild(r);
485
+ }
486
+ function lt(o) {
487
+ return Array.isArray(o) && o.length === 1 ? o[0] : o;
488
+ }
489
+ const he = {
490
+ maxStringLength: 40,
491
+ stringTailLength: 10,
492
+ maxArrayItems: 2,
493
+ maxObjectEntries: 2,
494
+ maxDepth: 2
495
+ };
496
+ function be(o, r, a) {
497
+ if (o.length <= r)
498
+ return o;
499
+ const s = Math.max(12, r), l = Math.max(
500
+ 4,
501
+ Math.min(a, Math.floor(s / 2))
502
+ ), u = Math.max(6, s - l - 1);
503
+ return `${o.slice(0, u)}…${o.slice(-l)}`;
504
+ }
505
+ function wt(o, r = {}, a = 0) {
506
+ const s = {
507
+ ...he,
508
+ ...r
509
+ };
510
+ if (o === null) return "null";
511
+ if (o === void 0) return "undefined";
512
+ if (typeof o == "string")
513
+ return `"${be(
514
+ o,
515
+ s.maxStringLength,
516
+ s.stringTailLength
517
+ )}"`;
518
+ if (typeof o == "number" || typeof o == "boolean")
519
+ return String(o);
520
+ if (Array.isArray(o)) {
521
+ if (o.length === 0) return "[]";
522
+ if (a >= s.maxDepth) return "[…]";
523
+ const l = o.slice(0, s.maxArrayItems).map((c) => wt(c, s, a + 1)), u = o.length > s.maxArrayItems ? ", …" : "";
524
+ return `[${l.join(", ")}${u}]`;
525
+ }
526
+ if (typeof o == "object") {
527
+ const l = Object.entries(o);
528
+ if (l.length === 0) return "{}";
529
+ if (a >= s.maxDepth) return "{…}";
530
+ const u = l.slice(0, s.maxObjectEntries).map(([m, E]) => `${m}: ${wt(E, s, a + 1)}`), c = l.length > s.maxObjectEntries ? ", …" : "";
531
+ return `{${u.join(", ")}${c}}`;
532
+ }
533
+ return String(o);
534
+ }
535
+ function tt(o, r = 180) {
536
+ try {
537
+ const a = JSON.stringify(o, null, 2);
538
+ return a ? a.length <= r ? a : `${a.slice(0, r - 1)}…` : "";
539
+ } catch {
540
+ return String(o);
541
+ }
542
+ }
543
+ function gt({
544
+ data: o,
545
+ label: r,
546
+ onCopy: a,
547
+ maxHeight: s = 300
548
+ }) {
549
+ const [l, u] = _(!0), [c, m] = _("tree"), [E, k] = _(""), C = () => {
550
+ O(JSON.stringify(o, null, 2)), a?.();
551
+ }, h = it(() => JSON.stringify(o, null, 2), [o]), x = it(() => {
552
+ if (!E) return null;
553
+ const g = /* @__PURE__ */ new Set(), f = E.toLowerCase();
554
+ function M(S, q) {
555
+ if (S === null) {
556
+ "null".includes(f) && g.add(q);
557
+ return;
558
+ }
559
+ if (typeof S == "string" || typeof S == "number" || typeof S == "boolean") {
560
+ String(S).toLowerCase().includes(f) && g.add(q);
561
+ return;
562
+ }
563
+ if (Array.isArray(S)) {
564
+ for (let p = 0; p < S.length; p++) {
565
+ const D = `${q}[${p}]`;
566
+ M(S[p], D);
567
+ }
568
+ return;
569
+ }
570
+ if (typeof S == "object")
571
+ for (const [p, D] of Object.entries(S)) {
572
+ const A = `${q}.${p}`;
573
+ p.toLowerCase().includes(f) && g.add(A), M(D, A);
574
+ }
575
+ }
576
+ return M(o, "$"), g;
577
+ }, [o, E]), w = x?.size ?? 0;
578
+ return /* @__PURE__ */ n("div", { className: "flex flex-col gap-1 text-[12px]", role: "region", "aria-label": r || "Data Inspector", children: [
579
+ r && /* @__PURE__ */ n("div", { className: "flex items-center justify-between", children: [
580
+ /* @__PURE__ */ n(
581
+ "button",
582
+ {
583
+ className: "flex items-center gap-1 bg-transparent border-none text-dt-text-tertiary cursor-pointer text-[11px] font-semibold uppercase tracking-wider p-0 hover:text-dt-text-secondary transition-colors",
584
+ onClick: () => u(!l),
585
+ "aria-expanded": l,
586
+ "aria-controls": `inspector-content-${r}`,
587
+ "aria-label": `${l ? "Collapse" : "Expand"} ${r}`,
588
+ children: [
589
+ /* @__PURE__ */ t("span", { className: `text-[10px] transition-transform ${l ? "rotate-90" : ""}`, "aria-hidden": "true", children: "▶" }),
590
+ /* @__PURE__ */ t("span", { children: r })
591
+ ]
592
+ }
593
+ ),
594
+ /* @__PURE__ */ n("div", { className: "flex items-center gap-0.5", role: "toolbar", "aria-label": "Inspector actions", children: [
595
+ /* @__PURE__ */ t(
596
+ "button",
597
+ {
598
+ className: `px-1.5 py-0.5 text-[10px] bg-transparent border border-transparent rounded cursor-pointer transition-all ${c === "tree" ? "bg-white/10 text-dt-text-secondary border-dt-border-light" : "text-dt-text-muted hover:text-dt-text-tertiary"}`,
599
+ onClick: () => m("tree"),
600
+ title: "Tree view",
601
+ "aria-label": "Tree view",
602
+ "aria-pressed": c === "tree",
603
+ children: "Tree"
604
+ }
605
+ ),
606
+ /* @__PURE__ */ t(
607
+ "button",
608
+ {
609
+ className: `px-1.5 py-0.5 text-[10px] bg-transparent border border-transparent rounded cursor-pointer transition-all ${c === "raw" ? "bg-white/10 text-dt-text-secondary border-dt-border-light" : "text-dt-text-muted hover:text-dt-text-tertiary"}`,
610
+ onClick: () => m("raw"),
611
+ title: "Raw JSON",
612
+ "aria-label": "Raw JSON view",
613
+ "aria-pressed": c === "raw",
614
+ children: "Raw"
615
+ }
616
+ ),
617
+ /* @__PURE__ */ t(
618
+ "button",
619
+ {
620
+ className: "p-0.5 bg-transparent border-none text-dt-text-muted cursor-pointer rounded hover:text-dt-text-tertiary transition-colors text-[12px]",
621
+ onClick: C,
622
+ title: "Copy JSON",
623
+ "aria-label": "Copy JSON to clipboard",
624
+ children: /* @__PURE__ */ n("svg", { width: "12", height: "12", viewBox: "0 0 16 16", fill: "currentColor", children: [
625
+ /* @__PURE__ */ t("path", { d: "M4 1.5H3a2 2 0 0 0-2 2V14a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V3.5a2 2 0 0 0-2-2h-1v1h1a1 1 0 0 1 1 1V14a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V3.5a1 1 0 0 1 1-1h1v-1z" }),
626
+ /* @__PURE__ */ t("path", { d: "M9.5 1a.5.5 0 0 1 .5.5v1a.5.5 0 0 1-.5.5h-3a.5.5 0 0 1-.5-.5v-1a.5.5 0 0 1 .5-.5h3zm-3-1A1.5 1.5 0 0 0 5 1.5v1A1.5 1.5 0 0 0 6.5 4h3A1.5 1.5 0 0 0 11 2.5v-1A1.5 1.5 0 0 0 9.5 0h-3z" })
627
+ ] })
628
+ }
629
+ )
630
+ ] })
631
+ ] }),
632
+ l && /* @__PURE__ */ n("div", { className: "flex flex-col", children: [
633
+ /* @__PURE__ */ n("div", { className: "flex items-center gap-1.5 px-2 py-1 bg-zinc-950/50 rounded-t border border-b-0 border-dt-border-light", children: [
634
+ /* @__PURE__ */ t(
635
+ "input",
636
+ {
637
+ type: "text",
638
+ className: "flex-1 bg-transparent border-none text-[10px] font-mono text-dt-text-secondary placeholder-dt-text-muted/40 outline-none",
639
+ placeholder: "Filter...",
640
+ value: E,
641
+ onChange: (g) => k(g.target.value)
642
+ }
643
+ ),
644
+ E && /* @__PURE__ */ n(G, { children: [
645
+ /* @__PURE__ */ n("span", { className: "text-[9px] text-dt-text-muted/60 font-mono", children: [
646
+ w,
647
+ " match",
648
+ w !== 1 ? "es" : ""
649
+ ] }),
650
+ /* @__PURE__ */ t(
651
+ "button",
652
+ {
653
+ className: "bg-transparent border-none text-dt-text-muted cursor-pointer text-[10px] p-0 hover:text-dt-text-secondary",
654
+ onClick: () => k(""),
655
+ "aria-label": "Clear search",
656
+ children: "×"
657
+ }
658
+ )
659
+ ] })
660
+ ] }),
661
+ /* @__PURE__ */ t(
662
+ "div",
663
+ {
664
+ className: "overflow-auto bg-zinc-950/50 rounded-b border border-dt-border-light p-2 font-mono text-[11px]",
665
+ id: r ? `inspector-content-${r}` : void 0,
666
+ style: { maxHeight: s },
667
+ role: "region",
668
+ "aria-label": `${r || "Data"} content`,
669
+ children: c === "tree" ? /* @__PURE__ */ t(Rt, { data: o, matchingPaths: x, searchTerm: E }) : /* @__PURE__ */ t("pre", { className: "text-dt-text-muted whitespace-pre-wrap break-all m-0", "aria-readonly": "true", children: E ? /* @__PURE__ */ t(me, { text: h, term: E }) : h })
670
+ }
671
+ )
672
+ ] })
673
+ ] });
674
+ }
675
+ function me({ text: o, term: r }) {
676
+ if (!r) return /* @__PURE__ */ t(G, { children: o });
677
+ const a = [], s = o.toLowerCase(), l = r.toLowerCase();
678
+ let u = 0, c = s.indexOf(l, u), m = 0;
679
+ for (; c !== -1; )
680
+ c > u && a.push(o.slice(u, c)), a.push(
681
+ /* @__PURE__ */ t("mark", { className: "bg-yellow-400/30 text-yellow-200 rounded-sm px-px", children: o.slice(c, c + r.length) }, m++)
682
+ ), u = c + r.length, c = s.indexOf(l, u);
683
+ return u < o.length && a.push(o.slice(u)), /* @__PURE__ */ t(G, { children: a });
684
+ }
685
+ function Rt({ data: o, depth: r = 0, path: a = "$", matchingPaths: s, searchTerm: l }) {
686
+ const u = s ? zt(a, s) : !1, [c, m] = _(r < 2), E = s?.has(a) ?? !1, k = c || !!s && u;
687
+ if (o === null)
688
+ return /* @__PURE__ */ t("span", { className: `italic ${E ? "bg-yellow-400/25 rounded-sm px-0.5 text-yellow-200" : "text-dt-text-muted"}`, children: "null" });
689
+ if (typeof o == "string")
690
+ return /* @__PURE__ */ n("span", { className: E ? "bg-yellow-400/25 rounded-sm px-0.5 text-yellow-200" : "text-dt-success", children: [
691
+ '"',
692
+ l ? /* @__PURE__ */ t(Yt, { text: o, term: l }) : o,
693
+ '"'
694
+ ] });
695
+ if (typeof o == "number")
696
+ return /* @__PURE__ */ t("span", { className: E ? "bg-yellow-400/25 rounded-sm px-0.5 text-yellow-200" : "text-dt-query", children: o });
697
+ if (typeof o == "boolean")
698
+ return /* @__PURE__ */ t("span", { className: E ? "bg-yellow-400/25 rounded-sm px-0.5 text-yellow-200" : "text-dt-mutation", children: o.toString() });
699
+ if (Array.isArray(o))
700
+ return o.length === 0 ? /* @__PURE__ */ t("span", { className: "text-dt-text-muted", children: "[]" }) : /* @__PURE__ */ n("div", { className: "inline", children: [
701
+ /* @__PURE__ */ n(
702
+ "button",
703
+ {
704
+ type: "button",
705
+ className: "bg-transparent border-none cursor-pointer p-0 text-inherit font-inherit inline-flex items-center gap-0.5",
706
+ onClick: () => m(!k),
707
+ "aria-expanded": k,
708
+ "aria-label": `${k ? "Collapse" : "Expand"} array with ${o.length} items`,
709
+ children: [
710
+ /* @__PURE__ */ t("span", { className: `text-[10px] transition-transform inline-block ${k ? "rotate-90" : ""}`, "aria-hidden": "true", children: "▶" }),
711
+ /* @__PURE__ */ t("span", { className: "text-dt-text-muted", children: "[" }),
712
+ !k && /* @__PURE__ */ n("span", { className: "text-dt-text-muted/60 italic text-[10px]", children: [
713
+ o.length,
714
+ " items..."
715
+ ] }),
716
+ !k && /* @__PURE__ */ t("span", { className: "text-dt-text-muted", children: "]" })
717
+ ]
718
+ }
719
+ ),
720
+ k && /* @__PURE__ */ n(G, { children: [
721
+ /* @__PURE__ */ t("div", { className: "pl-4 border-l border-dt-border-light/30 ml-1", children: o.map((C, h) => {
722
+ const x = `${a}[${h}]`;
723
+ return s && !zt(x, s) && !s.has(x) ? null : /* @__PURE__ */ n("div", { className: "py-px", children: [
724
+ /* @__PURE__ */ n("span", { className: "text-dt-text-tertiary", children: [
725
+ h,
726
+ ":"
727
+ ] }),
728
+ " ",
729
+ /* @__PURE__ */ t(Rt, { data: C, depth: r + 1, path: x, matchingPaths: s, searchTerm: l })
730
+ ] }, h);
731
+ }) }),
732
+ /* @__PURE__ */ t("span", { className: "text-dt-text-muted", children: "]" })
733
+ ] })
734
+ ] });
735
+ if (typeof o == "object") {
736
+ const C = Object.entries(o);
737
+ return C.length === 0 ? /* @__PURE__ */ t("span", { className: "text-dt-text-muted", children: "{}" }) : /* @__PURE__ */ n("div", { className: "inline", children: [
738
+ /* @__PURE__ */ n(
739
+ "button",
740
+ {
741
+ type: "button",
742
+ className: "bg-transparent border-none cursor-pointer p-0 text-inherit font-inherit inline-flex items-center gap-0.5",
743
+ onClick: () => m(!k),
744
+ "aria-expanded": k,
745
+ "aria-label": `${k ? "Collapse" : "Expand"} object with ${C.length} keys`,
746
+ children: [
747
+ /* @__PURE__ */ t("span", { className: `text-[10px] transition-transform inline-block ${k ? "rotate-90" : ""}`, "aria-hidden": "true", children: "▶" }),
748
+ /* @__PURE__ */ t("span", { className: "text-dt-text-muted", children: "{" }),
749
+ !k && /* @__PURE__ */ n("span", { className: "text-dt-text-muted/60 italic text-[10px]", children: [
750
+ C.length,
751
+ " keys..."
752
+ ] }),
753
+ !k && /* @__PURE__ */ t("span", { className: "text-dt-text-muted", children: "}" })
754
+ ]
755
+ }
756
+ ),
757
+ k && /* @__PURE__ */ n(G, { children: [
758
+ /* @__PURE__ */ t("div", { className: "pl-4 border-l border-dt-border-light/30 ml-1", children: C.map(([h, x]) => {
759
+ const w = `${a}.${h}`, g = s?.has(w) && l && h.toLowerCase().includes(l.toLowerCase());
760
+ return s && !zt(w, s) && !s.has(w) ? null : /* @__PURE__ */ n("div", { className: "py-px", children: [
761
+ /* @__PURE__ */ n("span", { className: g ? "bg-yellow-400/25 rounded-sm px-0.5 text-yellow-200" : "text-dt-text-tertiary", children: [
762
+ '"',
763
+ l ? /* @__PURE__ */ t(Yt, { text: h, term: l }) : h,
764
+ '":'
765
+ ] }),
766
+ " ",
767
+ /* @__PURE__ */ t(Rt, { data: x, depth: r + 1, path: w, matchingPaths: s, searchTerm: l })
768
+ ] }, h);
769
+ }) }),
770
+ /* @__PURE__ */ t("span", { className: "text-dt-text-muted", children: "}" })
771
+ ] })
772
+ ] });
773
+ }
774
+ return /* @__PURE__ */ t("span", { className: "text-dt-text-muted", children: String(o) });
775
+ }
776
+ function zt(o, r) {
777
+ for (const a of r)
778
+ if (a.startsWith(o) && a !== o) return !0;
779
+ return !1;
780
+ }
781
+ function Yt({ text: o, term: r }) {
782
+ if (!r) return /* @__PURE__ */ t(G, { children: o });
783
+ const a = o.toLowerCase(), s = r.toLowerCase(), l = [];
784
+ let u = 0, c = a.indexOf(s, u), m = 0;
785
+ for (; c !== -1; )
786
+ c > u && l.push(o.slice(u, c)), l.push(
787
+ /* @__PURE__ */ t("mark", { className: "bg-yellow-400/30 text-yellow-200 rounded-sm px-px", children: o.slice(c, c + r.length) }, m++)
788
+ ), u = c + r.length, c = a.indexOf(s, u);
789
+ return u < o.length && l.push(o.slice(u)), /* @__PURE__ */ t(G, { children: l });
790
+ }
791
+ const Jt = ie.forwardRef(
792
+ ({ value: o, onValueChange: r, onClear: a, placeholder: s, className: l = "", ...u }, c) => {
793
+ const m = () => {
794
+ a ? a() : r("");
795
+ };
796
+ return /* @__PURE__ */ n("div", { className: `relative flex items-center ${l === "stretch" ? "flex-1" : ""}`, role: "search", children: [
797
+ /* @__PURE__ */ t(
798
+ "input",
799
+ {
800
+ ...u,
801
+ ref: c,
802
+ type: "search",
803
+ className: "w-full bg-dt-bg-tertiary/50 border border-dt-border-light rounded-md px-2.5 pr-7 py-1 text-[11px] text-dt-text-secondary placeholder:text-dt-text-muted/50 outline-none focus:border-dt-info/50 focus:bg-dt-bg-tertiary transition-colors font-sans [&::-webkit-search-cancel-button]:hidden",
804
+ value: o,
805
+ onChange: (E) => r(E.target.value),
806
+ placeholder: s,
807
+ spellCheck: u.spellCheck ?? !1,
808
+ "aria-label": u["aria-label"] || s || "Search"
809
+ }
810
+ ),
811
+ o && /* @__PURE__ */ t(
812
+ "button",
813
+ {
814
+ type: "button",
815
+ className: "absolute right-1.5 p-0.5 bg-transparent border-none text-dt-text-muted cursor-pointer rounded hover:text-dt-text-tertiary transition-colors",
816
+ onClick: m,
817
+ "aria-label": "Clear search",
818
+ title: "Clear search",
819
+ children: /* @__PURE__ */ t("svg", { width: "12", height: "12", viewBox: "0 0 16 16", fill: "currentColor", "aria-hidden": "true", children: /* @__PURE__ */ t("path", { d: "M3.646 3.646a.5.5 0 0 1 .708 0L8 7.293l3.646-3.647a.5.5 0 0 1 .708.708L8.707 8l3.647 3.646a.5.5 0 0 1-.708.708L8 8.707l-3.646 3.647a.5.5 0 0 1-.708-.708L7.293 8 3.646 4.354a.5.5 0 0 1 0-.708Z" }) })
820
+ }
821
+ )
822
+ ] });
823
+ }
824
+ );
825
+ function Ut({ x: o, y: r, items: a, onClose: s }) {
826
+ const [l, u] = _(-1), c = ft(null), [m, E] = _({ x: o, y: r });
827
+ J(() => {
828
+ const h = c.current;
829
+ if (!h) return;
830
+ const x = 8, w = h.getBoundingClientRect(), g = window.innerWidth, f = window.innerHeight;
831
+ let M = o, S = r;
832
+ o + w.width > g - x && (M = Math.max(x, g - w.width - x)), r + w.height > f - x && (S = Math.max(x, f - w.height - x)), (M !== m.x || S !== m.y) && E({ x: M, y: S });
833
+ }, [o, r]), J(() => {
834
+ const h = (M) => {
835
+ c.current && !c.current.contains(M.target) && s();
836
+ }, x = (M) => {
837
+ c.current && !c.current.contains(M.target) && s();
838
+ }, w = () => s(), g = () => s(), f = setTimeout(() => {
839
+ document.addEventListener("mousedown", h), document.addEventListener("contextmenu", x);
840
+ }, 0);
841
+ return window.addEventListener("scroll", w, !0), window.addEventListener("blur", g), () => {
842
+ clearTimeout(f), document.removeEventListener("mousedown", h), document.removeEventListener("contextmenu", x), window.removeEventListener("scroll", w, !0), window.removeEventListener("blur", g);
843
+ };
844
+ }, [s]);
845
+ const k = a.map((h, x) => ({ ...h, index: x })).filter((h) => !h.disabled), C = V(
846
+ (h) => {
847
+ if (h.key === "Escape") {
848
+ h.preventDefault(), h.stopPropagation(), s();
849
+ return;
850
+ }
851
+ if (h.key === "ArrowDown") {
852
+ h.preventDefault(), u((x) => {
853
+ const w = k.findIndex((f) => f.index === x), g = w < k.length - 1 ? w + 1 : 0;
854
+ return k[g].index;
855
+ });
856
+ return;
857
+ }
858
+ if (h.key === "ArrowUp") {
859
+ h.preventDefault(), u((x) => {
860
+ const w = k.findIndex((f) => f.index === x), g = w > 0 ? w - 1 : k.length - 1;
861
+ return k[g].index;
862
+ });
863
+ return;
864
+ }
865
+ if (h.key === "Enter") {
866
+ h.preventDefault(), l >= 0 && !a[l].disabled && (a[l].action(), s());
867
+ return;
868
+ }
869
+ },
870
+ [s, l, a, k]
871
+ );
872
+ return J(() => (window.addEventListener("keydown", C, !0), () => window.removeEventListener("keydown", C, !0)), [C]), J(() => {
873
+ k.length > 0 && l === -1 && u(k[0].index);
874
+ }, []), /* @__PURE__ */ t(
875
+ "div",
876
+ {
877
+ ref: c,
878
+ className: "fixed z-[9999999] min-w-[180px] max-w-[280px] bg-zinc-900/[0.98] backdrop-blur-lg border border-dt-border rounded-lg shadow-2xl py-1 animate-[dt-fade-in_0.1s_ease-out]",
879
+ style: { top: m.y, left: m.x },
880
+ role: "menu",
881
+ onContextMenu: (h) => h.preventDefault(),
882
+ children: a.map((h, x) => /* @__PURE__ */ n("div", { children: [
883
+ h.separator && x > 0 && /* @__PURE__ */ t("div", { className: "border-t border-dt-border-light/40 my-0.5", role: "separator" }),
884
+ /* @__PURE__ */ n(
885
+ "button",
886
+ {
887
+ className: `flex items-center w-full px-3 py-1.5 text-[12px] text-left bg-transparent border-none cursor-pointer transition-colors ${h.disabled ? "opacity-40 pointer-events-none text-dt-text-muted" : l === x ? "bg-white/[0.08] text-dt-text-secondary" : "text-dt-text-secondary hover:bg-white/[0.06]"}`,
888
+ role: "menuitem",
889
+ tabIndex: -1,
890
+ disabled: h.disabled,
891
+ onMouseEnter: () => {
892
+ h.disabled || u(x);
893
+ },
894
+ onClick: (w) => {
895
+ w.stopPropagation(), h.disabled || (h.action(), s());
896
+ },
897
+ children: [
898
+ /* @__PURE__ */ t("span", { className: "flex-1 truncate", children: h.label }),
899
+ h.shortcut && /* @__PURE__ */ t("span", { className: "text-dt-text-muted font-mono text-[11px] ml-4 shrink-0", children: h.shortcut })
900
+ ]
901
+ }
902
+ )
903
+ ] }, x))
904
+ }
905
+ );
906
+ }
907
+ function Mt(o) {
908
+ return o.type === "query" || o.type === "mutation" || o.type === "action";
909
+ }
910
+ function Ft(o) {
911
+ return o.type === "auth";
912
+ }
913
+ function Nt(o) {
914
+ return Mt(o) || Ft(o);
915
+ }
916
+ const ge = `
917
+ .cdv-json-key { color: var(--color-dt-text-tertiary); }
918
+ .cdv-json-string { color: var(--color-dt-success); }
919
+ .cdv-json-number { color: var(--color-dt-query); }
920
+ .cdv-json-boolean { color: var(--color-dt-mutation); }
921
+ .cdv-json-null { color: var(--color-dt-text-muted); }
922
+ .cdv-json-value { color: var(--color-dt-text-secondary); }
923
+ `, Et = 100, Zt = 100, pt = 4e3, fe = {
924
+ maxStringLength: 128,
925
+ stringTailLength: 24,
926
+ maxArrayItems: 4,
927
+ maxObjectEntries: 4,
928
+ maxDepth: 3
929
+ };
930
+ function qt(o) {
931
+ if (o == null) return "";
932
+ if (typeof o == "string")
933
+ return o.length > pt ? o.slice(0, pt) : o;
934
+ try {
935
+ const r = JSON.stringify(o);
936
+ return r ? r.length > pt ? r.slice(0, pt) : r : "";
937
+ } catch {
938
+ const r = String(o);
939
+ return r.length > pt ? r.slice(0, pt) : r;
940
+ }
941
+ }
942
+ function we(o) {
943
+ const [r, a] = o.split("-", 3);
944
+ return r === "query" && a ? `Q${a}` : r === "mutation" && a ? `M${a}` : r === "action" && a ? `A${a}` : o;
945
+ }
946
+ function ve({ eventStore: o, panelConnectionState: r }) {
947
+ const [a, s] = _([]), [l, u] = _("all"), [c, m] = _(""), [E, k] = _(Et), [C, h] = _(null), [x, w] = _(0), [g, f] = _(null), [M, S] = _(null), q = ft(null), p = C && Mt(C) ? C : null, D = C && Ft(C) ? C : null, A = V(() => {
948
+ k(Et), w(0);
949
+ }, []), i = V((e) => {
950
+ u(e), A();
951
+ }, [A]), d = V((e) => {
952
+ m(e), A();
953
+ }, [A]);
954
+ J(() => {
955
+ const e = () => {
956
+ s(o.getAllEvents());
957
+ }, y = o.subscribe(e);
958
+ return e(), y;
959
+ }, [o]), J(() => {
960
+ const e = (v) => {
961
+ if (!v) return;
962
+ const z = o.getAllEvents().find(($) => $.id === v);
963
+ if (!z || !Nt(z)) return;
964
+ u("all"), m(""), k(Et), f(null), S(null), h(z), w(0);
965
+ const L = o.getAllEvents().filter(Nt).sort(($, K) => K.timestamp - $.timestamp).findIndex(($) => $.id === v);
966
+ L >= 0 && (k(($) => Math.max($, Et, L + 1)), w(L));
967
+ }, y = o.subscribeFocus(e);
968
+ return e(o.getFocusedEventId()), y;
969
+ }, [o]);
970
+ const b = V((e) => {
971
+ const y = lt(e.args), v = [
972
+ e.id,
973
+ e.type,
974
+ e.status,
975
+ e.udfPath
976
+ ];
977
+ if (e.componentPath && v.push(e.componentPath), e.type === "query")
978
+ v.push(String(e.queryId), `q${e.queryId}`), e.triggeredBy && v.push(e.triggeredBy);
979
+ else {
980
+ const z = e.type === "mutation" ? "m" : "a";
981
+ v.push(String(e.requestId), `${z}${e.requestId}`);
982
+ }
983
+ return v.push(qt(y)), e.result !== void 0 && v.push(qt(e.result)), e.error && v.push(e.error), e.logLines && e.logLines.length > 0 && v.push(e.logLines.join(`
984
+ `)), typeof e.duration == "number" && v.push(`${e.duration}`, `${e.duration}ms`), typeof e.simulatedDelayMs == "number" && e.simulatedDelayMs > 0 && v.push(`simulated ${e.simulatedDelayMs}`, `delay ${e.simulatedDelayMs}ms`), typeof e.endToEndDurationMs == "number" && v.push(`${e.endToEndDurationMs}`, `${e.endToEndDurationMs}ms`, "end-to-end"), v.join(`
985
+ `).toLowerCase();
986
+ }, []), P = V((e) => {
987
+ if (Mt(e))
988
+ return b(e);
989
+ const y = [
990
+ e.id,
991
+ e.type,
992
+ e.status,
993
+ e.direction,
994
+ e.messageType
995
+ ];
996
+ return e.tokenType && y.push(e.tokenType), e.error && y.push(e.error), e.details !== void 0 && y.push(qt(e.details)), y.join(`
997
+ `).toLowerCase();
998
+ }, [b]), { filteredEvents: I, totalMatchCount: T, hasMoreResults: X } = it(() => {
999
+ let e = a.filter(Nt);
1000
+ l !== "all" && (l === "error" ? e = e.filter((N) => N.status === "error") : e = e.filter((N) => N.type === l));
1001
+ const y = c.trim().toLowerCase().split(/\s+/).filter((N) => N.length > 0);
1002
+ y.length > 0 && (e = e.filter((N) => {
1003
+ const L = P(N);
1004
+ return y.every(($) => L.includes($));
1005
+ }));
1006
+ const v = e.sort((N, L) => L.timestamp - N.timestamp), z = v.slice(0, E);
1007
+ return {
1008
+ filteredEvents: z,
1009
+ totalMatchCount: v.length,
1010
+ hasMoreResults: v.length > z.length
1011
+ };
1012
+ }, [a, l, c, E, P]);
1013
+ J(() => {
1014
+ if (I.length === 0) {
1015
+ w(0);
1016
+ return;
1017
+ }
1018
+ w((e) => Math.min(e, I.length - 1));
1019
+ }, [I.length]);
1020
+ const H = it(() => {
1021
+ const e = a.filter(Nt), y = e.filter(($) => $.type === "query"), v = e.filter(($) => $.type === "mutation"), z = e.filter(($) => $.type === "action"), N = e.filter(($) => $.type === "auth"), L = e.filter(($) => $.status === "error").length;
1022
+ return {
1023
+ queries: y.length,
1024
+ mutations: v.length,
1025
+ actions: z.length,
1026
+ auth: N.length,
1027
+ errors: L,
1028
+ total: y.length + v.length + z.length + N.length
1029
+ };
1030
+ }, [a]), Y = !!r?.waitingForConnection && l === "all" && !c;
1031
+ J(() => {
1032
+ const e = (y) => {
1033
+ if ((y.metaKey || y.ctrlKey) && y.key === "k") {
1034
+ y.preventDefault(), q.current?.focus();
1035
+ return;
1036
+ }
1037
+ if (y.key === "Escape") {
1038
+ y.preventDefault(), C ? h(null) : (l !== "all" || c) && (i("all"), d(""));
1039
+ return;
1040
+ }
1041
+ if (document.activeElement !== q.current && I.length !== 0) {
1042
+ if (y.key === "ArrowDown")
1043
+ y.preventDefault(), w((v) => Math.min(v + 1, I.length - 1));
1044
+ else if (y.key === "ArrowUp")
1045
+ y.preventDefault(), w((v) => Math.max(v - 1, 0));
1046
+ else if (y.key === "Enter") {
1047
+ y.preventDefault();
1048
+ const v = I[x];
1049
+ v && h(C?.id === v.id ? null : v);
1050
+ }
1051
+ }
1052
+ };
1053
+ return window.addEventListener("keydown", e), () => window.removeEventListener("keydown", e);
1054
+ }, [I, x, C, l, c, i, d]);
1055
+ const U = (e) => {
1056
+ if (e == null) return "0";
1057
+ const y = JSON.stringify(e), v = new Blob([y]).size;
1058
+ return v < 1024 ? `${v}B` : v < 1024 * 1024 ? `${(v / 1024).toFixed(1)}KB` : `${(v / (1024 * 1024)).toFixed(1)}MB`;
1059
+ }, j = (e) => !Number.isFinite(e) || e < 0 ? "—" : e < 1e3 ? `${e.toFixed(3)}ms` : e < 6e4 ? `${(e / 1e3).toFixed(3)}s` : e < 36e5 ? `${(e / 6e4).toFixed(1)}m` : `${(e / 36e5).toFixed(2)}h`, Z = (e) => typeof e.duration != "number" || !Number.isFinite(e.duration) || e.duration < 0 ? null : e.duration, rt = (e) => typeof e.simulatedDelayMs != "number" || !Number.isFinite(e.simulatedDelayMs) || e.simulatedDelayMs <= 0 ? 0 : e.simulatedDelayMs, $t = (e) => {
1060
+ if (typeof e.endToEndDurationMs == "number" && Number.isFinite(e.endToEndDurationMs) && e.endToEndDurationMs >= 0)
1061
+ return e.endToEndDurationMs;
1062
+ const y = Z(e);
1063
+ return y === null ? null : y + rt(e);
1064
+ }, xt = (e) => {
1065
+ const y = Date.now() - e;
1066
+ return y < 2e3 ? "just now" : y < 6e4 ? `${Math.floor(y / 1e3)}s ago` : y < 36e5 ? `${Math.floor(y / 6e4)}m ago` : y < 864e5 ? `${Math.floor(y / 36e5)}h ago` : `${Math.floor(y / 864e5)}d ago`;
1067
+ }, It = (e) => new Date(e).toLocaleTimeString([], {
1068
+ hour: "2-digit",
1069
+ minute: "2-digit",
1070
+ second: "2-digit",
1071
+ fractionalSecondDigits: 3
1072
+ }), Kt = (e) => e.type === "query" ? `Q${e.queryId}` : e.type === "mutation" ? `M${e.requestId}` : e.type === "action" ? `A${e.requestId}` : null, _t = (e) => Mt(e) ? Kt(e) ?? e.id : `${e.direction === "client" ? "C" : "S"}:${e.messageType}`, vt = V((e, y) => {
1073
+ if (typeof window > "u") return null;
1074
+ const v = 8, z = 300, N = window.innerWidth, L = window.innerHeight, $ = Math.min(260, L - v * 2);
1075
+ let K = y.right + v;
1076
+ K + z > N - v && (K = y.left - z - v), K < v && (K = Math.max(v, N - z - v));
1077
+ let R = y.top + y.height / 2 - $ / 2;
1078
+ return R < v && (R = v), R + $ > L - v && (R = Math.max(v, L - v - $)), { event: e, x: K, y: R };
1079
+ }, []), Qt = V((e) => {
1080
+ if (Ft(e)) {
1081
+ const $ = [
1082
+ { label: "Copy Message Type", action: () => O(e.messageType), shortcut: "⌘C" }
1083
+ ];
1084
+ return e.error && $.push({
1085
+ label: "Copy Error",
1086
+ action: () => O(e.error)
1087
+ }), e.details !== void 0 && $.push({
1088
+ label: "Copy Details",
1089
+ action: () => O(JSON.stringify(e.details, null, 2))
1090
+ }), $.push({
1091
+ label: "Filter by Type: auth",
1092
+ action: () => i("auth"),
1093
+ separator: !0
1094
+ }), $.push({
1095
+ label: "Copy Event ID",
1096
+ action: () => O(e.id),
1097
+ separator: !0
1098
+ }), $.push({
1099
+ label: "Copy as JSON",
1100
+ action: () => O(JSON.stringify(e, null, 2))
1101
+ }), $;
1102
+ }
1103
+ const y = lt(e.args), v = y != null, z = e.status === "success" && e.result !== void 0, N = e.status === "error" && !!e.error, L = [
1104
+ { label: "Copy Function Path", action: () => O(e.udfPath), shortcut: "⌘C" }
1105
+ ];
1106
+ if (v) {
1107
+ const $ = JSON.stringify(y);
1108
+ L.push({
1109
+ label: "Copy as convex run",
1110
+ action: () => O(`npx convex run ${e.udfPath} '${$}'`)
1111
+ }), L.push({
1112
+ label: "Copy Arguments",
1113
+ action: () => O(JSON.stringify(y, null, 2))
1114
+ });
1115
+ }
1116
+ return z && L.push({
1117
+ label: "Copy Result",
1118
+ action: () => O(JSON.stringify(e.result, null, 2))
1119
+ }), N && L.push({
1120
+ label: "Copy Error",
1121
+ action: () => O(e.error)
1122
+ }), L.push({
1123
+ label: "Filter by Function",
1124
+ action: () => d(e.udfPath),
1125
+ separator: !0
1126
+ }), L.push({
1127
+ label: `Filter by Type: ${e.type}`,
1128
+ action: () => i(e.type)
1129
+ }), L.push({
1130
+ label: "Copy Event ID",
1131
+ action: () => O(e.id),
1132
+ separator: !0
1133
+ }), L.push({
1134
+ label: "Copy as JSON",
1135
+ action: () => O(JSON.stringify(e, null, 2))
1136
+ }), L;
1137
+ }, [i, d]);
1138
+ return /* @__PURE__ */ n("div", { className: "flex flex-col h-full overflow-hidden", children: [
1139
+ /* @__PURE__ */ t("style", { children: ge }),
1140
+ /* @__PURE__ */ n("div", { className: "flex items-center gap-2 px-3 py-1.5 border-b border-dt-border-light", children: [
1141
+ /* @__PURE__ */ t("div", { className: "flex gap-[3px] bg-zinc-900/50 p-[3px] rounded-md border border-zinc-700/30", children: ["all", "query", "mutation", "action", "auth", "error"].map((e) => /* @__PURE__ */ t(
1142
+ "button",
1143
+ {
1144
+ className: `px-2 py-1 text-[11px] font-mono font-bold uppercase tracking-wide bg-transparent border-none rounded cursor-pointer transition-all ${l === e ? e === "query" ? "bg-dt-query/25 text-dt-query shadow-[0_0_0_1px_rgba(96,165,250,0.5)]" : e === "mutation" ? "bg-dt-mutation/25 text-dt-mutation shadow-[0_0_0_1px_rgba(167,139,250,0.5)]" : e === "action" ? "bg-dt-action/25 text-dt-action shadow-[0_0_0_1px_rgba(52,211,153,0.5)]" : e === "auth" ? "bg-dt-warning/20 text-dt-warning shadow-[0_0_0_1px_rgba(245,158,11,0.5)]" : e === "error" ? "bg-dt-error/25 text-dt-error shadow-[0_0_0_1px_rgba(239,68,68,0.5)]" : "bg-zinc-500/25 text-dt-text-tertiary shadow-[0_0_0_1px_rgba(161,161,170,0.4)]" : e === "query" ? "text-dt-text-muted hover:bg-dt-query/15 hover:text-dt-query" : e === "mutation" ? "text-dt-text-muted hover:bg-dt-mutation/15 hover:text-dt-mutation" : e === "action" ? "text-dt-text-muted hover:bg-dt-action/15 hover:text-dt-action" : e === "auth" ? "text-dt-text-muted hover:bg-dt-warning/15 hover:text-dt-warning" : e === "error" ? "text-dt-text-muted hover:bg-dt-error/15 hover:text-dt-error" : "text-dt-text-muted hover:bg-white/5 hover:text-dt-text-tertiary"}`,
1145
+ onClick: () => i(e),
1146
+ children: e === "all" ? `All ${H.total}` : `${e === "auth" ? "C" : e === "error" ? "E" : e.charAt(0).toUpperCase()} ${e === "query" ? H.queries : e === "mutation" ? H.mutations : e === "action" ? H.actions : e === "error" ? H.errors : H.auth}`
1147
+ },
1148
+ e
1149
+ )) }),
1150
+ /* @__PURE__ */ t(
1151
+ Jt,
1152
+ {
1153
+ ref: q,
1154
+ value: c,
1155
+ onValueChange: d,
1156
+ onClear: () => d(""),
1157
+ placeholder: "Search path/auth/error/details... (Cmd/Ctrl+K)",
1158
+ className: "stretch"
1159
+ }
1160
+ ),
1161
+ /* @__PURE__ */ t("div", { className: "flex items-center gap-1 ml-auto shrink-0", children: (l !== "all" || c) && /* @__PURE__ */ t(
1162
+ "button",
1163
+ {
1164
+ className: "p-1 bg-transparent border-none text-dt-text-muted cursor-pointer rounded transition-colors hover:text-dt-text-tertiary",
1165
+ onClick: () => {
1166
+ i("all"), d("");
1167
+ },
1168
+ title: "Clear filters (Esc)",
1169
+ children: /* @__PURE__ */ t("svg", { width: "14", height: "14", viewBox: "0 0 16 16", fill: "currentColor", children: /* @__PURE__ */ t("path", { d: "M2.146 2.854a.5.5 0 1 1 .708-.708L8 7.293l5.146-5.147a.5.5 0 0 1 .708.708L8.707 8l5.147 5.146a.5.5 0 0 1-.708.708L8 8.707l-5.146 5.147a.5.5 0 0 1-.708-.708L7.293 8 2.146 2.854Z" }) })
1170
+ }
1171
+ ) })
1172
+ ] }),
1173
+ I.length === 0 && /* @__PURE__ */ n("div", { className: "flex flex-col items-center justify-center py-12 text-dt-text-muted gap-2", children: [
1174
+ /* @__PURE__ */ n("svg", { width: "48", height: "48", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", children: [
1175
+ /* @__PURE__ */ t("circle", { cx: "12", cy: "12", r: "10", strokeWidth: "1.5" }),
1176
+ /* @__PURE__ */ t("path", { d: "M12 6v6l4 2", strokeWidth: "1.5", strokeLinecap: "round" })
1177
+ ] }),
1178
+ Y ? /* @__PURE__ */ n(G, { children: [
1179
+ /* @__PURE__ */ t("p", { children: "Waiting for Convex WebSocket activity" }),
1180
+ r.needsReload ? /* @__PURE__ */ n(G, { children: [
1181
+ /* @__PURE__ */ t("p", { className: "text-[11px] text-dt-text-muted/60 max-w-[360px] text-center", children: "Page was already connected before DevTools attached. Reload to start capturing this connection." }),
1182
+ /* @__PURE__ */ t(
1183
+ "button",
1184
+ {
1185
+ type: "button",
1186
+ className: "mt-1 px-3 py-1.5 text-[11px] font-medium rounded-md bg-dt-bg-tertiary border border-dt-border text-dt-text-secondary hover:bg-white/10 hover:border-dt-border-light transition-colors cursor-pointer",
1187
+ onClick: r.onReload,
1188
+ children: "Reload Page"
1189
+ }
1190
+ )
1191
+ ] }) : /* @__PURE__ */ t("p", { className: "text-[11px] text-dt-text-muted/60 max-w-[360px] text-center", children: "Events will appear here once the app establishes a Convex WebSocket connection." }),
1192
+ /* @__PURE__ */ n("p", { className: "text-[10px] text-dt-text-muted/60 font-mono", children: [
1193
+ "Agent ",
1194
+ r.agentAttached ? "attached" : "attaching",
1195
+ " · Socket ",
1196
+ r.socketSeen ? "seen" : "waiting",
1197
+ " · Capture ",
1198
+ r.captureLive ? "live" : r.needsReload ? "reload" : "waiting"
1199
+ ] })
1200
+ ] }) : /* @__PURE__ */ n(G, { children: [
1201
+ /* @__PURE__ */ t("p", { children: "No activity yet" }),
1202
+ /* @__PURE__ */ t("p", { className: "text-[11px] text-dt-text-muted/60", children: l !== "all" || c ? "No activity matches your current filters" : "Execute operations or auth flows to see them here" })
1203
+ ] })
1204
+ ] }),
1205
+ I.length > 0 && /* @__PURE__ */ n("div", { className: "flex flex-1 overflow-hidden", children: [
1206
+ /* @__PURE__ */ n("div", { className: "flex-1 overflow-y-auto", children: [
1207
+ X && /* @__PURE__ */ n("div", { className: "text-center text-[10px] text-dt-text-muted/60 py-1 border-b border-dt-border-light/30", children: [
1208
+ "Showing ",
1209
+ I.length,
1210
+ " of ",
1211
+ T
1212
+ ] }),
1213
+ I.map((e, y) => {
1214
+ const v = C?.id === e.id, z = y === x;
1215
+ if (e.type === "auth") {
1216
+ const B = e.direction === "client" ? "cli" : "srv", st = e.direction === "client" ? "→" : "←", at = e.details && typeof e.details == "object" && !Array.isArray(e.details) ? Object.keys(e.details).length : null;
1217
+ return /* @__PURE__ */ t(
1218
+ "div",
1219
+ {
1220
+ className: `flex flex-col px-3 py-1.5 border-b border-dt-border-light/50 cursor-pointer transition-colors hover:bg-white/[0.03] ${v ? "bg-white/[0.06]" : ""} ${z ? "bg-white/[0.03] outline outline-1 outline-dt-info/30 -outline-offset-1" : ""} ${e.status === "error" ? "border-l-2 border-l-dt-error/40" : ""}`,
1221
+ onClick: () => {
1222
+ h(v ? null : e), w(y);
1223
+ },
1224
+ onKeyDown: (F) => {
1225
+ (F.key === "Enter" || F.key === " ") && (F.preventDefault(), h(v ? null : e), w(y));
1226
+ },
1227
+ onContextMenu: (F) => {
1228
+ F.preventDefault(), f(null), S({
1229
+ x: F.clientX,
1230
+ y: F.clientY,
1231
+ items: Qt(e)
1232
+ });
1233
+ },
1234
+ onMouseEnter: (F) => {
1235
+ const Lt = F.currentTarget.getBoundingClientRect(), ct = vt(e, Lt);
1236
+ ct && f(ct);
1237
+ },
1238
+ onMouseMove: (F) => {
1239
+ if (g?.event.id === e.id) {
1240
+ const Lt = F.currentTarget.getBoundingClientRect(), ct = vt(e, Lt);
1241
+ ct && f(
1242
+ (bt) => bt && bt.event.id === e.id && (bt.x !== ct.x || bt.y !== ct.y) ? ct : bt
1243
+ );
1244
+ }
1245
+ },
1246
+ onMouseLeave: () => {
1247
+ f((F) => F && F.event.id === e.id ? null : F);
1248
+ },
1249
+ role: "button",
1250
+ tabIndex: 0,
1251
+ "aria-label": `Connection ${e.messageType} ${e.status}`,
1252
+ "aria-selected": v,
1253
+ "aria-current": z ? "true" : void 0,
1254
+ children: /* @__PURE__ */ n("div", { className: "flex items-center gap-2 min-w-0", children: [
1255
+ /* @__PURE__ */ t("span", { className: "inline-flex items-center justify-center w-4 h-4 rounded-[3px] text-[9px] font-bold shrink-0 bg-dt-warning/20 text-dt-warning shadow-[0_1px_2px_rgba(245,158,11,0.35)]", children: "C" }),
1256
+ /* @__PURE__ */ t(
1257
+ "span",
1258
+ {
1259
+ className: `w-1.5 h-1.5 rounded-full shrink-0 ${e.status === "success" ? "bg-dt-success" : e.status === "error" ? "bg-dt-error" : "bg-dt-warning animate-pulse"}`,
1260
+ title: e.status
1261
+ }
1262
+ ),
1263
+ /* @__PURE__ */ n("span", { className: "font-mono text-[12px] text-dt-text-secondary truncate flex-1", children: [
1264
+ st,
1265
+ " ",
1266
+ e.messageType
1267
+ ] }),
1268
+ /* @__PURE__ */ n("div", { className: "flex items-center gap-2 shrink-0 text-[11px] text-dt-text-muted ml-auto", children: [
1269
+ e.tokenType && /* @__PURE__ */ t("span", { className: "text-dt-text-muted/80 font-mono text-[10px]", children: e.tokenType }),
1270
+ at !== null && /* @__PURE__ */ n("span", { className: "text-dt-text-muted/70 font-mono text-[10px]", children: [
1271
+ at,
1272
+ "f"
1273
+ ] }),
1274
+ e.error && /* @__PURE__ */ t("span", { className: "text-dt-error truncate max-w-[180px]", title: e.error, children: e.error }),
1275
+ /* @__PURE__ */ t("span", { className: "text-dt-text-muted/70 font-mono text-[10px]", children: B }),
1276
+ /* @__PURE__ */ t("span", { className: "text-dt-text-muted/60 font-mono", children: It(e.timestamp) })
1277
+ ] })
1278
+ ] })
1279
+ },
1280
+ e.id
1281
+ );
1282
+ }
1283
+ const N = e, L = lt(N.args), $ = L !== void 0, K = N.type === "query" ? o.getSubscription(N.queryId) : null, R = K && K.updateCount > 0, W = $t(N), ot = Z(N), nt = rt(N), et = N.type === "query" ? "Query" : N.type === "mutation" ? "Mutation" : "Action", ht = N.status === "success" ? "succeeded" : N.status === "error" ? "failed" : "pending", dt = nt > 0 && ot !== null, yt = `${et} ${N.udfPath} ${ht}${W !== null ? ` in ${dt ? `e2e ${j(W)}` : `net ${j(W)}`}` : ""}${dt ? ` (${j(ot)} net + ${j(nt)} simulated)` : ""}`, kt = R && N.type === "query";
1284
+ return /* @__PURE__ */ t(
1285
+ "div",
1286
+ {
1287
+ className: `flex flex-col px-3 py-1.5 border-b border-dt-border-light/50 cursor-pointer transition-colors hover:bg-white/[0.03] ${v ? "bg-white/[0.06]" : ""} ${z ? "bg-white/[0.03] outline outline-1 outline-dt-info/30 -outline-offset-1" : ""} ${N.status === "error" ? "border-l-2 border-l-dt-error/40" : ""} ${kt ? "border-l-2 border-l-dt-query/30 bg-dt-query/[0.02]" : ""}`,
1288
+ onClick: () => {
1289
+ h(v ? null : e), w(y);
1290
+ },
1291
+ onKeyDown: (B) => {
1292
+ (B.key === "Enter" || B.key === " ") && (B.preventDefault(), h(v ? null : e), w(y));
1293
+ },
1294
+ onContextMenu: (B) => {
1295
+ B.preventDefault(), f(null), S({
1296
+ x: B.clientX,
1297
+ y: B.clientY,
1298
+ items: Qt(N)
1299
+ });
1300
+ },
1301
+ onMouseEnter: (B) => {
1302
+ const st = B.currentTarget.getBoundingClientRect(), at = vt(N, st);
1303
+ at && f(at);
1304
+ },
1305
+ onMouseMove: (B) => {
1306
+ if (g?.event.id === N.id) {
1307
+ const st = B.currentTarget.getBoundingClientRect(), at = vt(N, st);
1308
+ at && f(
1309
+ (F) => F && F.event.id === N.id && (F.x !== at.x || F.y !== at.y) ? at : F
1310
+ );
1311
+ }
1312
+ },
1313
+ onMouseLeave: () => {
1314
+ f((B) => B && B.event.id === N.id ? null : B);
1315
+ },
1316
+ role: "button",
1317
+ tabIndex: 0,
1318
+ "aria-label": yt,
1319
+ "aria-selected": v,
1320
+ "aria-current": z ? "true" : void 0,
1321
+ children: /* @__PURE__ */ n("div", { className: "flex items-center gap-2 min-w-0", children: [
1322
+ /* @__PURE__ */ t(
1323
+ "span",
1324
+ {
1325
+ className: `inline-flex items-center justify-center w-4 h-4 rounded-[3px] text-[9px] font-bold shrink-0 ${N.type === "query" ? "bg-dt-query/20 text-dt-query shadow-[0_1px_2px_rgba(96,165,250,0.35)]" : N.type === "mutation" ? "bg-dt-mutation/20 text-dt-mutation shadow-[0_1px_2px_rgba(167,139,250,0.35)]" : "bg-dt-action/20 text-dt-action shadow-[0_1px_2px_rgba(52,211,153,0.35)]"}`,
1326
+ title: N.type,
1327
+ children: N.type === "query" ? "Q" : N.type === "mutation" ? "M" : "A"
1328
+ }
1329
+ ),
1330
+ /* @__PURE__ */ t(
1331
+ "span",
1332
+ {
1333
+ className: `w-1.5 h-1.5 rounded-full shrink-0 ${N.status === "success" ? "bg-dt-success" : N.status === "error" ? "bg-dt-error" : "bg-dt-warning animate-pulse"}`,
1334
+ title: N.status
1335
+ }
1336
+ ),
1337
+ /* @__PURE__ */ n("span", { className: "flex items-center gap-0 min-w-0 flex-1 overflow-hidden", children: [
1338
+ /* @__PURE__ */ t(
1339
+ "span",
1340
+ {
1341
+ className: `font-mono text-[12px] text-dt-text-secondary truncate min-w-0 ${$ ? "max-w-[44%]" : ""}`,
1342
+ children: N.udfPath
1343
+ }
1344
+ ),
1345
+ "args" in N && $ && /* @__PURE__ */ n(
1346
+ "span",
1347
+ {
1348
+ className: "font-mono text-[11px] text-dt-text-muted min-w-0 flex-1 truncate max-w-[min(62vw,760px)]",
1349
+ title: tt(L, 460),
1350
+ children: [
1351
+ /* @__PURE__ */ t("span", { className: "text-dt-text-muted/60", children: "(" }),
1352
+ /* @__PURE__ */ t("span", { className: "text-dt-text-muted", children: wt(L, fe) }),
1353
+ /* @__PURE__ */ t("span", { className: "text-dt-text-muted/60", children: ")" })
1354
+ ]
1355
+ }
1356
+ )
1357
+ ] }),
1358
+ /* @__PURE__ */ n("div", { className: "flex items-center gap-2 shrink-0 text-[11px] text-dt-text-muted ml-auto", children: [
1359
+ R && /* @__PURE__ */ n("span", { className: "text-dt-info text-[10px]", title: "Subscription update", children: [
1360
+ "↻",
1361
+ K.updateCount
1362
+ ] }),
1363
+ N.status === "success" && "result" in N && N.result !== void 0 && /* @__PURE__ */ n("span", { className: "text-dt-text-muted/80", title: tt(N.result), children: [
1364
+ "↓",
1365
+ U(N.result)
1366
+ ] }),
1367
+ W !== null && (!R || W > 100) && /* @__PURE__ */ n(
1368
+ "span",
1369
+ {
1370
+ className: "font-mono text-dt-text-muted",
1371
+ title: dt ? `E2E ${j(W)} = Net ${j(ot)} + Sim ${j(nt)}` : `Net ${j(W)}`,
1372
+ children: [
1373
+ R && "Δ",
1374
+ dt ? `E2E ${j(W)}` : `Net ${j(W)}`
1375
+ ]
1376
+ }
1377
+ ),
1378
+ N.status === "pending" && /* @__PURE__ */ t("span", { className: "font-mono text-dt-warning/90 text-[10px] uppercase", children: "pending" }),
1379
+ dt && /* @__PURE__ */ n(
1380
+ "span",
1381
+ {
1382
+ className: "font-mono text-dt-text-muted/85 text-[10px]",
1383
+ title: "Server/network round-trip",
1384
+ children: [
1385
+ "Net ",
1386
+ j(ot)
1387
+ ]
1388
+ }
1389
+ ),
1390
+ nt > 0 && /* @__PURE__ */ n(
1391
+ "span",
1392
+ {
1393
+ className: "font-mono text-dt-warning/90 text-[10px]",
1394
+ title: "Devtools simulated client delivery delay",
1395
+ children: [
1396
+ "Sim +",
1397
+ j(nt)
1398
+ ]
1399
+ }
1400
+ ),
1401
+ /* @__PURE__ */ t("span", { className: "text-dt-text-muted/60 font-mono", children: It(N.timestamp) })
1402
+ ] })
1403
+ ] })
1404
+ },
1405
+ e.id
1406
+ );
1407
+ }),
1408
+ X && /* @__PURE__ */ n("div", { className: "sticky bottom-0 z-[2] px-3 py-2 border-t border-dt-border-light/40 bg-dt-bg-secondary/85 backdrop-blur-sm flex items-center justify-between gap-2", children: [
1409
+ /* @__PURE__ */ n("span", { className: "text-[10px] text-dt-text-muted", children: [
1410
+ "Showing ",
1411
+ I.length,
1412
+ " of ",
1413
+ T
1414
+ ] }),
1415
+ /* @__PURE__ */ n(
1416
+ "button",
1417
+ {
1418
+ type: "button",
1419
+ className: "px-2 py-1 text-[10px] font-semibold rounded border border-dt-border-light text-dt-text-secondary bg-dt-bg-tertiary hover:bg-white/10 hover:border-dt-border transition-colors",
1420
+ onClick: () => k((e) => Math.min(e + Zt, T)),
1421
+ children: [
1422
+ "Load ",
1423
+ Math.min(Zt, T - I.length),
1424
+ " more"
1425
+ ]
1426
+ }
1427
+ )
1428
+ ] })
1429
+ ] }),
1430
+ C && /* @__PURE__ */ n("div", { className: "w-[320px] border-l border-dt-border overflow-y-auto bg-dt-bg-secondary/50 animate-[dt-slide-in_0.2s_ease-out] shrink-0", children: [
1431
+ /* @__PURE__ */ n("div", { className: "flex items-center justify-between px-3 py-2 border-b border-dt-border-light", children: [
1432
+ /* @__PURE__ */ t("h4", { className: "text-[12px] font-semibold text-dt-text-secondary m-0", children: "Details" }),
1433
+ /* @__PURE__ */ t(
1434
+ "button",
1435
+ {
1436
+ className: "p-1 bg-transparent border-none text-dt-text-muted cursor-pointer rounded hover:bg-white/5 hover:text-dt-text-tertiary",
1437
+ onClick: () => h(null),
1438
+ children: /* @__PURE__ */ t("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "currentColor", children: /* @__PURE__ */ t("path", { d: "M4.646 4.646a.5.5 0 0 1 .708 0L8 7.293l2.646-2.647a.5.5 0 0 1 .708.708L8.707 8l2.647 2.646a.5.5 0 0 1-.708.708L8 8.707l-2.646 2.647a.5.5 0 0 1-.708-.708L7.293 8 4.646 5.354a.5.5 0 0 1 0-.708z" }) })
1439
+ }
1440
+ )
1441
+ ] }),
1442
+ /* @__PURE__ */ n("div", { className: "p-3 flex flex-col gap-3", children: [
1443
+ C.type === "query" && o.getSubscription(C.queryId) && (() => {
1444
+ const e = o.getSubscription(C.queryId);
1445
+ if (e.updateCount > 0) {
1446
+ const v = It(e.addedAt);
1447
+ return /* @__PURE__ */ n("div", { className: "flex items-center gap-1 flex-wrap bg-dt-info/5 border border-dt-info/20 rounded-md px-2 py-1 text-[10px] font-mono", children: [
1448
+ /* @__PURE__ */ t("span", { className: "text-dt-info font-semibold uppercase tracking-wide", children: "Sub" }),
1449
+ /* @__PURE__ */ n("span", { className: "text-dt-text-secondary", children: [
1450
+ "↻",
1451
+ e.updateCount
1452
+ ] }),
1453
+ /* @__PURE__ */ n("span", { className: "text-dt-text-muted/70", children: [
1454
+ "since ",
1455
+ xt(e.addedAt)
1456
+ ] }),
1457
+ /* @__PURE__ */ t(
1458
+ "span",
1459
+ {
1460
+ className: "ml-auto text-dt-text-muted/60",
1461
+ title: new Date(e.addedAt).toLocaleString(),
1462
+ children: v
1463
+ }
1464
+ )
1465
+ ] });
1466
+ }
1467
+ return null;
1468
+ })(),
1469
+ p && (() => {
1470
+ const e = p.udfPath, y = p.componentPath, v = new Date(p.timestamp), z = Kt(p), N = $t(p), L = Z(p), $ = rt(p), K = N !== null ? j(N) : null, R = L !== null ? j(L) : null, W = $ > 0 ? j($) : null, ot = lt(p.args), nt = p.status === "success" && "result" in p && p.result !== void 0 ? p.result : void 0;
1471
+ return /* @__PURE__ */ n(G, { children: [
1472
+ /* @__PURE__ */ n("div", { className: "flex flex-col gap-2", children: [
1473
+ /* @__PURE__ */ n("div", { className: "flex items-center gap-2", children: [
1474
+ /* @__PURE__ */ t(
1475
+ "span",
1476
+ {
1477
+ className: `text-[11px] font-bold uppercase tracking-wider ${p.type === "query" ? "text-dt-query" : p.type === "mutation" ? "text-dt-mutation" : "text-dt-action"}`,
1478
+ children: p.type === "query" ? "Query" : p.type === "mutation" ? "Mutation" : "Action"
1479
+ }
1480
+ ),
1481
+ /* @__PURE__ */ n(
1482
+ "span",
1483
+ {
1484
+ className: `text-[10px] font-semibold uppercase flex items-center gap-1 ${p.status === "success" ? "text-dt-success" : p.status === "error" ? "text-dt-error" : "text-dt-warning"}`,
1485
+ children: [
1486
+ /* @__PURE__ */ t(Ct, { status: p.status }),
1487
+ p.status?.toUpperCase() ?? "PENDING"
1488
+ ]
1489
+ }
1490
+ ),
1491
+ /* @__PURE__ */ t("span", { className: "text-[10px] text-dt-text-muted ml-auto", title: v.toLocaleString(), children: xt(p.timestamp) })
1492
+ ] }),
1493
+ /* @__PURE__ */ t("div", { className: "font-mono text-[12px] text-dt-text truncate", title: e, children: e || "Unknown function" }),
1494
+ /* @__PURE__ */ n("div", { className: "flex flex-wrap gap-1", children: [
1495
+ z && /* @__PURE__ */ t("span", { className: "px-1.5 py-0.5 bg-dt-bg-tertiary rounded text-[10px] text-dt-text-muted font-mono", children: z }),
1496
+ K && /* @__PURE__ */ n("span", { className: "px-1.5 py-0.5 bg-dt-bg-tertiary rounded text-[10px] text-dt-text-muted font-mono", children: [
1497
+ "E2E ",
1498
+ K
1499
+ ] }),
1500
+ W && R && /* @__PURE__ */ n("span", { className: "px-1.5 py-0.5 bg-dt-bg-tertiary rounded text-[10px] text-dt-text-muted font-mono", children: [
1501
+ "Net ",
1502
+ R
1503
+ ] }),
1504
+ W && /* @__PURE__ */ n("span", { className: "px-1.5 py-0.5 bg-dt-warning/15 border border-dt-warning/20 rounded text-[10px] text-dt-warning font-mono", children: [
1505
+ "Sim +",
1506
+ W
1507
+ ] })
1508
+ ] }),
1509
+ y && /* @__PURE__ */ t("div", { className: "text-[10px] text-dt-text-muted/60 font-mono truncate", title: y, children: y }),
1510
+ p.type === "query" && p.triggeredBy && /* @__PURE__ */ n(
1511
+ "button",
1512
+ {
1513
+ type: "button",
1514
+ className: "flex items-center gap-1.5 px-2 py-1 bg-dt-mutation/10 border border-dt-mutation/20 rounded text-[10px] text-dt-mutation hover:bg-dt-mutation/20 transition-colors cursor-pointer",
1515
+ title: "Jump to triggering operation",
1516
+ onClick: () => o.setFocusedEventId(p.triggeredBy),
1517
+ children: [
1518
+ /* @__PURE__ */ n("span", { children: [
1519
+ "Triggered by ",
1520
+ we(p.triggeredBy)
1521
+ ] }),
1522
+ /* @__PURE__ */ t("span", { className: "text-dt-mutation/70", children: "→" })
1523
+ ]
1524
+ }
1525
+ )
1526
+ ] }),
1527
+ "args" in p && ot !== void 0 && /* @__PURE__ */ t(gt, { data: ot, label: "Arguments", maxHeight: 200 }),
1528
+ nt !== void 0 && /* @__PURE__ */ t(gt, { data: nt, label: "Result", maxHeight: 200 }),
1529
+ p.status === "error" && "error" in p && p.error && /* @__PURE__ */ n("div", { className: "flex flex-col gap-1", children: [
1530
+ /* @__PURE__ */ t("div", { className: "text-[11px] font-semibold text-dt-text-tertiary uppercase tracking-wider", children: "Error" }),
1531
+ /* @__PURE__ */ t("div", { className: "text-[12px] text-dt-error bg-dt-error/10 rounded px-2 py-1.5 font-mono break-words", children: p.error })
1532
+ ] }),
1533
+ p.logLines && p.logLines.length > 0 && /* @__PURE__ */ n("div", { className: "flex flex-col gap-1", children: [
1534
+ /* @__PURE__ */ t("div", { className: "text-[11px] font-semibold text-dt-text-tertiary uppercase tracking-wider", children: "Console Output" }),
1535
+ /* @__PURE__ */ t("div", { className: "bg-zinc-950/50 rounded border border-dt-border-light p-2 font-mono text-[11px] max-h-[150px] overflow-y-auto", children: p.logLines.map((et, ht) => /* @__PURE__ */ t("div", { className: "text-dt-text-muted leading-relaxed", children: et }, ht)) })
1536
+ ] })
1537
+ ] });
1538
+ })(),
1539
+ D && /* @__PURE__ */ n(G, { children: [
1540
+ /* @__PURE__ */ n("div", { className: "flex flex-col gap-2", children: [
1541
+ /* @__PURE__ */ n("div", { className: "flex items-center gap-2", children: [
1542
+ /* @__PURE__ */ t("span", { className: "text-[11px] font-bold uppercase tracking-wider text-dt-warning", children: "Connection" }),
1543
+ /* @__PURE__ */ n(
1544
+ "span",
1545
+ {
1546
+ className: `text-[10px] font-semibold uppercase flex items-center gap-1 ${D.status === "success" ? "text-dt-success" : D.status === "error" ? "text-dt-error" : "text-dt-warning"}`,
1547
+ children: [
1548
+ /* @__PURE__ */ t(Ct, { status: D.status }),
1549
+ D.status.toUpperCase()
1550
+ ]
1551
+ }
1552
+ ),
1553
+ /* @__PURE__ */ t("span", { className: "text-[10px] text-dt-text-muted ml-auto", title: new Date(D.timestamp).toLocaleString(), children: xt(D.timestamp) })
1554
+ ] }),
1555
+ /* @__PURE__ */ n("div", { className: "font-mono text-[12px] text-dt-text truncate", children: [
1556
+ D.direction === "client" ? "→" : "←",
1557
+ " ",
1558
+ D.messageType
1559
+ ] }),
1560
+ /* @__PURE__ */ n("div", { className: "flex flex-wrap gap-1", children: [
1561
+ /* @__PURE__ */ t("span", { className: "px-1.5 py-0.5 bg-dt-bg-tertiary rounded text-[10px] text-dt-text-muted font-mono", children: _t(D) }),
1562
+ D.tokenType && /* @__PURE__ */ t("span", { className: "px-1.5 py-0.5 bg-dt-bg-tertiary rounded text-[10px] text-dt-text-muted font-mono", children: D.tokenType })
1563
+ ] })
1564
+ ] }),
1565
+ D.details !== void 0 && /* @__PURE__ */ t(gt, { data: D.details, label: "Details", maxHeight: 220 }),
1566
+ D.error && /* @__PURE__ */ n("div", { className: "flex flex-col gap-1", children: [
1567
+ /* @__PURE__ */ t("div", { className: "text-[11px] font-semibold text-dt-text-tertiary uppercase tracking-wider", children: "Error" }),
1568
+ /* @__PURE__ */ t("div", { className: "text-[12px] text-dt-error bg-dt-error/10 rounded px-2 py-1.5 font-mono break-words", children: D.error })
1569
+ ] })
1570
+ ] })
1571
+ ] })
1572
+ ] })
1573
+ ] }),
1574
+ g && (() => {
1575
+ const e = g.event;
1576
+ if (e.type === "auth") {
1577
+ const B = e.details !== void 0 ? tt(e.details, 200) : null, st = e.error && e.error.length > 160 ? `${e.error.slice(0, 157)}…` : e.error;
1578
+ return /* @__PURE__ */ n(
1579
+ "div",
1580
+ {
1581
+ className: "fixed z-[9999999] w-[300px] bg-zinc-900/[0.98] border border-dt-border rounded-lg shadow-2xl p-3 flex flex-col gap-2 pointer-events-none animate-[dt-fade-in_0.15s_ease-out] backdrop-blur-lg",
1582
+ style: { top: g.y, left: g.x },
1583
+ role: "tooltip",
1584
+ children: [
1585
+ /* @__PURE__ */ n("div", { className: "flex items-center gap-2", children: [
1586
+ /* @__PURE__ */ t("span", { className: "inline-flex items-center justify-center w-4 h-4 rounded-[3px] text-[9px] font-bold shrink-0 bg-dt-warning/20 text-dt-warning", children: "C" }),
1587
+ /* @__PURE__ */ n("span", { className: "font-mono text-[12px] text-dt-text truncate flex-1", children: [
1588
+ e.direction === "client" ? "→" : "←",
1589
+ " ",
1590
+ e.messageType
1591
+ ] }),
1592
+ /* @__PURE__ */ n(
1593
+ "span",
1594
+ {
1595
+ className: `text-[9px] font-bold uppercase flex items-center gap-0.5 px-1.5 py-0.5 rounded-full ${e.status === "success" ? "bg-dt-success/15 text-dt-success" : e.status === "error" ? "bg-dt-error/15 text-dt-error" : "bg-dt-warning/15 text-dt-warning"}`,
1596
+ children: [
1597
+ /* @__PURE__ */ t(Ct, { status: e.status }),
1598
+ e.status.toUpperCase()
1599
+ ]
1600
+ }
1601
+ )
1602
+ ] }),
1603
+ /* @__PURE__ */ n("div", { className: "flex items-center gap-1 flex-wrap", children: [
1604
+ /* @__PURE__ */ t("span", { className: "px-1.5 py-0.5 bg-dt-bg-tertiary rounded text-[10px] text-dt-text-muted font-mono", children: xt(e.timestamp) }),
1605
+ /* @__PURE__ */ t("span", { className: "px-1.5 py-0.5 bg-dt-bg-tertiary rounded text-[10px] text-dt-text-muted font-mono", children: _t(e) }),
1606
+ e.tokenType && /* @__PURE__ */ t("span", { className: "px-1.5 py-0.5 bg-dt-bg-tertiary rounded text-[10px] text-dt-text-muted font-mono", children: e.tokenType })
1607
+ ] }),
1608
+ B && /* @__PURE__ */ n("div", { className: "flex flex-col gap-0.5", children: [
1609
+ /* @__PURE__ */ t("span", { className: "text-[10px] font-semibold text-dt-text-tertiary uppercase tracking-wider", children: "Details" }),
1610
+ /* @__PURE__ */ t("pre", { className: "font-mono text-[10px] text-dt-text-muted bg-zinc-950/50 rounded p-1.5 overflow-hidden max-h-[100px] whitespace-pre-wrap break-all m-0", children: /* @__PURE__ */ t(Pt, { json: B }) })
1611
+ ] }),
1612
+ st && /* @__PURE__ */ n("div", { className: "flex flex-col gap-0.5", children: [
1613
+ /* @__PURE__ */ t("span", { className: "text-[10px] font-semibold text-dt-text-tertiary uppercase tracking-wider", children: "Error" }),
1614
+ /* @__PURE__ */ t("span", { className: "text-[11px] text-dt-error", title: e.error, children: st })
1615
+ ] })
1616
+ ]
1617
+ }
1618
+ );
1619
+ }
1620
+ const y = _t(e), v = $t(e), z = Z(e), N = rt(e), L = v !== null ? j(v) : null, $ = z !== null ? j(z) : null, K = N > 0 ? j(N) : null, R = lt(e.args), W = R !== void 0 ? tt(R) : null, ot = R !== void 0 ? U(R) : null, nt = R !== void 0 ? tt(R) : "", et = e.status === "success" && e.result !== void 0 ? e.result : void 0, ht = et ? tt(et) : null, dt = et ? tt(et) : "", yt = et ? U(et) : null, kt = e.status === "error" && e.error ? e.error.length > 160 ? `${e.error.slice(0, 157)}…` : e.error : null;
1621
+ return /* @__PURE__ */ n(
1622
+ "div",
1623
+ {
1624
+ className: "fixed z-[9999999] w-[300px] bg-zinc-900/[0.98] border border-dt-border rounded-lg shadow-2xl p-3 flex flex-col gap-2 pointer-events-none animate-[dt-fade-in_0.15s_ease-out] backdrop-blur-lg",
1625
+ style: { top: g.y, left: g.x },
1626
+ role: "tooltip",
1627
+ children: [
1628
+ /* @__PURE__ */ n("div", { className: "flex items-center gap-2", children: [
1629
+ /* @__PURE__ */ t(
1630
+ "span",
1631
+ {
1632
+ className: `inline-flex items-center justify-center w-4 h-4 rounded-[3px] text-[9px] font-bold shrink-0 ${e.type === "query" ? "bg-dt-query/20 text-dt-query shadow-[0_1px_2px_rgba(96,165,250,0.35)]" : e.type === "mutation" ? "bg-dt-mutation/20 text-dt-mutation shadow-[0_1px_2px_rgba(167,139,250,0.35)]" : "bg-dt-action/20 text-dt-action shadow-[0_1px_2px_rgba(52,211,153,0.35)]"}`,
1633
+ children: e.type === "query" ? "Q" : e.type === "mutation" ? "M" : "A"
1634
+ }
1635
+ ),
1636
+ /* @__PURE__ */ t("span", { className: "font-mono text-[12px] text-dt-text truncate flex-1", title: e.udfPath, children: e.udfPath }),
1637
+ /* @__PURE__ */ n(
1638
+ "span",
1639
+ {
1640
+ className: `text-[9px] font-bold uppercase flex items-center gap-0.5 px-1.5 py-0.5 rounded-full ${e.status === "success" ? "bg-dt-success/15 text-dt-success" : e.status === "error" ? "bg-dt-error/15 text-dt-error" : "bg-dt-warning/15 text-dt-warning"}`,
1641
+ children: [
1642
+ /* @__PURE__ */ t(Ct, { status: e.status }),
1643
+ e.status?.toUpperCase() ?? "PENDING"
1644
+ ]
1645
+ }
1646
+ )
1647
+ ] }),
1648
+ /* @__PURE__ */ n("div", { className: "flex items-center gap-1 flex-wrap", children: [
1649
+ /* @__PURE__ */ t("span", { className: "px-1.5 py-0.5 bg-dt-bg-tertiary rounded text-[10px] text-dt-text-muted font-mono", children: xt(e.timestamp) }),
1650
+ L && /* @__PURE__ */ n("span", { className: "px-1.5 py-0.5 bg-dt-bg-tertiary rounded text-[10px] text-dt-text-muted font-mono", children: [
1651
+ "E2E ",
1652
+ L
1653
+ ] }),
1654
+ K && $ && /* @__PURE__ */ n("span", { className: "px-1.5 py-0.5 bg-dt-bg-tertiary rounded text-[10px] text-dt-text-muted font-mono", children: [
1655
+ "Net ",
1656
+ $
1657
+ ] }),
1658
+ K && /* @__PURE__ */ n("span", { className: "px-1.5 py-0.5 bg-dt-warning/15 border border-dt-warning/20 rounded text-[10px] text-dt-warning font-mono", children: [
1659
+ "Sim +",
1660
+ K
1661
+ ] }),
1662
+ /* @__PURE__ */ t("span", { className: "px-1.5 py-0.5 bg-dt-bg-tertiary rounded text-[10px] text-dt-text-muted font-mono", children: y }),
1663
+ e.logLines && e.logLines.length > 0 && /* @__PURE__ */ n("span", { className: "px-1.5 py-0.5 bg-dt-bg-tertiary rounded text-[10px] text-dt-text-muted font-mono", children: [
1664
+ "Logs ",
1665
+ e.logLines.length
1666
+ ] })
1667
+ ] }),
1668
+ e.componentPath && /* @__PURE__ */ t("div", { className: "text-[10px] text-dt-text-muted/60 font-mono truncate", title: e.componentPath, children: e.componentPath }),
1669
+ R !== void 0 && /* @__PURE__ */ n("div", { className: "flex flex-col gap-0.5", children: [
1670
+ /* @__PURE__ */ n("div", { className: "flex items-center justify-between", children: [
1671
+ /* @__PURE__ */ t("span", { className: "text-[10px] font-semibold text-dt-text-tertiary uppercase tracking-wider", children: "Args" }),
1672
+ ot && /* @__PURE__ */ t("span", { className: "text-[9px] text-dt-text-muted/60 font-mono", children: ot })
1673
+ ] }),
1674
+ /* @__PURE__ */ t("pre", { className: "font-mono text-[10px] text-dt-text-muted bg-zinc-950/50 rounded p-1.5 overflow-hidden max-h-[80px] whitespace-pre-wrap break-all m-0", title: W ?? void 0, children: /* @__PURE__ */ t(Pt, { json: nt }) })
1675
+ ] }),
1676
+ et !== void 0 && /* @__PURE__ */ n("div", { className: "flex flex-col gap-0.5", children: [
1677
+ /* @__PURE__ */ n("div", { className: "flex items-center justify-between", children: [
1678
+ /* @__PURE__ */ t("span", { className: "text-[10px] font-semibold text-dt-text-tertiary uppercase tracking-wider", children: "Result" }),
1679
+ yt && /* @__PURE__ */ t("span", { className: "text-[9px] text-dt-text-muted/60 font-mono", children: yt })
1680
+ ] }),
1681
+ /* @__PURE__ */ t("pre", { className: "font-mono text-[10px] text-dt-text-muted bg-zinc-950/50 rounded p-1.5 overflow-hidden max-h-[80px] whitespace-pre-wrap break-all m-0", title: ht ?? void 0, children: /* @__PURE__ */ t(Pt, { json: dt }) })
1682
+ ] }),
1683
+ kt && /* @__PURE__ */ n("div", { className: "flex flex-col gap-0.5", children: [
1684
+ /* @__PURE__ */ t("span", { className: "text-[10px] font-semibold text-dt-text-tertiary uppercase tracking-wider", children: "Error" }),
1685
+ /* @__PURE__ */ t("span", { className: "text-[11px] text-dt-error", title: e.error, children: kt })
1686
+ ] })
1687
+ ]
1688
+ }
1689
+ );
1690
+ })(),
1691
+ M && /* @__PURE__ */ t(
1692
+ Ut,
1693
+ {
1694
+ x: M.x,
1695
+ y: M.y,
1696
+ items: M.items,
1697
+ onClose: () => S(null)
1698
+ }
1699
+ )
1700
+ ] });
1701
+ }
1702
+ function Pt({ json: o }) {
1703
+ const r = it(() => o.replace(
1704
+ /("(\\u[a-zA-Z0-9]{4}|\\[^u]|[^\\"])*"(\s*:)?|\b(true|false|null)\b|-?\d+(?:\.\d*)?(?:[eE][+-]?\d+)?)/g,
1705
+ (a) => {
1706
+ let s = "cdv-json-value";
1707
+ return /^"/.test(a) ? /:$/.test(a) ? s = "cdv-json-key" : s = "cdv-json-string" : /true|false/.test(a) ? s = "cdv-json-boolean" : /null/.test(a) ? s = "cdv-json-null" : s = "cdv-json-number", `<span class="${s}">${a}</span>`;
1708
+ }
1709
+ ), [o]);
1710
+ return /* @__PURE__ */ t("span", { dangerouslySetInnerHTML: { __html: r } });
1711
+ }
1712
+ function Ct({ status: o }) {
1713
+ return o === "success" ? /* @__PURE__ */ t("svg", { width: "14", height: "14", viewBox: "0 0 16 16", fill: "currentColor", className: "text-dt-success", children: /* @__PURE__ */ t("path", { d: "M13.854 3.646a.5.5 0 0 1 0 .708l-7 7a.5.5 0 0 1-.708 0l-3.5-3.5a.5.5 0 1 1 .708-.708L6.5 10.293l6.646-6.647a.5.5 0 0 1 .708 0z" }) }) : o === "error" ? /* @__PURE__ */ n("svg", { width: "14", height: "14", viewBox: "0 0 16 16", fill: "currentColor", className: "text-dt-error", children: [
1714
+ /* @__PURE__ */ t("path", { d: "M8 15A7 7 0 1 1 8 1a7 7 0 0 1 0 14zm0 1A8 8 0 1 0 8 0a8 8 0 0 0 0 16z" }),
1715
+ /* @__PURE__ */ t("path", { d: "M7.002 11a1 1 0 1 1 2 0 1 1 0 0 1-2 0zM7.1 4.995a.905.905 0 1 1 1.8 0l-.35 3.507a.552.552 0 0 1-1.1 0L7.1 4.995z" })
1716
+ ] }) : /* @__PURE__ */ n("svg", { width: "14", height: "14", viewBox: "0 0 16 16", fill: "currentColor", className: "text-dt-warning", children: [
1717
+ /* @__PURE__ */ t("circle", { cx: "8", cy: "8", r: "7", stroke: "currentColor", strokeWidth: "1", fill: "none" }),
1718
+ /* @__PURE__ */ t("circle", { cx: "8", cy: "8", r: "2" })
1719
+ ] });
1720
+ }
1721
+ const te = {
1722
+ maxStringLength: 96,
1723
+ stringTailLength: 20,
1724
+ maxArrayItems: 4,
1725
+ maxObjectEntries: 4,
1726
+ maxDepth: 3
1727
+ };
1728
+ function ye({ eventStore: o }) {
1729
+ const [r, a] = _([]), [s, l] = _(null), [u, c] = _(0), [m, E] = _("all"), [k, C] = _(""), [h, x] = _(null), [w, g] = _(null), f = ft(null);
1730
+ J(() => {
1731
+ const i = () => {
1732
+ a(o.getActiveSubscriptions());
1733
+ }, d = o.subscribe(i);
1734
+ return i(), d;
1735
+ }, [o]);
1736
+ const M = it(() => {
1737
+ let i = r;
1738
+ return m !== "all" && (i = i.filter((d) => d.status === m)), k && (i = i.filter(
1739
+ (d) => d.udfPath.toLowerCase().includes(k.toLowerCase()) || d.componentPath?.toLowerCase().includes(k.toLowerCase())
1740
+ )), [...i].sort((d, b) => d.lastUpdate !== b.lastUpdate ? b.lastUpdate - d.lastUpdate : d.addedAt !== b.addedAt ? b.addedAt - d.addedAt : b.queryId - d.queryId);
1741
+ }, [r, m, k]);
1742
+ J(() => {
1743
+ const i = (d) => {
1744
+ if ((d.metaKey || d.ctrlKey) && d.key === "k") {
1745
+ d.preventDefault(), f.current?.focus();
1746
+ return;
1747
+ }
1748
+ if (d.key === "Escape") {
1749
+ d.preventDefault(), s !== null ? l(null) : (m !== "all" || k) && (E("all"), C(""));
1750
+ return;
1751
+ }
1752
+ if (document.activeElement !== f.current && M.length !== 0) {
1753
+ if (d.key === "ArrowDown")
1754
+ d.preventDefault(), c((b) => Math.min(b + 1, M.length - 1));
1755
+ else if (d.key === "ArrowUp")
1756
+ d.preventDefault(), c((b) => Math.max(b - 1, 0));
1757
+ else if (d.key === "Enter" || d.key === " ") {
1758
+ d.preventDefault();
1759
+ const b = M[u];
1760
+ b && l(s === b.queryId ? null : b.queryId);
1761
+ }
1762
+ }
1763
+ };
1764
+ return window.addEventListener("keydown", i), () => window.removeEventListener("keydown", i);
1765
+ }, [M, u, s, m, k]), J(() => {
1766
+ c(0);
1767
+ }, [m, k]);
1768
+ const S = V((i) => {
1769
+ O(i);
1770
+ }, []), q = V((i, d) => {
1771
+ if (typeof window > "u") return null;
1772
+ const b = 8, P = 300, I = window.innerWidth, T = window.innerHeight, X = Math.min(260, T - b * 2);
1773
+ let H = d.right + b;
1774
+ H + P > I - b && (H = d.left - P - b), H < b && (H = Math.max(b, I - P - b));
1775
+ let Y = d.top + d.height / 2 - X / 2;
1776
+ return Y < b && (Y = b), Y + X > T - b && (Y = Math.max(b, T - b - X)), { subscription: i, x: H, y: Y };
1777
+ }, []), p = V((i) => {
1778
+ if (i == null) return "0";
1779
+ const d = JSON.stringify(i), b = new Blob([d]).size;
1780
+ return b < 1024 ? `${b}B` : b < 1024 * 1024 ? `${(b / 1024).toFixed(1)}KB` : `${(b / (1024 * 1024)).toFixed(1)}MB`;
1781
+ }, []), D = V(
1782
+ (i) => {
1783
+ const d = lt(i.args), b = d != null, P = i.currentValue !== void 0, I = [
1784
+ { label: "Copy Function Path", action: () => O(i.udfPath), shortcut: "⌘C" }
1785
+ ];
1786
+ return b && I.push({
1787
+ label: "Copy Arguments",
1788
+ action: () => O(JSON.stringify(d, null, 2))
1789
+ }), P && I.push({
1790
+ label: "Copy Current Value",
1791
+ action: () => O(JSON.stringify(i.currentValue, null, 2))
1792
+ }), I.push({
1793
+ label: "Filter by Function",
1794
+ action: () => C(i.udfPath),
1795
+ separator: !0
1796
+ }), I.push({
1797
+ label: "Copy Query ID",
1798
+ action: () => O(String(i.queryId))
1799
+ }), I;
1800
+ },
1801
+ []
1802
+ ), A = (i) => {
1803
+ const d = Math.floor((Date.now() - i) / 1e3);
1804
+ if (d < 60) return `${d}s ago`;
1805
+ const b = Math.floor(d / 60);
1806
+ return b < 60 ? `${b}m ago` : `${Math.floor(b / 60)}h ago`;
1807
+ };
1808
+ return /* @__PURE__ */ n("div", { className: "flex flex-col h-full overflow-hidden", children: [
1809
+ /* @__PURE__ */ n("div", { className: "flex items-center gap-2 px-3 py-1.5 border-b border-dt-border-light", children: [
1810
+ /* @__PURE__ */ n("div", { className: "flex gap-[3px] bg-zinc-900/50 p-[3px] rounded-md border border-zinc-700/30", children: [
1811
+ /* @__PURE__ */ t(
1812
+ "button",
1813
+ {
1814
+ className: `px-2 py-1 text-[11px] font-mono font-bold uppercase tracking-wide bg-transparent border-none rounded cursor-pointer transition-all hover:bg-white/5 hover:text-dt-text-tertiary ${m === "all" ? "bg-zinc-500/25 text-dt-text-tertiary shadow-[0_0_0_1px_rgba(161,161,170,0.4)]" : "text-dt-text-muted"}`,
1815
+ onClick: () => E("all"),
1816
+ "aria-label": "Show all subscriptions",
1817
+ "aria-pressed": m === "all",
1818
+ children: "All"
1819
+ }
1820
+ ),
1821
+ /* @__PURE__ */ t(
1822
+ "button",
1823
+ {
1824
+ className: `px-2 py-1 text-[11px] font-mono font-bold uppercase tracking-wide bg-transparent border-none rounded cursor-pointer transition-all ${m === "active" ? "bg-dt-query/25 text-dt-query shadow-[0_0_0_1px_rgba(96,165,250,0.5)]" : "text-dt-text-muted hover:bg-dt-query/15 hover:text-dt-query"}`,
1825
+ onClick: () => E("active"),
1826
+ "aria-label": "Show active subscriptions",
1827
+ "aria-pressed": m === "active",
1828
+ children: "Active"
1829
+ }
1830
+ ),
1831
+ /* @__PURE__ */ t(
1832
+ "button",
1833
+ {
1834
+ className: `px-2 py-1 text-[11px] font-mono font-bold uppercase tracking-wide bg-transparent border-none rounded cursor-pointer transition-all ${m === "error" ? "bg-dt-error/25 text-dt-error shadow-[0_0_0_1px_rgba(239,68,68,0.5)]" : "text-dt-text-muted hover:bg-dt-error/15 hover:text-dt-error"}`,
1835
+ onClick: () => E("error"),
1836
+ "aria-label": "Show error subscriptions",
1837
+ "aria-pressed": m === "error",
1838
+ children: "Errors"
1839
+ }
1840
+ )
1841
+ ] }),
1842
+ /* @__PURE__ */ t(
1843
+ Jt,
1844
+ {
1845
+ ref: f,
1846
+ value: k,
1847
+ onValueChange: C,
1848
+ onClear: () => C(""),
1849
+ placeholder: "Search subscriptions... (Cmd/Ctrl+K)",
1850
+ className: "stretch"
1851
+ }
1852
+ )
1853
+ ] }),
1854
+ /* @__PURE__ */ n("div", { className: "flex-1 overflow-y-auto", children: [
1855
+ M.length === 0 && /* @__PURE__ */ n("div", { className: "flex flex-col items-center justify-center py-12 text-dt-text-muted gap-2", children: [
1856
+ /* @__PURE__ */ t("svg", { width: "32", height: "32", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", children: /* @__PURE__ */ t("circle", { cx: "12", cy: "12", r: "10", strokeWidth: "1.5" }) }),
1857
+ /* @__PURE__ */ t("p", { children: r.length === 0 ? "No active subscriptions" : m !== "all" || k ? "No subscriptions match your filters" : "No active subscriptions" }),
1858
+ m !== "all" || k ? /* @__PURE__ */ t("p", { className: "text-[11px] text-dt-text-muted/60", children: "Try adjusting your filters or search" }) : null
1859
+ ] }),
1860
+ M.map((i, d) => {
1861
+ const b = s === i.queryId, P = d === u, I = i.status === "error" ? "error" : "success", T = lt(i.args), X = T != null, H = JSON.stringify(T ?? null, null, 2), Y = `Subscription ${i.queryId} ${i.udfPath} ${i.status}${X ? ` with args ${wt(T, te)}` : ""}`;
1862
+ return /* @__PURE__ */ n(
1863
+ "div",
1864
+ {
1865
+ className: `border-b border-dt-border-light/50 transition-colors ${i.status === "error" ? "border-l-2 border-l-dt-error/40" : ""} ${b ? "bg-white/[0.03]" : ""} ${P ? "bg-white/[0.03] outline outline-1 outline-dt-info/30 -outline-offset-1" : ""}`,
1866
+ children: [
1867
+ /* @__PURE__ */ n(
1868
+ "div",
1869
+ {
1870
+ className: "flex items-center gap-2 px-3 py-1.5 cursor-pointer hover:bg-white/[0.03]",
1871
+ onClick: () => {
1872
+ l(b ? null : i.queryId), c(d);
1873
+ },
1874
+ onKeyDown: (U) => {
1875
+ (U.key === "Enter" || U.key === " ") && (U.preventDefault(), l(b ? null : i.queryId), c(d));
1876
+ },
1877
+ onContextMenu: (U) => {
1878
+ U.preventDefault(), x(null), g({
1879
+ x: U.clientX,
1880
+ y: U.clientY,
1881
+ items: D(i)
1882
+ });
1883
+ },
1884
+ onMouseEnter: (U) => {
1885
+ const j = U.currentTarget.getBoundingClientRect(), Z = q(i, j);
1886
+ Z && x(Z);
1887
+ },
1888
+ onMouseMove: (U) => {
1889
+ if (h?.subscription.queryId === i.queryId) {
1890
+ const j = U.currentTarget.getBoundingClientRect(), Z = q(i, j);
1891
+ Z && x(
1892
+ (rt) => rt && rt.subscription.queryId === i.queryId && (rt.x !== Z.x || rt.y !== Z.y) ? Z : rt
1893
+ );
1894
+ }
1895
+ },
1896
+ onMouseLeave: () => {
1897
+ h?.subscription.queryId === i.queryId && x(null);
1898
+ },
1899
+ role: "button",
1900
+ tabIndex: 0,
1901
+ "aria-label": Y,
1902
+ "aria-expanded": b,
1903
+ "aria-current": P ? "true" : void 0,
1904
+ children: [
1905
+ /* @__PURE__ */ n("span", { className: "text-[10px] font-mono text-dt-text-muted font-semibold shrink-0", children: [
1906
+ "Q",
1907
+ i.queryId
1908
+ ] }),
1909
+ /* @__PURE__ */ t("span", { className: `w-1.5 h-1.5 rounded-full shrink-0 ${I === "error" ? "bg-dt-error" : "bg-dt-success"}` }),
1910
+ /* @__PURE__ */ n("span", { className: "flex items-center gap-0 min-w-0 flex-1 overflow-hidden", children: [
1911
+ /* @__PURE__ */ t(
1912
+ "span",
1913
+ {
1914
+ className: `font-mono text-[12px] text-dt-text-secondary truncate min-w-0 ${X ? "max-w-[44%]" : ""}`,
1915
+ children: i.udfPath
1916
+ }
1917
+ ),
1918
+ X && /* @__PURE__ */ n(
1919
+ "span",
1920
+ {
1921
+ className: "font-mono text-[11px] text-dt-text-muted min-w-0 flex-1 truncate max-w-[min(58vw,680px)]",
1922
+ title: tt(T, 360),
1923
+ children: [
1924
+ /* @__PURE__ */ t("span", { className: "text-dt-text-muted/60", children: "(" }),
1925
+ /* @__PURE__ */ t("span", { className: "text-dt-text-muted", children: wt(T, te) }),
1926
+ /* @__PURE__ */ t("span", { className: "text-dt-text-muted/60", children: ")" })
1927
+ ]
1928
+ }
1929
+ )
1930
+ ] }),
1931
+ /* @__PURE__ */ n("div", { className: "flex items-center gap-2 shrink-0 text-[11px] text-dt-text-muted ml-auto", children: [
1932
+ /* @__PURE__ */ n("span", { className: "text-dt-info font-mono", children: [
1933
+ "↻",
1934
+ i.updateCount
1935
+ ] }),
1936
+ /* @__PURE__ */ t("span", { className: "text-dt-text-muted/60 font-mono", children: A(i.lastUpdate) }),
1937
+ /* @__PURE__ */ t("span", { className: "text-[10px] text-dt-text-muted/40", children: b ? "▼" : "▶" })
1938
+ ] })
1939
+ ]
1940
+ }
1941
+ ),
1942
+ b && /* @__PURE__ */ n("div", { className: "px-3 py-2 bg-dt-bg-secondary/30 border-t border-dt-border-light/30 flex flex-col gap-2 animate-[dt-fade-in_0.15s_ease-out]", children: [
1943
+ /* @__PURE__ */ n("div", { className: "flex items-center gap-1 flex-wrap text-[10px] font-mono", children: [
1944
+ /* @__PURE__ */ n("span", { className: "px-1.5 py-0.5 bg-dt-bg-tertiary rounded text-dt-text-muted", children: [
1945
+ "Started ",
1946
+ new Date(i.addedAt).toLocaleTimeString()
1947
+ ] }),
1948
+ i.componentPath && /* @__PURE__ */ t(
1949
+ "span",
1950
+ {
1951
+ className: "px-1.5 py-0.5 bg-dt-bg-tertiary rounded text-dt-text-muted truncate max-w-[200px]",
1952
+ title: i.componentPath,
1953
+ children: i.componentPath
1954
+ }
1955
+ )
1956
+ ] }),
1957
+ i.status === "error" && i.error && /* @__PURE__ */ t("div", { className: "text-dt-error font-mono text-[11px] bg-dt-error/10 rounded px-2 py-1 break-words", children: i.error }),
1958
+ /* @__PURE__ */ t(
1959
+ gt,
1960
+ {
1961
+ data: T ?? null,
1962
+ label: "Args",
1963
+ onCopy: () => S(H ?? "null"),
1964
+ maxHeight: 200
1965
+ }
1966
+ ),
1967
+ i.currentValue !== void 0 && i.previousValue !== void 0 && /* @__PURE__ */ t(ke, { previous: i.previousValue, current: i.currentValue }),
1968
+ i.currentValue !== void 0 && /* @__PURE__ */ t(
1969
+ gt,
1970
+ {
1971
+ data: i.currentValue,
1972
+ label: "Current Value",
1973
+ onCopy: () => S(JSON.stringify(i.currentValue, null, 2)),
1974
+ maxHeight: 300
1975
+ }
1976
+ )
1977
+ ] })
1978
+ ]
1979
+ },
1980
+ i.queryId
1981
+ );
1982
+ })
1983
+ ] }),
1984
+ h && (() => {
1985
+ const i = h.subscription, d = lt(i.args), b = d !== void 0 ? tt(d) : null, P = d !== void 0 ? p(d) : null, I = d !== void 0 ? tt(d) : "", T = i.currentValue, X = T !== void 0 ? tt(T) : null, H = T !== void 0 ? tt(T) : "", Y = T !== void 0 ? p(T) : null, U = i.status === "error" && i.error ? i.error.length > 160 ? `${i.error.slice(0, 157)}…` : i.error : null;
1986
+ return /* @__PURE__ */ n("div", { className: "fixed z-[9999999] w-[300px] bg-zinc-900/[0.98] border border-dt-border rounded-lg shadow-2xl p-3 flex flex-col gap-2 pointer-events-none animate-[dt-fade-in_0.15s_ease-out] backdrop-blur-lg", style: { top: h.y, left: h.x }, role: "tooltip", children: [
1987
+ /* @__PURE__ */ n("div", { className: "flex items-center gap-2", children: [
1988
+ /* @__PURE__ */ t("span", { className: "inline-flex items-center justify-center w-4 h-4 rounded-[3px] bg-dt-query/20 text-dt-query text-[9px] font-bold shrink-0 shadow-[0_1px_2px_rgba(96,165,250,0.35)]", children: "Q" }),
1989
+ /* @__PURE__ */ t("span", { className: "font-mono text-[12px] text-dt-text truncate flex-1", title: i.udfPath, children: i.udfPath }),
1990
+ /* @__PURE__ */ n("span", { className: `text-[9px] font-bold uppercase flex items-center gap-0.5 px-1.5 py-0.5 rounded-full ${i.status === "error" ? "bg-dt-error/15 text-dt-error" : "bg-dt-success/15 text-dt-success"}`, children: [
1991
+ i.status === "error" ? "❌" : "✓",
1992
+ i.status.toUpperCase()
1993
+ ] })
1994
+ ] }),
1995
+ /* @__PURE__ */ n("div", { className: "flex items-center gap-1 flex-wrap", children: [
1996
+ /* @__PURE__ */ n("span", { className: "px-1.5 py-0.5 bg-dt-bg-tertiary rounded text-[10px] text-dt-text-muted font-mono", children: [
1997
+ "Q",
1998
+ i.queryId
1999
+ ] }),
2000
+ /* @__PURE__ */ n("span", { className: "px-1.5 py-0.5 bg-dt-bg-tertiary rounded text-[10px] text-dt-text-muted font-mono", children: [
2001
+ "↻ ",
2002
+ i.updateCount,
2003
+ " updates"
2004
+ ] }),
2005
+ /* @__PURE__ */ t("span", { className: "px-1.5 py-0.5 bg-dt-bg-tertiary rounded text-[10px] text-dt-text-muted font-mono", children: A(i.lastUpdate) })
2006
+ ] }),
2007
+ i.componentPath && /* @__PURE__ */ t("div", { className: "text-[10px] text-dt-text-muted/60 font-mono truncate", title: i.componentPath, children: i.componentPath }),
2008
+ d !== void 0 && /* @__PURE__ */ n("div", { className: "flex flex-col gap-0.5", children: [
2009
+ /* @__PURE__ */ n("div", { className: "flex items-center justify-between", children: [
2010
+ /* @__PURE__ */ t("span", { className: "text-[10px] font-semibold text-dt-text-tertiary uppercase tracking-wider", children: "Args" }),
2011
+ P && /* @__PURE__ */ t("span", { className: "text-[9px] text-dt-text-muted/60 font-mono", children: P })
2012
+ ] }),
2013
+ /* @__PURE__ */ t("pre", { className: "font-mono text-[10px] text-dt-text-muted bg-zinc-950/50 rounded p-1.5 overflow-hidden max-h-[80px] whitespace-pre-wrap break-all m-0", title: b ?? void 0, children: I })
2014
+ ] }),
2015
+ T !== void 0 && /* @__PURE__ */ n("div", { className: "flex flex-col gap-0.5", children: [
2016
+ /* @__PURE__ */ n("div", { className: "flex items-center justify-between", children: [
2017
+ /* @__PURE__ */ t("span", { className: "text-[10px] font-semibold text-dt-text-tertiary uppercase tracking-wider", children: "Current Value" }),
2018
+ Y && /* @__PURE__ */ t("span", { className: "text-[9px] text-dt-text-muted/60 font-mono", children: Y })
2019
+ ] }),
2020
+ /* @__PURE__ */ t("pre", { className: "font-mono text-[10px] text-dt-text-muted bg-zinc-950/50 rounded p-1.5 overflow-hidden max-h-[80px] whitespace-pre-wrap break-all m-0", title: X ?? void 0, children: H })
2021
+ ] }),
2022
+ U && /* @__PURE__ */ n("div", { className: "flex flex-col gap-0.5", children: [
2023
+ /* @__PURE__ */ t("span", { className: "text-[10px] font-semibold text-dt-text-tertiary uppercase tracking-wider", children: "Error" }),
2024
+ /* @__PURE__ */ t("span", { className: "text-[11px] text-dt-error", title: i.error, children: U })
2025
+ ] })
2026
+ ] });
2027
+ })(),
2028
+ w && /* @__PURE__ */ t(
2029
+ Ut,
2030
+ {
2031
+ x: w.x,
2032
+ y: w.y,
2033
+ items: w.items,
2034
+ onClose: () => g(null)
2035
+ }
2036
+ )
2037
+ ] });
2038
+ }
2039
+ function ke({ previous: o, current: r }) {
2040
+ const [a, s] = _(!0), l = it(() => Bt(o, r), [o, r]);
2041
+ return l.length === 0 ? null : /* @__PURE__ */ n("div", { className: "flex flex-col gap-1", children: [
2042
+ /* @__PURE__ */ n(
2043
+ "button",
2044
+ {
2045
+ className: "flex items-center gap-1 bg-transparent border-none text-dt-text-tertiary cursor-pointer text-[11px] font-semibold uppercase tracking-wider p-0 hover:text-dt-text-secondary transition-colors",
2046
+ onClick: () => s(!a),
2047
+ children: [
2048
+ /* @__PURE__ */ t("span", { className: `text-[10px] transition-transform ${a ? "rotate-90" : ""}`, children: "▶" }),
2049
+ /* @__PURE__ */ n("span", { children: [
2050
+ "Changes (",
2051
+ l.length,
2052
+ ")"
2053
+ ] })
2054
+ ]
2055
+ }
2056
+ ),
2057
+ a && /* @__PURE__ */ t("div", { className: "bg-zinc-950/50 rounded border border-dt-border-light p-2 font-mono text-[11px] max-h-[200px] overflow-y-auto", children: l.map((u, c) => /* @__PURE__ */ n("div", { className: `py-px ${u.type === "added" ? "text-dt-success bg-dt-success/5" : u.type === "removed" ? "text-dt-error bg-dt-error/5" : "text-dt-warning bg-dt-warning/5"}`, children: [
2058
+ /* @__PURE__ */ t("span", { className: "select-none opacity-60 mr-1", children: u.type === "added" ? "+" : u.type === "removed" ? "-" : "~" }),
2059
+ /* @__PURE__ */ n("span", { className: "text-dt-text-muted", children: [
2060
+ u.path,
2061
+ ":"
2062
+ ] }),
2063
+ " ",
2064
+ u.type === "changed" ? /* @__PURE__ */ n(G, { children: [
2065
+ /* @__PURE__ */ t("span", { className: "text-dt-error line-through opacity-70", children: u.oldVal }),
2066
+ " → ",
2067
+ /* @__PURE__ */ t("span", { className: "text-dt-success", children: u.newVal })
2068
+ ] }) : /* @__PURE__ */ t("span", { children: u.value })
2069
+ ] }, c)) })
2070
+ ] });
2071
+ }
2072
+ function Bt(o, r, a = "$") {
2073
+ const s = [], l = (u) => {
2074
+ const c = JSON.stringify(u);
2075
+ return c && c.length > 80 ? c.slice(0, 77) + "…" : c;
2076
+ };
2077
+ if (o === r) return s;
2078
+ if (o === null || r === null || typeof o != typeof r || typeof o != "object" || typeof r != "object")
2079
+ return s.push({ type: "changed", path: a, oldVal: l(o), newVal: l(r) }), s;
2080
+ if (Array.isArray(o) && Array.isArray(r)) {
2081
+ const u = Math.max(o.length, r.length);
2082
+ for (let c = 0; c < u && s.length < 50; c++)
2083
+ c >= o.length ? s.push({ type: "added", path: `${a}[${c}]`, value: l(r[c]) }) : c >= r.length ? s.push({ type: "removed", path: `${a}[${c}]`, value: l(o[c]) }) : s.push(...Bt(o[c], r[c], `${a}[${c}]`));
2084
+ return s;
2085
+ }
2086
+ if (!Array.isArray(o) && !Array.isArray(r)) {
2087
+ const u = o, c = r, m = /* @__PURE__ */ new Set([...Object.keys(u), ...Object.keys(c)]);
2088
+ for (const E of m) {
2089
+ if (s.length >= 50) break;
2090
+ E in u ? E in c ? s.push(...Bt(u[E], c[E], `${a}.${E}`)) : s.push({ type: "removed", path: `${a}.${E}`, value: l(u[E]) }) : s.push({ type: "added", path: `${a}.${E}`, value: l(c[E]) });
2091
+ }
2092
+ }
2093
+ return s;
2094
+ }
2095
+ function Ne({ eventStore: o, onNavigate: r }) {
2096
+ const [a, s] = _(null), [l, u] = _([]);
2097
+ J(() => {
2098
+ const f = () => {
2099
+ s(o.getPerformanceMetrics()), u(o.getAllEvents());
2100
+ }, M = o.subscribe(f);
2101
+ return f(), M;
2102
+ }, [o]);
2103
+ const c = it(() => {
2104
+ const f = (i) => {
2105
+ const d = typeof i == "number" ? i : typeof i == "string" ? Number(i) : Number.NaN;
2106
+ return !Number.isFinite(d) || d < 0 ? null : d;
2107
+ }, M = Date.now(), S = 6e4, q = 60, p = S / q, D = l.flatMap((i) => {
2108
+ if (i?.type !== "query" && i?.type !== "mutation" && i?.type !== "action")
2109
+ return [];
2110
+ const d = typeof i.timestamp == "number" && Number.isFinite(i.timestamp) ? i.timestamp : null, b = f(i.endToEndDurationMs ?? i.duration);
2111
+ return d === null || b === null ? [] : [{ type: i.type, timestamp: d, duration: b }];
2112
+ }), A = (i) => {
2113
+ const d = new Array(q).fill(0), b = new Array(q).fill(0);
2114
+ for (const P of D) {
2115
+ if (i && P.type !== i) continue;
2116
+ const I = M - P.timestamp;
2117
+ if (I > S || I < 0) continue;
2118
+ const T = Math.min(q - 1, Math.floor((S - I) / p));
2119
+ T < 0 || T >= q || (d[T] += P.duration, b[T]++);
2120
+ }
2121
+ return d.map((P, I) => b[I] > 0 ? P / b[I] : 0);
2122
+ };
2123
+ return {
2124
+ all: A(),
2125
+ query: A("query"),
2126
+ mutation: A("mutation"),
2127
+ action: A("action")
2128
+ };
2129
+ }, [l]), m = V((f) => {
2130
+ o.setFocusedEventId(f), r?.("activity");
2131
+ }, [o, r]);
2132
+ if (!a)
2133
+ return /* @__PURE__ */ t("div", { className: "flex flex-col h-full overflow-hidden p-3 gap-3", children: "Loading..." });
2134
+ const E = a.totalQueries + a.totalMutations + a.totalActions > 0, k = l.some(
2135
+ (f) => (f?.type === "query" || f?.type === "mutation" || f?.type === "action") && typeof f?.simulatedDelayMs == "number" && f.simulatedDelayMs > 0
2136
+ ), C = a.totalQueries + a.totalMutations + a.totalActions, h = C > 0 ? a.totalQueries / C * 100 : 0, x = C > 0 ? a.totalMutations / C * 100 : 0, w = C > 0 ? a.totalActions / C * 100 : 0, g = Math.max(a.slowestOperations[0]?.duration ?? 0, 1);
2137
+ return /* @__PURE__ */ t("div", { className: "flex flex-col h-full overflow-hidden", children: /* @__PURE__ */ n("div", { className: "flex-1 min-h-0 overflow-y-auto p-3 flex flex-col gap-3", children: [
2138
+ !E && /* @__PURE__ */ n("div", { className: "flex flex-col items-center justify-center py-12 text-dt-text-muted gap-2", children: [
2139
+ /* @__PURE__ */ t("svg", { width: "32", height: "32", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", children: /* @__PURE__ */ t("path", { d: "M13 2L3 14h9l-1 8 10-12h-9l1-8z", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }) }),
2140
+ /* @__PURE__ */ t("p", { children: "No performance data yet" })
2141
+ ] }),
2142
+ E && /* @__PURE__ */ n(G, { children: [
2143
+ /* @__PURE__ */ n("div", { className: "flex items-center gap-1 text-[11px] font-mono flex-wrap px-1", children: [
2144
+ /* @__PURE__ */ t("span", { className: "text-dt-text-muted", children: "Total:" }),
2145
+ /* @__PURE__ */ t("span", { className: "font-semibold text-dt-text-secondary", children: C }),
2146
+ /* @__PURE__ */ t("span", { className: "text-dt-border mx-0.5", children: "|" }),
2147
+ /* @__PURE__ */ t("span", { className: "text-dt-text-muted", children: "Q:" }),
2148
+ /* @__PURE__ */ t("span", { className: "font-semibold text-dt-query", children: a.totalQueries }),
2149
+ /* @__PURE__ */ n("span", { className: "text-dt-text-muted/60 text-[10px]", children: [
2150
+ "(",
2151
+ h.toFixed(0),
2152
+ "%)"
2153
+ ] }),
2154
+ /* @__PURE__ */ t("span", { className: "text-dt-border mx-0.5", children: "|" }),
2155
+ /* @__PURE__ */ t("span", { className: "text-dt-text-muted", children: "M:" }),
2156
+ /* @__PURE__ */ t("span", { className: "font-semibold text-dt-mutation", children: a.totalMutations }),
2157
+ /* @__PURE__ */ n("span", { className: "text-dt-text-muted/60 text-[10px]", children: [
2158
+ "(",
2159
+ x.toFixed(0),
2160
+ "%)"
2161
+ ] }),
2162
+ /* @__PURE__ */ t("span", { className: "text-dt-border mx-0.5", children: "|" }),
2163
+ /* @__PURE__ */ t("span", { className: "text-dt-text-muted", children: "A:" }),
2164
+ /* @__PURE__ */ t("span", { className: "font-semibold text-dt-action", children: a.totalActions }),
2165
+ /* @__PURE__ */ n("span", { className: "text-dt-text-muted/60 text-[10px]", children: [
2166
+ "(",
2167
+ w.toFixed(0),
2168
+ "%)"
2169
+ ] })
2170
+ ] }),
2171
+ /* @__PURE__ */ n("div", { className: "flex flex-col gap-2", children: [
2172
+ /* @__PURE__ */ n("div", { className: "text-[11px] font-semibold text-dt-text-tertiary uppercase tracking-wider", children: [
2173
+ "Latency (60s window)",
2174
+ k && /* @__PURE__ */ t("span", { className: "ml-2 text-[10px] normal-case font-normal text-dt-warning/90", children: "includes simulated delay" })
2175
+ ] }),
2176
+ /* @__PURE__ */ t(Dt, { label: "All", data: c.all, color: "#e4e4e7" }),
2177
+ /* @__PURE__ */ t(Dt, { label: "Query", data: c.query, color: "#60a5fa" }),
2178
+ /* @__PURE__ */ t(Dt, { label: "Mutation", data: c.mutation, color: "#a78bfa" }),
2179
+ /* @__PURE__ */ t(Dt, { label: "Action", data: c.action, color: "#34d399" })
2180
+ ] }),
2181
+ /* @__PURE__ */ n("div", { className: "flex flex-col border border-dt-border-light rounded-lg overflow-hidden", children: [
2182
+ /* @__PURE__ */ n("div", { className: "grid grid-cols-6 gap-0 px-2 py-1.5 bg-dt-bg-tertiary/50 text-[10px] font-semibold text-dt-text-muted uppercase tracking-wider", children: [
2183
+ /* @__PURE__ */ t("span", { children: "Type" }),
2184
+ /* @__PURE__ */ t("span", { children: "Avg" }),
2185
+ /* @__PURE__ */ t("span", { children: "P50" }),
2186
+ /* @__PURE__ */ t("span", { children: "P90" }),
2187
+ /* @__PURE__ */ t("span", { children: "P95" }),
2188
+ /* @__PURE__ */ t("span", { children: "P99" })
2189
+ ] }),
2190
+ /* @__PURE__ */ n("div", { className: "grid grid-cols-6 gap-0 px-2 py-1.5 border-t border-dt-border-light/50 text-[11px] font-mono text-dt-text-secondary", children: [
2191
+ /* @__PURE__ */ t("span", { className: "text-dt-query font-bold", children: "Q" }),
2192
+ /* @__PURE__ */ t("span", { children: Q(a.avgQueryDuration) }),
2193
+ /* @__PURE__ */ t("span", { children: Q(a.p50QueryDuration) }),
2194
+ /* @__PURE__ */ t("span", { children: Q(a.p90QueryDuration) }),
2195
+ /* @__PURE__ */ t("span", { children: Q(a.p95QueryDuration) }),
2196
+ /* @__PURE__ */ t("span", { children: Q(a.p99QueryDuration) })
2197
+ ] }),
2198
+ /* @__PURE__ */ n("div", { className: "grid grid-cols-6 gap-0 px-2 py-1.5 border-t border-dt-border-light/50 text-[11px] font-mono text-dt-text-secondary", children: [
2199
+ /* @__PURE__ */ t("span", { className: "text-dt-mutation font-bold", children: "M" }),
2200
+ /* @__PURE__ */ t("span", { children: Q(a.avgMutationDuration) }),
2201
+ /* @__PURE__ */ t("span", { children: Q(a.p50MutationDuration) }),
2202
+ /* @__PURE__ */ t("span", { children: Q(a.p90MutationDuration) }),
2203
+ /* @__PURE__ */ t("span", { children: Q(a.p95MutationDuration) }),
2204
+ /* @__PURE__ */ t("span", { children: Q(a.p99MutationDuration) })
2205
+ ] }),
2206
+ /* @__PURE__ */ n("div", { className: "grid grid-cols-6 gap-0 px-2 py-1.5 border-t border-dt-border-light/50 text-[11px] font-mono text-dt-text-secondary", children: [
2207
+ /* @__PURE__ */ t("span", { className: "text-dt-action font-bold", children: "A" }),
2208
+ /* @__PURE__ */ t("span", { children: Q(a.avgActionDuration) }),
2209
+ /* @__PURE__ */ t("span", { children: Q(a.p50ActionDuration) }),
2210
+ /* @__PURE__ */ t("span", { children: Q(a.p90ActionDuration) }),
2211
+ /* @__PURE__ */ t("span", { children: Q(a.p95ActionDuration) }),
2212
+ /* @__PURE__ */ t("span", { children: Q(a.p99ActionDuration) })
2213
+ ] })
2214
+ ] }),
2215
+ a.slowestOperations.length > 0 && /* @__PURE__ */ n("div", { className: "flex flex-col gap-1", children: [
2216
+ /* @__PURE__ */ t("div", { className: "text-[11px] font-semibold text-dt-text-tertiary uppercase tracking-wider", children: "Slowest Operations" }),
2217
+ /* @__PURE__ */ t("div", { className: "flex flex-col gap-0.5", children: a.slowestOperations.map((f, M) => /* @__PURE__ */ n(
2218
+ "button",
2219
+ {
2220
+ className: "flex items-center gap-2 text-[11px] py-0.5 px-1 bg-transparent border-none text-left cursor-pointer rounded hover:bg-white/[0.04] focus:outline-none focus:ring-1 focus:ring-dt-info/40",
2221
+ onClick: () => m(f.eventId),
2222
+ title: "Open operation in Activity",
2223
+ type: "button",
2224
+ children: [
2225
+ /* @__PURE__ */ t("span", { className: "text-dt-text-muted/40 w-4 text-right font-mono text-[10px]", children: M + 1 }),
2226
+ /* @__PURE__ */ t("span", { className: `inline-flex items-center justify-center w-4 h-4 rounded text-[9px] font-bold ${f.type === "query" ? "text-dt-query" : f.type === "mutation" ? "text-dt-mutation" : "text-dt-action"}`, children: f.type[0].toUpperCase() }),
2227
+ /* @__PURE__ */ t("span", { className: "font-mono text-dt-text-secondary truncate flex-1", children: f.udfPath }),
2228
+ /* @__PURE__ */ t("span", { className: "font-mono text-dt-text-muted shrink-0", children: Q(f.duration) }),
2229
+ /* @__PURE__ */ t("div", { className: "w-16 h-1.5 bg-dt-bg-tertiary rounded-full overflow-hidden shrink-0", children: /* @__PURE__ */ t(
2230
+ "div",
2231
+ {
2232
+ className: `h-full rounded-full ${f.type === "query" ? "bg-dt-query" : f.type === "mutation" ? "bg-dt-mutation" : "bg-dt-action"}`,
2233
+ style: { width: `${Math.min(100, Math.max(2, f.duration / g * 100))}%` }
2234
+ }
2235
+ ) })
2236
+ ]
2237
+ },
2238
+ f.eventId
2239
+ )) })
2240
+ ] })
2241
+ ] })
2242
+ ] }) });
2243
+ }
2244
+ function Dt({ label: o, data: r, color: a }) {
2245
+ const s = r.map(
2246
+ (c) => typeof c == "number" && Number.isFinite(c) && c > 0 ? c : 0
2247
+ ), l = Math.max(...s, 1), u = s[s.length - 1] || 0;
2248
+ return /* @__PURE__ */ n("div", { className: "flex items-center gap-2", children: [
2249
+ /* @__PURE__ */ t("span", { className: "text-[10px] font-mono text-dt-text-muted w-14 shrink-0", children: o }),
2250
+ /* @__PURE__ */ t("div", { className: "flex-1 h-5 flex items-end gap-px", children: s.map((c, m) => /* @__PURE__ */ t(
2251
+ "div",
2252
+ {
2253
+ className: "flex-1 rounded-t-sm min-h-px",
2254
+ style: {
2255
+ height: `${Math.max(1, c / l * 100)}%`,
2256
+ backgroundColor: c > 0 ? a : "rgba(63,63,70,0.3)",
2257
+ opacity: c > 0 ? 0.5 + m / s.length * 0.5 : 0.2
2258
+ }
2259
+ },
2260
+ m
2261
+ )) }),
2262
+ /* @__PURE__ */ t("span", { className: "text-[10px] font-mono text-dt-text-muted w-14 text-right shrink-0", children: u > 0 ? Q(u) : "—" })
2263
+ ] });
2264
+ }
2265
+ function Q(o) {
2266
+ return !Number.isFinite(o) || o < 0 ? "—" : o < 1e3 ? `${o.toFixed(3)}ms` : `${(o / 1e3).toFixed(3)}s`;
2267
+ }
2268
+ function Ee(o) {
2269
+ return o.type === "query" || o.type === "mutation" || o.type === "action";
2270
+ }
2271
+ function ee(o) {
2272
+ return o.type === "query" ? `Q${o.queryId}` : o.type === "mutation" ? `M${o.requestId}` : `A${o.requestId}`;
2273
+ }
2274
+ function Ce({ eventStore: o, onNavigate: r }) {
2275
+ const [a, s] = _([]), [l, u] = _(/* @__PURE__ */ new Map()), [c, m] = _(!0), [E, k] = _("all"), [C, h] = _(""), [x, w] = _(null), g = ft(null), f = ft(null), M = V(
2276
+ (p) => {
2277
+ p && (o.setFocusedEventId(p), r?.("activity"));
2278
+ },
2279
+ [o, r]
2280
+ );
2281
+ J(() => {
2282
+ const p = () => {
2283
+ const A = o.getAllEvents(), i = /* @__PURE__ */ new Map(), d = [];
2284
+ for (const b of A) {
2285
+ if (b.type === "log") {
2286
+ d.push(b);
2287
+ continue;
2288
+ }
2289
+ Ee(b) && i.set(b.id, b);
2290
+ }
2291
+ s(d), u(i);
2292
+ }, D = o.subscribe(p);
2293
+ return p(), D;
2294
+ }, [o]);
2295
+ const S = it(() => {
2296
+ const p = C.trim().toLowerCase().split(/\s+/).filter((D) => D.length > 0);
2297
+ return a.filter((D) => {
2298
+ if (E !== "all" && D.level !== E) return !1;
2299
+ if (p.length === 0) return !0;
2300
+ const A = D.relatedEventId ? l.get(D.relatedEventId) : void 0, i = [
2301
+ D.message,
2302
+ D.level,
2303
+ D.relatedEventId ?? "",
2304
+ A?.udfPath ?? "",
2305
+ A?.type ?? "",
2306
+ A ? ee(A) : ""
2307
+ ].join(`
2308
+ `).toLowerCase();
2309
+ return p.every((d) => i.includes(d));
2310
+ });
2311
+ }, [a, E, C, l]);
2312
+ J(() => {
2313
+ const p = (D) => {
2314
+ if ((D.metaKey || D.ctrlKey) && D.key === "k") {
2315
+ D.preventDefault(), g.current?.focus();
2316
+ return;
2317
+ }
2318
+ D.key === "Escape" && (E !== "all" || C) && (D.preventDefault(), k("all"), h(""));
2319
+ };
2320
+ return window.addEventListener("keydown", p), () => window.removeEventListener("keydown", p);
2321
+ }, [E, C]), J(() => {
2322
+ c && f.current && f.current.scrollIntoView({ behavior: "smooth" });
2323
+ }, [S.length, c]);
2324
+ const q = V(
2325
+ (p) => {
2326
+ const D = p.relatedEventId ? l.get(p.relatedEventId) : void 0, A = new Date(p.timestamp).toLocaleTimeString([], {
2327
+ hour: "2-digit",
2328
+ minute: "2-digit",
2329
+ second: "2-digit",
2330
+ fractionalSecondDigits: 3
2331
+ }), i = [
2332
+ { label: "Copy Message", action: () => O(p.message), shortcut: "⌘C" },
2333
+ { label: "Copy Timestamp", action: () => O(A) }
2334
+ ];
2335
+ return i.push({
2336
+ label: `Filter by Level: ${p.level}`,
2337
+ action: () => k(p.level),
2338
+ separator: !0
2339
+ }), p.relatedEventId && i.push({
2340
+ label: "Copy Related Event ID",
2341
+ action: () => O(p.relatedEventId)
2342
+ }), D && (i.push({
2343
+ label: "Copy Related Function Path",
2344
+ action: () => O(D.udfPath)
2345
+ }), i.push({
2346
+ label: "Filter by Related Function",
2347
+ action: () => h(D.udfPath)
2348
+ })), p.relatedEventId && r && i.push({
2349
+ label: "Go to Related Event",
2350
+ action: () => M(p.relatedEventId)
2351
+ }), i.push({
2352
+ label: "Copy as JSON",
2353
+ action: () => O(JSON.stringify(p, null, 2)),
2354
+ separator: !0
2355
+ }), i;
2356
+ },
2357
+ [M, r, l]
2358
+ );
2359
+ return /* @__PURE__ */ n("div", { className: "flex flex-col h-full overflow-hidden", children: [
2360
+ /* @__PURE__ */ n("div", { className: "flex items-center gap-2 px-3 py-1.5 border-b border-dt-border-light", children: [
2361
+ /* @__PURE__ */ t("div", { className: "flex items-center gap-0.5", children: ["all", "log", "info", "warn", "error"].map((p) => /* @__PURE__ */ t(
2362
+ "button",
2363
+ {
2364
+ className: `px-2 py-1 text-[11px] bg-transparent border rounded-md cursor-pointer transition-all ${E === p ? p === "info" ? "bg-dt-info/20 text-dt-info border-dt-info/30 font-medium" : p === "warn" ? "bg-dt-warning/20 text-dt-warning border-dt-warning/30 font-medium" : p === "error" ? "bg-dt-error/20 text-dt-error border-dt-error/30 font-medium" : "bg-white/10 text-dt-text-secondary border-dt-border-light font-medium" : p === "info" ? "border-transparent text-dt-text-muted hover:bg-dt-info/15 hover:text-dt-info" : p === "warn" ? "border-transparent text-dt-text-muted hover:bg-dt-warning/15 hover:text-dt-warning" : p === "error" ? "border-transparent text-dt-text-muted hover:bg-dt-error/15 hover:text-dt-error" : "border-transparent text-dt-text-muted hover:bg-white/5 hover:text-dt-text-tertiary"}`,
2365
+ onClick: () => k(p),
2366
+ children: p.charAt(0).toUpperCase() + p.slice(1)
2367
+ },
2368
+ p
2369
+ )) }),
2370
+ /* @__PURE__ */ t(
2371
+ Jt,
2372
+ {
2373
+ ref: g,
2374
+ value: C,
2375
+ onValueChange: h,
2376
+ onClear: () => h(""),
2377
+ placeholder: "Search msg/path/id... (Cmd/Ctrl+K)",
2378
+ className: "stretch"
2379
+ }
2380
+ ),
2381
+ /* @__PURE__ */ n("label", { className: "flex items-center gap-1.5 text-[11px] text-dt-text-muted cursor-pointer ml-auto select-none", children: [
2382
+ /* @__PURE__ */ t("input", { type: "checkbox", checked: c, onChange: (p) => m(p.target.checked) }),
2383
+ "Auto-scroll"
2384
+ ] })
2385
+ ] }),
2386
+ /* @__PURE__ */ n("div", { className: "flex-1 overflow-y-auto p-1", children: [
2387
+ S.length === 0 && /* @__PURE__ */ n("div", { className: "flex flex-col items-center justify-center py-12 text-dt-text-muted gap-2", children: [
2388
+ /* @__PURE__ */ t("p", { children: "No logs yet" }),
2389
+ /* @__PURE__ */ t("p", { className: "text-[11px] text-dt-text-muted/60", children: "Console output from functions will appear here" })
2390
+ ] }),
2391
+ S.map((p) => {
2392
+ const D = p.relatedEventId ? l.get(p.relatedEventId) : void 0, A = D ? ee(D) : null;
2393
+ return /* @__PURE__ */ n(
2394
+ "div",
2395
+ {
2396
+ className: `flex items-start gap-2 px-2 py-1 text-[11px] font-mono border-b border-dt-border-light/30 hover:bg-white/[0.02] ${p.level === "warn" ? "bg-dt-warning/5" : p.level === "error" ? "bg-dt-error/5" : ""}`,
2397
+ onContextMenu: (i) => {
2398
+ i.preventDefault(), w({
2399
+ x: i.clientX,
2400
+ y: i.clientY,
2401
+ items: q(p)
2402
+ });
2403
+ },
2404
+ children: [
2405
+ /* @__PURE__ */ t("span", { className: "text-dt-text-muted/60 shrink-0", children: new Date(p.timestamp).toLocaleTimeString([], {
2406
+ hour: "2-digit",
2407
+ minute: "2-digit",
2408
+ second: "2-digit",
2409
+ fractionalSecondDigits: 3
2410
+ }) }),
2411
+ /* @__PURE__ */ t("span", { className: `font-semibold shrink-0 w-10 uppercase text-[10px] ${p.level === "info" ? "text-dt-info" : p.level === "warn" ? "text-dt-warning" : p.level === "error" ? "text-dt-error" : "text-dt-text-muted"}`, children: p.level.toUpperCase() }),
2412
+ /* @__PURE__ */ n("div", { className: "flex-1 min-w-0", children: [
2413
+ /* @__PURE__ */ t("div", { className: "text-dt-text-secondary break-all", children: p.message }),
2414
+ D && /* @__PURE__ */ n("div", { className: "text-[10px] text-dt-text-muted/70 truncate", title: `${D.type} ${D.udfPath}`, children: [
2415
+ D.type,
2416
+ " ",
2417
+ D.udfPath
2418
+ ] })
2419
+ ] }),
2420
+ p.relatedEventId && /* @__PURE__ */ t(
2421
+ "button",
2422
+ {
2423
+ className: "shrink-0 px-1 py-0.5 bg-transparent border border-dt-border-light/50 rounded text-[9px] font-mono text-dt-text-muted cursor-pointer hover:text-dt-info hover:border-dt-info/30 transition-colors",
2424
+ onClick: () => M(p.relatedEventId),
2425
+ title: D ? `Open ${D.udfPath}` : `From: ${p.relatedEventId}`,
2426
+ children: A ?? p.relatedEventId.split("-")[0]
2427
+ }
2428
+ )
2429
+ ]
2430
+ },
2431
+ p.id
2432
+ );
2433
+ }),
2434
+ /* @__PURE__ */ t("div", { ref: f })
2435
+ ] }),
2436
+ x && /* @__PURE__ */ t(
2437
+ Ut,
2438
+ {
2439
+ x: x.x,
2440
+ y: x.y,
2441
+ items: x.items,
2442
+ onClose: () => w(null)
2443
+ }
2444
+ )
2445
+ ] });
2446
+ }
2447
+ function De({ eventStore: o }) {
2448
+ const [r, a] = _(o.getSettings()), [s, l] = _(o.getSnapshots()), u = o.isPausedState(), c = o.isPersistenceEnabled();
2449
+ J(() => (a(o.getSettings()), o.subscribeSettings((f) => {
2450
+ a(f);
2451
+ })), [o]);
2452
+ const m = (g, f) => {
2453
+ o.saveSettings({ [g]: f });
2454
+ }, E = () => {
2455
+ const g = o.exportSession(), f = new Blob([JSON.stringify(g, null, 2)], {
2456
+ type: "application/json"
2457
+ }), M = URL.createObjectURL(f), S = document.createElement("a");
2458
+ S.href = M, S.download = `concave-devtools-${Date.now()}.json`, S.click(), URL.revokeObjectURL(M);
2459
+ }, k = () => {
2460
+ const g = document.createElement("input");
2461
+ g.type = "file", g.accept = ".json", g.onchange = async (f) => {
2462
+ const M = f.target.files?.[0];
2463
+ if (M)
2464
+ try {
2465
+ const S = await M.text(), q = JSON.parse(S), p = o.importSession(q);
2466
+ alert(p ? "Session imported successfully!" : "Failed to import session. Invalid format.");
2467
+ } catch (S) {
2468
+ alert(`Failed to import session: ${S}`);
2469
+ }
2470
+ }, g.click();
2471
+ }, C = () => {
2472
+ o.createSnapshot(), l(o.getSnapshots());
2473
+ }, h = (g) => {
2474
+ confirm("Restore to this snapshot? Current state will be replaced.") && o.restoreSnapshot(g) && l(o.getSnapshots());
2475
+ }, x = () => {
2476
+ u ? o.resume() : o.pause(), a({ ...o.getSettings() });
2477
+ }, w = () => {
2478
+ o.clear(), l([]);
2479
+ };
2480
+ return /* @__PURE__ */ n("div", { className: "flex flex-col h-full overflow-y-auto p-3 gap-3", children: [
2481
+ /* @__PURE__ */ n("div", { className: "flex flex-col gap-1.5", children: [
2482
+ /* @__PURE__ */ t("h4", { className: "text-[11px] font-semibold text-dt-text-secondary uppercase tracking-wider m-0 pb-1 border-b border-dt-border-light", children: "Recording" }),
2483
+ /* @__PURE__ */ n("div", { className: "flex items-center gap-2 px-2 py-1.5 rounded-md border border-dt-border-light/30 bg-dt-bg-secondary/30", children: [
2484
+ /* @__PURE__ */ t(
2485
+ "span",
2486
+ {
2487
+ className: `px-1.5 py-0.5 rounded text-[10px] font-semibold uppercase tracking-wide ${u ? "bg-dt-warning/20 text-dt-warning" : "bg-dt-success/20 text-dt-success"}`,
2488
+ children: u ? "Paused" : "Live"
2489
+ }
2490
+ ),
2491
+ /* @__PURE__ */ t("span", { className: "text-[11px] text-dt-text-muted", children: u ? "No new events" : "Capturing events" }),
2492
+ /* @__PURE__ */ t(
2493
+ "button",
2494
+ {
2495
+ type: "button",
2496
+ className: `ml-auto px-2.5 py-1 rounded-md text-[11px] font-medium cursor-pointer border transition-all ${u ? "bg-dt-success/15 text-dt-success border-dt-success/30 hover:bg-dt-success/25" : "bg-dt-error/15 text-dt-error border-dt-error/30 hover:bg-dt-error/25"}`,
2497
+ onClick: x,
2498
+ children: u ? "Resume" : "Pause"
2499
+ }
2500
+ )
2501
+ ] })
2502
+ ] }),
2503
+ /* @__PURE__ */ n("div", { className: "flex flex-col gap-1.5", children: [
2504
+ /* @__PURE__ */ t("h4", { className: "text-[11px] font-semibold text-dt-text-secondary uppercase tracking-wider m-0 pb-1 border-b border-dt-border-light", children: "General" }),
2505
+ /* @__PURE__ */ n(
2506
+ "label",
2507
+ {
2508
+ className: `flex items-center gap-2 px-2 py-1.5 rounded-md border border-dt-border-light/30 text-[12px] ${c ? "cursor-pointer" : "cursor-not-allowed opacity-70"}`,
2509
+ children: [
2510
+ /* @__PURE__ */ t(
2511
+ "input",
2512
+ {
2513
+ type: "checkbox",
2514
+ checked: r.persistEvents,
2515
+ disabled: !c,
2516
+ onChange: (g) => m("persistEvents", g.target.checked)
2517
+ }
2518
+ ),
2519
+ /* @__PURE__ */ t("span", { className: "text-dt-text-secondary", children: "Persist events" }),
2520
+ /* @__PURE__ */ t("span", { className: "ml-auto text-[10px] text-dt-text-muted", children: c ? "localStorage" : "disabled in panel" })
2521
+ ]
2522
+ }
2523
+ ),
2524
+ /* @__PURE__ */ n("label", { className: "flex items-center gap-2 px-2 py-1.5 rounded-md border border-dt-border-light/30 text-[12px] cursor-pointer", children: [
2525
+ /* @__PURE__ */ t(
2526
+ "input",
2527
+ {
2528
+ type: "checkbox",
2529
+ checked: r.captureLogLines,
2530
+ onChange: (g) => m("captureLogLines", g.target.checked)
2531
+ }
2532
+ ),
2533
+ /* @__PURE__ */ t("span", { className: "text-dt-text-secondary", children: "Capture console logs" })
2534
+ ] }),
2535
+ /* @__PURE__ */ n("label", { className: "flex items-center gap-2 px-2 py-1.5 rounded-md border border-dt-border-light/30 text-[12px] cursor-pointer", children: [
2536
+ /* @__PURE__ */ t(
2537
+ "input",
2538
+ {
2539
+ type: "checkbox",
2540
+ checked: r.autoPauseOnError,
2541
+ onChange: (g) => m("autoPauseOnError", g.target.checked)
2542
+ }
2543
+ ),
2544
+ /* @__PURE__ */ t("span", { className: "text-dt-text-secondary", children: "Auto-pause on error" })
2545
+ ] }),
2546
+ /* @__PURE__ */ n("div", { className: "flex items-center gap-2 px-2 py-1.5 rounded-md border border-dt-border-light/30 text-[12px]", children: [
2547
+ /* @__PURE__ */ t("span", { className: "text-dt-text-secondary", children: "Max events" }),
2548
+ /* @__PURE__ */ t(
2549
+ "input",
2550
+ {
2551
+ type: "number",
2552
+ className: "w-20 bg-dt-bg-tertiary border border-dt-border-light rounded px-2 py-1 text-[12px] text-dt-text-secondary font-mono outline-none focus:border-dt-info/50",
2553
+ value: r.maxEvents,
2554
+ onChange: (g) => m("maxEvents", parseInt(g.target.value, 10) || 1e3),
2555
+ min: "100",
2556
+ max: "10000",
2557
+ step: "100"
2558
+ }
2559
+ ),
2560
+ /* @__PURE__ */ t("span", { className: "ml-auto text-[10px] text-dt-text-muted", children: "100-10000" })
2561
+ ] })
2562
+ ] }),
2563
+ /* @__PURE__ */ n("div", { className: "flex flex-col gap-1.5", children: [
2564
+ /* @__PURE__ */ t("h4", { className: "text-[11px] font-semibold text-dt-text-secondary uppercase tracking-wider m-0 pb-1 border-b border-dt-border-light", children: "Network Simulation" }),
2565
+ /* @__PURE__ */ n("div", { className: "flex items-center gap-2 px-2 py-1.5 rounded-md border border-dt-border-light/30 text-[12px]", children: [
2566
+ /* @__PURE__ */ t("span", { className: "text-dt-text-secondary", children: "Latency" }),
2567
+ /* @__PURE__ */ t(
2568
+ "input",
2569
+ {
2570
+ type: "number",
2571
+ className: "w-20 bg-dt-bg-tertiary border border-dt-border-light rounded px-2 py-1 text-[12px] text-dt-text-secondary font-mono outline-none focus:border-dt-info/50",
2572
+ value: r.wsLatencyMs,
2573
+ onChange: (g) => m("wsLatencyMs", Math.max(0, parseInt(g.target.value, 10) || 0)),
2574
+ min: "0",
2575
+ max: "10000",
2576
+ step: "50"
2577
+ }
2578
+ ),
2579
+ /* @__PURE__ */ t("span", { className: "text-[10px] text-dt-text-muted", children: "ms" })
2580
+ ] }),
2581
+ /* @__PURE__ */ n("div", { className: "flex items-center gap-2 px-2 py-1.5 rounded-md border border-dt-border-light/30 text-[12px]", children: [
2582
+ /* @__PURE__ */ t("span", { className: "text-dt-text-secondary", children: "Jitter" }),
2583
+ /* @__PURE__ */ t(
2584
+ "input",
2585
+ {
2586
+ type: "number",
2587
+ className: "w-20 bg-dt-bg-tertiary border border-dt-border-light rounded px-2 py-1 text-[12px] text-dt-text-secondary font-mono outline-none focus:border-dt-info/50",
2588
+ value: r.wsJitterMs,
2589
+ onChange: (g) => m("wsJitterMs", Math.max(0, parseInt(g.target.value, 10) || 0)),
2590
+ min: "0",
2591
+ max: "5000",
2592
+ step: "25"
2593
+ }
2594
+ ),
2595
+ /* @__PURE__ */ t("span", { className: "text-[10px] text-dt-text-muted", children: "ms" })
2596
+ ] }),
2597
+ (r.wsLatencyMs > 0 || r.wsJitterMs > 0) && /* @__PURE__ */ n("div", { className: "flex items-center gap-2 px-2 py-1.5 rounded-md border border-dt-warning/30 bg-dt-warning/5 text-[11px]", children: [
2598
+ /* @__PURE__ */ t("span", { className: "px-1.5 py-0.5 rounded bg-dt-warning/20 text-dt-warning text-[10px] font-semibold uppercase tracking-wide", children: "Active" }),
2599
+ /* @__PURE__ */ n("span", { className: "text-dt-text-muted", children: [
2600
+ r.wsLatencyMs,
2601
+ "ms",
2602
+ r.wsJitterMs > 0 ? ` ±${r.wsJitterMs}ms` : ""
2603
+ ] }),
2604
+ /* @__PURE__ */ t(
2605
+ "button",
2606
+ {
2607
+ type: "button",
2608
+ className: "ml-auto px-2 py-0.5 rounded-md text-[10px] font-medium cursor-pointer border bg-dt-warning/15 text-dt-warning border-dt-warning/30 hover:bg-dt-warning/25",
2609
+ onClick: () => {
2610
+ o.saveSettings({ wsLatencyMs: 0, wsJitterMs: 0 });
2611
+ },
2612
+ children: "Reset"
2613
+ }
2614
+ )
2615
+ ] })
2616
+ ] }),
2617
+ /* @__PURE__ */ n("div", { className: "flex flex-col gap-1.5", children: [
2618
+ /* @__PURE__ */ t("h4", { className: "text-[11px] font-semibold text-dt-text-secondary uppercase tracking-wider m-0 pb-1 border-b border-dt-border-light", children: "Session" }),
2619
+ /* @__PURE__ */ n("div", { className: "flex items-center gap-1.5 flex-wrap", children: [
2620
+ /* @__PURE__ */ t(
2621
+ "button",
2622
+ {
2623
+ type: "button",
2624
+ className: "px-2.5 py-1 bg-dt-bg-tertiary border border-dt-border-light rounded-md text-[11px] text-dt-text-secondary cursor-pointer transition-all hover:bg-white/10 hover:border-dt-border",
2625
+ onClick: E,
2626
+ children: "Export"
2627
+ }
2628
+ ),
2629
+ /* @__PURE__ */ t(
2630
+ "button",
2631
+ {
2632
+ type: "button",
2633
+ className: "px-2.5 py-1 bg-dt-bg-tertiary border border-dt-border-light rounded-md text-[11px] text-dt-text-secondary cursor-pointer transition-all hover:bg-white/10 hover:border-dt-border",
2634
+ onClick: k,
2635
+ children: "Import"
2636
+ }
2637
+ ),
2638
+ /* @__PURE__ */ t(
2639
+ "button",
2640
+ {
2641
+ type: "button",
2642
+ className: "px-2.5 py-1 bg-dt-bg-tertiary border border-dt-border-light rounded-md text-[11px] text-dt-text-secondary cursor-pointer transition-all hover:bg-dt-error/15 hover:text-dt-error hover:border-dt-error/30",
2643
+ onClick: w,
2644
+ children: "Clear"
2645
+ }
2646
+ )
2647
+ ] })
2648
+ ] }),
2649
+ /* @__PURE__ */ n("div", { className: "flex flex-col gap-1.5", children: [
2650
+ /* @__PURE__ */ t("h4", { className: "text-[11px] font-semibold text-dt-text-secondary uppercase tracking-wider m-0 pb-1 border-b border-dt-border-light", children: "Time Travel" }),
2651
+ /* @__PURE__ */ n("div", { className: "flex items-center gap-1.5 flex-wrap", children: [
2652
+ /* @__PURE__ */ t(
2653
+ "button",
2654
+ {
2655
+ type: "button",
2656
+ className: "px-2.5 py-1 bg-dt-bg-tertiary border border-dt-border-light rounded-md text-[11px] text-dt-text-secondary cursor-pointer transition-all hover:bg-white/10 hover:border-dt-border",
2657
+ onClick: C,
2658
+ children: "Snapshot"
2659
+ }
2660
+ ),
2661
+ /* @__PURE__ */ n("span", { className: "px-1.5 py-0.5 rounded bg-dt-bg-tertiary text-[10px] text-dt-text-muted font-mono", children: [
2662
+ s.length,
2663
+ " saved"
2664
+ ] })
2665
+ ] }),
2666
+ s.length > 0 ? /* @__PURE__ */ t("div", { className: "flex flex-col gap-1 max-h-[180px] overflow-y-auto pr-1", children: [...s].reverse().map((g) => /* @__PURE__ */ n(
2667
+ "div",
2668
+ {
2669
+ className: "flex items-center gap-2 px-2 py-1 bg-dt-bg-tertiary/50 rounded border border-dt-border-light/30 text-[11px]",
2670
+ children: [
2671
+ /* @__PURE__ */ t(
2672
+ "span",
2673
+ {
2674
+ className: "text-dt-text-secondary font-mono",
2675
+ title: new Date(g.timestamp).toLocaleString(),
2676
+ children: new Date(g.timestamp).toLocaleTimeString([], {
2677
+ hour: "2-digit",
2678
+ minute: "2-digit",
2679
+ second: "2-digit"
2680
+ })
2681
+ }
2682
+ ),
2683
+ /* @__PURE__ */ n("span", { className: "text-dt-text-muted", children: [
2684
+ g.events.length,
2685
+ "e"
2686
+ ] }),
2687
+ /* @__PURE__ */ t(
2688
+ "button",
2689
+ {
2690
+ type: "button",
2691
+ className: "ml-auto px-1.5 py-0.5 bg-dt-info/15 text-dt-info border border-dt-info/30 rounded text-[10px] font-medium cursor-pointer hover:bg-dt-info/25",
2692
+ onClick: () => h(g.timestamp),
2693
+ children: "Restore"
2694
+ }
2695
+ )
2696
+ ]
2697
+ },
2698
+ g.timestamp
2699
+ )) }) : /* @__PURE__ */ t("p", { className: "text-[11px] text-dt-text-muted/60 m-0", children: "No snapshots" })
2700
+ ] }),
2701
+ /* @__PURE__ */ n("div", { className: "flex flex-col gap-1.5", children: [
2702
+ /* @__PURE__ */ t("h4", { className: "text-[11px] font-semibold text-dt-text-secondary uppercase tracking-wider m-0 pb-1 border-b border-dt-border-light", children: "Shortcuts" }),
2703
+ /* @__PURE__ */ n("div", { className: "flex flex-col gap-1", children: [
2704
+ /* @__PURE__ */ n("div", { className: "flex items-center justify-between text-[11px]", children: [
2705
+ /* @__PURE__ */ t("kbd", { className: "px-1.5 py-0.5 bg-dt-bg-tertiary border border-dt-border-light rounded text-[10px] font-mono text-dt-text-tertiary", children: "Cmd/Ctrl + Shift + D" }),
2706
+ /* @__PURE__ */ t("span", { className: "text-dt-text-muted", children: "Toggle DevTools" })
2707
+ ] }),
2708
+ /* @__PURE__ */ n("div", { className: "flex items-center justify-between text-[11px]", children: [
2709
+ /* @__PURE__ */ t("kbd", { className: "px-1.5 py-0.5 bg-dt-bg-tertiary border border-dt-border-light rounded text-[10px] font-mono text-dt-text-tertiary", children: "Cmd/Ctrl + K" }),
2710
+ /* @__PURE__ */ t("span", { className: "text-dt-text-muted", children: "Focus search" })
2711
+ ] }),
2712
+ /* @__PURE__ */ n("div", { className: "flex items-center justify-between text-[11px]", children: [
2713
+ /* @__PURE__ */ t("kbd", { className: "px-1.5 py-0.5 bg-dt-bg-tertiary border border-dt-border-light rounded text-[10px] font-mono text-dt-text-tertiary", children: "Cmd/Ctrl + E" }),
2714
+ /* @__PURE__ */ t("span", { className: "text-dt-text-muted", children: "Export session" })
2715
+ ] }),
2716
+ /* @__PURE__ */ n("div", { className: "flex items-center justify-between text-[11px]", children: [
2717
+ /* @__PURE__ */ t("kbd", { className: "px-1.5 py-0.5 bg-dt-bg-tertiary border border-dt-border-light rounded text-[10px] font-mono text-dt-text-tertiary", children: "Cmd/Ctrl + P" }),
2718
+ /* @__PURE__ */ t("span", { className: "text-dt-text-muted", children: "Pause/resume" })
2719
+ ] })
2720
+ ] })
2721
+ ] }),
2722
+ /* @__PURE__ */ n("div", { className: "flex flex-col gap-1.5", children: [
2723
+ /* @__PURE__ */ t("h4", { className: "text-[11px] font-semibold text-dt-text-secondary uppercase tracking-wider m-0 pb-1 border-b border-dt-border-light", children: "About" }),
2724
+ /* @__PURE__ */ n("p", { className: "m-0 text-[11px] text-dt-text-muted", children: [
2725
+ /* @__PURE__ */ t("span", { className: "text-dt-text-secondary font-semibold", children: "Concave DevTools" }),
2726
+ " ",
2727
+ /* @__PURE__ */ n("span", { children: [
2728
+ "v",
2729
+ ne
2730
+ ] })
2731
+ ] })
2732
+ ] })
2733
+ ] });
2734
+ }
2735
+ function Me({
2736
+ eventStore: o,
2737
+ position: r = "bottom-right",
2738
+ mode: a = "overlay",
2739
+ panelConnectionState: s
2740
+ }) {
2741
+ const l = a === "panel", [u, c] = _(() => {
2742
+ if (l) return !0;
2743
+ const d = Ot("concave-devtools-open");
2744
+ return d ? JSON.parse(d) : !0;
2745
+ }), [m, E] = _("activity"), [k, C] = _([]), [h, x] = _(!1);
2746
+ J(() => {
2747
+ const d = o.subscribe((b) => {
2748
+ C(o.getAllEvents()), x(o.isPausedState());
2749
+ });
2750
+ return C(o.getAllEvents()), x(o.isPausedState()), d;
2751
+ }, [o]), J(() => {
2752
+ l || jt("concave-devtools-open", JSON.stringify(u));
2753
+ }, [u, l]);
2754
+ const w = V(() => {
2755
+ o.clear(), C([]);
2756
+ }, [o]), g = V(() => {
2757
+ c(!1);
2758
+ }, []), f = V(() => {
2759
+ const d = o.exportSession(), b = new Blob([JSON.stringify(d, null, 2)], {
2760
+ type: "application/json"
2761
+ }), P = URL.createObjectURL(b), I = document.createElement("a");
2762
+ I.href = P, I.download = `concave-devtools-${Date.now()}.json`, I.click(), URL.revokeObjectURL(P);
2763
+ }, [o]), M = V(() => {
2764
+ o.isPausedState() ? (o.resume(), x(!1)) : (o.pause(), x(!0));
2765
+ }, [o]);
2766
+ J(() => {
2767
+ const d = (b) => {
2768
+ (b.metaKey || b.ctrlKey) && b.shiftKey && b.key === "D" && (b.preventDefault(), c((P) => !P)), (b.metaKey || b.ctrlKey) && b.key === "e" && (b.preventDefault(), f()), (b.metaKey || b.ctrlKey) && b.key === "p" && (b.preventDefault(), M());
2769
+ };
2770
+ return window.addEventListener("keydown", d), () => window.removeEventListener("keydown", d);
2771
+ }, [w, f, M]);
2772
+ const S = {
2773
+ "bottom-right": "bottom-4 right-4",
2774
+ "bottom-left": "bottom-4 left-4",
2775
+ "top-right": "top-4 right-4",
2776
+ "top-left": "top-4 left-4"
2777
+ }[r], q = k.filter(
2778
+ (d) => d.type === "query" || d.type === "mutation" || d.type === "action" || d.type === "auth"
2779
+ ), p = o.getActiveSubscriptions().length, D = k.filter((d) => d.type === "log"), A = q.filter((d) => "status" in d && d.status === "error"), i = [
2780
+ { id: "activity", label: "Activity", count: q.length, hasError: A.length > 0 },
2781
+ { id: "subscriptions", label: "Subscriptions", count: p, hasError: !1 },
2782
+ { id: "performance", label: "Performance", count: 0, hasError: !1 },
2783
+ { id: "logs", label: "Logs", count: D.length, hasError: !1 },
2784
+ { id: "settings", label: "Settings", count: 0, hasError: !1 }
2785
+ ];
2786
+ return /* @__PURE__ */ n("div", { className: l ? "w-full h-full bg-dt-bg font-sans text-[13px] leading-normal text-dt-text-secondary antialiased" : `fixed z-[999999] font-sans text-[13px] leading-normal text-dt-text-secondary antialiased ${S}`, children: [
2787
+ !l && !u && /* @__PURE__ */ n(
2788
+ "button",
2789
+ {
2790
+ className: "flex items-center gap-2.5 px-[18px] py-3 bg-gradient-to-br from-zinc-900/[0.98] to-zinc-800/95 backdrop-blur-[20px] border border-dt-border rounded-[14px] text-dt-text-tertiary cursor-pointer shadow-lg relative overflow-hidden hover:scale-[1.02] hover:-translate-y-0.5 transition-all",
2791
+ onClick: () => c(!0),
2792
+ title: "Open Concave DevTools (Cmd/Ctrl+Shift+D)",
2793
+ "aria-label": "Open Concave DevTools",
2794
+ "aria-expanded": "false",
2795
+ children: [
2796
+ /* @__PURE__ */ n("svg", { width: "20", height: "20", viewBox: "0 0 32 32", fill: "none", children: [
2797
+ /* @__PURE__ */ t("rect", { width: "32", height: "32", rx: ue, fill: pe }),
2798
+ /* @__PURE__ */ t("path", { d: xe, fill: "white" })
2799
+ ] }),
2800
+ A.length > 0 ? /* @__PURE__ */ t("span", { className: "bg-gradient-to-br from-red-500 to-red-600 text-white px-2 py-0.5 rounded-full text-[10px] font-bold tracking-wide shadow-md min-w-5 text-center", children: A.length }) : q.length > 0 ? /* @__PURE__ */ t("span", { className: "bg-gradient-to-br from-blue-500 to-blue-600 text-white px-2 py-0.5 rounded-full text-[10px] font-bold tracking-wide shadow-md min-w-5 text-center", children: q.length }) : null
2801
+ ]
2802
+ }
2803
+ ),
2804
+ (l || u) && /* @__PURE__ */ n("div", { className: l ? "w-full h-full bg-dt-bg flex flex-col overflow-hidden" : "w-[min(860px,calc(100vw-32px))] min-w-[300px] max-w-[calc(100vw-24px)] h-[min(620px,calc(100vh-32px))] min-h-[360px] max-h-[calc(100vh-24px)] bg-zinc-950/98 border border-dt-border rounded-2xl shadow-2xl flex flex-col overflow-hidden", role: "dialog", "aria-label": "Concave DevTools", "aria-modal": "false", children: [
2805
+ /* @__PURE__ */ n("div", { className: "flex items-center justify-between border-b border-dt-border px-0 bg-dt-bg-secondary", children: [
2806
+ /* @__PURE__ */ t("div", { className: "flex items-center gap-0 flex-1 overflow-x-auto", role: "tablist", "aria-label": "DevTools panels", children: i.map((d) => /* @__PURE__ */ n(
2807
+ "button",
2808
+ {
2809
+ id: `tab-${d.id}`,
2810
+ className: l ? `px-3 py-[7px] bg-transparent border-none text-[12px] cursor-pointer transition-colors whitespace-nowrap border-b-2 ${m === d.id ? "text-dt-info border-b-dt-info" : "text-dt-text-tertiary border-b-transparent hover:text-dt-text-secondary hover:bg-white/5"}` : `px-3 py-[7px] bg-transparent border-none text-[12px] cursor-pointer transition-colors whitespace-nowrap border-b-2 ${m === d.id ? "text-dt-info border-b-dt-info" : "text-dt-text-tertiary border-b-transparent hover:text-dt-text-secondary hover:bg-white/5"}`,
2811
+ onClick: () => E(d.id),
2812
+ "aria-label": `${d.label} panel`,
2813
+ "aria-selected": m === d.id,
2814
+ role: "tab",
2815
+ "aria-controls": `panel-${d.id}`,
2816
+ children: [
2817
+ /* @__PURE__ */ t("span", { children: d.label }),
2818
+ d.count > 0 && /* @__PURE__ */ t("span", { className: l ? `ml-1.5 px-1.5 py-0 rounded-full text-[10px] font-medium ${d.hasError ? "bg-dt-error/20 text-dt-error" : "bg-dt-bg-tertiary text-dt-text-tertiary"}` : `ml-1.5 px-1.5 py-0 rounded-full text-[10px] font-medium ${d.hasError ? "bg-dt-error/20 text-dt-error" : "bg-dt-bg-tertiary text-dt-text-tertiary"}`, children: d.count })
2819
+ ]
2820
+ },
2821
+ d.id
2822
+ )) }),
2823
+ /* @__PURE__ */ n("div", { className: l ? "flex items-center gap-0.5 ml-auto pr-1" : "flex items-center gap-1.5 ml-auto", role: "toolbar", "aria-label": "DevTools quick actions", children: [
2824
+ /* @__PURE__ */ t(
2825
+ "button",
2826
+ {
2827
+ type: "button",
2828
+ className: l ? `flex items-center justify-center w-7 h-7 p-0 bg-transparent border-none rounded cursor-pointer transition-colors hover:bg-white/10 ${h ? "text-dt-text-muted hover:text-dt-text-secondary" : "text-dt-error hover:text-dt-error"}` : `flex items-center justify-center w-7 h-7 p-0 bg-transparent border-none rounded-md cursor-pointer transition-all relative hover:bg-zinc-600/20 active:scale-[0.94] ${h ? "text-dt-text-muted hover:text-dt-text-secondary" : "text-dt-error bg-dt-error/10 hover:bg-dt-error/15 hover:text-dt-error"}`,
2829
+ onClick: M,
2830
+ title: h ? "Start recording (Cmd/Ctrl+P)" : "Stop recording (Cmd/Ctrl+P)",
2831
+ "aria-label": h ? "Start recording" : "Stop recording",
2832
+ "aria-pressed": !h,
2833
+ children: h ? /* @__PURE__ */ t("svg", { width: "14", height: "14", viewBox: "0 0 16 16", fill: "none", "aria-hidden": "true", children: /* @__PURE__ */ t("circle", { cx: "8", cy: "8", r: "4.75", stroke: "currentColor", strokeWidth: "1.5" }) }) : /* @__PURE__ */ t("svg", { width: "14", height: "14", viewBox: "0 0 16 16", fill: "currentColor", "aria-hidden": "true", children: /* @__PURE__ */ t("circle", { cx: "8", cy: "8", r: "4.75" }) })
2834
+ }
2835
+ ),
2836
+ /* @__PURE__ */ t(
2837
+ "button",
2838
+ {
2839
+ type: "button",
2840
+ className: l ? "flex items-center justify-center w-7 h-7 p-0 bg-transparent border-none rounded text-dt-text-tertiary cursor-pointer transition-colors hover:bg-white/10 hover:text-dt-text-secondary" : "flex items-center justify-center w-7 h-7 p-0 bg-transparent border-none rounded-md text-dt-text-muted cursor-pointer transition-all relative hover:bg-zinc-600/20 hover:text-dt-text-secondary active:scale-[0.94]",
2841
+ onClick: f,
2842
+ title: "Export Session (Cmd/Ctrl+E)",
2843
+ "aria-label": "Export session",
2844
+ children: /* @__PURE__ */ n("svg", { width: "14", height: "14", viewBox: "0 0 16 16", fill: "currentColor", children: [
2845
+ /* @__PURE__ */ t("path", { d: "M.5 9.9a.5.5 0 0 1 .5.5v2.5a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1v-2.5a.5.5 0 0 1 1 0v2.5a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2v-2.5a.5.5 0 0 1 .5-.5z" }),
2846
+ /* @__PURE__ */ t("path", { d: "M7.646 11.854a.5.5 0 0 0 .708 0l3-3a.5.5 0 0 0-.708-.708L8.5 10.293V1.5a.5.5 0 0 0-1 0v8.793L5.354 8.146a.5.5 0 1 0-.708.708l3 3z" })
2847
+ ] })
2848
+ }
2849
+ ),
2850
+ /* @__PURE__ */ t(
2851
+ "button",
2852
+ {
2853
+ type: "button",
2854
+ className: l ? "flex items-center justify-center w-7 h-7 p-0 bg-transparent border-none rounded text-dt-text-tertiary cursor-pointer transition-colors hover:bg-white/10 hover:text-dt-text-secondary" : "flex items-center justify-center w-7 h-7 p-0 bg-transparent border-none rounded-md text-dt-text-muted cursor-pointer transition-all relative hover:bg-zinc-600/20 hover:text-dt-text-secondary active:scale-[0.94]",
2855
+ onClick: w,
2856
+ title: "Clear all data",
2857
+ "aria-label": "Clear all data",
2858
+ children: /* @__PURE__ */ n("svg", { width: "14", height: "14", viewBox: "0 0 16 16", fill: "none", "aria-hidden": "true", children: [
2859
+ /* @__PURE__ */ t("circle", { cx: "8", cy: "8", r: "5.5", stroke: "currentColor", strokeWidth: "1.2" }),
2860
+ /* @__PURE__ */ t("path", { d: "M4.5 11.5 11.5 4.5", stroke: "currentColor", strokeWidth: "1.2", strokeLinecap: "round" })
2861
+ ] })
2862
+ }
2863
+ ),
2864
+ !l && /* @__PURE__ */ t(
2865
+ "button",
2866
+ {
2867
+ type: "button",
2868
+ className: "flex items-center justify-center w-7 h-7 p-0 bg-transparent border-none rounded-md text-dt-text-muted cursor-pointer transition-all relative hover:bg-red-500/15 hover:text-dt-error active:scale-[0.94]",
2869
+ onClick: g,
2870
+ title: "Close (Cmd/Ctrl+Shift+D)",
2871
+ "aria-label": "Close DevTools",
2872
+ children: /* @__PURE__ */ t("svg", { width: "14", height: "14", viewBox: "0 0 16 16", fill: "currentColor", children: /* @__PURE__ */ t("path", { d: "M4.646 4.646a.5.5 0 0 1 .708 0L8 7.293l2.646-2.647a.5.5 0 0 1 .708.708L8.707 8l2.647 2.646a.5.5 0 0 1-.708.708L8 8.707l-2.646 2.647a.5.5 0 0 1-.708-.708L7.293 8 4.646 5.354a.5.5 0 0 1 0-.708z" }) })
2873
+ }
2874
+ )
2875
+ ] })
2876
+ ] }),
2877
+ /* @__PURE__ */ n("div", { className: "flex-1 min-h-0 flex flex-col", children: [
2878
+ m === "activity" && /* @__PURE__ */ t("div", { id: "panel-activity", className: "flex-1 min-h-0 flex flex-col", role: "tabpanel", "aria-labelledby": "tab-activity", children: /* @__PURE__ */ t(ve, { eventStore: o, panelConnectionState: l ? s : void 0 }) }),
2879
+ m === "subscriptions" && /* @__PURE__ */ t("div", { id: "panel-subscriptions", className: "flex-1 min-h-0 flex flex-col", role: "tabpanel", "aria-labelledby": "tab-subscriptions", children: /* @__PURE__ */ t(ye, { eventStore: o }) }),
2880
+ m === "performance" && /* @__PURE__ */ t("div", { id: "panel-performance", className: "flex-1 min-h-0 flex flex-col", role: "tabpanel", "aria-labelledby": "tab-performance", children: /* @__PURE__ */ t(Ne, { eventStore: o, onNavigate: E }) }),
2881
+ m === "logs" && /* @__PURE__ */ t("div", { id: "panel-logs", className: "flex-1 min-h-0 flex flex-col", role: "tabpanel", "aria-labelledby": "tab-logs", children: /* @__PURE__ */ t(Ce, { eventStore: o, onNavigate: E }) }),
2882
+ m === "settings" && /* @__PURE__ */ t("div", { id: "panel-settings", className: "flex-1 min-h-0 flex flex-col", role: "tabpanel", "aria-labelledby": "tab-settings", children: /* @__PURE__ */ t(De, { eventStore: o }) })
2883
+ ] })
2884
+ ] })
2885
+ ] });
2886
+ }
2887
+ var ut = {}, re;
2888
+ function Se() {
2889
+ if (re) return ut;
2890
+ re = 1;
2891
+ var o = ae;
2892
+ if (process.env.NODE_ENV === "production")
2893
+ ut.createRoot = o.createRoot, ut.hydrateRoot = o.hydrateRoot;
2894
+ else {
2895
+ var r = o.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
2896
+ ut.createRoot = function(a, s) {
2897
+ r.usingClientEntryPoint = !0;
2898
+ try {
2899
+ return o.createRoot(a, s);
2900
+ } finally {
2901
+ r.usingClientEntryPoint = !1;
2902
+ }
2903
+ }, ut.hydrateRoot = function(a, s, l) {
2904
+ r.usingClientEntryPoint = !0;
2905
+ try {
2906
+ return o.hydrateRoot(a, s, l);
2907
+ } finally {
2908
+ r.usingClientEntryPoint = !1;
2909
+ }
2910
+ };
2911
+ }
2912
+ return ut;
2913
+ }
2914
+ var $e = Se();
2915
+ const Ie = '@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scale-z:1;--tw-border-style:solid;--tw-gradient-position:initial;--tw-gradient-from:#0000;--tw-gradient-via:#0000;--tw-gradient-to:#0000;--tw-gradient-stops:initial;--tw-gradient-via-stops:initial;--tw-gradient-from-position:0%;--tw-gradient-via-position:50%;--tw-gradient-to-position:100%;--tw-leading:initial;--tw-font-weight:initial;--tw-tracking:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-outline-style:solid;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial;--tw-backdrop-blur:initial;--tw-backdrop-brightness:initial;--tw-backdrop-contrast:initial;--tw-backdrop-grayscale:initial;--tw-backdrop-hue-rotate:initial;--tw-backdrop-invert:initial;--tw-backdrop-opacity:initial;--tw-backdrop-saturate:initial;--tw-backdrop-sepia:initial}}}@layer theme{:root,:host{--font-sans:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";--font-mono:"Fira Code","Monaco","Consolas",monospace;--color-red-500:oklch(63.7% .237 25.331);--color-red-600:oklch(57.7% .245 27.325);--color-yellow-200:oklch(94.5% .129 101.54);--color-yellow-400:oklch(85.2% .199 91.936);--color-blue-500:oklch(62.3% .214 259.815);--color-blue-600:oklch(54.6% .245 262.881);--color-zinc-500:oklch(55.2% .016 285.938);--color-zinc-600:oklch(44.2% .017 285.786);--color-zinc-700:oklch(37% .013 285.805);--color-zinc-800:oklch(27.4% .006 286.033);--color-zinc-900:oklch(21% .006 285.885);--color-zinc-950:oklch(14.1% .005 285.823);--color-white:#fff;--spacing:.25rem;--font-weight-normal:400;--font-weight-medium:500;--font-weight-semibold:600;--font-weight-bold:700;--tracking-wide:.025em;--tracking-wider:.05em;--leading-normal:1.5;--leading-relaxed:1.625;--radius-sm:.25rem;--radius-md:.375rem;--radius-lg:.5rem;--radius-2xl:1rem;--animate-pulse:pulse 2s cubic-bezier(.4,0,.6,1)infinite;--blur-sm:8px;--blur-lg:16px;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4,0,.2,1);--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono);--color-dt-bg:#121214fa;--color-dt-bg-secondary:#18181bf2;--color-dt-bg-tertiary:#27272a99;--color-dt-border:#3f3f4699;--color-dt-border-light:#3f3f4666;--color-dt-text:#f4f4f5;--color-dt-text-secondary:#e4e4e7;--color-dt-text-tertiary:#a1a1aa;--color-dt-text-muted:#71717a;--color-dt-success:#22c55e;--color-dt-error:#ef4444;--color-dt-warning:#f59e0b;--color-dt-info:#3b82f6;--color-dt-query:#60a5fa;--color-dt-mutation:#a78bfa;--color-dt-action:#34d399}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;tab-size:4;line-height:1.5;font-family:var(--default-font-family,ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab,red,red)){::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){appearance:button}::file-selector-button{appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer components;@layer utilities{.pointer-events-none{pointer-events:none}.visible{visibility:visible}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.static{position:static}.sticky{position:sticky}.top-1\\/2{top:50%}.top-4{top:calc(var(--spacing)*4)}.right-1\\.5{right:calc(var(--spacing)*1.5)}.right-4{right:calc(var(--spacing)*4)}.bottom-0{bottom:calc(var(--spacing)*0)}.bottom-4{bottom:calc(var(--spacing)*4)}.left-4{left:calc(var(--spacing)*4)}.z-\\[2\\]{z-index:2}.z-\\[999999\\]{z-index:999999}.z-\\[9999999\\]{z-index:9999999}.container{width:100%}@media(min-width:40rem){.container{max-width:40rem}}@media(min-width:48rem){.container{max-width:48rem}}@media(min-width:64rem){.container{max-width:64rem}}@media(min-width:80rem){.container{max-width:80rem}}@media(min-width:96rem){.container{max-width:96rem}}.m-0{margin:calc(var(--spacing)*0)}.mx-0\\.5{margin-inline:calc(var(--spacing)*.5)}.my-0\\.5{margin-block:calc(var(--spacing)*.5)}.mt-1{margin-top:calc(var(--spacing)*1)}.mr-1{margin-right:calc(var(--spacing)*1)}.mb-2{margin-bottom:calc(var(--spacing)*2)}.ml-1{margin-left:calc(var(--spacing)*1)}.ml-1\\.5{margin-left:calc(var(--spacing)*1.5)}.ml-2{margin-left:calc(var(--spacing)*2)}.ml-4{margin-left:calc(var(--spacing)*4)}.ml-auto{margin-left:auto}.flex{display:flex}.grid{display:grid}.hidden{display:none}.inline{display:inline}.inline-block{display:inline-block}.inline-flex{display:inline-flex}.table{display:table}.h-1\\.5{height:calc(var(--spacing)*1.5)}.h-2\\.5{height:calc(var(--spacing)*2.5)}.h-4{height:calc(var(--spacing)*4)}.h-5{height:calc(var(--spacing)*5)}.h-7{height:calc(var(--spacing)*7)}.h-8{height:calc(var(--spacing)*8)}.h-\\[min\\(620px\\,calc\\(100vh-32px\\)\\)\\]{height:min(620px,100vh - 32px)}.h-full{height:100%}.max-h-\\[80px\\]{max-height:80px}.max-h-\\[100px\\]{max-height:100px}.max-h-\\[150px\\]{max-height:150px}.max-h-\\[180px\\]{max-height:180px}.max-h-\\[200px\\]{max-height:200px}.max-h-\\[calc\\(100vh-24px\\)\\]{max-height:calc(100vh - 24px)}.min-h-0{min-height:calc(var(--spacing)*0)}.min-h-\\[360px\\]{min-height:360px}.min-h-px{min-height:1px}.w-1\\.5{width:calc(var(--spacing)*1.5)}.w-2\\.5{width:calc(var(--spacing)*2.5)}.w-4{width:calc(var(--spacing)*4)}.w-7{width:calc(var(--spacing)*7)}.w-10{width:calc(var(--spacing)*10)}.w-14{width:calc(var(--spacing)*14)}.w-16{width:calc(var(--spacing)*16)}.w-20{width:calc(var(--spacing)*20)}.w-24{width:calc(var(--spacing)*24)}.w-\\[300px\\]{width:300px}.w-\\[320px\\]{width:320px}.w-\\[min\\(860px\\,calc\\(100vw-32px\\)\\)\\]{width:min(860px,100vw - 32px)}.w-full{width:100%}.max-w-\\[44\\%\\]{max-width:44%}.max-w-\\[150px\\]{max-width:150px}.max-w-\\[180px\\]{max-width:180px}.max-w-\\[200px\\]{max-width:200px}.max-w-\\[280px\\]{max-width:280px}.max-w-\\[360px\\]{max-width:360px}.max-w-\\[calc\\(100vw-24px\\)\\]{max-width:calc(100vw - 24px)}.max-w-\\[min\\(58vw\\,680px\\)\\]{max-width:min(58vw,680px)}.max-w-\\[min\\(62vw\\,760px\\)\\]{max-width:min(62vw,760px)}.min-w-0{min-width:calc(var(--spacing)*0)}.min-w-5{min-width:calc(var(--spacing)*5)}.min-w-\\[180px\\]{min-width:180px}.min-w-\\[300px\\]{min-width:300px}.flex-1{flex:1}.shrink-0{flex-shrink:0}.-translate-y-1\\/2{--tw-translate-y: -50% ;translate:var(--tw-translate-x)var(--tw-translate-y)}.scale-150{--tw-scale-x:150%;--tw-scale-y:150%;--tw-scale-z:150%;scale:var(--tw-scale-x)var(--tw-scale-y)}.rotate-90{rotate:90deg}.animate-\\[dt-fade-in_0\\.1s_ease-out\\]{animation:.1s ease-out dt-fade-in}.animate-\\[dt-fade-in_0\\.15s_ease-out\\]{animation:.15s ease-out dt-fade-in}.animate-\\[dt-slide-in_0\\.2s_ease-out\\]{animation:.2s ease-out dt-slide-in}.animate-pulse{animation:var(--animate-pulse)}.cursor-not-allowed{cursor:not-allowed}.cursor-pointer{cursor:pointer}.resize{resize:both}.grid-cols-6{grid-template-columns:repeat(6,minmax(0,1fr))}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-center{align-items:center}.items-end{align-items:flex-end}.items-start{align-items:flex-start}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.gap-0{gap:calc(var(--spacing)*0)}.gap-0\\.5{gap:calc(var(--spacing)*.5)}.gap-1{gap:calc(var(--spacing)*1)}.gap-1\\.5{gap:calc(var(--spacing)*1.5)}.gap-2{gap:calc(var(--spacing)*2)}.gap-2\\.5{gap:calc(var(--spacing)*2.5)}.gap-3{gap:calc(var(--spacing)*3)}.gap-\\[3px\\]{gap:3px}.gap-px{gap:1px}.truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-x-auto{overflow-x:auto}.overflow-y-auto{overflow-y:auto}.rounded{border-radius:.25rem}.rounded-2xl{border-radius:var(--radius-2xl)}.rounded-\\[3px\\]{border-radius:3px}.rounded-\\[14px\\]{border-radius:14px}.rounded-full{border-radius:3.40282e38px}.rounded-lg{border-radius:var(--radius-lg)}.rounded-md{border-radius:var(--radius-md)}.rounded-sm{border-radius:var(--radius-sm)}.rounded-t{border-top-left-radius:.25rem;border-top-right-radius:.25rem}.rounded-t-sm{border-top-left-radius:var(--radius-sm);border-top-right-radius:var(--radius-sm)}.rounded-b{border-bottom-right-radius:.25rem;border-bottom-left-radius:.25rem}.border{border-style:var(--tw-border-style);border-width:1px}.border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.border-b-0{border-bottom-style:var(--tw-border-style);border-bottom-width:0}.border-b-2{border-bottom-style:var(--tw-border-style);border-bottom-width:2px}.border-l{border-left-style:var(--tw-border-style);border-left-width:1px}.border-l-2{border-left-style:var(--tw-border-style);border-left-width:2px}.border-none{--tw-border-style:none;border-style:none}.border-dt-border{border-color:var(--color-dt-border)}.border-dt-border-light{border-color:var(--color-dt-border-light)}.border-dt-border-light\\/30{border-color:#3f3f461f}@supports (color:color-mix(in lab,red,red)){.border-dt-border-light\\/30{border-color:color-mix(in oklab,var(--color-dt-border-light)30%,transparent)}}.border-dt-border-light\\/40{border-color:#3f3f4629}@supports (color:color-mix(in lab,red,red)){.border-dt-border-light\\/40{border-color:color-mix(in oklab,var(--color-dt-border-light)40%,transparent)}}.border-dt-border-light\\/50{border-color:#3f3f4633}@supports (color:color-mix(in lab,red,red)){.border-dt-border-light\\/50{border-color:color-mix(in oklab,var(--color-dt-border-light)50%,transparent)}}.border-dt-error\\/30{border-color:#ef44444d}@supports (color:color-mix(in lab,red,red)){.border-dt-error\\/30{border-color:color-mix(in oklab,var(--color-dt-error)30%,transparent)}}.border-dt-info\\/20{border-color:#3b82f633}@supports (color:color-mix(in lab,red,red)){.border-dt-info\\/20{border-color:color-mix(in oklab,var(--color-dt-info)20%,transparent)}}.border-dt-info\\/30{border-color:#3b82f64d}@supports (color:color-mix(in lab,red,red)){.border-dt-info\\/30{border-color:color-mix(in oklab,var(--color-dt-info)30%,transparent)}}.border-dt-mutation\\/20{border-color:#a78bfa33}@supports (color:color-mix(in lab,red,red)){.border-dt-mutation\\/20{border-color:color-mix(in oklab,var(--color-dt-mutation)20%,transparent)}}.border-dt-success\\/30{border-color:#22c55e4d}@supports (color:color-mix(in lab,red,red)){.border-dt-success\\/30{border-color:color-mix(in oklab,var(--color-dt-success)30%,transparent)}}.border-dt-warning\\/20{border-color:#f59e0b33}@supports (color:color-mix(in lab,red,red)){.border-dt-warning\\/20{border-color:color-mix(in oklab,var(--color-dt-warning)20%,transparent)}}.border-dt-warning\\/30{border-color:#f59e0b4d}@supports (color:color-mix(in lab,red,red)){.border-dt-warning\\/30{border-color:color-mix(in oklab,var(--color-dt-warning)30%,transparent)}}.border-transparent{border-color:#0000}.border-zinc-700\\/30{border-color:#3f3f464d}@supports (color:color-mix(in lab,red,red)){.border-zinc-700\\/30{border-color:color-mix(in oklab,var(--color-zinc-700)30%,transparent)}}.border-b-dt-info{border-bottom-color:var(--color-dt-info)}.border-b-transparent{border-bottom-color:#0000}.border-l-dt-error\\/40{border-left-color:#ef444466}@supports (color:color-mix(in lab,red,red)){.border-l-dt-error\\/40{border-left-color:color-mix(in oklab,var(--color-dt-error)40%,transparent)}}.border-l-dt-query\\/30{border-left-color:#60a5fa4d}@supports (color:color-mix(in lab,red,red)){.border-l-dt-query\\/30{border-left-color:color-mix(in oklab,var(--color-dt-query)30%,transparent)}}.bg-dt-action{background-color:var(--color-dt-action)}.bg-dt-action\\/20{background-color:#34d39933}@supports (color:color-mix(in lab,red,red)){.bg-dt-action\\/20{background-color:color-mix(in oklab,var(--color-dt-action)20%,transparent)}}.bg-dt-action\\/25{background-color:#34d39940}@supports (color:color-mix(in lab,red,red)){.bg-dt-action\\/25{background-color:color-mix(in oklab,var(--color-dt-action)25%,transparent)}}.bg-dt-bg{background-color:var(--color-dt-bg)}.bg-dt-bg-secondary{background-color:var(--color-dt-bg-secondary)}.bg-dt-bg-secondary\\/30{background-color:#18181b49}@supports (color:color-mix(in lab,red,red)){.bg-dt-bg-secondary\\/30{background-color:color-mix(in oklab,var(--color-dt-bg-secondary)30%,transparent)}}.bg-dt-bg-secondary\\/50{background-color:#18181b79}@supports (color:color-mix(in lab,red,red)){.bg-dt-bg-secondary\\/50{background-color:color-mix(in oklab,var(--color-dt-bg-secondary)50%,transparent)}}.bg-dt-bg-secondary\\/85{background-color:#18181bce}@supports (color:color-mix(in lab,red,red)){.bg-dt-bg-secondary\\/85{background-color:color-mix(in oklab,var(--color-dt-bg-secondary)85%,transparent)}}.bg-dt-bg-tertiary{background-color:var(--color-dt-bg-tertiary)}.bg-dt-bg-tertiary\\/30{background-color:#27272a2e}@supports (color:color-mix(in lab,red,red)){.bg-dt-bg-tertiary\\/30{background-color:color-mix(in oklab,var(--color-dt-bg-tertiary)30%,transparent)}}.bg-dt-bg-tertiary\\/50{background-color:#27272a4d}@supports (color:color-mix(in lab,red,red)){.bg-dt-bg-tertiary\\/50{background-color:color-mix(in oklab,var(--color-dt-bg-tertiary)50%,transparent)}}.bg-dt-error{background-color:var(--color-dt-error)}.bg-dt-error\\/5{background-color:#ef44440d}@supports (color:color-mix(in lab,red,red)){.bg-dt-error\\/5{background-color:color-mix(in oklab,var(--color-dt-error)5%,transparent)}}.bg-dt-error\\/10{background-color:#ef44441a}@supports (color:color-mix(in lab,red,red)){.bg-dt-error\\/10{background-color:color-mix(in oklab,var(--color-dt-error)10%,transparent)}}.bg-dt-error\\/15{background-color:#ef444426}@supports (color:color-mix(in lab,red,red)){.bg-dt-error\\/15{background-color:color-mix(in oklab,var(--color-dt-error)15%,transparent)}}.bg-dt-error\\/20{background-color:#ef444433}@supports (color:color-mix(in lab,red,red)){.bg-dt-error\\/20{background-color:color-mix(in oklab,var(--color-dt-error)20%,transparent)}}.bg-dt-error\\/25{background-color:#ef444440}@supports (color:color-mix(in lab,red,red)){.bg-dt-error\\/25{background-color:color-mix(in oklab,var(--color-dt-error)25%,transparent)}}.bg-dt-info\\/5{background-color:#3b82f60d}@supports (color:color-mix(in lab,red,red)){.bg-dt-info\\/5{background-color:color-mix(in oklab,var(--color-dt-info)5%,transparent)}}.bg-dt-info\\/15{background-color:#3b82f626}@supports (color:color-mix(in lab,red,red)){.bg-dt-info\\/15{background-color:color-mix(in oklab,var(--color-dt-info)15%,transparent)}}.bg-dt-info\\/20{background-color:#3b82f633}@supports (color:color-mix(in lab,red,red)){.bg-dt-info\\/20{background-color:color-mix(in oklab,var(--color-dt-info)20%,transparent)}}.bg-dt-mutation{background-color:var(--color-dt-mutation)}.bg-dt-mutation\\/10{background-color:#a78bfa1a}@supports (color:color-mix(in lab,red,red)){.bg-dt-mutation\\/10{background-color:color-mix(in oklab,var(--color-dt-mutation)10%,transparent)}}.bg-dt-mutation\\/20{background-color:#a78bfa33}@supports (color:color-mix(in lab,red,red)){.bg-dt-mutation\\/20{background-color:color-mix(in oklab,var(--color-dt-mutation)20%,transparent)}}.bg-dt-mutation\\/25{background-color:#a78bfa40}@supports (color:color-mix(in lab,red,red)){.bg-dt-mutation\\/25{background-color:color-mix(in oklab,var(--color-dt-mutation)25%,transparent)}}.bg-dt-query{background-color:var(--color-dt-query)}.bg-dt-query\\/20{background-color:#60a5fa33}@supports (color:color-mix(in lab,red,red)){.bg-dt-query\\/20{background-color:color-mix(in oklab,var(--color-dt-query)20%,transparent)}}.bg-dt-query\\/25{background-color:#60a5fa40}@supports (color:color-mix(in lab,red,red)){.bg-dt-query\\/25{background-color:color-mix(in oklab,var(--color-dt-query)25%,transparent)}}.bg-dt-query\\/\\[0\\.02\\]{background-color:#60a5fa05}@supports (color:color-mix(in lab,red,red)){.bg-dt-query\\/\\[0\\.02\\]{background-color:color-mix(in oklab,var(--color-dt-query)2%,transparent)}}.bg-dt-success{background-color:var(--color-dt-success)}.bg-dt-success\\/5{background-color:#22c55e0d}@supports (color:color-mix(in lab,red,red)){.bg-dt-success\\/5{background-color:color-mix(in oklab,var(--color-dt-success)5%,transparent)}}.bg-dt-success\\/15{background-color:#22c55e26}@supports (color:color-mix(in lab,red,red)){.bg-dt-success\\/15{background-color:color-mix(in oklab,var(--color-dt-success)15%,transparent)}}.bg-dt-success\\/20{background-color:#22c55e33}@supports (color:color-mix(in lab,red,red)){.bg-dt-success\\/20{background-color:color-mix(in oklab,var(--color-dt-success)20%,transparent)}}.bg-dt-warning{background-color:var(--color-dt-warning)}.bg-dt-warning\\/5{background-color:#f59e0b0d}@supports (color:color-mix(in lab,red,red)){.bg-dt-warning\\/5{background-color:color-mix(in oklab,var(--color-dt-warning)5%,transparent)}}.bg-dt-warning\\/15{background-color:#f59e0b26}@supports (color:color-mix(in lab,red,red)){.bg-dt-warning\\/15{background-color:color-mix(in oklab,var(--color-dt-warning)15%,transparent)}}.bg-dt-warning\\/20{background-color:#f59e0b33}@supports (color:color-mix(in lab,red,red)){.bg-dt-warning\\/20{background-color:color-mix(in oklab,var(--color-dt-warning)20%,transparent)}}.bg-transparent{background-color:#0000}.bg-white\\/10{background-color:#ffffff1a}@supports (color:color-mix(in lab,red,red)){.bg-white\\/10{background-color:color-mix(in oklab,var(--color-white)10%,transparent)}}.bg-white\\/\\[0\\.03\\]{background-color:#ffffff08}@supports (color:color-mix(in lab,red,red)){.bg-white\\/\\[0\\.03\\]{background-color:color-mix(in oklab,var(--color-white)3%,transparent)}}.bg-white\\/\\[0\\.06\\]{background-color:#ffffff0f}@supports (color:color-mix(in lab,red,red)){.bg-white\\/\\[0\\.06\\]{background-color:color-mix(in oklab,var(--color-white)6%,transparent)}}.bg-white\\/\\[0\\.08\\]{background-color:#ffffff14}@supports (color:color-mix(in lab,red,red)){.bg-white\\/\\[0\\.08\\]{background-color:color-mix(in oklab,var(--color-white)8%,transparent)}}.bg-yellow-400\\/25{background-color:#fac80040}@supports (color:color-mix(in lab,red,red)){.bg-yellow-400\\/25{background-color:color-mix(in oklab,var(--color-yellow-400)25%,transparent)}}.bg-yellow-400\\/30{background-color:#fac8004d}@supports (color:color-mix(in lab,red,red)){.bg-yellow-400\\/30{background-color:color-mix(in oklab,var(--color-yellow-400)30%,transparent)}}.bg-zinc-500\\/25{background-color:#71717b40}@supports (color:color-mix(in lab,red,red)){.bg-zinc-500\\/25{background-color:color-mix(in oklab,var(--color-zinc-500)25%,transparent)}}.bg-zinc-900\\/50{background-color:#18181b80}@supports (color:color-mix(in lab,red,red)){.bg-zinc-900\\/50{background-color:color-mix(in oklab,var(--color-zinc-900)50%,transparent)}}.bg-zinc-900\\/\\[0\\.98\\]{background-color:#18181bfa}@supports (color:color-mix(in lab,red,red)){.bg-zinc-900\\/\\[0\\.98\\]{background-color:color-mix(in oklab,var(--color-zinc-900)98%,transparent)}}.bg-zinc-950\\/50{background-color:#09090b80}@supports (color:color-mix(in lab,red,red)){.bg-zinc-950\\/50{background-color:color-mix(in oklab,var(--color-zinc-950)50%,transparent)}}.bg-zinc-950\\/98{background-color:#09090bfa}@supports (color:color-mix(in lab,red,red)){.bg-zinc-950\\/98{background-color:color-mix(in oklab,var(--color-zinc-950)98%,transparent)}}.bg-gradient-to-br{--tw-gradient-position:to bottom right in oklab;background-image:linear-gradient(var(--tw-gradient-stops))}.from-blue-500{--tw-gradient-from:var(--color-blue-500);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.from-red-500{--tw-gradient-from:var(--color-red-500);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.from-zinc-900\\/\\[0\\.98\\]{--tw-gradient-from:#18181bfa}@supports (color:color-mix(in lab,red,red)){.from-zinc-900\\/\\[0\\.98\\]{--tw-gradient-from:color-mix(in oklab,var(--color-zinc-900)98%,transparent)}}.from-zinc-900\\/\\[0\\.98\\]{--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.to-blue-600{--tw-gradient-to:var(--color-blue-600);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.to-red-600{--tw-gradient-to:var(--color-red-600);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.to-zinc-800\\/95{--tw-gradient-to:#27272af2}@supports (color:color-mix(in lab,red,red)){.to-zinc-800\\/95{--tw-gradient-to:color-mix(in oklab,var(--color-zinc-800)95%,transparent)}}.to-zinc-800\\/95{--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.p-0{padding:calc(var(--spacing)*0)}.p-0\\.5{padding:calc(var(--spacing)*.5)}.p-1{padding:calc(var(--spacing)*1)}.p-1\\.5{padding:calc(var(--spacing)*1.5)}.p-2{padding:calc(var(--spacing)*2)}.p-3{padding:calc(var(--spacing)*3)}.p-\\[3px\\]{padding:3px}.px-0{padding-inline:calc(var(--spacing)*0)}.px-0\\.5{padding-inline:calc(var(--spacing)*.5)}.px-1{padding-inline:calc(var(--spacing)*1)}.px-1\\.5{padding-inline:calc(var(--spacing)*1.5)}.px-2{padding-inline:calc(var(--spacing)*2)}.px-2\\.5{padding-inline:calc(var(--spacing)*2.5)}.px-3{padding-inline:calc(var(--spacing)*3)}.px-\\[18px\\]{padding-inline:18px}.px-px{padding-inline:1px}.py-0{padding-block:calc(var(--spacing)*0)}.py-0\\.5{padding-block:calc(var(--spacing)*.5)}.py-1{padding-block:calc(var(--spacing)*1)}.py-1\\.5{padding-block:calc(var(--spacing)*1.5)}.py-2{padding-block:calc(var(--spacing)*2)}.py-3{padding-block:calc(var(--spacing)*3)}.py-12{padding-block:calc(var(--spacing)*12)}.py-\\[7px\\]{padding-block:7px}.py-px{padding-block:1px}.pr-1{padding-right:calc(var(--spacing)*1)}.pr-7{padding-right:calc(var(--spacing)*7)}.pb-1{padding-bottom:calc(var(--spacing)*1)}.pl-4{padding-left:calc(var(--spacing)*4)}.text-center{text-align:center}.text-left{text-align:left}.text-right{text-align:right}.font-mono{font-family:var(--font-mono)}.font-sans{font-family:var(--font-sans)}.text-\\[9px\\]{font-size:9px}.text-\\[10px\\]{font-size:10px}.text-\\[11px\\]{font-size:11px}.text-\\[12px\\]{font-size:12px}.text-\\[13px\\]{font-size:13px}.leading-normal{--tw-leading:var(--leading-normal);line-height:var(--leading-normal)}.leading-relaxed{--tw-leading:var(--leading-relaxed);line-height:var(--leading-relaxed)}.font-bold{--tw-font-weight:var(--font-weight-bold);font-weight:var(--font-weight-bold)}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-normal{--tw-font-weight:var(--font-weight-normal);font-weight:var(--font-weight-normal)}.font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.tracking-wide{--tw-tracking:var(--tracking-wide);letter-spacing:var(--tracking-wide)}.tracking-wider{--tw-tracking:var(--tracking-wider);letter-spacing:var(--tracking-wider)}.break-words{overflow-wrap:break-word}.break-all{word-break:break-all}.whitespace-nowrap{white-space:nowrap}.whitespace-pre-wrap{white-space:pre-wrap}.text-dt-action{color:var(--color-dt-action)}.text-dt-border{color:var(--color-dt-border)}.text-dt-error{color:var(--color-dt-error)}.text-dt-info{color:var(--color-dt-info)}.text-dt-mutation{color:var(--color-dt-mutation)}.text-dt-mutation\\/70{color:#a78bfab3}@supports (color:color-mix(in lab,red,red)){.text-dt-mutation\\/70{color:color-mix(in oklab,var(--color-dt-mutation)70%,transparent)}}.text-dt-query{color:var(--color-dt-query)}.text-dt-success{color:var(--color-dt-success)}.text-dt-text{color:var(--color-dt-text)}.text-dt-text-muted{color:var(--color-dt-text-muted)}.text-dt-text-muted\\/40{color:#71717a66}@supports (color:color-mix(in lab,red,red)){.text-dt-text-muted\\/40{color:color-mix(in oklab,var(--color-dt-text-muted)40%,transparent)}}.text-dt-text-muted\\/60{color:#71717a99}@supports (color:color-mix(in lab,red,red)){.text-dt-text-muted\\/60{color:color-mix(in oklab,var(--color-dt-text-muted)60%,transparent)}}.text-dt-text-muted\\/70{color:#71717ab3}@supports (color:color-mix(in lab,red,red)){.text-dt-text-muted\\/70{color:color-mix(in oklab,var(--color-dt-text-muted)70%,transparent)}}.text-dt-text-muted\\/80{color:#71717acc}@supports (color:color-mix(in lab,red,red)){.text-dt-text-muted\\/80{color:color-mix(in oklab,var(--color-dt-text-muted)80%,transparent)}}.text-dt-text-muted\\/85{color:#71717ad9}@supports (color:color-mix(in lab,red,red)){.text-dt-text-muted\\/85{color:color-mix(in oklab,var(--color-dt-text-muted)85%,transparent)}}.text-dt-text-secondary{color:var(--color-dt-text-secondary)}.text-dt-text-tertiary{color:var(--color-dt-text-tertiary)}.text-dt-warning{color:var(--color-dt-warning)}.text-dt-warning\\/90{color:#f59e0be6}@supports (color:color-mix(in lab,red,red)){.text-dt-warning\\/90{color:color-mix(in oklab,var(--color-dt-warning)90%,transparent)}}.text-inherit{color:inherit}.text-white{color:var(--color-white)}.text-yellow-200{color:var(--color-yellow-200)}.normal-case{text-transform:none}.uppercase{text-transform:uppercase}.italic{font-style:italic}.line-through{text-decoration-line:line-through}.antialiased{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.placeholder-dt-text-muted\\/40::placeholder{color:#71717a66}@supports (color:color-mix(in lab,red,red)){.placeholder-dt-text-muted\\/40::placeholder{color:color-mix(in oklab,var(--color-dt-text-muted)40%,transparent)}}.opacity-40{opacity:.4}.opacity-60{opacity:.6}.opacity-70{opacity:.7}.shadow{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a),0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-2xl{--tw-shadow:0 25px 50px -12px var(--tw-shadow-color,#00000040);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\\[0_0_0_1px_rgba\\(52\\,211\\,153\\,0\\.5\\)\\]{--tw-shadow:0 0 0 1px var(--tw-shadow-color,#34d39980);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\\[0_0_0_1px_rgba\\(96\\,165\\,250\\,0\\.5\\)\\]{--tw-shadow:0 0 0 1px var(--tw-shadow-color,#60a5fa80);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\\[0_0_0_1px_rgba\\(161\\,161\\,170\\,0\\.4\\)\\]{--tw-shadow:0 0 0 1px var(--tw-shadow-color,#a1a1aa66);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\\[0_0_0_1px_rgba\\(167\\,139\\,250\\,0\\.5\\)\\]{--tw-shadow:0 0 0 1px var(--tw-shadow-color,#a78bfa80);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\\[0_0_0_1px_rgba\\(239\\,68\\,68\\,0\\.5\\)\\]{--tw-shadow:0 0 0 1px var(--tw-shadow-color,#ef444480);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\\[0_0_0_1px_rgba\\(245\\,158\\,11\\,0\\.5\\)\\]{--tw-shadow:0 0 0 1px var(--tw-shadow-color,#f59e0b80);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\\[0_1px_2px_rgba\\(52\\,211\\,153\\,0\\.35\\)\\]{--tw-shadow:0 1px 2px var(--tw-shadow-color,#34d39959);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\\[0_1px_2px_rgba\\(96\\,165\\,250\\,0\\.35\\)\\]{--tw-shadow:0 1px 2px var(--tw-shadow-color,#60a5fa59);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\\[0_1px_2px_rgba\\(167\\,139\\,250\\,0\\.35\\)\\]{--tw-shadow:0 1px 2px var(--tw-shadow-color,#a78bfa59);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\\[0_1px_2px_rgba\\(245\\,158\\,11\\,0\\.35\\)\\]{--tw-shadow:0 1px 2px var(--tw-shadow-color,#f59e0b59);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-lg{--tw-shadow:0 10px 15px -3px var(--tw-shadow-color,#0000001a),0 4px 6px -4px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-md{--tw-shadow:0 4px 6px -1px var(--tw-shadow-color,#0000001a),0 2px 4px -2px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ring-2{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(2px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ring-dt-info{--tw-ring-color:var(--color-dt-info)}.outline,.outline-1{outline-style:var(--tw-outline-style);outline-width:1px}.-outline-offset-1{outline-offset:-1px}.outline-dt-info\\/30{outline-color:#3b82f64d}@supports (color:color-mix(in lab,red,red)){.outline-dt-info\\/30{outline-color:color-mix(in oklab,var(--color-dt-info)30%,transparent)}}.blur{--tw-blur:blur(8px);filter:var(--tw-blur,)var(--tw-brightness,)var(--tw-contrast,)var(--tw-grayscale,)var(--tw-hue-rotate,)var(--tw-invert,)var(--tw-saturate,)var(--tw-sepia,)var(--tw-drop-shadow,)}.filter{filter:var(--tw-blur,)var(--tw-brightness,)var(--tw-contrast,)var(--tw-grayscale,)var(--tw-hue-rotate,)var(--tw-invert,)var(--tw-saturate,)var(--tw-sepia,)var(--tw-drop-shadow,)}.backdrop-blur-\\[20px\\]{--tw-backdrop-blur:blur(20px);-webkit-backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,)}.backdrop-blur-lg{--tw-backdrop-blur:blur(var(--blur-lg));-webkit-backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,)}.backdrop-blur-sm{--tw-backdrop-blur:blur(var(--blur-sm));-webkit-backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,)}.transition{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter,display,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-all{transition-property:all;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-transform{transition-property:transform,translate,scale,rotate;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.outline-none{--tw-outline-style:none;outline-style:none}.select-none{-webkit-user-select:none;user-select:none}.placeholder\\:text-dt-text-muted\\/50::placeholder{color:#71717a80}@supports (color:color-mix(in lab,red,red)){.placeholder\\:text-dt-text-muted\\/50::placeholder{color:color-mix(in oklab,var(--color-dt-text-muted)50%,transparent)}}@media(hover:hover){.hover\\:-translate-y-0\\.5:hover{--tw-translate-y:calc(var(--spacing)*-.5);translate:var(--tw-translate-x)var(--tw-translate-y)}.hover\\:scale-150:hover{--tw-scale-x:150%;--tw-scale-y:150%;--tw-scale-z:150%;scale:var(--tw-scale-x)var(--tw-scale-y)}.hover\\:scale-\\[1\\.02\\]:hover{scale:1.02}.hover\\:border-dt-border:hover{border-color:var(--color-dt-border)}.hover\\:border-dt-border-light:hover{border-color:var(--color-dt-border-light)}.hover\\:border-dt-error\\/30:hover{border-color:#ef44444d}@supports (color:color-mix(in lab,red,red)){.hover\\:border-dt-error\\/30:hover{border-color:color-mix(in oklab,var(--color-dt-error)30%,transparent)}}.hover\\:border-dt-info\\/30:hover{border-color:#3b82f64d}@supports (color:color-mix(in lab,red,red)){.hover\\:border-dt-info\\/30:hover{border-color:color-mix(in oklab,var(--color-dt-info)30%,transparent)}}.hover\\:bg-dt-action\\/15:hover{background-color:#34d39926}@supports (color:color-mix(in lab,red,red)){.hover\\:bg-dt-action\\/15:hover{background-color:color-mix(in oklab,var(--color-dt-action)15%,transparent)}}.hover\\:bg-dt-error\\/15:hover{background-color:#ef444426}@supports (color:color-mix(in lab,red,red)){.hover\\:bg-dt-error\\/15:hover{background-color:color-mix(in oklab,var(--color-dt-error)15%,transparent)}}.hover\\:bg-dt-error\\/25:hover{background-color:#ef444440}@supports (color:color-mix(in lab,red,red)){.hover\\:bg-dt-error\\/25:hover{background-color:color-mix(in oklab,var(--color-dt-error)25%,transparent)}}.hover\\:bg-dt-info\\/15:hover{background-color:#3b82f626}@supports (color:color-mix(in lab,red,red)){.hover\\:bg-dt-info\\/15:hover{background-color:color-mix(in oklab,var(--color-dt-info)15%,transparent)}}.hover\\:bg-dt-info\\/25:hover{background-color:#3b82f640}@supports (color:color-mix(in lab,red,red)){.hover\\:bg-dt-info\\/25:hover{background-color:color-mix(in oklab,var(--color-dt-info)25%,transparent)}}.hover\\:bg-dt-mutation\\/15:hover{background-color:#a78bfa26}@supports (color:color-mix(in lab,red,red)){.hover\\:bg-dt-mutation\\/15:hover{background-color:color-mix(in oklab,var(--color-dt-mutation)15%,transparent)}}.hover\\:bg-dt-mutation\\/20:hover{background-color:#a78bfa33}@supports (color:color-mix(in lab,red,red)){.hover\\:bg-dt-mutation\\/20:hover{background-color:color-mix(in oklab,var(--color-dt-mutation)20%,transparent)}}.hover\\:bg-dt-query\\/15:hover{background-color:#60a5fa26}@supports (color:color-mix(in lab,red,red)){.hover\\:bg-dt-query\\/15:hover{background-color:color-mix(in oklab,var(--color-dt-query)15%,transparent)}}.hover\\:bg-dt-success\\/25:hover{background-color:#22c55e40}@supports (color:color-mix(in lab,red,red)){.hover\\:bg-dt-success\\/25:hover{background-color:color-mix(in oklab,var(--color-dt-success)25%,transparent)}}.hover\\:bg-dt-warning\\/15:hover{background-color:#f59e0b26}@supports (color:color-mix(in lab,red,red)){.hover\\:bg-dt-warning\\/15:hover{background-color:color-mix(in oklab,var(--color-dt-warning)15%,transparent)}}.hover\\:bg-dt-warning\\/25:hover{background-color:#f59e0b40}@supports (color:color-mix(in lab,red,red)){.hover\\:bg-dt-warning\\/25:hover{background-color:color-mix(in oklab,var(--color-dt-warning)25%,transparent)}}.hover\\:bg-red-500\\/15:hover{background-color:#fb2c3626}@supports (color:color-mix(in lab,red,red)){.hover\\:bg-red-500\\/15:hover{background-color:color-mix(in oklab,var(--color-red-500)15%,transparent)}}.hover\\:bg-white\\/5:hover{background-color:#ffffff0d}@supports (color:color-mix(in lab,red,red)){.hover\\:bg-white\\/5:hover{background-color:color-mix(in oklab,var(--color-white)5%,transparent)}}.hover\\:bg-white\\/10:hover{background-color:#ffffff1a}@supports (color:color-mix(in lab,red,red)){.hover\\:bg-white\\/10:hover{background-color:color-mix(in oklab,var(--color-white)10%,transparent)}}.hover\\:bg-white\\/\\[0\\.02\\]:hover{background-color:#ffffff05}@supports (color:color-mix(in lab,red,red)){.hover\\:bg-white\\/\\[0\\.02\\]:hover{background-color:color-mix(in oklab,var(--color-white)2%,transparent)}}.hover\\:bg-white\\/\\[0\\.03\\]:hover{background-color:#ffffff08}@supports (color:color-mix(in lab,red,red)){.hover\\:bg-white\\/\\[0\\.03\\]:hover{background-color:color-mix(in oklab,var(--color-white)3%,transparent)}}.hover\\:bg-white\\/\\[0\\.04\\]:hover{background-color:#ffffff0a}@supports (color:color-mix(in lab,red,red)){.hover\\:bg-white\\/\\[0\\.04\\]:hover{background-color:color-mix(in oklab,var(--color-white)4%,transparent)}}.hover\\:bg-white\\/\\[0\\.06\\]:hover{background-color:#ffffff0f}@supports (color:color-mix(in lab,red,red)){.hover\\:bg-white\\/\\[0\\.06\\]:hover{background-color:color-mix(in oklab,var(--color-white)6%,transparent)}}.hover\\:bg-zinc-600\\/20:hover{background-color:#52525c33}@supports (color:color-mix(in lab,red,red)){.hover\\:bg-zinc-600\\/20:hover{background-color:color-mix(in oklab,var(--color-zinc-600)20%,transparent)}}.hover\\:text-dt-action:hover{color:var(--color-dt-action)}.hover\\:text-dt-error:hover{color:var(--color-dt-error)}.hover\\:text-dt-info:hover{color:var(--color-dt-info)}.hover\\:text-dt-mutation:hover{color:var(--color-dt-mutation)}.hover\\:text-dt-query:hover{color:var(--color-dt-query)}.hover\\:text-dt-text-secondary:hover{color:var(--color-dt-text-secondary)}.hover\\:text-dt-text-tertiary:hover{color:var(--color-dt-text-tertiary)}.hover\\:text-dt-warning:hover{color:var(--color-dt-warning)}}.focus\\:border-dt-info\\/50:focus{border-color:#3b82f680}@supports (color:color-mix(in lab,red,red)){.focus\\:border-dt-info\\/50:focus{border-color:color-mix(in oklab,var(--color-dt-info)50%,transparent)}}.focus\\:bg-dt-bg-tertiary:focus{background-color:var(--color-dt-bg-tertiary)}.focus\\:ring-1:focus{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(1px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.focus\\:ring-dt-info\\/40:focus{--tw-ring-color:#3b82f666}@supports (color:color-mix(in lab,red,red)){.focus\\:ring-dt-info\\/40:focus{--tw-ring-color:color-mix(in oklab,var(--color-dt-info)40%,transparent)}}.focus\\:outline-none:focus{--tw-outline-style:none;outline-style:none}.active\\:scale-\\[0\\.94\\]:active{scale:.94}.\\[\\&\\:\\:-webkit-search-cancel-button\\]\\:hidden::-webkit-search-cancel-button{display:none}}@keyframes dt-fade-in{0%{opacity:0;transform:translateY(4px)}to{opacity:1;transform:translateY(0)}}@keyframes dt-slide-in{0%{opacity:0;transform:translate(8px)}to{opacity:1;transform:translate(0)}}html{color-scheme:dark;background-color:#121214}:host{--sb-thumb:#71717a80;--sb-track:transparent}*{scrollbar-width:thin;scrollbar-color:var(--sb-thumb)var(--sb-track)}::-webkit-scrollbar{width:6px;height:6px}::-webkit-scrollbar-track{background:var(--sb-track)}::-webkit-scrollbar-thumb{background-color:var(--sb-thumb);border-radius:3px}@property --tw-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-z{syntax:"*";inherits:false;initial-value:0}@property --tw-scale-x{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-y{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-z{syntax:"*";inherits:false;initial-value:1}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-gradient-position{syntax:"*";inherits:false}@property --tw-gradient-from{syntax:"<color>";inherits:false;initial-value:#0000}@property --tw-gradient-via{syntax:"<color>";inherits:false;initial-value:#0000}@property --tw-gradient-to{syntax:"<color>";inherits:false;initial-value:#0000}@property --tw-gradient-stops{syntax:"*";inherits:false}@property --tw-gradient-via-stops{syntax:"*";inherits:false}@property --tw-gradient-from-position{syntax:"<length-percentage>";inherits:false;initial-value:0%}@property --tw-gradient-via-position{syntax:"<length-percentage>";inherits:false;initial-value:50%}@property --tw-gradient-to-position{syntax:"<length-percentage>";inherits:false;initial-value:100%}@property --tw-leading{syntax:"*";inherits:false}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-tracking{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-outline-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-blur{syntax:"*";inherits:false}@property --tw-brightness{syntax:"*";inherits:false}@property --tw-contrast{syntax:"*";inherits:false}@property --tw-grayscale{syntax:"*";inherits:false}@property --tw-hue-rotate{syntax:"*";inherits:false}@property --tw-invert{syntax:"*";inherits:false}@property --tw-opacity{syntax:"*";inherits:false}@property --tw-saturate{syntax:"*";inherits:false}@property --tw-sepia{syntax:"*";inherits:false}@property --tw-drop-shadow{syntax:"*";inherits:false}@property --tw-drop-shadow-color{syntax:"*";inherits:false}@property --tw-drop-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:"*";inherits:false}@property --tw-backdrop-blur{syntax:"*";inherits:false}@property --tw-backdrop-brightness{syntax:"*";inherits:false}@property --tw-backdrop-contrast{syntax:"*";inherits:false}@property --tw-backdrop-grayscale{syntax:"*";inherits:false}@property --tw-backdrop-hue-rotate{syntax:"*";inherits:false}@property --tw-backdrop-invert{syntax:"*";inherits:false}@property --tw-backdrop-opacity{syntax:"*";inherits:false}@property --tw-backdrop-saturate{syntax:"*";inherits:false}@property --tw-backdrop-sepia{syntax:"*";inherits:false}@keyframes pulse{50%{opacity:.5}}';
2916
+ function _e(o = {}) {
2917
+ if (window.__concaveDevToolsInstalled) {
2918
+ console.warn("[DevTools] Already initialized");
2919
+ return;
2920
+ }
2921
+ window.__concaveDevToolsInstalled = !0, console.log("[DevTools] Initializing UI...");
2922
+ const r = ce(), a = window.__concaveDevToolsEvents || [];
2923
+ console.log(`[DevTools] Loading ${a.length} captured events`), a.forEach((u) => {
2924
+ r.addEvent(u);
2925
+ });
2926
+ let s = a.length;
2927
+ setInterval(() => {
2928
+ const u = window.__concaveDevToolsEvents || [];
2929
+ u.length > s && (u.slice(s).forEach((m) => {
2930
+ r.addEvent(m);
2931
+ }), s = u.length);
2932
+ }, 100);
2933
+ const l = () => {
2934
+ const u = document.createElement("div");
2935
+ u.id = "concave-devtools-host", u.style.cssText = "position:fixed;z-index:999999;bottom:16px;right:16px;pointer-events:none;", document.body.appendChild(u);
2936
+ const c = u.attachShadow({ mode: "open" }), m = document.createElement("style");
2937
+ m.textContent = Ie, c.appendChild(m);
2938
+ const E = document.createElement("div");
2939
+ E.id = "concave-devtools-root", E.style.cssText = "pointer-events:auto;", c.appendChild(E), $e.createRoot(E).render(/* @__PURE__ */ t(Me, { eventStore: r, position: o.position })), console.log("[DevTools] UI mounted successfully");
2940
+ };
2941
+ document.readyState === "loading" ? document.addEventListener("DOMContentLoaded", l) : l(), window.__concaveDevTools = {
2942
+ eventStore: r
2943
+ };
2944
+ }
2945
+ if (typeof window < "u") {
2946
+ const o = window.__concaveDevToolsConfig || {};
2947
+ o.autoInit !== !1 && setTimeout(() => {
2948
+ _e(o);
2949
+ }, 100);
2950
+ }
2951
+ export {
2952
+ Me as D,
2953
+ St as E,
2954
+ Ce as L,
2955
+ Ne as P,
2956
+ ye as S,
2957
+ De as a,
2958
+ gt as b,
2959
+ ce as g,
2960
+ _e as i
2961
+ };