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