@wyxos/vibe 3.1.16 → 3.1.18
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/components/viewer-core/autoBuckets.d.ts +3 -1
- package/lib/components/viewer-core/autoResolveCursors.d.ts +15 -0
- package/lib/components/viewer-core/autoResolveState.d.ts +6 -1
- package/lib/index.cjs +1 -1
- package/lib/index.js +503 -452
- package/lib/style.css +1 -1
- package/package.json +1 -1
package/lib/index.js
CHANGED
|
@@ -341,43 +341,36 @@ function Ae(e, t, n) {
|
|
|
341
341
|
nextSequence: r.nextSequence
|
|
342
342
|
};
|
|
343
343
|
}
|
|
344
|
-
function je(e, t, n
|
|
345
|
-
let
|
|
344
|
+
function je(e, t, n) {
|
|
345
|
+
let r = /* @__PURE__ */ new Map(), i = e.map((e) => ({
|
|
346
346
|
item: e,
|
|
347
347
|
matchIndex: null,
|
|
348
348
|
occurrenceKey: null
|
|
349
|
-
})),
|
|
349
|
+
})), a = /* @__PURE__ */ new Map(), o = [], s = n;
|
|
350
350
|
for (let [e, n] of t.entries()) {
|
|
351
|
-
let t =
|
|
351
|
+
let t = r.get(n.id), i = {
|
|
352
352
|
index: e,
|
|
353
353
|
occurrenceKey: $(n)
|
|
354
354
|
};
|
|
355
|
-
t ? t.push(
|
|
355
|
+
t ? t.push(i) : r.set(n.id, [i]);
|
|
356
356
|
}
|
|
357
|
-
for (let e of
|
|
358
|
-
let t =
|
|
357
|
+
for (let e of i) {
|
|
358
|
+
let t = r.get(e.item.id)?.shift();
|
|
359
359
|
t && (e.matchIndex = t.index, e.occurrenceKey = t.occurrenceKey);
|
|
360
360
|
}
|
|
361
|
-
let
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
for (let e = a.length - 1; e >= 0; --e) d[e] = f, a[e].matchIndex !== null && (f = a[e].matchIndex);
|
|
365
|
-
for (let [e, n] of a.entries()) {
|
|
366
|
-
if (n.matchIndex !== null && n.occurrenceKey) {
|
|
367
|
-
o.set(n.matchIndex, Me(n.item, n.occurrenceKey));
|
|
361
|
+
for (let e of i) {
|
|
362
|
+
if (e.matchIndex !== null && e.occurrenceKey) {
|
|
363
|
+
a.set(e.matchIndex, Me(e.item, e.occurrenceKey));
|
|
368
364
|
continue;
|
|
369
365
|
}
|
|
370
|
-
let
|
|
371
|
-
|
|
372
|
-
}
|
|
373
|
-
let p = [];
|
|
374
|
-
for (let e = 0; e <= t.length; e += 1) {
|
|
375
|
-
let n = s.get(e);
|
|
376
|
-
n?.length && p.push(...n), !(e >= t.length) && p.push(o.get(e) ?? t[e]);
|
|
366
|
+
let t = Me(e.item, `vibe-occurrence-${s += 1}`);
|
|
367
|
+
o.push(t);
|
|
377
368
|
}
|
|
369
|
+
let c = t.map((e, t) => a.get(t) ?? e);
|
|
378
370
|
return {
|
|
379
|
-
|
|
380
|
-
|
|
371
|
+
insertedCount: o.length,
|
|
372
|
+
items: [...c, ...o],
|
|
373
|
+
nextSequence: s
|
|
381
374
|
};
|
|
382
375
|
}
|
|
383
376
|
function Me(e, t) {
|
|
@@ -398,20 +391,23 @@ function Pe(e) {
|
|
|
398
391
|
cursor: e.cursor,
|
|
399
392
|
items: t.items,
|
|
400
393
|
nextCursor: e.nextCursor,
|
|
394
|
+
nextCursorExhausted: e.nextCursorExhausted ?? !1,
|
|
401
395
|
previousCursor: e.previousCursor
|
|
402
396
|
},
|
|
403
397
|
nextSequence: t.nextSequence
|
|
404
398
|
};
|
|
405
399
|
}
|
|
406
400
|
function Fe(e) {
|
|
407
|
-
let t = je(e.nextItems, e.previousItems, e.sequence
|
|
401
|
+
let t = je(e.nextItems, e.previousItems, e.sequence);
|
|
408
402
|
return {
|
|
409
403
|
bucket: {
|
|
410
404
|
cursor: e.cursor,
|
|
411
405
|
items: t.items,
|
|
412
406
|
nextCursor: e.nextCursor,
|
|
407
|
+
nextCursorExhausted: e.nextCursorExhausted ?? !1,
|
|
413
408
|
previousCursor: e.previousCursor
|
|
414
409
|
},
|
|
410
|
+
insertedCount: t.insertedCount,
|
|
415
411
|
nextSequence: t.nextSequence
|
|
416
412
|
};
|
|
417
413
|
}
|
|
@@ -432,6 +428,7 @@ function Le(e) {
|
|
|
432
428
|
let t = Pe({
|
|
433
429
|
cursor: e.initialState.cursor,
|
|
434
430
|
nextCursor: e.initialState.nextCursor ?? null,
|
|
431
|
+
nextCursorExhausted: !1,
|
|
435
432
|
nextItems: e.initialState.items,
|
|
436
433
|
previousCursor: e.initialState.previousCursor ?? null,
|
|
437
434
|
previousItems: [],
|
|
@@ -456,15 +453,66 @@ function Be(e, t, n) {
|
|
|
456
453
|
return e ? De(e, t) < n : !1;
|
|
457
454
|
}
|
|
458
455
|
//#endregion
|
|
456
|
+
//#region src/components/viewer-core/autoResolveCursors.ts
|
|
457
|
+
function Ve(e, t) {
|
|
458
|
+
return e.find((e) => De(e, t) > 0) ?? e[0] ?? null;
|
|
459
|
+
}
|
|
460
|
+
function He(e, t) {
|
|
461
|
+
for (let n = e.length - 1; n >= 0; --n) {
|
|
462
|
+
let r = e[n];
|
|
463
|
+
if (De(r, t) > 0) return r;
|
|
464
|
+
}
|
|
465
|
+
return e[e.length - 1] ?? null;
|
|
466
|
+
}
|
|
467
|
+
function Ue(e) {
|
|
468
|
+
return !e?.nextCursor || !e.nextCursorExhausted ? null : e.nextCursor;
|
|
469
|
+
}
|
|
470
|
+
function We(e, t, n, r) {
|
|
471
|
+
return t === void 0 || n === null ? e : e.map((e) => e.cursor !== t || e.nextCursor !== n ? e : {
|
|
472
|
+
...e,
|
|
473
|
+
nextCursorExhausted: r
|
|
474
|
+
});
|
|
475
|
+
}
|
|
476
|
+
function Ge(e, t, n) {
|
|
477
|
+
return n || e !== "forward" || t === null ? {
|
|
478
|
+
cursor: n,
|
|
479
|
+
exhausted: !1
|
|
480
|
+
} : {
|
|
481
|
+
cursor: t,
|
|
482
|
+
exhausted: !0
|
|
483
|
+
};
|
|
484
|
+
}
|
|
485
|
+
function Ke(e, t) {
|
|
486
|
+
if (t) return {
|
|
487
|
+
cursor: t,
|
|
488
|
+
exhausted: !1
|
|
489
|
+
};
|
|
490
|
+
let n = e.nextCursor ?? e.cursor;
|
|
491
|
+
return {
|
|
492
|
+
cursor: n,
|
|
493
|
+
exhausted: !!n
|
|
494
|
+
};
|
|
495
|
+
}
|
|
496
|
+
function qe(e, t) {
|
|
497
|
+
let n = e.findIndex((e) => De(e, t) > 0);
|
|
498
|
+
if (n < 0) return e;
|
|
499
|
+
let r = n;
|
|
500
|
+
for (let i = e.length - 1; i >= n; --i) if (De(e[i], t) > 0) {
|
|
501
|
+
r = i;
|
|
502
|
+
break;
|
|
503
|
+
}
|
|
504
|
+
return e.slice(n, r + 1);
|
|
505
|
+
}
|
|
506
|
+
//#endregion
|
|
459
507
|
//#region src/components/viewer-core/fillDelay.ts
|
|
460
|
-
var
|
|
461
|
-
function
|
|
508
|
+
var Je = 2e3, Ye = 1e3, Xe = 100;
|
|
509
|
+
function Ze(e, t = Je, n = Ye) {
|
|
462
510
|
return t + Math.max(0, e - 1) * n;
|
|
463
511
|
}
|
|
464
|
-
function
|
|
512
|
+
function Qe(e, t) {
|
|
465
513
|
return !Number.isFinite(e) || e == null || e < 0 ? t : Math.floor(e);
|
|
466
514
|
}
|
|
467
|
-
function
|
|
515
|
+
function $e() {
|
|
468
516
|
let e = D(null), t = null, n = null, r = null;
|
|
469
517
|
function i(i = !1) {
|
|
470
518
|
if (t &&= (clearInterval(t), null), n &&= (clearTimeout(n), null), e.value = null, i && r) {
|
|
@@ -482,7 +530,7 @@ function Ke() {
|
|
|
482
530
|
let t = Math.max(0, a - (Date.now() - s));
|
|
483
531
|
e.value = t, t <= 0 && l();
|
|
484
532
|
};
|
|
485
|
-
t = setInterval(u,
|
|
533
|
+
t = setInterval(u, Xe), n = setTimeout(l, a), u();
|
|
486
534
|
}));
|
|
487
535
|
}
|
|
488
536
|
return {
|
|
@@ -493,8 +541,8 @@ function Ke() {
|
|
|
493
541
|
}
|
|
494
542
|
//#endregion
|
|
495
543
|
//#region src/components/viewer-core/useAutoResolveSource.ts
|
|
496
|
-
function
|
|
497
|
-
let t = !!e.initialState?.items.length, n = D([]), r = D(0), a = D([]), o = D(!1), s = D(null), c = D(!t && typeof e.resolve == "function" ? "initializing" : "idle"), l = D(null), u = D(null), d =
|
|
544
|
+
function et(e) {
|
|
545
|
+
let t = !!e.initialState?.items.length, n = D([]), r = D(0), a = D([]), o = D(!1), s = D(null), c = D(!t && typeof e.resolve == "function" ? "initializing" : "idle"), l = D(null), u = D(null), d = $e(), f = d.remainingMs, p = D(null), m = D(!1), h = D(!0), g = D(!1), _ = /* @__PURE__ */ new Set(), v = null, y = null, b = 0, C = 0, w = i(() => Qe(e.fillDelayMs, Je)), T = i(() => Qe(e.fillDelayStepMs, Ye)), E = i(() => typeof e.resolve == "function"), O = i(() => Q(e.pageSize)), k = i(() => we(n.value)), A = i(() => Te(k.value, e.removedIds.value)), j = i(() => r.value), M = i(() => ge(c.value) || m.value), N = i(() => Ve(n.value, e.removedIds.value)), P = i(() => He(n.value, e.removedIds.value)), F = i(() => P.value?.nextCursor ?? null), I = i(() => o.value ? null : N.value?.previousCursor ?? null), R = i(() => !!F.value && P.value?.nextCursorExhausted !== !0), z = i(() => !!I.value), B = i(() => E.value && n.value.length > 0), ee = i(() => Te(we(a.value), e.removedIds.value)), te = i(() => Oe(n.value, e.removedIds.value, j.value)), V = i(() => !A.value.length && !M.value && !!s.value);
|
|
498
546
|
L(() => A.value.length, (e) => {
|
|
499
547
|
if (e === 0) {
|
|
500
548
|
r.value = 0;
|
|
@@ -522,20 +570,37 @@ function qe(e) {
|
|
|
522
570
|
}
|
|
523
571
|
async function U() {
|
|
524
572
|
if (g.value || M.value) return;
|
|
525
|
-
let e = !A.value.length
|
|
526
|
-
|
|
573
|
+
let e = !A.value.length, t = P.value, n = {
|
|
574
|
+
commitImmediately: e,
|
|
575
|
+
originCursor: t?.cursor ?? null
|
|
576
|
+
}, r = Ue(t);
|
|
577
|
+
if (he("trailing")) {
|
|
527
578
|
if (!B.value) return;
|
|
528
|
-
let
|
|
529
|
-
|
|
579
|
+
let e = await X("trailing");
|
|
580
|
+
e?.followCursor && (e.itemsInserted === 0 || he("trailing")) && await le(e.followCursor, n);
|
|
530
581
|
return;
|
|
531
582
|
}
|
|
532
|
-
|
|
583
|
+
if (r) {
|
|
584
|
+
if (t?.cursor === r) {
|
|
585
|
+
let e = await X("trailing");
|
|
586
|
+
e?.followCursor && e.itemsInserted === 0 && await le(e.followCursor, n);
|
|
587
|
+
return;
|
|
588
|
+
}
|
|
589
|
+
await le(r, n);
|
|
590
|
+
return;
|
|
591
|
+
}
|
|
592
|
+
if (!R.value) {
|
|
593
|
+
let e = B.value ? await X("trailing") : null;
|
|
594
|
+
e?.followCursor && e.itemsInserted === 0 && await le(e.followCursor, n);
|
|
595
|
+
return;
|
|
596
|
+
}
|
|
597
|
+
await le(F.value, n);
|
|
533
598
|
}
|
|
534
599
|
async function W() {
|
|
535
600
|
if (!(g.value || !z.value || M.value)) {
|
|
536
601
|
if (he("leading")) {
|
|
537
602
|
let e = await X("leading");
|
|
538
|
-
e?.
|
|
603
|
+
e?.itemsInserted === 0 && e.followCursor && await ue(e.followCursor);
|
|
539
604
|
return;
|
|
540
605
|
}
|
|
541
606
|
await ue(I.value);
|
|
@@ -620,6 +685,7 @@ function qe(e) {
|
|
|
620
685
|
phase: "loading"
|
|
621
686
|
});
|
|
622
687
|
if (r) {
|
|
688
|
+
if (!r.visibleCount) return n.value = We(n.value, t.originCursor, e, !0), a.value = [], m.value = !1, Z();
|
|
623
689
|
if (r.canceled) return n.value = [...n.value, ...r.buckets], a.value = [], m.value = !1, Z();
|
|
624
690
|
if (a.value = r.buckets, t.commitImmediately || !ee.value.length) return n.value = [...n.value, ...a.value], a.value = [], m.value = !1, Z();
|
|
625
691
|
m.value = !0;
|
|
@@ -657,20 +723,20 @@ function qe(e) {
|
|
|
657
723
|
signal: o?.signal
|
|
658
724
|
});
|
|
659
725
|
if (a !== b) return Z(), null;
|
|
660
|
-
let s = Fe({
|
|
726
|
+
let s = Ke(r, i.nextPage), c = Fe({
|
|
661
727
|
cursor: r.cursor,
|
|
662
|
-
|
|
663
|
-
|
|
728
|
+
nextCursor: s.cursor,
|
|
729
|
+
nextCursorExhausted: s.exhausted,
|
|
664
730
|
nextItems: i.items,
|
|
665
731
|
previousCursor: i.previousPage ?? null,
|
|
666
732
|
previousItems: r.items,
|
|
667
733
|
sequence: C
|
|
668
734
|
});
|
|
669
|
-
C =
|
|
670
|
-
let
|
|
671
|
-
return n.value = ke(n.value, r.cursor,
|
|
735
|
+
C = c.nextSequence;
|
|
736
|
+
let l = ae();
|
|
737
|
+
return n.value = ke(n.value, r.cursor, c.bucket), oe(l), Z(), {
|
|
672
738
|
followCursor: t === "leading" ? i.previousPage ?? null : i.nextPage,
|
|
673
|
-
|
|
739
|
+
itemsInserted: c.insertedCount
|
|
674
740
|
};
|
|
675
741
|
} catch (e) {
|
|
676
742
|
return Ne(e) || a !== b ? (Z(), null) : (s.value = e instanceof Error ? e.message : "The viewer could not load items.", c.value = "failed", l.value = null, u.value = null, p.value = null, null);
|
|
@@ -696,25 +762,26 @@ function qe(e) {
|
|
|
696
762
|
signal: m?.signal
|
|
697
763
|
});
|
|
698
764
|
if (n !== b) return Ie(i, t.direction, e.removedIds.value, !0);
|
|
699
|
-
let s = fe({
|
|
765
|
+
let s = Ge(t.direction, a, r.nextPage), f = fe({
|
|
700
766
|
cursor: a,
|
|
701
|
-
nextCursor:
|
|
767
|
+
nextCursor: s.cursor,
|
|
768
|
+
nextCursorExhausted: s.exhausted,
|
|
702
769
|
nextItems: r.items,
|
|
703
770
|
previousCursor: r.previousPage ?? null,
|
|
704
771
|
previousItems: []
|
|
705
772
|
});
|
|
706
|
-
i.push(
|
|
707
|
-
let
|
|
708
|
-
if (!t.continueUntilFilled ||
|
|
773
|
+
i.push(f);
|
|
774
|
+
let h = i.reduce((t, n) => t + De(n, e.removedIds.value), 0), _ = t.direction === "forward" ? f.nextCursorExhausted ? null : f.nextCursor : f.previousCursor;
|
|
775
|
+
if (!t.continueUntilFilled || h >= O.value || !_) return u.value = null, {
|
|
709
776
|
canceled: !1,
|
|
710
777
|
buckets: t.direction === "backward" ? [...i].reverse() : i,
|
|
711
|
-
visibleCount:
|
|
778
|
+
visibleCount: h
|
|
712
779
|
};
|
|
713
780
|
if (g.value) return Ie(i, t.direction, e.removedIds.value, !1);
|
|
714
|
-
c.value = "filling", l.value =
|
|
715
|
-
let
|
|
716
|
-
if (await d.wait(
|
|
717
|
-
a =
|
|
781
|
+
c.value = "filling", l.value = h, u.value = _, p.value = O.value, o += 1;
|
|
782
|
+
let v = Ze(o, w.value, T.value);
|
|
783
|
+
if (await d.wait(v), n !== b) return Ie(i, t.direction, e.removedIds.value, !0);
|
|
784
|
+
a = _;
|
|
718
785
|
} catch (r) {
|
|
719
786
|
return Ne(r) || n !== b ? Ie(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, u.value = null, p.value = null, null);
|
|
720
787
|
} finally {
|
|
@@ -727,6 +794,7 @@ function qe(e) {
|
|
|
727
794
|
let t = Pe({
|
|
728
795
|
cursor: e.cursor,
|
|
729
796
|
nextCursor: e.nextCursor,
|
|
797
|
+
nextCursorExhausted: e.nextCursorExhausted ?? !1,
|
|
730
798
|
nextItems: e.nextItems,
|
|
731
799
|
previousCursor: e.previousCursor,
|
|
732
800
|
previousItems: e.previousItems,
|
|
@@ -753,14 +821,7 @@ function qe(e) {
|
|
|
753
821
|
return Be(t === "leading" ? N.value : P.value, e.removedIds.value, O.value);
|
|
754
822
|
}
|
|
755
823
|
function ye() {
|
|
756
|
-
|
|
757
|
-
if (t < 0) return;
|
|
758
|
-
let r = t;
|
|
759
|
-
for (let i = n.value.length - 1; i >= t; --i) if (De(n.value[i], e.removedIds.value) > 0) {
|
|
760
|
-
r = i;
|
|
761
|
-
break;
|
|
762
|
-
}
|
|
763
|
-
n.value = n.value.slice(t, r + 1);
|
|
824
|
+
n.value = qe(n.value, e.removedIds.value);
|
|
764
825
|
}
|
|
765
826
|
return {
|
|
766
827
|
activeIndex: j,
|
|
@@ -798,20 +859,10 @@ function qe(e) {
|
|
|
798
859
|
maybeCommitPendingAppendWhenFilteredOut: se
|
|
799
860
|
};
|
|
800
861
|
}
|
|
801
|
-
function Je(e, t) {
|
|
802
|
-
return e.find((e) => De(e, t) > 0) ?? e[0] ?? null;
|
|
803
|
-
}
|
|
804
|
-
function Ye(e, t) {
|
|
805
|
-
for (let n = e.length - 1; n >= 0; --n) {
|
|
806
|
-
let r = e[n];
|
|
807
|
-
if (De(r, t) > 0) return r;
|
|
808
|
-
}
|
|
809
|
-
return e[e.length - 1] ?? null;
|
|
810
|
-
}
|
|
811
862
|
//#endregion
|
|
812
863
|
//#region src/components/viewer-core/useDataSource.ts
|
|
813
|
-
function
|
|
814
|
-
let { clearRemoved: n, getRemovedIds: r, remove: a, removedIds: o, restore: s, undo: c } = Se(), l =
|
|
864
|
+
function tt(e, t) {
|
|
865
|
+
let { clearRemoved: n, getRemovedIds: r, remove: a, removedIds: o, restore: s, undo: c } = Se(), l = et({
|
|
815
866
|
emit: t,
|
|
816
867
|
fillDelayMs: e.fillDelayMs,
|
|
817
868
|
fillDelayStepMs: e.fillDelayStepMs,
|
|
@@ -906,9 +957,9 @@ function Xe(e, t) {
|
|
|
906
957
|
}
|
|
907
958
|
//#endregion
|
|
908
959
|
//#region src/components/viewer-core/useController.ts
|
|
909
|
-
var
|
|
910
|
-
function
|
|
911
|
-
let n =
|
|
960
|
+
var nt = 1024;
|
|
961
|
+
function rt(e, t) {
|
|
962
|
+
let n = tt(e, t), r = T({
|
|
912
963
|
nextBoundaryLoadProgress: 0,
|
|
913
964
|
previousBoundaryLoadProgress: 0
|
|
914
965
|
}), a = D(0), o = D("list"), s = T({
|
|
@@ -932,7 +983,7 @@ function Qe(e, t) {
|
|
|
932
983
|
removedCount: 0,
|
|
933
984
|
removedIds: [],
|
|
934
985
|
surfaceMode: "list"
|
|
935
|
-
}), c = i(() => a.value >=
|
|
986
|
+
}), c = i(() => a.value >= nt), l = i(() => c.value ? o.value : "fullscreen"), u = i(() => c.value && l.value === "fullscreen");
|
|
936
987
|
L(c, (e) => {
|
|
937
988
|
e && h();
|
|
938
989
|
}), L(() => e.surfaceMode, () => {
|
|
@@ -971,7 +1022,7 @@ function Qe(e, t) {
|
|
|
971
1022
|
!c.value || !e.surfaceMode || e.surfaceMode === o.value || (o.value = e.surfaceMode);
|
|
972
1023
|
}
|
|
973
1024
|
function g(e) {
|
|
974
|
-
r.nextBoundaryLoadProgress =
|
|
1025
|
+
r.nextBoundaryLoadProgress = it(e.nextBoundaryLoadProgress), r.previousBoundaryLoadProgress = it(e.previousBoundaryLoadProgress);
|
|
975
1026
|
}
|
|
976
1027
|
return {
|
|
977
1028
|
...n,
|
|
@@ -990,26 +1041,26 @@ function Qe(e, t) {
|
|
|
990
1041
|
unlockPageLoading: n.unlockPageLoading
|
|
991
1042
|
};
|
|
992
1043
|
}
|
|
993
|
-
function
|
|
1044
|
+
function it(e) {
|
|
994
1045
|
return Math.min(Math.max(e, 0), 1);
|
|
995
1046
|
}
|
|
996
1047
|
//#endregion
|
|
997
1048
|
//#region src/components/FullscreenMediaBar.vue?vue&type=script&setup=true&lang.ts
|
|
998
|
-
var
|
|
1049
|
+
var at = {
|
|
999
1050
|
"data-testid": "vibe-media-bar",
|
|
1000
1051
|
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]"
|
|
1001
|
-
},
|
|
1052
|
+
}, ot = { 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]" }, st = { class: "text-[0.76rem] font-bold uppercase tracking-[0.18em] text-[#f7f1ea]/74" }, ct = { class: "relative h-4 w-full" }, lt = [
|
|
1002
1053
|
"max",
|
|
1003
1054
|
"value",
|
|
1004
1055
|
"disabled"
|
|
1005
|
-
],
|
|
1056
|
+
], ut = { class: "text-[0.76rem] font-bold uppercase tracking-[0.18em] text-[#f7f1ea]/74" }, dt = ["data-layout"], ft = {
|
|
1006
1057
|
key: 0,
|
|
1007
1058
|
"data-testid": "vibe-media-volume-popover",
|
|
1008
1059
|
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]"
|
|
1009
|
-
},
|
|
1060
|
+
}, pt = { class: "relative flex h-28 w-4 items-center justify-center" }, mt = ["value"], ht = { class: "flex items-center gap-3" }, gt = ["aria-label"], _t = {
|
|
1010
1061
|
key: 0,
|
|
1011
1062
|
class: "relative h-4 w-24"
|
|
1012
|
-
},
|
|
1063
|
+
}, vt = ["value"], yt = /* @__PURE__ */ d({
|
|
1013
1064
|
__name: "FullscreenMediaBar",
|
|
1014
1065
|
props: {
|
|
1015
1066
|
currentTime: {},
|
|
@@ -1052,9 +1103,9 @@ var et = {
|
|
|
1052
1103
|
function C(e, t, n) {
|
|
1053
1104
|
return Math.min(Math.max(e, t), n);
|
|
1054
1105
|
}
|
|
1055
|
-
return (e, t) => (w(), s("div",
|
|
1056
|
-
c("span",
|
|
1057
|
-
c("div",
|
|
1106
|
+
return (e, t) => (w(), s("div", at, [c("div", ot, [
|
|
1107
|
+
c("span", st, j(n.currentTimeLabel), 1),
|
|
1108
|
+
c("div", ct, [
|
|
1058
1109
|
t[3] ||= c("div", { class: "absolute inset-x-0 top-1/2 h-px -translate-y-1/2 bg-white/12" }, null, -1),
|
|
1059
1110
|
c("div", {
|
|
1060
1111
|
class: "absolute left-0 top-1/2 h-px -translate-y-1/2 bg-[#f7f1ea]",
|
|
@@ -1071,16 +1122,16 @@ var et = {
|
|
|
1071
1122
|
disabled: n.duration <= 0,
|
|
1072
1123
|
class: "vibe-media-slider absolute inset-0 z-10 h-4 w-full cursor-pointer bg-transparent disabled:cursor-default disabled:opacity-50",
|
|
1073
1124
|
onInput: t[0] ||= (e) => r("seek-input", e)
|
|
1074
|
-
}, null, 40,
|
|
1125
|
+
}, null, 40, lt)
|
|
1075
1126
|
]),
|
|
1076
|
-
c("span",
|
|
1127
|
+
c("span", ut, j(n.durationLabel), 1),
|
|
1077
1128
|
c("div", {
|
|
1078
1129
|
ref_key: "rootRef",
|
|
1079
1130
|
ref: l,
|
|
1080
1131
|
"data-testid": "vibe-media-volume",
|
|
1081
1132
|
"data-layout": n.volumeControlLayout,
|
|
1082
1133
|
class: "relative flex items-center justify-end"
|
|
1083
|
-
}, [d.value && u.value ? (w(), s("div",
|
|
1134
|
+
}, [d.value && u.value ? (w(), s("div", ft, [c("div", pt, [
|
|
1084
1135
|
t[4] ||= c("div", { class: "absolute bottom-0 left-1/2 h-full w-px -translate-x-1/2 bg-white/12" }, null, -1),
|
|
1085
1136
|
c("div", {
|
|
1086
1137
|
class: "absolute bottom-0 left-1/2 w-px -translate-x-1/2 bg-[#f7f1ea]",
|
|
@@ -1097,8 +1148,8 @@ var et = {
|
|
|
1097
1148
|
value: f.value,
|
|
1098
1149
|
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",
|
|
1099
1150
|
onInput: t[1] ||= (e) => r("volume-input", e)
|
|
1100
|
-
}, null, 40,
|
|
1101
|
-
])])) : o("", !0), c("div",
|
|
1151
|
+
}, null, 40, mt)
|
|
1152
|
+
])])) : o("", !0), c("div", ht, [c("button", {
|
|
1102
1153
|
type: "button",
|
|
1103
1154
|
"data-testid": "vibe-media-volume-button",
|
|
1104
1155
|
"aria-label": g.value,
|
|
@@ -1107,7 +1158,7 @@ var et = {
|
|
|
1107
1158
|
}, [(w(), a(A(m.value), {
|
|
1108
1159
|
class: "h-4 w-4 stroke-[1.9]",
|
|
1109
1160
|
"aria-hidden": "true"
|
|
1110
|
-
}))], 8,
|
|
1161
|
+
}))], 8, gt), n.volumeControlLayout === "horizontal" ? (w(), s("div", _t, [
|
|
1111
1162
|
t[5] ||= c("div", { class: "absolute inset-x-0 top-1/2 h-px -translate-y-1/2 bg-white/12" }, null, -1),
|
|
1112
1163
|
c("div", {
|
|
1113
1164
|
class: "absolute left-0 top-1/2 h-px -translate-y-1/2 bg-[#f7f1ea]",
|
|
@@ -1124,24 +1175,24 @@ var et = {
|
|
|
1124
1175
|
value: f.value,
|
|
1125
1176
|
class: "vibe-media-slider absolute inset-0 z-10 h-4 w-full cursor-pointer bg-transparent",
|
|
1126
1177
|
onInput: t[2] ||= (e) => r("volume-input", e)
|
|
1127
|
-
}, null, 40,
|
|
1128
|
-
])) : o("", !0)])], 8,
|
|
1178
|
+
}, null, 40, vt)
|
|
1179
|
+
])) : o("", !0)])], 8, dt)
|
|
1129
1180
|
])]));
|
|
1130
1181
|
}
|
|
1131
|
-
}),
|
|
1182
|
+
}), bt = { class: "pointer-events-none absolute inset-0 z-[3] flex flex-col justify-between p-[clamp(1.25rem,2.6vw,2.25rem)]" }, xt = { class: "grid gap-4" }, St = { class: "flex min-h-11 items-center justify-between gap-4" }, Ct = { class: "min-w-0 flex flex-1 items-center gap-3" }, wt = {
|
|
1132
1183
|
key: 1,
|
|
1133
1184
|
"data-testid": "vibe-title",
|
|
1134
1185
|
class: "m-0 truncate text-left text-[0.82rem] leading-none tracking-[-0.04em] min-[721px]:text-[1.2rem]"
|
|
1135
|
-
},
|
|
1186
|
+
}, Tt = { class: "pointer-events-auto flex shrink-0 items-center gap-2" }, Et = {
|
|
1136
1187
|
"data-testid": "vibe-pagination",
|
|
1137
1188
|
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]"
|
|
1138
|
-
},
|
|
1189
|
+
}, Dt = { class: "whitespace-nowrap" }, Ot = {
|
|
1139
1190
|
key: 1,
|
|
1140
1191
|
class: "whitespace-nowrap border-l border-white/12 pl-2 text-[#f7f1ea]/56 min-[721px]:pl-3"
|
|
1141
|
-
},
|
|
1192
|
+
}, kt = {
|
|
1142
1193
|
key: 0,
|
|
1143
1194
|
class: "grid gap-2 max-[720px]:justify-items-start"
|
|
1144
|
-
},
|
|
1195
|
+
}, At = /* @__PURE__ */ d({
|
|
1145
1196
|
__name: "FullscreenHeader",
|
|
1146
1197
|
props: {
|
|
1147
1198
|
currentIndex: {},
|
|
@@ -1155,7 +1206,7 @@ var et = {
|
|
|
1155
1206
|
emits: ["back-to-list"],
|
|
1156
1207
|
setup(e, { emit: t }) {
|
|
1157
1208
|
let n = e, r = t;
|
|
1158
|
-
return (e, t) => (w(), s("div",
|
|
1209
|
+
return (e, t) => (w(), s("div", bt, [c("div", xt, [c("div", St, [c("div", Ct, [n.showBackToList ? (w(), s("button", {
|
|
1159
1210
|
key: 0,
|
|
1160
1211
|
type: "button",
|
|
1161
1212
|
"data-testid": "vibe-back-to-list",
|
|
@@ -1165,47 +1216,47 @@ var et = {
|
|
|
1165
1216
|
}, [u(N(re), {
|
|
1166
1217
|
class: "h-4 w-4 stroke-[2.2]",
|
|
1167
1218
|
"aria-hidden": "true"
|
|
1168
|
-
})])) : o("", !0), n.title ? (w(), s("h2",
|
|
1219
|
+
})])) : o("", !0), n.title ? (w(), s("h2", wt, j(n.title), 1)) : o("", !0)]), c("div", Tt, [c("span", Et, [
|
|
1169
1220
|
n.loading ? (w(), a(N(oe), {
|
|
1170
1221
|
key: 0,
|
|
1171
1222
|
"data-testid": "vibe-pagination-spinner",
|
|
1172
1223
|
class: "h-3.5 w-3.5 animate-spin stroke-[1.9]",
|
|
1173
1224
|
"aria-hidden": "true"
|
|
1174
1225
|
})) : o("", !0),
|
|
1175
|
-
c("span",
|
|
1176
|
-
n.paginationDetail ? (w(), s("span",
|
|
1177
|
-
]), k(e.$slots, "actions")])])]), n.showEndBadge ? (w(), s("div",
|
|
1226
|
+
c("span", Dt, j(n.currentIndex + 1) + " / " + j(n.total), 1),
|
|
1227
|
+
n.paginationDetail ? (w(), s("span", Ot, j(n.paginationDetail), 1)) : o("", !0)
|
|
1228
|
+
]), k(e.$slots, "actions")])])]), n.showEndBadge ? (w(), s("div", kt, [...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)]));
|
|
1178
1229
|
}
|
|
1179
|
-
}),
|
|
1230
|
+
}), jt = {
|
|
1180
1231
|
image: ae,
|
|
1181
1232
|
video: Y,
|
|
1182
1233
|
audio: J,
|
|
1183
1234
|
other: ie
|
|
1184
|
-
},
|
|
1235
|
+
}, Mt = {
|
|
1185
1236
|
image: "Image",
|
|
1186
1237
|
video: "Video",
|
|
1187
1238
|
audio: "Audio",
|
|
1188
1239
|
other: "File"
|
|
1189
1240
|
};
|
|
1190
|
-
function
|
|
1191
|
-
return
|
|
1241
|
+
function Nt(e) {
|
|
1242
|
+
return jt[e];
|
|
1192
1243
|
}
|
|
1193
|
-
function
|
|
1194
|
-
return
|
|
1244
|
+
function Pt(e) {
|
|
1245
|
+
return Mt[e];
|
|
1195
1246
|
}
|
|
1196
1247
|
//#endregion
|
|
1197
1248
|
//#region src/components/viewer-core/useAssetLoadQueue.ts
|
|
1198
|
-
var
|
|
1249
|
+
var Ft = {
|
|
1199
1250
|
maxGlobal: 10,
|
|
1200
1251
|
maxPerDomain: 4,
|
|
1201
1252
|
maxVideoPerDomain: 2
|
|
1202
1253
|
};
|
|
1203
|
-
function
|
|
1254
|
+
function It(e = Ft) {
|
|
1204
1255
|
let t = /* @__PURE__ */ new Map(), n = /* @__PURE__ */ new Map(), r = 0;
|
|
1205
1256
|
function i(e) {
|
|
1206
1257
|
let i = {
|
|
1207
1258
|
...e,
|
|
1208
|
-
domain:
|
|
1259
|
+
domain: zt(e.url),
|
|
1209
1260
|
enqueuedAt: r,
|
|
1210
1261
|
id: `vibe-asset-load-${r += 1}`
|
|
1211
1262
|
};
|
|
@@ -1224,7 +1275,7 @@ function jt(e = At) {
|
|
|
1224
1275
|
function a() {
|
|
1225
1276
|
if (n.size === 0) return;
|
|
1226
1277
|
let r = [...n.values()].sort((e, t) => {
|
|
1227
|
-
let n =
|
|
1278
|
+
let n = Rt(e) - Rt(t);
|
|
1228
1279
|
return n === 0 ? e.enqueuedAt - t.enqueuedAt : n;
|
|
1229
1280
|
});
|
|
1230
1281
|
for (let i of r) {
|
|
@@ -1245,8 +1296,8 @@ function jt(e = At) {
|
|
|
1245
1296
|
}
|
|
1246
1297
|
return { request: i };
|
|
1247
1298
|
}
|
|
1248
|
-
var
|
|
1249
|
-
function
|
|
1299
|
+
var Lt = It();
|
|
1300
|
+
function Rt(e) {
|
|
1250
1301
|
try {
|
|
1251
1302
|
let t = e.getPriority();
|
|
1252
1303
|
return Number.isFinite(t) ? t : Infinity;
|
|
@@ -1254,7 +1305,7 @@ function Nt(e) {
|
|
|
1254
1305
|
return Infinity;
|
|
1255
1306
|
}
|
|
1256
1307
|
}
|
|
1257
|
-
function
|
|
1308
|
+
function zt(e) {
|
|
1258
1309
|
try {
|
|
1259
1310
|
return new URL(e).hostname || "local";
|
|
1260
1311
|
} catch {
|
|
@@ -1263,19 +1314,19 @@ function Pt(e) {
|
|
|
1263
1314
|
}
|
|
1264
1315
|
//#endregion
|
|
1265
1316
|
//#region src/components/viewer-core/useFullscreenPreloadController.ts
|
|
1266
|
-
var
|
|
1317
|
+
var Bt = [
|
|
1267
1318
|
0,
|
|
1268
1319
|
1,
|
|
1269
1320
|
2,
|
|
1270
1321
|
3
|
|
1271
|
-
],
|
|
1322
|
+
], Vt = {
|
|
1272
1323
|
0: 0,
|
|
1273
1324
|
1: 1,
|
|
1274
1325
|
2: 2,
|
|
1275
1326
|
3: 3
|
|
1276
1327
|
};
|
|
1277
|
-
function
|
|
1278
|
-
let t = D({}), n =
|
|
1328
|
+
function Ht(e) {
|
|
1329
|
+
let t = D({}), n = It({
|
|
1279
1330
|
maxGlobal: 3,
|
|
1280
1331
|
maxPerDomain: 3,
|
|
1281
1332
|
maxVideoPerDomain: 3
|
|
@@ -1300,14 +1351,14 @@ function Lt(e) {
|
|
|
1300
1351
|
}
|
|
1301
1352
|
function l(e, t) {
|
|
1302
1353
|
if (t instanceof HTMLImageElement) {
|
|
1303
|
-
i.set(e, t),
|
|
1354
|
+
i.set(e, t), Wt(t) && d(e);
|
|
1304
1355
|
return;
|
|
1305
1356
|
}
|
|
1306
1357
|
i.delete(e);
|
|
1307
1358
|
}
|
|
1308
1359
|
function u(e, t) {
|
|
1309
1360
|
if (t instanceof HTMLMediaElement) {
|
|
1310
|
-
a.set(e, t),
|
|
1361
|
+
a.set(e, t), Gt(t) && d(e);
|
|
1311
1362
|
return;
|
|
1312
1363
|
}
|
|
1313
1364
|
a.delete(e);
|
|
@@ -1348,7 +1399,7 @@ function Lt(e) {
|
|
|
1348
1399
|
assetType: s.item.type === "image" ? "image" : "video",
|
|
1349
1400
|
getPriority: () => g(o.index),
|
|
1350
1401
|
onGrant: () => {
|
|
1351
|
-
y(s.key, !0), (e.isAssetReady(s.key, s.item) ||
|
|
1402
|
+
y(s.key, !0), (e.isAssetReady(s.key, s.item) || Ut(s.key, i, a)) && d(s.key);
|
|
1352
1403
|
},
|
|
1353
1404
|
url: s.item.url
|
|
1354
1405
|
})
|
|
@@ -1359,14 +1410,14 @@ function Lt(e) {
|
|
|
1359
1410
|
}
|
|
1360
1411
|
function h() {
|
|
1361
1412
|
let t = e.resolvedActiveIndex.value;
|
|
1362
|
-
return
|
|
1413
|
+
return Bt.map((e) => _(t + e)).filter((e) => !!e);
|
|
1363
1414
|
}
|
|
1364
1415
|
function g(t) {
|
|
1365
|
-
return e.active.value ?
|
|
1416
|
+
return e.active.value ? Vt[t - e.resolvedActiveIndex.value] ?? Infinity : Infinity;
|
|
1366
1417
|
}
|
|
1367
1418
|
function _(t) {
|
|
1368
1419
|
let n = e.items.value[t];
|
|
1369
|
-
return !n || !
|
|
1420
|
+
return !n || !Kt(n) ? null : {
|
|
1370
1421
|
index: t,
|
|
1371
1422
|
item: n,
|
|
1372
1423
|
key: e.getItemKey(n)
|
|
@@ -1415,26 +1466,26 @@ function Lt(e) {
|
|
|
1415
1466
|
shouldAttachSlideAsset: s
|
|
1416
1467
|
};
|
|
1417
1468
|
}
|
|
1418
|
-
function
|
|
1469
|
+
function Ut(e, t, n) {
|
|
1419
1470
|
let r = t.get(e);
|
|
1420
|
-
if (r) return
|
|
1471
|
+
if (r) return Wt(r);
|
|
1421
1472
|
let i = n.get(e);
|
|
1422
|
-
return i ?
|
|
1473
|
+
return i ? Gt(i) : !1;
|
|
1423
1474
|
}
|
|
1424
|
-
function
|
|
1475
|
+
function Wt(e) {
|
|
1425
1476
|
return e.complete && !!(e.currentSrc || e.getAttribute("src"));
|
|
1426
1477
|
}
|
|
1427
|
-
function
|
|
1478
|
+
function Gt(e) {
|
|
1428
1479
|
let t = typeof HTMLMediaElement > "u" ? 1 : HTMLMediaElement.HAVE_METADATA;
|
|
1429
1480
|
return e.readyState >= t;
|
|
1430
1481
|
}
|
|
1431
|
-
function
|
|
1482
|
+
function Kt(e) {
|
|
1432
1483
|
return e.type === "image" || e.type === "video" || e.type === "audio";
|
|
1433
1484
|
}
|
|
1434
1485
|
//#endregion
|
|
1435
1486
|
//#region src/components/viewer-core/useFullscreenSurfaceMedia.ts
|
|
1436
|
-
function
|
|
1437
|
-
let t =
|
|
1487
|
+
function qt(e) {
|
|
1488
|
+
let t = Ht({
|
|
1438
1489
|
active: e.active,
|
|
1439
1490
|
getItemKey: r,
|
|
1440
1491
|
isAssetReady: m,
|
|
@@ -1444,7 +1495,7 @@ function Ht(e) {
|
|
|
1444
1495
|
});
|
|
1445
1496
|
function n(e, t) {
|
|
1446
1497
|
let n = t.title?.trim();
|
|
1447
|
-
return n ? `${e} ${n}` : `${e} ${
|
|
1498
|
+
return n ? `${e} ${n}` : `${e} ${Pt(t.type).toLowerCase()}`;
|
|
1448
1499
|
}
|
|
1449
1500
|
function r(e) {
|
|
1450
1501
|
return $(e);
|
|
@@ -1507,11 +1558,11 @@ function Ht(e) {
|
|
|
1507
1558
|
}
|
|
1508
1559
|
//#endregion
|
|
1509
1560
|
//#region src/components/viewer-core/slotContent.ts
|
|
1510
|
-
function
|
|
1561
|
+
function Jt(e) {
|
|
1511
1562
|
if (!Array.isArray(e)) return !1;
|
|
1512
1563
|
for (let t of e) {
|
|
1513
1564
|
if (Array.isArray(t)) {
|
|
1514
|
-
if (
|
|
1565
|
+
if (Jt(t)) return !0;
|
|
1515
1566
|
continue;
|
|
1516
1567
|
}
|
|
1517
1568
|
if (!h(t)) {
|
|
@@ -1522,20 +1573,20 @@ function Ut(e) {
|
|
|
1522
1573
|
if (t != null && t !== !1) return !0;
|
|
1523
1574
|
continue;
|
|
1524
1575
|
}
|
|
1525
|
-
if (!
|
|
1576
|
+
if (!Yt(t)) return !0;
|
|
1526
1577
|
}
|
|
1527
1578
|
return !1;
|
|
1528
1579
|
}
|
|
1529
|
-
function
|
|
1530
|
-
return r.type === e ? !0 : r.type === n ? typeof r.children == "string" ? r.children.trim().length === 0 : !0 : r.type === t ? !
|
|
1580
|
+
function Yt(r) {
|
|
1581
|
+
return r.type === e ? !0 : r.type === n ? typeof r.children == "string" ? r.children.trim().length === 0 : !0 : r.type === t ? !Jt(r.children) : !1;
|
|
1531
1582
|
}
|
|
1532
1583
|
//#endregion
|
|
1533
1584
|
//#region src/components/viewer-core/useSurfaceEmptyState.ts
|
|
1534
|
-
var
|
|
1535
|
-
function
|
|
1585
|
+
var Xt = "no items available";
|
|
1586
|
+
function Zt(e) {
|
|
1536
1587
|
let t = i(() => e.loading.value || e.itemCount.value > 0 || e.emptyStateMode.value === "hidden" ? null : {
|
|
1537
1588
|
loading: !!e.loading.value,
|
|
1538
|
-
message:
|
|
1589
|
+
message: Xt,
|
|
1539
1590
|
mode: e.emptyStateMode.value === "badge" ? "badge" : "inline",
|
|
1540
1591
|
surface: e.surface,
|
|
1541
1592
|
total: e.itemCount.value
|
|
@@ -1543,23 +1594,23 @@ function Kt(e) {
|
|
|
1543
1594
|
return {
|
|
1544
1595
|
emptyStateProps: t,
|
|
1545
1596
|
showBadgeEmptyState: i(() => t.value?.mode === "badge"),
|
|
1546
|
-
showCustomEmptyState: i(() =>
|
|
1597
|
+
showCustomEmptyState: i(() => Jt(n.value)),
|
|
1547
1598
|
showInlineEmptyState: i(() => t.value?.mode === "inline")
|
|
1548
1599
|
};
|
|
1549
1600
|
}
|
|
1550
1601
|
//#endregion
|
|
1551
1602
|
//#region src/components/viewer-core/format.ts
|
|
1552
|
-
function
|
|
1603
|
+
function Qt(e) {
|
|
1553
1604
|
if (!Number.isFinite(e) || e <= 0) return "0:00";
|
|
1554
1605
|
let t = Math.floor(e), n = Math.floor(t / 3600), r = Math.floor(t % 3600 / 60), i = t % 60;
|
|
1555
1606
|
return n > 0 ? `${n}:${String(r).padStart(2, "0")}:${String(i).padStart(2, "0")}` : `${r}:${String(i).padStart(2, "0")}`;
|
|
1556
1607
|
}
|
|
1557
1608
|
//#endregion
|
|
1558
1609
|
//#region src/components/viewer-core/surfaceStatus.ts
|
|
1559
|
-
function
|
|
1610
|
+
function $t(e) {
|
|
1560
1611
|
return e.phase ? e.phase : e.loading ? e.itemCount > 0 ? "loading" : "initializing" : "idle";
|
|
1561
1612
|
}
|
|
1562
|
-
function
|
|
1613
|
+
function en(e) {
|
|
1563
1614
|
return e.phase === "failed" ? {
|
|
1564
1615
|
kind: "failed",
|
|
1565
1616
|
message: e.errorMessage ?? (e.hasItems ? "The viewer could not load more items." : "The viewer could not load items.")
|
|
@@ -1582,7 +1633,7 @@ function Yt(e) {
|
|
|
1582
1633
|
}
|
|
1583
1634
|
//#endregion
|
|
1584
1635
|
//#region src/components/viewer-core/useActivation.ts
|
|
1585
|
-
function
|
|
1636
|
+
function tn(e) {
|
|
1586
1637
|
let t = !1;
|
|
1587
1638
|
L(e.enabled, async (t) => {
|
|
1588
1639
|
if (n(t), t) {
|
|
@@ -1605,7 +1656,7 @@ function Xt(e) {
|
|
|
1605
1656
|
}
|
|
1606
1657
|
//#endregion
|
|
1607
1658
|
//#region src/components/viewer-core/assetState.ts
|
|
1608
|
-
var
|
|
1659
|
+
var nn = {
|
|
1609
1660
|
currentTime: 0,
|
|
1610
1661
|
duration: 0,
|
|
1611
1662
|
errorKind: null,
|
|
@@ -1614,38 +1665,38 @@ var Zt = {
|
|
|
1614
1665
|
ready: !1,
|
|
1615
1666
|
volume: 1
|
|
1616
1667
|
};
|
|
1617
|
-
function
|
|
1618
|
-
return { ...
|
|
1668
|
+
function rn() {
|
|
1669
|
+
return { ...nn };
|
|
1619
1670
|
}
|
|
1620
|
-
function
|
|
1671
|
+
function an(e) {
|
|
1621
1672
|
return e.complete && !!(e.currentSrc || e.getAttribute("src"));
|
|
1622
1673
|
}
|
|
1623
|
-
function
|
|
1624
|
-
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 =
|
|
1674
|
+
function on(e, t, n) {
|
|
1675
|
+
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 = sn(t, n);
|
|
1625
1676
|
}
|
|
1626
|
-
function
|
|
1677
|
+
function sn(e, t) {
|
|
1627
1678
|
return t === "error" || t === "loadstart" || t === "waiting" || t === "stalled" ? !1 : t === "canplay" || t === "canplaythrough" || t === "playing" ? !0 : e.readyState >= HTMLMediaElement.HAVE_CURRENT_DATA;
|
|
1628
1679
|
}
|
|
1629
1680
|
//#endregion
|
|
1630
1681
|
//#region src/components/viewer-core/loadError.ts
|
|
1631
|
-
var
|
|
1632
|
-
function
|
|
1682
|
+
var cn = /* @__PURE__ */ new Map();
|
|
1683
|
+
function ln(e) {
|
|
1633
1684
|
return e === "not-found" ? "404" : "Load error";
|
|
1634
1685
|
}
|
|
1635
|
-
function
|
|
1686
|
+
function un(e) {
|
|
1636
1687
|
return e === "generic";
|
|
1637
1688
|
}
|
|
1638
|
-
function
|
|
1639
|
-
return
|
|
1689
|
+
function dn(e) {
|
|
1690
|
+
return fn(e).then((e) => e ?? "generic");
|
|
1640
1691
|
}
|
|
1641
|
-
function
|
|
1642
|
-
let t =
|
|
1692
|
+
function fn(e) {
|
|
1693
|
+
let t = cn.get(e);
|
|
1643
1694
|
if (t) return t;
|
|
1644
|
-
let n =
|
|
1645
|
-
return
|
|
1695
|
+
let n = pn(e);
|
|
1696
|
+
return cn.set(e, n), n;
|
|
1646
1697
|
}
|
|
1647
|
-
async function
|
|
1648
|
-
if (!
|
|
1698
|
+
async function pn(e) {
|
|
1699
|
+
if (!mn(e)) return null;
|
|
1649
1700
|
try {
|
|
1650
1701
|
let t = await fetch(e, { method: "HEAD" });
|
|
1651
1702
|
return t.ok ? null : t.status === 404 ? "not-found" : "generic";
|
|
@@ -1653,12 +1704,12 @@ async function cn(e) {
|
|
|
1653
1704
|
return "generic";
|
|
1654
1705
|
}
|
|
1655
1706
|
}
|
|
1656
|
-
function
|
|
1707
|
+
function mn(e) {
|
|
1657
1708
|
return /^(https?:\/\/|\/)/i.test(e);
|
|
1658
1709
|
}
|
|
1659
1710
|
//#endregion
|
|
1660
1711
|
//#region src/components/viewer-core/mediaPlayback.ts
|
|
1661
|
-
function
|
|
1712
|
+
function hn(e) {
|
|
1662
1713
|
try {
|
|
1663
1714
|
let t = e.play();
|
|
1664
1715
|
t && typeof t.catch == "function" && t.catch(() => {});
|
|
@@ -1666,12 +1717,12 @@ function un(e) {
|
|
|
1666
1717
|
}
|
|
1667
1718
|
//#endregion
|
|
1668
1719
|
//#region src/components/viewer-core/useMedia.ts
|
|
1669
|
-
function
|
|
1720
|
+
function gn(e) {
|
|
1670
1721
|
let t = D({}), n = D({}), r = D({}), a = D({}), o = D({}), s = /* @__PURE__ */ new Map(), c = /* @__PURE__ */ new Map(), l = /* @__PURE__ */ new Set(), u = i(() => e.activeItem.value ? $(e.activeItem.value) : null), d = i(() => e.activeMediaItem.value ? $(e.activeMediaItem.value) : null), f = i(() => {
|
|
1671
1722
|
let t = /* @__PURE__ */ new Map();
|
|
1672
1723
|
for (let n of e.items.value) t.set($(n), n);
|
|
1673
1724
|
return t;
|
|
1674
|
-
}), p = i(() => d.value ? r.value[d.value] ??
|
|
1725
|
+
}), p = i(() => d.value ? r.value[d.value] ?? nn : nn), m = i(() => d.value ? p.value.duration : 0), h = i(() => m.value <= 0 ? 0 : _n(p.value.currentTime / m.value * 100, 0, 100)), g = i(() => u.value ? R(u.value) : null);
|
|
1675
1726
|
L(() => u.value, async () => {
|
|
1676
1727
|
await C();
|
|
1677
1728
|
}), L(() => e.itemCount.value, async () => {
|
|
@@ -1694,7 +1745,7 @@ function dn(e) {
|
|
|
1694
1745
|
c.delete(e);
|
|
1695
1746
|
}
|
|
1696
1747
|
function b(e, r) {
|
|
1697
|
-
r instanceof HTMLImageElement &&
|
|
1748
|
+
r instanceof HTMLImageElement && an(r) && (t.value[e] = !0, n.value[e] = null, J(e, r.currentSrc || r.src || ie(e)));
|
|
1698
1749
|
}
|
|
1699
1750
|
function x() {
|
|
1700
1751
|
H(), a.value = {}, n.value = {}, t.value = {}, o.value = {}, r.value = {}, l.clear();
|
|
@@ -1716,14 +1767,14 @@ function dn(e) {
|
|
|
1716
1767
|
V(i, n);
|
|
1717
1768
|
continue;
|
|
1718
1769
|
}
|
|
1719
|
-
i.muted = !1, i.loop = e.loopFullscreenVideo.value, i.playsInline = !0,
|
|
1770
|
+
i.muted = !1, i.loop = e.loopFullscreenVideo.value, i.playsInline = !0, hn(i), W(n, i);
|
|
1720
1771
|
}
|
|
1721
1772
|
for (let [e, n] of c.entries()) {
|
|
1722
1773
|
if (e !== t || r.value[e]?.errorKind) {
|
|
1723
1774
|
V(n, e);
|
|
1724
1775
|
continue;
|
|
1725
1776
|
}
|
|
1726
|
-
|
|
1777
|
+
hn(n), W(e, n);
|
|
1727
1778
|
}
|
|
1728
1779
|
}
|
|
1729
1780
|
function w(e, t) {
|
|
@@ -1741,7 +1792,7 @@ function dn(e) {
|
|
|
1741
1792
|
async function E(r, i) {
|
|
1742
1793
|
let a = Y(r) ?? e.activeItem.value;
|
|
1743
1794
|
t.value[r] = !1, n.value[r] = "generic";
|
|
1744
|
-
let o = await
|
|
1795
|
+
let o = await dn(i);
|
|
1745
1796
|
n.value[r] = o, a && e.onAssetError?.({
|
|
1746
1797
|
item: a,
|
|
1747
1798
|
occurrenceKey: r,
|
|
@@ -1759,7 +1810,7 @@ function dn(e) {
|
|
|
1759
1810
|
} catch {}
|
|
1760
1811
|
}
|
|
1761
1812
|
i.currentTime = 0, i.duration = 0, i.paused = !0, i.ready = !1, i.errorKind = "generic";
|
|
1762
|
-
let o = await
|
|
1813
|
+
let o = await dn(n);
|
|
1763
1814
|
i.errorKind = o, a && e.onAssetError?.({
|
|
1764
1815
|
item: a,
|
|
1765
1816
|
occurrenceKey: t,
|
|
@@ -1779,13 +1830,13 @@ function dn(e) {
|
|
|
1779
1830
|
if (!t || !n || !(e.target instanceof HTMLInputElement)) return;
|
|
1780
1831
|
let r = Number.parseFloat(e.target.value);
|
|
1781
1832
|
if (!Number.isFinite(r)) return;
|
|
1782
|
-
let i =
|
|
1833
|
+
let i = _n(r, 0, m.value || 0);
|
|
1783
1834
|
ne(n, i, t), t.currentTime = i;
|
|
1784
1835
|
}
|
|
1785
1836
|
function M(e) {
|
|
1786
1837
|
let t = q(), n = d.value;
|
|
1787
1838
|
if (!t || !n || !(e.target instanceof HTMLInputElement)) return;
|
|
1788
|
-
let r =
|
|
1839
|
+
let r = _n(Number.parseFloat(e.target.value), 0, 1);
|
|
1789
1840
|
t.volume = r, t.muted = r <= 0, r > 0 && (o.value[n] = r), W(n, t);
|
|
1790
1841
|
}
|
|
1791
1842
|
function N() {
|
|
@@ -1806,10 +1857,10 @@ function dn(e) {
|
|
|
1806
1857
|
}
|
|
1807
1858
|
function z(e) {
|
|
1808
1859
|
let t = R(e);
|
|
1809
|
-
return t ?
|
|
1860
|
+
return t ? ln(t) : null;
|
|
1810
1861
|
}
|
|
1811
1862
|
function B(e) {
|
|
1812
|
-
return
|
|
1863
|
+
return un(R(e));
|
|
1813
1864
|
}
|
|
1814
1865
|
function ee(e) {
|
|
1815
1866
|
return `${e}:${a.value[e] ?? 0}`;
|
|
@@ -1836,17 +1887,17 @@ function dn(e) {
|
|
|
1836
1887
|
for (let [e, t] of c.entries()) V(t, e);
|
|
1837
1888
|
}
|
|
1838
1889
|
function U(e) {
|
|
1839
|
-
return r.value[e] || (r.value[e] =
|
|
1890
|
+
return r.value[e] || (r.value[e] = rn()), r.value[e];
|
|
1840
1891
|
}
|
|
1841
1892
|
function W(e, t, n) {
|
|
1842
|
-
|
|
1893
|
+
on(U(e), t, n), !t.muted && t.volume > 0 && (o.value[e] = t.volume);
|
|
1843
1894
|
}
|
|
1844
1895
|
function ne(e, t, n) {
|
|
1845
1896
|
let r = U(e);
|
|
1846
1897
|
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;
|
|
1847
1898
|
}
|
|
1848
1899
|
function G(e) {
|
|
1849
|
-
return
|
|
1900
|
+
return _n(o.value[e] ?? 1, 0, 1);
|
|
1850
1901
|
}
|
|
1851
1902
|
function K(e) {
|
|
1852
1903
|
return s.get(e) ?? c.get(e) ?? null;
|
|
@@ -1857,7 +1908,7 @@ function dn(e) {
|
|
|
1857
1908
|
function re(e) {
|
|
1858
1909
|
if (e) {
|
|
1859
1910
|
if (e.paused) {
|
|
1860
|
-
|
|
1911
|
+
hn(e);
|
|
1861
1912
|
return;
|
|
1862
1913
|
}
|
|
1863
1914
|
e.pause();
|
|
@@ -1911,16 +1962,16 @@ function dn(e) {
|
|
|
1911
1962
|
syncMediaPlayback: C
|
|
1912
1963
|
};
|
|
1913
1964
|
}
|
|
1914
|
-
function
|
|
1965
|
+
function _n(e, t, n) {
|
|
1915
1966
|
return Math.min(Math.max(e, t), n);
|
|
1916
1967
|
}
|
|
1917
1968
|
//#endregion
|
|
1918
1969
|
//#region src/components/viewer-core/virtualization.ts
|
|
1919
|
-
var
|
|
1970
|
+
var vn = {
|
|
1920
1971
|
backward: 1,
|
|
1921
1972
|
forward: 3
|
|
1922
1973
|
};
|
|
1923
|
-
function
|
|
1974
|
+
function yn(e, t, n = vn) {
|
|
1924
1975
|
return t <= 0 ? {
|
|
1925
1976
|
start: 0,
|
|
1926
1977
|
end: -1
|
|
@@ -1929,14 +1980,14 @@ function mn(e, t, n = pn) {
|
|
|
1929
1980
|
end: Math.min(t - 1, e + n.forward)
|
|
1930
1981
|
};
|
|
1931
1982
|
}
|
|
1932
|
-
function
|
|
1933
|
-
let r =
|
|
1983
|
+
function bn(e, t, n = vn) {
|
|
1984
|
+
let r = yn(t, e.length, n);
|
|
1934
1985
|
return r.end < r.start ? [] : e.slice(r.start, r.end + 1).map((e, t) => ({
|
|
1935
1986
|
item: e,
|
|
1936
1987
|
index: r.start + t
|
|
1937
1988
|
}));
|
|
1938
1989
|
}
|
|
1939
|
-
function
|
|
1990
|
+
function xn(e, t, n, r, i) {
|
|
1940
1991
|
return {
|
|
1941
1992
|
transform: `translate3d(0, ${(e - t) * n + r}px, 0)`,
|
|
1942
1993
|
transition: i ? "none" : "transform 320ms cubic-bezier(0.22, 1, 0.36, 1)"
|
|
@@ -1944,12 +1995,12 @@ function gn(e, t, n, r, i) {
|
|
|
1944
1995
|
}
|
|
1945
1996
|
//#endregion
|
|
1946
1997
|
//#region src/components/viewer-core/useViewer.ts
|
|
1947
|
-
function
|
|
1948
|
-
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(() =>
|
|
1998
|
+
function Sn(e, t, n = {}) {
|
|
1999
|
+
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(() => $t({
|
|
1949
2000
|
itemCount: r.value.length,
|
|
1950
2001
|
loading: s.value,
|
|
1951
2002
|
phase: e.phase
|
|
1952
|
-
})), f = i(() => !1), p = D(null), m = D(0), h = D(!1), g = D(1), _ = n.enabled ?? i(() => !0), v = null, y = 0, b = 0, x = 0, S = i(() => r.value.length === 0 ? 0 : 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), T =
|
|
2003
|
+
})), f = i(() => !1), p = D(null), m = D(0), h = D(!1), g = D(1), _ = n.enabled ?? i(() => !0), v = null, y = 0, b = 0, x = 0, S = i(() => r.value.length === 0 ? 0 : 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), T = gn({
|
|
1953
2004
|
items: r,
|
|
1954
2005
|
activeItem: C,
|
|
1955
2006
|
activeMediaItem: w,
|
|
@@ -1958,14 +2009,14 @@ function _n(e, t, n = {}) {
|
|
|
1958
2009
|
loopFullscreenVideo: l,
|
|
1959
2010
|
onAssetError: n.onAssetError,
|
|
1960
2011
|
onAssetLoad: n.onAssetLoad
|
|
1961
|
-
}), E = i(() => r.value.length > 0 && S.value === r.value.length - 1), O = i(() =>
|
|
2012
|
+
}), E = i(() => r.value.length > 0 && S.value === r.value.length - 1), O = i(() => en({
|
|
1962
2013
|
errorMessage: o.value,
|
|
1963
2014
|
hasItems: r.value.length > 0,
|
|
1964
2015
|
hasNextPage: c.value,
|
|
1965
2016
|
phase: d.value,
|
|
1966
2017
|
surface: "fullscreen"
|
|
1967
|
-
})), k = i(() => O.value?.kind ?? null), A = i(() => O.value?.message ?? null), j = i(() => Math.min(96, g.value * .15 || 96)), M = i(() =>
|
|
1968
|
-
|
|
2018
|
+
})), k = i(() => O.value?.kind ?? null), A = i(() => O.value?.message ?? null), j = i(() => Math.min(96, g.value * .15 || 96)), M = i(() => yn(S.value, r.value.length)), N = i(() => bn(r.value, S.value));
|
|
2019
|
+
tn({
|
|
1969
2020
|
enabled: _,
|
|
1970
2021
|
onDisable() {
|
|
1971
2022
|
H(), T.resetMediaState();
|
|
@@ -2043,7 +2094,7 @@ function _n(e, t, n = {}) {
|
|
|
2043
2094
|
return e.type === "audio";
|
|
2044
2095
|
}
|
|
2045
2096
|
function ie(e) {
|
|
2046
|
-
return
|
|
2097
|
+
return xn(e, S.value, g.value, m.value, h.value);
|
|
2047
2098
|
}
|
|
2048
2099
|
return {
|
|
2049
2100
|
activeItem: C,
|
|
@@ -2058,7 +2109,7 @@ function _n(e, t, n = {}) {
|
|
|
2058
2109
|
getAssetErrorKind: T.getAssetErrorKind,
|
|
2059
2110
|
getAssetErrorLabel: T.getAssetErrorLabel,
|
|
2060
2111
|
getAssetRenderKey: T.getAssetRenderKey,
|
|
2061
|
-
formatPlaybackTime:
|
|
2112
|
+
formatPlaybackTime: Qt,
|
|
2062
2113
|
getImageSource: T.getImageSource,
|
|
2063
2114
|
getSlideStyle: ie,
|
|
2064
2115
|
hasNextPage: c,
|
|
@@ -2102,21 +2153,21 @@ function _n(e, t, n = {}) {
|
|
|
2102
2153
|
}
|
|
2103
2154
|
//#endregion
|
|
2104
2155
|
//#region src/components/viewer-core/theme.ts
|
|
2105
|
-
var
|
|
2156
|
+
var Cn = "bg-[linear-gradient(180deg,#0a0b10,#05060a)]", wn = "bg-[linear-gradient(180deg,#0b0c11,#06070b)]", Tn = {
|
|
2106
2157
|
image: !0,
|
|
2107
2158
|
video: !0,
|
|
2108
2159
|
audio: !0,
|
|
2109
2160
|
other: !0
|
|
2110
2161
|
};
|
|
2111
|
-
function
|
|
2112
|
-
return
|
|
2162
|
+
function En(e) {
|
|
2163
|
+
return Tn[e], Cn;
|
|
2113
2164
|
}
|
|
2114
|
-
function
|
|
2115
|
-
return
|
|
2165
|
+
function Dn(e) {
|
|
2166
|
+
return Tn[e], wn;
|
|
2116
2167
|
}
|
|
2117
2168
|
//#endregion
|
|
2118
2169
|
//#region src/components/viewer-core/useFullscreenAssetEvents.ts
|
|
2119
|
-
function
|
|
2170
|
+
function On(e) {
|
|
2120
2171
|
function t(t, n) {
|
|
2121
2172
|
return e.fullscreenMedia.shouldHandleSlideAssetEvent(t, n) ? e.fullscreenMedia.getItemKey(n) : null;
|
|
2122
2173
|
}
|
|
@@ -2149,7 +2200,7 @@ function Cn(e) {
|
|
|
2149
2200
|
}
|
|
2150
2201
|
//#endregion
|
|
2151
2202
|
//#region src/components/viewer-core/dominantImageTone.ts
|
|
2152
|
-
function
|
|
2203
|
+
function kn(e) {
|
|
2153
2204
|
if (e.naturalWidth <= 0 || e.naturalHeight <= 0) return null;
|
|
2154
2205
|
let t = document.createElement("canvas"), n = t.getContext("2d", { willReadFrequently: !0 });
|
|
2155
2206
|
if (!n) return null;
|
|
@@ -2164,20 +2215,20 @@ function wn(e) {
|
|
|
2164
2215
|
r += d, i += s * d, a += c * d, o += l * d;
|
|
2165
2216
|
}
|
|
2166
2217
|
return r <= 0 ? null : {
|
|
2167
|
-
r:
|
|
2168
|
-
g:
|
|
2169
|
-
b:
|
|
2218
|
+
r: An(Math.round(i / r)),
|
|
2219
|
+
g: An(Math.round(a / r)),
|
|
2220
|
+
b: An(Math.round(o / r))
|
|
2170
2221
|
};
|
|
2171
2222
|
} catch {
|
|
2172
2223
|
return null;
|
|
2173
2224
|
}
|
|
2174
2225
|
}
|
|
2175
|
-
function
|
|
2226
|
+
function An(e) {
|
|
2176
2227
|
return Math.min(235, Math.max(26, e));
|
|
2177
2228
|
}
|
|
2178
2229
|
//#endregion
|
|
2179
2230
|
//#region src/components/viewer-core/useFullscreenDominantTone.ts
|
|
2180
|
-
function
|
|
2231
|
+
function jn(e) {
|
|
2181
2232
|
let t = D({}), n = i(() => e.activeItem.value ? e.getItemKey(e.activeItem.value) : null), r = i(() => !e.showDominantImageTone.value || e.activeItem.value?.type !== "image" || !n.value || !e.isImageReady(n.value) ? null : t.value[n.value] ?? null), a = i(() => {
|
|
2182
2233
|
if (!r.value) return;
|
|
2183
2234
|
let { r: e, g: t, b: n } = r.value;
|
|
@@ -2192,7 +2243,7 @@ function En(e) {
|
|
|
2192
2243
|
});
|
|
2193
2244
|
function s(n, r) {
|
|
2194
2245
|
if (!e.showDominantImageTone.value) return;
|
|
2195
|
-
let i =
|
|
2246
|
+
let i = kn(r);
|
|
2196
2247
|
i && (t.value[n] = i);
|
|
2197
2248
|
}
|
|
2198
2249
|
return {
|
|
@@ -2203,7 +2254,7 @@ function En(e) {
|
|
|
2203
2254
|
}
|
|
2204
2255
|
//#endregion
|
|
2205
2256
|
//#region src/components/SurfaceEmptyState.vue?vue&type=script&setup=true&lang.ts
|
|
2206
|
-
var
|
|
2257
|
+
var Mn = ["data-surface"], Nn = ["data-surface"], Pn = /* @__PURE__ */ d({
|
|
2207
2258
|
inheritAttrs: !1,
|
|
2208
2259
|
__name: "SurfaceEmptyState",
|
|
2209
2260
|
props: {
|
|
@@ -2217,31 +2268,31 @@ var Dn = ["data-surface"], On = ["data-surface"], kn = /* @__PURE__ */ d({
|
|
|
2217
2268
|
"data-testid": "vibe-empty-state-inline",
|
|
2218
2269
|
"data-surface": e.surface,
|
|
2219
2270
|
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)]"]
|
|
2220
|
-
}), [k(n.$slots, "default", {}, () => [c("p", { class: v(["m-0 text-[0.82rem] font-medium tracking-[0.08em]", e.surface === "grid" ? "text-[#f7f1ea]/58" : "text-[#f7f1ea]/64"]) }, j(e.message), 3)])], 16,
|
|
2271
|
+
}), [k(n.$slots, "default", {}, () => [c("p", { class: v(["m-0 text-[0.82rem] font-medium tracking-[0.08em]", e.surface === "grid" ? "text-[#f7f1ea]/58" : "text-[#f7f1ea]/64"]) }, j(e.message), 3)])], 16, Mn)) : (w(), s("div", g({ key: 1 }, N(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]"] }), [k(n.$slots, "default", {}, () => [c("span", {
|
|
2221
2272
|
"data-testid": "vibe-empty-state-badge",
|
|
2222
2273
|
"data-surface": e.surface,
|
|
2223
2274
|
class: v(["inline-flex items-center border border-white/14 backdrop-blur-[18px]", e.surface === "grid" ? "bg-black/55 px-4 py-3 text-[0.82rem] font-medium tracking-[0.08em] text-[#f7f1ea]/72" : "w-auto bg-black/40 px-5 py-3 text-[0.82rem] font-medium tracking-[0.08em] text-[#f7f1ea]/74 max-[720px]:w-[calc(100%-2.5rem)] max-[720px]:justify-center"])
|
|
2224
|
-
}, j(e.message), 11,
|
|
2275
|
+
}, j(e.message), 11, Nn)])], 16));
|
|
2225
2276
|
}
|
|
2226
|
-
}),
|
|
2277
|
+
}), Fn = { class: "relative h-full min-h-0 overflow-hidden bg-[#05060a] text-[#f7f1ea]" }, In = {
|
|
2227
2278
|
key: 0,
|
|
2228
2279
|
class: "relative h-full min-h-0"
|
|
2229
|
-
},
|
|
2280
|
+
}, Ln = [
|
|
2230
2281
|
"data-item-id",
|
|
2231
2282
|
"data-occurrence-key",
|
|
2232
2283
|
"data-index",
|
|
2233
2284
|
"data-active",
|
|
2234
2285
|
"aria-hidden"
|
|
2235
|
-
],
|
|
2286
|
+
], Rn = {
|
|
2236
2287
|
key: 0,
|
|
2237
2288
|
"data-testid": "vibe-asset-spinner",
|
|
2238
2289
|
class: "pointer-events-none absolute inset-0 z-[2] grid place-items-center"
|
|
2239
|
-
},
|
|
2290
|
+
}, zn = { class: "inline-flex h-12 w-12 items-center justify-center rounded-full bg-black/45 shadow-[0_18px_40px_-18px_rgba(0,0,0,0.85)] backdrop-blur-[18px]" }, Bn = ["data-kind"], Vn = { class: "grid justify-items-center gap-4 border border-white/14 bg-black/45 px-8 py-7 text-center backdrop-blur-[18px]" }, Hn = { class: "m-0 text-[0.82rem] font-bold uppercase tracking-[0.28em] text-[#f7f1ea]/70" }, Un = ["onClick"], Wn = [
|
|
2240
2291
|
"src",
|
|
2241
2292
|
"alt",
|
|
2242
2293
|
"onLoad",
|
|
2243
2294
|
"onError"
|
|
2244
|
-
],
|
|
2295
|
+
], Gn = [
|
|
2245
2296
|
"loop",
|
|
2246
2297
|
"src",
|
|
2247
2298
|
"preload",
|
|
@@ -2260,15 +2311,15 @@ var Dn = ["data-surface"], On = ["data-surface"], kn = /* @__PURE__ */ d({
|
|
|
2260
2311
|
"onStalled",
|
|
2261
2312
|
"onTimeupdate",
|
|
2262
2313
|
"onWaiting"
|
|
2263
|
-
],
|
|
2314
|
+
], Kn = { class: "relative grid aspect-square w-[clamp(320px,46vw,560px)] max-w-[calc(100vw-2.5rem)] place-items-center" }, qn = [
|
|
2264
2315
|
"aria-label",
|
|
2265
2316
|
"disabled",
|
|
2266
2317
|
"onClick"
|
|
2267
|
-
],
|
|
2318
|
+
], Jn = { 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]" }, Yn = { 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]" }, Xn = {
|
|
2268
2319
|
key: 0,
|
|
2269
2320
|
"data-testid": "vibe-asset-spinner",
|
|
2270
2321
|
class: "pointer-events-none absolute inset-0 z-[3] grid place-items-center"
|
|
2271
|
-
},
|
|
2322
|
+
}, Zn = { class: "inline-flex h-12 w-12 items-center justify-center rounded-full bg-black/45 shadow-[0_18px_40px_-18px_rgba(0,0,0,0.85)] backdrop-blur-[18px]" }, Qn = ["data-kind"], $n = { class: "m-0 text-[0.82rem] font-bold uppercase tracking-[0.28em] text-[#f7f1ea]/70" }, er = ["onClick"], tr = [
|
|
2272
2323
|
"src",
|
|
2273
2324
|
"preload",
|
|
2274
2325
|
"onCanplay",
|
|
@@ -2284,26 +2335,26 @@ var Dn = ["data-surface"], On = ["data-surface"], kn = /* @__PURE__ */ d({
|
|
|
2284
2335
|
"onStalled",
|
|
2285
2336
|
"onTimeupdate",
|
|
2286
2337
|
"onWaiting"
|
|
2287
|
-
],
|
|
2338
|
+
], nr = {
|
|
2288
2339
|
key: 2,
|
|
2289
2340
|
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"
|
|
2290
|
-
},
|
|
2341
|
+
}, rr = { 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]" }, ir = {
|
|
2291
2342
|
key: 0,
|
|
2292
2343
|
"data-testid": "vibe-fullscreen-overlay",
|
|
2293
2344
|
class: "pointer-events-none absolute inset-0 z-[6]"
|
|
2294
|
-
},
|
|
2345
|
+
}, ar = { class: "h-full w-full" }, or = {
|
|
2295
2346
|
key: 1,
|
|
2296
2347
|
"data-testid": "vibe-forward-fill-placeholder",
|
|
2297
2348
|
class: "grid h-full min-h-0 place-items-center px-6 text-center"
|
|
2298
|
-
},
|
|
2349
|
+
}, sr = { class: "grid justify-items-center gap-4 border border-white/14 bg-black/40 px-8 py-7 backdrop-blur-[18px]" }, cr = { 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)]" }, lr = { class: "m-0 text-[0.78rem] font-bold uppercase tracking-[0.24em] text-[#f7f1ea]/72" }, ur = {
|
|
2299
2350
|
key: 0,
|
|
2300
2351
|
"data-testid": "vibe-fullscreen-aside",
|
|
2301
2352
|
class: "h-full min-h-0 overflow-hidden border-l border-white/10 bg-black/45 backdrop-blur-[18px]"
|
|
2302
|
-
},
|
|
2353
|
+
}, dr = { class: "h-full min-h-0 overflow-y-auto overscroll-y-contain" }, fr = {
|
|
2303
2354
|
key: 0,
|
|
2304
2355
|
"data-testid": "vibe-fullscreen-aside",
|
|
2305
2356
|
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]"
|
|
2306
|
-
},
|
|
2357
|
+
}, pr = { class: "h-full min-h-0 overflow-y-auto overscroll-y-contain" }, mr = 1280, hr = 768, gr = /* @__PURE__ */ d({
|
|
2307
2358
|
__name: "FullscreenSurface",
|
|
2308
2359
|
props: {
|
|
2309
2360
|
active: {
|
|
@@ -2355,27 +2406,27 @@ var Dn = ["data-surface"], On = ["data-surface"], kn = /* @__PURE__ */ d({
|
|
|
2355
2406
|
},
|
|
2356
2407
|
emits: ["back-to-list", "update:activeIndex"],
|
|
2357
2408
|
setup(e, { emit: n }) {
|
|
2358
|
-
let d = e, f = F(), m = n, h =
|
|
2409
|
+
let d = e, f = F(), m = n, h = Sn(d, (e, t) => {
|
|
2359
2410
|
m("update:activeIndex", t);
|
|
2360
2411
|
}, {
|
|
2361
2412
|
enabled: M(d, "active"),
|
|
2362
2413
|
onAssetError: d.reportAssetError ?? void 0,
|
|
2363
2414
|
onAssetLoad: d.reportAssetLoad ?? void 0
|
|
2364
|
-
}), _ = D(typeof window > "u" ?
|
|
2415
|
+
}), _ = D(typeof window > "u" ? mr : window.innerWidth || mr), C = qt({
|
|
2365
2416
|
active: M(d, "active"),
|
|
2366
2417
|
items: h.items,
|
|
2367
2418
|
resolvedActiveIndex: h.resolvedActiveIndex,
|
|
2368
2419
|
viewer: h
|
|
2369
|
-
}), T = i(() =>
|
|
2420
|
+
}), T = i(() => En(h.activeItem.value?.type ?? "image")), { activeSlideToneStyle: E, activeStageToneStyle: P, updateFromImageElement: I } = jn({
|
|
2370
2421
|
activeItem: h.activeItem,
|
|
2371
2422
|
getItemKey: C.getItemKey,
|
|
2372
2423
|
isImageReady: h.isImageReady,
|
|
2373
2424
|
showDominantImageTone: M(d, "showDominantImageTone")
|
|
2374
|
-
}), L =
|
|
2425
|
+
}), L = On({
|
|
2375
2426
|
fullscreenMedia: C,
|
|
2376
2427
|
updateDominantToneFromImageElement: _e,
|
|
2377
2428
|
viewer: h
|
|
2378
|
-
}), R = i(() => h.activeMediaItem.value && !h.activeAssetErrorKind.value ? "bottom-[5.8rem] max-[720px]:bottom-[7.4rem]" : "bottom-[1.8rem] max-[720px]:bottom-[1.3rem]"), B = i(() => !!h.activeMediaItem.value && !h.activeAssetErrorKind.value), te = i(() => _.value <
|
|
2429
|
+
}), R = i(() => h.activeMediaItem.value && !h.activeAssetErrorKind.value ? "bottom-[5.8rem] max-[720px]:bottom-[7.4rem]" : "bottom-[1.8rem] max-[720px]:bottom-[1.3rem]"), B = i(() => !!h.activeMediaItem.value && !h.activeAssetErrorKind.value), te = i(() => _.value < hr ? "vertical" : "horizontal"), V = i(() => B.value ? "pb-[5.75rem] max-[720px]:pb-[7rem]" : ""), H = i(() => d.activeIndex >= d.items.length && (d.loading || d.hasNextPage)), U = i(() => d.hasNextPage ? "Loading more items" : h.statusMessage.value ?? "Loading more items"), W = i(() => {
|
|
2379
2430
|
let e = h.activeItem.value;
|
|
2380
2431
|
return e ? {
|
|
2381
2432
|
hasNextPage: d.hasNextPage,
|
|
@@ -2392,7 +2443,7 @@ var Dn = ["data-surface"], On = ["data-surface"], kn = /* @__PURE__ */ d({
|
|
|
2392
2443
|
}), q = i(() => !K.value || !f["fullscreen-status"] ? [] : f["fullscreen-status"](K.value)), re = i(() => ({
|
|
2393
2444
|
gridTemplateColumns: ie.value ? "minmax(0, 1fr) 22rem" : "minmax(0, 1fr) 0rem",
|
|
2394
2445
|
transition: "grid-template-columns 320ms cubic-bezier(0.22, 1, 0.36, 1)"
|
|
2395
|
-
})), J = i(() =>
|
|
2446
|
+
})), J = i(() => Jt(ne.value)), Y = i(() => Jt(G.value)), ie = i(() => Y.value && _.value >= mr), ae = i(() => Y.value && !ie.value), ue = i(() => Jt(q.value)), { emptyStateProps: X, showBadgeEmptyState: de, showCustomEmptyState: fe, showInlineEmptyState: Z } = Zt({
|
|
2396
2447
|
emptyStateMode: M(d, "emptyStateMode"),
|
|
2397
2448
|
itemCount: i(() => d.items.length),
|
|
2398
2449
|
loading: M(d, "loading"),
|
|
@@ -2405,7 +2456,7 @@ var Dn = ["data-surface"], On = ["data-surface"], kn = /* @__PURE__ */ d({
|
|
|
2405
2456
|
window.removeEventListener("resize", pe);
|
|
2406
2457
|
});
|
|
2407
2458
|
function pe() {
|
|
2408
|
-
_.value = window.innerWidth ||
|
|
2459
|
+
_.value = window.innerWidth || mr;
|
|
2409
2460
|
}
|
|
2410
2461
|
function me(e, t) {
|
|
2411
2462
|
C.registerImageElement(e, t), h.registerImageElement(e, t), t instanceof HTMLImageElement && _e(e, t);
|
|
@@ -2434,7 +2485,7 @@ var Dn = ["data-surface"], On = ["data-surface"], kn = /* @__PURE__ */ d({
|
|
|
2434
2485
|
let a = i.play();
|
|
2435
2486
|
a && typeof a.catch == "function" && a.catch(() => {});
|
|
2436
2487
|
}
|
|
2437
|
-
return (e, n) => (w(), s("div",
|
|
2488
|
+
return (e, n) => (w(), s("div", Fn, [
|
|
2438
2489
|
c("div", {
|
|
2439
2490
|
class: v(["absolute inset-0 transition-[background] duration-200", T.value]),
|
|
2440
2491
|
style: b(N(P))
|
|
@@ -2451,7 +2502,7 @@ var Dn = ["data-surface"], On = ["data-surface"], kn = /* @__PURE__ */ d({
|
|
|
2451
2502
|
onPointerup: n[3] ||= (...e) => N(h).onPointerUp && N(h).onPointerUp(...e),
|
|
2452
2503
|
onPointercancel: n[4] ||= (...e) => N(h).onPointerCancel && N(h).onPointerCancel(...e),
|
|
2453
2504
|
onWheel: n[5] ||= (...e) => N(h).onWheel && N(h).onWheel(...e)
|
|
2454
|
-
}, [N(h).activeItem.value ? (w(), s("div",
|
|
2505
|
+
}, [N(h).activeItem.value ? (w(), s("div", In, [
|
|
2455
2506
|
(w(!0), s(t, null, O(N(h).renderedItems.value, ({ item: r, index: i }) => (w(), s("article", {
|
|
2456
2507
|
key: N(C).getItemKey(r),
|
|
2457
2508
|
"data-testid": "vibe-slide",
|
|
@@ -2463,12 +2514,12 @@ var Dn = ["data-surface"], On = ["data-surface"], kn = /* @__PURE__ */ d({
|
|
|
2463
2514
|
class: v(["absolute inset-0 flex h-full min-h-full items-center justify-center will-change-transform", i === N(h).resolvedActiveIndex.value ? "pointer-events-auto" : "pointer-events-none"]),
|
|
2464
2515
|
style: b(N(h).getSlideStyle(i))
|
|
2465
2516
|
}, [c("div", {
|
|
2466
|
-
class: v(["absolute inset-0 opacity-85", N(
|
|
2517
|
+
class: v(["absolute inset-0 opacity-85", N(Dn)(r.type)]),
|
|
2467
2518
|
style: b(i === N(h).resolvedActiveIndex.value && r.type === "image" ? N(E) : void 0)
|
|
2468
2519
|
}, null, 6), N(h).isVisual(r) ? (w(), s("div", {
|
|
2469
2520
|
key: 0,
|
|
2470
2521
|
class: v(["relative z-[1] flex h-full w-full items-center justify-center overflow-hidden", i === N(h).resolvedActiveIndex.value ? V.value : ""])
|
|
2471
|
-
}, [N(C).isAssetLoading(i, r) ? (w(), s("div",
|
|
2522
|
+
}, [N(C).isAssetLoading(i, r) ? (w(), s("div", Rn, [c("span", zn, [u(N(oe), {
|
|
2472
2523
|
class: "h-5 w-5 animate-spin stroke-[1.9] text-[#f7f1ea]/78",
|
|
2473
2524
|
"aria-hidden": "true"
|
|
2474
2525
|
})])])) : o("", !0), N(C).isAssetErrored(i, r) ? (w(), s("div", {
|
|
@@ -2476,19 +2527,19 @@ var Dn = ["data-surface"], On = ["data-surface"], kn = /* @__PURE__ */ d({
|
|
|
2476
2527
|
"data-testid": "vibe-asset-error",
|
|
2477
2528
|
"data-kind": N(C).getAssetErrorKind(r),
|
|
2478
2529
|
class: "grid h-full w-full place-items-center"
|
|
2479
|
-
}, [c("div",
|
|
2530
|
+
}, [c("div", Vn, [
|
|
2480
2531
|
u(N(le), {
|
|
2481
2532
|
class: "h-7 w-7 stroke-[1.9] text-[#f7f1ea]/72",
|
|
2482
2533
|
"aria-hidden": "true"
|
|
2483
2534
|
}),
|
|
2484
|
-
c("p",
|
|
2535
|
+
c("p", Hn, j(N(C).getAssetErrorLabel(r)), 1),
|
|
2485
2536
|
N(h).canRetryAsset(N(C).getItemKey(r)) ? (w(), s("button", {
|
|
2486
2537
|
key: 0,
|
|
2487
2538
|
type: "button",
|
|
2488
2539
|
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",
|
|
2489
2540
|
onClick: ee((e) => N(h).retryAsset(N(C).getItemKey(r)), ["stop"])
|
|
2490
|
-
}, " Retry ", 8,
|
|
2491
|
-
])], 8,
|
|
2541
|
+
}, " Retry ", 8, Un)) : o("", !0)
|
|
2542
|
+
])], 8, Bn)) : r.type === "image" ? (w(), s("img", {
|
|
2492
2543
|
key: N(h).getAssetRenderKey(N(C).getItemKey(r)),
|
|
2493
2544
|
src: N(C).getFullscreenImageSource(i, r),
|
|
2494
2545
|
alt: r.title ?? "",
|
|
@@ -2499,7 +2550,7 @@ var Dn = ["data-surface"], On = ["data-surface"], kn = /* @__PURE__ */ d({
|
|
|
2499
2550
|
ref: (e) => me(N(C).getItemKey(r), e),
|
|
2500
2551
|
onLoad: (e) => N(L).onFullscreenImageLoad(e, i, r),
|
|
2501
2552
|
onError: (e) => N(L).onFullscreenImageError(i, r)
|
|
2502
|
-
}, null, 42,
|
|
2553
|
+
}, null, 42, Wn)) : (w(), s("video", {
|
|
2503
2554
|
key: N(h).getAssetRenderKey(N(C).getItemKey(r)),
|
|
2504
2555
|
class: v(["block h-auto max-h-full w-auto max-w-full cursor-pointer object-contain shadow-[0_40px_120px_-60px_rgba(0,0,0,0.9)] transition-opacity duration-300", N(h).isMediaReady(N(C).getItemKey(r)) ? "opacity-100" : "opacity-0"]),
|
|
2505
2556
|
playsinline: "",
|
|
@@ -2523,10 +2574,10 @@ var Dn = ["data-surface"], On = ["data-surface"], kn = /* @__PURE__ */ d({
|
|
|
2523
2574
|
onStalled: (e) => Q(i, r, e),
|
|
2524
2575
|
onTimeupdate: (e) => Q(i, r, e),
|
|
2525
2576
|
onWaiting: (e) => Q(i, r, e)
|
|
2526
|
-
}, null, 42,
|
|
2577
|
+
}, null, 42, Gn))], 2)) : N(h).isAudio(r) ? (w(), s("div", {
|
|
2527
2578
|
key: 1,
|
|
2528
2579
|
class: v(["relative z-[1] grid w-full max-w-[1100px] justify-items-center gap-6 px-[clamp(2rem,4vw,3rem)] py-[clamp(2rem,4vw,3rem)] text-center", i === N(h).resolvedActiveIndex.value ? V.value : ""])
|
|
2529
|
-
}, [c("div",
|
|
2580
|
+
}, [c("div", Kn, [
|
|
2530
2581
|
c("button", {
|
|
2531
2582
|
type: "button",
|
|
2532
2583
|
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]",
|
|
@@ -2536,19 +2587,19 @@ var Dn = ["data-surface"], On = ["data-surface"], kn = /* @__PURE__ */ d({
|
|
|
2536
2587
|
}, [
|
|
2537
2588
|
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),
|
|
2538
2589
|
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),
|
|
2539
|
-
c("span",
|
|
2540
|
-
icon: N(
|
|
2590
|
+
c("span", Jn, [k(e.$slots, "item-icon", {
|
|
2591
|
+
icon: N(Nt)(r.type),
|
|
2541
2592
|
item: r
|
|
2542
|
-
}, () => [(w(), a(A(N(
|
|
2593
|
+
}, () => [(w(), a(A(N(Nt)(r.type)), {
|
|
2543
2594
|
class: "h-6 w-6 stroke-[1.9]",
|
|
2544
2595
|
"aria-hidden": "true"
|
|
2545
2596
|
}))])]),
|
|
2546
|
-
c("span",
|
|
2597
|
+
c("span", Yn, [(w(), a(A(N(h).mediaStates.value[N(C).getItemKey(r)]?.paused ?? !0 ? N(ce) : N(se)), {
|
|
2547
2598
|
class: "h-4 w-4 stroke-2",
|
|
2548
2599
|
"aria-hidden": "true"
|
|
2549
2600
|
}))])
|
|
2550
|
-
], 8,
|
|
2551
|
-
N(C).isAssetLoading(i, r) ? (w(), s("div",
|
|
2601
|
+
], 8, qn),
|
|
2602
|
+
N(C).isAssetLoading(i, r) ? (w(), s("div", Xn, [c("span", Zn, [u(N(oe), {
|
|
2552
2603
|
class: "h-5 w-5 animate-spin stroke-[1.9] text-[#f7f1ea]/78",
|
|
2553
2604
|
"aria-hidden": "true"
|
|
2554
2605
|
})])])) : o("", !0),
|
|
@@ -2561,14 +2612,14 @@ var Dn = ["data-surface"], On = ["data-surface"], kn = /* @__PURE__ */ d({
|
|
|
2561
2612
|
class: "h-7 w-7 stroke-[1.9] text-[#f7f1ea]/72",
|
|
2562
2613
|
"aria-hidden": "true"
|
|
2563
2614
|
}),
|
|
2564
|
-
c("p",
|
|
2615
|
+
c("p", $n, j(N(C).getAssetErrorLabel(r)), 1),
|
|
2565
2616
|
N(h).canRetryAsset(N(C).getItemKey(r)) ? (w(), s("button", {
|
|
2566
2617
|
key: 0,
|
|
2567
2618
|
type: "button",
|
|
2568
2619
|
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",
|
|
2569
2620
|
onClick: ee((e) => N(h).retryAsset(N(C).getItemKey(r)), ["stop"])
|
|
2570
|
-
}, " Retry ", 8,
|
|
2571
|
-
], 8,
|
|
2621
|
+
}, " Retry ", 8, er)) : o("", !0)
|
|
2622
|
+
], 8, Qn)], 64)) : o("", !0)
|
|
2572
2623
|
]), (w(), s("audio", {
|
|
2573
2624
|
key: N(h).getAssetRenderKey(N(C).getItemKey(r)),
|
|
2574
2625
|
src: N(C).getFullscreenMediaSource(i, r),
|
|
@@ -2589,15 +2640,15 @@ var Dn = ["data-surface"], On = ["data-surface"], kn = /* @__PURE__ */ d({
|
|
|
2589
2640
|
onStalled: (e) => Q(i, r, e),
|
|
2590
2641
|
onTimeupdate: (e) => Q(i, r, e),
|
|
2591
2642
|
onWaiting: (e) => Q(i, r, e)
|
|
2592
|
-
}, null, 40,
|
|
2593
|
-
icon: N(
|
|
2643
|
+
}, null, 40, tr))], 2)) : (w(), s("div", nr, [c("div", rr, [k(e.$slots, "item-icon", {
|
|
2644
|
+
icon: N(Nt)(r.type),
|
|
2594
2645
|
item: r
|
|
2595
|
-
}, () => [(w(), a(A(N(
|
|
2646
|
+
}, () => [(w(), a(A(N(Nt)(r.type)), {
|
|
2596
2647
|
class: "h-6 w-6 stroke-[1.9]",
|
|
2597
2648
|
"aria-hidden": "true"
|
|
2598
|
-
}))])])]))], 14,
|
|
2599
|
-
W.value && f["fullscreen-overlay"] ? (w(), s("div",
|
|
2600
|
-
N(h).activeItem.value ? (w(), a(
|
|
2649
|
+
}))])])]))], 14, Ln))), 128)),
|
|
2650
|
+
W.value && f["fullscreen-overlay"] ? (w(), s("div", ir, [c("div", ar, [k(e.$slots, "fullscreen-overlay", y(p(W.value)))])])) : o("", !0),
|
|
2651
|
+
N(h).activeItem.value ? (w(), a(At, {
|
|
2601
2652
|
key: 1,
|
|
2602
2653
|
"current-index": N(h).resolvedActiveIndex.value,
|
|
2603
2654
|
loading: d.loading,
|
|
@@ -2620,7 +2671,7 @@ var Dn = ["data-surface"], On = ["data-surface"], kn = /* @__PURE__ */ d({
|
|
|
2620
2671
|
"title",
|
|
2621
2672
|
"total"
|
|
2622
2673
|
])) : o("", !0),
|
|
2623
|
-
B.value ? (w(), a(
|
|
2674
|
+
B.value ? (w(), a(yt, {
|
|
2624
2675
|
key: 2,
|
|
2625
2676
|
"current-time": N(h).activeMediaState.value.currentTime,
|
|
2626
2677
|
"current-time-label": N(h).formatPlaybackTime(N(h).activeMediaState.value.currentTime),
|
|
@@ -2654,10 +2705,10 @@ var Dn = ["data-surface"], On = ["data-surface"], kn = /* @__PURE__ */ d({
|
|
|
2654
2705
|
"data-testid": "vibe-fullscreen-status-badge",
|
|
2655
2706
|
class: v(["inline-flex w-auto items-center border border-white/14 bg-black/40 px-5 py-3 text-[0.75rem] font-bold uppercase tracking-[0.18em] text-[#f7f1ea]/74 backdrop-blur-[18px] max-[720px]:w-[calc(100%-2.5rem)] max-[720px]:justify-center", K.value.kind === "end" ? "border-amber-300/35 text-amber-200" : K.value.kind === "failed" ? "border-rose-400/45 text-rose-100" : ""])
|
|
2656
2707
|
}, j(K.value.message), 3))], 2)) : o("", !0)
|
|
2657
|
-
])) : H.value ? (w(), s("div",
|
|
2708
|
+
])) : H.value ? (w(), s("div", or, [c("div", sr, [c("span", cr, [u(N(oe), {
|
|
2658
2709
|
class: "h-5 w-5 animate-spin stroke-[1.9] text-[#f7f1ea]/78",
|
|
2659
2710
|
"aria-hidden": "true"
|
|
2660
|
-
})]), c("p",
|
|
2711
|
+
})]), c("p", lr, j(U.value), 1)])])) : N(Z) && N(X) ? (w(), a(Pn, {
|
|
2661
2712
|
key: 2,
|
|
2662
2713
|
message: N(X).message,
|
|
2663
2714
|
mode: N(X).mode,
|
|
@@ -2669,7 +2720,7 @@ var Dn = ["data-surface"], On = ["data-surface"], kn = /* @__PURE__ */ d({
|
|
|
2669
2720
|
"message",
|
|
2670
2721
|
"mode",
|
|
2671
2722
|
"surface"
|
|
2672
|
-
])) : o("", !0), N(de) && N(X) ? (w(), a(
|
|
2723
|
+
])) : o("", !0), N(de) && N(X) ? (w(), a(Pn, {
|
|
2673
2724
|
key: 3,
|
|
2674
2725
|
message: N(X).message,
|
|
2675
2726
|
mode: N(X).mode,
|
|
@@ -2689,7 +2740,7 @@ var Dn = ["data-surface"], On = ["data-surface"], kn = /* @__PURE__ */ d({
|
|
|
2689
2740
|
"leave-from-class": "translate-x-0 opacity-100",
|
|
2690
2741
|
"leave-to-class": "translate-x-full opacity-0"
|
|
2691
2742
|
}, {
|
|
2692
|
-
default: z(() => [ie.value && W.value ? (w(), s("aside",
|
|
2743
|
+
default: z(() => [ie.value && W.value ? (w(), s("aside", ur, [c("div", dr, [k(e.$slots, "fullscreen-aside", y(p(W.value)))])])) : o("", !0)]),
|
|
2693
2744
|
_: 3
|
|
2694
2745
|
})], 4),
|
|
2695
2746
|
u(r, {
|
|
@@ -2700,29 +2751,29 @@ var Dn = ["data-surface"], On = ["data-surface"], kn = /* @__PURE__ */ d({
|
|
|
2700
2751
|
"leave-from-class": "translate-x-0 opacity-100",
|
|
2701
2752
|
"leave-to-class": "translate-x-full opacity-0"
|
|
2702
2753
|
}, {
|
|
2703
|
-
default: z(() => [ae.value && W.value ? (w(), s("aside",
|
|
2754
|
+
default: z(() => [ae.value && W.value ? (w(), s("aside", fr, [c("div", pr, [k(e.$slots, "fullscreen-aside", y(p(W.value)))])])) : o("", !0)]),
|
|
2704
2755
|
_: 3
|
|
2705
2756
|
})
|
|
2706
2757
|
]));
|
|
2707
2758
|
}
|
|
2708
|
-
}),
|
|
2709
|
-
function
|
|
2759
|
+
}), _r = 1, vr = .5;
|
|
2760
|
+
function yr(e) {
|
|
2710
2761
|
if (e.type !== "image" && e.type !== "video") return {
|
|
2711
|
-
width:
|
|
2712
|
-
height:
|
|
2762
|
+
width: _r,
|
|
2763
|
+
height: _r,
|
|
2713
2764
|
source: "fallback"
|
|
2714
2765
|
};
|
|
2715
2766
|
let t = e.preview?.width, n = e.preview?.height;
|
|
2716
|
-
if (
|
|
2717
|
-
let r =
|
|
2767
|
+
if (Er(t) && Er(n)) {
|
|
2768
|
+
let r = Dr(e, t, n);
|
|
2718
2769
|
return {
|
|
2719
2770
|
width: r.width,
|
|
2720
2771
|
height: r.height,
|
|
2721
2772
|
source: "preview"
|
|
2722
2773
|
};
|
|
2723
2774
|
}
|
|
2724
|
-
if (
|
|
2725
|
-
let t =
|
|
2775
|
+
if (Er(e.width) && Er(e.height)) {
|
|
2776
|
+
let t = Dr(e, e.width, e.height);
|
|
2726
2777
|
return {
|
|
2727
2778
|
width: t.width,
|
|
2728
2779
|
height: t.height,
|
|
@@ -2730,31 +2781,31 @@ function mr(e) {
|
|
|
2730
2781
|
};
|
|
2731
2782
|
}
|
|
2732
2783
|
return {
|
|
2733
|
-
width:
|
|
2734
|
-
height:
|
|
2784
|
+
width: _r,
|
|
2785
|
+
height: _r,
|
|
2735
2786
|
source: "fallback"
|
|
2736
2787
|
};
|
|
2737
2788
|
}
|
|
2738
|
-
function
|
|
2789
|
+
function br(e, t) {
|
|
2739
2790
|
return !e || e <= 0 || !t || t <= 0 ? 1 : Math.max(1, Math.floor(e / t));
|
|
2740
2791
|
}
|
|
2741
|
-
function
|
|
2792
|
+
function xr(e, t, n, r = 0) {
|
|
2742
2793
|
if (!e || e <= 0 || !t || t <= 0) return n;
|
|
2743
2794
|
let i = typeof r == "number" && r > 0 ? r : 0, a = e - Math.max(0, t - 1) * i;
|
|
2744
2795
|
return !a || a <= 0 ? n : a / t;
|
|
2745
2796
|
}
|
|
2746
|
-
function
|
|
2747
|
-
let n =
|
|
2797
|
+
function Sr(e, t) {
|
|
2798
|
+
let n = yr(e);
|
|
2748
2799
|
return n.height / n.width * t;
|
|
2749
2800
|
}
|
|
2750
|
-
function
|
|
2801
|
+
function Cr(e, t) {
|
|
2751
2802
|
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;
|
|
2752
2803
|
for (let c = 0; c < e.length; c += 1) {
|
|
2753
2804
|
let l = e[c];
|
|
2754
2805
|
o.set($(l), c);
|
|
2755
2806
|
let u = 0;
|
|
2756
2807
|
for (let e = 1; e < n.length; e += 1) n[e] < n[u] && (u = e);
|
|
2757
|
-
let d = u * (t.columnWidth + t.gapX), f = n[u], p =
|
|
2808
|
+
let d = u * (t.columnWidth + t.gapX), f = n[u], p = Sr(l, t.columnWidth);
|
|
2758
2809
|
r[c] = {
|
|
2759
2810
|
x: d,
|
|
2760
2811
|
y: f
|
|
@@ -2773,7 +2824,7 @@ function vr(e, t) {
|
|
|
2773
2824
|
indexById: o
|
|
2774
2825
|
};
|
|
2775
2826
|
}
|
|
2776
|
-
function
|
|
2827
|
+
function wr(e) {
|
|
2777
2828
|
if (e.itemCount <= 0) return [];
|
|
2778
2829
|
if (e.viewportHeight <= 0) return Array.from({ length: e.itemCount }, (e, t) => t);
|
|
2779
2830
|
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();
|
|
@@ -2783,7 +2834,7 @@ function yr(e) {
|
|
|
2783
2834
|
}
|
|
2784
2835
|
return Array.from(a).sort((e, t) => e - t);
|
|
2785
2836
|
}
|
|
2786
|
-
function
|
|
2837
|
+
function Tr(e, t, n) {
|
|
2787
2838
|
let r = /* @__PURE__ */ new Map();
|
|
2788
2839
|
for (let i of e) {
|
|
2789
2840
|
let e = t.get($(i));
|
|
@@ -2793,11 +2844,11 @@ function br(e, t, n) {
|
|
|
2793
2844
|
}
|
|
2794
2845
|
return r;
|
|
2795
2846
|
}
|
|
2796
|
-
function
|
|
2847
|
+
function Er(e) {
|
|
2797
2848
|
return typeof e == "number" && Number.isFinite(e) && e > 0;
|
|
2798
2849
|
}
|
|
2799
|
-
function
|
|
2800
|
-
return e.type !== "image" || n / t >=
|
|
2850
|
+
function Dr(e, t, n) {
|
|
2851
|
+
return e.type !== "image" || n / t >= vr ? {
|
|
2801
2852
|
width: t,
|
|
2802
2853
|
height: n
|
|
2803
2854
|
} : {
|
|
@@ -2807,21 +2858,21 @@ function Sr(e, t, n) {
|
|
|
2807
2858
|
}
|
|
2808
2859
|
//#endregion
|
|
2809
2860
|
//#region src/components/viewer-core/useMasonryMotion.ts
|
|
2810
|
-
var
|
|
2811
|
-
function
|
|
2861
|
+
var Or = 300, kr = 600, Ar = 40, jr = 300, Mr = 400;
|
|
2862
|
+
function Nr(e, t) {
|
|
2812
2863
|
return t === "top" ? [...e].reverse() : e;
|
|
2813
2864
|
}
|
|
2814
|
-
function
|
|
2815
|
-
return e <= 0 ?
|
|
2865
|
+
function Pr(e) {
|
|
2866
|
+
return e <= 0 ? kr : kr + Math.min((e - 1) * Ar, Mr);
|
|
2816
2867
|
}
|
|
2817
|
-
function
|
|
2818
|
-
return
|
|
2868
|
+
function Fr() {
|
|
2869
|
+
return jr;
|
|
2819
2870
|
}
|
|
2820
|
-
function
|
|
2871
|
+
function Ir(e) {
|
|
2821
2872
|
let t = e.itemHeight > 0 ? e.itemHeight : e.columnWidth;
|
|
2822
2873
|
return e.direction === "top" ? e.scrollTop - t : e.scrollTop + e.viewportHeight + t;
|
|
2823
2874
|
}
|
|
2824
|
-
function
|
|
2875
|
+
function Lr(e) {
|
|
2825
2876
|
let t = D(/* @__PURE__ */ new Set()), n = D(/* @__PURE__ */ new Set()), r = D(/* @__PURE__ */ new Map()), a = D(/* @__PURE__ */ new Map()), o = D(/* @__PURE__ */ new Map()), s = D(/* @__PURE__ */ new Set()), c = D(/* @__PURE__ */ new Map()), l = D(/* @__PURE__ */ new Map()), u = D(/* @__PURE__ */ new Set()), d = /* @__PURE__ */ new Set(), f = /* @__PURE__ */ new Set(), p = i(() => Array.from(o.value.values()));
|
|
2826
2877
|
L(e.visibleIndices, (i) => {
|
|
2827
2878
|
if (!i.length) return;
|
|
@@ -2831,20 +2882,20 @@ function Mr(e) {
|
|
|
2831
2882
|
!r || !t.value.has(r) || d.has(r) || (d.add(r), o.push(r));
|
|
2832
2883
|
}
|
|
2833
2884
|
if (!o.length) return;
|
|
2834
|
-
let s =
|
|
2835
|
-
for (let e = 0; e < s.length; e += 1) c.set(s[e], Math.min(e *
|
|
2836
|
-
r.value = c,
|
|
2885
|
+
let s = Nr(o, a.value.get(o[0]) ?? "bottom"), c = new Map(r.value);
|
|
2886
|
+
for (let e = 0; e < s.length; e += 1) c.set(s[e], Math.min(e * Ar, Mr));
|
|
2887
|
+
r.value = c, Rr(() => {
|
|
2837
2888
|
let e = new Set(n.value);
|
|
2838
2889
|
for (let t of o) e.add(t);
|
|
2839
2890
|
n.value = e;
|
|
2840
|
-
}),
|
|
2891
|
+
}), zr(() => {
|
|
2841
2892
|
let e = new Set(t.value);
|
|
2842
2893
|
for (let t of o) e.delete(t);
|
|
2843
2894
|
t.value = e, S(() => {
|
|
2844
2895
|
let e = new Set(n.value), t = new Map(r.value), i = new Map(a.value);
|
|
2845
2896
|
for (let n of o) e.delete(n), t.delete(n), i.delete(n), d.delete(n);
|
|
2846
2897
|
n.value = e, r.value = t, a.value = i;
|
|
2847
|
-
},
|
|
2898
|
+
}, Pr(o.length));
|
|
2848
2899
|
});
|
|
2849
2900
|
}, { flush: "post" }), L(() => e.items.value.map((e) => $(e)), (e) => {
|
|
2850
2901
|
if (!e.length || !o.value.size) return;
|
|
@@ -2871,7 +2922,7 @@ function Mr(e) {
|
|
|
2871
2922
|
let e = $(t.item);
|
|
2872
2923
|
p.push(e), i.set(e, t), c.delete(e), l.delete(e), u.delete(e), f.delete(e), d.delete(e);
|
|
2873
2924
|
}
|
|
2874
|
-
o.value = i, t.value = c, n.value = l, r.value = u, a.value = f,
|
|
2925
|
+
o.value = i, t.value = c, n.value = l, r.value = u, a.value = f, Rr(() => {
|
|
2875
2926
|
let e = new Set(s.value);
|
|
2876
2927
|
for (let t of p) e.add(t);
|
|
2877
2928
|
s.value = e;
|
|
@@ -2879,9 +2930,9 @@ function Mr(e) {
|
|
|
2879
2930
|
let e = new Map(o.value), t = new Set(s.value);
|
|
2880
2931
|
for (let n of p) e.delete(n), t.delete(n);
|
|
2881
2932
|
o.value = e, s.value = t;
|
|
2882
|
-
},
|
|
2933
|
+
}, jr);
|
|
2883
2934
|
}
|
|
2884
|
-
function g(t, n, r =
|
|
2935
|
+
function g(t, n, r = Or) {
|
|
2885
2936
|
if (!t.size) return;
|
|
2886
2937
|
let i = /* @__PURE__ */ new Map(), a = [];
|
|
2887
2938
|
for (let [r, o] of t.entries()) {
|
|
@@ -2900,8 +2951,8 @@ function Mr(e) {
|
|
|
2900
2951
|
c.value = i, u.value = /* @__PURE__ */ new Set();
|
|
2901
2952
|
let o = new Map(l.value);
|
|
2902
2953
|
for (let e of a) o.set(e, r);
|
|
2903
|
-
l.value = o,
|
|
2904
|
-
u.value = new Set(a),
|
|
2954
|
+
l.value = o, Rr(() => {
|
|
2955
|
+
u.value = new Set(a), Rr(() => {
|
|
2905
2956
|
c.value = /* @__PURE__ */ new Map();
|
|
2906
2957
|
});
|
|
2907
2958
|
}), S(() => {
|
|
@@ -2912,8 +2963,8 @@ function Mr(e) {
|
|
|
2912
2963
|
}, r);
|
|
2913
2964
|
}
|
|
2914
2965
|
function _(e) {
|
|
2915
|
-
if (n.value.has(e)) return `transform ${
|
|
2916
|
-
if (u.value.has(e)) return `transform ${l.value.get(e) ??
|
|
2966
|
+
if (n.value.has(e)) return `transform ${kr}ms ease-out`;
|
|
2967
|
+
if (u.value.has(e)) return `transform ${l.value.get(e) ?? Or}ms ease-out`;
|
|
2917
2968
|
}
|
|
2918
2969
|
function v(e) {
|
|
2919
2970
|
if (!n.value.has(e)) return;
|
|
@@ -2930,7 +2981,7 @@ function Mr(e) {
|
|
|
2930
2981
|
} : {
|
|
2931
2982
|
dx: 0,
|
|
2932
2983
|
dy: 0
|
|
2933
|
-
}, u = s ? a.value.get(s) ?? "bottom" : "bottom", d = s && t.value.has(s) ?
|
|
2984
|
+
}, u = s ? a.value.get(s) ?? "bottom" : "bottom", d = s && t.value.has(s) ? Ir({
|
|
2934
2985
|
columnWidth: e.columnWidth.value,
|
|
2935
2986
|
direction: u,
|
|
2936
2987
|
itemHeight: o,
|
|
@@ -2944,14 +2995,14 @@ function Mr(e) {
|
|
|
2944
2995
|
if (!r) return {
|
|
2945
2996
|
opacity: "0",
|
|
2946
2997
|
transform: "translate3d(0, 0, 0) scale(0.96)",
|
|
2947
|
-
transition: `opacity ${
|
|
2998
|
+
transition: `opacity ${jr}ms ease-out, transform ${jr}ms ease-out`
|
|
2948
2999
|
};
|
|
2949
3000
|
let i = s.value.has(n);
|
|
2950
3001
|
return {
|
|
2951
3002
|
height: `${r.height}px`,
|
|
2952
3003
|
opacity: i ? "0" : "1",
|
|
2953
3004
|
transform: `translate3d(${r.position.x}px, ${r.position.y}px, 0) scale(${i ? "0.96" : "1"})`,
|
|
2954
|
-
transition: `opacity ${
|
|
3005
|
+
transition: `opacity ${jr}ms ease-out, transform ${jr}ms ease-out`,
|
|
2955
3006
|
width: `${e.columnWidth.value}px`
|
|
2956
3007
|
};
|
|
2957
3008
|
}
|
|
@@ -2972,28 +3023,28 @@ function Mr(e) {
|
|
|
2972
3023
|
playFlipMoveAnimation: g
|
|
2973
3024
|
};
|
|
2974
3025
|
}
|
|
2975
|
-
function
|
|
3026
|
+
function Rr(e) {
|
|
2976
3027
|
if (typeof requestAnimationFrame == "function") {
|
|
2977
3028
|
requestAnimationFrame(() => e());
|
|
2978
3029
|
return;
|
|
2979
3030
|
}
|
|
2980
3031
|
setTimeout(e, 0);
|
|
2981
3032
|
}
|
|
2982
|
-
function
|
|
2983
|
-
|
|
3033
|
+
function zr(e) {
|
|
3034
|
+
Rr(() => Rr(e));
|
|
2984
3035
|
}
|
|
2985
3036
|
//#endregion
|
|
2986
3037
|
//#region src/components/viewer-core/masonryViewport.ts
|
|
2987
|
-
function
|
|
3038
|
+
function Br(e, t) {
|
|
2988
3039
|
return e?.clientHeight || Math.round(e?.getBoundingClientRect().height ?? 0) || t || window.innerHeight || 1;
|
|
2989
3040
|
}
|
|
2990
|
-
function
|
|
3041
|
+
function Vr(e, t, n) {
|
|
2991
3042
|
return e?.clientWidth || Math.round(e?.getBoundingClientRect().width ?? 0) || t || window.innerWidth || n;
|
|
2992
3043
|
}
|
|
2993
|
-
function
|
|
3044
|
+
function Hr(e, t, n, r) {
|
|
2994
3045
|
return (e?.scrollHeight ?? r) - (t + n);
|
|
2995
3046
|
}
|
|
2996
|
-
function
|
|
3047
|
+
function Ur(e, t) {
|
|
2997
3048
|
return {
|
|
2998
3049
|
height: `${e}px`,
|
|
2999
3050
|
transform: `translate3d(0, ${t}px, 0)`
|
|
@@ -3001,8 +3052,8 @@ function Rr(e, t) {
|
|
|
3001
3052
|
}
|
|
3002
3053
|
//#endregion
|
|
3003
3054
|
//#region src/components/viewer-core/useEdgeBoundary.ts
|
|
3004
|
-
var
|
|
3005
|
-
function
|
|
3055
|
+
var Wr = 250, Gr = 1e3;
|
|
3056
|
+
function Kr(e) {
|
|
3006
3057
|
let t = D(!1), n = D(!1), r = D(0), i = D(0), a = D(!1), o = D(!1), s = 0, c = null;
|
|
3007
3058
|
x(() => {
|
|
3008
3059
|
y();
|
|
@@ -3018,7 +3069,7 @@ function Vr(e) {
|
|
|
3018
3069
|
function u(t) {
|
|
3019
3070
|
if (!b(t) || !e.isAtBoundary()) return;
|
|
3020
3071
|
let n = Date.now();
|
|
3021
|
-
n < s || (s = n +
|
|
3072
|
+
n < s || (s = n + Wr, m());
|
|
3022
3073
|
}
|
|
3023
3074
|
function d() {
|
|
3024
3075
|
if (!g()) return;
|
|
@@ -3052,7 +3103,7 @@ function Vr(e) {
|
|
|
3052
3103
|
return e.hasPage.value && t.value && r.value > i.value && !e.interactionLocked?.value && !e.loading.value && !a.value && typeof e.requestPage.value == "function";
|
|
3053
3104
|
}
|
|
3054
3105
|
function _() {
|
|
3055
|
-
o.value = !1, v(
|
|
3106
|
+
o.value = !1, v(Gr);
|
|
3056
3107
|
}
|
|
3057
3108
|
function v(e) {
|
|
3058
3109
|
y(), a.value = !0, c = setTimeout(() => {
|
|
@@ -3075,42 +3126,42 @@ function Vr(e) {
|
|
|
3075
3126
|
}
|
|
3076
3127
|
//#endregion
|
|
3077
3128
|
//#region src/components/viewer-core/useMasonryList.ts
|
|
3078
|
-
var
|
|
3079
|
-
function
|
|
3080
|
-
let t = D(null), n = D(0), r = D(typeof window > "u" ? 0 : window.innerHeight || 0), a = D(typeof window > "u" ? 0 : window.innerWidth ||
|
|
3129
|
+
var qr = 600, Jr = 24, Yr = 16, Xr = 300, Zr = 200, Qr = 200, $r = Jr + Yr, ei = 200, ti = 300, ni = 24, ri = 48, ii = 500, ai = 1e3;
|
|
3130
|
+
function oi(e) {
|
|
3131
|
+
let t = D(null), n = D(0), r = D(typeof window > "u" ? 0 : window.innerHeight || 0), a = D(typeof window > "u" ? 0 : window.innerWidth || Xr), o = D([]), s = D([]), c = D(/* @__PURE__ */ new Map()), l = D(0), u = D(/* @__PURE__ */ new Map()), d = D(null), f = D(null), p = D(!1), m = i(() => Math.max(Xr, a.value - Jr * 2)), h = i(() => br(m.value, Xr)), g = i(() => xr(m.value, h.value, Xr, Yr)), v = i(() => si(e.activeIndex.value, 0, Math.max(0, e.items.value.length - 1))), y = i(() => wr({
|
|
3081
3132
|
itemCount: e.items.value.length,
|
|
3082
3133
|
viewportHeight: r.value,
|
|
3083
3134
|
scrollTop: n.value,
|
|
3084
|
-
overscanPx:
|
|
3085
|
-
bucketPx:
|
|
3135
|
+
overscanPx: Zr,
|
|
3136
|
+
bucketPx: qr,
|
|
3086
3137
|
buckets: c.value
|
|
3087
3138
|
})), b = i(() => y.value.map((t) => ({
|
|
3088
3139
|
item: e.items.value[t],
|
|
3089
3140
|
index: t
|
|
3090
3141
|
}))), C = i(() => {
|
|
3091
|
-
let e = l.value +
|
|
3092
|
-
return Math.max(e, t, r.value) +
|
|
3093
|
-
}), w = i(() => e.hasNextPage.value || e.allowExhaustedNextPageRefresh.value), T = i(() =>
|
|
3142
|
+
let e = l.value + Jr * 2, t = d.value ?? 0;
|
|
3143
|
+
return Math.max(e, t, r.value) + ei;
|
|
3144
|
+
}), w = i(() => e.hasNextPage.value || e.allowExhaustedNextPageRefresh.value), T = i(() => li({
|
|
3094
3145
|
active: e.active.value,
|
|
3095
3146
|
maxScrollTop: se(),
|
|
3096
3147
|
progressDistancePx: n.value,
|
|
3097
|
-
thresholdPx:
|
|
3148
|
+
thresholdPx: Qr,
|
|
3098
3149
|
triggerEnabled: w.value
|
|
3099
|
-
})), E = i(() => e.items.value.length > 0 ? `${v.value + 1} / ${e.items.value.length}` : "0 / 0"), O = i(() =>
|
|
3150
|
+
})), E = i(() => e.items.value.length > 0 ? `${v.value + 1} / ${e.items.value.length}` : "0 / 0"), O = i(() => ci({
|
|
3100
3151
|
active: e.active.value,
|
|
3101
3152
|
maxScrollTop: se(),
|
|
3102
3153
|
progressDistancePx: n.value,
|
|
3103
|
-
thresholdPx:
|
|
3154
|
+
thresholdPx: $r,
|
|
3104
3155
|
triggerEnabled: e.hasPreviousPage.value
|
|
3105
|
-
})), k = i(() => Math.max(0, r.value -
|
|
3156
|
+
})), k = i(() => Math.max(0, r.value - ni * 2)), A = i(() => C.value > r.value + 1 && k.value > 0), j = i(() => {
|
|
3106
3157
|
if (!A.value) return 0;
|
|
3107
3158
|
let e = r.value / C.value * k.value;
|
|
3108
|
-
return Math.min(k.value, Math.max(
|
|
3159
|
+
return Math.min(k.value, Math.max(ri, e));
|
|
3109
3160
|
}), M = i(() => {
|
|
3110
|
-
if (!A.value) return
|
|
3161
|
+
if (!A.value) return ni;
|
|
3111
3162
|
let e = Math.max(0, C.value - r.value);
|
|
3112
|
-
return
|
|
3113
|
-
}), N =
|
|
3163
|
+
return ni + Math.max(0, k.value - j.value) * (e > 0 ? si(n.value / e, 0, 1) : 0);
|
|
3164
|
+
}), N = Lr({
|
|
3114
3165
|
items: e.items,
|
|
3115
3166
|
visibleIndices: y,
|
|
3116
3167
|
positions: o,
|
|
@@ -3119,27 +3170,27 @@ function ti(e) {
|
|
|
3119
3170
|
columnWidth: g,
|
|
3120
3171
|
scrollTop: n,
|
|
3121
3172
|
viewportHeight: r
|
|
3122
|
-
}), P =
|
|
3173
|
+
}), P = Kr({
|
|
3123
3174
|
direction: "top",
|
|
3124
3175
|
getAnimationLockMs(e) {
|
|
3125
|
-
return Math.max(
|
|
3176
|
+
return Math.max(ii, Pr(e)) + ai;
|
|
3126
3177
|
},
|
|
3127
3178
|
hasPage: e.hasPreviousPage,
|
|
3128
3179
|
interactionLocked: p,
|
|
3129
3180
|
isAtBoundary() {
|
|
3130
|
-
return n.value <=
|
|
3181
|
+
return n.value <= $r;
|
|
3131
3182
|
},
|
|
3132
3183
|
loading: e.loading,
|
|
3133
3184
|
requestPage: e.requestPreviousPage
|
|
3134
|
-
}), F =
|
|
3185
|
+
}), F = Kr({
|
|
3135
3186
|
direction: "bottom",
|
|
3136
3187
|
getAnimationLockMs(e) {
|
|
3137
|
-
return
|
|
3188
|
+
return Pr(e) + ai;
|
|
3138
3189
|
},
|
|
3139
3190
|
hasPage: w,
|
|
3140
3191
|
interactionLocked: p,
|
|
3141
3192
|
isAtBoundary() {
|
|
3142
|
-
return oe() <=
|
|
3193
|
+
return oe() <= Qr;
|
|
3143
3194
|
},
|
|
3144
3195
|
loading: e.loading,
|
|
3145
3196
|
requestPage: e.requestNextPage
|
|
@@ -3149,7 +3200,7 @@ function ti(e) {
|
|
|
3149
3200
|
h,
|
|
3150
3201
|
g
|
|
3151
3202
|
], async ([t], [r = []]) => {
|
|
3152
|
-
let i = t.map((e) => $(e)), a = r ?? [], s = a.map((e) => $(e)), c =
|
|
3203
|
+
let i = t.map((e) => $(e)), a = r ?? [], s = a.map((e) => $(e)), c = Tr(a, u.value, o.value), l = ue(a), d = new Set(s), f = new Set(i), p = t.filter((e) => !d.has($(e))), m = a.flatMap((e) => {
|
|
3153
3204
|
let t = $(e);
|
|
3154
3205
|
if (f.has(t)) return [];
|
|
3155
3206
|
let n = c.get(t), r = l.get(t);
|
|
@@ -3158,8 +3209,8 @@ function ti(e) {
|
|
|
3158
3209
|
item: e,
|
|
3159
3210
|
position: n
|
|
3160
3211
|
}];
|
|
3161
|
-
}), h = i.length > s.length && s.length > 0 && i[0] !== s[0], g = t.length === 0 && a.length > 0 && m.length > 0 && n.value > 0, y = m.length > 0 && n.value >
|
|
3162
|
-
y && K(
|
|
3212
|
+
}), h = i.length > s.length && s.length > 0 && i[0] !== s[0], g = t.length === 0 && a.length > 0 && m.length > 0 && n.value > 0, y = m.length > 0 && n.value > Jr + Yr, b = h && n.value > Jr + Yr ? t[v.value] : null, x = b ? $(b) : null;
|
|
3213
|
+
y && K(Fr() + ai), g && G(), te(), m.length > 0 && N.markLeave(m), p.length > 0 && (N.markEnter(p, h ? "top" : "bottom"), h ? P.onItemsMutated(p.length) : F.onItemsMutated(p.length)), N.playFlipMoveAnimation(c, new Set(p.map((e) => $(e))), h ? ii : void 0), x ? (await _(), ne(x, c)) : e.active.value && s.length > 0 && re();
|
|
3163
3214
|
}, { immediate: !0 }), L([
|
|
3164
3215
|
() => e.pendingAppendItems.value.map((e) => $(e)),
|
|
3165
3216
|
h,
|
|
@@ -3176,7 +3227,7 @@ function ti(e) {
|
|
|
3176
3227
|
}
|
|
3177
3228
|
if (i !== !1 || f.value == null) return;
|
|
3178
3229
|
await _();
|
|
3179
|
-
let o = Math.max(0, C.value - r.value), s =
|
|
3230
|
+
let o = Math.max(0, C.value - r.value), s = si(f.value, 0, o);
|
|
3180
3231
|
a.scrollTop = s, n.value = s, P.syncBoundary(), F.syncBoundary();
|
|
3181
3232
|
}), L(() => e.loading.value, async (t) => {
|
|
3182
3233
|
!t && !e.pendingAppendItems.value.length && !z && !ee && (d.value = null), P.onLoadingChange(t), F.onLoadingChange(t), await _();
|
|
@@ -3188,16 +3239,16 @@ function ti(e) {
|
|
|
3188
3239
|
I?.disconnect(), I = null, window.removeEventListener("resize", Y), de(), fe(), R &&= (cancelAnimationFrame(R), 0);
|
|
3189
3240
|
});
|
|
3190
3241
|
function te() {
|
|
3191
|
-
let t =
|
|
3242
|
+
let t = Cr(e.items.value, {
|
|
3192
3243
|
columnCount: h.value,
|
|
3193
3244
|
columnWidth: g.value,
|
|
3194
|
-
gapX:
|
|
3195
|
-
gapY:
|
|
3196
|
-
bucketPx:
|
|
3245
|
+
gapX: Yr,
|
|
3246
|
+
gapY: Yr,
|
|
3247
|
+
bucketPx: qr
|
|
3197
3248
|
});
|
|
3198
3249
|
o.value = t.positions.map((e) => ({
|
|
3199
|
-
x: e.x +
|
|
3200
|
-
y: e.y +
|
|
3250
|
+
x: e.x + Jr,
|
|
3251
|
+
y: e.y + Jr
|
|
3201
3252
|
})), s.value = t.heights, c.value = t.buckets, l.value = t.contentHeight, u.value = t.indexById;
|
|
3202
3253
|
}
|
|
3203
3254
|
function V() {
|
|
@@ -3222,7 +3273,7 @@ function ti(e) {
|
|
|
3222
3273
|
let a = t.value, c = o.value[e], l = s.value[e];
|
|
3223
3274
|
if (!a || !c || !l) return;
|
|
3224
3275
|
let u = a.scrollTop, d = Math.max(0, C.value - r.value);
|
|
3225
|
-
i === "center" ? u = c.y - (r.value - l) / 2 : c.y < a.scrollTop ? u = c.y -
|
|
3276
|
+
i === "center" ? u = c.y - (r.value - l) / 2 : c.y < a.scrollTop ? u = c.y - Jr : c.y + l > a.scrollTop + r.value && (u = c.y + l - r.value + Jr), a.scrollTop = si(u, 0, d), n.value = a.scrollTop, q();
|
|
3226
3277
|
}
|
|
3227
3278
|
function ne(e, r) {
|
|
3228
3279
|
let i = t.value, a = r.get(e), s = u.value.get(e), c = s == null ? null : o.value[s];
|
|
@@ -3255,7 +3306,7 @@ function ti(e) {
|
|
|
3255
3306
|
e.setActiveIndex(i);
|
|
3256
3307
|
}
|
|
3257
3308
|
function re() {
|
|
3258
|
-
let t = n.value <=
|
|
3309
|
+
let t = n.value <= $r, r = oe() <= Qr;
|
|
3259
3310
|
return t ? (e.setActiveIndex(0), !0) : r ? (e.setActiveIndex(Math.max(0, e.items.value.length - 1)), !0) : !1;
|
|
3260
3311
|
}
|
|
3261
3312
|
function J() {
|
|
@@ -3265,29 +3316,29 @@ function ti(e) {
|
|
|
3265
3316
|
r.value = ie(), a.value = ae();
|
|
3266
3317
|
}
|
|
3267
3318
|
function ie() {
|
|
3268
|
-
return
|
|
3319
|
+
return Br(t.value, r.value);
|
|
3269
3320
|
}
|
|
3270
3321
|
function ae() {
|
|
3271
|
-
return
|
|
3322
|
+
return Vr(t.value, a.value, Xr);
|
|
3272
3323
|
}
|
|
3273
3324
|
function oe() {
|
|
3274
|
-
return
|
|
3325
|
+
return Hr(t.value, n.value, r.value, C.value);
|
|
3275
3326
|
}
|
|
3276
3327
|
function se() {
|
|
3277
3328
|
let e = Math.max(t.value?.scrollHeight ?? 0, C.value);
|
|
3278
3329
|
return Math.max(0, e - r.value);
|
|
3279
3330
|
}
|
|
3280
3331
|
function ce() {
|
|
3281
|
-
return
|
|
3332
|
+
return Ur(j.value, M.value);
|
|
3282
3333
|
}
|
|
3283
3334
|
function le(e) {
|
|
3284
|
-
return e.length ?
|
|
3335
|
+
return e.length ? Cr(e, {
|
|
3285
3336
|
columnCount: h.value,
|
|
3286
3337
|
columnWidth: g.value,
|
|
3287
|
-
gapX:
|
|
3288
|
-
gapY:
|
|
3289
|
-
bucketPx:
|
|
3290
|
-
}).contentHeight +
|
|
3338
|
+
gapX: Yr,
|
|
3339
|
+
gapY: Yr,
|
|
3340
|
+
bucketPx: qr
|
|
3341
|
+
}).contentHeight + Jr * 2 : 0;
|
|
3291
3342
|
}
|
|
3292
3343
|
function ue(e) {
|
|
3293
3344
|
let t = /* @__PURE__ */ new Map();
|
|
@@ -3309,7 +3360,7 @@ function ti(e) {
|
|
|
3309
3360
|
} finally {
|
|
3310
3361
|
d.value = null, ee = !1;
|
|
3311
3362
|
}
|
|
3312
|
-
},
|
|
3363
|
+
}, ti));
|
|
3313
3364
|
}
|
|
3314
3365
|
function de() {
|
|
3315
3366
|
z &&= (clearTimeout(z), null);
|
|
@@ -3336,27 +3387,27 @@ function ti(e) {
|
|
|
3336
3387
|
scrollViewportRef: t
|
|
3337
3388
|
};
|
|
3338
3389
|
}
|
|
3339
|
-
function
|
|
3390
|
+
function si(e, t, n) {
|
|
3340
3391
|
return Math.min(Math.max(e, t), n);
|
|
3341
3392
|
}
|
|
3342
|
-
function
|
|
3393
|
+
function ci(e) {
|
|
3343
3394
|
if (!e.active || !e.triggerEnabled) return 0;
|
|
3344
3395
|
let t = Math.max(0, e.maxScrollTop - e.thresholdPx);
|
|
3345
|
-
return t <= 0 ? 1 :
|
|
3396
|
+
return t <= 0 ? 1 : si(1 - (e.progressDistancePx - e.thresholdPx) / t, 0, 1);
|
|
3346
3397
|
}
|
|
3347
|
-
function
|
|
3398
|
+
function li(e) {
|
|
3348
3399
|
if (!e.active || !e.triggerEnabled) return 0;
|
|
3349
3400
|
let t = Math.max(0, e.maxScrollTop - e.thresholdPx);
|
|
3350
|
-
return t <= 0 ? 1 :
|
|
3401
|
+
return t <= 0 ? 1 : si(e.progressDistancePx / t, 0, 1);
|
|
3351
3402
|
}
|
|
3352
3403
|
//#endregion
|
|
3353
3404
|
//#region src/components/viewer-core/listCardAsset.ts
|
|
3354
|
-
function
|
|
3405
|
+
function ui(e) {
|
|
3355
3406
|
if (e) try {
|
|
3356
3407
|
e.removeAttribute("src"), e.src = "";
|
|
3357
3408
|
} catch {}
|
|
3358
3409
|
}
|
|
3359
|
-
function
|
|
3410
|
+
function di(e) {
|
|
3360
3411
|
if (e) {
|
|
3361
3412
|
try {
|
|
3362
3413
|
e.currentTime = 0;
|
|
@@ -3367,12 +3418,12 @@ function oi(e) {
|
|
|
3367
3418
|
} catch {}
|
|
3368
3419
|
}
|
|
3369
3420
|
}
|
|
3370
|
-
function
|
|
3421
|
+
function fi(e, t) {
|
|
3371
3422
|
if (t) return e.bottom > t.top && e.top < t.bottom;
|
|
3372
3423
|
let n = window.innerHeight || document.documentElement.clientHeight || 0;
|
|
3373
3424
|
return e.bottom > 0 && e.top < n;
|
|
3374
3425
|
}
|
|
3375
|
-
function
|
|
3426
|
+
function pi(e) {
|
|
3376
3427
|
if (!e) return null;
|
|
3377
3428
|
try {
|
|
3378
3429
|
return new URL(e, window.location.href).href;
|
|
@@ -3382,9 +3433,9 @@ function ci(e) {
|
|
|
3382
3433
|
}
|
|
3383
3434
|
//#endregion
|
|
3384
3435
|
//#region src/components/viewer-core/listPreview.ts
|
|
3385
|
-
var
|
|
3386
|
-
function
|
|
3387
|
-
let t =
|
|
3436
|
+
var mi = /\.(avif|gif|jpe?g|png|svg|webp)(\?|#|$)/i, hi = /\.(m4v|mov|mp4|mpeg|ogg|ogv|webm)(\?|#|$)/i, gi = /^(?:(?:https?:)?\/\/[^/]+)?\/api\/files\/[^/?#]+\/(?:preview|downloaded)(?:\?|#|$)/i;
|
|
3437
|
+
function _i(e) {
|
|
3438
|
+
let t = vi(e), n = t?.url, r = yr(e), i = e.title?.trim() || Pt(e.type);
|
|
3388
3439
|
return t?.mediaType === "video" && typeof n == "string" ? {
|
|
3389
3440
|
kind: "video",
|
|
3390
3441
|
url: n,
|
|
@@ -3403,13 +3454,13 @@ function fi(e) {
|
|
|
3403
3454
|
width: r.width,
|
|
3404
3455
|
height: r.height,
|
|
3405
3456
|
label: i
|
|
3406
|
-
} : typeof n == "string" &&
|
|
3457
|
+
} : typeof n == "string" && bi(e, n) ? {
|
|
3407
3458
|
kind: "video",
|
|
3408
3459
|
url: n,
|
|
3409
3460
|
width: r.width,
|
|
3410
3461
|
height: r.height,
|
|
3411
3462
|
label: i
|
|
3412
|
-
} : typeof n == "string" &&
|
|
3463
|
+
} : typeof n == "string" && yi(e, n) ? {
|
|
3413
3464
|
kind: "image",
|
|
3414
3465
|
url: n,
|
|
3415
3466
|
width: r.width,
|
|
@@ -3423,26 +3474,26 @@ function fi(e) {
|
|
|
3423
3474
|
label: i
|
|
3424
3475
|
};
|
|
3425
3476
|
}
|
|
3426
|
-
function
|
|
3477
|
+
function vi(e) {
|
|
3427
3478
|
return e.preview?.url ? e.preview : typeof e.url != "string" || e.url.trim() === "" ? null : { url: e.url };
|
|
3428
3479
|
}
|
|
3429
|
-
function
|
|
3430
|
-
return e.type !== "image" || typeof t != "string" ? !1 :
|
|
3480
|
+
function yi(e, t) {
|
|
3481
|
+
return e.type !== "image" || typeof t != "string" ? !1 : mi.test(t) || xi(t);
|
|
3431
3482
|
}
|
|
3432
|
-
function
|
|
3433
|
-
return e.type !== "video" || typeof t != "string" ? !1 :
|
|
3483
|
+
function bi(e, t) {
|
|
3484
|
+
return e.type !== "video" || typeof t != "string" ? !1 : hi.test(t) || Si(t);
|
|
3434
3485
|
}
|
|
3435
|
-
function
|
|
3486
|
+
function xi(e) {
|
|
3436
3487
|
return /^(https?:\/\/|\/\/|\/(?!\/)|\.{1,2}\/|blob:|data:)/i.test(e);
|
|
3437
3488
|
}
|
|
3438
|
-
function
|
|
3439
|
-
return
|
|
3489
|
+
function Si(e) {
|
|
3490
|
+
return gi.test(e) || /^blob:/i.test(e) || /^data:video\//i.test(e);
|
|
3440
3491
|
}
|
|
3441
3492
|
//#endregion
|
|
3442
3493
|
//#region src/components/viewer-core/useListCardHealthCheck.ts
|
|
3443
|
-
function
|
|
3494
|
+
function Ci(e) {
|
|
3444
3495
|
let t = D(null), n = i(() => {
|
|
3445
|
-
let t = typeof e.item.value.healthCheck?.url == "string" ?
|
|
3496
|
+
let t = typeof e.item.value.healthCheck?.url == "string" ? pi(e.item.value.healthCheck.url) : null;
|
|
3446
3497
|
return !t || t === e.attachedAssetUrl.value ? null : t;
|
|
3447
3498
|
}), r = null, a = 0, o = /* @__PURE__ */ new Map();
|
|
3448
3499
|
L(n, (e, n) => {
|
|
@@ -3474,7 +3525,7 @@ function vi(e) {
|
|
|
3474
3525
|
r.refresh();
|
|
3475
3526
|
return;
|
|
3476
3527
|
}
|
|
3477
|
-
r =
|
|
3528
|
+
r = Lt.request({
|
|
3478
3529
|
assetType: "probe",
|
|
3479
3530
|
getPriority: e.getPriority,
|
|
3480
3531
|
onGrant() {
|
|
@@ -3484,7 +3535,7 @@ function vi(e) {
|
|
|
3484
3535
|
return;
|
|
3485
3536
|
}
|
|
3486
3537
|
let i = ++a;
|
|
3487
|
-
|
|
3538
|
+
fn(r).then((s) => {
|
|
3488
3539
|
if (!(i !== a || n.value !== r)) {
|
|
3489
3540
|
if (o.set(r, s ?? null), !s) {
|
|
3490
3541
|
t.value = null;
|
|
@@ -3520,14 +3571,14 @@ function vi(e) {
|
|
|
3520
3571
|
}
|
|
3521
3572
|
//#endregion
|
|
3522
3573
|
//#region src/components/ListCard.vue?vue&type=script&setup=true&lang.ts
|
|
3523
|
-
var
|
|
3574
|
+
var wi = ["aria-label"], Ti = {
|
|
3524
3575
|
key: 0,
|
|
3525
3576
|
"data-testid": "vibe-list-card-spinner",
|
|
3526
3577
|
class: "pointer-events-none absolute inset-0 z-[4] grid place-items-center bg-black/18"
|
|
3527
|
-
},
|
|
3578
|
+
}, Ei = { 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]" }, Di = ["src", "alt"], Oi = ["src"], ki = ["data-kind"], Ai = { class: "grid justify-items-center gap-3 px-4 text-center" }, ji = { class: "text-[0.68rem] font-bold uppercase tracking-[0.22em] text-[#f7f1ea]/72" }, Mi = {
|
|
3528
3579
|
key: 4,
|
|
3529
3580
|
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))]"
|
|
3530
|
-
},
|
|
3581
|
+
}, Ni = { class: "inline-flex h-14 w-14 items-center justify-center border border-white/16 bg-black/20" }, Pi = { class: "pointer-events-none absolute inset-0 z-[3]" }, Fi = /* @__PURE__ */ d({
|
|
3531
3582
|
__name: "ListCard",
|
|
3532
3583
|
props: {
|
|
3533
3584
|
active: {
|
|
@@ -3551,7 +3602,7 @@ var yi = ["aria-label"], bi = {
|
|
|
3551
3602
|
},
|
|
3552
3603
|
emits: ["open"],
|
|
3553
3604
|
setup(e, { emit: t }) {
|
|
3554
|
-
let n = e, r = t, l = i(() =>
|
|
3605
|
+
let n = e, r = t, l = i(() => _i(n.item)), d = D(!1), f = D(!1), p = D(!1), m = D(l.value.kind === "fallback"), h = D(!1), g = D(null), _ = D(null), y = D(null), b = D(null), C = D(null), T = D(l.value.kind === "fallback"), E = i(() => T.value ? n.surfaceActive ? d.value ? l.value.url : null : l.value.url : null), O = i(() => n.surfaceActive && d.value && (l.value.kind === "image" || l.value.kind === "video") && !!l.value.url), M = i(() => l.value.kind === "image" && !!E.value), P = i(() => l.value.kind === "video" && !!E.value), F = Ci({
|
|
3555
3606
|
attachedAssetUrl: E,
|
|
3556
3607
|
getPriority: ue,
|
|
3557
3608
|
isInView: d,
|
|
@@ -3560,7 +3611,7 @@ var yi = ["aria-label"], bi = {
|
|
|
3560
3611
|
loadErrorKind: g,
|
|
3561
3612
|
reportAssetError: n.reportAssetError,
|
|
3562
3613
|
surfaceActive: i(() => n.surfaceActive)
|
|
3563
|
-
}), I = i(() => F.errorKind.value ?? g.value), R = i(() => !!I.value), z = i(() =>
|
|
3614
|
+
}), I = i(() => F.errorKind.value ?? g.value), R = i(() => !!I.value), z = i(() => un(I.value)), B = i(() => O.value && !g.value && (!T.value || !m.value)), te = null, V = null, H = /* @__PURE__ */ new Set();
|
|
3564
3615
|
L([E, () => l.value.kind], () => {
|
|
3565
3616
|
let e = l.value.kind === "fallback";
|
|
3566
3617
|
m.value = e, h.value = !1, g.value = null, e && (T.value = !0);
|
|
@@ -3601,7 +3652,7 @@ var yi = ["aria-label"], bi = {
|
|
|
3601
3652
|
if (!X(_.value)) return;
|
|
3602
3653
|
let e = E.value ?? n.item.url;
|
|
3603
3654
|
m.value = !1, g.value = "generic";
|
|
3604
|
-
let t = await
|
|
3655
|
+
let t = await dn(e);
|
|
3605
3656
|
g.value = t, n.reportAssetError?.({
|
|
3606
3657
|
item: n.item,
|
|
3607
3658
|
occurrenceKey: $(n.item),
|
|
@@ -3633,7 +3684,7 @@ var yi = ["aria-label"], bi = {
|
|
|
3633
3684
|
V?.refresh();
|
|
3634
3685
|
return;
|
|
3635
3686
|
}
|
|
3636
|
-
V =
|
|
3687
|
+
V = Lt.request({
|
|
3637
3688
|
assetType: l.value.kind,
|
|
3638
3689
|
getPriority: ue,
|
|
3639
3690
|
onGrant() {
|
|
@@ -3650,7 +3701,7 @@ var yi = ["aria-label"], bi = {
|
|
|
3650
3701
|
return;
|
|
3651
3702
|
}
|
|
3652
3703
|
if (E.value && d.value && m.value) {
|
|
3653
|
-
e.muted = !0, e.loop = !0, e.playsInline = !0,
|
|
3704
|
+
e.muted = !0, e.loop = !0, e.playsInline = !0, hn(e);
|
|
3654
3705
|
return;
|
|
3655
3706
|
}
|
|
3656
3707
|
try {
|
|
@@ -3671,7 +3722,7 @@ var yi = ["aria-label"], bi = {
|
|
|
3671
3722
|
d.value = !0;
|
|
3672
3723
|
return;
|
|
3673
3724
|
}
|
|
3674
|
-
d.value =
|
|
3725
|
+
d.value = fi(e?.boundingClientRect ?? t.getBoundingClientRect(), e?.rootBounds ?? b.value?.getBoundingClientRect() ?? null);
|
|
3675
3726
|
}
|
|
3676
3727
|
function ie(e) {
|
|
3677
3728
|
if (!e) return;
|
|
@@ -3691,10 +3742,10 @@ var yi = ["aria-label"], bi = {
|
|
|
3691
3742
|
}), g.value = null, m.value = !1, T.value = !1, J(), K();
|
|
3692
3743
|
}
|
|
3693
3744
|
function se() {
|
|
3694
|
-
|
|
3745
|
+
ui(_.value);
|
|
3695
3746
|
}
|
|
3696
3747
|
function ce() {
|
|
3697
|
-
|
|
3748
|
+
di(C.value);
|
|
3698
3749
|
}
|
|
3699
3750
|
function ue() {
|
|
3700
3751
|
let e = y.value;
|
|
@@ -3708,8 +3759,8 @@ var yi = ["aria-label"], bi = {
|
|
|
3708
3759
|
return Math.abs((t.top + t.bottom) / 2 - n);
|
|
3709
3760
|
}
|
|
3710
3761
|
function X(e) {
|
|
3711
|
-
let t =
|
|
3712
|
-
return !e || !t ? !1 :
|
|
3762
|
+
let t = pi(E.value);
|
|
3763
|
+
return !e || !t ? !1 : pi("currentSrc" in e && e.currentSrc || e.getAttribute("src")) === t;
|
|
3713
3764
|
}
|
|
3714
3765
|
function de() {
|
|
3715
3766
|
r("open");
|
|
@@ -3737,8 +3788,8 @@ var yi = ["aria-label"], bi = {
|
|
|
3737
3788
|
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]",
|
|
3738
3789
|
"aria-label": n.item.title || `Open item ${n.index + 1}`,
|
|
3739
3790
|
onClick: de
|
|
3740
|
-
}, null, 8,
|
|
3741
|
-
B.value ? (w(), s("div",
|
|
3791
|
+
}, null, 8, wi),
|
|
3792
|
+
B.value ? (w(), s("div", Ti, [c("span", Ei, [u(N(oe), {
|
|
3742
3793
|
class: "h-5 w-5 animate-spin stroke-[1.9] text-[#f7f1ea]/78",
|
|
3743
3794
|
"aria-hidden": "true"
|
|
3744
3795
|
})])])) : o("", !0),
|
|
@@ -3752,7 +3803,7 @@ var yi = ["aria-label"], bi = {
|
|
|
3752
3803
|
class: v(["block h-full w-full object-cover transition-opacity duration-300", m.value ? "pointer-events-none opacity-100" : "pointer-events-none opacity-0"]),
|
|
3753
3804
|
onLoad: U,
|
|
3754
3805
|
onError: W
|
|
3755
|
-
}, null, 42,
|
|
3806
|
+
}, null, 42, Di)) : P.value && E.value && !R.value ? (w(), s("video", {
|
|
3756
3807
|
key: 2,
|
|
3757
3808
|
ref_key: "videoRef",
|
|
3758
3809
|
ref: C,
|
|
@@ -3768,31 +3819,31 @@ var yi = ["aria-label"], bi = {
|
|
|
3768
3819
|
onPlaying: ne,
|
|
3769
3820
|
onStalled: G,
|
|
3770
3821
|
onWaiting: G
|
|
3771
|
-
}, null, 42,
|
|
3822
|
+
}, null, 42, Oi)) : R.value ? (w(), s("div", {
|
|
3772
3823
|
key: 3,
|
|
3773
3824
|
"data-testid": "vibe-list-card-error",
|
|
3774
3825
|
"data-kind": I.value,
|
|
3775
3826
|
class: "pointer-events-none relative z-[2] grid h-full w-full place-items-center bg-[radial-gradient(circle_at_center,rgba(239,68,68,0.12),transparent_65%),linear-gradient(180deg,rgba(255,255,255,0.04),rgba(255,255,255,0.02))]"
|
|
3776
|
-
}, [c("div",
|
|
3827
|
+
}, [c("div", Ai, [
|
|
3777
3828
|
u(N(le), {
|
|
3778
3829
|
class: "h-6 w-6 stroke-[1.8] text-[#f7f1ea]/78",
|
|
3779
3830
|
"aria-hidden": "true"
|
|
3780
3831
|
}),
|
|
3781
|
-
c("span",
|
|
3832
|
+
c("span", ji, j(N(ln)(I.value)), 1),
|
|
3782
3833
|
z.value ? (w(), s("button", {
|
|
3783
3834
|
key: 0,
|
|
3784
3835
|
type: "button",
|
|
3785
3836
|
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",
|
|
3786
3837
|
onClick: ee(ae, ["stop"])
|
|
3787
3838
|
}, " Retry ")) : o("", !0)
|
|
3788
|
-
])], 8,
|
|
3789
|
-
icon: N(
|
|
3839
|
+
])], 8, ki)) : (w(), s("div", Mi, [c("div", Ni, [k(e.$slots, "item-icon", {
|
|
3840
|
+
icon: N(Nt)(n.item.type),
|
|
3790
3841
|
item: n.item
|
|
3791
|
-
}, () => [(w(), a(A(N(
|
|
3842
|
+
}, () => [(w(), a(A(N(Nt)(n.item.type)), {
|
|
3792
3843
|
class: "h-6 w-6 stroke-[1.8] text-[#f7f1ea]/78",
|
|
3793
3844
|
"aria-hidden": "true"
|
|
3794
3845
|
}))])])])),
|
|
3795
|
-
c("div",
|
|
3846
|
+
c("div", Pi, [k(e.$slots, "grid-item-overlay", {
|
|
3796
3847
|
active: n.active,
|
|
3797
3848
|
focused: f.value,
|
|
3798
3849
|
hovered: p.value,
|
|
@@ -3802,24 +3853,24 @@ var yi = ["aria-label"], bi = {
|
|
|
3802
3853
|
})])
|
|
3803
3854
|
], 34));
|
|
3804
3855
|
}
|
|
3805
|
-
}),
|
|
3856
|
+
}), Ii = { 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)]" }, Li = { class: "pointer-events-none absolute inset-x-0 top-0 z-[2] flex justify-end p-6" }, Ri = {
|
|
3806
3857
|
"data-testid": "vibe-pagination",
|
|
3807
3858
|
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]"
|
|
3808
|
-
},
|
|
3859
|
+
}, zi = { class: "whitespace-nowrap" }, Bi = {
|
|
3809
3860
|
key: 0,
|
|
3810
3861
|
class: "whitespace-nowrap border-l border-white/12 pl-2 text-[#f7f1ea]/56 min-[721px]:pl-3"
|
|
3811
|
-
},
|
|
3862
|
+
}, Vi = [
|
|
3812
3863
|
"data-active",
|
|
3813
3864
|
"data-index",
|
|
3814
3865
|
"data-item-id",
|
|
3815
3866
|
"data-occurrence-key"
|
|
3816
|
-
],
|
|
3867
|
+
], Hi = ["data-item-id"], Ui = {
|
|
3817
3868
|
key: 0,
|
|
3818
3869
|
class: "pointer-events-none absolute inset-y-0 right-0 z-[3] hidden w-8 min-[1024px]:block"
|
|
3819
|
-
},
|
|
3870
|
+
}, Wi = {
|
|
3820
3871
|
key: 1,
|
|
3821
3872
|
class: "pointer-events-none absolute inset-x-0 bottom-0 z-[2] px-5 pb-5 sm:px-6"
|
|
3822
|
-
},
|
|
3873
|
+
}, Gi = { class: "mx-auto flex w-full justify-center" }, Ki = /* @__PURE__ */ d({
|
|
3823
3874
|
__name: "ListSurface",
|
|
3824
3875
|
props: {
|
|
3825
3876
|
active: {
|
|
@@ -3880,7 +3931,7 @@ var yi = ["aria-label"], bi = {
|
|
|
3880
3931
|
"update:activeIndex"
|
|
3881
3932
|
],
|
|
3882
3933
|
setup(e, { emit: n }) {
|
|
3883
|
-
let r = e, d = F(), f = n, p =
|
|
3934
|
+
let r = e, d = F(), f = n, p = oi({
|
|
3884
3935
|
active: M(r, "active"),
|
|
3885
3936
|
allowExhaustedNextPageRefresh: M(r, "allowExhaustedNextPageRefresh"),
|
|
3886
3937
|
items: M(r, "items"),
|
|
@@ -3896,11 +3947,11 @@ var yi = ["aria-label"], bi = {
|
|
|
3896
3947
|
setActiveIndex(e) {
|
|
3897
3948
|
f("update:activeIndex", e);
|
|
3898
3949
|
}
|
|
3899
|
-
}), m = i(() =>
|
|
3950
|
+
}), m = i(() => $t({
|
|
3900
3951
|
itemCount: r.items.length,
|
|
3901
3952
|
loading: r.loading,
|
|
3902
3953
|
phase: r.phase
|
|
3903
|
-
})), h = i(() =>
|
|
3954
|
+
})), h = i(() => en({
|
|
3904
3955
|
errorMessage: r.errorMessage,
|
|
3905
3956
|
hasItems: r.items.length > 0,
|
|
3906
3957
|
hasNextPage: r.hasNextPage,
|
|
@@ -3913,7 +3964,7 @@ var yi = ["aria-label"], bi = {
|
|
|
3913
3964
|
message: h.value.message,
|
|
3914
3965
|
paginationDetail: r.paginationDetail,
|
|
3915
3966
|
total: r.items.length
|
|
3916
|
-
}), x = i(() => !_.value || !d["grid-status"] ? [] : d["grid-status"](_.value)), S = i(() =>
|
|
3967
|
+
}), x = i(() => !_.value || !d["grid-status"] ? [] : d["grid-status"](_.value)), S = i(() => Jt(x.value)), C = i(() => r.items.length + p.leavingItems.value.length), { emptyStateProps: T, showBadgeEmptyState: E, showCustomEmptyState: D, showInlineEmptyState: A } = Zt({
|
|
3917
3968
|
emptyStateMode: M(r, "emptyStateMode"),
|
|
3918
3969
|
itemCount: C,
|
|
3919
3970
|
loading: M(r, "loading"),
|
|
@@ -3925,8 +3976,8 @@ var yi = ["aria-label"], bi = {
|
|
|
3925
3976
|
nextBoundaryLoadProgress: e,
|
|
3926
3977
|
previousBoundaryLoadProgress: t
|
|
3927
3978
|
});
|
|
3928
|
-
}, { immediate: !0 }), (e, n) => (w(), s("div",
|
|
3929
|
-
c("div",
|
|
3979
|
+
}, { immediate: !0 }), (e, n) => (w(), s("div", Ii, [
|
|
3980
|
+
c("div", Li, [c("span", Ri, [c("span", zi, j(N(p).paginationLabel.value), 1), r.paginationDetail ? (w(), s("span", Bi, j(r.paginationDetail), 1)) : o("", !0)])]),
|
|
3930
3981
|
c("div", {
|
|
3931
3982
|
ref: N(p).scrollViewportRef,
|
|
3932
3983
|
"data-testid": "vibe-list-scroll",
|
|
@@ -3947,7 +3998,7 @@ var yi = ["aria-label"], bi = {
|
|
|
3947
3998
|
"data-occurrence-key": N($)(t),
|
|
3948
3999
|
class: "absolute will-change-transform",
|
|
3949
4000
|
style: b(N(p).getCardStyle(n))
|
|
3950
|
-
}, [u(
|
|
4001
|
+
}, [u(Fi, {
|
|
3951
4002
|
active: n === N(p).resolvedActiveIndex.value,
|
|
3952
4003
|
index: n,
|
|
3953
4004
|
item: t,
|
|
@@ -3971,14 +4022,14 @@ var yi = ["aria-label"], bi = {
|
|
|
3971
4022
|
"report-asset-load",
|
|
3972
4023
|
"surface-active",
|
|
3973
4024
|
"onOpen"
|
|
3974
|
-
])], 12,
|
|
4025
|
+
])], 12, Vi))), 128)),
|
|
3975
4026
|
(w(!0), s(t, null, O(N(p).leavingItems.value, (t) => (w(), s("article", {
|
|
3976
4027
|
key: `leaving-${N($)(t.item)}`,
|
|
3977
4028
|
"data-testid": "vibe-list-card-leaving",
|
|
3978
4029
|
"data-item-id": t.item.id,
|
|
3979
4030
|
class: "pointer-events-none absolute z-[2] will-change-[opacity,transform]",
|
|
3980
4031
|
style: b(N(p).getLeavingCardStyle(t.item))
|
|
3981
|
-
}, [u(
|
|
4032
|
+
}, [u(Fi, {
|
|
3982
4033
|
active: !1,
|
|
3983
4034
|
index: -1,
|
|
3984
4035
|
item: t.item,
|
|
@@ -3993,8 +4044,8 @@ var yi = ["aria-label"], bi = {
|
|
|
3993
4044
|
"item",
|
|
3994
4045
|
"report-asset-error",
|
|
3995
4046
|
"report-asset-load"
|
|
3996
|
-
])], 12,
|
|
3997
|
-
N(A) && N(T) ? (w(), a(
|
|
4047
|
+
])], 12, Hi))), 128)),
|
|
4048
|
+
N(A) && N(T) ? (w(), a(Pn, {
|
|
3998
4049
|
key: 0,
|
|
3999
4050
|
message: N(T).message,
|
|
4000
4051
|
mode: N(T).mode,
|
|
@@ -4008,12 +4059,12 @@ var yi = ["aria-label"], bi = {
|
|
|
4008
4059
|
"surface"
|
|
4009
4060
|
])) : o("", !0)
|
|
4010
4061
|
], 4)], 544),
|
|
4011
|
-
N(p).showScrollbar.value ? (w(), s("div",
|
|
4062
|
+
N(p).showScrollbar.value ? (w(), s("div", Ui, [n[2] ||= c("div", { class: "absolute bottom-6 right-3 top-6 w-px bg-white/8" }, null, -1), c("div", {
|
|
4012
4063
|
"data-testid": "vibe-list-scrollbar-thumb",
|
|
4013
4064
|
class: v(["absolute right-[0.625rem] w-1 bg-white/34 transition-[height,transform,background-color,opacity] duration-300 ease-out", r.loading ? "bg-white/52" : "bg-white/34"]),
|
|
4014
4065
|
style: b(N(p).getScrollbarThumbStyle())
|
|
4015
4066
|
}, null, 6)])) : o("", !0),
|
|
4016
|
-
d["grid-footer"] ? (w(), s("div",
|
|
4067
|
+
d["grid-footer"] ? (w(), s("div", Wi, [c("div", Gi, [k(e.$slots, "grid-footer")])])) : o("", !0),
|
|
4017
4068
|
_.value ? (w(), s("div", {
|
|
4018
4069
|
key: 2,
|
|
4019
4070
|
class: v(["pointer-events-none absolute inset-x-0 bottom-0 z-[3] flex justify-center px-6", d["grid-footer"] ? "pb-24" : "pb-6"])
|
|
@@ -4022,7 +4073,7 @@ var yi = ["aria-label"], bi = {
|
|
|
4022
4073
|
"data-testid": "vibe-grid-status-badge",
|
|
4023
4074
|
class: v(["inline-flex items-center border border-white/14 bg-black/55 px-4 py-3 text-[0.7rem] font-bold uppercase tracking-[0.18em] text-[#f7f1ea]/72 backdrop-blur-[18px]", _.value.kind === "end" ? "border-amber-300/35 text-amber-200" : _.value.kind === "failed" ? "border-rose-400/45 text-rose-100" : ""])
|
|
4024
4075
|
}, j(_.value.message), 3))], 2)) : o("", !0),
|
|
4025
|
-
N(E) && N(T) ? (w(), a(
|
|
4076
|
+
N(E) && N(T) ? (w(), a(Pn, {
|
|
4026
4077
|
key: 3,
|
|
4027
4078
|
class: v(["z-[3]", d["grid-footer"] ? "pb-24" : "pb-6"]),
|
|
4028
4079
|
message: N(T).message,
|
|
@@ -4039,13 +4090,13 @@ var yi = ["aria-label"], bi = {
|
|
|
4039
4090
|
])) : o("", !0)
|
|
4040
4091
|
]));
|
|
4041
4092
|
}
|
|
4042
|
-
}),
|
|
4093
|
+
}), qi = ["data-surface-mode"], Ji = {
|
|
4043
4094
|
key: 1,
|
|
4044
4095
|
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"
|
|
4045
|
-
},
|
|
4096
|
+
}, Yi = ["data-visible", "inert"], Xi = ["data-visible", "inert"], Zi = {
|
|
4046
4097
|
key: 3,
|
|
4047
4098
|
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"
|
|
4048
|
-
},
|
|
4099
|
+
}, Qi = /* @__PURE__ */ d({
|
|
4049
4100
|
name: "VibeLayout",
|
|
4050
4101
|
__name: "Layout",
|
|
4051
4102
|
props: {
|
|
@@ -4070,7 +4121,7 @@ var yi = ["aria-label"], bi = {
|
|
|
4070
4121
|
"update:surfaceMode"
|
|
4071
4122
|
],
|
|
4072
4123
|
setup(e, { expose: n, emit: i }) {
|
|
4073
|
-
let d = e, f = F(), m = i, h =
|
|
4124
|
+
let d = e, f = F(), m = i, h = rt(d, m), g = fe((e) => {
|
|
4074
4125
|
m("asset-errors", e);
|
|
4075
4126
|
}), _ = Z((e) => {
|
|
4076
4127
|
m("asset-loads", e);
|
|
@@ -4101,7 +4152,7 @@ var yi = ["aria-label"], bi = {
|
|
|
4101
4152
|
type: "button",
|
|
4102
4153
|
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",
|
|
4103
4154
|
onClick: n[0] ||= (...e) => N(h).retryInitialLoad && N(h).retryInitialLoad(...e)
|
|
4104
|
-
}, " Retry ")) : N(h).errorMessage.value && N(h).items.value.length > 0 ? (w(), s("div",
|
|
4155
|
+
}, " Retry ")) : N(h).errorMessage.value && N(h).items.value.length > 0 ? (w(), s("div", Ji, j(N(h).errorMessage.value), 1)) : o("", !0), N(h).isDesktop.value ? (w(), s(t, { key: 2 }, [u(r, {
|
|
4105
4156
|
appear: "",
|
|
4106
4157
|
"enter-active-class": "transition-[opacity,transform] duration-300 ease-out",
|
|
4107
4158
|
"enter-from-class": "translate-y-3 opacity-0",
|
|
@@ -4115,7 +4166,7 @@ var yi = ["aria-label"], bi = {
|
|
|
4115
4166
|
"data-visible": N(h).surfaceMode.value === "list" ? "true" : "false",
|
|
4116
4167
|
inert: N(h).surfaceMode.value !== "list",
|
|
4117
4168
|
class: "absolute inset-0 z-[2]"
|
|
4118
|
-
}, [u(
|
|
4169
|
+
}, [u(Ki, {
|
|
4119
4170
|
active: N(h).surfaceMode.value === "list",
|
|
4120
4171
|
"allow-exhausted-next-page-refresh": N(h).canRefreshExhaustedNextPage.value,
|
|
4121
4172
|
items: N(h).items.value,
|
|
@@ -4185,7 +4236,7 @@ var yi = ["aria-label"], bi = {
|
|
|
4185
4236
|
"onBoundaryLoadProgress",
|
|
4186
4237
|
"onOpenFullscreen",
|
|
4187
4238
|
"onUpdate:activeIndex"
|
|
4188
|
-
])], 8,
|
|
4239
|
+
])], 8, Yi), [[I, N(h).surfaceMode.value === "list"]])]),
|
|
4189
4240
|
_: 3
|
|
4190
4241
|
}), u(r, {
|
|
4191
4242
|
appear: "",
|
|
@@ -4201,7 +4252,7 @@ var yi = ["aria-label"], bi = {
|
|
|
4201
4252
|
"data-visible": N(h).surfaceMode.value === "fullscreen" ? "true" : "false",
|
|
4202
4253
|
inert: N(h).surfaceMode.value !== "fullscreen",
|
|
4203
4254
|
class: "absolute inset-0 z-[3]"
|
|
4204
|
-
}, [u(
|
|
4255
|
+
}, [u(gr, {
|
|
4205
4256
|
items: N(h).items.value,
|
|
4206
4257
|
active: N(h).surfaceMode.value === "fullscreen",
|
|
4207
4258
|
"active-index": N(h).activeIndex.value,
|
|
@@ -4270,12 +4321,12 @@ var yi = ["aria-label"], bi = {
|
|
|
4270
4321
|
"show-back-to-list",
|
|
4271
4322
|
"onBackToList",
|
|
4272
4323
|
"onUpdate:activeIndex"
|
|
4273
|
-
])], 8,
|
|
4324
|
+
])], 8, Xi), [[I, N(h).surfaceMode.value === "fullscreen"]])]),
|
|
4274
4325
|
_: 3
|
|
4275
|
-
})], 64)) : N(h).items.value.length === 0 && N(h).loading.value ? (w(), s("div",
|
|
4326
|
+
})], 64)) : N(h).items.value.length === 0 && N(h).loading.value ? (w(), s("div", Zi, [u(N(oe), {
|
|
4276
4327
|
class: "size-10 animate-spin text-[#f7f1ea]/82",
|
|
4277
4328
|
"aria-hidden": "true"
|
|
4278
|
-
}), n[1] ||= c("p", { class: "m-0 text-[0.9rem] font-semibold uppercase tracking-[0.22em] text-[#f7f1ea]/72" }, " Loading... ", -1)])) : (w(), a(
|
|
4329
|
+
}), n[1] ||= c("p", { class: "m-0 text-[0.9rem] font-semibold uppercase tracking-[0.22em] text-[#f7f1ea]/72" }, " Loading... ", -1)])) : (w(), a(gr, {
|
|
4279
4330
|
key: 4,
|
|
4280
4331
|
items: N(h).items.value,
|
|
4281
4332
|
active: !0,
|
|
@@ -4343,10 +4394,10 @@ var yi = ["aria-label"], bi = {
|
|
|
4343
4394
|
"show-status-badges",
|
|
4344
4395
|
"onBackToList",
|
|
4345
4396
|
"onUpdate:activeIndex"
|
|
4346
|
-
]))], 8,
|
|
4397
|
+
]))], 8, qi));
|
|
4347
4398
|
}
|
|
4348
|
-
}),
|
|
4349
|
-
e.component("VibeLayout",
|
|
4399
|
+
}), $i = { install(e) {
|
|
4400
|
+
e.component("VibeLayout", Qi);
|
|
4350
4401
|
} };
|
|
4351
4402
|
//#endregion
|
|
4352
|
-
export {
|
|
4403
|
+
export { Qi as VibeLayout, $i as VibePlugin, $i as default };
|