@wyxos/vibe 3.1.16 → 3.1.17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/index.js
CHANGED
|
@@ -398,6 +398,7 @@ function Pe(e) {
|
|
|
398
398
|
cursor: e.cursor,
|
|
399
399
|
items: t.items,
|
|
400
400
|
nextCursor: e.nextCursor,
|
|
401
|
+
nextCursorExhausted: e.nextCursorExhausted ?? !1,
|
|
401
402
|
previousCursor: e.previousCursor
|
|
402
403
|
},
|
|
403
404
|
nextSequence: t.nextSequence
|
|
@@ -410,6 +411,7 @@ function Fe(e) {
|
|
|
410
411
|
cursor: e.cursor,
|
|
411
412
|
items: t.items,
|
|
412
413
|
nextCursor: e.nextCursor,
|
|
414
|
+
nextCursorExhausted: e.nextCursorExhausted ?? !1,
|
|
413
415
|
previousCursor: e.previousCursor
|
|
414
416
|
},
|
|
415
417
|
nextSequence: t.nextSequence
|
|
@@ -432,6 +434,7 @@ function Le(e) {
|
|
|
432
434
|
let t = Pe({
|
|
433
435
|
cursor: e.initialState.cursor,
|
|
434
436
|
nextCursor: e.initialState.nextCursor ?? null,
|
|
437
|
+
nextCursorExhausted: !1,
|
|
435
438
|
nextItems: e.initialState.items,
|
|
436
439
|
previousCursor: e.initialState.previousCursor ?? null,
|
|
437
440
|
previousItems: [],
|
|
@@ -456,15 +459,66 @@ function Be(e, t, n) {
|
|
|
456
459
|
return e ? De(e, t) < n : !1;
|
|
457
460
|
}
|
|
458
461
|
//#endregion
|
|
462
|
+
//#region src/components/viewer-core/autoResolveCursors.ts
|
|
463
|
+
function Ve(e, t) {
|
|
464
|
+
return e.find((e) => De(e, t) > 0) ?? e[0] ?? null;
|
|
465
|
+
}
|
|
466
|
+
function He(e, t) {
|
|
467
|
+
for (let n = e.length - 1; n >= 0; --n) {
|
|
468
|
+
let r = e[n];
|
|
469
|
+
if (De(r, t) > 0) return r;
|
|
470
|
+
}
|
|
471
|
+
return e[e.length - 1] ?? null;
|
|
472
|
+
}
|
|
473
|
+
function Ue(e) {
|
|
474
|
+
return !e?.nextCursor || !e.nextCursorExhausted ? null : e.nextCursor;
|
|
475
|
+
}
|
|
476
|
+
function We(e, t, n, r) {
|
|
477
|
+
return t === void 0 || n === null ? e : e.map((e) => e.cursor !== t || e.nextCursor !== n ? e : {
|
|
478
|
+
...e,
|
|
479
|
+
nextCursorExhausted: r
|
|
480
|
+
});
|
|
481
|
+
}
|
|
482
|
+
function Ge(e, t, n) {
|
|
483
|
+
return n || e !== "forward" || t === null ? {
|
|
484
|
+
cursor: n,
|
|
485
|
+
exhausted: !1
|
|
486
|
+
} : {
|
|
487
|
+
cursor: t,
|
|
488
|
+
exhausted: !0
|
|
489
|
+
};
|
|
490
|
+
}
|
|
491
|
+
function Ke(e, t) {
|
|
492
|
+
if (t) return {
|
|
493
|
+
cursor: t,
|
|
494
|
+
exhausted: !1
|
|
495
|
+
};
|
|
496
|
+
let n = e.nextCursor ?? e.cursor;
|
|
497
|
+
return {
|
|
498
|
+
cursor: n,
|
|
499
|
+
exhausted: !!n
|
|
500
|
+
};
|
|
501
|
+
}
|
|
502
|
+
function qe(e, t) {
|
|
503
|
+
let n = e.findIndex((e) => De(e, t) > 0);
|
|
504
|
+
if (n < 0) return e;
|
|
505
|
+
let r = n;
|
|
506
|
+
for (let i = e.length - 1; i >= n; --i) if (De(e[i], t) > 0) {
|
|
507
|
+
r = i;
|
|
508
|
+
break;
|
|
509
|
+
}
|
|
510
|
+
return e.slice(n, r + 1);
|
|
511
|
+
}
|
|
512
|
+
//#endregion
|
|
459
513
|
//#region src/components/viewer-core/fillDelay.ts
|
|
460
|
-
var
|
|
461
|
-
function
|
|
514
|
+
var Je = 2e3, Ye = 1e3, Xe = 100;
|
|
515
|
+
function Ze(e, t = Je, n = Ye) {
|
|
462
516
|
return t + Math.max(0, e - 1) * n;
|
|
463
517
|
}
|
|
464
|
-
function
|
|
518
|
+
function Qe(e, t) {
|
|
465
519
|
return !Number.isFinite(e) || e == null || e < 0 ? t : Math.floor(e);
|
|
466
520
|
}
|
|
467
|
-
function
|
|
521
|
+
function $e() {
|
|
468
522
|
let e = D(null), t = null, n = null, r = null;
|
|
469
523
|
function i(i = !1) {
|
|
470
524
|
if (t &&= (clearInterval(t), null), n &&= (clearTimeout(n), null), e.value = null, i && r) {
|
|
@@ -482,7 +536,7 @@ function Ke() {
|
|
|
482
536
|
let t = Math.max(0, a - (Date.now() - s));
|
|
483
537
|
e.value = t, t <= 0 && l();
|
|
484
538
|
};
|
|
485
|
-
t = setInterval(u,
|
|
539
|
+
t = setInterval(u, Xe), n = setTimeout(l, a), u();
|
|
486
540
|
}));
|
|
487
541
|
}
|
|
488
542
|
return {
|
|
@@ -493,8 +547,8 @@ function Ke() {
|
|
|
493
547
|
}
|
|
494
548
|
//#endregion
|
|
495
549
|
//#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 =
|
|
550
|
+
function et(e) {
|
|
551
|
+
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
552
|
L(() => A.value.length, (e) => {
|
|
499
553
|
if (e === 0) {
|
|
500
554
|
r.value = 0;
|
|
@@ -522,14 +576,29 @@ function qe(e) {
|
|
|
522
576
|
}
|
|
523
577
|
async function U() {
|
|
524
578
|
if (g.value || M.value) return;
|
|
525
|
-
let e = !A.value.length
|
|
526
|
-
|
|
579
|
+
let e = !A.value.length, t = P.value, n = {
|
|
580
|
+
commitImmediately: e,
|
|
581
|
+
originCursor: t?.cursor ?? null
|
|
582
|
+
}, r = Ue(t);
|
|
583
|
+
if (he("trailing")) {
|
|
527
584
|
if (!B.value) return;
|
|
528
|
-
let
|
|
529
|
-
|
|
585
|
+
let e = await X("trailing");
|
|
586
|
+
e?.followCursor && he("trailing") && await le(e.followCursor, n);
|
|
587
|
+
return;
|
|
588
|
+
}
|
|
589
|
+
if (r) {
|
|
590
|
+
if (t?.cursor === r) {
|
|
591
|
+
await X("trailing");
|
|
592
|
+
return;
|
|
593
|
+
}
|
|
594
|
+
await le(r, n);
|
|
530
595
|
return;
|
|
531
596
|
}
|
|
532
|
-
|
|
597
|
+
if (!R.value) {
|
|
598
|
+
B.value && await X("trailing");
|
|
599
|
+
return;
|
|
600
|
+
}
|
|
601
|
+
await le(F.value, n);
|
|
533
602
|
}
|
|
534
603
|
async function W() {
|
|
535
604
|
if (!(g.value || !z.value || M.value)) {
|
|
@@ -620,6 +689,7 @@ function qe(e) {
|
|
|
620
689
|
phase: "loading"
|
|
621
690
|
});
|
|
622
691
|
if (r) {
|
|
692
|
+
if (!r.visibleCount) return n.value = We(n.value, t.originCursor, e, !0), a.value = [], m.value = !1, Z();
|
|
623
693
|
if (r.canceled) return n.value = [...n.value, ...r.buckets], a.value = [], m.value = !1, Z();
|
|
624
694
|
if (a.value = r.buckets, t.commitImmediately || !ee.value.length) return n.value = [...n.value, ...a.value], a.value = [], m.value = !1, Z();
|
|
625
695
|
m.value = !0;
|
|
@@ -657,18 +727,19 @@ function qe(e) {
|
|
|
657
727
|
signal: o?.signal
|
|
658
728
|
});
|
|
659
729
|
if (a !== b) return Z(), null;
|
|
660
|
-
let s = Fe({
|
|
730
|
+
let s = Ke(r, i.nextPage), c = Fe({
|
|
661
731
|
cursor: r.cursor,
|
|
662
732
|
edge: t,
|
|
663
|
-
nextCursor:
|
|
733
|
+
nextCursor: s.cursor,
|
|
734
|
+
nextCursorExhausted: s.exhausted,
|
|
664
735
|
nextItems: i.items,
|
|
665
736
|
previousCursor: i.previousPage ?? null,
|
|
666
737
|
previousItems: r.items,
|
|
667
738
|
sequence: C
|
|
668
739
|
});
|
|
669
|
-
C =
|
|
670
|
-
let
|
|
671
|
-
return n.value = ke(n.value, r.cursor,
|
|
740
|
+
C = c.nextSequence;
|
|
741
|
+
let l = ae();
|
|
742
|
+
return n.value = ke(n.value, r.cursor, c.bucket), oe(l), Z(), {
|
|
672
743
|
followCursor: t === "leading" ? i.previousPage ?? null : i.nextPage,
|
|
673
744
|
itemsLoaded: i.items.length
|
|
674
745
|
};
|
|
@@ -696,25 +767,26 @@ function qe(e) {
|
|
|
696
767
|
signal: m?.signal
|
|
697
768
|
});
|
|
698
769
|
if (n !== b) return Ie(i, t.direction, e.removedIds.value, !0);
|
|
699
|
-
let s = fe({
|
|
770
|
+
let s = Ge(t.direction, a, r.nextPage), f = fe({
|
|
700
771
|
cursor: a,
|
|
701
|
-
nextCursor:
|
|
772
|
+
nextCursor: s.cursor,
|
|
773
|
+
nextCursorExhausted: s.exhausted,
|
|
702
774
|
nextItems: r.items,
|
|
703
775
|
previousCursor: r.previousPage ?? null,
|
|
704
776
|
previousItems: []
|
|
705
777
|
});
|
|
706
|
-
i.push(
|
|
707
|
-
let
|
|
708
|
-
if (!t.continueUntilFilled ||
|
|
778
|
+
i.push(f);
|
|
779
|
+
let h = i.reduce((t, n) => t + De(n, e.removedIds.value), 0), _ = t.direction === "forward" ? f.nextCursorExhausted ? null : f.nextCursor : f.previousCursor;
|
|
780
|
+
if (!t.continueUntilFilled || h >= O.value || !_) return u.value = null, {
|
|
709
781
|
canceled: !1,
|
|
710
782
|
buckets: t.direction === "backward" ? [...i].reverse() : i,
|
|
711
|
-
visibleCount:
|
|
783
|
+
visibleCount: h
|
|
712
784
|
};
|
|
713
785
|
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 =
|
|
786
|
+
c.value = "filling", l.value = h, u.value = _, p.value = O.value, o += 1;
|
|
787
|
+
let v = Ze(o, w.value, T.value);
|
|
788
|
+
if (await d.wait(v), n !== b) return Ie(i, t.direction, e.removedIds.value, !0);
|
|
789
|
+
a = _;
|
|
718
790
|
} catch (r) {
|
|
719
791
|
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
792
|
} finally {
|
|
@@ -727,6 +799,7 @@ function qe(e) {
|
|
|
727
799
|
let t = Pe({
|
|
728
800
|
cursor: e.cursor,
|
|
729
801
|
nextCursor: e.nextCursor,
|
|
802
|
+
nextCursorExhausted: e.nextCursorExhausted ?? !1,
|
|
730
803
|
nextItems: e.nextItems,
|
|
731
804
|
previousCursor: e.previousCursor,
|
|
732
805
|
previousItems: e.previousItems,
|
|
@@ -753,14 +826,7 @@ function qe(e) {
|
|
|
753
826
|
return Be(t === "leading" ? N.value : P.value, e.removedIds.value, O.value);
|
|
754
827
|
}
|
|
755
828
|
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);
|
|
829
|
+
n.value = qe(n.value, e.removedIds.value);
|
|
764
830
|
}
|
|
765
831
|
return {
|
|
766
832
|
activeIndex: j,
|
|
@@ -798,20 +864,10 @@ function qe(e) {
|
|
|
798
864
|
maybeCommitPendingAppendWhenFilteredOut: se
|
|
799
865
|
};
|
|
800
866
|
}
|
|
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
867
|
//#endregion
|
|
812
868
|
//#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 =
|
|
869
|
+
function tt(e, t) {
|
|
870
|
+
let { clearRemoved: n, getRemovedIds: r, remove: a, removedIds: o, restore: s, undo: c } = Se(), l = et({
|
|
815
871
|
emit: t,
|
|
816
872
|
fillDelayMs: e.fillDelayMs,
|
|
817
873
|
fillDelayStepMs: e.fillDelayStepMs,
|
|
@@ -906,9 +962,9 @@ function Xe(e, t) {
|
|
|
906
962
|
}
|
|
907
963
|
//#endregion
|
|
908
964
|
//#region src/components/viewer-core/useController.ts
|
|
909
|
-
var
|
|
910
|
-
function
|
|
911
|
-
let n =
|
|
965
|
+
var nt = 1024;
|
|
966
|
+
function rt(e, t) {
|
|
967
|
+
let n = tt(e, t), r = T({
|
|
912
968
|
nextBoundaryLoadProgress: 0,
|
|
913
969
|
previousBoundaryLoadProgress: 0
|
|
914
970
|
}), a = D(0), o = D("list"), s = T({
|
|
@@ -932,7 +988,7 @@ function Qe(e, t) {
|
|
|
932
988
|
removedCount: 0,
|
|
933
989
|
removedIds: [],
|
|
934
990
|
surfaceMode: "list"
|
|
935
|
-
}), c = i(() => a.value >=
|
|
991
|
+
}), c = i(() => a.value >= nt), l = i(() => c.value ? o.value : "fullscreen"), u = i(() => c.value && l.value === "fullscreen");
|
|
936
992
|
L(c, (e) => {
|
|
937
993
|
e && h();
|
|
938
994
|
}), L(() => e.surfaceMode, () => {
|
|
@@ -971,7 +1027,7 @@ function Qe(e, t) {
|
|
|
971
1027
|
!c.value || !e.surfaceMode || e.surfaceMode === o.value || (o.value = e.surfaceMode);
|
|
972
1028
|
}
|
|
973
1029
|
function g(e) {
|
|
974
|
-
r.nextBoundaryLoadProgress =
|
|
1030
|
+
r.nextBoundaryLoadProgress = it(e.nextBoundaryLoadProgress), r.previousBoundaryLoadProgress = it(e.previousBoundaryLoadProgress);
|
|
975
1031
|
}
|
|
976
1032
|
return {
|
|
977
1033
|
...n,
|
|
@@ -990,26 +1046,26 @@ function Qe(e, t) {
|
|
|
990
1046
|
unlockPageLoading: n.unlockPageLoading
|
|
991
1047
|
};
|
|
992
1048
|
}
|
|
993
|
-
function
|
|
1049
|
+
function it(e) {
|
|
994
1050
|
return Math.min(Math.max(e, 0), 1);
|
|
995
1051
|
}
|
|
996
1052
|
//#endregion
|
|
997
1053
|
//#region src/components/FullscreenMediaBar.vue?vue&type=script&setup=true&lang.ts
|
|
998
|
-
var
|
|
1054
|
+
var at = {
|
|
999
1055
|
"data-testid": "vibe-media-bar",
|
|
1000
1056
|
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
|
-
},
|
|
1057
|
+
}, 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
1058
|
"max",
|
|
1003
1059
|
"value",
|
|
1004
1060
|
"disabled"
|
|
1005
|
-
],
|
|
1061
|
+
], ut = { class: "text-[0.76rem] font-bold uppercase tracking-[0.18em] text-[#f7f1ea]/74" }, dt = ["data-layout"], ft = {
|
|
1006
1062
|
key: 0,
|
|
1007
1063
|
"data-testid": "vibe-media-volume-popover",
|
|
1008
1064
|
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
|
-
},
|
|
1065
|
+
}, 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
1066
|
key: 0,
|
|
1011
1067
|
class: "relative h-4 w-24"
|
|
1012
|
-
},
|
|
1068
|
+
}, vt = ["value"], yt = /* @__PURE__ */ d({
|
|
1013
1069
|
__name: "FullscreenMediaBar",
|
|
1014
1070
|
props: {
|
|
1015
1071
|
currentTime: {},
|
|
@@ -1052,9 +1108,9 @@ var et = {
|
|
|
1052
1108
|
function C(e, t, n) {
|
|
1053
1109
|
return Math.min(Math.max(e, t), n);
|
|
1054
1110
|
}
|
|
1055
|
-
return (e, t) => (w(), s("div",
|
|
1056
|
-
c("span",
|
|
1057
|
-
c("div",
|
|
1111
|
+
return (e, t) => (w(), s("div", at, [c("div", ot, [
|
|
1112
|
+
c("span", st, j(n.currentTimeLabel), 1),
|
|
1113
|
+
c("div", ct, [
|
|
1058
1114
|
t[3] ||= c("div", { class: "absolute inset-x-0 top-1/2 h-px -translate-y-1/2 bg-white/12" }, null, -1),
|
|
1059
1115
|
c("div", {
|
|
1060
1116
|
class: "absolute left-0 top-1/2 h-px -translate-y-1/2 bg-[#f7f1ea]",
|
|
@@ -1071,16 +1127,16 @@ var et = {
|
|
|
1071
1127
|
disabled: n.duration <= 0,
|
|
1072
1128
|
class: "vibe-media-slider absolute inset-0 z-10 h-4 w-full cursor-pointer bg-transparent disabled:cursor-default disabled:opacity-50",
|
|
1073
1129
|
onInput: t[0] ||= (e) => r("seek-input", e)
|
|
1074
|
-
}, null, 40,
|
|
1130
|
+
}, null, 40, lt)
|
|
1075
1131
|
]),
|
|
1076
|
-
c("span",
|
|
1132
|
+
c("span", ut, j(n.durationLabel), 1),
|
|
1077
1133
|
c("div", {
|
|
1078
1134
|
ref_key: "rootRef",
|
|
1079
1135
|
ref: l,
|
|
1080
1136
|
"data-testid": "vibe-media-volume",
|
|
1081
1137
|
"data-layout": n.volumeControlLayout,
|
|
1082
1138
|
class: "relative flex items-center justify-end"
|
|
1083
|
-
}, [d.value && u.value ? (w(), s("div",
|
|
1139
|
+
}, [d.value && u.value ? (w(), s("div", ft, [c("div", pt, [
|
|
1084
1140
|
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
1141
|
c("div", {
|
|
1086
1142
|
class: "absolute bottom-0 left-1/2 w-px -translate-x-1/2 bg-[#f7f1ea]",
|
|
@@ -1097,8 +1153,8 @@ var et = {
|
|
|
1097
1153
|
value: f.value,
|
|
1098
1154
|
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
1155
|
onInput: t[1] ||= (e) => r("volume-input", e)
|
|
1100
|
-
}, null, 40,
|
|
1101
|
-
])])) : o("", !0), c("div",
|
|
1156
|
+
}, null, 40, mt)
|
|
1157
|
+
])])) : o("", !0), c("div", ht, [c("button", {
|
|
1102
1158
|
type: "button",
|
|
1103
1159
|
"data-testid": "vibe-media-volume-button",
|
|
1104
1160
|
"aria-label": g.value,
|
|
@@ -1107,7 +1163,7 @@ var et = {
|
|
|
1107
1163
|
}, [(w(), a(A(m.value), {
|
|
1108
1164
|
class: "h-4 w-4 stroke-[1.9]",
|
|
1109
1165
|
"aria-hidden": "true"
|
|
1110
|
-
}))], 8,
|
|
1166
|
+
}))], 8, gt), n.volumeControlLayout === "horizontal" ? (w(), s("div", _t, [
|
|
1111
1167
|
t[5] ||= c("div", { class: "absolute inset-x-0 top-1/2 h-px -translate-y-1/2 bg-white/12" }, null, -1),
|
|
1112
1168
|
c("div", {
|
|
1113
1169
|
class: "absolute left-0 top-1/2 h-px -translate-y-1/2 bg-[#f7f1ea]",
|
|
@@ -1124,24 +1180,24 @@ var et = {
|
|
|
1124
1180
|
value: f.value,
|
|
1125
1181
|
class: "vibe-media-slider absolute inset-0 z-10 h-4 w-full cursor-pointer bg-transparent",
|
|
1126
1182
|
onInput: t[2] ||= (e) => r("volume-input", e)
|
|
1127
|
-
}, null, 40,
|
|
1128
|
-
])) : o("", !0)])], 8,
|
|
1183
|
+
}, null, 40, vt)
|
|
1184
|
+
])) : o("", !0)])], 8, dt)
|
|
1129
1185
|
])]));
|
|
1130
1186
|
}
|
|
1131
|
-
}),
|
|
1187
|
+
}), 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
1188
|
key: 1,
|
|
1133
1189
|
"data-testid": "vibe-title",
|
|
1134
1190
|
class: "m-0 truncate text-left text-[0.82rem] leading-none tracking-[-0.04em] min-[721px]:text-[1.2rem]"
|
|
1135
|
-
},
|
|
1191
|
+
}, Tt = { class: "pointer-events-auto flex shrink-0 items-center gap-2" }, Et = {
|
|
1136
1192
|
"data-testid": "vibe-pagination",
|
|
1137
1193
|
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
|
-
},
|
|
1194
|
+
}, Dt = { class: "whitespace-nowrap" }, Ot = {
|
|
1139
1195
|
key: 1,
|
|
1140
1196
|
class: "whitespace-nowrap border-l border-white/12 pl-2 text-[#f7f1ea]/56 min-[721px]:pl-3"
|
|
1141
|
-
},
|
|
1197
|
+
}, kt = {
|
|
1142
1198
|
key: 0,
|
|
1143
1199
|
class: "grid gap-2 max-[720px]:justify-items-start"
|
|
1144
|
-
},
|
|
1200
|
+
}, At = /* @__PURE__ */ d({
|
|
1145
1201
|
__name: "FullscreenHeader",
|
|
1146
1202
|
props: {
|
|
1147
1203
|
currentIndex: {},
|
|
@@ -1155,7 +1211,7 @@ var et = {
|
|
|
1155
1211
|
emits: ["back-to-list"],
|
|
1156
1212
|
setup(e, { emit: t }) {
|
|
1157
1213
|
let n = e, r = t;
|
|
1158
|
-
return (e, t) => (w(), s("div",
|
|
1214
|
+
return (e, t) => (w(), s("div", bt, [c("div", xt, [c("div", St, [c("div", Ct, [n.showBackToList ? (w(), s("button", {
|
|
1159
1215
|
key: 0,
|
|
1160
1216
|
type: "button",
|
|
1161
1217
|
"data-testid": "vibe-back-to-list",
|
|
@@ -1165,47 +1221,47 @@ var et = {
|
|
|
1165
1221
|
}, [u(N(re), {
|
|
1166
1222
|
class: "h-4 w-4 stroke-[2.2]",
|
|
1167
1223
|
"aria-hidden": "true"
|
|
1168
|
-
})])) : o("", !0), n.title ? (w(), s("h2",
|
|
1224
|
+
})])) : o("", !0), n.title ? (w(), s("h2", wt, j(n.title), 1)) : o("", !0)]), c("div", Tt, [c("span", Et, [
|
|
1169
1225
|
n.loading ? (w(), a(N(oe), {
|
|
1170
1226
|
key: 0,
|
|
1171
1227
|
"data-testid": "vibe-pagination-spinner",
|
|
1172
1228
|
class: "h-3.5 w-3.5 animate-spin stroke-[1.9]",
|
|
1173
1229
|
"aria-hidden": "true"
|
|
1174
1230
|
})) : o("", !0),
|
|
1175
|
-
c("span",
|
|
1176
|
-
n.paginationDetail ? (w(), s("span",
|
|
1177
|
-
]), k(e.$slots, "actions")])])]), n.showEndBadge ? (w(), s("div",
|
|
1231
|
+
c("span", Dt, j(n.currentIndex + 1) + " / " + j(n.total), 1),
|
|
1232
|
+
n.paginationDetail ? (w(), s("span", Ot, j(n.paginationDetail), 1)) : o("", !0)
|
|
1233
|
+
]), 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
1234
|
}
|
|
1179
|
-
}),
|
|
1235
|
+
}), jt = {
|
|
1180
1236
|
image: ae,
|
|
1181
1237
|
video: Y,
|
|
1182
1238
|
audio: J,
|
|
1183
1239
|
other: ie
|
|
1184
|
-
},
|
|
1240
|
+
}, Mt = {
|
|
1185
1241
|
image: "Image",
|
|
1186
1242
|
video: "Video",
|
|
1187
1243
|
audio: "Audio",
|
|
1188
1244
|
other: "File"
|
|
1189
1245
|
};
|
|
1190
|
-
function
|
|
1191
|
-
return
|
|
1246
|
+
function Nt(e) {
|
|
1247
|
+
return jt[e];
|
|
1192
1248
|
}
|
|
1193
|
-
function
|
|
1194
|
-
return
|
|
1249
|
+
function Pt(e) {
|
|
1250
|
+
return Mt[e];
|
|
1195
1251
|
}
|
|
1196
1252
|
//#endregion
|
|
1197
1253
|
//#region src/components/viewer-core/useAssetLoadQueue.ts
|
|
1198
|
-
var
|
|
1254
|
+
var Ft = {
|
|
1199
1255
|
maxGlobal: 10,
|
|
1200
1256
|
maxPerDomain: 4,
|
|
1201
1257
|
maxVideoPerDomain: 2
|
|
1202
1258
|
};
|
|
1203
|
-
function
|
|
1259
|
+
function It(e = Ft) {
|
|
1204
1260
|
let t = /* @__PURE__ */ new Map(), n = /* @__PURE__ */ new Map(), r = 0;
|
|
1205
1261
|
function i(e) {
|
|
1206
1262
|
let i = {
|
|
1207
1263
|
...e,
|
|
1208
|
-
domain:
|
|
1264
|
+
domain: zt(e.url),
|
|
1209
1265
|
enqueuedAt: r,
|
|
1210
1266
|
id: `vibe-asset-load-${r += 1}`
|
|
1211
1267
|
};
|
|
@@ -1224,7 +1280,7 @@ function jt(e = At) {
|
|
|
1224
1280
|
function a() {
|
|
1225
1281
|
if (n.size === 0) return;
|
|
1226
1282
|
let r = [...n.values()].sort((e, t) => {
|
|
1227
|
-
let n =
|
|
1283
|
+
let n = Rt(e) - Rt(t);
|
|
1228
1284
|
return n === 0 ? e.enqueuedAt - t.enqueuedAt : n;
|
|
1229
1285
|
});
|
|
1230
1286
|
for (let i of r) {
|
|
@@ -1245,8 +1301,8 @@ function jt(e = At) {
|
|
|
1245
1301
|
}
|
|
1246
1302
|
return { request: i };
|
|
1247
1303
|
}
|
|
1248
|
-
var
|
|
1249
|
-
function
|
|
1304
|
+
var Lt = It();
|
|
1305
|
+
function Rt(e) {
|
|
1250
1306
|
try {
|
|
1251
1307
|
let t = e.getPriority();
|
|
1252
1308
|
return Number.isFinite(t) ? t : Infinity;
|
|
@@ -1254,7 +1310,7 @@ function Nt(e) {
|
|
|
1254
1310
|
return Infinity;
|
|
1255
1311
|
}
|
|
1256
1312
|
}
|
|
1257
|
-
function
|
|
1313
|
+
function zt(e) {
|
|
1258
1314
|
try {
|
|
1259
1315
|
return new URL(e).hostname || "local";
|
|
1260
1316
|
} catch {
|
|
@@ -1263,19 +1319,19 @@ function Pt(e) {
|
|
|
1263
1319
|
}
|
|
1264
1320
|
//#endregion
|
|
1265
1321
|
//#region src/components/viewer-core/useFullscreenPreloadController.ts
|
|
1266
|
-
var
|
|
1322
|
+
var Bt = [
|
|
1267
1323
|
0,
|
|
1268
1324
|
1,
|
|
1269
1325
|
2,
|
|
1270
1326
|
3
|
|
1271
|
-
],
|
|
1327
|
+
], Vt = {
|
|
1272
1328
|
0: 0,
|
|
1273
1329
|
1: 1,
|
|
1274
1330
|
2: 2,
|
|
1275
1331
|
3: 3
|
|
1276
1332
|
};
|
|
1277
|
-
function
|
|
1278
|
-
let t = D({}), n =
|
|
1333
|
+
function Ht(e) {
|
|
1334
|
+
let t = D({}), n = It({
|
|
1279
1335
|
maxGlobal: 3,
|
|
1280
1336
|
maxPerDomain: 3,
|
|
1281
1337
|
maxVideoPerDomain: 3
|
|
@@ -1300,14 +1356,14 @@ function Lt(e) {
|
|
|
1300
1356
|
}
|
|
1301
1357
|
function l(e, t) {
|
|
1302
1358
|
if (t instanceof HTMLImageElement) {
|
|
1303
|
-
i.set(e, t),
|
|
1359
|
+
i.set(e, t), Wt(t) && d(e);
|
|
1304
1360
|
return;
|
|
1305
1361
|
}
|
|
1306
1362
|
i.delete(e);
|
|
1307
1363
|
}
|
|
1308
1364
|
function u(e, t) {
|
|
1309
1365
|
if (t instanceof HTMLMediaElement) {
|
|
1310
|
-
a.set(e, t),
|
|
1366
|
+
a.set(e, t), Gt(t) && d(e);
|
|
1311
1367
|
return;
|
|
1312
1368
|
}
|
|
1313
1369
|
a.delete(e);
|
|
@@ -1348,7 +1404,7 @@ function Lt(e) {
|
|
|
1348
1404
|
assetType: s.item.type === "image" ? "image" : "video",
|
|
1349
1405
|
getPriority: () => g(o.index),
|
|
1350
1406
|
onGrant: () => {
|
|
1351
|
-
y(s.key, !0), (e.isAssetReady(s.key, s.item) ||
|
|
1407
|
+
y(s.key, !0), (e.isAssetReady(s.key, s.item) || Ut(s.key, i, a)) && d(s.key);
|
|
1352
1408
|
},
|
|
1353
1409
|
url: s.item.url
|
|
1354
1410
|
})
|
|
@@ -1359,14 +1415,14 @@ function Lt(e) {
|
|
|
1359
1415
|
}
|
|
1360
1416
|
function h() {
|
|
1361
1417
|
let t = e.resolvedActiveIndex.value;
|
|
1362
|
-
return
|
|
1418
|
+
return Bt.map((e) => _(t + e)).filter((e) => !!e);
|
|
1363
1419
|
}
|
|
1364
1420
|
function g(t) {
|
|
1365
|
-
return e.active.value ?
|
|
1421
|
+
return e.active.value ? Vt[t - e.resolvedActiveIndex.value] ?? Infinity : Infinity;
|
|
1366
1422
|
}
|
|
1367
1423
|
function _(t) {
|
|
1368
1424
|
let n = e.items.value[t];
|
|
1369
|
-
return !n || !
|
|
1425
|
+
return !n || !Kt(n) ? null : {
|
|
1370
1426
|
index: t,
|
|
1371
1427
|
item: n,
|
|
1372
1428
|
key: e.getItemKey(n)
|
|
@@ -1415,26 +1471,26 @@ function Lt(e) {
|
|
|
1415
1471
|
shouldAttachSlideAsset: s
|
|
1416
1472
|
};
|
|
1417
1473
|
}
|
|
1418
|
-
function
|
|
1474
|
+
function Ut(e, t, n) {
|
|
1419
1475
|
let r = t.get(e);
|
|
1420
|
-
if (r) return
|
|
1476
|
+
if (r) return Wt(r);
|
|
1421
1477
|
let i = n.get(e);
|
|
1422
|
-
return i ?
|
|
1478
|
+
return i ? Gt(i) : !1;
|
|
1423
1479
|
}
|
|
1424
|
-
function
|
|
1480
|
+
function Wt(e) {
|
|
1425
1481
|
return e.complete && !!(e.currentSrc || e.getAttribute("src"));
|
|
1426
1482
|
}
|
|
1427
|
-
function
|
|
1483
|
+
function Gt(e) {
|
|
1428
1484
|
let t = typeof HTMLMediaElement > "u" ? 1 : HTMLMediaElement.HAVE_METADATA;
|
|
1429
1485
|
return e.readyState >= t;
|
|
1430
1486
|
}
|
|
1431
|
-
function
|
|
1487
|
+
function Kt(e) {
|
|
1432
1488
|
return e.type === "image" || e.type === "video" || e.type === "audio";
|
|
1433
1489
|
}
|
|
1434
1490
|
//#endregion
|
|
1435
1491
|
//#region src/components/viewer-core/useFullscreenSurfaceMedia.ts
|
|
1436
|
-
function
|
|
1437
|
-
let t =
|
|
1492
|
+
function qt(e) {
|
|
1493
|
+
let t = Ht({
|
|
1438
1494
|
active: e.active,
|
|
1439
1495
|
getItemKey: r,
|
|
1440
1496
|
isAssetReady: m,
|
|
@@ -1444,7 +1500,7 @@ function Ht(e) {
|
|
|
1444
1500
|
});
|
|
1445
1501
|
function n(e, t) {
|
|
1446
1502
|
let n = t.title?.trim();
|
|
1447
|
-
return n ? `${e} ${n}` : `${e} ${
|
|
1503
|
+
return n ? `${e} ${n}` : `${e} ${Pt(t.type).toLowerCase()}`;
|
|
1448
1504
|
}
|
|
1449
1505
|
function r(e) {
|
|
1450
1506
|
return $(e);
|
|
@@ -1507,11 +1563,11 @@ function Ht(e) {
|
|
|
1507
1563
|
}
|
|
1508
1564
|
//#endregion
|
|
1509
1565
|
//#region src/components/viewer-core/slotContent.ts
|
|
1510
|
-
function
|
|
1566
|
+
function Jt(e) {
|
|
1511
1567
|
if (!Array.isArray(e)) return !1;
|
|
1512
1568
|
for (let t of e) {
|
|
1513
1569
|
if (Array.isArray(t)) {
|
|
1514
|
-
if (
|
|
1570
|
+
if (Jt(t)) return !0;
|
|
1515
1571
|
continue;
|
|
1516
1572
|
}
|
|
1517
1573
|
if (!h(t)) {
|
|
@@ -1522,20 +1578,20 @@ function Ut(e) {
|
|
|
1522
1578
|
if (t != null && t !== !1) return !0;
|
|
1523
1579
|
continue;
|
|
1524
1580
|
}
|
|
1525
|
-
if (!
|
|
1581
|
+
if (!Yt(t)) return !0;
|
|
1526
1582
|
}
|
|
1527
1583
|
return !1;
|
|
1528
1584
|
}
|
|
1529
|
-
function
|
|
1530
|
-
return r.type === e ? !0 : r.type === n ? typeof r.children == "string" ? r.children.trim().length === 0 : !0 : r.type === t ? !
|
|
1585
|
+
function Yt(r) {
|
|
1586
|
+
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
1587
|
}
|
|
1532
1588
|
//#endregion
|
|
1533
1589
|
//#region src/components/viewer-core/useSurfaceEmptyState.ts
|
|
1534
|
-
var
|
|
1535
|
-
function
|
|
1590
|
+
var Xt = "no items available";
|
|
1591
|
+
function Zt(e) {
|
|
1536
1592
|
let t = i(() => e.loading.value || e.itemCount.value > 0 || e.emptyStateMode.value === "hidden" ? null : {
|
|
1537
1593
|
loading: !!e.loading.value,
|
|
1538
|
-
message:
|
|
1594
|
+
message: Xt,
|
|
1539
1595
|
mode: e.emptyStateMode.value === "badge" ? "badge" : "inline",
|
|
1540
1596
|
surface: e.surface,
|
|
1541
1597
|
total: e.itemCount.value
|
|
@@ -1543,23 +1599,23 @@ function Kt(e) {
|
|
|
1543
1599
|
return {
|
|
1544
1600
|
emptyStateProps: t,
|
|
1545
1601
|
showBadgeEmptyState: i(() => t.value?.mode === "badge"),
|
|
1546
|
-
showCustomEmptyState: i(() =>
|
|
1602
|
+
showCustomEmptyState: i(() => Jt(n.value)),
|
|
1547
1603
|
showInlineEmptyState: i(() => t.value?.mode === "inline")
|
|
1548
1604
|
};
|
|
1549
1605
|
}
|
|
1550
1606
|
//#endregion
|
|
1551
1607
|
//#region src/components/viewer-core/format.ts
|
|
1552
|
-
function
|
|
1608
|
+
function Qt(e) {
|
|
1553
1609
|
if (!Number.isFinite(e) || e <= 0) return "0:00";
|
|
1554
1610
|
let t = Math.floor(e), n = Math.floor(t / 3600), r = Math.floor(t % 3600 / 60), i = t % 60;
|
|
1555
1611
|
return n > 0 ? `${n}:${String(r).padStart(2, "0")}:${String(i).padStart(2, "0")}` : `${r}:${String(i).padStart(2, "0")}`;
|
|
1556
1612
|
}
|
|
1557
1613
|
//#endregion
|
|
1558
1614
|
//#region src/components/viewer-core/surfaceStatus.ts
|
|
1559
|
-
function
|
|
1615
|
+
function $t(e) {
|
|
1560
1616
|
return e.phase ? e.phase : e.loading ? e.itemCount > 0 ? "loading" : "initializing" : "idle";
|
|
1561
1617
|
}
|
|
1562
|
-
function
|
|
1618
|
+
function en(e) {
|
|
1563
1619
|
return e.phase === "failed" ? {
|
|
1564
1620
|
kind: "failed",
|
|
1565
1621
|
message: e.errorMessage ?? (e.hasItems ? "The viewer could not load more items." : "The viewer could not load items.")
|
|
@@ -1582,7 +1638,7 @@ function Yt(e) {
|
|
|
1582
1638
|
}
|
|
1583
1639
|
//#endregion
|
|
1584
1640
|
//#region src/components/viewer-core/useActivation.ts
|
|
1585
|
-
function
|
|
1641
|
+
function tn(e) {
|
|
1586
1642
|
let t = !1;
|
|
1587
1643
|
L(e.enabled, async (t) => {
|
|
1588
1644
|
if (n(t), t) {
|
|
@@ -1605,7 +1661,7 @@ function Xt(e) {
|
|
|
1605
1661
|
}
|
|
1606
1662
|
//#endregion
|
|
1607
1663
|
//#region src/components/viewer-core/assetState.ts
|
|
1608
|
-
var
|
|
1664
|
+
var nn = {
|
|
1609
1665
|
currentTime: 0,
|
|
1610
1666
|
duration: 0,
|
|
1611
1667
|
errorKind: null,
|
|
@@ -1614,38 +1670,38 @@ var Zt = {
|
|
|
1614
1670
|
ready: !1,
|
|
1615
1671
|
volume: 1
|
|
1616
1672
|
};
|
|
1617
|
-
function
|
|
1618
|
-
return { ...
|
|
1673
|
+
function rn() {
|
|
1674
|
+
return { ...nn };
|
|
1619
1675
|
}
|
|
1620
|
-
function
|
|
1676
|
+
function an(e) {
|
|
1621
1677
|
return e.complete && !!(e.currentSrc || e.getAttribute("src"));
|
|
1622
1678
|
}
|
|
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 =
|
|
1679
|
+
function on(e, t, n) {
|
|
1680
|
+
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
1681
|
}
|
|
1626
|
-
function
|
|
1682
|
+
function sn(e, t) {
|
|
1627
1683
|
return t === "error" || t === "loadstart" || t === "waiting" || t === "stalled" ? !1 : t === "canplay" || t === "canplaythrough" || t === "playing" ? !0 : e.readyState >= HTMLMediaElement.HAVE_CURRENT_DATA;
|
|
1628
1684
|
}
|
|
1629
1685
|
//#endregion
|
|
1630
1686
|
//#region src/components/viewer-core/loadError.ts
|
|
1631
|
-
var
|
|
1632
|
-
function
|
|
1687
|
+
var cn = /* @__PURE__ */ new Map();
|
|
1688
|
+
function ln(e) {
|
|
1633
1689
|
return e === "not-found" ? "404" : "Load error";
|
|
1634
1690
|
}
|
|
1635
|
-
function
|
|
1691
|
+
function un(e) {
|
|
1636
1692
|
return e === "generic";
|
|
1637
1693
|
}
|
|
1638
|
-
function
|
|
1639
|
-
return
|
|
1694
|
+
function dn(e) {
|
|
1695
|
+
return fn(e).then((e) => e ?? "generic");
|
|
1640
1696
|
}
|
|
1641
|
-
function
|
|
1642
|
-
let t =
|
|
1697
|
+
function fn(e) {
|
|
1698
|
+
let t = cn.get(e);
|
|
1643
1699
|
if (t) return t;
|
|
1644
|
-
let n =
|
|
1645
|
-
return
|
|
1700
|
+
let n = pn(e);
|
|
1701
|
+
return cn.set(e, n), n;
|
|
1646
1702
|
}
|
|
1647
|
-
async function
|
|
1648
|
-
if (!
|
|
1703
|
+
async function pn(e) {
|
|
1704
|
+
if (!mn(e)) return null;
|
|
1649
1705
|
try {
|
|
1650
1706
|
let t = await fetch(e, { method: "HEAD" });
|
|
1651
1707
|
return t.ok ? null : t.status === 404 ? "not-found" : "generic";
|
|
@@ -1653,12 +1709,12 @@ async function cn(e) {
|
|
|
1653
1709
|
return "generic";
|
|
1654
1710
|
}
|
|
1655
1711
|
}
|
|
1656
|
-
function
|
|
1712
|
+
function mn(e) {
|
|
1657
1713
|
return /^(https?:\/\/|\/)/i.test(e);
|
|
1658
1714
|
}
|
|
1659
1715
|
//#endregion
|
|
1660
1716
|
//#region src/components/viewer-core/mediaPlayback.ts
|
|
1661
|
-
function
|
|
1717
|
+
function hn(e) {
|
|
1662
1718
|
try {
|
|
1663
1719
|
let t = e.play();
|
|
1664
1720
|
t && typeof t.catch == "function" && t.catch(() => {});
|
|
@@ -1666,12 +1722,12 @@ function un(e) {
|
|
|
1666
1722
|
}
|
|
1667
1723
|
//#endregion
|
|
1668
1724
|
//#region src/components/viewer-core/useMedia.ts
|
|
1669
|
-
function
|
|
1725
|
+
function gn(e) {
|
|
1670
1726
|
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
1727
|
let t = /* @__PURE__ */ new Map();
|
|
1672
1728
|
for (let n of e.items.value) t.set($(n), n);
|
|
1673
1729
|
return t;
|
|
1674
|
-
}), p = i(() => d.value ? r.value[d.value] ??
|
|
1730
|
+
}), 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
1731
|
L(() => u.value, async () => {
|
|
1676
1732
|
await C();
|
|
1677
1733
|
}), L(() => e.itemCount.value, async () => {
|
|
@@ -1694,7 +1750,7 @@ function dn(e) {
|
|
|
1694
1750
|
c.delete(e);
|
|
1695
1751
|
}
|
|
1696
1752
|
function b(e, r) {
|
|
1697
|
-
r instanceof HTMLImageElement &&
|
|
1753
|
+
r instanceof HTMLImageElement && an(r) && (t.value[e] = !0, n.value[e] = null, J(e, r.currentSrc || r.src || ie(e)));
|
|
1698
1754
|
}
|
|
1699
1755
|
function x() {
|
|
1700
1756
|
H(), a.value = {}, n.value = {}, t.value = {}, o.value = {}, r.value = {}, l.clear();
|
|
@@ -1716,14 +1772,14 @@ function dn(e) {
|
|
|
1716
1772
|
V(i, n);
|
|
1717
1773
|
continue;
|
|
1718
1774
|
}
|
|
1719
|
-
i.muted = !1, i.loop = e.loopFullscreenVideo.value, i.playsInline = !0,
|
|
1775
|
+
i.muted = !1, i.loop = e.loopFullscreenVideo.value, i.playsInline = !0, hn(i), W(n, i);
|
|
1720
1776
|
}
|
|
1721
1777
|
for (let [e, n] of c.entries()) {
|
|
1722
1778
|
if (e !== t || r.value[e]?.errorKind) {
|
|
1723
1779
|
V(n, e);
|
|
1724
1780
|
continue;
|
|
1725
1781
|
}
|
|
1726
|
-
|
|
1782
|
+
hn(n), W(e, n);
|
|
1727
1783
|
}
|
|
1728
1784
|
}
|
|
1729
1785
|
function w(e, t) {
|
|
@@ -1741,7 +1797,7 @@ function dn(e) {
|
|
|
1741
1797
|
async function E(r, i) {
|
|
1742
1798
|
let a = Y(r) ?? e.activeItem.value;
|
|
1743
1799
|
t.value[r] = !1, n.value[r] = "generic";
|
|
1744
|
-
let o = await
|
|
1800
|
+
let o = await dn(i);
|
|
1745
1801
|
n.value[r] = o, a && e.onAssetError?.({
|
|
1746
1802
|
item: a,
|
|
1747
1803
|
occurrenceKey: r,
|
|
@@ -1759,7 +1815,7 @@ function dn(e) {
|
|
|
1759
1815
|
} catch {}
|
|
1760
1816
|
}
|
|
1761
1817
|
i.currentTime = 0, i.duration = 0, i.paused = !0, i.ready = !1, i.errorKind = "generic";
|
|
1762
|
-
let o = await
|
|
1818
|
+
let o = await dn(n);
|
|
1763
1819
|
i.errorKind = o, a && e.onAssetError?.({
|
|
1764
1820
|
item: a,
|
|
1765
1821
|
occurrenceKey: t,
|
|
@@ -1779,13 +1835,13 @@ function dn(e) {
|
|
|
1779
1835
|
if (!t || !n || !(e.target instanceof HTMLInputElement)) return;
|
|
1780
1836
|
let r = Number.parseFloat(e.target.value);
|
|
1781
1837
|
if (!Number.isFinite(r)) return;
|
|
1782
|
-
let i =
|
|
1838
|
+
let i = _n(r, 0, m.value || 0);
|
|
1783
1839
|
ne(n, i, t), t.currentTime = i;
|
|
1784
1840
|
}
|
|
1785
1841
|
function M(e) {
|
|
1786
1842
|
let t = q(), n = d.value;
|
|
1787
1843
|
if (!t || !n || !(e.target instanceof HTMLInputElement)) return;
|
|
1788
|
-
let r =
|
|
1844
|
+
let r = _n(Number.parseFloat(e.target.value), 0, 1);
|
|
1789
1845
|
t.volume = r, t.muted = r <= 0, r > 0 && (o.value[n] = r), W(n, t);
|
|
1790
1846
|
}
|
|
1791
1847
|
function N() {
|
|
@@ -1806,10 +1862,10 @@ function dn(e) {
|
|
|
1806
1862
|
}
|
|
1807
1863
|
function z(e) {
|
|
1808
1864
|
let t = R(e);
|
|
1809
|
-
return t ?
|
|
1865
|
+
return t ? ln(t) : null;
|
|
1810
1866
|
}
|
|
1811
1867
|
function B(e) {
|
|
1812
|
-
return
|
|
1868
|
+
return un(R(e));
|
|
1813
1869
|
}
|
|
1814
1870
|
function ee(e) {
|
|
1815
1871
|
return `${e}:${a.value[e] ?? 0}`;
|
|
@@ -1836,17 +1892,17 @@ function dn(e) {
|
|
|
1836
1892
|
for (let [e, t] of c.entries()) V(t, e);
|
|
1837
1893
|
}
|
|
1838
1894
|
function U(e) {
|
|
1839
|
-
return r.value[e] || (r.value[e] =
|
|
1895
|
+
return r.value[e] || (r.value[e] = rn()), r.value[e];
|
|
1840
1896
|
}
|
|
1841
1897
|
function W(e, t, n) {
|
|
1842
|
-
|
|
1898
|
+
on(U(e), t, n), !t.muted && t.volume > 0 && (o.value[e] = t.volume);
|
|
1843
1899
|
}
|
|
1844
1900
|
function ne(e, t, n) {
|
|
1845
1901
|
let r = U(e);
|
|
1846
1902
|
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
1903
|
}
|
|
1848
1904
|
function G(e) {
|
|
1849
|
-
return
|
|
1905
|
+
return _n(o.value[e] ?? 1, 0, 1);
|
|
1850
1906
|
}
|
|
1851
1907
|
function K(e) {
|
|
1852
1908
|
return s.get(e) ?? c.get(e) ?? null;
|
|
@@ -1857,7 +1913,7 @@ function dn(e) {
|
|
|
1857
1913
|
function re(e) {
|
|
1858
1914
|
if (e) {
|
|
1859
1915
|
if (e.paused) {
|
|
1860
|
-
|
|
1916
|
+
hn(e);
|
|
1861
1917
|
return;
|
|
1862
1918
|
}
|
|
1863
1919
|
e.pause();
|
|
@@ -1911,16 +1967,16 @@ function dn(e) {
|
|
|
1911
1967
|
syncMediaPlayback: C
|
|
1912
1968
|
};
|
|
1913
1969
|
}
|
|
1914
|
-
function
|
|
1970
|
+
function _n(e, t, n) {
|
|
1915
1971
|
return Math.min(Math.max(e, t), n);
|
|
1916
1972
|
}
|
|
1917
1973
|
//#endregion
|
|
1918
1974
|
//#region src/components/viewer-core/virtualization.ts
|
|
1919
|
-
var
|
|
1975
|
+
var vn = {
|
|
1920
1976
|
backward: 1,
|
|
1921
1977
|
forward: 3
|
|
1922
1978
|
};
|
|
1923
|
-
function
|
|
1979
|
+
function yn(e, t, n = vn) {
|
|
1924
1980
|
return t <= 0 ? {
|
|
1925
1981
|
start: 0,
|
|
1926
1982
|
end: -1
|
|
@@ -1929,14 +1985,14 @@ function mn(e, t, n = pn) {
|
|
|
1929
1985
|
end: Math.min(t - 1, e + n.forward)
|
|
1930
1986
|
};
|
|
1931
1987
|
}
|
|
1932
|
-
function
|
|
1933
|
-
let r =
|
|
1988
|
+
function bn(e, t, n = vn) {
|
|
1989
|
+
let r = yn(t, e.length, n);
|
|
1934
1990
|
return r.end < r.start ? [] : e.slice(r.start, r.end + 1).map((e, t) => ({
|
|
1935
1991
|
item: e,
|
|
1936
1992
|
index: r.start + t
|
|
1937
1993
|
}));
|
|
1938
1994
|
}
|
|
1939
|
-
function
|
|
1995
|
+
function xn(e, t, n, r, i) {
|
|
1940
1996
|
return {
|
|
1941
1997
|
transform: `translate3d(0, ${(e - t) * n + r}px, 0)`,
|
|
1942
1998
|
transition: i ? "none" : "transform 320ms cubic-bezier(0.22, 1, 0.36, 1)"
|
|
@@ -1944,12 +2000,12 @@ function gn(e, t, n, r, i) {
|
|
|
1944
2000
|
}
|
|
1945
2001
|
//#endregion
|
|
1946
2002
|
//#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(() =>
|
|
2003
|
+
function Sn(e, t, n = {}) {
|
|
2004
|
+
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
2005
|
itemCount: r.value.length,
|
|
1950
2006
|
loading: s.value,
|
|
1951
2007
|
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 =
|
|
2008
|
+
})), 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
2009
|
items: r,
|
|
1954
2010
|
activeItem: C,
|
|
1955
2011
|
activeMediaItem: w,
|
|
@@ -1958,14 +2014,14 @@ function _n(e, t, n = {}) {
|
|
|
1958
2014
|
loopFullscreenVideo: l,
|
|
1959
2015
|
onAssetError: n.onAssetError,
|
|
1960
2016
|
onAssetLoad: n.onAssetLoad
|
|
1961
|
-
}), E = i(() => r.value.length > 0 && S.value === r.value.length - 1), O = i(() =>
|
|
2017
|
+
}), E = i(() => r.value.length > 0 && S.value === r.value.length - 1), O = i(() => en({
|
|
1962
2018
|
errorMessage: o.value,
|
|
1963
2019
|
hasItems: r.value.length > 0,
|
|
1964
2020
|
hasNextPage: c.value,
|
|
1965
2021
|
phase: d.value,
|
|
1966
2022
|
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
|
-
|
|
2023
|
+
})), 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));
|
|
2024
|
+
tn({
|
|
1969
2025
|
enabled: _,
|
|
1970
2026
|
onDisable() {
|
|
1971
2027
|
H(), T.resetMediaState();
|
|
@@ -2043,7 +2099,7 @@ function _n(e, t, n = {}) {
|
|
|
2043
2099
|
return e.type === "audio";
|
|
2044
2100
|
}
|
|
2045
2101
|
function ie(e) {
|
|
2046
|
-
return
|
|
2102
|
+
return xn(e, S.value, g.value, m.value, h.value);
|
|
2047
2103
|
}
|
|
2048
2104
|
return {
|
|
2049
2105
|
activeItem: C,
|
|
@@ -2058,7 +2114,7 @@ function _n(e, t, n = {}) {
|
|
|
2058
2114
|
getAssetErrorKind: T.getAssetErrorKind,
|
|
2059
2115
|
getAssetErrorLabel: T.getAssetErrorLabel,
|
|
2060
2116
|
getAssetRenderKey: T.getAssetRenderKey,
|
|
2061
|
-
formatPlaybackTime:
|
|
2117
|
+
formatPlaybackTime: Qt,
|
|
2062
2118
|
getImageSource: T.getImageSource,
|
|
2063
2119
|
getSlideStyle: ie,
|
|
2064
2120
|
hasNextPage: c,
|
|
@@ -2102,21 +2158,21 @@ function _n(e, t, n = {}) {
|
|
|
2102
2158
|
}
|
|
2103
2159
|
//#endregion
|
|
2104
2160
|
//#region src/components/viewer-core/theme.ts
|
|
2105
|
-
var
|
|
2161
|
+
var Cn = "bg-[linear-gradient(180deg,#0a0b10,#05060a)]", wn = "bg-[linear-gradient(180deg,#0b0c11,#06070b)]", Tn = {
|
|
2106
2162
|
image: !0,
|
|
2107
2163
|
video: !0,
|
|
2108
2164
|
audio: !0,
|
|
2109
2165
|
other: !0
|
|
2110
2166
|
};
|
|
2111
|
-
function
|
|
2112
|
-
return
|
|
2167
|
+
function En(e) {
|
|
2168
|
+
return Tn[e], Cn;
|
|
2113
2169
|
}
|
|
2114
|
-
function
|
|
2115
|
-
return
|
|
2170
|
+
function Dn(e) {
|
|
2171
|
+
return Tn[e], wn;
|
|
2116
2172
|
}
|
|
2117
2173
|
//#endregion
|
|
2118
2174
|
//#region src/components/viewer-core/useFullscreenAssetEvents.ts
|
|
2119
|
-
function
|
|
2175
|
+
function On(e) {
|
|
2120
2176
|
function t(t, n) {
|
|
2121
2177
|
return e.fullscreenMedia.shouldHandleSlideAssetEvent(t, n) ? e.fullscreenMedia.getItemKey(n) : null;
|
|
2122
2178
|
}
|
|
@@ -2149,7 +2205,7 @@ function Cn(e) {
|
|
|
2149
2205
|
}
|
|
2150
2206
|
//#endregion
|
|
2151
2207
|
//#region src/components/viewer-core/dominantImageTone.ts
|
|
2152
|
-
function
|
|
2208
|
+
function kn(e) {
|
|
2153
2209
|
if (e.naturalWidth <= 0 || e.naturalHeight <= 0) return null;
|
|
2154
2210
|
let t = document.createElement("canvas"), n = t.getContext("2d", { willReadFrequently: !0 });
|
|
2155
2211
|
if (!n) return null;
|
|
@@ -2164,20 +2220,20 @@ function wn(e) {
|
|
|
2164
2220
|
r += d, i += s * d, a += c * d, o += l * d;
|
|
2165
2221
|
}
|
|
2166
2222
|
return r <= 0 ? null : {
|
|
2167
|
-
r:
|
|
2168
|
-
g:
|
|
2169
|
-
b:
|
|
2223
|
+
r: An(Math.round(i / r)),
|
|
2224
|
+
g: An(Math.round(a / r)),
|
|
2225
|
+
b: An(Math.round(o / r))
|
|
2170
2226
|
};
|
|
2171
2227
|
} catch {
|
|
2172
2228
|
return null;
|
|
2173
2229
|
}
|
|
2174
2230
|
}
|
|
2175
|
-
function
|
|
2231
|
+
function An(e) {
|
|
2176
2232
|
return Math.min(235, Math.max(26, e));
|
|
2177
2233
|
}
|
|
2178
2234
|
//#endregion
|
|
2179
2235
|
//#region src/components/viewer-core/useFullscreenDominantTone.ts
|
|
2180
|
-
function
|
|
2236
|
+
function jn(e) {
|
|
2181
2237
|
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
2238
|
if (!r.value) return;
|
|
2183
2239
|
let { r: e, g: t, b: n } = r.value;
|
|
@@ -2192,7 +2248,7 @@ function En(e) {
|
|
|
2192
2248
|
});
|
|
2193
2249
|
function s(n, r) {
|
|
2194
2250
|
if (!e.showDominantImageTone.value) return;
|
|
2195
|
-
let i =
|
|
2251
|
+
let i = kn(r);
|
|
2196
2252
|
i && (t.value[n] = i);
|
|
2197
2253
|
}
|
|
2198
2254
|
return {
|
|
@@ -2203,7 +2259,7 @@ function En(e) {
|
|
|
2203
2259
|
}
|
|
2204
2260
|
//#endregion
|
|
2205
2261
|
//#region src/components/SurfaceEmptyState.vue?vue&type=script&setup=true&lang.ts
|
|
2206
|
-
var
|
|
2262
|
+
var Mn = ["data-surface"], Nn = ["data-surface"], Pn = /* @__PURE__ */ d({
|
|
2207
2263
|
inheritAttrs: !1,
|
|
2208
2264
|
__name: "SurfaceEmptyState",
|
|
2209
2265
|
props: {
|
|
@@ -2217,31 +2273,31 @@ var Dn = ["data-surface"], On = ["data-surface"], kn = /* @__PURE__ */ d({
|
|
|
2217
2273
|
"data-testid": "vibe-empty-state-inline",
|
|
2218
2274
|
"data-surface": e.surface,
|
|
2219
2275
|
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,
|
|
2276
|
+
}), [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
2277
|
"data-testid": "vibe-empty-state-badge",
|
|
2222
2278
|
"data-surface": e.surface,
|
|
2223
2279
|
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,
|
|
2280
|
+
}, j(e.message), 11, Nn)])], 16));
|
|
2225
2281
|
}
|
|
2226
|
-
}),
|
|
2282
|
+
}), Fn = { class: "relative h-full min-h-0 overflow-hidden bg-[#05060a] text-[#f7f1ea]" }, In = {
|
|
2227
2283
|
key: 0,
|
|
2228
2284
|
class: "relative h-full min-h-0"
|
|
2229
|
-
},
|
|
2285
|
+
}, Ln = [
|
|
2230
2286
|
"data-item-id",
|
|
2231
2287
|
"data-occurrence-key",
|
|
2232
2288
|
"data-index",
|
|
2233
2289
|
"data-active",
|
|
2234
2290
|
"aria-hidden"
|
|
2235
|
-
],
|
|
2291
|
+
], Rn = {
|
|
2236
2292
|
key: 0,
|
|
2237
2293
|
"data-testid": "vibe-asset-spinner",
|
|
2238
2294
|
class: "pointer-events-none absolute inset-0 z-[2] grid place-items-center"
|
|
2239
|
-
},
|
|
2295
|
+
}, 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
2296
|
"src",
|
|
2241
2297
|
"alt",
|
|
2242
2298
|
"onLoad",
|
|
2243
2299
|
"onError"
|
|
2244
|
-
],
|
|
2300
|
+
], Gn = [
|
|
2245
2301
|
"loop",
|
|
2246
2302
|
"src",
|
|
2247
2303
|
"preload",
|
|
@@ -2260,15 +2316,15 @@ var Dn = ["data-surface"], On = ["data-surface"], kn = /* @__PURE__ */ d({
|
|
|
2260
2316
|
"onStalled",
|
|
2261
2317
|
"onTimeupdate",
|
|
2262
2318
|
"onWaiting"
|
|
2263
|
-
],
|
|
2319
|
+
], Kn = { class: "relative grid aspect-square w-[clamp(320px,46vw,560px)] max-w-[calc(100vw-2.5rem)] place-items-center" }, qn = [
|
|
2264
2320
|
"aria-label",
|
|
2265
2321
|
"disabled",
|
|
2266
2322
|
"onClick"
|
|
2267
|
-
],
|
|
2323
|
+
], 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
2324
|
key: 0,
|
|
2269
2325
|
"data-testid": "vibe-asset-spinner",
|
|
2270
2326
|
class: "pointer-events-none absolute inset-0 z-[3] grid place-items-center"
|
|
2271
|
-
},
|
|
2327
|
+
}, 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
2328
|
"src",
|
|
2273
2329
|
"preload",
|
|
2274
2330
|
"onCanplay",
|
|
@@ -2284,26 +2340,26 @@ var Dn = ["data-surface"], On = ["data-surface"], kn = /* @__PURE__ */ d({
|
|
|
2284
2340
|
"onStalled",
|
|
2285
2341
|
"onTimeupdate",
|
|
2286
2342
|
"onWaiting"
|
|
2287
|
-
],
|
|
2343
|
+
], nr = {
|
|
2288
2344
|
key: 2,
|
|
2289
2345
|
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
|
-
},
|
|
2346
|
+
}, 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
2347
|
key: 0,
|
|
2292
2348
|
"data-testid": "vibe-fullscreen-overlay",
|
|
2293
2349
|
class: "pointer-events-none absolute inset-0 z-[6]"
|
|
2294
|
-
},
|
|
2350
|
+
}, ar = { class: "h-full w-full" }, or = {
|
|
2295
2351
|
key: 1,
|
|
2296
2352
|
"data-testid": "vibe-forward-fill-placeholder",
|
|
2297
2353
|
class: "grid h-full min-h-0 place-items-center px-6 text-center"
|
|
2298
|
-
},
|
|
2354
|
+
}, 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
2355
|
key: 0,
|
|
2300
2356
|
"data-testid": "vibe-fullscreen-aside",
|
|
2301
2357
|
class: "h-full min-h-0 overflow-hidden border-l border-white/10 bg-black/45 backdrop-blur-[18px]"
|
|
2302
|
-
},
|
|
2358
|
+
}, dr = { class: "h-full min-h-0 overflow-y-auto overscroll-y-contain" }, fr = {
|
|
2303
2359
|
key: 0,
|
|
2304
2360
|
"data-testid": "vibe-fullscreen-aside",
|
|
2305
2361
|
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
|
-
},
|
|
2362
|
+
}, pr = { class: "h-full min-h-0 overflow-y-auto overscroll-y-contain" }, mr = 1280, hr = 768, gr = /* @__PURE__ */ d({
|
|
2307
2363
|
__name: "FullscreenSurface",
|
|
2308
2364
|
props: {
|
|
2309
2365
|
active: {
|
|
@@ -2355,27 +2411,27 @@ var Dn = ["data-surface"], On = ["data-surface"], kn = /* @__PURE__ */ d({
|
|
|
2355
2411
|
},
|
|
2356
2412
|
emits: ["back-to-list", "update:activeIndex"],
|
|
2357
2413
|
setup(e, { emit: n }) {
|
|
2358
|
-
let d = e, f = F(), m = n, h =
|
|
2414
|
+
let d = e, f = F(), m = n, h = Sn(d, (e, t) => {
|
|
2359
2415
|
m("update:activeIndex", t);
|
|
2360
2416
|
}, {
|
|
2361
2417
|
enabled: M(d, "active"),
|
|
2362
2418
|
onAssetError: d.reportAssetError ?? void 0,
|
|
2363
2419
|
onAssetLoad: d.reportAssetLoad ?? void 0
|
|
2364
|
-
}), _ = D(typeof window > "u" ?
|
|
2420
|
+
}), _ = D(typeof window > "u" ? mr : window.innerWidth || mr), C = qt({
|
|
2365
2421
|
active: M(d, "active"),
|
|
2366
2422
|
items: h.items,
|
|
2367
2423
|
resolvedActiveIndex: h.resolvedActiveIndex,
|
|
2368
2424
|
viewer: h
|
|
2369
|
-
}), T = i(() =>
|
|
2425
|
+
}), T = i(() => En(h.activeItem.value?.type ?? "image")), { activeSlideToneStyle: E, activeStageToneStyle: P, updateFromImageElement: I } = jn({
|
|
2370
2426
|
activeItem: h.activeItem,
|
|
2371
2427
|
getItemKey: C.getItemKey,
|
|
2372
2428
|
isImageReady: h.isImageReady,
|
|
2373
2429
|
showDominantImageTone: M(d, "showDominantImageTone")
|
|
2374
|
-
}), L =
|
|
2430
|
+
}), L = On({
|
|
2375
2431
|
fullscreenMedia: C,
|
|
2376
2432
|
updateDominantToneFromImageElement: _e,
|
|
2377
2433
|
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 <
|
|
2434
|
+
}), 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
2435
|
let e = h.activeItem.value;
|
|
2380
2436
|
return e ? {
|
|
2381
2437
|
hasNextPage: d.hasNextPage,
|
|
@@ -2392,7 +2448,7 @@ var Dn = ["data-surface"], On = ["data-surface"], kn = /* @__PURE__ */ d({
|
|
|
2392
2448
|
}), q = i(() => !K.value || !f["fullscreen-status"] ? [] : f["fullscreen-status"](K.value)), re = i(() => ({
|
|
2393
2449
|
gridTemplateColumns: ie.value ? "minmax(0, 1fr) 22rem" : "minmax(0, 1fr) 0rem",
|
|
2394
2450
|
transition: "grid-template-columns 320ms cubic-bezier(0.22, 1, 0.36, 1)"
|
|
2395
|
-
})), J = i(() =>
|
|
2451
|
+
})), 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
2452
|
emptyStateMode: M(d, "emptyStateMode"),
|
|
2397
2453
|
itemCount: i(() => d.items.length),
|
|
2398
2454
|
loading: M(d, "loading"),
|
|
@@ -2405,7 +2461,7 @@ var Dn = ["data-surface"], On = ["data-surface"], kn = /* @__PURE__ */ d({
|
|
|
2405
2461
|
window.removeEventListener("resize", pe);
|
|
2406
2462
|
});
|
|
2407
2463
|
function pe() {
|
|
2408
|
-
_.value = window.innerWidth ||
|
|
2464
|
+
_.value = window.innerWidth || mr;
|
|
2409
2465
|
}
|
|
2410
2466
|
function me(e, t) {
|
|
2411
2467
|
C.registerImageElement(e, t), h.registerImageElement(e, t), t instanceof HTMLImageElement && _e(e, t);
|
|
@@ -2434,7 +2490,7 @@ var Dn = ["data-surface"], On = ["data-surface"], kn = /* @__PURE__ */ d({
|
|
|
2434
2490
|
let a = i.play();
|
|
2435
2491
|
a && typeof a.catch == "function" && a.catch(() => {});
|
|
2436
2492
|
}
|
|
2437
|
-
return (e, n) => (w(), s("div",
|
|
2493
|
+
return (e, n) => (w(), s("div", Fn, [
|
|
2438
2494
|
c("div", {
|
|
2439
2495
|
class: v(["absolute inset-0 transition-[background] duration-200", T.value]),
|
|
2440
2496
|
style: b(N(P))
|
|
@@ -2451,7 +2507,7 @@ var Dn = ["data-surface"], On = ["data-surface"], kn = /* @__PURE__ */ d({
|
|
|
2451
2507
|
onPointerup: n[3] ||= (...e) => N(h).onPointerUp && N(h).onPointerUp(...e),
|
|
2452
2508
|
onPointercancel: n[4] ||= (...e) => N(h).onPointerCancel && N(h).onPointerCancel(...e),
|
|
2453
2509
|
onWheel: n[5] ||= (...e) => N(h).onWheel && N(h).onWheel(...e)
|
|
2454
|
-
}, [N(h).activeItem.value ? (w(), s("div",
|
|
2510
|
+
}, [N(h).activeItem.value ? (w(), s("div", In, [
|
|
2455
2511
|
(w(!0), s(t, null, O(N(h).renderedItems.value, ({ item: r, index: i }) => (w(), s("article", {
|
|
2456
2512
|
key: N(C).getItemKey(r),
|
|
2457
2513
|
"data-testid": "vibe-slide",
|
|
@@ -2463,12 +2519,12 @@ var Dn = ["data-surface"], On = ["data-surface"], kn = /* @__PURE__ */ d({
|
|
|
2463
2519
|
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
2520
|
style: b(N(h).getSlideStyle(i))
|
|
2465
2521
|
}, [c("div", {
|
|
2466
|
-
class: v(["absolute inset-0 opacity-85", N(
|
|
2522
|
+
class: v(["absolute inset-0 opacity-85", N(Dn)(r.type)]),
|
|
2467
2523
|
style: b(i === N(h).resolvedActiveIndex.value && r.type === "image" ? N(E) : void 0)
|
|
2468
2524
|
}, null, 6), N(h).isVisual(r) ? (w(), s("div", {
|
|
2469
2525
|
key: 0,
|
|
2470
2526
|
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",
|
|
2527
|
+
}, [N(C).isAssetLoading(i, r) ? (w(), s("div", Rn, [c("span", zn, [u(N(oe), {
|
|
2472
2528
|
class: "h-5 w-5 animate-spin stroke-[1.9] text-[#f7f1ea]/78",
|
|
2473
2529
|
"aria-hidden": "true"
|
|
2474
2530
|
})])])) : o("", !0), N(C).isAssetErrored(i, r) ? (w(), s("div", {
|
|
@@ -2476,19 +2532,19 @@ var Dn = ["data-surface"], On = ["data-surface"], kn = /* @__PURE__ */ d({
|
|
|
2476
2532
|
"data-testid": "vibe-asset-error",
|
|
2477
2533
|
"data-kind": N(C).getAssetErrorKind(r),
|
|
2478
2534
|
class: "grid h-full w-full place-items-center"
|
|
2479
|
-
}, [c("div",
|
|
2535
|
+
}, [c("div", Vn, [
|
|
2480
2536
|
u(N(le), {
|
|
2481
2537
|
class: "h-7 w-7 stroke-[1.9] text-[#f7f1ea]/72",
|
|
2482
2538
|
"aria-hidden": "true"
|
|
2483
2539
|
}),
|
|
2484
|
-
c("p",
|
|
2540
|
+
c("p", Hn, j(N(C).getAssetErrorLabel(r)), 1),
|
|
2485
2541
|
N(h).canRetryAsset(N(C).getItemKey(r)) ? (w(), s("button", {
|
|
2486
2542
|
key: 0,
|
|
2487
2543
|
type: "button",
|
|
2488
2544
|
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
2545
|
onClick: ee((e) => N(h).retryAsset(N(C).getItemKey(r)), ["stop"])
|
|
2490
|
-
}, " Retry ", 8,
|
|
2491
|
-
])], 8,
|
|
2546
|
+
}, " Retry ", 8, Un)) : o("", !0)
|
|
2547
|
+
])], 8, Bn)) : r.type === "image" ? (w(), s("img", {
|
|
2492
2548
|
key: N(h).getAssetRenderKey(N(C).getItemKey(r)),
|
|
2493
2549
|
src: N(C).getFullscreenImageSource(i, r),
|
|
2494
2550
|
alt: r.title ?? "",
|
|
@@ -2499,7 +2555,7 @@ var Dn = ["data-surface"], On = ["data-surface"], kn = /* @__PURE__ */ d({
|
|
|
2499
2555
|
ref: (e) => me(N(C).getItemKey(r), e),
|
|
2500
2556
|
onLoad: (e) => N(L).onFullscreenImageLoad(e, i, r),
|
|
2501
2557
|
onError: (e) => N(L).onFullscreenImageError(i, r)
|
|
2502
|
-
}, null, 42,
|
|
2558
|
+
}, null, 42, Wn)) : (w(), s("video", {
|
|
2503
2559
|
key: N(h).getAssetRenderKey(N(C).getItemKey(r)),
|
|
2504
2560
|
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
2561
|
playsinline: "",
|
|
@@ -2523,10 +2579,10 @@ var Dn = ["data-surface"], On = ["data-surface"], kn = /* @__PURE__ */ d({
|
|
|
2523
2579
|
onStalled: (e) => Q(i, r, e),
|
|
2524
2580
|
onTimeupdate: (e) => Q(i, r, e),
|
|
2525
2581
|
onWaiting: (e) => Q(i, r, e)
|
|
2526
|
-
}, null, 42,
|
|
2582
|
+
}, null, 42, Gn))], 2)) : N(h).isAudio(r) ? (w(), s("div", {
|
|
2527
2583
|
key: 1,
|
|
2528
2584
|
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",
|
|
2585
|
+
}, [c("div", Kn, [
|
|
2530
2586
|
c("button", {
|
|
2531
2587
|
type: "button",
|
|
2532
2588
|
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 +2592,19 @@ var Dn = ["data-surface"], On = ["data-surface"], kn = /* @__PURE__ */ d({
|
|
|
2536
2592
|
}, [
|
|
2537
2593
|
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
2594
|
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(
|
|
2595
|
+
c("span", Jn, [k(e.$slots, "item-icon", {
|
|
2596
|
+
icon: N(Nt)(r.type),
|
|
2541
2597
|
item: r
|
|
2542
|
-
}, () => [(w(), a(A(N(
|
|
2598
|
+
}, () => [(w(), a(A(N(Nt)(r.type)), {
|
|
2543
2599
|
class: "h-6 w-6 stroke-[1.9]",
|
|
2544
2600
|
"aria-hidden": "true"
|
|
2545
2601
|
}))])]),
|
|
2546
|
-
c("span",
|
|
2602
|
+
c("span", Yn, [(w(), a(A(N(h).mediaStates.value[N(C).getItemKey(r)]?.paused ?? !0 ? N(ce) : N(se)), {
|
|
2547
2603
|
class: "h-4 w-4 stroke-2",
|
|
2548
2604
|
"aria-hidden": "true"
|
|
2549
2605
|
}))])
|
|
2550
|
-
], 8,
|
|
2551
|
-
N(C).isAssetLoading(i, r) ? (w(), s("div",
|
|
2606
|
+
], 8, qn),
|
|
2607
|
+
N(C).isAssetLoading(i, r) ? (w(), s("div", Xn, [c("span", Zn, [u(N(oe), {
|
|
2552
2608
|
class: "h-5 w-5 animate-spin stroke-[1.9] text-[#f7f1ea]/78",
|
|
2553
2609
|
"aria-hidden": "true"
|
|
2554
2610
|
})])])) : o("", !0),
|
|
@@ -2561,14 +2617,14 @@ var Dn = ["data-surface"], On = ["data-surface"], kn = /* @__PURE__ */ d({
|
|
|
2561
2617
|
class: "h-7 w-7 stroke-[1.9] text-[#f7f1ea]/72",
|
|
2562
2618
|
"aria-hidden": "true"
|
|
2563
2619
|
}),
|
|
2564
|
-
c("p",
|
|
2620
|
+
c("p", $n, j(N(C).getAssetErrorLabel(r)), 1),
|
|
2565
2621
|
N(h).canRetryAsset(N(C).getItemKey(r)) ? (w(), s("button", {
|
|
2566
2622
|
key: 0,
|
|
2567
2623
|
type: "button",
|
|
2568
2624
|
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
2625
|
onClick: ee((e) => N(h).retryAsset(N(C).getItemKey(r)), ["stop"])
|
|
2570
|
-
}, " Retry ", 8,
|
|
2571
|
-
], 8,
|
|
2626
|
+
}, " Retry ", 8, er)) : o("", !0)
|
|
2627
|
+
], 8, Qn)], 64)) : o("", !0)
|
|
2572
2628
|
]), (w(), s("audio", {
|
|
2573
2629
|
key: N(h).getAssetRenderKey(N(C).getItemKey(r)),
|
|
2574
2630
|
src: N(C).getFullscreenMediaSource(i, r),
|
|
@@ -2589,15 +2645,15 @@ var Dn = ["data-surface"], On = ["data-surface"], kn = /* @__PURE__ */ d({
|
|
|
2589
2645
|
onStalled: (e) => Q(i, r, e),
|
|
2590
2646
|
onTimeupdate: (e) => Q(i, r, e),
|
|
2591
2647
|
onWaiting: (e) => Q(i, r, e)
|
|
2592
|
-
}, null, 40,
|
|
2593
|
-
icon: N(
|
|
2648
|
+
}, null, 40, tr))], 2)) : (w(), s("div", nr, [c("div", rr, [k(e.$slots, "item-icon", {
|
|
2649
|
+
icon: N(Nt)(r.type),
|
|
2594
2650
|
item: r
|
|
2595
|
-
}, () => [(w(), a(A(N(
|
|
2651
|
+
}, () => [(w(), a(A(N(Nt)(r.type)), {
|
|
2596
2652
|
class: "h-6 w-6 stroke-[1.9]",
|
|
2597
2653
|
"aria-hidden": "true"
|
|
2598
|
-
}))])])]))], 14,
|
|
2599
|
-
W.value && f["fullscreen-overlay"] ? (w(), s("div",
|
|
2600
|
-
N(h).activeItem.value ? (w(), a(
|
|
2654
|
+
}))])])]))], 14, Ln))), 128)),
|
|
2655
|
+
W.value && f["fullscreen-overlay"] ? (w(), s("div", ir, [c("div", ar, [k(e.$slots, "fullscreen-overlay", y(p(W.value)))])])) : o("", !0),
|
|
2656
|
+
N(h).activeItem.value ? (w(), a(At, {
|
|
2601
2657
|
key: 1,
|
|
2602
2658
|
"current-index": N(h).resolvedActiveIndex.value,
|
|
2603
2659
|
loading: d.loading,
|
|
@@ -2620,7 +2676,7 @@ var Dn = ["data-surface"], On = ["data-surface"], kn = /* @__PURE__ */ d({
|
|
|
2620
2676
|
"title",
|
|
2621
2677
|
"total"
|
|
2622
2678
|
])) : o("", !0),
|
|
2623
|
-
B.value ? (w(), a(
|
|
2679
|
+
B.value ? (w(), a(yt, {
|
|
2624
2680
|
key: 2,
|
|
2625
2681
|
"current-time": N(h).activeMediaState.value.currentTime,
|
|
2626
2682
|
"current-time-label": N(h).formatPlaybackTime(N(h).activeMediaState.value.currentTime),
|
|
@@ -2654,10 +2710,10 @@ var Dn = ["data-surface"], On = ["data-surface"], kn = /* @__PURE__ */ d({
|
|
|
2654
2710
|
"data-testid": "vibe-fullscreen-status-badge",
|
|
2655
2711
|
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
2712
|
}, j(K.value.message), 3))], 2)) : o("", !0)
|
|
2657
|
-
])) : H.value ? (w(), s("div",
|
|
2713
|
+
])) : H.value ? (w(), s("div", or, [c("div", sr, [c("span", cr, [u(N(oe), {
|
|
2658
2714
|
class: "h-5 w-5 animate-spin stroke-[1.9] text-[#f7f1ea]/78",
|
|
2659
2715
|
"aria-hidden": "true"
|
|
2660
|
-
})]), c("p",
|
|
2716
|
+
})]), c("p", lr, j(U.value), 1)])])) : N(Z) && N(X) ? (w(), a(Pn, {
|
|
2661
2717
|
key: 2,
|
|
2662
2718
|
message: N(X).message,
|
|
2663
2719
|
mode: N(X).mode,
|
|
@@ -2669,7 +2725,7 @@ var Dn = ["data-surface"], On = ["data-surface"], kn = /* @__PURE__ */ d({
|
|
|
2669
2725
|
"message",
|
|
2670
2726
|
"mode",
|
|
2671
2727
|
"surface"
|
|
2672
|
-
])) : o("", !0), N(de) && N(X) ? (w(), a(
|
|
2728
|
+
])) : o("", !0), N(de) && N(X) ? (w(), a(Pn, {
|
|
2673
2729
|
key: 3,
|
|
2674
2730
|
message: N(X).message,
|
|
2675
2731
|
mode: N(X).mode,
|
|
@@ -2689,7 +2745,7 @@ var Dn = ["data-surface"], On = ["data-surface"], kn = /* @__PURE__ */ d({
|
|
|
2689
2745
|
"leave-from-class": "translate-x-0 opacity-100",
|
|
2690
2746
|
"leave-to-class": "translate-x-full opacity-0"
|
|
2691
2747
|
}, {
|
|
2692
|
-
default: z(() => [ie.value && W.value ? (w(), s("aside",
|
|
2748
|
+
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
2749
|
_: 3
|
|
2694
2750
|
})], 4),
|
|
2695
2751
|
u(r, {
|
|
@@ -2700,29 +2756,29 @@ var Dn = ["data-surface"], On = ["data-surface"], kn = /* @__PURE__ */ d({
|
|
|
2700
2756
|
"leave-from-class": "translate-x-0 opacity-100",
|
|
2701
2757
|
"leave-to-class": "translate-x-full opacity-0"
|
|
2702
2758
|
}, {
|
|
2703
|
-
default: z(() => [ae.value && W.value ? (w(), s("aside",
|
|
2759
|
+
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
2760
|
_: 3
|
|
2705
2761
|
})
|
|
2706
2762
|
]));
|
|
2707
2763
|
}
|
|
2708
|
-
}),
|
|
2709
|
-
function
|
|
2764
|
+
}), _r = 1, vr = .5;
|
|
2765
|
+
function yr(e) {
|
|
2710
2766
|
if (e.type !== "image" && e.type !== "video") return {
|
|
2711
|
-
width:
|
|
2712
|
-
height:
|
|
2767
|
+
width: _r,
|
|
2768
|
+
height: _r,
|
|
2713
2769
|
source: "fallback"
|
|
2714
2770
|
};
|
|
2715
2771
|
let t = e.preview?.width, n = e.preview?.height;
|
|
2716
|
-
if (
|
|
2717
|
-
let r =
|
|
2772
|
+
if (Er(t) && Er(n)) {
|
|
2773
|
+
let r = Dr(e, t, n);
|
|
2718
2774
|
return {
|
|
2719
2775
|
width: r.width,
|
|
2720
2776
|
height: r.height,
|
|
2721
2777
|
source: "preview"
|
|
2722
2778
|
};
|
|
2723
2779
|
}
|
|
2724
|
-
if (
|
|
2725
|
-
let t =
|
|
2780
|
+
if (Er(e.width) && Er(e.height)) {
|
|
2781
|
+
let t = Dr(e, e.width, e.height);
|
|
2726
2782
|
return {
|
|
2727
2783
|
width: t.width,
|
|
2728
2784
|
height: t.height,
|
|
@@ -2730,31 +2786,31 @@ function mr(e) {
|
|
|
2730
2786
|
};
|
|
2731
2787
|
}
|
|
2732
2788
|
return {
|
|
2733
|
-
width:
|
|
2734
|
-
height:
|
|
2789
|
+
width: _r,
|
|
2790
|
+
height: _r,
|
|
2735
2791
|
source: "fallback"
|
|
2736
2792
|
};
|
|
2737
2793
|
}
|
|
2738
|
-
function
|
|
2794
|
+
function br(e, t) {
|
|
2739
2795
|
return !e || e <= 0 || !t || t <= 0 ? 1 : Math.max(1, Math.floor(e / t));
|
|
2740
2796
|
}
|
|
2741
|
-
function
|
|
2797
|
+
function xr(e, t, n, r = 0) {
|
|
2742
2798
|
if (!e || e <= 0 || !t || t <= 0) return n;
|
|
2743
2799
|
let i = typeof r == "number" && r > 0 ? r : 0, a = e - Math.max(0, t - 1) * i;
|
|
2744
2800
|
return !a || a <= 0 ? n : a / t;
|
|
2745
2801
|
}
|
|
2746
|
-
function
|
|
2747
|
-
let n =
|
|
2802
|
+
function Sr(e, t) {
|
|
2803
|
+
let n = yr(e);
|
|
2748
2804
|
return n.height / n.width * t;
|
|
2749
2805
|
}
|
|
2750
|
-
function
|
|
2806
|
+
function Cr(e, t) {
|
|
2751
2807
|
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
2808
|
for (let c = 0; c < e.length; c += 1) {
|
|
2753
2809
|
let l = e[c];
|
|
2754
2810
|
o.set($(l), c);
|
|
2755
2811
|
let u = 0;
|
|
2756
2812
|
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 =
|
|
2813
|
+
let d = u * (t.columnWidth + t.gapX), f = n[u], p = Sr(l, t.columnWidth);
|
|
2758
2814
|
r[c] = {
|
|
2759
2815
|
x: d,
|
|
2760
2816
|
y: f
|
|
@@ -2773,7 +2829,7 @@ function vr(e, t) {
|
|
|
2773
2829
|
indexById: o
|
|
2774
2830
|
};
|
|
2775
2831
|
}
|
|
2776
|
-
function
|
|
2832
|
+
function wr(e) {
|
|
2777
2833
|
if (e.itemCount <= 0) return [];
|
|
2778
2834
|
if (e.viewportHeight <= 0) return Array.from({ length: e.itemCount }, (e, t) => t);
|
|
2779
2835
|
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 +2839,7 @@ function yr(e) {
|
|
|
2783
2839
|
}
|
|
2784
2840
|
return Array.from(a).sort((e, t) => e - t);
|
|
2785
2841
|
}
|
|
2786
|
-
function
|
|
2842
|
+
function Tr(e, t, n) {
|
|
2787
2843
|
let r = /* @__PURE__ */ new Map();
|
|
2788
2844
|
for (let i of e) {
|
|
2789
2845
|
let e = t.get($(i));
|
|
@@ -2793,11 +2849,11 @@ function br(e, t, n) {
|
|
|
2793
2849
|
}
|
|
2794
2850
|
return r;
|
|
2795
2851
|
}
|
|
2796
|
-
function
|
|
2852
|
+
function Er(e) {
|
|
2797
2853
|
return typeof e == "number" && Number.isFinite(e) && e > 0;
|
|
2798
2854
|
}
|
|
2799
|
-
function
|
|
2800
|
-
return e.type !== "image" || n / t >=
|
|
2855
|
+
function Dr(e, t, n) {
|
|
2856
|
+
return e.type !== "image" || n / t >= vr ? {
|
|
2801
2857
|
width: t,
|
|
2802
2858
|
height: n
|
|
2803
2859
|
} : {
|
|
@@ -2807,21 +2863,21 @@ function Sr(e, t, n) {
|
|
|
2807
2863
|
}
|
|
2808
2864
|
//#endregion
|
|
2809
2865
|
//#region src/components/viewer-core/useMasonryMotion.ts
|
|
2810
|
-
var
|
|
2811
|
-
function
|
|
2866
|
+
var Or = 300, kr = 600, Ar = 40, jr = 300, Mr = 400;
|
|
2867
|
+
function Nr(e, t) {
|
|
2812
2868
|
return t === "top" ? [...e].reverse() : e;
|
|
2813
2869
|
}
|
|
2814
|
-
function
|
|
2815
|
-
return e <= 0 ?
|
|
2870
|
+
function Pr(e) {
|
|
2871
|
+
return e <= 0 ? kr : kr + Math.min((e - 1) * Ar, Mr);
|
|
2816
2872
|
}
|
|
2817
|
-
function
|
|
2818
|
-
return
|
|
2873
|
+
function Fr() {
|
|
2874
|
+
return jr;
|
|
2819
2875
|
}
|
|
2820
|
-
function
|
|
2876
|
+
function Ir(e) {
|
|
2821
2877
|
let t = e.itemHeight > 0 ? e.itemHeight : e.columnWidth;
|
|
2822
2878
|
return e.direction === "top" ? e.scrollTop - t : e.scrollTop + e.viewportHeight + t;
|
|
2823
2879
|
}
|
|
2824
|
-
function
|
|
2880
|
+
function Lr(e) {
|
|
2825
2881
|
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
2882
|
L(e.visibleIndices, (i) => {
|
|
2827
2883
|
if (!i.length) return;
|
|
@@ -2831,20 +2887,20 @@ function Mr(e) {
|
|
|
2831
2887
|
!r || !t.value.has(r) || d.has(r) || (d.add(r), o.push(r));
|
|
2832
2888
|
}
|
|
2833
2889
|
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,
|
|
2890
|
+
let s = Nr(o, a.value.get(o[0]) ?? "bottom"), c = new Map(r.value);
|
|
2891
|
+
for (let e = 0; e < s.length; e += 1) c.set(s[e], Math.min(e * Ar, Mr));
|
|
2892
|
+
r.value = c, Rr(() => {
|
|
2837
2893
|
let e = new Set(n.value);
|
|
2838
2894
|
for (let t of o) e.add(t);
|
|
2839
2895
|
n.value = e;
|
|
2840
|
-
}),
|
|
2896
|
+
}), zr(() => {
|
|
2841
2897
|
let e = new Set(t.value);
|
|
2842
2898
|
for (let t of o) e.delete(t);
|
|
2843
2899
|
t.value = e, S(() => {
|
|
2844
2900
|
let e = new Set(n.value), t = new Map(r.value), i = new Map(a.value);
|
|
2845
2901
|
for (let n of o) e.delete(n), t.delete(n), i.delete(n), d.delete(n);
|
|
2846
2902
|
n.value = e, r.value = t, a.value = i;
|
|
2847
|
-
},
|
|
2903
|
+
}, Pr(o.length));
|
|
2848
2904
|
});
|
|
2849
2905
|
}, { flush: "post" }), L(() => e.items.value.map((e) => $(e)), (e) => {
|
|
2850
2906
|
if (!e.length || !o.value.size) return;
|
|
@@ -2871,7 +2927,7 @@ function Mr(e) {
|
|
|
2871
2927
|
let e = $(t.item);
|
|
2872
2928
|
p.push(e), i.set(e, t), c.delete(e), l.delete(e), u.delete(e), f.delete(e), d.delete(e);
|
|
2873
2929
|
}
|
|
2874
|
-
o.value = i, t.value = c, n.value = l, r.value = u, a.value = f,
|
|
2930
|
+
o.value = i, t.value = c, n.value = l, r.value = u, a.value = f, Rr(() => {
|
|
2875
2931
|
let e = new Set(s.value);
|
|
2876
2932
|
for (let t of p) e.add(t);
|
|
2877
2933
|
s.value = e;
|
|
@@ -2879,9 +2935,9 @@ function Mr(e) {
|
|
|
2879
2935
|
let e = new Map(o.value), t = new Set(s.value);
|
|
2880
2936
|
for (let n of p) e.delete(n), t.delete(n);
|
|
2881
2937
|
o.value = e, s.value = t;
|
|
2882
|
-
},
|
|
2938
|
+
}, jr);
|
|
2883
2939
|
}
|
|
2884
|
-
function g(t, n, r =
|
|
2940
|
+
function g(t, n, r = Or) {
|
|
2885
2941
|
if (!t.size) return;
|
|
2886
2942
|
let i = /* @__PURE__ */ new Map(), a = [];
|
|
2887
2943
|
for (let [r, o] of t.entries()) {
|
|
@@ -2900,8 +2956,8 @@ function Mr(e) {
|
|
|
2900
2956
|
c.value = i, u.value = /* @__PURE__ */ new Set();
|
|
2901
2957
|
let o = new Map(l.value);
|
|
2902
2958
|
for (let e of a) o.set(e, r);
|
|
2903
|
-
l.value = o,
|
|
2904
|
-
u.value = new Set(a),
|
|
2959
|
+
l.value = o, Rr(() => {
|
|
2960
|
+
u.value = new Set(a), Rr(() => {
|
|
2905
2961
|
c.value = /* @__PURE__ */ new Map();
|
|
2906
2962
|
});
|
|
2907
2963
|
}), S(() => {
|
|
@@ -2912,8 +2968,8 @@ function Mr(e) {
|
|
|
2912
2968
|
}, r);
|
|
2913
2969
|
}
|
|
2914
2970
|
function _(e) {
|
|
2915
|
-
if (n.value.has(e)) return `transform ${
|
|
2916
|
-
if (u.value.has(e)) return `transform ${l.value.get(e) ??
|
|
2971
|
+
if (n.value.has(e)) return `transform ${kr}ms ease-out`;
|
|
2972
|
+
if (u.value.has(e)) return `transform ${l.value.get(e) ?? Or}ms ease-out`;
|
|
2917
2973
|
}
|
|
2918
2974
|
function v(e) {
|
|
2919
2975
|
if (!n.value.has(e)) return;
|
|
@@ -2930,7 +2986,7 @@ function Mr(e) {
|
|
|
2930
2986
|
} : {
|
|
2931
2987
|
dx: 0,
|
|
2932
2988
|
dy: 0
|
|
2933
|
-
}, u = s ? a.value.get(s) ?? "bottom" : "bottom", d = s && t.value.has(s) ?
|
|
2989
|
+
}, u = s ? a.value.get(s) ?? "bottom" : "bottom", d = s && t.value.has(s) ? Ir({
|
|
2934
2990
|
columnWidth: e.columnWidth.value,
|
|
2935
2991
|
direction: u,
|
|
2936
2992
|
itemHeight: o,
|
|
@@ -2944,14 +3000,14 @@ function Mr(e) {
|
|
|
2944
3000
|
if (!r) return {
|
|
2945
3001
|
opacity: "0",
|
|
2946
3002
|
transform: "translate3d(0, 0, 0) scale(0.96)",
|
|
2947
|
-
transition: `opacity ${
|
|
3003
|
+
transition: `opacity ${jr}ms ease-out, transform ${jr}ms ease-out`
|
|
2948
3004
|
};
|
|
2949
3005
|
let i = s.value.has(n);
|
|
2950
3006
|
return {
|
|
2951
3007
|
height: `${r.height}px`,
|
|
2952
3008
|
opacity: i ? "0" : "1",
|
|
2953
3009
|
transform: `translate3d(${r.position.x}px, ${r.position.y}px, 0) scale(${i ? "0.96" : "1"})`,
|
|
2954
|
-
transition: `opacity ${
|
|
3010
|
+
transition: `opacity ${jr}ms ease-out, transform ${jr}ms ease-out`,
|
|
2955
3011
|
width: `${e.columnWidth.value}px`
|
|
2956
3012
|
};
|
|
2957
3013
|
}
|
|
@@ -2972,28 +3028,28 @@ function Mr(e) {
|
|
|
2972
3028
|
playFlipMoveAnimation: g
|
|
2973
3029
|
};
|
|
2974
3030
|
}
|
|
2975
|
-
function
|
|
3031
|
+
function Rr(e) {
|
|
2976
3032
|
if (typeof requestAnimationFrame == "function") {
|
|
2977
3033
|
requestAnimationFrame(() => e());
|
|
2978
3034
|
return;
|
|
2979
3035
|
}
|
|
2980
3036
|
setTimeout(e, 0);
|
|
2981
3037
|
}
|
|
2982
|
-
function
|
|
2983
|
-
|
|
3038
|
+
function zr(e) {
|
|
3039
|
+
Rr(() => Rr(e));
|
|
2984
3040
|
}
|
|
2985
3041
|
//#endregion
|
|
2986
3042
|
//#region src/components/viewer-core/masonryViewport.ts
|
|
2987
|
-
function
|
|
3043
|
+
function Br(e, t) {
|
|
2988
3044
|
return e?.clientHeight || Math.round(e?.getBoundingClientRect().height ?? 0) || t || window.innerHeight || 1;
|
|
2989
3045
|
}
|
|
2990
|
-
function
|
|
3046
|
+
function Vr(e, t, n) {
|
|
2991
3047
|
return e?.clientWidth || Math.round(e?.getBoundingClientRect().width ?? 0) || t || window.innerWidth || n;
|
|
2992
3048
|
}
|
|
2993
|
-
function
|
|
3049
|
+
function Hr(e, t, n, r) {
|
|
2994
3050
|
return (e?.scrollHeight ?? r) - (t + n);
|
|
2995
3051
|
}
|
|
2996
|
-
function
|
|
3052
|
+
function Ur(e, t) {
|
|
2997
3053
|
return {
|
|
2998
3054
|
height: `${e}px`,
|
|
2999
3055
|
transform: `translate3d(0, ${t}px, 0)`
|
|
@@ -3001,8 +3057,8 @@ function Rr(e, t) {
|
|
|
3001
3057
|
}
|
|
3002
3058
|
//#endregion
|
|
3003
3059
|
//#region src/components/viewer-core/useEdgeBoundary.ts
|
|
3004
|
-
var
|
|
3005
|
-
function
|
|
3060
|
+
var Wr = 250, Gr = 1e3;
|
|
3061
|
+
function Kr(e) {
|
|
3006
3062
|
let t = D(!1), n = D(!1), r = D(0), i = D(0), a = D(!1), o = D(!1), s = 0, c = null;
|
|
3007
3063
|
x(() => {
|
|
3008
3064
|
y();
|
|
@@ -3018,7 +3074,7 @@ function Vr(e) {
|
|
|
3018
3074
|
function u(t) {
|
|
3019
3075
|
if (!b(t) || !e.isAtBoundary()) return;
|
|
3020
3076
|
let n = Date.now();
|
|
3021
|
-
n < s || (s = n +
|
|
3077
|
+
n < s || (s = n + Wr, m());
|
|
3022
3078
|
}
|
|
3023
3079
|
function d() {
|
|
3024
3080
|
if (!g()) return;
|
|
@@ -3052,7 +3108,7 @@ function Vr(e) {
|
|
|
3052
3108
|
return e.hasPage.value && t.value && r.value > i.value && !e.interactionLocked?.value && !e.loading.value && !a.value && typeof e.requestPage.value == "function";
|
|
3053
3109
|
}
|
|
3054
3110
|
function _() {
|
|
3055
|
-
o.value = !1, v(
|
|
3111
|
+
o.value = !1, v(Gr);
|
|
3056
3112
|
}
|
|
3057
3113
|
function v(e) {
|
|
3058
3114
|
y(), a.value = !0, c = setTimeout(() => {
|
|
@@ -3075,42 +3131,42 @@ function Vr(e) {
|
|
|
3075
3131
|
}
|
|
3076
3132
|
//#endregion
|
|
3077
3133
|
//#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 ||
|
|
3134
|
+
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;
|
|
3135
|
+
function oi(e) {
|
|
3136
|
+
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
3137
|
itemCount: e.items.value.length,
|
|
3082
3138
|
viewportHeight: r.value,
|
|
3083
3139
|
scrollTop: n.value,
|
|
3084
|
-
overscanPx:
|
|
3085
|
-
bucketPx:
|
|
3140
|
+
overscanPx: Zr,
|
|
3141
|
+
bucketPx: qr,
|
|
3086
3142
|
buckets: c.value
|
|
3087
3143
|
})), b = i(() => y.value.map((t) => ({
|
|
3088
3144
|
item: e.items.value[t],
|
|
3089
3145
|
index: t
|
|
3090
3146
|
}))), 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(() =>
|
|
3147
|
+
let e = l.value + Jr * 2, t = d.value ?? 0;
|
|
3148
|
+
return Math.max(e, t, r.value) + ei;
|
|
3149
|
+
}), w = i(() => e.hasNextPage.value || e.allowExhaustedNextPageRefresh.value), T = i(() => li({
|
|
3094
3150
|
active: e.active.value,
|
|
3095
3151
|
maxScrollTop: se(),
|
|
3096
3152
|
progressDistancePx: n.value,
|
|
3097
|
-
thresholdPx:
|
|
3153
|
+
thresholdPx: Qr,
|
|
3098
3154
|
triggerEnabled: w.value
|
|
3099
|
-
})), E = i(() => e.items.value.length > 0 ? `${v.value + 1} / ${e.items.value.length}` : "0 / 0"), O = i(() =>
|
|
3155
|
+
})), E = i(() => e.items.value.length > 0 ? `${v.value + 1} / ${e.items.value.length}` : "0 / 0"), O = i(() => ci({
|
|
3100
3156
|
active: e.active.value,
|
|
3101
3157
|
maxScrollTop: se(),
|
|
3102
3158
|
progressDistancePx: n.value,
|
|
3103
|
-
thresholdPx:
|
|
3159
|
+
thresholdPx: $r,
|
|
3104
3160
|
triggerEnabled: e.hasPreviousPage.value
|
|
3105
|
-
})), k = i(() => Math.max(0, r.value -
|
|
3161
|
+
})), k = i(() => Math.max(0, r.value - ni * 2)), A = i(() => C.value > r.value + 1 && k.value > 0), j = i(() => {
|
|
3106
3162
|
if (!A.value) return 0;
|
|
3107
3163
|
let e = r.value / C.value * k.value;
|
|
3108
|
-
return Math.min(k.value, Math.max(
|
|
3164
|
+
return Math.min(k.value, Math.max(ri, e));
|
|
3109
3165
|
}), M = i(() => {
|
|
3110
|
-
if (!A.value) return
|
|
3166
|
+
if (!A.value) return ni;
|
|
3111
3167
|
let e = Math.max(0, C.value - r.value);
|
|
3112
|
-
return
|
|
3113
|
-
}), N =
|
|
3168
|
+
return ni + Math.max(0, k.value - j.value) * (e > 0 ? si(n.value / e, 0, 1) : 0);
|
|
3169
|
+
}), N = Lr({
|
|
3114
3170
|
items: e.items,
|
|
3115
3171
|
visibleIndices: y,
|
|
3116
3172
|
positions: o,
|
|
@@ -3119,27 +3175,27 @@ function ti(e) {
|
|
|
3119
3175
|
columnWidth: g,
|
|
3120
3176
|
scrollTop: n,
|
|
3121
3177
|
viewportHeight: r
|
|
3122
|
-
}), P =
|
|
3178
|
+
}), P = Kr({
|
|
3123
3179
|
direction: "top",
|
|
3124
3180
|
getAnimationLockMs(e) {
|
|
3125
|
-
return Math.max(
|
|
3181
|
+
return Math.max(ii, Pr(e)) + ai;
|
|
3126
3182
|
},
|
|
3127
3183
|
hasPage: e.hasPreviousPage,
|
|
3128
3184
|
interactionLocked: p,
|
|
3129
3185
|
isAtBoundary() {
|
|
3130
|
-
return n.value <=
|
|
3186
|
+
return n.value <= $r;
|
|
3131
3187
|
},
|
|
3132
3188
|
loading: e.loading,
|
|
3133
3189
|
requestPage: e.requestPreviousPage
|
|
3134
|
-
}), F =
|
|
3190
|
+
}), F = Kr({
|
|
3135
3191
|
direction: "bottom",
|
|
3136
3192
|
getAnimationLockMs(e) {
|
|
3137
|
-
return
|
|
3193
|
+
return Pr(e) + ai;
|
|
3138
3194
|
},
|
|
3139
3195
|
hasPage: w,
|
|
3140
3196
|
interactionLocked: p,
|
|
3141
3197
|
isAtBoundary() {
|
|
3142
|
-
return oe() <=
|
|
3198
|
+
return oe() <= Qr;
|
|
3143
3199
|
},
|
|
3144
3200
|
loading: e.loading,
|
|
3145
3201
|
requestPage: e.requestNextPage
|
|
@@ -3149,7 +3205,7 @@ function ti(e) {
|
|
|
3149
3205
|
h,
|
|
3150
3206
|
g
|
|
3151
3207
|
], async ([t], [r = []]) => {
|
|
3152
|
-
let i = t.map((e) => $(e)), a = r ?? [], s = a.map((e) => $(e)), c =
|
|
3208
|
+
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
3209
|
let t = $(e);
|
|
3154
3210
|
if (f.has(t)) return [];
|
|
3155
3211
|
let n = c.get(t), r = l.get(t);
|
|
@@ -3158,8 +3214,8 @@ function ti(e) {
|
|
|
3158
3214
|
item: e,
|
|
3159
3215
|
position: n
|
|
3160
3216
|
}];
|
|
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(
|
|
3217
|
+
}), 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;
|
|
3218
|
+
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
3219
|
}, { immediate: !0 }), L([
|
|
3164
3220
|
() => e.pendingAppendItems.value.map((e) => $(e)),
|
|
3165
3221
|
h,
|
|
@@ -3176,7 +3232,7 @@ function ti(e) {
|
|
|
3176
3232
|
}
|
|
3177
3233
|
if (i !== !1 || f.value == null) return;
|
|
3178
3234
|
await _();
|
|
3179
|
-
let o = Math.max(0, C.value - r.value), s =
|
|
3235
|
+
let o = Math.max(0, C.value - r.value), s = si(f.value, 0, o);
|
|
3180
3236
|
a.scrollTop = s, n.value = s, P.syncBoundary(), F.syncBoundary();
|
|
3181
3237
|
}), L(() => e.loading.value, async (t) => {
|
|
3182
3238
|
!t && !e.pendingAppendItems.value.length && !z && !ee && (d.value = null), P.onLoadingChange(t), F.onLoadingChange(t), await _();
|
|
@@ -3188,16 +3244,16 @@ function ti(e) {
|
|
|
3188
3244
|
I?.disconnect(), I = null, window.removeEventListener("resize", Y), de(), fe(), R &&= (cancelAnimationFrame(R), 0);
|
|
3189
3245
|
});
|
|
3190
3246
|
function te() {
|
|
3191
|
-
let t =
|
|
3247
|
+
let t = Cr(e.items.value, {
|
|
3192
3248
|
columnCount: h.value,
|
|
3193
3249
|
columnWidth: g.value,
|
|
3194
|
-
gapX:
|
|
3195
|
-
gapY:
|
|
3196
|
-
bucketPx:
|
|
3250
|
+
gapX: Yr,
|
|
3251
|
+
gapY: Yr,
|
|
3252
|
+
bucketPx: qr
|
|
3197
3253
|
});
|
|
3198
3254
|
o.value = t.positions.map((e) => ({
|
|
3199
|
-
x: e.x +
|
|
3200
|
-
y: e.y +
|
|
3255
|
+
x: e.x + Jr,
|
|
3256
|
+
y: e.y + Jr
|
|
3201
3257
|
})), s.value = t.heights, c.value = t.buckets, l.value = t.contentHeight, u.value = t.indexById;
|
|
3202
3258
|
}
|
|
3203
3259
|
function V() {
|
|
@@ -3222,7 +3278,7 @@ function ti(e) {
|
|
|
3222
3278
|
let a = t.value, c = o.value[e], l = s.value[e];
|
|
3223
3279
|
if (!a || !c || !l) return;
|
|
3224
3280
|
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 -
|
|
3281
|
+
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
3282
|
}
|
|
3227
3283
|
function ne(e, r) {
|
|
3228
3284
|
let i = t.value, a = r.get(e), s = u.value.get(e), c = s == null ? null : o.value[s];
|
|
@@ -3255,7 +3311,7 @@ function ti(e) {
|
|
|
3255
3311
|
e.setActiveIndex(i);
|
|
3256
3312
|
}
|
|
3257
3313
|
function re() {
|
|
3258
|
-
let t = n.value <=
|
|
3314
|
+
let t = n.value <= $r, r = oe() <= Qr;
|
|
3259
3315
|
return t ? (e.setActiveIndex(0), !0) : r ? (e.setActiveIndex(Math.max(0, e.items.value.length - 1)), !0) : !1;
|
|
3260
3316
|
}
|
|
3261
3317
|
function J() {
|
|
@@ -3265,29 +3321,29 @@ function ti(e) {
|
|
|
3265
3321
|
r.value = ie(), a.value = ae();
|
|
3266
3322
|
}
|
|
3267
3323
|
function ie() {
|
|
3268
|
-
return
|
|
3324
|
+
return Br(t.value, r.value);
|
|
3269
3325
|
}
|
|
3270
3326
|
function ae() {
|
|
3271
|
-
return
|
|
3327
|
+
return Vr(t.value, a.value, Xr);
|
|
3272
3328
|
}
|
|
3273
3329
|
function oe() {
|
|
3274
|
-
return
|
|
3330
|
+
return Hr(t.value, n.value, r.value, C.value);
|
|
3275
3331
|
}
|
|
3276
3332
|
function se() {
|
|
3277
3333
|
let e = Math.max(t.value?.scrollHeight ?? 0, C.value);
|
|
3278
3334
|
return Math.max(0, e - r.value);
|
|
3279
3335
|
}
|
|
3280
3336
|
function ce() {
|
|
3281
|
-
return
|
|
3337
|
+
return Ur(j.value, M.value);
|
|
3282
3338
|
}
|
|
3283
3339
|
function le(e) {
|
|
3284
|
-
return e.length ?
|
|
3340
|
+
return e.length ? Cr(e, {
|
|
3285
3341
|
columnCount: h.value,
|
|
3286
3342
|
columnWidth: g.value,
|
|
3287
|
-
gapX:
|
|
3288
|
-
gapY:
|
|
3289
|
-
bucketPx:
|
|
3290
|
-
}).contentHeight +
|
|
3343
|
+
gapX: Yr,
|
|
3344
|
+
gapY: Yr,
|
|
3345
|
+
bucketPx: qr
|
|
3346
|
+
}).contentHeight + Jr * 2 : 0;
|
|
3291
3347
|
}
|
|
3292
3348
|
function ue(e) {
|
|
3293
3349
|
let t = /* @__PURE__ */ new Map();
|
|
@@ -3309,7 +3365,7 @@ function ti(e) {
|
|
|
3309
3365
|
} finally {
|
|
3310
3366
|
d.value = null, ee = !1;
|
|
3311
3367
|
}
|
|
3312
|
-
},
|
|
3368
|
+
}, ti));
|
|
3313
3369
|
}
|
|
3314
3370
|
function de() {
|
|
3315
3371
|
z &&= (clearTimeout(z), null);
|
|
@@ -3336,27 +3392,27 @@ function ti(e) {
|
|
|
3336
3392
|
scrollViewportRef: t
|
|
3337
3393
|
};
|
|
3338
3394
|
}
|
|
3339
|
-
function
|
|
3395
|
+
function si(e, t, n) {
|
|
3340
3396
|
return Math.min(Math.max(e, t), n);
|
|
3341
3397
|
}
|
|
3342
|
-
function
|
|
3398
|
+
function ci(e) {
|
|
3343
3399
|
if (!e.active || !e.triggerEnabled) return 0;
|
|
3344
3400
|
let t = Math.max(0, e.maxScrollTop - e.thresholdPx);
|
|
3345
|
-
return t <= 0 ? 1 :
|
|
3401
|
+
return t <= 0 ? 1 : si(1 - (e.progressDistancePx - e.thresholdPx) / t, 0, 1);
|
|
3346
3402
|
}
|
|
3347
|
-
function
|
|
3403
|
+
function li(e) {
|
|
3348
3404
|
if (!e.active || !e.triggerEnabled) return 0;
|
|
3349
3405
|
let t = Math.max(0, e.maxScrollTop - e.thresholdPx);
|
|
3350
|
-
return t <= 0 ? 1 :
|
|
3406
|
+
return t <= 0 ? 1 : si(e.progressDistancePx / t, 0, 1);
|
|
3351
3407
|
}
|
|
3352
3408
|
//#endregion
|
|
3353
3409
|
//#region src/components/viewer-core/listCardAsset.ts
|
|
3354
|
-
function
|
|
3410
|
+
function ui(e) {
|
|
3355
3411
|
if (e) try {
|
|
3356
3412
|
e.removeAttribute("src"), e.src = "";
|
|
3357
3413
|
} catch {}
|
|
3358
3414
|
}
|
|
3359
|
-
function
|
|
3415
|
+
function di(e) {
|
|
3360
3416
|
if (e) {
|
|
3361
3417
|
try {
|
|
3362
3418
|
e.currentTime = 0;
|
|
@@ -3367,12 +3423,12 @@ function oi(e) {
|
|
|
3367
3423
|
} catch {}
|
|
3368
3424
|
}
|
|
3369
3425
|
}
|
|
3370
|
-
function
|
|
3426
|
+
function fi(e, t) {
|
|
3371
3427
|
if (t) return e.bottom > t.top && e.top < t.bottom;
|
|
3372
3428
|
let n = window.innerHeight || document.documentElement.clientHeight || 0;
|
|
3373
3429
|
return e.bottom > 0 && e.top < n;
|
|
3374
3430
|
}
|
|
3375
|
-
function
|
|
3431
|
+
function pi(e) {
|
|
3376
3432
|
if (!e) return null;
|
|
3377
3433
|
try {
|
|
3378
3434
|
return new URL(e, window.location.href).href;
|
|
@@ -3382,9 +3438,9 @@ function ci(e) {
|
|
|
3382
3438
|
}
|
|
3383
3439
|
//#endregion
|
|
3384
3440
|
//#region src/components/viewer-core/listPreview.ts
|
|
3385
|
-
var
|
|
3386
|
-
function
|
|
3387
|
-
let t =
|
|
3441
|
+
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;
|
|
3442
|
+
function _i(e) {
|
|
3443
|
+
let t = vi(e), n = t?.url, r = yr(e), i = e.title?.trim() || Pt(e.type);
|
|
3388
3444
|
return t?.mediaType === "video" && typeof n == "string" ? {
|
|
3389
3445
|
kind: "video",
|
|
3390
3446
|
url: n,
|
|
@@ -3403,13 +3459,13 @@ function fi(e) {
|
|
|
3403
3459
|
width: r.width,
|
|
3404
3460
|
height: r.height,
|
|
3405
3461
|
label: i
|
|
3406
|
-
} : typeof n == "string" &&
|
|
3462
|
+
} : typeof n == "string" && bi(e, n) ? {
|
|
3407
3463
|
kind: "video",
|
|
3408
3464
|
url: n,
|
|
3409
3465
|
width: r.width,
|
|
3410
3466
|
height: r.height,
|
|
3411
3467
|
label: i
|
|
3412
|
-
} : typeof n == "string" &&
|
|
3468
|
+
} : typeof n == "string" && yi(e, n) ? {
|
|
3413
3469
|
kind: "image",
|
|
3414
3470
|
url: n,
|
|
3415
3471
|
width: r.width,
|
|
@@ -3423,26 +3479,26 @@ function fi(e) {
|
|
|
3423
3479
|
label: i
|
|
3424
3480
|
};
|
|
3425
3481
|
}
|
|
3426
|
-
function
|
|
3482
|
+
function vi(e) {
|
|
3427
3483
|
return e.preview?.url ? e.preview : typeof e.url != "string" || e.url.trim() === "" ? null : { url: e.url };
|
|
3428
3484
|
}
|
|
3429
|
-
function
|
|
3430
|
-
return e.type !== "image" || typeof t != "string" ? !1 :
|
|
3485
|
+
function yi(e, t) {
|
|
3486
|
+
return e.type !== "image" || typeof t != "string" ? !1 : mi.test(t) || xi(t);
|
|
3431
3487
|
}
|
|
3432
|
-
function
|
|
3433
|
-
return e.type !== "video" || typeof t != "string" ? !1 :
|
|
3488
|
+
function bi(e, t) {
|
|
3489
|
+
return e.type !== "video" || typeof t != "string" ? !1 : hi.test(t) || Si(t);
|
|
3434
3490
|
}
|
|
3435
|
-
function
|
|
3491
|
+
function xi(e) {
|
|
3436
3492
|
return /^(https?:\/\/|\/\/|\/(?!\/)|\.{1,2}\/|blob:|data:)/i.test(e);
|
|
3437
3493
|
}
|
|
3438
|
-
function
|
|
3439
|
-
return
|
|
3494
|
+
function Si(e) {
|
|
3495
|
+
return gi.test(e) || /^blob:/i.test(e) || /^data:video\//i.test(e);
|
|
3440
3496
|
}
|
|
3441
3497
|
//#endregion
|
|
3442
3498
|
//#region src/components/viewer-core/useListCardHealthCheck.ts
|
|
3443
|
-
function
|
|
3499
|
+
function Ci(e) {
|
|
3444
3500
|
let t = D(null), n = i(() => {
|
|
3445
|
-
let t = typeof e.item.value.healthCheck?.url == "string" ?
|
|
3501
|
+
let t = typeof e.item.value.healthCheck?.url == "string" ? pi(e.item.value.healthCheck.url) : null;
|
|
3446
3502
|
return !t || t === e.attachedAssetUrl.value ? null : t;
|
|
3447
3503
|
}), r = null, a = 0, o = /* @__PURE__ */ new Map();
|
|
3448
3504
|
L(n, (e, n) => {
|
|
@@ -3474,7 +3530,7 @@ function vi(e) {
|
|
|
3474
3530
|
r.refresh();
|
|
3475
3531
|
return;
|
|
3476
3532
|
}
|
|
3477
|
-
r =
|
|
3533
|
+
r = Lt.request({
|
|
3478
3534
|
assetType: "probe",
|
|
3479
3535
|
getPriority: e.getPriority,
|
|
3480
3536
|
onGrant() {
|
|
@@ -3484,7 +3540,7 @@ function vi(e) {
|
|
|
3484
3540
|
return;
|
|
3485
3541
|
}
|
|
3486
3542
|
let i = ++a;
|
|
3487
|
-
|
|
3543
|
+
fn(r).then((s) => {
|
|
3488
3544
|
if (!(i !== a || n.value !== r)) {
|
|
3489
3545
|
if (o.set(r, s ?? null), !s) {
|
|
3490
3546
|
t.value = null;
|
|
@@ -3520,14 +3576,14 @@ function vi(e) {
|
|
|
3520
3576
|
}
|
|
3521
3577
|
//#endregion
|
|
3522
3578
|
//#region src/components/ListCard.vue?vue&type=script&setup=true&lang.ts
|
|
3523
|
-
var
|
|
3579
|
+
var wi = ["aria-label"], Ti = {
|
|
3524
3580
|
key: 0,
|
|
3525
3581
|
"data-testid": "vibe-list-card-spinner",
|
|
3526
3582
|
class: "pointer-events-none absolute inset-0 z-[4] grid place-items-center bg-black/18"
|
|
3527
|
-
},
|
|
3583
|
+
}, 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
3584
|
key: 4,
|
|
3529
3585
|
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
|
-
},
|
|
3586
|
+
}, 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
3587
|
__name: "ListCard",
|
|
3532
3588
|
props: {
|
|
3533
3589
|
active: {
|
|
@@ -3551,7 +3607,7 @@ var yi = ["aria-label"], bi = {
|
|
|
3551
3607
|
},
|
|
3552
3608
|
emits: ["open"],
|
|
3553
3609
|
setup(e, { emit: t }) {
|
|
3554
|
-
let n = e, r = t, l = i(() =>
|
|
3610
|
+
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
3611
|
attachedAssetUrl: E,
|
|
3556
3612
|
getPriority: ue,
|
|
3557
3613
|
isInView: d,
|
|
@@ -3560,7 +3616,7 @@ var yi = ["aria-label"], bi = {
|
|
|
3560
3616
|
loadErrorKind: g,
|
|
3561
3617
|
reportAssetError: n.reportAssetError,
|
|
3562
3618
|
surfaceActive: i(() => n.surfaceActive)
|
|
3563
|
-
}), I = i(() => F.errorKind.value ?? g.value), R = i(() => !!I.value), z = i(() =>
|
|
3619
|
+
}), 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
3620
|
L([E, () => l.value.kind], () => {
|
|
3565
3621
|
let e = l.value.kind === "fallback";
|
|
3566
3622
|
m.value = e, h.value = !1, g.value = null, e && (T.value = !0);
|
|
@@ -3601,7 +3657,7 @@ var yi = ["aria-label"], bi = {
|
|
|
3601
3657
|
if (!X(_.value)) return;
|
|
3602
3658
|
let e = E.value ?? n.item.url;
|
|
3603
3659
|
m.value = !1, g.value = "generic";
|
|
3604
|
-
let t = await
|
|
3660
|
+
let t = await dn(e);
|
|
3605
3661
|
g.value = t, n.reportAssetError?.({
|
|
3606
3662
|
item: n.item,
|
|
3607
3663
|
occurrenceKey: $(n.item),
|
|
@@ -3633,7 +3689,7 @@ var yi = ["aria-label"], bi = {
|
|
|
3633
3689
|
V?.refresh();
|
|
3634
3690
|
return;
|
|
3635
3691
|
}
|
|
3636
|
-
V =
|
|
3692
|
+
V = Lt.request({
|
|
3637
3693
|
assetType: l.value.kind,
|
|
3638
3694
|
getPriority: ue,
|
|
3639
3695
|
onGrant() {
|
|
@@ -3650,7 +3706,7 @@ var yi = ["aria-label"], bi = {
|
|
|
3650
3706
|
return;
|
|
3651
3707
|
}
|
|
3652
3708
|
if (E.value && d.value && m.value) {
|
|
3653
|
-
e.muted = !0, e.loop = !0, e.playsInline = !0,
|
|
3709
|
+
e.muted = !0, e.loop = !0, e.playsInline = !0, hn(e);
|
|
3654
3710
|
return;
|
|
3655
3711
|
}
|
|
3656
3712
|
try {
|
|
@@ -3671,7 +3727,7 @@ var yi = ["aria-label"], bi = {
|
|
|
3671
3727
|
d.value = !0;
|
|
3672
3728
|
return;
|
|
3673
3729
|
}
|
|
3674
|
-
d.value =
|
|
3730
|
+
d.value = fi(e?.boundingClientRect ?? t.getBoundingClientRect(), e?.rootBounds ?? b.value?.getBoundingClientRect() ?? null);
|
|
3675
3731
|
}
|
|
3676
3732
|
function ie(e) {
|
|
3677
3733
|
if (!e) return;
|
|
@@ -3691,10 +3747,10 @@ var yi = ["aria-label"], bi = {
|
|
|
3691
3747
|
}), g.value = null, m.value = !1, T.value = !1, J(), K();
|
|
3692
3748
|
}
|
|
3693
3749
|
function se() {
|
|
3694
|
-
|
|
3750
|
+
ui(_.value);
|
|
3695
3751
|
}
|
|
3696
3752
|
function ce() {
|
|
3697
|
-
|
|
3753
|
+
di(C.value);
|
|
3698
3754
|
}
|
|
3699
3755
|
function ue() {
|
|
3700
3756
|
let e = y.value;
|
|
@@ -3708,8 +3764,8 @@ var yi = ["aria-label"], bi = {
|
|
|
3708
3764
|
return Math.abs((t.top + t.bottom) / 2 - n);
|
|
3709
3765
|
}
|
|
3710
3766
|
function X(e) {
|
|
3711
|
-
let t =
|
|
3712
|
-
return !e || !t ? !1 :
|
|
3767
|
+
let t = pi(E.value);
|
|
3768
|
+
return !e || !t ? !1 : pi("currentSrc" in e && e.currentSrc || e.getAttribute("src")) === t;
|
|
3713
3769
|
}
|
|
3714
3770
|
function de() {
|
|
3715
3771
|
r("open");
|
|
@@ -3737,8 +3793,8 @@ var yi = ["aria-label"], bi = {
|
|
|
3737
3793
|
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
3794
|
"aria-label": n.item.title || `Open item ${n.index + 1}`,
|
|
3739
3795
|
onClick: de
|
|
3740
|
-
}, null, 8,
|
|
3741
|
-
B.value ? (w(), s("div",
|
|
3796
|
+
}, null, 8, wi),
|
|
3797
|
+
B.value ? (w(), s("div", Ti, [c("span", Ei, [u(N(oe), {
|
|
3742
3798
|
class: "h-5 w-5 animate-spin stroke-[1.9] text-[#f7f1ea]/78",
|
|
3743
3799
|
"aria-hidden": "true"
|
|
3744
3800
|
})])])) : o("", !0),
|
|
@@ -3752,7 +3808,7 @@ var yi = ["aria-label"], bi = {
|
|
|
3752
3808
|
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
3809
|
onLoad: U,
|
|
3754
3810
|
onError: W
|
|
3755
|
-
}, null, 42,
|
|
3811
|
+
}, null, 42, Di)) : P.value && E.value && !R.value ? (w(), s("video", {
|
|
3756
3812
|
key: 2,
|
|
3757
3813
|
ref_key: "videoRef",
|
|
3758
3814
|
ref: C,
|
|
@@ -3768,31 +3824,31 @@ var yi = ["aria-label"], bi = {
|
|
|
3768
3824
|
onPlaying: ne,
|
|
3769
3825
|
onStalled: G,
|
|
3770
3826
|
onWaiting: G
|
|
3771
|
-
}, null, 42,
|
|
3827
|
+
}, null, 42, Oi)) : R.value ? (w(), s("div", {
|
|
3772
3828
|
key: 3,
|
|
3773
3829
|
"data-testid": "vibe-list-card-error",
|
|
3774
3830
|
"data-kind": I.value,
|
|
3775
3831
|
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",
|
|
3832
|
+
}, [c("div", Ai, [
|
|
3777
3833
|
u(N(le), {
|
|
3778
3834
|
class: "h-6 w-6 stroke-[1.8] text-[#f7f1ea]/78",
|
|
3779
3835
|
"aria-hidden": "true"
|
|
3780
3836
|
}),
|
|
3781
|
-
c("span",
|
|
3837
|
+
c("span", ji, j(N(ln)(I.value)), 1),
|
|
3782
3838
|
z.value ? (w(), s("button", {
|
|
3783
3839
|
key: 0,
|
|
3784
3840
|
type: "button",
|
|
3785
3841
|
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
3842
|
onClick: ee(ae, ["stop"])
|
|
3787
3843
|
}, " Retry ")) : o("", !0)
|
|
3788
|
-
])], 8,
|
|
3789
|
-
icon: N(
|
|
3844
|
+
])], 8, ki)) : (w(), s("div", Mi, [c("div", Ni, [k(e.$slots, "item-icon", {
|
|
3845
|
+
icon: N(Nt)(n.item.type),
|
|
3790
3846
|
item: n.item
|
|
3791
|
-
}, () => [(w(), a(A(N(
|
|
3847
|
+
}, () => [(w(), a(A(N(Nt)(n.item.type)), {
|
|
3792
3848
|
class: "h-6 w-6 stroke-[1.8] text-[#f7f1ea]/78",
|
|
3793
3849
|
"aria-hidden": "true"
|
|
3794
3850
|
}))])])])),
|
|
3795
|
-
c("div",
|
|
3851
|
+
c("div", Pi, [k(e.$slots, "grid-item-overlay", {
|
|
3796
3852
|
active: n.active,
|
|
3797
3853
|
focused: f.value,
|
|
3798
3854
|
hovered: p.value,
|
|
@@ -3802,24 +3858,24 @@ var yi = ["aria-label"], bi = {
|
|
|
3802
3858
|
})])
|
|
3803
3859
|
], 34));
|
|
3804
3860
|
}
|
|
3805
|
-
}),
|
|
3861
|
+
}), 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
3862
|
"data-testid": "vibe-pagination",
|
|
3807
3863
|
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
|
-
},
|
|
3864
|
+
}, zi = { class: "whitespace-nowrap" }, Bi = {
|
|
3809
3865
|
key: 0,
|
|
3810
3866
|
class: "whitespace-nowrap border-l border-white/12 pl-2 text-[#f7f1ea]/56 min-[721px]:pl-3"
|
|
3811
|
-
},
|
|
3867
|
+
}, Vi = [
|
|
3812
3868
|
"data-active",
|
|
3813
3869
|
"data-index",
|
|
3814
3870
|
"data-item-id",
|
|
3815
3871
|
"data-occurrence-key"
|
|
3816
|
-
],
|
|
3872
|
+
], Hi = ["data-item-id"], Ui = {
|
|
3817
3873
|
key: 0,
|
|
3818
3874
|
class: "pointer-events-none absolute inset-y-0 right-0 z-[3] hidden w-8 min-[1024px]:block"
|
|
3819
|
-
},
|
|
3875
|
+
}, Wi = {
|
|
3820
3876
|
key: 1,
|
|
3821
3877
|
class: "pointer-events-none absolute inset-x-0 bottom-0 z-[2] px-5 pb-5 sm:px-6"
|
|
3822
|
-
},
|
|
3878
|
+
}, Gi = { class: "mx-auto flex w-full justify-center" }, Ki = /* @__PURE__ */ d({
|
|
3823
3879
|
__name: "ListSurface",
|
|
3824
3880
|
props: {
|
|
3825
3881
|
active: {
|
|
@@ -3880,7 +3936,7 @@ var yi = ["aria-label"], bi = {
|
|
|
3880
3936
|
"update:activeIndex"
|
|
3881
3937
|
],
|
|
3882
3938
|
setup(e, { emit: n }) {
|
|
3883
|
-
let r = e, d = F(), f = n, p =
|
|
3939
|
+
let r = e, d = F(), f = n, p = oi({
|
|
3884
3940
|
active: M(r, "active"),
|
|
3885
3941
|
allowExhaustedNextPageRefresh: M(r, "allowExhaustedNextPageRefresh"),
|
|
3886
3942
|
items: M(r, "items"),
|
|
@@ -3896,11 +3952,11 @@ var yi = ["aria-label"], bi = {
|
|
|
3896
3952
|
setActiveIndex(e) {
|
|
3897
3953
|
f("update:activeIndex", e);
|
|
3898
3954
|
}
|
|
3899
|
-
}), m = i(() =>
|
|
3955
|
+
}), m = i(() => $t({
|
|
3900
3956
|
itemCount: r.items.length,
|
|
3901
3957
|
loading: r.loading,
|
|
3902
3958
|
phase: r.phase
|
|
3903
|
-
})), h = i(() =>
|
|
3959
|
+
})), h = i(() => en({
|
|
3904
3960
|
errorMessage: r.errorMessage,
|
|
3905
3961
|
hasItems: r.items.length > 0,
|
|
3906
3962
|
hasNextPage: r.hasNextPage,
|
|
@@ -3913,7 +3969,7 @@ var yi = ["aria-label"], bi = {
|
|
|
3913
3969
|
message: h.value.message,
|
|
3914
3970
|
paginationDetail: r.paginationDetail,
|
|
3915
3971
|
total: r.items.length
|
|
3916
|
-
}), x = i(() => !_.value || !d["grid-status"] ? [] : d["grid-status"](_.value)), S = i(() =>
|
|
3972
|
+
}), 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
3973
|
emptyStateMode: M(r, "emptyStateMode"),
|
|
3918
3974
|
itemCount: C,
|
|
3919
3975
|
loading: M(r, "loading"),
|
|
@@ -3925,8 +3981,8 @@ var yi = ["aria-label"], bi = {
|
|
|
3925
3981
|
nextBoundaryLoadProgress: e,
|
|
3926
3982
|
previousBoundaryLoadProgress: t
|
|
3927
3983
|
});
|
|
3928
|
-
}, { immediate: !0 }), (e, n) => (w(), s("div",
|
|
3929
|
-
c("div",
|
|
3984
|
+
}, { immediate: !0 }), (e, n) => (w(), s("div", Ii, [
|
|
3985
|
+
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
3986
|
c("div", {
|
|
3931
3987
|
ref: N(p).scrollViewportRef,
|
|
3932
3988
|
"data-testid": "vibe-list-scroll",
|
|
@@ -3947,7 +4003,7 @@ var yi = ["aria-label"], bi = {
|
|
|
3947
4003
|
"data-occurrence-key": N($)(t),
|
|
3948
4004
|
class: "absolute will-change-transform",
|
|
3949
4005
|
style: b(N(p).getCardStyle(n))
|
|
3950
|
-
}, [u(
|
|
4006
|
+
}, [u(Fi, {
|
|
3951
4007
|
active: n === N(p).resolvedActiveIndex.value,
|
|
3952
4008
|
index: n,
|
|
3953
4009
|
item: t,
|
|
@@ -3971,14 +4027,14 @@ var yi = ["aria-label"], bi = {
|
|
|
3971
4027
|
"report-asset-load",
|
|
3972
4028
|
"surface-active",
|
|
3973
4029
|
"onOpen"
|
|
3974
|
-
])], 12,
|
|
4030
|
+
])], 12, Vi))), 128)),
|
|
3975
4031
|
(w(!0), s(t, null, O(N(p).leavingItems.value, (t) => (w(), s("article", {
|
|
3976
4032
|
key: `leaving-${N($)(t.item)}`,
|
|
3977
4033
|
"data-testid": "vibe-list-card-leaving",
|
|
3978
4034
|
"data-item-id": t.item.id,
|
|
3979
4035
|
class: "pointer-events-none absolute z-[2] will-change-[opacity,transform]",
|
|
3980
4036
|
style: b(N(p).getLeavingCardStyle(t.item))
|
|
3981
|
-
}, [u(
|
|
4037
|
+
}, [u(Fi, {
|
|
3982
4038
|
active: !1,
|
|
3983
4039
|
index: -1,
|
|
3984
4040
|
item: t.item,
|
|
@@ -3993,8 +4049,8 @@ var yi = ["aria-label"], bi = {
|
|
|
3993
4049
|
"item",
|
|
3994
4050
|
"report-asset-error",
|
|
3995
4051
|
"report-asset-load"
|
|
3996
|
-
])], 12,
|
|
3997
|
-
N(A) && N(T) ? (w(), a(
|
|
4052
|
+
])], 12, Hi))), 128)),
|
|
4053
|
+
N(A) && N(T) ? (w(), a(Pn, {
|
|
3998
4054
|
key: 0,
|
|
3999
4055
|
message: N(T).message,
|
|
4000
4056
|
mode: N(T).mode,
|
|
@@ -4008,12 +4064,12 @@ var yi = ["aria-label"], bi = {
|
|
|
4008
4064
|
"surface"
|
|
4009
4065
|
])) : o("", !0)
|
|
4010
4066
|
], 4)], 544),
|
|
4011
|
-
N(p).showScrollbar.value ? (w(), s("div",
|
|
4067
|
+
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
4068
|
"data-testid": "vibe-list-scrollbar-thumb",
|
|
4013
4069
|
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
4070
|
style: b(N(p).getScrollbarThumbStyle())
|
|
4015
4071
|
}, null, 6)])) : o("", !0),
|
|
4016
|
-
d["grid-footer"] ? (w(), s("div",
|
|
4072
|
+
d["grid-footer"] ? (w(), s("div", Wi, [c("div", Gi, [k(e.$slots, "grid-footer")])])) : o("", !0),
|
|
4017
4073
|
_.value ? (w(), s("div", {
|
|
4018
4074
|
key: 2,
|
|
4019
4075
|
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 +4078,7 @@ var yi = ["aria-label"], bi = {
|
|
|
4022
4078
|
"data-testid": "vibe-grid-status-badge",
|
|
4023
4079
|
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
4080
|
}, j(_.value.message), 3))], 2)) : o("", !0),
|
|
4025
|
-
N(E) && N(T) ? (w(), a(
|
|
4081
|
+
N(E) && N(T) ? (w(), a(Pn, {
|
|
4026
4082
|
key: 3,
|
|
4027
4083
|
class: v(["z-[3]", d["grid-footer"] ? "pb-24" : "pb-6"]),
|
|
4028
4084
|
message: N(T).message,
|
|
@@ -4039,13 +4095,13 @@ var yi = ["aria-label"], bi = {
|
|
|
4039
4095
|
])) : o("", !0)
|
|
4040
4096
|
]));
|
|
4041
4097
|
}
|
|
4042
|
-
}),
|
|
4098
|
+
}), qi = ["data-surface-mode"], Ji = {
|
|
4043
4099
|
key: 1,
|
|
4044
4100
|
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
|
-
},
|
|
4101
|
+
}, Yi = ["data-visible", "inert"], Xi = ["data-visible", "inert"], Zi = {
|
|
4046
4102
|
key: 3,
|
|
4047
4103
|
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
|
-
},
|
|
4104
|
+
}, Qi = /* @__PURE__ */ d({
|
|
4049
4105
|
name: "VibeLayout",
|
|
4050
4106
|
__name: "Layout",
|
|
4051
4107
|
props: {
|
|
@@ -4070,7 +4126,7 @@ var yi = ["aria-label"], bi = {
|
|
|
4070
4126
|
"update:surfaceMode"
|
|
4071
4127
|
],
|
|
4072
4128
|
setup(e, { expose: n, emit: i }) {
|
|
4073
|
-
let d = e, f = F(), m = i, h =
|
|
4129
|
+
let d = e, f = F(), m = i, h = rt(d, m), g = fe((e) => {
|
|
4074
4130
|
m("asset-errors", e);
|
|
4075
4131
|
}), _ = Z((e) => {
|
|
4076
4132
|
m("asset-loads", e);
|
|
@@ -4101,7 +4157,7 @@ var yi = ["aria-label"], bi = {
|
|
|
4101
4157
|
type: "button",
|
|
4102
4158
|
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
4159
|
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",
|
|
4160
|
+
}, " 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
4161
|
appear: "",
|
|
4106
4162
|
"enter-active-class": "transition-[opacity,transform] duration-300 ease-out",
|
|
4107
4163
|
"enter-from-class": "translate-y-3 opacity-0",
|
|
@@ -4115,7 +4171,7 @@ var yi = ["aria-label"], bi = {
|
|
|
4115
4171
|
"data-visible": N(h).surfaceMode.value === "list" ? "true" : "false",
|
|
4116
4172
|
inert: N(h).surfaceMode.value !== "list",
|
|
4117
4173
|
class: "absolute inset-0 z-[2]"
|
|
4118
|
-
}, [u(
|
|
4174
|
+
}, [u(Ki, {
|
|
4119
4175
|
active: N(h).surfaceMode.value === "list",
|
|
4120
4176
|
"allow-exhausted-next-page-refresh": N(h).canRefreshExhaustedNextPage.value,
|
|
4121
4177
|
items: N(h).items.value,
|
|
@@ -4185,7 +4241,7 @@ var yi = ["aria-label"], bi = {
|
|
|
4185
4241
|
"onBoundaryLoadProgress",
|
|
4186
4242
|
"onOpenFullscreen",
|
|
4187
4243
|
"onUpdate:activeIndex"
|
|
4188
|
-
])], 8,
|
|
4244
|
+
])], 8, Yi), [[I, N(h).surfaceMode.value === "list"]])]),
|
|
4189
4245
|
_: 3
|
|
4190
4246
|
}), u(r, {
|
|
4191
4247
|
appear: "",
|
|
@@ -4201,7 +4257,7 @@ var yi = ["aria-label"], bi = {
|
|
|
4201
4257
|
"data-visible": N(h).surfaceMode.value === "fullscreen" ? "true" : "false",
|
|
4202
4258
|
inert: N(h).surfaceMode.value !== "fullscreen",
|
|
4203
4259
|
class: "absolute inset-0 z-[3]"
|
|
4204
|
-
}, [u(
|
|
4260
|
+
}, [u(gr, {
|
|
4205
4261
|
items: N(h).items.value,
|
|
4206
4262
|
active: N(h).surfaceMode.value === "fullscreen",
|
|
4207
4263
|
"active-index": N(h).activeIndex.value,
|
|
@@ -4270,12 +4326,12 @@ var yi = ["aria-label"], bi = {
|
|
|
4270
4326
|
"show-back-to-list",
|
|
4271
4327
|
"onBackToList",
|
|
4272
4328
|
"onUpdate:activeIndex"
|
|
4273
|
-
])], 8,
|
|
4329
|
+
])], 8, Xi), [[I, N(h).surfaceMode.value === "fullscreen"]])]),
|
|
4274
4330
|
_: 3
|
|
4275
|
-
})], 64)) : N(h).items.value.length === 0 && N(h).loading.value ? (w(), s("div",
|
|
4331
|
+
})], 64)) : N(h).items.value.length === 0 && N(h).loading.value ? (w(), s("div", Zi, [u(N(oe), {
|
|
4276
4332
|
class: "size-10 animate-spin text-[#f7f1ea]/82",
|
|
4277
4333
|
"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(
|
|
4334
|
+
}), 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
4335
|
key: 4,
|
|
4280
4336
|
items: N(h).items.value,
|
|
4281
4337
|
active: !0,
|
|
@@ -4343,10 +4399,10 @@ var yi = ["aria-label"], bi = {
|
|
|
4343
4399
|
"show-status-badges",
|
|
4344
4400
|
"onBackToList",
|
|
4345
4401
|
"onUpdate:activeIndex"
|
|
4346
|
-
]))], 8,
|
|
4402
|
+
]))], 8, qi));
|
|
4347
4403
|
}
|
|
4348
|
-
}),
|
|
4349
|
-
e.component("VibeLayout",
|
|
4404
|
+
}), $i = { install(e) {
|
|
4405
|
+
e.component("VibeLayout", Qi);
|
|
4350
4406
|
} };
|
|
4351
4407
|
//#endregion
|
|
4352
|
-
export {
|
|
4408
|
+
export { Qi as VibeLayout, $i as VibePlugin, $i as default };
|