@wyxos/vibe 3.1.6 → 3.1.8

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/lib/index.js CHANGED
@@ -1,10 +1,10 @@
1
- import { Comment as e, Fragment as t, Text as n, Transition as r, computed as i, createBlock as a, createCommentVNode as o, createElementBlock as s, createElementVNode as c, createSlots as l, createVNode as u, defineComponent as d, guardReactiveProps as f, h as p, isVNode as m, mergeProps as h, nextTick as g, normalizeClass as _, normalizeProps as v, normalizeStyle as y, onBeforeUnmount as b, onMounted as x, openBlock as S, reactive as C, readonly as w, ref as T, renderList as E, renderSlot as D, resolveDynamicComponent as O, toDisplayString as k, toRef as A, unref as j, useAttrs as M, useSlots as N, vShow as P, watch as F, watchEffect as I, withCtx as L, withDirectives as R, withModifiers as z } from "vue";
1
+ import { Comment as e, Fragment as t, Text as n, Transition as r, computed as i, createBlock as a, createCommentVNode as o, createElementBlock as s, createElementVNode as c, createSlots as l, createVNode as u, defineComponent as d, getCurrentScope as f, guardReactiveProps as p, h as m, isVNode as h, mergeProps as g, nextTick as _, normalizeClass as v, normalizeProps as y, normalizeStyle as b, onBeforeUnmount as x, onMounted as S, onScopeDispose as C, openBlock as w, reactive as T, readonly as E, ref as D, renderList as ee, renderSlot as O, resolveDynamicComponent as k, toDisplayString as A, toRef as j, unref as M, useAttrs as N, useSlots as P, vShow as F, watch as I, watchEffect as L, withCtx as R, withDirectives as z, withModifiers as te } from "vue";
2
2
  //#region node_modules/lucide-vue-next/dist/esm/shared/src/utils/hasA11yProp.js
