@wyxos/vibe 3.0.13 → 3.0.15

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
@@ -61,7 +61,7 @@ var B = (e) => {
61
61
  d: "M22 10v3",
62
62
  key: "154ddg"
63
63
  }]
64
- ]), te = J("clapperboard", [
64
+ ]), X = J("clapperboard", [
65
65
  ["path", {
66
66
  d: "m12.296 3.464 3.02 3.956",
67
67
  key: "qash78"
@@ -78,7 +78,7 @@ var B = (e) => {
78
78
  d: "m6.18 5.276 3.1 3.899",
79
79
  key: "zjj9t3"
80
80
  }]
81
- ]), X = J("file", [["path", {
81
+ ]), te = J("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", {
@@ -140,14 +140,52 @@ var B = (e) => {
140
140
  d: "M12 17h.01",
141
141
  key: "p32p05"
142
142
  }]
143
+ ]), se = J("volume-1", [["path", {
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
+ key: "uqj9uw"
146
+ }], ["path", {
147
+ d: "M16 9a5 5 0 0 1 0 6",
148
+ key: "1q6k2b"
149
+ }]]), ce = J("volume-2", [
150
+ ["path", {
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
+ key: "uqj9uw"
153
+ }],
154
+ ["path", {
155
+ d: "M16 9a5 5 0 0 1 0 6",
156
+ key: "1q6k2b"
157
+ }],
158
+ ["path", {
159
+ d: "M19.364 18.364a9 9 0 0 0 0-12.728",
160
+ key: "ijwkga"
161
+ }]
162
+ ]), Z = J("volume-x", [
163
+ ["path", {
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
+ key: "uqj9uw"
166
+ }],
167
+ ["line", {
168
+ x1: "22",
169
+ x2: "16",
170
+ y1: "9",
171
+ y2: "15",
172
+ key: "1ewh16"
173
+ }],
174
+ ["line", {
175
+ x1: "16",
176
+ x2: "22",
177
+ y1: "9",
178
+ y2: "15",
179
+ key: "5ykzw1"
180
+ }]
143
181
  ]);
144
- function se(e, t = 150) {
145
- return le(e, (e) => `${e.surface}|${e.occurrenceKey}|${e.url}|${e.kind}`, t);
182
+ function le(e, t = 150) {
183
+ return de(e, (e) => `${e.surface}|${e.occurrenceKey}|${e.url}|${e.kind}`, t);
146
184
  }
147
- function ce(e, t = 150) {
148
- return le(e, (e) => `${e.surface}|${e.occurrenceKey}|${e.url}`, t);
185
+ function ue(e, t = 150) {
186
+ return de(e, (e) => `${e.surface}|${e.occurrenceKey}|${e.url}`, t);
149
187
  }
150
- function le(e, t, n) {
188
+ function de(e, t, n) {
151
189
  let r = [], i = /* @__PURE__ */ new Set(), a = null;
152
190
  function o(e) {
153
191
  let o = t(e);
@@ -171,41 +209,41 @@ function le(e, t, n) {
171
209
  }
172
210
  //#endregion
173
211
  //#region src/components/viewer-core/dom.ts
174
- function ue(e) {
212
+ function Q(e) {
175
213
  return e instanceof HTMLElement && [
176
214
  "INPUT",
177
215
  "TEXTAREA",
178
216
  "SELECT"
179
217
  ].includes(e.tagName);
180
218
  }
181
- function de(e) {
219
+ function fe(e) {
182
220
  return e instanceof HTMLElement && !!e.closest("[data-swipe-lock], input, textarea, select, a");
183
221
  }
184
- function fe(e) {
222
+ function pe(e) {
185
223
  return e === "filling" || e === "initializing" || e === "loading" || e === "refreshing";
186
224
  }
187
- function pe(e) {
225
+ function me(e) {
188
226
  return !e || !Number.isFinite(e) || e < 1 ? 25 : Math.floor(e);
189
227
  }
190
- function me(e) {
228
+ function he(e) {
191
229
  return e ?? "__vibe_initial_cursor__";
192
230
  }
193
- function he(e, t, n) {
231
+ function ge(e, t, n) {
194
232
  return Math.min(Math.max(e, t), n);
195
233
  }
196
234
  //#endregion
197
235
  //#region src/components/viewer-core/removalState.ts
198
- function ge() {
236
+ function _e() {
199
237
  let e = T(/* @__PURE__ */ new Set()), t = T([]);
200
238
  function n(n) {
201
- let r = Z(n).filter((t) => !e.value.has(t));
239
+ let r = ve(n).filter((t) => !e.value.has(t));
202
240
  if (!r.length) return { ids: [] };
203
241
  let i = new Set(e.value);
204
242
  for (let e of r) i.add(e);
205
243
  return e.value = i, t.value = [...t.value, r], { ids: r };
206
244
  }
207
245
  function r(t) {
208
- let n = Z(t).filter((t) => e.value.has(t));
246
+ let n = ve(t).filter((t) => e.value.has(t));
209
247
  if (!n.length) return { ids: [] };
210
248
  let r = new Set(e.value);
211
249
  for (let e of n) r.delete(e);
@@ -236,68 +274,68 @@ function ge() {
236
274
  undo: i
237
275
  };
238
276
  }
239
- function Z(e) {
277
+ function ve(e) {
240
278
  let t = Array.isArray(e) ? e : [e];
241
279
  return Array.from(new Set(t.filter((e) => typeof e == "string" && e.length > 0)));
242
280
  }
243
281
  //#endregion
244
282
  //#region src/components/viewer-core/itemIdentity.ts
245
- var _e = "__vibeOccurrenceKey";
246
- function Q(e) {
247
- let t = e[_e];
283
+ var ye = "__vibeOccurrenceKey";
284
+ function $(e) {
285
+ let t = e[ye];
248
286
  return typeof t == "string" && t.length > 0 ? t : e.id;
249
287
  }
250
- function ve(e, t, n) {
288
+ function be(e, t, n) {
251
289
  let r = /* @__PURE__ */ new Map(), i = [], a = n;
252
290
  for (let e of t) {
253
- let t = r.get(e.id), n = Q(e);
291
+ let t = r.get(e.id), n = $(e);
254
292
  t ? t.push(n) : r.set(e.id, [n]);
255
293
  }
256
294
  for (let t of e) {
257
295
  let e = r.get(t.id)?.shift() ?? `vibe-occurrence-${a += 1}`;
258
- i.push(ye(t, e));
296
+ i.push(xe(t, e));
259
297
  }
260
298
  return {
261
299
  items: i,
262
300
  nextSequence: a
263
301
  };
264
302
  }
265
- function ye(e, t) {
266
- return Q(e) === t ? e : {
303
+ function xe(e, t) {
304
+ return $(e) === t ? e : {
267
305
  ...e,
268
- [_e]: t
306
+ [ye]: t
269
307
  };
270
308
  }
271
309
  //#endregion
272
310
  //#region src/components/viewer-core/autoBuckets.ts
273
- function be(e) {
311
+ function Se(e) {
274
312
  return e.flatMap((e) => e.items);
275
313
  }
276
- function xe(e, t) {
314
+ function Ce(e, t) {
277
315
  return t.size ? e.filter((e) => !t.has(e.id)) : e;
278
316
  }
279
- function Se(e, t) {
280
- return xe(e.items, t);
317
+ function we(e, t) {
318
+ return Ce(e.items, t);
281
319
  }
282
- function Ce(e, t) {
283
- return Se(e, t).length;
320
+ function Te(e, t) {
321
+ return we(e, t).length;
284
322
  }
285
- function we(e, t, n) {
323
+ function Ee(e, t, n) {
286
324
  if (n < 0) return null;
287
325
  let r = 0;
288
326
  for (let i of e) {
289
- let e = Se(i, t), a = r + e.length;
327
+ let e = we(i, t), a = r + e.length;
290
328
  if (n < a) return i.cursor;
291
329
  r = a;
292
330
  }
293
331
  return null;
294
332
  }
295
- function Te(e, t, n) {
333
+ function De(e, t, n) {
296
334
  let r = [...e], i = r.findIndex((e) => e.cursor === t);
297
335
  return i >= 0 && r.splice(i, 1, n), r;
298
336
  }
299
- function Ee(e, t, n) {
300
- let r = ve(e, t, n);
337
+ function Oe(e, t, n) {
338
+ let r = be(e, t, n);
301
339
  return {
302
340
  items: r.items,
303
341
  nextSequence: r.nextSequence
@@ -305,11 +343,11 @@ function Ee(e, t, n) {
305
343
  }
306
344
  //#endregion
307
345
  //#region src/components/viewer-core/autoResolveState.ts
308
- function De(e) {
346
+ function ke(e) {
309
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";
310
348
  }
311
- function Oe(e) {
312
- let t = Ee(e.nextItems, e.previousItems, e.sequence);
349
+ function Ae(e) {
350
+ let t = Oe(e.nextItems, e.previousItems, e.sequence);
313
351
  return {
314
352
  bucket: {
315
353
  cursor: e.cursor,
@@ -320,7 +358,7 @@ function Oe(e) {
320
358
  nextSequence: t.nextSequence
321
359
  };
322
360
  }
323
- function ke(e, t, n, r) {
361
+ function je(e, t, n, r) {
324
362
  if (!e.length) return r ? null : {
325
363
  buckets: [],
326
364
  canceled: r,
@@ -330,46 +368,46 @@ function ke(e, t, n, r) {
330
368
  return {
331
369
  buckets: i,
332
370
  canceled: r,
333
- visibleCount: i.reduce((e, t) => e + Ce(t, n), 0)
371
+ visibleCount: i.reduce((e, t) => e + Te(t, n), 0)
334
372
  };
335
373
  }
336
- function Ae(e) {
337
- let t = Oe({
374
+ function Me(e) {
375
+ let t = Ae({
338
376
  cursor: e.initialState.cursor,
339
377
  nextCursor: e.initialState.nextCursor ?? null,
340
378
  nextItems: e.initialState.items,
341
379
  previousCursor: e.initialState.previousCursor ?? null,
342
380
  previousItems: [],
343
381
  sequence: e.sequence
344
- }), n = xe(t.bucket.items, e.removedIds);
382
+ }), n = Ce(t.bucket.items, e.removedIds);
345
383
  return {
346
- activeIndex: he(e.initialState.activeIndex ?? 0, 0, Math.max(0, n.length - 1)),
384
+ activeIndex: ge(e.initialState.activeIndex ?? 0, 0, Math.max(0, n.length - 1)),
347
385
  buckets: [t.bucket],
348
386
  nextSequence: t.nextSequence
349
387
  };
350
388
  }
351
- function je(e, t) {
352
- let n = e[he(t, 0, Math.max(0, e.length - 1))];
353
- return n ? Q(n) : null;
389
+ function Ne(e, t) {
390
+ let n = e[ge(t, 0, Math.max(0, e.length - 1))];
391
+ return n ? $(n) : null;
354
392
  }
355
- function Me(e, t, n = null) {
393
+ function Pe(e, t, n = null) {
356
394
  if (!e.length) return 0;
357
- let r = n ? e.findIndex((e) => Q(e) === n) : -1;
358
- return r >= 0 ? r : he(t, 0, e.length - 1);
395
+ let r = n ? e.findIndex((e) => $(e) === n) : -1;
396
+ return r >= 0 ? r : ge(t, 0, e.length - 1);
359
397
  }
360
- function Ne(e, t, n) {
361
- return e ? Ce(e, t) < n : !1;
398
+ function Fe(e, t, n) {
399
+ return e ? Te(e, t) < n : !1;
362
400
  }
363
401
  //#endregion
364
402
  //#region src/components/viewer-core/fillDelay.ts
365
- var Pe = 2e3, Fe = 1e3, Ie = 100;
366
- function Le(e, t = Pe, n = Fe) {
403
+ var Ie = 2e3, Le = 1e3, Re = 100;
404
+ function ze(e, t = Ie, n = Le) {
367
405
  return t + Math.max(0, e - 1) * n;
368
406
  }
369
- function Re(e, t) {
407
+ function Be(e, t) {
370
408
  return !Number.isFinite(e) || e == null || e < 0 ? t : Math.floor(e);
371
409
  }
372
- function ze() {
410
+ function Ve() {
373
411
  let e = T(null), t = null, n = null, r = null;
374
412
  function i(i = !1) {
375
413
  if (t &&= (clearInterval(t), null), n &&= (clearTimeout(n), null), e.value = null, i && r) {
@@ -387,7 +425,7 @@ function ze() {
387
425
  let t = Math.max(0, a - (Date.now() - s));
388
426
  e.value = t, t <= 0 && l();
389
427
  };
390
- t = setInterval(u, Ie), n = setTimeout(l, a), u();
428
+ t = setInterval(u, Re), n = setTimeout(l, a), u();
391
429
  }));
392
430
  }
393
431
  return {
@@ -398,48 +436,48 @@ function ze() {
398
436
  }
399
437
  //#endregion
400
438
  //#region src/components/viewer-core/useAutoResolveSource.ts
401
- function Be(e) {
402
- 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 = ze(), 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(() => Re(e.fillDelayMs, Pe)), w = i(() => Re(e.fillDelayStepMs, Fe)), E = i(() => typeof e.resolve == "function"), D = i(() => e.mode ?? "dynamic"), O = i(() => pe(e.pageSize)), k = i(() => be(n.value)), A = i(() => xe(k.value, e.removedIds.value)), j = i(() => r.value), M = i(() => fe(c.value) || p.value), N = i(() => Ve(n.value, e.removedIds.value)), P = i(() => He(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), V = i(() => xe(be(a.value), e.removedIds.value)), H = i(() => we(n.value, e.removedIds.value, j.value)), U = i(() => !A.value.length && !M.value && !!s.value);
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), V = i(() => Ce(Se(a.value), e.removedIds.value)), H = i(() => Ee(n.value, e.removedIds.value, j.value)), U = i(() => !A.value.length && !M.value && !!s.value);
403
441
  F(() => A.value.length, (e) => {
404
442
  if (e === 0) {
405
443
  r.value = 0;
406
444
  return;
407
445
  }
408
- o.value &&= (Se(), !1), r.value > e - 1 && (r.value = e - 1);
446
+ o.value &&= (ye(), !1), r.value > e - 1 && (r.value = e - 1);
409
447
  }), F(() => r.value, () => {
410
448
  m.value && se();
411
449
  }), x(() => {
412
- _e() || e.resolve && W();
450
+ fe() || e.resolve && W();
413
451
  }), b(() => {
414
452
  _?.abort(), _ = null, u.clear(!0);
415
453
  });
416
454
  async function W() {
417
455
  v = W;
418
- let t = await de({
456
+ let t = await ue({
419
457
  continueUntilFilled: D.value === "dynamic",
420
458
  cursor: e.initialCursor ?? null,
421
459
  direction: "forward",
422
460
  phase: "initializing"
423
461
  });
424
- t && (n.value = t.buckets, r.value = 0, Z());
462
+ t && (n.value = t.buckets, r.value = 0, Q());
425
463
  }
426
464
  async function G() {
427
465
  if (!(h.value || M.value)) {
428
- if (!R.value) return B.value ? ue("trailing") : void 0;
429
- if (D.value === "static" && ye("trailing")) return ue("trailing");
466
+ if (!R.value) return B.value ? le("trailing") : void 0;
467
+ if (D.value === "static" && ve("trailing")) return le("trailing");
430
468
  await ce(I.value);
431
469
  }
432
470
  }
433
471
  async function K() {
434
472
  if (!(h.value || !z.value || M.value)) {
435
- if (D.value === "static" && ye("leading")) return ue("leading");
436
- await le(L.value);
473
+ if (D.value === "static" && ve("leading")) return le("leading");
474
+ await Z(L.value);
437
475
  }
438
476
  }
439
477
  async function q() {
440
478
  if (U.value) {
441
- 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), _e()) {
442
- Z();
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();
443
481
  return;
444
482
  }
445
483
  await W();
@@ -450,29 +488,29 @@ function Be(e) {
450
488
  h.value || c.value !== "failed" || !v || (s.value = null, await v());
451
489
  }
452
490
  async function Y() {
453
- if (!a.value.length) return p.value = !1, Z();
454
- n.value = [...n.value, ...a.value], a.value = [], p.value = !1, Z();
491
+ if (!a.value.length) return p.value = !1, Q();
492
+ n.value = [...n.value, ...a.value], a.value = [], p.value = !1, Q();
455
493
  }
456
494
  function ee(t) {
457
495
  let n = A.value;
458
496
  if (!n.length) return;
459
- let i = he(t, 0, n.length - 1);
497
+ let i = ge(t, 0, n.length - 1);
460
498
  i !== r.value && (r.value = i, e.emit("update:activeIndex", i));
461
499
  }
462
- function te(e) {
500
+ function X(e) {
463
501
  m.value = e;
464
502
  }
465
- function X() {
503
+ function te() {
466
504
  h.value = !0, u.clear(!0);
467
505
  }
468
506
  function ne() {
469
507
  h.value = !1;
470
508
  }
471
509
  function re() {
472
- 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();
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();
473
511
  }
474
512
  function ie() {
475
- return je(A.value, j.value);
513
+ return Ne(A.value, j.value);
476
514
  }
477
515
  function ae(e = null, t = {}) {
478
516
  if (A.value.length === 0) {
@@ -480,7 +518,7 @@ function Be(e) {
480
518
  return;
481
519
  }
482
520
  if (e) {
483
- let t = A.value.findIndex((t) => Q(t) === e);
521
+ let t = A.value.findIndex((t) => $(t) === e);
484
522
  if (t >= 0) {
485
523
  r.value = t;
486
524
  return;
@@ -490,13 +528,13 @@ function Be(e) {
490
528
  r.value = A.value.length;
491
529
  return;
492
530
  }
493
- r.value = Me(A.value, j.value, e);
531
+ r.value = Pe(A.value, j.value, e);
494
532
  }
495
533
  function oe() {
496
534
  a.value.length > 0 && !V.value.length && Y();
497
535
  }
498
536
  async function se() {
499
- if (!(!m.value || ve())) {
537
+ if (!(!m.value || _e())) {
500
538
  if (!A.value.length) {
501
539
  R.value && await G();
502
540
  return;
@@ -508,23 +546,23 @@ function Be(e) {
508
546
  v = async () => {
509
547
  await ce(e);
510
548
  };
511
- let t = await de({
549
+ let t = await ue({
512
550
  continueUntilFilled: D.value === "dynamic",
513
551
  cursor: e,
514
552
  direction: "forward",
515
553
  phase: "loading"
516
554
  });
517
555
  if (t) {
518
- if (t.canceled) return n.value = [...n.value, ...t.buckets], a.value = [], p.value = !1, Z();
519
- if (a.value = t.buckets, !V.value.length) return n.value = [...n.value, ...a.value], a.value = [], p.value = !1, Z();
556
+ if (t.canceled) return n.value = [...n.value, ...t.buckets], a.value = [], p.value = !1, Q();
557
+ if (a.value = t.buckets, !V.value.length) return n.value = [...n.value, ...a.value], a.value = [], p.value = !1, Q();
520
558
  p.value = !0;
521
559
  }
522
560
  }
523
- async function le(e) {
561
+ async function Z(e) {
524
562
  v = async () => {
525
- await le(e);
563
+ await Z(e);
526
564
  };
527
- let t = await de({
565
+ let t = await ue({
528
566
  continueUntilFilled: D.value === "dynamic",
529
567
  cursor: e,
530
568
  direction: "backward",
@@ -532,15 +570,15 @@ function Be(e) {
532
570
  });
533
571
  if (!t) return;
534
572
  let r = ie();
535
- n.value = [...t.buckets, ...n.value], ae(r), Z();
573
+ n.value = [...t.buckets, ...n.value], ae(r), Q();
536
574
  }
537
- async function ue(t) {
575
+ async function le(t) {
538
576
  if (v = async () => {
539
- await ue(t);
577
+ await le(t);
540
578
  }, !e.resolve) return;
541
579
  let r = t === "leading" ? N.value : P.value;
542
580
  if (!r) return;
543
- let i = me(r.cursor);
581
+ let i = he(r.cursor);
544
582
  if (g.has(i)) return;
545
583
  g.add(i), s.value = null, c.value = "refreshing", l.value = null, f.value = null;
546
584
  let a = ++y, o = typeof AbortController > "u" ? null : new AbortController();
@@ -551,18 +589,18 @@ function Be(e) {
551
589
  pageSize: O.value,
552
590
  signal: o?.signal
553
591
  });
554
- if (a !== y) return Z();
555
- let i = ge({
592
+ if (a !== y) return Q();
593
+ let i = de({
556
594
  cursor: r.cursor,
557
595
  nextCursor: t.nextPage,
558
596
  nextItems: t.items,
559
597
  previousCursor: t.previousPage ?? null,
560
598
  previousItems: r.items
561
599
  }), s = ie();
562
- n.value = Te(n.value, r.cursor, i), ae(s), Z();
600
+ n.value = De(n.value, r.cursor, i), ae(s), Q();
563
601
  } catch (e) {
564
- if (De(e) || a !== y) {
565
- Z();
602
+ if (ke(e) || a !== y) {
603
+ Q();
566
604
  return;
567
605
  }
568
606
  s.value = e instanceof Error ? e.message : "The viewer could not load items.", c.value = "failed", l.value = null, f.value = null;
@@ -570,13 +608,13 @@ function Be(e) {
570
608
  _ === o && (_ = null), g.delete(i);
571
609
  }
572
610
  }
573
- async function de(t) {
611
+ async function ue(t) {
574
612
  if (!e.resolve) return null;
575
613
  let n = ++y, r = /* @__PURE__ */ new Set(), i = [], a = t.cursor, o = 0;
576
614
  for (s.value = null, c.value = t.phase, l.value = null, f.value = null;;) {
577
- if (n !== y) return ke(i, t.direction, e.removedIds.value, !0);
578
- if (i.length > 0 && h.value) return ke(i, t.direction, e.removedIds.value, !1);
579
- let d = me(a);
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);
580
618
  if (r.has(d) || g.has(d)) break;
581
619
  r.add(d), g.add(d);
582
620
  let p = typeof AbortController > "u" ? null : new AbortController();
@@ -587,8 +625,8 @@ function Be(e) {
587
625
  pageSize: O.value,
588
626
  signal: p?.signal
589
627
  });
590
- if (n !== y) return ke(i, t.direction, e.removedIds.value, !0);
591
- let s = ge({
628
+ if (n !== y) return je(i, t.direction, e.removedIds.value, !0);
629
+ let s = de({
592
630
  cursor: a,
593
631
  nextCursor: r.nextPage,
594
632
  nextItems: r.items,
@@ -596,27 +634,27 @@ function Be(e) {
596
634
  previousItems: []
597
635
  });
598
636
  i.push(s);
599
- let d = i.reduce((t, n) => t + Ce(n, e.removedIds.value), 0), m = t.direction === "forward" ? s.nextCursor : s.previousCursor;
637
+ let d = i.reduce((t, n) => t + Te(n, e.removedIds.value), 0), m = t.direction === "forward" ? s.nextCursor : s.previousCursor;
600
638
  if (!t.continueUntilFilled || d >= O.value || !m) return {
601
639
  canceled: !1,
602
640
  buckets: t.direction === "backward" ? [...i].reverse() : i,
603
641
  visibleCount: d
604
642
  };
605
- if (h.value) return ke(i, t.direction, e.removedIds.value, !1);
643
+ if (h.value) return je(i, t.direction, e.removedIds.value, !1);
606
644
  c.value = "filling", l.value = d, f.value = O.value, o += 1;
607
- let g = Le(o, C.value, w.value);
608
- if (await u.wait(g), n !== y) return ke(i, t.direction, e.removedIds.value, !0);
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);
609
647
  a = m;
610
648
  } catch (r) {
611
- return De(r) || n !== y ? ke(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);
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);
612
650
  } finally {
613
651
  _ === p && (_ = null), g.delete(d);
614
652
  }
615
653
  }
616
- return ke(i, t.direction, e.removedIds.value, !1);
654
+ return je(i, t.direction, e.removedIds.value, !1);
617
655
  }
618
- function ge(e) {
619
- let t = Oe({
656
+ function de(e) {
657
+ let t = Ae({
620
658
  cursor: e.cursor,
621
659
  nextCursor: e.nextCursor,
622
660
  nextItems: e.nextItems,
@@ -626,29 +664,29 @@ function Be(e) {
626
664
  });
627
665
  return S = t.nextSequence, t.bucket;
628
666
  }
629
- function Z() {
667
+ function Q() {
630
668
  c.value = "idle", l.value = null, f.value = null, u.clear();
631
669
  }
632
- function _e() {
670
+ function fe() {
633
671
  if (!e.initialState || !e.initialState.items.length) return !1;
634
- let t = Ae({
672
+ let t = Me({
635
673
  initialState: e.initialState,
636
674
  removedIds: e.removedIds.value,
637
675
  sequence: S
638
676
  });
639
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;
640
678
  }
641
- function ve() {
679
+ function _e() {
642
680
  return c.value === "initializing";
643
681
  }
644
- function ye(t) {
645
- return Ne(t === "leading" ? N.value : P.value, e.removedIds.value, O.value);
682
+ function ve(t) {
683
+ return Fe(t === "leading" ? N.value : P.value, e.removedIds.value, O.value);
646
684
  }
647
- function Se() {
648
- let t = n.value.findIndex((t) => Ce(t, e.removedIds.value) > 0);
685
+ function ye() {
686
+ let t = n.value.findIndex((t) => Te(t, e.removedIds.value) > 0);
649
687
  if (t < 0) return;
650
688
  let r = t;
651
- for (let i = n.value.length - 1; i >= t; --i) if (Ce(n.value[i], e.removedIds.value) > 0) {
689
+ for (let i = n.value.length - 1; i >= t; --i) if (Te(n.value[i], e.removedIds.value) > 0) {
652
690
  r = i;
653
691
  break;
654
692
  }
@@ -670,7 +708,7 @@ function Be(e) {
670
708
  isAutoPrefetchEnabled: m,
671
709
  isPageLoadingLocked: h,
672
710
  items: A,
673
- lockPageLoading: X,
711
+ lockPageLoading: te,
674
712
  loading: M,
675
713
  mode: D,
676
714
  maybePrefetchAround: se,
@@ -683,27 +721,27 @@ function Be(e) {
683
721
  retryInitialLoad: q,
684
722
  retry: J,
685
723
  setActiveIndex: ee,
686
- setAutoPrefetchEnabled: te,
724
+ setAutoPrefetchEnabled: X,
687
725
  syncActiveIndexAfterVisibilityChange: ae,
688
726
  unlockPageLoading: ne,
689
727
  getActiveOccurrenceKey: ie,
690
728
  maybeCommitPendingAppendWhenFilteredOut: oe
691
729
  };
692
730
  }
693
- function Ve(e, t) {
694
- return e.find((e) => Ce(e, t) > 0) ?? e[0] ?? null;
731
+ function Ue(e, t) {
732
+ return e.find((e) => Te(e, t) > 0) ?? e[0] ?? null;
695
733
  }
696
- function He(e, t) {
734
+ function We(e, t) {
697
735
  for (let n = e.length - 1; n >= 0; --n) {
698
736
  let r = e[n];
699
- if (Ce(r, t) > 0) return r;
737
+ if (Te(r, t) > 0) return r;
700
738
  }
701
739
  return e[e.length - 1] ?? null;
702
740
  }
703
741
  //#endregion
704
742
  //#region src/components/viewer-core/useDataSource.ts
705
- function Ue(e, t) {
706
- let { clearRemoved: n, getRemovedIds: r, remove: a, removedIds: o, restore: s, undo: c } = ge(), l = Be({
743
+ function Ge(e, t) {
744
+ let { clearRemoved: n, getRemovedIds: r, remove: a, removedIds: o, restore: s, undo: c } = _e(), l = He({
707
745
  emit: t,
708
746
  fillDelayMs: e.fillDelayMs,
709
747
  fillDelayStepMs: e.fillDelayStepMs,
@@ -791,9 +829,9 @@ function Ue(e, t) {
791
829
  }
792
830
  //#endregion
793
831
  //#region src/components/viewer-core/useController.ts
794
- var We = 1024;
795
- function Ge(e, t) {
796
- let n = Ue(e, t), r = T(0), a = T("list"), o = C({
832
+ var Ke = 1024;
833
+ function qe(e, t) {
834
+ let n = Ge(e, t), r = T(0), a = T("list"), o = C({
797
835
  activeIndex: 0,
798
836
  currentCursor: null,
799
837
  errorMessage: null,
@@ -812,7 +850,7 @@ function Ge(e, t) {
812
850
  removedCount: 0,
813
851
  removedIds: [],
814
852
  surfaceMode: "list"
815
- }), s = i(() => r.value >= We), c = i(() => s.value ? a.value : "fullscreen"), l = i(() => s.value && c.value === "fullscreen");
853
+ }), s = i(() => r.value >= Ke), c = i(() => s.value ? a.value : "fullscreen"), l = i(() => s.value && c.value === "fullscreen");
816
854
  F(s, (e) => {
817
855
  e && m();
818
856
  }), F(() => e.surfaceMode, () => {
@@ -842,7 +880,7 @@ function Ge(e, t) {
842
880
  !s.value || a.value === "list" || (a.value = "list", t("update:surfaceMode", "list"));
843
881
  }
844
882
  function f(e) {
845
- e.defaultPrevented || e.key !== "Escape" || !s.value || c.value !== "fullscreen" || ue(e.target) || (e.preventDefault(), d());
883
+ e.defaultPrevented || e.key !== "Escape" || !s.value || c.value !== "fullscreen" || Q(e.target) || (e.preventDefault(), d());
846
884
  }
847
885
  function p() {
848
886
  r.value = window.innerWidth || 0;
@@ -868,29 +906,67 @@ function Ge(e, t) {
868
906
  }
869
907
  //#endregion
870
908
  //#region src/components/FullscreenMediaBar.vue?vue&type=script&setup=true&lang.ts
871
- var Ke = {
909
+ var Je = {
872
910
  "data-testid": "vibe-media-bar",
873
911
  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]"
874
- }, qe = { class: "grid grid-cols-[auto_minmax(0,1fr)_auto] items-center gap-3 border-t border-white/12 bg-black/70 px-4 py-3 backdrop-blur-[18px]" }, Je = { class: "text-[0.76rem] font-bold uppercase tracking-[0.18em] text-[#f7f1ea]/74" }, Ye = { class: "relative h-4 w-full" }, Xe = [
912
+ }, Ye = { 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]" }, Xe = { class: "text-[0.76rem] font-bold uppercase tracking-[0.18em] text-[#f7f1ea]/74" }, Ze = { class: "relative h-4 w-full" }, Qe = [
875
913
  "max",
876
914
  "value",
877
915
  "disabled"
878
- ], Ze = { class: "text-[0.76rem] font-bold uppercase tracking-[0.18em] text-[#f7f1ea]/74" }, Qe = /* @__PURE__ */ d({
916
+ ], $e = { class: "text-[0.76rem] font-bold uppercase tracking-[0.18em] text-[#f7f1ea]/74" }, et = ["data-layout"], tt = {
917
+ key: 0,
918
+ "data-testid": "vibe-media-volume-popover",
919
+ 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]"
920
+ }, nt = { class: "relative flex h-28 w-4 items-center justify-center" }, rt = ["value"], it = { class: "flex items-center gap-3" }, at = ["aria-label"], ot = {
921
+ key: 0,
922
+ class: "relative h-4 w-24"
923
+ }, st = ["value"], ct = /* @__PURE__ */ d({
879
924
  __name: "FullscreenMediaBar",
880
925
  props: {
881
926
  currentTime: {},
882
927
  currentTimeLabel: {},
883
928
  duration: {},
884
929
  durationLabel: {},
885
- progress: {}
930
+ muted: { type: Boolean },
931
+ progress: {},
932
+ volume: {},
933
+ volumeControlLayout: {}
886
934
  },
887
- emits: ["seek-input"],
935
+ emits: [
936
+ "seek-input",
937
+ "volume-input",
938
+ "volume-toggle"
939
+ ],
888
940
  setup(e, { emit: t }) {
889
- let n = e, r = t;
890
- return (e, t) => (S(), s("div", Ke, [c("div", qe, [
891
- c("span", Je, k(n.currentTimeLabel), 1),
892
- c("div", Ye, [
893
- t[1] ||= c("div", { class: "absolute inset-x-0 top-1/2 h-px -translate-y-1/2 bg-white/12" }, null, -1),
941
+ 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}%` });
942
+ F(d, (e) => {
943
+ e || (u.value = !1);
944
+ }), x(() => {
945
+ document.addEventListener("pointerdown", v);
946
+ }), b(() => {
947
+ document.removeEventListener("pointerdown", v);
948
+ });
949
+ function v(e) {
950
+ !d.value || !u.value || l.value && e.target instanceof Node && !l.value.contains(e.target) && (u.value = !1);
951
+ }
952
+ function C() {
953
+ if (!d.value) {
954
+ r("volume-toggle");
955
+ return;
956
+ }
957
+ if (!u.value) {
958
+ u.value = !0;
959
+ return;
960
+ }
961
+ r("volume-toggle");
962
+ }
963
+ function w(e, t, n) {
964
+ return Math.min(Math.max(e, t), n);
965
+ }
966
+ return (e, t) => (S(), s("div", Je, [c("div", Ye, [
967
+ c("span", Xe, k(n.currentTimeLabel), 1),
968
+ c("div", Ze, [
969
+ t[3] ||= c("div", { class: "absolute inset-x-0 top-1/2 h-px -translate-y-1/2 bg-white/12" }, null, -1),
894
970
  c("div", {
895
971
  class: "absolute left-0 top-1/2 h-px -translate-y-1/2 bg-[#f7f1ea]",
896
972
  style: y({ width: `${n.progress}%` })
@@ -906,25 +982,77 @@ var Ke = {
906
982
  disabled: n.duration <= 0,
907
983
  class: "vibe-media-slider absolute inset-0 z-10 h-4 w-full cursor-pointer bg-transparent disabled:cursor-default disabled:opacity-50",
908
984
  onInput: t[0] ||= (e) => r("seek-input", e)
909
- }, null, 40, Xe)
985
+ }, null, 40, Qe)
910
986
  ]),
911
- c("span", Ze, k(n.durationLabel), 1)
987
+ c("span", $e, k(n.durationLabel), 1),
988
+ c("div", {
989
+ ref_key: "rootRef",
990
+ ref: l,
991
+ "data-testid": "vibe-media-volume",
992
+ "data-layout": n.volumeControlLayout,
993
+ class: "relative flex items-center justify-end"
994
+ }, [d.value && u.value ? (S(), s("div", tt, [c("div", nt, [
995
+ t[4] ||= c("div", { class: "absolute bottom-0 left-1/2 h-full w-px -translate-x-1/2 bg-white/12" }, null, -1),
996
+ c("div", {
997
+ class: "absolute bottom-0 left-1/2 w-px -translate-x-1/2 bg-[#f7f1ea]",
998
+ style: y(_.value)
999
+ }, null, 4),
1000
+ c("input", {
1001
+ "data-testid": "vibe-media-volume-slider",
1002
+ "data-swipe-lock": "true",
1003
+ type: "range",
1004
+ "aria-label": "Adjust active media volume",
1005
+ min: "0",
1006
+ max: "1",
1007
+ step: "0.05",
1008
+ value: f.value,
1009
+ 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",
1010
+ onInput: t[1] ||= (e) => r("volume-input", e)
1011
+ }, null, 40, rt)
1012
+ ])])) : o("", !0), c("div", it, [c("button", {
1013
+ type: "button",
1014
+ "data-testid": "vibe-media-volume-button",
1015
+ "aria-label": g.value,
1016
+ 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",
1017
+ onClick: C
1018
+ }, [(S(), a(O(m.value), {
1019
+ class: "h-4 w-4 stroke-[1.9]",
1020
+ "aria-hidden": "true"
1021
+ }))], 8, at), n.volumeControlLayout === "horizontal" ? (S(), s("div", ot, [
1022
+ t[5] ||= c("div", { class: "absolute inset-x-0 top-1/2 h-px -translate-y-1/2 bg-white/12" }, null, -1),
1023
+ c("div", {
1024
+ class: "absolute left-0 top-1/2 h-px -translate-y-1/2 bg-[#f7f1ea]",
1025
+ style: y(_.value)
1026
+ }, null, 4),
1027
+ c("input", {
1028
+ "data-testid": "vibe-media-volume-slider",
1029
+ "data-swipe-lock": "true",
1030
+ type: "range",
1031
+ "aria-label": "Adjust active media volume",
1032
+ min: "0",
1033
+ max: "1",
1034
+ step: "0.05",
1035
+ value: f.value,
1036
+ class: "vibe-media-slider absolute inset-0 z-10 h-4 w-full cursor-pointer bg-transparent",
1037
+ onInput: t[2] ||= (e) => r("volume-input", e)
1038
+ }, null, 40, st)
1039
+ ])) : o("", !0)])], 8, et)
912
1040
  ])]));
913
1041
  }
914
- }), $e = { class: "pointer-events-none absolute inset-0 z-[3] flex flex-col justify-between p-[clamp(1.25rem,2.6vw,2.25rem)]" }, et = { class: "grid gap-4" }, tt = { class: "flex min-h-11 items-center justify-between gap-4" }, nt = { class: "min-w-0 flex flex-1 items-center gap-3" }, rt = {
1042
+ }), lt = { class: "pointer-events-none absolute inset-0 z-[3] flex flex-col justify-between p-[clamp(1.25rem,2.6vw,2.25rem)]" }, ut = { class: "grid gap-4" }, dt = { class: "flex min-h-11 items-center justify-between gap-4" }, ft = { class: "min-w-0 flex flex-1 items-center gap-3" }, pt = {
915
1043
  key: 1,
916
1044
  "data-testid": "vibe-title",
917
1045
  class: "m-0 truncate text-left text-[0.82rem] leading-none tracking-[-0.04em] min-[721px]:text-[1.2rem]"
918
- }, it = { class: "pointer-events-auto flex shrink-0 items-center gap-2" }, at = {
1046
+ }, mt = { class: "pointer-events-auto flex shrink-0 items-center gap-2" }, ht = {
919
1047
  "data-testid": "vibe-pagination",
920
1048
  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]"
921
- }, ot = { class: "whitespace-nowrap" }, st = {
1049
+ }, gt = { class: "whitespace-nowrap" }, _t = {
922
1050
  key: 1,
923
1051
  class: "whitespace-nowrap border-l border-white/12 pl-2 text-[#f7f1ea]/56 min-[721px]:pl-3"
924
- }, ct = {
1052
+ }, vt = {
925
1053
  key: 0,
926
1054
  class: "grid gap-2 max-[720px]:justify-items-start"
927
- }, lt = /* @__PURE__ */ d({
1055
+ }, yt = /* @__PURE__ */ d({
928
1056
  __name: "FullscreenHeader",
929
1057
  props: {
930
1058
  currentIndex: {},
@@ -938,7 +1066,7 @@ var Ke = {
938
1066
  emits: ["back-to-list"],
939
1067
  setup(e, { emit: t }) {
940
1068
  let n = e, r = t;
941
- return (e, t) => (S(), s("div", $e, [c("div", et, [c("div", tt, [c("div", nt, [n.showBackToList ? (S(), s("button", {
1069
+ return (e, t) => (S(), s("div", lt, [c("div", ut, [c("div", dt, [c("div", ft, [n.showBackToList ? (S(), s("button", {
942
1070
  key: 0,
943
1071
  type: "button",
944
1072
  "data-testid": "vibe-back-to-list",
@@ -948,48 +1076,48 @@ var Ke = {
948
1076
  }, [u(j(Y), {
949
1077
  class: "h-4 w-4 stroke-[2.2]",
950
1078
  "aria-hidden": "true"
951
- })])) : o("", !0), n.title ? (S(), s("h2", rt, k(n.title), 1)) : o("", !0)]), c("div", it, [c("span", at, [
1079
+ })])) : o("", !0), n.title ? (S(), s("h2", pt, k(n.title), 1)) : o("", !0)]), c("div", mt, [c("span", ht, [
952
1080
  n.loading ? (S(), a(j(re), {
953
1081
  key: 0,
954
1082
  "data-testid": "vibe-pagination-spinner",
955
1083
  class: "h-3.5 w-3.5 animate-spin stroke-[1.9]",
956
1084
  "aria-hidden": "true"
957
1085
  })) : o("", !0),
958
- c("span", ot, k(n.currentIndex + 1) + " / " + k(n.total), 1),
959
- n.paginationDetail ? (S(), s("span", st, k(n.paginationDetail), 1)) : o("", !0)
960
- ]), D(e.$slots, "actions")])])]), n.showEndBadge ? (S(), s("div", ct, [...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)]));
1086
+ c("span", gt, k(n.currentIndex + 1) + " / " + k(n.total), 1),
1087
+ n.paginationDetail ? (S(), s("span", _t, k(n.paginationDetail), 1)) : o("", !0)
1088
+ ]), D(e.$slots, "actions")])])]), n.showEndBadge ? (S(), s("div", vt, [...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)]));
961
1089
  }
962
- }), ut = {
1090
+ }), bt = {
963
1091
  image: ne,
964
- video: te,
1092
+ video: X,
965
1093
  audio: ee,
966
- other: X
967
- }, dt = {
1094
+ other: te
1095
+ }, xt = {
968
1096
  image: "Image",
969
1097
  video: "Video",
970
1098
  audio: "Audio",
971
1099
  other: "File"
972
1100
  };
973
- function ft(e) {
974
- return ut[e];
1101
+ function St(e) {
1102
+ return bt[e];
975
1103
  }
976
- function pt(e) {
977
- return dt[e];
1104
+ function Ct(e) {
1105
+ return xt[e];
978
1106
  }
979
1107
  //#endregion
980
1108
  //#region src/components/viewer-core/useFullscreenSurfaceMedia.ts
981
- var mt = 2;
982
- function ht(e) {
1109
+ var wt = 2;
1110
+ function Tt(e) {
983
1111
  function t(e, t) {
984
1112
  let n = t.title?.trim();
985
- return n ? `${e} ${n}` : `${e} ${pt(t.type).toLowerCase()}`;
1113
+ return n ? `${e} ${n}` : `${e} ${Ct(t.type).toLowerCase()}`;
986
1114
  }
987
1115
  function n(e) {
988
- return Q(e);
1116
+ return $(e);
989
1117
  }
990
1118
  function r(t) {
991
1119
  let n = e.resolvedActiveIndex.value;
992
- return !!e.active.value && t >= n && t <= n + mt;
1120
+ return !!e.active.value && t >= n && t <= n + wt;
993
1121
  }
994
1122
  function i(t, i) {
995
1123
  let a = n(i);
@@ -1024,11 +1152,11 @@ function ht(e) {
1024
1152
  }
1025
1153
  //#endregion
1026
1154
  //#region src/components/viewer-core/slotContent.ts
1027
- function gt(e) {
1155
+ function Et(e) {
1028
1156
  if (!Array.isArray(e)) return !1;
1029
1157
  for (let t of e) {
1030
1158
  if (Array.isArray(t)) {
1031
- if (gt(t)) return !0;
1159
+ if (Et(t)) return !0;
1032
1160
  continue;
1033
1161
  }
1034
1162
  if (!m(t)) {
@@ -1039,20 +1167,20 @@ function gt(e) {
1039
1167
  if (t != null && t !== !1) return !0;
1040
1168
  continue;
1041
1169
  }
1042
- if (!_t(t)) return !0;
1170
+ if (!Dt(t)) return !0;
1043
1171
  }
1044
1172
  return !1;
1045
1173
  }
1046
- function _t(r) {
1047
- return r.type === e ? !0 : r.type === n ? typeof r.children == "string" ? r.children.trim().length === 0 : !0 : r.type === t ? !gt(r.children) : !1;
1174
+ function Dt(r) {
1175
+ return r.type === e ? !0 : r.type === n ? typeof r.children == "string" ? r.children.trim().length === 0 : !0 : r.type === t ? !Et(r.children) : !1;
1048
1176
  }
1049
1177
  //#endregion
1050
1178
  //#region src/components/viewer-core/useSurfaceEmptyState.ts
1051
- var vt = "no items available";
1052
- function yt(e) {
1179
+ var Ot = "no items available";
1180
+ function kt(e) {
1053
1181
  let t = i(() => e.loading.value || e.itemCount.value > 0 || e.emptyStateMode.value === "hidden" ? null : {
1054
1182
  loading: !!e.loading.value,
1055
- message: vt,
1183
+ message: Ot,
1056
1184
  mode: e.emptyStateMode.value === "badge" ? "badge" : "inline",
1057
1185
  surface: e.surface,
1058
1186
  total: e.itemCount.value
@@ -1060,23 +1188,23 @@ function yt(e) {
1060
1188
  return {
1061
1189
  emptyStateProps: t,
1062
1190
  showBadgeEmptyState: i(() => t.value?.mode === "badge"),
1063
- showCustomEmptyState: i(() => gt(n.value)),
1191
+ showCustomEmptyState: i(() => Et(n.value)),
1064
1192
  showInlineEmptyState: i(() => t.value?.mode === "inline")
1065
1193
  };
1066
1194
  }
1067
1195
  //#endregion
1068
1196
  //#region src/components/viewer-core/format.ts
1069
- function bt(e) {
1197
+ function At(e) {
1070
1198
  if (!Number.isFinite(e) || e <= 0) return "0:00";
1071
1199
  let t = Math.floor(e), n = Math.floor(t / 3600), r = Math.floor(t % 3600 / 60), i = t % 60;
1072
1200
  return n > 0 ? `${n}:${String(r).padStart(2, "0")}:${String(i).padStart(2, "0")}` : `${r}:${String(i).padStart(2, "0")}`;
1073
1201
  }
1074
1202
  //#endregion
1075
1203
  //#region src/components/viewer-core/surfaceStatus.ts
1076
- function xt(e) {
1204
+ function jt(e) {
1077
1205
  return e.phase ? e.phase : e.loading ? e.itemCount > 0 ? "loading" : "initializing" : "idle";
1078
1206
  }
1079
- function St(e) {
1207
+ function Mt(e) {
1080
1208
  return e.phase === "failed" ? {
1081
1209
  kind: "failed",
1082
1210
  message: e.errorMessage ?? (e.hasItems ? "The viewer could not load more items." : "The viewer could not load items.")
@@ -1099,7 +1227,7 @@ function St(e) {
1099
1227
  }
1100
1228
  //#endregion
1101
1229
  //#region src/components/viewer-core/useActivation.ts
1102
- function Ct(e) {
1230
+ function Nt(e) {
1103
1231
  let t = !1;
1104
1232
  F(e.enabled, async (t) => {
1105
1233
  if (n(t), t) {
@@ -1122,42 +1250,44 @@ function Ct(e) {
1122
1250
  }
1123
1251
  //#endregion
1124
1252
  //#region src/components/viewer-core/assetState.ts
1125
- var wt = {
1253
+ var Pt = {
1126
1254
  currentTime: 0,
1127
1255
  duration: 0,
1128
1256
  errorKind: null,
1257
+ muted: !1,
1129
1258
  paused: !0,
1130
- ready: !1
1259
+ ready: !1,
1260
+ volume: 1
1131
1261
  };
1132
- function Tt() {
1133
- return { ...wt };
1262
+ function Ft() {
1263
+ return { ...Pt };
1134
1264
  }
1135
- function Et(e) {
1265
+ function It(e) {
1136
1266
  return e.complete && !!(e.currentSrc || e.getAttribute("src"));
1137
1267
  }
1138
- function Dt(e, t, n) {
1139
- e.currentTime = Number.isFinite(t.currentTime) ? t.currentTime : 0, e.duration = Number.isFinite(t.duration) ? t.duration : 0, e.paused = t.paused, n && n !== "error" && (e.errorKind = null), e.ready = Ot(t, n);
1268
+ function Lt(e, t, n) {
1269
+ 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 = Rt(t, n);
1140
1270
  }
1141
- function Ot(e, t) {
1271
+ function Rt(e, t) {
1142
1272
  return t === "error" || t === "loadstart" || t === "waiting" || t === "stalled" ? !1 : t === "canplay" || t === "canplaythrough" || t === "playing" ? !0 : e.readyState >= HTMLMediaElement.HAVE_CURRENT_DATA;
1143
1273
  }
1144
1274
  //#endregion
1145
1275
  //#region src/components/viewer-core/loadError.ts
1146
- var kt = /* @__PURE__ */ new Map();
1147
- function At(e) {
1276
+ var zt = /* @__PURE__ */ new Map();
1277
+ function Bt(e) {
1148
1278
  return e === "not-found" ? "404" : "Load error";
1149
1279
  }
1150
- function jt(e) {
1280
+ function Vt(e) {
1151
1281
  return e === "generic";
1152
1282
  }
1153
- function Mt(e) {
1154
- let t = kt.get(e);
1283
+ function Ht(e) {
1284
+ let t = zt.get(e);
1155
1285
  if (t) return t;
1156
- let n = Nt(e);
1157
- return kt.set(e, n), n;
1286
+ let n = Ut(e);
1287
+ return zt.set(e, n), n;
1158
1288
  }
1159
- async function Nt(e) {
1160
- if (!Pt(e)) return "generic";
1289
+ async function Ut(e) {
1290
+ if (!Wt(e)) return "generic";
1161
1291
  try {
1162
1292
  let t = await fetch(e, { method: "HEAD" });
1163
1293
  if (!t.ok && t.status === 404) return "not-found";
@@ -1166,12 +1296,12 @@ async function Nt(e) {
1166
1296
  }
1167
1297
  return "generic";
1168
1298
  }
1169
- function Pt(e) {
1299
+ function Wt(e) {
1170
1300
  return /^(https?:\/\/|\/)/i.test(e);
1171
1301
  }
1172
1302
  //#endregion
1173
1303
  //#region src/components/viewer-core/mediaPlayback.ts
1174
- function Ft(e) {
1304
+ function Gt(e) {
1175
1305
  try {
1176
1306
  let t = e.play();
1177
1307
  t && typeof t.catch == "function" && t.catch(() => {});
@@ -1179,75 +1309,77 @@ function Ft(e) {
1179
1309
  }
1180
1310
  //#endregion
1181
1311
  //#region src/components/viewer-core/useMedia.ts
1182
- function It(e) {
1183
- let t = T({}), n = T({}), r = T({}), a = T({}), o = /* @__PURE__ */ new Map(), s = /* @__PURE__ */ new Map(), c = /* @__PURE__ */ new Set(), l = i(() => e.activeItem.value ? Q(e.activeItem.value) : null), u = i(() => e.activeMediaItem.value ? Q(e.activeMediaItem.value) : null), d = i(() => {
1312
+ function Kt(e) {
1313
+ 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(() => {
1184
1314
  let t = /* @__PURE__ */ new Map();
1185
- for (let n of e.items.value) t.set(Q(n), n);
1315
+ for (let n of e.items.value) t.set($(n), n);
1186
1316
  return t;
1187
- }), f = i(() => u.value ? r.value[u.value] ?? wt : wt), p = i(() => u.value ? f.value.duration : 0), m = i(() => p.value <= 0 ? 0 : Lt(f.value.currentTime / p.value * 100, 0, 100)), h = i(() => l.value ? N(l.value) : null);
1188
- F(() => l.value, async () => {
1189
- await x();
1317
+ }), p = i(() => d.value ? r.value[d.value] ?? Pt : Pt), m = i(() => d.value ? p.value.duration : 0), h = i(() => m.value <= 0 ? 0 : qt(p.value.currentTime / m.value * 100, 0, 100)), _ = i(() => u.value ? L(u.value) : null);
1318
+ F(() => u.value, async () => {
1319
+ await S();
1190
1320
  }), F(() => e.itemCount.value, async () => {
1191
- await x();
1321
+ await S();
1322
+ }), F(() => e.loopFullscreenVideo.value, async () => {
1323
+ await S();
1192
1324
  });
1193
- function _(e, t) {
1325
+ function v(e, t) {
1194
1326
  if (t instanceof HTMLVideoElement) {
1195
- o.set(e, t), H(e, t);
1327
+ s.set(e, t), G(e, t);
1196
1328
  return;
1197
1329
  }
1198
- o.delete(e);
1330
+ s.delete(e);
1199
1331
  }
1200
- function v(e, t) {
1332
+ function y(e, t) {
1201
1333
  if (t instanceof HTMLAudioElement) {
1202
- s.set(e, t), H(e, t);
1334
+ c.set(e, t), G(e, t);
1203
1335
  return;
1204
1336
  }
1205
- s.delete(e);
1337
+ c.delete(e);
1206
1338
  }
1207
- function y(e, r) {
1208
- r instanceof HTMLImageElement && Et(r) && (t.value[e] = !0, n.value[e] = null, q(e, r.currentSrc || r.src || Y(e)));
1339
+ function b(e, r) {
1340
+ r instanceof HTMLImageElement && It(r) && (t.value[e] = !0, n.value[e] = null, X(e, r.currentSrc || r.src || ne(e)));
1209
1341
  }
1210
- function b() {
1211
- B(), a.value = {}, n.value = {}, t.value = {}, r.value = {}, c.clear();
1342
+ function x() {
1343
+ U(), a.value = {}, n.value = {}, t.value = {}, o.value = {}, r.value = {}, l.clear();
1212
1344
  }
1213
- async function x() {
1345
+ async function S() {
1214
1346
  if (!e.isEnabled.value) {
1215
- B();
1347
+ U();
1216
1348
  return;
1217
1349
  }
1218
1350
  await g();
1219
- let t = l.value;
1220
- for (let [e, n] of o.entries()) {
1221
- if (e !== t || r.value[e]?.errorKind) {
1222
- z(n, e);
1351
+ let t = u.value;
1352
+ for (let [n, i] of s.entries()) {
1353
+ if (n !== t || r.value[n]?.errorKind) {
1354
+ H(i, n);
1223
1355
  continue;
1224
1356
  }
1225
- n.muted = !0, n.loop = !1, n.playsInline = !0, Ft(n), H(e, n);
1357
+ i.muted = !1, i.loop = e.loopFullscreenVideo.value, i.playsInline = !0, Gt(i), G(n, i);
1226
1358
  }
1227
- for (let [e, n] of s.entries()) {
1359
+ for (let [e, n] of c.entries()) {
1228
1360
  if (e !== t || r.value[e]?.errorKind) {
1229
- z(n, e);
1361
+ H(n, e);
1230
1362
  continue;
1231
1363
  }
1232
- Ft(n), H(e, n);
1364
+ Gt(n), G(e, n);
1233
1365
  }
1234
1366
  }
1235
- function S(e, t) {
1367
+ function C(e, t) {
1236
1368
  let n = t.currentTarget instanceof HTMLMediaElement ? t.currentTarget : t.target instanceof HTMLMediaElement ? t.target : null;
1237
1369
  if (n) {
1238
1370
  let i = r.value[e]?.ready ?? !1;
1239
- H(e, n, t.type);
1371
+ G(e, n, t.type);
1240
1372
  let a = r.value[e]?.ready ?? !1;
1241
- !i && a && q(e, n.currentSrc || n.src || Y(e));
1373
+ !i && a && X(e, n.currentSrc || n.src || ne(e));
1242
1374
  }
1243
1375
  }
1244
- function C(e, r) {
1245
- t.value[e] = !0, n.value[e] = null, q(e, r);
1376
+ function w(e, r) {
1377
+ t.value[e] = !0, n.value[e] = null, X(e, r);
1246
1378
  }
1247
- async function w(r, i) {
1248
- let a = J(r) ?? e.activeItem.value;
1379
+ async function E(r, i) {
1380
+ let a = te(r) ?? e.activeItem.value;
1249
1381
  t.value[r] = !1, n.value[r] = "generic";
1250
- let o = await Mt(i);
1382
+ let o = await Ht(i);
1251
1383
  n.value[r] = o, a && e.onAssetError?.({
1252
1384
  item: a,
1253
1385
  occurrenceKey: r,
@@ -1256,8 +1388,8 @@ function It(e) {
1256
1388
  surface: "fullscreen"
1257
1389
  });
1258
1390
  }
1259
- async function E(t, n) {
1260
- let r = W(t), i = V(t), a = J(t) ?? e.activeMediaItem.value ?? e.activeItem.value;
1391
+ async function D(t, n) {
1392
+ let r = J(t), i = W(t), a = te(t) ?? e.activeMediaItem.value ?? e.activeItem.value;
1261
1393
  if (r) {
1262
1394
  r.pause();
1263
1395
  try {
@@ -1265,7 +1397,7 @@ function It(e) {
1265
1397
  } catch {}
1266
1398
  }
1267
1399
  i.currentTime = 0, i.duration = 0, i.paused = !0, i.ready = !1, i.errorKind = "generic";
1268
- let o = await Mt(n);
1400
+ let o = await Ht(n);
1269
1401
  i.errorKind = o, a && e.onAssetError?.({
1270
1402
  item: a,
1271
1403
  occurrenceKey: t,
@@ -1274,137 +1406,152 @@ function It(e) {
1274
1406
  surface: "fullscreen"
1275
1407
  });
1276
1408
  }
1277
- function D(e, t, n) {
1278
- e.button !== 0 || Date.now() < n || K(o.get(t) ?? null);
1279
- }
1280
1409
  function O(e, t, n) {
1281
- e.button !== 0 || Date.now() < n || K(W(t));
1410
+ e.button !== 0 || Date.now() < n || ee(s.get(t) ?? null);
1411
+ }
1412
+ function k(e, t, n) {
1413
+ e.button !== 0 || Date.now() < n || ee(J(t));
1282
1414
  }
1283
- function k(e) {
1284
- let t = G(), n = u.value;
1415
+ function A(e) {
1416
+ let t = Y(), n = d.value;
1285
1417
  if (!t || !n || !(e.target instanceof HTMLInputElement)) return;
1286
1418
  let r = Number.parseFloat(e.target.value);
1287
1419
  if (!Number.isFinite(r)) return;
1288
- let i = Lt(r, 0, p.value || 0);
1289
- U(n, i, t), t.currentTime = i;
1290
- }
1291
- function A(e) {
1292
- return !!t.value[e] && !n.value[e];
1420
+ let i = qt(r, 0, m.value || 0);
1421
+ K(n, i, t), t.currentTime = i;
1293
1422
  }
1294
1423
  function j(e) {
1295
- return (r.value[e]?.ready ?? !1) && !r.value[e]?.errorKind;
1424
+ let t = Y(), n = d.value;
1425
+ if (!t || !n || !(e.target instanceof HTMLInputElement)) return;
1426
+ let r = qt(Number.parseFloat(e.target.value), 0, 1);
1427
+ t.volume = r, t.muted = r <= 0, r > 0 && (o.value[n] = r), G(n, t);
1296
1428
  }
1297
- function M(e) {
1298
- return e.url;
1429
+ function M() {
1430
+ let e = Y(), t = d.value;
1431
+ !e || !t || (e.muted || e.volume <= 0 ? (e.volume = q(t), e.muted = !1, o.value[t] = e.volume) : (o.value[t] = e.volume, e.muted = !0), G(t, e));
1299
1432
  }
1300
1433
  function N(e) {
1301
- return n.value[e] ?? r.value[e]?.errorKind ?? null;
1434
+ return !!t.value[e] && !n.value[e];
1302
1435
  }
1303
1436
  function P(e) {
1304
- let t = N(e);
1305
- return t ? At(t) : null;
1437
+ return (r.value[e]?.ready ?? !1) && !r.value[e]?.errorKind;
1306
1438
  }
1307
1439
  function I(e) {
1308
- return jt(N(e));
1440
+ return e.url;
1309
1441
  }
1310
1442
  function L(e) {
1443
+ return n.value[e] ?? r.value[e]?.errorKind ?? null;
1444
+ }
1445
+ function R(e) {
1446
+ let t = L(e);
1447
+ return t ? Bt(t) : null;
1448
+ }
1449
+ function z(e) {
1450
+ return Vt(L(e));
1451
+ }
1452
+ function B(e) {
1311
1453
  return `${e}:${a.value[e] ?? 0}`;
1312
1454
  }
1313
- async function R(e) {
1314
- if (!I(e)) return;
1455
+ async function V(e) {
1456
+ if (!z(e)) return;
1315
1457
  t.value[e] = !1, n.value[e] = null;
1316
- let r = V(e);
1458
+ let r = W(e);
1317
1459
  r.currentTime = 0, r.duration = 0, r.paused = !0, r.ready = !1, r.errorKind = null;
1318
- let i = W(e);
1319
- i && z(i, e), c.forEach((t) => {
1320
- t.startsWith(`${e}|`) && c.delete(t);
1321
- }), a.value[e] = (a.value[e] ?? 0) + 1, await g(), await x();
1460
+ let i = J(e);
1461
+ i && H(i, e), l.forEach((t) => {
1462
+ t.startsWith(`${e}|`) && l.delete(t);
1463
+ }), a.value[e] = (a.value[e] ?? 0) + 1, await g(), await S();
1322
1464
  }
1323
- function z(e, t) {
1465
+ function H(e, t) {
1324
1466
  e.pause();
1325
1467
  try {
1326
1468
  e.currentTime = 0;
1327
1469
  } catch {}
1328
- H(t, e);
1470
+ G(t, e);
1329
1471
  }
1330
- function B() {
1331
- for (let [e, t] of o.entries()) z(t, e);
1332
- for (let [e, t] of s.entries()) z(t, e);
1472
+ function U() {
1473
+ for (let [e, t] of s.entries()) H(t, e);
1474
+ for (let [e, t] of c.entries()) H(t, e);
1333
1475
  }
1334
- function V(e) {
1335
- return r.value[e] || (r.value[e] = Tt()), r.value[e];
1476
+ function W(e) {
1477
+ return r.value[e] || (r.value[e] = Ft()), r.value[e];
1336
1478
  }
1337
- function H(e, t, n) {
1338
- Dt(V(e), t, n);
1479
+ function G(e, t, n) {
1480
+ Lt(W(e), t, n), !t.muted && t.volume > 0 && (o.value[e] = t.volume);
1339
1481
  }
1340
- function U(e, t, n) {
1341
- let r = V(e);
1342
- r.currentTime = t, r.duration = Number.isFinite(n.duration) ? n.duration : r.duration, r.paused = n.paused;
1482
+ function K(e, t, n) {
1483
+ let r = W(e);
1484
+ 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;
1343
1485
  }
1344
- function W(e) {
1345
- return o.get(e) ?? s.get(e) ?? null;
1486
+ function q(e) {
1487
+ return qt(o.value[e] ?? 1, 0, 1);
1346
1488
  }
1347
- function G() {
1348
- return u.value ? W(u.value) : null;
1489
+ function J(e) {
1490
+ return s.get(e) ?? c.get(e) ?? null;
1349
1491
  }
1350
- function K(e) {
1492
+ function Y() {
1493
+ return d.value ? J(d.value) : null;
1494
+ }
1495
+ function ee(e) {
1351
1496
  if (e) {
1352
1497
  if (e.paused) {
1353
- Ft(e);
1498
+ Gt(e);
1354
1499
  return;
1355
1500
  }
1356
1501
  e.pause();
1357
1502
  }
1358
1503
  }
1359
- function q(t, n) {
1360
- let r = J(t) ?? e.activeMediaItem.value ?? e.activeItem.value;
1504
+ function X(t, n) {
1505
+ let r = te(t) ?? e.activeMediaItem.value ?? e.activeItem.value;
1361
1506
  if (!r || !n) return;
1362
1507
  let i = `${t}|${n}`;
1363
- c.has(i) || (c.add(i), e.onAssetLoad?.({
1508
+ l.has(i) || (l.add(i), e.onAssetLoad?.({
1364
1509
  item: r,
1365
1510
  occurrenceKey: t,
1366
1511
  surface: "fullscreen",
1367
1512
  url: n
1368
1513
  }));
1369
1514
  }
1370
- function J(e) {
1371
- return d.value.get(e) ?? null;
1515
+ function te(e) {
1516
+ return f.value.get(e) ?? null;
1372
1517
  }
1373
- function Y(e) {
1374
- return J(e)?.url ?? null;
1518
+ function ne(e) {
1519
+ return te(e)?.url ?? null;
1375
1520
  }
1376
1521
  return {
1377
- activeAssetErrorKind: h,
1378
- activeMediaDuration: p,
1379
- activeMediaProgress: m,
1380
- activeMediaState: f,
1381
- getAssetErrorKind: N,
1382
- getAssetErrorLabel: P,
1383
- getAssetRenderKey: L,
1384
- getImageSource: M,
1385
- isImageReady: A,
1386
- isMediaReady: j,
1387
- canRetryAsset: I,
1522
+ activeAssetErrorKind: _,
1523
+ activeMediaDuration: m,
1524
+ activeMediaProgress: h,
1525
+ activeMediaState: p,
1526
+ getAssetErrorKind: L,
1527
+ getAssetErrorLabel: R,
1528
+ getAssetRenderKey: B,
1529
+ getImageSource: I,
1530
+ isImageReady: N,
1531
+ isMediaReady: P,
1532
+ canRetryAsset: z,
1388
1533
  mediaStates: r,
1389
- onAudioCoverClick: O,
1390
- onImageError: w,
1391
- onImageLoad: C,
1392
- onMediaError: E,
1393
- onMediaEvent: S,
1394
- onMediaSeekInput: k,
1395
- onVideoClick: D,
1396
- registerAudioElement: v,
1397
- registerImageElement: y,
1398
- registerVideoElement: _,
1399
- resetMediaState: b,
1400
- retryAsset: R,
1401
- syncMediaPlayback: x
1534
+ onAudioCoverClick: k,
1535
+ onImageError: E,
1536
+ onImageLoad: w,
1537
+ onMediaError: D,
1538
+ onMediaEvent: C,
1539
+ onMediaSeekInput: A,
1540
+ onMediaVolumeInput: j,
1541
+ onMediaVolumeToggle: M,
1542
+ onVideoClick: O,
1543
+ registerAudioElement: y,
1544
+ registerImageElement: b,
1545
+ registerVideoElement: v,
1546
+ resetMediaState: x,
1547
+ retryAsset: V,
1548
+ syncMediaPlayback: S
1402
1549
  };
1403
1550
  }
1404
- function Lt(e, t, n) {
1551
+ function qt(e, t, n) {
1405
1552
  return Math.min(Math.max(e, t), n);
1406
1553
  }
1407
- function Rt(e, t, n = 2) {
1554
+ function Jt(e, t, n = 2) {
1408
1555
  return t <= 0 ? {
1409
1556
  start: 0,
1410
1557
  end: -1
@@ -1413,14 +1560,14 @@ function Rt(e, t, n = 2) {
1413
1560
  end: Math.min(t - 1, e + n)
1414
1561
  };
1415
1562
  }
1416
- function zt(e, t, n = 2) {
1417
- let r = Rt(t, e.length, n);
1563
+ function Yt(e, t, n = 2) {
1564
+ let r = Jt(t, e.length, n);
1418
1565
  return r.end < r.start ? [] : e.slice(r.start, r.end + 1).map((e, t) => ({
1419
1566
  item: e,
1420
1567
  index: r.start + t
1421
1568
  }));
1422
1569
  }
1423
- function Bt(e, t, n, r, i) {
1570
+ function Xt(e, t, n, r, i) {
1424
1571
  return {
1425
1572
  transform: `translate3d(0, ${(e - t) * n + r}px, 0)`,
1426
1573
  transition: i ? "none" : "transform 320ms cubic-bezier(0.22, 1, 0.36, 1)"
@@ -1428,174 +1575,232 @@ function Bt(e, t, n, r, i) {
1428
1575
  }
1429
1576
  //#endregion
1430
1577
  //#region src/components/viewer-core/useViewer.ts
1431
- function Vt(e, t, n = {}) {
1432
- 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.paginationDetail ?? null), u = i(() => xt({
1578
+ function Zt(e, t, n = {}) {
1579
+ 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(() => jt({
1433
1580
  itemCount: r.value.length,
1434
1581
  loading: s.value,
1435
1582
  phase: e.phase
1436
- })), d = i(() => !1), f = T(null), p = T(0), m = T(!1), h = T(1), g = n.enabled ?? i(() => !0), _ = null, v = 0, y = 0, b = 0, x = i(() => r.value.length === 0 ? 0 : N(a.value, 0, r.value.length - 1)), S = i(() => r.value[x.value] ?? null), C = i(() => S.value?.type === "audio" || S.value?.type === "video" ? S.value : null), w = It({
1583
+ })), 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 = Kt({
1437
1584
  items: r,
1438
- activeItem: S,
1439
- activeMediaItem: C,
1440
- isEnabled: g,
1585
+ activeItem: C,
1586
+ activeMediaItem: w,
1587
+ isEnabled: _,
1441
1588
  itemCount: i(() => r.value.length),
1589
+ loopFullscreenVideo: l,
1442
1590
  onAssetError: n.onAssetError,
1443
1591
  onAssetLoad: n.onAssetLoad
1444
- }), E = i(() => r.value.length > 0 && x.value === r.value.length - 1), D = i(() => St({
1592
+ }), D = i(() => r.value.length > 0 && S.value === r.value.length - 1), O = i(() => Mt({
1445
1593
  errorMessage: o.value,
1446
1594
  hasItems: r.value.length > 0,
1447
1595
  hasNextPage: c.value,
1448
- phase: u.value,
1596
+ phase: d.value,
1449
1597
  surface: "fullscreen"
1450
- })), O = i(() => D.value?.kind ?? null), k = i(() => D.value?.message ?? null), A = i(() => Math.min(96, h.value * .15 || 96)), j = i(() => Rt(x.value, r.value.length)), M = i(() => zt(r.value, x.value));
1451
- Ct({
1452
- enabled: g,
1598
+ })), k = i(() => O.value?.kind ?? null), A = i(() => O.value?.message ?? null), j = i(() => Math.min(96, g.value * .15 || 96)), M = i(() => Jt(S.value, r.value.length)), N = i(() => Yt(r.value, S.value));
1599
+ Nt({
1600
+ enabled: _,
1453
1601
  onDisable() {
1454
- U(), w.resetMediaState();
1602
+ W(), E.resetMediaState();
1455
1603
  },
1456
1604
  onEnable() {
1457
- return w.syncMediaPlayback();
1605
+ return E.syncMediaPlayback();
1458
1606
  },
1459
- onKeydown: G,
1460
- onResize: P
1607
+ onKeydown: K,
1608
+ onResize: F
1461
1609
  });
1462
- function N(e, t, n) {
1610
+ function P(e, t, n) {
1463
1611
  return Math.min(Math.max(e, t), n);
1464
1612
  }
1465
- function P() {
1466
- h.value = f.value?.clientHeight || window.innerHeight || 1;
1467
- }
1468
- function F(e) {
1469
- return r.value.length === 0 ? !1 : N(x.value + e, 0, r.value.length - 1) !== x.value;
1613
+ function F() {
1614
+ g.value = p.value?.clientHeight || window.innerHeight || 1;
1470
1615
  }
1471
1616
  function I(e) {
1472
- if (r.value.length === 0) return;
1473
- let n = N(x.value + e, 0, r.value.length - 1);
1474
- n !== x.value && t("update:activeIndex", n);
1617
+ return r.value.length === 0 ? !1 : P(S.value + e, 0, r.value.length - 1) !== S.value;
1475
1618
  }
1476
1619
  function L(e) {
1477
- let t = e > 0, n = e < 0;
1478
- return t && !F(-1) || n && !F(1) ? e * .24 : e;
1620
+ if (r.value.length === 0) return;
1621
+ let n = P(S.value + e, 0, r.value.length - 1);
1622
+ n !== S.value && t("update:activeIndex", n);
1479
1623
  }
1480
1624
  function R(e) {
1481
- !g.value || r.value.length === 0 || e.pointerType === "mouse" || de(e.target) || (_ = e.pointerId, v = e.clientY, p.value = 0, m.value = !0, f.value?.setPointerCapture?.(e.pointerId));
1625
+ let t = e > 0, n = e < 0;
1626
+ return t && !I(-1) || n && !I(1) ? e * .24 : e;
1482
1627
  }
1483
1628
  function z(e) {
1484
- !g.value || !m.value || _ !== e.pointerId || (p.value = L(e.clientY - v));
1629
+ !_.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));
1485
1630
  }
1486
1631
  function B(e) {
1487
- !g.value || _ !== e.pointerId || (f.value?.releasePointerCapture?.(e.pointerId), H());
1632
+ !_.value || !h.value || v !== e.pointerId || (m.value = R(e.clientY - y));
1488
1633
  }
1489
1634
  function V(e) {
1490
- !g.value || _ !== e.pointerId || (f.value?.releasePointerCapture?.(e.pointerId), U());
1635
+ !_.value || v !== e.pointerId || (p.value?.releasePointerCapture?.(e.pointerId), U());
1491
1636
  }
1492
- function H() {
1493
- Math.abs(p.value) >= A.value && (b = Date.now() + 250, I(p.value < 0 ? 1 : -1)), U();
1637
+ function H(e) {
1638
+ !_.value || v !== e.pointerId || (p.value?.releasePointerCapture?.(e.pointerId), W());
1494
1639
  }
1495
1640
  function U() {
1496
- p.value = 0, m.value = !1, _ = null;
1641
+ Math.abs(m.value) >= j.value && (x = Date.now() + 250, L(m.value < 0 ? 1 : -1)), W();
1497
1642
  }
1498
- function W(e) {
1499
- if (!g.value || r.value.length === 0 || m.value || de(e.target) || Math.abs(e.deltaY) < Math.max(Math.abs(e.deltaX), 24)) return;
1500
- e.preventDefault();
1501
- let t = Date.now();
1502
- t < y || (y = t + 400, I(e.deltaY > 0 ? 1 : -1));
1643
+ function W() {
1644
+ m.value = 0, h.value = !1, v = null;
1503
1645
  }
1504
1646
  function G(e) {
1505
- !g.value || r.value.length === 0 || ue(e.target) || ((e.key === "ArrowDown" || e.key === "PageDown") && (e.preventDefault(), I(1)), (e.key === "ArrowUp" || e.key === "PageUp") && (e.preventDefault(), I(-1)));
1647
+ if (!_.value || r.value.length === 0 || h.value || fe(e.target) || Math.abs(e.deltaY) < Math.max(Math.abs(e.deltaX), 24)) return;
1648
+ e.preventDefault();
1649
+ let t = Date.now();
1650
+ t < b || (b = t + 400, L(e.deltaY > 0 ? 1 : -1));
1506
1651
  }
1507
- function K(e, t) {
1508
- w.onVideoClick(e, t, b);
1652
+ function K(e) {
1653
+ !_.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)));
1509
1654
  }
1510
1655
  function q(e, t) {
1511
- w.onAudioCoverClick(e, t, b);
1656
+ E.onVideoClick(e, t, x);
1512
1657
  }
1513
- function J(e) {
1514
- w.onMediaSeekInput(e);
1658
+ function J(e, t) {
1659
+ E.onAudioCoverClick(e, t, x);
1515
1660
  }
1516
1661
  function Y(e) {
1517
- return e.type === "image" || e.type === "video";
1662
+ E.onMediaSeekInput(e);
1518
1663
  }
1519
1664
  function ee(e) {
1520
- return e.type === "audio";
1665
+ E.onMediaVolumeInput(e);
1666
+ }
1667
+ function X() {
1668
+ E.onMediaVolumeToggle();
1521
1669
  }
1522
1670
  function te(e) {
1523
- return Bt(e, x.value, h.value, p.value, m.value);
1671
+ return e.type === "image" || e.type === "video";
1672
+ }
1673
+ function ne(e) {
1674
+ return e.type === "audio";
1675
+ }
1676
+ function re(e) {
1677
+ return Xt(e, S.value, g.value, m.value, h.value);
1524
1678
  }
1525
1679
  return {
1526
- activeItem: S,
1527
- activeAssetErrorKind: w.activeAssetErrorKind,
1528
- activeMediaDuration: w.activeMediaDuration,
1529
- activeMediaItem: C,
1530
- activeMediaProgress: w.activeMediaProgress,
1531
- activeMediaState: w.activeMediaState,
1532
- canRetryAsset: w.canRetryAsset,
1533
- canRetryInitialLoad: d,
1680
+ activeItem: C,
1681
+ activeAssetErrorKind: E.activeAssetErrorKind,
1682
+ activeMediaDuration: E.activeMediaDuration,
1683
+ activeMediaItem: w,
1684
+ activeMediaProgress: E.activeMediaProgress,
1685
+ activeMediaState: E.activeMediaState,
1686
+ canRetryAsset: E.canRetryAsset,
1687
+ canRetryInitialLoad: f,
1534
1688
  errorMessage: o,
1535
- getAssetErrorKind: w.getAssetErrorKind,
1536
- getAssetErrorLabel: w.getAssetErrorLabel,
1537
- getAssetRenderKey: w.getAssetRenderKey,
1538
- formatPlaybackTime: bt,
1539
- getImageSource: w.getImageSource,
1540
- getSlideStyle: te,
1689
+ getAssetErrorKind: E.getAssetErrorKind,
1690
+ getAssetErrorLabel: E.getAssetErrorLabel,
1691
+ getAssetRenderKey: E.getAssetRenderKey,
1692
+ formatPlaybackTime: At,
1693
+ getImageSource: E.getImageSource,
1694
+ getSlideStyle: re,
1541
1695
  hasNextPage: c,
1542
- isAtEnd: E,
1543
- isAudio: ee,
1544
- isVisual: Y,
1696
+ isAtEnd: D,
1697
+ isAudio: ne,
1698
+ isVisual: te,
1545
1699
  items: r,
1546
1700
  loading: s,
1547
- mediaStates: w.mediaStates,
1548
- isImageReady: w.isImageReady,
1549
- isMediaReady: w.isMediaReady,
1550
- onAudioCoverClick: q,
1551
- onImageError: w.onImageError,
1552
- onImageLoad: w.onImageLoad,
1553
- onMediaEvent: w.onMediaEvent,
1554
- onMediaError: w.onMediaError,
1555
- onMediaSeekInput: J,
1556
- onPointerCancel: V,
1557
- onPointerDown: R,
1558
- onPointerMove: z,
1559
- onPointerUp: B,
1560
- onVideoClick: K,
1561
- onWheel: W,
1562
- registerAudioElement: w.registerAudioElement,
1563
- registerImageElement: w.registerImageElement,
1564
- registerVideoElement: w.registerVideoElement,
1565
- renderedItems: M,
1566
- renderedRange: j,
1567
- resolvedActiveIndex: x,
1701
+ mediaStates: E.mediaStates,
1702
+ isImageReady: E.isImageReady,
1703
+ isMediaReady: E.isMediaReady,
1704
+ onAudioCoverClick: J,
1705
+ onImageError: E.onImageError,
1706
+ onImageLoad: E.onImageLoad,
1707
+ onMediaEvent: E.onMediaEvent,
1708
+ onMediaError: E.onMediaError,
1709
+ onMediaSeekInput: Y,
1710
+ onMediaVolumeInput: ee,
1711
+ onMediaVolumeToggle: X,
1712
+ onPointerCancel: H,
1713
+ onPointerDown: z,
1714
+ onPointerMove: B,
1715
+ onPointerUp: V,
1716
+ onVideoClick: q,
1717
+ onWheel: G,
1718
+ registerAudioElement: E.registerAudioElement,
1719
+ registerImageElement: E.registerImageElement,
1720
+ registerVideoElement: E.registerVideoElement,
1721
+ renderedItems: N,
1722
+ renderedRange: M,
1723
+ resolvedActiveIndex: S,
1568
1724
  retryInitialLoad: async () => {},
1569
- retryAsset: w.retryAsset,
1570
- stageRef: f,
1571
- statusKind: O,
1572
- statusMessage: k,
1573
- paginationDetail: l,
1574
- phase: u
1725
+ retryAsset: E.retryAsset,
1726
+ stageRef: p,
1727
+ statusKind: k,
1728
+ statusMessage: A,
1729
+ paginationDetail: u,
1730
+ phase: d
1575
1731
  };
1576
1732
  }
1577
1733
  //#endregion
1578
1734
  //#region src/components/viewer-core/theme.ts
1579
- var Ht = {
1580
- image: "bg-[radial-gradient(circle_at_top_center,rgba(251,191,36,0.4)_0,transparent_42%),linear-gradient(180deg,#120d08,#050507)]",
1581
- video: "bg-[radial-gradient(circle_at_top_center,rgba(56,189,248,0.38)_0,transparent_42%),linear-gradient(180deg,#07111c,#050608)]",
1582
- audio: "bg-[radial-gradient(circle_at_top_center,rgba(16,185,129,0.32)_0,transparent_42%),linear-gradient(180deg,#06120f,#040506)]",
1583
- other: "bg-[radial-gradient(circle_at_top_center,rgba(148,163,184,0.28)_0,transparent_42%),linear-gradient(180deg,#0d0c10,#040506)]"
1584
- }, Ut = {
1585
- image: "bg-[radial-gradient(circle_at_center,rgba(251,191,36,0.4)_0,transparent_42%),linear-gradient(180deg,#120d08,#050507)]",
1586
- video: "bg-[radial-gradient(circle_at_center,rgba(56,189,248,0.38)_0,transparent_42%),linear-gradient(180deg,#07111c,#050608)]",
1587
- audio: "bg-[radial-gradient(circle_at_center,rgba(16,185,129,0.32)_0,transparent_42%),linear-gradient(180deg,#06120f,#040506)]",
1588
- other: "bg-[radial-gradient(circle_at_center,rgba(148,163,184,0.28)_0,transparent_42%),linear-gradient(180deg,#0d0c10,#040506)]"
1735
+ var Qt = "bg-[linear-gradient(180deg,#0a0b10,#05060a)]", $t = "bg-[linear-gradient(180deg,#0b0c11,#06070b)]", en = {
1736
+ image: !0,
1737
+ video: !0,
1738
+ audio: !0,
1739
+ other: !0
1589
1740
  };
1590
- function Wt(e) {
1591
- return Ht[e];
1741
+ function tn(e) {
1742
+ return en[e], Qt;
1592
1743
  }
1593
- function Gt(e) {
1594
- return Ut[e];
1744
+ function nn(e) {
1745
+ return en[e], $t;
1746
+ }
1747
+ //#endregion
1748
+ //#region src/components/viewer-core/dominantImageTone.ts
1749
+ function rn(e) {
1750
+ if (e.naturalWidth <= 0 || e.naturalHeight <= 0) return null;
1751
+ let t = document.createElement("canvas"), n = t.getContext("2d", { willReadFrequently: !0 });
1752
+ if (!n) return null;
1753
+ t.width = 24, t.height = 24;
1754
+ try {
1755
+ n.drawImage(e, 0, 0, 24, 24);
1756
+ let { data: t } = n.getImageData(0, 0, 24, 24), r = 0, i = 0, a = 0, o = 0;
1757
+ for (let e = 0; e < t.length; e += 4) {
1758
+ let n = t[e + 3] / 255;
1759
+ if (n <= .05) continue;
1760
+ let s = t[e], c = t[e + 1], l = t[e + 2], u = Math.max(s, c, l), d = n * (.65 + (u === 0 ? 0 : (u - Math.min(s, c, l)) / u) * .7);
1761
+ r += d, i += s * d, a += c * d, o += l * d;
1762
+ }
1763
+ return r <= 0 ? null : {
1764
+ r: an(Math.round(i / r)),
1765
+ g: an(Math.round(a / r)),
1766
+ b: an(Math.round(o / r))
1767
+ };
1768
+ } catch {
1769
+ return null;
1770
+ }
1771
+ }
1772
+ function an(e) {
1773
+ return Math.min(235, Math.max(26, e));
1774
+ }
1775
+ //#endregion
1776
+ //#region src/components/viewer-core/useFullscreenDominantTone.ts
1777
+ function on(e) {
1778
+ 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(() => {
1779
+ if (!r.value) return;
1780
+ let { r: e, g: t, b: n } = r.value;
1781
+ return { background: `radial-gradient(circle at top center, rgba(${e},${t},${n},0.34) 0%, transparent 44%), linear-gradient(180deg,#0a0b10,#05060a)` };
1782
+ }), o = i(() => {
1783
+ if (!r.value) return;
1784
+ let { r: e, g: t, b: n } = r.value;
1785
+ return { background: `radial-gradient(circle at center, rgba(${e},${t},${n},0.42) 0%, transparent 44%), linear-gradient(180deg,#0b0c11,#06070b)` };
1786
+ });
1787
+ F(() => e.showDominantImageTone.value, (e) => {
1788
+ e || (t.value = {});
1789
+ });
1790
+ function s(n, r) {
1791
+ if (!e.showDominantImageTone.value) return;
1792
+ let i = rn(r);
1793
+ i && (t.value[n] = i);
1794
+ }
1795
+ return {
1796
+ activeStageToneStyle: a,
1797
+ activeSlideToneStyle: o,
1798
+ updateFromImageElement: s
1799
+ };
1595
1800
  }
1596
1801
  //#endregion
1597
1802
  //#region src/components/SurfaceEmptyState.vue?vue&type=script&setup=true&lang.ts
1598
- var Kt = ["data-surface"], qt = ["data-surface"], Jt = /* @__PURE__ */ d({
1803
+ var sn = ["data-surface"], cn = ["data-surface"], ln = /* @__PURE__ */ d({
1599
1804
  inheritAttrs: !1,
1600
1805
  __name: "SurfaceEmptyState",
1601
1806
  props: {
@@ -1609,31 +1814,32 @@ var Kt = ["data-surface"], qt = ["data-surface"], Jt = /* @__PURE__ */ d({
1609
1814
  "data-testid": "vibe-empty-state-inline",
1610
1815
  "data-surface": e.surface,
1611
1816
  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)]"]
1612
- }), [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, Kt)) : (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", {
1817
+ }), [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, sn)) : (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", {
1613
1818
  "data-testid": "vibe-empty-state-badge",
1614
1819
  "data-surface": e.surface,
1615
1820
  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"])
1616
- }, k(e.message), 11, qt)])], 16));
1821
+ }, k(e.message), 11, cn)])], 16));
1617
1822
  }
1618
- }), Yt = { class: "relative h-full min-h-0 overflow-hidden bg-[#05060a] text-[#f7f1ea]" }, Xt = {
1823
+ }), un = { class: "relative h-full min-h-0 overflow-hidden bg-[#05060a] text-[#f7f1ea]" }, dn = {
1619
1824
  key: 0,
1620
1825
  class: "relative h-full min-h-0"
1621
- }, Zt = [
1826
+ }, fn = [
1622
1827
  "data-item-id",
1623
1828
  "data-occurrence-key",
1624
1829
  "data-index",
1625
1830
  "data-active",
1626
1831
  "aria-hidden"
1627
- ], Qt = {
1832
+ ], pn = {
1628
1833
  key: 0,
1629
1834
  "data-testid": "vibe-asset-spinner",
1630
1835
  class: "pointer-events-none absolute inset-0 z-[2] grid place-items-center"
1631
- }, $t = { 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]" }, en = ["data-kind"], tn = { class: "grid justify-items-center gap-4 border border-white/14 bg-black/45 px-8 py-7 text-center backdrop-blur-[18px]" }, nn = { class: "m-0 text-[0.82rem] font-bold uppercase tracking-[0.28em] text-[#f7f1ea]/70" }, rn = ["onClick"], an = [
1836
+ }, mn = { 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]" }, hn = ["data-kind"], gn = { class: "grid justify-items-center gap-4 border border-white/14 bg-black/45 px-8 py-7 text-center backdrop-blur-[18px]" }, _n = { class: "m-0 text-[0.82rem] font-bold uppercase tracking-[0.28em] text-[#f7f1ea]/70" }, vn = ["onClick"], yn = [
1632
1837
  "src",
1633
1838
  "alt",
1634
1839
  "onLoad",
1635
1840
  "onError"
1636
- ], on = [
1841
+ ], bn = [
1842
+ "loop",
1637
1843
  "src",
1638
1844
  "preload",
1639
1845
  "onClick",
@@ -1650,15 +1856,15 @@ var Kt = ["data-surface"], qt = ["data-surface"], Jt = /* @__PURE__ */ d({
1650
1856
  "onStalled",
1651
1857
  "onTimeupdate",
1652
1858
  "onWaiting"
1653
- ], sn = { class: "relative grid aspect-square w-[clamp(320px,46vw,560px)] max-w-[calc(100vw-2.5rem)] place-items-center" }, cn = [
1859
+ ], xn = { class: "relative grid aspect-square w-[clamp(320px,46vw,560px)] max-w-[calc(100vw-2.5rem)] place-items-center" }, Sn = [
1654
1860
  "aria-label",
1655
1861
  "disabled",
1656
1862
  "onClick"
1657
- ], 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]" }, un = { 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]" }, dn = {
1863
+ ], Cn = { 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]" }, wn = { 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]" }, Tn = {
1658
1864
  key: 0,
1659
1865
  "data-testid": "vibe-asset-spinner",
1660
1866
  class: "pointer-events-none absolute inset-0 z-[3] grid place-items-center"
1661
- }, fn = { 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]" }, pn = ["data-kind"], mn = { class: "m-0 text-[0.82rem] font-bold uppercase tracking-[0.28em] text-[#f7f1ea]/70" }, hn = ["onClick"], gn = [
1867
+ }, En = { 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]" }, Dn = ["data-kind"], On = { class: "m-0 text-[0.82rem] font-bold uppercase tracking-[0.28em] text-[#f7f1ea]/70" }, kn = ["onClick"], An = [
1662
1868
  "src",
1663
1869
  "preload",
1664
1870
  "onCanplay",
@@ -1674,25 +1880,25 @@ var Kt = ["data-surface"], qt = ["data-surface"], Jt = /* @__PURE__ */ d({
1674
1880
  "onStalled",
1675
1881
  "onTimeupdate",
1676
1882
  "onWaiting"
1677
- ], _n = {
1883
+ ], jn = {
1678
1884
  key: 2,
1679
1885
  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"
1680
- }, vn = { 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]" }, yn = {
1886
+ }, Mn = { 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]" }, Nn = {
1681
1887
  key: 0,
1682
1888
  class: "pointer-events-none absolute inset-0 z-[4]"
1683
- }, bn = { class: "h-full w-full" }, xn = {
1889
+ }, Pn = { class: "h-full w-full" }, Fn = {
1684
1890
  key: 1,
1685
1891
  "data-testid": "vibe-forward-fill-placeholder",
1686
1892
  class: "grid h-full min-h-0 place-items-center px-6 text-center"
1687
- }, Sn = { class: "grid justify-items-center gap-4 border border-white/14 bg-black/40 px-8 py-7 backdrop-blur-[18px]" }, Cn = { 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)]" }, wn = { class: "m-0 text-[0.78rem] font-bold uppercase tracking-[0.24em] text-[#f7f1ea]/72" }, Tn = {
1893
+ }, In = { class: "grid justify-items-center gap-4 border border-white/14 bg-black/40 px-8 py-7 backdrop-blur-[18px]" }, Ln = { 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)]" }, Rn = { class: "m-0 text-[0.78rem] font-bold uppercase tracking-[0.24em] text-[#f7f1ea]/72" }, zn = {
1688
1894
  key: 0,
1689
1895
  "data-testid": "vibe-fullscreen-aside",
1690
1896
  class: "h-full min-h-0 overflow-hidden border-l border-white/10 bg-black/45 backdrop-blur-[18px]"
1691
- }, En = { class: "h-full min-h-0 overflow-y-auto overscroll-y-contain" }, Dn = {
1897
+ }, Bn = { class: "h-full min-h-0 overflow-y-auto overscroll-y-contain" }, Vn = {
1692
1898
  key: 0,
1693
1899
  "data-testid": "vibe-fullscreen-aside",
1694
1900
  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]"
1695
- }, On = { class: "h-full min-h-0 overflow-y-auto overscroll-y-contain" }, kn = 1280, An = /* @__PURE__ */ d({
1901
+ }, Hn = { class: "h-full min-h-0 overflow-y-auto overscroll-y-contain" }, Un = 1280, Wn = 768, Gn = /* @__PURE__ */ d({
1696
1902
  __name: "FullscreenSurface",
1697
1903
  props: {
1698
1904
  active: {
@@ -1711,6 +1917,10 @@ var Kt = ["data-surface"], qt = ["data-surface"], Jt = /* @__PURE__ */ d({
1711
1917
  type: Boolean,
1712
1918
  default: !1
1713
1919
  },
1920
+ loopFullscreenVideo: {
1921
+ type: Boolean,
1922
+ default: !0
1923
+ },
1714
1924
  paginationDetail: { default: null },
1715
1925
  phase: { default: null },
1716
1926
  reportAssetError: {
@@ -1721,6 +1931,10 @@ var Kt = ["data-surface"], qt = ["data-surface"], Jt = /* @__PURE__ */ d({
1721
1931
  type: [Function, null],
1722
1932
  default: null
1723
1933
  },
1934
+ showDominantImageTone: {
1935
+ type: Boolean,
1936
+ default: !0
1937
+ },
1724
1938
  showBackToList: {
1725
1939
  type: Boolean,
1726
1940
  default: !1
@@ -1736,17 +1950,22 @@ var Kt = ["data-surface"], qt = ["data-surface"], Jt = /* @__PURE__ */ d({
1736
1950
  },
1737
1951
  emits: ["back-to-list", "update:activeIndex"],
1738
1952
  setup(e, { emit: n }) {
1739
- let d = e, p = N(), m = n, g = Vt(d, (e, t) => {
1953
+ let d = e, p = N(), m = n, g = Zt(d, (e, t) => {
1740
1954
  m("update:activeIndex", t);
1741
1955
  }, {
1742
1956
  enabled: A(d, "active"),
1743
1957
  onAssetError: d.reportAssetError ?? void 0,
1744
1958
  onAssetLoad: d.reportAssetLoad ?? void 0
1745
- }), C = T(typeof window > "u" ? kn : window.innerWidth || kn), w = ht({
1959
+ }), C = T(typeof window > "u" ? Un : window.innerWidth || Un), w = Tt({
1746
1960
  active: A(d, "active"),
1747
1961
  resolvedActiveIndex: g.resolvedActiveIndex,
1748
1962
  viewer: g
1749
- }), M = i(() => Wt(g.activeItem.value?.type ?? "image")), P = i(() => g.activeMediaItem.value && !g.activeAssetErrorKind.value ? "bottom-[5.8rem] max-[720px]:bottom-[7.4rem]" : "bottom-[1.8rem] max-[720px]:bottom-[1.3rem]"), F = i(() => !!g.activeMediaItem.value && !g.activeAssetErrorKind.value), I = i(() => F.value ? "pb-[5.75rem] max-[720px]:pb-[7rem]" : ""), R = i(() => d.activeIndex >= d.items.length && (d.loading || d.hasNextPage)), B = i(() => d.hasNextPage ? "Loading more items" : g.statusMessage.value ?? "Loading more items"), V = i(() => {
1963
+ }), M = i(() => tn(g.activeItem.value?.type ?? "image")), { activeSlideToneStyle: P, activeStageToneStyle: F, updateFromImageElement: I } = on({
1964
+ activeItem: g.activeItem,
1965
+ getItemKey: w.getItemKey,
1966
+ isImageReady: g.isImageReady,
1967
+ showDominantImageTone: A(d, "showDominantImageTone")
1968
+ }), 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), V = i(() => C.value < Wn ? "vertical" : "horizontal"), H = i(() => B.value ? "pb-[5.75rem] max-[720px]:pb-[7rem]" : ""), U = i(() => d.activeIndex >= d.items.length && (d.loading || d.hasNextPage)), W = i(() => d.hasNextPage ? "Loading more items" : g.statusMessage.value ?? "Loading more items"), G = i(() => {
1750
1969
  let e = g.activeItem.value;
1751
1970
  return e ? {
1752
1971
  hasNextPage: d.hasNextPage,
@@ -1756,14 +1975,14 @@ var Kt = ["data-surface"], qt = ["data-surface"], Jt = /* @__PURE__ */ d({
1756
1975
  paginationDetail: d.paginationDetail,
1757
1976
  total: d.items.length
1758
1977
  } : null;
1759
- }), H = i(() => !V.value || !p["fullscreen-header-actions"] ? [] : p["fullscreen-header-actions"](V.value)), U = i(() => !V.value || !p["fullscreen-aside"] ? [] : p["fullscreen-aside"](V.value)), W = i(() => !d.showStatusBadges || !V.value || !g.statusKind.value || !g.statusMessage.value ? null : {
1760
- ...V.value,
1978
+ }), K = i(() => !G.value || !p["fullscreen-header-actions"] ? [] : p["fullscreen-header-actions"](G.value)), q = i(() => !G.value || !p["fullscreen-aside"] ? [] : p["fullscreen-aside"](G.value)), J = i(() => !d.showStatusBadges || !G.value || !g.statusKind.value || !g.statusMessage.value ? null : {
1979
+ ...G.value,
1761
1980
  kind: g.statusKind.value,
1762
1981
  message: g.statusMessage.value
1763
- }), G = i(() => !W.value || !p["fullscreen-status"] ? [] : p["fullscreen-status"](W.value)), K = i(() => ({
1764
- gridTemplateColumns: Y.value ? "minmax(0, 1fr) 22rem" : "minmax(0, 1fr) 0rem",
1982
+ }), Y = i(() => !J.value || !p["fullscreen-status"] ? [] : p["fullscreen-status"](J.value)), ee = i(() => ({
1983
+ gridTemplateColumns: ne.value ? "minmax(0, 1fr) 22rem" : "minmax(0, 1fr) 0rem",
1765
1984
  transition: "grid-template-columns 320ms cubic-bezier(0.22, 1, 0.36, 1)"
1766
- })), q = i(() => gt(H.value)), J = i(() => gt(U.value)), Y = i(() => J.value && C.value >= kn), ee = i(() => J.value && !Y.value), te = i(() => gt(G.value)), { emptyStateProps: X, showBadgeEmptyState: ne, showCustomEmptyState: se, showInlineEmptyState: ce } = yt({
1985
+ })), X = i(() => Et(K.value)), te = i(() => Et(q.value)), ne = i(() => te.value && C.value >= Un), se = i(() => te.value && !ne.value), ce = i(() => Et(Y.value)), { emptyStateProps: Z, showBadgeEmptyState: le, showCustomEmptyState: ue, showInlineEmptyState: de } = kt({
1767
1986
  emptyStateMode: A(d, "emptyStateMode"),
1768
1987
  itemCount: i(() => d.items.length),
1769
1988
  loading: A(d, "loading"),
@@ -1771,18 +1990,32 @@ var Kt = ["data-surface"], qt = ["data-surface"], Jt = /* @__PURE__ */ d({
1771
1990
  surface: "fullscreen"
1772
1991
  });
1773
1992
  x(() => {
1774
- window.addEventListener("resize", le);
1993
+ window.addEventListener("resize", Q);
1775
1994
  }), b(() => {
1776
- window.removeEventListener("resize", le);
1995
+ window.removeEventListener("resize", Q);
1777
1996
  });
1778
- function le() {
1779
- C.value = window.innerWidth || kn;
1997
+ function Q() {
1998
+ C.value = window.innerWidth || Un;
1999
+ }
2000
+ function fe(e, t, n) {
2001
+ g.onImageLoad(t, n);
2002
+ let r = e.currentTarget;
2003
+ r instanceof HTMLImageElement && me(t, r);
2004
+ }
2005
+ function pe(e, t) {
2006
+ g.registerImageElement(e, t), t instanceof HTMLImageElement && me(e, t);
1780
2007
  }
1781
- return (e, n) => (S(), s("div", Yt, [
1782
- c("div", { class: _(["absolute inset-0 transition-[background] duration-200", M.value]) }, null, 2),
2008
+ function me(e, t) {
2009
+ I(e, t);
2010
+ }
2011
+ return (e, n) => (S(), s("div", un, [
2012
+ c("div", {
2013
+ class: _(["absolute inset-0 transition-[background] duration-200", M.value]),
2014
+ style: y(j(F))
2015
+ }, null, 6),
1783
2016
  c("div", {
1784
2017
  class: "relative z-[1] grid h-full min-h-0",
1785
- style: y(K.value)
2018
+ style: y(ee.value)
1786
2019
  }, [c("div", {
1787
2020
  ref: "viewer.stageRef",
1788
2021
  "data-testid": "vibe-stage",
@@ -1792,7 +2025,7 @@ var Kt = ["data-surface"], qt = ["data-surface"], Jt = /* @__PURE__ */ d({
1792
2025
  onPointerup: n[3] ||= (...e) => j(g).onPointerUp && j(g).onPointerUp(...e),
1793
2026
  onPointercancel: n[4] ||= (...e) => j(g).onPointerCancel && j(g).onPointerCancel(...e),
1794
2027
  onWheel: n[5] ||= (...e) => j(g).onWheel && j(g).onWheel(...e)
1795
- }, [j(g).activeItem.value ? (S(), s("div", Xt, [
2028
+ }, [j(g).activeItem.value ? (S(), s("div", dn, [
1796
2029
  (S(!0), s(t, null, E(j(g).renderedItems.value, ({ item: r, index: i }) => (S(), s("article", {
1797
2030
  key: j(w).getItemKey(r),
1798
2031
  "data-testid": "vibe-slide",
@@ -1803,10 +2036,13 @@ var Kt = ["data-surface"], qt = ["data-surface"], Jt = /* @__PURE__ */ d({
1803
2036
  "aria-hidden": i === j(g).resolvedActiveIndex.value ? "false" : "true",
1804
2037
  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"]),
1805
2038
  style: y(j(g).getSlideStyle(i))
1806
- }, [c("div", { class: _(["absolute inset-0 opacity-85", j(Gt)(r.type)]) }, null, 2), j(g).isVisual(r) ? (S(), s("div", {
2039
+ }, [c("div", {
2040
+ class: _(["absolute inset-0 opacity-85", j(nn)(r.type)]),
2041
+ style: y(i === j(g).resolvedActiveIndex.value && r.type === "image" ? j(P) : void 0)
2042
+ }, null, 6), j(g).isVisual(r) ? (S(), s("div", {
1807
2043
  key: 0,
1808
- class: _(["relative z-[1] flex h-full w-full items-center justify-center overflow-hidden", i === j(g).resolvedActiveIndex.value ? I.value : ""])
1809
- }, [j(w).isAssetLoading(i, r) ? (S(), s("div", Qt, [c("span", $t, [u(j(re), {
2044
+ class: _(["relative z-[1] flex h-full w-full items-center justify-center overflow-hidden", i === j(g).resolvedActiveIndex.value ? H.value : ""])
2045
+ }, [j(w).isAssetLoading(i, r) ? (S(), s("div", pn, [c("span", mn, [u(j(re), {
1810
2046
  class: "h-5 w-5 animate-spin stroke-[1.9] text-[#f7f1ea]/78",
1811
2047
  "aria-hidden": "true"
1812
2048
  })])])) : o("", !0), j(w).isAssetErrored(i, r) ? (S(), s("div", {
@@ -1814,33 +2050,34 @@ var Kt = ["data-surface"], qt = ["data-surface"], Jt = /* @__PURE__ */ d({
1814
2050
  "data-testid": "vibe-asset-error",
1815
2051
  "data-kind": j(w).getAssetErrorKind(r),
1816
2052
  class: "grid h-full w-full place-items-center"
1817
- }, [c("div", tn, [
2053
+ }, [c("div", gn, [
1818
2054
  u(j(oe), {
1819
2055
  class: "h-7 w-7 stroke-[1.9] text-[#f7f1ea]/72",
1820
2056
  "aria-hidden": "true"
1821
2057
  }),
1822
- c("p", nn, k(j(w).getAssetErrorLabel(r)), 1),
2058
+ c("p", _n, k(j(w).getAssetErrorLabel(r)), 1),
1823
2059
  j(g).canRetryAsset(j(w).getItemKey(r)) ? (S(), s("button", {
1824
2060
  key: 0,
1825
2061
  type: "button",
1826
2062
  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",
1827
2063
  onClick: z((e) => j(g).retryAsset(j(w).getItemKey(r)), ["stop"])
1828
- }, " Retry ", 8, rn)) : o("", !0)
1829
- ])], 8, en)) : r.type === "image" ? (S(), s("img", {
2064
+ }, " Retry ", 8, vn)) : o("", !0)
2065
+ ])], 8, hn)) : r.type === "image" ? (S(), s("img", {
1830
2066
  key: j(g).getAssetRenderKey(j(w).getItemKey(r)),
1831
2067
  src: j(w).getFullscreenImageSource(i, r),
1832
2068
  alt: r.title ?? "",
2069
+ crossorigin: "anonymous",
1833
2070
  draggable: "false",
1834
2071
  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"]),
1835
2072
  ref_for: !0,
1836
- ref: (e) => j(g).registerImageElement(j(w).getItemKey(r), e),
1837
- onLoad: (e) => j(g).onImageLoad(j(w).getItemKey(r), r.url),
2073
+ ref: (e) => pe(j(w).getItemKey(r), e),
2074
+ onLoad: (e) => fe(e, j(w).getItemKey(r), r.url),
1838
2075
  onError: (e) => j(g).onImageError(j(w).getItemKey(r), r.url)
1839
- }, null, 42, an)) : (S(), s("video", {
2076
+ }, null, 42, yn)) : (S(), s("video", {
1840
2077
  key: j(g).getAssetRenderKey(j(w).getItemKey(r)),
1841
2078
  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"]),
1842
2079
  playsinline: "",
1843
- muted: "",
2080
+ loop: d.loopFullscreenVideo,
1844
2081
  src: j(w).getFullscreenMediaSource(i, r),
1845
2082
  preload: j(w).shouldPreloadSlideAsset(i) ? "metadata" : "none",
1846
2083
  ref_for: !0,
@@ -1859,10 +2096,10 @@ var Kt = ["data-surface"], qt = ["data-surface"], Jt = /* @__PURE__ */ d({
1859
2096
  onStalled: (e) => j(g).onMediaEvent(j(w).getItemKey(r), e),
1860
2097
  onTimeupdate: (e) => j(g).onMediaEvent(j(w).getItemKey(r), e),
1861
2098
  onWaiting: (e) => j(g).onMediaEvent(j(w).getItemKey(r), e)
1862
- }, null, 42, on))], 2)) : j(g).isAudio(r) ? (S(), s("div", {
2099
+ }, null, 42, bn))], 2)) : j(g).isAudio(r) ? (S(), s("div", {
1863
2100
  key: 1,
1864
- 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 ? I.value : ""])
1865
- }, [c("div", sn, [
2101
+ 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 ? H.value : ""])
2102
+ }, [c("div", xn, [
1866
2103
  c("button", {
1867
2104
  type: "button",
1868
2105
  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]",
@@ -1872,19 +2109,19 @@ var Kt = ["data-surface"], qt = ["data-surface"], Jt = /* @__PURE__ */ d({
1872
2109
  }, [
1873
2110
  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),
1874
2111
  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),
1875
- c("span", ln, [D(e.$slots, "item-icon", {
1876
- icon: j(ft)(r.type),
2112
+ c("span", Cn, [D(e.$slots, "item-icon", {
2113
+ icon: j(St)(r.type),
1877
2114
  item: r
1878
- }, () => [(S(), a(O(j(ft)(r.type)), {
2115
+ }, () => [(S(), a(O(j(St)(r.type)), {
1879
2116
  class: "h-6 w-6 stroke-[1.9]",
1880
2117
  "aria-hidden": "true"
1881
2118
  }))])]),
1882
- c("span", un, [(S(), a(O(j(g).mediaStates.value[j(w).getItemKey(r)]?.paused ?? !0 ? j(ae) : j(ie)), {
2119
+ c("span", wn, [(S(), a(O(j(g).mediaStates.value[j(w).getItemKey(r)]?.paused ?? !0 ? j(ae) : j(ie)), {
1883
2120
  class: "h-4 w-4 stroke-2",
1884
2121
  "aria-hidden": "true"
1885
2122
  }))])
1886
- ], 8, cn),
1887
- j(w).isAssetLoading(i, r) ? (S(), s("div", dn, [c("span", fn, [u(j(re), {
2123
+ ], 8, Sn),
2124
+ j(w).isAssetLoading(i, r) ? (S(), s("div", Tn, [c("span", En, [u(j(re), {
1888
2125
  class: "h-5 w-5 animate-spin stroke-[1.9] text-[#f7f1ea]/78",
1889
2126
  "aria-hidden": "true"
1890
2127
  })])])) : o("", !0),
@@ -1897,14 +2134,14 @@ var Kt = ["data-surface"], qt = ["data-surface"], Jt = /* @__PURE__ */ d({
1897
2134
  class: "h-7 w-7 stroke-[1.9] text-[#f7f1ea]/72",
1898
2135
  "aria-hidden": "true"
1899
2136
  }),
1900
- c("p", mn, k(j(w).getAssetErrorLabel(r)), 1),
2137
+ c("p", On, k(j(w).getAssetErrorLabel(r)), 1),
1901
2138
  j(g).canRetryAsset(j(w).getItemKey(r)) ? (S(), s("button", {
1902
2139
  key: 0,
1903
2140
  type: "button",
1904
2141
  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",
1905
2142
  onClick: z((e) => j(g).retryAsset(j(w).getItemKey(r)), ["stop"])
1906
- }, " Retry ", 8, hn)) : o("", !0)
1907
- ], 8, pn)], 64)) : o("", !0)
2143
+ }, " Retry ", 8, kn)) : o("", !0)
2144
+ ], 8, Dn)], 64)) : o("", !0)
1908
2145
  ]), (S(), s("audio", {
1909
2146
  key: j(g).getAssetRenderKey(j(w).getItemKey(r)),
1910
2147
  src: j(w).getFullscreenMediaSource(i, r),
@@ -1925,15 +2162,15 @@ var Kt = ["data-surface"], qt = ["data-surface"], Jt = /* @__PURE__ */ d({
1925
2162
  onStalled: (e) => j(g).onMediaEvent(j(w).getItemKey(r), e),
1926
2163
  onTimeupdate: (e) => j(g).onMediaEvent(j(w).getItemKey(r), e),
1927
2164
  onWaiting: (e) => j(g).onMediaEvent(j(w).getItemKey(r), e)
1928
- }, null, 40, gn))], 2)) : (S(), s("div", _n, [c("div", vn, [D(e.$slots, "item-icon", {
1929
- icon: j(ft)(r.type),
2165
+ }, null, 40, An))], 2)) : (S(), s("div", jn, [c("div", Mn, [D(e.$slots, "item-icon", {
2166
+ icon: j(St)(r.type),
1930
2167
  item: r
1931
- }, () => [(S(), a(O(j(ft)(r.type)), {
2168
+ }, () => [(S(), a(O(j(St)(r.type)), {
1932
2169
  class: "h-6 w-6 stroke-[1.9]",
1933
2170
  "aria-hidden": "true"
1934
- }))])])]))], 14, Zt))), 128)),
1935
- V.value && p["fullscreen-overlay"] ? (S(), s("div", yn, [c("div", bn, [D(e.$slots, "fullscreen-overlay", v(f(V.value)))])])) : o("", !0),
1936
- j(g).activeItem.value ? (S(), a(lt, {
2171
+ }))])])]))], 14, fn))), 128)),
2172
+ G.value && p["fullscreen-overlay"] ? (S(), s("div", Nn, [c("div", Pn, [D(e.$slots, "fullscreen-overlay", v(f(G.value)))])])) : o("", !0),
2173
+ j(g).activeItem.value ? (S(), a(yt, {
1937
2174
  key: 1,
1938
2175
  "current-index": j(g).resolvedActiveIndex.value,
1939
2176
  loading: d.loading,
@@ -1943,9 +2180,9 @@ var Kt = ["data-surface"], qt = ["data-surface"], Jt = /* @__PURE__ */ d({
1943
2180
  title: j(g).activeItem.value.title ?? null,
1944
2181
  total: j(g).items.value.length,
1945
2182
  onBackToList: n[0] ||= (e) => m("back-to-list")
1946
- }, l({ _: 2 }, [q.value && V.value ? {
2183
+ }, l({ _: 2 }, [X.value && G.value ? {
1947
2184
  name: "actions",
1948
- fn: L(() => [D(e.$slots, "fullscreen-header-actions", v(f(V.value)))]),
2185
+ fn: L(() => [D(e.$slots, "fullscreen-header-actions", v(f(G.value)))]),
1949
2186
  key: "0"
1950
2187
  } : void 0]), 1032, [
1951
2188
  "current-index",
@@ -1956,52 +2193,62 @@ var Kt = ["data-surface"], qt = ["data-surface"], Jt = /* @__PURE__ */ d({
1956
2193
  "title",
1957
2194
  "total"
1958
2195
  ])) : o("", !0),
1959
- F.value ? (S(), a(Qe, {
2196
+ B.value ? (S(), a(ct, {
1960
2197
  key: 2,
1961
2198
  "current-time": j(g).activeMediaState.value.currentTime,
1962
2199
  "current-time-label": j(g).formatPlaybackTime(j(g).activeMediaState.value.currentTime),
1963
2200
  duration: j(g).activeMediaDuration.value,
1964
2201
  "duration-label": j(g).formatPlaybackTime(j(g).activeMediaDuration.value),
2202
+ muted: j(g).activeMediaState.value.muted,
1965
2203
  progress: j(g).activeMediaProgress.value,
1966
- onSeekInput: j(g).onMediaSeekInput
2204
+ volume: j(g).activeMediaState.value.volume,
2205
+ "volume-control-layout": V.value,
2206
+ onSeekInput: j(g).onMediaSeekInput,
2207
+ onVolumeInput: j(g).onMediaVolumeInput,
2208
+ onVolumeToggle: j(g).onMediaVolumeToggle
1967
2209
  }, null, 8, [
1968
2210
  "current-time",
1969
2211
  "current-time-label",
1970
2212
  "duration",
1971
2213
  "duration-label",
2214
+ "muted",
1972
2215
  "progress",
1973
- "onSeekInput"
2216
+ "volume",
2217
+ "volume-control-layout",
2218
+ "onSeekInput",
2219
+ "onVolumeInput",
2220
+ "onVolumeToggle"
1974
2221
  ])) : o("", !0),
1975
- W.value ? (S(), s("div", {
2222
+ J.value ? (S(), s("div", {
1976
2223
  key: 3,
1977
- class: _(["absolute left-1/2 z-[4] -translate-x-1/2", P.value])
1978
- }, [te.value ? D(e.$slots, "fullscreen-status", v(h({ key: 0 }, W.value))) : (S(), s("div", {
2224
+ class: _(["absolute left-1/2 z-[4] -translate-x-1/2", R.value])
2225
+ }, [ce.value ? D(e.$slots, "fullscreen-status", v(h({ key: 0 }, J.value))) : (S(), s("div", {
1979
2226
  key: 1,
1980
2227
  "data-testid": "vibe-fullscreen-status-badge",
1981
- 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", W.value.kind === "end" ? "border-amber-300/35 text-amber-200" : W.value.kind === "failed" ? "border-rose-400/45 text-rose-100" : ""])
1982
- }, k(W.value.message), 3))], 2)) : o("", !0)
1983
- ])) : R.value ? (S(), s("div", xn, [c("div", Sn, [c("span", Cn, [u(j(re), {
2228
+ 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", J.value.kind === "end" ? "border-amber-300/35 text-amber-200" : J.value.kind === "failed" ? "border-rose-400/45 text-rose-100" : ""])
2229
+ }, k(J.value.message), 3))], 2)) : o("", !0)
2230
+ ])) : U.value ? (S(), s("div", Fn, [c("div", In, [c("span", Ln, [u(j(re), {
1984
2231
  class: "h-5 w-5 animate-spin stroke-[1.9] text-[#f7f1ea]/78",
1985
2232
  "aria-hidden": "true"
1986
- })]), c("p", wn, k(B.value), 1)])])) : j(ce) && j(X) ? (S(), a(Jt, {
2233
+ })]), c("p", Rn, k(W.value), 1)])])) : j(de) && j(Z) ? (S(), a(ln, {
1987
2234
  key: 2,
1988
- message: j(X).message,
1989
- mode: j(X).mode,
1990
- surface: j(X).surface
2235
+ message: j(Z).message,
2236
+ mode: j(Z).mode,
2237
+ surface: j(Z).surface
1991
2238
  }, {
1992
- default: L(() => [j(se) ? D(e.$slots, "empty-state", v(h({ key: 0 }, j(X)))) : o("", !0)]),
2239
+ default: L(() => [j(ue) ? D(e.$slots, "empty-state", v(h({ key: 0 }, j(Z)))) : o("", !0)]),
1993
2240
  _: 3
1994
2241
  }, 8, [
1995
2242
  "message",
1996
2243
  "mode",
1997
2244
  "surface"
1998
- ])) : o("", !0), j(ne) && j(X) ? (S(), a(Jt, {
2245
+ ])) : o("", !0), j(le) && j(Z) ? (S(), a(ln, {
1999
2246
  key: 3,
2000
- message: j(X).message,
2001
- mode: j(X).mode,
2002
- surface: j(X).surface
2247
+ message: j(Z).message,
2248
+ mode: j(Z).mode,
2249
+ surface: j(Z).surface
2003
2250
  }, {
2004
- default: L(() => [j(se) ? D(e.$slots, "empty-state", v(h({ key: 0 }, j(X)))) : o("", !0)]),
2251
+ default: L(() => [j(ue) ? D(e.$slots, "empty-state", v(h({ key: 0 }, j(Z)))) : o("", !0)]),
2005
2252
  _: 3
2006
2253
  }, 8, [
2007
2254
  "message",
@@ -2015,7 +2262,7 @@ var Kt = ["data-surface"], qt = ["data-surface"], Jt = /* @__PURE__ */ d({
2015
2262
  "leave-from-class": "translate-x-0 opacity-100",
2016
2263
  "leave-to-class": "translate-x-full opacity-0"
2017
2264
  }, {
2018
- default: L(() => [Y.value && V.value ? (S(), s("aside", Tn, [c("div", En, [D(e.$slots, "fullscreen-aside", v(f(V.value)))])])) : o("", !0)]),
2265
+ default: L(() => [ne.value && G.value ? (S(), s("aside", zn, [c("div", Bn, [D(e.$slots, "fullscreen-aside", v(f(G.value)))])])) : o("", !0)]),
2019
2266
  _: 3
2020
2267
  })], 4),
2021
2268
  u(r, {
@@ -2026,29 +2273,29 @@ var Kt = ["data-surface"], qt = ["data-surface"], Jt = /* @__PURE__ */ d({
2026
2273
  "leave-from-class": "translate-x-0 opacity-100",
2027
2274
  "leave-to-class": "translate-x-full opacity-0"
2028
2275
  }, {
2029
- default: L(() => [ee.value && V.value ? (S(), s("aside", Dn, [c("div", On, [D(e.$slots, "fullscreen-aside", v(f(V.value)))])])) : o("", !0)]),
2276
+ default: L(() => [se.value && G.value ? (S(), s("aside", Vn, [c("div", Hn, [D(e.$slots, "fullscreen-aside", v(f(G.value)))])])) : o("", !0)]),
2030
2277
  _: 3
2031
2278
  })
2032
2279
  ]));
2033
2280
  }
2034
- }), jn = 1, Mn = .5;
2035
- function Nn(e) {
2281
+ }), Kn = 1, qn = .5;
2282
+ function Jn(e) {
2036
2283
  if (e.type !== "image" && e.type !== "video") return {
2037
- width: jn,
2038
- height: jn,
2284
+ width: Kn,
2285
+ height: Kn,
2039
2286
  source: "fallback"
2040
2287
  };
2041
2288
  let t = e.preview?.width, n = e.preview?.height;
2042
- if (Bn(t) && Bn(n)) {
2043
- let r = Vn(e, t, n);
2289
+ if (tr(t) && tr(n)) {
2290
+ let r = nr(e, t, n);
2044
2291
  return {
2045
2292
  width: r.width,
2046
2293
  height: r.height,
2047
2294
  source: "preview"
2048
2295
  };
2049
2296
  }
2050
- if (Bn(e.width) && Bn(e.height)) {
2051
- let t = Vn(e, e.width, e.height);
2297
+ if (tr(e.width) && tr(e.height)) {
2298
+ let t = nr(e, e.width, e.height);
2052
2299
  return {
2053
2300
  width: t.width,
2054
2301
  height: t.height,
@@ -2056,31 +2303,31 @@ function Nn(e) {
2056
2303
  };
2057
2304
  }
2058
2305
  return {
2059
- width: jn,
2060
- height: jn,
2306
+ width: Kn,
2307
+ height: Kn,
2061
2308
  source: "fallback"
2062
2309
  };
2063
2310
  }
2064
- function Pn(e, t) {
2311
+ function Yn(e, t) {
2065
2312
  return !e || e <= 0 || !t || t <= 0 ? 1 : Math.max(1, Math.floor(e / t));
2066
2313
  }
2067
- function Fn(e, t, n, r = 0) {
2314
+ function Xn(e, t, n, r = 0) {
2068
2315
  if (!e || e <= 0 || !t || t <= 0) return n;
2069
2316
  let i = typeof r == "number" && r > 0 ? r : 0, a = e - Math.max(0, t - 1) * i;
2070
2317
  return !a || a <= 0 ? n : a / t;
2071
2318
  }
2072
- function In(e, t) {
2073
- let n = Nn(e);
2319
+ function Zn(e, t) {
2320
+ let n = Jn(e);
2074
2321
  return n.height / n.width * t;
2075
2322
  }
2076
- function Ln(e, t) {
2323
+ function Qn(e, t) {
2077
2324
  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;
2078
2325
  for (let c = 0; c < e.length; c += 1) {
2079
2326
  let l = e[c];
2080
- o.set(Q(l), c);
2327
+ o.set($(l), c);
2081
2328
  let u = 0;
2082
2329
  for (let e = 1; e < n.length; e += 1) n[e] < n[u] && (u = e);
2083
- let d = u * (t.columnWidth + t.gapX), f = n[u], p = In(l, t.columnWidth);
2330
+ let d = u * (t.columnWidth + t.gapX), f = n[u], p = Zn(l, t.columnWidth);
2084
2331
  r[c] = {
2085
2332
  x: d,
2086
2333
  y: f
@@ -2099,7 +2346,7 @@ function Ln(e, t) {
2099
2346
  indexById: o
2100
2347
  };
2101
2348
  }
2102
- function Rn(e) {
2349
+ function $n(e) {
2103
2350
  if (e.itemCount <= 0) return [];
2104
2351
  if (e.viewportHeight <= 0) return Array.from({ length: e.itemCount }, (e, t) => t);
2105
2352
  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();
@@ -2109,21 +2356,21 @@ function Rn(e) {
2109
2356
  }
2110
2357
  return Array.from(a).sort((e, t) => e - t);
2111
2358
  }
2112
- function zn(e, t, n) {
2359
+ function er(e, t, n) {
2113
2360
  let r = /* @__PURE__ */ new Map();
2114
2361
  for (let i of e) {
2115
- let e = t.get(Q(i));
2362
+ let e = t.get($(i));
2116
2363
  if (e == null) continue;
2117
2364
  let a = n[e];
2118
- a && r.set(Q(i), a);
2365
+ a && r.set($(i), a);
2119
2366
  }
2120
2367
  return r;
2121
2368
  }
2122
- function Bn(e) {
2369
+ function tr(e) {
2123
2370
  return typeof e == "number" && Number.isFinite(e) && e > 0;
2124
2371
  }
2125
- function Vn(e, t, n) {
2126
- return e.type !== "image" || n / t >= Mn ? {
2372
+ function nr(e, t, n) {
2373
+ return e.type !== "image" || n / t >= qn ? {
2127
2374
  width: t,
2128
2375
  height: n
2129
2376
  } : {
@@ -2133,46 +2380,46 @@ function Vn(e, t, n) {
2133
2380
  }
2134
2381
  //#endregion
2135
2382
  //#region src/components/viewer-core/useMasonryMotion.ts
2136
- var Hn = 300, Un = 600, Wn = 40, Gn = 300, Kn = 400;
2137
- function qn(e, t) {
2383
+ var rr = 300, ir = 600, ar = 40, or = 300, sr = 400;
2384
+ function cr(e, t) {
2138
2385
  return t === "top" ? [...e].reverse() : e;
2139
2386
  }
2140
- function Jn(e) {
2141
- return e <= 0 ? Un : Un + Math.min((e - 1) * Wn, Kn);
2387
+ function lr(e) {
2388
+ return e <= 0 ? ir : ir + Math.min((e - 1) * ar, sr);
2142
2389
  }
2143
- function Yn() {
2144
- return Gn;
2390
+ function ur() {
2391
+ return or;
2145
2392
  }
2146
- function Xn(e) {
2393
+ function dr(e) {
2147
2394
  let t = e.itemHeight > 0 ? e.itemHeight : e.columnWidth;
2148
2395
  return e.direction === "top" ? e.scrollTop - t : e.scrollTop + e.viewportHeight + t;
2149
2396
  }
2150
- function Zn(e) {
2397
+ function fr(e) {
2151
2398
  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()));
2152
2399
  F(e.visibleIndices, (i) => {
2153
2400
  if (!i.length) return;
2154
2401
  let o = [];
2155
2402
  for (let n of i) {
2156
- let r = e.items.value[n] ? Q(e.items.value[n]) : null;
2403
+ let r = e.items.value[n] ? $(e.items.value[n]) : null;
2157
2404
  !r || !t.value.has(r) || d.has(r) || (d.add(r), o.push(r));
2158
2405
  }
2159
2406
  if (!o.length) return;
2160
- let s = qn(o, a.value.get(o[0]) ?? "bottom"), c = new Map(r.value);
2161
- for (let e = 0; e < s.length; e += 1) c.set(s[e], Math.min(e * Wn, Kn));
2162
- r.value = c, Qn(() => {
2407
+ let s = cr(o, a.value.get(o[0]) ?? "bottom"), c = new Map(r.value);
2408
+ for (let e = 0; e < s.length; e += 1) c.set(s[e], Math.min(e * ar, sr));
2409
+ r.value = c, pr(() => {
2163
2410
  let e = new Set(n.value);
2164
2411
  for (let t of o) e.add(t);
2165
2412
  n.value = e;
2166
- }), $n(() => {
2413
+ }), mr(() => {
2167
2414
  let e = new Set(t.value);
2168
2415
  for (let t of o) e.delete(t);
2169
2416
  t.value = e, S(() => {
2170
2417
  let e = new Set(n.value), t = new Map(r.value), i = new Map(a.value);
2171
2418
  for (let n of o) e.delete(n), t.delete(n), i.delete(n), d.delete(n);
2172
2419
  n.value = e, r.value = t, a.value = i;
2173
- }, Jn(o.length));
2420
+ }, lr(o.length));
2174
2421
  });
2175
- }, { flush: "post" }), F(() => e.items.value.map((e) => Q(e)), (e) => {
2422
+ }, { flush: "post" }), F(() => e.items.value.map((e) => $(e)), (e) => {
2176
2423
  if (!e.length || !o.value.size) return;
2177
2424
  let t = new Set(e), n = null, r = null;
2178
2425
  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));
@@ -2185,7 +2432,7 @@ function Zn(e) {
2185
2432
  if (!e.length) return;
2186
2433
  let r = new Set(t.value), i = new Map(a.value);
2187
2434
  for (let t of e) {
2188
- let e = Q(t);
2435
+ let e = $(t);
2189
2436
  r.add(e), i.set(e, n);
2190
2437
  }
2191
2438
  t.value = r, a.value = i;
@@ -2194,10 +2441,10 @@ function Zn(e) {
2194
2441
  if (!e.length) return;
2195
2442
  let i = new Map(o.value), c = new Set(t.value), l = new Set(n.value), u = new Map(r.value), f = new Map(a.value), p = [];
2196
2443
  for (let t of e) {
2197
- let e = Q(t.item);
2444
+ let e = $(t.item);
2198
2445
  p.push(e), i.set(e, t), c.delete(e), l.delete(e), u.delete(e), f.delete(e), d.delete(e);
2199
2446
  }
2200
- o.value = i, t.value = c, n.value = l, r.value = u, a.value = f, Qn(() => {
2447
+ o.value = i, t.value = c, n.value = l, r.value = u, a.value = f, pr(() => {
2201
2448
  let e = new Set(s.value);
2202
2449
  for (let t of p) e.add(t);
2203
2450
  s.value = e;
@@ -2205,9 +2452,9 @@ function Zn(e) {
2205
2452
  let e = new Map(o.value), t = new Set(s.value);
2206
2453
  for (let n of p) e.delete(n), t.delete(n);
2207
2454
  o.value = e, s.value = t;
2208
- }, Gn);
2455
+ }, or);
2209
2456
  }
2210
- function g(t, n, r = Hn) {
2457
+ function g(t, n, r = rr) {
2211
2458
  if (!t.size) return;
2212
2459
  let i = /* @__PURE__ */ new Map(), a = [];
2213
2460
  for (let [r, o] of t.entries()) {
@@ -2226,8 +2473,8 @@ function Zn(e) {
2226
2473
  c.value = i, u.value = /* @__PURE__ */ new Set();
2227
2474
  let o = new Map(l.value);
2228
2475
  for (let e of a) o.set(e, r);
2229
- l.value = o, Qn(() => {
2230
- u.value = new Set(a), Qn(() => {
2476
+ l.value = o, pr(() => {
2477
+ u.value = new Set(a), pr(() => {
2231
2478
  c.value = /* @__PURE__ */ new Map();
2232
2479
  });
2233
2480
  }), S(() => {
@@ -2238,8 +2485,8 @@ function Zn(e) {
2238
2485
  }, r);
2239
2486
  }
2240
2487
  function _(e) {
2241
- if (n.value.has(e)) return `transform ${Un}ms ease-out`;
2242
- if (u.value.has(e)) return `transform ${l.value.get(e) ?? Hn}ms ease-out`;
2488
+ if (n.value.has(e)) return `transform ${ir}ms ease-out`;
2489
+ if (u.value.has(e)) return `transform ${l.value.get(e) ?? rr}ms ease-out`;
2243
2490
  }
2244
2491
  function v(e) {
2245
2492
  if (!n.value.has(e)) return;
@@ -2250,13 +2497,13 @@ function Zn(e) {
2250
2497
  let r = e.items.value[n], i = e.positions.value[n] ?? {
2251
2498
  x: 0,
2252
2499
  y: 0
2253
- }, o = e.heights.value[n] ?? e.columnWidth.value, s = r ? Q(r) : null, l = s ? c.value.get(s) ?? {
2500
+ }, o = e.heights.value[n] ?? e.columnWidth.value, s = r ? $(r) : null, l = s ? c.value.get(s) ?? {
2254
2501
  dx: 0,
2255
2502
  dy: 0
2256
2503
  } : {
2257
2504
  dx: 0,
2258
2505
  dy: 0
2259
- }, u = s ? a.value.get(s) ?? "bottom" : "bottom", d = s && t.value.has(s) ? Xn({
2506
+ }, u = s ? a.value.get(s) ?? "bottom" : "bottom", d = s && t.value.has(s) ? dr({
2260
2507
  columnWidth: e.columnWidth.value,
2261
2508
  direction: u,
2262
2509
  itemHeight: o,
@@ -2266,18 +2513,18 @@ function Zn(e) {
2266
2513
  return `translate3d(${i.x + l.dx}px, ${d + l.dy}px, 0)`;
2267
2514
  }
2268
2515
  function x(t) {
2269
- let n = Q(t), r = o.value.get(n);
2516
+ let n = $(t), r = o.value.get(n);
2270
2517
  if (!r) return {
2271
2518
  opacity: "0",
2272
2519
  transform: "translate3d(0, 0, 0) scale(0.96)",
2273
- transition: `opacity ${Gn}ms ease-out, transform ${Gn}ms ease-out`
2520
+ transition: `opacity ${or}ms ease-out, transform ${or}ms ease-out`
2274
2521
  };
2275
2522
  let i = s.value.has(n);
2276
2523
  return {
2277
2524
  height: `${r.height}px`,
2278
2525
  opacity: i ? "0" : "1",
2279
2526
  transform: `translate3d(${r.position.x}px, ${r.position.y}px, 0) scale(${i ? "0.96" : "1"})`,
2280
- transition: `opacity ${Gn}ms ease-out, transform ${Gn}ms ease-out`,
2527
+ transition: `opacity ${or}ms ease-out, transform ${or}ms ease-out`,
2281
2528
  width: `${e.columnWidth.value}px`
2282
2529
  };
2283
2530
  }
@@ -2298,28 +2545,28 @@ function Zn(e) {
2298
2545
  playFlipMoveAnimation: g
2299
2546
  };
2300
2547
  }
2301
- function Qn(e) {
2548
+ function pr(e) {
2302
2549
  if (typeof requestAnimationFrame == "function") {
2303
2550
  requestAnimationFrame(() => e());
2304
2551
  return;
2305
2552
  }
2306
2553
  setTimeout(e, 0);
2307
2554
  }
2308
- function $n(e) {
2309
- Qn(() => Qn(e));
2555
+ function mr(e) {
2556
+ pr(() => pr(e));
2310
2557
  }
2311
2558
  //#endregion
2312
2559
  //#region src/components/viewer-core/masonryViewport.ts
2313
- function er(e, t) {
2560
+ function hr(e, t) {
2314
2561
  return e?.clientHeight || Math.round(e?.getBoundingClientRect().height ?? 0) || t || window.innerHeight || 1;
2315
2562
  }
2316
- function tr(e, t, n) {
2563
+ function gr(e, t, n) {
2317
2564
  return e?.clientWidth || Math.round(e?.getBoundingClientRect().width ?? 0) || t || window.innerWidth || n;
2318
2565
  }
2319
- function nr(e, t, n, r) {
2566
+ function _r(e, t, n, r) {
2320
2567
  return (e?.scrollHeight ?? r) - (t + n);
2321
2568
  }
2322
- function rr(e, t) {
2569
+ function vr(e, t) {
2323
2570
  return {
2324
2571
  height: `${e}px`,
2325
2572
  transform: `translate3d(0, ${t}px, 0)`
@@ -2327,8 +2574,8 @@ function rr(e, t) {
2327
2574
  }
2328
2575
  //#endregion
2329
2576
  //#region src/components/viewer-core/useEdgeBoundary.ts
2330
- var ir = 250, ar = 1e3;
2331
- function or(e) {
2577
+ var yr = 250, br = 1e3;
2578
+ function xr(e) {
2332
2579
  let t = T(!1), n = T(!1), r = T(0), i = T(0), a = T(!1), o = T(!1), s = 0, c = null;
2333
2580
  b(() => {
2334
2581
  y();
@@ -2344,7 +2591,7 @@ function or(e) {
2344
2591
  function u(t) {
2345
2592
  if (!x(t) || !e.isAtBoundary()) return;
2346
2593
  let n = Date.now();
2347
- n < s || (s = n + ir, m());
2594
+ n < s || (s = n + yr, m());
2348
2595
  }
2349
2596
  function d() {
2350
2597
  if (!g()) return;
@@ -2378,7 +2625,7 @@ function or(e) {
2378
2625
  return e.hasPage.value && t.value && r.value > i.value && !e.interactionLocked?.value && !e.loading.value && !a.value && typeof e.requestPage.value == "function";
2379
2626
  }
2380
2627
  function _() {
2381
- o.value = !1, v(ar);
2628
+ o.value = !1, v(br);
2382
2629
  }
2383
2630
  function v(e) {
2384
2631
  y(), a.value = !0, c = setTimeout(() => {
@@ -2401,30 +2648,30 @@ function or(e) {
2401
2648
  }
2402
2649
  //#endregion
2403
2650
  //#region src/components/viewer-core/useMasonryList.ts
2404
- var sr = 600, $ = 24, cr = 16, lr = 300, ur = 200, dr = 200, fr = 200, pr = 300, mr = 24, hr = 48, gr = 500, _r = 1e3;
2405
- function vr(e) {
2406
- let t = T(null), n = T(0), r = T(typeof window > "u" ? 0 : window.innerHeight || 0), a = T(typeof window > "u" ? 0 : window.innerWidth || lr), 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(lr, a.value - $ * 2)), h = i(() => Pn(m.value, lr)), _ = i(() => Fn(m.value, h.value, lr, cr)), v = i(() => yr(e.activeIndex.value, 0, Math.max(0, e.items.value.length - 1))), y = i(() => Rn({
2651
+ var Sr = 600, Cr = 24, wr = 16, Tr = 300, Er = 200, Dr = 200, Or = 200, kr = 300, Ar = 24, jr = 48, Mr = 500, Nr = 1e3;
2652
+ function Pr(e) {
2653
+ let t = T(null), n = T(0), r = T(typeof window > "u" ? 0 : window.innerHeight || 0), a = T(typeof window > "u" ? 0 : window.innerWidth || Tr), 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(Tr, a.value - Cr * 2)), h = i(() => Yn(m.value, Tr)), _ = i(() => Xn(m.value, h.value, Tr, wr)), v = i(() => Fr(e.activeIndex.value, 0, Math.max(0, e.items.value.length - 1))), y = i(() => $n({
2407
2654
  itemCount: e.items.value.length,
2408
2655
  viewportHeight: r.value,
2409
2656
  scrollTop: n.value,
2410
- overscanPx: ur,
2411
- bucketPx: sr,
2657
+ overscanPx: Er,
2658
+ bucketPx: Sr,
2412
2659
  buckets: c.value
2413
2660
  })), S = i(() => y.value.map((t) => ({
2414
2661
  item: e.items.value[t],
2415
2662
  index: t
2416
2663
  }))), C = i(() => {
2417
- let e = l.value + $ * 2, t = d.value ?? 0;
2418
- return Math.max(e, t, r.value) + fr;
2419
- }), w = i(() => e.hasNextPage.value || e.allowExhaustedNextPageRefresh.value), E = i(() => e.items.value.length > 0 ? `${v.value + 1} / ${e.items.value.length}` : "0 / 0"), D = i(() => Math.max(0, r.value - mr * 2)), O = i(() => C.value > r.value + 1 && D.value > 0), k = i(() => {
2664
+ let e = l.value + Cr * 2, t = d.value ?? 0;
2665
+ return Math.max(e, t, r.value) + Or;
2666
+ }), w = i(() => e.hasNextPage.value || e.allowExhaustedNextPageRefresh.value), E = i(() => e.items.value.length > 0 ? `${v.value + 1} / ${e.items.value.length}` : "0 / 0"), D = i(() => Math.max(0, r.value - Ar * 2)), O = i(() => C.value > r.value + 1 && D.value > 0), k = i(() => {
2420
2667
  if (!O.value) return 0;
2421
2668
  let e = r.value / C.value * D.value;
2422
- return Math.min(D.value, Math.max(hr, e));
2669
+ return Math.min(D.value, Math.max(jr, e));
2423
2670
  }), A = i(() => {
2424
- if (!O.value) return mr;
2671
+ if (!O.value) return Ar;
2425
2672
  let e = Math.max(0, C.value - r.value);
2426
- return mr + Math.max(0, D.value - k.value) * (e > 0 ? yr(n.value / e, 0, 1) : 0);
2427
- }), j = Zn({
2673
+ return Ar + Math.max(0, D.value - k.value) * (e > 0 ? Fr(n.value / e, 0, 1) : 0);
2674
+ }), j = fr({
2428
2675
  items: e.items,
2429
2676
  visibleIndices: y,
2430
2677
  positions: o,
@@ -2433,27 +2680,27 @@ function vr(e) {
2433
2680
  columnWidth: _,
2434
2681
  scrollTop: n,
2435
2682
  viewportHeight: r
2436
- }), M = or({
2683
+ }), M = xr({
2437
2684
  direction: "top",
2438
2685
  getAnimationLockMs(e) {
2439
- return Math.max(gr, Jn(e)) + _r;
2686
+ return Math.max(Mr, lr(e)) + Nr;
2440
2687
  },
2441
2688
  hasPage: e.hasPreviousPage,
2442
2689
  interactionLocked: p,
2443
2690
  isAtBoundary() {
2444
- return n.value <= $ + cr;
2691
+ return n.value <= Cr + wr;
2445
2692
  },
2446
2693
  loading: e.loading,
2447
2694
  requestPage: e.requestPreviousPage
2448
- }), N = or({
2695
+ }), N = xr({
2449
2696
  direction: "bottom",
2450
2697
  getAnimationLockMs(e) {
2451
- return Jn(e) + _r;
2698
+ return lr(e) + Nr;
2452
2699
  },
2453
2700
  hasPage: w,
2454
2701
  interactionLocked: p,
2455
2702
  isAtBoundary() {
2456
- return re() <= dr;
2703
+ return re() <= Dr;
2457
2704
  },
2458
2705
  loading: e.loading,
2459
2706
  requestPage: e.requestNextPage
@@ -2463,8 +2710,8 @@ function vr(e) {
2463
2710
  h,
2464
2711
  _
2465
2712
  ], async ([t], [r = []]) => {
2466
- let i = t.map((e) => Q(e)), a = r ?? [], s = a.map((e) => Q(e)), c = zn(a, u.value, o.value), l = oe(a), d = new Set(s), f = new Set(i), p = t.filter((e) => !d.has(Q(e))), m = a.flatMap((e) => {
2467
- let t = Q(e);
2713
+ let i = t.map((e) => $(e)), a = r ?? [], s = a.map((e) => $(e)), c = er(a, u.value, o.value), l = oe(a), d = new Set(s), f = new Set(i), p = t.filter((e) => !d.has($(e))), m = a.flatMap((e) => {
2714
+ let t = $(e);
2468
2715
  if (f.has(t)) return [];
2469
2716
  let n = c.get(t), r = l.get(t);
2470
2717
  return !n || r == null ? [] : [{
@@ -2472,10 +2719,10 @@ function vr(e) {
2472
2719
  item: e,
2473
2720
  position: n
2474
2721
  }];
2475
- }), 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 > $ + cr, b = h && n.value > $ + cr ? t[v.value] : null, x = b ? Q(b) : null;
2476
- y && q(Yn() + _r), _ && K(), B(), m.length > 0 && j.markLeave(m), p.length > 0 && (j.markEnter(p, h ? "top" : "bottom"), h ? M.onItemsMutated(p.length) : N.onItemsMutated(p.length)), j.playFlipMoveAnimation(c, new Set(p.map((e) => Q(e))), h ? gr : void 0), x ? (await g(), G(x, c)) : e.active.value && s.length > 0 && Y();
2722
+ }), 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 > Cr + wr, b = h && n.value > Cr + wr ? t[v.value] : null, x = b ? $(b) : null;
2723
+ y && q(ur() + Nr), _ && K(), B(), m.length > 0 && j.markLeave(m), p.length > 0 && (j.markEnter(p, h ? "top" : "bottom"), h ? M.onItemsMutated(p.length) : N.onItemsMutated(p.length)), j.playFlipMoveAnimation(c, new Set(p.map((e) => $(e))), h ? Mr : void 0), x ? (await g(), G(x, c)) : e.active.value && s.length > 0 && Y();
2477
2724
  }, { immediate: !0 }), F([
2478
- () => e.pendingAppendItems.value.map((e) => Q(e)),
2725
+ () => e.pendingAppendItems.value.map((e) => $(e)),
2479
2726
  h,
2480
2727
  _,
2481
2728
  r
@@ -2490,32 +2737,32 @@ function vr(e) {
2490
2737
  }
2491
2738
  if (i !== !1 || f.value == null) return;
2492
2739
  await g();
2493
- let o = Math.max(0, C.value - r.value), s = yr(f.value, 0, o);
2740
+ let o = Math.max(0, C.value - r.value), s = Fr(f.value, 0, o);
2494
2741
  a.scrollTop = s, n.value = s, M.syncBoundary(), N.syncBoundary();
2495
2742
  }), F(() => e.loading.value, async (t) => {
2496
2743
  !t && !e.pendingAppendItems.value.length && !L && !z && (d.value = null), M.onLoadingChange(t), N.onLoadingChange(t), await g();
2497
2744
  }), x(async () => {
2498
- te(), await g(), v.value > 0 ? W(v.value, "center") : J(), M.syncBoundary(), N.syncBoundary(), typeof ResizeObserver < "u" ? (P = new ResizeObserver(() => {
2499
- te();
2500
- }), t.value && P.observe(t.value)) : window.addEventListener("resize", te);
2745
+ X(), await g(), v.value > 0 ? W(v.value, "center") : J(), M.syncBoundary(), N.syncBoundary(), typeof ResizeObserver < "u" ? (P = new ResizeObserver(() => {
2746
+ X();
2747
+ }), t.value && P.observe(t.value)) : window.addEventListener("resize", X);
2501
2748
  }), b(() => {
2502
- P?.disconnect(), P = null, window.removeEventListener("resize", te), ce(), le(), I &&= (cancelAnimationFrame(I), 0);
2749
+ P?.disconnect(), P = null, window.removeEventListener("resize", X), ce(), Z(), I &&= (cancelAnimationFrame(I), 0);
2503
2750
  });
2504
2751
  function B() {
2505
- let t = Ln(e.items.value, {
2752
+ let t = Qn(e.items.value, {
2506
2753
  columnCount: h.value,
2507
2754
  columnWidth: _.value,
2508
- gapX: cr,
2509
- gapY: cr,
2510
- bucketPx: sr
2755
+ gapX: wr,
2756
+ gapY: wr,
2757
+ bucketPx: Sr
2511
2758
  });
2512
2759
  o.value = t.positions.map((e) => ({
2513
- x: e.x + $,
2514
- y: e.y + $
2760
+ x: e.x + Cr,
2761
+ y: e.y + Cr
2515
2762
  })), s.value = t.heights, c.value = t.buckets, l.value = t.contentHeight, u.value = t.indexById;
2516
2763
  }
2517
2764
  function V() {
2518
- e.active.value && (n.value = t.value?.scrollTop ?? 0, r.value = X(), M.syncBoundary(), N.syncBoundary(), ee(), !Y() && (I ||= requestAnimationFrame(() => {
2765
+ e.active.value && (n.value = t.value?.scrollTop ?? 0, r.value = te(), M.syncBoundary(), N.syncBoundary(), ee(), !Y() && (I ||= requestAnimationFrame(() => {
2519
2766
  I = 0, J();
2520
2767
  })));
2521
2768
  }
@@ -2523,7 +2770,7 @@ function vr(e) {
2523
2770
  e.active.value && (M.onWheel(t), N.onWheel(t), ee());
2524
2771
  }
2525
2772
  function U(t) {
2526
- let n = e.items.value[t], r = n ? Q(n) : "";
2773
+ let n = e.items.value[t], r = n ? $(n) : "";
2527
2774
  return {
2528
2775
  height: `${s.value[t] ?? _.value}px`,
2529
2776
  width: `${_.value}px`,
@@ -2536,7 +2783,7 @@ function vr(e) {
2536
2783
  let a = t.value, c = o.value[e], l = s.value[e];
2537
2784
  if (!a || !c || !l) return;
2538
2785
  let u = a.scrollTop, d = Math.max(0, C.value - r.value);
2539
- i === "center" ? u = c.y - (r.value - l) / 2 : c.y < a.scrollTop ? u = c.y - $ : c.y + l > a.scrollTop + r.value && (u = c.y + l - r.value + $), a.scrollTop = yr(u, 0, d), n.value = a.scrollTop, J();
2786
+ i === "center" ? u = c.y - (r.value - l) / 2 : c.y < a.scrollTop ? u = c.y - Cr : c.y + l > a.scrollTop + r.value && (u = c.y + l - r.value + Cr), a.scrollTop = Fr(u, 0, d), n.value = a.scrollTop, J();
2540
2787
  }
2541
2788
  function G(e, r) {
2542
2789
  let i = t.value, a = r.get(e), s = u.value.get(e), c = s == null ? null : o.value[s];
@@ -2553,7 +2800,7 @@ function vr(e) {
2553
2800
  e.scrollTop = 0, n.value = 0, M.syncBoundary(), N.syncBoundary();
2554
2801
  }
2555
2802
  function q(e) {
2556
- le(), p.value = !0, R = setTimeout(() => {
2803
+ Z(), p.value = !0, R = setTimeout(() => {
2557
2804
  R = null, p.value = !1;
2558
2805
  }, Math.max(0, e));
2559
2806
  }
@@ -2569,40 +2816,40 @@ function vr(e) {
2569
2816
  e.setActiveIndex(i);
2570
2817
  }
2571
2818
  function Y() {
2572
- let t = n.value <= $ + cr, r = re() <= dr;
2819
+ let t = n.value <= Cr + wr, r = re() <= Dr;
2573
2820
  return t ? (e.setActiveIndex(0), !0) : r ? (e.setActiveIndex(Math.max(0, e.items.value.length - 1)), !0) : !1;
2574
2821
  }
2575
2822
  function ee() {
2576
2823
  M.maybeRequestPage(), N.maybeRequestPage();
2577
2824
  }
2578
- function te() {
2579
- r.value = X(), a.value = ne();
2580
- }
2581
2825
  function X() {
2582
- return er(t.value, r.value);
2826
+ r.value = te(), a.value = ne();
2827
+ }
2828
+ function te() {
2829
+ return hr(t.value, r.value);
2583
2830
  }
2584
2831
  function ne() {
2585
- return tr(t.value, a.value, lr);
2832
+ return gr(t.value, a.value, Tr);
2586
2833
  }
2587
2834
  function re() {
2588
- return nr(t.value, n.value, r.value, C.value);
2835
+ return _r(t.value, n.value, r.value, C.value);
2589
2836
  }
2590
2837
  function ie() {
2591
- return rr(k.value, A.value);
2838
+ return vr(k.value, A.value);
2592
2839
  }
2593
2840
  function ae(e) {
2594
- return e.length ? Ln(e, {
2841
+ return e.length ? Qn(e, {
2595
2842
  columnCount: h.value,
2596
2843
  columnWidth: _.value,
2597
- gapX: cr,
2598
- gapY: cr,
2599
- bucketPx: sr
2600
- }).contentHeight + $ * 2 : 0;
2844
+ gapX: wr,
2845
+ gapY: wr,
2846
+ bucketPx: Sr
2847
+ }).contentHeight + Cr * 2 : 0;
2601
2848
  }
2602
2849
  function oe(e) {
2603
2850
  let t = /* @__PURE__ */ new Map();
2604
2851
  for (let n of e) {
2605
- let e = Q(n), r = u.value.get(e);
2852
+ let e = $(n), r = u.value.get(e);
2606
2853
  if (r == null) continue;
2607
2854
  let i = s.value[r];
2608
2855
  i != null && t.set(e, i);
@@ -2619,12 +2866,12 @@ function vr(e) {
2619
2866
  } finally {
2620
2867
  d.value = null, z = !1;
2621
2868
  }
2622
- }, pr));
2869
+ }, kr));
2623
2870
  }
2624
2871
  function ce() {
2625
2872
  L &&= (clearTimeout(L), null);
2626
2873
  }
2627
- function le() {
2874
+ function Z() {
2628
2875
  R && (clearTimeout(R), R = null, p.value = !1);
2629
2876
  }
2630
2877
  return {
@@ -2644,17 +2891,17 @@ function vr(e) {
2644
2891
  scrollViewportRef: t
2645
2892
  };
2646
2893
  }
2647
- function yr(e, t, n) {
2894
+ function Fr(e, t, n) {
2648
2895
  return Math.min(Math.max(e, t), n);
2649
2896
  }
2650
2897
  //#endregion
2651
2898
  //#region src/components/viewer-core/listCardAsset.ts
2652
- function br(e) {
2899
+ function Ir(e) {
2653
2900
  if (e) try {
2654
2901
  e.removeAttribute("src"), e.src = "";
2655
2902
  } catch {}
2656
2903
  }
2657
- function xr(e) {
2904
+ function Lr(e) {
2658
2905
  if (e) {
2659
2906
  try {
2660
2907
  e.currentTime = 0;
@@ -2665,12 +2912,12 @@ function xr(e) {
2665
2912
  } catch {}
2666
2913
  }
2667
2914
  }
2668
- function Sr(e, t) {
2915
+ function Rr(e, t) {
2669
2916
  if (t) return e.bottom > t.top && e.top < t.bottom;
2670
2917
  let n = window.innerHeight || document.documentElement.clientHeight || 0;
2671
2918
  return e.bottom > 0 && e.top < n;
2672
2919
  }
2673
- function Cr(e) {
2920
+ function zr(e) {
2674
2921
  if (!e) return null;
2675
2922
  try {
2676
2923
  return new URL(e, window.location.href).href;
@@ -2680,22 +2927,22 @@ function Cr(e) {
2680
2927
  }
2681
2928
  //#endregion
2682
2929
  //#region src/components/viewer-core/listPreview.ts
2683
- var wr = /\.(avif|gif|jpe?g|png|svg|webp)(\?|#|$)/i, Tr = /\.(m4v|mov|mp4|mpeg|ogg|ogv|webm)(\?|#|$)/i;
2684
- function Er(e) {
2685
- let t = e.preview?.url ?? e.url, n = Nn(e), r = e.title?.trim() || pt(e.type);
2930
+ var Br = /\.(avif|gif|jpe?g|png|svg|webp)(\?|#|$)/i, Vr = /\.(m4v|mov|mp4|mpeg|ogg|ogv|webm)(\?|#|$)/i;
2931
+ function Hr(e) {
2932
+ let t = e.preview?.url ?? e.url, n = Jn(e), r = e.title?.trim() || Ct(e.type);
2686
2933
  return e.type !== "image" && e.type !== "video" ? {
2687
2934
  kind: "fallback",
2688
2935
  url: null,
2689
2936
  width: n.width,
2690
2937
  height: n.height,
2691
2938
  label: r
2692
- } : Or(e, t) ? {
2939
+ } : Wr(e, t) ? {
2693
2940
  kind: "video",
2694
2941
  url: t,
2695
2942
  width: n.width,
2696
2943
  height: n.height,
2697
2944
  label: r
2698
- } : Dr(e, t) ? {
2945
+ } : Ur(e, t) ? {
2699
2946
  kind: "image",
2700
2947
  url: t,
2701
2948
  width: n.width,
@@ -2709,28 +2956,28 @@ function Er(e) {
2709
2956
  label: r
2710
2957
  };
2711
2958
  }
2712
- function Dr(e, t) {
2713
- return e.type !== "image" || typeof t != "string" ? !1 : wr.test(t) || kr(t);
2959
+ function Ur(e, t) {
2960
+ return e.type !== "image" || typeof t != "string" ? !1 : Br.test(t) || Gr(t);
2714
2961
  }
2715
- function Or(e, t) {
2716
- return e.type === "video" && typeof t == "string" && Tr.test(t);
2962
+ function Wr(e, t) {
2963
+ return e.type === "video" && typeof t == "string" && Vr.test(t);
2717
2964
  }
2718
- function kr(e) {
2965
+ function Gr(e) {
2719
2966
  return /^(https?:\/\/|\/\/|\/(?!\/)|\.{1,2}\/|blob:|data:)/i.test(e);
2720
2967
  }
2721
2968
  //#endregion
2722
2969
  //#region src/components/viewer-core/useAssetLoadQueue.ts
2723
- var Ar = {
2970
+ var Kr = {
2724
2971
  maxGlobal: 10,
2725
2972
  maxPerDomain: 4,
2726
2973
  maxVideoPerDomain: 2
2727
2974
  };
2728
- function jr(e = Ar) {
2975
+ function qr(e = Kr) {
2729
2976
  let t = /* @__PURE__ */ new Map(), n = /* @__PURE__ */ new Map(), r = 0;
2730
2977
  function i(e) {
2731
2978
  let i = {
2732
2979
  ...e,
2733
- domain: Pr(e.url),
2980
+ domain: Xr(e.url),
2734
2981
  enqueuedAt: r,
2735
2982
  id: `vibe-asset-load-${r += 1}`
2736
2983
  };
@@ -2749,7 +2996,7 @@ function jr(e = Ar) {
2749
2996
  function a() {
2750
2997
  if (n.size === 0) return;
2751
2998
  let r = [...n.values()].sort((e, t) => {
2752
- let n = Nr(e) - Nr(t);
2999
+ let n = Yr(e) - Yr(t);
2753
3000
  return n === 0 ? e.enqueuedAt - t.enqueuedAt : n;
2754
3001
  });
2755
3002
  for (let i of r) {
@@ -2770,8 +3017,8 @@ function jr(e = Ar) {
2770
3017
  }
2771
3018
  return { request: i };
2772
3019
  }
2773
- var Mr = jr();
2774
- function Nr(e) {
3020
+ var Jr = qr();
3021
+ function Yr(e) {
2775
3022
  try {
2776
3023
  let t = e.getPriority();
2777
3024
  return Number.isFinite(t) ? t : Infinity;
@@ -2779,7 +3026,7 @@ function Nr(e) {
2779
3026
  return Infinity;
2780
3027
  }
2781
3028
  }
2782
- function Pr(e) {
3029
+ function Xr(e) {
2783
3030
  try {
2784
3031
  return new URL(e).hostname || "local";
2785
3032
  } catch {
@@ -2788,14 +3035,14 @@ function Pr(e) {
2788
3035
  }
2789
3036
  //#endregion
2790
3037
  //#region src/components/ListCard.vue?vue&type=script&setup=true&lang.ts
2791
- var Fr = ["aria-label"], Ir = {
3038
+ var Zr = ["aria-label"], Qr = {
2792
3039
  key: 0,
2793
3040
  "data-testid": "vibe-list-card-spinner",
2794
3041
  class: "pointer-events-none absolute inset-0 z-[4] grid place-items-center bg-black/18"
2795
- }, Lr = { 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]" }, Rr = ["src", "alt"], zr = ["src"], Br = ["data-kind"], Vr = { class: "grid justify-items-center gap-3 px-4 text-center" }, Hr = { class: "text-[0.68rem] font-bold uppercase tracking-[0.22em] text-[#f7f1ea]/72" }, Ur = {
3042
+ }, $r = { 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]" }, ei = ["src", "alt"], ti = ["src"], ni = ["data-kind"], ri = { class: "grid justify-items-center gap-3 px-4 text-center" }, ii = { class: "text-[0.68rem] font-bold uppercase tracking-[0.22em] text-[#f7f1ea]/72" }, ai = {
2796
3043
  key: 4,
2797
3044
  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))]"
2798
- }, Wr = { class: "inline-flex h-14 w-14 items-center justify-center border border-white/16 bg-black/20" }, Gr = { class: "pointer-events-none absolute inset-0 z-[3]" }, Kr = /* @__PURE__ */ d({
3045
+ }, oi = { class: "inline-flex h-14 w-14 items-center justify-center border border-white/16 bg-black/20" }, si = { class: "pointer-events-none absolute inset-0 z-[3]" }, ci = /* @__PURE__ */ d({
2799
3046
  __name: "ListCard",
2800
3047
  props: {
2801
3048
  active: {
@@ -2819,7 +3066,7 @@ var Fr = ["aria-label"], Ir = {
2819
3066
  },
2820
3067
  emits: ["open"],
2821
3068
  setup(e, { emit: t }) {
2822
- let n = e, r = t, l = i(() => Er(n.item)), d = T(!1), f = T(!1), p = T(!1), m = T(l.value.kind === "fallback"), h = T(null), g = T(null), v = T(null), y = T(null), C = T(null), w = T(l.value.kind === "fallback"), E = i(() => w.value ? n.surfaceActive ? d.value ? l.value.url : null : l.value.url : null), A = i(() => n.surfaceActive && d.value && (l.value.kind === "image" || l.value.kind === "video") && !!l.value.url), M = i(() => l.value.kind === "image" && !!E.value), N = i(() => l.value.kind === "video" && !!E.value), P = i(() => !!h.value), I = i(() => jt(h.value)), L = i(() => A.value && !h.value && (!w.value || !m.value)), R = null, B = null, V = /* @__PURE__ */ new Set();
3069
+ let n = e, r = t, l = i(() => Hr(n.item)), d = T(!1), f = T(!1), p = T(!1), m = T(l.value.kind === "fallback"), h = T(null), g = T(null), v = T(null), y = T(null), C = T(null), w = T(l.value.kind === "fallback"), E = i(() => w.value ? n.surfaceActive ? d.value ? l.value.url : null : l.value.url : null), A = i(() => n.surfaceActive && d.value && (l.value.kind === "image" || l.value.kind === "video") && !!l.value.url), M = i(() => l.value.kind === "image" && !!E.value), N = i(() => l.value.kind === "video" && !!E.value), P = i(() => !!h.value), I = i(() => Vt(h.value)), L = i(() => A.value && !h.value && (!w.value || !m.value)), R = null, B = null, V = /* @__PURE__ */ new Set();
2823
3070
  F([E, () => l.value.kind], () => {
2824
3071
  let e = l.value.kind === "fallback";
2825
3072
  m.value = e, h.value = null, e && (w.value = !0);
@@ -2854,23 +3101,23 @@ var Fr = ["aria-label"], Ir = {
2854
3101
  J(), R?.disconnect(), R = null;
2855
3102
  });
2856
3103
  function H() {
2857
- se(g.value) && (m.value = !0, h.value = null, te(E.value ?? n.item.url), Y());
3104
+ se(g.value) && (m.value = !0, h.value = null, X(E.value ?? n.item.url), Y());
2858
3105
  }
2859
3106
  async function U() {
2860
3107
  if (!se(g.value)) return;
2861
3108
  let e = E.value ?? n.item.url;
2862
3109
  m.value = !1, h.value = "generic";
2863
- let t = await Mt(e);
3110
+ let t = await Ht(e);
2864
3111
  h.value = t, n.reportAssetError?.({
2865
3112
  item: n.item,
2866
- occurrenceKey: Q(n.item),
3113
+ occurrenceKey: $(n.item),
2867
3114
  url: e,
2868
3115
  kind: t,
2869
3116
  surface: "grid"
2870
3117
  }), Y();
2871
3118
  }
2872
3119
  function W() {
2873
- se(C.value) && (m.value = !0, h.value = null, te(E.value ?? n.item.url), Y(), q());
3120
+ se(C.value) && (m.value = !0, h.value = null, X(E.value ?? n.item.url), Y(), q());
2874
3121
  }
2875
3122
  function G() {
2876
3123
  se(C.value) && (m.value = !1);
@@ -2892,7 +3139,7 @@ var Fr = ["aria-label"], Ir = {
2892
3139
  B?.refresh();
2893
3140
  return;
2894
3141
  }
2895
- B = Mr.request({
3142
+ B = Jr.request({
2896
3143
  assetType: l.value.kind,
2897
3144
  getPriority: ae,
2898
3145
  onGrant() {
@@ -2909,7 +3156,7 @@ var Fr = ["aria-label"], Ir = {
2909
3156
  return;
2910
3157
  }
2911
3158
  if (E.value && d.value && m.value) {
2912
- e.muted = !0, e.loop = !0, e.playsInline = !0, Ft(e);
3159
+ e.muted = !0, e.loop = !0, e.playsInline = !0, Gt(e);
2913
3160
  return;
2914
3161
  }
2915
3162
  try {
@@ -2930,11 +3177,11 @@ var Fr = ["aria-label"], Ir = {
2930
3177
  d.value = !0;
2931
3178
  return;
2932
3179
  }
2933
- d.value = Sr(e?.boundingClientRect ?? t.getBoundingClientRect(), e?.rootBounds ?? y.value?.getBoundingClientRect() ?? null);
3180
+ d.value = Rr(e?.boundingClientRect ?? t.getBoundingClientRect(), e?.rootBounds ?? y.value?.getBoundingClientRect() ?? null);
2934
3181
  }
2935
- function te(e) {
3182
+ function X(e) {
2936
3183
  if (!e) return;
2937
- let t = Q(n.item), r = `${t}|${e}`;
3184
+ let t = $(n.item), r = `${t}|${e}`;
2938
3185
  V.has(r) || (V.add(r), n.reportAssetLoad?.({
2939
3186
  item: n.item,
2940
3187
  occurrenceKey: t,
@@ -2942,18 +3189,18 @@ var Fr = ["aria-label"], Ir = {
2942
3189
  url: e
2943
3190
  }));
2944
3191
  }
2945
- function X() {
3192
+ function te() {
2946
3193
  if (!I.value) return;
2947
- let e = Q(n.item);
3194
+ let e = $(n.item);
2948
3195
  V.forEach((t) => {
2949
3196
  t.startsWith(`${e}|`) && V.delete(t);
2950
3197
  }), h.value = null, m.value = !1, w.value = !1, Y(), K();
2951
3198
  }
2952
3199
  function ne() {
2953
- br(g.value);
3200
+ Ir(g.value);
2954
3201
  }
2955
3202
  function ie() {
2956
- xr(C.value);
3203
+ Lr(C.value);
2957
3204
  }
2958
3205
  function ae() {
2959
3206
  let e = v.value;
@@ -2967,16 +3214,16 @@ var Fr = ["aria-label"], Ir = {
2967
3214
  return Math.abs((t.top + t.bottom) / 2 - n);
2968
3215
  }
2969
3216
  function se(e) {
2970
- let t = Cr(E.value);
2971
- return !e || !t ? !1 : Cr("currentSrc" in e && e.currentSrc || e.getAttribute("src")) === t;
3217
+ let t = zr(E.value);
3218
+ return !e || !t ? !1 : zr("currentSrc" in e && e.currentSrc || e.getAttribute("src")) === t;
2972
3219
  }
2973
3220
  function ce() {
2974
3221
  r("open");
2975
3222
  }
2976
- function le() {
3223
+ function Z() {
2977
3224
  f.value = !0;
2978
3225
  }
2979
- function ue(e) {
3226
+ function le(e) {
2980
3227
  let t = e.relatedTarget;
2981
3228
  v.value && t instanceof Node && v.value.contains(t) || (f.value = !1);
2982
3229
  }
@@ -2985,8 +3232,8 @@ var Fr = ["aria-label"], Ir = {
2985
3232
  ref: v,
2986
3233
  "data-testid": "vibe-list-card-inner",
2987
3234
  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"]),
2988
- onFocusin: le,
2989
- onFocusout: ue,
3235
+ onFocusin: Z,
3236
+ onFocusout: le,
2990
3237
  onPointerenter: t[0] ||= (e) => p.value = !0,
2991
3238
  onPointerleave: t[1] ||= (e) => p.value = !1
2992
3239
  }, [
@@ -2996,8 +3243,8 @@ var Fr = ["aria-label"], Ir = {
2996
3243
  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]",
2997
3244
  "aria-label": n.item.title || `Open item ${n.index + 1}`,
2998
3245
  onClick: ce
2999
- }, null, 8, Fr),
3000
- L.value ? (S(), s("div", Ir, [c("span", Lr, [u(j(re), {
3246
+ }, null, 8, Zr),
3247
+ L.value ? (S(), s("div", Qr, [c("span", $r, [u(j(re), {
3001
3248
  class: "h-5 w-5 animate-spin stroke-[1.9] text-[#f7f1ea]/78",
3002
3249
  "aria-hidden": "true"
3003
3250
  })])])) : o("", !0),
@@ -3011,7 +3258,7 @@ var Fr = ["aria-label"], Ir = {
3011
3258
  class: _(["block h-full w-full object-cover transition-opacity duration-300", m.value ? "pointer-events-none opacity-100" : "pointer-events-none opacity-0"]),
3012
3259
  onLoad: H,
3013
3260
  onError: U
3014
- }, null, 42, Rr)) : N.value && E.value && !P.value ? (S(), s("video", {
3261
+ }, null, 42, ei)) : N.value && E.value && !P.value ? (S(), s("video", {
3015
3262
  key: 2,
3016
3263
  ref_key: "videoRef",
3017
3264
  ref: C,
@@ -3027,31 +3274,31 @@ var Fr = ["aria-label"], Ir = {
3027
3274
  onPlaying: W,
3028
3275
  onStalled: G,
3029
3276
  onWaiting: G
3030
- }, null, 42, zr)) : P.value ? (S(), s("div", {
3277
+ }, null, 42, ti)) : P.value ? (S(), s("div", {
3031
3278
  key: 3,
3032
3279
  "data-testid": "vibe-list-card-error",
3033
3280
  "data-kind": h.value,
3034
3281
  class: "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))]"
3035
- }, [c("div", Vr, [
3282
+ }, [c("div", ri, [
3036
3283
  u(j(oe), {
3037
3284
  class: "h-6 w-6 stroke-[1.8] text-[#f7f1ea]/78",
3038
3285
  "aria-hidden": "true"
3039
3286
  }),
3040
- c("span", Hr, k(j(At)(h.value)), 1),
3287
+ c("span", ii, k(j(Bt)(h.value)), 1),
3041
3288
  I.value ? (S(), s("button", {
3042
3289
  key: 0,
3043
3290
  type: "button",
3044
3291
  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",
3045
- onClick: z(X, ["stop"])
3292
+ onClick: z(te, ["stop"])
3046
3293
  }, " Retry ")) : o("", !0)
3047
- ])], 8, Br)) : (S(), s("div", Ur, [c("div", Wr, [D(e.$slots, "item-icon", {
3048
- icon: j(ft)(n.item.type),
3294
+ ])], 8, ni)) : (S(), s("div", ai, [c("div", oi, [D(e.$slots, "item-icon", {
3295
+ icon: j(St)(n.item.type),
3049
3296
  item: n.item
3050
- }, () => [(S(), a(O(j(ft)(n.item.type)), {
3297
+ }, () => [(S(), a(O(j(St)(n.item.type)), {
3051
3298
  class: "h-6 w-6 stroke-[1.8] text-[#f7f1ea]/78",
3052
3299
  "aria-hidden": "true"
3053
3300
  }))])])])),
3054
- c("div", Gr, [D(e.$slots, "grid-item-overlay", {
3301
+ c("div", si, [D(e.$slots, "grid-item-overlay", {
3055
3302
  active: n.active,
3056
3303
  focused: f.value,
3057
3304
  hovered: p.value,
@@ -3061,24 +3308,24 @@ var Fr = ["aria-label"], Ir = {
3061
3308
  })])
3062
3309
  ], 34));
3063
3310
  }
3064
- }), qr = { 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)]" }, Jr = { class: "pointer-events-none absolute inset-x-0 top-0 z-[2] flex justify-end p-6" }, Yr = {
3311
+ }), li = { 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)]" }, ui = { class: "pointer-events-none absolute inset-x-0 top-0 z-[2] flex justify-end p-6" }, di = {
3065
3312
  "data-testid": "vibe-pagination",
3066
3313
  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]"
3067
- }, Xr = { class: "whitespace-nowrap" }, Zr = {
3314
+ }, fi = { class: "whitespace-nowrap" }, pi = {
3068
3315
  key: 0,
3069
3316
  class: "whitespace-nowrap border-l border-white/12 pl-2 text-[#f7f1ea]/56 min-[721px]:pl-3"
3070
- }, Qr = [
3317
+ }, mi = [
3071
3318
  "data-active",
3072
3319
  "data-index",
3073
3320
  "data-item-id",
3074
3321
  "data-occurrence-key"
3075
- ], $r = ["data-item-id"], ei = {
3322
+ ], hi = ["data-item-id"], gi = {
3076
3323
  key: 0,
3077
3324
  class: "pointer-events-none absolute inset-y-0 right-0 z-[3] hidden w-8 min-[1024px]:block"
3078
- }, ti = {
3325
+ }, _i = {
3079
3326
  key: 1,
3080
3327
  class: "pointer-events-none absolute inset-x-0 bottom-0 z-[2] px-5 pb-5 sm:px-6"
3081
- }, ni = { class: "mx-auto flex w-full max-w-[1600px] justify-center" }, ri = /* @__PURE__ */ d({
3328
+ }, vi = { class: "mx-auto flex w-full max-w-[1600px] justify-center" }, yi = /* @__PURE__ */ d({
3082
3329
  __name: "ListSurface",
3083
3330
  props: {
3084
3331
  active: {
@@ -3135,7 +3382,7 @@ var Fr = ["aria-label"], Ir = {
3135
3382
  },
3136
3383
  emits: ["open-fullscreen", "update:activeIndex"],
3137
3384
  setup(e, { emit: n }) {
3138
- let r = e, d = N(), f = n, p = vr({
3385
+ let r = e, d = N(), f = n, p = Pr({
3139
3386
  active: A(r, "active"),
3140
3387
  allowExhaustedNextPageRefresh: A(r, "allowExhaustedNextPageRefresh"),
3141
3388
  items: A(r, "items"),
@@ -3151,11 +3398,11 @@ var Fr = ["aria-label"], Ir = {
3151
3398
  setActiveIndex(e) {
3152
3399
  f("update:activeIndex", e);
3153
3400
  }
3154
- }), m = i(() => xt({
3401
+ }), m = i(() => jt({
3155
3402
  itemCount: r.items.length,
3156
3403
  loading: r.loading,
3157
3404
  phase: r.phase
3158
- })), g = i(() => St({
3405
+ })), g = i(() => Mt({
3159
3406
  errorMessage: r.errorMessage,
3160
3407
  hasItems: r.items.length > 0,
3161
3408
  hasNextPage: r.hasNextPage,
@@ -3168,15 +3415,15 @@ var Fr = ["aria-label"], Ir = {
3168
3415
  message: g.value.message,
3169
3416
  paginationDetail: r.paginationDetail,
3170
3417
  total: r.items.length
3171
- }), x = i(() => !b.value || !d["grid-status"] ? [] : d["grid-status"](b.value)), C = i(() => gt(x.value)), w = i(() => r.items.length + p.leavingItems.value.length), { emptyStateProps: T, showBadgeEmptyState: O, showCustomEmptyState: M, showInlineEmptyState: P } = yt({
3418
+ }), x = i(() => !b.value || !d["grid-status"] ? [] : d["grid-status"](b.value)), C = i(() => Et(x.value)), w = i(() => r.items.length + p.leavingItems.value.length), { emptyStateProps: T, showBadgeEmptyState: O, showCustomEmptyState: M, showInlineEmptyState: P } = kt({
3172
3419
  emptyStateMode: A(r, "emptyStateMode"),
3173
3420
  itemCount: w,
3174
3421
  loading: A(r, "loading"),
3175
3422
  renderSlot: d["empty-state"],
3176
3423
  surface: "grid"
3177
3424
  });
3178
- return (e, n) => (S(), s("div", qr, [
3179
- c("div", Jr, [c("span", Yr, [c("span", Xr, k(j(p).paginationLabel.value), 1), r.paginationDetail ? (S(), s("span", Zr, k(r.paginationDetail), 1)) : o("", !0)])]),
3425
+ return (e, n) => (S(), s("div", li, [
3426
+ c("div", ui, [c("span", di, [c("span", fi, k(j(p).paginationLabel.value), 1), r.paginationDetail ? (S(), s("span", pi, k(r.paginationDetail), 1)) : o("", !0)])]),
3180
3427
  c("div", {
3181
3428
  ref: j(p).scrollViewportRef,
3182
3429
  "data-testid": "vibe-list-scroll",
@@ -3189,15 +3436,15 @@ var Fr = ["aria-label"], Ir = {
3189
3436
  style: y({ height: `${j(p).containerHeight.value}px` })
3190
3437
  }, [
3191
3438
  (S(!0), s(t, null, E(j(p).renderedItems.value, ({ item: t, index: n }) => (S(), s("article", {
3192
- key: j(Q)(t),
3439
+ key: j($)(t),
3193
3440
  "data-testid": "vibe-list-card",
3194
3441
  "data-active": n === j(p).resolvedActiveIndex.value ? "true" : "false",
3195
3442
  "data-index": n,
3196
3443
  "data-item-id": t.id,
3197
- "data-occurrence-key": j(Q)(t),
3444
+ "data-occurrence-key": j($)(t),
3198
3445
  class: "absolute will-change-transform",
3199
3446
  style: y(j(p).getCardStyle(n))
3200
- }, [u(Kr, {
3447
+ }, [u(ci, {
3201
3448
  active: n === j(p).resolvedActiveIndex.value,
3202
3449
  index: n,
3203
3450
  item: t,
@@ -3221,14 +3468,14 @@ var Fr = ["aria-label"], Ir = {
3221
3468
  "report-asset-load",
3222
3469
  "surface-active",
3223
3470
  "onOpen"
3224
- ])], 12, Qr))), 128)),
3471
+ ])], 12, mi))), 128)),
3225
3472
  (S(!0), s(t, null, E(j(p).leavingItems.value, (t) => (S(), s("article", {
3226
- key: `leaving-${j(Q)(t.item)}`,
3473
+ key: `leaving-${j($)(t.item)}`,
3227
3474
  "data-testid": "vibe-list-card-leaving",
3228
3475
  "data-item-id": t.item.id,
3229
3476
  class: "pointer-events-none absolute z-[2] will-change-[opacity,transform]",
3230
3477
  style: y(j(p).getLeavingCardStyle(t.item))
3231
- }, [u(Kr, {
3478
+ }, [u(ci, {
3232
3479
  active: !1,
3233
3480
  index: -1,
3234
3481
  item: t.item,
@@ -3243,8 +3490,8 @@ var Fr = ["aria-label"], Ir = {
3243
3490
  "item",
3244
3491
  "report-asset-error",
3245
3492
  "report-asset-load"
3246
- ])], 12, $r))), 128)),
3247
- j(P) && j(T) ? (S(), a(Jt, {
3493
+ ])], 12, hi))), 128)),
3494
+ j(P) && j(T) ? (S(), a(ln, {
3248
3495
  key: 0,
3249
3496
  message: j(T).message,
3250
3497
  mode: j(T).mode,
@@ -3258,12 +3505,12 @@ var Fr = ["aria-label"], Ir = {
3258
3505
  "surface"
3259
3506
  ])) : o("", !0)
3260
3507
  ], 4)], 544),
3261
- 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", {
3508
+ j(p).showScrollbar.value ? (S(), s("div", gi, [n[2] ||= c("div", { class: "absolute bottom-6 right-3 top-6 w-px bg-white/8" }, null, -1), c("div", {
3262
3509
  "data-testid": "vibe-list-scrollbar-thumb",
3263
3510
  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"]),
3264
3511
  style: y(j(p).getScrollbarThumbStyle())
3265
3512
  }, null, 6)])) : o("", !0),
3266
- d["grid-footer"] ? (S(), s("div", ti, [c("div", ni, [D(e.$slots, "grid-footer")])])) : o("", !0),
3513
+ d["grid-footer"] ? (S(), s("div", _i, [c("div", vi, [D(e.$slots, "grid-footer")])])) : o("", !0),
3267
3514
  b.value ? (S(), s("div", {
3268
3515
  key: 2,
3269
3516
  class: _(["pointer-events-none absolute inset-x-0 bottom-0 z-[3] flex justify-center px-6", d["grid-footer"] ? "pb-24" : "pb-6"])
@@ -3272,7 +3519,7 @@ var Fr = ["aria-label"], Ir = {
3272
3519
  "data-testid": "vibe-grid-status-badge",
3273
3520
  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" : ""])
3274
3521
  }, k(b.value.message), 3))], 2)) : o("", !0),
3275
- j(O) && j(T) ? (S(), a(Jt, {
3522
+ j(O) && j(T) ? (S(), a(ln, {
3276
3523
  key: 3,
3277
3524
  class: _(["z-[3]", d["grid-footer"] ? "pb-24" : "pb-6"]),
3278
3525
  message: j(T).message,
@@ -3289,13 +3536,13 @@ var Fr = ["aria-label"], Ir = {
3289
3536
  ])) : o("", !0)
3290
3537
  ]));
3291
3538
  }
3292
- }), ii = ["data-surface-mode"], ai = {
3539
+ }), bi = ["data-surface-mode"], xi = {
3293
3540
  key: 1,
3294
3541
  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"
3295
- }, oi = ["data-visible", "inert"], si = ["data-visible", "inert"], ci = {
3542
+ }, Si = ["data-visible", "inert"], Ci = ["data-visible", "inert"], wi = {
3296
3543
  key: 3,
3297
3544
  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"
3298
- }, li = /* @__PURE__ */ d({
3545
+ }, Ti = /* @__PURE__ */ d({
3299
3546
  name: "VibeLayout",
3300
3547
  __name: "Layout",
3301
3548
  props: {
@@ -3304,10 +3551,12 @@ var Fr = ["aria-label"], Ir = {
3304
3551
  fillDelayStepMs: {},
3305
3552
  initialCursor: {},
3306
3553
  initialState: {},
3554
+ loopFullscreenVideo: { type: Boolean },
3307
3555
  mode: {},
3308
3556
  pageSize: {},
3309
3557
  paginationDetail: {},
3310
3558
  resolve: { type: Function },
3559
+ showDominantImageTone: { type: Boolean },
3311
3560
  showEndBadge: { type: Boolean },
3312
3561
  showStatusBadges: { type: Boolean },
3313
3562
  surfaceMode: {}
@@ -3319,9 +3568,9 @@ var Fr = ["aria-label"], Ir = {
3319
3568
  "update:surfaceMode"
3320
3569
  ],
3321
3570
  setup(e, { expose: n, emit: i }) {
3322
- let d = e, p = N(), m = i, h = Ge(d, m), g = se((e) => {
3571
+ let d = e, p = N(), m = i, h = qe(d, m), g = le((e) => {
3323
3572
  m("asset-errors", e);
3324
- }), _ = ce((e) => {
3573
+ }), _ = ue((e) => {
3325
3574
  m("asset-loads", e);
3326
3575
  });
3327
3576
  return b(() => {
@@ -3348,7 +3597,7 @@ var Fr = ["aria-label"], Ir = {
3348
3597
  type: "button",
3349
3598
  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",
3350
3599
  onClick: n[0] ||= (...e) => j(h).retryInitialLoad && j(h).retryInitialLoad(...e)
3351
- }, " Retry ")) : j(h).errorMessage.value && j(h).items.value.length > 0 ? (S(), s("div", ai, k(j(h).errorMessage.value), 1)) : o("", !0), j(h).isDesktop.value ? (S(), s(t, { key: 2 }, [u(r, {
3600
+ }, " Retry ")) : j(h).errorMessage.value && j(h).items.value.length > 0 ? (S(), s("div", xi, k(j(h).errorMessage.value), 1)) : o("", !0), j(h).isDesktop.value ? (S(), s(t, { key: 2 }, [u(r, {
3352
3601
  appear: "",
3353
3602
  "enter-active-class": "transition-[opacity,transform] duration-300 ease-out",
3354
3603
  "enter-from-class": "translate-y-3 opacity-0",
@@ -3362,7 +3611,7 @@ var Fr = ["aria-label"], Ir = {
3362
3611
  "data-visible": j(h).surfaceMode.value === "list" ? "true" : "false",
3363
3612
  inert: j(h).surfaceMode.value !== "list",
3364
3613
  class: "absolute inset-0 z-[2]"
3365
- }, [u(ri, {
3614
+ }, [u(yi, {
3366
3615
  active: j(h).surfaceMode.value === "list",
3367
3616
  "allow-exhausted-next-page-refresh": j(h).canRefreshExhaustedNextPage.value,
3368
3617
  items: j(h).items.value,
@@ -3430,7 +3679,7 @@ var Fr = ["aria-label"], Ir = {
3430
3679
  "show-status-badges",
3431
3680
  "onOpenFullscreen",
3432
3681
  "onUpdate:activeIndex"
3433
- ])], 8, oi), [[P, j(h).surfaceMode.value === "list"]])]),
3682
+ ])], 8, Si), [[P, j(h).surfaceMode.value === "list"]])]),
3434
3683
  _: 3
3435
3684
  }), u(r, {
3436
3685
  appear: "",
@@ -3446,7 +3695,7 @@ var Fr = ["aria-label"], Ir = {
3446
3695
  "data-visible": j(h).surfaceMode.value === "fullscreen" ? "true" : "false",
3447
3696
  inert: j(h).surfaceMode.value !== "fullscreen",
3448
3697
  class: "absolute inset-0 z-[3]"
3449
- }, [u(An, {
3698
+ }, [u(Gn, {
3450
3699
  items: j(h).items.value,
3451
3700
  active: j(h).surfaceMode.value === "fullscreen",
3452
3701
  "active-index": j(h).activeIndex.value,
@@ -3458,6 +3707,8 @@ var Fr = ["aria-label"], Ir = {
3458
3707
  "report-asset-error": j(g).report,
3459
3708
  "report-asset-load": j(_).report,
3460
3709
  "empty-state-mode": d.emptyStateMode,
3710
+ "loop-fullscreen-video": d.loopFullscreenVideo ?? !0,
3711
+ "show-dominant-image-tone": d.showDominantImageTone ?? !0,
3461
3712
  "show-end-badge": d.showEndBadge ?? !0,
3462
3713
  "show-status-badges": d.showStatusBadges ?? !0,
3463
3714
  "show-back-to-list": j(h).showBackToList.value,
@@ -3506,17 +3757,19 @@ var Fr = ["aria-label"], Ir = {
3506
3757
  "report-asset-error",
3507
3758
  "report-asset-load",
3508
3759
  "empty-state-mode",
3760
+ "loop-fullscreen-video",
3761
+ "show-dominant-image-tone",
3509
3762
  "show-end-badge",
3510
3763
  "show-status-badges",
3511
3764
  "show-back-to-list",
3512
3765
  "onBackToList",
3513
3766
  "onUpdate:activeIndex"
3514
- ])], 8, si), [[P, j(h).surfaceMode.value === "fullscreen"]])]),
3767
+ ])], 8, Ci), [[P, j(h).surfaceMode.value === "fullscreen"]])]),
3515
3768
  _: 3
3516
- })], 64)) : j(h).items.value.length === 0 && j(h).loading.value ? (S(), s("div", ci, [u(j(re), {
3769
+ })], 64)) : j(h).items.value.length === 0 && j(h).loading.value ? (S(), s("div", wi, [u(j(re), {
3517
3770
  class: "size-10 animate-spin text-[#f7f1ea]/82",
3518
3771
  "aria-hidden": "true"
3519
- }), n[1] ||= c("p", { class: "m-0 text-[0.9rem] font-semibold uppercase tracking-[0.22em] text-[#f7f1ea]/72" }, " Loading... ", -1)])) : (S(), a(An, {
3772
+ }), n[1] ||= c("p", { class: "m-0 text-[0.9rem] font-semibold uppercase tracking-[0.22em] text-[#f7f1ea]/72" }, " Loading... ", -1)])) : (S(), a(Gn, {
3520
3773
  key: 4,
3521
3774
  items: j(h).items.value,
3522
3775
  active: !0,
@@ -3529,6 +3782,8 @@ var Fr = ["aria-label"], Ir = {
3529
3782
  "report-asset-error": j(g).report,
3530
3783
  "report-asset-load": j(_).report,
3531
3784
  "empty-state-mode": d.emptyStateMode,
3785
+ "loop-fullscreen-video": d.loopFullscreenVideo ?? !0,
3786
+ "show-dominant-image-tone": d.showDominantImageTone ?? !0,
3532
3787
  "show-end-badge": d.showEndBadge ?? !0,
3533
3788
  "show-status-badges": d.showStatusBadges ?? !0,
3534
3789
  "show-back-to-list": !1,
@@ -3576,14 +3831,16 @@ var Fr = ["aria-label"], Ir = {
3576
3831
  "report-asset-error",
3577
3832
  "report-asset-load",
3578
3833
  "empty-state-mode",
3834
+ "loop-fullscreen-video",
3835
+ "show-dominant-image-tone",
3579
3836
  "show-end-badge",
3580
3837
  "show-status-badges",
3581
3838
  "onBackToList",
3582
3839
  "onUpdate:activeIndex"
3583
- ]))], 8, ii));
3840
+ ]))], 8, bi));
3584
3841
  }
3585
- }), ui = { install(e) {
3586
- e.component("VibeLayout", li);
3842
+ }), Ei = { install(e) {
3843
+ e.component("VibeLayout", Ti);
3587
3844
  } };
3588
3845
  //#endregion
3589
- export { li as VibeLayout, ui as VibePlugin, ui as default };
3846
+ export { Ti as VibeLayout, Ei as VibePlugin, Ei as default };