@wyxos/vibe 3.1.34 → 3.1.35
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/README.md +2 -1
- package/lib/components/viewer-core/autoResolveFillUntil.d.ts +1 -0
- package/lib/components/viewer-core/fillDelay.d.ts +2 -1
- package/lib/components/viewer-core/useAutoResolveSource.d.ts +2 -1
- package/lib/components/viewer-core/useDataSource.d.ts +1 -0
- package/lib/index.cjs +1 -1
- package/lib/index.js +978 -969
- package/package.json +1 -1
package/lib/index.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { Comment as e, Fragment as t, Text as n, Transition as r, computed as i, createBlock as a, createCommentVNode as o, createElementBlock as s, createElementVNode as c, createSlots as l, createVNode as u, defineComponent as d, getCurrentScope as f, guardReactiveProps as p, h as m, isVNode as h, mergeProps as g, nextTick as _, normalizeClass as v, normalizeProps as y, normalizeStyle as b, onBeforeUnmount as x, onMounted as S, onScopeDispose as C, openBlock as w, reactive as T, readonly as E, ref as D, renderList as O, renderSlot as k, resolveDynamicComponent as
|
|
1
|
+
import { Comment as e, Fragment as t, Text as n, Transition as r, computed as i, createBlock as a, createCommentVNode as o, createElementBlock as s, createElementVNode as c, createSlots as l, createVNode as u, defineComponent as d, getCurrentScope as f, guardReactiveProps as p, h as m, isVNode as h, mergeProps as g, nextTick as _, normalizeClass as v, normalizeProps as y, normalizeStyle as b, onBeforeUnmount as x, onMounted as S, onScopeDispose as C, openBlock as w, reactive as T, readonly as E, ref as D, renderList as O, renderSlot as k, resolveDynamicComponent as ee, shallowRef as A, toDisplayString as j, toRef as M, triggerRef as N, unref as P, useAttrs as F, useSlots as I, vShow as L, watch as R, watchEffect as te, withCtx as z, withDirectives as B, withModifiers as V } from "vue";
|
|
2
2
|
//#region node_modules/lucide-vue-next/dist/esm/shared/src/utils/hasA11yProp.js
|
|
3
|
-
var
|
|
3
|
+
var H = (e) => {
|
|
4
4
|
for (let t in e) if (t.startsWith("aria-") || t === "role" || t === "title") return !0;
|
|
5
5
|
return !1;
|
|
6
|
-
},
|
|
6
|
+
}, U = (e) => e === "", W = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e) === t).join(" ").trim(), ne = (e) => e.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase(), G = (e) => e.replace(/^([A-Z])|[\s-_]+(\w)/g, (e, t, n) => n ? n.toUpperCase() : t.toLowerCase()), K = (e) => {
|
|
7
7
|
let t = G(e);
|
|
8
8
|
return t.charAt(0).toUpperCase() + t.slice(1);
|
|
9
9
|
}, q = {
|
|
@@ -22,9 +22,9 @@ var U = (e) => {
|
|
|
22
22
|
width: o,
|
|
23
23
|
height: o,
|
|
24
24
|
stroke: s,
|
|
25
|
-
"stroke-width":
|
|
25
|
+
"stroke-width": U(n) || U(r) || n === !0 || r === !0 ? Number(i || a || q["stroke-width"]) * 24 / Number(o) : i || a || q["stroke-width"],
|
|
26
26
|
class: W("lucide", c.class, ...e ? [`lucide-${ne(K(e))}-icon`, `lucide-${ne(e)}`] : ["lucide-icon"]),
|
|
27
|
-
...!l.default && !
|
|
27
|
+
...!l.default && !H(c) && { "aria-hidden": "true" }
|
|
28
28
|
}, [...t.map((e) => m(...e)), ...l.default ? [l.default()] : []]), J = (e, t) => (n, { slots: r, attrs: i }) => m(re, {
|
|
29
29
|
...i,
|
|
30
30
|
...n,
|
|
@@ -250,15 +250,15 @@ function Se(e, t, n) {
|
|
|
250
250
|
}
|
|
251
251
|
//#endregion
|
|
252
252
|
//#region src/components/viewer-core/itemIdentity.ts
|
|
253
|
-
var
|
|
254
|
-
function
|
|
255
|
-
let t = e[
|
|
253
|
+
var Ce = "__vibeOccurrenceKey";
|
|
254
|
+
function Q(e) {
|
|
255
|
+
let t = e[Ce];
|
|
256
256
|
return typeof t == "string" && t.length > 0 ? t : e.id;
|
|
257
257
|
}
|
|
258
|
-
function
|
|
258
|
+
function $(e, t, n) {
|
|
259
259
|
let r = /* @__PURE__ */ new Map(), i = [], a = n;
|
|
260
260
|
for (let e of t) {
|
|
261
|
-
let t = r.get(e.id), n =
|
|
261
|
+
let t = r.get(e.id), n = Q(e);
|
|
262
262
|
t ? t.push(n) : r.set(e.id, [n]);
|
|
263
263
|
}
|
|
264
264
|
for (let t of e) {
|
|
@@ -271,9 +271,9 @@ function Ce(e, t, n) {
|
|
|
271
271
|
};
|
|
272
272
|
}
|
|
273
273
|
function we(e, t) {
|
|
274
|
-
return
|
|
274
|
+
return Q(e) === t ? e : {
|
|
275
275
|
...e,
|
|
276
|
-
[
|
|
276
|
+
[Ce]: t
|
|
277
277
|
};
|
|
278
278
|
}
|
|
279
279
|
//#endregion
|
|
@@ -352,7 +352,7 @@ function Me(e, t, n) {
|
|
|
352
352
|
return i >= 0 && r.splice(i, 1, n), r;
|
|
353
353
|
}
|
|
354
354
|
function Ne(e, t, n) {
|
|
355
|
-
let r =
|
|
355
|
+
let r = $(e, t, n);
|
|
356
356
|
return {
|
|
357
357
|
items: r.items,
|
|
358
358
|
nextSequence: r.nextSequence
|
|
@@ -367,7 +367,7 @@ function Pe(e, t, n) {
|
|
|
367
367
|
for (let [e, n] of t.entries()) {
|
|
368
368
|
let t = r.get(n.id), i = {
|
|
369
369
|
index: e,
|
|
370
|
-
occurrenceKey:
|
|
370
|
+
occurrenceKey: Q(n)
|
|
371
371
|
};
|
|
372
372
|
t ? t.push(i) : r.set(n.id, [i]);
|
|
373
373
|
}
|
|
@@ -391,7 +391,7 @@ function Pe(e, t, n) {
|
|
|
391
391
|
};
|
|
392
392
|
}
|
|
393
393
|
function Fe(e, t) {
|
|
394
|
-
return
|
|
394
|
+
return Q(e) === t ? e : {
|
|
395
395
|
...e,
|
|
396
396
|
__vibeOccurrenceKey: t
|
|
397
397
|
};
|
|
@@ -459,11 +459,11 @@ function Be(e) {
|
|
|
459
459
|
}
|
|
460
460
|
function Ve(e, t) {
|
|
461
461
|
let n = e[Se(t, 0, Math.max(0, e.length - 1))];
|
|
462
|
-
return n ?
|
|
462
|
+
return n ? Q(n) : null;
|
|
463
463
|
}
|
|
464
464
|
function He(e, t, n = null) {
|
|
465
465
|
if (!e.length) return 0;
|
|
466
|
-
let r = n ? e.findIndex((e) =>
|
|
466
|
+
let r = n ? e.findIndex((e) => Q(e) === n) : -1;
|
|
467
467
|
return r >= 0 ? r : Se(t, 0, e.length - 1);
|
|
468
468
|
}
|
|
469
469
|
function Ue(e, t, n) {
|
|
@@ -547,7 +547,7 @@ function Qe(e) {
|
|
|
547
547
|
await a("cursor", () => e.getHasNextPage() && e.getNextCursor() !== t);
|
|
548
548
|
}
|
|
549
549
|
async function n() {
|
|
550
|
-
await a("end", () => e.getHasNextPage());
|
|
550
|
+
e.getHasNextPage() || await e.refreshTrailingBoundaryBeforeEnd(), await a("end", () => e.getHasNextPage());
|
|
551
551
|
}
|
|
552
552
|
function r() {
|
|
553
553
|
e.isFillUntilActive.value = !1, e.fillMode.value = "idle";
|
|
@@ -800,13 +800,17 @@ function it(e) {
|
|
|
800
800
|
//#endregion
|
|
801
801
|
//#region src/components/viewer-core/fillDelay.ts
|
|
802
802
|
var at = 2e3, ot = 1e3, st = 100;
|
|
803
|
-
function ct(e, t = at, n = ot) {
|
|
804
|
-
|
|
803
|
+
function ct(e, t = at, n = ot, r) {
|
|
804
|
+
let i = t + Math.max(0, e - 1) * n;
|
|
805
|
+
return !Number.isFinite(r) || r == null || r < 0 ? i : Math.min(i, Math.floor(r));
|
|
805
806
|
}
|
|
806
807
|
function lt(e, t) {
|
|
807
808
|
return !Number.isFinite(e) || e == null || e < 0 ? t : Math.floor(e);
|
|
808
809
|
}
|
|
809
|
-
function ut() {
|
|
810
|
+
function ut(e) {
|
|
811
|
+
if (!(!Number.isFinite(e) || e == null || e < 0)) return Math.floor(e);
|
|
812
|
+
}
|
|
813
|
+
function dt() {
|
|
810
814
|
let e = D(null), t = null, n = null, r = null;
|
|
811
815
|
function i(i = !1) {
|
|
812
816
|
if (t &&= (clearInterval(t), null), n &&= (clearTimeout(n), null), e.value = null, i && r) {
|
|
@@ -835,13 +839,13 @@ function ut() {
|
|
|
835
839
|
}
|
|
836
840
|
//#endregion
|
|
837
841
|
//#region src/components/viewer-core/useAutoResolveSource.ts
|
|
838
|
-
function
|
|
839
|
-
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 =
|
|
842
|
+
function ft(e) {
|
|
843
|
+
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 = dt(), f = d.remainingMs, p = D(null), m = D(!1), h = D(!0), g = D(!1), _ = D(!1), v = /* @__PURE__ */ new Set(), y = null, b = null, C = 0, w = 0, T = We({
|
|
840
844
|
getSequence: () => w,
|
|
841
845
|
setSequence: (e) => {
|
|
842
846
|
w = e;
|
|
843
847
|
}
|
|
844
|
-
}), E = i(() => lt(e.fillDelayMs, at)),
|
|
848
|
+
}), E = i(() => ut(e.fillDelayMaxMs)), O = i(() => lt(e.fillDelayMs, at)), k = i(() => lt(e.fillDelayStepMs, ot)), ee = i(() => typeof e.resolve == "function"), A = i(() => Z(e.pageSize)), j = i(() => De(n.value)), M = rt(() => j.value.length), N = i(() => Oe(j.value, e.removedIds.value)), P = i(() => r.value), F = i(() => be(c.value) || m.value), I = i(() => Ge(n.value, e.removedIds.value)), L = i(() => Ke(n.value, e.removedIds.value)), te = i(() => L.value?.nextCursor ?? null), z = i(() => o.value ? null : I.value?.previousCursor ?? null), B = i(() => !!te.value && L.value?.nextCursorExhausted !== !0), V = i(() => !!z.value), H = i(() => _.value || g.value), U = i(() => ee.value && !!L.value?.items.length), W = i(() => Oe(De(a.value), e.removedIds.value)), ne = i(() => je(n.value, e.removedIds.value, P.value)), G = i(() => !N.value.length && !F.value && !!s.value), K = Qe({
|
|
845
849
|
autoBuckets: n,
|
|
846
850
|
clearActiveResolveController(e) {
|
|
847
851
|
y === e && (y = null);
|
|
@@ -853,13 +857,13 @@ function dt(e) {
|
|
|
853
857
|
fillCursor: u,
|
|
854
858
|
fillTargetCount: p,
|
|
855
859
|
...M.refs,
|
|
856
|
-
finishLoadPhase:
|
|
857
|
-
getFillDelayMs: (e) => ct(e,
|
|
860
|
+
finishLoadPhase: $,
|
|
861
|
+
getFillDelayMs: (e) => ct(e, O.value, k.value, E.value),
|
|
858
862
|
getHasNextPage: () => B.value,
|
|
859
863
|
getIsLoading: () => F.value,
|
|
860
864
|
getIsManualPageLoadingLocked: () => _.value,
|
|
861
865
|
getLoadedItemCount: () => j.value.length,
|
|
862
|
-
getNextCursor: () =>
|
|
866
|
+
getNextCursor: () => te.value,
|
|
863
867
|
getOperationIsCurrent: (e) => e === C,
|
|
864
868
|
getPageSize: () => A.value,
|
|
865
869
|
getResolve: () => e.resolve,
|
|
@@ -871,6 +875,9 @@ function dt(e) {
|
|
|
871
875
|
nextOperationId: () => ++C,
|
|
872
876
|
operationPhase: c,
|
|
873
877
|
pendingAppendBuckets: a,
|
|
878
|
+
refreshTrailingBoundaryBeforeEnd: async () => {
|
|
879
|
+
U.value && (await Y(), await se());
|
|
880
|
+
},
|
|
874
881
|
setActiveResolveController: (e) => {
|
|
875
882
|
y = e;
|
|
876
883
|
},
|
|
@@ -878,31 +885,31 @@ function dt(e) {
|
|
|
878
885
|
b = e;
|
|
879
886
|
},
|
|
880
887
|
waitFillDelay: (e) => d.wait(e)
|
|
881
|
-
}),
|
|
888
|
+
}), q = it({
|
|
882
889
|
canRefreshTrailingBoundary: U,
|
|
883
890
|
hasNextPage: B,
|
|
884
|
-
isInitialLoading:
|
|
891
|
+
isInitialLoading: Ee,
|
|
885
892
|
isPageLoadingLocked: H,
|
|
886
893
|
items: N,
|
|
887
894
|
loading: F,
|
|
888
|
-
prefetchNextPage:
|
|
895
|
+
prefetchNextPage: Y,
|
|
889
896
|
removedIds: e.removedIds,
|
|
890
897
|
trailingBoundaryBucket: L
|
|
891
|
-
}),
|
|
898
|
+
}), re = nt({
|
|
892
899
|
autoBuckets: n,
|
|
893
900
|
clearActiveResolveController(e) {
|
|
894
901
|
y === e && (y = null);
|
|
895
902
|
},
|
|
896
|
-
clearFillState:
|
|
903
|
+
clearFillState: we,
|
|
897
904
|
createBucket: T,
|
|
898
905
|
errorMessage: s,
|
|
899
906
|
fillCollectedCount: l,
|
|
900
907
|
fillCursor: u,
|
|
901
908
|
fillTargetCount: p,
|
|
902
|
-
finishLoadPhase:
|
|
903
|
-
getActiveOccurrenceKey:
|
|
909
|
+
finishLoadPhase: $,
|
|
910
|
+
getActiveOccurrenceKey: me,
|
|
904
911
|
getBoundaryBucket: (e) => e === "leading" ? I.value : L.value,
|
|
905
|
-
getFillDelayMs: (e) => ct(e,
|
|
912
|
+
getFillDelayMs: (e) => ct(e, O.value, k.value, E.value),
|
|
906
913
|
getOperationIsCurrent: (e) => e === C,
|
|
907
914
|
getPageSize: () => A.value,
|
|
908
915
|
getResolve: () => e.resolve,
|
|
@@ -918,121 +925,121 @@ function dt(e) {
|
|
|
918
925
|
setSequence: (e) => {
|
|
919
926
|
w = e;
|
|
920
927
|
},
|
|
921
|
-
syncActiveIndexAfterVisibilityChange:
|
|
928
|
+
syncActiveIndexAfterVisibilityChange: he,
|
|
922
929
|
waitFillDelay: (e) => d.wait(e)
|
|
923
930
|
});
|
|
924
|
-
|
|
931
|
+
R(() => N.value.length, (e) => {
|
|
925
932
|
if (e === 0) {
|
|
926
|
-
r.value = 0,
|
|
933
|
+
r.value = 0, q.schedule();
|
|
927
934
|
return;
|
|
928
935
|
}
|
|
929
|
-
|
|
930
|
-
}),
|
|
931
|
-
h.value &&
|
|
936
|
+
q.resetRefreshAttempt(), o.value &&= (Ae(), !1), r.value > e - 1 && (r.value = e - 1);
|
|
937
|
+
}), R(() => r.value, () => {
|
|
938
|
+
h.value && _e();
|
|
932
939
|
}), S(() => {
|
|
933
|
-
|
|
940
|
+
Te() || e.resolve && J();
|
|
934
941
|
}), x(() => {
|
|
935
942
|
y?.abort(), y = null, d.clear(!0);
|
|
936
943
|
});
|
|
937
|
-
async function
|
|
938
|
-
b =
|
|
939
|
-
let t = await
|
|
944
|
+
async function J() {
|
|
945
|
+
b = J;
|
|
946
|
+
let t = await Ce({
|
|
940
947
|
continueUntilFilled: !0,
|
|
941
948
|
cursor: e.initialCursor ?? null,
|
|
942
949
|
direction: "forward",
|
|
943
950
|
phase: "initializing"
|
|
944
951
|
});
|
|
945
|
-
t && (n.value = t.buckets, r.value = 0,
|
|
952
|
+
t && (n.value = t.buckets, r.value = 0, $());
|
|
946
953
|
}
|
|
947
|
-
async function
|
|
954
|
+
async function Y() {
|
|
948
955
|
if (H.value || F.value) return;
|
|
949
956
|
let e = !N.value.length, t = L.value, n = {
|
|
950
957
|
commitImmediately: e,
|
|
951
958
|
originCursor: t?.cursor ?? null
|
|
952
959
|
}, r = qe(t);
|
|
953
|
-
if (
|
|
960
|
+
if (ke("trailing")) {
|
|
954
961
|
if (!U.value) return;
|
|
955
|
-
let e = await
|
|
956
|
-
e?.followCursor && (e.itemsInserted === 0 ||
|
|
962
|
+
let e = await xe("trailing");
|
|
963
|
+
e?.followCursor && (e.itemsInserted === 0 || ke("trailing")) && await ve(e.followCursor, n);
|
|
957
964
|
return;
|
|
958
965
|
}
|
|
959
966
|
if (r) {
|
|
960
967
|
if (t?.cursor === r) {
|
|
961
|
-
let e = await
|
|
962
|
-
e?.followCursor && e.itemsInserted === 0 && await
|
|
968
|
+
let e = await xe("trailing");
|
|
969
|
+
e?.followCursor && e.itemsInserted === 0 && await ve(e.followCursor, n);
|
|
963
970
|
return;
|
|
964
971
|
}
|
|
965
|
-
await
|
|
972
|
+
await ve(r, n);
|
|
966
973
|
return;
|
|
967
974
|
}
|
|
968
975
|
if (!B.value) {
|
|
969
|
-
let e = U.value ? await
|
|
970
|
-
e?.followCursor && e.itemsInserted === 0 && await
|
|
976
|
+
let e = U.value ? await xe("trailing") : null;
|
|
977
|
+
e?.followCursor && e.itemsInserted === 0 && await ve(e.followCursor, n);
|
|
971
978
|
return;
|
|
972
979
|
}
|
|
973
|
-
await
|
|
980
|
+
await ve(te.value, n);
|
|
974
981
|
}
|
|
975
|
-
async function
|
|
982
|
+
async function ie() {
|
|
976
983
|
if (!(H.value || !V.value || F.value)) {
|
|
977
|
-
if (
|
|
978
|
-
let e = await
|
|
979
|
-
e?.itemsInserted === 0 && e.followCursor && await
|
|
984
|
+
if (ke("leading")) {
|
|
985
|
+
let e = await xe("leading");
|
|
986
|
+
e?.itemsInserted === 0 && e.followCursor && await ye(e.followCursor);
|
|
980
987
|
return;
|
|
981
988
|
}
|
|
982
|
-
await
|
|
989
|
+
await ye(z.value);
|
|
983
990
|
}
|
|
984
991
|
}
|
|
985
|
-
async function
|
|
986
|
-
if (
|
|
987
|
-
if (n.value = [], r.value = 0, a.value = [], o.value = !1, s.value = null, c.value =
|
|
988
|
-
|
|
992
|
+
async function ae() {
|
|
993
|
+
if (G.value) {
|
|
994
|
+
if (n.value = [], r.value = 0, a.value = [], o.value = !1, s.value = null, c.value = ee.value ? "initializing" : "idle", we(), M.reset(), m.value = !1, v.clear(), y?.abort(), y = null, d.clear(!0), Te()) {
|
|
995
|
+
$();
|
|
989
996
|
return;
|
|
990
997
|
}
|
|
991
|
-
await
|
|
998
|
+
await J();
|
|
992
999
|
}
|
|
993
1000
|
}
|
|
994
|
-
async function
|
|
995
|
-
if (
|
|
1001
|
+
async function oe() {
|
|
1002
|
+
if (G.value) return ae();
|
|
996
1003
|
H.value || c.value !== "failed" || !b || (s.value = null, await b());
|
|
997
1004
|
}
|
|
998
|
-
async function
|
|
999
|
-
if (!a.value.length) return m.value = !1,
|
|
1000
|
-
n.value = [...n.value, ...a.value], a.value = [], m.value = !1,
|
|
1005
|
+
async function se() {
|
|
1006
|
+
if (!a.value.length) return m.value = !1, $();
|
|
1007
|
+
n.value = [...n.value, ...a.value], a.value = [], m.value = !1, $();
|
|
1001
1008
|
}
|
|
1002
|
-
function
|
|
1009
|
+
function ce(t) {
|
|
1003
1010
|
let n = N.value;
|
|
1004
1011
|
if (!n.length) return;
|
|
1005
1012
|
let i = Se(t, 0, n.length - 1);
|
|
1006
1013
|
i !== r.value && (r.value = i, e.emit("update:activeIndex", i));
|
|
1007
1014
|
}
|
|
1008
|
-
function
|
|
1009
|
-
h.value = e,
|
|
1010
|
-
}
|
|
1011
|
-
function le() {
|
|
1012
|
-
_.value = !0, d.clear(!0);
|
|
1015
|
+
function le(e) {
|
|
1016
|
+
h.value = e, q.schedule();
|
|
1013
1017
|
}
|
|
1014
1018
|
function ue() {
|
|
1015
|
-
_.value = !
|
|
1019
|
+
_.value = !0, d.clear(!0);
|
|
1016
1020
|
}
|
|
1017
1021
|
function de() {
|
|
1018
|
-
|
|
1022
|
+
_.value = !1, q.schedule();
|
|
1019
1023
|
}
|
|
1020
1024
|
function fe() {
|
|
1021
|
-
|
|
1025
|
+
X(), s.value = null, we(), K.cancel(), a.value.length > 0 && (n.value = [...n.value, ...a.value], a.value = []), m.value = !1, o.value = !1, $();
|
|
1022
1026
|
}
|
|
1023
1027
|
function pe() {
|
|
1024
|
-
|
|
1028
|
+
g.value && (X(), we(), K.cancel(), m.value = !1, $());
|
|
1025
1029
|
}
|
|
1026
1030
|
function X() {
|
|
1031
|
+
C += 1, y?.abort(), y = null, d.clear(!0), v.clear();
|
|
1032
|
+
}
|
|
1033
|
+
function me() {
|
|
1027
1034
|
return Ve(N.value, P.value);
|
|
1028
1035
|
}
|
|
1029
|
-
function
|
|
1036
|
+
function he(e = null, t = {}) {
|
|
1030
1037
|
if (N.value.length === 0) {
|
|
1031
1038
|
r.value = 0, !t.preserveTrailingPlaceholder && n.value.length > 0 && (o.value = !0);
|
|
1032
1039
|
return;
|
|
1033
1040
|
}
|
|
1034
1041
|
if (e) {
|
|
1035
|
-
let t = N.value.findIndex((t) =>
|
|
1042
|
+
let t = N.value.findIndex((t) => Q(t) === e);
|
|
1036
1043
|
if (t >= 0) {
|
|
1037
1044
|
r.value = t;
|
|
1038
1045
|
return;
|
|
@@ -1044,64 +1051,64 @@ function dt(e) {
|
|
|
1044
1051
|
}
|
|
1045
1052
|
r.value = He(N.value, P.value, e);
|
|
1046
1053
|
}
|
|
1047
|
-
function
|
|
1048
|
-
a.value.length > 0 && (!
|
|
1054
|
+
function ge() {
|
|
1055
|
+
a.value.length > 0 && (!W.value.length || !N.value.length) && se();
|
|
1049
1056
|
}
|
|
1050
|
-
async function
|
|
1051
|
-
if (!(!h.value ||
|
|
1057
|
+
async function _e(e = !0) {
|
|
1058
|
+
if (!(!h.value || Ee())) {
|
|
1052
1059
|
if (!N.value.length) {
|
|
1053
|
-
(B.value || U.value) && await
|
|
1060
|
+
(B.value || U.value) && await Y();
|
|
1054
1061
|
return;
|
|
1055
1062
|
}
|
|
1056
|
-
V.value && r.value < 3 && await
|
|
1063
|
+
V.value && r.value < 3 && await ie(), (B.value || e && U.value) && r.value >= N.value.length - 3 && await Y();
|
|
1057
1064
|
}
|
|
1058
1065
|
}
|
|
1059
|
-
async function
|
|
1066
|
+
async function ve(e, t = {}) {
|
|
1060
1067
|
b = async () => {
|
|
1061
|
-
await
|
|
1068
|
+
await ve(e, t);
|
|
1062
1069
|
};
|
|
1063
|
-
let r = await
|
|
1070
|
+
let r = await Ce({
|
|
1064
1071
|
continueUntilFilled: !0,
|
|
1065
1072
|
cursor: e,
|
|
1066
1073
|
direction: "forward",
|
|
1067
1074
|
phase: "loading"
|
|
1068
1075
|
});
|
|
1069
1076
|
if (r) {
|
|
1070
|
-
if (!r.visibleCount) return n.value = Je(n.value, t.originCursor, e, !0), a.value = [], m.value = !1,
|
|
1071
|
-
if (r.canceled) return n.value = [...n.value, ...r.buckets], a.value = [], m.value = !1,
|
|
1072
|
-
if (a.value = r.buckets, t.commitImmediately || !N.value.length || !
|
|
1077
|
+
if (!r.visibleCount) return n.value = Je(n.value, t.originCursor, e, !0), a.value = [], m.value = !1, $();
|
|
1078
|
+
if (r.canceled) return n.value = [...n.value, ...r.buckets], a.value = [], m.value = !1, $();
|
|
1079
|
+
if (a.value = r.buckets, t.commitImmediately || !N.value.length || !W.value.length) return n.value = [...n.value, ...a.value], a.value = [], m.value = !1, $();
|
|
1073
1080
|
m.value = !0;
|
|
1074
1081
|
}
|
|
1075
1082
|
}
|
|
1076
|
-
async function
|
|
1083
|
+
async function ye(e) {
|
|
1077
1084
|
b = async () => {
|
|
1078
|
-
await
|
|
1085
|
+
await ye(e);
|
|
1079
1086
|
};
|
|
1080
|
-
let t = await
|
|
1087
|
+
let t = await Ce({
|
|
1081
1088
|
continueUntilFilled: !0,
|
|
1082
1089
|
cursor: e,
|
|
1083
1090
|
direction: "backward",
|
|
1084
1091
|
phase: "loading"
|
|
1085
1092
|
});
|
|
1086
1093
|
if (!t) return;
|
|
1087
|
-
let r =
|
|
1088
|
-
n.value = [...t.buckets, ...n.value],
|
|
1094
|
+
let r = me();
|
|
1095
|
+
n.value = [...t.buckets, ...n.value], he(r), $();
|
|
1089
1096
|
}
|
|
1090
|
-
async function
|
|
1097
|
+
async function xe(e) {
|
|
1091
1098
|
return b = async () => {
|
|
1092
|
-
await
|
|
1093
|
-
},
|
|
1099
|
+
await xe(e);
|
|
1100
|
+
}, re.reloadBoundaryBucket(e);
|
|
1094
1101
|
}
|
|
1095
|
-
function
|
|
1096
|
-
return
|
|
1102
|
+
function Ce(e) {
|
|
1103
|
+
return re.collectBuckets(e);
|
|
1097
1104
|
}
|
|
1098
|
-
function
|
|
1099
|
-
c.value = "idle",
|
|
1105
|
+
function $() {
|
|
1106
|
+
c.value = "idle", we(), d.clear(), q.schedule();
|
|
1100
1107
|
}
|
|
1101
|
-
function
|
|
1108
|
+
function we() {
|
|
1102
1109
|
l.value = null, u.value = null, p.value = null;
|
|
1103
1110
|
}
|
|
1104
|
-
function
|
|
1111
|
+
function Te() {
|
|
1105
1112
|
if (!e.initialState || !e.initialState.items.length) return !1;
|
|
1106
1113
|
let t = Be({
|
|
1107
1114
|
initialState: e.initialState,
|
|
@@ -1110,60 +1117,61 @@ function dt(e) {
|
|
|
1110
1117
|
});
|
|
1111
1118
|
return n.value = t.buckets, r.value = t.activeIndex, w = t.nextSequence, o.value = !1, s.value = null, a.value = [], m.value = !1, !0;
|
|
1112
1119
|
}
|
|
1113
|
-
function
|
|
1120
|
+
function Ee() {
|
|
1114
1121
|
return c.value === "initializing";
|
|
1115
1122
|
}
|
|
1116
|
-
function
|
|
1123
|
+
function ke(t) {
|
|
1117
1124
|
return Ue(t === "leading" ? I.value : L.value, e.removedIds.value, A.value);
|
|
1118
1125
|
}
|
|
1119
|
-
function
|
|
1126
|
+
function Ae() {
|
|
1120
1127
|
n.value = Ze(n.value, e.removedIds.value);
|
|
1121
1128
|
}
|
|
1122
1129
|
return {
|
|
1123
1130
|
activeIndex: P,
|
|
1124
|
-
canRetryInitialLoad:
|
|
1125
|
-
cancel:
|
|
1126
|
-
cancelFill:
|
|
1131
|
+
canRetryInitialLoad: G,
|
|
1132
|
+
cancel: fe,
|
|
1133
|
+
cancelFill: pe,
|
|
1127
1134
|
canRefreshTrailingBoundary: U,
|
|
1128
|
-
commitPendingAppend:
|
|
1129
|
-
currentCursor:
|
|
1135
|
+
commitPendingAppend: se,
|
|
1136
|
+
currentCursor: ne,
|
|
1130
1137
|
errorMessage: s,
|
|
1131
1138
|
fillCollectedCount: l,
|
|
1132
1139
|
fillCursor: u,
|
|
1133
1140
|
fillDelayRemainingMs: f,
|
|
1134
1141
|
fillTargetCount: p,
|
|
1135
1142
|
...M.refs,
|
|
1136
|
-
fillUntil:
|
|
1137
|
-
fillUntilEnd:
|
|
1143
|
+
fillUntil: K.fillUntil,
|
|
1144
|
+
fillUntilEnd: K.fillUntilEnd,
|
|
1138
1145
|
hasNextPage: B,
|
|
1139
1146
|
hasPreviousPage: V,
|
|
1140
1147
|
isAutoPrefetchEnabled: h,
|
|
1141
1148
|
isPageLoadingLocked: H,
|
|
1142
1149
|
items: N,
|
|
1143
|
-
lockPageLoading:
|
|
1150
|
+
lockPageLoading: ue,
|
|
1144
1151
|
loading: F,
|
|
1145
|
-
maybePrefetchAround:
|
|
1146
|
-
nextCursor:
|
|
1147
|
-
pendingAppendItems:
|
|
1152
|
+
maybePrefetchAround: _e,
|
|
1153
|
+
nextCursor: te,
|
|
1154
|
+
pendingAppendItems: W,
|
|
1148
1155
|
phase: c,
|
|
1149
|
-
prefetchNextPage:
|
|
1150
|
-
prefetchPreviousPage:
|
|
1151
|
-
previousCursor:
|
|
1152
|
-
retryInitialLoad:
|
|
1153
|
-
retry:
|
|
1154
|
-
setActiveIndex:
|
|
1155
|
-
setAutoPrefetchEnabled:
|
|
1156
|
-
syncActiveIndexAfterVisibilityChange:
|
|
1157
|
-
unlockPageLoading:
|
|
1158
|
-
getActiveOccurrenceKey:
|
|
1159
|
-
maybeCommitPendingAppendWhenFilteredOut:
|
|
1156
|
+
prefetchNextPage: Y,
|
|
1157
|
+
prefetchPreviousPage: ie,
|
|
1158
|
+
previousCursor: z,
|
|
1159
|
+
retryInitialLoad: ae,
|
|
1160
|
+
retry: oe,
|
|
1161
|
+
setActiveIndex: ce,
|
|
1162
|
+
setAutoPrefetchEnabled: le,
|
|
1163
|
+
syncActiveIndexAfterVisibilityChange: he,
|
|
1164
|
+
unlockPageLoading: de,
|
|
1165
|
+
getActiveOccurrenceKey: me,
|
|
1166
|
+
maybeCommitPendingAppendWhenFilteredOut: ge
|
|
1160
1167
|
};
|
|
1161
1168
|
}
|
|
1162
1169
|
//#endregion
|
|
1163
1170
|
//#region src/components/viewer-core/useDataSource.ts
|
|
1164
|
-
function
|
|
1165
|
-
let { clearRemoved: n, getRemovedIds: r, remove: a, removedIds: o, restore: s, undo: c } = Te(), l =
|
|
1171
|
+
function pt(e, t) {
|
|
1172
|
+
let { clearRemoved: n, getRemovedIds: r, remove: a, removedIds: o, restore: s, undo: c } = Te(), l = ft({
|
|
1166
1173
|
emit: t,
|
|
1174
|
+
fillDelayMaxMs: e.fillDelayMaxMs,
|
|
1167
1175
|
fillDelayMs: e.fillDelayMs,
|
|
1168
1176
|
fillDelayStepMs: e.fillDelayStepMs,
|
|
1169
1177
|
initialCursor: e.initialCursor,
|
|
@@ -1181,7 +1189,7 @@ function ft(e, t) {
|
|
|
1181
1189
|
return s.ids.length ? (l.maybeCommitPendingAppendWhenFilteredOut(), l.syncActiveIndexAfterVisibilityChange(t, { preserveTrailingPlaceholder: o }), i && x(), s) : s;
|
|
1182
1190
|
}
|
|
1183
1191
|
function x() {
|
|
1184
|
-
_().then(() => l.maybePrefetchAround());
|
|
1192
|
+
_().then(() => l.maybePrefetchAround(!1));
|
|
1185
1193
|
}
|
|
1186
1194
|
function S(e) {
|
|
1187
1195
|
let t = l.getActiveOccurrenceKey(), n = s(e);
|
|
@@ -1199,7 +1207,7 @@ function ft(e, t) {
|
|
|
1199
1207
|
return [...u.value];
|
|
1200
1208
|
}
|
|
1201
1209
|
function E(e) {
|
|
1202
|
-
return u.value.find((t) =>
|
|
1210
|
+
return u.value.find((t) => Q(t) === e) ?? null;
|
|
1203
1211
|
}
|
|
1204
1212
|
function D(e, t, n) {
|
|
1205
1213
|
return Math.min(Math.max(e, t), n);
|
|
@@ -1210,10 +1218,10 @@ function ft(e, t) {
|
|
|
1210
1218
|
async function k() {
|
|
1211
1219
|
await l.prefetchNextPage();
|
|
1212
1220
|
}
|
|
1213
|
-
async function
|
|
1221
|
+
async function ee() {
|
|
1214
1222
|
await l.prefetchPreviousPage();
|
|
1215
1223
|
}
|
|
1216
|
-
async function
|
|
1224
|
+
async function A() {
|
|
1217
1225
|
await l.retry();
|
|
1218
1226
|
}
|
|
1219
1227
|
return {
|
|
@@ -1248,7 +1256,7 @@ function ft(e, t) {
|
|
|
1248
1256
|
lockPageLoading: l.lockPageLoading,
|
|
1249
1257
|
loading: f,
|
|
1250
1258
|
loadNext: k,
|
|
1251
|
-
loadPrevious:
|
|
1259
|
+
loadPrevious: ee,
|
|
1252
1260
|
nextCursor: l.nextCursor,
|
|
1253
1261
|
paginationDetail: g,
|
|
1254
1262
|
pendingAppendItems: l.pendingAppendItems,
|
|
@@ -1259,7 +1267,7 @@ function ft(e, t) {
|
|
|
1259
1267
|
removedCount: h,
|
|
1260
1268
|
remove: b,
|
|
1261
1269
|
restore: S,
|
|
1262
|
-
retry:
|
|
1270
|
+
retry: A,
|
|
1263
1271
|
retryInitialLoad: l.retryInitialLoad,
|
|
1264
1272
|
setActiveIndex: y,
|
|
1265
1273
|
setAutoPrefetchEnabled: l.setAutoPrefetchEnabled,
|
|
@@ -1269,9 +1277,9 @@ function ft(e, t) {
|
|
|
1269
1277
|
}
|
|
1270
1278
|
//#endregion
|
|
1271
1279
|
//#region src/components/viewer-core/useController.ts
|
|
1272
|
-
var
|
|
1273
|
-
function
|
|
1274
|
-
let n =
|
|
1280
|
+
var mt = 1024;
|
|
1281
|
+
function ht(e, t) {
|
|
1282
|
+
let n = pt(e, t), r = T({
|
|
1275
1283
|
nextBoundaryLoadProgress: 0,
|
|
1276
1284
|
previousBoundaryLoadProgress: 0
|
|
1277
1285
|
}), a = D(0), o = D("list"), s = T({
|
|
@@ -1303,27 +1311,27 @@ function mt(e, t) {
|
|
|
1303
1311
|
removedIds: [],
|
|
1304
1312
|
removedRevision: 0,
|
|
1305
1313
|
surfaceMode: "list"
|
|
1306
|
-
}), c = i(() => a.value >=
|
|
1307
|
-
|
|
1314
|
+
}), c = i(() => a.value >= mt), l = D(0), u = D(0), d = i(() => c.value ? o.value : "fullscreen"), f = i(() => c.value && d.value === "fullscreen");
|
|
1315
|
+
R(c, (e) => {
|
|
1308
1316
|
e && _();
|
|
1309
|
-
}),
|
|
1317
|
+
}), R(() => e.surfaceMode, () => {
|
|
1310
1318
|
_();
|
|
1311
|
-
}),
|
|
1319
|
+
}), R([d, () => n.pendingAppendItems.value.length], ([e, t]) => {
|
|
1312
1320
|
e === "list" || t <= 0 || n.commitPendingAppend();
|
|
1313
|
-
}),
|
|
1321
|
+
}), R([
|
|
1314
1322
|
() => n.items.value.length,
|
|
1315
1323
|
() => n.loading.value,
|
|
1316
1324
|
() => n.hasNextPage.value,
|
|
1317
1325
|
() => n.pendingAppendItems.value.length
|
|
1318
1326
|
], ([e, n, r, i]) => {
|
|
1319
1327
|
!c.value || e > 0 || o.value === "list" || n || r || i > 0 || (o.value = "list", t("update:surfaceMode", "list"));
|
|
1320
|
-
}),
|
|
1328
|
+
}), R(d, (e) => {
|
|
1321
1329
|
n.setAutoPrefetchEnabled(e === "fullscreen");
|
|
1322
|
-
}, { immediate: !0 }),
|
|
1330
|
+
}, { immediate: !0 }), R(() => n.items.value, (e) => {
|
|
1323
1331
|
l.value += 1, s.itemCount = e.length, s.itemsRevision = l.value;
|
|
1324
|
-
}, { immediate: !0 }),
|
|
1332
|
+
}, { immediate: !0 }), R(() => n.getRemovedIds(), (e) => {
|
|
1325
1333
|
u.value += 1, s.removedCount = n.removedCount.value, s.removedIds = e, s.removedRevision = u.value;
|
|
1326
|
-
}, { immediate: !0 }),
|
|
1334
|
+
}, { immediate: !0 }), te(() => {
|
|
1327
1335
|
s.activeIndex = n.activeIndex.value, s.currentCursor = n.currentCursor.value, s.errorMessage = n.errorMessage.value, s.fillCollectedCount = n.fillCollectedCount.value, s.fillCompletedCalls = n.fillCompletedCalls.value, s.fillCursor = n.fillCursor.value, s.fillDelayRemainingMs = n.fillDelayRemainingMs.value, s.fillLoadedCount = n.fillLoadedCount.value, s.fillMode = n.fillMode.value, s.fillProgress = n.fillProgress.value, s.fillTargetCalls = n.fillTargetCalls.value, s.fillTargetCount = n.fillTargetCount.value, s.fillTotalCount = n.fillTotalCount.value, s.hasNextPage = n.hasNextPage.value, s.hasPreviousPage = n.hasPreviousPage.value, s.loadState = n.loading.value ? "loading" : n.errorMessage.value ? "failed" : "loaded", s.nextBoundaryLoadProgress = r.nextBoundaryLoadProgress, s.nextCursor = n.nextCursor.value, s.pageLoadingLocked = n.isPageLoadingLocked.value, s.phase = n.phase.value, s.previousBoundaryLoadProgress = r.previousBoundaryLoadProgress, s.previousCursor = n.previousCursor.value, s.surfaceMode = d.value;
|
|
1328
1336
|
}), S(() => {
|
|
1329
1337
|
g(), _(), window.addEventListener("keydown", h), window.addEventListener("resize", g);
|
|
@@ -1346,7 +1354,7 @@ function mt(e, t) {
|
|
|
1346
1354
|
!c.value || !e.surfaceMode || e.surfaceMode === o.value || (o.value = e.surfaceMode);
|
|
1347
1355
|
}
|
|
1348
1356
|
function v(e) {
|
|
1349
|
-
r.nextBoundaryLoadProgress =
|
|
1357
|
+
r.nextBoundaryLoadProgress = gt(e.nextBoundaryLoadProgress), r.previousBoundaryLoadProgress = gt(e.previousBoundaryLoadProgress);
|
|
1350
1358
|
}
|
|
1351
1359
|
return {
|
|
1352
1360
|
...n,
|
|
@@ -1365,26 +1373,26 @@ function mt(e, t) {
|
|
|
1365
1373
|
unlockPageLoading: n.unlockPageLoading
|
|
1366
1374
|
};
|
|
1367
1375
|
}
|
|
1368
|
-
function
|
|
1376
|
+
function gt(e) {
|
|
1369
1377
|
return Math.min(Math.max(e, 0), 1);
|
|
1370
1378
|
}
|
|
1371
1379
|
//#endregion
|
|
1372
1380
|
//#region src/components/FullscreenMediaBar.vue?vue&type=script&setup=true&lang.ts
|
|
1373
|
-
var
|
|
1381
|
+
var _t = {
|
|
1374
1382
|
"data-testid": "vibe-media-bar",
|
|
1375
1383
|
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]"
|
|
1376
|
-
},
|
|
1384
|
+
}, vt = { class: "grid grid-cols-[auto_minmax(0,1fr)_auto] items-center gap-3 border-t border-white/12 bg-black/70 px-4 py-3 backdrop-blur-[18px]" }, yt = { class: "text-[0.76rem] font-bold uppercase tracking-[0.18em] text-[#f7f1ea]/74" }, bt = { class: "relative h-4 w-full" }, xt = [
|
|
1377
1385
|
"max",
|
|
1378
1386
|
"value",
|
|
1379
1387
|
"disabled"
|
|
1380
|
-
],
|
|
1388
|
+
], St = { class: "flex items-center justify-end gap-3" }, Ct = { class: "text-[0.76rem] font-bold uppercase tracking-[0.18em] text-[#f7f1ea]/74" }, wt = ["data-layout"], Tt = {
|
|
1381
1389
|
key: 0,
|
|
1382
1390
|
"data-testid": "vibe-media-volume-popover",
|
|
1383
1391
|
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]"
|
|
1384
|
-
},
|
|
1392
|
+
}, Et = { class: "relative flex h-28 w-4 items-center justify-center" }, Dt = ["value"], Ot = { class: "flex items-center gap-3" }, kt = ["aria-label"], At = {
|
|
1385
1393
|
key: 0,
|
|
1386
1394
|
class: "relative h-4 w-24"
|
|
1387
|
-
},
|
|
1395
|
+
}, jt = ["value"], Mt = /* @__PURE__ */ d({
|
|
1388
1396
|
__name: "FullscreenMediaBar",
|
|
1389
1397
|
props: {
|
|
1390
1398
|
currentTime: {},
|
|
@@ -1408,7 +1416,7 @@ var gt = {
|
|
|
1408
1416
|
],
|
|
1409
1417
|
setup(e, { emit: t }) {
|
|
1410
1418
|
let n = e, r = t, l = D(null), d = D(!1), f = i(() => n.volumeControlLayout === "vertical"), p = i(() => T(n.volume, 0, 1)), m = i(() => Math.round(p.value * 100)), h = i(() => n.muted || p.value <= 0 ? X : p.value < .5 ? fe : pe), g = i(() => n.muted || p.value <= 0 ? "Unmute active media" : "Mute active media"), _ = i(() => f.value && !d.value ? "Show volume controls" : g.value), v = i(() => n.volumeControlLayout === "vertical" ? { height: `${m.value}%` } : { width: `${m.value}%` });
|
|
1411
|
-
|
|
1419
|
+
R(f, (e) => {
|
|
1412
1420
|
e || (d.value = !1);
|
|
1413
1421
|
}), S(() => {
|
|
1414
1422
|
document.addEventListener("pointerdown", y);
|
|
@@ -1432,9 +1440,9 @@ var gt = {
|
|
|
1432
1440
|
function T(e, t, n) {
|
|
1433
1441
|
return Math.min(Math.max(e, t), n);
|
|
1434
1442
|
}
|
|
1435
|
-
return (e, t) => (w(), s("div",
|
|
1436
|
-
c("span",
|
|
1437
|
-
c("div",
|
|
1443
|
+
return (e, t) => (w(), s("div", _t, [c("div", vt, [
|
|
1444
|
+
c("span", yt, j(n.currentTimeLabel), 1),
|
|
1445
|
+
c("div", bt, [
|
|
1438
1446
|
t[4] ||= c("div", { class: "absolute inset-x-0 top-1/2 h-px -translate-y-1/2 bg-white/12" }, null, -1),
|
|
1439
1447
|
c("div", {
|
|
1440
1448
|
class: "absolute left-0 top-1/2 h-px -translate-y-1/2 bg-[#f7f1ea]",
|
|
@@ -1451,10 +1459,10 @@ var gt = {
|
|
|
1451
1459
|
disabled: n.duration <= 0,
|
|
1452
1460
|
class: "vibe-media-slider absolute inset-0 z-10 h-4 w-full cursor-pointer bg-transparent disabled:cursor-default disabled:opacity-50",
|
|
1453
1461
|
onInput: t[0] ||= (e) => r("seek-input", e)
|
|
1454
|
-
}, null, 40,
|
|
1462
|
+
}, null, 40, xt)
|
|
1455
1463
|
]),
|
|
1456
|
-
c("div",
|
|
1457
|
-
c("span",
|
|
1464
|
+
c("div", St, [
|
|
1465
|
+
c("span", Ct, j(n.durationLabel), 1),
|
|
1458
1466
|
n.showFullscreenControl ? (w(), s("button", {
|
|
1459
1467
|
key: 0,
|
|
1460
1468
|
type: "button",
|
|
@@ -1462,7 +1470,7 @@ var gt = {
|
|
|
1462
1470
|
class: "inline-flex h-10 w-10 items-center justify-center border border-white/14 bg-black/50 text-[#f7f1ea]/82 backdrop-blur-[18px] transition hover:border-white/28 hover:bg-black/65",
|
|
1463
1471
|
"aria-label": "Open active video fullscreen",
|
|
1464
1472
|
onClick: t[1] ||= (e) => r("fullscreen-request")
|
|
1465
|
-
}, [u(
|
|
1473
|
+
}, [u(P(ce), {
|
|
1466
1474
|
class: "h-4 w-4 stroke-[1.9]",
|
|
1467
1475
|
"aria-hidden": "true"
|
|
1468
1476
|
})])) : o("", !0),
|
|
@@ -1472,7 +1480,7 @@ var gt = {
|
|
|
1472
1480
|
"data-testid": "vibe-media-volume",
|
|
1473
1481
|
"data-layout": n.volumeControlLayout,
|
|
1474
1482
|
class: "relative flex items-center justify-end"
|
|
1475
|
-
}, [f.value && d.value ? (w(), s("div",
|
|
1483
|
+
}, [f.value && d.value ? (w(), s("div", Tt, [c("div", Et, [
|
|
1476
1484
|
t[5] ||= c("div", { class: "absolute bottom-0 left-1/2 h-full w-px -translate-x-1/2 bg-white/12" }, null, -1),
|
|
1477
1485
|
c("div", {
|
|
1478
1486
|
class: "absolute bottom-0 left-1/2 w-px -translate-x-1/2 bg-[#f7f1ea]",
|
|
@@ -1489,17 +1497,17 @@ var gt = {
|
|
|
1489
1497
|
value: p.value,
|
|
1490
1498
|
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",
|
|
1491
1499
|
onInput: t[2] ||= (e) => r("volume-input", e)
|
|
1492
|
-
}, null, 40,
|
|
1493
|
-
])])) : o("", !0), c("div",
|
|
1500
|
+
}, null, 40, Dt)
|
|
1501
|
+
])])) : o("", !0), c("div", Ot, [c("button", {
|
|
1494
1502
|
type: "button",
|
|
1495
1503
|
"data-testid": "vibe-media-volume-button",
|
|
1496
1504
|
"aria-label": _.value,
|
|
1497
1505
|
class: "inline-flex h-10 w-10 items-center justify-center border border-white/14 bg-black/50 text-[#f7f1ea]/82 backdrop-blur-[18px] transition hover:border-white/28 hover:bg-black/65",
|
|
1498
1506
|
onClick: C
|
|
1499
|
-
}, [(w(), a(
|
|
1507
|
+
}, [(w(), a(ee(h.value), {
|
|
1500
1508
|
class: "h-4 w-4 stroke-[1.9]",
|
|
1501
1509
|
"aria-hidden": "true"
|
|
1502
|
-
}))], 8,
|
|
1510
|
+
}))], 8, kt), n.volumeControlLayout === "horizontal" ? (w(), s("div", At, [
|
|
1503
1511
|
t[6] ||= c("div", { class: "absolute inset-x-0 top-1/2 h-px -translate-y-1/2 bg-white/12" }, null, -1),
|
|
1504
1512
|
c("div", {
|
|
1505
1513
|
class: "absolute left-0 top-1/2 h-px -translate-y-1/2 bg-[#f7f1ea]",
|
|
@@ -1516,25 +1524,25 @@ var gt = {
|
|
|
1516
1524
|
value: p.value,
|
|
1517
1525
|
class: "vibe-media-slider absolute inset-0 z-10 h-4 w-full cursor-pointer bg-transparent",
|
|
1518
1526
|
onInput: t[3] ||= (e) => r("volume-input", e)
|
|
1519
|
-
}, null, 40,
|
|
1520
|
-
])) : o("", !0)])], 8,
|
|
1527
|
+
}, null, 40, jt)
|
|
1528
|
+
])) : o("", !0)])], 8, wt)
|
|
1521
1529
|
])
|
|
1522
1530
|
])]));
|
|
1523
1531
|
}
|
|
1524
|
-
}),
|
|
1532
|
+
}), Nt = {
|
|
1525
1533
|
"data-testid": "vibe-fullscreen-header",
|
|
1526
1534
|
class: "relative z-[3] shrink-0 border-b border-white/10 bg-[#05060a] px-3 py-2"
|
|
1527
|
-
},
|
|
1535
|
+
}, Pt = { class: "flex min-h-8 flex-wrap items-center justify-between gap-2" }, Ft = { class: "min-w-0 flex flex-1 items-center gap-2" }, It = {
|
|
1528
1536
|
key: 1,
|
|
1529
1537
|
"data-testid": "vibe-title",
|
|
1530
1538
|
class: "m-0 min-w-0 truncate text-left text-[0.82rem] leading-none text-[#f7f1ea]/88 min-[721px]:text-[0.92rem]"
|
|
1531
|
-
},
|
|
1539
|
+
}, Lt = { class: "flex min-w-0 flex-wrap items-center justify-end gap-2" }, Rt = {
|
|
1532
1540
|
"data-testid": "vibe-pagination",
|
|
1533
1541
|
class: "inline-flex h-8 shrink-0 items-center gap-2 whitespace-nowrap border border-white/12 bg-black/20 px-2.5 text-[0.68rem] font-semibold uppercase tracking-[0.1em] text-[#f7f1ea]/70"
|
|
1534
|
-
},
|
|
1542
|
+
}, zt = { class: "whitespace-nowrap" }, Bt = {
|
|
1535
1543
|
key: 1,
|
|
1536
1544
|
class: "whitespace-nowrap border-l border-white/12 pl-2 text-[#f7f1ea]/56"
|
|
1537
|
-
},
|
|
1545
|
+
}, Vt = /* @__PURE__ */ d({
|
|
1538
1546
|
__name: "FullscreenHeader",
|
|
1539
1547
|
props: {
|
|
1540
1548
|
currentIndex: {},
|
|
@@ -1547,7 +1555,7 @@ var gt = {
|
|
|
1547
1555
|
emits: ["back-to-list"],
|
|
1548
1556
|
setup(e, { emit: t }) {
|
|
1549
1557
|
let n = e, r = t;
|
|
1550
|
-
return (e, t) => (w(), s("header",
|
|
1558
|
+
return (e, t) => (w(), s("header", Nt, [c("div", Pt, [c("div", Ft, [n.showBackToList ? (w(), s("button", {
|
|
1551
1559
|
key: 0,
|
|
1552
1560
|
type: "button",
|
|
1553
1561
|
"data-testid": "vibe-back-to-list",
|
|
@@ -1555,30 +1563,30 @@ var gt = {
|
|
|
1555
1563
|
"aria-label": "Exit viewer",
|
|
1556
1564
|
title: "Exit viewer",
|
|
1557
1565
|
onClick: t[0] ||= (e) => r("back-to-list")
|
|
1558
|
-
}, [u(
|
|
1566
|
+
}, [u(P(me), {
|
|
1559
1567
|
class: "h-3.5 w-3.5 stroke-[2.2]",
|
|
1560
1568
|
"aria-hidden": "true"
|
|
1561
|
-
})])) : o("", !0), n.title ? (w(), s("h2",
|
|
1562
|
-
n.loading ? (w(), a(
|
|
1569
|
+
})])) : o("", !0), n.title ? (w(), s("h2", It, j(n.title), 1)) : o("", !0)]), c("div", Lt, [c("span", Rt, [
|
|
1570
|
+
n.loading ? (w(), a(P(se), {
|
|
1563
1571
|
key: 0,
|
|
1564
1572
|
"data-testid": "vibe-pagination-spinner",
|
|
1565
1573
|
class: "h-3.5 w-3.5 animate-spin stroke-[1.9]",
|
|
1566
1574
|
"aria-hidden": "true"
|
|
1567
1575
|
})) : o("", !0),
|
|
1568
|
-
c("span",
|
|
1569
|
-
n.paginationDetail ? (w(), s("span",
|
|
1576
|
+
c("span", zt, j(n.currentIndex + 1) + " / " + j(n.total), 1),
|
|
1577
|
+
n.paginationDetail ? (w(), s("span", Bt, j(n.paginationDetail), 1)) : o("", !0)
|
|
1570
1578
|
]), k(e.$slots, "actions")])])]));
|
|
1571
1579
|
}
|
|
1572
|
-
}),
|
|
1580
|
+
}), Ht = {
|
|
1573
1581
|
"data-testid": "vibe-fullscreen-footer",
|
|
1574
1582
|
class: "relative z-[3] shrink-0 border-t border-white/10 bg-[#05060a] px-3 py-2"
|
|
1575
|
-
},
|
|
1583
|
+
}, Ut = { class: "grid gap-2" }, Wt = {
|
|
1576
1584
|
key: 0,
|
|
1577
1585
|
class: "flex flex-wrap items-center justify-center gap-2"
|
|
1578
|
-
},
|
|
1586
|
+
}, Gt = {
|
|
1579
1587
|
key: 2,
|
|
1580
1588
|
class: "inline-flex items-center border border-amber-300/35 bg-black/20 px-3 py-1.5 text-[0.68rem] font-semibold uppercase tracking-[0.12em] text-amber-200"
|
|
1581
|
-
},
|
|
1589
|
+
}, Kt = /* @__PURE__ */ d({
|
|
1582
1590
|
__name: "FullscreenFooter",
|
|
1583
1591
|
props: {
|
|
1584
1592
|
showEndBadge: { type: Boolean },
|
|
@@ -1588,32 +1596,32 @@ var gt = {
|
|
|
1588
1596
|
},
|
|
1589
1597
|
setup(e) {
|
|
1590
1598
|
let t = e, n = i(() => t.statusKind === "end" ? "border-amber-300/35 text-amber-200" : t.statusKind === "failed" ? "border-rose-400/45 text-rose-100" : "");
|
|
1591
|
-
return (e, r) => (w(), s("footer",
|
|
1599
|
+
return (e, r) => (w(), s("footer", Ht, [c("div", Ut, [k(e.$slots, "default"), t.showStatus || t.showEndBadge ? (w(), s("div", Wt, [t.showStatus && e.$slots.status ? k(e.$slots, "status", { key: 0 }) : t.showStatus ? (w(), s("div", {
|
|
1592
1600
|
key: 1,
|
|
1593
1601
|
"data-testid": "vibe-fullscreen-status-badge",
|
|
1594
1602
|
class: v(["inline-flex w-auto items-center border border-white/12 bg-black/20 px-3 py-1.5 text-[0.68rem] font-semibold uppercase tracking-[0.12em] text-[#f7f1ea]/74 max-[720px]:w-full max-[720px]:justify-center", n.value])
|
|
1595
|
-
},
|
|
1603
|
+
}, j(t.statusMessage), 3)) : o("", !0), t.showEndBadge ? (w(), s("span", Gt, " End reached ")) : o("", !0)])) : o("", !0)])]));
|
|
1596
1604
|
}
|
|
1597
|
-
}),
|
|
1605
|
+
}), qt = {
|
|
1598
1606
|
image: oe,
|
|
1599
1607
|
video: ie,
|
|
1600
1608
|
audio: Y,
|
|
1601
1609
|
other: ae
|
|
1602
|
-
},
|
|
1610
|
+
}, Jt = {
|
|
1603
1611
|
image: "Image",
|
|
1604
1612
|
video: "Video",
|
|
1605
1613
|
audio: "Audio",
|
|
1606
1614
|
other: "File"
|
|
1607
1615
|
};
|
|
1608
|
-
function Jt(e) {
|
|
1609
|
-
return Kt[e];
|
|
1610
|
-
}
|
|
1611
1616
|
function Yt(e) {
|
|
1612
1617
|
return qt[e];
|
|
1613
1618
|
}
|
|
1619
|
+
function Xt(e) {
|
|
1620
|
+
return Jt[e];
|
|
1621
|
+
}
|
|
1614
1622
|
//#endregion
|
|
1615
1623
|
//#region src/components/viewer-core/useAssetLoadQueue.ts
|
|
1616
|
-
function
|
|
1624
|
+
function Zt() {
|
|
1617
1625
|
let e = /* @__PURE__ */ new Map(), t = /* @__PURE__ */ new Map(), n = 0;
|
|
1618
1626
|
function r(r) {
|
|
1619
1627
|
let a = {
|
|
@@ -1636,7 +1644,7 @@ function Xt() {
|
|
|
1636
1644
|
function i() {
|
|
1637
1645
|
if (t.size === 0) return;
|
|
1638
1646
|
let n = [...t.values()].sort((e, t) => {
|
|
1639
|
-
let n =
|
|
1647
|
+
let n = $t(e) - $t(t);
|
|
1640
1648
|
return n === 0 ? e.enqueuedAt - t.enqueuedAt : n;
|
|
1641
1649
|
});
|
|
1642
1650
|
for (let r of n) {
|
|
@@ -1650,8 +1658,8 @@ function Xt() {
|
|
|
1650
1658
|
}
|
|
1651
1659
|
return { request: r };
|
|
1652
1660
|
}
|
|
1653
|
-
var
|
|
1654
|
-
function
|
|
1661
|
+
var Qt = Zt();
|
|
1662
|
+
function $t(e) {
|
|
1655
1663
|
try {
|
|
1656
1664
|
let t = e.getPriority();
|
|
1657
1665
|
return Number.isFinite(t) ? t : Infinity;
|
|
@@ -1661,20 +1669,20 @@ function Qt(e) {
|
|
|
1661
1669
|
}
|
|
1662
1670
|
//#endregion
|
|
1663
1671
|
//#region src/components/viewer-core/useFullscreenPreloadController.ts
|
|
1664
|
-
var
|
|
1672
|
+
var en = [
|
|
1665
1673
|
0,
|
|
1666
1674
|
1,
|
|
1667
1675
|
2,
|
|
1668
1676
|
3
|
|
1669
|
-
],
|
|
1677
|
+
], tn = {
|
|
1670
1678
|
0: 0,
|
|
1671
1679
|
1: 1,
|
|
1672
1680
|
2: 2,
|
|
1673
1681
|
3: 3
|
|
1674
1682
|
};
|
|
1675
|
-
function
|
|
1676
|
-
let t = D({}), n =
|
|
1677
|
-
|
|
1683
|
+
function nn(e) {
|
|
1684
|
+
let t = D({}), n = Zt(), r = /* @__PURE__ */ new Map(), i = /* @__PURE__ */ new Map(), a = /* @__PURE__ */ new Map(), o = /* @__PURE__ */ new Set();
|
|
1685
|
+
R([
|
|
1678
1686
|
e.active,
|
|
1679
1687
|
e.items,
|
|
1680
1688
|
e.resolvedActiveIndex
|
|
@@ -1694,14 +1702,14 @@ function tn(e) {
|
|
|
1694
1702
|
}
|
|
1695
1703
|
function l(e, t) {
|
|
1696
1704
|
if (t instanceof HTMLImageElement) {
|
|
1697
|
-
i.set(e, t),
|
|
1705
|
+
i.set(e, t), an(t) && d(e);
|
|
1698
1706
|
return;
|
|
1699
1707
|
}
|
|
1700
1708
|
i.delete(e);
|
|
1701
1709
|
}
|
|
1702
1710
|
function u(e, t) {
|
|
1703
1711
|
if (t instanceof HTMLMediaElement) {
|
|
1704
|
-
a.set(e, t),
|
|
1712
|
+
a.set(e, t), on(t) && d(e);
|
|
1705
1713
|
return;
|
|
1706
1714
|
}
|
|
1707
1715
|
a.delete(e);
|
|
@@ -1742,7 +1750,7 @@ function tn(e) {
|
|
|
1742
1750
|
assetType: s.item.type === "image" ? "image" : "video",
|
|
1743
1751
|
getPriority: () => g(o.index),
|
|
1744
1752
|
onGrant: () => {
|
|
1745
|
-
y(s.key, !0), (e.isAssetReady(s.key, s.item) ||
|
|
1753
|
+
y(s.key, !0), (e.isAssetReady(s.key, s.item) || rn(s.key, i, a)) && d(s.key);
|
|
1746
1754
|
},
|
|
1747
1755
|
url: s.item.url
|
|
1748
1756
|
})
|
|
@@ -1753,14 +1761,14 @@ function tn(e) {
|
|
|
1753
1761
|
}
|
|
1754
1762
|
function h() {
|
|
1755
1763
|
let t = e.resolvedActiveIndex.value;
|
|
1756
|
-
return
|
|
1764
|
+
return en.map((e) => _(t + e)).filter((e) => !!e);
|
|
1757
1765
|
}
|
|
1758
1766
|
function g(t) {
|
|
1759
|
-
return e.active.value ?
|
|
1767
|
+
return e.active.value ? tn[t - e.resolvedActiveIndex.value] ?? Infinity : Infinity;
|
|
1760
1768
|
}
|
|
1761
1769
|
function _(t) {
|
|
1762
1770
|
let n = e.items.value[t];
|
|
1763
|
-
return !n || !
|
|
1771
|
+
return !n || !sn(n) ? null : {
|
|
1764
1772
|
index: t,
|
|
1765
1773
|
item: n,
|
|
1766
1774
|
key: e.getItemKey(n)
|
|
@@ -1809,27 +1817,27 @@ function tn(e) {
|
|
|
1809
1817
|
shouldAttachSlideAsset: s
|
|
1810
1818
|
};
|
|
1811
1819
|
}
|
|
1812
|
-
function
|
|
1820
|
+
function rn(e, t, n) {
|
|
1813
1821
|
let r = t.get(e);
|
|
1814
|
-
if (r) return
|
|
1822
|
+
if (r) return an(r);
|
|
1815
1823
|
let i = n.get(e);
|
|
1816
|
-
return i ?
|
|
1824
|
+
return i ? on(i) : !1;
|
|
1817
1825
|
}
|
|
1818
|
-
function
|
|
1826
|
+
function an(e) {
|
|
1819
1827
|
return e.complete && !!(e.currentSrc || e.getAttribute("src"));
|
|
1820
1828
|
}
|
|
1821
|
-
function
|
|
1829
|
+
function on(e) {
|
|
1822
1830
|
let t = typeof HTMLMediaElement > "u" ? 1 : HTMLMediaElement.HAVE_METADATA;
|
|
1823
1831
|
return e.readyState >= t;
|
|
1824
1832
|
}
|
|
1825
|
-
function
|
|
1833
|
+
function sn(e) {
|
|
1826
1834
|
return e.type === "image" || e.type === "video" || e.type === "audio";
|
|
1827
1835
|
}
|
|
1828
1836
|
//#endregion
|
|
1829
1837
|
//#region src/components/viewer-core/useFullscreenSurfaceMedia.ts
|
|
1830
|
-
var
|
|
1831
|
-
function
|
|
1832
|
-
let t =
|
|
1838
|
+
var cn = /\.(avif|gif|jpe?g|png|svg|webp)(\?|#|$)/i;
|
|
1839
|
+
function ln(e) {
|
|
1840
|
+
let t = nn({
|
|
1833
1841
|
active: e.active,
|
|
1834
1842
|
getItemKey: r,
|
|
1835
1843
|
isAssetReady: h,
|
|
@@ -1839,10 +1847,10 @@ function cn(e) {
|
|
|
1839
1847
|
});
|
|
1840
1848
|
function n(e, t) {
|
|
1841
1849
|
let n = t.title?.trim();
|
|
1842
|
-
return n ? `${e} ${n}` : `${e} ${
|
|
1850
|
+
return n ? `${e} ${n}` : `${e} ${Xt(t.type).toLowerCase()}`;
|
|
1843
1851
|
}
|
|
1844
1852
|
function r(e) {
|
|
1845
|
-
return
|
|
1853
|
+
return Q(e);
|
|
1846
1854
|
}
|
|
1847
1855
|
function i(e) {
|
|
1848
1856
|
return t.shouldAttachSlideAsset(e);
|
|
@@ -1876,7 +1884,7 @@ function cn(e) {
|
|
|
1876
1884
|
return i(e) ? t.url : void 0;
|
|
1877
1885
|
}
|
|
1878
1886
|
function m(e) {
|
|
1879
|
-
return e.type !== "audio" || !e.preview?.url ? null : e.preview.mediaType === "image" || !e.preview.mediaType &&
|
|
1887
|
+
return e.type !== "audio" || !e.preview?.url ? null : e.preview.mediaType === "image" || !e.preview.mediaType && cn.test(e.preview.url) ? e.preview.url : null;
|
|
1880
1888
|
}
|
|
1881
1889
|
function h(t, n) {
|
|
1882
1890
|
return n.type === "image" ? e.viewer.isImageReady(t) : n.type === "video" || n.type === "audio" ? e.viewer.isMediaReady(t) : !1;
|
|
@@ -1906,11 +1914,11 @@ function cn(e) {
|
|
|
1906
1914
|
}
|
|
1907
1915
|
//#endregion
|
|
1908
1916
|
//#region src/components/viewer-core/slotContent.ts
|
|
1909
|
-
function
|
|
1917
|
+
function un(e) {
|
|
1910
1918
|
if (!Array.isArray(e)) return !1;
|
|
1911
1919
|
for (let t of e) {
|
|
1912
1920
|
if (Array.isArray(t)) {
|
|
1913
|
-
if (
|
|
1921
|
+
if (un(t)) return !0;
|
|
1914
1922
|
continue;
|
|
1915
1923
|
}
|
|
1916
1924
|
if (!h(t)) {
|
|
@@ -1921,20 +1929,20 @@ function ln(e) {
|
|
|
1921
1929
|
if (t != null && t !== !1) return !0;
|
|
1922
1930
|
continue;
|
|
1923
1931
|
}
|
|
1924
|
-
if (!
|
|
1932
|
+
if (!dn(t)) return !0;
|
|
1925
1933
|
}
|
|
1926
1934
|
return !1;
|
|
1927
1935
|
}
|
|
1928
|
-
function
|
|
1929
|
-
return r.type === e ? !0 : r.type === n ? typeof r.children == "string" ? r.children.trim().length === 0 : !0 : r.type === t ? !
|
|
1936
|
+
function dn(r) {
|
|
1937
|
+
return r.type === e ? !0 : r.type === n ? typeof r.children == "string" ? r.children.trim().length === 0 : !0 : r.type === t ? !un(r.children) : !1;
|
|
1930
1938
|
}
|
|
1931
1939
|
//#endregion
|
|
1932
1940
|
//#region src/components/viewer-core/useSurfaceEmptyState.ts
|
|
1933
|
-
var
|
|
1934
|
-
function
|
|
1941
|
+
var fn = "no items available";
|
|
1942
|
+
function pn(e) {
|
|
1935
1943
|
let t = i(() => e.loading.value || e.itemCount.value > 0 || e.emptyStateMode.value === "hidden" ? null : {
|
|
1936
1944
|
loading: !!e.loading.value,
|
|
1937
|
-
message:
|
|
1945
|
+
message: fn,
|
|
1938
1946
|
mode: e.emptyStateMode.value === "badge" ? "badge" : "inline",
|
|
1939
1947
|
surface: e.surface,
|
|
1940
1948
|
total: e.itemCount.value
|
|
@@ -1942,23 +1950,23 @@ function fn(e) {
|
|
|
1942
1950
|
return {
|
|
1943
1951
|
emptyStateProps: t,
|
|
1944
1952
|
showBadgeEmptyState: i(() => t.value?.mode === "badge"),
|
|
1945
|
-
showCustomEmptyState: i(() =>
|
|
1953
|
+
showCustomEmptyState: i(() => un(n.value)),
|
|
1946
1954
|
showInlineEmptyState: i(() => t.value?.mode === "inline")
|
|
1947
1955
|
};
|
|
1948
1956
|
}
|
|
1949
1957
|
//#endregion
|
|
1950
1958
|
//#region src/components/viewer-core/format.ts
|
|
1951
|
-
function
|
|
1959
|
+
function mn(e) {
|
|
1952
1960
|
if (!Number.isFinite(e) || e <= 0) return "0:00";
|
|
1953
1961
|
let t = Math.floor(e), n = Math.floor(t / 3600), r = Math.floor(t % 3600 / 60), i = t % 60;
|
|
1954
1962
|
return n > 0 ? `${n}:${String(r).padStart(2, "0")}:${String(i).padStart(2, "0")}` : `${r}:${String(i).padStart(2, "0")}`;
|
|
1955
1963
|
}
|
|
1956
1964
|
//#endregion
|
|
1957
1965
|
//#region src/components/viewer-core/surfaceStatus.ts
|
|
1958
|
-
function
|
|
1966
|
+
function hn(e) {
|
|
1959
1967
|
return e.phase ? e.phase : e.loading ? e.itemCount > 0 ? "loading" : "initializing" : "idle";
|
|
1960
1968
|
}
|
|
1961
|
-
function
|
|
1969
|
+
function gn(e) {
|
|
1962
1970
|
return e.phase === "failed" ? {
|
|
1963
1971
|
kind: "failed",
|
|
1964
1972
|
message: e.errorMessage ?? (e.hasItems ? "The viewer could not load more items." : "The viewer could not load items.")
|
|
@@ -1981,9 +1989,9 @@ function hn(e) {
|
|
|
1981
1989
|
}
|
|
1982
1990
|
//#endregion
|
|
1983
1991
|
//#region src/components/viewer-core/useActivation.ts
|
|
1984
|
-
function
|
|
1992
|
+
function _n(e) {
|
|
1985
1993
|
let t = !1;
|
|
1986
|
-
|
|
1994
|
+
R(e.enabled, async (t) => {
|
|
1987
1995
|
if (n(t), t) {
|
|
1988
1996
|
e.onResize(), await e.onEnable();
|
|
1989
1997
|
return;
|
|
@@ -2004,7 +2012,7 @@ function gn(e) {
|
|
|
2004
2012
|
}
|
|
2005
2013
|
//#endregion
|
|
2006
2014
|
//#region src/components/viewer-core/assetState.ts
|
|
2007
|
-
var
|
|
2015
|
+
var vn = {
|
|
2008
2016
|
currentTime: 0,
|
|
2009
2017
|
duration: 0,
|
|
2010
2018
|
errorKind: null,
|
|
@@ -2013,38 +2021,38 @@ var _n = {
|
|
|
2013
2021
|
ready: !1,
|
|
2014
2022
|
volume: 1
|
|
2015
2023
|
};
|
|
2016
|
-
function
|
|
2017
|
-
return { ...
|
|
2024
|
+
function yn() {
|
|
2025
|
+
return { ...vn };
|
|
2018
2026
|
}
|
|
2019
|
-
function
|
|
2027
|
+
function bn(e) {
|
|
2020
2028
|
return e.complete && !!(e.currentSrc || e.getAttribute("src"));
|
|
2021
2029
|
}
|
|
2022
|
-
function
|
|
2023
|
-
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 =
|
|
2030
|
+
function xn(e, t, n) {
|
|
2031
|
+
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);
|
|
2024
2032
|
}
|
|
2025
|
-
function
|
|
2033
|
+
function Sn(e, t) {
|
|
2026
2034
|
return t === "error" || t === "loadstart" || t === "waiting" || t === "stalled" ? !1 : t === "canplay" || t === "canplaythrough" || t === "playing" ? !0 : e.readyState >= HTMLMediaElement.HAVE_CURRENT_DATA;
|
|
2027
2035
|
}
|
|
2028
2036
|
//#endregion
|
|
2029
2037
|
//#region src/components/viewer-core/loadError.ts
|
|
2030
|
-
var
|
|
2031
|
-
function Cn(e) {
|
|
2032
|
-
return e === "not-found" ? "404" : "Load error";
|
|
2033
|
-
}
|
|
2038
|
+
var Cn = /* @__PURE__ */ new Map();
|
|
2034
2039
|
function wn(e) {
|
|
2035
|
-
return e === "
|
|
2040
|
+
return e === "not-found" ? "404" : "Load error";
|
|
2036
2041
|
}
|
|
2037
2042
|
function Tn(e) {
|
|
2038
|
-
return
|
|
2043
|
+
return e === "generic";
|
|
2039
2044
|
}
|
|
2040
2045
|
function En(e) {
|
|
2041
|
-
|
|
2046
|
+
return Dn(e).then((e) => e ?? "generic");
|
|
2047
|
+
}
|
|
2048
|
+
function Dn(e) {
|
|
2049
|
+
let t = Cn.get(e);
|
|
2042
2050
|
if (t) return t;
|
|
2043
|
-
let n =
|
|
2044
|
-
return
|
|
2051
|
+
let n = On(e);
|
|
2052
|
+
return Cn.set(e, n), n;
|
|
2045
2053
|
}
|
|
2046
|
-
async function
|
|
2047
|
-
if (!
|
|
2054
|
+
async function On(e) {
|
|
2055
|
+
if (!kn(e)) return null;
|
|
2048
2056
|
try {
|
|
2049
2057
|
let t = await fetch(e, { method: "HEAD" });
|
|
2050
2058
|
return t.ok ? null : t.status === 404 ? "not-found" : "generic";
|
|
@@ -2052,12 +2060,12 @@ async function Dn(e) {
|
|
|
2052
2060
|
return "generic";
|
|
2053
2061
|
}
|
|
2054
2062
|
}
|
|
2055
|
-
function
|
|
2063
|
+
function kn(e) {
|
|
2056
2064
|
return /^(https?:\/\/|\/)/i.test(e);
|
|
2057
2065
|
}
|
|
2058
2066
|
//#endregion
|
|
2059
2067
|
//#region src/components/viewer-core/mediaPlayback.ts
|
|
2060
|
-
function
|
|
2068
|
+
function An(e) {
|
|
2061
2069
|
try {
|
|
2062
2070
|
let t = e.play();
|
|
2063
2071
|
t && typeof t.catch == "function" && t.catch(() => {});
|
|
@@ -2065,11 +2073,11 @@ function kn(e) {
|
|
|
2065
2073
|
}
|
|
2066
2074
|
//#endregion
|
|
2067
2075
|
//#region src/components/viewer-core/nativeVideoFullscreen.ts
|
|
2068
|
-
function
|
|
2076
|
+
function jn(e) {
|
|
2069
2077
|
let t = typeof document > "u" ? null : document;
|
|
2070
2078
|
return typeof document < "u" && typeof HTMLVideoElement < "u" && e instanceof HTMLVideoElement && (document.fullscreenElement === e || t?.webkitFullscreenElement === e);
|
|
2071
2079
|
}
|
|
2072
|
-
function
|
|
2080
|
+
function Mn(e) {
|
|
2073
2081
|
let t = e.requestFullscreen?.bind(e);
|
|
2074
2082
|
if (t) {
|
|
2075
2083
|
let e = t();
|
|
@@ -2085,17 +2093,17 @@ function jn(e) {
|
|
|
2085
2093
|
}
|
|
2086
2094
|
//#endregion
|
|
2087
2095
|
//#region src/components/viewer-core/useMedia.ts
|
|
2088
|
-
function
|
|
2089
|
-
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 ?
|
|
2096
|
+
function Nn(e) {
|
|
2097
|
+
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 ? Q(e.activeItem.value) : null), d = i(() => e.activeMediaItem.value ? Q(e.activeMediaItem.value) : null), f = i(() => {
|
|
2090
2098
|
let t = /* @__PURE__ */ new Map();
|
|
2091
|
-
for (let n of e.items.value) t.set(
|
|
2099
|
+
for (let n of e.items.value) t.set(Q(n), n);
|
|
2092
2100
|
return t;
|
|
2093
|
-
}), p = i(() => d.value ? r.value[d.value] ??
|
|
2094
|
-
|
|
2101
|
+
}), p = i(() => d.value ? r.value[d.value] ?? vn : vn), m = i(() => d.value ? p.value.duration : 0), h = i(() => m.value <= 0 ? 0 : Pn(p.value.currentTime / m.value * 100, 0, 100)), g = i(() => u.value ? I(u.value) : null);
|
|
2102
|
+
R(() => u.value, async () => {
|
|
2095
2103
|
await C();
|
|
2096
|
-
}),
|
|
2104
|
+
}), R(() => e.itemCount.value, async () => {
|
|
2097
2105
|
await C();
|
|
2098
|
-
}),
|
|
2106
|
+
}), R(() => e.loopFullscreenVideo.value, async () => {
|
|
2099
2107
|
await C();
|
|
2100
2108
|
});
|
|
2101
2109
|
function v(e, t) {
|
|
@@ -2113,10 +2121,10 @@ function Mn(e) {
|
|
|
2113
2121
|
c.delete(e);
|
|
2114
2122
|
}
|
|
2115
2123
|
function b(e, r) {
|
|
2116
|
-
r instanceof HTMLImageElement &&
|
|
2124
|
+
r instanceof HTMLImageElement && bn(r) && (t.value[e] = !0, n.value[e] = null, J(e, r.currentSrc || r.src || ie(e)));
|
|
2117
2125
|
}
|
|
2118
2126
|
function x() {
|
|
2119
|
-
|
|
2127
|
+
H(), a.value = {}, n.value = {}, t.value = {}, o.value = {}, r.value = {}, l.clear();
|
|
2120
2128
|
}
|
|
2121
2129
|
function S(e) {
|
|
2122
2130
|
delete t.value[e], delete n.value[e], delete o.value[e], delete r.value[e], l.forEach((t) => {
|
|
@@ -2125,24 +2133,24 @@ function Mn(e) {
|
|
|
2125
2133
|
}
|
|
2126
2134
|
async function C() {
|
|
2127
2135
|
if (!e.isEnabled.value) {
|
|
2128
|
-
|
|
2136
|
+
H();
|
|
2129
2137
|
return;
|
|
2130
2138
|
}
|
|
2131
2139
|
await _();
|
|
2132
2140
|
let t = u.value;
|
|
2133
2141
|
for (let [n, i] of s.entries()) {
|
|
2134
2142
|
if (n !== t || r.value[n]?.errorKind) {
|
|
2135
|
-
|
|
2143
|
+
V(i, n);
|
|
2136
2144
|
continue;
|
|
2137
2145
|
}
|
|
2138
|
-
i.muted = !1, i.loop = e.loopFullscreenVideo.value, i.playsInline = !0,
|
|
2146
|
+
i.muted = !1, i.loop = e.loopFullscreenVideo.value, i.playsInline = !0, An(i), W(n, i);
|
|
2139
2147
|
}
|
|
2140
2148
|
for (let [e, n] of c.entries()) {
|
|
2141
2149
|
if (e !== t || r.value[e]?.errorKind) {
|
|
2142
|
-
|
|
2150
|
+
V(n, e);
|
|
2143
2151
|
continue;
|
|
2144
2152
|
}
|
|
2145
|
-
|
|
2153
|
+
An(n), W(e, n);
|
|
2146
2154
|
}
|
|
2147
2155
|
}
|
|
2148
2156
|
function w(e, t) {
|
|
@@ -2160,7 +2168,7 @@ function Mn(e) {
|
|
|
2160
2168
|
async function E(r, i) {
|
|
2161
2169
|
let a = Y(r) ?? e.activeItem.value;
|
|
2162
2170
|
t.value[r] = !1, n.value[r] = "generic";
|
|
2163
|
-
let o = await
|
|
2171
|
+
let o = await En(i);
|
|
2164
2172
|
n.value[r] = o, a && e.onAssetError?.({
|
|
2165
2173
|
item: a,
|
|
2166
2174
|
occurrenceKey: r,
|
|
@@ -2170,7 +2178,7 @@ function Mn(e) {
|
|
|
2170
2178
|
});
|
|
2171
2179
|
}
|
|
2172
2180
|
async function O(t, n) {
|
|
2173
|
-
let r = K(t), i =
|
|
2181
|
+
let r = K(t), i = U(t), a = Y(t) ?? e.activeMediaItem.value ?? e.activeItem.value;
|
|
2174
2182
|
if (r) {
|
|
2175
2183
|
r.pause();
|
|
2176
2184
|
try {
|
|
@@ -2178,7 +2186,7 @@ function Mn(e) {
|
|
|
2178
2186
|
} catch {}
|
|
2179
2187
|
}
|
|
2180
2188
|
i.currentTime = 0, i.duration = 0, i.paused = !0, i.ready = !1, i.errorKind = "generic";
|
|
2181
|
-
let o = await
|
|
2189
|
+
let o = await En(n);
|
|
2182
2190
|
i.errorKind = o, a && e.onAssetError?.({
|
|
2183
2191
|
item: a,
|
|
2184
2192
|
occurrenceKey: t,
|
|
@@ -2188,84 +2196,84 @@ function Mn(e) {
|
|
|
2188
2196
|
});
|
|
2189
2197
|
}
|
|
2190
2198
|
function k(e, t, n) {
|
|
2191
|
-
e.button !== 0 || Date.now() < n ||
|
|
2199
|
+
e.button !== 0 || Date.now() < n || jn(e.currentTarget) || re(s.get(t) ?? null);
|
|
2192
2200
|
}
|
|
2193
|
-
function
|
|
2201
|
+
function ee(e, t, n) {
|
|
2194
2202
|
e.button !== 0 || Date.now() < n || re(K(t));
|
|
2195
2203
|
}
|
|
2196
|
-
function
|
|
2204
|
+
function A(e) {
|
|
2197
2205
|
let t = q(), n = d.value;
|
|
2198
2206
|
if (!t || !n || !(e.target instanceof HTMLInputElement)) return;
|
|
2199
2207
|
let r = Number.parseFloat(e.target.value);
|
|
2200
2208
|
if (!Number.isFinite(r)) return;
|
|
2201
|
-
let i =
|
|
2209
|
+
let i = Pn(r, 0, m.value || 0);
|
|
2202
2210
|
ne(n, i, t), t.currentTime = i;
|
|
2203
2211
|
}
|
|
2204
|
-
function
|
|
2212
|
+
function j(e) {
|
|
2205
2213
|
let t = q(), n = d.value;
|
|
2206
2214
|
if (!t || !n || !(e.target instanceof HTMLInputElement)) return;
|
|
2207
|
-
let r =
|
|
2215
|
+
let r = Pn(Number.parseFloat(e.target.value), 0, 1);
|
|
2208
2216
|
t.volume = r, t.muted = r <= 0, r > 0 && (o.value[n] = r), W(n, t);
|
|
2209
2217
|
}
|
|
2210
|
-
function
|
|
2218
|
+
function M() {
|
|
2211
2219
|
let e = q(), t = d.value;
|
|
2212
2220
|
!e || !t || (e.muted || e.volume <= 0 ? (e.volume = G(t), e.muted = !1, o.value[t] = e.volume) : (o.value[t] = e.volume, e.muted = !0), W(t, e));
|
|
2213
2221
|
}
|
|
2214
|
-
function
|
|
2222
|
+
function N(e) {
|
|
2215
2223
|
return !!t.value[e] && !n.value[e];
|
|
2216
2224
|
}
|
|
2217
|
-
function
|
|
2225
|
+
function P(e) {
|
|
2218
2226
|
return (r.value[e]?.ready ?? !1) && !r.value[e]?.errorKind;
|
|
2219
2227
|
}
|
|
2220
|
-
function
|
|
2228
|
+
function F(e) {
|
|
2221
2229
|
return e.url;
|
|
2222
2230
|
}
|
|
2223
|
-
function
|
|
2231
|
+
function I(e) {
|
|
2224
2232
|
return n.value[e] ?? r.value[e]?.errorKind ?? null;
|
|
2225
2233
|
}
|
|
2226
|
-
function
|
|
2227
|
-
let t =
|
|
2228
|
-
return t ?
|
|
2234
|
+
function L(e) {
|
|
2235
|
+
let t = I(e);
|
|
2236
|
+
return t ? wn(t) : null;
|
|
2229
2237
|
}
|
|
2230
|
-
function
|
|
2231
|
-
return
|
|
2238
|
+
function te(e) {
|
|
2239
|
+
return Tn(I(e));
|
|
2232
2240
|
}
|
|
2233
|
-
function
|
|
2241
|
+
function z(e) {
|
|
2234
2242
|
return `${e}:${a.value[e] ?? 0}`;
|
|
2235
2243
|
}
|
|
2236
|
-
async function
|
|
2237
|
-
if (!
|
|
2244
|
+
async function B(e) {
|
|
2245
|
+
if (!te(e)) return;
|
|
2238
2246
|
t.value[e] = !1, n.value[e] = null;
|
|
2239
|
-
let r =
|
|
2247
|
+
let r = U(e);
|
|
2240
2248
|
r.currentTime = 0, r.duration = 0, r.paused = !0, r.ready = !1, r.errorKind = null;
|
|
2241
2249
|
let i = K(e);
|
|
2242
|
-
i &&
|
|
2250
|
+
i && V(i, e), l.forEach((t) => {
|
|
2243
2251
|
t.startsWith(`${e}|`) && l.delete(t);
|
|
2244
2252
|
}), a.value[e] = (a.value[e] ?? 0) + 1, await _(), await C();
|
|
2245
2253
|
}
|
|
2246
|
-
function
|
|
2254
|
+
function V(e, t) {
|
|
2247
2255
|
e.pause();
|
|
2248
2256
|
try {
|
|
2249
2257
|
e.currentTime = 0;
|
|
2250
2258
|
} catch {}
|
|
2251
2259
|
W(t, e);
|
|
2252
2260
|
}
|
|
2253
|
-
function
|
|
2254
|
-
for (let [e, t] of s.entries())
|
|
2255
|
-
for (let [e, t] of c.entries())
|
|
2261
|
+
function H() {
|
|
2262
|
+
for (let [e, t] of s.entries()) V(t, e);
|
|
2263
|
+
for (let [e, t] of c.entries()) V(t, e);
|
|
2256
2264
|
}
|
|
2257
|
-
function
|
|
2258
|
-
return r.value[e] || (r.value[e] =
|
|
2265
|
+
function U(e) {
|
|
2266
|
+
return r.value[e] || (r.value[e] = yn()), r.value[e];
|
|
2259
2267
|
}
|
|
2260
2268
|
function W(e, t, n) {
|
|
2261
|
-
|
|
2269
|
+
xn(U(e), t, n), !t.muted && t.volume > 0 && (o.value[e] = t.volume);
|
|
2262
2270
|
}
|
|
2263
2271
|
function ne(e, t, n) {
|
|
2264
|
-
let r =
|
|
2272
|
+
let r = U(e);
|
|
2265
2273
|
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;
|
|
2266
2274
|
}
|
|
2267
2275
|
function G(e) {
|
|
2268
|
-
return
|
|
2276
|
+
return Pn(o.value[e] ?? 1, 0, 1);
|
|
2269
2277
|
}
|
|
2270
2278
|
function K(e) {
|
|
2271
2279
|
return s.get(e) ?? c.get(e) ?? null;
|
|
@@ -2276,7 +2284,7 @@ function Mn(e) {
|
|
|
2276
2284
|
function re(e) {
|
|
2277
2285
|
if (e) {
|
|
2278
2286
|
if (e.paused) {
|
|
2279
|
-
|
|
2287
|
+
An(e);
|
|
2280
2288
|
return;
|
|
2281
2289
|
}
|
|
2282
2290
|
e.pause();
|
|
@@ -2304,42 +2312,42 @@ function Mn(e) {
|
|
|
2304
2312
|
activeMediaDuration: m,
|
|
2305
2313
|
activeMediaProgress: h,
|
|
2306
2314
|
activeMediaState: p,
|
|
2307
|
-
getAssetErrorKind:
|
|
2308
|
-
getAssetErrorLabel:
|
|
2309
|
-
getAssetRenderKey:
|
|
2310
|
-
getImageSource:
|
|
2311
|
-
isImageReady:
|
|
2312
|
-
isMediaReady:
|
|
2313
|
-
canRetryAsset:
|
|
2315
|
+
getAssetErrorKind: I,
|
|
2316
|
+
getAssetErrorLabel: L,
|
|
2317
|
+
getAssetRenderKey: z,
|
|
2318
|
+
getImageSource: F,
|
|
2319
|
+
isImageReady: N,
|
|
2320
|
+
isMediaReady: P,
|
|
2321
|
+
canRetryAsset: te,
|
|
2314
2322
|
mediaStates: r,
|
|
2315
|
-
onAudioCoverClick:
|
|
2323
|
+
onAudioCoverClick: ee,
|
|
2316
2324
|
onImageError: E,
|
|
2317
2325
|
onImageLoad: T,
|
|
2318
2326
|
onMediaError: O,
|
|
2319
2327
|
onMediaEvent: w,
|
|
2320
|
-
onMediaSeekInput:
|
|
2321
|
-
onMediaVolumeInput:
|
|
2322
|
-
onMediaVolumeToggle:
|
|
2328
|
+
onMediaSeekInput: A,
|
|
2329
|
+
onMediaVolumeInput: j,
|
|
2330
|
+
onMediaVolumeToggle: M,
|
|
2323
2331
|
onVideoClick: k,
|
|
2324
2332
|
registerAudioElement: y,
|
|
2325
2333
|
registerImageElement: b,
|
|
2326
2334
|
registerVideoElement: v,
|
|
2327
2335
|
resetAssetState: S,
|
|
2328
2336
|
resetMediaState: x,
|
|
2329
|
-
retryAsset:
|
|
2337
|
+
retryAsset: B,
|
|
2330
2338
|
syncMediaPlayback: C
|
|
2331
2339
|
};
|
|
2332
2340
|
}
|
|
2333
|
-
function
|
|
2341
|
+
function Pn(e, t, n) {
|
|
2334
2342
|
return Math.min(Math.max(e, t), n);
|
|
2335
2343
|
}
|
|
2336
2344
|
//#endregion
|
|
2337
2345
|
//#region src/components/viewer-core/virtualization.ts
|
|
2338
|
-
var
|
|
2346
|
+
var Fn = {
|
|
2339
2347
|
backward: 1,
|
|
2340
2348
|
forward: 3
|
|
2341
2349
|
};
|
|
2342
|
-
function
|
|
2350
|
+
function In(e, t, n = Fn) {
|
|
2343
2351
|
return t <= 0 ? {
|
|
2344
2352
|
start: 0,
|
|
2345
2353
|
end: -1
|
|
@@ -2348,14 +2356,14 @@ function Fn(e, t, n = Pn) {
|
|
|
2348
2356
|
end: Math.min(t - 1, e + n.forward)
|
|
2349
2357
|
};
|
|
2350
2358
|
}
|
|
2351
|
-
function
|
|
2352
|
-
let r =
|
|
2359
|
+
function Ln(e, t, n = Fn) {
|
|
2360
|
+
let r = In(t, e.length, n);
|
|
2353
2361
|
return r.end < r.start ? [] : e.slice(r.start, r.end + 1).map((e, t) => ({
|
|
2354
2362
|
item: e,
|
|
2355
2363
|
index: r.start + t
|
|
2356
2364
|
}));
|
|
2357
2365
|
}
|
|
2358
|
-
function
|
|
2366
|
+
function Rn(e, t, n, r, i) {
|
|
2359
2367
|
return {
|
|
2360
2368
|
transform: `translate3d(0, ${(e - t) * n + r}px, 0)`,
|
|
2361
2369
|
transition: i ? "none" : "transform 320ms cubic-bezier(0.22, 1, 0.36, 1)"
|
|
@@ -2363,12 +2371,12 @@ function Ln(e, t, n, r, i) {
|
|
|
2363
2371
|
}
|
|
2364
2372
|
//#endregion
|
|
2365
2373
|
//#region src/components/viewer-core/useViewer.ts
|
|
2366
|
-
function
|
|
2367
|
-
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(() =>
|
|
2374
|
+
function zn(e, t, n = {}) {
|
|
2375
|
+
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(() => hn({
|
|
2368
2376
|
itemCount: r.value.length,
|
|
2369
2377
|
loading: s.value,
|
|
2370
2378
|
phase: e.phase
|
|
2371
|
-
})), 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 :
|
|
2379
|
+
})), f = i(() => !1), p = D(null), m = D(0), h = D(!1), g = D(1), _ = n.enabled ?? i(() => !0), v = null, y = 0, b = 0, x = 0, S = i(() => r.value.length === 0 ? 0 : N(a.value, 0, r.value.length - 1)), C = i(() => r.value[S.value] ?? null), w = i(() => C.value?.type === "audio" || C.value?.type === "video" ? C.value : null), T = Nn({
|
|
2372
2380
|
items: r,
|
|
2373
2381
|
activeItem: C,
|
|
2374
2382
|
activeMediaItem: w,
|
|
@@ -2377,68 +2385,68 @@ function Rn(e, t, n = {}) {
|
|
|
2377
2385
|
loopFullscreenVideo: l,
|
|
2378
2386
|
onAssetError: n.onAssetError,
|
|
2379
2387
|
onAssetLoad: n.onAssetLoad
|
|
2380
|
-
}), E = i(() => r.value.length > 0 && S.value === r.value.length - 1), O = i(() =>
|
|
2388
|
+
}), E = i(() => r.value.length > 0 && S.value === r.value.length - 1), O = i(() => gn({
|
|
2381
2389
|
errorMessage: o.value,
|
|
2382
2390
|
hasItems: r.value.length > 0,
|
|
2383
2391
|
hasNextPage: c.value,
|
|
2384
2392
|
phase: d.value,
|
|
2385
2393
|
surface: "fullscreen"
|
|
2386
|
-
})), k = i(() => O.value?.kind ?? null),
|
|
2387
|
-
|
|
2394
|
+
})), k = i(() => O.value?.kind ?? null), ee = i(() => O.value?.message ?? null), A = i(() => Math.min(96, g.value * .15 || 96)), j = i(() => In(S.value, r.value.length)), M = i(() => Ln(r.value, S.value));
|
|
2395
|
+
_n({
|
|
2388
2396
|
enabled: _,
|
|
2389
2397
|
onDisable() {
|
|
2390
|
-
|
|
2398
|
+
H(), T.resetMediaState();
|
|
2391
2399
|
},
|
|
2392
2400
|
onEnable() {
|
|
2393
2401
|
return T.syncMediaPlayback();
|
|
2394
2402
|
},
|
|
2395
2403
|
onKeydown: W,
|
|
2396
|
-
onResize:
|
|
2404
|
+
onResize: P
|
|
2397
2405
|
});
|
|
2398
|
-
function
|
|
2406
|
+
function N(e, t, n) {
|
|
2399
2407
|
return Math.min(Math.max(e, t), n);
|
|
2400
2408
|
}
|
|
2401
|
-
function
|
|
2409
|
+
function P() {
|
|
2402
2410
|
g.value = p.value?.clientHeight || window.innerHeight || 1;
|
|
2403
2411
|
}
|
|
2404
|
-
function
|
|
2405
|
-
return r.value.length === 0 ? !1 :
|
|
2412
|
+
function F(e) {
|
|
2413
|
+
return r.value.length === 0 ? !1 : N(S.value + e, 0, r.value.length - 1) !== S.value;
|
|
2406
2414
|
}
|
|
2407
|
-
function
|
|
2415
|
+
function I(e) {
|
|
2408
2416
|
if (r.value.length === 0) return;
|
|
2409
|
-
let n =
|
|
2417
|
+
let n = N(S.value + e, 0, r.value.length - 1);
|
|
2410
2418
|
n !== S.value && t("update:activeIndex", n);
|
|
2411
2419
|
}
|
|
2412
|
-
function
|
|
2420
|
+
function L(e) {
|
|
2413
2421
|
let t = e > 0, n = e < 0;
|
|
2414
|
-
return t && !
|
|
2422
|
+
return t && !F(-1) || n && !F(1) ? e * .24 : e;
|
|
2415
2423
|
}
|
|
2416
|
-
function
|
|
2424
|
+
function R(e) {
|
|
2417
2425
|
!_.value || r.value.length === 0 || e.pointerType === "mouse" || ye(e.target) || (v = e.pointerId, y = e.clientY, m.value = 0, h.value = !0, p.value?.setPointerCapture?.(e.pointerId));
|
|
2418
2426
|
}
|
|
2419
|
-
function
|
|
2420
|
-
!_.value || !h.value || v !== e.pointerId || (m.value =
|
|
2427
|
+
function te(e) {
|
|
2428
|
+
!_.value || !h.value || v !== e.pointerId || (m.value = L(e.clientY - y));
|
|
2429
|
+
}
|
|
2430
|
+
function z(e) {
|
|
2431
|
+
!_.value || v !== e.pointerId || (p.value?.releasePointerCapture?.(e.pointerId), V());
|
|
2421
2432
|
}
|
|
2422
2433
|
function B(e) {
|
|
2423
2434
|
!_.value || v !== e.pointerId || (p.value?.releasePointerCapture?.(e.pointerId), H());
|
|
2424
2435
|
}
|
|
2425
|
-
function V(
|
|
2426
|
-
|
|
2436
|
+
function V() {
|
|
2437
|
+
Math.abs(m.value) >= A.value && (x = Date.now() + 250, I(m.value < 0 ? 1 : -1)), H();
|
|
2427
2438
|
}
|
|
2428
2439
|
function H() {
|
|
2429
|
-
Math.abs(m.value) >= j.value && (x = Date.now() + 250, L(m.value < 0 ? 1 : -1)), U();
|
|
2430
|
-
}
|
|
2431
|
-
function U() {
|
|
2432
2440
|
m.value = 0, h.value = !1, v = null;
|
|
2433
2441
|
}
|
|
2434
|
-
function
|
|
2442
|
+
function U(e) {
|
|
2435
2443
|
if (!_.value || r.value.length === 0 || h.value || ye(e.target) || Math.abs(e.deltaY) < Math.max(Math.abs(e.deltaX), 24)) return;
|
|
2436
2444
|
e.preventDefault();
|
|
2437
2445
|
let t = Date.now();
|
|
2438
|
-
t < b || (b = t + 400,
|
|
2446
|
+
t < b || (b = t + 400, I(e.deltaY > 0 ? 1 : -1));
|
|
2439
2447
|
}
|
|
2440
2448
|
function W(e) {
|
|
2441
|
-
!_.value || r.value.length === 0 || ve(e.target) || ((e.key === "ArrowDown" || e.key === "PageDown") && (e.preventDefault(),
|
|
2449
|
+
!_.value || r.value.length === 0 || ve(e.target) || ((e.key === "ArrowDown" || e.key === "PageDown") && (e.preventDefault(), I(1)), (e.key === "ArrowUp" || e.key === "PageUp") && (e.preventDefault(), I(-1)));
|
|
2442
2450
|
}
|
|
2443
2451
|
function ne(e, t) {
|
|
2444
2452
|
T.onVideoClick(e, t, x);
|
|
@@ -2462,7 +2470,7 @@ function Rn(e, t, n = {}) {
|
|
|
2462
2470
|
return e.type === "audio";
|
|
2463
2471
|
}
|
|
2464
2472
|
function ie(e) {
|
|
2465
|
-
return
|
|
2473
|
+
return Rn(e, S.value, g.value, m.value, h.value);
|
|
2466
2474
|
}
|
|
2467
2475
|
return {
|
|
2468
2476
|
activeItem: C,
|
|
@@ -2477,7 +2485,7 @@ function Rn(e, t, n = {}) {
|
|
|
2477
2485
|
getAssetErrorKind: T.getAssetErrorKind,
|
|
2478
2486
|
getAssetErrorLabel: T.getAssetErrorLabel,
|
|
2479
2487
|
getAssetRenderKey: T.getAssetRenderKey,
|
|
2480
|
-
formatPlaybackTime:
|
|
2488
|
+
formatPlaybackTime: mn,
|
|
2481
2489
|
getImageSource: T.getImageSource,
|
|
2482
2490
|
getSlideStyle: ie,
|
|
2483
2491
|
hasNextPage: c,
|
|
@@ -2497,45 +2505,45 @@ function Rn(e, t, n = {}) {
|
|
|
2497
2505
|
onMediaSeekInput: K,
|
|
2498
2506
|
onMediaVolumeInput: q,
|
|
2499
2507
|
onMediaVolumeToggle: re,
|
|
2500
|
-
onPointerCancel:
|
|
2501
|
-
onPointerDown:
|
|
2502
|
-
onPointerMove:
|
|
2503
|
-
onPointerUp:
|
|
2508
|
+
onPointerCancel: B,
|
|
2509
|
+
onPointerDown: R,
|
|
2510
|
+
onPointerMove: te,
|
|
2511
|
+
onPointerUp: z,
|
|
2504
2512
|
onVideoClick: ne,
|
|
2505
|
-
onWheel:
|
|
2513
|
+
onWheel: U,
|
|
2506
2514
|
registerAudioElement: T.registerAudioElement,
|
|
2507
2515
|
registerImageElement: T.registerImageElement,
|
|
2508
2516
|
registerVideoElement: T.registerVideoElement,
|
|
2509
|
-
renderedItems:
|
|
2510
|
-
renderedRange:
|
|
2517
|
+
renderedItems: M,
|
|
2518
|
+
renderedRange: j,
|
|
2511
2519
|
resolvedActiveIndex: S,
|
|
2512
2520
|
resetAssetState: T.resetAssetState,
|
|
2513
2521
|
retryInitialLoad: async () => {},
|
|
2514
2522
|
retryAsset: T.retryAsset,
|
|
2515
2523
|
stageRef: p,
|
|
2516
2524
|
statusKind: k,
|
|
2517
|
-
statusMessage:
|
|
2525
|
+
statusMessage: ee,
|
|
2518
2526
|
paginationDetail: u,
|
|
2519
2527
|
phase: d
|
|
2520
2528
|
};
|
|
2521
2529
|
}
|
|
2522
2530
|
//#endregion
|
|
2523
2531
|
//#region src/components/viewer-core/theme.ts
|
|
2524
|
-
var
|
|
2532
|
+
var Bn = "bg-[linear-gradient(180deg,#0a0b10,#05060a)]", Vn = "bg-[linear-gradient(180deg,#0b0c11,#06070b)]", Hn = {
|
|
2525
2533
|
image: !0,
|
|
2526
2534
|
video: !0,
|
|
2527
2535
|
audio: !0,
|
|
2528
2536
|
other: !0
|
|
2529
2537
|
};
|
|
2530
|
-
function Hn(e) {
|
|
2531
|
-
return Vn[e], zn;
|
|
2532
|
-
}
|
|
2533
2538
|
function Un(e) {
|
|
2534
|
-
return
|
|
2539
|
+
return Hn[e], Bn;
|
|
2540
|
+
}
|
|
2541
|
+
function Wn(e) {
|
|
2542
|
+
return Hn[e], Vn;
|
|
2535
2543
|
}
|
|
2536
2544
|
//#endregion
|
|
2537
2545
|
//#region src/components/viewer-core/useFullscreenAssetEvents.ts
|
|
2538
|
-
function
|
|
2546
|
+
function Gn(e) {
|
|
2539
2547
|
function t(t, n) {
|
|
2540
2548
|
return e.fullscreenMedia.shouldHandleSlideAssetEvent(t, n) ? e.fullscreenMedia.getItemKey(n) : null;
|
|
2541
2549
|
}
|
|
@@ -2568,7 +2576,7 @@ function Wn(e) {
|
|
|
2568
2576
|
}
|
|
2569
2577
|
//#endregion
|
|
2570
2578
|
//#region src/components/viewer-core/dominantImageTone.ts
|
|
2571
|
-
function
|
|
2579
|
+
function Kn(e) {
|
|
2572
2580
|
if (e.naturalWidth <= 0 || e.naturalHeight <= 0) return null;
|
|
2573
2581
|
let t = document.createElement("canvas"), n = t.getContext("2d", { willReadFrequently: !0 });
|
|
2574
2582
|
if (!n) return null;
|
|
@@ -2583,20 +2591,20 @@ function Gn(e) {
|
|
|
2583
2591
|
r += d, i += s * d, a += c * d, o += l * d;
|
|
2584
2592
|
}
|
|
2585
2593
|
return r <= 0 ? null : {
|
|
2586
|
-
r:
|
|
2587
|
-
g:
|
|
2588
|
-
b:
|
|
2594
|
+
r: qn(Math.round(i / r)),
|
|
2595
|
+
g: qn(Math.round(a / r)),
|
|
2596
|
+
b: qn(Math.round(o / r))
|
|
2589
2597
|
};
|
|
2590
2598
|
} catch {
|
|
2591
2599
|
return null;
|
|
2592
2600
|
}
|
|
2593
2601
|
}
|
|
2594
|
-
function
|
|
2602
|
+
function qn(e) {
|
|
2595
2603
|
return Math.min(235, Math.max(26, e));
|
|
2596
2604
|
}
|
|
2597
2605
|
//#endregion
|
|
2598
2606
|
//#region src/components/viewer-core/useFullscreenDominantTone.ts
|
|
2599
|
-
function
|
|
2607
|
+
function Jn(e) {
|
|
2600
2608
|
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(() => {
|
|
2601
2609
|
if (!r.value) return;
|
|
2602
2610
|
let { r: e, g: t, b: n } = r.value;
|
|
@@ -2606,12 +2614,12 @@ function qn(e) {
|
|
|
2606
2614
|
let { r: e, g: t, b: n } = r.value;
|
|
2607
2615
|
return { background: `radial-gradient(circle at center, rgba(${e},${t},${n},0.42) 0%, transparent 44%), linear-gradient(180deg,#0b0c11,#06070b)` };
|
|
2608
2616
|
});
|
|
2609
|
-
|
|
2617
|
+
R(() => e.showDominantImageTone.value, (e) => {
|
|
2610
2618
|
e || (t.value = {});
|
|
2611
2619
|
});
|
|
2612
2620
|
function s(n, r) {
|
|
2613
2621
|
if (!e.showDominantImageTone.value) return;
|
|
2614
|
-
let i =
|
|
2622
|
+
let i = Kn(r);
|
|
2615
2623
|
i && (t.value[n] = i);
|
|
2616
2624
|
}
|
|
2617
2625
|
return {
|
|
@@ -2622,7 +2630,7 @@ function qn(e) {
|
|
|
2622
2630
|
}
|
|
2623
2631
|
//#endregion
|
|
2624
2632
|
//#region src/components/viewer-core/useVideoFullscreen.ts
|
|
2625
|
-
function
|
|
2633
|
+
function Yn(e) {
|
|
2626
2634
|
let t = /* @__PURE__ */ new Map();
|
|
2627
2635
|
function n(e, n) {
|
|
2628
2636
|
if (n instanceof HTMLVideoElement) {
|
|
@@ -2633,7 +2641,7 @@ function Jn(e) {
|
|
|
2633
2641
|
}
|
|
2634
2642
|
function r() {
|
|
2635
2643
|
let n = e.activeItem.value, r = n?.type === "video" ? t.get(e.getItemKey(n)) : null;
|
|
2636
|
-
r &&
|
|
2644
|
+
r && Mn(r);
|
|
2637
2645
|
}
|
|
2638
2646
|
return {
|
|
2639
2647
|
registerElement: n,
|
|
@@ -2642,20 +2650,20 @@ function Jn(e) {
|
|
|
2642
2650
|
}
|
|
2643
2651
|
//#endregion
|
|
2644
2652
|
//#region src/components/FullscreenForwardFillPlaceholder.vue?vue&type=script&setup=true&lang.ts
|
|
2645
|
-
var
|
|
2653
|
+
var Xn = {
|
|
2646
2654
|
"data-testid": "vibe-forward-fill-placeholder",
|
|
2647
2655
|
class: "grid h-full min-h-0 place-items-center px-6 text-center"
|
|
2648
|
-
},
|
|
2656
|
+
}, Zn = { class: "grid w-full max-w-[22rem] justify-items-center gap-4 border border-white/14 bg-black/40 px-8 py-7 backdrop-blur-[18px]" }, Qn = { 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)]" }, $n = {
|
|
2649
2657
|
"data-testid": "vibe-forward-fill-message",
|
|
2650
2658
|
class: "m-0 text-[0.78rem] font-bold uppercase tracking-[0.24em] text-[#f7f1ea]/72"
|
|
2651
|
-
},
|
|
2659
|
+
}, er = {
|
|
2652
2660
|
key: 0,
|
|
2653
2661
|
"data-testid": "vibe-forward-fill-progress",
|
|
2654
2662
|
class: "grid w-full gap-2"
|
|
2655
|
-
},
|
|
2663
|
+
}, tr = { class: "flex items-center justify-between gap-4 text-[0.62rem] font-bold uppercase tracking-[0.16em] text-[#f7f1ea]/58" }, nr = { key: 0 }, rr = {
|
|
2656
2664
|
key: 0,
|
|
2657
2665
|
class: "h-1 w-full overflow-hidden bg-white/10"
|
|
2658
|
-
},
|
|
2666
|
+
}, ir = /* @__PURE__ */ d({
|
|
2659
2667
|
__name: "FullscreenForwardFillPlaceholder",
|
|
2660
2668
|
props: {
|
|
2661
2669
|
fillCollectedCount: { default: null },
|
|
@@ -2700,20 +2708,20 @@ var Yn = {
|
|
|
2700
2708
|
function h(e) {
|
|
2701
2709
|
return Math.min(Math.max(e, 0), 1);
|
|
2702
2710
|
}
|
|
2703
|
-
return (e, t) => (w(), s("div",
|
|
2704
|
-
c("span",
|
|
2711
|
+
return (e, t) => (w(), s("div", Xn, [c("div", Zn, [
|
|
2712
|
+
c("span", Qn, [u(P(se), {
|
|
2705
2713
|
class: "h-5 w-5 animate-spin stroke-[1.9] text-[#f7f1ea]/78",
|
|
2706
2714
|
"aria-hidden": "true"
|
|
2707
2715
|
})]),
|
|
2708
|
-
c("p",
|
|
2709
|
-
l.value ? (w(), s("div",
|
|
2716
|
+
c("p", $n, j(n.value), 1),
|
|
2717
|
+
l.value ? (w(), s("div", er, [c("div", tr, [c("span", null, j(l.value), 1), d.value ? (w(), s("span", nr, j(d.value), 1)) : o("", !0)]), a.value === null ? o("", !0) : (w(), s("div", rr, [c("span", {
|
|
2710
2718
|
"data-testid": "vibe-forward-fill-progress-bar",
|
|
2711
2719
|
class: "block h-full bg-[#f7f1ea]/58 transition-[width] duration-200",
|
|
2712
2720
|
style: b(f.value)
|
|
2713
2721
|
}, null, 4)]))])) : o("", !0)
|
|
2714
2722
|
])]));
|
|
2715
2723
|
}
|
|
2716
|
-
}),
|
|
2724
|
+
}), ar = ["data-surface"], or = ["data-surface"], sr = /* @__PURE__ */ d({
|
|
2717
2725
|
inheritAttrs: !1,
|
|
2718
2726
|
__name: "SurfaceEmptyState",
|
|
2719
2727
|
props: {
|
|
@@ -2722,35 +2730,35 @@ var Yn = {
|
|
|
2722
2730
|
surface: {}
|
|
2723
2731
|
},
|
|
2724
2732
|
setup(e) {
|
|
2725
|
-
let t =
|
|
2726
|
-
return (n, r) => e.mode === "inline" ? (w(), s("div", g({ key: 0 },
|
|
2733
|
+
let t = F();
|
|
2734
|
+
return (n, r) => e.mode === "inline" ? (w(), s("div", g({ key: 0 }, P(t), {
|
|
2727
2735
|
"data-testid": "vibe-empty-state-inline",
|
|
2728
2736
|
"data-surface": e.surface,
|
|
2729
2737
|
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)]"]
|
|
2730
|
-
}), [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"]) },
|
|
2738
|
+
}), [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, ar)) : (w(), s("div", g({ key: 1 }, P(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", {
|
|
2731
2739
|
"data-testid": "vibe-empty-state-badge",
|
|
2732
2740
|
"data-surface": e.surface,
|
|
2733
2741
|
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"])
|
|
2734
|
-
},
|
|
2742
|
+
}, j(e.message), 11, or)])], 16));
|
|
2735
2743
|
}
|
|
2736
|
-
}),
|
|
2737
|
-
function
|
|
2744
|
+
}), cr = 1, lr = .5;
|
|
2745
|
+
function ur(e) {
|
|
2738
2746
|
if (e.type !== "image" && e.type !== "video") return {
|
|
2739
|
-
width:
|
|
2740
|
-
height:
|
|
2747
|
+
width: cr,
|
|
2748
|
+
height: cr,
|
|
2741
2749
|
source: "fallback"
|
|
2742
2750
|
};
|
|
2743
2751
|
let t = e.preview?.width, n = e.preview?.height;
|
|
2744
|
-
if (
|
|
2745
|
-
let r =
|
|
2752
|
+
if (yr(t) && yr(n)) {
|
|
2753
|
+
let r = br(e, t, n);
|
|
2746
2754
|
return {
|
|
2747
2755
|
width: r.width,
|
|
2748
2756
|
height: r.height,
|
|
2749
2757
|
source: "preview"
|
|
2750
2758
|
};
|
|
2751
2759
|
}
|
|
2752
|
-
if (
|
|
2753
|
-
let t =
|
|
2760
|
+
if (yr(e.width) && yr(e.height)) {
|
|
2761
|
+
let t = br(e, e.width, e.height);
|
|
2754
2762
|
return {
|
|
2755
2763
|
width: t.width,
|
|
2756
2764
|
height: t.height,
|
|
@@ -2758,24 +2766,24 @@ function lr(e) {
|
|
|
2758
2766
|
};
|
|
2759
2767
|
}
|
|
2760
2768
|
return {
|
|
2761
|
-
width:
|
|
2762
|
-
height:
|
|
2769
|
+
width: cr,
|
|
2770
|
+
height: cr,
|
|
2763
2771
|
source: "fallback"
|
|
2764
2772
|
};
|
|
2765
2773
|
}
|
|
2766
|
-
function
|
|
2774
|
+
function dr(e, t) {
|
|
2767
2775
|
return !e || e <= 0 || !t || t <= 0 ? 1 : Math.max(1, Math.floor(e / t));
|
|
2768
2776
|
}
|
|
2769
|
-
function
|
|
2777
|
+
function fr(e, t, n, r = 0) {
|
|
2770
2778
|
if (!e || e <= 0 || !t || t <= 0) return n;
|
|
2771
2779
|
let i = typeof r == "number" && r > 0 ? r : 0, a = e - Math.max(0, t - 1) * i;
|
|
2772
2780
|
return !a || a <= 0 ? n : a / t;
|
|
2773
2781
|
}
|
|
2774
|
-
function
|
|
2775
|
-
let n =
|
|
2782
|
+
function pr(e, t) {
|
|
2783
|
+
let n = ur(e);
|
|
2776
2784
|
return n.height / n.width * t;
|
|
2777
2785
|
}
|
|
2778
|
-
function
|
|
2786
|
+
function mr(e, t) {
|
|
2779
2787
|
let n = Array.from({ length: t.columnCount }, () => 0), r = {
|
|
2780
2788
|
positions: Array(e.length),
|
|
2781
2789
|
heights: Array(e.length),
|
|
@@ -2784,18 +2792,18 @@ function pr(e, t) {
|
|
|
2784
2792
|
indexById: /* @__PURE__ */ new Map(),
|
|
2785
2793
|
columnHeights: n
|
|
2786
2794
|
};
|
|
2787
|
-
return
|
|
2795
|
+
return hr(r, e, {
|
|
2788
2796
|
...t,
|
|
2789
2797
|
startIndex: 0
|
|
2790
2798
|
}), r;
|
|
2791
2799
|
}
|
|
2792
|
-
function
|
|
2800
|
+
function hr(e, t, n) {
|
|
2793
2801
|
for (let r = 0; r < t.length; r += 1) {
|
|
2794
2802
|
let i = t[r], a = n.startIndex + r;
|
|
2795
|
-
e.indexById.set(
|
|
2803
|
+
e.indexById.set(Q(i), a);
|
|
2796
2804
|
let o = 0;
|
|
2797
2805
|
for (let t = 1; t < e.columnHeights.length; t += 1) e.columnHeights[t] < e.columnHeights[o] && (o = t);
|
|
2798
|
-
let s = o * (n.columnWidth + n.gapX), c = e.columnHeights[o], l =
|
|
2806
|
+
let s = o * (n.columnWidth + n.gapX), c = e.columnHeights[o], l = pr(i, n.columnWidth);
|
|
2799
2807
|
e.positions[a] = {
|
|
2800
2808
|
x: s + (n.positionOffsetX ?? 0),
|
|
2801
2809
|
y: c + (n.positionOffsetY ?? 0)
|
|
@@ -2808,20 +2816,20 @@ function mr(e, t, n) {
|
|
|
2808
2816
|
}
|
|
2809
2817
|
return e;
|
|
2810
2818
|
}
|
|
2811
|
-
function
|
|
2819
|
+
function gr(e, t) {
|
|
2812
2820
|
let n = [...t.columnHeights], r = t.contentHeight;
|
|
2813
2821
|
for (let i of e) {
|
|
2814
2822
|
let e = 0;
|
|
2815
2823
|
for (let t = 1; t < n.length; t += 1) n[t] < n[e] && (e = t);
|
|
2816
|
-
let a = n[e], o =
|
|
2824
|
+
let a = n[e], o = pr(i, t.columnWidth);
|
|
2817
2825
|
n[e] = a + o + t.gapY, r = Math.max(r, a + o);
|
|
2818
2826
|
}
|
|
2819
2827
|
return r;
|
|
2820
2828
|
}
|
|
2821
|
-
function gr(e) {
|
|
2822
|
-
return e.addedItems.length === 0 || e.removedItemCount > 0 || e.isPrepend || e.previousItems.length === 0 || e.layoutItemCount !== e.previousItems.length || e.columnHeights.length !== e.columnCount || e.currentItems.length !== e.previousItems.length + e.addedItems.length ? !1 : e.previousItems.every((t, n) => $(t) === $(e.currentItems[n]));
|
|
2823
|
-
}
|
|
2824
2829
|
function _r(e) {
|
|
2830
|
+
return e.addedItems.length === 0 || e.removedItemCount > 0 || e.isPrepend || e.previousItems.length === 0 || e.layoutItemCount !== e.previousItems.length || e.columnHeights.length !== e.columnCount || e.currentItems.length !== e.previousItems.length + e.addedItems.length ? !1 : e.previousItems.every((t, n) => Q(t) === Q(e.currentItems[n]));
|
|
2831
|
+
}
|
|
2832
|
+
function vr(e) {
|
|
2825
2833
|
if (e.itemCount <= 0) return [];
|
|
2826
2834
|
if (e.viewportHeight <= 0) return Array.from({ length: e.itemCount }, (e, t) => t);
|
|
2827
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();
|
|
@@ -2831,11 +2839,11 @@ function _r(e) {
|
|
|
2831
2839
|
}
|
|
2832
2840
|
return Array.from(a).sort((e, t) => e - t);
|
|
2833
2841
|
}
|
|
2834
|
-
function
|
|
2842
|
+
function yr(e) {
|
|
2835
2843
|
return typeof e == "number" && Number.isFinite(e) && e > 0;
|
|
2836
2844
|
}
|
|
2837
|
-
function
|
|
2838
|
-
return e.type !== "image" || n / t >=
|
|
2845
|
+
function br(e, t, n) {
|
|
2846
|
+
return e.type !== "image" || n / t >= lr ? {
|
|
2839
2847
|
width: t,
|
|
2840
2848
|
height: n
|
|
2841
2849
|
} : {
|
|
@@ -2845,9 +2853,9 @@ function yr(e, t, n) {
|
|
|
2845
2853
|
}
|
|
2846
2854
|
//#endregion
|
|
2847
2855
|
//#region src/components/viewer-core/listPreview.ts
|
|
2848
|
-
var
|
|
2849
|
-
function
|
|
2850
|
-
let t =
|
|
2856
|
+
var xr = /\.(avif|gif|jpe?g|png|svg|webp)(\?|#|$)/i, Sr = /\.(m4v|mov|mp4|mpeg|ogg|ogv|webm)(\?|#|$)/i, Cr = /^(?:(?:https?:)?\/\/[^/]+)?\/api\/files\/[^/?#]+\/(?:preview|downloaded)(?:\?|#|$)/i;
|
|
2857
|
+
function wr(e) {
|
|
2858
|
+
let t = Tr(e), n = t?.url, r = ur(e), i = e.title?.trim() || Xt(e.type);
|
|
2851
2859
|
return t?.mediaType === "video" && typeof n == "string" ? {
|
|
2852
2860
|
kind: "video",
|
|
2853
2861
|
url: n,
|
|
@@ -2866,13 +2874,13 @@ function Cr(e) {
|
|
|
2866
2874
|
width: r.width,
|
|
2867
2875
|
height: r.height,
|
|
2868
2876
|
label: i
|
|
2869
|
-
} : typeof n == "string" &&
|
|
2877
|
+
} : typeof n == "string" && Dr(e, n) ? {
|
|
2870
2878
|
kind: "video",
|
|
2871
2879
|
url: n,
|
|
2872
2880
|
width: r.width,
|
|
2873
2881
|
height: r.height,
|
|
2874
2882
|
label: i
|
|
2875
|
-
} : typeof n == "string" &&
|
|
2883
|
+
} : typeof n == "string" && Er(e, n) ? {
|
|
2876
2884
|
kind: "image",
|
|
2877
2885
|
url: n,
|
|
2878
2886
|
width: r.width,
|
|
@@ -2886,51 +2894,51 @@ function Cr(e) {
|
|
|
2886
2894
|
label: i
|
|
2887
2895
|
};
|
|
2888
2896
|
}
|
|
2889
|
-
function
|
|
2897
|
+
function Tr(e) {
|
|
2890
2898
|
return e.preview?.url ? e.preview : typeof e.url != "string" || e.url.trim() === "" ? null : { url: e.url };
|
|
2891
2899
|
}
|
|
2892
|
-
function Tr(e, t) {
|
|
2893
|
-
return e.type !== "image" || typeof t != "string" ? !1 : br.test(t) || Dr(t);
|
|
2894
|
-
}
|
|
2895
2900
|
function Er(e, t) {
|
|
2896
|
-
return e.type !== "
|
|
2901
|
+
return e.type !== "image" || typeof t != "string" ? !1 : xr.test(t) || Or(t);
|
|
2897
2902
|
}
|
|
2898
|
-
function Dr(e) {
|
|
2899
|
-
return
|
|
2903
|
+
function Dr(e, t) {
|
|
2904
|
+
return e.type !== "video" || typeof t != "string" ? !1 : Sr.test(t) || kr(t);
|
|
2900
2905
|
}
|
|
2901
2906
|
function Or(e) {
|
|
2902
|
-
return
|
|
2907
|
+
return /^(https?:\/\/|\/\/|\/(?!\/)|\.{1,2}\/|blob:|data:)/i.test(e);
|
|
2908
|
+
}
|
|
2909
|
+
function kr(e) {
|
|
2910
|
+
return Cr.test(e) || /^blob:/i.test(e) || /^data:video\//i.test(e);
|
|
2903
2911
|
}
|
|
2904
2912
|
//#endregion
|
|
2905
2913
|
//#region src/components/viewer-core/fullscreenPreviews.ts
|
|
2906
|
-
function
|
|
2914
|
+
function Ar(e, t, n = 2) {
|
|
2907
2915
|
return e.slice(t + 1, t + 1 + n).map((e, n) => ({
|
|
2908
|
-
asset:
|
|
2916
|
+
asset: wr(e),
|
|
2909
2917
|
index: t + n + 1,
|
|
2910
2918
|
item: e
|
|
2911
2919
|
}));
|
|
2912
2920
|
}
|
|
2913
2921
|
//#endregion
|
|
2914
2922
|
//#region src/components/FullscreenSurface.vue?vue&type=script&setup=true&lang.ts
|
|
2915
|
-
var
|
|
2923
|
+
var jr = { class: "relative flex h-full min-h-0 flex-col overflow-hidden bg-[#05060a] text-[#f7f1ea]" }, Mr = { class: "relative z-[1] flex h-full min-h-0" }, Nr = { class: "relative flex min-h-0 min-w-0 flex-1 flex-col" }, Pr = { class: "relative min-h-0 flex-1" }, Fr = {
|
|
2916
2924
|
key: 0,
|
|
2917
2925
|
class: "relative h-full min-h-0"
|
|
2918
|
-
},
|
|
2926
|
+
}, Ir = [
|
|
2919
2927
|
"data-item-id",
|
|
2920
2928
|
"data-occurrence-key",
|
|
2921
2929
|
"data-index",
|
|
2922
2930
|
"data-active",
|
|
2923
2931
|
"aria-hidden"
|
|
2924
|
-
],
|
|
2932
|
+
], Lr = {
|
|
2925
2933
|
key: 0,
|
|
2926
2934
|
"data-testid": "vibe-asset-spinner",
|
|
2927
2935
|
class: "pointer-events-none absolute inset-0 z-[2] grid place-items-center"
|
|
2928
|
-
},
|
|
2936
|
+
}, Rr = { 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]" }, zr = ["data-kind"], Br = { class: "grid justify-items-center gap-4 border border-white/14 bg-black/45 px-8 py-7 text-center backdrop-blur-[18px]" }, Vr = { class: "m-0 text-[0.82rem] font-bold uppercase tracking-[0.28em] text-[#f7f1ea]/70" }, Hr = ["onClick"], Ur = [
|
|
2929
2937
|
"src",
|
|
2930
2938
|
"alt",
|
|
2931
2939
|
"onLoad",
|
|
2932
2940
|
"onError"
|
|
2933
|
-
],
|
|
2941
|
+
], Wr = [
|
|
2934
2942
|
"loop",
|
|
2935
2943
|
"src",
|
|
2936
2944
|
"preload",
|
|
@@ -2949,18 +2957,18 @@ var Ar = { class: "relative flex h-full min-h-0 flex-col overflow-hidden bg-[#05
|
|
|
2949
2957
|
"onStalled",
|
|
2950
2958
|
"onTimeupdate",
|
|
2951
2959
|
"onWaiting"
|
|
2952
|
-
],
|
|
2960
|
+
], Gr = { class: "relative grid aspect-square w-[clamp(320px,46vw,560px)] max-w-[calc(100vw-2.5rem)] place-items-center" }, Kr = [
|
|
2953
2961
|
"aria-label",
|
|
2954
2962
|
"disabled",
|
|
2955
2963
|
"onClick"
|
|
2956
|
-
],
|
|
2964
|
+
], qr = ["src", "alt"], Jr = {
|
|
2957
2965
|
key: 1,
|
|
2958
2966
|
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]"
|
|
2959
|
-
},
|
|
2967
|
+
}, Yr = { 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]" }, Xr = {
|
|
2960
2968
|
key: 0,
|
|
2961
2969
|
"data-testid": "vibe-asset-spinner",
|
|
2962
2970
|
class: "pointer-events-none absolute inset-0 z-[3] grid place-items-center"
|
|
2963
|
-
},
|
|
2971
|
+
}, Zr = { 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]" }, Qr = ["data-kind"], $r = { class: "m-0 text-[0.82rem] font-bold uppercase tracking-[0.28em] text-[#f7f1ea]/70" }, ei = ["onClick"], ti = [
|
|
2964
2972
|
"src",
|
|
2965
2973
|
"preload",
|
|
2966
2974
|
"onCanplay",
|
|
@@ -2976,25 +2984,25 @@ var Ar = { class: "relative flex h-full min-h-0 flex-col overflow-hidden bg-[#05
|
|
|
2976
2984
|
"onStalled",
|
|
2977
2985
|
"onTimeupdate",
|
|
2978
2986
|
"onWaiting"
|
|
2979
|
-
],
|
|
2987
|
+
], ni = {
|
|
2980
2988
|
key: 2,
|
|
2981
2989
|
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"
|
|
2982
|
-
},
|
|
2990
|
+
}, ri = { 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]" }, ii = {
|
|
2983
2991
|
key: 0,
|
|
2984
2992
|
"data-testid": "vibe-fullscreen-overlay",
|
|
2985
2993
|
class: "pointer-events-none absolute inset-0 z-[6]"
|
|
2986
|
-
},
|
|
2994
|
+
}, ai = { class: "h-full w-full" }, oi = {
|
|
2987
2995
|
key: 0,
|
|
2988
2996
|
"data-testid": "vibe-fullscreen-aside-column",
|
|
2989
2997
|
class: "vibe-fullscreen-aside-column-shell relative h-full min-h-0 shrink-0 overflow-hidden"
|
|
2990
|
-
},
|
|
2998
|
+
}, si = {
|
|
2991
2999
|
"data-testid": "vibe-fullscreen-aside",
|
|
2992
3000
|
class: "absolute inset-y-0 right-0 h-full min-h-0 w-[var(--vibe-fullscreen-aside-width,22rem)] overflow-hidden border-l border-white/10 bg-black/45 backdrop-blur-[18px]"
|
|
2993
|
-
},
|
|
3001
|
+
}, ci = { class: "h-full min-h-0 overflow-y-auto overscroll-y-contain" }, li = {
|
|
2994
3002
|
key: 0,
|
|
2995
3003
|
"data-testid": "vibe-fullscreen-aside",
|
|
2996
3004
|
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]"
|
|
2997
|
-
},
|
|
3005
|
+
}, ui = { class: "h-full min-h-0 overflow-y-auto overscroll-y-contain" }, di = 1280, fi = 768, pi = /* @__PURE__ */ d({
|
|
2998
3006
|
__name: "FullscreenSurface",
|
|
2999
3007
|
props: {
|
|
3000
3008
|
active: {
|
|
@@ -3054,48 +3062,48 @@ var Ar = { class: "relative flex h-full min-h-0 flex-col overflow-hidden bg-[#05
|
|
|
3054
3062
|
},
|
|
3055
3063
|
emits: ["back-to-list", "update:activeIndex"],
|
|
3056
3064
|
setup(e, { emit: n }) {
|
|
3057
|
-
let d = e, f =
|
|
3065
|
+
let d = e, f = I(), m = n, h = zn(d, (e, t) => {
|
|
3058
3066
|
m("update:activeIndex", t);
|
|
3059
3067
|
}, {
|
|
3060
|
-
enabled:
|
|
3068
|
+
enabled: M(d, "active"),
|
|
3061
3069
|
onAssetError: d.reportAssetError ?? void 0,
|
|
3062
3070
|
onAssetLoad: d.reportAssetLoad ?? void 0
|
|
3063
|
-
}), _ = D(typeof window > "u" ?
|
|
3064
|
-
active:
|
|
3071
|
+
}), _ = D(typeof window > "u" ? di : window.innerWidth || di), C = ln({
|
|
3072
|
+
active: M(d, "active"),
|
|
3065
3073
|
items: h.items,
|
|
3066
3074
|
resolvedActiveIndex: h.resolvedActiveIndex,
|
|
3067
3075
|
viewer: h
|
|
3068
|
-
}), T =
|
|
3076
|
+
}), T = Yn({
|
|
3069
3077
|
activeItem: h.activeItem,
|
|
3070
3078
|
getItemKey: C.getItemKey
|
|
3071
|
-
}), E = i(() =>
|
|
3079
|
+
}), E = i(() => Un(h.activeItem.value?.type ?? "image")), { activeSlideToneStyle: A, activeStageToneStyle: N, updateFromImageElement: F } = Jn({
|
|
3072
3080
|
activeItem: h.activeItem,
|
|
3073
3081
|
getItemKey: C.getItemKey,
|
|
3074
3082
|
isImageReady: h.isImageReady,
|
|
3075
|
-
showDominantImageTone:
|
|
3076
|
-
}),
|
|
3083
|
+
showDominantImageTone: M(d, "showDominantImageTone")
|
|
3084
|
+
}), L = Gn({
|
|
3077
3085
|
fullscreenMedia: C,
|
|
3078
3086
|
updateDominantToneFromImageElement: xe,
|
|
3079
3087
|
viewer: h
|
|
3080
|
-
}),
|
|
3088
|
+
}), R = i(() => !!h.activeMediaItem.value && !h.activeAssetErrorKind.value), te = i(() => _.value < fi ? "vertical" : "horizontal"), B = i(() => d.activeIndex >= d.items.length && (d.loading || d.hasNextPage)), H = i(() => {
|
|
3081
3089
|
let e = h.activeItem.value;
|
|
3082
3090
|
return e ? {
|
|
3083
3091
|
hasNextPage: d.hasNextPage,
|
|
3084
3092
|
index: h.resolvedActiveIndex.value,
|
|
3085
3093
|
item: e,
|
|
3086
3094
|
loading: d.loading,
|
|
3087
|
-
nextPreviews:
|
|
3095
|
+
nextPreviews: Ar(h.items.value, h.resolvedActiveIndex.value),
|
|
3088
3096
|
paginationDetail: d.paginationDetail,
|
|
3089
3097
|
total: d.items.length
|
|
3090
3098
|
} : null;
|
|
3091
|
-
}),
|
|
3092
|
-
...
|
|
3099
|
+
}), U = i(() => !H.value || !f["fullscreen-header-actions"] ? [] : f["fullscreen-header-actions"](H.value)), W = i(() => !H.value || !f["fullscreen-footer"] ? [] : f["fullscreen-footer"](H.value)), ne = i(() => !H.value || !f["fullscreen-aside"] ? [] : f["fullscreen-aside"](H.value)), G = i(() => !d.showStatusBadges || !H.value || !h.statusKind.value || !h.statusMessage.value ? null : {
|
|
3100
|
+
...H.value,
|
|
3093
3101
|
kind: h.statusKind.value,
|
|
3094
3102
|
message: h.statusMessage.value
|
|
3095
|
-
}), K = i(() => !G.value || !f["fullscreen-status"] ? [] : f["fullscreen-status"](G.value)), q = i(() =>
|
|
3096
|
-
emptyStateMode:
|
|
3103
|
+
}), K = i(() => !G.value || !f["fullscreen-status"] ? [] : f["fullscreen-status"](G.value)), q = i(() => un(U.value)), re = i(() => un(ne.value)), J = i(() => un(W.value)), Y = i(() => re.value && _.value >= di), ie = i(() => re.value && !Y.value), ae = i(() => un(K.value)), oe = i(() => !!(h.activeItem.value && (d.showBackToList || h.activeItem.value.title || h.items.value.length || q.value))), ce = i(() => d.showEndBadge && h.isAtEnd.value && !h.hasNextPage.value && !h.loading.value), fe = i(() => J.value || !!G.value || ce.value), pe = i(() => R.value ? "pb-[5.75rem] max-[720px]:pb-[7rem]" : ""), { emptyStateProps: X, showBadgeEmptyState: me, showCustomEmptyState: he, showInlineEmptyState: ge } = pn({
|
|
3104
|
+
emptyStateMode: M(d, "emptyStateMode"),
|
|
3097
3105
|
itemCount: i(() => d.items.length),
|
|
3098
|
-
loading:
|
|
3106
|
+
loading: M(d, "loading"),
|
|
3099
3107
|
renderSlot: f["empty-state"],
|
|
3100
3108
|
surface: "fullscreen"
|
|
3101
3109
|
});
|
|
@@ -3105,7 +3113,7 @@ var Ar = { class: "relative flex h-full min-h-0 flex-col overflow-hidden bg-[#05
|
|
|
3105
3113
|
window.removeEventListener("resize", _e);
|
|
3106
3114
|
});
|
|
3107
3115
|
function _e() {
|
|
3108
|
-
_.value = window.innerWidth ||
|
|
3116
|
+
_.value = window.innerWidth || di;
|
|
3109
3117
|
}
|
|
3110
3118
|
function ve(e, t) {
|
|
3111
3119
|
C.registerImageElement(e, t), h.registerImageElement(e, t), t instanceof HTMLImageElement && xe(e, t);
|
|
@@ -3117,14 +3125,14 @@ var Ar = { class: "relative flex h-full min-h-0 flex-col overflow-hidden bg-[#05
|
|
|
3117
3125
|
C.registerMediaElement(e, t), h.registerAudioElement(e, t);
|
|
3118
3126
|
}
|
|
3119
3127
|
function Z(e, t, n) {
|
|
3120
|
-
let r =
|
|
3128
|
+
let r = L.onFullscreenMediaEvent(e, t, n), i = n.currentTarget, a = typeof HTMLMediaElement > "u" ? 1 : HTMLMediaElement.HAVE_METADATA;
|
|
3121
3129
|
r && i instanceof HTMLMediaElement && i.readyState >= a && C.settleAssetPreload(r);
|
|
3122
3130
|
}
|
|
3123
3131
|
function xe(e, t) {
|
|
3124
|
-
|
|
3132
|
+
F(e, t);
|
|
3125
3133
|
}
|
|
3126
3134
|
function Se(e, t, n) {
|
|
3127
|
-
let r =
|
|
3135
|
+
let r = L.getHandledItemKey(t, n);
|
|
3128
3136
|
if (!r || (h.onMediaEvent(r, e), !d.loopFullscreenVideo)) return;
|
|
3129
3137
|
let i = e.currentTarget;
|
|
3130
3138
|
if (!(i instanceof HTMLVideoElement)) return;
|
|
@@ -3134,24 +3142,24 @@ var Ar = { class: "relative flex h-full min-h-0 flex-col overflow-hidden bg-[#05
|
|
|
3134
3142
|
let a = i.play();
|
|
3135
3143
|
a && typeof a.catch == "function" && a.catch(() => {});
|
|
3136
3144
|
}
|
|
3137
|
-
return (e, n) => (w(), s("div",
|
|
3145
|
+
return (e, n) => (w(), s("div", jr, [
|
|
3138
3146
|
c("div", {
|
|
3139
3147
|
class: v(["absolute inset-0 transition-[background] duration-200", E.value]),
|
|
3140
|
-
style: b(
|
|
3148
|
+
style: b(P(N))
|
|
3141
3149
|
}, null, 6),
|
|
3142
|
-
c("div",
|
|
3143
|
-
oe.value ? (w(), a(
|
|
3150
|
+
c("div", Mr, [c("div", Nr, [
|
|
3151
|
+
oe.value ? (w(), a(Vt, {
|
|
3144
3152
|
key: 0,
|
|
3145
|
-
"current-index":
|
|
3153
|
+
"current-index": P(h).resolvedActiveIndex.value,
|
|
3146
3154
|
loading: d.loading,
|
|
3147
|
-
"pagination-detail":
|
|
3155
|
+
"pagination-detail": P(h).paginationDetail.value,
|
|
3148
3156
|
"show-back-to-list": d.showBackToList,
|
|
3149
|
-
title:
|
|
3150
|
-
total:
|
|
3157
|
+
title: P(h).activeItem.value?.title ?? null,
|
|
3158
|
+
total: P(h).items.value.length,
|
|
3151
3159
|
onBackToList: n[0] ||= (e) => m("back-to-list")
|
|
3152
|
-
}, l({ _: 2 }, [q.value &&
|
|
3160
|
+
}, l({ _: 2 }, [q.value && H.value ? {
|
|
3153
3161
|
name: "actions",
|
|
3154
|
-
fn:
|
|
3162
|
+
fn: z(() => [k(e.$slots, "fullscreen-header-actions", y(p(H.value)))]),
|
|
3155
3163
|
key: "0"
|
|
3156
3164
|
} : void 0]), 1032, [
|
|
3157
3165
|
"current-index",
|
|
@@ -3161,77 +3169,77 @@ var Ar = { class: "relative flex h-full min-h-0 flex-col overflow-hidden bg-[#05
|
|
|
3161
3169
|
"title",
|
|
3162
3170
|
"total"
|
|
3163
3171
|
])) : o("", !0),
|
|
3164
|
-
c("div",
|
|
3172
|
+
c("div", Pr, [c("div", {
|
|
3165
3173
|
ref: "viewer.stageRef",
|
|
3166
3174
|
"data-testid": "vibe-stage",
|
|
3167
3175
|
class: "relative h-full min-h-0 touch-none overflow-hidden",
|
|
3168
|
-
onPointerdown: n[1] ||= (...e) =>
|
|
3169
|
-
onPointermove: n[2] ||= (...e) =>
|
|
3170
|
-
onPointerup: n[3] ||= (...e) =>
|
|
3171
|
-
onPointercancel: n[4] ||= (...e) =>
|
|
3172
|
-
onWheel: n[5] ||= (...e) =>
|
|
3173
|
-
}, [
|
|
3174
|
-
(w(!0), s(t, null, O(
|
|
3175
|
-
key:
|
|
3176
|
+
onPointerdown: n[1] ||= (...e) => P(h).onPointerDown && P(h).onPointerDown(...e),
|
|
3177
|
+
onPointermove: n[2] ||= (...e) => P(h).onPointerMove && P(h).onPointerMove(...e),
|
|
3178
|
+
onPointerup: n[3] ||= (...e) => P(h).onPointerUp && P(h).onPointerUp(...e),
|
|
3179
|
+
onPointercancel: n[4] ||= (...e) => P(h).onPointerCancel && P(h).onPointerCancel(...e),
|
|
3180
|
+
onWheel: n[5] ||= (...e) => P(h).onWheel && P(h).onWheel(...e)
|
|
3181
|
+
}, [P(h).activeItem.value ? (w(), s("div", Fr, [
|
|
3182
|
+
(w(!0), s(t, null, O(P(h).renderedItems.value, ({ item: r, index: i }) => (w(), s("article", {
|
|
3183
|
+
key: P(C).getItemKey(r),
|
|
3176
3184
|
"data-testid": "vibe-slide",
|
|
3177
3185
|
"data-item-id": r.id,
|
|
3178
|
-
"data-occurrence-key":
|
|
3186
|
+
"data-occurrence-key": P(C).getItemKey(r),
|
|
3179
3187
|
"data-index": i,
|
|
3180
|
-
"data-active": i ===
|
|
3181
|
-
"aria-hidden": i ===
|
|
3182
|
-
class: v(["absolute inset-0 flex h-full min-h-full items-center justify-center will-change-transform", i ===
|
|
3183
|
-
style: b(
|
|
3188
|
+
"data-active": i === P(h).resolvedActiveIndex.value,
|
|
3189
|
+
"aria-hidden": i === P(h).resolvedActiveIndex.value ? "false" : "true",
|
|
3190
|
+
class: v(["absolute inset-0 flex h-full min-h-full items-center justify-center will-change-transform", i === P(h).resolvedActiveIndex.value ? "pointer-events-auto" : "pointer-events-none"]),
|
|
3191
|
+
style: b(P(h).getSlideStyle(i))
|
|
3184
3192
|
}, [c("div", {
|
|
3185
|
-
class: v(["absolute inset-0 opacity-85",
|
|
3186
|
-
style: b(i ===
|
|
3187
|
-
}, null, 6),
|
|
3193
|
+
class: v(["absolute inset-0 opacity-85", P(Wn)(r.type)]),
|
|
3194
|
+
style: b(i === P(h).resolvedActiveIndex.value && r.type === "image" ? P(A) : void 0)
|
|
3195
|
+
}, null, 6), P(h).isVisual(r) ? (w(), s("div", {
|
|
3188
3196
|
key: 0,
|
|
3189
|
-
class: v(["relative z-[1] flex h-full w-full items-center justify-center overflow-hidden", i ===
|
|
3190
|
-
}, [
|
|
3197
|
+
class: v(["relative z-[1] flex h-full w-full items-center justify-center overflow-hidden", i === P(h).resolvedActiveIndex.value ? pe.value : ""])
|
|
3198
|
+
}, [P(C).isAssetLoading(i, r) ? (w(), s("div", Lr, [c("span", Rr, [u(P(se), {
|
|
3191
3199
|
class: "h-5 w-5 animate-spin stroke-[1.9] text-[#f7f1ea]/78",
|
|
3192
3200
|
"aria-hidden": "true"
|
|
3193
|
-
})])])) : o("", !0),
|
|
3201
|
+
})])])) : o("", !0), P(C).isAssetErrored(i, r) ? (w(), s("div", {
|
|
3194
3202
|
key: 1,
|
|
3195
3203
|
"data-testid": "vibe-asset-error",
|
|
3196
|
-
"data-kind":
|
|
3204
|
+
"data-kind": P(C).getAssetErrorKind(r),
|
|
3197
3205
|
class: "grid h-full w-full place-items-center"
|
|
3198
|
-
}, [c("div",
|
|
3199
|
-
u(
|
|
3206
|
+
}, [c("div", Br, [
|
|
3207
|
+
u(P(de), {
|
|
3200
3208
|
class: "h-7 w-7 stroke-[1.9] text-[#f7f1ea]/72",
|
|
3201
3209
|
"aria-hidden": "true"
|
|
3202
3210
|
}),
|
|
3203
|
-
c("p",
|
|
3204
|
-
|
|
3211
|
+
c("p", Vr, j(P(C).getAssetErrorLabel(r)), 1),
|
|
3212
|
+
P(h).canRetryAsset(P(C).getItemKey(r)) ? (w(), s("button", {
|
|
3205
3213
|
key: 0,
|
|
3206
3214
|
type: "button",
|
|
3207
3215
|
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",
|
|
3208
|
-
onClick:
|
|
3209
|
-
}, " Retry ", 8,
|
|
3210
|
-
])], 8,
|
|
3211
|
-
key:
|
|
3212
|
-
src:
|
|
3216
|
+
onClick: V((e) => P(h).retryAsset(P(C).getItemKey(r)), ["stop"])
|
|
3217
|
+
}, " Retry ", 8, Hr)) : o("", !0)
|
|
3218
|
+
])], 8, zr)) : r.type === "image" ? (w(), s("img", {
|
|
3219
|
+
key: P(h).getAssetRenderKey(P(C).getItemKey(r)),
|
|
3220
|
+
src: P(C).getFullscreenImageSource(i, r),
|
|
3213
3221
|
alt: r.title ?? "",
|
|
3214
3222
|
crossorigin: "anonymous",
|
|
3215
3223
|
draggable: "false",
|
|
3216
|
-
class: v(["block h-auto max-h-full w-auto max-w-full object-contain shadow-[0_40px_120px_-60px_rgba(0,0,0,0.9)] transition-opacity duration-300",
|
|
3224
|
+
class: v(["block h-auto max-h-full w-auto max-w-full object-contain shadow-[0_40px_120px_-60px_rgba(0,0,0,0.9)] transition-opacity duration-300", P(h).isImageReady(P(C).getItemKey(r)) ? "opacity-100" : "opacity-0"]),
|
|
3217
3225
|
ref_for: !0,
|
|
3218
|
-
ref: (e) => ve(
|
|
3219
|
-
onLoad: (e) =>
|
|
3220
|
-
onError: (e) =>
|
|
3221
|
-
}, null, 42,
|
|
3222
|
-
key:
|
|
3223
|
-
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",
|
|
3226
|
+
ref: (e) => ve(P(C).getItemKey(r), e),
|
|
3227
|
+
onLoad: (e) => P(L).onFullscreenImageLoad(e, i, r),
|
|
3228
|
+
onError: (e) => P(L).onFullscreenImageError(i, r)
|
|
3229
|
+
}, null, 42, Ur)) : (w(), s("video", {
|
|
3230
|
+
key: P(h).getAssetRenderKey(P(C).getItemKey(r)),
|
|
3231
|
+
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", P(h).isMediaReady(P(C).getItemKey(r)) ? "opacity-100" : "opacity-0"]),
|
|
3224
3232
|
playsinline: "",
|
|
3225
3233
|
loop: d.loopFullscreenVideo,
|
|
3226
|
-
src:
|
|
3227
|
-
preload:
|
|
3234
|
+
src: P(C).getFullscreenMediaSource(i, r),
|
|
3235
|
+
preload: P(C).getFullscreenMediaPreload(i),
|
|
3228
3236
|
ref_for: !0,
|
|
3229
|
-
ref: (e) => ye(
|
|
3230
|
-
onClick:
|
|
3237
|
+
ref: (e) => ye(P(C).getItemKey(r), e),
|
|
3238
|
+
onClick: V((e) => P(h).onVideoClick(e, P(C).getItemKey(r)), ["stop"]),
|
|
3231
3239
|
onCanplay: (e) => Z(i, r, e),
|
|
3232
3240
|
onDurationchange: (e) => Z(i, r, e),
|
|
3233
3241
|
onEnded: (e) => Se(e, i, r),
|
|
3234
|
-
onError: (e) =>
|
|
3242
|
+
onError: (e) => P(L).onFullscreenMediaError(i, r),
|
|
3235
3243
|
onLoadstart: (e) => Z(i, r, e),
|
|
3236
3244
|
onLoadedmetadata: (e) => Z(i, r, e),
|
|
3237
3245
|
onPause: (e) => Z(i, r, e),
|
|
@@ -3242,70 +3250,70 @@ var Ar = { class: "relative flex h-full min-h-0 flex-col overflow-hidden bg-[#05
|
|
|
3242
3250
|
onStalled: (e) => Z(i, r, e),
|
|
3243
3251
|
onTimeupdate: (e) => Z(i, r, e),
|
|
3244
3252
|
onWaiting: (e) => Z(i, r, e)
|
|
3245
|
-
}, null, 42,
|
|
3253
|
+
}, null, 42, Wr))], 2)) : P(h).isAudio(r) ? (w(), s("div", {
|
|
3246
3254
|
key: 1,
|
|
3247
|
-
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 ===
|
|
3248
|
-
}, [c("div",
|
|
3255
|
+
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 === P(h).resolvedActiveIndex.value ? pe.value : ""])
|
|
3256
|
+
}, [c("div", Gr, [
|
|
3249
3257
|
c("button", {
|
|
3250
3258
|
type: "button",
|
|
3251
3259
|
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]",
|
|
3252
|
-
"aria-label":
|
|
3253
|
-
disabled: !!
|
|
3254
|
-
onClick: (e) =>
|
|
3260
|
+
"aria-label": P(h).mediaStates.value[P(C).getItemKey(r)]?.paused ?? !0 ? P(C).getMediaActionLabel("Play", r) : P(C).getMediaActionLabel("Pause", r),
|
|
3261
|
+
disabled: !!P(C).getAssetErrorKind(r),
|
|
3262
|
+
onClick: (e) => P(h).onAudioCoverClick(e, P(C).getItemKey(r))
|
|
3255
3263
|
}, [
|
|
3256
|
-
|
|
3264
|
+
P(C).getFullscreenAudioCoverSource(r) ? (w(), s("img", {
|
|
3257
3265
|
key: 0,
|
|
3258
3266
|
"data-testid": "vibe-fullscreen-audio-cover",
|
|
3259
|
-
src:
|
|
3267
|
+
src: P(C).getFullscreenAudioCoverSource(r) ?? void 0,
|
|
3260
3268
|
alt: r.title ?? "",
|
|
3261
3269
|
draggable: "false",
|
|
3262
3270
|
class: "pointer-events-none absolute inset-0 h-full w-full object-cover"
|
|
3263
|
-
}, null, 8,
|
|
3271
|
+
}, null, 8, qr)) : o("", !0),
|
|
3264
3272
|
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),
|
|
3265
3273
|
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),
|
|
3266
|
-
|
|
3267
|
-
icon:
|
|
3274
|
+
P(C).getFullscreenAudioCoverSource(r) ? o("", !0) : (w(), s("span", Jr, [k(e.$slots, "item-icon", {
|
|
3275
|
+
icon: P(Yt)(r.type),
|
|
3268
3276
|
item: r
|
|
3269
|
-
}, () => [(w(), a(
|
|
3277
|
+
}, () => [(w(), a(ee(P(Yt)(r.type)), {
|
|
3270
3278
|
class: "h-6 w-6 stroke-[1.9]",
|
|
3271
3279
|
"aria-hidden": "true"
|
|
3272
3280
|
}))])])),
|
|
3273
|
-
c("span",
|
|
3281
|
+
c("span", Yr, [(w(), a(ee(P(h).mediaStates.value[P(C).getItemKey(r)]?.paused ?? !0 ? P(ue) : P(le)), {
|
|
3274
3282
|
class: "h-4 w-4 stroke-2",
|
|
3275
3283
|
"aria-hidden": "true"
|
|
3276
3284
|
}))])
|
|
3277
|
-
], 8,
|
|
3278
|
-
|
|
3285
|
+
], 8, Kr),
|
|
3286
|
+
P(C).isAssetLoading(i, r) ? (w(), s("div", Xr, [c("span", Zr, [u(P(se), {
|
|
3279
3287
|
class: "h-5 w-5 animate-spin stroke-[1.9] text-[#f7f1ea]/78",
|
|
3280
3288
|
"aria-hidden": "true"
|
|
3281
3289
|
})])])) : o("", !0),
|
|
3282
|
-
|
|
3290
|
+
P(C).getAssetErrorKind(r) ? (w(), s(t, { key: 1 }, [n[8] ||= c("div", { class: "pointer-events-none absolute inset-0 border border-white/8 bg-[radial-gradient(circle,rgba(239,68,68,0.12),transparent_66%)]" }, null, -1), c("div", {
|
|
3283
3291
|
"data-testid": "vibe-asset-error",
|
|
3284
|
-
"data-kind":
|
|
3292
|
+
"data-kind": P(C).getAssetErrorKind(r),
|
|
3285
3293
|
class: "relative z-[1] grid justify-items-center gap-4"
|
|
3286
3294
|
}, [
|
|
3287
|
-
u(
|
|
3295
|
+
u(P(de), {
|
|
3288
3296
|
class: "h-7 w-7 stroke-[1.9] text-[#f7f1ea]/72",
|
|
3289
3297
|
"aria-hidden": "true"
|
|
3290
3298
|
}),
|
|
3291
|
-
c("p",
|
|
3292
|
-
|
|
3299
|
+
c("p", $r, j(P(C).getAssetErrorLabel(r)), 1),
|
|
3300
|
+
P(h).canRetryAsset(P(C).getItemKey(r)) ? (w(), s("button", {
|
|
3293
3301
|
key: 0,
|
|
3294
3302
|
type: "button",
|
|
3295
3303
|
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",
|
|
3296
|
-
onClick:
|
|
3297
|
-
}, " Retry ", 8,
|
|
3298
|
-
], 8,
|
|
3304
|
+
onClick: V((e) => P(h).retryAsset(P(C).getItemKey(r)), ["stop"])
|
|
3305
|
+
}, " Retry ", 8, ei)) : o("", !0)
|
|
3306
|
+
], 8, Qr)], 64)) : o("", !0)
|
|
3299
3307
|
]), (w(), s("audio", {
|
|
3300
|
-
key:
|
|
3301
|
-
src:
|
|
3302
|
-
preload:
|
|
3308
|
+
key: P(h).getAssetRenderKey(P(C).getItemKey(r)),
|
|
3309
|
+
src: P(C).getFullscreenMediaSource(i, r),
|
|
3310
|
+
preload: P(C).getFullscreenMediaPreload(i),
|
|
3303
3311
|
class: "pointer-events-none absolute h-px w-px opacity-0",
|
|
3304
3312
|
ref_for: !0,
|
|
3305
|
-
ref: (e) => be(
|
|
3313
|
+
ref: (e) => be(P(C).getItemKey(r), e),
|
|
3306
3314
|
onCanplay: (e) => Z(i, r, e),
|
|
3307
3315
|
onDurationchange: (e) => Z(i, r, e),
|
|
3308
|
-
onError: (e) =>
|
|
3316
|
+
onError: (e) => P(L).onFullscreenMediaError(i, r),
|
|
3309
3317
|
onLoadstart: (e) => Z(i, r, e),
|
|
3310
3318
|
onLoadedmetadata: (e) => Z(i, r, e),
|
|
3311
3319
|
onPause: (e) => Z(i, r, e),
|
|
@@ -3316,29 +3324,29 @@ var Ar = { class: "relative flex h-full min-h-0 flex-col overflow-hidden bg-[#05
|
|
|
3316
3324
|
onStalled: (e) => Z(i, r, e),
|
|
3317
3325
|
onTimeupdate: (e) => Z(i, r, e),
|
|
3318
3326
|
onWaiting: (e) => Z(i, r, e)
|
|
3319
|
-
}, null, 40,
|
|
3320
|
-
icon:
|
|
3327
|
+
}, null, 40, ti))], 2)) : (w(), s("div", ni, [c("div", ri, [k(e.$slots, "item-icon", {
|
|
3328
|
+
icon: P(Yt)(r.type),
|
|
3321
3329
|
item: r
|
|
3322
|
-
}, () => [(w(), a(
|
|
3330
|
+
}, () => [(w(), a(ee(P(Yt)(r.type)), {
|
|
3323
3331
|
class: "h-6 w-6 stroke-[1.9]",
|
|
3324
3332
|
"aria-hidden": "true"
|
|
3325
|
-
}))])])]))], 14,
|
|
3326
|
-
|
|
3327
|
-
|
|
3333
|
+
}))])])]))], 14, Ir))), 128)),
|
|
3334
|
+
H.value && f["fullscreen-overlay"] ? (w(), s("div", ii, [c("div", ai, [k(e.$slots, "fullscreen-overlay", y(p(H.value)))])])) : o("", !0),
|
|
3335
|
+
R.value ? (w(), a(Mt, {
|
|
3328
3336
|
key: 1,
|
|
3329
|
-
"current-time":
|
|
3330
|
-
"current-time-label":
|
|
3331
|
-
duration:
|
|
3332
|
-
"duration-label":
|
|
3333
|
-
muted:
|
|
3334
|
-
progress:
|
|
3335
|
-
"show-fullscreen-control":
|
|
3336
|
-
volume:
|
|
3337
|
-
"volume-control-layout":
|
|
3338
|
-
onFullscreenRequest:
|
|
3339
|
-
onSeekInput:
|
|
3340
|
-
onVolumeInput:
|
|
3341
|
-
onVolumeToggle:
|
|
3337
|
+
"current-time": P(h).activeMediaState.value.currentTime,
|
|
3338
|
+
"current-time-label": P(h).formatPlaybackTime(P(h).activeMediaState.value.currentTime),
|
|
3339
|
+
duration: P(h).activeMediaDuration.value,
|
|
3340
|
+
"duration-label": P(h).formatPlaybackTime(P(h).activeMediaDuration.value),
|
|
3341
|
+
muted: P(h).activeMediaState.value.muted,
|
|
3342
|
+
progress: P(h).activeMediaProgress.value,
|
|
3343
|
+
"show-fullscreen-control": P(h).activeMediaItem.value?.type === "video",
|
|
3344
|
+
volume: P(h).activeMediaState.value.volume,
|
|
3345
|
+
"volume-control-layout": te.value,
|
|
3346
|
+
onFullscreenRequest: P(T).request,
|
|
3347
|
+
onSeekInput: P(h).onMediaSeekInput,
|
|
3348
|
+
onVolumeInput: P(h).onMediaVolumeInput,
|
|
3349
|
+
onVolumeToggle: P(h).onMediaVolumeToggle
|
|
3342
3350
|
}, null, 8, [
|
|
3343
3351
|
"current-time",
|
|
3344
3352
|
"current-time-label",
|
|
@@ -3354,7 +3362,7 @@ var Ar = { class: "relative flex h-full min-h-0 flex-col overflow-hidden bg-[#05
|
|
|
3354
3362
|
"onVolumeInput",
|
|
3355
3363
|
"onVolumeToggle"
|
|
3356
3364
|
])) : o("", !0)
|
|
3357
|
-
])) :
|
|
3365
|
+
])) : B.value ? (w(), a(ir, {
|
|
3358
3366
|
key: 1,
|
|
3359
3367
|
"fill-collected-count": d.fillCollectedCount,
|
|
3360
3368
|
"fill-completed-calls": d.fillCompletedCalls,
|
|
@@ -3366,7 +3374,7 @@ var Ar = { class: "relative flex h-full min-h-0 flex-col overflow-hidden bg-[#05
|
|
|
3366
3374
|
"fill-total-count": d.fillTotalCount,
|
|
3367
3375
|
"has-next-page": d.hasNextPage,
|
|
3368
3376
|
phase: d.phase,
|
|
3369
|
-
"status-message":
|
|
3377
|
+
"status-message": P(h).statusMessage.value
|
|
3370
3378
|
}, null, 8, [
|
|
3371
3379
|
"fill-collected-count",
|
|
3372
3380
|
"fill-completed-calls",
|
|
@@ -3379,43 +3387,43 @@ var Ar = { class: "relative flex h-full min-h-0 flex-col overflow-hidden bg-[#05
|
|
|
3379
3387
|
"has-next-page",
|
|
3380
3388
|
"phase",
|
|
3381
3389
|
"status-message"
|
|
3382
|
-
])) :
|
|
3390
|
+
])) : P(ge) && P(X) ? (w(), a(sr, {
|
|
3383
3391
|
key: 2,
|
|
3384
|
-
message:
|
|
3385
|
-
mode:
|
|
3386
|
-
surface:
|
|
3392
|
+
message: P(X).message,
|
|
3393
|
+
mode: P(X).mode,
|
|
3394
|
+
surface: P(X).surface
|
|
3387
3395
|
}, {
|
|
3388
|
-
default:
|
|
3396
|
+
default: z(() => [P(he) ? k(e.$slots, "empty-state", y(g({ key: 0 }, P(X)))) : o("", !0)]),
|
|
3389
3397
|
_: 3
|
|
3390
3398
|
}, 8, [
|
|
3391
3399
|
"message",
|
|
3392
3400
|
"mode",
|
|
3393
3401
|
"surface"
|
|
3394
|
-
])) : o("", !0),
|
|
3402
|
+
])) : o("", !0), P(me) && P(X) ? (w(), a(sr, {
|
|
3395
3403
|
key: 3,
|
|
3396
|
-
message:
|
|
3397
|
-
mode:
|
|
3398
|
-
surface:
|
|
3404
|
+
message: P(X).message,
|
|
3405
|
+
mode: P(X).mode,
|
|
3406
|
+
surface: P(X).surface
|
|
3399
3407
|
}, {
|
|
3400
|
-
default:
|
|
3408
|
+
default: z(() => [P(he) ? k(e.$slots, "empty-state", y(g({ key: 0 }, P(X)))) : o("", !0)]),
|
|
3401
3409
|
_: 3
|
|
3402
3410
|
}, 8, [
|
|
3403
3411
|
"message",
|
|
3404
3412
|
"mode",
|
|
3405
3413
|
"surface"
|
|
3406
3414
|
])) : o("", !0)], 544)]),
|
|
3407
|
-
fe.value ? (w(), a(
|
|
3415
|
+
fe.value ? (w(), a(Kt, {
|
|
3408
3416
|
key: 1,
|
|
3409
3417
|
"show-end-badge": ce.value,
|
|
3410
3418
|
"show-status": !!G.value,
|
|
3411
3419
|
"status-kind": G.value?.kind ?? null,
|
|
3412
3420
|
"status-message": G.value?.message ?? null
|
|
3413
3421
|
}, l({
|
|
3414
|
-
default:
|
|
3422
|
+
default: z(() => [J.value && H.value ? k(e.$slots, "fullscreen-footer", y(g({ key: 0 }, H.value))) : o("", !0)]),
|
|
3415
3423
|
_: 2
|
|
3416
3424
|
}, [ae.value && G.value ? {
|
|
3417
3425
|
name: "status",
|
|
3418
|
-
fn:
|
|
3426
|
+
fn: z(() => [k(e.$slots, "fullscreen-status", y(p(G.value)))]),
|
|
3419
3427
|
key: "0"
|
|
3420
3428
|
} : void 0]), 1032, [
|
|
3421
3429
|
"show-end-badge",
|
|
@@ -3424,7 +3432,7 @@ var Ar = { class: "relative flex h-full min-h-0 flex-col overflow-hidden bg-[#05
|
|
|
3424
3432
|
"status-message"
|
|
3425
3433
|
])) : o("", !0)
|
|
3426
3434
|
]), u(r, { name: "vibe-fullscreen-aside-column" }, {
|
|
3427
|
-
default:
|
|
3435
|
+
default: z(() => [Y.value && H.value ? (w(), s("div", oi, [c("aside", si, [c("div", ci, [k(e.$slots, "fullscreen-aside", y(p(H.value)))])])])) : o("", !0)]),
|
|
3428
3436
|
_: 3
|
|
3429
3437
|
})]),
|
|
3430
3438
|
u(r, {
|
|
@@ -3435,7 +3443,7 @@ var Ar = { class: "relative flex h-full min-h-0 flex-col overflow-hidden bg-[#05
|
|
|
3435
3443
|
"leave-from-class": "translate-x-0 opacity-100",
|
|
3436
3444
|
"leave-to-class": "translate-x-full opacity-0"
|
|
3437
3445
|
}, {
|
|
3438
|
-
default:
|
|
3446
|
+
default: z(() => [ie.value && H.value ? (w(), s("aside", li, [c("div", ui, [k(e.$slots, "fullscreen-aside", y(p(H.value)))])])) : o("", !0)]),
|
|
3439
3447
|
_: 3
|
|
3440
3448
|
})
|
|
3441
3449
|
]));
|
|
@@ -3443,10 +3451,10 @@ var Ar = { class: "relative flex h-full min-h-0 flex-col overflow-hidden bg-[#05
|
|
|
3443
3451
|
});
|
|
3444
3452
|
//#endregion
|
|
3445
3453
|
//#region src/components/viewer-core/masonryLayoutState.ts
|
|
3446
|
-
function
|
|
3447
|
-
let t =
|
|
3454
|
+
function mi(e) {
|
|
3455
|
+
let t = A([]), n = A([]), r = A(/* @__PURE__ */ new Map()), i = A(0), a = A(/* @__PURE__ */ new Map()), o = A([]);
|
|
3448
3456
|
function s(s, c, l) {
|
|
3449
|
-
let u =
|
|
3457
|
+
let u = mr(s, {
|
|
3450
3458
|
columnCount: c,
|
|
3451
3459
|
columnWidth: l,
|
|
3452
3460
|
gapX: e.gapPx,
|
|
@@ -3456,7 +3464,7 @@ function pi(e) {
|
|
|
3456
3464
|
t.value = u.positions.map(d), n.value = u.heights, r.value = u.buckets, i.value = u.contentHeight, a.value = u.indexById, o.value = u.columnHeights;
|
|
3457
3465
|
}
|
|
3458
3466
|
function c(s, c, l, d) {
|
|
3459
|
-
i.value =
|
|
3467
|
+
i.value = hr(u(), s, {
|
|
3460
3468
|
columnCount: l,
|
|
3461
3469
|
columnWidth: d,
|
|
3462
3470
|
gapX: e.gapPx,
|
|
@@ -3465,10 +3473,10 @@ function pi(e) {
|
|
|
3465
3473
|
startIndex: c,
|
|
3466
3474
|
positionOffsetX: e.contentInsetPx,
|
|
3467
3475
|
positionOffsetY: e.contentInsetPx
|
|
3468
|
-
}).contentHeight,
|
|
3476
|
+
}).contentHeight, N(t), N(n), N(r), N(a), N(o);
|
|
3469
3477
|
}
|
|
3470
3478
|
function l(e, n, r, i) {
|
|
3471
|
-
return
|
|
3479
|
+
return _r({
|
|
3472
3480
|
addedItems: r.addedItems,
|
|
3473
3481
|
columnCount: i,
|
|
3474
3482
|
columnHeights: o.value,
|
|
@@ -3509,49 +3517,49 @@ function pi(e) {
|
|
|
3509
3517
|
}
|
|
3510
3518
|
//#endregion
|
|
3511
3519
|
//#region src/components/viewer-core/useMasonryMotion.ts
|
|
3512
|
-
var
|
|
3513
|
-
function
|
|
3520
|
+
var hi = 300, gi = 600, _i = 40, vi = 300, yi = 400, bi = 300;
|
|
3521
|
+
function xi(e, t) {
|
|
3514
3522
|
return t === "top" ? [...e].reverse() : e;
|
|
3515
3523
|
}
|
|
3516
|
-
function
|
|
3517
|
-
return e <= 0 ?
|
|
3524
|
+
function Si(e) {
|
|
3525
|
+
return e <= 0 ? gi : gi + Math.min((e - 1) * _i, yi);
|
|
3518
3526
|
}
|
|
3519
|
-
function
|
|
3527
|
+
function Ci(e, t, n = bi) {
|
|
3520
3528
|
return e + t > n;
|
|
3521
3529
|
}
|
|
3522
|
-
function
|
|
3523
|
-
return
|
|
3530
|
+
function wi() {
|
|
3531
|
+
return vi;
|
|
3524
3532
|
}
|
|
3525
|
-
function
|
|
3533
|
+
function Ti(e) {
|
|
3526
3534
|
let t = e.itemHeight > 0 ? e.itemHeight : e.columnWidth;
|
|
3527
3535
|
return e.direction === "top" ? e.scrollTop - t : e.scrollTop + e.viewportHeight + t;
|
|
3528
3536
|
}
|
|
3529
|
-
function
|
|
3537
|
+
function Ei(e) {
|
|
3530
3538
|
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()));
|
|
3531
|
-
|
|
3539
|
+
R(e.visibleIndices, (i) => {
|
|
3532
3540
|
if (!i.length) return;
|
|
3533
3541
|
let o = [];
|
|
3534
3542
|
for (let n of i) {
|
|
3535
|
-
let r = e.items.value[n] ?
|
|
3543
|
+
let r = e.items.value[n] ? Q(e.items.value[n]) : null;
|
|
3536
3544
|
!r || !t.value.has(r) || d.has(r) || (d.add(r), o.push(r));
|
|
3537
3545
|
}
|
|
3538
3546
|
if (!o.length) return;
|
|
3539
|
-
let s =
|
|
3540
|
-
for (let e = 0; e < s.length; e += 1) c.set(s[e], Math.min(e *
|
|
3541
|
-
r.value = c,
|
|
3547
|
+
let s = xi(o, a.value.get(o[0]) ?? "bottom"), c = new Map(r.value);
|
|
3548
|
+
for (let e = 0; e < s.length; e += 1) c.set(s[e], Math.min(e * _i, yi));
|
|
3549
|
+
r.value = c, Di(() => {
|
|
3542
3550
|
let e = new Set(n.value);
|
|
3543
3551
|
for (let t of o) e.add(t);
|
|
3544
3552
|
n.value = e;
|
|
3545
|
-
}),
|
|
3553
|
+
}), Oi(() => {
|
|
3546
3554
|
let e = new Set(t.value);
|
|
3547
3555
|
for (let t of o) e.delete(t);
|
|
3548
3556
|
t.value = e, w(() => {
|
|
3549
3557
|
let e = new Set(n.value), t = new Map(r.value), i = new Map(a.value);
|
|
3550
3558
|
for (let n of o) e.delete(n), t.delete(n), i.delete(n), d.delete(n);
|
|
3551
3559
|
n.value = e, r.value = t, a.value = i;
|
|
3552
|
-
},
|
|
3560
|
+
}, Si(o.length));
|
|
3553
3561
|
});
|
|
3554
|
-
}, { flush: "post" }),
|
|
3562
|
+
}, { flush: "post" }), R(() => e.items.value.map((e) => Q(e)), (e) => {
|
|
3555
3563
|
if (!e.length || !o.value.size) return;
|
|
3556
3564
|
let t = new Set(e), n = null, r = null;
|
|
3557
3565
|
for (let e of o.value.keys()) t.has(e) && (n ||= new Map(o.value), r ||= new Set(s.value), n.delete(e), r.delete(e));
|
|
@@ -3562,9 +3570,9 @@ function Ti(e) {
|
|
|
3562
3570
|
});
|
|
3563
3571
|
function m(n, r = "bottom") {
|
|
3564
3572
|
if (!n.length) return;
|
|
3565
|
-
let i =
|
|
3573
|
+
let i = Ci(t.value.size, n.length), o = i ? new Set(e.visibleIndices.value) : null, s = o ? h(o) : new Set(t.value), c = i ? g(s) : new Map(a.value);
|
|
3566
3574
|
for (let t of n) {
|
|
3567
|
-
let n =
|
|
3575
|
+
let n = Q(t), a = i ? e.indexById.value.get(n) : null;
|
|
3568
3576
|
o && (a == null || !o.has(a)) || (s.add(n), c.set(n, r));
|
|
3569
3577
|
}
|
|
3570
3578
|
t.value = s, a.value = c;
|
|
@@ -3572,7 +3580,7 @@ function Ti(e) {
|
|
|
3572
3580
|
function h(r) {
|
|
3573
3581
|
let i = /* @__PURE__ */ new Set();
|
|
3574
3582
|
for (let n of r) {
|
|
3575
|
-
let r = e.items.value[n], a = r ?
|
|
3583
|
+
let r = e.items.value[n], a = r ? Q(r) : null;
|
|
3576
3584
|
a && t.value.has(a) && i.add(a);
|
|
3577
3585
|
}
|
|
3578
3586
|
for (let e of d) t.value.has(e) && i.add(e);
|
|
@@ -3591,10 +3599,10 @@ function Ti(e) {
|
|
|
3591
3599
|
if (!e.length) return;
|
|
3592
3600
|
let i = new Map(o.value), c = new Set(t.value), l = new Set(n.value), u = new Map(r.value), f = new Map(a.value), p = [];
|
|
3593
3601
|
for (let t of e) {
|
|
3594
|
-
let e =
|
|
3602
|
+
let e = Q(t.item);
|
|
3595
3603
|
p.push(e), i.set(e, t), c.delete(e), l.delete(e), u.delete(e), f.delete(e), d.delete(e);
|
|
3596
3604
|
}
|
|
3597
|
-
o.value = i, t.value = c, n.value = l, r.value = u, a.value = f,
|
|
3605
|
+
o.value = i, t.value = c, n.value = l, r.value = u, a.value = f, Di(() => {
|
|
3598
3606
|
let e = new Set(s.value);
|
|
3599
3607
|
for (let t of p) e.add(t);
|
|
3600
3608
|
s.value = e;
|
|
@@ -3602,9 +3610,9 @@ function Ti(e) {
|
|
|
3602
3610
|
let e = new Map(o.value), t = new Set(s.value);
|
|
3603
3611
|
for (let n of p) e.delete(n), t.delete(n);
|
|
3604
3612
|
o.value = e, s.value = t;
|
|
3605
|
-
},
|
|
3613
|
+
}, vi);
|
|
3606
3614
|
}
|
|
3607
|
-
function v(t, n, r =
|
|
3615
|
+
function v(t, n, r = hi) {
|
|
3608
3616
|
if (!t.size) return;
|
|
3609
3617
|
let i = /* @__PURE__ */ new Map(), a = [];
|
|
3610
3618
|
for (let [r, o] of t.entries()) {
|
|
@@ -3623,8 +3631,8 @@ function Ti(e) {
|
|
|
3623
3631
|
c.value = i, u.value = /* @__PURE__ */ new Set();
|
|
3624
3632
|
let o = new Map(l.value);
|
|
3625
3633
|
for (let e of a) o.set(e, r);
|
|
3626
|
-
l.value = o,
|
|
3627
|
-
u.value = new Set(a),
|
|
3634
|
+
l.value = o, Di(() => {
|
|
3635
|
+
u.value = new Set(a), Di(() => {
|
|
3628
3636
|
c.value = /* @__PURE__ */ new Map();
|
|
3629
3637
|
});
|
|
3630
3638
|
}), w(() => {
|
|
@@ -3635,8 +3643,8 @@ function Ti(e) {
|
|
|
3635
3643
|
}, r);
|
|
3636
3644
|
}
|
|
3637
3645
|
function y(e) {
|
|
3638
|
-
if (n.value.has(e)) return `transform ${
|
|
3639
|
-
if (u.value.has(e)) return `transform ${l.value.get(e) ??
|
|
3646
|
+
if (n.value.has(e)) return `transform ${gi}ms ease-out`;
|
|
3647
|
+
if (u.value.has(e)) return `transform ${l.value.get(e) ?? hi}ms ease-out`;
|
|
3640
3648
|
}
|
|
3641
3649
|
function b(e) {
|
|
3642
3650
|
if (!n.value.has(e)) return;
|
|
@@ -3647,13 +3655,13 @@ function Ti(e) {
|
|
|
3647
3655
|
let r = e.items.value[n], i = e.positions.value[n] ?? {
|
|
3648
3656
|
x: 0,
|
|
3649
3657
|
y: 0
|
|
3650
|
-
}, o = e.heights.value[n] ?? e.columnWidth.value, s = r ?
|
|
3658
|
+
}, o = e.heights.value[n] ?? e.columnWidth.value, s = r ? Q(r) : null, l = s ? c.value.get(s) ?? {
|
|
3651
3659
|
dx: 0,
|
|
3652
3660
|
dy: 0
|
|
3653
3661
|
} : {
|
|
3654
3662
|
dx: 0,
|
|
3655
3663
|
dy: 0
|
|
3656
|
-
}, u = s ? a.value.get(s) ?? "bottom" : "bottom", d = s && t.value.has(s) ?
|
|
3664
|
+
}, u = s ? a.value.get(s) ?? "bottom" : "bottom", d = s && t.value.has(s) ? Ti({
|
|
3657
3665
|
columnWidth: e.columnWidth.value,
|
|
3658
3666
|
direction: u,
|
|
3659
3667
|
itemHeight: o,
|
|
@@ -3663,18 +3671,18 @@ function Ti(e) {
|
|
|
3663
3671
|
return `translate3d(${i.x + l.dx}px, ${d + l.dy}px, 0)`;
|
|
3664
3672
|
}
|
|
3665
3673
|
function C(t) {
|
|
3666
|
-
let n =
|
|
3674
|
+
let n = Q(t), r = o.value.get(n);
|
|
3667
3675
|
if (!r) return {
|
|
3668
3676
|
opacity: "0",
|
|
3669
3677
|
transform: "translate3d(0, 0, 0) scale(0.96)",
|
|
3670
|
-
transition: `opacity ${
|
|
3678
|
+
transition: `opacity ${vi}ms ease-out, transform ${vi}ms ease-out`
|
|
3671
3679
|
};
|
|
3672
3680
|
let i = s.value.has(n);
|
|
3673
3681
|
return {
|
|
3674
3682
|
height: `${r.height}px`,
|
|
3675
3683
|
opacity: i ? "0" : "1",
|
|
3676
3684
|
transform: `translate3d(${r.position.x}px, ${r.position.y}px, 0) scale(${i ? "0.96" : "1"})`,
|
|
3677
|
-
transition: `opacity ${
|
|
3685
|
+
transition: `opacity ${vi}ms ease-out, transform ${vi}ms ease-out`,
|
|
3678
3686
|
width: `${e.columnWidth.value}px`
|
|
3679
3687
|
};
|
|
3680
3688
|
}
|
|
@@ -3695,28 +3703,28 @@ function Ti(e) {
|
|
|
3695
3703
|
playFlipMoveAnimation: v
|
|
3696
3704
|
};
|
|
3697
3705
|
}
|
|
3698
|
-
function
|
|
3706
|
+
function Di(e) {
|
|
3699
3707
|
if (typeof requestAnimationFrame == "function") {
|
|
3700
3708
|
requestAnimationFrame(() => e());
|
|
3701
3709
|
return;
|
|
3702
3710
|
}
|
|
3703
3711
|
setTimeout(e, 0);
|
|
3704
3712
|
}
|
|
3705
|
-
function
|
|
3706
|
-
|
|
3713
|
+
function Oi(e) {
|
|
3714
|
+
Di(() => Di(e));
|
|
3707
3715
|
}
|
|
3708
3716
|
//#endregion
|
|
3709
3717
|
//#region src/components/viewer-core/masonryViewport.ts
|
|
3710
|
-
function
|
|
3718
|
+
function ki(e, t) {
|
|
3711
3719
|
return e?.clientHeight || Math.round(e?.getBoundingClientRect().height ?? 0) || t || window.innerHeight || 1;
|
|
3712
3720
|
}
|
|
3713
|
-
function
|
|
3721
|
+
function Ai(e, t, n) {
|
|
3714
3722
|
return e?.clientWidth || Math.round(e?.getBoundingClientRect().width ?? 0) || t || window.innerWidth || n;
|
|
3715
3723
|
}
|
|
3716
|
-
function
|
|
3724
|
+
function ji(e, t, n, r) {
|
|
3717
3725
|
return Math.max(e?.scrollHeight ?? 0, r) - (t + n);
|
|
3718
3726
|
}
|
|
3719
|
-
function
|
|
3727
|
+
function Mi(e, t) {
|
|
3720
3728
|
return {
|
|
3721
3729
|
height: `${e}px`,
|
|
3722
3730
|
transform: `translate3d(0, ${t}px, 0)`
|
|
@@ -3724,11 +3732,11 @@ function ji(e, t) {
|
|
|
3724
3732
|
}
|
|
3725
3733
|
//#endregion
|
|
3726
3734
|
//#region src/components/viewer-core/masonryScrollBehavior.ts
|
|
3727
|
-
var
|
|
3728
|
-
function
|
|
3735
|
+
var Ni = 24, Pi = 48;
|
|
3736
|
+
function Fi(e) {
|
|
3729
3737
|
let t = D(0), n = 0, r = 0;
|
|
3730
3738
|
function i(e) {
|
|
3731
|
-
if (t.value =
|
|
3739
|
+
if (t.value = Bi(e), t.value <= 0) {
|
|
3732
3740
|
o();
|
|
3733
3741
|
return;
|
|
3734
3742
|
}
|
|
@@ -3748,7 +3756,7 @@ function Pi(e) {
|
|
|
3748
3756
|
let s = e.getViewport();
|
|
3749
3757
|
if (s && r > 0) {
|
|
3750
3758
|
let n = Math.min(Math.max(0, i - r), 250), a = t.value * n / 1e3;
|
|
3751
|
-
s.scrollTop =
|
|
3759
|
+
s.scrollTop = Vi(s.scrollTop + a, 0, e.getMaxScrollTop()), e.onScroll();
|
|
3752
3760
|
}
|
|
3753
3761
|
r = i, a();
|
|
3754
3762
|
}
|
|
@@ -3758,44 +3766,44 @@ function Pi(e) {
|
|
|
3758
3766
|
stop: o
|
|
3759
3767
|
};
|
|
3760
3768
|
}
|
|
3761
|
-
function
|
|
3769
|
+
function Ii(e) {
|
|
3762
3770
|
if (!e.active || !e.triggerEnabled) return 0;
|
|
3763
3771
|
let t = Math.max(0, e.maxScrollTop - e.thresholdPx);
|
|
3764
|
-
return t <= 0 ? 1 :
|
|
3772
|
+
return t <= 0 ? 1 : Vi(1 - (e.progressDistancePx - e.thresholdPx) / t, 0, 1);
|
|
3765
3773
|
}
|
|
3766
|
-
function
|
|
3774
|
+
function Li(e) {
|
|
3767
3775
|
if (!e.active || !e.triggerEnabled) return 0;
|
|
3768
3776
|
let t = Math.max(0, e.maxScrollTop - e.thresholdPx);
|
|
3769
|
-
return t <= 0 ? 1 :
|
|
3777
|
+
return t <= 0 ? 1 : Vi(e.progressDistancePx / t, 0, 1);
|
|
3770
3778
|
}
|
|
3771
|
-
function
|
|
3772
|
-
let t = i(() => Math.max(0, e.viewportHeight.value -
|
|
3779
|
+
function Ri(e) {
|
|
3780
|
+
let t = i(() => Math.max(0, e.viewportHeight.value - Ni * 2)), n = i(() => e.containerHeight.value > e.viewportHeight.value + 1 && t.value > 0), r = i(() => {
|
|
3773
3781
|
if (!n.value) return 0;
|
|
3774
3782
|
let r = e.viewportHeight.value / e.containerHeight.value * t.value;
|
|
3775
|
-
return Math.min(t.value, Math.max(
|
|
3783
|
+
return Math.min(t.value, Math.max(Pi, r));
|
|
3776
3784
|
}), a = i(() => {
|
|
3777
|
-
if (!n.value) return
|
|
3785
|
+
if (!n.value) return Ni;
|
|
3778
3786
|
let i = Math.max(0, e.containerHeight.value - e.viewportHeight.value);
|
|
3779
|
-
return
|
|
3787
|
+
return Ni + Math.max(0, t.value - r.value) * (i > 0 ? Vi(e.scrollTop.value / i, 0, 1) : 0);
|
|
3780
3788
|
});
|
|
3781
3789
|
return {
|
|
3782
|
-
getScrollbarThumbStyle: () =>
|
|
3790
|
+
getScrollbarThumbStyle: () => Mi(r.value, a.value),
|
|
3783
3791
|
showScrollbar: n
|
|
3784
3792
|
};
|
|
3785
3793
|
}
|
|
3786
|
-
function
|
|
3794
|
+
function zi(e) {
|
|
3787
3795
|
return typeof e == "number" && Number.isFinite(e) ? Math.max(0, e) : 0;
|
|
3788
3796
|
}
|
|
3789
|
-
function
|
|
3797
|
+
function Bi(e) {
|
|
3790
3798
|
return Number.isFinite(e) ? Math.max(0, e) : 0;
|
|
3791
3799
|
}
|
|
3792
|
-
function
|
|
3800
|
+
function Vi(e, t, n) {
|
|
3793
3801
|
return Math.min(Math.max(e, t), n);
|
|
3794
3802
|
}
|
|
3795
3803
|
//#endregion
|
|
3796
3804
|
//#region src/components/viewer-core/useEdgeBoundary.ts
|
|
3797
|
-
var
|
|
3798
|
-
function
|
|
3805
|
+
var Hi = 250, Ui = 1e3;
|
|
3806
|
+
function Wi(e) {
|
|
3799
3807
|
let t = D(!1), n = D(!1), r = D(0), i = D(0), a = D(!1), o = D(!1), s = D(!1), c = 0, l = null;
|
|
3800
3808
|
x(() => {
|
|
3801
3809
|
S();
|
|
@@ -3818,7 +3826,7 @@ function Ui(e) {
|
|
|
3818
3826
|
if (!C(t) || !e.isAtBoundary()) return;
|
|
3819
3827
|
let n = Date.now();
|
|
3820
3828
|
if (!(n < c)) {
|
|
3821
|
-
if (c = n +
|
|
3829
|
+
if (c = n + Hi, a.value) {
|
|
3822
3830
|
s.value = !0;
|
|
3823
3831
|
return;
|
|
3824
3832
|
}
|
|
@@ -3857,7 +3865,7 @@ function Ui(e) {
|
|
|
3857
3865
|
return e.hasPage.value && t.value && r.value > i.value && !e.interactionLocked?.value && !e.loading.value && !a.value && typeof e.requestPage.value == "function";
|
|
3858
3866
|
}
|
|
3859
3867
|
function v() {
|
|
3860
|
-
o.value = !1, y(
|
|
3868
|
+
o.value = !1, y(Ui);
|
|
3861
3869
|
}
|
|
3862
3870
|
function y(e) {
|
|
3863
3871
|
S(), a.value = !0, l = setTimeout(() => {
|
|
@@ -3889,7 +3897,7 @@ function Ui(e) {
|
|
|
3889
3897
|
}
|
|
3890
3898
|
//#endregion
|
|
3891
3899
|
//#region src/components/viewer-core/masonryBoundaryLock.ts
|
|
3892
|
-
function
|
|
3900
|
+
function Gi() {
|
|
3893
3901
|
let e = D(!1), t = null;
|
|
3894
3902
|
x(() => {
|
|
3895
3903
|
r();
|
|
@@ -3910,11 +3918,11 @@ function Wi() {
|
|
|
3910
3918
|
}
|
|
3911
3919
|
//#endregion
|
|
3912
3920
|
//#region src/components/viewer-core/masonryItemMutation.ts
|
|
3913
|
-
function
|
|
3914
|
-
let t = e.currentItems.map((e) =>
|
|
3921
|
+
function Ki(e) {
|
|
3922
|
+
let t = e.currentItems.map((e) => Q(e)), n = e.previousItems.map((e) => Q(e)), r = Ji(e.previousItems, e.layoutIndexById, e.layoutHeights), i = Yi(e.previousItems, e.layoutIndexById, e.layoutPositions), a = new Set(n), o = new Set(t), s = e.currentItems.filter((e) => !a.has(Q(e))), c = qi(e.previousItems, o, r, i), l = t.length > n.length && n.length > 0 && t[0] !== n[0], u = e.scrollTop > e.contentInsetPx + e.gapPx, d = l && u ? e.currentItems[e.activeIndex] : null;
|
|
3915
3923
|
return {
|
|
3916
3924
|
addedItems: s,
|
|
3917
|
-
anchorId: d ?
|
|
3925
|
+
anchorId: d ? Q(d) : null,
|
|
3918
3926
|
isPrepend: l,
|
|
3919
3927
|
oldPositionsById: i,
|
|
3920
3928
|
previousIds: n,
|
|
@@ -3923,9 +3931,9 @@ function Gi(e) {
|
|
|
3923
3931
|
shouldResetScrollForEmptyRemoval: e.currentItems.length === 0 && e.previousItems.length > 0 && c.length > 0 && e.scrollTop > 0
|
|
3924
3932
|
};
|
|
3925
3933
|
}
|
|
3926
|
-
function
|
|
3934
|
+
function qi(e, t, n, r) {
|
|
3927
3935
|
return e.flatMap((e) => {
|
|
3928
|
-
let i =
|
|
3936
|
+
let i = Q(e);
|
|
3929
3937
|
if (t.has(i)) return [];
|
|
3930
3938
|
let a = r.get(i), o = n.get(i);
|
|
3931
3939
|
return a && o != null ? [{
|
|
@@ -3935,25 +3943,25 @@ function Ki(e, t, n, r) {
|
|
|
3935
3943
|
}] : [];
|
|
3936
3944
|
});
|
|
3937
3945
|
}
|
|
3938
|
-
function
|
|
3946
|
+
function Ji(e, t, n) {
|
|
3939
3947
|
let r = /* @__PURE__ */ new Map();
|
|
3940
3948
|
for (let i of e) {
|
|
3941
|
-
let e =
|
|
3949
|
+
let e = Q(i), a = t.get(e), o = a == null ? void 0 : n[a];
|
|
3942
3950
|
o != null && r.set(e, o);
|
|
3943
3951
|
}
|
|
3944
3952
|
return r;
|
|
3945
3953
|
}
|
|
3946
|
-
function
|
|
3954
|
+
function Yi(e, t, n) {
|
|
3947
3955
|
let r = /* @__PURE__ */ new Map();
|
|
3948
3956
|
for (let i of e) {
|
|
3949
|
-
let e =
|
|
3957
|
+
let e = Q(i), a = t.get(e), o = a == null ? void 0 : n[a];
|
|
3950
3958
|
o && r.set(e, o);
|
|
3951
3959
|
}
|
|
3952
3960
|
return r;
|
|
3953
3961
|
}
|
|
3954
3962
|
//#endregion
|
|
3955
3963
|
//#region src/components/viewer-core/masonryPendingAppend.ts
|
|
3956
|
-
function
|
|
3964
|
+
function Xi(e) {
|
|
3957
3965
|
let t = D(null), n = D(!1), r = null;
|
|
3958
3966
|
function i() {
|
|
3959
3967
|
o(), e.pendingAppendItems.value.length && (t.value = c([...e.items.value, ...e.pendingAppendItems.value]), s());
|
|
@@ -3976,12 +3984,12 @@ function Yi(e) {
|
|
|
3976
3984
|
}, 300));
|
|
3977
3985
|
}
|
|
3978
3986
|
function c(t) {
|
|
3979
|
-
return t.length ? e.pendingAppendItems.value.length && e.columnHeights.value.length === e.columnCount.value ?
|
|
3987
|
+
return t.length ? e.pendingAppendItems.value.length && e.columnHeights.value.length === e.columnCount.value ? gr(e.pendingAppendItems.value, {
|
|
3980
3988
|
columnHeights: e.columnHeights.value,
|
|
3981
3989
|
columnWidth: e.columnWidth.value,
|
|
3982
3990
|
contentHeight: e.contentHeight.value,
|
|
3983
3991
|
gapY: e.gapPx
|
|
3984
|
-
}) + e.contentInsetPx * 2 :
|
|
3992
|
+
}) + e.contentInsetPx * 2 : mr(t, {
|
|
3985
3993
|
bucketPx: e.bucketPx,
|
|
3986
3994
|
columnCount: e.columnCount.value,
|
|
3987
3995
|
columnWidth: e.columnWidth.value,
|
|
@@ -3998,42 +4006,42 @@ function Yi(e) {
|
|
|
3998
4006
|
}
|
|
3999
4007
|
//#endregion
|
|
4000
4008
|
//#region src/components/viewer-core/useMasonryList.ts
|
|
4001
|
-
var
|
|
4002
|
-
function
|
|
4003
|
-
let t = D(null), n = D(0), r = D(typeof window > "u" ? 0 : window.innerHeight || 0), a = D(typeof window > "u" ? 0 : window.innerWidth ||
|
|
4004
|
-
bucketPx:
|
|
4005
|
-
contentInsetPx:
|
|
4006
|
-
gapPx:
|
|
4007
|
-
}), { buckets: s, columnHeights: c, contentHeight: l, heights: u, indexById: d, positions: f } = o, p = D(null), m =
|
|
4009
|
+
var Zi = 600, Qi = 24, $i = 16, ea = 300, ta = 200, na = 0, ra = 1, ia = Qi + $i, aa = 200, oa = 500, sa = 1e3;
|
|
4010
|
+
function ca(e) {
|
|
4011
|
+
let t = D(null), n = D(0), r = D(typeof window > "u" ? 0 : window.innerHeight || 0), a = D(typeof window > "u" ? 0 : window.innerWidth || ea), o = mi({
|
|
4012
|
+
bucketPx: Zi,
|
|
4013
|
+
contentInsetPx: Qi,
|
|
4014
|
+
gapPx: $i
|
|
4015
|
+
}), { buckets: s, columnHeights: c, contentHeight: l, heights: u, indexById: d, positions: f } = o, p = D(null), m = Gi(), h = i(() => Math.max(ea, a.value - Qi * 2)), g = i(() => dr(h.value, ea)), v = i(() => fr(h.value, g.value, ea, $i)), y = i(() => zi(e.bottomLoadBufferPx.value)), b = i(() => la(e.activeIndex.value, 0, Math.max(0, e.items.value.length - 1))), C = i(() => vr({
|
|
4008
4016
|
itemCount: e.items.value.length,
|
|
4009
4017
|
viewportHeight: r.value,
|
|
4010
4018
|
scrollTop: n.value,
|
|
4011
|
-
overscanPx:
|
|
4012
|
-
bucketPx:
|
|
4019
|
+
overscanPx: ta,
|
|
4020
|
+
bucketPx: Zi,
|
|
4013
4021
|
buckets: s.value
|
|
4014
4022
|
})), w = i(() => C.value.map((t) => ({
|
|
4015
4023
|
item: e.items.value[t],
|
|
4016
4024
|
index: t
|
|
4017
4025
|
}))), T = i(() => {
|
|
4018
|
-
let e = l.value +
|
|
4019
|
-
return Math.max(e, t, r.value) +
|
|
4020
|
-
}), E = i(() => e.hasNextPage.value || e.allowExhaustedNextPageRefresh.value), O = i(() =>
|
|
4026
|
+
let e = l.value + Qi * 2, t = F.reservedContentHeight.value ?? 0;
|
|
4027
|
+
return Math.max(e, t, r.value) + aa + y.value;
|
|
4028
|
+
}), E = i(() => e.hasNextPage.value || e.allowExhaustedNextPageRefresh.value), O = i(() => Li({
|
|
4021
4029
|
active: e.active.value,
|
|
4022
4030
|
maxScrollTop: Y(),
|
|
4023
4031
|
progressDistancePx: n.value,
|
|
4024
|
-
thresholdPx:
|
|
4032
|
+
thresholdPx: na,
|
|
4025
4033
|
triggerEnabled: E.value
|
|
4026
|
-
})), k = i(() => e.items.value.length > 0 ? `${b.value + 1} / ${e.items.value.length}` : "0 / 0"),
|
|
4034
|
+
})), k = i(() => e.items.value.length > 0 ? `${b.value + 1} / ${e.items.value.length}` : "0 / 0"), ee = i(() => Ii({
|
|
4027
4035
|
active: e.active.value,
|
|
4028
4036
|
maxScrollTop: Y(),
|
|
4029
4037
|
progressDistancePx: n.value,
|
|
4030
|
-
thresholdPx:
|
|
4038
|
+
thresholdPx: ia,
|
|
4031
4039
|
triggerEnabled: e.hasPreviousPage.value
|
|
4032
|
-
})),
|
|
4040
|
+
})), A = Ri({
|
|
4033
4041
|
containerHeight: T,
|
|
4034
4042
|
scrollTop: n,
|
|
4035
4043
|
viewportHeight: r
|
|
4036
|
-
}),
|
|
4044
|
+
}), j = Ei({
|
|
4037
4045
|
items: e.items,
|
|
4038
4046
|
visibleIndices: C,
|
|
4039
4047
|
positions: f,
|
|
@@ -4042,127 +4050,127 @@ function sa(e) {
|
|
|
4042
4050
|
columnWidth: v,
|
|
4043
4051
|
scrollTop: n,
|
|
4044
4052
|
viewportHeight: r
|
|
4045
|
-
}),
|
|
4053
|
+
}), M = Wi({
|
|
4046
4054
|
direction: "top",
|
|
4047
4055
|
getAnimationLockMs(e) {
|
|
4048
|
-
return Math.max(
|
|
4056
|
+
return Math.max(oa, Si(e)) + sa;
|
|
4049
4057
|
},
|
|
4050
4058
|
hasPage: e.hasPreviousPage,
|
|
4051
4059
|
interactionLocked: m.isBoundaryInteractionLocked,
|
|
4052
4060
|
isAtBoundary() {
|
|
4053
|
-
return n.value <=
|
|
4061
|
+
return n.value <= ia;
|
|
4054
4062
|
},
|
|
4055
4063
|
loading: e.loading,
|
|
4056
4064
|
requestPage: e.requestPreviousPage
|
|
4057
|
-
}),
|
|
4065
|
+
}), N = Wi({
|
|
4058
4066
|
direction: "bottom",
|
|
4059
4067
|
getAnimationLockMs(e) {
|
|
4060
|
-
return
|
|
4068
|
+
return Si(e) + sa;
|
|
4061
4069
|
},
|
|
4062
4070
|
hasPage: E,
|
|
4063
4071
|
interactionLocked: m.isBoundaryInteractionLocked,
|
|
4064
4072
|
isAtBoundary() {
|
|
4065
|
-
return J() <=
|
|
4073
|
+
return J() <= ra;
|
|
4066
4074
|
},
|
|
4067
4075
|
loading: e.loading,
|
|
4068
4076
|
requestPage: e.requestNextPage
|
|
4069
|
-
}),
|
|
4077
|
+
}), P = Fi({
|
|
4070
4078
|
active: e.active,
|
|
4071
4079
|
getMaxScrollTop: Y,
|
|
4072
4080
|
getViewport: () => t.value,
|
|
4073
|
-
onScroll:
|
|
4074
|
-
}),
|
|
4075
|
-
bucketPx:
|
|
4081
|
+
onScroll: te
|
|
4082
|
+
}), F = Xi({
|
|
4083
|
+
bucketPx: Zi,
|
|
4076
4084
|
columnHeights: c,
|
|
4077
4085
|
columnCount: g,
|
|
4078
4086
|
columnWidth: v,
|
|
4079
4087
|
commitPendingAppend: e.commitPendingAppend,
|
|
4080
4088
|
contentHeight: l,
|
|
4081
|
-
contentInsetPx:
|
|
4082
|
-
gapPx:
|
|
4089
|
+
contentInsetPx: Qi,
|
|
4090
|
+
gapPx: $i,
|
|
4083
4091
|
items: e.items,
|
|
4084
4092
|
pendingAppendItems: e.pendingAppendItems
|
|
4085
|
-
}),
|
|
4086
|
-
|
|
4093
|
+
}), I = null, L = 0;
|
|
4094
|
+
R([
|
|
4087
4095
|
() => e.items.value,
|
|
4088
4096
|
g,
|
|
4089
4097
|
v
|
|
4090
4098
|
], async ([t], [r = []]) => {
|
|
4091
|
-
let i =
|
|
4099
|
+
let i = Ki({
|
|
4092
4100
|
activeIndex: b.value,
|
|
4093
|
-
contentInsetPx:
|
|
4101
|
+
contentInsetPx: Qi,
|
|
4094
4102
|
currentItems: t,
|
|
4095
|
-
gapPx:
|
|
4103
|
+
gapPx: $i,
|
|
4096
4104
|
layoutHeights: u.value,
|
|
4097
4105
|
layoutIndexById: d.value,
|
|
4098
4106
|
layoutPositions: f.value,
|
|
4099
4107
|
previousItems: r ?? [],
|
|
4100
4108
|
scrollTop: n.value
|
|
4101
4109
|
});
|
|
4102
|
-
i.shouldLockBoundaryInteractionForRemoval && m.lockBoundaryInteraction(
|
|
4110
|
+
i.shouldLockBoundaryInteractionForRemoval && m.lockBoundaryInteraction(wi() + sa), i.shouldResetScrollForEmptyRemoval && U();
|
|
4103
4111
|
let a = r ?? [];
|
|
4104
|
-
o.canAppend(t, a, i, g.value) ? o.append(i.addedItems, a.length, g.value, v.value) : o.rebuild(t, g.value, v.value), i.removedItems.length > 0 &&
|
|
4105
|
-
}, { immediate: !0 }),
|
|
4106
|
-
() => e.pendingAppendItems.value.map((e) =>
|
|
4112
|
+
o.canAppend(t, a, i, g.value) ? o.append(i.addedItems, a.length, g.value, v.value) : o.rebuild(t, g.value, v.value), i.removedItems.length > 0 && j.markLeave(i.removedItems), i.addedItems.length > 0 && (j.markEnter(i.addedItems, i.isPrepend ? "top" : "bottom"), i.isPrepend ? M.onItemsMutated(i.addedItems.length) : N.onItemsMutated(i.addedItems.length)), j.playFlipMoveAnimation(i.oldPositionsById, new Set(i.addedItems.map((e) => Q(e))), i.isPrepend ? oa : void 0), i.anchorId ? (await _(), H(i.anchorId, i.oldPositionsById)) : e.active.value && i.previousIds.length > 0 && ne();
|
|
4113
|
+
}, { immediate: !0 }), R([
|
|
4114
|
+
() => e.pendingAppendItems.value.map((e) => Q(e)),
|
|
4107
4115
|
g,
|
|
4108
4116
|
v,
|
|
4109
4117
|
r
|
|
4110
|
-
], () =>
|
|
4118
|
+
], () => F.refreshReservedContentHeight(), { immediate: !0 }), R(() => e.active.value, async (e, i) => {
|
|
4111
4119
|
let a = t.value;
|
|
4112
4120
|
if (!e) {
|
|
4113
|
-
a && (p.value = a.scrollTop),
|
|
4121
|
+
a && (p.value = a.scrollTop), P.stop();
|
|
4114
4122
|
return;
|
|
4115
4123
|
}
|
|
4116
|
-
if (
|
|
4124
|
+
if (P.start(), !a || i !== !1 || p.value == null) return;
|
|
4117
4125
|
await _();
|
|
4118
|
-
let o = Math.max(0, T.value - r.value), s =
|
|
4119
|
-
a.scrollTop = s, n.value = s,
|
|
4120
|
-
}),
|
|
4121
|
-
|
|
4126
|
+
let o = Math.max(0, T.value - r.value), s = la(p.value, 0, o);
|
|
4127
|
+
a.scrollTop = s, n.value = s, M.syncBoundary(), N.syncBoundary();
|
|
4128
|
+
}), R(() => e.loading.value, async (e) => {
|
|
4129
|
+
F.clearReservedHeightWhenIdle(e), M.onLoadingChange(e), N.onLoadingChange(e), await _();
|
|
4122
4130
|
}), S(async () => {
|
|
4123
|
-
K(), await _(), b.value > 0 ?
|
|
4131
|
+
K(), await _(), b.value > 0 ? V(b.value, "center") : W(), M.syncBoundary(), N.syncBoundary(), typeof ResizeObserver < "u" ? (I = new ResizeObserver(() => {
|
|
4124
4132
|
K();
|
|
4125
|
-
}), t.value &&
|
|
4133
|
+
}), t.value && I.observe(t.value)) : window.addEventListener("resize", K);
|
|
4126
4134
|
}), x(() => {
|
|
4127
|
-
|
|
4135
|
+
I?.disconnect(), I = null, window.removeEventListener("resize", K), F.clearAppendCommitTimer(), m.clearBoundaryInteractionReleaseTimer(), L &&= (cancelAnimationFrame(L), 0), P.stop();
|
|
4128
4136
|
});
|
|
4129
|
-
function
|
|
4130
|
-
e.active.value && (n.value = t.value?.scrollTop ?? 0, r.value = q(),
|
|
4131
|
-
|
|
4137
|
+
function te() {
|
|
4138
|
+
e.active.value && (n.value = t.value?.scrollTop ?? 0, r.value = q(), M.syncBoundary("scroll"), N.syncBoundary("scroll"), G(), !ne() && (L ||= requestAnimationFrame(() => {
|
|
4139
|
+
L = 0, W();
|
|
4132
4140
|
})));
|
|
4133
4141
|
}
|
|
4134
|
-
function
|
|
4135
|
-
e.active.value && (
|
|
4142
|
+
function z(t) {
|
|
4143
|
+
e.active.value && (M.onWheel(t), N.onWheel(t), G());
|
|
4136
4144
|
}
|
|
4137
|
-
function
|
|
4138
|
-
let n = e.items.value[t], r = n ?
|
|
4145
|
+
function B(t) {
|
|
4146
|
+
let n = e.items.value[t], r = n ? Q(n) : "";
|
|
4139
4147
|
return {
|
|
4140
4148
|
height: `${u.value[t] ?? v.value}px`,
|
|
4141
4149
|
width: `${v.value}px`,
|
|
4142
|
-
transition: r ?
|
|
4143
|
-
transitionDelay: r ?
|
|
4144
|
-
transform:
|
|
4150
|
+
transition: r ? j.getCardTransition(r) : void 0,
|
|
4151
|
+
transitionDelay: r ? j.getCardTransitionDelay(r) : void 0,
|
|
4152
|
+
transform: j.getCardTransform(t)
|
|
4145
4153
|
};
|
|
4146
4154
|
}
|
|
4147
|
-
function
|
|
4155
|
+
function V(e, i) {
|
|
4148
4156
|
let a = t.value, o = f.value[e], s = u.value[e];
|
|
4149
4157
|
if (!a || !o || !s) return;
|
|
4150
4158
|
let c = a.scrollTop, l = Math.max(0, T.value - r.value);
|
|
4151
|
-
i === "center" ? c = o.y - (r.value - s) / 2 : o.y < a.scrollTop ? c = o.y -
|
|
4159
|
+
i === "center" ? c = o.y - (r.value - s) / 2 : o.y < a.scrollTop ? c = o.y - Qi : o.y + s > a.scrollTop + r.value && (c = o.y + s - r.value + Qi), a.scrollTop = la(c, 0, l), n.value = a.scrollTop, W();
|
|
4152
4160
|
}
|
|
4153
|
-
function
|
|
4161
|
+
function H(e, r) {
|
|
4154
4162
|
let i = t.value, a = r.get(e), o = d.value.get(e), s = o == null ? null : f.value[o];
|
|
4155
4163
|
if (!i || !a || !s) return;
|
|
4156
4164
|
let c = s.y - a.y;
|
|
4157
4165
|
i.scrollTop += c, n.value = i.scrollTop;
|
|
4158
4166
|
}
|
|
4159
|
-
function
|
|
4167
|
+
function U() {
|
|
4160
4168
|
let e = t.value;
|
|
4161
4169
|
if (!e) {
|
|
4162
4170
|
n.value = 0;
|
|
4163
4171
|
return;
|
|
4164
4172
|
}
|
|
4165
|
-
e.scrollTop = 0, n.value = 0,
|
|
4173
|
+
e.scrollTop = 0, n.value = 0, M.syncBoundary(), N.syncBoundary();
|
|
4166
4174
|
}
|
|
4167
4175
|
function W() {
|
|
4168
4176
|
if (!C.value.length || ne()) return;
|
|
@@ -4176,59 +4184,59 @@ function sa(e) {
|
|
|
4176
4184
|
e.setActiveIndex(i);
|
|
4177
4185
|
}
|
|
4178
4186
|
function ne() {
|
|
4179
|
-
let t = n.value <=
|
|
4187
|
+
let t = n.value <= ia, r = J() <= ra;
|
|
4180
4188
|
return t ? (e.setActiveIndex(0), !0) : r ? (e.setActiveIndex(Math.max(0, e.items.value.length - 1)), !0) : !1;
|
|
4181
4189
|
}
|
|
4182
4190
|
function G() {
|
|
4183
|
-
|
|
4191
|
+
M.maybeRequestPage(), N.maybeRequestPage();
|
|
4184
4192
|
}
|
|
4185
4193
|
function K() {
|
|
4186
4194
|
r.value = q(), a.value = re();
|
|
4187
4195
|
}
|
|
4188
4196
|
function q() {
|
|
4189
|
-
return
|
|
4197
|
+
return ki(t.value, r.value);
|
|
4190
4198
|
}
|
|
4191
4199
|
function re() {
|
|
4192
|
-
return
|
|
4200
|
+
return Ai(t.value, a.value, ea);
|
|
4193
4201
|
}
|
|
4194
4202
|
function J() {
|
|
4195
|
-
return
|
|
4203
|
+
return ji(t.value, n.value, r.value, T.value);
|
|
4196
4204
|
}
|
|
4197
4205
|
function Y() {
|
|
4198
4206
|
let e = Math.max(t.value?.scrollHeight ?? 0, T.value);
|
|
4199
4207
|
return Math.max(0, e - r.value);
|
|
4200
4208
|
}
|
|
4201
4209
|
return {
|
|
4202
|
-
autoScroll:
|
|
4210
|
+
autoScroll: P.autoScroll,
|
|
4203
4211
|
columnWidth: v,
|
|
4204
4212
|
containerHeight: T,
|
|
4205
|
-
getCardStyle:
|
|
4206
|
-
getLeavingCardStyle:
|
|
4207
|
-
getScrollbarThumbStyle:
|
|
4208
|
-
leavingItems:
|
|
4213
|
+
getCardStyle: B,
|
|
4214
|
+
getLeavingCardStyle: j.getLeavingCardStyle,
|
|
4215
|
+
getScrollbarThumbStyle: A.getScrollbarThumbStyle,
|
|
4216
|
+
leavingItems: j.leavingItems,
|
|
4209
4217
|
nextBoundaryLoadProgress: O,
|
|
4210
|
-
onScroll:
|
|
4211
|
-
onWheel:
|
|
4218
|
+
onScroll: te,
|
|
4219
|
+
onWheel: z,
|
|
4212
4220
|
paginationLabel: k,
|
|
4213
|
-
previousBoundaryLoadProgress:
|
|
4221
|
+
previousBoundaryLoadProgress: ee,
|
|
4214
4222
|
renderedItems: w,
|
|
4215
4223
|
resolvedActiveIndex: b,
|
|
4216
|
-
scrollToIndex:
|
|
4217
|
-
showScrollbar:
|
|
4224
|
+
scrollToIndex: V,
|
|
4225
|
+
showScrollbar: A.showScrollbar,
|
|
4218
4226
|
scrollViewportRef: t
|
|
4219
4227
|
};
|
|
4220
4228
|
}
|
|
4221
|
-
function
|
|
4229
|
+
function la(e, t, n) {
|
|
4222
4230
|
return Math.min(Math.max(e, t), n);
|
|
4223
4231
|
}
|
|
4224
4232
|
//#endregion
|
|
4225
4233
|
//#region src/components/viewer-core/listCardAsset.ts
|
|
4226
|
-
function
|
|
4234
|
+
function ua(e) {
|
|
4227
4235
|
if (e) try {
|
|
4228
4236
|
e.removeAttribute("src"), e.src = "";
|
|
4229
4237
|
} catch {}
|
|
4230
4238
|
}
|
|
4231
|
-
function
|
|
4239
|
+
function da(e) {
|
|
4232
4240
|
if (e) {
|
|
4233
4241
|
try {
|
|
4234
4242
|
e.currentTime = 0;
|
|
@@ -4239,12 +4247,12 @@ function ua(e) {
|
|
|
4239
4247
|
} catch {}
|
|
4240
4248
|
}
|
|
4241
4249
|
}
|
|
4242
|
-
function
|
|
4250
|
+
function fa(e, t) {
|
|
4243
4251
|
if (t) return e.bottom > t.top && e.top < t.bottom;
|
|
4244
4252
|
let n = window.innerHeight || document.documentElement.clientHeight || 0;
|
|
4245
4253
|
return e.bottom > 0 && e.top < n;
|
|
4246
4254
|
}
|
|
4247
|
-
function
|
|
4255
|
+
function pa(e) {
|
|
4248
4256
|
if (!e) return null;
|
|
4249
4257
|
try {
|
|
4250
4258
|
return new URL(e, window.location.href).href;
|
|
@@ -4254,14 +4262,14 @@ function fa(e) {
|
|
|
4254
4262
|
}
|
|
4255
4263
|
//#endregion
|
|
4256
4264
|
//#region src/components/viewer-core/useListCardHealthCheck.ts
|
|
4257
|
-
function
|
|
4265
|
+
function ma(e) {
|
|
4258
4266
|
let t = D(null), n = i(() => {
|
|
4259
|
-
let t = typeof e.item.value.healthCheck?.url == "string" ?
|
|
4267
|
+
let t = typeof e.item.value.healthCheck?.url == "string" ? pa(e.item.value.healthCheck.url) : null;
|
|
4260
4268
|
return !t || t === e.attachedAssetUrl.value ? null : t;
|
|
4261
4269
|
}), r = null, a = 0, o = /* @__PURE__ */ new Map();
|
|
4262
|
-
|
|
4270
|
+
R(n, (e, n) => {
|
|
4263
4271
|
e !== n && (t.value = null, l(), a += 1);
|
|
4264
|
-
}),
|
|
4272
|
+
}), R([
|
|
4265
4273
|
n,
|
|
4266
4274
|
e.surfaceActive,
|
|
4267
4275
|
e.isInView,
|
|
@@ -4288,7 +4296,7 @@ function pa(e) {
|
|
|
4288
4296
|
r.refresh();
|
|
4289
4297
|
return;
|
|
4290
4298
|
}
|
|
4291
|
-
r =
|
|
4299
|
+
r = Qt.request({
|
|
4292
4300
|
assetType: "probe",
|
|
4293
4301
|
getPriority: e.getPriority,
|
|
4294
4302
|
onGrant() {
|
|
@@ -4298,7 +4306,7 @@ function pa(e) {
|
|
|
4298
4306
|
return;
|
|
4299
4307
|
}
|
|
4300
4308
|
let i = ++a;
|
|
4301
|
-
|
|
4309
|
+
Dn(r).then((s) => {
|
|
4302
4310
|
if (!(i !== a || n.value !== r)) {
|
|
4303
4311
|
if (o.set(r, s ?? null), !s) {
|
|
4304
4312
|
t.value = null;
|
|
@@ -4306,7 +4314,7 @@ function pa(e) {
|
|
|
4306
4314
|
}
|
|
4307
4315
|
t.value = s, e.reportAssetError?.({
|
|
4308
4316
|
item: e.item.value,
|
|
4309
|
-
occurrenceKey:
|
|
4317
|
+
occurrenceKey: Q(e.item.value),
|
|
4310
4318
|
url: r,
|
|
4311
4319
|
kind: s,
|
|
4312
4320
|
surface: "grid"
|
|
@@ -4334,14 +4342,14 @@ function pa(e) {
|
|
|
4334
4342
|
}
|
|
4335
4343
|
//#endregion
|
|
4336
4344
|
//#region src/components/ListCard.vue?vue&type=script&setup=true&lang.ts
|
|
4337
|
-
var
|
|
4345
|
+
var ha = ["aria-label"], ga = {
|
|
4338
4346
|
key: 0,
|
|
4339
4347
|
"data-testid": "vibe-list-card-spinner",
|
|
4340
4348
|
class: "pointer-events-none absolute inset-0 z-[4] grid place-items-center bg-black/18"
|
|
4341
|
-
},
|
|
4349
|
+
}, _a = { 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]" }, va = ["src", "alt"], ya = ["src"], ba = ["data-kind"], xa = { class: "grid justify-items-center gap-3 px-4 text-center" }, Sa = { class: "text-[0.68rem] font-bold uppercase tracking-[0.22em] text-[#f7f1ea]/72" }, Ca = {
|
|
4342
4350
|
key: 4,
|
|
4343
4351
|
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))]"
|
|
4344
|
-
},
|
|
4352
|
+
}, wa = { class: "inline-flex h-14 w-14 items-center justify-center border border-white/16 bg-black/20" }, Ta = { class: "pointer-events-none absolute inset-0 z-[3]" }, Ea = /* @__PURE__ */ d({
|
|
4345
4353
|
__name: "ListCard",
|
|
4346
4354
|
props: {
|
|
4347
4355
|
active: {
|
|
@@ -4365,7 +4373,7 @@ var ma = ["aria-label"], ha = {
|
|
|
4365
4373
|
},
|
|
4366
4374
|
emits: ["open"],
|
|
4367
4375
|
setup(e, { emit: t }) {
|
|
4368
|
-
let n = e, r = t, l = i(() =>
|
|
4376
|
+
let n = e, r = t, l = i(() => wr(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), A = i(() => l.value.kind === "image" && !!E.value), M = i(() => l.value.kind === "video" && !!E.value), N = ma({
|
|
4369
4377
|
attachedAssetUrl: E,
|
|
4370
4378
|
getPriority: le,
|
|
4371
4379
|
isInView: d,
|
|
@@ -4374,19 +4382,19 @@ var ma = ["aria-label"], ha = {
|
|
|
4374
4382
|
loadErrorKind: g,
|
|
4375
4383
|
reportAssetError: n.reportAssetError,
|
|
4376
4384
|
surfaceActive: i(() => n.surfaceActive)
|
|
4377
|
-
}),
|
|
4378
|
-
|
|
4385
|
+
}), F = i(() => N.errorKind.value ?? g.value), I = i(() => !!F.value), L = i(() => Tn(F.value)), te = i(() => O.value && !g.value && (!T.value || !m.value)), z = null, B = null, H = /* @__PURE__ */ new Set();
|
|
4386
|
+
R([E, () => l.value.kind], () => {
|
|
4379
4387
|
let e = l.value.kind === "fallback";
|
|
4380
4388
|
m.value = e, h.value = !1, g.value = null, e && (T.value = !0);
|
|
4381
|
-
}),
|
|
4389
|
+
}), R(O, () => {
|
|
4382
4390
|
K();
|
|
4383
|
-
}),
|
|
4391
|
+
}), R([
|
|
4384
4392
|
d,
|
|
4385
4393
|
m,
|
|
4386
4394
|
E
|
|
4387
4395
|
], () => {
|
|
4388
4396
|
q();
|
|
4389
|
-
}),
|
|
4397
|
+
}), R(() => n.surfaceActive, (e) => {
|
|
4390
4398
|
if (!e) {
|
|
4391
4399
|
J(), q();
|
|
4392
4400
|
return;
|
|
@@ -4399,26 +4407,26 @@ var ma = ["aria-label"], ha = {
|
|
|
4399
4407
|
b.value = null, d.value = !0, K();
|
|
4400
4408
|
return;
|
|
4401
4409
|
}
|
|
4402
|
-
b.value = y.value.closest("[data-testid=\"vibe-list-scroll\"]"),
|
|
4410
|
+
b.value = y.value.closest("[data-testid=\"vibe-list-scroll\"]"), z = new IntersectionObserver((e) => {
|
|
4403
4411
|
for (let t of e) t.target === y.value && (n.surfaceActive && Y(t), K(), q());
|
|
4404
4412
|
}, {
|
|
4405
4413
|
root: b.value,
|
|
4406
4414
|
threshold: [0, 1]
|
|
4407
|
-
}),
|
|
4415
|
+
}), z.observe(y.value);
|
|
4408
4416
|
}), x(() => {
|
|
4409
|
-
re(),
|
|
4417
|
+
re(), N.release(), z?.disconnect(), z = null;
|
|
4410
4418
|
});
|
|
4411
|
-
function
|
|
4419
|
+
function U() {
|
|
4412
4420
|
ue(_.value) && (m.value = !0, g.value = null, ie(E.value ?? n.item.url), J());
|
|
4413
4421
|
}
|
|
4414
4422
|
async function W() {
|
|
4415
4423
|
if (!ue(_.value)) return;
|
|
4416
4424
|
let e = E.value ?? n.item.url;
|
|
4417
4425
|
m.value = !1, g.value = "generic";
|
|
4418
|
-
let t = await
|
|
4426
|
+
let t = await En(e);
|
|
4419
4427
|
g.value = t, n.reportAssetError?.({
|
|
4420
4428
|
item: n.item,
|
|
4421
|
-
occurrenceKey:
|
|
4429
|
+
occurrenceKey: Q(n.item),
|
|
4422
4430
|
url: e,
|
|
4423
4431
|
kind: t,
|
|
4424
4432
|
surface: "grid"
|
|
@@ -4443,11 +4451,11 @@ var ma = ["aria-label"], ha = {
|
|
|
4443
4451
|
re();
|
|
4444
4452
|
return;
|
|
4445
4453
|
}
|
|
4446
|
-
if (T.value ||
|
|
4447
|
-
|
|
4454
|
+
if (T.value || B) {
|
|
4455
|
+
B?.refresh();
|
|
4448
4456
|
return;
|
|
4449
4457
|
}
|
|
4450
|
-
|
|
4458
|
+
B = Qt.request({
|
|
4451
4459
|
assetType: l.value.kind,
|
|
4452
4460
|
getPriority: le,
|
|
4453
4461
|
onGrant() {
|
|
@@ -4459,12 +4467,12 @@ var ma = ["aria-label"], ha = {
|
|
|
4459
4467
|
function q() {
|
|
4460
4468
|
let e = C.value;
|
|
4461
4469
|
if (!(!e || l.value.kind !== "video")) {
|
|
4462
|
-
if (
|
|
4470
|
+
if (F.value) {
|
|
4463
4471
|
e.pause();
|
|
4464
4472
|
return;
|
|
4465
4473
|
}
|
|
4466
4474
|
if (E.value && d.value && m.value) {
|
|
4467
|
-
e.muted = !0, e.loop = !0, e.playsInline = !0,
|
|
4475
|
+
e.muted = !0, e.loop = !0, e.playsInline = !0, An(e);
|
|
4468
4476
|
return;
|
|
4469
4477
|
}
|
|
4470
4478
|
try {
|
|
@@ -4477,7 +4485,7 @@ var ma = ["aria-label"], ha = {
|
|
|
4477
4485
|
T.value = l.value.kind === "fallback", g.value = null, m.value = l.value.kind === "fallback", e && (oe(), ce()), J();
|
|
4478
4486
|
}
|
|
4479
4487
|
function J() {
|
|
4480
|
-
|
|
4488
|
+
B?.release(), B = null;
|
|
4481
4489
|
}
|
|
4482
4490
|
function Y(e) {
|
|
4483
4491
|
let t = y.value;
|
|
@@ -4485,12 +4493,12 @@ var ma = ["aria-label"], ha = {
|
|
|
4485
4493
|
d.value = !0;
|
|
4486
4494
|
return;
|
|
4487
4495
|
}
|
|
4488
|
-
d.value =
|
|
4496
|
+
d.value = fa(e?.boundingClientRect ?? t.getBoundingClientRect(), e?.rootBounds ?? b.value?.getBoundingClientRect() ?? null);
|
|
4489
4497
|
}
|
|
4490
4498
|
function ie(e) {
|
|
4491
4499
|
if (!e) return;
|
|
4492
|
-
let t =
|
|
4493
|
-
|
|
4500
|
+
let t = Q(n.item), r = `${t}|${e}`;
|
|
4501
|
+
H.has(r) || (H.add(r), n.reportAssetLoad?.({
|
|
4494
4502
|
item: n.item,
|
|
4495
4503
|
occurrenceKey: t,
|
|
4496
4504
|
surface: "grid",
|
|
@@ -4498,17 +4506,17 @@ var ma = ["aria-label"], ha = {
|
|
|
4498
4506
|
}));
|
|
4499
4507
|
}
|
|
4500
4508
|
function ae() {
|
|
4501
|
-
if (!
|
|
4502
|
-
let e =
|
|
4503
|
-
|
|
4504
|
-
t.startsWith(`${e}|`) &&
|
|
4509
|
+
if (!L.value || N.retry()) return;
|
|
4510
|
+
let e = Q(n.item);
|
|
4511
|
+
H.forEach((t) => {
|
|
4512
|
+
t.startsWith(`${e}|`) && H.delete(t);
|
|
4505
4513
|
}), g.value = null, m.value = !1, T.value = !1, J(), K();
|
|
4506
4514
|
}
|
|
4507
4515
|
function oe() {
|
|
4508
|
-
|
|
4516
|
+
ua(_.value);
|
|
4509
4517
|
}
|
|
4510
4518
|
function ce() {
|
|
4511
|
-
|
|
4519
|
+
da(C.value);
|
|
4512
4520
|
}
|
|
4513
4521
|
function le() {
|
|
4514
4522
|
let e = y.value;
|
|
@@ -4522,8 +4530,8 @@ var ma = ["aria-label"], ha = {
|
|
|
4522
4530
|
return Math.abs((t.top + t.bottom) / 2 - n);
|
|
4523
4531
|
}
|
|
4524
4532
|
function ue(e) {
|
|
4525
|
-
let t =
|
|
4526
|
-
return !e || !t ? !1 :
|
|
4533
|
+
let t = pa(E.value);
|
|
4534
|
+
return !e || !t ? !1 : pa("currentSrc" in e && e.currentSrc || e.getAttribute("src")) === t;
|
|
4527
4535
|
}
|
|
4528
4536
|
function fe() {
|
|
4529
4537
|
r("open");
|
|
@@ -4551,12 +4559,12 @@ var ma = ["aria-label"], ha = {
|
|
|
4551
4559
|
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]",
|
|
4552
4560
|
"aria-label": n.item.title || `Open item ${n.index + 1}`,
|
|
4553
4561
|
onClick: fe
|
|
4554
|
-
}, null, 8,
|
|
4555
|
-
|
|
4562
|
+
}, null, 8, ha),
|
|
4563
|
+
te.value ? (w(), s("div", ga, [c("span", _a, [u(P(se), {
|
|
4556
4564
|
class: "h-5 w-5 animate-spin stroke-[1.9] text-[#f7f1ea]/78",
|
|
4557
4565
|
"aria-hidden": "true"
|
|
4558
4566
|
})])])) : o("", !0),
|
|
4559
|
-
|
|
4567
|
+
A.value && E.value && !I.value ? (w(), s("img", {
|
|
4560
4568
|
key: 1,
|
|
4561
4569
|
ref_key: "imageRef",
|
|
4562
4570
|
ref: _,
|
|
@@ -4564,9 +4572,9 @@ var ma = ["aria-label"], ha = {
|
|
|
4564
4572
|
alt: l.value.label,
|
|
4565
4573
|
draggable: "false",
|
|
4566
4574
|
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"]),
|
|
4567
|
-
onLoad:
|
|
4575
|
+
onLoad: U,
|
|
4568
4576
|
onError: W
|
|
4569
|
-
}, null, 42,
|
|
4577
|
+
}, null, 42, va)) : M.value && E.value && !I.value ? (w(), s("video", {
|
|
4570
4578
|
key: 2,
|
|
4571
4579
|
ref_key: "videoRef",
|
|
4572
4580
|
ref: C,
|
|
@@ -4582,31 +4590,31 @@ var ma = ["aria-label"], ha = {
|
|
|
4582
4590
|
onPlaying: ne,
|
|
4583
4591
|
onStalled: G,
|
|
4584
4592
|
onWaiting: G
|
|
4585
|
-
}, null, 42,
|
|
4593
|
+
}, null, 42, ya)) : I.value ? (w(), s("div", {
|
|
4586
4594
|
key: 3,
|
|
4587
4595
|
"data-testid": "vibe-list-card-error",
|
|
4588
|
-
"data-kind":
|
|
4596
|
+
"data-kind": F.value,
|
|
4589
4597
|
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))]"
|
|
4590
|
-
}, [c("div",
|
|
4591
|
-
u(
|
|
4598
|
+
}, [c("div", xa, [
|
|
4599
|
+
u(P(de), {
|
|
4592
4600
|
class: "h-6 w-6 stroke-[1.8] text-[#f7f1ea]/78",
|
|
4593
4601
|
"aria-hidden": "true"
|
|
4594
4602
|
}),
|
|
4595
|
-
c("span",
|
|
4596
|
-
|
|
4603
|
+
c("span", Sa, j(P(wn)(F.value)), 1),
|
|
4604
|
+
L.value ? (w(), s("button", {
|
|
4597
4605
|
key: 0,
|
|
4598
4606
|
type: "button",
|
|
4599
4607
|
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",
|
|
4600
|
-
onClick:
|
|
4608
|
+
onClick: V(ae, ["stop"])
|
|
4601
4609
|
}, " Retry ")) : o("", !0)
|
|
4602
|
-
])], 8,
|
|
4603
|
-
icon:
|
|
4610
|
+
])], 8, ba)) : (w(), s("div", Ca, [c("div", wa, [k(e.$slots, "item-icon", {
|
|
4611
|
+
icon: P(Yt)(n.item.type),
|
|
4604
4612
|
item: n.item
|
|
4605
|
-
}, () => [(w(), a(
|
|
4613
|
+
}, () => [(w(), a(ee(P(Yt)(n.item.type)), {
|
|
4606
4614
|
class: "h-6 w-6 stroke-[1.8] text-[#f7f1ea]/78",
|
|
4607
4615
|
"aria-hidden": "true"
|
|
4608
4616
|
}))])])])),
|
|
4609
|
-
c("div",
|
|
4617
|
+
c("div", Ta, [k(e.$slots, "grid-item-overlay", {
|
|
4610
4618
|
active: n.active,
|
|
4611
4619
|
focused: f.value,
|
|
4612
4620
|
hovered: p.value,
|
|
@@ -4616,24 +4624,24 @@ var ma = ["aria-label"], ha = {
|
|
|
4616
4624
|
})])
|
|
4617
4625
|
], 34));
|
|
4618
4626
|
}
|
|
4619
|
-
}),
|
|
4627
|
+
}), Da = { 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)]" }, Oa = { class: "pointer-events-none absolute inset-x-0 top-0 z-[2] flex justify-end p-6" }, ka = {
|
|
4620
4628
|
"data-testid": "vibe-pagination",
|
|
4621
4629
|
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]"
|
|
4622
|
-
},
|
|
4630
|
+
}, Aa = { class: "whitespace-nowrap" }, ja = {
|
|
4623
4631
|
key: 0,
|
|
4624
4632
|
class: "whitespace-nowrap border-l border-white/12 pl-2 text-[#f7f1ea]/56 min-[721px]:pl-3"
|
|
4625
|
-
},
|
|
4633
|
+
}, Ma = [
|
|
4626
4634
|
"data-active",
|
|
4627
4635
|
"data-index",
|
|
4628
4636
|
"data-item-id",
|
|
4629
4637
|
"data-occurrence-key"
|
|
4630
|
-
],
|
|
4638
|
+
], Na = ["data-item-id"], Pa = {
|
|
4631
4639
|
key: 0,
|
|
4632
4640
|
class: "pointer-events-none absolute inset-y-0 right-0 z-[3] hidden w-8 min-[1024px]:block"
|
|
4633
|
-
},
|
|
4641
|
+
}, Fa = {
|
|
4634
4642
|
key: 1,
|
|
4635
4643
|
class: "pointer-events-none absolute inset-x-0 bottom-0 z-[2] px-5 pb-5 sm:px-6"
|
|
4636
|
-
},
|
|
4644
|
+
}, Ia = { class: "mx-auto flex w-full justify-center" }, La = /* @__PURE__ */ d({
|
|
4637
4645
|
__name: "ListSurface",
|
|
4638
4646
|
props: {
|
|
4639
4647
|
active: {
|
|
@@ -4695,30 +4703,30 @@ var ma = ["aria-label"], ha = {
|
|
|
4695
4703
|
"update:activeIndex"
|
|
4696
4704
|
],
|
|
4697
4705
|
setup(e, { expose: n, emit: r }) {
|
|
4698
|
-
let d = e, f =
|
|
4699
|
-
active:
|
|
4700
|
-
allowExhaustedNextPageRefresh:
|
|
4701
|
-
bottomLoadBufferPx:
|
|
4702
|
-
items:
|
|
4703
|
-
activeIndex:
|
|
4704
|
-
loading:
|
|
4705
|
-
hasNextPage:
|
|
4706
|
-
hasPreviousPage:
|
|
4707
|
-
paginationDetail:
|
|
4708
|
-
pendingAppendItems:
|
|
4709
|
-
commitPendingAppend:
|
|
4710
|
-
requestNextPage:
|
|
4711
|
-
requestPreviousPage:
|
|
4706
|
+
let d = e, f = I(), p = r, m = ca({
|
|
4707
|
+
active: M(d, "active"),
|
|
4708
|
+
allowExhaustedNextPageRefresh: M(d, "allowExhaustedNextPageRefresh"),
|
|
4709
|
+
bottomLoadBufferPx: M(d, "bottomLoadBufferPx"),
|
|
4710
|
+
items: M(d, "items"),
|
|
4711
|
+
activeIndex: M(d, "activeIndex"),
|
|
4712
|
+
loading: M(d, "loading"),
|
|
4713
|
+
hasNextPage: M(d, "hasNextPage"),
|
|
4714
|
+
hasPreviousPage: M(d, "hasPreviousPage"),
|
|
4715
|
+
paginationDetail: M(d, "paginationDetail"),
|
|
4716
|
+
pendingAppendItems: M(d, "pendingAppendItems"),
|
|
4717
|
+
commitPendingAppend: M(d, "commitPendingAppend"),
|
|
4718
|
+
requestNextPage: M(d, "requestNextPage"),
|
|
4719
|
+
requestPreviousPage: M(d, "requestPreviousPage"),
|
|
4712
4720
|
setActiveIndex(e) {
|
|
4713
4721
|
p("update:activeIndex", e);
|
|
4714
4722
|
}
|
|
4715
4723
|
});
|
|
4716
4724
|
n({ autoScroll: m.autoScroll });
|
|
4717
|
-
let h = i(() =>
|
|
4725
|
+
let h = i(() => hn({
|
|
4718
4726
|
itemCount: d.items.length,
|
|
4719
4727
|
loading: d.loading,
|
|
4720
4728
|
phase: d.phase
|
|
4721
|
-
})), _ = i(() =>
|
|
4729
|
+
})), _ = i(() => gn({
|
|
4722
4730
|
errorMessage: d.errorMessage,
|
|
4723
4731
|
hasItems: d.items.length > 0,
|
|
4724
4732
|
hasNextPage: d.hasNextPage,
|
|
@@ -4731,42 +4739,42 @@ var ma = ["aria-label"], ha = {
|
|
|
4731
4739
|
message: _.value.message,
|
|
4732
4740
|
paginationDetail: d.paginationDetail,
|
|
4733
4741
|
total: d.items.length
|
|
4734
|
-
}), S = i(() => !x.value || !f["grid-status"] ? [] : f["grid-status"](x.value)), C = i(() =>
|
|
4735
|
-
emptyStateMode:
|
|
4742
|
+
}), S = i(() => !x.value || !f["grid-status"] ? [] : f["grid-status"](x.value)), C = i(() => un(S.value)), T = i(() => d.items.length + m.leavingItems.value.length), { emptyStateProps: E, showBadgeEmptyState: D, showCustomEmptyState: ee, showInlineEmptyState: A } = pn({
|
|
4743
|
+
emptyStateMode: M(d, "emptyStateMode"),
|
|
4736
4744
|
itemCount: T,
|
|
4737
|
-
loading:
|
|
4745
|
+
loading: M(d, "loading"),
|
|
4738
4746
|
renderSlot: f["empty-state"],
|
|
4739
4747
|
surface: "grid"
|
|
4740
4748
|
});
|
|
4741
|
-
return
|
|
4749
|
+
return R([m.nextBoundaryLoadProgress, m.previousBoundaryLoadProgress], ([e, t]) => {
|
|
4742
4750
|
p("boundary-load-progress", {
|
|
4743
4751
|
nextBoundaryLoadProgress: e,
|
|
4744
4752
|
previousBoundaryLoadProgress: t
|
|
4745
4753
|
});
|
|
4746
|
-
}, { immediate: !0 }), (e, n) => (w(), s("div",
|
|
4747
|
-
c("div",
|
|
4754
|
+
}, { immediate: !0 }), (e, n) => (w(), s("div", Da, [
|
|
4755
|
+
c("div", Oa, [c("span", ka, [c("span", Aa, j(P(m).paginationLabel.value), 1), d.paginationDetail ? (w(), s("span", ja, j(d.paginationDetail), 1)) : o("", !0)])]),
|
|
4748
4756
|
c("div", {
|
|
4749
|
-
ref:
|
|
4757
|
+
ref: P(m).scrollViewportRef,
|
|
4750
4758
|
"data-testid": "vibe-list-scroll",
|
|
4751
4759
|
class: "h-full min-h-0 overflow-y-auto overflow-x-hidden [overflow-anchor:none] [scrollbar-width:none] [-ms-overflow-style:none] [&::-webkit-scrollbar]:hidden",
|
|
4752
|
-
onScroll: n[0] ||= (...e) =>
|
|
4753
|
-
onWheel: n[1] ||= (...e) =>
|
|
4760
|
+
onScroll: n[0] ||= (...e) => P(m).onScroll && P(m).onScroll(...e),
|
|
4761
|
+
onWheel: n[1] ||= (...e) => P(m).onWheel && P(m).onWheel(...e)
|
|
4754
4762
|
}, [c("div", {
|
|
4755
4763
|
"data-testid": "vibe-list-content",
|
|
4756
4764
|
class: "relative",
|
|
4757
|
-
style: b({ height: `${
|
|
4765
|
+
style: b({ height: `${P(m).containerHeight.value}px` })
|
|
4758
4766
|
}, [
|
|
4759
|
-
(w(!0), s(t, null, O(
|
|
4760
|
-
key:
|
|
4767
|
+
(w(!0), s(t, null, O(P(m).renderedItems.value, ({ item: t, index: n }) => (w(), s("article", {
|
|
4768
|
+
key: P(Q)(t),
|
|
4761
4769
|
"data-testid": "vibe-list-card",
|
|
4762
|
-
"data-active": n ===
|
|
4770
|
+
"data-active": n === P(m).resolvedActiveIndex.value ? "true" : "false",
|
|
4763
4771
|
"data-index": n,
|
|
4764
4772
|
"data-item-id": t.id,
|
|
4765
|
-
"data-occurrence-key":
|
|
4773
|
+
"data-occurrence-key": P(Q)(t),
|
|
4766
4774
|
class: "absolute will-change-transform",
|
|
4767
|
-
style: b(
|
|
4768
|
-
}, [u(
|
|
4769
|
-
active: n ===
|
|
4775
|
+
style: b(P(m).getCardStyle(n))
|
|
4776
|
+
}, [u(Ea, {
|
|
4777
|
+
active: n === P(m).resolvedActiveIndex.value,
|
|
4770
4778
|
index: n,
|
|
4771
4779
|
item: t,
|
|
4772
4780
|
"report-asset-error": d.reportAssetError,
|
|
@@ -4775,11 +4783,11 @@ var ma = ["aria-label"], ha = {
|
|
|
4775
4783
|
onOpen: (e) => p("open-fullscreen", n)
|
|
4776
4784
|
}, l({ _: 2 }, [f["grid-item-overlay"] ? {
|
|
4777
4785
|
name: "grid-item-overlay",
|
|
4778
|
-
fn:
|
|
4786
|
+
fn: z((t) => [k(e.$slots, "grid-item-overlay", g({ ref_for: !0 }, t))]),
|
|
4779
4787
|
key: "0"
|
|
4780
4788
|
} : void 0, f["item-icon"] ? {
|
|
4781
4789
|
name: "item-icon",
|
|
4782
|
-
fn:
|
|
4790
|
+
fn: z((t) => [k(e.$slots, "item-icon", g({ ref_for: !0 }, t))]),
|
|
4783
4791
|
key: "1"
|
|
4784
4792
|
} : void 0]), 1032, [
|
|
4785
4793
|
"active",
|
|
@@ -4789,14 +4797,14 @@ var ma = ["aria-label"], ha = {
|
|
|
4789
4797
|
"report-asset-load",
|
|
4790
4798
|
"surface-active",
|
|
4791
4799
|
"onOpen"
|
|
4792
|
-
])], 12,
|
|
4793
|
-
(w(!0), s(t, null, O(
|
|
4794
|
-
key: `leaving-${
|
|
4800
|
+
])], 12, Ma))), 128)),
|
|
4801
|
+
(w(!0), s(t, null, O(P(m).leavingItems.value, (t) => (w(), s("article", {
|
|
4802
|
+
key: `leaving-${P(Q)(t.item)}`,
|
|
4795
4803
|
"data-testid": "vibe-list-card-leaving",
|
|
4796
4804
|
"data-item-id": t.item.id,
|
|
4797
4805
|
class: "pointer-events-none absolute z-[2] will-change-[opacity,transform]",
|
|
4798
|
-
style: b(
|
|
4799
|
-
}, [u(
|
|
4806
|
+
style: b(P(m).getLeavingCardStyle(t.item))
|
|
4807
|
+
}, [u(Ea, {
|
|
4800
4808
|
active: !1,
|
|
4801
4809
|
index: -1,
|
|
4802
4810
|
item: t.item,
|
|
@@ -4805,20 +4813,20 @@ var ma = ["aria-label"], ha = {
|
|
|
4805
4813
|
"surface-active": !1
|
|
4806
4814
|
}, l({ _: 2 }, [f["item-icon"] ? {
|
|
4807
4815
|
name: "item-icon",
|
|
4808
|
-
fn:
|
|
4816
|
+
fn: z((t) => [k(e.$slots, "item-icon", g({ ref_for: !0 }, t))]),
|
|
4809
4817
|
key: "0"
|
|
4810
4818
|
} : void 0]), 1032, [
|
|
4811
4819
|
"item",
|
|
4812
4820
|
"report-asset-error",
|
|
4813
4821
|
"report-asset-load"
|
|
4814
|
-
])], 12,
|
|
4815
|
-
|
|
4822
|
+
])], 12, Na))), 128)),
|
|
4823
|
+
P(A) && P(E) ? (w(), a(sr, {
|
|
4816
4824
|
key: 0,
|
|
4817
|
-
message:
|
|
4818
|
-
mode:
|
|
4819
|
-
surface:
|
|
4825
|
+
message: P(E).message,
|
|
4826
|
+
mode: P(E).mode,
|
|
4827
|
+
surface: P(E).surface
|
|
4820
4828
|
}, {
|
|
4821
|
-
default:
|
|
4829
|
+
default: z(() => [P(ee) ? k(e.$slots, "empty-state", y(g({ key: 0 }, P(E)))) : o("", !0)]),
|
|
4822
4830
|
_: 3
|
|
4823
4831
|
}, 8, [
|
|
4824
4832
|
"message",
|
|
@@ -4826,12 +4834,12 @@ var ma = ["aria-label"], ha = {
|
|
|
4826
4834
|
"surface"
|
|
4827
4835
|
])) : o("", !0)
|
|
4828
4836
|
], 4)], 544),
|
|
4829
|
-
|
|
4837
|
+
P(m).showScrollbar.value ? (w(), s("div", Pa, [n[2] ||= c("div", { class: "absolute bottom-6 right-3 top-6 w-px bg-white/8" }, null, -1), c("div", {
|
|
4830
4838
|
"data-testid": "vibe-list-scrollbar-thumb",
|
|
4831
4839
|
class: v(["absolute right-[0.625rem] w-1 bg-white/34 transition-[height,transform,background-color,opacity] duration-300 ease-out", d.loading ? "bg-white/52" : "bg-white/34"]),
|
|
4832
|
-
style: b(
|
|
4840
|
+
style: b(P(m).getScrollbarThumbStyle())
|
|
4833
4841
|
}, null, 6)])) : o("", !0),
|
|
4834
|
-
f["grid-footer"] ? (w(), s("div",
|
|
4842
|
+
f["grid-footer"] ? (w(), s("div", Fa, [c("div", Ia, [k(e.$slots, "grid-footer")])])) : o("", !0),
|
|
4835
4843
|
x.value ? (w(), s("div", {
|
|
4836
4844
|
key: 2,
|
|
4837
4845
|
class: v(["pointer-events-none absolute inset-x-0 bottom-0 z-[3] flex justify-center px-6", f["grid-footer"] ? "pb-24" : "pb-6"])
|
|
@@ -4839,15 +4847,15 @@ var ma = ["aria-label"], ha = {
|
|
|
4839
4847
|
key: 1,
|
|
4840
4848
|
"data-testid": "vibe-grid-status-badge",
|
|
4841
4849
|
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]", x.value.kind === "end" ? "border-amber-300/35 text-amber-200" : x.value.kind === "failed" ? "border-rose-400/45 text-rose-100" : ""])
|
|
4842
|
-
},
|
|
4843
|
-
|
|
4850
|
+
}, j(x.value.message), 3))], 2)) : o("", !0),
|
|
4851
|
+
P(D) && P(E) ? (w(), a(sr, {
|
|
4844
4852
|
key: 3,
|
|
4845
4853
|
class: v(["z-[3]", f["grid-footer"] ? "pb-24" : "pb-6"]),
|
|
4846
|
-
message:
|
|
4847
|
-
mode:
|
|
4848
|
-
surface:
|
|
4854
|
+
message: P(E).message,
|
|
4855
|
+
mode: P(E).mode,
|
|
4856
|
+
surface: P(E).surface
|
|
4849
4857
|
}, {
|
|
4850
|
-
default:
|
|
4858
|
+
default: z(() => [P(ee) ? k(e.$slots, "empty-state", y(g({ key: 0 }, P(E)))) : o("", !0)]),
|
|
4851
4859
|
_: 3
|
|
4852
4860
|
}, 8, [
|
|
4853
4861
|
"class",
|
|
@@ -4857,18 +4865,19 @@ var ma = ["aria-label"], ha = {
|
|
|
4857
4865
|
])) : o("", !0)
|
|
4858
4866
|
]));
|
|
4859
4867
|
}
|
|
4860
|
-
}),
|
|
4868
|
+
}), Ra = ["data-surface-mode"], za = {
|
|
4861
4869
|
key: 1,
|
|
4862
4870
|
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"
|
|
4863
|
-
},
|
|
4871
|
+
}, Ba = ["data-visible", "inert"], Va = ["data-visible", "inert"], Ha = {
|
|
4864
4872
|
key: 3,
|
|
4865
4873
|
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"
|
|
4866
|
-
},
|
|
4874
|
+
}, Ua = /* @__PURE__ */ d({
|
|
4867
4875
|
name: "VibeLayout",
|
|
4868
4876
|
__name: "Layout",
|
|
4869
4877
|
props: {
|
|
4870
4878
|
bottomLoadBufferPx: {},
|
|
4871
4879
|
emptyStateMode: {},
|
|
4880
|
+
fillDelayMaxMs: {},
|
|
4872
4881
|
fillDelayMs: {},
|
|
4873
4882
|
fillDelayStepMs: {},
|
|
4874
4883
|
initialCursor: {},
|
|
@@ -4890,14 +4899,14 @@ var ma = ["aria-label"], ha = {
|
|
|
4890
4899
|
"update:surfaceMode"
|
|
4891
4900
|
],
|
|
4892
4901
|
setup(e, { expose: n, emit: i }) {
|
|
4893
|
-
let d = e, f =
|
|
4902
|
+
let d = e, f = I(), m = i, h = ht(d, m), g = D(null), _ = he((e) => {
|
|
4894
4903
|
m("asset-errors", e);
|
|
4895
4904
|
}), v = ge((e) => {
|
|
4896
4905
|
m("asset-loads", e);
|
|
4897
4906
|
});
|
|
4898
4907
|
x(() => {
|
|
4899
4908
|
_.stop(), v.stop();
|
|
4900
|
-
}),
|
|
4909
|
+
}), R(() => h.items.value, (e) => {
|
|
4901
4910
|
m("items-change", [...e]);
|
|
4902
4911
|
});
|
|
4903
4912
|
function b(e) {
|
|
@@ -4924,14 +4933,14 @@ var ma = ["aria-label"], ha = {
|
|
|
4924
4933
|
unlockPageLoading: h.unlockPageLoading
|
|
4925
4934
|
}), (e, n) => (w(), s("section", {
|
|
4926
4935
|
"data-testid": "vibe",
|
|
4927
|
-
"data-surface-mode":
|
|
4936
|
+
"data-surface-mode": P(h).surfaceMode.value,
|
|
4928
4937
|
class: "relative h-full min-h-0 overflow-hidden bg-[#05060a] text-[#f7f1ea]"
|
|
4929
|
-
}, [
|
|
4938
|
+
}, [P(h).canRetryInitialLoad.value ? (w(), s("button", {
|
|
4930
4939
|
key: 0,
|
|
4931
4940
|
type: "button",
|
|
4932
4941
|
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",
|
|
4933
|
-
onClick: n[0] ||= (...e) =>
|
|
4934
|
-
}, " Retry ")) :
|
|
4942
|
+
onClick: n[0] ||= (...e) => P(h).retryInitialLoad && P(h).retryInitialLoad(...e)
|
|
4943
|
+
}, " Retry ")) : P(h).errorMessage.value && P(h).items.value.length > 0 ? (w(), s("div", za, j(P(h).errorMessage.value), 1)) : o("", !0), P(h).isDesktop.value ? (w(), s(t, { key: 2 }, [u(r, {
|
|
4935
4944
|
appear: "",
|
|
4936
4945
|
"enter-active-class": "transition-[opacity,transform] duration-300 ease-out",
|
|
4937
4946
|
"enter-from-class": "translate-y-3 opacity-0",
|
|
@@ -4940,60 +4949,60 @@ var ma = ["aria-label"], ha = {
|
|
|
4940
4949
|
"leave-from-class": "translate-y-0 opacity-100",
|
|
4941
4950
|
"leave-to-class": "translate-y-3 opacity-0"
|
|
4942
4951
|
}, {
|
|
4943
|
-
default:
|
|
4952
|
+
default: z(() => [B(c("div", {
|
|
4944
4953
|
"data-testid": "vibe-list-surface",
|
|
4945
|
-
"data-visible":
|
|
4946
|
-
inert:
|
|
4954
|
+
"data-visible": P(h).surfaceMode.value === "list" ? "true" : "false",
|
|
4955
|
+
inert: P(h).surfaceMode.value !== "list",
|
|
4947
4956
|
class: "absolute inset-0 z-[2]"
|
|
4948
|
-
}, [u(
|
|
4957
|
+
}, [u(La, {
|
|
4949
4958
|
ref_key: "listSurfaceRef",
|
|
4950
4959
|
ref: g,
|
|
4951
|
-
active:
|
|
4952
|
-
"allow-exhausted-next-page-refresh":
|
|
4960
|
+
active: P(h).surfaceMode.value === "list",
|
|
4961
|
+
"allow-exhausted-next-page-refresh": P(h).canRefreshExhaustedNextPage.value,
|
|
4953
4962
|
"bottom-load-buffer-px": d.bottomLoadBufferPx,
|
|
4954
|
-
items:
|
|
4955
|
-
"active-index":
|
|
4956
|
-
"error-message":
|
|
4957
|
-
loading:
|
|
4958
|
-
"has-next-page":
|
|
4959
|
-
"has-previous-page":
|
|
4960
|
-
"pending-append-items":
|
|
4961
|
-
phase:
|
|
4962
|
-
"commit-pending-append":
|
|
4963
|
-
"pagination-detail":
|
|
4964
|
-
"report-asset-error":
|
|
4965
|
-
"report-asset-load":
|
|
4966
|
-
"request-next-page":
|
|
4967
|
-
"request-previous-page":
|
|
4963
|
+
items: P(h).items.value,
|
|
4964
|
+
"active-index": P(h).activeIndex.value,
|
|
4965
|
+
"error-message": P(h).errorMessage.value,
|
|
4966
|
+
loading: P(h).loading.value,
|
|
4967
|
+
"has-next-page": P(h).hasNextPage.value,
|
|
4968
|
+
"has-previous-page": P(h).hasPreviousPage.value,
|
|
4969
|
+
"pending-append-items": P(h).pendingAppendItems.value,
|
|
4970
|
+
phase: P(h).phase.value,
|
|
4971
|
+
"commit-pending-append": P(h).commitPendingAppend,
|
|
4972
|
+
"pagination-detail": P(h).paginationDetail.value,
|
|
4973
|
+
"report-asset-error": P(_).report,
|
|
4974
|
+
"report-asset-load": P(v).report,
|
|
4975
|
+
"request-next-page": P(h).prefetchNextPage,
|
|
4976
|
+
"request-previous-page": P(h).prefetchPreviousPage,
|
|
4968
4977
|
"empty-state-mode": d.emptyStateMode,
|
|
4969
4978
|
"show-status-badges": d.showStatusBadges ?? !0,
|
|
4970
|
-
onBoundaryLoadProgress:
|
|
4971
|
-
onOpenFullscreen:
|
|
4972
|
-
"onUpdate:activeIndex":
|
|
4979
|
+
onBoundaryLoadProgress: P(h).setBoundaryLoadProgress,
|
|
4980
|
+
onOpenFullscreen: P(h).openFullscreen,
|
|
4981
|
+
"onUpdate:activeIndex": P(h).setActiveIndex
|
|
4973
4982
|
}, l({ _: 2 }, [
|
|
4974
4983
|
f["empty-state"] ? {
|
|
4975
4984
|
name: "empty-state",
|
|
4976
|
-
fn:
|
|
4985
|
+
fn: z((t) => [k(e.$slots, "empty-state", y(p(t)))]),
|
|
4977
4986
|
key: "0"
|
|
4978
4987
|
} : void 0,
|
|
4979
4988
|
f["grid-footer"] ? {
|
|
4980
4989
|
name: "grid-footer",
|
|
4981
|
-
fn:
|
|
4990
|
+
fn: z(() => [k(e.$slots, "grid-footer")]),
|
|
4982
4991
|
key: "1"
|
|
4983
4992
|
} : void 0,
|
|
4984
4993
|
f["grid-item-overlay"] ? {
|
|
4985
4994
|
name: "grid-item-overlay",
|
|
4986
|
-
fn:
|
|
4995
|
+
fn: z((t) => [k(e.$slots, "grid-item-overlay", y(p(t)))]),
|
|
4987
4996
|
key: "2"
|
|
4988
4997
|
} : void 0,
|
|
4989
4998
|
f["grid-status"] ? {
|
|
4990
4999
|
name: "grid-status",
|
|
4991
|
-
fn:
|
|
5000
|
+
fn: z((t) => [k(e.$slots, "grid-status", y(p(t)))]),
|
|
4992
5001
|
key: "3"
|
|
4993
5002
|
} : void 0,
|
|
4994
5003
|
f["item-icon"] ? {
|
|
4995
5004
|
name: "item-icon",
|
|
4996
|
-
fn:
|
|
5005
|
+
fn: z((t) => [k(e.$slots, "item-icon", y(p(t)))]),
|
|
4997
5006
|
key: "4"
|
|
4998
5007
|
} : void 0
|
|
4999
5008
|
]), 1032, [
|
|
@@ -5019,7 +5028,7 @@ var ma = ["aria-label"], ha = {
|
|
|
5019
5028
|
"onBoundaryLoadProgress",
|
|
5020
5029
|
"onOpenFullscreen",
|
|
5021
5030
|
"onUpdate:activeIndex"
|
|
5022
|
-
])], 8,
|
|
5031
|
+
])], 8, Ba), [[L, P(h).surfaceMode.value === "list"]])]),
|
|
5023
5032
|
_: 3
|
|
5024
5033
|
}), u(r, {
|
|
5025
5034
|
appear: "",
|
|
@@ -5030,141 +5039,141 @@ var ma = ["aria-label"], ha = {
|
|
|
5030
5039
|
"leave-from-class": "translate-y-0 opacity-100",
|
|
5031
5040
|
"leave-to-class": "-translate-y-3 opacity-0"
|
|
5032
5041
|
}, {
|
|
5033
|
-
default:
|
|
5042
|
+
default: z(() => [B(c("div", {
|
|
5034
5043
|
"data-testid": "vibe-fullscreen-surface",
|
|
5035
|
-
"data-visible":
|
|
5036
|
-
inert:
|
|
5044
|
+
"data-visible": P(h).surfaceMode.value === "fullscreen" ? "true" : "false",
|
|
5045
|
+
inert: P(h).surfaceMode.value !== "fullscreen",
|
|
5037
5046
|
class: "absolute inset-0 z-[3]"
|
|
5038
|
-
}, [u(
|
|
5039
|
-
items:
|
|
5040
|
-
active:
|
|
5041
|
-
"active-index":
|
|
5042
|
-
"error-message":
|
|
5043
|
-
"fill-collected-count":
|
|
5044
|
-
"fill-completed-calls":
|
|
5045
|
-
"fill-loaded-count":
|
|
5046
|
-
"fill-mode":
|
|
5047
|
-
"fill-progress":
|
|
5048
|
-
"fill-target-calls":
|
|
5049
|
-
"fill-target-count":
|
|
5050
|
-
"fill-total-count":
|
|
5051
|
-
loading:
|
|
5052
|
-
"has-next-page":
|
|
5053
|
-
"pagination-detail":
|
|
5054
|
-
phase:
|
|
5055
|
-
"report-asset-error":
|
|
5056
|
-
"report-asset-load":
|
|
5047
|
+
}, [u(pi, {
|
|
5048
|
+
items: P(h).items.value,
|
|
5049
|
+
active: P(h).surfaceMode.value === "fullscreen",
|
|
5050
|
+
"active-index": P(h).activeIndex.value,
|
|
5051
|
+
"error-message": P(h).errorMessage.value,
|
|
5052
|
+
"fill-collected-count": P(h).fillCollectedCount.value,
|
|
5053
|
+
"fill-completed-calls": P(h).fillCompletedCalls.value,
|
|
5054
|
+
"fill-loaded-count": P(h).fillLoadedCount.value,
|
|
5055
|
+
"fill-mode": P(h).fillMode.value,
|
|
5056
|
+
"fill-progress": P(h).fillProgress.value,
|
|
5057
|
+
"fill-target-calls": P(h).fillTargetCalls.value,
|
|
5058
|
+
"fill-target-count": P(h).fillTargetCount.value,
|
|
5059
|
+
"fill-total-count": P(h).fillTotalCount.value,
|
|
5060
|
+
loading: P(h).loading.value,
|
|
5061
|
+
"has-next-page": P(h).hasNextPage.value,
|
|
5062
|
+
"pagination-detail": P(h).paginationDetail.value,
|
|
5063
|
+
phase: P(h).phase.value,
|
|
5064
|
+
"report-asset-error": P(_).report,
|
|
5065
|
+
"report-asset-load": P(v).report,
|
|
5057
5066
|
"empty-state-mode": d.emptyStateMode,
|
|
5058
5067
|
"loop-fullscreen-video": d.loopFullscreenVideo ?? !0,
|
|
5059
5068
|
"show-dominant-image-tone": d.showDominantImageTone ?? !0,
|
|
5060
5069
|
"show-end-badge": d.showEndBadge ?? !0,
|
|
5061
5070
|
"show-status-badges": d.showStatusBadges ?? !0,
|
|
5062
|
-
"show-back-to-list":
|
|
5063
|
-
onBackToList:
|
|
5064
|
-
"onUpdate:activeIndex":
|
|
5071
|
+
"show-back-to-list": P(h).showBackToList.value,
|
|
5072
|
+
onBackToList: P(h).returnToList,
|
|
5073
|
+
"onUpdate:activeIndex": P(h).setActiveIndex
|
|
5065
5074
|
}, l({ _: 2 }, [
|
|
5066
5075
|
f["empty-state"] ? {
|
|
5067
5076
|
name: "empty-state",
|
|
5068
|
-
fn:
|
|
5077
|
+
fn: z((t) => [k(e.$slots, "empty-state", y(p(t)))]),
|
|
5069
5078
|
key: "0"
|
|
5070
5079
|
} : void 0,
|
|
5071
5080
|
f["fullscreen-overlay"] ? {
|
|
5072
5081
|
name: "fullscreen-overlay",
|
|
5073
|
-
fn:
|
|
5082
|
+
fn: z((t) => [k(e.$slots, "fullscreen-overlay", y(p(t)))]),
|
|
5074
5083
|
key: "1"
|
|
5075
5084
|
} : void 0,
|
|
5076
5085
|
f["fullscreen-aside"] ? {
|
|
5077
5086
|
name: "fullscreen-aside",
|
|
5078
|
-
fn:
|
|
5087
|
+
fn: z((t) => [k(e.$slots, "fullscreen-aside", y(p(t)))]),
|
|
5079
5088
|
key: "2"
|
|
5080
5089
|
} : void 0,
|
|
5081
5090
|
f["fullscreen-footer"] ? {
|
|
5082
5091
|
name: "fullscreen-footer",
|
|
5083
|
-
fn:
|
|
5092
|
+
fn: z((t) => [k(e.$slots, "fullscreen-footer", y(p(t)))]),
|
|
5084
5093
|
key: "3"
|
|
5085
5094
|
} : void 0,
|
|
5086
5095
|
f["fullscreen-header-actions"] ? {
|
|
5087
5096
|
name: "fullscreen-header-actions",
|
|
5088
|
-
fn:
|
|
5097
|
+
fn: z((t) => [k(e.$slots, "fullscreen-header-actions", y(p(t)))]),
|
|
5089
5098
|
key: "4"
|
|
5090
5099
|
} : void 0,
|
|
5091
5100
|
f["fullscreen-status"] ? {
|
|
5092
5101
|
name: "fullscreen-status",
|
|
5093
|
-
fn:
|
|
5102
|
+
fn: z((t) => [k(e.$slots, "fullscreen-status", y(p(t)))]),
|
|
5094
5103
|
key: "5"
|
|
5095
5104
|
} : void 0,
|
|
5096
5105
|
f["item-icon"] ? {
|
|
5097
5106
|
name: "item-icon",
|
|
5098
|
-
fn:
|
|
5107
|
+
fn: z((t) => [k(e.$slots, "item-icon", y(p(t)))]),
|
|
5099
5108
|
key: "6"
|
|
5100
5109
|
} : void 0
|
|
5101
|
-
]), 1032, /* @__PURE__ */ "items.active.active-index.error-message.fill-collected-count.fill-completed-calls.fill-loaded-count.fill-mode.fill-progress.fill-target-calls.fill-target-count.fill-total-count.loading.has-next-page.pagination-detail.phase.report-asset-error.report-asset-load.empty-state-mode.loop-fullscreen-video.show-dominant-image-tone.show-end-badge.show-status-badges.show-back-to-list.onBackToList.onUpdate:activeIndex".split("."))], 8,
|
|
5110
|
+
]), 1032, /* @__PURE__ */ "items.active.active-index.error-message.fill-collected-count.fill-completed-calls.fill-loaded-count.fill-mode.fill-progress.fill-target-calls.fill-target-count.fill-total-count.loading.has-next-page.pagination-detail.phase.report-asset-error.report-asset-load.empty-state-mode.loop-fullscreen-video.show-dominant-image-tone.show-end-badge.show-status-badges.show-back-to-list.onBackToList.onUpdate:activeIndex".split("."))], 8, Va), [[L, P(h).surfaceMode.value === "fullscreen"]])]),
|
|
5102
5111
|
_: 3
|
|
5103
|
-
})], 64)) :
|
|
5112
|
+
})], 64)) : P(h).items.value.length === 0 && P(h).loading.value && P(h).phase.value === "initializing" ? (w(), s("div", Ha, [u(P(se), {
|
|
5104
5113
|
class: "size-10 animate-spin text-[#f7f1ea]/82",
|
|
5105
5114
|
"aria-hidden": "true"
|
|
5106
|
-
}), n[1] ||= c("p", { class: "m-0 text-[0.9rem] font-semibold uppercase tracking-[0.22em] text-[#f7f1ea]/72" }, " Loading... ", -1)])) : (w(), a(
|
|
5115
|
+
}), n[1] ||= c("p", { class: "m-0 text-[0.9rem] font-semibold uppercase tracking-[0.22em] text-[#f7f1ea]/72" }, " Loading... ", -1)])) : (w(), a(pi, {
|
|
5107
5116
|
key: 4,
|
|
5108
|
-
items:
|
|
5117
|
+
items: P(h).items.value,
|
|
5109
5118
|
active: !0,
|
|
5110
|
-
"active-index":
|
|
5111
|
-
"error-message":
|
|
5112
|
-
"fill-collected-count":
|
|
5113
|
-
"fill-completed-calls":
|
|
5114
|
-
"fill-loaded-count":
|
|
5115
|
-
"fill-mode":
|
|
5116
|
-
"fill-progress":
|
|
5117
|
-
"fill-target-calls":
|
|
5118
|
-
"fill-target-count":
|
|
5119
|
-
"fill-total-count":
|
|
5120
|
-
loading:
|
|
5121
|
-
"has-next-page":
|
|
5122
|
-
"pagination-detail":
|
|
5123
|
-
phase:
|
|
5124
|
-
"report-asset-error":
|
|
5125
|
-
"report-asset-load":
|
|
5119
|
+
"active-index": P(h).activeIndex.value,
|
|
5120
|
+
"error-message": P(h).errorMessage.value,
|
|
5121
|
+
"fill-collected-count": P(h).fillCollectedCount.value,
|
|
5122
|
+
"fill-completed-calls": P(h).fillCompletedCalls.value,
|
|
5123
|
+
"fill-loaded-count": P(h).fillLoadedCount.value,
|
|
5124
|
+
"fill-mode": P(h).fillMode.value,
|
|
5125
|
+
"fill-progress": P(h).fillProgress.value,
|
|
5126
|
+
"fill-target-calls": P(h).fillTargetCalls.value,
|
|
5127
|
+
"fill-target-count": P(h).fillTargetCount.value,
|
|
5128
|
+
"fill-total-count": P(h).fillTotalCount.value,
|
|
5129
|
+
loading: P(h).loading.value,
|
|
5130
|
+
"has-next-page": P(h).hasNextPage.value,
|
|
5131
|
+
"pagination-detail": P(h).paginationDetail.value,
|
|
5132
|
+
phase: P(h).phase.value,
|
|
5133
|
+
"report-asset-error": P(_).report,
|
|
5134
|
+
"report-asset-load": P(v).report,
|
|
5126
5135
|
"empty-state-mode": d.emptyStateMode,
|
|
5127
5136
|
"loop-fullscreen-video": d.loopFullscreenVideo ?? !0,
|
|
5128
5137
|
"show-dominant-image-tone": d.showDominantImageTone ?? !0,
|
|
5129
5138
|
"show-end-badge": d.showEndBadge ?? !0,
|
|
5130
5139
|
"show-status-badges": d.showStatusBadges ?? !0,
|
|
5131
5140
|
"show-back-to-list": !1,
|
|
5132
|
-
onBackToList:
|
|
5133
|
-
"onUpdate:activeIndex":
|
|
5141
|
+
onBackToList: P(h).returnToList,
|
|
5142
|
+
"onUpdate:activeIndex": P(h).setActiveIndex
|
|
5134
5143
|
}, l({ _: 2 }, [
|
|
5135
5144
|
f["empty-state"] ? {
|
|
5136
5145
|
name: "empty-state",
|
|
5137
|
-
fn:
|
|
5146
|
+
fn: z((t) => [k(e.$slots, "empty-state", y(p(t)))]),
|
|
5138
5147
|
key: "0"
|
|
5139
5148
|
} : void 0,
|
|
5140
5149
|
f["fullscreen-overlay"] ? {
|
|
5141
5150
|
name: "fullscreen-overlay",
|
|
5142
|
-
fn:
|
|
5151
|
+
fn: z((t) => [k(e.$slots, "fullscreen-overlay", y(p(t)))]),
|
|
5143
5152
|
key: "1"
|
|
5144
5153
|
} : void 0,
|
|
5145
5154
|
f["fullscreen-aside"] ? {
|
|
5146
5155
|
name: "fullscreen-aside",
|
|
5147
|
-
fn:
|
|
5156
|
+
fn: z((t) => [k(e.$slots, "fullscreen-aside", y(p(t)))]),
|
|
5148
5157
|
key: "2"
|
|
5149
5158
|
} : void 0,
|
|
5150
5159
|
f["fullscreen-footer"] ? {
|
|
5151
5160
|
name: "fullscreen-footer",
|
|
5152
|
-
fn:
|
|
5161
|
+
fn: z((t) => [k(e.$slots, "fullscreen-footer", y(p(t)))]),
|
|
5153
5162
|
key: "3"
|
|
5154
5163
|
} : void 0,
|
|
5155
5164
|
f["fullscreen-header-actions"] ? {
|
|
5156
5165
|
name: "fullscreen-header-actions",
|
|
5157
|
-
fn:
|
|
5166
|
+
fn: z((t) => [k(e.$slots, "fullscreen-header-actions", y(p(t)))]),
|
|
5158
5167
|
key: "4"
|
|
5159
5168
|
} : void 0,
|
|
5160
5169
|
f["fullscreen-status"] ? {
|
|
5161
5170
|
name: "fullscreen-status",
|
|
5162
|
-
fn:
|
|
5171
|
+
fn: z((t) => [k(e.$slots, "fullscreen-status", y(p(t)))]),
|
|
5163
5172
|
key: "5"
|
|
5164
5173
|
} : void 0,
|
|
5165
5174
|
f["item-icon"] ? {
|
|
5166
5175
|
name: "item-icon",
|
|
5167
|
-
fn:
|
|
5176
|
+
fn: z((t) => [k(e.$slots, "item-icon", y(p(t)))]),
|
|
5168
5177
|
key: "6"
|
|
5169
5178
|
} : void 0
|
|
5170
5179
|
]), 1032, [
|
|
@@ -5192,10 +5201,10 @@ var ma = ["aria-label"], ha = {
|
|
|
5192
5201
|
"show-status-badges",
|
|
5193
5202
|
"onBackToList",
|
|
5194
5203
|
"onUpdate:activeIndex"
|
|
5195
|
-
]))], 8,
|
|
5204
|
+
]))], 8, Ra));
|
|
5196
5205
|
}
|
|
5197
|
-
}),
|
|
5198
|
-
e.component("VibeLayout",
|
|
5206
|
+
}), Wa = { install(e) {
|
|
5207
|
+
e.component("VibeLayout", Ua);
|
|
5199
5208
|
} };
|
|
5200
5209
|
//#endregion
|
|
5201
|
-
export {
|
|
5210
|
+
export { Ua as VibeLayout, Wa as VibePlugin, Wa as default };
|