3
3
  var B = (e) => {
4
4
  for (let t in e) if (t.startsWith("aria-") || t === "role" || t === "title") return !0;
5
5
  return !1;
6
- }, ee = (e) => e === "", V = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e) === t).join(" ").trim(), H = (e) => e.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase(), U = (e) => e.replace(/^([A-Z])|[\s-_]+(\w)/g, (e, t, n) => n ? n.toUpperCase() : t.toLowerCase()), W = (e) => {
7
- let t = U(e);
6
+ }, V = (e) => e === "", H = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e) === t).join(" ").trim(), U = (e) => e.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase(), W = (e) => e.replace(/^([A-Z])|[\s-_]+(\w)/g, (e, t, n) => n ? n.toUpperCase() : t.toLowerCase()), ne = (e) => {
7
+ let t = W(e);
8
8
  return t.charAt(0).toUpperCase() + t.slice(1);
9
9
  }, G = {
10
10
  xmlns: "http://www.w3.org/2000/svg",
@@ -16,27 +16,27 @@ var B = (e) => {
16
16
  "stroke-width": 2,
17
17
  "stroke-linecap": "round",
18
18
  "stroke-linejoin": "round"
19
- }, te = ({ name: e, iconNode: t, absoluteStrokeWidth: n, "absolute-stroke-width": r, strokeWidth: i, "stroke-width": a, size: o = G.width, color: s = G.stroke, ...c }, { slots: l }) => p("svg", {
19
+ }, K = ({ name: e, iconNode: t, absoluteStrokeWidth: n, "absolute-stroke-width": r, strokeWidth: i, "stroke-width": a, size: o = G.width, color: s = G.stroke, ...c }, { slots: l }) => m("svg", {
20
20
  ...G,
21
21
  ...c,
22
22
  width: o,
23
23
  height: o,
24
24
  stroke: s,
25
- "stroke-width": ee(n) || ee(r) || n === !0 || r === !0 ? Number(i || a || G["stroke-width"]) * 24 / Number(o) : i || a || G["stroke-width"],
26
- class: V("lucide", c.class, ...e ? [`lucide-${H(W(e))}-icon`, `lucide-${H(e)}`] : ["lucide-icon"]),
25
+ "stroke-width": V(n) || V(r) || n === !0 || r === !0 ? Number(i || a || G["stroke-width"]) * 24 / Number(o) : i || a || G["stroke-width"],
26
+ class: H("lucide", c.class, ...e ? [`lucide-${U(ne(e))}-icon`, `lucide-${U(e)}`] : ["lucide-icon"]),
27
27
  ...!l.default && !B(c) && { "aria-hidden": "true" }
28
- }, [...t.map((e) => p(...e)), ...l.default ? [l.default()] : []]), K = (e, t) => (n, { slots: r, attrs: i }) => p(te, {
28
+ }, [...t.map((e) => m(...e)), ...l.default ? [l.default()] : []]), q = (e, t) => (n, { slots: r, attrs: i }) => m(K, {
29
29
  ...i,
30
30
  ...n,
31
31
  iconNode: t,
32
32
  name: e
33
- }, r), q = K("arrow-left", [["path", {
33
+ }, r), re = q("arrow-left", [["path", {
34
34
  d: "m12 19-7-7 7-7",
35
35
  key: "1l729n"
36
36
  }], ["path", {
37
37
  d: "M19 12H5",
38
38
  key: "x3x0zl"
39
- }]]), J = K("audio-lines", [
39
+ }]]), J = q("audio-lines", [
40
40
  ["path", {
41
41
  d: "M2 10v3",
42
42
  key: "1fnikh"
@@ -61,7 +61,7 @@ var B = (e) => {
61
61
  d: "M22 10v3",
62
62
  key: "154ddg"
63
63
  }]
64
- ]), ne = K("clapperboard", [
64
+ ]), Y = q("clapperboard", [
65
65
  ["path", {
66
66
  d: "m12.296 3.464 3.02 3.956",
67
67
  key: "qash78"
@@ -78,13 +78,13 @@ var B = (e) => {
78
78
  d: "m6.18 5.276 3.1 3.899",
79
79
  key: "zjj9t3"
80
80
  }]
81
- ]), Y = K("file", [["path", {
81
+ ]), ie = q("file", [["path", {
82
82
  d: "M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",
83
83
  key: "1oefj6"
84
84
  }], ["path", {
85
85
  d: "M14 2v5a1 1 0 0 0 1 1h5",
86
86
  key: "wfsgrz"
87
- }]]), X = K("image-plus", [
87
+ }]]), ae = q("image-plus", [
88
88
  ["path", {
89
89
  d: "M16 5h6",
90
90
  key: "1vod17"
@@ -107,10 +107,10 @@ var B = (e) => {
107
107
  r: "2",
108
108
  key: "af1f0g"
109
109
  }]
110
- ]), re = K("loader-circle", [["path", {
110
+ ]), oe = q("loader-circle", [["path", {
111
111
  d: "M21 12a9 9 0 1 1-6.219-8.56",
112
112
  key: "13zald"
113
- }]]), ie = K("pause", [["rect", {
113
+ }]]), se = q("pause", [["rect", {
114
114
  x: "14",
115
115
  y: "3",
116
116
  width: "5",
@@ -124,10 +124,10 @@ var B = (e) => {
124
124
  height: "18",
125
125
  rx: "1",
126
126
  key: "1wsw3u"
127
- }]]), ae = K("play", [["path", {
127
+ }]]), ce = q("play", [["path", {
128
128
  d: "M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z",
129
129
  key: "10ikf1"
130
- }]]), oe = K("triangle-alert", [
130
+ }]]), le = q("triangle-alert", [
131
131
  ["path", {
132
132
  d: "m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",
133
133
  key: "wmoenq"
@@ -140,13 +140,13 @@ var B = (e) => {
140
140
  d: "M12 17h.01",
141
141
  key: "p32p05"
142
142
  }]
143
- ]), se = K("volume-1", [["path", {
143
+ ]), X = q("volume-1", [["path", {
144
144
  d: "M11 4.702a.705.705 0 0 0-1.203-.498L6.413 7.587A1.4 1.4 0 0 1 5.416 8H3a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2.416a1.4 1.4 0 0 1 .997.413l3.383 3.384A.705.705 0 0 0 11 19.298z",
145
145
  key: "uqj9uw"
146
146
  }], ["path", {
147
147
  d: "M16 9a5 5 0 0 1 0 6",
148
148
  key: "1q6k2b"
149
- }]]), ce = K("volume-2", [
149
+ }]]), ue = q("volume-2", [
150
150
  ["path", {
151
151
  d: "M11 4.702a.705.705 0 0 0-1.203-.498L6.413 7.587A1.4 1.4 0 0 1 5.416 8H3a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2.416a1.4 1.4 0 0 1 .997.413l3.383 3.384A.705.705 0 0 0 11 19.298z",
152
152
  key: "uqj9uw"
@@ -159,7 +159,7 @@ var B = (e) => {
159
159
  d: "M19.364 18.364a9 9 0 0 0 0-12.728",
160
160
  key: "ijwkga"
161
161
  }]
162
- ]), Z = K("volume-x", [
162
+ ]), de = q("volume-x", [
163
163
  ["path", {
164
164
  d: "M11 4.702a.705.705 0 0 0-1.203-.498L6.413 7.587A1.4 1.4 0 0 1 5.416 8H3a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2.416a1.4 1.4 0 0 1 .997.413l3.383 3.384A.705.705 0 0 0 11 19.298z",
165
165
  key: "uqj9uw"
@@ -179,13 +179,13 @@ var B = (e) => {
179
179
  key: "5ykzw1"
180
180
  }]
181
181
  ]);
182
- function le(e, t = 150) {
183
- return de(e, (e) => `${e.surface}|${e.occurrenceKey}|${e.url}|${e.kind}`, t);
182
+ function Z(e, t = 150) {
183
+ return pe(e, (e) => `${e.surface}|${e.occurrenceKey}|${e.url}|${e.kind}`, t);
184
184
  }
185
- function ue(e, t = 150) {
186
- return de(e, (e) => `${e.surface}|${e.occurrenceKey}|${e.url}`, t);
185
+ function fe(e, t = 150) {
186
+ return pe(e, (e) => `${e.surface}|${e.occurrenceKey}|${e.url}`, t);
187
187
  }
188
- function de(e, t, n) {
188
+ function pe(e, t, n) {
189
189
  let r = [], i = /* @__PURE__ */ new Set(), a = null;
190
190
  function o(e) {
191
191
  let o = t(e);
@@ -209,41 +209,41 @@ function de(e, t, n) {
209
209
  }
210
210
  //#endregion
211
211
  //#region src/components/viewer-core/dom.ts
212
- function Q(e) {
212
+ function me(e) {
213
213
  return e instanceof HTMLElement && [
214
214
  "INPUT",
215
215
  "TEXTAREA",
216
216
  "SELECT"
217
217
  ].includes(e.tagName);
218
218
  }
219
- function fe(e) {
219
+ function he(e) {
220
220
  return e instanceof HTMLElement && !!e.closest("[data-swipe-lock], input, textarea, select, a");
221
221
  }
222
- function pe(e) {
222
+ function ge(e) {
223
223
  return e === "filling" || e === "initializing" || e === "loading" || e === "refreshing";
224
224
  }
225
- function me(e) {
225
+ function _e(e) {
226
226
  return !e || !Number.isFinite(e) || e < 1 ? 25 : Math.floor(e);
227
227
  }
228
- function he(e) {
228
+ function ve(e) {
229
229
  return e ?? "__vibe_initial_cursor__";
230
230
  }
231
- function ge(e, t, n) {
231
+ function Q(e, t, n) {
232
232
  return Math.min(Math.max(e, t), n);
233
233
  }
234
234
  //#endregion
235
235
  //#region src/components/viewer-core/removalState.ts
236
- function _e() {
237
- let e = T(/* @__PURE__ */ new Set()), t = T([]);
236
+ function ye() {
237
+ let e = D(/* @__PURE__ */ new Set()), t = D([]);
238
238
  function n(n) {
239
- let r = ve(n).filter((t) => !e.value.has(t));
239
+ let r = be(n).filter((t) => !e.value.has(t));
240
240
  if (!r.length) return { ids: [] };
241
241
  let i = new Set(e.value);
242
242
  for (let e of r) i.add(e);
243
243
  return e.value = i, t.value = [...t.value, r], { ids: r };
244
244
  }
245
245
  function r(t) {
246
- let n = ve(t).filter((t) => e.value.has(t));
246
+ let n = be(t).filter((t) => e.value.has(t));
247
247
  if (!n.length) return { ids: [] };
248
248
  let r = new Set(e.value);
249
249
  for (let e of n) r.delete(e);
@@ -274,18 +274,18 @@ function _e() {
274
274
  undo: i
275
275
  };
276
276
  }
277
- function ve(e) {
277
+ function be(e) {
278
278
  let t = Array.isArray(e) ? e : [e];
279
279
  return Array.from(new Set(t.filter((e) => typeof e == "string" && e.length > 0)));
280
280
  }
281
281
  //#endregion
282
282
  //#region src/components/viewer-core/itemIdentity.ts
283
- var ye = "__vibeOccurrenceKey";
283
+ var xe = "__vibeOccurrenceKey";
284
284
  function $(e) {
285
- let t = e[ye];
285
+ let t = e[xe];
286
286
  return typeof t == "string" && t.length > 0 ? t : e.id;
287
287
  }
288
- function be(e, t, n) {
288
+ function Se(e, t, n) {
289
289
  let r = /* @__PURE__ */ new Map(), i = [], a = n;
290
290
  for (let e of t) {
291
291
  let t = r.get(e.id), n = $(e);
@@ -293,49 +293,49 @@ function be(e, t, n) {
293
293
  }
294
294
  for (let t of e) {
295
295
  let e = r.get(t.id)?.shift() ?? `vibe-occurrence-${a += 1}`;
296
- i.push(xe(t, e));
296
+ i.push(Ce(t, e));
297
297
  }
298
298
  return {
299
299
  items: i,
300
300
  nextSequence: a
301
301
  };
302
302
  }
303
- function xe(e, t) {
303
+ function Ce(e, t) {
304
304
  return $(e) === t ? e : {
305
305
  ...e,
306
- [ye]: t
306
+ [xe]: t
307
307
  };
308
308
  }
309
309
  //#endregion
310
310
  //#region src/components/viewer-core/autoBuckets.ts
311
- function Se(e) {
311
+ function we(e) {
312
312
  return e.flatMap((e) => e.items);
313
313
  }
314
- function Ce(e, t) {
314
+ function Te(e, t) {
315
315
  return t.size ? e.filter((e) => !t.has(e.id)) : e;
316
316
  }
317
- function we(e, t) {
318
- return Ce(e.items, t);
317
+ function Ee(e, t) {
318
+ return Te(e.items, t);
319
319
  }
320
- function Te(e, t) {
321
- return we(e, t).length;
320
+ function De(e, t) {
321
+ return Ee(e, t).length;
322
322
  }
323
- function Ee(e, t, n) {
323
+ function Oe(e, t, n) {
324
324
  if (n < 0) return null;
325
325
  let r = 0;
326
326
  for (let i of e) {
327
- let e = we(i, t), a = r + e.length;
327
+ let e = Ee(i, t), a = r + e.length;
328
328
  if (n < a) return i.cursor;
329
329
  r = a;
330
330
  }
331
331
  return null;
332
332
  }
333
- function De(e, t, n) {
333
+ function ke(e, t, n) {
334
334
  let r = [...e], i = r.findIndex((e) => e.cursor === t);
335
335
  return i >= 0 && r.splice(i, 1, n), r;
336
336
  }
337
- function Oe(e, t, n) {
338
- let r = be(e, t, n);
337
+ function Ae(e, t, n) {
338
+ let r = Se(e, t, n);
339
339
  return {
340
340
  items: r.items,
341
341
  nextSequence: r.nextSequence
@@ -343,11 +343,11 @@ function Oe(e, t, n) {
343
343
  }
344
344
  //#endregion
345
345
  //#region src/components/viewer-core/autoResolveState.ts
346
- function ke(e) {
346
+ function je(e) {
347
347
  return e instanceof DOMException && e.name === "AbortError" || e instanceof Error && (e.name === "AbortError" || e.name === "CanceledError") ? !0 : typeof e == "object" && !!e && "code" in e && e.code === "ERR_CANCELED";
348
348
  }
349
- function Ae(e) {
350
- let t = Oe(e.nextItems, e.previousItems, e.sequence);
349
+ function Me(e) {
350
+ let t = Ae(e.nextItems, e.previousItems, e.sequence);
351
351
  return {
352
352
  bucket: {
353
353
  cursor: e.cursor,
@@ -358,7 +358,7 @@ function Ae(e) {
358
358
  nextSequence: t.nextSequence
359
359
  };
360
360
  }
361
- function je(e, t, n, r) {
361
+ function Ne(e, t, n, r) {
362
362
  if (!e.length) return r ? null : {
363
363
  buckets: [],
364
364
  canceled: r,
@@ -368,47 +368,47 @@ function je(e, t, n, r) {
368
368
  return {
369
369
  buckets: i,
370
370
  canceled: r,
371
- visibleCount: i.reduce((e, t) => e + Te(t, n), 0)
371
+ visibleCount: i.reduce((e, t) => e + De(t, n), 0)
372
372
  };
373
373
  }
374
- function Me(e) {
375
- let t = Ae({
374
+ function Pe(e) {
375
+ let t = Me({
376
376
  cursor: e.initialState.cursor,
377
377
  nextCursor: e.initialState.nextCursor ?? null,
378
378
  nextItems: e.initialState.items,
379
379
  previousCursor: e.initialState.previousCursor ?? null,
380
380
  previousItems: [],
381
381
  sequence: e.sequence
382
- }), n = Ce(t.bucket.items, e.removedIds);
382
+ }), n = Te(t.bucket.items, e.removedIds);
383
383
  return {
384
- activeIndex: ge(e.initialState.activeIndex ?? 0, 0, Math.max(0, n.length - 1)),
384
+ activeIndex: Q(e.initialState.activeIndex ?? 0, 0, Math.max(0, n.length - 1)),
385
385
  buckets: [t.bucket],
386
386
  nextSequence: t.nextSequence
387
387
  };
388
388
  }
389
- function Ne(e, t) {
390
- let n = e[ge(t, 0, Math.max(0, e.length - 1))];
389
+ function Fe(e, t) {
390
+ let n = e[Q(t, 0, Math.max(0, e.length - 1))];
391
391
  return n ? $(n) : null;
392
392
  }
393
- function Pe(e, t, n = null) {
393
+ function Ie(e, t, n = null) {
394
394
  if (!e.length) return 0;
395
395
  let r = n ? e.findIndex((e) => $(e) === n) : -1;
396
- return r >= 0 ? r : ge(t, 0, e.length - 1);
396
+ return r >= 0 ? r : Q(t, 0, e.length - 1);
397
397
  }
398
- function Fe(e, t, n) {
399
- return e ? Te(e, t) < n : !1;
398
+ function Le(e, t, n) {
399
+ return e ? De(e, t) < n : !1;
400
400
  }
401
401
  //#endregion
402
402
  //#region src/components/viewer-core/fillDelay.ts
403
- var Ie = 2e3, Le = 1e3, Re = 100;
404
- function ze(e, t = Ie, n = Le) {
403
+ var Re = 2e3, ze = 1e3, Be = 100;
404
+ function Ve(e, t = Re, n = ze) {
405
405
  return t + Math.max(0, e - 1) * n;
406
406
  }
407
- function Be(e, t) {
407
+ function He(e, t) {
408
408
  return !Number.isFinite(e) || e == null || e < 0 ? t : Math.floor(e);
409
409
  }
410
- function Ve() {
411
- let e = T(null), t = null, n = null, r = null;
410
+ function Ue() {
411
+ let e = D(null), t = null, n = null, r = null;
412
412
  function i(i = !1) {
413
413
  if (t &&= (clearInterval(t), null), n &&= (clearTimeout(n), null), e.value = null, i && r) {
414
414
  let e = r;
@@ -425,7 +425,7 @@ function Ve() {
425
425
  let t = Math.max(0, a - (Date.now() - s));
426
426
  e.value = t, t <= 0 && l();
427
427
  };
428
- t = setInterval(u, Re), n = setTimeout(l, a), u();
428
+ t = setInterval(u, Be), n = setTimeout(l, a), u();
429
429
  }));
430
430
  }
431
431
  return {
@@ -436,110 +436,118 @@ function Ve() {
436
436
  }
437
437
  //#endregion
438
438
  //#region src/components/viewer-core/useAutoResolveSource.ts
439
- function He(e) {
440
- let t = !!e.initialState?.items.length, n = T([]), r = T(0), a = T([]), o = T(!1), s = T(null), c = T(!t && typeof e.resolve == "function" ? "initializing" : "idle"), l = T(null), u = Ve(), d = u.remainingMs, f = T(null), p = T(!1), m = T(!0), h = T(!1), g = /* @__PURE__ */ new Set(), _ = null, v = null, y = 0, S = 0, C = i(() => Be(e.fillDelayMs, Ie)), w = i(() => Be(e.fillDelayStepMs, Le)), E = i(() => typeof e.resolve == "function"), D = i(() => e.mode ?? "dynamic"), O = i(() => me(e.pageSize)), k = i(() => Se(n.value)), A = i(() => Ce(k.value, e.removedIds.value)), j = i(() => r.value), M = i(() => pe(c.value) || p.value), N = i(() => Ue(n.value, e.removedIds.value)), P = i(() => We(n.value, e.removedIds.value)), I = i(() => P.value?.nextCursor ?? null), L = i(() => o.value ? null : N.value?.previousCursor ?? null), R = i(() => !!I.value), z = i(() => !!L.value), B = i(() => E.value && n.value.length > 0), ee = i(() => Ce(Se(a.value), e.removedIds.value)), V = i(() => Ee(n.value, e.removedIds.value, j.value)), H = i(() => !A.value.length && !M.value && !!s.value);
441
- F(() => A.value.length, (e) => {
439
+ function We(e) {
440
+ let t = !!e.initialState?.items.length, n = D([]), r = D(0), a = D([]), o = D(!1), s = D(null), c = D(!t && typeof e.resolve == "function" ? "initializing" : "idle"), l = D(null), u = Ue(), d = u.remainingMs, f = D(null), p = D(!1), m = D(!0), h = D(!1), g = /* @__PURE__ */ new Set(), _ = null, v = null, y = 0, b = 0, C = i(() => He(e.fillDelayMs, Re)), w = i(() => He(e.fillDelayStepMs, ze)), T = i(() => typeof e.resolve == "function"), E = i(() => _e(e.pageSize)), ee = i(() => we(n.value)), O = i(() => Te(ee.value, e.removedIds.value)), k = i(() => r.value), A = i(() => ge(c.value) || p.value), j = i(() => Ge(n.value, e.removedIds.value)), M = i(() => Ke(n.value, e.removedIds.value)), N = i(() => M.value?.nextCursor ?? null), P = i(() => o.value ? null : j.value?.previousCursor ?? null), F = i(() => !!N.value), L = i(() => !!P.value), R = i(() => T.value && n.value.length > 0), z = i(() => Te(we(a.value), e.removedIds.value)), te = i(() => Oe(n.value, e.removedIds.value, k.value)), B = i(() => !O.value.length && !A.value && !!s.value);
441
+ I(() => O.value.length, (e) => {
442
442
  if (e === 0) {
443
443
  r.value = 0;
444
444
  return;
445
445
  }
446
- o.value &&= (ye(), !1), r.value > e - 1 && (r.value = e - 1);
447
- }), F(() => r.value, () => {
446
+ o.value &&= (he(), !1), r.value > e - 1 && (r.value = e - 1);
447
+ }), I(() => r.value, () => {
448
448
  m.value && se();
449
+ }), S(() => {
450
+ fe() || e.resolve && V();
449
451
  }), x(() => {
450
- fe() || e.resolve && U();
451
- }), b(() => {
452
452
  _?.abort(), _ = null, u.clear(!0);
453
453
  });
454
- async function U() {
455
- v = U;
454
+ async function V() {
455
+ v = V;
456
456
  let t = await ue({
457
- continueUntilFilled: D.value === "dynamic",
457
+ continueUntilFilled: !0,
458
458
  cursor: e.initialCursor ?? null,
459
459
  direction: "forward",
460
460
  phase: "initializing"
461
461
  });
462
- t && (n.value = t.buckets, r.value = 0, Q());
463
- }
464
- async function W() {
465
- if (!(h.value || M.value)) {
466
- if (!R.value) return B.value ? le("trailing") : void 0;
467
- if (D.value === "static" && ve("trailing")) return le("trailing");
468
- await ce(I.value);
462
+ t && (n.value = t.buckets, r.value = 0, Z());
463
+ }
464
+ async function H() {
465
+ if (!(h.value || A.value)) {
466
+ if (me("trailing") || !F.value) {
467
+ if (!R.value) return;
468
+ let e = await X("trailing");
469
+ e?.itemsLoaded === 0 && e.followCursor && await ce(e.followCursor);
470
+ return;
471
+ }
472
+ await ce(N.value);
469
473
  }
470
474
  }
471
- async function G() {
472
- if (!(h.value || !z.value || M.value)) {
473
- if (D.value === "static" && ve("leading")) return le("leading");
474
- await Z(L.value);
475
+ async function U() {
476
+ if (!(h.value || !L.value || A.value)) {
477
+ if (me("leading")) {
478
+ let e = await X("leading");
479
+ e?.itemsLoaded === 0 && e.followCursor && await le(e.followCursor);
480
+ return;
481
+ }
482
+ await le(P.value);
475
483
  }
476
484
  }
477
- async function te() {
478
- if (H.value) {
479
- if (n.value = [], r.value = 0, a.value = [], o.value = !1, s.value = null, c.value = E.value ? "initializing" : "idle", l.value = null, f.value = null, p.value = !1, g.clear(), _?.abort(), _ = null, u.clear(!0), fe()) {
480
- Q();
485
+ async function W() {
486
+ if (B.value) {
487
+ if (n.value = [], r.value = 0, a.value = [], o.value = !1, s.value = null, c.value = T.value ? "initializing" : "idle", l.value = null, f.value = null, p.value = !1, g.clear(), _?.abort(), _ = null, u.clear(!0), fe()) {
488
+ Z();
481
489
  return;
482
490
  }
483
- await U();
491
+ await V();
484
492
  }
485
493
  }
486
- async function K() {
487
- if (H.value) return te();
494
+ async function ne() {
495
+ if (B.value) return W();
488
496
  h.value || c.value !== "failed" || !v || (s.value = null, await v());
489
497
  }
490
- async function q() {
491
- if (!a.value.length) return p.value = !1, Q();
492
- n.value = [...n.value, ...a.value], a.value = [], p.value = !1, Q();
498
+ async function G() {
499
+ if (!a.value.length) return p.value = !1, Z();
500
+ n.value = [...n.value, ...a.value], a.value = [], p.value = !1, Z();
493
501
  }
494
- function J(t) {
495
- let n = A.value;
502
+ function K(t) {
503
+ let n = O.value;
496
504
  if (!n.length) return;
497
- let i = ge(t, 0, n.length - 1);
505
+ let i = Q(t, 0, n.length - 1);
498
506
  i !== r.value && (r.value = i, e.emit("update:activeIndex", i));
499
507
  }
500
- function ne(e) {
508
+ function q(e) {
501
509
  m.value = e;
502
510
  }
503
- function Y() {
511
+ function re() {
504
512
  h.value = !0, u.clear(!0);
505
513
  }
506
- function X() {
514
+ function J() {
507
515
  h.value = !1;
508
516
  }
509
- function re() {
510
- y += 1, _?.abort(), _ = null, u.clear(!0), g.clear(), s.value = null, l.value = null, f.value = null, a.value.length > 0 && (n.value = [...n.value, ...a.value], a.value = []), p.value = !1, o.value = !1, Q();
517
+ function Y() {
518
+ y += 1, _?.abort(), _ = null, u.clear(!0), g.clear(), s.value = null, l.value = null, f.value = null, a.value.length > 0 && (n.value = [...n.value, ...a.value], a.value = []), p.value = !1, o.value = !1, Z();
511
519
  }
512
520
  function ie() {
513
- return Ne(A.value, j.value);
521
+ return Fe(O.value, k.value);
514
522
  }
515
523
  function ae(e = null, t = {}) {
516
- if (A.value.length === 0) {
524
+ if (O.value.length === 0) {
517
525
  r.value = 0, !t.preserveTrailingPlaceholder && n.value.length > 0 && (o.value = !0);
518
526
  return;
519
527
  }
520
528
  if (e) {
521
- let t = A.value.findIndex((t) => $(t) === e);
529
+ let t = O.value.findIndex((t) => $(t) === e);
522
530
  if (t >= 0) {
523
531
  r.value = t;
524
532
  return;
525
533
  }
526
534
  }
527
- if (t.preserveTrailingPlaceholder && r.value >= A.value.length) {
528
- r.value = A.value.length;
535
+ if (t.preserveTrailingPlaceholder && r.value >= O.value.length) {
536
+ r.value = O.value.length;
529
537
  return;
530
538
  }
531
- r.value = Pe(A.value, j.value, e);
539
+ r.value = Ie(O.value, k.value, e);
532
540
  }
533
541
  function oe() {
534
- a.value.length > 0 && !ee.value.length && q();
542
+ a.value.length > 0 && !z.value.length && G();
535
543
  }
536
544
  async function se() {
537
- if (!(!m.value || _e())) {
538
- if (!A.value.length) {
539
- R.value && await W();
545
+ if (!(!m.value || pe())) {
546
+ if (!O.value.length) {
547
+ F.value && await H();
540
548
  return;
541
549
  }
542
- z.value && r.value < 3 && await G(), R.value && r.value >= A.value.length - 3 && await W();
550
+ L.value && r.value < 3 && await U(), F.value && r.value >= O.value.length - 3 && await H();
543
551
  }
544
552
  }
545
553
  async function ce(e) {
@@ -547,63 +555,62 @@ function He(e) {
547
555
  await ce(e);
548
556
  };
549
557
  let t = await ue({
550
- continueUntilFilled: D.value === "dynamic",
558
+ continueUntilFilled: !0,
551
559
  cursor: e,
552
560
  direction: "forward",
553
561
  phase: "loading"
554
562
  });
555
563
  if (t) {
556
- if (t.canceled) return n.value = [...n.value, ...t.buckets], a.value = [], p.value = !1, Q();
557
- if (a.value = t.buckets, !ee.value.length) return n.value = [...n.value, ...a.value], a.value = [], p.value = !1, Q();
564
+ if (t.canceled) return n.value = [...n.value, ...t.buckets], a.value = [], p.value = !1, Z();
565
+ if (a.value = t.buckets, !z.value.length) return n.value = [...n.value, ...a.value], a.value = [], p.value = !1, Z();
558
566
  p.value = !0;
559
567
  }
560
568
  }
561
- async function Z(e) {
569
+ async function le(e) {
562
570
  v = async () => {
563
- await Z(e);
571
+ await le(e);
564
572
  };
565
573
  let t = await ue({
566
- continueUntilFilled: D.value === "dynamic",
574
+ continueUntilFilled: !0,
567
575
  cursor: e,
568
576
  direction: "backward",
569
577
  phase: "loading"
570
578
  });
571
579
  if (!t) return;
572
580
  let r = ie();
573
- n.value = [...t.buckets, ...n.value], ae(r), Q();
581
+ n.value = [...t.buckets, ...n.value], ae(r), Z();
574
582
  }
575
- async function le(t) {
583
+ async function X(t) {
576
584
  if (v = async () => {
577
- await le(t);
578
- }, !e.resolve) return;
579
- let r = t === "leading" ? N.value : P.value;
580
- if (!r) return;
581
- let i = he(r.cursor);
582
- if (g.has(i)) return;
585
+ await X(t);
586
+ }, !e.resolve) return null;
587
+ let r = t === "leading" ? j.value : M.value;
588
+ if (!r) return null;
589
+ let i = ve(r.cursor);
590
+ if (g.has(i)) return null;
583
591
  g.add(i), s.value = null, c.value = "refreshing", l.value = null, f.value = null;
584
592
  let a = ++y, o = typeof AbortController > "u" ? null : new AbortController();
585
593
  _ = o;
586
594
  try {
587
- let t = await e.resolve({
595
+ let i = await e.resolve({
588
596
  cursor: r.cursor,
589
- pageSize: O.value,
597
+ pageSize: E.value,
590
598
  signal: o?.signal
591
599
  });
592
- if (a !== y) return Q();
593
- let i = de({
600
+ if (a !== y) return Z(), null;
601
+ let s = de({
594
602
  cursor: r.cursor,
595
- nextCursor: t.nextPage,
596
- nextItems: t.items,
597
- previousCursor: t.previousPage ?? null,
603
+ nextCursor: i.nextPage,
604
+ nextItems: i.items,
605
+ previousCursor: i.previousPage ?? null,
598
606
  previousItems: r.items
599
- }), s = ie();
600
- n.value = De(n.value, r.cursor, i), ae(s), Q();
607
+ }), c = ie();
608
+ return n.value = ke(n.value, r.cursor, s), ae(c), Z(), {
609
+ followCursor: t === "leading" ? i.previousPage ?? null : i.nextPage,
610
+ itemsLoaded: i.items.length
611
+ };
601
612
  } catch (e) {
602
- if (ke(e) || a !== y) {
603
- Q();
604
- return;
605
- }
606
- s.value = e instanceof Error ? e.message : "The viewer could not load items.", c.value = "failed", l.value = null, f.value = null;
613
+ return je(e) || a !== y ? (Z(), null) : (s.value = e instanceof Error ? e.message : "The viewer could not load items.", c.value = "failed", l.value = null, f.value = null, null);
607
614
  } finally {
608
615
  _ === o && (_ = null), g.delete(i);
609
616
  }
@@ -612,9 +619,9 @@ function He(e) {
612
619
  if (!e.resolve) return null;
613
620
  let n = ++y, r = /* @__PURE__ */ new Set(), i = [], a = t.cursor, o = 0;
614
621
  for (s.value = null, c.value = t.phase, l.value = null, f.value = null;;) {
615
- if (n !== y) return je(i, t.direction, e.removedIds.value, !0);
616
- if (i.length > 0 && h.value) return je(i, t.direction, e.removedIds.value, !1);
617
- let d = he(a);
622
+ if (n !== y) return Ne(i, t.direction, e.removedIds.value, !0);
623
+ if (i.length > 0 && h.value) return Ne(i, t.direction, e.removedIds.value, !1);
624
+ let d = ve(a);
618
625
  if (r.has(d) || g.has(d)) break;
619
626
  r.add(d), g.add(d);
620
627
  let p = typeof AbortController > "u" ? null : new AbortController();
@@ -622,10 +629,10 @@ function He(e) {
622
629
  try {
623
630
  let r = await e.resolve({
624
631
  cursor: a,
625
- pageSize: O.value,
632
+ pageSize: E.value,
626
633
  signal: p?.signal
627
634
  });
628
- if (n !== y) return je(i, t.direction, e.removedIds.value, !0);
635
+ if (n !== y) return Ne(i, t.direction, e.removedIds.value, !0);
629
636
  let s = de({
630
637
  cursor: a,
631
638
  nextCursor: r.nextPage,
@@ -634,120 +641,118 @@ function He(e) {
634
641
  previousItems: []
635
642
  });
636
643
  i.push(s);
637
- let d = i.reduce((t, n) => t + Te(n, e.removedIds.value), 0), m = t.direction === "forward" ? s.nextCursor : s.previousCursor;
638
- if (!t.continueUntilFilled || d >= O.value || !m) return {
644
+ let d = i.reduce((t, n) => t + De(n, e.removedIds.value), 0), m = t.direction === "forward" ? s.nextCursor : s.previousCursor;
645
+ if (!t.continueUntilFilled || d >= E.value || !m) return {
639
646
  canceled: !1,
640
647
  buckets: t.direction === "backward" ? [...i].reverse() : i,
641
648
  visibleCount: d
642
649
  };
643
- if (h.value) return je(i, t.direction, e.removedIds.value, !1);
644
- c.value = "filling", l.value = d, f.value = O.value, o += 1;
645
- let g = ze(o, C.value, w.value);
646
- if (await u.wait(g), n !== y) return je(i, t.direction, e.removedIds.value, !0);
650
+ if (h.value) return Ne(i, t.direction, e.removedIds.value, !1);
651
+ c.value = "filling", l.value = d, f.value = E.value, o += 1;
652
+ let g = Ve(o, C.value, w.value);
653
+ if (await u.wait(g), n !== y) return Ne(i, t.direction, e.removedIds.value, !0);
647
654
  a = m;
648
655
  } catch (r) {
649
- return ke(r) || n !== y ? je(i, t.direction, e.removedIds.value, !0) : (s.value = r instanceof Error ? r.message : "The viewer could not load items.", c.value = "failed", l.value = null, f.value = null, null);
656
+ return je(r) || n !== y ? Ne(i, t.direction, e.removedIds.value, !0) : (s.value = r instanceof Error ? r.message : "The viewer could not load items.", c.value = "failed", l.value = null, f.value = null, null);
650
657
  } finally {
651
658
  _ === p && (_ = null), g.delete(d);
652
659
  }
653
660
  }
654
- return je(i, t.direction, e.removedIds.value, !1);
661
+ return Ne(i, t.direction, e.removedIds.value, !1);
655
662
  }
656
663
  function de(e) {
657
- let t = Ae({
664
+ let t = Me({
658
665
  cursor: e.cursor,
659
666
  nextCursor: e.nextCursor,
660
667
  nextItems: e.nextItems,
661
668
  previousCursor: e.previousCursor,
662
669
  previousItems: e.previousItems,
663
- sequence: S
670
+ sequence: b
664
671
  });
665
- return S = t.nextSequence, t.bucket;
672
+ return b = t.nextSequence, t.bucket;
666
673
  }
667
- function Q() {
674
+ function Z() {
668
675
  c.value = "idle", l.value = null, f.value = null, u.clear();
669
676
  }
670
677
  function fe() {
671
678
  if (!e.initialState || !e.initialState.items.length) return !1;
672
- let t = Me({
679
+ let t = Pe({
673
680
  initialState: e.initialState,
674
681
  removedIds: e.removedIds.value,
675
- sequence: S
682
+ sequence: b
676
683
  });
677
- return n.value = t.buckets, r.value = t.activeIndex, S = t.nextSequence, o.value = !1, s.value = null, a.value = [], p.value = !1, !0;
684
+ return n.value = t.buckets, r.value = t.activeIndex, b = t.nextSequence, o.value = !1, s.value = null, a.value = [], p.value = !1, !0;
678
685
  }
679
- function _e() {
686
+ function pe() {
680
687
  return c.value === "initializing";
681
688
  }
682
- function ve(t) {
683
- return Fe(t === "leading" ? N.value : P.value, e.removedIds.value, O.value);
689
+ function me(t) {
690
+ return Le(t === "leading" ? j.value : M.value, e.removedIds.value, E.value);
684
691
  }
685
- function ye() {
686
- let t = n.value.findIndex((t) => Te(t, e.removedIds.value) > 0);
692
+ function he() {
693
+ let t = n.value.findIndex((t) => De(t, e.removedIds.value) > 0);
687
694
  if (t < 0) return;
688
695
  let r = t;
689
- for (let i = n.value.length - 1; i >= t; --i) if (Te(n.value[i], e.removedIds.value) > 0) {
696
+ for (let i = n.value.length - 1; i >= t; --i) if (De(n.value[i], e.removedIds.value) > 0) {
690
697
  r = i;
691
698
  break;
692
699
  }
693
700
  n.value = n.value.slice(t, r + 1);
694
701
  }
695
702
  return {
696
- activeIndex: j,
697
- canRetryInitialLoad: H,
698
- cancel: re,
699
- canRefreshTrailingBoundary: B,
700
- commitPendingAppend: q,
701
- currentCursor: V,
703
+ activeIndex: k,
704
+ canRetryInitialLoad: B,
705
+ cancel: Y,
706
+ canRefreshTrailingBoundary: R,
707
+ commitPendingAppend: G,
708
+ currentCursor: te,
702
709
  errorMessage: s,
703
710
  fillCollectedCount: l,
704
711
  fillDelayRemainingMs: d,
705
712
  fillTargetCount: f,
706
- hasNextPage: R,
707
- hasPreviousPage: z,
713
+ hasNextPage: F,
714
+ hasPreviousPage: L,
708
715
  isAutoPrefetchEnabled: m,
709
716
  isPageLoadingLocked: h,
710
- items: A,
711
- lockPageLoading: Y,
712
- loading: M,
713
- mode: D,
717
+ items: O,
718
+ lockPageLoading: re,
719
+ loading: A,
714
720
  maybePrefetchAround: se,
715
- nextCursor: I,
716
- pendingAppendItems: ee,
721
+ nextCursor: N,
722
+ pendingAppendItems: z,
717
723
  phase: c,
718
- prefetchNextPage: W,
719
- prefetchPreviousPage: G,
720
- previousCursor: L,
721
- retryInitialLoad: te,
722
- retry: K,
723
- setActiveIndex: J,
724
- setAutoPrefetchEnabled: ne,
724
+ prefetchNextPage: H,
725
+ prefetchPreviousPage: U,
726
+ previousCursor: P,
727
+ retryInitialLoad: W,
728
+ retry: ne,
729
+ setActiveIndex: K,
730
+ setAutoPrefetchEnabled: q,
725
731
  syncActiveIndexAfterVisibilityChange: ae,
726
- unlockPageLoading: X,
732
+ unlockPageLoading: J,
727
733
  getActiveOccurrenceKey: ie,
728
734
  maybeCommitPendingAppendWhenFilteredOut: oe
729
735
  };
730
736
  }
731
- function Ue(e, t) {
732
- return e.find((e) => Te(e, t) > 0) ?? e[0] ?? null;
737
+ function Ge(e, t) {
738
+ return e.find((e) => De(e, t) > 0) ?? e[0] ?? null;
733
739
  }
734
- function We(e, t) {
740
+ function Ke(e, t) {
735
741
  for (let n = e.length - 1; n >= 0; --n) {
736
742
  let r = e[n];
737
- if (Te(r, t) > 0) return r;
743
+ if (De(r, t) > 0) return r;
738
744
  }
739
745
  return e[e.length - 1] ?? null;
740
746
  }
741
747
  //#endregion
742
748
  //#region src/components/viewer-core/useDataSource.ts
743
- function Ge(e, t) {
744
- let { clearRemoved: n, getRemovedIds: r, remove: a, removedIds: o, restore: s, undo: c } = _e(), l = He({
749
+ function qe(e, t) {
750
+ let { clearRemoved: n, getRemovedIds: r, remove: a, removedIds: o, restore: s, undo: c } = ye(), l = We({
745
751
  emit: t,
746
752
  fillDelayMs: e.fillDelayMs,
747
753
  fillDelayStepMs: e.fillDelayStepMs,
748
754
  initialCursor: e.initialCursor,
749
755
  initialState: e.initialState,
750
- mode: e.mode,
751
756
  pageSize: e.pageSize,
752
757
  removedIds: o,
753
758
  resolve: e.resolve
@@ -808,7 +813,6 @@ function Ge(e, t) {
808
813
  loading: f,
809
814
  loadNext: T,
810
815
  loadPrevious: E,
811
- mode: l.mode,
812
816
  nextCursor: l.nextCursor,
813
817
  paginationDetail: g,
814
818
  pendingAppendItems: l.pendingAppendItems,
@@ -829,12 +833,12 @@ function Ge(e, t) {
829
833
  }
830
834
  //#endregion
831
835
  //#region src/components/viewer-core/useController.ts
832
- var Ke = 1024;
833
- function qe(e, t) {
834
- let n = Ge(e, t), r = C({
836
+ var Je = 1024;
837
+ function Ye(e, t) {
838
+ let n = qe(e, t), r = T({
835
839
  nextBoundaryLoadProgress: 0,
836
840
  previousBoundaryLoadProgress: 0
837
- }), a = T(0), o = T("list"), s = C({
841
+ }), a = D(0), o = D("list"), s = T({
838
842
  activeIndex: 0,
839
843
  currentCursor: null,
840
844
  errorMessage: null,
@@ -845,7 +849,6 @@ function qe(e, t) {
845
849
  hasPreviousPage: !1,
846
850
  itemCount: 0,
847
851
  loadState: "loaded",
848
- mode: "dynamic",
849
852
  nextBoundaryLoadProgress: 0,
850
853
  nextCursor: null,
851
854
  pageLoadingLocked: !1,
@@ -855,27 +858,27 @@ function qe(e, t) {
855
858
  removedCount: 0,
856
859
  removedIds: [],
857
860
  surfaceMode: "list"
858
- }), c = i(() => a.value >= Ke), l = i(() => c.value ? o.value : "fullscreen"), u = i(() => c.value && l.value === "fullscreen");
859
- F(c, (e) => {
861
+ }), c = i(() => a.value >= Je), l = i(() => c.value ? o.value : "fullscreen"), u = i(() => c.value && l.value === "fullscreen");
862
+ I(c, (e) => {
860
863
  e && h();
861
- }), F(() => e.surfaceMode, () => {
864
+ }), I(() => e.surfaceMode, () => {
862
865
  h();
863
- }), F([l, () => n.pendingAppendItems.value.length], ([e, t]) => {
866
+ }), I([l, () => n.pendingAppendItems.value.length], ([e, t]) => {
864
867
  e === "list" || t <= 0 || n.commitPendingAppend();
865
- }), F([
868
+ }), I([
866
869
  () => n.items.value.length,
867
870
  () => n.loading.value,
868
871
  () => n.hasNextPage.value,
869
872
  () => n.pendingAppendItems.value.length
870
873
  ], ([e, n, r, i]) => {
871
874
  !c.value || e > 0 || o.value === "list" || n || r || i > 0 || (o.value = "list", t("update:surfaceMode", "list"));
872
- }), F(l, (e) => {
875
+ }), I(l, (e) => {
873
876
  n.setAutoPrefetchEnabled(e === "fullscreen");
874
- }, { immediate: !0 }), I(() => {
875
- s.activeIndex = n.activeIndex.value, s.currentCursor = n.currentCursor.value, s.errorMessage = n.errorMessage.value, s.fillCollectedCount = n.fillCollectedCount.value, s.fillDelayRemainingMs = n.fillDelayRemainingMs.value, s.fillTargetCount = n.fillTargetCount.value, s.hasNextPage = n.hasNextPage.value, s.hasPreviousPage = n.hasPreviousPage.value, s.itemCount = n.items.value.length, s.loadState = n.loading.value ? "loading" : n.errorMessage.value ? "failed" : "loaded", s.mode = n.mode.value, s.nextBoundaryLoadProgress = r.nextBoundaryLoadProgress, s.nextCursor = n.nextCursor.value, s.pageLoadingLocked = n.isPageLoadingLocked.value, s.phase = n.phase.value, s.previousBoundaryLoadProgress = r.previousBoundaryLoadProgress, s.previousCursor = n.previousCursor.value, s.removedCount = n.removedCount.value, s.removedIds = n.getRemovedIds(), s.surfaceMode = l.value;
876
- }), x(() => {
877
+ }, { immediate: !0 }), L(() => {
878
+ s.activeIndex = n.activeIndex.value, s.currentCursor = n.currentCursor.value, s.errorMessage = n.errorMessage.value, s.fillCollectedCount = n.fillCollectedCount.value, s.fillDelayRemainingMs = n.fillDelayRemainingMs.value, s.fillTargetCount = n.fillTargetCount.value, s.hasNextPage = n.hasNextPage.value, s.hasPreviousPage = n.hasPreviousPage.value, s.itemCount = n.items.value.length, s.loadState = n.loading.value ? "loading" : n.errorMessage.value ? "failed" : "loaded", s.nextBoundaryLoadProgress = r.nextBoundaryLoadProgress, s.nextCursor = n.nextCursor.value, s.pageLoadingLocked = n.isPageLoadingLocked.value, s.phase = n.phase.value, s.previousBoundaryLoadProgress = r.previousBoundaryLoadProgress, s.previousCursor = n.previousCursor.value, s.removedCount = n.removedCount.value, s.removedIds = n.getRemovedIds(), s.surfaceMode = l.value;
879
+ }), S(() => {
877
880
  m(), h(), window.addEventListener("keydown", p), window.addEventListener("resize", m);
878
- }), b(() => {
881
+ }), x(() => {
879
882
  window.removeEventListener("keydown", p), window.removeEventListener("resize", m);
880
883
  });
881
884
  function d(e) {
@@ -885,7 +888,7 @@ function qe(e, t) {
885
888
  !c.value || o.value === "list" || (o.value = "list", t("update:surfaceMode", "list"));
886
889
  }
887
890
  function p(e) {
888
- e.defaultPrevented || e.key !== "Escape" || !c.value || l.value !== "fullscreen" || Q(e.target) || (e.preventDefault(), f());
891
+ e.defaultPrevented || e.key !== "Escape" || !c.value || l.value !== "fullscreen" || me(e.target) || (e.preventDefault(), f());
889
892
  }
890
893
  function m() {
891
894
  a.value = window.innerWidth || 0;
@@ -894,7 +897,7 @@ function qe(e, t) {
894
897
  !c.value || !e.surfaceMode || e.surfaceMode === o.value || (o.value = e.surfaceMode);
895
898
  }
896
899
  function g(e) {
897
- r.nextBoundaryLoadProgress = Je(e.nextBoundaryLoadProgress), r.previousBoundaryLoadProgress = Je(e.previousBoundaryLoadProgress);
900
+ r.nextBoundaryLoadProgress = Xe(e.nextBoundaryLoadProgress), r.previousBoundaryLoadProgress = Xe(e.previousBoundaryLoadProgress);
898
901
  }
899
902
  return {
900
903
  ...n,
@@ -908,31 +911,31 @@ function qe(e, t) {
908
911
  retry: n.retry,
909
912
  setBoundaryLoadProgress: g,
910
913
  showBackToList: u,
911
- status: w(s),
914
+ status: E(s),
912
915
  surfaceMode: l,
913
916
  unlockPageLoading: n.unlockPageLoading
914
917
  };
915
918
  }
916
- function Je(e) {
919
+ function Xe(e) {
917
920
  return Math.min(Math.max(e, 0), 1);
918
921
  }
919
922
  //#endregion
920
923
  //#region src/components/FullscreenMediaBar.vue?vue&type=script&setup=true&lang.ts
921
- var Ye = {
924
+ var Ze = {
922
925
  "data-testid": "vibe-media-bar",
923
926
  class: "absolute inset-x-0 bottom-0 z-[5] bg-[linear-gradient(180deg,transparent,rgba(0,0,0,0.42)_24%,rgba(0,0,0,0.78))] px-[clamp(1rem,2.6vw,2.25rem)] pt-4 pb-[1.15rem]"
924
- }, Xe = { class: "grid grid-cols-[auto_minmax(0,1fr)_auto_auto] items-center gap-3 border-t border-white/12 bg-black/70 px-4 py-3 backdrop-blur-[18px]" }, Ze = { class: "text-[0.76rem] font-bold uppercase tracking-[0.18em] text-[#f7f1ea]/74" }, Qe = { class: "relative h-4 w-full" }, $e = [
927
+ }, Qe = { class: "grid grid-cols-[auto_minmax(0,1fr)_auto_auto] items-center gap-3 border-t border-white/12 bg-black/70 px-4 py-3 backdrop-blur-[18px]" }, $e = { class: "text-[0.76rem] font-bold uppercase tracking-[0.18em] text-[#f7f1ea]/74" }, et = { class: "relative h-4 w-full" }, tt = [
925
928
  "max",
926
929
  "value",
927
930
  "disabled"
928
- ], et = { class: "text-[0.76rem] font-bold uppercase tracking-[0.18em] text-[#f7f1ea]/74" }, tt = ["data-layout"], nt = {
931
+ ], nt = { class: "text-[0.76rem] font-bold uppercase tracking-[0.18em] text-[#f7f1ea]/74" }, rt = ["data-layout"], it = {
929
932
  key: 0,
930
933
  "data-testid": "vibe-media-volume-popover",
931
934
  class: "absolute bottom-[calc(100%+0.8rem)] right-0 grid justify-items-center gap-3 border border-white/12 bg-black/82 px-3 py-4 shadow-[0_20px_50px_-20px_rgba(0,0,0,0.85)] backdrop-blur-[18px]"
932
- }, rt = { class: "relative flex h-28 w-4 items-center justify-center" }, it = ["value"], at = { class: "flex items-center gap-3" }, ot = ["aria-label"], st = {
935
+ }, at = { class: "relative flex h-28 w-4 items-center justify-center" }, ot = ["value"], st = { class: "flex items-center gap-3" }, ct = ["aria-label"], lt = {
933
936
  key: 0,
934
937
  class: "relative h-4 w-24"
935
- }, ct = ["value"], lt = /* @__PURE__ */ d({
938
+ }, ut = ["value"], dt = /* @__PURE__ */ d({
936
939
  __name: "FullscreenMediaBar",
937
940
  props: {
938
941
  currentTime: {},
@@ -950,18 +953,18 @@ var Ye = {
950
953
  "volume-toggle"
951
954
  ],
952
955
  setup(e, { emit: t }) {
953
- let n = e, r = t, l = T(null), u = T(!1), d = i(() => n.volumeControlLayout === "vertical"), f = i(() => w(n.volume, 0, 1)), p = i(() => Math.round(f.value * 100)), m = i(() => n.muted || f.value <= 0 ? Z : f.value < .5 ? se : ce), h = i(() => n.muted || f.value <= 0 ? "Unmute active media" : "Mute active media"), g = i(() => d.value && !u.value ? "Show volume controls" : h.value), _ = i(() => n.volumeControlLayout === "vertical" ? { height: `${p.value}%` } : { width: `${p.value}%` });
954
- F(d, (e) => {
956
+ let n = e, r = t, l = D(null), u = D(!1), d = i(() => n.volumeControlLayout === "vertical"), f = i(() => C(n.volume, 0, 1)), p = i(() => Math.round(f.value * 100)), m = i(() => n.muted || f.value <= 0 ? de : f.value < .5 ? X : ue), h = i(() => n.muted || f.value <= 0 ? "Unmute active media" : "Mute active media"), g = i(() => d.value && !u.value ? "Show volume controls" : h.value), _ = i(() => n.volumeControlLayout === "vertical" ? { height: `${p.value}%` } : { width: `${p.value}%` });
957
+ I(d, (e) => {
955
958
  e || (u.value = !1);
956
- }), x(() => {
959
+ }), S(() => {
957
960
  document.addEventListener("pointerdown", v);
958
- }), b(() => {
961
+ }), x(() => {
959
962
  document.removeEventListener("pointerdown", v);
960
963
  });
961
964
  function v(e) {
962
965
  !d.value || !u.value || l.value && e.target instanceof Node && !l.value.contains(e.target) && (u.value = !1);
963
966
  }
964
- function C() {
967
+ function y() {
965
968
  if (!d.value) {
966
969
  r("volume-toggle");
967
970
  return;
@@ -972,16 +975,16 @@ var Ye = {
972
975
  }
973
976
  r("volume-toggle");
974
977
  }
975
- function w(e, t, n) {
978
+ function C(e, t, n) {
976
979
  return Math.min(Math.max(e, t), n);
977
980
  }
978
- return (e, t) => (S(), s("div", Ye, [c("div", Xe, [
979
- c("span", Ze, k(n.currentTimeLabel), 1),
980
- c("div", Qe, [
981
+ return (e, t) => (w(), s("div", Ze, [c("div", Qe, [
982
+ c("span", $e, A(n.currentTimeLabel), 1),
983
+ c("div", et, [
981
984
  t[3] ||= c("div", { class: "absolute inset-x-0 top-1/2 h-px -translate-y-1/2 bg-white/12" }, null, -1),
982
985
  c("div", {
983
986
  class: "absolute left-0 top-1/2 h-px -translate-y-1/2 bg-[#f7f1ea]",
984
- style: y({ width: `${n.progress}%` })
987
+ style: b({ width: `${n.progress}%` })
985
988
  }, null, 4),
986
989
  c("input", {
987
990
  "data-swipe-lock": "true",
@@ -994,20 +997,20 @@ var Ye = {
994
997
  disabled: n.duration <= 0,
995
998
  class: "vibe-media-slider absolute inset-0 z-10 h-4 w-full cursor-pointer bg-transparent disabled:cursor-default disabled:opacity-50",
996
999
  onInput: t[0] ||= (e) => r("seek-input", e)
997
- }, null, 40, $e)
1000
+ }, null, 40, tt)
998
1001
  ]),
999
- c("span", et, k(n.durationLabel), 1),
1002
+ c("span", nt, A(n.durationLabel), 1),
1000
1003
  c("div", {
1001
1004
  ref_key: "rootRef",
1002
1005
  ref: l,
1003
1006
  "data-testid": "vibe-media-volume",
1004
1007
  "data-layout": n.volumeControlLayout,
1005
1008
  class: "relative flex items-center justify-end"
1006
- }, [d.value && u.value ? (S(), s("div", nt, [c("div", rt, [
1009
+ }, [d.value && u.value ? (w(), s("div", it, [c("div", at, [
1007
1010
  t[4] ||= c("div", { class: "absolute bottom-0 left-1/2 h-full w-px -translate-x-1/2 bg-white/12" }, null, -1),
1008
1011
  c("div", {
1009
1012
  class: "absolute bottom-0 left-1/2 w-px -translate-x-1/2 bg-[#f7f1ea]",
1010
- style: y(_.value)
1013
+ style: b(_.value)
1011
1014
  }, null, 4),
1012
1015
  c("input", {
1013
1016
  "data-testid": "vibe-media-volume-slider",
@@ -1020,21 +1023,21 @@ var Ye = {
1020
1023
  value: f.value,
1021
1024
  class: "vibe-media-slider absolute left-1/2 top-1/2 h-4 w-28 -translate-x-1/2 -translate-y-1/2 -rotate-90 bg-transparent",
1022
1025
  onInput: t[1] ||= (e) => r("volume-input", e)
1023
- }, null, 40, it)
1024
- ])])) : o("", !0), c("div", at, [c("button", {
1026
+ }, null, 40, ot)
1027
+ ])])) : o("", !0), c("div", st, [c("button", {
1025
1028
  type: "button",
1026
1029
  "data-testid": "vibe-media-volume-button",
1027
1030
  "aria-label": g.value,
1028
1031
  class: "inline-flex h-10 w-10 items-center justify-center border border-white/14 bg-black/50 text-[#f7f1ea]/82 backdrop-blur-[18px] transition hover:border-white/28 hover:bg-black/65",
1029
- onClick: C
1030
- }, [(S(), a(O(m.value), {
1032
+ onClick: y
1033
+ }, [(w(), a(k(m.value), {
1031
1034
  class: "h-4 w-4 stroke-[1.9]",
1032
1035
  "aria-hidden": "true"
1033
- }))], 8, ot), n.volumeControlLayout === "horizontal" ? (S(), s("div", st, [
1036
+ }))], 8, ct), n.volumeControlLayout === "horizontal" ? (w(), s("div", lt, [
1034
1037
  t[5] ||= c("div", { class: "absolute inset-x-0 top-1/2 h-px -translate-y-1/2 bg-white/12" }, null, -1),
1035
1038
  c("div", {
1036
1039
  class: "absolute left-0 top-1/2 h-px -translate-y-1/2 bg-[#f7f1ea]",
1037
- style: y(_.value)
1040
+ style: b(_.value)
1038
1041
  }, null, 4),
1039
1042
  c("input", {
1040
1043
  "data-testid": "vibe-media-volume-slider",
@@ -1047,24 +1050,24 @@ var Ye = {
1047
1050
  value: f.value,
1048
1051
  class: "vibe-media-slider absolute inset-0 z-10 h-4 w-full cursor-pointer bg-transparent",
1049
1052
  onInput: t[2] ||= (e) => r("volume-input", e)
1050
- }, null, 40, ct)
1051
- ])) : o("", !0)])], 8, tt)
1053
+ }, null, 40, ut)
1054
+ ])) : o("", !0)])], 8, rt)
1052
1055
  ])]));
1053
1056
  }
1054
- }), ut = { class: "pointer-events-none absolute inset-0 z-[3] flex flex-col justify-between p-[clamp(1.25rem,2.6vw,2.25rem)]" }, dt = { class: "grid gap-4" }, ft = { class: "flex min-h-11 items-center justify-between gap-4" }, pt = { class: "min-w-0 flex flex-1 items-center gap-3" }, mt = {
1057
+ }), ft = { class: "pointer-events-none absolute inset-0 z-[3] flex flex-col justify-between p-[clamp(1.25rem,2.6vw,2.25rem)]" }, pt = { class: "grid gap-4" }, mt = { class: "flex min-h-11 items-center justify-between gap-4" }, ht = { class: "min-w-0 flex flex-1 items-center gap-3" }, gt = {
1055
1058
  key: 1,
1056
1059
  "data-testid": "vibe-title",
1057
1060
  class: "m-0 truncate text-left text-[0.82rem] leading-none tracking-[-0.04em] min-[721px]:text-[1.2rem]"
1058
- }, ht = { class: "pointer-events-auto flex shrink-0 items-center gap-2" }, gt = {
1061
+ }, _t = { class: "pointer-events-auto flex shrink-0 items-center gap-2" }, vt = {
1059
1062
  "data-testid": "vibe-pagination",
1060
1063
  class: "inline-flex shrink-0 items-center gap-2 whitespace-nowrap border border-white/14 bg-black/40 px-3 py-2 text-[0.63rem] font-bold uppercase tracking-[0.12em] text-[#f7f1ea]/72 backdrop-blur-[18px] min-[721px]:gap-3 min-[721px]:px-4 min-[721px]:py-3 min-[721px]:text-[0.74rem] min-[721px]:tracking-[0.2em]"
1061
- }, _t = { class: "whitespace-nowrap" }, vt = {
1064
+ }, yt = { class: "whitespace-nowrap" }, bt = {
1062
1065
  key: 1,
1063
1066
  class: "whitespace-nowrap border-l border-white/12 pl-2 text-[#f7f1ea]/56 min-[721px]:pl-3"
1064
- }, yt = {
1067
+ }, xt = {
1065
1068
  key: 0,
1066
1069
  class: "grid gap-2 max-[720px]:justify-items-start"
1067
- }, bt = /* @__PURE__ */ d({
1070
+ }, St = /* @__PURE__ */ d({
1068
1071
  __name: "FullscreenHeader",
1069
1072
  props: {
1070
1073
  currentIndex: {},
@@ -1078,100 +1081,348 @@ var Ye = {
1078
1081
  emits: ["back-to-list"],
1079
1082
  setup(e, { emit: t }) {
1080
1083
  let n = e, r = t;
1081
- return (e, t) => (S(), s("div", ut, [c("div", dt, [c("div", ft, [c("div", pt, [n.showBackToList ? (S(), s("button", {
1084
+ return (e, t) => (w(), s("div", ft, [c("div", pt, [c("div", mt, [c("div", ht, [n.showBackToList ? (w(), s("button", {
1082
1085
  key: 0,
1083
1086
  type: "button",
1084
1087
  "data-testid": "vibe-back-to-list",
1085
1088
  class: "pointer-events-auto inline-flex h-11 w-11 shrink-0 items-center justify-center border border-white/14 bg-black/40 text-[#f7f1ea]/78 backdrop-blur-[18px] transition hover:border-white/28 hover:bg-black/55",
1086
1089
  "aria-label": "Back to list",
1087
1090
  onClick: t[0] ||= (e) => r("back-to-list")
1088
- }, [u(j(q), {
1091
+ }, [u(M(re), {
1089
1092
  class: "h-4 w-4 stroke-[2.2]",
1090
1093
  "aria-hidden": "true"
1091
- })])) : o("", !0), n.title ? (S(), s("h2", mt, k(n.title), 1)) : o("", !0)]), c("div", ht, [c("span", gt, [
1092
- n.loading ? (S(), a(j(re), {
1094
+ })])) : o("", !0), n.title ? (w(), s("h2", gt, A(n.title), 1)) : o("", !0)]), c("div", _t, [c("span", vt, [
1095
+ n.loading ? (w(), a(M(oe), {
1093
1096
  key: 0,
1094
1097
  "data-testid": "vibe-pagination-spinner",
1095
1098
  class: "h-3.5 w-3.5 animate-spin stroke-[1.9]",
1096
1099
  "aria-hidden": "true"
1097
1100
  })) : o("", !0),
1098
- c("span", _t, k(n.currentIndex + 1) + " / " + k(n.total), 1),
1099
- n.paginationDetail ? (S(), s("span", vt, k(n.paginationDetail), 1)) : o("", !0)
1100
- ]), D(e.$slots, "actions")])])]), n.showEndBadge ? (S(), s("div", yt, [...t[1] ||= [c("span", { class: "inline-flex items-center border border-amber-300/35 bg-black/40 px-4 py-3 text-[0.74rem] font-bold uppercase tracking-[0.2em] text-amber-200 backdrop-blur-[18px]" }, " End reached ", -1)]])) : o("", !0)]));
1101
+ c("span", yt, A(n.currentIndex + 1) + " / " + A(n.total), 1),
1102
+ n.paginationDetail ? (w(), s("span", bt, A(n.paginationDetail), 1)) : o("", !0)
1103
+ ]), O(e.$slots, "actions")])])]), n.showEndBadge ? (w(), s("div", xt, [...t[1] ||= [c("span", { class: "inline-flex items-center border border-amber-300/35 bg-black/40 px-4 py-3 text-[0.74rem] font-bold uppercase tracking-[0.2em] text-amber-200 backdrop-blur-[18px]" }, " End reached ", -1)]])) : o("", !0)]));
1101
1104
  }
1102
- }), xt = {
1103
- image: X,
1104
- video: ne,
1105
+ }), Ct = {
1106
+ image: ae,
1107
+ video: Y,
1105
1108
  audio: J,
1106
- other: Y
1107
- }, St = {
1109
+ other: ie
1110
+ }, wt = {
1108
1111
  image: "Image",
1109
1112
  video: "Video",
1110
1113
  audio: "Audio",
1111
1114
  other: "File"
1112
1115
  };
1113
- function Ct(e) {
1114
- return xt[e];
1116
+ function Tt(e) {
1117
+ return Ct[e];
1115
1118
  }
1116
- function wt(e) {
1117
- return St[e];
1119
+ function Et(e) {
1120
+ return wt[e];
1121
+ }
1122
+ //#endregion
1123
+ //#region src/components/viewer-core/useAssetLoadQueue.ts
1124
+ var Dt = {
1125
+ maxGlobal: 10,
1126
+ maxPerDomain: 4,
1127
+ maxVideoPerDomain: 2
1128
+ };
1129
+ function Ot(e = Dt) {
1130
+ let t = /* @__PURE__ */ new Map(), n = /* @__PURE__ */ new Map(), r = 0;
1131
+ function i(e) {
1132
+ let i = {
1133
+ ...e,
1134
+ domain: jt(e.url),
1135
+ enqueuedAt: r,
1136
+ id: `vibe-asset-load-${r += 1}`
1137
+ };
1138
+ return n.set(i.id, i), a(), {
1139
+ cancel() {
1140
+ (n.delete(i.id) || t.delete(i.id)) && a();
1141
+ },
1142
+ refresh() {
1143
+ a();
1144
+ },
1145
+ release() {
1146
+ (t.delete(i.id) || n.delete(i.id)) && a();
1147
+ }
1148
+ };
1149
+ }
1150
+ function a() {
1151
+ if (n.size === 0) return;
1152
+ let r = [...n.values()].sort((e, t) => {
1153
+ let n = At(e) - At(t);
1154
+ return n === 0 ? e.enqueuedAt - t.enqueuedAt : n;
1155
+ });
1156
+ for (let i of r) {
1157
+ if (t.size >= e.maxGlobal) return;
1158
+ if (o(i)) {
1159
+ n.delete(i.id), t.set(i.id, i);
1160
+ try {
1161
+ i.onGrant();
1162
+ } catch {
1163
+ t.delete(i.id);
1164
+ }
1165
+ }
1166
+ }
1167
+ }
1168
+ function o(n) {
1169
+ let r = [...t.values()].filter((e) => e.domain === n.domain);
1170
+ return !(r.length >= e.maxPerDomain || n.assetType === "video" && r.filter((e) => e.assetType === "video").length >= e.maxVideoPerDomain);
1171
+ }
1172
+ return { request: i };
1173
+ }
1174
+ var kt = Ot();
1175
+ function At(e) {
1176
+ try {
1177
+ let t = e.getPriority();
1178
+ return Number.isFinite(t) ? t : Infinity;
1179
+ } catch {
1180
+ return Infinity;
1181
+ }
1182
+ }
1183
+ function jt(e) {
1184
+ try {
1185
+ return new URL(e).hostname || "local";
1186
+ } catch {
1187
+ return "local";
1188
+ }
1189
+ }
1190
+ //#endregion
1191
+ //#region src/components/viewer-core/useFullscreenPreloadController.ts
1192
+ var Mt = {
1193
+ 1: 0,
1194
+ 2: 1,
1195
+ [-1]: 2
1196
+ };
1197
+ function Nt(e) {
1198
+ let t = D({}), n = Ot({
1199
+ maxGlobal: 1,
1200
+ maxPerDomain: 1,
1201
+ maxVideoPerDomain: 1
1202
+ }), r = /* @__PURE__ */ new Map(), i = /* @__PURE__ */ new Map(), a = /* @__PURE__ */ new Map(), o = /* @__PURE__ */ new Set();
1203
+ I([
1204
+ e.active,
1205
+ e.items,
1206
+ e.resolvedActiveIndex
1207
+ ], () => {
1208
+ p();
1209
+ }, { immediate: !0 }), f() && C(() => {
1210
+ d();
1211
+ });
1212
+ function s(n) {
1213
+ if (!e.active.value) return !1;
1214
+ let r = e.items.value[n];
1215
+ if (!r || !Lt(r)) return !1;
1216
+ let i = e.getItemKey(r);
1217
+ return i === h() || !!t.value[i];
1218
+ }
1219
+ function c(e, t) {
1220
+ if (t instanceof HTMLImageElement) {
1221
+ i.set(e, t), Ft(t) && u(e);
1222
+ return;
1223
+ }
1224
+ i.delete(e);
1225
+ }
1226
+ function l(e, t) {
1227
+ if (t instanceof HTMLMediaElement) {
1228
+ a.set(e, t), It(t) && u(e);
1229
+ return;
1230
+ }
1231
+ a.delete(e);
1232
+ }
1233
+ function u(e) {
1234
+ let t = r.get(e);
1235
+ t && (t.lease.release(), r.delete(e));
1236
+ }
1237
+ function d() {
1238
+ for (let e of r.values()) e.lease.release();
1239
+ r.clear(), t.value = {}, _();
1240
+ }
1241
+ function p() {
1242
+ if (!e.active.value) {
1243
+ d();
1244
+ return;
1245
+ }
1246
+ let s = m(), c = new Set(s.map((e) => e.key)), l = h();
1247
+ for (let e of o) e !== l && c.has(e) && v(e, !0);
1248
+ for (let e of Object.keys(t.value)) c.has(e) || v(e, !1);
1249
+ for (let [e, t] of r.entries()) {
1250
+ if (!c.has(e)) {
1251
+ t.lease.release(), r.delete(e);
1252
+ continue;
1253
+ }
1254
+ let n = s.find((t) => t.key === e);
1255
+ n && (t.index = n.index);
1256
+ }
1257
+ for (let e of s) {
1258
+ if (r.has(e.key) || t.value[e.key]) continue;
1259
+ let o;
1260
+ o = {
1261
+ index: e.index,
1262
+ key: e.key,
1263
+ lease: n.request({
1264
+ assetType: e.item.type === "image" ? "image" : "video",
1265
+ getPriority: () => g(o.index),
1266
+ onGrant: () => {
1267
+ v(e.key, !0), Pt(e.key, i, a) && u(e.key);
1268
+ },
1269
+ url: e.item.url
1270
+ })
1271
+ }, r.set(e.key, o);
1272
+ }
1273
+ for (let e of r.values()) e.lease.refresh();
1274
+ _();
1275
+ }
1276
+ function m() {
1277
+ let t = e.resolvedActiveIndex.value;
1278
+ return [
1279
+ 1,
1280
+ 2,
1281
+ -1
1282
+ ].map((n) => {
1283
+ let r = t + n, i = e.items.value[r];
1284
+ return !i || !Lt(i) ? null : {
1285
+ index: r,
1286
+ item: i,
1287
+ key: e.getItemKey(i)
1288
+ };
1289
+ }).filter((e) => !!e);
1290
+ }
1291
+ function h() {
1292
+ let t = e.items.value[e.resolvedActiveIndex.value];
1293
+ return !e.active.value || !t || !Lt(t) ? null : e.getItemKey(t);
1294
+ }
1295
+ function g(t) {
1296
+ return e.active.value ? Mt[t - e.resolvedActiveIndex.value] ?? Infinity : Infinity;
1297
+ }
1298
+ function _() {
1299
+ let n = /* @__PURE__ */ new Set(), r = h();
1300
+ r && n.add(r);
1301
+ for (let e of Object.keys(t.value)) n.add(e);
1302
+ for (let t of o) n.has(t) || (y(t), e.onResetAssetState(t));
1303
+ o = n;
1304
+ }
1305
+ function v(e, n) {
1306
+ if (n) {
1307
+ if (t.value[e]) return;
1308
+ t.value = {
1309
+ ...t.value,
1310
+ [e]: !0
1311
+ };
1312
+ return;
1313
+ }
1314
+ if (!t.value[e]) return;
1315
+ let r = { ...t.value };
1316
+ delete r[e], t.value = r;
1317
+ }
1318
+ function y(e) {
1319
+ let t = i.get(e);
1320
+ if (t) try {
1321
+ t.removeAttribute("src"), t.src = "";
1322
+ } catch {}
1323
+ let n = a.get(e);
1324
+ if (n) {
1325
+ try {
1326
+ n.currentTime = 0;
1327
+ } catch {}
1328
+ n.pause();
1329
+ try {
1330
+ n.removeAttribute("src"), n.load();
1331
+ } catch {}
1332
+ }
1333
+ }
1334
+ return {
1335
+ clearBackgroundPreloads: d,
1336
+ registerImageElement: c,
1337
+ registerMediaElement: l,
1338
+ settleBackgroundPreload: u,
1339
+ shouldAttachSlideAsset: s
1340
+ };
1341
+ }
1342
+ function Pt(e, t, n) {
1343
+ let r = t.get(e);
1344
+ if (r) return Ft(r);
1345
+ let i = n.get(e);
1346
+ return i ? It(i) : !1;
1347
+ }
1348
+ function Ft(e) {
1349
+ return e.complete && !!(e.currentSrc || e.getAttribute("src"));
1350
+ }
1351
+ function It(e) {
1352
+ let t = typeof HTMLMediaElement > "u" ? 1 : HTMLMediaElement.HAVE_METADATA;
1353
+ return e.readyState >= t;
1354
+ }
1355
+ function Lt(e) {
1356
+ return e.type === "image" || e.type === "video" || e.type === "audio";
1118
1357
  }
1119
1358
  //#endregion
1120
1359
  //#region src/components/viewer-core/useFullscreenSurfaceMedia.ts
1121
- var Tt = 1, Et = 2;
1122
- function Dt(e) {
1123
- function t(e, t) {
1360
+ function Rt(e) {
1361
+ let t = Nt({
1362
+ active: e.active,
1363
+ getItemKey: r,
1364
+ items: e.items,
1365
+ onResetAssetState: e.viewer.resetAssetState,
1366
+ resolvedActiveIndex: e.resolvedActiveIndex
1367
+ });
1368
+ function n(e, t) {
1124
1369
  let n = t.title?.trim();
1125
- return n ? `${e} ${n}` : `${e} ${wt(t.type).toLowerCase()}`;
1370
+ return n ? `${e} ${n}` : `${e} ${Et(t.type).toLowerCase()}`;
1126
1371
  }
1127
- function n(e) {
1372
+ function r(e) {
1128
1373
  return $(e);
1129
1374
  }
1130
- function r(t) {
1131
- let n = e.resolvedActiveIndex.value;
1132
- return !!e.active.value && t >= n - Tt && t <= n + Et;
1133
- }
1134
- function i(t, i) {
1135
- let a = n(i);
1136
- return !r(t) || t !== e.resolvedActiveIndex.value || e.viewer.getAssetErrorKind(a) ? !1 : i.type === "image" ? !e.viewer.isImageReady(a) : i.type === "video" || i.type === "audio" ? !e.viewer.isMediaReady(a) : !1;
1375
+ function i(e) {
1376
+ return t.shouldAttachSlideAsset(e);
1137
1377
  }
1138
- function a(t) {
1139
- return e.viewer.getAssetErrorKind(n(t));
1378
+ function a(t, n) {
1379
+ let a = r(n);
1380
+ return !i(t) || t !== e.resolvedActiveIndex.value || e.viewer.getAssetErrorKind(a) ? !1 : n.type === "image" ? !e.viewer.isImageReady(a) : n.type === "video" || n.type === "audio" ? !e.viewer.isMediaReady(a) : !1;
1140
1381
  }
1141
1382
  function o(t) {
1142
- return e.viewer.getAssetErrorLabel(n(t)) ?? "Load error";
1383
+ return e.viewer.getAssetErrorKind(r(t));
1143
1384
  }
1144
- function s(t, n) {
1145
- return r(t) && t === e.resolvedActiveIndex.value && !!a(n);
1385
+ function s(t) {
1386
+ return e.viewer.getAssetErrorLabel(r(t)) ?? "Load error";
1146
1387
  }
1147
1388
  function c(t, n) {
1148
- return r(t) ? e.viewer.getImageSource(n) : void 0;
1389
+ return i(t) && t === e.resolvedActiveIndex.value && !!o(n);
1149
1390
  }
1150
- function l(e, t) {
1151
- return r(e) ? t.url : void 0;
1391
+ function l(t, n) {
1392
+ return i(t) ? e.viewer.getImageSource(n) : void 0;
1393
+ }
1394
+ function u(e) {
1395
+ return i(e) ? "metadata" : "none";
1396
+ }
1397
+ function d(e, t) {
1398
+ return i(e) ? t.url : void 0;
1152
1399
  }
1153
1400
  return {
1154
- getAssetErrorKind: a,
1155
- getAssetErrorLabel: o,
1156
- getFullscreenImageSource: c,
1157
- getFullscreenMediaSource: l,
1158
- getItemKey: n,
1159
- getMediaActionLabel: t,
1160
- isAssetErrored: s,
1161
- isAssetLoading: i,
1162
- shouldPreloadSlideAsset: r
1401
+ getAssetErrorKind: o,
1402
+ getAssetErrorLabel: s,
1403
+ getFullscreenImageSource: l,
1404
+ getFullscreenMediaPreload: u,
1405
+ getFullscreenMediaSource: d,
1406
+ getItemKey: r,
1407
+ getMediaActionLabel: n,
1408
+ isAssetErrored: c,
1409
+ isAssetLoading: a,
1410
+ registerImageElement: t.registerImageElement,
1411
+ registerMediaElement: t.registerMediaElement,
1412
+ settleBackgroundPreload: t.settleBackgroundPreload,
1413
+ shouldPreloadSlideAsset: i
1163
1414
  };
1164
1415
  }
1165
1416
  //#endregion
1166
1417
  //#region src/components/viewer-core/slotContent.ts
1167
- function Ot(e) {
1418
+ function zt(e) {
1168
1419
  if (!Array.isArray(e)) return !1;
1169
1420
  for (let t of e) {
1170
1421
  if (Array.isArray(t)) {
1171
- if (Ot(t)) return !0;
1422
+ if (zt(t)) return !0;
1172
1423
  continue;
1173
1424
  }
1174
- if (!m(t)) {
1425
+ if (!h(t)) {
1175
1426
  if (typeof t == "string") {
1176
1427
  if (t.trim().length > 0) return !0;
1177
1428
  continue;
@@ -1179,20 +1430,20 @@ function Ot(e) {
1179
1430
  if (t != null && t !== !1) return !0;
1180
1431
  continue;
1181
1432
  }
1182
- if (!kt(t)) return !0;
1433
+ if (!Bt(t)) return !0;
1183
1434
  }
1184
1435
  return !1;
1185
1436
  }
1186
- function kt(r) {
1187
- return r.type === e ? !0 : r.type === n ? typeof r.children == "string" ? r.children.trim().length === 0 : !0 : r.type === t ? !Ot(r.children) : !1;
1437
+ function Bt(r) {
1438
+ return r.type === e ? !0 : r.type === n ? typeof r.children == "string" ? r.children.trim().length === 0 : !0 : r.type === t ? !zt(r.children) : !1;
1188
1439
  }
1189
1440
  //#endregion
1190
1441
  //#region src/components/viewer-core/useSurfaceEmptyState.ts
1191
- var At = "no items available";
1192
- function jt(e) {
1442
+ var Vt = "no items available";
1443
+ function Ht(e) {
1193
1444
  let t = i(() => e.loading.value || e.itemCount.value > 0 || e.emptyStateMode.value === "hidden" ? null : {
1194
1445
  loading: !!e.loading.value,
1195
- message: At,
1446
+ message: Vt,
1196
1447
  mode: e.emptyStateMode.value === "badge" ? "badge" : "inline",
1197
1448
  surface: e.surface,
1198
1449
  total: e.itemCount.value
@@ -1200,23 +1451,23 @@ function jt(e) {
1200
1451
  return {
1201
1452
  emptyStateProps: t,
1202
1453
  showBadgeEmptyState: i(() => t.value?.mode === "badge"),
1203
- showCustomEmptyState: i(() => Ot(n.value)),
1454
+ showCustomEmptyState: i(() => zt(n.value)),
1204
1455
  showInlineEmptyState: i(() => t.value?.mode === "inline")
1205
1456
  };
1206
1457
  }
1207
1458
  //#endregion
1208
1459
  //#region src/components/viewer-core/format.ts
1209
- function Mt(e) {
1460
+ function Ut(e) {
1210
1461
  if (!Number.isFinite(e) || e <= 0) return "0:00";
1211
1462
  let t = Math.floor(e), n = Math.floor(t / 3600), r = Math.floor(t % 3600 / 60), i = t % 60;
1212
1463
  return n > 0 ? `${n}:${String(r).padStart(2, "0")}:${String(i).padStart(2, "0")}` : `${r}:${String(i).padStart(2, "0")}`;
1213
1464
  }
1214
1465
  //#endregion
1215
1466
  //#region src/components/viewer-core/surfaceStatus.ts
1216
- function Nt(e) {
1467
+ function Wt(e) {
1217
1468
  return e.phase ? e.phase : e.loading ? e.itemCount > 0 ? "loading" : "initializing" : "idle";
1218
1469
  }
1219
- function Pt(e) {
1470
+ function Gt(e) {
1220
1471
  return e.phase === "failed" ? {
1221
1472
  kind: "failed",
1222
1473
  message: e.errorMessage ?? (e.hasItems ? "The viewer could not load more items." : "The viewer could not load items.")
@@ -1239,17 +1490,17 @@ function Pt(e) {
1239
1490
  }
1240
1491
  //#endregion
1241
1492
  //#region src/components/viewer-core/useActivation.ts
1242
- function Ft(e) {
1493
+ function Kt(e) {
1243
1494
  let t = !1;
1244
- F(e.enabled, async (t) => {
1495
+ I(e.enabled, async (t) => {
1245
1496
  if (n(t), t) {
1246
1497
  e.onResize(), await e.onEnable();
1247
1498
  return;
1248
1499
  }
1249
1500
  e.onDisable();
1250
- }, { immediate: !0 }), x(() => {
1501
+ }, { immediate: !0 }), S(() => {
1251
1502
  e.onResize(), e.enabled.value && e.onEnable();
1252
- }), b(() => {
1503
+ }), x(() => {
1253
1504
  n(!1), e.onDisable();
1254
1505
  });
1255
1506
  function n(n) {
@@ -1262,7 +1513,7 @@ function Ft(e) {
1262
1513
  }
1263
1514
  //#endregion
1264
1515
  //#region src/components/viewer-core/assetState.ts
1265
- var It = {
1516
+ var qt = {
1266
1517
  currentTime: 0,
1267
1518
  duration: 0,
1268
1519
  errorKind: null,
@@ -1271,38 +1522,38 @@ var It = {
1271
1522
  ready: !1,
1272
1523
  volume: 1
1273
1524
  };
1274
- function Lt() {
1275
- return { ...It };
1525
+ function Jt() {
1526
+ return { ...qt };
1276
1527
  }
1277
- function Rt(e) {
1528
+ function Yt(e) {
1278
1529
  return e.complete && !!(e.currentSrc || e.getAttribute("src"));
1279
1530
  }
1280
- function zt(e, t, n) {
1281
- e.currentTime = Number.isFinite(t.currentTime) ? t.currentTime : 0, e.duration = Number.isFinite(t.duration) ? t.duration : 0, e.muted = t.muted, e.paused = t.paused, e.volume = Number.isFinite(t.volume) ? t.volume : e.volume, n && n !== "error" && (e.errorKind = null), e.ready = Bt(t, n);
1531
+ function Xt(e, t, n) {
1532
+ e.currentTime = Number.isFinite(t.currentTime) ? t.currentTime : 0, e.duration = Number.isFinite(t.duration) ? t.duration : 0, e.muted = t.muted, e.paused = t.paused, e.volume = Number.isFinite(t.volume) ? t.volume : e.volume, n && n !== "error" && (e.errorKind = null), e.ready = Zt(t, n);
1282
1533
  }
1283
- function Bt(e, t) {
1534
+ function Zt(e, t) {
1284
1535
  return t === "error" || t === "loadstart" || t === "waiting" || t === "stalled" ? !1 : t === "canplay" || t === "canplaythrough" || t === "playing" ? !0 : e.readyState >= HTMLMediaElement.HAVE_CURRENT_DATA;
1285
1536
  }
1286
1537
  //#endregion
1287
1538
  //#region src/components/viewer-core/loadError.ts
1288
- var Vt = /* @__PURE__ */ new Map();
1289
- function Ht(e) {
1539
+ var Qt = /* @__PURE__ */ new Map();
1540
+ function $t(e) {
1290
1541
  return e === "not-found" ? "404" : "Load error";
1291
1542
  }
1292
- function Ut(e) {
1543
+ function en(e) {
1293
1544
  return e === "generic";
1294
1545
  }
1295
- function Wt(e) {
1296
- return Gt(e).then((e) => e ?? "generic");
1546
+ function tn(e) {
1547
+ return nn(e).then((e) => e ?? "generic");
1297
1548
  }
1298
- function Gt(e) {
1299
- let t = Vt.get(e);
1549
+ function nn(e) {
1550
+ let t = Qt.get(e);
1300
1551
  if (t) return t;
1301
- let n = Kt(e);
1302
- return Vt.set(e, n), n;
1552
+ let n = rn(e);
1553
+ return Qt.set(e, n), n;
1303
1554
  }
1304
- async function Kt(e) {
1305
- if (!qt(e)) return null;
1555
+ async function rn(e) {
1556
+ if (!an(e)) return null;
1306
1557
  try {
1307
1558
  let t = await fetch(e, { method: "HEAD" });
1308
1559
  return t.ok ? null : t.status === 404 ? "not-found" : "generic";
@@ -1310,12 +1561,12 @@ async function Kt(e) {
1310
1561
  return "generic";
1311
1562
  }
1312
1563
  }
1313
- function qt(e) {
1564
+ function an(e) {
1314
1565
  return /^(https?:\/\/|\/)/i.test(e);
1315
1566
  }
1316
1567
  //#endregion
1317
1568
  //#region src/components/viewer-core/mediaPlayback.ts
1318
- function Jt(e) {
1569
+ function on(e) {
1319
1570
  try {
1320
1571
  let t = e.play();
1321
1572
  t && typeof t.catch == "function" && t.catch(() => {});
@@ -1323,18 +1574,18 @@ function Jt(e) {
1323
1574
  }
1324
1575
  //#endregion
1325
1576
  //#region src/components/viewer-core/useMedia.ts
1326
- function Yt(e) {
1327
- let t = T({}), n = T({}), r = T({}), a = T({}), o = T({}), s = /* @__PURE__ */ new Map(), c = /* @__PURE__ */ new Map(), l = /* @__PURE__ */ new Set(), u = i(() => e.activeItem.value ? $(e.activeItem.value) : null), d = i(() => e.activeMediaItem.value ? $(e.activeMediaItem.value) : null), f = i(() => {
1577
+ function sn(e) {
1578
+ let t = D({}), n = D({}), r = D({}), a = D({}), o = D({}), s = /* @__PURE__ */ new Map(), c = /* @__PURE__ */ new Map(), l = /* @__PURE__ */ new Set(), u = i(() => e.activeItem.value ? $(e.activeItem.value) : null), d = i(() => e.activeMediaItem.value ? $(e.activeMediaItem.value) : null), f = i(() => {
1328
1579
  let t = /* @__PURE__ */ new Map();
1329
1580
  for (let n of e.items.value) t.set($(n), n);
1330
1581
  return t;
1331
- }), p = i(() => d.value ? r.value[d.value] ?? It : It), m = i(() => d.value ? p.value.duration : 0), h = i(() => m.value <= 0 ? 0 : Xt(p.value.currentTime / m.value * 100, 0, 100)), _ = i(() => u.value ? L(u.value) : null);
1332
- F(() => u.value, async () => {
1333
- await S();
1334
- }), F(() => e.itemCount.value, async () => {
1335
- await S();
1336
- }), F(() => e.loopFullscreenVideo.value, async () => {
1337
- await S();
1582
+ }), p = i(() => d.value ? r.value[d.value] ?? qt : qt), m = i(() => d.value ? p.value.duration : 0), h = i(() => m.value <= 0 ? 0 : cn(p.value.currentTime / m.value * 100, 0, 100)), g = i(() => u.value ? L(u.value) : null);
1583
+ I(() => u.value, async () => {
1584
+ await C();
1585
+ }), I(() => e.itemCount.value, async () => {
1586
+ await C();
1587
+ }), I(() => e.loopFullscreenVideo.value, async () => {
1588
+ await C();
1338
1589
  });
1339
1590
  function v(e, t) {
1340
1591
  if (t instanceof HTMLVideoElement) {
@@ -1351,49 +1602,54 @@ function Yt(e) {
1351
1602
  c.delete(e);
1352
1603
  }
1353
1604
  function b(e, r) {
1354
- r instanceof HTMLImageElement && Rt(r) && (t.value[e] = !0, n.value[e] = null, ne(e, r.currentSrc || r.src || X(e)));
1605
+ r instanceof HTMLImageElement && Yt(r) && (t.value[e] = !0, n.value[e] = null, J(e, r.currentSrc || r.src || ie(e)));
1355
1606
  }
1356
1607
  function x() {
1357
1608
  H(), a.value = {}, n.value = {}, t.value = {}, o.value = {}, r.value = {}, l.clear();
1358
1609
  }
1359
- async function S() {
1610
+ function S(e) {
1611
+ delete t.value[e], delete n.value[e], delete o.value[e], delete r.value[e], l.forEach((t) => {
1612
+ t.startsWith(`${e}|`) && l.delete(t);
1613
+ });
1614
+ }
1615
+ async function C() {
1360
1616
  if (!e.isEnabled.value) {
1361
1617
  H();
1362
1618
  return;
1363
1619
  }
1364
- await g();
1620
+ await _();
1365
1621
  let t = u.value;
1366
1622
  for (let [n, i] of s.entries()) {
1367
1623
  if (n !== t || r.value[n]?.errorKind) {
1368
1624
  V(i, n);
1369
1625
  continue;
1370
1626
  }
1371
- i.muted = !1, i.loop = e.loopFullscreenVideo.value, i.playsInline = !0, Jt(i), W(n, i);
1627
+ i.muted = !1, i.loop = e.loopFullscreenVideo.value, i.playsInline = !0, on(i), W(n, i);
1372
1628
  }
1373
1629
  for (let [e, n] of c.entries()) {
1374
1630
  if (e !== t || r.value[e]?.errorKind) {
1375
1631
  V(n, e);
1376
1632
  continue;
1377
1633
  }
1378
- Jt(n), W(e, n);
1634
+ on(n), W(e, n);
1379
1635
  }
1380
1636
  }
1381
- function C(e, t) {
1637
+ function w(e, t) {
1382
1638
  let n = t.currentTarget instanceof HTMLMediaElement ? t.currentTarget : t.target instanceof HTMLMediaElement ? t.target : null;
1383
1639
  if (n) {
1384
1640
  let i = r.value[e]?.ready ?? !1;
1385
1641
  W(e, n, t.type);
1386
1642
  let a = r.value[e]?.ready ?? !1;
1387
- !i && a && ne(e, n.currentSrc || n.src || X(e));
1643
+ !i && a && J(e, n.currentSrc || n.src || ie(e));
1388
1644
  }
1389
1645
  }
1390
- function w(e, r) {
1391
- t.value[e] = !0, n.value[e] = null, ne(e, r);
1646
+ function T(e, r) {
1647
+ t.value[e] = !0, n.value[e] = null, J(e, r);
1392
1648
  }
1393
1649
  async function E(r, i) {
1394
1650
  let a = Y(r) ?? e.activeItem.value;
1395
1651
  t.value[r] = !1, n.value[r] = "generic";
1396
- let o = await Wt(i);
1652
+ let o = await tn(i);
1397
1653
  n.value[r] = o, a && e.onAssetError?.({
1398
1654
  item: a,
1399
1655
  occurrenceKey: r,
@@ -1402,7 +1658,7 @@ function Yt(e) {
1402
1658
  surface: "fullscreen"
1403
1659
  });
1404
1660
  }
1405
- async function D(t, n) {
1661
+ async function ee(t, n) {
1406
1662
  let r = K(t), i = U(t), a = Y(t) ?? e.activeMediaItem.value ?? e.activeItem.value;
1407
1663
  if (r) {
1408
1664
  r.pause();
@@ -1411,7 +1667,7 @@ function Yt(e) {
1411
1667
  } catch {}
1412
1668
  }
1413
1669
  i.currentTime = 0, i.duration = 0, i.paused = !0, i.ready = !1, i.errorKind = "generic";
1414
- let o = await Wt(n);
1670
+ let o = await tn(n);
1415
1671
  i.errorKind = o, a && e.onAssetError?.({
1416
1672
  item: a,
1417
1673
  occurrenceKey: t,
@@ -1421,28 +1677,28 @@ function Yt(e) {
1421
1677
  });
1422
1678
  }
1423
1679
  function O(e, t, n) {
1424
- e.button !== 0 || Date.now() < n || J(s.get(t) ?? null);
1680
+ e.button !== 0 || Date.now() < n || re(s.get(t) ?? null);
1425
1681
  }
1426
1682
  function k(e, t, n) {
1427
- e.button !== 0 || Date.now() < n || J(K(t));
1683
+ e.button !== 0 || Date.now() < n || re(K(t));
1428
1684
  }
1429
1685
  function A(e) {
1430
1686
  let t = q(), n = d.value;
1431
1687
  if (!t || !n || !(e.target instanceof HTMLInputElement)) return;
1432
1688
  let r = Number.parseFloat(e.target.value);
1433
1689
  if (!Number.isFinite(r)) return;
1434
- let i = Xt(r, 0, m.value || 0);
1435
- G(n, i, t), t.currentTime = i;
1690
+ let i = cn(r, 0, m.value || 0);
1691
+ ne(n, i, t), t.currentTime = i;
1436
1692
  }
1437
1693
  function j(e) {
1438
1694
  let t = q(), n = d.value;
1439
1695
  if (!t || !n || !(e.target instanceof HTMLInputElement)) return;
1440
- let r = Xt(Number.parseFloat(e.target.value), 0, 1);
1696
+ let r = cn(Number.parseFloat(e.target.value), 0, 1);
1441
1697
  t.volume = r, t.muted = r <= 0, r > 0 && (o.value[n] = r), W(n, t);
1442
1698
  }
1443
1699
  function M() {
1444
1700
  let e = q(), t = d.value;
1445
- !e || !t || (e.muted || e.volume <= 0 ? (e.volume = te(t), e.muted = !1, o.value[t] = e.volume) : (o.value[t] = e.volume, e.muted = !0), W(t, e));
1701
+ !e || !t || (e.muted || e.volume <= 0 ? (e.volume = G(t), e.muted = !1, o.value[t] = e.volume) : (o.value[t] = e.volume, e.muted = !0), W(t, e));
1446
1702
  }
1447
1703
  function N(e) {
1448
1704
  return !!t.value[e] && !n.value[e];
@@ -1450,7 +1706,7 @@ function Yt(e) {
1450
1706
  function P(e) {
1451
1707
  return (r.value[e]?.ready ?? !1) && !r.value[e]?.errorKind;
1452
1708
  }
1453
- function I(e) {
1709
+ function F(e) {
1454
1710
  return e.url;
1455
1711
  }
1456
1712
  function L(e) {
@@ -1458,15 +1714,15 @@ function Yt(e) {
1458
1714
  }
1459
1715
  function R(e) {
1460
1716
  let t = L(e);
1461
- return t ? Ht(t) : null;
1717
+ return t ? $t(t) : null;
1462
1718
  }
1463
1719
  function z(e) {
1464
- return Ut(L(e));
1720
+ return en(L(e));
1465
1721
  }
1466
- function B(e) {
1722
+ function te(e) {
1467
1723
  return `${e}:${a.value[e] ?? 0}`;
1468
1724
  }
1469
- async function ee(e) {
1725
+ async function B(e) {
1470
1726
  if (!z(e)) return;
1471
1727
  t.value[e] = !1, n.value[e] = null;
1472
1728
  let r = U(e);
@@ -1474,7 +1730,7 @@ function Yt(e) {
1474
1730
  let i = K(e);
1475
1731
  i && V(i, e), l.forEach((t) => {
1476
1732
  t.startsWith(`${e}|`) && l.delete(t);
1477
- }), a.value[e] = (a.value[e] ?? 0) + 1, await g(), await S();
1733
+ }), a.value[e] = (a.value[e] ?? 0) + 1, await _(), await C();
1478
1734
  }
1479
1735
  function V(e, t) {
1480
1736
  e.pause();
@@ -1488,17 +1744,17 @@ function Yt(e) {
1488
1744
  for (let [e, t] of c.entries()) V(t, e);
1489
1745
  }
1490
1746
  function U(e) {
1491
- return r.value[e] || (r.value[e] = Lt()), r.value[e];
1747
+ return r.value[e] || (r.value[e] = Jt()), r.value[e];
1492
1748
  }
1493
1749
  function W(e, t, n) {
1494
- zt(U(e), t, n), !t.muted && t.volume > 0 && (o.value[e] = t.volume);
1750
+ Xt(U(e), t, n), !t.muted && t.volume > 0 && (o.value[e] = t.volume);
1495
1751
  }
1496
- function G(e, t, n) {
1752
+ function ne(e, t, n) {
1497
1753
  let r = U(e);
1498
1754
  r.currentTime = t, r.duration = Number.isFinite(n.duration) ? n.duration : r.duration, r.muted = n.muted, r.paused = n.paused, r.volume = Number.isFinite(n.volume) ? n.volume : r.volume;
1499
1755
  }
1500
- function te(e) {
1501
- return Xt(o.value[e] ?? 1, 0, 1);
1756
+ function G(e) {
1757
+ return cn(o.value[e] ?? 1, 0, 1);
1502
1758
  }
1503
1759
  function K(e) {
1504
1760
  return s.get(e) ?? c.get(e) ?? null;
@@ -1506,16 +1762,16 @@ function Yt(e) {
1506
1762
  function q() {
1507
1763
  return d.value ? K(d.value) : null;
1508
1764
  }
1509
- function J(e) {
1765
+ function re(e) {
1510
1766
  if (e) {
1511
1767
  if (e.paused) {
1512
- Jt(e);
1768
+ on(e);
1513
1769
  return;
1514
1770
  }
1515
1771
  e.pause();
1516
1772
  }
1517
1773
  }
1518
- function ne(t, n) {
1774
+ function J(t, n) {
1519
1775
  let r = Y(t) ?? e.activeMediaItem.value ?? e.activeItem.value;
1520
1776
  if (!r || !n) return;
1521
1777
  let i = `${t}|${n}`;
@@ -1529,27 +1785,27 @@ function Yt(e) {
1529
1785
  function Y(e) {
1530
1786
  return f.value.get(e) ?? null;
1531
1787
  }
1532
- function X(e) {
1788
+ function ie(e) {
1533
1789
  return Y(e)?.url ?? null;
1534
1790
  }
1535
1791
  return {
1536
- activeAssetErrorKind: _,
1792
+ activeAssetErrorKind: g,
1537
1793
  activeMediaDuration: m,
1538
1794
  activeMediaProgress: h,
1539
1795
  activeMediaState: p,
1540
1796
  getAssetErrorKind: L,
1541
1797
  getAssetErrorLabel: R,
1542
- getAssetRenderKey: B,
1543
- getImageSource: I,
1798
+ getAssetRenderKey: te,
1799
+ getImageSource: F,
1544
1800
  isImageReady: N,
1545
1801
  isMediaReady: P,
1546
1802
  canRetryAsset: z,
1547
1803
  mediaStates: r,
1548
1804
  onAudioCoverClick: k,
1549
1805
  onImageError: E,
1550
- onImageLoad: w,
1551
- onMediaError: D,
1552
- onMediaEvent: C,
1806
+ onImageLoad: T,
1807
+ onMediaError: ee,
1808
+ onMediaEvent: w,
1553
1809
  onMediaSeekInput: A,
1554
1810
  onMediaVolumeInput: j,
1555
1811
  onMediaVolumeToggle: M,
@@ -1557,15 +1813,16 @@ function Yt(e) {
1557
1813
  registerAudioElement: y,
1558
1814
  registerImageElement: b,
1559
1815
  registerVideoElement: v,
1816
+ resetAssetState: S,
1560
1817
  resetMediaState: x,
1561
- retryAsset: ee,
1562
- syncMediaPlayback: S
1818
+ retryAsset: B,
1819
+ syncMediaPlayback: C
1563
1820
  };
1564
1821
  }
1565
- function Xt(e, t, n) {
1822
+ function cn(e, t, n) {
1566
1823
  return Math.min(Math.max(e, t), n);
1567
1824
  }
1568
- function Zt(e, t, n = 2) {
1825
+ function ln(e, t, n = 2) {
1569
1826
  return t <= 0 ? {
1570
1827
  start: 0,
1571
1828
  end: -1
@@ -1574,14 +1831,14 @@ function Zt(e, t, n = 2) {
1574
1831
  end: Math.min(t - 1, e + n)
1575
1832
  };
1576
1833
  }
1577
- function Qt(e, t, n = 2) {
1578
- let r = Zt(t, e.length, n);
1834
+ function un(e, t, n = 2) {
1835
+ let r = ln(t, e.length, n);
1579
1836
  return r.end < r.start ? [] : e.slice(r.start, r.end + 1).map((e, t) => ({
1580
1837
  item: e,
1581
1838
  index: r.start + t
1582
1839
  }));
1583
1840
  }
1584
- function $t(e, t, n, r, i) {
1841
+ function dn(e, t, n, r, i) {
1585
1842
  return {
1586
1843
  transform: `translate3d(0, ${(e - t) * n + r}px, 0)`,
1587
1844
  transition: i ? "none" : "transform 320ms cubic-bezier(0.22, 1, 0.36, 1)"
@@ -1589,12 +1846,12 @@ function $t(e, t, n, r, i) {
1589
1846
  }
1590
1847
  //#endregion
1591
1848
  //#region src/components/viewer-core/useViewer.ts
1592
- function en(e, t, n = {}) {
1593
- let r = i(() => e.items), a = i(() => e.activeIndex ?? 0), o = i(() => e.errorMessage ?? null), s = i(() => e.loading ?? !1), c = i(() => e.hasNextPage ?? !1), l = i(() => e.loopFullscreenVideo ?? !0), u = i(() => e.paginationDetail ?? null), d = i(() => Nt({
1849
+ function fn(e, t, n = {}) {
1850
+ let r = i(() => e.items), a = i(() => e.activeIndex ?? 0), o = i(() => e.errorMessage ?? null), s = i(() => e.loading ?? !1), c = i(() => e.hasNextPage ?? !1), l = i(() => e.loopFullscreenVideo ?? !0), u = i(() => e.paginationDetail ?? null), d = i(() => Wt({
1594
1851
  itemCount: r.value.length,
1595
1852
  loading: s.value,
1596
1853
  phase: e.phase
1597
- })), f = i(() => !1), p = T(null), m = T(0), h = T(!1), g = T(1), _ = n.enabled ?? i(() => !0), v = null, y = 0, b = 0, x = 0, S = i(() => r.value.length === 0 ? 0 : P(a.value, 0, r.value.length - 1)), C = i(() => r.value[S.value] ?? null), w = i(() => C.value?.type === "audio" || C.value?.type === "video" ? C.value : null), E = Yt({
1854
+ })), f = i(() => !1), p = D(null), m = D(0), h = D(!1), g = D(1), _ = n.enabled ?? i(() => !0), v = null, y = 0, b = 0, x = 0, S = i(() => r.value.length === 0 ? 0 : N(a.value, 0, r.value.length - 1)), C = i(() => r.value[S.value] ?? null), w = i(() => C.value?.type === "audio" || C.value?.type === "video" ? C.value : null), T = sn({
1598
1855
  items: r,
1599
1856
  activeItem: C,
1600
1857
  activeMediaItem: w,
@@ -1603,164 +1860,165 @@ function en(e, t, n = {}) {
1603
1860
  loopFullscreenVideo: l,
1604
1861
  onAssetError: n.onAssetError,
1605
1862
  onAssetLoad: n.onAssetLoad
1606
- }), D = i(() => r.value.length > 0 && S.value === r.value.length - 1), O = i(() => Pt({
1863
+ }), E = i(() => r.value.length > 0 && S.value === r.value.length - 1), ee = i(() => Gt({
1607
1864
  errorMessage: o.value,
1608
1865
  hasItems: r.value.length > 0,
1609
1866
  hasNextPage: c.value,
1610
1867
  phase: d.value,
1611
1868
  surface: "fullscreen"
1612
- })), k = i(() => O.value?.kind ?? null), A = i(() => O.value?.message ?? null), j = i(() => Math.min(96, g.value * .15 || 96)), M = i(() => Zt(S.value, r.value.length)), N = i(() => Qt(r.value, S.value));
1613
- Ft({
1869
+ })), O = i(() => ee.value?.kind ?? null), k = i(() => ee.value?.message ?? null), A = i(() => Math.min(96, g.value * .15 || 96)), j = i(() => ln(S.value, r.value.length)), M = i(() => un(r.value, S.value));
1870
+ Kt({
1614
1871
  enabled: _,
1615
1872
  onDisable() {
1616
- U(), E.resetMediaState();
1873
+ H(), T.resetMediaState();
1617
1874
  },
1618
1875
  onEnable() {
1619
- return E.syncMediaPlayback();
1876
+ return T.syncMediaPlayback();
1620
1877
  },
1621
- onKeydown: G,
1622
- onResize: F
1878
+ onKeydown: W,
1879
+ onResize: P
1623
1880
  });
1624
- function P(e, t, n) {
1881
+ function N(e, t, n) {
1625
1882
  return Math.min(Math.max(e, t), n);
1626
1883
  }
1627
- function F() {
1884
+ function P() {
1628
1885
  g.value = p.value?.clientHeight || window.innerHeight || 1;
1629
1886
  }
1630
- function I(e) {
1631
- return r.value.length === 0 ? !1 : P(S.value + e, 0, r.value.length - 1) !== S.value;
1887
+ function F(e) {
1888
+ return r.value.length === 0 ? !1 : N(S.value + e, 0, r.value.length - 1) !== S.value;
1632
1889
  }
1633
- function L(e) {
1890
+ function I(e) {
1634
1891
  if (r.value.length === 0) return;
1635
- let n = P(S.value + e, 0, r.value.length - 1);
1892
+ let n = N(S.value + e, 0, r.value.length - 1);
1636
1893
  n !== S.value && t("update:activeIndex", n);
1637
1894
  }
1638
- function R(e) {
1895
+ function L(e) {
1639
1896
  let t = e > 0, n = e < 0;
1640
- return t && !I(-1) || n && !I(1) ? e * .24 : e;
1897
+ return t && !F(-1) || n && !F(1) ? e * .24 : e;
1898
+ }
1899
+ function R(e) {
1900
+ !_.value || r.value.length === 0 || e.pointerType === "mouse" || he(e.target) || (v = e.pointerId, y = e.clientY, m.value = 0, h.value = !0, p.value?.setPointerCapture?.(e.pointerId));
1641
1901
  }
1642
1902
  function z(e) {
1643
- !_.value || r.value.length === 0 || e.pointerType === "mouse" || fe(e.target) || (v = e.pointerId, y = e.clientY, m.value = 0, h.value = !0, p.value?.setPointerCapture?.(e.pointerId));
1903
+ !_.value || !h.value || v !== e.pointerId || (m.value = L(e.clientY - y));
1644
1904
  }
1645
- function B(e) {
1646
- !_.value || !h.value || v !== e.pointerId || (m.value = R(e.clientY - y));
1905
+ function te(e) {
1906
+ !_.value || v !== e.pointerId || (p.value?.releasePointerCapture?.(e.pointerId), V());
1647
1907
  }
1648
- function ee(e) {
1908
+ function B(e) {
1649
1909
  !_.value || v !== e.pointerId || (p.value?.releasePointerCapture?.(e.pointerId), H());
1650
1910
  }
1651
- function V(e) {
1652
- !_.value || v !== e.pointerId || (p.value?.releasePointerCapture?.(e.pointerId), U());
1911
+ function V() {
1912
+ Math.abs(m.value) >= A.value && (x = Date.now() + 250, I(m.value < 0 ? 1 : -1)), H();
1653
1913
  }
1654
1914
  function H() {
1655
- Math.abs(m.value) >= j.value && (x = Date.now() + 250, L(m.value < 0 ? 1 : -1)), U();
1656
- }
1657
- function U() {
1658
1915
  m.value = 0, h.value = !1, v = null;
1659
1916
  }
1660
- function W(e) {
1661
- if (!_.value || r.value.length === 0 || h.value || fe(e.target) || Math.abs(e.deltaY) < Math.max(Math.abs(e.deltaX), 24)) return;
1917
+ function U(e) {
1918
+ if (!_.value || r.value.length === 0 || h.value || he(e.target) || Math.abs(e.deltaY) < Math.max(Math.abs(e.deltaX), 24)) return;
1662
1919
  e.preventDefault();
1663
1920
  let t = Date.now();
1664
- t < b || (b = t + 400, L(e.deltaY > 0 ? 1 : -1));
1921
+ t < b || (b = t + 400, I(e.deltaY > 0 ? 1 : -1));
1665
1922
  }
1666
- function G(e) {
1667
- !_.value || r.value.length === 0 || Q(e.target) || ((e.key === "ArrowDown" || e.key === "PageDown") && (e.preventDefault(), L(1)), (e.key === "ArrowUp" || e.key === "PageUp") && (e.preventDefault(), L(-1)));
1923
+ function W(e) {
1924
+ !_.value || r.value.length === 0 || me(e.target) || ((e.key === "ArrowDown" || e.key === "PageDown") && (e.preventDefault(), I(1)), (e.key === "ArrowUp" || e.key === "PageUp") && (e.preventDefault(), I(-1)));
1668
1925
  }
1669
- function te(e, t) {
1670
- E.onVideoClick(e, t, x);
1926
+ function ne(e, t) {
1927
+ T.onVideoClick(e, t, x);
1671
1928
  }
1672
- function K(e, t) {
1673
- E.onAudioCoverClick(e, t, x);
1929
+ function G(e, t) {
1930
+ T.onAudioCoverClick(e, t, x);
1674
1931
  }
1675
- function q(e) {
1676
- E.onMediaSeekInput(e);
1932
+ function K(e) {
1933
+ T.onMediaSeekInput(e);
1677
1934
  }
1678
- function J(e) {
1679
- E.onMediaVolumeInput(e);
1935
+ function q(e) {
1936
+ T.onMediaVolumeInput(e);
1680
1937
  }
1681
- function ne() {
1682
- E.onMediaVolumeToggle();
1938
+ function re() {
1939
+ T.onMediaVolumeToggle();
1683
1940
  }
1684
- function Y(e) {
1941
+ function J(e) {
1685
1942
  return e.type === "image" || e.type === "video";
1686
1943
  }
1687
- function X(e) {
1944
+ function Y(e) {
1688
1945
  return e.type === "audio";
1689
1946
  }
1690
- function re(e) {
1691
- return $t(e, S.value, g.value, m.value, h.value);
1947
+ function ie(e) {
1948
+ return dn(e, S.value, g.value, m.value, h.value);
1692
1949
  }
1693
1950
  return {
1694
1951
  activeItem: C,
1695
- activeAssetErrorKind: E.activeAssetErrorKind,
1696
- activeMediaDuration: E.activeMediaDuration,
1952
+ activeAssetErrorKind: T.activeAssetErrorKind,
1953
+ activeMediaDuration: T.activeMediaDuration,
1697
1954
  activeMediaItem: w,
1698
- activeMediaProgress: E.activeMediaProgress,
1699
- activeMediaState: E.activeMediaState,
1700
- canRetryAsset: E.canRetryAsset,
1955
+ activeMediaProgress: T.activeMediaProgress,
1956
+ activeMediaState: T.activeMediaState,
1957
+ canRetryAsset: T.canRetryAsset,
1701
1958
  canRetryInitialLoad: f,
1702
1959
  errorMessage: o,
1703
- getAssetErrorKind: E.getAssetErrorKind,
1704
- getAssetErrorLabel: E.getAssetErrorLabel,
1705
- getAssetRenderKey: E.getAssetRenderKey,
1706
- formatPlaybackTime: Mt,
1707
- getImageSource: E.getImageSource,
1708
- getSlideStyle: re,
1960
+ getAssetErrorKind: T.getAssetErrorKind,
1961
+ getAssetErrorLabel: T.getAssetErrorLabel,
1962
+ getAssetRenderKey: T.getAssetRenderKey,
1963
+ formatPlaybackTime: Ut,
1964
+ getImageSource: T.getImageSource,
1965
+ getSlideStyle: ie,
1709
1966
  hasNextPage: c,
1710
- isAtEnd: D,
1711
- isAudio: X,
1712
- isVisual: Y,
1967
+ isAtEnd: E,
1968
+ isAudio: Y,
1969
+ isVisual: J,
1713
1970
  items: r,
1714
1971
  loading: s,
1715
- mediaStates: E.mediaStates,
1716
- isImageReady: E.isImageReady,
1717
- isMediaReady: E.isMediaReady,
1718
- onAudioCoverClick: K,
1719
- onImageError: E.onImageError,
1720
- onImageLoad: E.onImageLoad,
1721
- onMediaEvent: E.onMediaEvent,
1722
- onMediaError: E.onMediaError,
1723
- onMediaSeekInput: q,
1724
- onMediaVolumeInput: J,
1725
- onMediaVolumeToggle: ne,
1726
- onPointerCancel: V,
1727
- onPointerDown: z,
1728
- onPointerMove: B,
1729
- onPointerUp: ee,
1730
- onVideoClick: te,
1731
- onWheel: W,
1732
- registerAudioElement: E.registerAudioElement,
1733
- registerImageElement: E.registerImageElement,
1734
- registerVideoElement: E.registerVideoElement,
1735
- renderedItems: N,
1736
- renderedRange: M,
1972
+ mediaStates: T.mediaStates,
1973
+ isImageReady: T.isImageReady,
1974
+ isMediaReady: T.isMediaReady,
1975
+ onAudioCoverClick: G,
1976
+ onImageError: T.onImageError,
1977
+ onImageLoad: T.onImageLoad,
1978
+ onMediaEvent: T.onMediaEvent,
1979
+ onMediaError: T.onMediaError,
1980
+ onMediaSeekInput: K,
1981
+ onMediaVolumeInput: q,
1982
+ onMediaVolumeToggle: re,
1983
+ onPointerCancel: B,
1984
+ onPointerDown: R,
1985
+ onPointerMove: z,
1986
+ onPointerUp: te,
1987
+ onVideoClick: ne,
1988
+ onWheel: U,
1989
+ registerAudioElement: T.registerAudioElement,
1990
+ registerImageElement: T.registerImageElement,
1991
+ registerVideoElement: T.registerVideoElement,
1992
+ renderedItems: M,
1993
+ renderedRange: j,
1737
1994
  resolvedActiveIndex: S,
1995
+ resetAssetState: T.resetAssetState,
1738
1996
  retryInitialLoad: async () => {},
1739
- retryAsset: E.retryAsset,
1997
+ retryAsset: T.retryAsset,
1740
1998
  stageRef: p,
1741
- statusKind: k,
1742
- statusMessage: A,
1999
+ statusKind: O,
2000
+ statusMessage: k,
1743
2001
  paginationDetail: u,
1744
2002
  phase: d
1745
2003
  };
1746
2004
  }
1747
2005
  //#endregion
1748
2006
  //#region src/components/viewer-core/theme.ts
1749
- var tn = "bg-[linear-gradient(180deg,#0a0b10,#05060a)]", nn = "bg-[linear-gradient(180deg,#0b0c11,#06070b)]", rn = {
2007
+ var pn = "bg-[linear-gradient(180deg,#0a0b10,#05060a)]", mn = "bg-[linear-gradient(180deg,#0b0c11,#06070b)]", hn = {
1750
2008
  image: !0,
1751
2009
  video: !0,
1752
2010
  audio: !0,
1753
2011
  other: !0
1754
2012
  };
1755
- function an(e) {
1756
- return rn[e], tn;
2013
+ function gn(e) {
2014
+ return hn[e], pn;
1757
2015
  }
1758
- function on(e) {
1759
- return rn[e], nn;
2016
+ function _n(e) {
2017
+ return hn[e], mn;
1760
2018
  }
1761
2019
  //#endregion
1762
2020
  //#region src/components/viewer-core/dominantImageTone.ts
1763
- function sn(e) {
2021
+ function vn(e) {
1764
2022
  if (e.naturalWidth <= 0 || e.naturalHeight <= 0) return null;
1765
2023
  let t = document.createElement("canvas"), n = t.getContext("2d", { willReadFrequently: !0 });
1766
2024
  if (!n) return null;
@@ -1775,21 +2033,21 @@ function sn(e) {
1775
2033
  r += d, i += s * d, a += c * d, o += l * d;
1776
2034
  }
1777
2035
  return r <= 0 ? null : {
1778
- r: cn(Math.round(i / r)),
1779
- g: cn(Math.round(a / r)),
1780
- b: cn(Math.round(o / r))
2036
+ r: yn(Math.round(i / r)),
2037
+ g: yn(Math.round(a / r)),
2038
+ b: yn(Math.round(o / r))
1781
2039
  };
1782
2040
  } catch {
1783
2041
  return null;
1784
2042
  }
1785
2043
  }
1786
- function cn(e) {
2044
+ function yn(e) {
1787
2045
  return Math.min(235, Math.max(26, e));
1788
2046
  }
1789
2047
  //#endregion
1790
2048
  //#region src/components/viewer-core/useFullscreenDominantTone.ts
1791
- function ln(e) {
1792
- let t = T({}), n = i(() => e.activeItem.value ? e.getItemKey(e.activeItem.value) : null), r = i(() => !e.showDominantImageTone.value || e.activeItem.value?.type !== "image" || !n.value || !e.isImageReady(n.value) ? null : t.value[n.value] ?? null), a = i(() => {
2049
+ function bn(e) {
2050
+ let t = D({}), n = i(() => e.activeItem.value ? e.getItemKey(e.activeItem.value) : null), r = i(() => !e.showDominantImageTone.value || e.activeItem.value?.type !== "image" || !n.value || !e.isImageReady(n.value) ? null : t.value[n.value] ?? null), a = i(() => {
1793
2051
  if (!r.value) return;
1794
2052
  let { r: e, g: t, b: n } = r.value;
1795
2053
  return { background: `radial-gradient(circle at top center, rgba(${e},${t},${n},0.34) 0%, transparent 44%), linear-gradient(180deg,#0a0b10,#05060a)` };
@@ -1798,12 +2056,12 @@ function ln(e) {
1798
2056
  let { r: e, g: t, b: n } = r.value;
1799
2057
  return { background: `radial-gradient(circle at center, rgba(${e},${t},${n},0.42) 0%, transparent 44%), linear-gradient(180deg,#0b0c11,#06070b)` };
1800
2058
  });
1801
- F(() => e.showDominantImageTone.value, (e) => {
2059
+ I(() => e.showDominantImageTone.value, (e) => {
1802
2060
  e || (t.value = {});
1803
2061
  });
1804
2062
  function s(n, r) {
1805
2063
  if (!e.showDominantImageTone.value) return;
1806
- let i = sn(r);
2064
+ let i = vn(r);
1807
2065
  i && (t.value[n] = i);
1808
2066
  }
1809
2067
  return {
@@ -1814,7 +2072,7 @@ function ln(e) {
1814
2072
  }
1815
2073
  //#endregion
1816
2074
  //#region src/components/SurfaceEmptyState.vue?vue&type=script&setup=true&lang.ts
1817
- var un = ["data-surface"], dn = ["data-surface"], fn = /* @__PURE__ */ d({
2075
+ var xn = ["data-surface"], Sn = ["data-surface"], Cn = /* @__PURE__ */ d({
1818
2076
  inheritAttrs: !1,
1819
2077
  __name: "SurfaceEmptyState",
1820
2078
  props: {
@@ -1823,36 +2081,36 @@ var un = ["data-surface"], dn = ["data-surface"], fn = /* @__PURE__ */ d({
1823
2081
  surface: {}
1824
2082
  },
1825
2083
  setup(e) {
1826
- let t = M();
1827
- return (n, r) => e.mode === "inline" ? (S(), s("div", h({ key: 0 }, j(t), {
2084
+ let t = N();
2085
+ return (n, r) => e.mode === "inline" ? (w(), s("div", g({ key: 0 }, M(t), {
1828
2086
  "data-testid": "vibe-empty-state-inline",
1829
2087
  "data-surface": e.surface,
1830
2088
  class: ["pointer-events-none absolute z-[4] text-center", e.surface === "grid" ? "inset-x-0 top-[clamp(6rem,22vh,11rem)] flex justify-center px-6" : "inset-0 grid place-items-center px-[clamp(2rem,4vw,3rem)] py-[clamp(2rem,4vw,3rem)]"]
1831
- }), [D(n.$slots, "default", {}, () => [c("p", { class: _(["m-0 text-[0.82rem] font-medium tracking-[0.08em]", e.surface === "grid" ? "text-[#f7f1ea]/58" : "text-[#f7f1ea]/64"]) }, k(e.message), 3)])], 16, un)) : (S(), s("div", h({ key: 1 }, j(t), { class: ["pointer-events-none absolute z-[4]", e.surface === "grid" ? "inset-x-0 bottom-0 flex justify-center px-6" : "bottom-[1.8rem] left-1/2 -translate-x-1/2 max-[720px]:bottom-[1.3rem]"] }), [D(n.$slots, "default", {}, () => [c("span", {
2089
+ }), [O(n.$slots, "default", {}, () => [c("p", { class: v(["m-0 text-[0.82rem] font-medium tracking-[0.08em]", e.surface === "grid" ? "text-[#f7f1ea]/58" : "text-[#f7f1ea]/64"]) }, A(e.message), 3)])], 16, xn)) : (w(), s("div", g({ key: 1 }, M(t), { class: ["pointer-events-none absolute z-[4]", e.surface === "grid" ? "inset-x-0 bottom-0 flex justify-center px-6" : "bottom-[1.8rem] left-1/2 -translate-x-1/2 max-[720px]:bottom-[1.3rem]"] }), [O(n.$slots, "default", {}, () => [c("span", {
1832
2090
  "data-testid": "vibe-empty-state-badge",
1833
2091
  "data-surface": e.surface,
1834
- class: _(["inline-flex items-center border border-white/14 backdrop-blur-[18px]", e.surface === "grid" ? "bg-black/55 px-4 py-3 text-[0.82rem] font-medium tracking-[0.08em] text-[#f7f1ea]/72" : "w-auto bg-black/40 px-5 py-3 text-[0.82rem] font-medium tracking-[0.08em] text-[#f7f1ea]/74 max-[720px]:w-[calc(100%-2.5rem)] max-[720px]:justify-center"])
1835
- }, k(e.message), 11, dn)])], 16));
2092
+ class: v(["inline-flex items-center border border-white/14 backdrop-blur-[18px]", e.surface === "grid" ? "bg-black/55 px-4 py-3 text-[0.82rem] font-medium tracking-[0.08em] text-[#f7f1ea]/72" : "w-auto bg-black/40 px-5 py-3 text-[0.82rem] font-medium tracking-[0.08em] text-[#f7f1ea]/74 max-[720px]:w-[calc(100%-2.5rem)] max-[720px]:justify-center"])
2093
+ }, A(e.message), 11, Sn)])], 16));
1836
2094
  }
1837
- }), pn = { class: "relative h-full min-h-0 overflow-hidden bg-[#05060a] text-[#f7f1ea]" }, mn = {
2095
+ }), wn = { class: "relative h-full min-h-0 overflow-hidden bg-[#05060a] text-[#f7f1ea]" }, Tn = {
1838
2096
  key: 0,
1839
2097
  class: "relative h-full min-h-0"
1840
- }, hn = [
2098
+ }, En = [
1841
2099
  "data-item-id",
1842
2100
  "data-occurrence-key",
1843
2101
  "data-index",
1844
2102
  "data-active",
1845
2103
  "aria-hidden"
1846
- ], gn = {
2104
+ ], Dn = {
1847
2105
  key: 0,
1848
2106
  "data-testid": "vibe-asset-spinner",
1849
2107
  class: "pointer-events-none absolute inset-0 z-[2] grid place-items-center"
1850
- }, _n = { class: "inline-flex h-12 w-12 items-center justify-center rounded-full bg-black/45 shadow-[0_18px_40px_-18px_rgba(0,0,0,0.85)] backdrop-blur-[18px]" }, vn = ["data-kind"], yn = { class: "grid justify-items-center gap-4 border border-white/14 bg-black/45 px-8 py-7 text-center backdrop-blur-[18px]" }, bn = { class: "m-0 text-[0.82rem] font-bold uppercase tracking-[0.28em] text-[#f7f1ea]/70" }, xn = ["onClick"], Sn = [
2108
+ }, On = { class: "inline-flex h-12 w-12 items-center justify-center rounded-full bg-black/45 shadow-[0_18px_40px_-18px_rgba(0,0,0,0.85)] backdrop-blur-[18px]" }, kn = ["data-kind"], An = { class: "grid justify-items-center gap-4 border border-white/14 bg-black/45 px-8 py-7 text-center backdrop-blur-[18px]" }, jn = { class: "m-0 text-[0.82rem] font-bold uppercase tracking-[0.28em] text-[#f7f1ea]/70" }, Mn = ["onClick"], Nn = [
1851
2109
  "src",
1852
2110
  "alt",
1853
2111
  "onLoad",
1854
2112
  "onError"
1855
- ], Cn = [
2113
+ ], Pn = [
1856
2114
  "loop",
1857
2115
  "src",
1858
2116
  "preload",
@@ -1871,15 +2129,15 @@ var un = ["data-surface"], dn = ["data-surface"], fn = /* @__PURE__ */ d({
1871
2129
  "onStalled",
1872
2130
  "onTimeupdate",
1873
2131
  "onWaiting"
1874
- ], wn = { class: "relative grid aspect-square w-[clamp(320px,46vw,560px)] max-w-[calc(100vw-2.5rem)] place-items-center" }, Tn = [
2132
+ ], Fn = { class: "relative grid aspect-square w-[clamp(320px,46vw,560px)] max-w-[calc(100vw-2.5rem)] place-items-center" }, In = [
1875
2133
  "aria-label",
1876
2134
  "disabled",
1877
2135
  "onClick"
1878
- ], En = { class: "relative z-[1] inline-flex min-h-[4.25rem] min-w-[4.25rem] items-center justify-center border border-white/18 bg-emerald-500/12 p-4 backdrop-blur-[20px]" }, Dn = { class: "pointer-events-none absolute bottom-4 right-4 inline-flex h-10 w-10 items-center justify-center border border-white/14 bg-black/50 backdrop-blur-[18px]" }, On = {
2136
+ ], Ln = { class: "relative z-[1] inline-flex min-h-[4.25rem] min-w-[4.25rem] items-center justify-center border border-white/18 bg-emerald-500/12 p-4 backdrop-blur-[20px]" }, Rn = { class: "pointer-events-none absolute bottom-4 right-4 inline-flex h-10 w-10 items-center justify-center border border-white/14 bg-black/50 backdrop-blur-[18px]" }, zn = {
1879
2137
  key: 0,
1880
2138
  "data-testid": "vibe-asset-spinner",
1881
2139
  class: "pointer-events-none absolute inset-0 z-[3] grid place-items-center"
1882
- }, kn = { class: "inline-flex h-12 w-12 items-center justify-center rounded-full bg-black/45 shadow-[0_18px_40px_-18px_rgba(0,0,0,0.85)] backdrop-blur-[18px]" }, An = ["data-kind"], jn = { class: "m-0 text-[0.82rem] font-bold uppercase tracking-[0.28em] text-[#f7f1ea]/70" }, Mn = ["onClick"], Nn = [
2140
+ }, Bn = { class: "inline-flex h-12 w-12 items-center justify-center rounded-full bg-black/45 shadow-[0_18px_40px_-18px_rgba(0,0,0,0.85)] backdrop-blur-[18px]" }, Vn = ["data-kind"], Hn = { class: "m-0 text-[0.82rem] font-bold uppercase tracking-[0.28em] text-[#f7f1ea]/70" }, Un = ["onClick"], Wn = [
1883
2141
  "src",
1884
2142
  "preload",
1885
2143
  "onCanplay",
@@ -1895,26 +2153,26 @@ var un = ["data-surface"], dn = ["data-surface"], fn = /* @__PURE__ */ d({
1895
2153
  "onStalled",
1896
2154
  "onTimeupdate",
1897
2155
  "onWaiting"
1898
- ], Pn = {
2156
+ ], Gn = {
1899
2157
  key: 2,
1900
2158
  class: "relative z-[1] grid w-full max-w-[1100px] justify-items-center gap-6 px-[clamp(2rem,4vw,3rem)] py-[clamp(2rem,4vw,3rem)] text-center"
1901
- }, Fn = { class: "inline-flex min-h-[4.25rem] min-w-[4.25rem] items-center justify-center border border-white/18 bg-white/8 p-4 backdrop-blur-[20px]" }, In = {
2159
+ }, Kn = { class: "inline-flex min-h-[4.25rem] min-w-[4.25rem] items-center justify-center border border-white/18 bg-white/8 p-4 backdrop-blur-[20px]" }, qn = {
1902
2160
  key: 0,
1903
2161
  "data-testid": "vibe-fullscreen-overlay",
1904
2162
  class: "pointer-events-none absolute inset-0 z-[6]"
1905
- }, Ln = { class: "h-full w-full" }, Rn = {
2163
+ }, Jn = { class: "h-full w-full" }, Yn = {
1906
2164
  key: 1,
1907
2165
  "data-testid": "vibe-forward-fill-placeholder",
1908
2166
  class: "grid h-full min-h-0 place-items-center px-6 text-center"
1909
- }, zn = { class: "grid justify-items-center gap-4 border border-white/14 bg-black/40 px-8 py-7 backdrop-blur-[18px]" }, Bn = { class: "inline-flex h-12 w-12 items-center justify-center rounded-full bg-black/45 shadow-[0_18px_40px_-18px_rgba(0,0,0,0.85)]" }, Vn = { class: "m-0 text-[0.78rem] font-bold uppercase tracking-[0.24em] text-[#f7f1ea]/72" }, Hn = {
2167
+ }, Xn = { class: "grid justify-items-center gap-4 border border-white/14 bg-black/40 px-8 py-7 backdrop-blur-[18px]" }, Zn = { class: "inline-flex h-12 w-12 items-center justify-center rounded-full bg-black/45 shadow-[0_18px_40px_-18px_rgba(0,0,0,0.85)]" }, Qn = { class: "m-0 text-[0.78rem] font-bold uppercase tracking-[0.24em] text-[#f7f1ea]/72" }, $n = {
1910
2168
  key: 0,
1911
2169
  "data-testid": "vibe-fullscreen-aside",
1912
2170
  class: "h-full min-h-0 overflow-hidden border-l border-white/10 bg-black/45 backdrop-blur-[18px]"
1913
- }, Un = { class: "h-full min-h-0 overflow-y-auto overscroll-y-contain" }, Wn = {
2171
+ }, er = { class: "h-full min-h-0 overflow-y-auto overscroll-y-contain" }, tr = {
1914
2172
  key: 0,
1915
2173
  "data-testid": "vibe-fullscreen-aside",
1916
2174
  class: "absolute inset-y-0 right-0 z-[6] w-full max-w-[22rem] overflow-hidden border-l border-white/10 bg-black/82 backdrop-blur-[18px]"
1917
- }, Gn = { class: "h-full min-h-0 overflow-y-auto overscroll-y-contain" }, Kn = 1280, qn = 768, Jn = /* @__PURE__ */ d({
2175
+ }, nr = { class: "h-full min-h-0 overflow-y-auto overscroll-y-contain" }, rr = 1280, ir = 768, ar = /* @__PURE__ */ d({
1918
2176
  __name: "FullscreenSurface",
1919
2177
  props: {
1920
2178
  active: {
@@ -1966,66 +2224,84 @@ var un = ["data-surface"], dn = ["data-surface"], fn = /* @__PURE__ */ d({
1966
2224
  },
1967
2225
  emits: ["back-to-list", "update:activeIndex"],
1968
2226
  setup(e, { emit: n }) {
1969
- let d = e, p = N(), m = n, g = en(d, (e, t) => {
2227
+ let d = e, f = P(), m = n, h = fn(d, (e, t) => {
1970
2228
  m("update:activeIndex", t);
1971
2229
  }, {
1972
- enabled: A(d, "active"),
2230
+ enabled: j(d, "active"),
1973
2231
  onAssetError: d.reportAssetError ?? void 0,
1974
2232
  onAssetLoad: d.reportAssetLoad ?? void 0
1975
- }), C = T(typeof window > "u" ? Kn : window.innerWidth || Kn), w = Dt({
1976
- active: A(d, "active"),
1977
- resolvedActiveIndex: g.resolvedActiveIndex,
1978
- viewer: g
1979
- }), M = i(() => an(g.activeItem.value?.type ?? "image")), { activeSlideToneStyle: P, activeStageToneStyle: F, updateFromImageElement: I } = ln({
1980
- activeItem: g.activeItem,
1981
- getItemKey: w.getItemKey,
1982
- isImageReady: g.isImageReady,
1983
- showDominantImageTone: A(d, "showDominantImageTone")
1984
- }), R = i(() => g.activeMediaItem.value && !g.activeAssetErrorKind.value ? "bottom-[5.8rem] max-[720px]:bottom-[7.4rem]" : "bottom-[1.8rem] max-[720px]:bottom-[1.3rem]"), B = i(() => !!g.activeMediaItem.value && !g.activeAssetErrorKind.value), ee = i(() => C.value < qn ? "vertical" : "horizontal"), V = i(() => B.value ? "pb-[5.75rem] max-[720px]:pb-[7rem]" : ""), H = i(() => d.activeIndex >= d.items.length && (d.loading || d.hasNextPage)), U = i(() => d.hasNextPage ? "Loading more items" : g.statusMessage.value ?? "Loading more items"), W = i(() => {
1985
- let e = g.activeItem.value;
2233
+ }), _ = D(typeof window > "u" ? rr : window.innerWidth || rr), C = Rt({
2234
+ active: j(d, "active"),
2235
+ items: h.items,
2236
+ resolvedActiveIndex: h.resolvedActiveIndex,
2237
+ viewer: h
2238
+ }), T = i(() => gn(h.activeItem.value?.type ?? "image")), { activeSlideToneStyle: E, activeStageToneStyle: N, updateFromImageElement: F } = bn({
2239
+ activeItem: h.activeItem,
2240
+ getItemKey: C.getItemKey,
2241
+ isImageReady: h.isImageReady,
2242
+ showDominantImageTone: j(d, "showDominantImageTone")
2243
+ }), I = i(() => h.activeMediaItem.value && !h.activeAssetErrorKind.value ? "bottom-[5.8rem] max-[720px]:bottom-[7.4rem]" : "bottom-[1.8rem] max-[720px]:bottom-[1.3rem]"), L = i(() => !!h.activeMediaItem.value && !h.activeAssetErrorKind.value), z = i(() => _.value < ir ? "vertical" : "horizontal"), B = i(() => L.value ? "pb-[5.75rem] max-[720px]:pb-[7rem]" : ""), V = i(() => d.activeIndex >= d.items.length && (d.loading || d.hasNextPage)), H = i(() => d.hasNextPage ? "Loading more items" : h.statusMessage.value ?? "Loading more items"), U = i(() => {
2244
+ let e = h.activeItem.value;
1986
2245
  return e ? {
1987
2246
  hasNextPage: d.hasNextPage,
1988
- index: g.resolvedActiveIndex.value,
2247
+ index: h.resolvedActiveIndex.value,
1989
2248
  item: e,
1990
2249
  loading: d.loading,
1991
2250
  paginationDetail: d.paginationDetail,
1992
2251
  total: d.items.length
1993
2252
  } : null;
1994
- }), G = i(() => !W.value || !p["fullscreen-header-actions"] ? [] : p["fullscreen-header-actions"](W.value)), te = i(() => !W.value || !p["fullscreen-aside"] ? [] : p["fullscreen-aside"](W.value)), K = i(() => !d.showStatusBadges || !W.value || !g.statusKind.value || !g.statusMessage.value ? null : {
1995
- ...W.value,
1996
- kind: g.statusKind.value,
1997
- message: g.statusMessage.value
1998
- }), q = i(() => !K.value || !p["fullscreen-status"] ? [] : p["fullscreen-status"](K.value)), J = i(() => ({
1999
- gridTemplateColumns: X.value ? "minmax(0, 1fr) 22rem" : "minmax(0, 1fr) 0rem",
2253
+ }), W = i(() => !U.value || !f["fullscreen-header-actions"] ? [] : f["fullscreen-header-actions"](U.value)), ne = i(() => !U.value || !f["fullscreen-aside"] ? [] : f["fullscreen-aside"](U.value)), G = i(() => !d.showStatusBadges || !U.value || !h.statusKind.value || !h.statusMessage.value ? null : {
2254
+ ...U.value,
2255
+ kind: h.statusKind.value,
2256
+ message: h.statusMessage.value
2257
+ }), K = i(() => !G.value || !f["fullscreen-status"] ? [] : f["fullscreen-status"](G.value)), q = i(() => ({
2258
+ gridTemplateColumns: Y.value ? "minmax(0, 1fr) 22rem" : "minmax(0, 1fr) 0rem",
2000
2259
  transition: "grid-template-columns 320ms cubic-bezier(0.22, 1, 0.36, 1)"
2001
- })), ne = i(() => Ot(G.value)), Y = i(() => Ot(te.value)), X = i(() => Y.value && C.value >= Kn), se = i(() => Y.value && !X.value), ce = i(() => Ot(q.value)), { emptyStateProps: Z, showBadgeEmptyState: le, showCustomEmptyState: ue, showInlineEmptyState: de } = jt({
2002
- emptyStateMode: A(d, "emptyStateMode"),
2260
+ })), re = i(() => zt(W.value)), J = i(() => zt(ne.value)), Y = i(() => J.value && _.value >= rr), ie = i(() => J.value && !Y.value), ae = i(() => zt(K.value)), { emptyStateProps: X, showBadgeEmptyState: ue, showCustomEmptyState: de, showInlineEmptyState: Z } = Ht({
2261
+ emptyStateMode: j(d, "emptyStateMode"),
2003
2262
  itemCount: i(() => d.items.length),
2004
- loading: A(d, "loading"),
2005
- renderSlot: p["empty-state"],
2263
+ loading: j(d, "loading"),
2264
+ renderSlot: f["empty-state"],
2006
2265
  surface: "fullscreen"
2007
2266
  });
2008
- x(() => {
2009
- window.addEventListener("resize", Q);
2010
- }), b(() => {
2011
- window.removeEventListener("resize", Q);
2267
+ S(() => {
2268
+ window.addEventListener("resize", fe);
2269
+ }), x(() => {
2270
+ window.removeEventListener("resize", fe);
2012
2271
  });
2013
- function Q() {
2014
- C.value = window.innerWidth || Kn;
2272
+ function fe() {
2273
+ _.value = window.innerWidth || rr;
2015
2274
  }
2016
- function fe(e, t, n) {
2017
- g.onImageLoad(t, n);
2275
+ function pe(e, t, n) {
2276
+ C.settleBackgroundPreload(t), h.onImageLoad(t, n);
2018
2277
  let r = e.currentTarget;
2019
- r instanceof HTMLImageElement && me(t, r);
2020
- }
2021
- function pe(e, t) {
2022
- g.registerImageElement(e, t), t instanceof HTMLImageElement && me(e, t);
2278
+ r instanceof HTMLImageElement && ye(t, r);
2023
2279
  }
2024
- function me(e, t) {
2025
- I(e, t);
2280
+ async function me(e, t) {
2281
+ C.settleBackgroundPreload(e), await h.onImageError(e, t);
2026
2282
  }
2027
2283
  function he(e, t) {
2028
- if (g.onMediaEvent(t, e), !d.loopFullscreenVideo) return;
2284
+ C.registerImageElement(e, t), h.registerImageElement(e, t), t instanceof HTMLImageElement && ye(e, t);
2285
+ }
2286
+ function ge(e, t) {
2287
+ C.registerMediaElement(e, t), h.registerVideoElement(e, t);
2288
+ }
2289
+ function _e(e, t) {
2290
+ C.registerMediaElement(e, t), h.registerAudioElement(e, t);
2291
+ }
2292
+ async function ve(e, t) {
2293
+ C.settleBackgroundPreload(e), await h.onMediaError(e, t);
2294
+ }
2295
+ function Q(e, t) {
2296
+ h.onMediaEvent(e, t);
2297
+ let n = t.currentTarget, r = typeof HTMLMediaElement > "u" ? 1 : HTMLMediaElement.HAVE_METADATA;
2298
+ n instanceof HTMLMediaElement && n.readyState >= r && C.settleBackgroundPreload(e);
2299
+ }
2300
+ function ye(e, t) {
2301
+ F(e, t);
2302
+ }
2303
+ function be(e, t) {
2304
+ if (Q(t, e), !d.loopFullscreenVideo) return;
2029
2305
  let n = e.currentTarget;
2030
2306
  if (!(n instanceof HTMLVideoElement)) return;
2031
2307
  try {
@@ -2034,182 +2310,182 @@ var un = ["data-surface"], dn = ["data-surface"], fn = /* @__PURE__ */ d({
2034
2310
  let r = n.play();
2035
2311
  r && typeof r.catch == "function" && r.catch(() => {});
2036
2312
  }
2037
- return (e, n) => (S(), s("div", pn, [
2313
+ return (e, n) => (w(), s("div", wn, [
2038
2314
  c("div", {
2039
- class: _(["absolute inset-0 transition-[background] duration-200", M.value]),
2040
- style: y(j(F))
2315
+ class: v(["absolute inset-0 transition-[background] duration-200", T.value]),
2316
+ style: b(M(N))
2041
2317
  }, null, 6),
2042
2318
  c("div", {
2043
2319
  class: "relative z-[1] grid h-full min-h-0",
2044
- style: y(J.value)
2320
+ style: b(q.value)
2045
2321
  }, [c("div", {
2046
2322
  ref: "viewer.stageRef",
2047
2323
  "data-testid": "vibe-stage",
2048
2324
  class: "relative h-full min-h-0 touch-none overflow-hidden",
2049
- onPointerdown: n[1] ||= (...e) => j(g).onPointerDown && j(g).onPointerDown(...e),
2050
- onPointermove: n[2] ||= (...e) => j(g).onPointerMove && j(g).onPointerMove(...e),
2051
- onPointerup: n[3] ||= (...e) => j(g).onPointerUp && j(g).onPointerUp(...e),
2052
- onPointercancel: n[4] ||= (...e) => j(g).onPointerCancel && j(g).onPointerCancel(...e),
2053
- onWheel: n[5] ||= (...e) => j(g).onWheel && j(g).onWheel(...e)
2054
- }, [j(g).activeItem.value ? (S(), s("div", mn, [
2055
- (S(!0), s(t, null, E(j(g).renderedItems.value, ({ item: r, index: i }) => (S(), s("article", {
2056
- key: j(w).getItemKey(r),
2325
+ onPointerdown: n[1] ||= (...e) => M(h).onPointerDown && M(h).onPointerDown(...e),
2326
+ onPointermove: n[2] ||= (...e) => M(h).onPointerMove && M(h).onPointerMove(...e),
2327
+ onPointerup: n[3] ||= (...e) => M(h).onPointerUp && M(h).onPointerUp(...e),
2328
+ onPointercancel: n[4] ||= (...e) => M(h).onPointerCancel && M(h).onPointerCancel(...e),
2329
+ onWheel: n[5] ||= (...e) => M(h).onWheel && M(h).onWheel(...e)
2330
+ }, [M(h).activeItem.value ? (w(), s("div", Tn, [
2331
+ (w(!0), s(t, null, ee(M(h).renderedItems.value, ({ item: r, index: i }) => (w(), s("article", {
2332
+ key: M(C).getItemKey(r),
2057
2333
  "data-testid": "vibe-slide",
2058
2334
  "data-item-id": r.id,
2059
- "data-occurrence-key": j(w).getItemKey(r),
2335
+ "data-occurrence-key": M(C).getItemKey(r),
2060
2336
  "data-index": i,
2061
- "data-active": i === j(g).resolvedActiveIndex.value,
2062
- "aria-hidden": i === j(g).resolvedActiveIndex.value ? "false" : "true",
2063
- class: _(["absolute inset-0 flex h-full min-h-full items-center justify-center will-change-transform", i === j(g).resolvedActiveIndex.value ? "pointer-events-auto" : "pointer-events-none"]),
2064
- style: y(j(g).getSlideStyle(i))
2337
+ "data-active": i === M(h).resolvedActiveIndex.value,
2338
+ "aria-hidden": i === M(h).resolvedActiveIndex.value ? "false" : "true",
2339
+ class: v(["absolute inset-0 flex h-full min-h-full items-center justify-center will-change-transform", i === M(h).resolvedActiveIndex.value ? "pointer-events-auto" : "pointer-events-none"]),
2340
+ style: b(M(h).getSlideStyle(i))
2065
2341
  }, [c("div", {
2066
- class: _(["absolute inset-0 opacity-85", j(on)(r.type)]),
2067
- style: y(i === j(g).resolvedActiveIndex.value && r.type === "image" ? j(P) : void 0)
2068
- }, null, 6), j(g).isVisual(r) ? (S(), s("div", {
2342
+ class: v(["absolute inset-0 opacity-85", M(_n)(r.type)]),
2343
+ style: b(i === M(h).resolvedActiveIndex.value && r.type === "image" ? M(E) : void 0)
2344
+ }, null, 6), M(h).isVisual(r) ? (w(), s("div", {
2069
2345
  key: 0,
2070
- class: _(["relative z-[1] flex h-full w-full items-center justify-center overflow-hidden", i === j(g).resolvedActiveIndex.value ? V.value : ""])
2071
- }, [j(w).isAssetLoading(i, r) ? (S(), s("div", gn, [c("span", _n, [u(j(re), {
2346
+ class: v(["relative z-[1] flex h-full w-full items-center justify-center overflow-hidden", i === M(h).resolvedActiveIndex.value ? B.value : ""])
2347
+ }, [M(C).isAssetLoading(i, r) ? (w(), s("div", Dn, [c("span", On, [u(M(oe), {
2072
2348
  class: "h-5 w-5 animate-spin stroke-[1.9] text-[#f7f1ea]/78",
2073
2349
  "aria-hidden": "true"
2074
- })])])) : o("", !0), j(w).isAssetErrored(i, r) ? (S(), s("div", {
2350
+ })])])) : o("", !0), M(C).isAssetErrored(i, r) ? (w(), s("div", {
2075
2351
  key: 1,
2076
2352
  "data-testid": "vibe-asset-error",
2077
- "data-kind": j(w).getAssetErrorKind(r),
2353
+ "data-kind": M(C).getAssetErrorKind(r),
2078
2354
  class: "grid h-full w-full place-items-center"
2079
- }, [c("div", yn, [
2080
- u(j(oe), {
2355
+ }, [c("div", An, [
2356
+ u(M(le), {
2081
2357
  class: "h-7 w-7 stroke-[1.9] text-[#f7f1ea]/72",
2082
2358
  "aria-hidden": "true"
2083
2359
  }),
2084
- c("p", bn, k(j(w).getAssetErrorLabel(r)), 1),
2085
- j(g).canRetryAsset(j(w).getItemKey(r)) ? (S(), s("button", {
2360
+ c("p", jn, A(M(C).getAssetErrorLabel(r)), 1),
2361
+ M(h).canRetryAsset(M(C).getItemKey(r)) ? (w(), s("button", {
2086
2362
  key: 0,
2087
2363
  type: "button",
2088
2364
  class: "inline-flex items-center justify-center border border-white/14 bg-black/35 px-4 py-2 text-[0.64rem] font-bold uppercase tracking-[0.22em] text-[#f7f1ea]/82 backdrop-blur-[18px] transition hover:border-white/28 hover:bg-black/50",
2089
- onClick: z((e) => j(g).retryAsset(j(w).getItemKey(r)), ["stop"])
2090
- }, " Retry ", 8, xn)) : o("", !0)
2091
- ])], 8, vn)) : r.type === "image" ? (S(), s("img", {
2092
- key: j(g).getAssetRenderKey(j(w).getItemKey(r)),
2093
- src: j(w).getFullscreenImageSource(i, r),
2365
+ onClick: te((e) => M(h).retryAsset(M(C).getItemKey(r)), ["stop"])
2366
+ }, " Retry ", 8, Mn)) : o("", !0)
2367
+ ])], 8, kn)) : r.type === "image" ? (w(), s("img", {
2368
+ key: M(h).getAssetRenderKey(M(C).getItemKey(r)),
2369
+ src: M(C).getFullscreenImageSource(i, r),
2094
2370
  alt: r.title ?? "",
2095
2371
  crossorigin: "anonymous",
2096
2372
  draggable: "false",
2097
- class: _(["block h-auto max-h-full w-auto max-w-full object-contain shadow-[0_40px_120px_-60px_rgba(0,0,0,0.9)] transition-opacity duration-300", j(g).isImageReady(j(w).getItemKey(r)) ? "opacity-100" : "opacity-0"]),
2373
+ class: v(["block h-auto max-h-full w-auto max-w-full object-contain shadow-[0_40px_120px_-60px_rgba(0,0,0,0.9)] transition-opacity duration-300", M(h).isImageReady(M(C).getItemKey(r)) ? "opacity-100" : "opacity-0"]),
2098
2374
  ref_for: !0,
2099
- ref: (e) => pe(j(w).getItemKey(r), e),
2100
- onLoad: (e) => fe(e, j(w).getItemKey(r), r.url),
2101
- onError: (e) => j(g).onImageError(j(w).getItemKey(r), r.url)
2102
- }, null, 42, Sn)) : (S(), s("video", {
2103
- key: j(g).getAssetRenderKey(j(w).getItemKey(r)),
2104
- class: _(["block h-auto max-h-full w-auto max-w-full cursor-pointer object-contain shadow-[0_40px_120px_-60px_rgba(0,0,0,0.9)] transition-opacity duration-300", j(g).isMediaReady(j(w).getItemKey(r)) ? "opacity-100" : "opacity-0"]),
2375
+ ref: (e) => he(M(C).getItemKey(r), e),
2376
+ onLoad: (e) => pe(e, M(C).getItemKey(r), r.url),
2377
+ onError: (e) => me(M(C).getItemKey(r), r.url)
2378
+ }, null, 42, Nn)) : (w(), s("video", {
2379
+ key: M(h).getAssetRenderKey(M(C).getItemKey(r)),
2380
+ class: v(["block h-auto max-h-full w-auto max-w-full cursor-pointer object-contain shadow-[0_40px_120px_-60px_rgba(0,0,0,0.9)] transition-opacity duration-300", M(h).isMediaReady(M(C).getItemKey(r)) ? "opacity-100" : "opacity-0"]),
2105
2381
  playsinline: "",
2106
2382
  loop: d.loopFullscreenVideo,
2107
- src: j(w).getFullscreenMediaSource(i, r),
2108
- preload: j(w).shouldPreloadSlideAsset(i) ? "metadata" : "none",
2383
+ src: M(C).getFullscreenMediaSource(i, r),
2384
+ preload: M(C).getFullscreenMediaPreload(i),
2109
2385
  ref_for: !0,
2110
- ref: (e) => j(g).registerVideoElement(j(w).getItemKey(r), e),
2111
- onClick: z((e) => j(g).onVideoClick(e, j(w).getItemKey(r)), ["stop"]),
2112
- onCanplay: (e) => j(g).onMediaEvent(j(w).getItemKey(r), e),
2113
- onDurationchange: (e) => j(g).onMediaEvent(j(w).getItemKey(r), e),
2114
- onEnded: (e) => he(e, j(w).getItemKey(r)),
2115
- onError: (e) => j(g).onMediaError(j(w).getItemKey(r), r.url),
2116
- onLoadstart: (e) => j(g).onMediaEvent(j(w).getItemKey(r), e),
2117
- onLoadedmetadata: (e) => j(g).onMediaEvent(j(w).getItemKey(r), e),
2118
- onPause: (e) => j(g).onMediaEvent(j(w).getItemKey(r), e),
2119
- onPlay: (e) => j(g).onMediaEvent(j(w).getItemKey(r), e),
2120
- onPlaying: (e) => j(g).onMediaEvent(j(w).getItemKey(r), e),
2121
- onSeeking: (e) => j(g).onMediaEvent(j(w).getItemKey(r), e),
2122
- onSeeked: (e) => j(g).onMediaEvent(j(w).getItemKey(r), e),
2123
- onStalled: (e) => j(g).onMediaEvent(j(w).getItemKey(r), e),
2124
- onTimeupdate: (e) => j(g).onMediaEvent(j(w).getItemKey(r), e),
2125
- onWaiting: (e) => j(g).onMediaEvent(j(w).getItemKey(r), e)
2126
- }, null, 42, Cn))], 2)) : j(g).isAudio(r) ? (S(), s("div", {
2386
+ ref: (e) => ge(M(C).getItemKey(r), e),
2387
+ onClick: te((e) => M(h).onVideoClick(e, M(C).getItemKey(r)), ["stop"]),
2388
+ onCanplay: (e) => Q(M(C).getItemKey(r), e),
2389
+ onDurationchange: (e) => Q(M(C).getItemKey(r), e),
2390
+ onEnded: (e) => be(e, M(C).getItemKey(r)),
2391
+ onError: (e) => ve(M(C).getItemKey(r), r.url),
2392
+ onLoadstart: (e) => Q(M(C).getItemKey(r), e),
2393
+ onLoadedmetadata: (e) => Q(M(C).getItemKey(r), e),
2394
+ onPause: (e) => Q(M(C).getItemKey(r), e),
2395
+ onPlay: (e) => Q(M(C).getItemKey(r), e),
2396
+ onPlaying: (e) => Q(M(C).getItemKey(r), e),
2397
+ onSeeking: (e) => Q(M(C).getItemKey(r), e),
2398
+ onSeeked: (e) => Q(M(C).getItemKey(r), e),
2399
+ onStalled: (e) => Q(M(C).getItemKey(r), e),
2400
+ onTimeupdate: (e) => Q(M(C).getItemKey(r), e),
2401
+ onWaiting: (e) => Q(M(C).getItemKey(r), e)
2402
+ }, null, 42, Pn))], 2)) : M(h).isAudio(r) ? (w(), s("div", {
2127
2403
  key: 1,
2128
- class: _(["relative z-[1] grid w-full max-w-[1100px] justify-items-center gap-6 px-[clamp(2rem,4vw,3rem)] py-[clamp(2rem,4vw,3rem)] text-center", i === j(g).resolvedActiveIndex.value ? V.value : ""])
2129
- }, [c("div", wn, [
2404
+ class: v(["relative z-[1] grid w-full max-w-[1100px] justify-items-center gap-6 px-[clamp(2rem,4vw,3rem)] py-[clamp(2rem,4vw,3rem)] text-center", i === M(h).resolvedActiveIndex.value ? B.value : ""])
2405
+ }, [c("div", Fn, [
2130
2406
  c("button", {
2131
2407
  type: "button",
2132
2408
  class: "relative grid h-full w-full place-items-center border border-white/12 bg-[linear-gradient(180deg,rgba(255,255,255,0.04),rgba(255,255,255,0.02)),radial-gradient(circle_at_center,rgba(16,185,129,0.14),transparent_58%)] text-[#f7f1ea] transition-[border-color,background] duration-200 hover:border-white/30 hover:bg-[linear-gradient(180deg,rgba(255,255,255,0.07),rgba(255,255,255,0.03)),radial-gradient(circle_at_center,rgba(16,185,129,0.18),transparent_58%)] focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-4 focus-visible:outline-[#f7f1ea]",
2133
- "aria-label": j(g).mediaStates.value[j(w).getItemKey(r)]?.paused ?? !0 ? j(w).getMediaActionLabel("Play", r) : j(w).getMediaActionLabel("Pause", r),
2134
- disabled: !!j(w).getAssetErrorKind(r),
2135
- onClick: (e) => j(g).onAudioCoverClick(e, j(w).getItemKey(r))
2409
+ "aria-label": M(h).mediaStates.value[M(C).getItemKey(r)]?.paused ?? !0 ? M(C).getMediaActionLabel("Play", r) : M(C).getMediaActionLabel("Pause", r),
2410
+ disabled: !!M(C).getAssetErrorKind(r),
2411
+ onClick: (e) => M(h).onAudioCoverClick(e, M(C).getItemKey(r))
2136
2412
  }, [
2137
2413
  n[6] ||= c("span", { class: "pointer-events-none absolute inset-0 border border-white/8 bg-[radial-gradient(circle,rgba(16,185,129,0.16),transparent_66%)]" }, null, -1),
2138
2414
  n[7] ||= c("span", { class: "pointer-events-none absolute h-[clamp(220px,30vw,360px)] w-[clamp(220px,30vw,360px)] border border-white/8 bg-[radial-gradient(circle,rgba(255,255,255,0.08),transparent_62%)]" }, null, -1),
2139
- c("span", En, [D(e.$slots, "item-icon", {
2140
- icon: j(Ct)(r.type),
2415
+ c("span", Ln, [O(e.$slots, "item-icon", {
2416
+ icon: M(Tt)(r.type),
2141
2417
  item: r
2142
- }, () => [(S(), a(O(j(Ct)(r.type)), {
2418
+ }, () => [(w(), a(k(M(Tt)(r.type)), {
2143
2419
  class: "h-6 w-6 stroke-[1.9]",
2144
2420
  "aria-hidden": "true"
2145
2421
  }))])]),
2146
- c("span", Dn, [(S(), a(O(j(g).mediaStates.value[j(w).getItemKey(r)]?.paused ?? !0 ? j(ae) : j(ie)), {
2422
+ c("span", Rn, [(w(), a(k(M(h).mediaStates.value[M(C).getItemKey(r)]?.paused ?? !0 ? M(ce) : M(se)), {
2147
2423
  class: "h-4 w-4 stroke-2",
2148
2424
  "aria-hidden": "true"
2149
2425
  }))])
2150
- ], 8, Tn),
2151
- j(w).isAssetLoading(i, r) ? (S(), s("div", On, [c("span", kn, [u(j(re), {
2426
+ ], 8, In),
2427
+ M(C).isAssetLoading(i, r) ? (w(), s("div", zn, [c("span", Bn, [u(M(oe), {
2152
2428
  class: "h-5 w-5 animate-spin stroke-[1.9] text-[#f7f1ea]/78",
2153
2429
  "aria-hidden": "true"
2154
2430
  })])])) : o("", !0),
2155
- j(w).getAssetErrorKind(r) ? (S(), s(t, { key: 1 }, [n[8] ||= c("div", { class: "pointer-events-none absolute inset-0 border border-white/8 bg-[radial-gradient(circle,rgba(239,68,68,0.12),transparent_66%)]" }, null, -1), c("div", {
2431
+ M(C).getAssetErrorKind(r) ? (w(), s(t, { key: 1 }, [n[8] ||= c("div", { class: "pointer-events-none absolute inset-0 border border-white/8 bg-[radial-gradient(circle,rgba(239,68,68,0.12),transparent_66%)]" }, null, -1), c("div", {
2156
2432
  "data-testid": "vibe-asset-error",
2157
- "data-kind": j(w).getAssetErrorKind(r),
2433
+ "data-kind": M(C).getAssetErrorKind(r),
2158
2434
  class: "relative z-[1] grid justify-items-center gap-4"
2159
2435
  }, [
2160
- u(j(oe), {
2436
+ u(M(le), {
2161
2437
  class: "h-7 w-7 stroke-[1.9] text-[#f7f1ea]/72",
2162
2438
  "aria-hidden": "true"
2163
2439
  }),
2164
- c("p", jn, k(j(w).getAssetErrorLabel(r)), 1),
2165
- j(g).canRetryAsset(j(w).getItemKey(r)) ? (S(), s("button", {
2440
+ c("p", Hn, A(M(C).getAssetErrorLabel(r)), 1),
2441
+ M(h).canRetryAsset(M(C).getItemKey(r)) ? (w(), s("button", {
2166
2442
  key: 0,
2167
2443
  type: "button",
2168
2444
  class: "pointer-events-auto inline-flex items-center justify-center border border-white/14 bg-black/35 px-4 py-2 text-[0.64rem] font-bold uppercase tracking-[0.22em] text-[#f7f1ea]/82 backdrop-blur-[18px] transition hover:border-white/28 hover:bg-black/50",
2169
- onClick: z((e) => j(g).retryAsset(j(w).getItemKey(r)), ["stop"])
2170
- }, " Retry ", 8, Mn)) : o("", !0)
2171
- ], 8, An)], 64)) : o("", !0)
2172
- ]), (S(), s("audio", {
2173
- key: j(g).getAssetRenderKey(j(w).getItemKey(r)),
2174
- src: j(w).getFullscreenMediaSource(i, r),
2175
- preload: j(w).shouldPreloadSlideAsset(i) ? "metadata" : "none",
2445
+ onClick: te((e) => M(h).retryAsset(M(C).getItemKey(r)), ["stop"])
2446
+ }, " Retry ", 8, Un)) : o("", !0)
2447
+ ], 8, Vn)], 64)) : o("", !0)
2448
+ ]), (w(), s("audio", {
2449
+ key: M(h).getAssetRenderKey(M(C).getItemKey(r)),
2450
+ src: M(C).getFullscreenMediaSource(i, r),
2451
+ preload: M(C).getFullscreenMediaPreload(i),
2176
2452
  class: "pointer-events-none absolute h-px w-px opacity-0",
2177
2453
  ref_for: !0,
2178
- ref: (e) => j(g).registerAudioElement(j(w).getItemKey(r), e),
2179
- onCanplay: (e) => j(g).onMediaEvent(j(w).getItemKey(r), e),
2180
- onDurationchange: (e) => j(g).onMediaEvent(j(w).getItemKey(r), e),
2181
- onError: (e) => j(g).onMediaError(j(w).getItemKey(r), r.url),
2182
- onLoadstart: (e) => j(g).onMediaEvent(j(w).getItemKey(r), e),
2183
- onLoadedmetadata: (e) => j(g).onMediaEvent(j(w).getItemKey(r), e),
2184
- onPause: (e) => j(g).onMediaEvent(j(w).getItemKey(r), e),
2185
- onPlay: (e) => j(g).onMediaEvent(j(w).getItemKey(r), e),
2186
- onPlaying: (e) => j(g).onMediaEvent(j(w).getItemKey(r), e),
2187
- onSeeking: (e) => j(g).onMediaEvent(j(w).getItemKey(r), e),
2188
- onSeeked: (e) => j(g).onMediaEvent(j(w).getItemKey(r), e),
2189
- onStalled: (e) => j(g).onMediaEvent(j(w).getItemKey(r), e),
2190
- onTimeupdate: (e) => j(g).onMediaEvent(j(w).getItemKey(r), e),
2191
- onWaiting: (e) => j(g).onMediaEvent(j(w).getItemKey(r), e)
2192
- }, null, 40, Nn))], 2)) : (S(), s("div", Pn, [c("div", Fn, [D(e.$slots, "item-icon", {
2193
- icon: j(Ct)(r.type),
2454
+ ref: (e) => _e(M(C).getItemKey(r), e),
2455
+ onCanplay: (e) => Q(M(C).getItemKey(r), e),
2456
+ onDurationchange: (e) => Q(M(C).getItemKey(r), e),
2457
+ onError: (e) => ve(M(C).getItemKey(r), r.url),
2458
+ onLoadstart: (e) => Q(M(C).getItemKey(r), e),
2459
+ onLoadedmetadata: (e) => Q(M(C).getItemKey(r), e),
2460
+ onPause: (e) => Q(M(C).getItemKey(r), e),
2461
+ onPlay: (e) => Q(M(C).getItemKey(r), e),
2462
+ onPlaying: (e) => Q(M(C).getItemKey(r), e),
2463
+ onSeeking: (e) => Q(M(C).getItemKey(r), e),
2464
+ onSeeked: (e) => Q(M(C).getItemKey(r), e),
2465
+ onStalled: (e) => Q(M(C).getItemKey(r), e),
2466
+ onTimeupdate: (e) => Q(M(C).getItemKey(r), e),
2467
+ onWaiting: (e) => Q(M(C).getItemKey(r), e)
2468
+ }, null, 40, Wn))], 2)) : (w(), s("div", Gn, [c("div", Kn, [O(e.$slots, "item-icon", {
2469
+ icon: M(Tt)(r.type),
2194
2470
  item: r
2195
- }, () => [(S(), a(O(j(Ct)(r.type)), {
2471
+ }, () => [(w(), a(k(M(Tt)(r.type)), {
2196
2472
  class: "h-6 w-6 stroke-[1.9]",
2197
2473
  "aria-hidden": "true"
2198
- }))])])]))], 14, hn))), 128)),
2199
- W.value && p["fullscreen-overlay"] ? (S(), s("div", In, [c("div", Ln, [D(e.$slots, "fullscreen-overlay", v(f(W.value)))])])) : o("", !0),
2200
- j(g).activeItem.value ? (S(), a(bt, {
2474
+ }))])])]))], 14, En))), 128)),
2475
+ U.value && f["fullscreen-overlay"] ? (w(), s("div", qn, [c("div", Jn, [O(e.$slots, "fullscreen-overlay", y(p(U.value)))])])) : o("", !0),
2476
+ M(h).activeItem.value ? (w(), a(St, {
2201
2477
  key: 1,
2202
- "current-index": j(g).resolvedActiveIndex.value,
2478
+ "current-index": M(h).resolvedActiveIndex.value,
2203
2479
  loading: d.loading,
2204
- "pagination-detail": j(g).paginationDetail.value,
2480
+ "pagination-detail": M(h).paginationDetail.value,
2205
2481
  "show-back-to-list": d.showBackToList,
2206
- "show-end-badge": d.showEndBadge && j(g).isAtEnd.value && !j(g).hasNextPage.value && !j(g).loading.value,
2207
- title: j(g).activeItem.value.title ?? null,
2208
- total: j(g).items.value.length,
2482
+ "show-end-badge": d.showEndBadge && M(h).isAtEnd.value && !M(h).hasNextPage.value && !M(h).loading.value,
2483
+ title: M(h).activeItem.value.title ?? null,
2484
+ total: M(h).items.value.length,
2209
2485
  onBackToList: n[0] ||= (e) => m("back-to-list")
2210
- }, l({ _: 2 }, [ne.value && W.value ? {
2486
+ }, l({ _: 2 }, [re.value && U.value ? {
2211
2487
  name: "actions",
2212
- fn: L(() => [D(e.$slots, "fullscreen-header-actions", v(f(W.value)))]),
2488
+ fn: R(() => [O(e.$slots, "fullscreen-header-actions", y(p(U.value)))]),
2213
2489
  key: "0"
2214
2490
  } : void 0]), 1032, [
2215
2491
  "current-index",
@@ -2220,19 +2496,19 @@ var un = ["data-surface"], dn = ["data-surface"], fn = /* @__PURE__ */ d({
2220
2496
  "title",
2221
2497
  "total"
2222
2498
  ])) : o("", !0),
2223
- B.value ? (S(), a(lt, {
2499
+ L.value ? (w(), a(dt, {
2224
2500
  key: 2,
2225
- "current-time": j(g).activeMediaState.value.currentTime,
2226
- "current-time-label": j(g).formatPlaybackTime(j(g).activeMediaState.value.currentTime),
2227
- duration: j(g).activeMediaDuration.value,
2228
- "duration-label": j(g).formatPlaybackTime(j(g).activeMediaDuration.value),
2229
- muted: j(g).activeMediaState.value.muted,
2230
- progress: j(g).activeMediaProgress.value,
2231
- volume: j(g).activeMediaState.value.volume,
2232
- "volume-control-layout": ee.value,
2233
- onSeekInput: j(g).onMediaSeekInput,
2234
- onVolumeInput: j(g).onMediaVolumeInput,
2235
- onVolumeToggle: j(g).onMediaVolumeToggle
2501
+ "current-time": M(h).activeMediaState.value.currentTime,
2502
+ "current-time-label": M(h).formatPlaybackTime(M(h).activeMediaState.value.currentTime),
2503
+ duration: M(h).activeMediaDuration.value,
2504
+ "duration-label": M(h).formatPlaybackTime(M(h).activeMediaDuration.value),
2505
+ muted: M(h).activeMediaState.value.muted,
2506
+ progress: M(h).activeMediaProgress.value,
2507
+ volume: M(h).activeMediaState.value.volume,
2508
+ "volume-control-layout": z.value,
2509
+ onSeekInput: M(h).onMediaSeekInput,
2510
+ onVolumeInput: M(h).onMediaVolumeInput,
2511
+ onVolumeToggle: M(h).onMediaVolumeToggle
2236
2512
  }, null, 8, [
2237
2513
  "current-time",
2238
2514
  "current-time-label",
@@ -2246,36 +2522,36 @@ var un = ["data-surface"], dn = ["data-surface"], fn = /* @__PURE__ */ d({
2246
2522
  "onVolumeInput",
2247
2523
  "onVolumeToggle"
2248
2524
  ])) : o("", !0),
2249
- K.value ? (S(), s("div", {
2525
+ G.value ? (w(), s("div", {
2250
2526
  key: 3,
2251
- class: _(["absolute left-1/2 z-[4] -translate-x-1/2", R.value])
2252
- }, [ce.value ? D(e.$slots, "fullscreen-status", v(h({ key: 0 }, K.value))) : (S(), s("div", {
2527
+ class: v(["absolute left-1/2 z-[4] -translate-x-1/2", I.value])
2528
+ }, [ae.value ? O(e.$slots, "fullscreen-status", y(g({ key: 0 }, G.value))) : (w(), s("div", {
2253
2529
  key: 1,
2254
2530
  "data-testid": "vibe-fullscreen-status-badge",
2255
- class: _(["inline-flex w-auto items-center border border-white/14 bg-black/40 px-5 py-3 text-[0.75rem] font-bold uppercase tracking-[0.18em] text-[#f7f1ea]/74 backdrop-blur-[18px] max-[720px]:w-[calc(100%-2.5rem)] max-[720px]:justify-center", K.value.kind === "end" ? "border-amber-300/35 text-amber-200" : K.value.kind === "failed" ? "border-rose-400/45 text-rose-100" : ""])
2256
- }, k(K.value.message), 3))], 2)) : o("", !0)
2257
- ])) : H.value ? (S(), s("div", Rn, [c("div", zn, [c("span", Bn, [u(j(re), {
2531
+ class: v(["inline-flex w-auto items-center border border-white/14 bg-black/40 px-5 py-3 text-[0.75rem] font-bold uppercase tracking-[0.18em] text-[#f7f1ea]/74 backdrop-blur-[18px] max-[720px]:w-[calc(100%-2.5rem)] max-[720px]:justify-center", G.value.kind === "end" ? "border-amber-300/35 text-amber-200" : G.value.kind === "failed" ? "border-rose-400/45 text-rose-100" : ""])
2532
+ }, A(G.value.message), 3))], 2)) : o("", !0)
2533
+ ])) : V.value ? (w(), s("div", Yn, [c("div", Xn, [c("span", Zn, [u(M(oe), {
2258
2534
  class: "h-5 w-5 animate-spin stroke-[1.9] text-[#f7f1ea]/78",
2259
2535
  "aria-hidden": "true"
2260
- })]), c("p", Vn, k(U.value), 1)])])) : j(de) && j(Z) ? (S(), a(fn, {
2536
+ })]), c("p", Qn, A(H.value), 1)])])) : M(Z) && M(X) ? (w(), a(Cn, {
2261
2537
  key: 2,
2262
- message: j(Z).message,
2263
- mode: j(Z).mode,
2264
- surface: j(Z).surface
2538
+ message: M(X).message,
2539
+ mode: M(X).mode,
2540
+ surface: M(X).surface
2265
2541
  }, {
2266
- default: L(() => [j(ue) ? D(e.$slots, "empty-state", v(h({ key: 0 }, j(Z)))) : o("", !0)]),
2542
+ default: R(() => [M(de) ? O(e.$slots, "empty-state", y(g({ key: 0 }, M(X)))) : o("", !0)]),
2267
2543
  _: 3
2268
2544
  }, 8, [
2269
2545
  "message",
2270
2546
  "mode",
2271
2547
  "surface"
2272
- ])) : o("", !0), j(le) && j(Z) ? (S(), a(fn, {
2548
+ ])) : o("", !0), M(ue) && M(X) ? (w(), a(Cn, {
2273
2549
  key: 3,
2274
- message: j(Z).message,
2275
- mode: j(Z).mode,
2276
- surface: j(Z).surface
2550
+ message: M(X).message,
2551
+ mode: M(X).mode,
2552
+ surface: M(X).surface
2277
2553
  }, {
2278
- default: L(() => [j(ue) ? D(e.$slots, "empty-state", v(h({ key: 0 }, j(Z)))) : o("", !0)]),
2554
+ default: R(() => [M(de) ? O(e.$slots, "empty-state", y(g({ key: 0 }, M(X)))) : o("", !0)]),
2279
2555
  _: 3
2280
2556
  }, 8, [
2281
2557
  "message",
@@ -2289,7 +2565,7 @@ var un = ["data-surface"], dn = ["data-surface"], fn = /* @__PURE__ */ d({
2289
2565
  "leave-from-class": "translate-x-0 opacity-100",
2290
2566
  "leave-to-class": "translate-x-full opacity-0"
2291
2567
  }, {
2292
- default: L(() => [X.value && W.value ? (S(), s("aside", Hn, [c("div", Un, [D(e.$slots, "fullscreen-aside", v(f(W.value)))])])) : o("", !0)]),
2568
+ default: R(() => [Y.value && U.value ? (w(), s("aside", $n, [c("div", er, [O(e.$slots, "fullscreen-aside", y(p(U.value)))])])) : o("", !0)]),
2293
2569
  _: 3
2294
2570
  })], 4),
2295
2571
  u(r, {
@@ -2300,29 +2576,29 @@ var un = ["data-surface"], dn = ["data-surface"], fn = /* @__PURE__ */ d({
2300
2576
  "leave-from-class": "translate-x-0 opacity-100",
2301
2577
  "leave-to-class": "translate-x-full opacity-0"
2302
2578
  }, {
2303
- default: L(() => [se.value && W.value ? (S(), s("aside", Wn, [c("div", Gn, [D(e.$slots, "fullscreen-aside", v(f(W.value)))])])) : o("", !0)]),
2579
+ default: R(() => [ie.value && U.value ? (w(), s("aside", tr, [c("div", nr, [O(e.$slots, "fullscreen-aside", y(p(U.value)))])])) : o("", !0)]),
2304
2580
  _: 3
2305
2581
  })
2306
2582
  ]));
2307
2583
  }
2308
- }), Yn = 1, Xn = .5;
2309
- function Zn(e) {
2584
+ }), or = 1, sr = .5;
2585
+ function cr(e) {
2310
2586
  if (e.type !== "image" && e.type !== "video") return {
2311
- width: Yn,
2312
- height: Yn,
2587
+ width: or,
2588
+ height: or,
2313
2589
  source: "fallback"
2314
2590
  };
2315
2591
  let t = e.preview?.width, n = e.preview?.height;
2316
- if (ir(t) && ir(n)) {
2317
- let r = ar(e, t, n);
2592
+ if (hr(t) && hr(n)) {
2593
+ let r = gr(e, t, n);
2318
2594
  return {
2319
2595
  width: r.width,
2320
2596
  height: r.height,
2321
2597
  source: "preview"
2322
2598
  };
2323
2599
  }
2324
- if (ir(e.width) && ir(e.height)) {
2325
- let t = ar(e, e.width, e.height);
2600
+ if (hr(e.width) && hr(e.height)) {
2601
+ let t = gr(e, e.width, e.height);
2326
2602
  return {
2327
2603
  width: t.width,
2328
2604
  height: t.height,
@@ -2330,31 +2606,31 @@ function Zn(e) {
2330
2606
  };
2331
2607
  }
2332
2608
  return {
2333
- width: Yn,
2334
- height: Yn,
2609
+ width: or,
2610
+ height: or,
2335
2611
  source: "fallback"
2336
2612
  };
2337
2613
  }
2338
- function Qn(e, t) {
2614
+ function lr(e, t) {
2339
2615
  return !e || e <= 0 || !t || t <= 0 ? 1 : Math.max(1, Math.floor(e / t));
2340
2616
  }
2341
- function $n(e, t, n, r = 0) {
2617
+ function ur(e, t, n, r = 0) {
2342
2618
  if (!e || e <= 0 || !t || t <= 0) return n;
2343
2619
  let i = typeof r == "number" && r > 0 ? r : 0, a = e - Math.max(0, t - 1) * i;
2344
2620
  return !a || a <= 0 ? n : a / t;
2345
2621
  }
2346
- function er(e, t) {
2347
- let n = Zn(e);
2622
+ function dr(e, t) {
2623
+ let n = cr(e);
2348
2624
  return n.height / n.width * t;
2349
2625
  }
2350
- function tr(e, t) {
2626
+ function fr(e, t) {
2351
2627
  let n = Array.from({ length: t.columnCount }, () => 0), r = Array(e.length), i = Array(e.length), a = /* @__PURE__ */ new Map(), o = /* @__PURE__ */ new Map(), s = 0;
2352
2628
  for (let c = 0; c < e.length; c += 1) {
2353
2629
  let l = e[c];
2354
2630
  o.set($(l), c);
2355
2631
  let u = 0;
2356
2632
  for (let e = 1; e < n.length; e += 1) n[e] < n[u] && (u = e);
2357
- let d = u * (t.columnWidth + t.gapX), f = n[u], p = er(l, t.columnWidth);
2633
+ let d = u * (t.columnWidth + t.gapX), f = n[u], p = dr(l, t.columnWidth);
2358
2634
  r[c] = {
2359
2635
  x: d,
2360
2636
  y: f
@@ -2373,7 +2649,7 @@ function tr(e, t) {
2373
2649
  indexById: o
2374
2650
  };
2375
2651
  }
2376
- function nr(e) {
2652
+ function pr(e) {
2377
2653
  if (e.itemCount <= 0) return [];
2378
2654
  if (e.viewportHeight <= 0) return Array.from({ length: e.itemCount }, (e, t) => t);
2379
2655
  let t = Math.max(0, e.scrollTop - e.overscanPx), n = e.scrollTop + e.viewportHeight + e.overscanPx, r = Math.floor(t / e.bucketPx), i = Math.floor(n / e.bucketPx), a = /* @__PURE__ */ new Set();
@@ -2383,7 +2659,7 @@ function nr(e) {
2383
2659
  }
2384
2660
  return Array.from(a).sort((e, t) => e - t);
2385
2661
  }
2386
- function rr(e, t, n) {
2662
+ function mr(e, t, n) {
2387
2663
  let r = /* @__PURE__ */ new Map();
2388
2664
  for (let i of e) {
2389
2665
  let e = t.get($(i));
@@ -2393,11 +2669,11 @@ function rr(e, t, n) {
2393
2669
  }
2394
2670
  return r;
2395
2671
  }
2396
- function ir(e) {
2672
+ function hr(e) {
2397
2673
  return typeof e == "number" && Number.isFinite(e) && e > 0;
2398
2674
  }
2399
- function ar(e, t, n) {
2400
- return e.type !== "image" || n / t >= Xn ? {
2675
+ function gr(e, t, n) {
2676
+ return e.type !== "image" || n / t >= sr ? {
2401
2677
  width: t,
2402
2678
  height: n
2403
2679
  } : {
@@ -2407,23 +2683,23 @@ function ar(e, t, n) {
2407
2683
  }
2408
2684
  //#endregion
2409
2685
  //#region src/components/viewer-core/useMasonryMotion.ts
2410
- var or = 300, sr = 600, cr = 40, lr = 300, ur = 400;
2411
- function dr(e, t) {
2686
+ var _r = 300, vr = 600, yr = 40, br = 300, xr = 400;
2687
+ function Sr(e, t) {
2412
2688
  return t === "top" ? [...e].reverse() : e;
2413
2689
  }
2414
- function fr(e) {
2415
- return e <= 0 ? sr : sr + Math.min((e - 1) * cr, ur);
2690
+ function Cr(e) {
2691
+ return e <= 0 ? vr : vr + Math.min((e - 1) * yr, xr);
2416
2692
  }
2417
- function pr() {
2418
- return lr;
2693
+ function wr() {
2694
+ return br;
2419
2695
  }
2420
- function mr(e) {
2696
+ function Tr(e) {
2421
2697
  let t = e.itemHeight > 0 ? e.itemHeight : e.columnWidth;
2422
2698
  return e.direction === "top" ? e.scrollTop - t : e.scrollTop + e.viewportHeight + t;
2423
2699
  }
2424
- function hr(e) {
2425
- let t = T(/* @__PURE__ */ new Set()), n = T(/* @__PURE__ */ new Set()), r = T(/* @__PURE__ */ new Map()), a = T(/* @__PURE__ */ new Map()), o = T(/* @__PURE__ */ new Map()), s = T(/* @__PURE__ */ new Set()), c = T(/* @__PURE__ */ new Map()), l = T(/* @__PURE__ */ new Map()), u = T(/* @__PURE__ */ new Set()), d = /* @__PURE__ */ new Set(), f = /* @__PURE__ */ new Set(), p = i(() => Array.from(o.value.values()));
2426
- F(e.visibleIndices, (i) => {
2700
+ function Er(e) {
2701
+ let t = D(/* @__PURE__ */ new Set()), n = D(/* @__PURE__ */ new Set()), r = D(/* @__PURE__ */ new Map()), a = D(/* @__PURE__ */ new Map()), o = D(/* @__PURE__ */ new Map()), s = D(/* @__PURE__ */ new Set()), c = D(/* @__PURE__ */ new Map()), l = D(/* @__PURE__ */ new Map()), u = D(/* @__PURE__ */ new Set()), d = /* @__PURE__ */ new Set(), f = /* @__PURE__ */ new Set(), p = i(() => Array.from(o.value.values()));
2702
+ I(e.visibleIndices, (i) => {
2427
2703
  if (!i.length) return;
2428
2704
  let o = [];
2429
2705
  for (let n of i) {
@@ -2431,27 +2707,27 @@ function hr(e) {
2431
2707
  !r || !t.value.has(r) || d.has(r) || (d.add(r), o.push(r));
2432
2708
  }
2433
2709
  if (!o.length) return;
2434
- let s = dr(o, a.value.get(o[0]) ?? "bottom"), c = new Map(r.value);
2435
- for (let e = 0; e < s.length; e += 1) c.set(s[e], Math.min(e * cr, ur));
2436
- r.value = c, gr(() => {
2710
+ let s = Sr(o, a.value.get(o[0]) ?? "bottom"), c = new Map(r.value);
2711
+ for (let e = 0; e < s.length; e += 1) c.set(s[e], Math.min(e * yr, xr));
2712
+ r.value = c, Dr(() => {
2437
2713
  let e = new Set(n.value);
2438
2714
  for (let t of o) e.add(t);
2439
2715
  n.value = e;
2440
- }), _r(() => {
2716
+ }), Or(() => {
2441
2717
  let e = new Set(t.value);
2442
2718
  for (let t of o) e.delete(t);
2443
2719
  t.value = e, S(() => {
2444
2720
  let e = new Set(n.value), t = new Map(r.value), i = new Map(a.value);
2445
2721
  for (let n of o) e.delete(n), t.delete(n), i.delete(n), d.delete(n);
2446
2722
  n.value = e, r.value = t, a.value = i;
2447
- }, fr(o.length));
2723
+ }, Cr(o.length));
2448
2724
  });
2449
- }, { flush: "post" }), F(() => e.items.value.map((e) => $(e)), (e) => {
2725
+ }, { flush: "post" }), I(() => e.items.value.map((e) => $(e)), (e) => {
2450
2726
  if (!e.length || !o.value.size) return;
2451
2727
  let t = new Set(e), n = null, r = null;
2452
2728
  for (let e of o.value.keys()) t.has(e) && (n ||= new Map(o.value), r ||= new Set(s.value), n.delete(e), r.delete(e));
2453
2729
  n && (o.value = n), r && (s.value = r);
2454
- }), b(() => {
2730
+ }), x(() => {
2455
2731
  for (let e of f) clearTimeout(e);
2456
2732
  f.clear();
2457
2733
  });
@@ -2471,7 +2747,7 @@ function hr(e) {
2471
2747
  let e = $(t.item);
2472
2748
  p.push(e), i.set(e, t), c.delete(e), l.delete(e), u.delete(e), f.delete(e), d.delete(e);
2473
2749
  }
2474
- o.value = i, t.value = c, n.value = l, r.value = u, a.value = f, gr(() => {
2750
+ o.value = i, t.value = c, n.value = l, r.value = u, a.value = f, Dr(() => {
2475
2751
  let e = new Set(s.value);
2476
2752
  for (let t of p) e.add(t);
2477
2753
  s.value = e;
@@ -2479,9 +2755,9 @@ function hr(e) {
2479
2755
  let e = new Map(o.value), t = new Set(s.value);
2480
2756
  for (let n of p) e.delete(n), t.delete(n);
2481
2757
  o.value = e, s.value = t;
2482
- }, lr);
2758
+ }, br);
2483
2759
  }
2484
- function g(t, n, r = or) {
2760
+ function g(t, n, r = _r) {
2485
2761
  if (!t.size) return;
2486
2762
  let i = /* @__PURE__ */ new Map(), a = [];
2487
2763
  for (let [r, o] of t.entries()) {
@@ -2500,8 +2776,8 @@ function hr(e) {
2500
2776
  c.value = i, u.value = /* @__PURE__ */ new Set();
2501
2777
  let o = new Map(l.value);
2502
2778
  for (let e of a) o.set(e, r);
2503
- l.value = o, gr(() => {
2504
- u.value = new Set(a), gr(() => {
2779
+ l.value = o, Dr(() => {
2780
+ u.value = new Set(a), Dr(() => {
2505
2781
  c.value = /* @__PURE__ */ new Map();
2506
2782
  });
2507
2783
  }), S(() => {
@@ -2512,8 +2788,8 @@ function hr(e) {
2512
2788
  }, r);
2513
2789
  }
2514
2790
  function _(e) {
2515
- if (n.value.has(e)) return `transform ${sr}ms ease-out`;
2516
- if (u.value.has(e)) return `transform ${l.value.get(e) ?? or}ms ease-out`;
2791
+ if (n.value.has(e)) return `transform ${vr}ms ease-out`;
2792
+ if (u.value.has(e)) return `transform ${l.value.get(e) ?? _r}ms ease-out`;
2517
2793
  }
2518
2794
  function v(e) {
2519
2795
  if (!n.value.has(e)) return;
@@ -2530,7 +2806,7 @@ function hr(e) {
2530
2806
  } : {
2531
2807
  dx: 0,
2532
2808
  dy: 0
2533
- }, u = s ? a.value.get(s) ?? "bottom" : "bottom", d = s && t.value.has(s) ? mr({
2809
+ }, u = s ? a.value.get(s) ?? "bottom" : "bottom", d = s && t.value.has(s) ? Tr({
2534
2810
  columnWidth: e.columnWidth.value,
2535
2811
  direction: u,
2536
2812
  itemHeight: o,
@@ -2539,19 +2815,19 @@ function hr(e) {
2539
2815
  }) : i.y;
2540
2816
  return `translate3d(${i.x + l.dx}px, ${d + l.dy}px, 0)`;
2541
2817
  }
2542
- function x(t) {
2818
+ function b(t) {
2543
2819
  let n = $(t), r = o.value.get(n);
2544
2820
  if (!r) return {
2545
2821
  opacity: "0",
2546
2822
  transform: "translate3d(0, 0, 0) scale(0.96)",
2547
- transition: `opacity ${lr}ms ease-out, transform ${lr}ms ease-out`
2823
+ transition: `opacity ${br}ms ease-out, transform ${br}ms ease-out`
2548
2824
  };
2549
2825
  let i = s.value.has(n);
2550
2826
  return {
2551
2827
  height: `${r.height}px`,
2552
2828
  opacity: i ? "0" : "1",
2553
2829
  transform: `translate3d(${r.position.x}px, ${r.position.y}px, 0) scale(${i ? "0.96" : "1"})`,
2554
- transition: `opacity ${lr}ms ease-out, transform ${lr}ms ease-out`,
2830
+ transition: `opacity ${br}ms ease-out, transform ${br}ms ease-out`,
2555
2831
  width: `${e.columnWidth.value}px`
2556
2832
  };
2557
2833
  }
@@ -2565,35 +2841,35 @@ function hr(e) {
2565
2841
  getCardTransform: y,
2566
2842
  getCardTransition: _,
2567
2843
  getCardTransitionDelay: v,
2568
- getLeavingCardStyle: x,
2844
+ getLeavingCardStyle: b,
2569
2845
  leavingItems: p,
2570
2846
  markEnter: m,
2571
2847
  markLeave: h,
2572
2848
  playFlipMoveAnimation: g
2573
2849
  };
2574
2850
  }
2575
- function gr(e) {
2851
+ function Dr(e) {
2576
2852
  if (typeof requestAnimationFrame == "function") {
2577
2853
  requestAnimationFrame(() => e());
2578
2854
  return;
2579
2855
  }
2580
2856
  setTimeout(e, 0);
2581
2857
  }
2582
- function _r(e) {
2583
- gr(() => gr(e));
2858
+ function Or(e) {
2859
+ Dr(() => Dr(e));
2584
2860
  }
2585
2861
  //#endregion
2586
2862
  //#region src/components/viewer-core/masonryViewport.ts
2587
- function vr(e, t) {
2863
+ function kr(e, t) {
2588
2864
  return e?.clientHeight || Math.round(e?.getBoundingClientRect().height ?? 0) || t || window.innerHeight || 1;
2589
2865
  }
2590
- function yr(e, t, n) {
2866
+ function Ar(e, t, n) {
2591
2867
  return e?.clientWidth || Math.round(e?.getBoundingClientRect().width ?? 0) || t || window.innerWidth || n;
2592
2868
  }
2593
- function br(e, t, n, r) {
2869
+ function jr(e, t, n, r) {
2594
2870
  return (e?.scrollHeight ?? r) - (t + n);
2595
2871
  }
2596
- function xr(e, t) {
2872
+ function Mr(e, t) {
2597
2873
  return {
2598
2874
  height: `${e}px`,
2599
2875
  transform: `translate3d(0, ${t}px, 0)`
@@ -2601,10 +2877,10 @@ function xr(e, t) {
2601
2877
  }
2602
2878
  //#endregion
2603
2879
  //#region src/components/viewer-core/useEdgeBoundary.ts
2604
- var Sr = 250, Cr = 1e3;
2605
- function wr(e) {
2606
- let t = T(!1), n = T(!1), r = T(0), i = T(0), a = T(!1), o = T(!1), s = 0, c = null;
2607
- b(() => {
2880
+ var Nr = 250, Pr = 1e3;
2881
+ function Fr(e) {
2882
+ let t = D(!1), n = D(!1), r = D(0), i = D(0), a = D(!1), o = D(!1), s = 0, c = null;
2883
+ x(() => {
2608
2884
  y();
2609
2885
  });
2610
2886
  function l() {
@@ -2616,9 +2892,9 @@ function wr(e) {
2616
2892
  !r && n.value && m();
2617
2893
  }
2618
2894
  function u(t) {
2619
- if (!x(t) || !e.isAtBoundary()) return;
2895
+ if (!b(t) || !e.isAtBoundary()) return;
2620
2896
  let n = Date.now();
2621
- n < s || (s = n + Sr, m());
2897
+ n < s || (s = n + Nr, m());
2622
2898
  }
2623
2899
  function d() {
2624
2900
  if (!g()) return;
@@ -2652,7 +2928,7 @@ function wr(e) {
2652
2928
  return e.hasPage.value && t.value && r.value > i.value && !e.interactionLocked?.value && !e.loading.value && !a.value && typeof e.requestPage.value == "function";
2653
2929
  }
2654
2930
  function _() {
2655
- o.value = !1, v(Cr);
2931
+ o.value = !1, v(Pr);
2656
2932
  }
2657
2933
  function v(e) {
2658
2934
  y(), a.value = !0, c = setTimeout(() => {
@@ -2662,7 +2938,7 @@ function wr(e) {
2662
2938
  function y() {
2663
2939
  c &&= (clearTimeout(c), null);
2664
2940
  }
2665
- function x(t) {
2941
+ function b(t) {
2666
2942
  return e.direction === "top" ? t.deltaY < 0 : t.deltaY > 0;
2667
2943
  }
2668
2944
  return {
@@ -2675,81 +2951,81 @@ function wr(e) {
2675
2951
  }
2676
2952
  //#endregion
2677
2953
  //#region src/components/viewer-core/useMasonryList.ts
2678
- var Tr = 600, Er = 24, Dr = 16, Or = 300, kr = 200, Ar = 200, jr = Er + Dr, Mr = 200, Nr = 300, Pr = 24, Fr = 48, Ir = 500, Lr = 1e3;
2679
- function Rr(e) {
2680
- let t = T(null), n = T(0), r = T(typeof window > "u" ? 0 : window.innerHeight || 0), a = T(typeof window > "u" ? 0 : window.innerWidth || Or), o = T([]), s = T([]), c = T(/* @__PURE__ */ new Map()), l = T(0), u = T(/* @__PURE__ */ new Map()), d = T(null), f = T(null), p = T(!1), m = i(() => Math.max(Or, a.value - Er * 2)), h = i(() => Qn(m.value, Or)), _ = i(() => $n(m.value, h.value, Or, Dr)), v = i(() => zr(e.activeIndex.value, 0, Math.max(0, e.items.value.length - 1))), y = i(() => nr({
2954
+ var Ir = 600, Lr = 24, Rr = 16, zr = 300, Br = 200, Vr = 200, Hr = Lr + Rr, Ur = 200, Wr = 300, Gr = 24, Kr = 48, qr = 500, Jr = 1e3;
2955
+ function Yr(e) {
2956
+ let t = D(null), n = D(0), r = D(typeof window > "u" ? 0 : window.innerHeight || 0), a = D(typeof window > "u" ? 0 : window.innerWidth || zr), o = D([]), s = D([]), c = D(/* @__PURE__ */ new Map()), l = D(0), u = D(/* @__PURE__ */ new Map()), d = D(null), f = D(null), p = D(!1), m = i(() => Math.max(zr, a.value - Lr * 2)), h = i(() => lr(m.value, zr)), g = i(() => ur(m.value, h.value, zr, Rr)), v = i(() => Xr(e.activeIndex.value, 0, Math.max(0, e.items.value.length - 1))), y = i(() => pr({
2681
2957
  itemCount: e.items.value.length,
2682
2958
  viewportHeight: r.value,
2683
2959
  scrollTop: n.value,
2684
- overscanPx: kr,
2685
- bucketPx: Tr,
2960
+ overscanPx: Br,
2961
+ bucketPx: Ir,
2686
2962
  buckets: c.value
2687
- })), S = i(() => y.value.map((t) => ({
2963
+ })), b = i(() => y.value.map((t) => ({
2688
2964
  item: e.items.value[t],
2689
2965
  index: t
2690
2966
  }))), C = i(() => {
2691
- let e = l.value + Er * 2, t = d.value ?? 0;
2692
- return Math.max(e, t, r.value) + Mr;
2693
- }), w = i(() => e.hasNextPage.value || e.allowExhaustedNextPageRefresh.value), E = i(() => Vr({
2967
+ let e = l.value + Lr * 2, t = d.value ?? 0;
2968
+ return Math.max(e, t, r.value) + Ur;
2969
+ }), w = i(() => e.hasNextPage.value || e.allowExhaustedNextPageRefresh.value), T = i(() => Qr({
2694
2970
  active: e.active.value,
2695
- maxScrollTop: oe(),
2971
+ maxScrollTop: se(),
2696
2972
  progressDistancePx: n.value,
2697
- thresholdPx: Ar,
2973
+ thresholdPx: Vr,
2698
2974
  triggerEnabled: w.value
2699
- })), D = i(() => e.items.value.length > 0 ? `${v.value + 1} / ${e.items.value.length}` : "0 / 0"), O = i(() => Br({
2975
+ })), E = i(() => e.items.value.length > 0 ? `${v.value + 1} / ${e.items.value.length}` : "0 / 0"), ee = i(() => Zr({
2700
2976
  active: e.active.value,
2701
- maxScrollTop: oe(),
2977
+ maxScrollTop: se(),
2702
2978
  progressDistancePx: n.value,
2703
- thresholdPx: jr,
2979
+ thresholdPx: Hr,
2704
2980
  triggerEnabled: e.hasPreviousPage.value
2705
- })), k = i(() => Math.max(0, r.value - Pr * 2)), A = i(() => C.value > r.value + 1 && k.value > 0), j = i(() => {
2706
- if (!A.value) return 0;
2707
- let e = r.value / C.value * k.value;
2708
- return Math.min(k.value, Math.max(Fr, e));
2709
- }), M = i(() => {
2710
- if (!A.value) return Pr;
2981
+ })), O = i(() => Math.max(0, r.value - Gr * 2)), k = i(() => C.value > r.value + 1 && O.value > 0), A = i(() => {
2982
+ if (!k.value) return 0;
2983
+ let e = r.value / C.value * O.value;
2984
+ return Math.min(O.value, Math.max(Kr, e));
2985
+ }), j = i(() => {
2986
+ if (!k.value) return Gr;
2711
2987
  let e = Math.max(0, C.value - r.value);
2712
- return Pr + Math.max(0, k.value - j.value) * (e > 0 ? zr(n.value / e, 0, 1) : 0);
2713
- }), N = hr({
2988
+ return Gr + Math.max(0, O.value - A.value) * (e > 0 ? Xr(n.value / e, 0, 1) : 0);
2989
+ }), M = Er({
2714
2990
  items: e.items,
2715
2991
  visibleIndices: y,
2716
2992
  positions: o,
2717
2993
  heights: s,
2718
2994
  indexById: u,
2719
- columnWidth: _,
2995
+ columnWidth: g,
2720
2996
  scrollTop: n,
2721
2997
  viewportHeight: r
2722
- }), P = wr({
2998
+ }), N = Fr({
2723
2999
  direction: "top",
2724
3000
  getAnimationLockMs(e) {
2725
- return Math.max(Ir, fr(e)) + Lr;
3001
+ return Math.max(qr, Cr(e)) + Jr;
2726
3002
  },
2727
3003
  hasPage: e.hasPreviousPage,
2728
3004
  interactionLocked: p,
2729
3005
  isAtBoundary() {
2730
- return n.value <= jr;
3006
+ return n.value <= Hr;
2731
3007
  },
2732
3008
  loading: e.loading,
2733
3009
  requestPage: e.requestPreviousPage
2734
- }), I = wr({
3010
+ }), P = Fr({
2735
3011
  direction: "bottom",
2736
3012
  getAnimationLockMs(e) {
2737
- return fr(e) + Lr;
3013
+ return Cr(e) + Jr;
2738
3014
  },
2739
3015
  hasPage: w,
2740
3016
  interactionLocked: p,
2741
3017
  isAtBoundary() {
2742
- return ae() <= Ar;
3018
+ return oe() <= Vr;
2743
3019
  },
2744
3020
  loading: e.loading,
2745
3021
  requestPage: e.requestNextPage
2746
- }), L = null, R = 0, z = null, B = null, ee = !1;
2747
- F([
3022
+ }), F = null, L = 0, R = null, z = null, te = !1;
3023
+ I([
2748
3024
  () => e.items.value,
2749
3025
  h,
2750
- _
3026
+ g
2751
3027
  ], async ([t], [r = []]) => {
2752
- let i = t.map((e) => $(e)), a = r ?? [], s = a.map((e) => $(e)), c = rr(a, u.value, o.value), l = Z(a), d = new Set(s), f = new Set(i), p = t.filter((e) => !d.has($(e))), m = a.flatMap((e) => {
3028
+ let i = t.map((e) => $(e)), a = r ?? [], s = a.map((e) => $(e)), c = mr(a, u.value, o.value), l = X(a), d = new Set(s), f = new Set(i), p = t.filter((e) => !d.has($(e))), m = a.flatMap((e) => {
2753
3029
  let t = $(e);
2754
3030
  if (f.has(t)) return [];
2755
3031
  let n = c.get(t), r = l.get(t);
@@ -2758,16 +3034,16 @@ function Rr(e) {
2758
3034
  item: e,
2759
3035
  position: n
2760
3036
  }];
2761
- }), h = i.length > s.length && s.length > 0 && i[0] !== s[0], _ = t.length === 0 && a.length > 0 && m.length > 0 && n.value > 0, y = m.length > 0 && n.value > Er + Dr, b = h && n.value > Er + Dr ? t[v.value] : null, x = b ? $(b) : null;
2762
- y && q(pr() + Lr), _ && K(), V(), m.length > 0 && N.markLeave(m), p.length > 0 && (N.markEnter(p, h ? "top" : "bottom"), h ? P.onItemsMutated(p.length) : I.onItemsMutated(p.length)), N.playFlipMoveAnimation(c, new Set(p.map((e) => $(e))), h ? Ir : void 0), x ? (await g(), te(x, c)) : e.active.value && s.length > 0 && ne();
2763
- }, { immediate: !0 }), F([
3037
+ }), h = i.length > s.length && s.length > 0 && i[0] !== s[0], g = t.length === 0 && a.length > 0 && m.length > 0 && n.value > 0, y = m.length > 0 && n.value > Lr + Rr, b = h && n.value > Lr + Rr ? t[v.value] : null, x = b ? $(b) : null;
3038
+ y && K(wr() + Jr), g && G(), B(), m.length > 0 && M.markLeave(m), p.length > 0 && (M.markEnter(p, h ? "top" : "bottom"), h ? N.onItemsMutated(p.length) : P.onItemsMutated(p.length)), M.playFlipMoveAnimation(c, new Set(p.map((e) => $(e))), h ? qr : void 0), x ? (await _(), ne(x, c)) : e.active.value && s.length > 0 && re();
3039
+ }, { immediate: !0 }), I([
2764
3040
  () => e.pendingAppendItems.value.map((e) => $(e)),
2765
3041
  h,
2766
- _,
3042
+ g,
2767
3043
  r
2768
3044
  ], ([t]) => {
2769
- ue(), t.length && (d.value = ce([...e.items.value, ...e.pendingAppendItems.value]), le());
2770
- }, { immediate: !0 }), F(() => e.active.value, async (e, i) => {
3045
+ de(), t.length && (d.value = le([...e.items.value, ...e.pendingAppendItems.value]), ue());
3046
+ }, { immediate: !0 }), I(() => e.active.value, async (e, i) => {
2771
3047
  let a = t.value;
2772
3048
  if (!a) return;
2773
3049
  if (!e) {
@@ -2775,76 +3051,76 @@ function Rr(e) {
2775
3051
  return;
2776
3052
  }
2777
3053
  if (i !== !1 || f.value == null) return;
2778
- await g();
2779
- let o = Math.max(0, C.value - r.value), s = zr(f.value, 0, o);
2780
- a.scrollTop = s, n.value = s, P.syncBoundary(), I.syncBoundary();
2781
- }), F(() => e.loading.value, async (t) => {
2782
- !t && !e.pendingAppendItems.value.length && !z && !ee && (d.value = null), P.onLoadingChange(t), I.onLoadingChange(t), await g();
2783
- }), x(async () => {
2784
- X(), await g(), v.value > 0 ? G(v.value, "center") : J(), P.syncBoundary(), I.syncBoundary(), typeof ResizeObserver < "u" ? (L = new ResizeObserver(() => {
2785
- X();
2786
- }), t.value && L.observe(t.value)) : window.addEventListener("resize", X);
2787
- }), b(() => {
2788
- L?.disconnect(), L = null, window.removeEventListener("resize", X), ue(), de(), R &&= (cancelAnimationFrame(R), 0);
3054
+ await _();
3055
+ let o = Math.max(0, C.value - r.value), s = Xr(f.value, 0, o);
3056
+ a.scrollTop = s, n.value = s, N.syncBoundary(), P.syncBoundary();
3057
+ }), I(() => e.loading.value, async (t) => {
3058
+ !t && !e.pendingAppendItems.value.length && !R && !te && (d.value = null), N.onLoadingChange(t), P.onLoadingChange(t), await _();
3059
+ }), S(async () => {
3060
+ Y(), await _(), v.value > 0 ? W(v.value, "center") : q(), N.syncBoundary(), P.syncBoundary(), typeof ResizeObserver < "u" ? (F = new ResizeObserver(() => {
3061
+ Y();
3062
+ }), t.value && F.observe(t.value)) : window.addEventListener("resize", Y);
3063
+ }), x(() => {
3064
+ F?.disconnect(), F = null, window.removeEventListener("resize", Y), de(), Z(), L &&= (cancelAnimationFrame(L), 0);
2789
3065
  });
2790
- function V() {
2791
- let t = tr(e.items.value, {
3066
+ function B() {
3067
+ let t = fr(e.items.value, {
2792
3068
  columnCount: h.value,
2793
- columnWidth: _.value,
2794
- gapX: Dr,
2795
- gapY: Dr,
2796
- bucketPx: Tr
3069
+ columnWidth: g.value,
3070
+ gapX: Rr,
3071
+ gapY: Rr,
3072
+ bucketPx: Ir
2797
3073
  });
2798
3074
  o.value = t.positions.map((e) => ({
2799
- x: e.x + Er,
2800
- y: e.y + Er
3075
+ x: e.x + Lr,
3076
+ y: e.y + Lr
2801
3077
  })), s.value = t.heights, c.value = t.buckets, l.value = t.contentHeight, u.value = t.indexById;
2802
3078
  }
2803
- function H() {
2804
- e.active.value && (n.value = t.value?.scrollTop ?? 0, r.value = re(), P.syncBoundary(), I.syncBoundary(), Y(), !ne() && (R ||= requestAnimationFrame(() => {
2805
- R = 0, J();
3079
+ function V() {
3080
+ e.active.value && (n.value = t.value?.scrollTop ?? 0, r.value = ie(), N.syncBoundary(), P.syncBoundary(), J(), !re() && (L ||= requestAnimationFrame(() => {
3081
+ L = 0, q();
2806
3082
  })));
2807
3083
  }
2808
- function U(t) {
2809
- e.active.value && (P.onWheel(t), I.onWheel(t), Y());
3084
+ function H(t) {
3085
+ e.active.value && (N.onWheel(t), P.onWheel(t), J());
2810
3086
  }
2811
- function W(t) {
3087
+ function U(t) {
2812
3088
  let n = e.items.value[t], r = n ? $(n) : "";
2813
3089
  return {
2814
- height: `${s.value[t] ?? _.value}px`,
2815
- width: `${_.value}px`,
2816
- transition: r ? N.getCardTransition(r) : void 0,
2817
- transitionDelay: r ? N.getCardTransitionDelay(r) : void 0,
2818
- transform: N.getCardTransform(t)
3090
+ height: `${s.value[t] ?? g.value}px`,
3091
+ width: `${g.value}px`,
3092
+ transition: r ? M.getCardTransition(r) : void 0,
3093
+ transitionDelay: r ? M.getCardTransitionDelay(r) : void 0,
3094
+ transform: M.getCardTransform(t)
2819
3095
  };
2820
3096
  }
2821
- function G(e, i) {
3097
+ function W(e, i) {
2822
3098
  let a = t.value, c = o.value[e], l = s.value[e];
2823
3099
  if (!a || !c || !l) return;
2824
3100
  let u = a.scrollTop, d = Math.max(0, C.value - r.value);
2825
- i === "center" ? u = c.y - (r.value - l) / 2 : c.y < a.scrollTop ? u = c.y - Er : c.y + l > a.scrollTop + r.value && (u = c.y + l - r.value + Er), a.scrollTop = zr(u, 0, d), n.value = a.scrollTop, J();
3101
+ i === "center" ? u = c.y - (r.value - l) / 2 : c.y < a.scrollTop ? u = c.y - Lr : c.y + l > a.scrollTop + r.value && (u = c.y + l - r.value + Lr), a.scrollTop = Xr(u, 0, d), n.value = a.scrollTop, q();
2826
3102
  }
2827
- function te(e, r) {
3103
+ function ne(e, r) {
2828
3104
  let i = t.value, a = r.get(e), s = u.value.get(e), c = s == null ? null : o.value[s];
2829
3105
  if (!i || !a || !c) return;
2830
3106
  let l = c.y - a.y;
2831
3107
  i.scrollTop += l, n.value = i.scrollTop;
2832
3108
  }
2833
- function K() {
3109
+ function G() {
2834
3110
  let e = t.value;
2835
3111
  if (!e) {
2836
3112
  n.value = 0;
2837
3113
  return;
2838
3114
  }
2839
- e.scrollTop = 0, n.value = 0, P.syncBoundary(), I.syncBoundary();
3115
+ e.scrollTop = 0, n.value = 0, N.syncBoundary(), P.syncBoundary();
2840
3116
  }
2841
- function q(e) {
2842
- de(), p.value = !0, B = setTimeout(() => {
2843
- B = null, p.value = !1;
3117
+ function K(e) {
3118
+ Z(), p.value = !0, z = setTimeout(() => {
3119
+ z = null, p.value = !1;
2844
3120
  }, Math.max(0, e));
2845
3121
  }
2846
- function J() {
2847
- if (!y.value.length || ne()) return;
3122
+ function q() {
3123
+ if (!y.value.length || re()) return;
2848
3124
  let t = n.value + r.value / 2, i = v.value, a = Infinity;
2849
3125
  for (let e of y.value) {
2850
3126
  let n = o.value[e], r = s.value[e];
@@ -2854,42 +3130,42 @@ function Rr(e) {
2854
3130
  }
2855
3131
  e.setActiveIndex(i);
2856
3132
  }
2857
- function ne() {
2858
- let t = n.value <= jr, r = ae() <= Ar;
3133
+ function re() {
3134
+ let t = n.value <= Hr, r = oe() <= Vr;
2859
3135
  return t ? (e.setActiveIndex(0), !0) : r ? (e.setActiveIndex(Math.max(0, e.items.value.length - 1)), !0) : !1;
2860
3136
  }
2861
- function Y() {
2862
- P.maybeRequestPage(), I.maybeRequestPage();
2863
- }
2864
- function X() {
2865
- r.value = re(), a.value = ie();
3137
+ function J() {
3138
+ N.maybeRequestPage(), P.maybeRequestPage();
2866
3139
  }
2867
- function re() {
2868
- return vr(t.value, r.value);
3140
+ function Y() {
3141
+ r.value = ie(), a.value = ae();
2869
3142
  }
2870
3143
  function ie() {
2871
- return yr(t.value, a.value, Or);
3144
+ return kr(t.value, r.value);
2872
3145
  }
2873
3146
  function ae() {
2874
- return br(t.value, n.value, r.value, C.value);
3147
+ return Ar(t.value, a.value, zr);
2875
3148
  }
2876
3149
  function oe() {
3150
+ return jr(t.value, n.value, r.value, C.value);
3151
+ }
3152
+ function se() {
2877
3153
  let e = Math.max(t.value?.scrollHeight ?? 0, C.value);
2878
3154
  return Math.max(0, e - r.value);
2879
3155
  }
2880
- function se() {
2881
- return xr(j.value, M.value);
3156
+ function ce() {
3157
+ return Mr(A.value, j.value);
2882
3158
  }
2883
- function ce(e) {
2884
- return e.length ? tr(e, {
3159
+ function le(e) {
3160
+ return e.length ? fr(e, {
2885
3161
  columnCount: h.value,
2886
- columnWidth: _.value,
2887
- gapX: Dr,
2888
- gapY: Dr,
2889
- bucketPx: Tr
2890
- }).contentHeight + Er * 2 : 0;
3162
+ columnWidth: g.value,
3163
+ gapX: Rr,
3164
+ gapY: Rr,
3165
+ bucketPx: Ir
3166
+ }).contentHeight + Lr * 2 : 0;
2891
3167
  }
2892
- function Z(e) {
3168
+ function X(e) {
2893
3169
  let t = /* @__PURE__ */ new Map();
2894
3170
  for (let n of e) {
2895
3171
  let e = $(n), r = u.value.get(e);
@@ -2899,64 +3175,64 @@ function Rr(e) {
2899
3175
  }
2900
3176
  return t;
2901
3177
  }
2902
- function le() {
3178
+ function ue() {
2903
3179
  let t = e.commitPendingAppend.value;
2904
- typeof t == "function" && (z = setTimeout(async () => {
2905
- z = null, ee = !0;
3180
+ typeof t == "function" && (R = setTimeout(async () => {
3181
+ R = null, te = !0;
2906
3182
  try {
2907
3183
  if (!e.pendingAppendItems.value.length) return;
2908
- await t(), await g(), await g();
3184
+ await t(), await _(), await _();
2909
3185
  } finally {
2910
- d.value = null, ee = !1;
3186
+ d.value = null, te = !1;
2911
3187
  }
2912
- }, Nr));
2913
- }
2914
- function ue() {
2915
- z &&= (clearTimeout(z), null);
3188
+ }, Wr));
2916
3189
  }
2917
3190
  function de() {
2918
- B && (clearTimeout(B), B = null, p.value = !1);
3191
+ R &&= (clearTimeout(R), null);
3192
+ }
3193
+ function Z() {
3194
+ z && (clearTimeout(z), z = null, p.value = !1);
2919
3195
  }
2920
3196
  return {
2921
- columnWidth: _,
3197
+ columnWidth: g,
2922
3198
  containerHeight: C,
2923
- getCardStyle: W,
2924
- getLeavingCardStyle: N.getLeavingCardStyle,
2925
- getScrollbarThumbStyle: se,
2926
- leavingItems: N.leavingItems,
2927
- nextBoundaryLoadProgress: E,
2928
- onScroll: H,
2929
- onWheel: U,
2930
- paginationLabel: D,
2931
- previousBoundaryLoadProgress: O,
2932
- renderedItems: S,
3199
+ getCardStyle: U,
3200
+ getLeavingCardStyle: M.getLeavingCardStyle,
3201
+ getScrollbarThumbStyle: ce,
3202
+ leavingItems: M.leavingItems,
3203
+ nextBoundaryLoadProgress: T,
3204
+ onScroll: V,
3205
+ onWheel: H,
3206
+ paginationLabel: E,
3207
+ previousBoundaryLoadProgress: ee,
3208
+ renderedItems: b,
2933
3209
  resolvedActiveIndex: v,
2934
- scrollToIndex: G,
2935
- showScrollbar: A,
3210
+ scrollToIndex: W,
3211
+ showScrollbar: k,
2936
3212
  scrollViewportRef: t
2937
3213
  };
2938
3214
  }
2939
- function zr(e, t, n) {
3215
+ function Xr(e, t, n) {
2940
3216
  return Math.min(Math.max(e, t), n);
2941
3217
  }
2942
- function Br(e) {
3218
+ function Zr(e) {
2943
3219
  if (!e.active || !e.triggerEnabled) return 0;
2944
3220
  let t = Math.max(0, e.maxScrollTop - e.thresholdPx);
2945
- return t <= 0 ? 1 : zr(1 - (e.progressDistancePx - e.thresholdPx) / t, 0, 1);
3221
+ return t <= 0 ? 1 : Xr(1 - (e.progressDistancePx - e.thresholdPx) / t, 0, 1);
2946
3222
  }
2947
- function Vr(e) {
3223
+ function Qr(e) {
2948
3224
  if (!e.active || !e.triggerEnabled) return 0;
2949
3225
  let t = Math.max(0, e.maxScrollTop - e.thresholdPx);
2950
- return t <= 0 ? 1 : zr(e.progressDistancePx / t, 0, 1);
3226
+ return t <= 0 ? 1 : Xr(e.progressDistancePx / t, 0, 1);
2951
3227
  }
2952
3228
  //#endregion
2953
3229
  //#region src/components/viewer-core/listCardAsset.ts
2954
- function Hr(e) {
3230
+ function $r(e) {
2955
3231
  if (e) try {
2956
3232
  e.removeAttribute("src"), e.src = "";
2957
3233
  } catch {}
2958
3234
  }
2959
- function Ur(e) {
3235
+ function ei(e) {
2960
3236
  if (e) {
2961
3237
  try {
2962
3238
  e.currentTime = 0;
@@ -2967,12 +3243,12 @@ function Ur(e) {
2967
3243
  } catch {}
2968
3244
  }
2969
3245
  }
2970
- function Wr(e, t) {
3246
+ function ti(e, t) {
2971
3247
  if (t) return e.bottom > t.top && e.top < t.bottom;
2972
3248
  let n = window.innerHeight || document.documentElement.clientHeight || 0;
2973
3249
  return e.bottom > 0 && e.top < n;
2974
3250
  }
2975
- function Gr(e) {
3251
+ function ni(e) {
2976
3252
  if (!e) return null;
2977
3253
  try {
2978
3254
  return new URL(e, window.location.href).href;
@@ -2982,9 +3258,9 @@ function Gr(e) {
2982
3258
  }
2983
3259
  //#endregion
2984
3260
  //#region src/components/viewer-core/listPreview.ts
2985
- var Kr = /\.(avif|gif|jpe?g|png|svg|webp)(\?|#|$)/i, qr = /\.(m4v|mov|mp4|mpeg|ogg|ogv|webm)(\?|#|$)/i, Jr = /^(?:(?:https?:)?\/\/[^/]+)?\/api\/files\/[^/?#]+\/(?:preview|downloaded)(?:\?|#|$)/i;
2986
- function Yr(e) {
2987
- let t = Xr(e), n = t?.url, r = Zn(e), i = e.title?.trim() || wt(e.type);
3261
+ var ri = /\.(avif|gif|jpe?g|png|svg|webp)(\?|#|$)/i, ii = /\.(m4v|mov|mp4|mpeg|ogg|ogv|webm)(\?|#|$)/i, ai = /^(?:(?:https?:)?\/\/[^/]+)?\/api\/files\/[^/?#]+\/(?:preview|downloaded)(?:\?|#|$)/i;
3262
+ function oi(e) {
3263
+ let t = si(e), n = t?.url, r = cr(e), i = e.title?.trim() || Et(e.type);
2988
3264
  return t?.mediaType === "video" && typeof n == "string" ? {
2989
3265
  kind: "video",
2990
3266
  url: n,
@@ -3003,13 +3279,13 @@ function Yr(e) {
3003
3279
  width: r.width,
3004
3280
  height: r.height,
3005
3281
  label: i
3006
- } : typeof n == "string" && Qr(e, n) ? {
3282
+ } : typeof n == "string" && li(e, n) ? {
3007
3283
  kind: "video",
3008
3284
  url: n,
3009
3285
  width: r.width,
3010
3286
  height: r.height,
3011
3287
  label: i
3012
- } : typeof n == "string" && Zr(e, n) ? {
3288
+ } : typeof n == "string" && ci(e, n) ? {
3013
3289
  kind: "image",
3014
3290
  url: n,
3015
3291
  width: r.width,
@@ -3023,99 +3299,31 @@ function Yr(e) {
3023
3299
  label: i
3024
3300
  };
3025
3301
  }
3026
- function Xr(e) {
3302
+ function si(e) {
3027
3303
  return e.preview?.url ? e.preview : typeof e.url != "string" || e.url.trim() === "" ? null : { url: e.url };
3028
3304
  }
3029
- function Zr(e, t) {
3030
- return e.type !== "image" || typeof t != "string" ? !1 : Kr.test(t) || $r(t);
3305
+ function ci(e, t) {
3306
+ return e.type !== "image" || typeof t != "string" ? !1 : ri.test(t) || ui(t);
3031
3307
  }
3032
- function Qr(e, t) {
3033
- return e.type !== "video" || typeof t != "string" ? !1 : qr.test(t) || ei(t);
3308
+ function li(e, t) {
3309
+ return e.type !== "video" || typeof t != "string" ? !1 : ii.test(t) || di(t);
3034
3310
  }
3035
- function $r(e) {
3311
+ function ui(e) {
3036
3312
  return /^(https?:\/\/|\/\/|\/(?!\/)|\.{1,2}\/|blob:|data:)/i.test(e);
3037
3313
  }
3038
- function ei(e) {
3039
- return Jr.test(e) || /^blob:/i.test(e) || /^data:video\//i.test(e);
3040
- }
3041
- //#endregion
3042
- //#region src/components/viewer-core/useAssetLoadQueue.ts
3043
- var ti = {
3044
- maxGlobal: 10,
3045
- maxPerDomain: 4,
3046
- maxVideoPerDomain: 2
3047
- };
3048
- function ni(e = ti) {
3049
- let t = /* @__PURE__ */ new Map(), n = /* @__PURE__ */ new Map(), r = 0;
3050
- function i(e) {
3051
- let i = {
3052
- ...e,
3053
- domain: ai(e.url),
3054
- enqueuedAt: r,
3055
- id: `vibe-asset-load-${r += 1}`
3056
- };
3057
- return n.set(i.id, i), a(), {
3058
- cancel() {
3059
- (n.delete(i.id) || t.delete(i.id)) && a();
3060
- },
3061
- refresh() {
3062
- a();
3063
- },
3064
- release() {
3065
- (t.delete(i.id) || n.delete(i.id)) && a();
3066
- }
3067
- };
3068
- }
3069
- function a() {
3070
- if (n.size === 0) return;
3071
- let r = [...n.values()].sort((e, t) => {
3072
- let n = ii(e) - ii(t);
3073
- return n === 0 ? e.enqueuedAt - t.enqueuedAt : n;
3074
- });
3075
- for (let i of r) {
3076
- if (t.size >= e.maxGlobal) return;
3077
- if (o(i)) {
3078
- n.delete(i.id), t.set(i.id, i);
3079
- try {
3080
- i.onGrant();
3081
- } catch {
3082
- t.delete(i.id);
3083
- }
3084
- }
3085
- }
3086
- }
3087
- function o(n) {
3088
- let r = [...t.values()].filter((e) => e.domain === n.domain);
3089
- return !(r.length >= e.maxPerDomain || n.assetType === "video" && r.filter((e) => e.assetType === "video").length >= e.maxVideoPerDomain);
3090
- }
3091
- return { request: i };
3092
- }
3093
- var ri = ni();
3094
- function ii(e) {
3095
- try {
3096
- let t = e.getPriority();
3097
- return Number.isFinite(t) ? t : Infinity;
3098
- } catch {
3099
- return Infinity;
3100
- }
3101
- }
3102
- function ai(e) {
3103
- try {
3104
- return new URL(e).hostname || "local";
3105
- } catch {
3106
- return "local";
3107
- }
3314
+ function di(e) {
3315
+ return ai.test(e) || /^blob:/i.test(e) || /^data:video\//i.test(e);
3108
3316
  }
3109
3317
  //#endregion
3110
3318
  //#region src/components/viewer-core/useListCardHealthCheck.ts
3111
- function oi(e) {
3112
- let t = T(null), n = i(() => {
3113
- let t = typeof e.item.value.healthCheck?.url == "string" ? Gr(e.item.value.healthCheck.url) : null;
3319
+ function fi(e) {
3320
+ let t = D(null), n = i(() => {
3321
+ let t = typeof e.item.value.healthCheck?.url == "string" ? ni(e.item.value.healthCheck.url) : null;
3114
3322
  return !t || t === e.attachedAssetUrl.value ? null : t;
3115
3323
  }), r = null, a = 0, o = /* @__PURE__ */ new Map();
3116
- F(n, (e, n) => {
3324
+ I(n, (e, n) => {
3117
3325
  e !== n && (t.value = null, l(), a += 1);
3118
- }), F([
3326
+ }), I([
3119
3327
  n,
3120
3328
  e.surfaceActive,
3121
3329
  e.isInView,
@@ -3142,7 +3350,7 @@ function oi(e) {
3142
3350
  r.refresh();
3143
3351
  return;
3144
3352
  }
3145
- r = ri.request({
3353
+ r = kt.request({
3146
3354
  assetType: "probe",
3147
3355
  getPriority: e.getPriority,
3148
3356
  onGrant() {
@@ -3152,7 +3360,7 @@ function oi(e) {
3152
3360
  return;
3153
3361
  }
3154
3362
  let i = ++a;
3155
- Gt(r).then((s) => {
3363
+ nn(r).then((s) => {
3156
3364
  if (!(i !== a || n.value !== r)) {
3157
3365
  if (o.set(r, s ?? null), !s) {
3158
3366
  t.value = null;
@@ -3188,14 +3396,14 @@ function oi(e) {
3188
3396
  }
3189
3397
  //#endregion
3190
3398
  //#region src/components/ListCard.vue?vue&type=script&setup=true&lang.ts
3191
- var si = ["aria-label"], ci = {
3399
+ var pi = ["aria-label"], mi = {
3192
3400
  key: 0,
3193
3401
  "data-testid": "vibe-list-card-spinner",
3194
3402
  class: "pointer-events-none absolute inset-0 z-[4] grid place-items-center bg-black/18"
3195
- }, li = { class: "inline-flex h-12 w-12 items-center justify-center rounded-full bg-black/45 shadow-[0_18px_40px_-18px_rgba(0,0,0,0.85)] backdrop-blur-[18px]" }, ui = ["src", "alt"], di = ["src"], fi = ["data-kind"], pi = { class: "grid justify-items-center gap-3 px-4 text-center" }, mi = { class: "text-[0.68rem] font-bold uppercase tracking-[0.22em] text-[#f7f1ea]/72" }, hi = {
3403
+ }, hi = { class: "inline-flex h-12 w-12 items-center justify-center rounded-full bg-black/45 shadow-[0_18px_40px_-18px_rgba(0,0,0,0.85)] backdrop-blur-[18px]" }, gi = ["src", "alt"], _i = ["src"], vi = ["data-kind"], yi = { class: "grid justify-items-center gap-3 px-4 text-center" }, bi = { class: "text-[0.68rem] font-bold uppercase tracking-[0.22em] text-[#f7f1ea]/72" }, xi = {
3196
3404
  key: 4,
3197
3405
  class: "grid h-full w-full place-items-center bg-[radial-gradient(circle_at_center,rgba(255,255,255,0.08),transparent_65%),linear-gradient(180deg,rgba(255,255,255,0.04),rgba(255,255,255,0.02))]"
3198
- }, gi = { class: "inline-flex h-14 w-14 items-center justify-center border border-white/16 bg-black/20" }, _i = { class: "pointer-events-none absolute inset-0 z-[3]" }, vi = /* @__PURE__ */ d({
3406
+ }, Si = { class: "inline-flex h-14 w-14 items-center justify-center border border-white/16 bg-black/20" }, Ci = { class: "pointer-events-none absolute inset-0 z-[3]" }, wi = /* @__PURE__ */ d({
3199
3407
  __name: "ListCard",
3200
3408
  props: {
3201
3409
  active: {
@@ -3219,106 +3427,106 @@ var si = ["aria-label"], ci = {
3219
3427
  },
3220
3428
  emits: ["open"],
3221
3429
  setup(e, { emit: t }) {
3222
- let n = e, r = t, l = i(() => Yr(n.item)), d = T(!1), f = T(!1), p = T(!1), m = T(l.value.kind === "fallback"), h = T(!1), g = T(null), v = T(null), y = T(null), C = T(null), w = T(null), E = T(l.value.kind === "fallback"), A = i(() => E.value ? n.surfaceActive ? d.value ? l.value.url : null : l.value.url : null), M = i(() => n.surfaceActive && d.value && (l.value.kind === "image" || l.value.kind === "video") && !!l.value.url), N = i(() => l.value.kind === "image" && !!A.value), P = i(() => l.value.kind === "video" && !!A.value), I = oi({
3223
- attachedAssetUrl: A,
3224
- getPriority: Z,
3430
+ let n = e, r = t, l = i(() => oi(n.item)), d = D(!1), f = D(!1), p = D(!1), m = D(l.value.kind === "fallback"), h = D(!1), g = D(null), _ = D(null), y = D(null), b = D(null), C = D(null), T = D(l.value.kind === "fallback"), E = i(() => T.value ? n.surfaceActive ? d.value ? l.value.url : null : l.value.url : null), ee = i(() => n.surfaceActive && d.value && (l.value.kind === "image" || l.value.kind === "video") && !!l.value.url), j = i(() => l.value.kind === "image" && !!E.value), N = i(() => l.value.kind === "video" && !!E.value), P = fi({
3431
+ attachedAssetUrl: E,
3432
+ getPriority: X,
3225
3433
  isInView: d,
3226
3434
  isReady: m,
3227
3435
  item: i(() => n.item),
3228
3436
  loadErrorKind: g,
3229
3437
  reportAssetError: n.reportAssetError,
3230
3438
  surfaceActive: i(() => n.surfaceActive)
3231
- }), L = i(() => I.errorKind.value ?? g.value), R = i(() => !!L.value), B = i(() => Ut(L.value)), ee = i(() => M.value && !g.value && (!E.value || !m.value)), V = null, H = null, U = /* @__PURE__ */ new Set();
3232
- F([A, () => l.value.kind], () => {
3439
+ }), F = i(() => P.errorKind.value ?? g.value), L = i(() => !!F.value), R = i(() => en(F.value)), z = i(() => ee.value && !g.value && (!T.value || !m.value)), B = null, V = null, H = /* @__PURE__ */ new Set();
3440
+ I([E, () => l.value.kind], () => {
3233
3441
  let e = l.value.kind === "fallback";
3234
- m.value = e, h.value = !1, g.value = null, e && (E.value = !0);
3235
- }), F(M, () => {
3236
- q();
3237
- }), F([
3442
+ m.value = e, h.value = !1, g.value = null, e && (T.value = !0);
3443
+ }), I(ee, () => {
3444
+ K();
3445
+ }), I([
3238
3446
  d,
3239
3447
  m,
3240
- A
3448
+ E
3241
3449
  ], () => {
3242
- J();
3243
- }), F(() => n.surfaceActive, (e) => {
3450
+ q();
3451
+ }), I(() => n.surfaceActive, (e) => {
3244
3452
  if (!e) {
3245
- Y(), J();
3453
+ J(), q();
3246
3454
  return;
3247
3455
  }
3248
3456
  requestAnimationFrame(() => {
3249
- X(), q(), J();
3457
+ Y(), K(), q();
3250
3458
  });
3251
- }), x(() => {
3459
+ }), S(() => {
3252
3460
  if (!y.value || typeof IntersectionObserver > "u") {
3253
- C.value = null, d.value = !0, q();
3461
+ b.value = null, d.value = !0, K();
3254
3462
  return;
3255
3463
  }
3256
- C.value = y.value.closest("[data-testid=\"vibe-list-scroll\"]"), V = new IntersectionObserver((e) => {
3257
- for (let t of e) t.target === y.value && (n.surfaceActive && X(t), q(), J());
3464
+ b.value = y.value.closest("[data-testid=\"vibe-list-scroll\"]"), B = new IntersectionObserver((e) => {
3465
+ for (let t of e) t.target === y.value && (n.surfaceActive && Y(t), K(), q());
3258
3466
  }, {
3259
- root: C.value,
3467
+ root: b.value,
3260
3468
  threshold: [0, 1]
3261
- }), V.observe(y.value);
3262
- }), b(() => {
3263
- ne(), I.release(), V?.disconnect(), V = null;
3469
+ }), B.observe(y.value);
3470
+ }), x(() => {
3471
+ re(), P.release(), B?.disconnect(), B = null;
3264
3472
  });
3265
- function W() {
3266
- le(v.value) && (m.value = !0, g.value = null, ie(A.value ?? n.item.url), Y());
3473
+ function U() {
3474
+ ue(_.value) && (m.value = !0, g.value = null, ie(E.value ?? n.item.url), J());
3267
3475
  }
3268
- async function G() {
3269
- if (!le(v.value)) return;
3270
- let e = A.value ?? n.item.url;
3476
+ async function W() {
3477
+ if (!ue(_.value)) return;
3478
+ let e = E.value ?? n.item.url;
3271
3479
  m.value = !1, g.value = "generic";
3272
- let t = await Wt(e);
3480
+ let t = await tn(e);
3273
3481
  g.value = t, n.reportAssetError?.({
3274
3482
  item: n.item,
3275
3483
  occurrenceKey: $(n.item),
3276
3484
  url: e,
3277
3485
  kind: t,
3278
3486
  surface: "grid"
3279
- }), Y();
3487
+ }), J();
3280
3488
  }
3281
- function te() {
3282
- le(w.value) && (h.value = !0, m.value = !0, g.value = null, ie(A.value ?? n.item.url), Y(), J());
3489
+ function ne() {
3490
+ ue(C.value) && (h.value = !0, m.value = !0, g.value = null, ie(E.value ?? n.item.url), J(), q());
3283
3491
  }
3284
- function K() {
3285
- le(w.value) && (h.value || (m.value = !1));
3492
+ function G() {
3493
+ ue(C.value) && (h.value || (m.value = !1));
3286
3494
  }
3287
- function q() {
3495
+ function K() {
3288
3496
  if (l.value.kind === "fallback") {
3289
- ne(!1);
3497
+ re(!1);
3290
3498
  return;
3291
3499
  }
3292
3500
  if (!n.surfaceActive) {
3293
- Y();
3501
+ J();
3294
3502
  return;
3295
3503
  }
3296
- if (!M.value) {
3297
- ne();
3504
+ if (!ee.value) {
3505
+ re();
3298
3506
  return;
3299
3507
  }
3300
- if (E.value || H) {
3301
- H?.refresh();
3508
+ if (T.value || V) {
3509
+ V?.refresh();
3302
3510
  return;
3303
3511
  }
3304
- H = ri.request({
3512
+ V = kt.request({
3305
3513
  assetType: l.value.kind,
3306
- getPriority: Z,
3514
+ getPriority: X,
3307
3515
  onGrant() {
3308
- E.value = !0, m.value = !1, g.value = null;
3516
+ T.value = !0, m.value = !1, g.value = null;
3309
3517
  },
3310
3518
  url: l.value.url ?? n.item.url
3311
3519
  });
3312
3520
  }
3313
- function J() {
3314
- let e = w.value;
3521
+ function q() {
3522
+ let e = C.value;
3315
3523
  if (!(!e || l.value.kind !== "video")) {
3316
- if (L.value) {
3524
+ if (F.value) {
3317
3525
  e.pause();
3318
3526
  return;
3319
3527
  }
3320
- if (A.value && d.value && m.value) {
3321
- e.muted = !0, e.loop = !0, e.playsInline = !0, Jt(e);
3528
+ if (E.value && d.value && m.value) {
3529
+ e.muted = !0, e.loop = !0, e.playsInline = !0, on(e);
3322
3530
  return;
3323
3531
  }
3324
3532
  try {
@@ -3327,24 +3535,24 @@ var si = ["aria-label"], ci = {
3327
3535
  e.pause();
3328
3536
  }
3329
3537
  }
3330
- function ne(e = !0) {
3331
- E.value = l.value.kind === "fallback", g.value = null, m.value = l.value.kind === "fallback", e && (se(), ce()), Y();
3538
+ function re(e = !0) {
3539
+ T.value = l.value.kind === "fallback", g.value = null, m.value = l.value.kind === "fallback", e && (se(), ce()), J();
3332
3540
  }
3333
- function Y() {
3334
- H?.release(), H = null;
3541
+ function J() {
3542
+ V?.release(), V = null;
3335
3543
  }
3336
- function X(e) {
3544
+ function Y(e) {
3337
3545
  let t = y.value;
3338
3546
  if (!t) {
3339
3547
  d.value = !0;
3340
3548
  return;
3341
3549
  }
3342
- d.value = Wr(e?.boundingClientRect ?? t.getBoundingClientRect(), e?.rootBounds ?? C.value?.getBoundingClientRect() ?? null);
3550
+ d.value = ti(e?.boundingClientRect ?? t.getBoundingClientRect(), e?.rootBounds ?? b.value?.getBoundingClientRect() ?? null);
3343
3551
  }
3344
3552
  function ie(e) {
3345
3553
  if (!e) return;
3346
3554
  let t = $(n.item), r = `${t}|${e}`;
3347
- U.has(r) || (U.add(r), n.reportAssetLoad?.({
3555
+ H.has(r) || (H.add(r), n.reportAssetLoad?.({
3348
3556
  item: n.item,
3349
3557
  occurrenceKey: t,
3350
3558
  surface: "grid",
@@ -3352,50 +3560,50 @@ var si = ["aria-label"], ci = {
3352
3560
  }));
3353
3561
  }
3354
3562
  function ae() {
3355
- if (!B.value || I.retry()) return;
3563
+ if (!R.value || P.retry()) return;
3356
3564
  let e = $(n.item);
3357
- U.forEach((t) => {
3358
- t.startsWith(`${e}|`) && U.delete(t);
3359
- }), g.value = null, m.value = !1, E.value = !1, Y(), q();
3565
+ H.forEach((t) => {
3566
+ t.startsWith(`${e}|`) && H.delete(t);
3567
+ }), g.value = null, m.value = !1, T.value = !1, J(), K();
3360
3568
  }
3361
3569
  function se() {
3362
- Hr(v.value);
3570
+ $r(_.value);
3363
3571
  }
3364
3572
  function ce() {
3365
- Ur(w.value);
3573
+ ei(C.value);
3366
3574
  }
3367
- function Z() {
3575
+ function X() {
3368
3576
  let e = y.value;
3369
3577
  if (!e) return Infinity;
3370
3578
  let t = e.getBoundingClientRect();
3371
- if (C.value) {
3372
- let e = C.value.getBoundingClientRect(), n = e.top + e.height / 2;
3579
+ if (b.value) {
3580
+ let e = b.value.getBoundingClientRect(), n = e.top + e.height / 2;
3373
3581
  return Math.abs((t.top + t.bottom) / 2 - n);
3374
3582
  }
3375
3583
  let n = window.innerHeight / 2;
3376
3584
  return Math.abs((t.top + t.bottom) / 2 - n);
3377
3585
  }
3378
- function le(e) {
3379
- let t = Gr(A.value);
3380
- return !e || !t ? !1 : Gr("currentSrc" in e && e.currentSrc || e.getAttribute("src")) === t;
3586
+ function ue(e) {
3587
+ let t = ni(E.value);
3588
+ return !e || !t ? !1 : ni("currentSrc" in e && e.currentSrc || e.getAttribute("src")) === t;
3381
3589
  }
3382
- function ue() {
3590
+ function de() {
3383
3591
  r("open");
3384
3592
  }
3385
- function de() {
3593
+ function Z() {
3386
3594
  f.value = !0;
3387
3595
  }
3388
- function Q(e) {
3596
+ function fe(e) {
3389
3597
  let t = e.relatedTarget;
3390
3598
  y.value && t instanceof Node && y.value.contains(t) || (f.value = !1);
3391
3599
  }
3392
- return (e, t) => (S(), s("div", {
3600
+ return (e, t) => (w(), s("div", {
3393
3601
  ref_key: "rootRef",
3394
3602
  ref: y,
3395
3603
  "data-testid": "vibe-list-card-inner",
3396
- class: _(["group relative h-full w-full overflow-hidden border bg-[#0a0b0f] text-[#f7f1ea] transition-[border-color,transform] duration-300", n.active ? "border-white/28" : "border-white/12 hover:border-white/24"]),
3397
- onFocusin: de,
3398
- onFocusout: Q,
3604
+ class: v(["group relative h-full w-full overflow-hidden border bg-[#0a0b0f] text-[#f7f1ea] transition-[border-color,transform] duration-300", n.active ? "border-white/28" : "border-white/12 hover:border-white/24"]),
3605
+ onFocusin: Z,
3606
+ onFocusout: fe,
3399
3607
  onPointerenter: t[0] ||= (e) => p.value = !0,
3400
3608
  onPointerleave: t[1] ||= (e) => p.value = !1
3401
3609
  }, [
@@ -3404,90 +3612,90 @@ var si = ["aria-label"], ci = {
3404
3612
  "data-testid": "vibe-list-card-open",
3405
3613
  class: "absolute inset-0 z-[1] block h-full w-full cursor-pointer text-left focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-4 focus-visible:outline-[#f7f1ea]",
3406
3614
  "aria-label": n.item.title || `Open item ${n.index + 1}`,
3407
- onClick: ue
3408
- }, null, 8, si),
3409
- ee.value ? (S(), s("div", ci, [c("span", li, [u(j(re), {
3615
+ onClick: de
3616
+ }, null, 8, pi),
3617
+ z.value ? (w(), s("div", mi, [c("span", hi, [u(M(oe), {
3410
3618
  class: "h-5 w-5 animate-spin stroke-[1.9] text-[#f7f1ea]/78",
3411
3619
  "aria-hidden": "true"
3412
3620
  })])])) : o("", !0),
3413
- N.value && A.value && !R.value ? (S(), s("img", {
3621
+ j.value && E.value && !L.value ? (w(), s("img", {
3414
3622
  key: 1,
3415
3623
  ref_key: "imageRef",
3416
- ref: v,
3417
- src: A.value,
3624
+ ref: _,
3625
+ src: E.value,
3418
3626
  alt: l.value.label,
3419
3627
  draggable: "false",
3420
- class: _(["block h-full w-full object-cover transition-opacity duration-300", m.value ? "pointer-events-none opacity-100" : "pointer-events-none opacity-0"]),
3421
- onLoad: W,
3422
- onError: G
3423
- }, null, 42, ui)) : P.value && A.value && !R.value ? (S(), s("video", {
3628
+ class: v(["block h-full w-full object-cover transition-opacity duration-300", m.value ? "pointer-events-none opacity-100" : "pointer-events-none opacity-0"]),
3629
+ onLoad: U,
3630
+ onError: W
3631
+ }, null, 42, gi)) : N.value && E.value && !L.value ? (w(), s("video", {
3424
3632
  key: 2,
3425
3633
  ref_key: "videoRef",
3426
- ref: w,
3427
- src: A.value,
3634
+ ref: C,
3635
+ src: E.value,
3428
3636
  muted: "",
3429
3637
  loop: "",
3430
3638
  playsinline: "",
3431
3639
  preload: "metadata",
3432
- class: _(["block h-full w-full object-cover transition-opacity duration-300", m.value ? "pointer-events-none opacity-100" : "pointer-events-none opacity-0"]),
3433
- onCanplay: te,
3434
- onError: G,
3435
- onLoadstart: K,
3436
- onPlaying: te,
3437
- onStalled: K,
3438
- onWaiting: K
3439
- }, null, 42, di)) : R.value ? (S(), s("div", {
3640
+ class: v(["block h-full w-full object-cover transition-opacity duration-300", m.value ? "pointer-events-none opacity-100" : "pointer-events-none opacity-0"]),
3641
+ onCanplay: ne,
3642
+ onError: W,
3643
+ onLoadstart: G,
3644
+ onPlaying: ne,
3645
+ onStalled: G,
3646
+ onWaiting: G
3647
+ }, null, 42, _i)) : L.value ? (w(), s("div", {
3440
3648
  key: 3,
3441
3649
  "data-testid": "vibe-list-card-error",
3442
- "data-kind": L.value,
3650
+ "data-kind": F.value,
3443
3651
  class: "pointer-events-none relative z-[2] grid h-full w-full place-items-center bg-[radial-gradient(circle_at_center,rgba(239,68,68,0.12),transparent_65%),linear-gradient(180deg,rgba(255,255,255,0.04),rgba(255,255,255,0.02))]"
3444
- }, [c("div", pi, [
3445
- u(j(oe), {
3652
+ }, [c("div", yi, [
3653
+ u(M(le), {
3446
3654
  class: "h-6 w-6 stroke-[1.8] text-[#f7f1ea]/78",
3447
3655
  "aria-hidden": "true"
3448
3656
  }),
3449
- c("span", mi, k(j(Ht)(L.value)), 1),
3450
- B.value ? (S(), s("button", {
3657
+ c("span", bi, A(M($t)(F.value)), 1),
3658
+ R.value ? (w(), s("button", {
3451
3659
  key: 0,
3452
3660
  type: "button",
3453
3661
  class: "pointer-events-auto inline-flex items-center justify-center border border-white/14 bg-black/35 px-3 py-2 text-[0.62rem] font-bold uppercase tracking-[0.22em] text-[#f7f1ea]/82 backdrop-blur-[18px] transition hover:border-white/28 hover:bg-black/50",
3454
- onClick: z(ae, ["stop"])
3662
+ onClick: te(ae, ["stop"])
3455
3663
  }, " Retry ")) : o("", !0)
3456
- ])], 8, fi)) : (S(), s("div", hi, [c("div", gi, [D(e.$slots, "item-icon", {
3457
- icon: j(Ct)(n.item.type),
3664
+ ])], 8, vi)) : (w(), s("div", xi, [c("div", Si, [O(e.$slots, "item-icon", {
3665
+ icon: M(Tt)(n.item.type),
3458
3666
  item: n.item
3459
- }, () => [(S(), a(O(j(Ct)(n.item.type)), {
3667
+ }, () => [(w(), a(k(M(Tt)(n.item.type)), {
3460
3668
  class: "h-6 w-6 stroke-[1.8] text-[#f7f1ea]/78",
3461
3669
  "aria-hidden": "true"
3462
3670
  }))])])])),
3463
- c("div", _i, [D(e.$slots, "grid-item-overlay", {
3671
+ c("div", Ci, [O(e.$slots, "grid-item-overlay", {
3464
3672
  active: n.active,
3465
3673
  focused: f.value,
3466
3674
  hovered: p.value,
3467
3675
  index: n.index,
3468
3676
  item: n.item,
3469
- openFullscreen: ue
3677
+ openFullscreen: de
3470
3678
  })])
3471
3679
  ], 34));
3472
3680
  }
3473
- }), yi = { class: "relative h-full min-h-0 bg-[radial-gradient(circle_at_top_center,rgba(255,255,255,0.04),transparent_28%),linear-gradient(180deg,#06070b,#05060a)]" }, bi = { class: "pointer-events-none absolute inset-x-0 top-0 z-[2] flex justify-end p-6" }, xi = {
3681
+ }), Ti = { class: "relative h-full min-h-0 bg-[radial-gradient(circle_at_top_center,rgba(255,255,255,0.04),transparent_28%),linear-gradient(180deg,#06070b,#05060a)]" }, Ei = { class: "pointer-events-none absolute inset-x-0 top-0 z-[2] flex justify-end p-6" }, Di = {
3474
3682
  "data-testid": "vibe-pagination",
3475
3683
  class: "inline-flex shrink-0 items-center gap-2 whitespace-nowrap border border-white/14 bg-black/40 px-3 py-2 text-[0.63rem] font-bold uppercase tracking-[0.12em] text-[#f7f1ea]/72 backdrop-blur-[18px] min-[721px]:gap-3 min-[721px]:px-4 min-[721px]:py-3 min-[721px]:text-[0.74rem] min-[721px]:tracking-[0.2em]"
3476
- }, Si = { class: "whitespace-nowrap" }, Ci = {
3684
+ }, Oi = { class: "whitespace-nowrap" }, ki = {
3477
3685
  key: 0,
3478
3686
  class: "whitespace-nowrap border-l border-white/12 pl-2 text-[#f7f1ea]/56 min-[721px]:pl-3"
3479
- }, wi = [
3687
+ }, Ai = [
3480
3688
  "data-active",
3481
3689
  "data-index",
3482
3690
  "data-item-id",
3483
3691
  "data-occurrence-key"
3484
- ], Ti = ["data-item-id"], Ei = {
3692
+ ], ji = ["data-item-id"], Mi = {
3485
3693
  key: 0,
3486
3694
  class: "pointer-events-none absolute inset-y-0 right-0 z-[3] hidden w-8 min-[1024px]:block"
3487
- }, Di = {
3695
+ }, Ni = {
3488
3696
  key: 1,
3489
3697
  class: "pointer-events-none absolute inset-x-0 bottom-0 z-[2] px-5 pb-5 sm:px-6"
3490
- }, Oi = { class: "mx-auto flex w-full justify-center" }, ki = /* @__PURE__ */ d({
3698
+ }, Pi = { class: "mx-auto flex w-full justify-center" }, Fi = /* @__PURE__ */ d({
3491
3699
  __name: "ListSurface",
3492
3700
  props: {
3493
3701
  active: {
@@ -3548,75 +3756,75 @@ var si = ["aria-label"], ci = {
3548
3756
  "update:activeIndex"
3549
3757
  ],
3550
3758
  setup(e, { emit: n }) {
3551
- let r = e, d = N(), f = n, p = Rr({
3552
- active: A(r, "active"),
3553
- allowExhaustedNextPageRefresh: A(r, "allowExhaustedNextPageRefresh"),
3554
- items: A(r, "items"),
3555
- activeIndex: A(r, "activeIndex"),
3556
- loading: A(r, "loading"),
3557
- hasNextPage: A(r, "hasNextPage"),
3558
- hasPreviousPage: A(r, "hasPreviousPage"),
3559
- paginationDetail: A(r, "paginationDetail"),
3560
- pendingAppendItems: A(r, "pendingAppendItems"),
3561
- commitPendingAppend: A(r, "commitPendingAppend"),
3562
- requestNextPage: A(r, "requestNextPage"),
3563
- requestPreviousPage: A(r, "requestPreviousPage"),
3759
+ let r = e, d = P(), f = n, p = Yr({
3760
+ active: j(r, "active"),
3761
+ allowExhaustedNextPageRefresh: j(r, "allowExhaustedNextPageRefresh"),
3762
+ items: j(r, "items"),
3763
+ activeIndex: j(r, "activeIndex"),
3764
+ loading: j(r, "loading"),
3765
+ hasNextPage: j(r, "hasNextPage"),
3766
+ hasPreviousPage: j(r, "hasPreviousPage"),
3767
+ paginationDetail: j(r, "paginationDetail"),
3768
+ pendingAppendItems: j(r, "pendingAppendItems"),
3769
+ commitPendingAppend: j(r, "commitPendingAppend"),
3770
+ requestNextPage: j(r, "requestNextPage"),
3771
+ requestPreviousPage: j(r, "requestPreviousPage"),
3564
3772
  setActiveIndex(e) {
3565
3773
  f("update:activeIndex", e);
3566
3774
  }
3567
- }), m = i(() => Nt({
3775
+ }), m = i(() => Wt({
3568
3776
  itemCount: r.items.length,
3569
3777
  loading: r.loading,
3570
3778
  phase: r.phase
3571
- })), g = i(() => Pt({
3779
+ })), h = i(() => Gt({
3572
3780
  errorMessage: r.errorMessage,
3573
3781
  hasItems: r.items.length > 0,
3574
3782
  hasNextPage: r.hasNextPage,
3575
3783
  phase: m.value,
3576
3784
  surface: "grid"
3577
- })), b = i(() => !r.showStatusBadges || !g.value ? null : {
3785
+ })), _ = i(() => !r.showStatusBadges || !h.value ? null : {
3578
3786
  activeIndex: p.resolvedActiveIndex.value,
3579
- kind: g.value.kind,
3787
+ kind: h.value.kind,
3580
3788
  loading: r.loading,
3581
- message: g.value.message,
3789
+ message: h.value.message,
3582
3790
  paginationDetail: r.paginationDetail,
3583
3791
  total: r.items.length
3584
- }), x = i(() => !b.value || !d["grid-status"] ? [] : d["grid-status"](b.value)), C = i(() => Ot(x.value)), w = i(() => r.items.length + p.leavingItems.value.length), { emptyStateProps: T, showBadgeEmptyState: O, showCustomEmptyState: M, showInlineEmptyState: P } = jt({
3585
- emptyStateMode: A(r, "emptyStateMode"),
3586
- itemCount: w,
3587
- loading: A(r, "loading"),
3792
+ }), x = i(() => !_.value || !d["grid-status"] ? [] : d["grid-status"](_.value)), S = i(() => zt(x.value)), C = i(() => r.items.length + p.leavingItems.value.length), { emptyStateProps: T, showBadgeEmptyState: E, showCustomEmptyState: D, showInlineEmptyState: k } = Ht({
3793
+ emptyStateMode: j(r, "emptyStateMode"),
3794
+ itemCount: C,
3795
+ loading: j(r, "loading"),
3588
3796
  renderSlot: d["empty-state"],
3589
3797
  surface: "grid"
3590
3798
  });
3591
- return F([p.nextBoundaryLoadProgress, p.previousBoundaryLoadProgress], ([e, t]) => {
3799
+ return I([p.nextBoundaryLoadProgress, p.previousBoundaryLoadProgress], ([e, t]) => {
3592
3800
  f("boundary-load-progress", {
3593
3801
  nextBoundaryLoadProgress: e,
3594
3802
  previousBoundaryLoadProgress: t
3595
3803
  });
3596
- }, { immediate: !0 }), (e, n) => (S(), s("div", yi, [
3597
- c("div", bi, [c("span", xi, [c("span", Si, k(j(p).paginationLabel.value), 1), r.paginationDetail ? (S(), s("span", Ci, k(r.paginationDetail), 1)) : o("", !0)])]),
3804
+ }, { immediate: !0 }), (e, n) => (w(), s("div", Ti, [
3805
+ c("div", Ei, [c("span", Di, [c("span", Oi, A(M(p).paginationLabel.value), 1), r.paginationDetail ? (w(), s("span", ki, A(r.paginationDetail), 1)) : o("", !0)])]),
3598
3806
  c("div", {
3599
- ref: j(p).scrollViewportRef,
3807
+ ref: M(p).scrollViewportRef,
3600
3808
  "data-testid": "vibe-list-scroll",
3601
3809
  class: "h-full min-h-0 overflow-y-auto overflow-x-hidden [overflow-anchor:none] [scrollbar-width:none] [-ms-overflow-style:none] [&::-webkit-scrollbar]:hidden",
3602
- onScroll: n[0] ||= (...e) => j(p).onScroll && j(p).onScroll(...e),
3603
- onWheel: n[1] ||= (...e) => j(p).onWheel && j(p).onWheel(...e)
3810
+ onScroll: n[0] ||= (...e) => M(p).onScroll && M(p).onScroll(...e),
3811
+ onWheel: n[1] ||= (...e) => M(p).onWheel && M(p).onWheel(...e)
3604
3812
  }, [c("div", {
3605
3813
  "data-testid": "vibe-list-content",
3606
3814
  class: "relative",
3607
- style: y({ height: `${j(p).containerHeight.value}px` })
3815
+ style: b({ height: `${M(p).containerHeight.value}px` })
3608
3816
  }, [
3609
- (S(!0), s(t, null, E(j(p).renderedItems.value, ({ item: t, index: n }) => (S(), s("article", {
3610
- key: j($)(t),
3817
+ (w(!0), s(t, null, ee(M(p).renderedItems.value, ({ item: t, index: n }) => (w(), s("article", {
3818
+ key: M($)(t),
3611
3819
  "data-testid": "vibe-list-card",
3612
- "data-active": n === j(p).resolvedActiveIndex.value ? "true" : "false",
3820
+ "data-active": n === M(p).resolvedActiveIndex.value ? "true" : "false",
3613
3821
  "data-index": n,
3614
3822
  "data-item-id": t.id,
3615
- "data-occurrence-key": j($)(t),
3823
+ "data-occurrence-key": M($)(t),
3616
3824
  class: "absolute will-change-transform",
3617
- style: y(j(p).getCardStyle(n))
3618
- }, [u(vi, {
3619
- active: n === j(p).resolvedActiveIndex.value,
3825
+ style: b(M(p).getCardStyle(n))
3826
+ }, [u(wi, {
3827
+ active: n === M(p).resolvedActiveIndex.value,
3620
3828
  index: n,
3621
3829
  item: t,
3622
3830
  "report-asset-error": r.reportAssetError,
@@ -3625,11 +3833,11 @@ var si = ["aria-label"], ci = {
3625
3833
  onOpen: (e) => f("open-fullscreen", n)
3626
3834
  }, l({ _: 2 }, [d["grid-item-overlay"] ? {
3627
3835
  name: "grid-item-overlay",
3628
- fn: L((t) => [D(e.$slots, "grid-item-overlay", h({ ref_for: !0 }, t))]),
3836
+ fn: R((t) => [O(e.$slots, "grid-item-overlay", g({ ref_for: !0 }, t))]),
3629
3837
  key: "0"
3630
3838
  } : void 0, d["item-icon"] ? {
3631
3839
  name: "item-icon",
3632
- fn: L((t) => [D(e.$slots, "item-icon", h({ ref_for: !0 }, t))]),
3840
+ fn: R((t) => [O(e.$slots, "item-icon", g({ ref_for: !0 }, t))]),
3633
3841
  key: "1"
3634
3842
  } : void 0]), 1032, [
3635
3843
  "active",
@@ -3639,14 +3847,14 @@ var si = ["aria-label"], ci = {
3639
3847
  "report-asset-load",
3640
3848
  "surface-active",
3641
3849
  "onOpen"
3642
- ])], 12, wi))), 128)),
3643
- (S(!0), s(t, null, E(j(p).leavingItems.value, (t) => (S(), s("article", {
3644
- key: `leaving-${j($)(t.item)}`,
3850
+ ])], 12, Ai))), 128)),
3851
+ (w(!0), s(t, null, ee(M(p).leavingItems.value, (t) => (w(), s("article", {
3852
+ key: `leaving-${M($)(t.item)}`,
3645
3853
  "data-testid": "vibe-list-card-leaving",
3646
3854
  "data-item-id": t.item.id,
3647
3855
  class: "pointer-events-none absolute z-[2] will-change-[opacity,transform]",
3648
- style: y(j(p).getLeavingCardStyle(t.item))
3649
- }, [u(vi, {
3856
+ style: b(M(p).getLeavingCardStyle(t.item))
3857
+ }, [u(wi, {
3650
3858
  active: !1,
3651
3859
  index: -1,
3652
3860
  item: t.item,
@@ -3655,20 +3863,20 @@ var si = ["aria-label"], ci = {
3655
3863
  "surface-active": !1
3656
3864
  }, l({ _: 2 }, [d["item-icon"] ? {
3657
3865
  name: "item-icon",
3658
- fn: L((t) => [D(e.$slots, "item-icon", h({ ref_for: !0 }, t))]),
3866
+ fn: R((t) => [O(e.$slots, "item-icon", g({ ref_for: !0 }, t))]),
3659
3867
  key: "0"
3660
3868
  } : void 0]), 1032, [
3661
3869
  "item",
3662
3870
  "report-asset-error",
3663
3871
  "report-asset-load"
3664
- ])], 12, Ti))), 128)),
3665
- j(P) && j(T) ? (S(), a(fn, {
3872
+ ])], 12, ji))), 128)),
3873
+ M(k) && M(T) ? (w(), a(Cn, {
3666
3874
  key: 0,
3667
- message: j(T).message,
3668
- mode: j(T).mode,
3669
- surface: j(T).surface
3875
+ message: M(T).message,
3876
+ mode: M(T).mode,
3877
+ surface: M(T).surface
3670
3878
  }, {
3671
- default: L(() => [j(M) ? D(e.$slots, "empty-state", v(h({ key: 0 }, j(T)))) : o("", !0)]),
3879
+ default: R(() => [M(D) ? O(e.$slots, "empty-state", y(g({ key: 0 }, M(T)))) : o("", !0)]),
3672
3880
  _: 3
3673
3881
  }, 8, [
3674
3882
  "message",
@@ -3676,28 +3884,28 @@ var si = ["aria-label"], ci = {
3676
3884
  "surface"
3677
3885
  ])) : o("", !0)
3678
3886
  ], 4)], 544),
3679
- j(p).showScrollbar.value ? (S(), s("div", Ei, [n[2] ||= c("div", { class: "absolute bottom-6 right-3 top-6 w-px bg-white/8" }, null, -1), c("div", {
3887
+ M(p).showScrollbar.value ? (w(), s("div", Mi, [n[2] ||= c("div", { class: "absolute bottom-6 right-3 top-6 w-px bg-white/8" }, null, -1), c("div", {
3680
3888
  "data-testid": "vibe-list-scrollbar-thumb",
3681
- class: _(["absolute right-[0.625rem] w-1 bg-white/34 transition-[height,transform,background-color,opacity] duration-300 ease-out", r.loading ? "bg-white/52" : "bg-white/34"]),
3682
- style: y(j(p).getScrollbarThumbStyle())
3889
+ class: v(["absolute right-[0.625rem] w-1 bg-white/34 transition-[height,transform,background-color,opacity] duration-300 ease-out", r.loading ? "bg-white/52" : "bg-white/34"]),
3890
+ style: b(M(p).getScrollbarThumbStyle())
3683
3891
  }, null, 6)])) : o("", !0),
3684
- d["grid-footer"] ? (S(), s("div", Di, [c("div", Oi, [D(e.$slots, "grid-footer")])])) : o("", !0),
3685
- b.value ? (S(), s("div", {
3892
+ d["grid-footer"] ? (w(), s("div", Ni, [c("div", Pi, [O(e.$slots, "grid-footer")])])) : o("", !0),
3893
+ _.value ? (w(), s("div", {
3686
3894
  key: 2,
3687
- class: _(["pointer-events-none absolute inset-x-0 bottom-0 z-[3] flex justify-center px-6", d["grid-footer"] ? "pb-24" : "pb-6"])
3688
- }, [C.value ? D(e.$slots, "grid-status", v(h({ key: 0 }, b.value))) : (S(), s("span", {
3895
+ class: v(["pointer-events-none absolute inset-x-0 bottom-0 z-[3] flex justify-center px-6", d["grid-footer"] ? "pb-24" : "pb-6"])
3896
+ }, [S.value ? O(e.$slots, "grid-status", y(g({ key: 0 }, _.value))) : (w(), s("span", {
3689
3897
  key: 1,
3690
3898
  "data-testid": "vibe-grid-status-badge",
3691
- class: _(["inline-flex items-center border border-white/14 bg-black/55 px-4 py-3 text-[0.7rem] font-bold uppercase tracking-[0.18em] text-[#f7f1ea]/72 backdrop-blur-[18px]", b.value.kind === "end" ? "border-amber-300/35 text-amber-200" : b.value.kind === "failed" ? "border-rose-400/45 text-rose-100" : ""])
3692
- }, k(b.value.message), 3))], 2)) : o("", !0),
3693
- j(O) && j(T) ? (S(), a(fn, {
3899
+ class: v(["inline-flex items-center border border-white/14 bg-black/55 px-4 py-3 text-[0.7rem] font-bold uppercase tracking-[0.18em] text-[#f7f1ea]/72 backdrop-blur-[18px]", _.value.kind === "end" ? "border-amber-300/35 text-amber-200" : _.value.kind === "failed" ? "border-rose-400/45 text-rose-100" : ""])
3900
+ }, A(_.value.message), 3))], 2)) : o("", !0),
3901
+ M(E) && M(T) ? (w(), a(Cn, {
3694
3902
  key: 3,
3695
- class: _(["z-[3]", d["grid-footer"] ? "pb-24" : "pb-6"]),
3696
- message: j(T).message,
3697
- mode: j(T).mode,
3698
- surface: j(T).surface
3903
+ class: v(["z-[3]", d["grid-footer"] ? "pb-24" : "pb-6"]),
3904
+ message: M(T).message,
3905
+ mode: M(T).mode,
3906
+ surface: M(T).surface
3699
3907
  }, {
3700
- default: L(() => [j(M) ? D(e.$slots, "empty-state", v(h({ key: 0 }, j(T)))) : o("", !0)]),
3908
+ default: R(() => [M(D) ? O(e.$slots, "empty-state", y(g({ key: 0 }, M(T)))) : o("", !0)]),
3701
3909
  _: 3
3702
3910
  }, 8, [
3703
3911
  "class",
@@ -3707,13 +3915,13 @@ var si = ["aria-label"], ci = {
3707
3915
  ])) : o("", !0)
3708
3916
  ]));
3709
3917
  }
3710
- }), Ai = ["data-surface-mode"], ji = {
3918
+ }), Ii = ["data-surface-mode"], Li = {
3711
3919
  key: 1,
3712
3920
  class: "absolute left-5 top-5 z-30 border border-amber-400/45 bg-black/35 px-4 py-2 text-xs font-medium uppercase tracking-[0.24em] text-amber-100 backdrop-blur"
3713
- }, Mi = ["data-visible", "inert"], Ni = ["data-visible", "inert"], Pi = {
3921
+ }, Ri = ["data-visible", "inert"], zi = ["data-visible", "inert"], Bi = {
3714
3922
  key: 3,
3715
3923
  class: "relative z-[1] grid h-full w-full content-center justify-items-center gap-6 px-[clamp(2rem,4vw,3rem)] py-[clamp(2rem,4vw,3rem)] text-center"
3716
- }, Fi = /* @__PURE__ */ d({
3924
+ }, Vi = /* @__PURE__ */ d({
3717
3925
  name: "VibeLayout",
3718
3926
  __name: "Layout",
3719
3927
  props: {
@@ -3723,7 +3931,6 @@ var si = ["aria-label"], ci = {
3723
3931
  initialCursor: {},
3724
3932
  initialState: {},
3725
3933
  loopFullscreenVideo: { type: Boolean },
3726
- mode: {},
3727
3934
  pageSize: {},
3728
3935
  paginationDetail: {},
3729
3936
  resolve: { type: Function },
@@ -3739,12 +3946,12 @@ var si = ["aria-label"], ci = {
3739
3946
  "update:surfaceMode"
3740
3947
  ],
3741
3948
  setup(e, { expose: n, emit: i }) {
3742
- let d = e, p = N(), m = i, h = qe(d, m), g = le((e) => {
3949
+ let d = e, f = P(), m = i, h = Ye(d, m), g = Z((e) => {
3743
3950
  m("asset-errors", e);
3744
- }), _ = ue((e) => {
3951
+ }), _ = fe((e) => {
3745
3952
  m("asset-loads", e);
3746
3953
  });
3747
- return b(() => {
3954
+ return x(() => {
3748
3955
  g.stop(), _.stop();
3749
3956
  }), n({
3750
3957
  cancel: h.cancel,
@@ -3759,16 +3966,16 @@ var si = ["aria-label"], ci = {
3759
3966
  status: h.status,
3760
3967
  undo: h.undo,
3761
3968
  unlockPageLoading: h.unlockPageLoading
3762
- }), (e, n) => (S(), s("section", {
3969
+ }), (e, n) => (w(), s("section", {
3763
3970
  "data-testid": "vibe",
3764
- "data-surface-mode": j(h).surfaceMode.value,
3971
+ "data-surface-mode": M(h).surfaceMode.value,
3765
3972
  class: "relative h-full min-h-0 overflow-hidden bg-[#05060a] text-[#f7f1ea]"
3766
- }, [j(h).canRetryInitialLoad.value ? (S(), s("button", {
3973
+ }, [M(h).canRetryInitialLoad.value ? (w(), s("button", {
3767
3974
  key: 0,
3768
3975
  type: "button",
3769
3976
  class: "absolute left-5 top-5 z-30 inline-flex items-center border border-rose-400/55 bg-rose-500/18 px-4 py-2 text-xs font-medium uppercase tracking-[0.24em] text-white backdrop-blur transition hover:bg-rose-500/28",
3770
- onClick: n[0] ||= (...e) => j(h).retryInitialLoad && j(h).retryInitialLoad(...e)
3771
- }, " Retry ")) : j(h).errorMessage.value && j(h).items.value.length > 0 ? (S(), s("div", ji, k(j(h).errorMessage.value), 1)) : o("", !0), j(h).isDesktop.value ? (S(), s(t, { key: 2 }, [u(r, {
3977
+ onClick: n[0] ||= (...e) => M(h).retryInitialLoad && M(h).retryInitialLoad(...e)
3978
+ }, " Retry ")) : M(h).errorMessage.value && M(h).items.value.length > 0 ? (w(), s("div", Li, A(M(h).errorMessage.value), 1)) : o("", !0), M(h).isDesktop.value ? (w(), s(t, { key: 2 }, [u(r, {
3772
3979
  appear: "",
3773
3980
  "enter-active-class": "transition-[opacity,transform] duration-300 ease-out",
3774
3981
  "enter-from-class": "translate-y-3 opacity-0",
@@ -3777,57 +3984,57 @@ var si = ["aria-label"], ci = {
3777
3984
  "leave-from-class": "translate-y-0 opacity-100",
3778
3985
  "leave-to-class": "translate-y-3 opacity-0"
3779
3986
  }, {
3780
- default: L(() => [R(c("div", {
3987
+ default: R(() => [z(c("div", {
3781
3988
  "data-testid": "vibe-list-surface",
3782
- "data-visible": j(h).surfaceMode.value === "list" ? "true" : "false",
3783
- inert: j(h).surfaceMode.value !== "list",
3989
+ "data-visible": M(h).surfaceMode.value === "list" ? "true" : "false",
3990
+ inert: M(h).surfaceMode.value !== "list",
3784
3991
  class: "absolute inset-0 z-[2]"
3785
- }, [u(ki, {
3786
- active: j(h).surfaceMode.value === "list",
3787
- "allow-exhausted-next-page-refresh": j(h).canRefreshExhaustedNextPage.value,
3788
- items: j(h).items.value,
3789
- "active-index": j(h).activeIndex.value,
3790
- "error-message": j(h).errorMessage.value,
3791
- loading: j(h).loading.value,
3792
- "has-next-page": j(h).hasNextPage.value,
3793
- "has-previous-page": j(h).hasPreviousPage.value,
3794
- "pending-append-items": j(h).pendingAppendItems.value,
3795
- phase: j(h).phase.value,
3796
- "commit-pending-append": j(h).commitPendingAppend,
3797
- "pagination-detail": j(h).paginationDetail.value,
3798
- "report-asset-error": j(g).report,
3799
- "report-asset-load": j(_).report,
3800
- "request-next-page": j(h).prefetchNextPage,
3801
- "request-previous-page": j(h).prefetchPreviousPage,
3992
+ }, [u(Fi, {
3993
+ active: M(h).surfaceMode.value === "list",
3994
+ "allow-exhausted-next-page-refresh": M(h).canRefreshExhaustedNextPage.value,
3995
+ items: M(h).items.value,
3996
+ "active-index": M(h).activeIndex.value,
3997
+ "error-message": M(h).errorMessage.value,
3998
+ loading: M(h).loading.value,
3999
+ "has-next-page": M(h).hasNextPage.value,
4000
+ "has-previous-page": M(h).hasPreviousPage.value,
4001
+ "pending-append-items": M(h).pendingAppendItems.value,
4002
+ phase: M(h).phase.value,
4003
+ "commit-pending-append": M(h).commitPendingAppend,
4004
+ "pagination-detail": M(h).paginationDetail.value,
4005
+ "report-asset-error": M(g).report,
4006
+ "report-asset-load": M(_).report,
4007
+ "request-next-page": M(h).prefetchNextPage,
4008
+ "request-previous-page": M(h).prefetchPreviousPage,
3802
4009
  "empty-state-mode": d.emptyStateMode,
3803
4010
  "show-status-badges": d.showStatusBadges ?? !0,
3804
- onBoundaryLoadProgress: j(h).setBoundaryLoadProgress,
3805
- onOpenFullscreen: j(h).openFullscreen,
3806
- "onUpdate:activeIndex": j(h).setActiveIndex
4011
+ onBoundaryLoadProgress: M(h).setBoundaryLoadProgress,
4012
+ onOpenFullscreen: M(h).openFullscreen,
4013
+ "onUpdate:activeIndex": M(h).setActiveIndex
3807
4014
  }, l({ _: 2 }, [
3808
- p["empty-state"] ? {
4015
+ f["empty-state"] ? {
3809
4016
  name: "empty-state",
3810
- fn: L((t) => [D(e.$slots, "empty-state", v(f(t)))]),
4017
+ fn: R((t) => [O(e.$slots, "empty-state", y(p(t)))]),
3811
4018
  key: "0"
3812
4019
  } : void 0,
3813
- p["grid-footer"] ? {
4020
+ f["grid-footer"] ? {
3814
4021
  name: "grid-footer",
3815
- fn: L(() => [D(e.$slots, "grid-footer")]),
4022
+ fn: R(() => [O(e.$slots, "grid-footer")]),
3816
4023
  key: "1"
3817
4024
  } : void 0,
3818
- p["grid-item-overlay"] ? {
4025
+ f["grid-item-overlay"] ? {
3819
4026
  name: "grid-item-overlay",
3820
- fn: L((t) => [D(e.$slots, "grid-item-overlay", v(f(t)))]),
4027
+ fn: R((t) => [O(e.$slots, "grid-item-overlay", y(p(t)))]),
3821
4028
  key: "2"
3822
4029
  } : void 0,
3823
- p["grid-status"] ? {
4030
+ f["grid-status"] ? {
3824
4031
  name: "grid-status",
3825
- fn: L((t) => [D(e.$slots, "grid-status", v(f(t)))]),
4032
+ fn: R((t) => [O(e.$slots, "grid-status", y(p(t)))]),
3826
4033
  key: "3"
3827
4034
  } : void 0,
3828
- p["item-icon"] ? {
4035
+ f["item-icon"] ? {
3829
4036
  name: "item-icon",
3830
- fn: L((t) => [D(e.$slots, "item-icon", v(f(t)))]),
4037
+ fn: R((t) => [O(e.$slots, "item-icon", y(p(t)))]),
3831
4038
  key: "4"
3832
4039
  } : void 0
3833
4040
  ]), 1032, [
@@ -3852,7 +4059,7 @@ var si = ["aria-label"], ci = {
3852
4059
  "onBoundaryLoadProgress",
3853
4060
  "onOpenFullscreen",
3854
4061
  "onUpdate:activeIndex"
3855
- ])], 8, Mi), [[P, j(h).surfaceMode.value === "list"]])]),
4062
+ ])], 8, Ri), [[F, M(h).surfaceMode.value === "list"]])]),
3856
4063
  _: 3
3857
4064
  }), u(r, {
3858
4065
  appear: "",
@@ -3863,59 +4070,59 @@ var si = ["aria-label"], ci = {
3863
4070
  "leave-from-class": "translate-y-0 opacity-100",
3864
4071
  "leave-to-class": "-translate-y-3 opacity-0"
3865
4072
  }, {
3866
- default: L(() => [R(c("div", {
4073
+ default: R(() => [z(c("div", {
3867
4074
  "data-testid": "vibe-fullscreen-surface",
3868
- "data-visible": j(h).surfaceMode.value === "fullscreen" ? "true" : "false",
3869
- inert: j(h).surfaceMode.value !== "fullscreen",
4075
+ "data-visible": M(h).surfaceMode.value === "fullscreen" ? "true" : "false",
4076
+ inert: M(h).surfaceMode.value !== "fullscreen",
3870
4077
  class: "absolute inset-0 z-[3]"
3871
- }, [u(Jn, {
3872
- items: j(h).items.value,
3873
- active: j(h).surfaceMode.value === "fullscreen",
3874
- "active-index": j(h).activeIndex.value,
3875
- "error-message": j(h).errorMessage.value,
3876
- loading: j(h).loading.value,
3877
- "has-next-page": j(h).hasNextPage.value,
3878
- "pagination-detail": j(h).paginationDetail.value,
3879
- phase: j(h).phase.value,
3880
- "report-asset-error": j(g).report,
3881
- "report-asset-load": j(_).report,
4078
+ }, [u(ar, {
4079
+ items: M(h).items.value,
4080
+ active: M(h).surfaceMode.value === "fullscreen",
4081
+ "active-index": M(h).activeIndex.value,
4082
+ "error-message": M(h).errorMessage.value,
4083
+ loading: M(h).loading.value,
4084
+ "has-next-page": M(h).hasNextPage.value,
4085
+ "pagination-detail": M(h).paginationDetail.value,
4086
+ phase: M(h).phase.value,
4087
+ "report-asset-error": M(g).report,
4088
+ "report-asset-load": M(_).report,
3882
4089
  "empty-state-mode": d.emptyStateMode,
3883
4090
  "loop-fullscreen-video": d.loopFullscreenVideo ?? !0,
3884
4091
  "show-dominant-image-tone": d.showDominantImageTone ?? !0,
3885
4092
  "show-end-badge": d.showEndBadge ?? !0,
3886
4093
  "show-status-badges": d.showStatusBadges ?? !0,
3887
- "show-back-to-list": j(h).showBackToList.value,
3888
- onBackToList: j(h).returnToList,
3889
- "onUpdate:activeIndex": j(h).setActiveIndex
4094
+ "show-back-to-list": M(h).showBackToList.value,
4095
+ onBackToList: M(h).returnToList,
4096
+ "onUpdate:activeIndex": M(h).setActiveIndex
3890
4097
  }, l({ _: 2 }, [
3891
- p["empty-state"] ? {
4098
+ f["empty-state"] ? {
3892
4099
  name: "empty-state",
3893
- fn: L((t) => [D(e.$slots, "empty-state", v(f(t)))]),
4100
+ fn: R((t) => [O(e.$slots, "empty-state", y(p(t)))]),
3894
4101
  key: "0"
3895
4102
  } : void 0,
3896
- p["fullscreen-overlay"] ? {
4103
+ f["fullscreen-overlay"] ? {
3897
4104
  name: "fullscreen-overlay",
3898
- fn: L((t) => [D(e.$slots, "fullscreen-overlay", v(f(t)))]),
4105
+ fn: R((t) => [O(e.$slots, "fullscreen-overlay", y(p(t)))]),
3899
4106
  key: "1"
3900
4107
  } : void 0,
3901
- p["fullscreen-aside"] ? {
4108
+ f["fullscreen-aside"] ? {
3902
4109
  name: "fullscreen-aside",
3903
- fn: L((t) => [D(e.$slots, "fullscreen-aside", v(f(t)))]),
4110
+ fn: R((t) => [O(e.$slots, "fullscreen-aside", y(p(t)))]),
3904
4111
  key: "2"
3905
4112
  } : void 0,
3906
- p["fullscreen-header-actions"] ? {
4113
+ f["fullscreen-header-actions"] ? {
3907
4114
  name: "fullscreen-header-actions",
3908
- fn: L((t) => [D(e.$slots, "fullscreen-header-actions", v(f(t)))]),
4115
+ fn: R((t) => [O(e.$slots, "fullscreen-header-actions", y(p(t)))]),
3909
4116
  key: "3"
3910
4117
  } : void 0,
3911
- p["fullscreen-status"] ? {
4118
+ f["fullscreen-status"] ? {
3912
4119
  name: "fullscreen-status",
3913
- fn: L((t) => [D(e.$slots, "fullscreen-status", v(f(t)))]),
4120
+ fn: R((t) => [O(e.$slots, "fullscreen-status", y(p(t)))]),
3914
4121
  key: "4"
3915
4122
  } : void 0,
3916
- p["item-icon"] ? {
4123
+ f["item-icon"] ? {
3917
4124
  name: "item-icon",
3918
- fn: L((t) => [D(e.$slots, "item-icon", v(f(t)))]),
4125
+ fn: R((t) => [O(e.$slots, "item-icon", y(p(t)))]),
3919
4126
  key: "5"
3920
4127
  } : void 0
3921
4128
  ]), 1032, [
@@ -3937,60 +4144,60 @@ var si = ["aria-label"], ci = {
3937
4144
  "show-back-to-list",
3938
4145
  "onBackToList",
3939
4146
  "onUpdate:activeIndex"
3940
- ])], 8, Ni), [[P, j(h).surfaceMode.value === "fullscreen"]])]),
4147
+ ])], 8, zi), [[F, M(h).surfaceMode.value === "fullscreen"]])]),
3941
4148
  _: 3
3942
- })], 64)) : j(h).items.value.length === 0 && j(h).loading.value ? (S(), s("div", Pi, [u(j(re), {
4149
+ })], 64)) : M(h).items.value.length === 0 && M(h).loading.value ? (w(), s("div", Bi, [u(M(oe), {
3943
4150
  class: "size-10 animate-spin text-[#f7f1ea]/82",
3944
4151
  "aria-hidden": "true"
3945
- }), n[1] ||= c("p", { class: "m-0 text-[0.9rem] font-semibold uppercase tracking-[0.22em] text-[#f7f1ea]/72" }, " Loading... ", -1)])) : (S(), a(Jn, {
4152
+ }), n[1] ||= c("p", { class: "m-0 text-[0.9rem] font-semibold uppercase tracking-[0.22em] text-[#f7f1ea]/72" }, " Loading... ", -1)])) : (w(), a(ar, {
3946
4153
  key: 4,
3947
- items: j(h).items.value,
4154
+ items: M(h).items.value,
3948
4155
  active: !0,
3949
- "active-index": j(h).activeIndex.value,
3950
- "error-message": j(h).errorMessage.value,
3951
- loading: j(h).loading.value,
3952
- "has-next-page": j(h).hasNextPage.value,
3953
- "pagination-detail": j(h).paginationDetail.value,
3954
- phase: j(h).phase.value,
3955
- "report-asset-error": j(g).report,
3956
- "report-asset-load": j(_).report,
4156
+ "active-index": M(h).activeIndex.value,
4157
+ "error-message": M(h).errorMessage.value,
4158
+ loading: M(h).loading.value,
4159
+ "has-next-page": M(h).hasNextPage.value,
4160
+ "pagination-detail": M(h).paginationDetail.value,
4161
+ phase: M(h).phase.value,
4162
+ "report-asset-error": M(g).report,
4163
+ "report-asset-load": M(_).report,
3957
4164
  "empty-state-mode": d.emptyStateMode,
3958
4165
  "loop-fullscreen-video": d.loopFullscreenVideo ?? !0,
3959
4166
  "show-dominant-image-tone": d.showDominantImageTone ?? !0,
3960
4167
  "show-end-badge": d.showEndBadge ?? !0,
3961
4168
  "show-status-badges": d.showStatusBadges ?? !0,
3962
4169
  "show-back-to-list": !1,
3963
- onBackToList: j(h).returnToList,
3964
- "onUpdate:activeIndex": j(h).setActiveIndex
4170
+ onBackToList: M(h).returnToList,
4171
+ "onUpdate:activeIndex": M(h).setActiveIndex
3965
4172
  }, l({ _: 2 }, [
3966
- p["empty-state"] ? {
4173
+ f["empty-state"] ? {
3967
4174
  name: "empty-state",
3968
- fn: L((t) => [D(e.$slots, "empty-state", v(f(t)))]),
4175
+ fn: R((t) => [O(e.$slots, "empty-state", y(p(t)))]),
3969
4176
  key: "0"
3970
4177
  } : void 0,
3971
- p["fullscreen-overlay"] ? {
4178
+ f["fullscreen-overlay"] ? {
3972
4179
  name: "fullscreen-overlay",
3973
- fn: L((t) => [D(e.$slots, "fullscreen-overlay", v(f(t)))]),
4180
+ fn: R((t) => [O(e.$slots, "fullscreen-overlay", y(p(t)))]),
3974
4181
  key: "1"
3975
4182
  } : void 0,
3976
- p["fullscreen-aside"] ? {
4183
+ f["fullscreen-aside"] ? {
3977
4184
  name: "fullscreen-aside",
3978
- fn: L((t) => [D(e.$slots, "fullscreen-aside", v(f(t)))]),
4185
+ fn: R((t) => [O(e.$slots, "fullscreen-aside", y(p(t)))]),
3979
4186
  key: "2"
3980
4187
  } : void 0,
3981
- p["fullscreen-header-actions"] ? {
4188
+ f["fullscreen-header-actions"] ? {
3982
4189
  name: "fullscreen-header-actions",
3983
- fn: L((t) => [D(e.$slots, "fullscreen-header-actions", v(f(t)))]),
4190
+ fn: R((t) => [O(e.$slots, "fullscreen-header-actions", y(p(t)))]),
3984
4191
  key: "3"
3985
4192
  } : void 0,
3986
- p["fullscreen-status"] ? {
4193
+ f["fullscreen-status"] ? {
3987
4194
  name: "fullscreen-status",
3988
- fn: L((t) => [D(e.$slots, "fullscreen-status", v(f(t)))]),
4195
+ fn: R((t) => [O(e.$slots, "fullscreen-status", y(p(t)))]),
3989
4196
  key: "4"
3990
4197
  } : void 0,
3991
- p["item-icon"] ? {
4198
+ f["item-icon"] ? {
3992
4199
  name: "item-icon",
3993
- fn: L((t) => [D(e.$slots, "item-icon", v(f(t)))]),
4200
+ fn: R((t) => [O(e.$slots, "item-icon", y(p(t)))]),
3994
4201
  key: "5"
3995
4202
  } : void 0
3996
4203
  ]), 1032, [
@@ -4010,10 +4217,10 @@ var si = ["aria-label"], ci = {
4010
4217
  "show-status-badges",
4011
4218
  "onBackToList",
4012
4219
  "onUpdate:activeIndex"
4013
- ]))], 8, Ai));
4220
+ ]))], 8, Ii));
4014
4221
  }
4015
- }), Ii = { install(e) {
4016
- e.component("VibeLayout", Fi);
4222
+ }), Hi = { install(e) {
4223
+ e.component("VibeLayout", Vi);
4017
4224
  } };
4018
4225
  //#endregion
4019
- export { Fi as VibeLayout, Ii as VibePlugin, Ii as default };
4226
+ export { Vi as VibeLayout, Hi as VibePlugin, Hi as default };