@flemo/devtools 0.3.0 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.mjs CHANGED
@@ -21,33 +21,33 @@ var e = 30, t = 1e4, n = 50, r = 120, i = 100, a = (e) => {
21
21
  "Display-hardware effects: local dimming, backlight modulation, and panel overdrive alter perceived motion and are invisible to every web API.",
22
22
  "Compositor-internal present skips: a frame can be produced on time (clean rAF, clean player gaps) yet dropped or delayed inside the compositor's present queue; only platform tools (about:tracing, Instruments) see that layer.",
23
23
  "DevTools device emulation composites the page to a rescaled surface: every in-page instrument reads the pre-scale surface and reports clean while the eye watches the post-scale one, so emulated sessions grow shimmer/flash artifacts that do not exist in a plain window or on a real device."
24
- ], c = "data-flemo-screen", l = "data-flemo-status", u = "data-flemo-active", d = "data-flemo-anim-hold", f = "data-flemo-img-hold", p = "data-flemo-held-arrival", ee = "data-flemo-part-name", m = "data-flemo-decorator", h = "data-flemo-bar", g = "data-flemo-devtools-panel", _ = [
24
+ ], c = "data-flemo-screen", l = "data-flemo-status", u = "data-flemo-active", d = "data-flemo-anim-hold", f = "data-flemo-img-hold", p = "data-flemo-held-arrival", m = "data-flemo-part-name", h = "data-flemo-decorator", g = "data-flemo-bar", _ = "data-flemo-devtools-panel", v = [
25
25
  "PUSHING",
26
26
  "POPPING",
27
27
  "REPLACING"
28
- ], v = [
28
+ ], y = [
29
29
  "true",
30
30
  "park",
31
31
  "park-under",
32
32
  "park-over"
33
- ], y = (e) => `[${e}]`, te = (e, t) => `[${e}="${t}"]`, b = () => {
33
+ ], b = (e) => `[${e}]`, ee = (e, t) => `[${e}="${t}"]`, x = () => {
34
34
  if (typeof navigator > "u") return null;
35
35
  let e = navigator.userAgentData;
36
36
  return !e || !Array.isArray(e.brands) ? null : e.brands.map((e) => ({
37
37
  brand: String(e.brand ?? ""),
38
38
  version: String(e.version ?? "")
39
39
  }));
40
- }, x = () => {
40
+ }, S = () => {
41
41
  if (typeof navigator > "u") return "unknown";
42
- let e = b();
42
+ let e = x();
43
43
  if (e?.some((e) => /Chromium/i.test(e.brand))) return "blink";
44
44
  let t = navigator.userAgent ?? "";
45
45
  return /Firefox|FxiOS/i.test(t) ? "gecko" : e || /AppleWebKit/i.test(t) && !/Chrome|Chromium|Android/i.test(t) ? "webkit" : /Android/i.test(t) ? "blink" : "unknown";
46
- }, S = () => {
47
- if (typeof navigator > "u" || x() !== "blink") return !1;
46
+ }, C = () => {
47
+ if (typeof navigator > "u" || S() !== "blink") return !1;
48
48
  let e = navigator.platform ?? "";
49
49
  return /Mac|Win|Linux/i.test(e) ? /Android/i.test(navigator.userAgent ?? "") && !/Mac|Win/i.test(e) ? /Linux (x86_64|i686)/i.test(e) : (navigator.maxTouchPoints ?? 0) > 0 : !1;
50
- }, ne = (e = 20) => new Promise((t) => {
50
+ }, te = (e = 20) => new Promise((t) => {
51
51
  let n = Number.isFinite(e) ? Math.max(1, Math.floor(e)) : 20;
52
52
  if (typeof requestAnimationFrame != "function" || typeof performance > "u") {
53
53
  t({
@@ -69,13 +69,13 @@ var e = 30, t = 1e4, n = 50, r = 120, i = 100, a = (e) => {
69
69
  requestAnimationFrame(a);
70
70
  };
71
71
  requestAnimationFrame(a);
72
- }), C = () => {
72
+ }), w = () => {
73
73
  try {
74
74
  return typeof PerformanceObserver < "u" && Array.isArray(PerformanceObserver.supportedEntryTypes) && PerformanceObserver.supportedEntryTypes.includes("longtask");
75
75
  } catch {
76
76
  return !1;
77
77
  }
78
- }, w = (e) => {
78
+ }, T = (e) => {
79
79
  let t = typeof navigator < "u" ? navigator : null, n = typeof window < "u" ? window : null, r = !1;
80
80
  try {
81
81
  r = n?.matchMedia?.("(prefers-reduced-motion: reduce)").matches ?? !1;
@@ -84,8 +84,8 @@ var e = 30, t = 1e4, n = 50, r = 120, i = 100, a = (e) => {
84
84
  }
85
85
  return {
86
86
  userAgent: t?.userAgent ?? "",
87
- uaBrands: b(),
88
- engine: x(),
87
+ uaBrands: x(),
88
+ engine: S(),
89
89
  platform: t?.platform ?? "",
90
90
  maxTouchPoints: t?.maxTouchPoints ?? 0,
91
91
  devicePixelRatio: n?.devicePixelRatio ?? 1,
@@ -100,19 +100,19 @@ var e = 30, t = 1e4, n = 50, r = 120, i = 100, a = (e) => {
100
100
  visualViewportScale: n?.visualViewport?.scale ?? null,
101
101
  rafCadence: e,
102
102
  reducedMotion: r,
103
- emulationSuspected: S(),
103
+ emulationSuspected: C(),
104
104
  observation: {
105
- longTasks: C(),
105
+ longTasks: w(),
106
106
  elementAnimations: typeof Element < "u" && typeof Element.prototype.getAnimations == "function",
107
107
  playerGapMirror: Array.isArray(n?.__flemoPlayerGaps)
108
108
  }
109
109
  };
110
- }, T = [
110
+ }, E = [
111
111
  "DevTools must be CLOSED while judging motion. An open inspector serializes requests and repaints its own panels on the same machine; the 2026-08 campaign's entire residual 'stutter' was this, and it is invisible to every in-page metric.",
112
112
  "No screen recording or display capture while judging. A capture client forces WindowServer to composite every vsync, which SUPPRESSES the symptom — a capture that looks smooth proves nothing about the uncaptured session.",
113
113
  "Judge with real input (a finger, a mouse). Synthetic dispatch — evaluate().click() and friends — never fires pointerdown, so it bypasses the swipe/gesture machinery that a real navigation goes through.",
114
114
  "Establish the viewing configuration before believing any verdict: device emulation off, which physical display, its refresh rate and HiDPI scaling, Low Power Mode. Ask for a photo of the setup if it is not certain."
115
- ], E = "flemo:devtools-panel-height", D = [{
115
+ ], D = "flemo:devtools-panel-height", O = [{
116
116
  key: "flemo:devtools",
117
117
  storage: "session",
118
118
  kind: "opt-in-diagnostic",
@@ -120,118 +120,88 @@ var e = 30, t = 1e4, n = 50, r = 120, i = 100, a = (e) => {
120
120
  fallback: "off",
121
121
  effect: "arms this flight recorder in the playground (?devtools=on)"
122
122
  }, {
123
- key: E,
123
+ key: D,
124
124
  storage: "session",
125
125
  kind: "production-state",
126
126
  values: "a pixel height",
127
127
  fallback: "(the panel's default height)",
128
128
  effect: "the drawer height this panel was last dragged to"
129
- }], O = [
129
+ }], k = [], A = [...k, ...O], j = [
130
130
  {
131
131
  key: "flemo:sixty",
132
132
  storage: "session",
133
- kind: "production-state",
134
- values: "\"high\" / a streak count",
135
- fallback: "(learned)",
136
- effect: "steady-60 desktop verdict seed — owned by steadySixtyCadence.ts"
133
+ retiredWith: "the steady-60 verdict seed, now document-scoped module state (2026-08-31)"
137
134
  },
138
135
  {
139
136
  key: "flemo:settle-gate",
140
137
  storage: "session",
141
- kind: "production-default-with-override",
142
- values: "\"on\" / \"off\"",
143
- fallback: "touch WebKit + touch Blink + desktop macOS WebKit + steady-60 desktop",
144
- effect: "render-settle entry gate, shared by the engine's routing and the binding"
138
+ retiredWith: "the engine diagnostic surface (2026-08-31)"
145
139
  },
146
140
  {
147
141
  key: "flemo:arrivalhold",
148
142
  storage: "session",
149
- kind: "production-default-with-override",
150
- values: "\"off\"",
151
- fallback: "on",
152
- effect: "the whole in-flight hold set (arrival, response, invisible animations, images)"
143
+ retiredWith: "the engine diagnostic surface (2026-08-31)"
153
144
  },
154
145
  {
155
146
  key: "flemo:deskflip",
156
147
  storage: "session",
157
- kind: "production-default-with-override",
158
- values: "\"on\" / \"off\"",
159
- fallback: "desktop macOS WebKit",
160
- effect: "atomic release flip: the hold attribute flips on the DOM inside the readiness rAF"
148
+ retiredWith: "the engine diagnostic surface (2026-08-31)"
161
149
  },
162
150
  {
163
151
  key: "flemo:deskhead",
164
152
  storage: "session",
165
- kind: "production-default-with-override",
166
- values: "\"on\" / \"off\"",
167
- fallback: "desktop macOS WebKit",
168
- effect: "desktop flat-head keyframes; arming it retires the desktop birth anchor"
153
+ retiredWith: "the engine diagnostic surface (2026-08-31)"
169
154
  },
170
155
  {
171
156
  key: "flemo:creep",
172
157
  storage: "session",
173
- kind: "production-default-with-override",
174
- values: "\"on\" / \"off\"",
175
- fallback: "touch WebKit",
176
- effect: "creep head: its end keyframe carries a hair of motion, so the compositor is already carrying the animation at the boundary"
158
+ retiredWith: "the engine diagnostic surface (2026-08-31)"
177
159
  },
178
160
  {
179
161
  key: "flemo:relcommit",
180
162
  storage: "session",
181
- kind: "production-default-with-override",
182
- values: "\"defer\" / \"sync\"",
183
- fallback: "touch WebKit",
184
- effect: "the release's reconcile lands next frame instead of synchronously"
163
+ retiredWith: "the engine diagnostic surface (2026-08-31)"
185
164
  },
186
165
  {
187
166
  key: "flemo:imgoffload",
188
167
  storage: "session",
189
- kind: "production-default-with-override",
190
- values: "\"on\" / \"off\"",
191
- fallback: "on — the offloader decides per image, from the source's own size",
192
- effect: "image decode offloader: an oversized source is fetched and downscaled in a worker so its decode never lands in a paint"
168
+ retiredWith: "the engine diagnostic surface (2026-08-31)"
193
169
  },
194
170
  {
195
171
  key: "flemo:governed",
196
172
  storage: "session",
197
- kind: "production-default-with-override",
198
- values: "\"on\" / \"off\"",
199
- fallback: "legacy Android Blink (an old browser, not a slow device)",
200
- effect: "the governed head kit on touch Blink — a flat head covering a compiled flight's opening. The auto-detection reads browser AGE, so a modern-but-weak phone falls through it; this is how such a device gets measured"
173
+ retiredWith: "the engine diagnostic surface (2026-08-31)"
201
174
  },
202
175
  {
203
176
  key: "flemo:imghold",
204
177
  storage: "session",
205
- kind: "opt-in-diagnostic",
206
- values: "\"on\" / \"off\"",
207
- fallback: "off",
208
- effect: "flight-scoped <img> reveal hold"
178
+ retiredWith: "the image reveal hold, whose only arming path it was (2026-08-31)"
209
179
  },
210
180
  {
211
181
  key: "flemo:preraster",
212
182
  storage: "session",
213
- kind: "opt-in-diagnostic",
214
- values: "\"on\"",
215
- fallback: "off",
216
- effect: "REST-time scope promotion, and the park-over hold variant. Flight-time promotion is the engine's own stamp and needs no flag"
183
+ retiredWith: "the REST-time scope promotion, whose only arming path it was (2026-08-31)"
184
+ },
185
+ {
186
+ key: "flemo:parkhead",
187
+ storage: "session",
188
+ retiredWith: "the engine diagnostic surface — the park head is unconditional (2026-08-31)"
217
189
  },
218
190
  {
219
191
  key: "flemo:layers",
220
192
  storage: "session",
221
- kind: "opt-in-diagnostic",
222
- values: "\"resident\" / \"off\"",
223
- fallback: "off",
224
- effect: "keep screen layers resident at rest — a resident layer is a PERMANENT stacking context over the consumer's screen"
193
+ retiredWith: "the resident-layer experiment (2026-08-31)"
194
+ },
195
+ {
196
+ key: "flemo:morph",
197
+ storage: "session",
198
+ retiredWith: "the morph decision trace (2026-08-31)"
225
199
  },
226
200
  {
227
201
  key: "flemo:freeze",
228
202
  storage: "session",
229
- kind: "opt-in-diagnostic",
230
- values: "\"shallow\"",
231
- fallback: "off",
232
- effect: "keep the direct prev screen live instead of freezing it"
233
- }
234
- ], k = [...O, ...D], A = [
203
+ retiredWith: "the shallow-freeze experiment (2026-08-31)"
204
+ },
235
205
  {
236
206
  key: "flemo:motion-driver",
237
207
  storage: "local",
@@ -277,49 +247,45 @@ var e = 30, t = 1e4, n = 50, r = 120, i = 100, a = (e) => {
277
247
  storage: "session",
278
248
  retiredWith: "the Low Power Mode release-latency probe (2026-08-22)"
279
249
  }
280
- ], j = "(retired — the library no longer reads this)", M = (e) => {
250
+ ], M = "(retired — the library no longer reads this)", N = (e) => {
281
251
  try {
282
252
  let t = e === "session" ? sessionStorage : localStorage;
283
253
  return t.length, t;
284
254
  } catch {
285
255
  return null;
286
256
  }
287
- }, N = (e, t) => {
257
+ }, P = (e, t) => {
288
258
  try {
289
259
  return e ? e.getItem(t) : null;
290
260
  } catch {
291
261
  return null;
292
262
  }
293
- }, re = new Set(k.map((e) => e.key)), ie = new Set(A.map((e) => e.key)), P = new Set(D.map((e) => e.key)), F = () => {
294
- let e = {}, t = M("session"), n = M("local");
295
- for (let r of k) {
296
- let i = N(r.storage === "session" ? t : n, r.key);
263
+ }, ne = new Set(A.map((e) => e.key)), re = new Set(j.map((e) => e.key)), F = () => {
264
+ let e = {}, t = N("session"), n = N("local");
265
+ for (let r of A) {
266
+ let i = P(r.storage === "session" ? t : n, r.key);
297
267
  i !== null && (e[r.key] = i);
298
268
  }
299
- for (let r of A) for (let [i, a] of [[t, "sessionStorage"], [n, "localStorage"]]) {
300
- let t = N(i, r.key);
301
- t !== null && (e[`${r.key} (${a}) ${j}`] = t);
269
+ for (let r of j) for (let [i, a] of [[t, "sessionStorage"], [n, "localStorage"]]) {
270
+ let t = P(i, r.key);
271
+ t !== null && (e[`${r.key} (${a}) ${M}`] = t);
302
272
  }
303
273
  for (let [r, i] of [[t, "sessionStorage"], [n, "localStorage"]]) if (r) try {
304
274
  for (let t = 0; t < r.length; t += 1) {
305
275
  let n = r.key(t);
306
- !n || !n.startsWith("flemo:") || re.has(n) || ie.has(n) || (e[`${n} (${i}, unknown key)`] = r.getItem(n) ?? "");
276
+ !n || !n.startsWith("flemo:") || ne.has(n) || re.has(n) || (e[`${n} (${i}, unknown key)`] = r.getItem(n) ?? "");
307
277
  }
308
278
  } catch {}
309
279
  return e;
310
- }, ae = (e) => {
280
+ }, I = (e) => {
311
281
  let t = [];
312
- for (let [n, r] of Object.entries(e)) {
313
- if (n.includes("(retired the library no longer reads this)")) {
314
- let e = n.slice(0, n.indexOf(" (")), i = A.find((t) => t.key === e);
315
- t.push(`${n}=${r} — RETIRED residue: this key went with ${i?.retiredWith ?? "a removed feature"}. The library never reads it, so it cannot explain anything you are seeing. Safe to delete; it is listed only so it does not read as an unexplained lead.`);
316
- continue;
317
- }
318
- let e = k.find((e) => n === e.key || n.startsWith(`${e.key} `));
319
- !e || P.has(e.key) || (e.kind === "opt-in-diagnostic" ? t.push(`${n}=${r} — opt-in diagnostic active (${e.effect}); behavior differs from stock. Possible left-over A/B toggle from an earlier debugging session.`) : e.kind === "production-default-with-override" && t.push(`${n}=${r} — production default overridden for this session (${e.effect}). Stock behavior here is ${e.fallback}.`));
282
+ for (let [n, r] of Object.entries(e)) if (n.includes("(retired — the library no longer reads this)")) {
283
+ let e = n.slice(0, n.indexOf(" (")), i = j.find((t) => t.key === e);
284
+ t.push(`${n}=${r} RETIRED residue: this key went with ${i?.retiredWith ?? "a removed feature"}. The library never reads it, so it cannot explain anything you are seeing. Safe to delete; it is listed only so it does not read as an unexplained lead.`);
285
+ continue;
320
286
  }
321
287
  return t;
322
- }, I = (e) => Math.round(e * 10) / 10, L = (e) => {
288
+ }, L = (e) => Math.round(e * 10) / 10, R = (e) => {
323
289
  if (e.length === 0) return {
324
290
  count: 0,
325
291
  medianGapMs: 0,
@@ -329,11 +295,11 @@ var e = 30, t = 1e4, n = 50, r = 120, i = 100, a = (e) => {
329
295
  let t = [...e].sort((e, t) => e - t);
330
296
  return {
331
297
  count: e.length,
332
- medianGapMs: I(t[Math.floor(t.length / 2)]),
333
- maxGapMs: I(t[t.length - 1]),
298
+ medianGapMs: L(t[Math.floor(t.length / 2)]),
299
+ maxGapMs: L(t[t.length - 1]),
334
300
  over30Count: e.filter((e) => e >= 30).length
335
301
  };
336
- }, R = (e, t = []) => {
302
+ }, ie = (e, t = []) => {
337
303
  let n = [...e, ...t];
338
304
  return {
339
305
  ...n.length === 0 ? {
@@ -344,21 +310,21 @@ var e = 30, t = 1e4, n = 50, r = 120, i = 100, a = (e) => {
344
310
  let e = [...n].sort((e, t) => e - t);
345
311
  return {
346
312
  count: n.length,
347
- medianGapMs: I(e[Math.floor(e.length / 2)]),
348
- maxGapMs: I(e[e.length - 1])
313
+ medianGapMs: L(e[Math.floor(e.length / 2)]),
314
+ maxGapMs: L(e[e.length - 1])
349
315
  };
350
316
  })(),
351
- longGaps: n.filter((e) => e >= 30).map(I),
352
- held: L(e),
353
- released: L(t)
317
+ longGaps: n.filter((e) => e >= 30).map(L),
318
+ held: R(e),
319
+ released: R(t)
354
320
  };
355
- }, oe = (e) => e.length === 0 ? null : {
356
- maxMs: I(Math.max(...e)),
321
+ }, z = (e) => e.length === 0 ? null : {
322
+ maxMs: L(Math.max(...e)),
357
323
  over30Count: e.filter((e) => e >= 30).length
358
- }, z = (e) => {
324
+ }, ae = (e) => {
359
325
  let t = e.playerSuppression || e.playerAdvance;
360
326
  return t && e.compiledAnimation ? "mixed" : t ? "player" : e.compiledAnimation ? "compiled" : "unknown";
361
- }, se = (e) => e === "PUSHING" ? "PUSH" : e === "POPPING" ? "POP" : e === "REPLACING" ? "REPLACE" : null, ce = (e) => {
327
+ }, oe = (e) => e === "PUSHING" ? "PUSH" : e === "POPPING" ? "POP" : e === "REPLACING" ? "REPLACE" : null, se = (e) => {
362
328
  let t = /^matrix3d\(([^)]+)\)$/.exec(e.trim());
363
329
  if (t) {
364
330
  let e = t[1].split(",").map((e) => Number(e.trim()));
@@ -370,14 +336,14 @@ var e = 30, t = 1e4, n = 50, r = 120, i = 100, a = (e) => {
370
336
  return e.length === 6 && Number.isFinite(e[4]) ? e[4] : null;
371
337
  }
372
338
  return null;
373
- }, le = "2", B = new Set(_), V = new Set(v), ue = y(c), H = d, de = 2, fe = 2e3, pe = 2, me = 200, he = 1e3, U = (e) => Math.round(e * 10) / 10, ge = null, _e = () => window, ve = (e = {}) => {
374
- if (ge) return ge;
339
+ }, ce = "2", B = new Set(v), V = new Set(y), le = b(c), H = d, ue = 2, de = 2e3, fe = 2, pe = 200, me = 1e3, U = (e) => Math.round(e * 10) / 10, he = null, ge = () => window, _e = (e = {}) => {
340
+ if (he) return he;
375
341
  if (typeof window > "u" || typeof document > "u") return {
376
342
  detach: () => {},
377
343
  report: () => ({
378
344
  generatedAt: (/* @__PURE__ */ new Date()).toISOString(),
379
345
  version: "2",
380
- environment: w({
346
+ environment: T({
381
347
  medianGapMs: null,
382
348
  sampleCount: 0
383
349
  }),
@@ -388,44 +354,44 @@ var e = 30, t = 1e4, n = 50, r = 120, i = 100, a = (e) => {
388
354
  flights: [],
389
355
  anomalies: [],
390
356
  blindSpots: [...s],
391
- judgingProtocol: [...T]
357
+ judgingProtocol: [...E]
392
358
  })
393
359
  };
394
360
  let n = e.maxFlights ?? 50, r = e.log ?? !1, i = e.installGlobal ?? !0, c = F(), d = {
395
361
  medianGapMs: null,
396
362
  sampleCount: 0
397
363
  };
398
- ne().then((e) => {
364
+ te().then((e) => {
399
365
  d = e;
400
366
  });
401
- let g = [], _ = null;
367
+ let _ = [], v = null;
402
368
  try {
403
- typeof PerformanceObserver < "u" && PerformanceObserver.supportedEntryTypes?.includes("longtask") && (_ = new PerformanceObserver((e) => {
404
- for (let t of e.getEntries()) g.push({
369
+ typeof PerformanceObserver < "u" && PerformanceObserver.supportedEntryTypes?.includes("longtask") && (v = new PerformanceObserver((e) => {
370
+ for (let t of e.getEntries()) _.push({
405
371
  startMs: U(t.startTime),
406
372
  durationMs: U(t.duration)
407
373
  });
408
- g.length > he && g.splice(0, g.length - he);
409
- }), _.observe({
374
+ _.length > me && _.splice(0, _.length - me);
375
+ }), v.observe({
410
376
  type: "longtask",
411
377
  buffered: !0
412
378
  }));
413
379
  } catch {
414
- _ = null;
380
+ v = null;
415
381
  }
416
- let v = [], te = 0, b = null, x = [], S = !1, C = !1, E = () => Array.from(document.querySelectorAll(ue)).filter((e) => B.has(e.getAttribute("data-flemo-status") ?? "")), D = (e) => {
417
- let t = Array.from(document.querySelectorAll(y(h))).filter((e) => B.has(e.getAttribute("data-flemo-bar-status") ?? "") || e.getAttribute("data-flemo-bar-riding") === "true").length, n = Array.from(document.querySelectorAll(y(m))).filter((e) => B.has(e.getAttribute("data-flemo-status") ?? "")).length, r = Array.from(document.querySelectorAll(y(ee))).filter((e) => B.has(e.getAttribute("data-flemo-status") ?? "")).length;
382
+ let y = [], ee = 0, x = null, S = [], C = !1, w = !1, D = () => Array.from(document.querySelectorAll(le)).filter((e) => B.has(e.getAttribute("data-flemo-status") ?? "")), O = (e) => {
383
+ let t = Array.from(document.querySelectorAll(b(g))).filter((e) => B.has(e.getAttribute("data-flemo-bar-status") ?? "") || e.getAttribute("data-flemo-bar-riding") === "true").length, n = Array.from(document.querySelectorAll(b(h))).filter((e) => B.has(e.getAttribute("data-flemo-status") ?? "")).length, r = Array.from(document.querySelectorAll(b(m))).filter((e) => B.has(e.getAttribute("data-flemo-status") ?? "")).length;
418
384
  return {
419
385
  screens: e.length,
420
386
  bars: t,
421
387
  decorators: n,
422
388
  parts: r
423
389
  };
424
- }, O = (e) => {
390
+ }, k = (e) => {
425
391
  let t = [];
426
392
  for (let n of e) for (let e of Array.from(n.querySelectorAll("img"))) t.push(e);
427
393
  return t;
428
- }, k = (e) => {
394
+ }, A = (e) => {
429
395
  let t = 0, n = 0;
430
396
  for (let r of e.imagesTracked) r.complete && (t += 1, e.imagesHeld.has(r) || (n += 1));
431
397
  return {
@@ -435,20 +401,20 @@ var e = 30, t = 1e4, n = 50, r = 120, i = 100, a = (e) => {
435
401
  heldDuringFlight: e.imagesHeld.size,
436
402
  completedUnheld: n
437
403
  };
438
- }, A = (e) => {
439
- let t = b;
440
- if (!(!t || t.imagesTracked.size >= me)) for (let n of Array.from(e)) {
404
+ }, j = (e) => {
405
+ let t = x;
406
+ if (!(!t || t.imagesTracked.size >= pe)) for (let n of Array.from(e)) {
441
407
  if (!(n instanceof Element) || !t.elements.some((e) => e === n || e.contains(n))) continue;
442
408
  let e = n instanceof HTMLImageElement ? [n] : Array.from(n.querySelectorAll("img"));
443
409
  for (let n of e) if (!(n.complete || t.imagesTracked.has(n))) {
444
- if (t.imagesTracked.size >= me) return;
410
+ if (t.imagesTracked.size >= pe) return;
445
411
  t.imagesTracked.add(n), t.imagesAddedDuringFlight += 1;
446
412
  }
447
413
  }
448
- }, j = (e) => {
414
+ }, M = (e) => {
449
415
  for (let t of e.elements) for (let n of Array.from(t.querySelectorAll(`img[${f}]`))) e.imagesHeld.add(n);
450
416
  for (let t of e.imagesTracked) t.hasAttribute("data-flemo-img-hold") && e.imagesHeld.add(t);
451
- }, M = (e, t) => {
417
+ }, N = (e, t) => {
452
418
  e.releasedFrames += 1;
453
419
  let n = !1, r = !1;
454
420
  for (let t of e.elements) {
@@ -467,7 +433,7 @@ var e = 30, t = 1e4, n = 50, r = 120, i = 100, a = (e) => {
467
433
  e.lastPose.get(t) !== r && (n = !0);
468
434
  }
469
435
  }
470
- if (!(e.releasedFrames < pe)) {
436
+ if (!(e.releasedFrames < fe)) {
471
437
  if (n) {
472
438
  e.stallRunMs = 0;
473
439
  return;
@@ -478,7 +444,7 @@ var e = 30, t = 1e4, n = 50, r = 120, i = 100, a = (e) => {
478
444
  }
479
445
  e.stalledFrames += 1, e.stallRunMs += t, e.stallRunMs > e.longestStallMs && (e.longestStallMs = e.stallRunMs);
480
446
  }
481
- }, N = (e) => {
447
+ }, P = (e) => {
482
448
  for (let t of e.elements) {
483
449
  let n = t.style, r = t.getAnimations, i = e.clocks.get(t);
484
450
  if (i !== void 0 && i.playState !== "finished") {
@@ -501,33 +467,33 @@ var e = 30, t = 1e4, n = 50, r = 120, i = 100, a = (e) => {
501
467
  i !== void 0 && i !== r && (e.evidence.playerAdvance = !0), e.lastPose.set(t, r);
502
468
  }
503
469
  }
504
- }, re = (e) => e.elements.some((e) => {
470
+ }, ne = (e) => e.elements.some((e) => {
505
471
  let t = e.getAttribute(H);
506
472
  return t !== null && V.has(t);
507
- }), ie = () => {
508
- let e = b;
509
- if (!e || S) return;
473
+ }), re = () => {
474
+ let e = x;
475
+ if (!e || C) return;
510
476
  let t = performance.now();
511
- if (e.lastFrameAt !== null && e.heldGaps.length + e.releasedGaps.length < fe) {
512
- let n = t - e.lastFrameAt, r = re(e);
513
- (r ? e.heldGaps : e.releasedGaps).push(n), r || (M(e, n), e.releasedFrames === 1 && j(e));
477
+ if (e.lastFrameAt !== null && e.heldGaps.length + e.releasedGaps.length < de) {
478
+ let n = t - e.lastFrameAt, r = ne(e);
479
+ (r ? e.heldGaps : e.releasedGaps).push(n), r || (N(e, n), e.releasedFrames === 1 && M(e));
514
480
  }
515
- if (e.lastFrameAt = t, N(e), t - e.t0Ms > 1e4) {
516
- x = [...e.elements], ye(t, P(e));
481
+ if (e.lastFrameAt = t, P(e), t - e.t0Ms > 1e4) {
482
+ S = [...e.elements], W(t, L(e));
517
483
  return;
518
484
  }
519
- e.rafId = requestAnimationFrame(ie);
520
- }, P = (e) => {
485
+ e.rafId = requestAnimationFrame(re);
486
+ }, L = (e) => {
521
487
  let t = /* @__PURE__ */ new Set();
522
488
  for (let n of e.elements) {
523
489
  let e = n.getAttribute("data-flemo-status") ?? "";
524
490
  B.has(e) && t.add(e);
525
491
  }
526
492
  return [...t];
527
- }, I = (e) => {
493
+ }, R = (e) => {
528
494
  let t = performance.now();
529
- te += 1;
530
- let n = e.find((e) => e.getAttribute("data-flemo-active") === "true") ?? e[0], r = se(n.getAttribute("data-flemo-status") ?? "") ?? "PUSH", i = null;
495
+ ee += 1;
496
+ let n = e.find((e) => e.getAttribute("data-flemo-active") === "true") ?? e[0], r = oe(n.getAttribute("data-flemo-status") ?? "") ?? "PUSH", i = null;
531
497
  for (let t of e) {
532
498
  let e = t.getAttribute(H);
533
499
  if (e !== null && V.has(e)) {
@@ -535,17 +501,17 @@ var e = 30, t = 1e4, n = 50, r = 120, i = 100, a = (e) => {
535
501
  break;
536
502
  }
537
503
  }
538
- b = {
539
- id: `flight-${te}`,
504
+ x = {
505
+ id: `flight-${ee}`,
540
506
  kind: r,
541
507
  routerId: n.getAttribute("data-flemo-router") ?? void 0,
542
508
  t0Ms: t,
543
509
  t0Iso: (/* @__PURE__ */ new Date()).toISOString(),
544
510
  elements: [...e],
545
- participants: D(e),
511
+ participants: O(e),
546
512
  holdKind: i,
547
513
  holdReleasedAtMs: null,
548
- playerGapStartIndex: _e().__flemoPlayerGaps?.length ?? 0,
514
+ playerGapStartIndex: ge().__flemoPlayerGaps?.length ?? 0,
549
515
  heldGaps: [],
550
516
  releasedGaps: [],
551
517
  lastFrameAt: null,
@@ -564,15 +530,15 @@ var e = 30, t = 1e4, n = 50, r = 120, i = 100, a = (e) => {
564
530
  longestStallMs: 0,
565
531
  pausedAfterRelease: !1,
566
532
  holdReassertedAtMs: null,
567
- imagesTracked: new Set(O(e).filter((e) => !e.complete)),
533
+ imagesTracked: new Set(k(e).filter((e) => !e.complete)),
568
534
  imagesLoadingAtStart: 0,
569
535
  imagesAddedDuringFlight: 0,
570
536
  imagesHeld: /* @__PURE__ */ new Set(),
571
537
  rafId: null
572
- }, b.imagesLoadingAtStart = b.imagesTracked.size, N(b), b.rafId = requestAnimationFrame(ie);
573
- }, L = (e, t) => {
574
- let n = de, r = () => {
575
- if (!S) {
538
+ }, x.imagesLoadingAtStart = x.imagesTracked.size, P(x), x.rafId = requestAnimationFrame(re);
539
+ }, ce = (e, t) => {
540
+ let n = ue, r = () => {
541
+ if (!C) {
576
542
  if (--n, n > 0) {
577
543
  requestAnimationFrame(r);
578
544
  return;
@@ -581,8 +547,8 @@ var e = 30, t = 1e4, n = 50, r = 120, i = 100, a = (e) => {
581
547
  }
582
548
  };
583
549
  requestAnimationFrame(r);
584
- }, le = () => {
585
- if (b !== null || E().length > 0) return [];
550
+ }, _e = () => {
551
+ if (x !== null || D().length > 0) return [];
586
552
  let e = [];
587
553
  for (let [t, n] of [[f, "image reveal hold"], [p, "arrival hold"]]) {
588
554
  let r = document.querySelectorAll(`[${t}]`).length;
@@ -601,15 +567,15 @@ var e = 30, t = 1e4, n = 50, r = 120, i = 100, a = (e) => {
601
567
  if (o === "none") return;
602
568
  let s = e.getAttribute(u) === "true", c = `screen[${t}]${s ? " (active)" : ""}`;
603
569
  if (e.style.transform !== "" && e.style.transform !== "none" && n.push(`${c} transform=${e.style.transform}`), e.style.opacity !== "" && e.style.opacity !== "1" && n.push(`${c} opacity=${e.style.opacity}`), s && e.getAttribute("data-flemo-status") === "COMPLETED" && i > 0) {
604
- let e = ce(a);
570
+ let e = se(a);
605
571
  e !== null && Math.abs(e) >= i * .5 && (r = !0);
606
572
  }
607
- }), e.landing.residualInlineTransforms = n, e.landing.offViewportAtRest = r, e.landing.orphanedHolds = le();
608
- }, ye = (e, t) => {
609
- let i = b;
573
+ }), e.landing.residualInlineTransforms = n, e.landing.offViewportAtRest = r, e.landing.orphanedHolds = _e();
574
+ }, W = (e, t) => {
575
+ let i = x;
610
576
  if (!i) return;
611
- j(i), b = null, i.rafId !== null && cancelAnimationFrame(i.rafId);
612
- let a = oe((_e().__flemoPlayerGaps ?? []).slice(i.playerGapStartIndex)), o = {
577
+ M(i), x = null, i.rafId !== null && cancelAnimationFrame(i.rafId);
578
+ let a = z((ge().__flemoPlayerGaps ?? []).slice(i.playerGapStartIndex)), o = {
613
579
  id: i.id,
614
580
  ...i.routerId === void 0 ? {} : { routerId: i.routerId },
615
581
  kind: i.kind,
@@ -622,13 +588,13 @@ var e = 30, t = 1e4, n = 50, r = 120, i = 100, a = (e) => {
622
588
  iso: (/* @__PURE__ */ new Date()).toISOString()
623
589
  },
624
590
  durationMs: U(e - i.t0Ms),
625
- driver: z(i.evidence),
591
+ driver: ae(i.evidence),
626
592
  participants: i.participants,
627
593
  holds: {
628
594
  kind: i.holdKind,
629
595
  releasedAtMs: i.holdReleasedAtMs
630
596
  },
631
- frameSamples: R(i.heldGaps, i.releasedGaps),
597
+ frameSamples: ie(i.heldGaps, i.releasedGaps),
632
598
  motion: {
633
599
  sampledFrames: i.releasedFrames,
634
600
  stalledFrames: i.stalledFrames,
@@ -637,7 +603,7 @@ var e = 30, t = 1e4, n = 50, r = 120, i = 100, a = (e) => {
637
603
  holdReassertedAtMs: i.holdReassertedAtMs,
638
604
  tailFrames: i.tailFrames
639
605
  },
640
- images: k(i),
606
+ images: A(i),
641
607
  ...a ? { playerGaps: a } : {},
642
608
  longTasks: [],
643
609
  holdLongTasks: [],
@@ -649,34 +615,34 @@ var e = 30, t = 1e4, n = 50, r = 120, i = 100, a = (e) => {
649
615
  },
650
616
  anomalies: []
651
617
  };
652
- v.push(o), v.length > n && v.splice(0, v.length - n), t.length === 0 && L(o, i.elements), r && console.info(`[flemo devtools] ${o.id} ${o.kind} driver=${o.driver} ${o.durationMs}ms screens=${o.participants.screens}`);
653
- }, W = (e) => {
654
- let t = b;
618
+ y.push(o), y.length > n && y.splice(0, y.length - n), t.length === 0 && ce(o, i.elements), r && console.info(`[flemo devtools] ${o.id} ${o.kind} driver=${o.driver} ${o.durationMs}ms screens=${o.participants.screens}`);
619
+ }, ye = (e) => {
620
+ let t = x;
655
621
  if (!t || !(e.target instanceof Element)) return;
656
622
  let n = e.target.getAttribute(H);
657
- n !== null && V.has(n) && t.holdKind === null && (t.holdKind = n), n !== null && V.has(n) && t.holdReleasedAtMs !== null && t.holdReassertedAtMs === null && (t.holdReassertedAtMs = U(performance.now() - t.t0Ms)), (n === "false" || n === null) && e.oldValue !== null && V.has(e.oldValue) && t.holdReleasedAtMs === null && !re(t) && (t.holdReleasedAtMs = U(performance.now() - t.t0Ms));
658
- }, be = () => {
659
- let e = E();
660
- if (x.length > 0) {
661
- if (e.some((e) => x.includes(e))) return;
662
- x = [];
623
+ n !== null && V.has(n) && t.holdKind === null && (t.holdKind = n), n !== null && V.has(n) && t.holdReleasedAtMs !== null && t.holdReassertedAtMs === null && (t.holdReassertedAtMs = U(performance.now() - t.t0Ms)), (n === "false" || n === null) && e.oldValue !== null && V.has(e.oldValue) && t.holdReleasedAtMs === null && !ne(t) && (t.holdReleasedAtMs = U(performance.now() - t.t0Ms));
624
+ }, G = () => {
625
+ let e = D();
626
+ if (S.length > 0) {
627
+ if (e.some((e) => S.includes(e))) return;
628
+ S = [];
663
629
  }
664
- if (!b && e.length > 0) {
665
- I(e);
630
+ if (!x && e.length > 0) {
631
+ R(e);
666
632
  return;
667
633
  }
668
- if (b && e.length === 0) {
669
- ye(performance.now(), []);
634
+ if (x && e.length === 0) {
635
+ W(performance.now(), []);
670
636
  return;
671
637
  }
672
- if (b) for (let t of e) b.elements.includes(t) || (b.elements.push(t), A(t.querySelectorAll("img")), b.participants = D(b.elements));
673
- }, G = null, K = null, q = () => {
638
+ if (x) for (let t of e) x.elements.includes(t) || (x.elements.push(t), j(t.querySelectorAll("img")), x.participants = O(x.elements));
639
+ }, K = null, q = null, J = () => {
674
640
  let e = document.documentElement;
675
641
  if (!e) return !1;
676
642
  let t = new MutationObserver((e) => {
677
- if (!S) {
678
- for (let t of e) t.type === "attributes" && t.attributeName === H ? W(t) : t.type === "childList" && t.addedNodes.length > 0 && A(t.addedNodes);
679
- be();
643
+ if (!C) {
644
+ for (let t of e) t.type === "attributes" && t.attributeName === H ? ye(t) : t.type === "childList" && t.addedNodes.length > 0 && j(t.addedNodes);
645
+ G();
680
646
  }
681
647
  });
682
648
  try {
@@ -694,23 +660,23 @@ var e = 30, t = 1e4, n = 50, r = 120, i = 100, a = (e) => {
694
660
  } catch {
695
661
  return !1;
696
662
  }
697
- return G = t, be(), !0;
663
+ return K = t, G(), !0;
698
664
  };
699
- if (!q()) {
665
+ if (!J()) {
700
666
  let e = () => {
701
- K = null, S || q();
667
+ q = null, C || J();
702
668
  };
703
- K = e, document.addEventListener("DOMContentLoaded", e, { once: !0 });
669
+ q = e, document.addEventListener("DOMContentLoaded", e, { once: !0 });
704
670
  }
705
- let J = (e) => {
706
- let t = g.filter((t) => t.startMs + t.durationMs >= e.t0.ms - 120 && t.startMs <= e.t1.ms), n = e.holds.kind === null ? e.t0.ms : e.holds.releasedAtMs === null ? e.t1.ms : e.t0.ms + e.holds.releasedAtMs;
671
+ let Y = (e) => {
672
+ let t = _.filter((t) => t.startMs + t.durationMs >= e.t0.ms - 120 && t.startMs <= e.t1.ms), n = e.holds.kind === null ? e.t0.ms : e.holds.releasedAtMs === null ? e.t1.ms : e.t0.ms + e.holds.releasedAtMs;
707
673
  return {
708
674
  released: t.filter((e) => e.startMs + e.durationMs > n),
709
675
  held: t.filter((e) => e.startMs + e.durationMs <= n)
710
676
  };
711
- }, Y = () => {
712
- let e = performance.now(), n = v.map((e) => {
713
- let t = J(e), n = {
677
+ }, X = () => {
678
+ let e = performance.now(), n = y.map((e) => {
679
+ let t = Y(e), n = {
714
680
  ...e,
715
681
  longTasks: t.released,
716
682
  holdLongTasks: t.held,
@@ -734,7 +700,7 @@ var e = 30, t = 1e4, n = 50, r = 120, i = 100, a = (e) => {
734
700
  motion: n.motion,
735
701
  images: n.images
736
702
  }), n;
737
- }), r = b;
703
+ }), r = x;
738
704
  if (!r) return n;
739
705
  let i = e - r.t0Ms > t, o = {
740
706
  id: `${r.id} (in flight)`,
@@ -749,13 +715,13 @@ var e = 30, t = 1e4, n = 50, r = 120, i = 100, a = (e) => {
749
715
  iso: (/* @__PURE__ */ new Date()).toISOString()
750
716
  },
751
717
  durationMs: U(e - r.t0Ms),
752
- driver: z(r.evidence),
718
+ driver: ae(r.evidence),
753
719
  participants: r.participants,
754
720
  holds: {
755
721
  kind: r.holdKind,
756
722
  releasedAtMs: r.holdReleasedAtMs
757
723
  },
758
- frameSamples: R(r.heldGaps, r.releasedGaps),
724
+ frameSamples: ie(r.heldGaps, r.releasedGaps),
759
725
  motion: {
760
726
  sampledFrames: r.releasedFrames,
761
727
  stalledFrames: r.stalledFrames,
@@ -764,17 +730,17 @@ var e = 30, t = 1e4, n = 50, r = 120, i = 100, a = (e) => {
764
730
  holdReassertedAtMs: r.holdReassertedAtMs,
765
731
  tailFrames: r.tailFrames
766
732
  },
767
- images: k(r),
733
+ images: A(r),
768
734
  longTasks: [],
769
735
  holdLongTasks: [],
770
736
  landing: {
771
737
  residualInlineTransforms: [],
772
738
  offViewportAtRest: !1,
773
- stuckStatuses: i ? P(r) : [],
739
+ stuckStatuses: i ? L(r) : [],
774
740
  orphanedHolds: []
775
741
  },
776
742
  anomalies: []
777
- }, s = J(o);
743
+ }, s = Y(o);
778
744
  return o.longTasks = s.released, o.holdLongTasks = s.held, o.anomalies = a({
779
745
  t0Ms: o.t0.ms,
780
746
  t1Ms: o.t1.ms,
@@ -788,10 +754,10 @@ var e = 30, t = 1e4, n = 50, r = 120, i = 100, a = (e) => {
788
754
  motion: o.motion,
789
755
  images: o.images
790
756
  }), [...n, o];
791
- }, X = () => {
757
+ }, be = () => {
792
758
  let e = F(), t = { ...e };
793
759
  for (let [n, r] of Object.entries(c)) n in e || (t[`${n} (at attach, since cleared)`] = r);
794
- let n = ae(t), r = w(d), i = Y(), a = b;
760
+ let n = I(t), r = T(d), i = X(), a = x;
795
761
  return {
796
762
  generatedAt: (/* @__PURE__ */ new Date()).toISOString(),
797
763
  version: "2",
@@ -808,42 +774,42 @@ var e = 30, t = 1e4, n = 50, r = 120, i = 100, a = (e) => {
808
774
  flightAnomalies: i.map((e) => e.anomalies)
809
775
  }),
810
776
  blindSpots: [...s],
811
- judgingProtocol: [...T]
777
+ judgingProtocol: [...E]
812
778
  };
813
779
  }, xe = () => {
814
- if (!S) {
815
- if (S = !0, G?.disconnect(), K !== null && (document.removeEventListener("DOMContentLoaded", K), K = null), _?.disconnect(), b?.rafId != null && cancelAnimationFrame(b.rafId), b = null, C) {
816
- let e = _e();
780
+ if (!C) {
781
+ if (C = !0, K?.disconnect(), q !== null && (document.removeEventListener("DOMContentLoaded", q), q = null), v?.disconnect(), x?.rafId != null && cancelAnimationFrame(x.rafId), x = null, w) {
782
+ let e = ge();
817
783
  e.flemo?.__flemoDevtools === !0 && delete e.flemo;
818
784
  }
819
- ge = null;
785
+ he = null;
820
786
  }
821
787
  }, Se = {
822
788
  detach: xe,
823
- report: X
789
+ report: be
824
790
  };
825
791
  if (i) {
826
- let e = _e(), t = e.flemo;
792
+ let e = ge(), t = e.flemo;
827
793
  (t === void 0 || t?.__flemoDevtools === !0) && (e.flemo = {
828
794
  __flemoDevtools: !0,
829
- report: X,
830
- flights: Y,
795
+ report: be,
796
+ flights: X,
831
797
  detach: xe
832
- }, C = !0);
798
+ }, w = !0);
833
799
  }
834
- return ge = Se, Se;
835
- }, ye = "http://www.w3.org/2000/svg", W = (e, t, n) => {
800
+ return he = Se, Se;
801
+ }, ve = "http://www.w3.org/2000/svg", W = (e, t, n) => {
836
802
  let r = document.createElement(e);
837
803
  return t !== void 0 && (r.className = t), n !== void 0 && (r.textContent = n), r;
838
- }, be = (e, t) => {
839
- let n = document.createElementNS(ye, e);
804
+ }, ye = (e, t) => {
805
+ let n = document.createElementNS(ve, e);
840
806
  for (let [e, r] of Object.entries(t)) n.setAttribute(e, r);
841
807
  return n;
842
808
  }, G = (e) => {
843
809
  for (; e.firstChild !== null;) e.removeChild(e.firstChild);
844
810
  }, K = (e, t) => {
845
811
  e.textContent !== t && (e.textContent = t);
846
- }, q = (e) => e == null || e === "" ? "—" : String(e), J = (e) => typeof e == "number" && Number.isFinite(e) ? `${Math.round(e)}ms` : "—", Y = (e) => typeof e == "number" && Number.isFinite(e) ? `${Math.round(e * 10) / 10}ms` : "—", X = (e) => typeof e == "number" && Number.isFinite(e) ? String(e) : "—", xe = (e) => e === !0 ? "yes" : e === !1 ? "no" : "—", Se = (e) => {
812
+ }, q = (e) => e == null || e === "" ? "—" : String(e), J = (e) => typeof e == "number" && Number.isFinite(e) ? `${Math.round(e)}ms` : "—", Y = (e) => typeof e == "number" && Number.isFinite(e) ? `${Math.round(e * 10) / 10}ms` : "—", X = (e) => typeof e == "number" && Number.isFinite(e) ? String(e) : "—", be = (e) => e === !0 ? "yes" : e === !1 ? "no" : "—", xe = (e) => {
847
813
  let t = e?.environment;
848
814
  if (!t) return "—";
849
815
  let n = t.viewport, r = n && typeof n.width == "number" && typeof n.height == "number" ? `${Math.round(n.width)}×${Math.round(n.height)}` : "—";
@@ -853,12 +819,12 @@ var e = 30, t = 1e4, n = 50, r = 120, i = 100, a = (e) => {
853
819
  r,
854
820
  `rAF ${Y(t.rafCadence?.medianGapMs)}`
855
821
  ].join(" · ");
856
- }, Ce = (e, t) => `${t ?? ""}#${e.map((e) => `${e?.id ?? ""}|${e?.kind ?? ""}|${e?.driver ?? ""}|${Math.round(e?.durationMs ?? 0)}|${e?.participants?.screens ?? 0}|${e?.anomalies?.length ?? 0}`).join(",")}`, we = (e) => {
822
+ }, Se = (e, t) => `${t ?? ""}#${e.map((e) => `${e?.id ?? ""}|${e?.kind ?? ""}|${e?.driver ?? ""}|${Math.round(e?.durationMs ?? 0)}|${e?.participants?.screens ?? 0}|${e?.anomalies?.length ?? 0}`).join(",")}`, Ce = (e) => {
857
823
  let t = e?.released?.gaps;
858
824
  if (!Array.isArray(t)) return null;
859
825
  let n = t.filter((e) => typeof e == "number" && Number.isFinite(e));
860
826
  return n.length >= 2 ? n : null;
861
- }, Te = "\n:host {\n all: initial;\n color-scheme: dark;\n}\n* { box-sizing: border-box; }\n.root {\n --bg: #14161a;\n --bg-soft: #1b1e24;\n --line: #2b3038;\n --fg: #e6e9ef;\n --fg-dim: #99a1b0;\n --accent: #7cc4ff;\n --warn: #ffb454;\n --bad: #ff6b6b;\n font: 12px/1.45 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;\n color: var(--fg);\n}\n@media (prefers-color-scheme: light) {\n .root {\n --bg: #ffffff;\n --bg-soft: #f4f6f9;\n --line: #dde1e8;\n --fg: #1a1d22;\n --fg-dim: #5c6472;\n --accent: #0b6bcb;\n --warn: #a35a00;\n --bad: #c2261f;\n }\n}\n.toggle {\n position: fixed;\n bottom: 12px;\n z-index: 2147483000;\n display: flex;\n align-items: center;\n gap: 6px;\n margin: 0;\n padding: 6px 10px;\n border: 1px solid var(--line);\n border-radius: 999px;\n background: var(--bg);\n color: var(--fg);\n font: inherit;\n cursor: pointer;\n}\n.toggle:hover { background: var(--bg-soft); }\n.toggle[data-corner=\"bottom-right\"] { right: 12px; }\n.toggle[data-corner=\"bottom-left\"] { left: 12px; }\n.mark { font-weight: 700; letter-spacing: 0.04em; }\n.count {\n padding: 0 6px;\n border-radius: 999px;\n background: var(--bg-soft);\n color: var(--fg-dim);\n}\n.dot {\n width: 7px;\n height: 7px;\n border-radius: 50%;\n background: var(--bad);\n}\n.dot[hidden] { display: none; }\n.panel {\n position: fixed;\n left: 0;\n right: 0;\n bottom: 0;\n z-index: 2147482999;\n display: flex;\n flex-direction: column;\n max-width: 100%;\n border-top: 1px solid var(--line);\n background: var(--bg);\n overflow: hidden;\n}\n.panel[hidden] { display: none; }\n.grip {\n flex: 0 0 6px;\n height: 6px;\n background: var(--line);\n cursor: ns-resize;\n touch-action: none;\n}\n.head {\n display: flex;\n flex-wrap: wrap;\n align-items: center;\n gap: 8px;\n padding: 8px 10px;\n border-bottom: 1px solid var(--line);\n}\n.env { color: var(--fg-dim); }\n.spacer { flex: 1 1 auto; }\n.act {\n padding: 4px 8px;\n border: 1px solid var(--line);\n border-radius: 4px;\n background: var(--bg-soft);\n color: var(--fg);\n font: inherit;\n cursor: pointer;\n}\n.chips {\n display: flex;\n flex-wrap: wrap;\n gap: 6px;\n flex: 1 1 100%;\n}\n.chips:empty { display: none; }\n.chip {\n padding: 2px 8px;\n border: 1px solid var(--line);\n border-radius: 999px;\n background: var(--bg-soft);\n color: var(--fg-dim);\n max-width: 100%;\n overflow-wrap: anywhere;\n}\n.chip.warn { border-color: var(--warn); color: var(--warn); }\n.chip.bad { border-color: var(--bad); color: var(--bad); }\n.body {\n display: flex;\n flex: 1 1 auto;\n min-height: 0;\n}\n.list {\n flex: 0 0 40%;\n max-width: 340px;\n min-width: 180px;\n overflow: auto;\n border-right: 1px solid var(--line);\n}\n.row {\n display: flex;\n align-items: center;\n gap: 8px;\n width: 100%;\n padding: 6px 10px;\n border: 0;\n border-bottom: 1px solid var(--line);\n background: none;\n color: var(--fg);\n font: inherit;\n text-align: left;\n cursor: pointer;\n}\n.row[aria-selected=\"true\"] { background: var(--bg-soft); }\n.row .kind { font-weight: 700; }\n.row .driver { color: var(--accent); }\n.row .dur, .row .screens { color: var(--fg-dim); }\n.row .n {\n margin-left: auto;\n padding: 0 6px;\n border-radius: 999px;\n background: var(--bg-soft);\n color: var(--fg-dim);\n}\n.row .n.bad { background: var(--bad); color: #fff; }\n.detail { flex: 1 1 auto; overflow: auto; padding: 8px 10px; }\n.section { margin: 0 0 10px; }\n.section > h2 {\n margin: 0 0 4px;\n font: inherit;\n font-weight: 700;\n color: var(--fg-dim);\n text-transform: uppercase;\n letter-spacing: 0.06em;\n}\n.kv { display: flex; gap: 8px; }\n.kv > .k { flex: 0 0 34%; max-width: 180px; color: var(--fg-dim); }\n.kv > .v { flex: 1 1 auto; overflow-wrap: anywhere; }\n/* A value that IS the finding — a stall, a re-asserted hold, an orphan. */\n.kv > .v.bad { color: var(--bad); }\n.li { overflow-wrap: anywhere; }\n.li.bad { color: var(--bad); }\n.dim { color: var(--fg-dim); }\n.spark { display: block; width: 100%; height: 28px; }\n.foot { border-top: 1px solid var(--line); padding: 6px 10px; color: var(--fg-dim); }\n.foot summary { cursor: pointer; }\n.foot .li { margin-top: 4px; }\n", Ee = 48, Z = (e, t, n, r) => {
827
+ }, we = "\n:host {\n all: initial;\n color-scheme: dark;\n}\n* { box-sizing: border-box; }\n.root {\n --bg: #14161a;\n --bg-soft: #1b1e24;\n --line: #2b3038;\n --fg: #e6e9ef;\n --fg-dim: #99a1b0;\n --accent: #7cc4ff;\n --warn: #ffb454;\n --bad: #ff6b6b;\n font: 12px/1.45 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;\n color: var(--fg);\n}\n@media (prefers-color-scheme: light) {\n .root {\n --bg: #ffffff;\n --bg-soft: #f4f6f9;\n --line: #dde1e8;\n --fg: #1a1d22;\n --fg-dim: #5c6472;\n --accent: #0b6bcb;\n --warn: #a35a00;\n --bad: #c2261f;\n }\n}\n.toggle {\n position: fixed;\n bottom: 12px;\n z-index: 2147483000;\n display: flex;\n align-items: center;\n gap: 6px;\n margin: 0;\n padding: 6px 10px;\n border: 1px solid var(--line);\n border-radius: 999px;\n background: var(--bg);\n color: var(--fg);\n font: inherit;\n cursor: pointer;\n}\n.toggle:hover { background: var(--bg-soft); }\n.toggle[data-corner=\"bottom-right\"] { right: 12px; }\n.toggle[data-corner=\"bottom-left\"] { left: 12px; }\n.mark { font-weight: 700; letter-spacing: 0.04em; }\n.count {\n padding: 0 6px;\n border-radius: 999px;\n background: var(--bg-soft);\n color: var(--fg-dim);\n}\n.dot {\n width: 7px;\n height: 7px;\n border-radius: 50%;\n background: var(--bad);\n}\n.dot[hidden] { display: none; }\n.panel {\n position: fixed;\n left: 0;\n right: 0;\n bottom: 0;\n z-index: 2147482999;\n display: flex;\n flex-direction: column;\n max-width: 100%;\n border-top: 1px solid var(--line);\n background: var(--bg);\n overflow: hidden;\n}\n.panel[hidden] { display: none; }\n.grip {\n flex: 0 0 6px;\n height: 6px;\n background: var(--line);\n cursor: ns-resize;\n touch-action: none;\n}\n.head {\n display: flex;\n flex-wrap: wrap;\n align-items: center;\n gap: 8px;\n padding: 8px 10px;\n border-bottom: 1px solid var(--line);\n}\n.env { color: var(--fg-dim); }\n.spacer { flex: 1 1 auto; }\n.act {\n padding: 4px 8px;\n border: 1px solid var(--line);\n border-radius: 4px;\n background: var(--bg-soft);\n color: var(--fg);\n font: inherit;\n cursor: pointer;\n}\n.chips {\n display: flex;\n flex-wrap: wrap;\n gap: 6px;\n flex: 1 1 100%;\n}\n.chips:empty { display: none; }\n.chip {\n padding: 2px 8px;\n border: 1px solid var(--line);\n border-radius: 999px;\n background: var(--bg-soft);\n color: var(--fg-dim);\n max-width: 100%;\n overflow-wrap: anywhere;\n}\n.chip.warn { border-color: var(--warn); color: var(--warn); }\n.chip.bad { border-color: var(--bad); color: var(--bad); }\n.body {\n display: flex;\n flex: 1 1 auto;\n min-height: 0;\n}\n.list {\n flex: 0 0 40%;\n max-width: 340px;\n min-width: 180px;\n overflow: auto;\n border-right: 1px solid var(--line);\n}\n.row {\n display: flex;\n align-items: center;\n gap: 8px;\n width: 100%;\n padding: 6px 10px;\n border: 0;\n border-bottom: 1px solid var(--line);\n background: none;\n color: var(--fg);\n font: inherit;\n text-align: left;\n cursor: pointer;\n}\n.row[aria-selected=\"true\"] { background: var(--bg-soft); }\n.row .kind { font-weight: 700; }\n.row .driver { color: var(--accent); }\n.row .dur, .row .screens { color: var(--fg-dim); }\n.row .n {\n margin-left: auto;\n padding: 0 6px;\n border-radius: 999px;\n background: var(--bg-soft);\n color: var(--fg-dim);\n}\n.row .n.bad { background: var(--bad); color: #fff; }\n.detail { flex: 1 1 auto; overflow: auto; padding: 8px 10px; }\n.section { margin: 0 0 10px; }\n.section > h2 {\n margin: 0 0 4px;\n font: inherit;\n font-weight: 700;\n color: var(--fg-dim);\n text-transform: uppercase;\n letter-spacing: 0.06em;\n}\n.kv { display: flex; gap: 8px; }\n.kv > .k { flex: 0 0 34%; max-width: 180px; color: var(--fg-dim); }\n.kv > .v { flex: 1 1 auto; overflow-wrap: anywhere; }\n/* A value that IS the finding — a stall, a re-asserted hold, an orphan. */\n.kv > .v.bad { color: var(--bad); }\n.li { overflow-wrap: anywhere; }\n.li.bad { color: var(--bad); }\n.dim { color: var(--fg-dim); }\n.spark { display: block; width: 100%; height: 28px; }\n.foot { border-top: 1px solid var(--line); padding: 6px 10px; color: var(--fg-dim); }\n.foot summary { cursor: pointer; }\n.foot .li { margin-top: 4px; }\n", Te = 48, Z = (e, t, n, r) => {
862
828
  let i = W("div", "kv");
863
829
  i.appendChild(W("span", "k", t)), i.appendChild(W("span", r ? `v ${r}` : "v", n)), e.appendChild(i);
864
830
  }, Q = (e, t) => {
@@ -866,12 +832,12 @@ var e = 30, t = 1e4, n = 50, r = 120, i = 100, a = (e) => {
866
832
  return n.appendChild(W("h2", void 0, t)), e.appendChild(n), n;
867
833
  }, $ = (e, t, n = "li") => {
868
834
  e.appendChild(W("div", n, t));
869
- }, De = (e, t) => {
835
+ }, Ee = (e, t) => {
870
836
  G(e);
871
837
  for (let n of t?.overrides?.warnings ?? []) e.appendChild(W("span", "chip warn", q(n)));
872
838
  for (let n of t?.anomalies ?? []) e.appendChild(W("span", "chip bad", q(n)));
873
839
  for (let [n, r] of Object.entries(t?.overrides?.active ?? {})) e.appendChild(W("span", "chip", `${n}=${String(r)}`));
874
- }, Oe = (e, t, n, r) => {
840
+ }, De = (e, t, n, r) => {
875
841
  if (G(e), t.length === 0) {
876
842
  $(e, "no flights recorded yet — navigate once", "li dim");
877
843
  return;
@@ -882,7 +848,7 @@ var e = 30, t = 1e4, n = 50, r = 120, i = 100, a = (e) => {
882
848
  let c = a?.anomalies?.length ?? 0;
883
849
  s.appendChild(W("span", c > 0 ? "n bad" : "n", String(c))), s.addEventListener("click", () => r(o)), e.appendChild(s);
884
850
  }
885
- }, ke = (e, t, n) => {
851
+ }, Oe = (e, t, n) => {
886
852
  if (!n) {
887
853
  Z(e, t, "—");
888
854
  return;
@@ -893,21 +859,21 @@ var e = 30, t = 1e4, n = 50, r = 120, i = 100, a = (e) => {
893
859
  `max ${Y(n.maxGapMs)}`
894
860
  ];
895
861
  typeof n.over30Count == "number" && r.push(`>30ms ×${n.over30Count}`), Z(e, t, r.join(" · "));
896
- }, Ae = (e) => {
897
- let t = Math.max(...e), n = t > 0 ? t : 1, r = 100 / (e.length - 1), i = e.map((e, t) => `${Math.round(t * r * 10) / 10},${Math.round((27 - e / n * 26) * 10) / 10}`).join(" "), a = be("svg", {
862
+ }, ke = (e) => {
863
+ let t = Math.max(...e), n = t > 0 ? t : 1, r = 100 / (e.length - 1), i = e.map((e, t) => `${Math.round(t * r * 10) / 10},${Math.round((27 - e / n * 26) * 10) / 10}`).join(" "), a = ye("svg", {
898
864
  class: "spark",
899
865
  viewBox: "0 0 100 28",
900
866
  preserveAspectRatio: "none",
901
867
  "aria-hidden": "true"
902
868
  });
903
- return a.appendChild(be("polyline", {
869
+ return a.appendChild(ye("polyline", {
904
870
  points: i,
905
871
  fill: "none",
906
872
  stroke: "currentColor",
907
873
  "stroke-width": "1",
908
874
  "vector-effect": "non-scaling-stroke"
909
875
  })), a;
910
- }, je = (e, t) => {
876
+ }, Ae = (e, t) => {
911
877
  let n = t.longTasks ?? [], r = t.holdLongTasks ?? [];
912
878
  if (n.length === 0 && r.length === 0) {
913
879
  $(e, "none", "li dim");
@@ -916,7 +882,7 @@ var e = 30, t = 1e4, n = 50, r = 120, i = 100, a = (e) => {
916
882
  let i = (e) => `${J(e?.startMs)} + ${J(e?.durationMs)}`;
917
883
  for (let t of n) $(e, i(t), "li bad");
918
884
  for (let t of r) $(e, `${i(t)} (absorbed by hold)`, "li dim");
919
- }, Me = (e, t) => {
885
+ }, je = (e, t) => {
920
886
  if (G(e), !t) {
921
887
  $(e, "select a flight", "li dim");
922
888
  return;
@@ -924,43 +890,43 @@ var e = 30, t = 1e4, n = 50, r = 120, i = 100, a = (e) => {
924
890
  let n = Q(e, "timing");
925
891
  Z(n, "id", q(t.id)), Z(n, "kind / driver", `${q(t.kind)} · ${q(t.driver)}`), Z(n, "router", q(t.routerId)), Z(n, "t0", q(t.t0?.iso)), Z(n, "duration", J(t.durationMs)), Z(n, "participants", `${X(t.participants?.screens)} screens · ${X(t.participants?.bars)} bars · ${X(t.participants?.decorators)} decorators · ${X(t.participants?.parts)} parts`), Z(n, "hold", `${q(t.holds?.kind)} · released ${J(t.holds?.releasedAtMs)}`);
926
892
  let r = Q(e, "frames");
927
- ke(r, "held (absorbed)", t.frameSamples?.held), ke(r, "released (visible)", t.frameSamples?.released), t.playerGaps && Z(r, "player mirror", `max ${Y(t.playerGaps.maxMs)} · >30ms ×${X(t.playerGaps.over30Count)}`);
928
- let i = we(t.frameSamples);
929
- i && r.appendChild(Ae(i));
893
+ Oe(r, "held (absorbed)", t.frameSamples?.held), Oe(r, "released (visible)", t.frameSamples?.released), t.playerGaps && Z(r, "player mirror", `max ${Y(t.playerGaps.maxMs)} · >30ms ×${X(t.playerGaps.over30Count)}`);
894
+ let i = Ce(t.frameSamples);
895
+ i && r.appendChild(ke(i));
930
896
  let a = Q(e, "motion (did it move)"), o = t.motion?.longestStallMs, s = t.motion?.holdReassertedAtMs;
931
- Z(a, "released frames", X(t.motion?.sampledFrames)), Z(a, "stalled frames", X(t.motion?.stalledFrames), (t.motion?.stalledFrames ?? 0) > 0 ? "bad" : void 0), Z(a, "longest stall", J(o), (o ?? 0) >= Ee ? "bad" : void 0), Z(a, "paused after release", xe(t.motion?.pausedAfterRelease), t.motion?.pausedAfterRelease === !0 ? "bad" : void 0), Z(a, "hold re-asserted", s == null ? "no" : J(s), typeof s == "number" ? "bad" : void 0);
897
+ Z(a, "released frames", X(t.motion?.sampledFrames)), Z(a, "stalled frames", X(t.motion?.stalledFrames), (t.motion?.stalledFrames ?? 0) > 0 ? "bad" : void 0), Z(a, "longest stall", J(o), (o ?? 0) >= Te ? "bad" : void 0), Z(a, "paused after release", be(t.motion?.pausedAfterRelease), t.motion?.pausedAfterRelease === !0 ? "bad" : void 0), Z(a, "hold re-asserted", s == null ? "no" : J(s), typeof s == "number" ? "bad" : void 0);
932
898
  let c = Q(e, "images"), l = t.images?.completedDuringFlight ?? 0, u = t.images?.heldDuringFlight ?? 0, d = t.images?.completedUnheld, f = typeof d == "number" ? d > 0 : l > u;
933
- Z(c, "loading at t0", X(t.images?.loadingAtStart)), Z(c, "added mid-flight", X(t.images?.addedDuringFlight)), Z(c, "completed mid-flight", X(t.images?.completedDuringFlight), f ? "bad" : void 0), Z(c, "held by the engine", X(t.images?.heldDuringFlight)), Z(c, "completed without hold", X(d), f ? "bad" : void 0), je(Q(e, "long tasks"), t);
934
- let p = Q(e, "landing"), ee = t.landing?.residualInlineTransforms ?? [];
935
- if (ee.length === 0) Z(p, "inline residue", "clean");
936
- else for (let e of ee) Z(p, "inline residue", q(e));
937
- Z(p, "off-viewport at rest", xe(t.landing?.offViewportAtRest));
938
- let m = t.landing?.stuckStatuses ?? [];
939
- Z(p, "stuck statuses", m.length === 0 ? "none" : m.join(", "));
940
- let h = t.landing?.orphanedHolds ?? [];
941
- if (h.length === 0) Z(p, "orphaned holds", "none");
942
- else for (let e of h) Z(p, "orphaned holds", q(e), "bad");
943
- let g = Q(e, "anomalies"), _ = t.anomalies ?? [];
944
- if (_.length === 0) {
945
- $(g, "none", "li dim");
899
+ Z(c, "loading at t0", X(t.images?.loadingAtStart)), Z(c, "added mid-flight", X(t.images?.addedDuringFlight)), Z(c, "completed mid-flight", X(t.images?.completedDuringFlight), f ? "bad" : void 0), Z(c, "held by the engine", X(t.images?.heldDuringFlight)), Z(c, "completed without hold", X(d), f ? "bad" : void 0), Ae(Q(e, "long tasks"), t);
900
+ let p = Q(e, "landing"), m = t.landing?.residualInlineTransforms ?? [];
901
+ if (m.length === 0) Z(p, "inline residue", "clean");
902
+ else for (let e of m) Z(p, "inline residue", q(e));
903
+ Z(p, "off-viewport at rest", be(t.landing?.offViewportAtRest));
904
+ let h = t.landing?.stuckStatuses ?? [];
905
+ Z(p, "stuck statuses", h.length === 0 ? "none" : h.join(", "));
906
+ let g = t.landing?.orphanedHolds ?? [];
907
+ if (g.length === 0) Z(p, "orphaned holds", "none");
908
+ else for (let e of g) Z(p, "orphaned holds", q(e), "bad");
909
+ let _ = Q(e, "anomalies"), v = t.anomalies ?? [];
910
+ if (v.length === 0) {
911
+ $(_, "none", "li dim");
946
912
  return;
947
913
  }
948
- for (let e of _) $(g, q(e), "li bad");
949
- }, Ne = (e, t) => {
914
+ for (let e of v) $(_, q(e), "li bad");
915
+ }, Me = (e, t) => {
950
916
  G(e);
951
917
  for (let n of t ?? []) $(e, q(n));
952
- }, Pe = _.map((e) => y(c) + te(l, e)).join(","), Fe = 320, Ie = 2e3, Le = 120, Re = "Copy report JSON", ze = () => {}, Be = null, Ve = (e = {}) => {
953
- if (Be) return Be;
954
- if (typeof document > "u") return { detach: ze };
918
+ }, Ne = v.map((e) => b(c) + ee(l, e)).join(","), Pe = 320, Fe = 2e3, Ie = 120, Le = "Copy report JSON", Re = () => {}, ze = null, Be = (e = {}) => {
919
+ if (ze) return ze;
920
+ if (typeof document > "u") return { detach: Re };
955
921
  let t = !1, n, r = window.flemo;
956
922
  e.recorder ? n = e.recorder : r?.__flemoDevtools === !0 && typeof r.report == "function" ? n = {
957
923
  report: r.report,
958
- detach: ze
959
- } : (n = ve(), t = !0);
924
+ detach: Re
925
+ } : (n = _e(), t = !0);
960
926
  let i = W("div");
961
- i.setAttribute(g, ""), i.style.position = "fixed", i.style.top = "0", i.style.left = "0", i.style.width = "0", i.style.height = "0", i.style.zIndex = "2147483000";
927
+ i.setAttribute(_, ""), i.style.position = "fixed", i.style.top = "0", i.style.left = "0", i.style.width = "0", i.style.height = "0", i.style.zIndex = "2147483000";
962
928
  let a = i.attachShadow({ mode: "open" }), o = W("style");
963
- o.textContent = Te, a.appendChild(o);
929
+ o.textContent = we, a.appendChild(o);
964
930
  let s = W("div", "root");
965
931
  a.appendChild(s);
966
932
  let c = W("button", "toggle");
@@ -971,95 +937,95 @@ var e = 30, t = 1e4, n = 50, r = 120, i = 100, a = (e) => {
971
937
  d.hidden = !0;
972
938
  let f = W("div", "grip");
973
939
  f.setAttribute("role", "separator"), f.setAttribute("aria-label", "Resize flemo devtools panel");
974
- let p = W("header", "head"), ee = W("div", "env", "—"), m = W("button", "act", Re);
975
- m.type = "button";
976
- let h = W("button", "act", "Close");
940
+ let p = W("header", "head"), m = W("div", "env", "—"), h = W("button", "act", Le);
977
941
  h.type = "button";
978
- let _ = W("button", "act", "Detach");
979
- _.type = "button";
980
- let v = W("div", "chips");
981
- p.appendChild(ee), p.appendChild(W("div", "spacer")), p.appendChild(m), p.appendChild(h), p.appendChild(_), p.appendChild(v);
982
- let y = W("div", "body"), te = W("div", "list"), b = W("div", "detail");
983
- y.appendChild(te), y.appendChild(b);
984
- let x = W("div", "foot"), S = W("details");
985
- S.appendChild(W("summary", void 0, "What this cannot see"));
986
- let ne = W("div");
987
- S.appendChild(ne), x.appendChild(S), d.appendChild(f), d.appendChild(p), d.appendChild(y), d.appendChild(x), s.appendChild(c), s.appendChild(d);
988
- let C = !1, w = e.initialOpen === !0, T = null, D = "", O = "", k = "", A = !1, j = 0, M = 0, N = (e) => Math.min(Math.max(e, Le), Math.max(Le, window.innerHeight * .9)), re = () => {
942
+ let g = W("button", "act", "Close");
943
+ g.type = "button";
944
+ let v = W("button", "act", "Detach");
945
+ v.type = "button";
946
+ let y = W("div", "chips");
947
+ p.appendChild(m), p.appendChild(W("div", "spacer")), p.appendChild(h), p.appendChild(g), p.appendChild(v), p.appendChild(y);
948
+ let b = W("div", "body"), ee = W("div", "list"), x = W("div", "detail");
949
+ b.appendChild(ee), b.appendChild(x);
950
+ let S = W("div", "foot"), C = W("details");
951
+ C.appendChild(W("summary", void 0, "What this cannot see"));
952
+ let te = W("div");
953
+ C.appendChild(te), S.appendChild(C), d.appendChild(f), d.appendChild(p), d.appendChild(b), d.appendChild(S), s.appendChild(c), s.appendChild(d);
954
+ let w = !1, T = e.initialOpen === !0, E = null, O = "", k = "", A = "", j = !1, M = 0, N = 0, P = (e) => Math.min(Math.max(e, Ie), Math.max(Ie, window.innerHeight * .9)), ne = () => {
989
955
  try {
990
- let e = sessionStorage.getItem(E);
956
+ let e = sessionStorage.getItem(D);
991
957
  if (e === null) return null;
992
958
  let t = Number.parseFloat(e);
993
959
  return Number.isFinite(t) ? t : null;
994
960
  } catch {
995
961
  return null;
996
962
  }
997
- }, ie = (e) => {
963
+ }, re = (e) => {
998
964
  try {
999
- sessionStorage.setItem(E, String(Math.round(e)));
965
+ sessionStorage.setItem(D, String(Math.round(e)));
1000
966
  } catch {}
1001
- }, P = N(re() ?? window.innerHeight * .4);
1002
- d.style.height = `${Math.round(P)}px`;
1003
- let F = () => document.querySelector(Pe) !== null, ae = () => {
967
+ }, F = P(ne() ?? window.innerHeight * .4);
968
+ d.style.height = `${Math.round(F)}px`;
969
+ let I = () => document.querySelector(Ne) !== null, L = () => {
1004
970
  try {
1005
971
  return n.report();
1006
972
  } catch {
1007
973
  return null;
1008
974
  }
1009
- }, I = (e) => {
1010
- e !== T && (T = e, R());
1011
- }, L = () => {
1012
- let e = ae(), t = e?.flights ?? [];
975
+ }, R = (e) => {
976
+ e !== E && (E = e, z());
977
+ }, ie = () => {
978
+ let e = L(), t = e?.flights ?? [];
1013
979
  K(l, String(t.length));
1014
980
  let n = t.some((e) => (e?.anomalies?.length ?? 0) > 0);
1015
- if (u.hidden = !n, d.hidden = !w, !w) return;
1016
- K(ee, Se(e));
981
+ if (u.hidden = !n, d.hidden = !T, !T) return;
982
+ K(m, xe(e));
1017
983
  let r = JSON.stringify([
1018
984
  e?.overrides?.warnings ?? [],
1019
985
  e?.anomalies ?? [],
1020
986
  e?.overrides?.active ?? {}
1021
987
  ]);
1022
- r !== k && (k = r, De(v, e)), T === null && t.length > 0 && (T = t[t.length - 1]?.id ?? null);
1023
- let i = Ce(t, T);
1024
- i !== D && (D = i, Oe(te, t, T, I));
1025
- let a = t.find((e) => e?.id === T) ?? null, o = JSON.stringify(a);
1026
- o !== O && (O = o, Me(b, a)), A || (A = !0, Ne(ne, e?.blindSpots));
988
+ r !== A && (A = r, Ee(y, e)), E === null && t.length > 0 && (E = t[t.length - 1]?.id ?? null);
989
+ let i = Se(t, E);
990
+ i !== O && (O = i, De(ee, t, E, R));
991
+ let a = t.find((e) => e?.id === E) ?? null, o = JSON.stringify(a);
992
+ o !== k && (k = o, je(x, a)), j || (j = !0, Me(te, e?.blindSpots));
1027
993
  };
1028
- function R() {
1029
- C || F() || L();
994
+ function z() {
995
+ w || I() || ie();
1030
996
  }
1031
- function oe() {
1032
- j = 0, R(), z();
997
+ function ae() {
998
+ M = 0, z(), oe();
1033
999
  }
1034
- function z() {
1035
- j = window.setTimeout(oe, w ? Fe : Ie);
1000
+ function oe() {
1001
+ M = window.setTimeout(ae, T ? Pe : Fe);
1036
1002
  }
1037
1003
  let se = () => {
1038
- window.clearTimeout(j), z();
1004
+ window.clearTimeout(M), oe();
1039
1005
  }, ce = (e) => {
1040
- w = e, se(), R();
1006
+ T = e, se(), z();
1041
1007
  };
1042
- c.addEventListener("click", () => ce(!w)), h.addEventListener("click", () => ce(!1)), _.addEventListener("click", () => de());
1043
- let le = () => {
1044
- if (!C) {
1045
- if (F()) {
1046
- window.clearTimeout(M), M = window.setTimeout(le, Fe);
1008
+ c.addEventListener("click", () => ce(!T)), g.addEventListener("click", () => ce(!1)), v.addEventListener("click", () => de());
1009
+ let B = () => {
1010
+ if (!w) {
1011
+ if (I()) {
1012
+ window.clearTimeout(N), N = window.setTimeout(B, Pe);
1047
1013
  return;
1048
1014
  }
1049
- K(m, "Copied ✓"), window.clearTimeout(M), M = window.setTimeout(B, 1200);
1015
+ K(h, "Copied ✓"), window.clearTimeout(N), N = window.setTimeout(V, 1200);
1050
1016
  }
1051
1017
  };
1052
- function B() {
1053
- if (F()) {
1054
- M = window.setTimeout(B, Fe);
1018
+ function V() {
1019
+ if (I()) {
1020
+ N = window.setTimeout(V, Pe);
1055
1021
  return;
1056
1022
  }
1057
- M = 0, K(m, Re);
1023
+ N = 0, K(h, Le);
1058
1024
  }
1059
- let V = (e) => {
1060
- if (C) return;
1061
- if (F()) {
1062
- window.clearTimeout(M), M = window.setTimeout(() => V(e), Fe);
1025
+ let le = (e) => {
1026
+ if (w) return;
1027
+ if (I()) {
1028
+ window.clearTimeout(N), N = window.setTimeout(() => le(e), Pe);
1063
1029
  return;
1064
1030
  }
1065
1031
  let t = W("textarea");
@@ -1068,30 +1034,30 @@ var e = 30, t = 1e4, n = 50, r = 120, i = 100, a = (e) => {
1068
1034
  try {
1069
1035
  n.execCommand?.("copy");
1070
1036
  } catch {}
1071
- t.remove(), le();
1037
+ t.remove(), B();
1072
1038
  };
1073
- m.addEventListener("click", () => {
1074
- let e = JSON.stringify(ae(), null, 2), t = navigator.clipboard;
1039
+ h.addEventListener("click", () => {
1040
+ let e = JSON.stringify(L(), null, 2), t = navigator.clipboard;
1075
1041
  if (t && typeof t.writeText == "function") {
1076
- t.writeText(e).then(le, () => V(e));
1042
+ t.writeText(e).then(B, () => le(e));
1077
1043
  return;
1078
1044
  }
1079
- V(e);
1045
+ le(e);
1080
1046
  });
1081
- let ue = (e) => {
1082
- P = N(window.innerHeight - e.clientY), d.style.height = `${Math.round(P)}px`;
1083
- }, H = () => {
1084
- window.removeEventListener("pointermove", ue), window.removeEventListener("pointerup", H), ie(P);
1047
+ let H = (e) => {
1048
+ F = P(window.innerHeight - e.clientY), d.style.height = `${Math.round(F)}px`;
1049
+ }, ue = () => {
1050
+ window.removeEventListener("pointermove", H), window.removeEventListener("pointerup", ue), re(F);
1085
1051
  };
1086
1052
  f.addEventListener("pointerdown", (e) => {
1087
- e.preventDefault(), window.addEventListener("pointermove", ue), window.addEventListener("pointerup", H);
1053
+ e.preventDefault(), window.addEventListener("pointermove", H), window.addEventListener("pointerup", ue);
1088
1054
  });
1089
1055
  function de() {
1090
- C || (C = !0, window.clearTimeout(j), j = 0, window.clearTimeout(M), M = 0, window.removeEventListener("pointermove", ue), window.removeEventListener("pointerup", H), i.remove(), t && n.detach(), Be = null);
1056
+ w || (w = !0, window.clearTimeout(M), M = 0, window.clearTimeout(N), N = 0, window.removeEventListener("pointermove", H), window.removeEventListener("pointerup", ue), i.remove(), t && n.detach(), ze = null);
1091
1057
  }
1092
- document.body.appendChild(i), R(), z();
1058
+ document.body.appendChild(i), z(), oe();
1093
1059
  let fe = { detach: de };
1094
- return Be = fe, fe;
1060
+ return ze = fe, fe;
1095
1061
  };
1096
1062
  //#endregion
1097
- export { s as BLIND_SPOTS, O as CORE_FLAGS, D as DEVTOOLS_OWNED_FLAGS, k as FLAG_REGISTRY, e as LONG_GAP_MS, i as MID_FLIGHT_TASK_MS, n as OPENING_WINDOW_LEAD_MS, r as OPENING_WINDOW_TAIL_MS, E as PANEL_HEIGHT_KEY, le as REPORT_SCHEMA_VERSION, A as RETIRED_FLAGS, j as RETIRED_MARKER, t as STUCK_STATUS_MS, Ve as attachDevtoolsPanel, ve as attachFlightRecorder, w as captureEnvironment, z as classifyDriver, R as computeFrameStats, L as computePhaseStats, oe as computePlayerGapStats, a as deriveFlightAnomalies, ae as deriveOverrideWarnings, o as deriveReportAnomalies, x as detectEngine, S as isEmulationSuspected, se as kindFromStatus, ce as parseTranslateX, ne as sampleRafCadence, F as snapshotOverrides };
1063
+ export { s as BLIND_SPOTS, k as CORE_FLAGS, O as DEVTOOLS_OWNED_FLAGS, A as FLAG_REGISTRY, e as LONG_GAP_MS, i as MID_FLIGHT_TASK_MS, n as OPENING_WINDOW_LEAD_MS, r as OPENING_WINDOW_TAIL_MS, D as PANEL_HEIGHT_KEY, ce as REPORT_SCHEMA_VERSION, j as RETIRED_FLAGS, M as RETIRED_MARKER, t as STUCK_STATUS_MS, Be as attachDevtoolsPanel, _e as attachFlightRecorder, T as captureEnvironment, ae as classifyDriver, ie as computeFrameStats, R as computePhaseStats, z as computePlayerGapStats, a as deriveFlightAnomalies, I as deriveOverrideWarnings, o as deriveReportAnomalies, S as detectEngine, C as isEmulationSuspected, oe as kindFromStatus, se as parseTranslateX, te as sampleRafCadence, F as snapshotOverrides };