@wyxos/vibe 3.0.16 → 3.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/components/ListSurface.vue.d.ts +8 -0
- package/lib/components/viewer-core/removalState.d.ts +2 -0
- package/lib/components/viewer-core/useController.d.ts +6 -0
- package/lib/components/viewer-core/useMasonryList.d.ts +2 -0
- package/lib/index.cjs +1 -1
- package/lib/index.js +650 -599
- package/lib/style.css +1 -1
- package/package.json +1 -1
package/lib/index.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { Comment as e, Fragment as t, Text as n, Transition as r, computed as i, createBlock as a, createCommentVNode as o, createElementBlock as s, createElementVNode as c, createSlots as l, createVNode as u, defineComponent as d, guardReactiveProps as f, h as p, isVNode as m, mergeProps as h, nextTick as g, normalizeClass as _, normalizeProps as v, normalizeStyle as y, onBeforeUnmount as b, onMounted as x, openBlock as S, reactive as C, readonly as w, ref as T, renderList as E, renderSlot as D, resolveDynamicComponent as O, toDisplayString as k, toRef as A, unref as j, useAttrs as M, useSlots as N, vShow as P, watch as F, watchEffect as I, withCtx as L, withDirectives as R, withModifiers as z } from "vue";
|
|
2
2
|
//#region node_modules/lucide-vue-next/dist/esm/shared/src/utils/hasA11yProp.js
|
|
3
|
-
var
|
|
3
|
+
var B = (e) => {
|
|
4
4
|
for (let t in e) if (t.startsWith("aria-") || t === "role" || t === "title") return !0;
|
|
5
5
|
return !1;
|
|
6
|
-
},
|
|
7
|
-
let t =
|
|
6
|
+
}, V = (e) => e === "", H = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e) === t).join(" ").trim(), ee = (e) => e.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase(), U = (e) => e.replace(/^([A-Z])|[\s-_]+(\w)/g, (e, t, n) => n ? n.toUpperCase() : t.toLowerCase()), W = (e) => {
|
|
7
|
+
let t = U(e);
|
|
8
8
|
return t.charAt(0).toUpperCase() + t.slice(1);
|
|
9
|
-
},
|
|
9
|
+
}, G = {
|
|
10
10
|
xmlns: "http://www.w3.org/2000/svg",
|
|
11
11
|
width: 24,
|
|
12
12
|
height: 24,
|
|
@@ -16,27 +16,27 @@ var ee = (e) => {
|
|
|
16
16
|
"stroke-width": 2,
|
|
17
17
|
"stroke-linecap": "round",
|
|
18
18
|
"stroke-linejoin": "round"
|
|
19
|
-
},
|
|
20
|
-
...
|
|
19
|
+
}, K = ({ name: e, iconNode: t, absoluteStrokeWidth: n, "absolute-stroke-width": r, strokeWidth: i, "stroke-width": a, size: o = G.width, color: s = G.stroke, ...c }, { slots: l }) => p("svg", {
|
|
20
|
+
...G,
|
|
21
21
|
...c,
|
|
22
22
|
width: o,
|
|
23
23
|
height: o,
|
|
24
24
|
stroke: s,
|
|
25
|
-
"stroke-width":
|
|
26
|
-
class:
|
|
27
|
-
...!l.default && !
|
|
28
|
-
}, [...t.map((e) => p(...e)), ...l.default ? [l.default()] : []]),
|
|
25
|
+
"stroke-width": V(n) || V(r) || n === !0 || r === !0 ? Number(i || a || G["stroke-width"]) * 24 / Number(o) : i || a || G["stroke-width"],
|
|
26
|
+
class: H("lucide", c.class, ...e ? [`lucide-${ee(W(e))}-icon`, `lucide-${ee(e)}`] : ["lucide-icon"]),
|
|
27
|
+
...!l.default && !B(c) && { "aria-hidden": "true" }
|
|
28
|
+
}, [...t.map((e) => p(...e)), ...l.default ? [l.default()] : []]), q = (e, t) => (n, { slots: r, attrs: i }) => p(K, {
|
|
29
29
|
...i,
|
|
30
30
|
...n,
|
|
31
31
|
iconNode: t,
|
|
32
32
|
name: e
|
|
33
|
-
}, r),
|
|
33
|
+
}, r), te = q("arrow-left", [["path", {
|
|
34
34
|
d: "m12 19-7-7 7-7",
|
|
35
35
|
key: "1l729n"
|
|
36
36
|
}], ["path", {
|
|
37
37
|
d: "M19 12H5",
|
|
38
38
|
key: "x3x0zl"
|
|
39
|
-
}]]), J =
|
|
39
|
+
}]]), J = q("audio-lines", [
|
|
40
40
|
["path", {
|
|
41
41
|
d: "M2 10v3",
|
|
42
42
|
key: "1fnikh"
|
|
@@ -61,7 +61,7 @@ var ee = (e) => {
|
|
|
61
61
|
d: "M22 10v3",
|
|
62
62
|
key: "154ddg"
|
|
63
63
|
}]
|
|
64
|
-
]),
|
|
64
|
+
]), ne = q("clapperboard", [
|
|
65
65
|
["path", {
|
|
66
66
|
d: "m12.296 3.464 3.02 3.956",
|
|
67
67
|
key: "qash78"
|
|
@@ -78,13 +78,13 @@ var ee = (e) => {
|
|
|
78
78
|
d: "m6.18 5.276 3.1 3.899",
|
|
79
79
|
key: "zjj9t3"
|
|
80
80
|
}]
|
|
81
|
-
]),
|
|
81
|
+
]), Y = q("file", [["path", {
|
|
82
82
|
d: "M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",
|
|
83
83
|
key: "1oefj6"
|
|
84
84
|
}], ["path", {
|
|
85
85
|
d: "M14 2v5a1 1 0 0 0 1 1h5",
|
|
86
86
|
key: "wfsgrz"
|
|
87
|
-
}]]),
|
|
87
|
+
}]]), X = q("image-plus", [
|
|
88
88
|
["path", {
|
|
89
89
|
d: "M16 5h6",
|
|
90
90
|
key: "1vod17"
|
|
@@ -107,10 +107,10 @@ var ee = (e) => {
|
|
|
107
107
|
r: "2",
|
|
108
108
|
key: "af1f0g"
|
|
109
109
|
}]
|
|
110
|
-
]), re =
|
|
110
|
+
]), re = q("loader-circle", [["path", {
|
|
111
111
|
d: "M21 12a9 9 0 1 1-6.219-8.56",
|
|
112
112
|
key: "13zald"
|
|
113
|
-
}]]), ie =
|
|
113
|
+
}]]), ie = q("pause", [["rect", {
|
|
114
114
|
x: "14",
|
|
115
115
|
y: "3",
|
|
116
116
|
width: "5",
|
|
@@ -124,10 +124,10 @@ var ee = (e) => {
|
|
|
124
124
|
height: "18",
|
|
125
125
|
rx: "1",
|
|
126
126
|
key: "1wsw3u"
|
|
127
|
-
}]]), ae =
|
|
127
|
+
}]]), ae = q("play", [["path", {
|
|
128
128
|
d: "M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z",
|
|
129
129
|
key: "10ikf1"
|
|
130
|
-
}]]), oe =
|
|
130
|
+
}]]), oe = q("triangle-alert", [
|
|
131
131
|
["path", {
|
|
132
132
|
d: "m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",
|
|
133
133
|
key: "wmoenq"
|
|
@@ -140,13 +140,13 @@ var ee = (e) => {
|
|
|
140
140
|
d: "M12 17h.01",
|
|
141
141
|
key: "p32p05"
|
|
142
142
|
}]
|
|
143
|
-
]), se =
|
|
143
|
+
]), se = q("volume-1", [["path", {
|
|
144
144
|
d: "M11 4.702a.705.705 0 0 0-1.203-.498L6.413 7.587A1.4 1.4 0 0 1 5.416 8H3a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2.416a1.4 1.4 0 0 1 .997.413l3.383 3.384A.705.705 0 0 0 11 19.298z",
|
|
145
145
|
key: "uqj9uw"
|
|
146
146
|
}], ["path", {
|
|
147
147
|
d: "M16 9a5 5 0 0 1 0 6",
|
|
148
148
|
key: "1q6k2b"
|
|
149
|
-
}]]), ce =
|
|
149
|
+
}]]), ce = q("volume-2", [
|
|
150
150
|
["path", {
|
|
151
151
|
d: "M11 4.702a.705.705 0 0 0-1.203-.498L6.413 7.587A1.4 1.4 0 0 1 5.416 8H3a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2.416a1.4 1.4 0 0 1 .997.413l3.383 3.384A.705.705 0 0 0 11 19.298z",
|
|
152
152
|
key: "uqj9uw"
|
|
@@ -159,7 +159,7 @@ var ee = (e) => {
|
|
|
159
159
|
d: "M19.364 18.364a9 9 0 0 0 0-12.728",
|
|
160
160
|
key: "ijwkga"
|
|
161
161
|
}]
|
|
162
|
-
]), Z =
|
|
162
|
+
]), Z = q("volume-x", [
|
|
163
163
|
["path", {
|
|
164
164
|
d: "M11 4.702a.705.705 0 0 0-1.203-.498L6.413 7.587A1.4 1.4 0 0 1 5.416 8H3a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2.416a1.4 1.4 0 0 1 .997.413l3.383 3.384A.705.705 0 0 0 11 19.298z",
|
|
165
165
|
key: "uqj9uw"
|
|
@@ -437,7 +437,7 @@ function Ve() {
|
|
|
437
437
|
//#endregion
|
|
438
438
|
//#region src/components/viewer-core/useAutoResolveSource.ts
|
|
439
439
|
function He(e) {
|
|
440
|
-
let t = !!e.initialState?.items.length, n = T([]), r = T(0), a = T([]), o = T(!1), s = T(null), c = T(!t && typeof e.resolve == "function" ? "initializing" : "idle"), l = T(null), u = Ve(), d = u.remainingMs, f = T(null), p = T(!1), m = T(!0), h = T(!1), g = /* @__PURE__ */ new Set(), _ = null, v = null, y = 0, S = 0, C = i(() => Be(e.fillDelayMs, Ie)), w = i(() => Be(e.fillDelayStepMs, Le)), E = i(() => typeof e.resolve == "function"), D = i(() => e.mode ?? "dynamic"), O = i(() => me(e.pageSize)), k = i(() => Se(n.value)), A = i(() => Ce(k.value, e.removedIds.value)), j = i(() => r.value), M = i(() => pe(c.value) || p.value), N = i(() => Ue(n.value, e.removedIds.value)), P = i(() => We(n.value, e.removedIds.value)), I = i(() => P.value?.nextCursor ?? null), L = i(() => o.value ? null : N.value?.previousCursor ?? null), R = i(() => !!I.value), z = i(() => !!L.value),
|
|
440
|
+
let t = !!e.initialState?.items.length, n = T([]), r = T(0), a = T([]), o = T(!1), s = T(null), c = T(!t && typeof e.resolve == "function" ? "initializing" : "idle"), l = T(null), u = Ve(), d = u.remainingMs, f = T(null), p = T(!1), m = T(!0), h = T(!1), g = /* @__PURE__ */ new Set(), _ = null, v = null, y = 0, S = 0, C = i(() => Be(e.fillDelayMs, Ie)), w = i(() => Be(e.fillDelayStepMs, Le)), E = i(() => typeof e.resolve == "function"), D = i(() => e.mode ?? "dynamic"), O = i(() => me(e.pageSize)), k = i(() => Se(n.value)), A = i(() => Ce(k.value, e.removedIds.value)), j = i(() => r.value), M = i(() => pe(c.value) || p.value), N = i(() => Ue(n.value, e.removedIds.value)), P = i(() => We(n.value, e.removedIds.value)), I = i(() => P.value?.nextCursor ?? null), L = i(() => o.value ? null : N.value?.previousCursor ?? null), R = i(() => !!I.value), z = i(() => !!L.value), B = i(() => E.value && n.value.length > 0), V = i(() => Ce(Se(a.value), e.removedIds.value)), H = i(() => Ee(n.value, e.removedIds.value, j.value)), ee = i(() => !A.value.length && !M.value && !!s.value);
|
|
441
441
|
F(() => A.value.length, (e) => {
|
|
442
442
|
if (e === 0) {
|
|
443
443
|
r.value = 0;
|
|
@@ -447,12 +447,12 @@ function He(e) {
|
|
|
447
447
|
}), F(() => r.value, () => {
|
|
448
448
|
m.value && se();
|
|
449
449
|
}), x(() => {
|
|
450
|
-
fe() || e.resolve &&
|
|
450
|
+
fe() || e.resolve && U();
|
|
451
451
|
}), b(() => {
|
|
452
452
|
_?.abort(), _ = null, u.clear(!0);
|
|
453
453
|
});
|
|
454
|
-
async function
|
|
455
|
-
v =
|
|
454
|
+
async function U() {
|
|
455
|
+
v = U;
|
|
456
456
|
let t = await ue({
|
|
457
457
|
continueUntilFilled: D.value === "dynamic",
|
|
458
458
|
cursor: e.initialCursor ?? null,
|
|
@@ -461,33 +461,33 @@ function He(e) {
|
|
|
461
461
|
});
|
|
462
462
|
t && (n.value = t.buckets, r.value = 0, Q());
|
|
463
463
|
}
|
|
464
|
-
async function
|
|
464
|
+
async function W() {
|
|
465
465
|
if (!(h.value || M.value)) {
|
|
466
|
-
if (!R.value) return
|
|
466
|
+
if (!R.value) return B.value ? le("trailing") : void 0;
|
|
467
467
|
if (D.value === "static" && ve("trailing")) return le("trailing");
|
|
468
468
|
await ce(I.value);
|
|
469
469
|
}
|
|
470
470
|
}
|
|
471
|
-
async function
|
|
471
|
+
async function G() {
|
|
472
472
|
if (!(h.value || !z.value || M.value)) {
|
|
473
473
|
if (D.value === "static" && ve("leading")) return le("leading");
|
|
474
474
|
await Z(L.value);
|
|
475
475
|
}
|
|
476
476
|
}
|
|
477
|
-
async function
|
|
478
|
-
if (
|
|
477
|
+
async function K() {
|
|
478
|
+
if (ee.value) {
|
|
479
479
|
if (n.value = [], r.value = 0, a.value = [], o.value = !1, s.value = null, c.value = E.value ? "initializing" : "idle", l.value = null, f.value = null, p.value = !1, g.clear(), _?.abort(), _ = null, u.clear(!0), fe()) {
|
|
480
480
|
Q();
|
|
481
481
|
return;
|
|
482
482
|
}
|
|
483
|
-
await
|
|
483
|
+
await U();
|
|
484
484
|
}
|
|
485
485
|
}
|
|
486
|
-
async function
|
|
487
|
-
if (
|
|
486
|
+
async function q() {
|
|
487
|
+
if (ee.value) return K();
|
|
488
488
|
h.value || c.value !== "failed" || !v || (s.value = null, await v());
|
|
489
489
|
}
|
|
490
|
-
async function
|
|
490
|
+
async function te() {
|
|
491
491
|
if (!a.value.length) return p.value = !1, Q();
|
|
492
492
|
n.value = [...n.value, ...a.value], a.value = [], p.value = !1, Q();
|
|
493
493
|
}
|
|
@@ -497,13 +497,13 @@ function He(e) {
|
|
|
497
497
|
let i = ge(t, 0, n.length - 1);
|
|
498
498
|
i !== r.value && (r.value = i, e.emit("update:activeIndex", i));
|
|
499
499
|
}
|
|
500
|
-
function
|
|
500
|
+
function ne(e) {
|
|
501
501
|
m.value = e;
|
|
502
502
|
}
|
|
503
|
-
function
|
|
503
|
+
function Y() {
|
|
504
504
|
h.value = !0, u.clear(!0);
|
|
505
505
|
}
|
|
506
|
-
function
|
|
506
|
+
function X() {
|
|
507
507
|
h.value = !1;
|
|
508
508
|
}
|
|
509
509
|
function re() {
|
|
@@ -531,15 +531,15 @@ function He(e) {
|
|
|
531
531
|
r.value = Pe(A.value, j.value, e);
|
|
532
532
|
}
|
|
533
533
|
function oe() {
|
|
534
|
-
a.value.length > 0 && !
|
|
534
|
+
a.value.length > 0 && !V.value.length && te();
|
|
535
535
|
}
|
|
536
536
|
async function se() {
|
|
537
537
|
if (!(!m.value || _e())) {
|
|
538
538
|
if (!A.value.length) {
|
|
539
|
-
R.value && await
|
|
539
|
+
R.value && await W();
|
|
540
540
|
return;
|
|
541
541
|
}
|
|
542
|
-
z.value && r.value < 3 && await
|
|
542
|
+
z.value && r.value < 3 && await G(), R.value && r.value >= A.value.length - 3 && await W();
|
|
543
543
|
}
|
|
544
544
|
}
|
|
545
545
|
async function ce(e) {
|
|
@@ -554,7 +554,7 @@ function He(e) {
|
|
|
554
554
|
});
|
|
555
555
|
if (t) {
|
|
556
556
|
if (t.canceled) return n.value = [...n.value, ...t.buckets], a.value = [], p.value = !1, Q();
|
|
557
|
-
if (a.value = t.buckets, !
|
|
557
|
+
if (a.value = t.buckets, !V.value.length) return n.value = [...n.value, ...a.value], a.value = [], p.value = !1, Q();
|
|
558
558
|
p.value = !0;
|
|
559
559
|
}
|
|
560
560
|
}
|
|
@@ -694,11 +694,11 @@ function He(e) {
|
|
|
694
694
|
}
|
|
695
695
|
return {
|
|
696
696
|
activeIndex: j,
|
|
697
|
-
canRetryInitialLoad:
|
|
697
|
+
canRetryInitialLoad: ee,
|
|
698
698
|
cancel: re,
|
|
699
|
-
canRefreshTrailingBoundary:
|
|
700
|
-
commitPendingAppend:
|
|
701
|
-
currentCursor:
|
|
699
|
+
canRefreshTrailingBoundary: B,
|
|
700
|
+
commitPendingAppend: te,
|
|
701
|
+
currentCursor: H,
|
|
702
702
|
errorMessage: s,
|
|
703
703
|
fillCollectedCount: l,
|
|
704
704
|
fillDelayRemainingMs: d,
|
|
@@ -708,22 +708,22 @@ function He(e) {
|
|
|
708
708
|
isAutoPrefetchEnabled: m,
|
|
709
709
|
isPageLoadingLocked: h,
|
|
710
710
|
items: A,
|
|
711
|
-
lockPageLoading:
|
|
711
|
+
lockPageLoading: Y,
|
|
712
712
|
loading: M,
|
|
713
713
|
mode: D,
|
|
714
714
|
maybePrefetchAround: se,
|
|
715
715
|
nextCursor: I,
|
|
716
|
-
pendingAppendItems:
|
|
716
|
+
pendingAppendItems: V,
|
|
717
717
|
phase: c,
|
|
718
|
-
prefetchNextPage:
|
|
719
|
-
prefetchPreviousPage:
|
|
718
|
+
prefetchNextPage: W,
|
|
719
|
+
prefetchPreviousPage: G,
|
|
720
720
|
previousCursor: L,
|
|
721
|
-
retryInitialLoad:
|
|
722
|
-
retry:
|
|
721
|
+
retryInitialLoad: K,
|
|
722
|
+
retry: q,
|
|
723
723
|
setActiveIndex: J,
|
|
724
|
-
setAutoPrefetchEnabled:
|
|
724
|
+
setAutoPrefetchEnabled: ne,
|
|
725
725
|
syncActiveIndexAfterVisibilityChange: ae,
|
|
726
|
-
unlockPageLoading:
|
|
726
|
+
unlockPageLoading: X,
|
|
727
727
|
getActiveOccurrenceKey: ie,
|
|
728
728
|
maybeCommitPendingAppendWhenFilteredOut: oe
|
|
729
729
|
};
|
|
@@ -831,7 +831,10 @@ function Ge(e, t) {
|
|
|
831
831
|
//#region src/components/viewer-core/useController.ts
|
|
832
832
|
var Ke = 1024;
|
|
833
833
|
function qe(e, t) {
|
|
834
|
-
let n = Ge(e, t), r =
|
|
834
|
+
let n = Ge(e, t), r = C({
|
|
835
|
+
nextBoundaryLoadProgress: 0,
|
|
836
|
+
previousBoundaryLoadProgress: 0
|
|
837
|
+
}), a = T(0), o = T("list"), s = C({
|
|
835
838
|
activeIndex: 0,
|
|
836
839
|
currentCursor: null,
|
|
837
840
|
errorMessage: null,
|
|
@@ -843,19 +846,21 @@ function qe(e, t) {
|
|
|
843
846
|
itemCount: 0,
|
|
844
847
|
loadState: "loaded",
|
|
845
848
|
mode: "dynamic",
|
|
849
|
+
nextBoundaryLoadProgress: 0,
|
|
846
850
|
nextCursor: null,
|
|
847
851
|
pageLoadingLocked: !1,
|
|
848
852
|
phase: "idle",
|
|
853
|
+
previousBoundaryLoadProgress: 0,
|
|
849
854
|
previousCursor: null,
|
|
850
855
|
removedCount: 0,
|
|
851
856
|
removedIds: [],
|
|
852
857
|
surfaceMode: "list"
|
|
853
|
-
}),
|
|
854
|
-
F(
|
|
855
|
-
e &&
|
|
858
|
+
}), c = i(() => a.value >= Ke), l = i(() => c.value ? o.value : "fullscreen"), u = i(() => c.value && l.value === "fullscreen");
|
|
859
|
+
F(c, (e) => {
|
|
860
|
+
e && h();
|
|
856
861
|
}), F(() => e.surfaceMode, () => {
|
|
857
|
-
|
|
858
|
-
}), F([
|
|
862
|
+
h();
|
|
863
|
+
}), F([l, () => n.pendingAppendItems.value.length], ([e, t]) => {
|
|
859
864
|
e === "list" || t <= 0 || n.commitPendingAppend();
|
|
860
865
|
}), F([
|
|
861
866
|
() => n.items.value.length,
|
|
@@ -863,64 +868,71 @@ function qe(e, t) {
|
|
|
863
868
|
() => n.hasNextPage.value,
|
|
864
869
|
() => n.pendingAppendItems.value.length
|
|
865
870
|
], ([e, n, r, i]) => {
|
|
866
|
-
!
|
|
867
|
-
}), F(
|
|
871
|
+
!c.value || e > 0 || o.value === "list" || n || r || i > 0 || (o.value = "list", t("update:surfaceMode", "list"));
|
|
872
|
+
}), F(l, (e) => {
|
|
868
873
|
n.setAutoPrefetchEnabled(e === "fullscreen");
|
|
869
874
|
}, { immediate: !0 }), I(() => {
|
|
870
|
-
|
|
875
|
+
s.activeIndex = n.activeIndex.value, s.currentCursor = n.currentCursor.value, s.errorMessage = n.errorMessage.value, s.fillCollectedCount = n.fillCollectedCount.value, s.fillDelayRemainingMs = n.fillDelayRemainingMs.value, s.fillTargetCount = n.fillTargetCount.value, s.hasNextPage = n.hasNextPage.value, s.hasPreviousPage = n.hasPreviousPage.value, s.itemCount = n.items.value.length, s.loadState = n.loading.value ? "loading" : n.errorMessage.value ? "failed" : "loaded", s.mode = n.mode.value, s.nextBoundaryLoadProgress = r.nextBoundaryLoadProgress, s.nextCursor = n.nextCursor.value, s.pageLoadingLocked = n.isPageLoadingLocked.value, s.phase = n.phase.value, s.previousBoundaryLoadProgress = r.previousBoundaryLoadProgress, s.previousCursor = n.previousCursor.value, s.removedCount = n.removedCount.value, s.removedIds = n.getRemovedIds(), s.surfaceMode = l.value;
|
|
871
876
|
}), x(() => {
|
|
872
|
-
|
|
877
|
+
m(), h(), window.addEventListener("keydown", p), window.addEventListener("resize", m);
|
|
873
878
|
}), b(() => {
|
|
874
|
-
window.removeEventListener("keydown",
|
|
879
|
+
window.removeEventListener("keydown", p), window.removeEventListener("resize", m);
|
|
875
880
|
});
|
|
876
|
-
function
|
|
877
|
-
n.setActiveIndex(e),
|
|
881
|
+
function d(e) {
|
|
882
|
+
n.setActiveIndex(e), c.value && o.value !== "fullscreen" && (o.value = "fullscreen", t("update:surfaceMode", "fullscreen"));
|
|
878
883
|
}
|
|
879
|
-
function
|
|
880
|
-
!
|
|
884
|
+
function f() {
|
|
885
|
+
!c.value || o.value === "list" || (o.value = "list", t("update:surfaceMode", "list"));
|
|
881
886
|
}
|
|
882
|
-
function
|
|
883
|
-
e.defaultPrevented || e.key !== "Escape" || !
|
|
884
|
-
}
|
|
885
|
-
function p() {
|
|
886
|
-
r.value = window.innerWidth || 0;
|
|
887
|
+
function p(e) {
|
|
888
|
+
e.defaultPrevented || e.key !== "Escape" || !c.value || l.value !== "fullscreen" || Q(e.target) || (e.preventDefault(), f());
|
|
887
889
|
}
|
|
888
890
|
function m() {
|
|
889
|
-
|
|
891
|
+
a.value = window.innerWidth || 0;
|
|
892
|
+
}
|
|
893
|
+
function h() {
|
|
894
|
+
!c.value || !e.surfaceMode || e.surfaceMode === o.value || (o.value = e.surfaceMode);
|
|
895
|
+
}
|
|
896
|
+
function g(e) {
|
|
897
|
+
r.nextBoundaryLoadProgress = Je(e.nextBoundaryLoadProgress), r.previousBoundaryLoadProgress = Je(e.previousBoundaryLoadProgress);
|
|
890
898
|
}
|
|
891
899
|
return {
|
|
892
900
|
...n,
|
|
893
901
|
cancel: n.cancel,
|
|
894
|
-
isDesktop:
|
|
902
|
+
isDesktop: c,
|
|
895
903
|
lockPageLoading: n.lockPageLoading,
|
|
896
904
|
loadNext: n.loadNext,
|
|
897
905
|
loadPrevious: n.loadPrevious,
|
|
898
|
-
openFullscreen:
|
|
899
|
-
returnToList:
|
|
906
|
+
openFullscreen: d,
|
|
907
|
+
returnToList: f,
|
|
900
908
|
retry: n.retry,
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
909
|
+
setBoundaryLoadProgress: g,
|
|
910
|
+
showBackToList: u,
|
|
911
|
+
status: w(s),
|
|
912
|
+
surfaceMode: l,
|
|
904
913
|
unlockPageLoading: n.unlockPageLoading
|
|
905
914
|
};
|
|
906
915
|
}
|
|
916
|
+
function Je(e) {
|
|
917
|
+
return Math.min(Math.max(e, 0), 1);
|
|
918
|
+
}
|
|
907
919
|
//#endregion
|
|
908
920
|
//#region src/components/FullscreenMediaBar.vue?vue&type=script&setup=true&lang.ts
|
|
909
|
-
var
|
|
921
|
+
var Ye = {
|
|
910
922
|
"data-testid": "vibe-media-bar",
|
|
911
923
|
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]"
|
|
912
|
-
},
|
|
924
|
+
}, Xe = { class: "grid grid-cols-[auto_minmax(0,1fr)_auto_auto] items-center gap-3 border-t border-white/12 bg-black/70 px-4 py-3 backdrop-blur-[18px]" }, Ze = { class: "text-[0.76rem] font-bold uppercase tracking-[0.18em] text-[#f7f1ea]/74" }, Qe = { class: "relative h-4 w-full" }, $e = [
|
|
913
925
|
"max",
|
|
914
926
|
"value",
|
|
915
927
|
"disabled"
|
|
916
|
-
],
|
|
928
|
+
], et = { class: "text-[0.76rem] font-bold uppercase tracking-[0.18em] text-[#f7f1ea]/74" }, tt = ["data-layout"], nt = {
|
|
917
929
|
key: 0,
|
|
918
930
|
"data-testid": "vibe-media-volume-popover",
|
|
919
931
|
class: "absolute bottom-[calc(100%+0.8rem)] right-0 grid justify-items-center gap-3 border border-white/12 bg-black/82 px-3 py-4 shadow-[0_20px_50px_-20px_rgba(0,0,0,0.85)] backdrop-blur-[18px]"
|
|
920
|
-
},
|
|
932
|
+
}, rt = { class: "relative flex h-28 w-4 items-center justify-center" }, it = ["value"], at = { class: "flex items-center gap-3" }, ot = ["aria-label"], st = {
|
|
921
933
|
key: 0,
|
|
922
934
|
class: "relative h-4 w-24"
|
|
923
|
-
},
|
|
935
|
+
}, ct = ["value"], lt = /* @__PURE__ */ d({
|
|
924
936
|
__name: "FullscreenMediaBar",
|
|
925
937
|
props: {
|
|
926
938
|
currentTime: {},
|
|
@@ -963,9 +975,9 @@ var Je = {
|
|
|
963
975
|
function w(e, t, n) {
|
|
964
976
|
return Math.min(Math.max(e, t), n);
|
|
965
977
|
}
|
|
966
|
-
return (e, t) => (S(), s("div",
|
|
967
|
-
c("span",
|
|
968
|
-
c("div",
|
|
978
|
+
return (e, t) => (S(), s("div", Ye, [c("div", Xe, [
|
|
979
|
+
c("span", Ze, k(n.currentTimeLabel), 1),
|
|
980
|
+
c("div", Qe, [
|
|
969
981
|
t[3] ||= c("div", { class: "absolute inset-x-0 top-1/2 h-px -translate-y-1/2 bg-white/12" }, null, -1),
|
|
970
982
|
c("div", {
|
|
971
983
|
class: "absolute left-0 top-1/2 h-px -translate-y-1/2 bg-[#f7f1ea]",
|
|
@@ -982,16 +994,16 @@ var Je = {
|
|
|
982
994
|
disabled: n.duration <= 0,
|
|
983
995
|
class: "vibe-media-slider absolute inset-0 z-10 h-4 w-full cursor-pointer bg-transparent disabled:cursor-default disabled:opacity-50",
|
|
984
996
|
onInput: t[0] ||= (e) => r("seek-input", e)
|
|
985
|
-
}, null, 40,
|
|
997
|
+
}, null, 40, $e)
|
|
986
998
|
]),
|
|
987
|
-
c("span",
|
|
999
|
+
c("span", et, k(n.durationLabel), 1),
|
|
988
1000
|
c("div", {
|
|
989
1001
|
ref_key: "rootRef",
|
|
990
1002
|
ref: l,
|
|
991
1003
|
"data-testid": "vibe-media-volume",
|
|
992
1004
|
"data-layout": n.volumeControlLayout,
|
|
993
1005
|
class: "relative flex items-center justify-end"
|
|
994
|
-
}, [d.value && u.value ? (S(), s("div",
|
|
1006
|
+
}, [d.value && u.value ? (S(), s("div", nt, [c("div", rt, [
|
|
995
1007
|
t[4] ||= c("div", { class: "absolute bottom-0 left-1/2 h-full w-px -translate-x-1/2 bg-white/12" }, null, -1),
|
|
996
1008
|
c("div", {
|
|
997
1009
|
class: "absolute bottom-0 left-1/2 w-px -translate-x-1/2 bg-[#f7f1ea]",
|
|
@@ -1008,8 +1020,8 @@ var Je = {
|
|
|
1008
1020
|
value: f.value,
|
|
1009
1021
|
class: "vibe-media-slider absolute left-1/2 top-1/2 h-4 w-28 -translate-x-1/2 -translate-y-1/2 -rotate-90 bg-transparent",
|
|
1010
1022
|
onInput: t[1] ||= (e) => r("volume-input", e)
|
|
1011
|
-
}, null, 40,
|
|
1012
|
-
])])) : o("", !0), c("div",
|
|
1023
|
+
}, null, 40, it)
|
|
1024
|
+
])])) : o("", !0), c("div", at, [c("button", {
|
|
1013
1025
|
type: "button",
|
|
1014
1026
|
"data-testid": "vibe-media-volume-button",
|
|
1015
1027
|
"aria-label": g.value,
|
|
@@ -1018,7 +1030,7 @@ var Je = {
|
|
|
1018
1030
|
}, [(S(), a(O(m.value), {
|
|
1019
1031
|
class: "h-4 w-4 stroke-[1.9]",
|
|
1020
1032
|
"aria-hidden": "true"
|
|
1021
|
-
}))], 8,
|
|
1033
|
+
}))], 8, ot), n.volumeControlLayout === "horizontal" ? (S(), s("div", st, [
|
|
1022
1034
|
t[5] ||= c("div", { class: "absolute inset-x-0 top-1/2 h-px -translate-y-1/2 bg-white/12" }, null, -1),
|
|
1023
1035
|
c("div", {
|
|
1024
1036
|
class: "absolute left-0 top-1/2 h-px -translate-y-1/2 bg-[#f7f1ea]",
|
|
@@ -1035,24 +1047,24 @@ var Je = {
|
|
|
1035
1047
|
value: f.value,
|
|
1036
1048
|
class: "vibe-media-slider absolute inset-0 z-10 h-4 w-full cursor-pointer bg-transparent",
|
|
1037
1049
|
onInput: t[2] ||= (e) => r("volume-input", e)
|
|
1038
|
-
}, null, 40,
|
|
1039
|
-
])) : o("", !0)])], 8,
|
|
1050
|
+
}, null, 40, ct)
|
|
1051
|
+
])) : o("", !0)])], 8, tt)
|
|
1040
1052
|
])]));
|
|
1041
1053
|
}
|
|
1042
|
-
}),
|
|
1054
|
+
}), ut = { class: "pointer-events-none absolute inset-0 z-[3] flex flex-col justify-between p-[clamp(1.25rem,2.6vw,2.25rem)]" }, dt = { class: "grid gap-4" }, ft = { class: "flex min-h-11 items-center justify-between gap-4" }, pt = { class: "min-w-0 flex flex-1 items-center gap-3" }, mt = {
|
|
1043
1055
|
key: 1,
|
|
1044
1056
|
"data-testid": "vibe-title",
|
|
1045
1057
|
class: "m-0 truncate text-left text-[0.82rem] leading-none tracking-[-0.04em] min-[721px]:text-[1.2rem]"
|
|
1046
|
-
},
|
|
1058
|
+
}, ht = { class: "pointer-events-auto flex shrink-0 items-center gap-2" }, gt = {
|
|
1047
1059
|
"data-testid": "vibe-pagination",
|
|
1048
1060
|
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]"
|
|
1049
|
-
},
|
|
1061
|
+
}, _t = { class: "whitespace-nowrap" }, vt = {
|
|
1050
1062
|
key: 1,
|
|
1051
1063
|
class: "whitespace-nowrap border-l border-white/12 pl-2 text-[#f7f1ea]/56 min-[721px]:pl-3"
|
|
1052
|
-
},
|
|
1064
|
+
}, yt = {
|
|
1053
1065
|
key: 0,
|
|
1054
1066
|
class: "grid gap-2 max-[720px]:justify-items-start"
|
|
1055
|
-
},
|
|
1067
|
+
}, bt = /* @__PURE__ */ d({
|
|
1056
1068
|
__name: "FullscreenHeader",
|
|
1057
1069
|
props: {
|
|
1058
1070
|
currentIndex: {},
|
|
@@ -1066,58 +1078,58 @@ var Je = {
|
|
|
1066
1078
|
emits: ["back-to-list"],
|
|
1067
1079
|
setup(e, { emit: t }) {
|
|
1068
1080
|
let n = e, r = t;
|
|
1069
|
-
return (e, t) => (S(), s("div",
|
|
1081
|
+
return (e, t) => (S(), s("div", ut, [c("div", dt, [c("div", ft, [c("div", pt, [n.showBackToList ? (S(), s("button", {
|
|
1070
1082
|
key: 0,
|
|
1071
1083
|
type: "button",
|
|
1072
1084
|
"data-testid": "vibe-back-to-list",
|
|
1073
1085
|
class: "pointer-events-auto inline-flex h-11 w-11 shrink-0 items-center justify-center border border-white/14 bg-black/40 text-[#f7f1ea]/78 backdrop-blur-[18px] transition hover:border-white/28 hover:bg-black/55",
|
|
1074
1086
|
"aria-label": "Back to list",
|
|
1075
1087
|
onClick: t[0] ||= (e) => r("back-to-list")
|
|
1076
|
-
}, [u(j(
|
|
1088
|
+
}, [u(j(te), {
|
|
1077
1089
|
class: "h-4 w-4 stroke-[2.2]",
|
|
1078
1090
|
"aria-hidden": "true"
|
|
1079
|
-
})])) : o("", !0), n.title ? (S(), s("h2",
|
|
1091
|
+
})])) : o("", !0), n.title ? (S(), s("h2", mt, k(n.title), 1)) : o("", !0)]), c("div", ht, [c("span", gt, [
|
|
1080
1092
|
n.loading ? (S(), a(j(re), {
|
|
1081
1093
|
key: 0,
|
|
1082
1094
|
"data-testid": "vibe-pagination-spinner",
|
|
1083
1095
|
class: "h-3.5 w-3.5 animate-spin stroke-[1.9]",
|
|
1084
1096
|
"aria-hidden": "true"
|
|
1085
1097
|
})) : o("", !0),
|
|
1086
|
-
c("span",
|
|
1087
|
-
n.paginationDetail ? (S(), s("span",
|
|
1088
|
-
]), D(e.$slots, "actions")])])]), n.showEndBadge ? (S(), s("div",
|
|
1098
|
+
c("span", _t, k(n.currentIndex + 1) + " / " + k(n.total), 1),
|
|
1099
|
+
n.paginationDetail ? (S(), s("span", vt, k(n.paginationDetail), 1)) : o("", !0)
|
|
1100
|
+
]), D(e.$slots, "actions")])])]), n.showEndBadge ? (S(), s("div", yt, [...t[1] ||= [c("span", { class: "inline-flex items-center border border-amber-300/35 bg-black/40 px-4 py-3 text-[0.74rem] font-bold uppercase tracking-[0.2em] text-amber-200 backdrop-blur-[18px]" }, " End reached ", -1)]])) : o("", !0)]));
|
|
1089
1101
|
}
|
|
1090
|
-
}),
|
|
1091
|
-
image:
|
|
1092
|
-
video:
|
|
1102
|
+
}), xt = {
|
|
1103
|
+
image: X,
|
|
1104
|
+
video: ne,
|
|
1093
1105
|
audio: J,
|
|
1094
|
-
other:
|
|
1095
|
-
},
|
|
1106
|
+
other: Y
|
|
1107
|
+
}, St = {
|
|
1096
1108
|
image: "Image",
|
|
1097
1109
|
video: "Video",
|
|
1098
1110
|
audio: "Audio",
|
|
1099
1111
|
other: "File"
|
|
1100
1112
|
};
|
|
1101
|
-
function St(e) {
|
|
1102
|
-
return bt[e];
|
|
1103
|
-
}
|
|
1104
1113
|
function Ct(e) {
|
|
1105
1114
|
return xt[e];
|
|
1106
1115
|
}
|
|
1116
|
+
function wt(e) {
|
|
1117
|
+
return St[e];
|
|
1118
|
+
}
|
|
1107
1119
|
//#endregion
|
|
1108
1120
|
//#region src/components/viewer-core/useFullscreenSurfaceMedia.ts
|
|
1109
|
-
var
|
|
1110
|
-
function
|
|
1121
|
+
var Tt = 1, Et = 2;
|
|
1122
|
+
function Dt(e) {
|
|
1111
1123
|
function t(e, t) {
|
|
1112
1124
|
let n = t.title?.trim();
|
|
1113
|
-
return n ? `${e} ${n}` : `${e} ${
|
|
1125
|
+
return n ? `${e} ${n}` : `${e} ${wt(t.type).toLowerCase()}`;
|
|
1114
1126
|
}
|
|
1115
1127
|
function n(e) {
|
|
1116
1128
|
return $(e);
|
|
1117
1129
|
}
|
|
1118
1130
|
function r(t) {
|
|
1119
1131
|
let n = e.resolvedActiveIndex.value;
|
|
1120
|
-
return !!e.active.value && t >= n -
|
|
1132
|
+
return !!e.active.value && t >= n - Tt && t <= n + Et;
|
|
1121
1133
|
}
|
|
1122
1134
|
function i(t, i) {
|
|
1123
1135
|
let a = n(i);
|
|
@@ -1152,11 +1164,11 @@ function Et(e) {
|
|
|
1152
1164
|
}
|
|
1153
1165
|
//#endregion
|
|
1154
1166
|
//#region src/components/viewer-core/slotContent.ts
|
|
1155
|
-
function
|
|
1167
|
+
function Ot(e) {
|
|
1156
1168
|
if (!Array.isArray(e)) return !1;
|
|
1157
1169
|
for (let t of e) {
|
|
1158
1170
|
if (Array.isArray(t)) {
|
|
1159
|
-
if (
|
|
1171
|
+
if (Ot(t)) return !0;
|
|
1160
1172
|
continue;
|
|
1161
1173
|
}
|
|
1162
1174
|
if (!m(t)) {
|
|
@@ -1167,20 +1179,20 @@ function Dt(e) {
|
|
|
1167
1179
|
if (t != null && t !== !1) return !0;
|
|
1168
1180
|
continue;
|
|
1169
1181
|
}
|
|
1170
|
-
if (!
|
|
1182
|
+
if (!kt(t)) return !0;
|
|
1171
1183
|
}
|
|
1172
1184
|
return !1;
|
|
1173
1185
|
}
|
|
1174
|
-
function
|
|
1175
|
-
return r.type === e ? !0 : r.type === n ? typeof r.children == "string" ? r.children.trim().length === 0 : !0 : r.type === t ? !
|
|
1186
|
+
function kt(r) {
|
|
1187
|
+
return r.type === e ? !0 : r.type === n ? typeof r.children == "string" ? r.children.trim().length === 0 : !0 : r.type === t ? !Ot(r.children) : !1;
|
|
1176
1188
|
}
|
|
1177
1189
|
//#endregion
|
|
1178
1190
|
//#region src/components/viewer-core/useSurfaceEmptyState.ts
|
|
1179
|
-
var
|
|
1180
|
-
function
|
|
1191
|
+
var At = "no items available";
|
|
1192
|
+
function jt(e) {
|
|
1181
1193
|
let t = i(() => e.loading.value || e.itemCount.value > 0 || e.emptyStateMode.value === "hidden" ? null : {
|
|
1182
1194
|
loading: !!e.loading.value,
|
|
1183
|
-
message:
|
|
1195
|
+
message: At,
|
|
1184
1196
|
mode: e.emptyStateMode.value === "badge" ? "badge" : "inline",
|
|
1185
1197
|
surface: e.surface,
|
|
1186
1198
|
total: e.itemCount.value
|
|
@@ -1188,23 +1200,23 @@ function At(e) {
|
|
|
1188
1200
|
return {
|
|
1189
1201
|
emptyStateProps: t,
|
|
1190
1202
|
showBadgeEmptyState: i(() => t.value?.mode === "badge"),
|
|
1191
|
-
showCustomEmptyState: i(() =>
|
|
1203
|
+
showCustomEmptyState: i(() => Ot(n.value)),
|
|
1192
1204
|
showInlineEmptyState: i(() => t.value?.mode === "inline")
|
|
1193
1205
|
};
|
|
1194
1206
|
}
|
|
1195
1207
|
//#endregion
|
|
1196
1208
|
//#region src/components/viewer-core/format.ts
|
|
1197
|
-
function
|
|
1209
|
+
function Mt(e) {
|
|
1198
1210
|
if (!Number.isFinite(e) || e <= 0) return "0:00";
|
|
1199
1211
|
let t = Math.floor(e), n = Math.floor(t / 3600), r = Math.floor(t % 3600 / 60), i = t % 60;
|
|
1200
1212
|
return n > 0 ? `${n}:${String(r).padStart(2, "0")}:${String(i).padStart(2, "0")}` : `${r}:${String(i).padStart(2, "0")}`;
|
|
1201
1213
|
}
|
|
1202
1214
|
//#endregion
|
|
1203
1215
|
//#region src/components/viewer-core/surfaceStatus.ts
|
|
1204
|
-
function
|
|
1216
|
+
function Nt(e) {
|
|
1205
1217
|
return e.phase ? e.phase : e.loading ? e.itemCount > 0 ? "loading" : "initializing" : "idle";
|
|
1206
1218
|
}
|
|
1207
|
-
function
|
|
1219
|
+
function Pt(e) {
|
|
1208
1220
|
return e.phase === "failed" ? {
|
|
1209
1221
|
kind: "failed",
|
|
1210
1222
|
message: e.errorMessage ?? (e.hasItems ? "The viewer could not load more items." : "The viewer could not load items.")
|
|
@@ -1227,7 +1239,7 @@ function Nt(e) {
|
|
|
1227
1239
|
}
|
|
1228
1240
|
//#endregion
|
|
1229
1241
|
//#region src/components/viewer-core/useActivation.ts
|
|
1230
|
-
function
|
|
1242
|
+
function Ft(e) {
|
|
1231
1243
|
let t = !1;
|
|
1232
1244
|
F(e.enabled, async (t) => {
|
|
1233
1245
|
if (n(t), t) {
|
|
@@ -1250,7 +1262,7 @@ function Pt(e) {
|
|
|
1250
1262
|
}
|
|
1251
1263
|
//#endregion
|
|
1252
1264
|
//#region src/components/viewer-core/assetState.ts
|
|
1253
|
-
var
|
|
1265
|
+
var It = {
|
|
1254
1266
|
currentTime: 0,
|
|
1255
1267
|
duration: 0,
|
|
1256
1268
|
errorKind: null,
|
|
@@ -1259,35 +1271,35 @@ var Ft = {
|
|
|
1259
1271
|
ready: !1,
|
|
1260
1272
|
volume: 1
|
|
1261
1273
|
};
|
|
1262
|
-
function
|
|
1263
|
-
return { ...
|
|
1274
|
+
function Lt() {
|
|
1275
|
+
return { ...It };
|
|
1264
1276
|
}
|
|
1265
|
-
function
|
|
1277
|
+
function Rt(e) {
|
|
1266
1278
|
return e.complete && !!(e.currentSrc || e.getAttribute("src"));
|
|
1267
1279
|
}
|
|
1268
|
-
function
|
|
1269
|
-
e.currentTime = Number.isFinite(t.currentTime) ? t.currentTime : 0, e.duration = Number.isFinite(t.duration) ? t.duration : 0, e.muted = t.muted, e.paused = t.paused, e.volume = Number.isFinite(t.volume) ? t.volume : e.volume, n && n !== "error" && (e.errorKind = null), e.ready =
|
|
1280
|
+
function zt(e, t, n) {
|
|
1281
|
+
e.currentTime = Number.isFinite(t.currentTime) ? t.currentTime : 0, e.duration = Number.isFinite(t.duration) ? t.duration : 0, e.muted = t.muted, e.paused = t.paused, e.volume = Number.isFinite(t.volume) ? t.volume : e.volume, n && n !== "error" && (e.errorKind = null), e.ready = Bt(t, n);
|
|
1270
1282
|
}
|
|
1271
|
-
function
|
|
1283
|
+
function Bt(e, t) {
|
|
1272
1284
|
return t === "error" || t === "loadstart" || t === "waiting" || t === "stalled" ? !1 : t === "canplay" || t === "canplaythrough" || t === "playing" ? !0 : e.readyState >= HTMLMediaElement.HAVE_CURRENT_DATA;
|
|
1273
1285
|
}
|
|
1274
1286
|
//#endregion
|
|
1275
1287
|
//#region src/components/viewer-core/loadError.ts
|
|
1276
|
-
var
|
|
1277
|
-
function
|
|
1288
|
+
var Vt = /* @__PURE__ */ new Map();
|
|
1289
|
+
function Ht(e) {
|
|
1278
1290
|
return e === "not-found" ? "404" : "Load error";
|
|
1279
1291
|
}
|
|
1280
|
-
function
|
|
1292
|
+
function Ut(e) {
|
|
1281
1293
|
return e === "generic";
|
|
1282
1294
|
}
|
|
1283
|
-
function
|
|
1284
|
-
let t =
|
|
1295
|
+
function Wt(e) {
|
|
1296
|
+
let t = Vt.get(e);
|
|
1285
1297
|
if (t) return t;
|
|
1286
|
-
let n =
|
|
1287
|
-
return
|
|
1298
|
+
let n = Gt(e);
|
|
1299
|
+
return Vt.set(e, n), n;
|
|
1288
1300
|
}
|
|
1289
|
-
async function
|
|
1290
|
-
if (!
|
|
1301
|
+
async function Gt(e) {
|
|
1302
|
+
if (!Kt(e)) return "generic";
|
|
1291
1303
|
try {
|
|
1292
1304
|
let t = await fetch(e, { method: "HEAD" });
|
|
1293
1305
|
if (!t.ok && t.status === 404) return "not-found";
|
|
@@ -1296,12 +1308,12 @@ async function Wt(e) {
|
|
|
1296
1308
|
}
|
|
1297
1309
|
return "generic";
|
|
1298
1310
|
}
|
|
1299
|
-
function
|
|
1311
|
+
function Kt(e) {
|
|
1300
1312
|
return /^(https?:\/\/|\/)/i.test(e);
|
|
1301
1313
|
}
|
|
1302
1314
|
//#endregion
|
|
1303
1315
|
//#region src/components/viewer-core/mediaPlayback.ts
|
|
1304
|
-
function
|
|
1316
|
+
function qt(e) {
|
|
1305
1317
|
try {
|
|
1306
1318
|
let t = e.play();
|
|
1307
1319
|
t && typeof t.catch == "function" && t.catch(() => {});
|
|
@@ -1309,12 +1321,12 @@ function Kt(e) {
|
|
|
1309
1321
|
}
|
|
1310
1322
|
//#endregion
|
|
1311
1323
|
//#region src/components/viewer-core/useMedia.ts
|
|
1312
|
-
function
|
|
1324
|
+
function Jt(e) {
|
|
1313
1325
|
let t = T({}), n = T({}), r = T({}), a = T({}), o = T({}), s = /* @__PURE__ */ new Map(), c = /* @__PURE__ */ new Map(), l = /* @__PURE__ */ new Set(), u = i(() => e.activeItem.value ? $(e.activeItem.value) : null), d = i(() => e.activeMediaItem.value ? $(e.activeMediaItem.value) : null), f = i(() => {
|
|
1314
1326
|
let t = /* @__PURE__ */ new Map();
|
|
1315
1327
|
for (let n of e.items.value) t.set($(n), n);
|
|
1316
1328
|
return t;
|
|
1317
|
-
}), p = i(() => d.value ? r.value[d.value] ??
|
|
1329
|
+
}), p = i(() => d.value ? r.value[d.value] ?? It : It), m = i(() => d.value ? p.value.duration : 0), h = i(() => m.value <= 0 ? 0 : Yt(p.value.currentTime / m.value * 100, 0, 100)), _ = i(() => u.value ? L(u.value) : null);
|
|
1318
1330
|
F(() => u.value, async () => {
|
|
1319
1331
|
await S();
|
|
1320
1332
|
}), F(() => e.itemCount.value, async () => {
|
|
@@ -1324,62 +1336,62 @@ function qt(e) {
|
|
|
1324
1336
|
});
|
|
1325
1337
|
function v(e, t) {
|
|
1326
1338
|
if (t instanceof HTMLVideoElement) {
|
|
1327
|
-
s.set(e, t),
|
|
1339
|
+
s.set(e, t), W(e, t);
|
|
1328
1340
|
return;
|
|
1329
1341
|
}
|
|
1330
1342
|
s.delete(e);
|
|
1331
1343
|
}
|
|
1332
1344
|
function y(e, t) {
|
|
1333
1345
|
if (t instanceof HTMLAudioElement) {
|
|
1334
|
-
c.set(e, t),
|
|
1346
|
+
c.set(e, t), W(e, t);
|
|
1335
1347
|
return;
|
|
1336
1348
|
}
|
|
1337
1349
|
c.delete(e);
|
|
1338
1350
|
}
|
|
1339
1351
|
function b(e, r) {
|
|
1340
|
-
r instanceof HTMLImageElement &&
|
|
1352
|
+
r instanceof HTMLImageElement && Rt(r) && (t.value[e] = !0, n.value[e] = null, ne(e, r.currentSrc || r.src || X(e)));
|
|
1341
1353
|
}
|
|
1342
1354
|
function x() {
|
|
1343
|
-
|
|
1355
|
+
ee(), a.value = {}, n.value = {}, t.value = {}, o.value = {}, r.value = {}, l.clear();
|
|
1344
1356
|
}
|
|
1345
1357
|
async function S() {
|
|
1346
1358
|
if (!e.isEnabled.value) {
|
|
1347
|
-
|
|
1359
|
+
ee();
|
|
1348
1360
|
return;
|
|
1349
1361
|
}
|
|
1350
1362
|
await g();
|
|
1351
1363
|
let t = u.value;
|
|
1352
1364
|
for (let [n, i] of s.entries()) {
|
|
1353
1365
|
if (n !== t || r.value[n]?.errorKind) {
|
|
1354
|
-
|
|
1366
|
+
H(i, n);
|
|
1355
1367
|
continue;
|
|
1356
1368
|
}
|
|
1357
|
-
i.muted = !1, i.loop = e.loopFullscreenVideo.value, i.playsInline = !0,
|
|
1369
|
+
i.muted = !1, i.loop = e.loopFullscreenVideo.value, i.playsInline = !0, qt(i), W(n, i);
|
|
1358
1370
|
}
|
|
1359
1371
|
for (let [e, n] of c.entries()) {
|
|
1360
1372
|
if (e !== t || r.value[e]?.errorKind) {
|
|
1361
|
-
|
|
1373
|
+
H(n, e);
|
|
1362
1374
|
continue;
|
|
1363
1375
|
}
|
|
1364
|
-
|
|
1376
|
+
qt(n), W(e, n);
|
|
1365
1377
|
}
|
|
1366
1378
|
}
|
|
1367
1379
|
function C(e, t) {
|
|
1368
1380
|
let n = t.currentTarget instanceof HTMLMediaElement ? t.currentTarget : t.target instanceof HTMLMediaElement ? t.target : null;
|
|
1369
1381
|
if (n) {
|
|
1370
1382
|
let i = r.value[e]?.ready ?? !1;
|
|
1371
|
-
|
|
1383
|
+
W(e, n, t.type);
|
|
1372
1384
|
let a = r.value[e]?.ready ?? !1;
|
|
1373
|
-
!i && a &&
|
|
1385
|
+
!i && a && ne(e, n.currentSrc || n.src || X(e));
|
|
1374
1386
|
}
|
|
1375
1387
|
}
|
|
1376
1388
|
function w(e, r) {
|
|
1377
|
-
t.value[e] = !0, n.value[e] = null,
|
|
1389
|
+
t.value[e] = !0, n.value[e] = null, ne(e, r);
|
|
1378
1390
|
}
|
|
1379
1391
|
async function E(r, i) {
|
|
1380
|
-
let a =
|
|
1392
|
+
let a = Y(r) ?? e.activeItem.value;
|
|
1381
1393
|
t.value[r] = !1, n.value[r] = "generic";
|
|
1382
|
-
let o = await
|
|
1394
|
+
let o = await Wt(i);
|
|
1383
1395
|
n.value[r] = o, a && e.onAssetError?.({
|
|
1384
1396
|
item: a,
|
|
1385
1397
|
occurrenceKey: r,
|
|
@@ -1389,7 +1401,7 @@ function qt(e) {
|
|
|
1389
1401
|
});
|
|
1390
1402
|
}
|
|
1391
1403
|
async function D(t, n) {
|
|
1392
|
-
let r =
|
|
1404
|
+
let r = q(t), i = U(t), a = Y(t) ?? e.activeMediaItem.value ?? e.activeItem.value;
|
|
1393
1405
|
if (r) {
|
|
1394
1406
|
r.pause();
|
|
1395
1407
|
try {
|
|
@@ -1397,7 +1409,7 @@ function qt(e) {
|
|
|
1397
1409
|
} catch {}
|
|
1398
1410
|
}
|
|
1399
1411
|
i.currentTime = 0, i.duration = 0, i.paused = !0, i.ready = !1, i.errorKind = "generic";
|
|
1400
|
-
let o = await
|
|
1412
|
+
let o = await Wt(n);
|
|
1401
1413
|
i.errorKind = o, a && e.onAssetError?.({
|
|
1402
1414
|
item: a,
|
|
1403
1415
|
occurrenceKey: t,
|
|
@@ -1410,25 +1422,25 @@ function qt(e) {
|
|
|
1410
1422
|
e.button !== 0 || Date.now() < n || J(s.get(t) ?? null);
|
|
1411
1423
|
}
|
|
1412
1424
|
function k(e, t, n) {
|
|
1413
|
-
e.button !== 0 || Date.now() < n || J(
|
|
1425
|
+
e.button !== 0 || Date.now() < n || J(q(t));
|
|
1414
1426
|
}
|
|
1415
1427
|
function A(e) {
|
|
1416
|
-
let t =
|
|
1428
|
+
let t = te(), n = d.value;
|
|
1417
1429
|
if (!t || !n || !(e.target instanceof HTMLInputElement)) return;
|
|
1418
1430
|
let r = Number.parseFloat(e.target.value);
|
|
1419
1431
|
if (!Number.isFinite(r)) return;
|
|
1420
|
-
let i =
|
|
1421
|
-
|
|
1432
|
+
let i = Yt(r, 0, m.value || 0);
|
|
1433
|
+
G(n, i, t), t.currentTime = i;
|
|
1422
1434
|
}
|
|
1423
1435
|
function j(e) {
|
|
1424
|
-
let t =
|
|
1436
|
+
let t = te(), n = d.value;
|
|
1425
1437
|
if (!t || !n || !(e.target instanceof HTMLInputElement)) return;
|
|
1426
|
-
let r =
|
|
1427
|
-
t.volume = r, t.muted = r <= 0, r > 0 && (o.value[n] = r),
|
|
1438
|
+
let r = Yt(Number.parseFloat(e.target.value), 0, 1);
|
|
1439
|
+
t.volume = r, t.muted = r <= 0, r > 0 && (o.value[n] = r), W(n, t);
|
|
1428
1440
|
}
|
|
1429
1441
|
function M() {
|
|
1430
|
-
let e =
|
|
1431
|
-
!e || !t || (e.muted || e.volume <= 0 ? (e.volume =
|
|
1442
|
+
let e = te(), t = d.value;
|
|
1443
|
+
!e || !t || (e.muted || e.volume <= 0 ? (e.volume = K(t), e.muted = !1, o.value[t] = e.volume) : (o.value[t] = e.volume, e.muted = !0), W(t, e));
|
|
1432
1444
|
}
|
|
1433
1445
|
function N(e) {
|
|
1434
1446
|
return !!t.value[e] && !n.value[e];
|
|
@@ -1444,65 +1456,65 @@ function qt(e) {
|
|
|
1444
1456
|
}
|
|
1445
1457
|
function R(e) {
|
|
1446
1458
|
let t = L(e);
|
|
1447
|
-
return t ?
|
|
1459
|
+
return t ? Ht(t) : null;
|
|
1448
1460
|
}
|
|
1449
1461
|
function z(e) {
|
|
1450
|
-
return
|
|
1462
|
+
return Ut(L(e));
|
|
1451
1463
|
}
|
|
1452
|
-
function
|
|
1464
|
+
function B(e) {
|
|
1453
1465
|
return `${e}:${a.value[e] ?? 0}`;
|
|
1454
1466
|
}
|
|
1455
|
-
async function
|
|
1467
|
+
async function V(e) {
|
|
1456
1468
|
if (!z(e)) return;
|
|
1457
1469
|
t.value[e] = !1, n.value[e] = null;
|
|
1458
|
-
let r =
|
|
1470
|
+
let r = U(e);
|
|
1459
1471
|
r.currentTime = 0, r.duration = 0, r.paused = !0, r.ready = !1, r.errorKind = null;
|
|
1460
|
-
let i =
|
|
1461
|
-
i &&
|
|
1472
|
+
let i = q(e);
|
|
1473
|
+
i && H(i, e), l.forEach((t) => {
|
|
1462
1474
|
t.startsWith(`${e}|`) && l.delete(t);
|
|
1463
1475
|
}), a.value[e] = (a.value[e] ?? 0) + 1, await g(), await S();
|
|
1464
1476
|
}
|
|
1465
|
-
function
|
|
1477
|
+
function H(e, t) {
|
|
1466
1478
|
e.pause();
|
|
1467
1479
|
try {
|
|
1468
1480
|
e.currentTime = 0;
|
|
1469
1481
|
} catch {}
|
|
1470
|
-
|
|
1482
|
+
W(t, e);
|
|
1471
1483
|
}
|
|
1472
|
-
function
|
|
1473
|
-
for (let [e, t] of s.entries())
|
|
1474
|
-
for (let [e, t] of c.entries())
|
|
1475
|
-
}
|
|
1476
|
-
function H(e) {
|
|
1477
|
-
return r.value[e] || (r.value[e] = It()), r.value[e];
|
|
1484
|
+
function ee() {
|
|
1485
|
+
for (let [e, t] of s.entries()) H(t, e);
|
|
1486
|
+
for (let [e, t] of c.entries()) H(t, e);
|
|
1478
1487
|
}
|
|
1479
|
-
function U(e
|
|
1480
|
-
|
|
1488
|
+
function U(e) {
|
|
1489
|
+
return r.value[e] || (r.value[e] = Lt()), r.value[e];
|
|
1481
1490
|
}
|
|
1482
1491
|
function W(e, t, n) {
|
|
1483
|
-
|
|
1484
|
-
r.currentTime = t, r.duration = Number.isFinite(n.duration) ? n.duration : r.duration, r.muted = n.muted, r.paused = n.paused, r.volume = Number.isFinite(n.volume) ? n.volume : r.volume;
|
|
1492
|
+
zt(U(e), t, n), !t.muted && t.volume > 0 && (o.value[e] = t.volume);
|
|
1485
1493
|
}
|
|
1486
|
-
function G(e) {
|
|
1487
|
-
|
|
1494
|
+
function G(e, t, n) {
|
|
1495
|
+
let r = U(e);
|
|
1496
|
+
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;
|
|
1488
1497
|
}
|
|
1489
1498
|
function K(e) {
|
|
1499
|
+
return Yt(o.value[e] ?? 1, 0, 1);
|
|
1500
|
+
}
|
|
1501
|
+
function q(e) {
|
|
1490
1502
|
return s.get(e) ?? c.get(e) ?? null;
|
|
1491
1503
|
}
|
|
1492
|
-
function
|
|
1493
|
-
return d.value ?
|
|
1504
|
+
function te() {
|
|
1505
|
+
return d.value ? q(d.value) : null;
|
|
1494
1506
|
}
|
|
1495
1507
|
function J(e) {
|
|
1496
1508
|
if (e) {
|
|
1497
1509
|
if (e.paused) {
|
|
1498
|
-
|
|
1510
|
+
qt(e);
|
|
1499
1511
|
return;
|
|
1500
1512
|
}
|
|
1501
1513
|
e.pause();
|
|
1502
1514
|
}
|
|
1503
1515
|
}
|
|
1504
|
-
function
|
|
1505
|
-
let r =
|
|
1516
|
+
function ne(t, n) {
|
|
1517
|
+
let r = Y(t) ?? e.activeMediaItem.value ?? e.activeItem.value;
|
|
1506
1518
|
if (!r || !n) return;
|
|
1507
1519
|
let i = `${t}|${n}`;
|
|
1508
1520
|
l.has(i) || (l.add(i), e.onAssetLoad?.({
|
|
@@ -1512,11 +1524,11 @@ function qt(e) {
|
|
|
1512
1524
|
url: n
|
|
1513
1525
|
}));
|
|
1514
1526
|
}
|
|
1515
|
-
function
|
|
1527
|
+
function Y(e) {
|
|
1516
1528
|
return f.value.get(e) ?? null;
|
|
1517
1529
|
}
|
|
1518
|
-
function
|
|
1519
|
-
return
|
|
1530
|
+
function X(e) {
|
|
1531
|
+
return Y(e)?.url ?? null;
|
|
1520
1532
|
}
|
|
1521
1533
|
return {
|
|
1522
1534
|
activeAssetErrorKind: _,
|
|
@@ -1525,7 +1537,7 @@ function qt(e) {
|
|
|
1525
1537
|
activeMediaState: p,
|
|
1526
1538
|
getAssetErrorKind: L,
|
|
1527
1539
|
getAssetErrorLabel: R,
|
|
1528
|
-
getAssetRenderKey:
|
|
1540
|
+
getAssetRenderKey: B,
|
|
1529
1541
|
getImageSource: I,
|
|
1530
1542
|
isImageReady: N,
|
|
1531
1543
|
isMediaReady: P,
|
|
@@ -1544,14 +1556,14 @@ function qt(e) {
|
|
|
1544
1556
|
registerImageElement: b,
|
|
1545
1557
|
registerVideoElement: v,
|
|
1546
1558
|
resetMediaState: x,
|
|
1547
|
-
retryAsset:
|
|
1559
|
+
retryAsset: V,
|
|
1548
1560
|
syncMediaPlayback: S
|
|
1549
1561
|
};
|
|
1550
1562
|
}
|
|
1551
|
-
function
|
|
1563
|
+
function Yt(e, t, n) {
|
|
1552
1564
|
return Math.min(Math.max(e, t), n);
|
|
1553
1565
|
}
|
|
1554
|
-
function
|
|
1566
|
+
function Xt(e, t, n = 2) {
|
|
1555
1567
|
return t <= 0 ? {
|
|
1556
1568
|
start: 0,
|
|
1557
1569
|
end: -1
|
|
@@ -1560,14 +1572,14 @@ function Yt(e, t, n = 2) {
|
|
|
1560
1572
|
end: Math.min(t - 1, e + n)
|
|
1561
1573
|
};
|
|
1562
1574
|
}
|
|
1563
|
-
function
|
|
1564
|
-
let r =
|
|
1575
|
+
function Zt(e, t, n = 2) {
|
|
1576
|
+
let r = Xt(t, e.length, n);
|
|
1565
1577
|
return r.end < r.start ? [] : e.slice(r.start, r.end + 1).map((e, t) => ({
|
|
1566
1578
|
item: e,
|
|
1567
1579
|
index: r.start + t
|
|
1568
1580
|
}));
|
|
1569
1581
|
}
|
|
1570
|
-
function
|
|
1582
|
+
function Qt(e, t, n, r, i) {
|
|
1571
1583
|
return {
|
|
1572
1584
|
transform: `translate3d(0, ${(e - t) * n + r}px, 0)`,
|
|
1573
1585
|
transition: i ? "none" : "transform 320ms cubic-bezier(0.22, 1, 0.36, 1)"
|
|
@@ -1575,12 +1587,12 @@ function Zt(e, t, n, r, i) {
|
|
|
1575
1587
|
}
|
|
1576
1588
|
//#endregion
|
|
1577
1589
|
//#region src/components/viewer-core/useViewer.ts
|
|
1578
|
-
function
|
|
1579
|
-
let r = i(() => e.items), a = i(() => e.activeIndex ?? 0), o = i(() => e.errorMessage ?? null), s = i(() => e.loading ?? !1), c = i(() => e.hasNextPage ?? !1), l = i(() => e.loopFullscreenVideo ?? !0), u = i(() => e.paginationDetail ?? null), d = i(() =>
|
|
1590
|
+
function $t(e, t, n = {}) {
|
|
1591
|
+
let r = i(() => e.items), a = i(() => e.activeIndex ?? 0), o = i(() => e.errorMessage ?? null), s = i(() => e.loading ?? !1), c = i(() => e.hasNextPage ?? !1), l = i(() => e.loopFullscreenVideo ?? !0), u = i(() => e.paginationDetail ?? null), d = i(() => Nt({
|
|
1580
1592
|
itemCount: r.value.length,
|
|
1581
1593
|
loading: s.value,
|
|
1582
1594
|
phase: e.phase
|
|
1583
|
-
})), f = i(() => !1), p = T(null), m = T(0), h = T(!1), g = T(1), _ = n.enabled ?? i(() => !0), v = null, y = 0, b = 0, x = 0, S = i(() => r.value.length === 0 ? 0 : P(a.value, 0, r.value.length - 1)), C = i(() => r.value[S.value] ?? null), w = i(() => C.value?.type === "audio" || C.value?.type === "video" ? C.value : null), E =
|
|
1595
|
+
})), f = i(() => !1), p = T(null), m = T(0), h = T(!1), g = T(1), _ = n.enabled ?? i(() => !0), v = null, y = 0, b = 0, x = 0, S = i(() => r.value.length === 0 ? 0 : P(a.value, 0, r.value.length - 1)), C = i(() => r.value[S.value] ?? null), w = i(() => C.value?.type === "audio" || C.value?.type === "video" ? C.value : null), E = Jt({
|
|
1584
1596
|
items: r,
|
|
1585
1597
|
activeItem: C,
|
|
1586
1598
|
activeMediaItem: w,
|
|
@@ -1589,22 +1601,22 @@ function Qt(e, t, n = {}) {
|
|
|
1589
1601
|
loopFullscreenVideo: l,
|
|
1590
1602
|
onAssetError: n.onAssetError,
|
|
1591
1603
|
onAssetLoad: n.onAssetLoad
|
|
1592
|
-
}), D = i(() => r.value.length > 0 && S.value === r.value.length - 1), O = i(() =>
|
|
1604
|
+
}), D = i(() => r.value.length > 0 && S.value === r.value.length - 1), O = i(() => Pt({
|
|
1593
1605
|
errorMessage: o.value,
|
|
1594
1606
|
hasItems: r.value.length > 0,
|
|
1595
1607
|
hasNextPage: c.value,
|
|
1596
1608
|
phase: d.value,
|
|
1597
1609
|
surface: "fullscreen"
|
|
1598
|
-
})), k = i(() => O.value?.kind ?? null), A = i(() => O.value?.message ?? null), j = i(() => Math.min(96, g.value * .15 || 96)), M = i(() =>
|
|
1599
|
-
|
|
1610
|
+
})), k = i(() => O.value?.kind ?? null), A = i(() => O.value?.message ?? null), j = i(() => Math.min(96, g.value * .15 || 96)), M = i(() => Xt(S.value, r.value.length)), N = i(() => Zt(r.value, S.value));
|
|
1611
|
+
Ft({
|
|
1600
1612
|
enabled: _,
|
|
1601
1613
|
onDisable() {
|
|
1602
|
-
|
|
1614
|
+
U(), E.resetMediaState();
|
|
1603
1615
|
},
|
|
1604
1616
|
onEnable() {
|
|
1605
1617
|
return E.syncMediaPlayback();
|
|
1606
1618
|
},
|
|
1607
|
-
onKeydown:
|
|
1619
|
+
onKeydown: G,
|
|
1608
1620
|
onResize: F
|
|
1609
1621
|
});
|
|
1610
1622
|
function P(e, t, n) {
|
|
@@ -1628,53 +1640,53 @@ function Qt(e, t, n = {}) {
|
|
|
1628
1640
|
function z(e) {
|
|
1629
1641
|
!_.value || r.value.length === 0 || e.pointerType === "mouse" || fe(e.target) || (v = e.pointerId, y = e.clientY, m.value = 0, h.value = !0, p.value?.setPointerCapture?.(e.pointerId));
|
|
1630
1642
|
}
|
|
1631
|
-
function ee(e) {
|
|
1632
|
-
!_.value || !h.value || v !== e.pointerId || (m.value = R(e.clientY - y));
|
|
1633
|
-
}
|
|
1634
1643
|
function B(e) {
|
|
1635
|
-
!_.value || v !== e.pointerId || (
|
|
1644
|
+
!_.value || !h.value || v !== e.pointerId || (m.value = R(e.clientY - y));
|
|
1636
1645
|
}
|
|
1637
1646
|
function V(e) {
|
|
1638
|
-
!_.value || v !== e.pointerId || (p.value?.releasePointerCapture?.(e.pointerId),
|
|
1647
|
+
!_.value || v !== e.pointerId || (p.value?.releasePointerCapture?.(e.pointerId), ee());
|
|
1639
1648
|
}
|
|
1640
|
-
function
|
|
1641
|
-
|
|
1649
|
+
function H(e) {
|
|
1650
|
+
!_.value || v !== e.pointerId || (p.value?.releasePointerCapture?.(e.pointerId), U());
|
|
1642
1651
|
}
|
|
1643
|
-
function
|
|
1652
|
+
function ee() {
|
|
1653
|
+
Math.abs(m.value) >= j.value && (x = Date.now() + 250, L(m.value < 0 ? 1 : -1)), U();
|
|
1654
|
+
}
|
|
1655
|
+
function U() {
|
|
1644
1656
|
m.value = 0, h.value = !1, v = null;
|
|
1645
1657
|
}
|
|
1646
|
-
function
|
|
1658
|
+
function W(e) {
|
|
1647
1659
|
if (!_.value || r.value.length === 0 || h.value || fe(e.target) || Math.abs(e.deltaY) < Math.max(Math.abs(e.deltaX), 24)) return;
|
|
1648
1660
|
e.preventDefault();
|
|
1649
1661
|
let t = Date.now();
|
|
1650
1662
|
t < b || (b = t + 400, L(e.deltaY > 0 ? 1 : -1));
|
|
1651
1663
|
}
|
|
1652
|
-
function
|
|
1664
|
+
function G(e) {
|
|
1653
1665
|
!_.value || r.value.length === 0 || Q(e.target) || ((e.key === "ArrowDown" || e.key === "PageDown") && (e.preventDefault(), L(1)), (e.key === "ArrowUp" || e.key === "PageUp") && (e.preventDefault(), L(-1)));
|
|
1654
1666
|
}
|
|
1655
|
-
function
|
|
1667
|
+
function K(e, t) {
|
|
1656
1668
|
E.onVideoClick(e, t, x);
|
|
1657
1669
|
}
|
|
1658
|
-
function
|
|
1670
|
+
function q(e, t) {
|
|
1659
1671
|
E.onAudioCoverClick(e, t, x);
|
|
1660
1672
|
}
|
|
1661
|
-
function
|
|
1673
|
+
function te(e) {
|
|
1662
1674
|
E.onMediaSeekInput(e);
|
|
1663
1675
|
}
|
|
1664
1676
|
function J(e) {
|
|
1665
1677
|
E.onMediaVolumeInput(e);
|
|
1666
1678
|
}
|
|
1667
|
-
function
|
|
1679
|
+
function ne() {
|
|
1668
1680
|
E.onMediaVolumeToggle();
|
|
1669
1681
|
}
|
|
1670
|
-
function
|
|
1682
|
+
function Y(e) {
|
|
1671
1683
|
return e.type === "image" || e.type === "video";
|
|
1672
1684
|
}
|
|
1673
|
-
function
|
|
1685
|
+
function X(e) {
|
|
1674
1686
|
return e.type === "audio";
|
|
1675
1687
|
}
|
|
1676
1688
|
function re(e) {
|
|
1677
|
-
return
|
|
1689
|
+
return Qt(e, S.value, g.value, m.value, h.value);
|
|
1678
1690
|
}
|
|
1679
1691
|
return {
|
|
1680
1692
|
activeItem: C,
|
|
@@ -1689,32 +1701,32 @@ function Qt(e, t, n = {}) {
|
|
|
1689
1701
|
getAssetErrorKind: E.getAssetErrorKind,
|
|
1690
1702
|
getAssetErrorLabel: E.getAssetErrorLabel,
|
|
1691
1703
|
getAssetRenderKey: E.getAssetRenderKey,
|
|
1692
|
-
formatPlaybackTime:
|
|
1704
|
+
formatPlaybackTime: Mt,
|
|
1693
1705
|
getImageSource: E.getImageSource,
|
|
1694
1706
|
getSlideStyle: re,
|
|
1695
1707
|
hasNextPage: c,
|
|
1696
1708
|
isAtEnd: D,
|
|
1697
|
-
isAudio:
|
|
1698
|
-
isVisual:
|
|
1709
|
+
isAudio: X,
|
|
1710
|
+
isVisual: Y,
|
|
1699
1711
|
items: r,
|
|
1700
1712
|
loading: s,
|
|
1701
1713
|
mediaStates: E.mediaStates,
|
|
1702
1714
|
isImageReady: E.isImageReady,
|
|
1703
1715
|
isMediaReady: E.isMediaReady,
|
|
1704
|
-
onAudioCoverClick:
|
|
1716
|
+
onAudioCoverClick: q,
|
|
1705
1717
|
onImageError: E.onImageError,
|
|
1706
1718
|
onImageLoad: E.onImageLoad,
|
|
1707
1719
|
onMediaEvent: E.onMediaEvent,
|
|
1708
1720
|
onMediaError: E.onMediaError,
|
|
1709
|
-
onMediaSeekInput:
|
|
1721
|
+
onMediaSeekInput: te,
|
|
1710
1722
|
onMediaVolumeInput: J,
|
|
1711
|
-
onMediaVolumeToggle:
|
|
1712
|
-
onPointerCancel:
|
|
1723
|
+
onMediaVolumeToggle: ne,
|
|
1724
|
+
onPointerCancel: H,
|
|
1713
1725
|
onPointerDown: z,
|
|
1714
|
-
onPointerMove:
|
|
1715
|
-
onPointerUp:
|
|
1716
|
-
onVideoClick:
|
|
1717
|
-
onWheel:
|
|
1726
|
+
onPointerMove: B,
|
|
1727
|
+
onPointerUp: V,
|
|
1728
|
+
onVideoClick: K,
|
|
1729
|
+
onWheel: W,
|
|
1718
1730
|
registerAudioElement: E.registerAudioElement,
|
|
1719
1731
|
registerImageElement: E.registerImageElement,
|
|
1720
1732
|
registerVideoElement: E.registerVideoElement,
|
|
@@ -1732,21 +1744,21 @@ function Qt(e, t, n = {}) {
|
|
|
1732
1744
|
}
|
|
1733
1745
|
//#endregion
|
|
1734
1746
|
//#region src/components/viewer-core/theme.ts
|
|
1735
|
-
var
|
|
1747
|
+
var en = "bg-[linear-gradient(180deg,#0a0b10,#05060a)]", tn = "bg-[linear-gradient(180deg,#0b0c11,#06070b)]", nn = {
|
|
1736
1748
|
image: !0,
|
|
1737
1749
|
video: !0,
|
|
1738
1750
|
audio: !0,
|
|
1739
1751
|
other: !0
|
|
1740
1752
|
};
|
|
1741
|
-
function nn(e) {
|
|
1742
|
-
return tn[e], $t;
|
|
1743
|
-
}
|
|
1744
1753
|
function rn(e) {
|
|
1745
|
-
return
|
|
1754
|
+
return nn[e], en;
|
|
1755
|
+
}
|
|
1756
|
+
function an(e) {
|
|
1757
|
+
return nn[e], tn;
|
|
1746
1758
|
}
|
|
1747
1759
|
//#endregion
|
|
1748
1760
|
//#region src/components/viewer-core/dominantImageTone.ts
|
|
1749
|
-
function
|
|
1761
|
+
function on(e) {
|
|
1750
1762
|
if (e.naturalWidth <= 0 || e.naturalHeight <= 0) return null;
|
|
1751
1763
|
let t = document.createElement("canvas"), n = t.getContext("2d", { willReadFrequently: !0 });
|
|
1752
1764
|
if (!n) return null;
|
|
@@ -1761,20 +1773,20 @@ function an(e) {
|
|
|
1761
1773
|
r += d, i += s * d, a += c * d, o += l * d;
|
|
1762
1774
|
}
|
|
1763
1775
|
return r <= 0 ? null : {
|
|
1764
|
-
r:
|
|
1765
|
-
g:
|
|
1766
|
-
b:
|
|
1776
|
+
r: sn(Math.round(i / r)),
|
|
1777
|
+
g: sn(Math.round(a / r)),
|
|
1778
|
+
b: sn(Math.round(o / r))
|
|
1767
1779
|
};
|
|
1768
1780
|
} catch {
|
|
1769
1781
|
return null;
|
|
1770
1782
|
}
|
|
1771
1783
|
}
|
|
1772
|
-
function
|
|
1784
|
+
function sn(e) {
|
|
1773
1785
|
return Math.min(235, Math.max(26, e));
|
|
1774
1786
|
}
|
|
1775
1787
|
//#endregion
|
|
1776
1788
|
//#region src/components/viewer-core/useFullscreenDominantTone.ts
|
|
1777
|
-
function
|
|
1789
|
+
function cn(e) {
|
|
1778
1790
|
let t = T({}), n = i(() => e.activeItem.value ? e.getItemKey(e.activeItem.value) : null), r = i(() => !e.showDominantImageTone.value || e.activeItem.value?.type !== "image" || !n.value || !e.isImageReady(n.value) ? null : t.value[n.value] ?? null), a = i(() => {
|
|
1779
1791
|
if (!r.value) return;
|
|
1780
1792
|
let { r: e, g: t, b: n } = r.value;
|
|
@@ -1789,7 +1801,7 @@ function sn(e) {
|
|
|
1789
1801
|
});
|
|
1790
1802
|
function s(n, r) {
|
|
1791
1803
|
if (!e.showDominantImageTone.value) return;
|
|
1792
|
-
let i =
|
|
1804
|
+
let i = on(r);
|
|
1793
1805
|
i && (t.value[n] = i);
|
|
1794
1806
|
}
|
|
1795
1807
|
return {
|
|
@@ -1800,7 +1812,7 @@ function sn(e) {
|
|
|
1800
1812
|
}
|
|
1801
1813
|
//#endregion
|
|
1802
1814
|
//#region src/components/SurfaceEmptyState.vue?vue&type=script&setup=true&lang.ts
|
|
1803
|
-
var
|
|
1815
|
+
var ln = ["data-surface"], un = ["data-surface"], dn = /* @__PURE__ */ d({
|
|
1804
1816
|
inheritAttrs: !1,
|
|
1805
1817
|
__name: "SurfaceEmptyState",
|
|
1806
1818
|
props: {
|
|
@@ -1814,31 +1826,31 @@ var cn = ["data-surface"], ln = ["data-surface"], un = /* @__PURE__ */ d({
|
|
|
1814
1826
|
"data-testid": "vibe-empty-state-inline",
|
|
1815
1827
|
"data-surface": e.surface,
|
|
1816
1828
|
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)]"]
|
|
1817
|
-
}), [D(n.$slots, "default", {}, () => [c("p", { class: _(["m-0 text-[0.82rem] font-medium tracking-[0.08em]", e.surface === "grid" ? "text-[#f7f1ea]/58" : "text-[#f7f1ea]/64"]) }, k(e.message), 3)])], 16,
|
|
1829
|
+
}), [D(n.$slots, "default", {}, () => [c("p", { class: _(["m-0 text-[0.82rem] font-medium tracking-[0.08em]", e.surface === "grid" ? "text-[#f7f1ea]/58" : "text-[#f7f1ea]/64"]) }, k(e.message), 3)])], 16, ln)) : (S(), s("div", h({ key: 1 }, j(t), { class: ["pointer-events-none absolute z-[4]", e.surface === "grid" ? "inset-x-0 bottom-0 flex justify-center px-6" : "bottom-[1.8rem] left-1/2 -translate-x-1/2 max-[720px]:bottom-[1.3rem]"] }), [D(n.$slots, "default", {}, () => [c("span", {
|
|
1818
1830
|
"data-testid": "vibe-empty-state-badge",
|
|
1819
1831
|
"data-surface": e.surface,
|
|
1820
1832
|
class: _(["inline-flex items-center border border-white/14 backdrop-blur-[18px]", e.surface === "grid" ? "bg-black/55 px-4 py-3 text-[0.82rem] font-medium tracking-[0.08em] text-[#f7f1ea]/72" : "w-auto bg-black/40 px-5 py-3 text-[0.82rem] font-medium tracking-[0.08em] text-[#f7f1ea]/74 max-[720px]:w-[calc(100%-2.5rem)] max-[720px]:justify-center"])
|
|
1821
|
-
}, k(e.message), 11,
|
|
1833
|
+
}, k(e.message), 11, un)])], 16));
|
|
1822
1834
|
}
|
|
1823
|
-
}),
|
|
1835
|
+
}), fn = { class: "relative h-full min-h-0 overflow-hidden bg-[#05060a] text-[#f7f1ea]" }, pn = {
|
|
1824
1836
|
key: 0,
|
|
1825
1837
|
class: "relative h-full min-h-0"
|
|
1826
|
-
},
|
|
1838
|
+
}, mn = [
|
|
1827
1839
|
"data-item-id",
|
|
1828
1840
|
"data-occurrence-key",
|
|
1829
1841
|
"data-index",
|
|
1830
1842
|
"data-active",
|
|
1831
1843
|
"aria-hidden"
|
|
1832
|
-
],
|
|
1844
|
+
], hn = {
|
|
1833
1845
|
key: 0,
|
|
1834
1846
|
"data-testid": "vibe-asset-spinner",
|
|
1835
1847
|
class: "pointer-events-none absolute inset-0 z-[2] grid place-items-center"
|
|
1836
|
-
},
|
|
1848
|
+
}, gn = { 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]" }, _n = ["data-kind"], vn = { class: "grid justify-items-center gap-4 border border-white/14 bg-black/45 px-8 py-7 text-center backdrop-blur-[18px]" }, yn = { class: "m-0 text-[0.82rem] font-bold uppercase tracking-[0.28em] text-[#f7f1ea]/70" }, bn = ["onClick"], xn = [
|
|
1837
1849
|
"src",
|
|
1838
1850
|
"alt",
|
|
1839
1851
|
"onLoad",
|
|
1840
1852
|
"onError"
|
|
1841
|
-
],
|
|
1853
|
+
], Sn = [
|
|
1842
1854
|
"loop",
|
|
1843
1855
|
"src",
|
|
1844
1856
|
"preload",
|
|
@@ -1856,15 +1868,15 @@ var cn = ["data-surface"], ln = ["data-surface"], un = /* @__PURE__ */ d({
|
|
|
1856
1868
|
"onStalled",
|
|
1857
1869
|
"onTimeupdate",
|
|
1858
1870
|
"onWaiting"
|
|
1859
|
-
],
|
|
1871
|
+
], Cn = { class: "relative grid aspect-square w-[clamp(320px,46vw,560px)] max-w-[calc(100vw-2.5rem)] place-items-center" }, wn = [
|
|
1860
1872
|
"aria-label",
|
|
1861
1873
|
"disabled",
|
|
1862
1874
|
"onClick"
|
|
1863
|
-
],
|
|
1875
|
+
], Tn = { 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]" }, En = { class: "pointer-events-none absolute bottom-4 right-4 inline-flex h-10 w-10 items-center justify-center border border-white/14 bg-black/50 backdrop-blur-[18px]" }, Dn = {
|
|
1864
1876
|
key: 0,
|
|
1865
1877
|
"data-testid": "vibe-asset-spinner",
|
|
1866
1878
|
class: "pointer-events-none absolute inset-0 z-[3] grid place-items-center"
|
|
1867
|
-
},
|
|
1879
|
+
}, On = { class: "inline-flex h-12 w-12 items-center justify-center rounded-full bg-black/45 shadow-[0_18px_40px_-18px_rgba(0,0,0,0.85)] backdrop-blur-[18px]" }, kn = ["data-kind"], An = { class: "m-0 text-[0.82rem] font-bold uppercase tracking-[0.28em] text-[#f7f1ea]/70" }, jn = ["onClick"], Mn = [
|
|
1868
1880
|
"src",
|
|
1869
1881
|
"preload",
|
|
1870
1882
|
"onCanplay",
|
|
@@ -1880,25 +1892,25 @@ var cn = ["data-surface"], ln = ["data-surface"], un = /* @__PURE__ */ d({
|
|
|
1880
1892
|
"onStalled",
|
|
1881
1893
|
"onTimeupdate",
|
|
1882
1894
|
"onWaiting"
|
|
1883
|
-
],
|
|
1895
|
+
], Nn = {
|
|
1884
1896
|
key: 2,
|
|
1885
1897
|
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"
|
|
1886
|
-
},
|
|
1898
|
+
}, Pn = { 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]" }, Fn = {
|
|
1887
1899
|
key: 0,
|
|
1888
1900
|
class: "pointer-events-none absolute inset-0 z-[4]"
|
|
1889
|
-
},
|
|
1901
|
+
}, In = { class: "h-full w-full" }, Ln = {
|
|
1890
1902
|
key: 1,
|
|
1891
1903
|
"data-testid": "vibe-forward-fill-placeholder",
|
|
1892
1904
|
class: "grid h-full min-h-0 place-items-center px-6 text-center"
|
|
1893
|
-
},
|
|
1905
|
+
}, Rn = { class: "grid justify-items-center gap-4 border border-white/14 bg-black/40 px-8 py-7 backdrop-blur-[18px]" }, zn = { class: "inline-flex h-12 w-12 items-center justify-center rounded-full bg-black/45 shadow-[0_18px_40px_-18px_rgba(0,0,0,0.85)]" }, Bn = { class: "m-0 text-[0.78rem] font-bold uppercase tracking-[0.24em] text-[#f7f1ea]/72" }, Vn = {
|
|
1894
1906
|
key: 0,
|
|
1895
1907
|
"data-testid": "vibe-fullscreen-aside",
|
|
1896
1908
|
class: "h-full min-h-0 overflow-hidden border-l border-white/10 bg-black/45 backdrop-blur-[18px]"
|
|
1897
|
-
},
|
|
1909
|
+
}, Hn = { class: "h-full min-h-0 overflow-y-auto overscroll-y-contain" }, Un = {
|
|
1898
1910
|
key: 0,
|
|
1899
1911
|
"data-testid": "vibe-fullscreen-aside",
|
|
1900
1912
|
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]"
|
|
1901
|
-
},
|
|
1913
|
+
}, Wn = { class: "h-full min-h-0 overflow-y-auto overscroll-y-contain" }, Gn = 1280, Kn = 768, qn = /* @__PURE__ */ d({
|
|
1902
1914
|
__name: "FullscreenSurface",
|
|
1903
1915
|
props: {
|
|
1904
1916
|
active: {
|
|
@@ -1950,22 +1962,22 @@ var cn = ["data-surface"], ln = ["data-surface"], un = /* @__PURE__ */ d({
|
|
|
1950
1962
|
},
|
|
1951
1963
|
emits: ["back-to-list", "update:activeIndex"],
|
|
1952
1964
|
setup(e, { emit: n }) {
|
|
1953
|
-
let d = e, p = N(), m = n, g =
|
|
1965
|
+
let d = e, p = N(), m = n, g = $t(d, (e, t) => {
|
|
1954
1966
|
m("update:activeIndex", t);
|
|
1955
1967
|
}, {
|
|
1956
1968
|
enabled: A(d, "active"),
|
|
1957
1969
|
onAssetError: d.reportAssetError ?? void 0,
|
|
1958
1970
|
onAssetLoad: d.reportAssetLoad ?? void 0
|
|
1959
|
-
}), C = T(typeof window > "u" ?
|
|
1971
|
+
}), C = T(typeof window > "u" ? Gn : window.innerWidth || Gn), w = Dt({
|
|
1960
1972
|
active: A(d, "active"),
|
|
1961
1973
|
resolvedActiveIndex: g.resolvedActiveIndex,
|
|
1962
1974
|
viewer: g
|
|
1963
|
-
}), M = i(() =>
|
|
1975
|
+
}), M = i(() => rn(g.activeItem.value?.type ?? "image")), { activeSlideToneStyle: P, activeStageToneStyle: F, updateFromImageElement: I } = cn({
|
|
1964
1976
|
activeItem: g.activeItem,
|
|
1965
1977
|
getItemKey: w.getItemKey,
|
|
1966
1978
|
isImageReady: g.isImageReady,
|
|
1967
1979
|
showDominantImageTone: A(d, "showDominantImageTone")
|
|
1968
|
-
}), R = i(() => g.activeMediaItem.value && !g.activeAssetErrorKind.value ? "bottom-[5.8rem] max-[720px]:bottom-[7.4rem]" : "bottom-[1.8rem] max-[720px]:bottom-[1.3rem]"),
|
|
1980
|
+
}), R = i(() => g.activeMediaItem.value && !g.activeAssetErrorKind.value ? "bottom-[5.8rem] max-[720px]:bottom-[7.4rem]" : "bottom-[1.8rem] max-[720px]:bottom-[1.3rem]"), B = i(() => !!g.activeMediaItem.value && !g.activeAssetErrorKind.value), V = i(() => C.value < Kn ? "vertical" : "horizontal"), H = i(() => B.value ? "pb-[5.75rem] max-[720px]:pb-[7rem]" : ""), ee = i(() => d.activeIndex >= d.items.length && (d.loading || d.hasNextPage)), U = i(() => d.hasNextPage ? "Loading more items" : g.statusMessage.value ?? "Loading more items"), W = i(() => {
|
|
1969
1981
|
let e = g.activeItem.value;
|
|
1970
1982
|
return e ? {
|
|
1971
1983
|
hasNextPage: d.hasNextPage,
|
|
@@ -1975,14 +1987,14 @@ var cn = ["data-surface"], ln = ["data-surface"], un = /* @__PURE__ */ d({
|
|
|
1975
1987
|
paginationDetail: d.paginationDetail,
|
|
1976
1988
|
total: d.items.length
|
|
1977
1989
|
} : null;
|
|
1978
|
-
}),
|
|
1979
|
-
...
|
|
1990
|
+
}), G = i(() => !W.value || !p["fullscreen-header-actions"] ? [] : p["fullscreen-header-actions"](W.value)), K = i(() => !W.value || !p["fullscreen-aside"] ? [] : p["fullscreen-aside"](W.value)), q = i(() => !d.showStatusBadges || !W.value || !g.statusKind.value || !g.statusMessage.value ? null : {
|
|
1991
|
+
...W.value,
|
|
1980
1992
|
kind: g.statusKind.value,
|
|
1981
1993
|
message: g.statusMessage.value
|
|
1982
|
-
}),
|
|
1983
|
-
gridTemplateColumns:
|
|
1994
|
+
}), te = i(() => !q.value || !p["fullscreen-status"] ? [] : p["fullscreen-status"](q.value)), J = i(() => ({
|
|
1995
|
+
gridTemplateColumns: X.value ? "minmax(0, 1fr) 22rem" : "minmax(0, 1fr) 0rem",
|
|
1984
1996
|
transition: "grid-template-columns 320ms cubic-bezier(0.22, 1, 0.36, 1)"
|
|
1985
|
-
})),
|
|
1997
|
+
})), ne = i(() => Ot(G.value)), Y = i(() => Ot(K.value)), X = i(() => Y.value && C.value >= Gn), se = i(() => Y.value && !X.value), ce = i(() => Ot(te.value)), { emptyStateProps: Z, showBadgeEmptyState: le, showCustomEmptyState: ue, showInlineEmptyState: de } = jt({
|
|
1986
1998
|
emptyStateMode: A(d, "emptyStateMode"),
|
|
1987
1999
|
itemCount: i(() => d.items.length),
|
|
1988
2000
|
loading: A(d, "loading"),
|
|
@@ -1995,7 +2007,7 @@ var cn = ["data-surface"], ln = ["data-surface"], un = /* @__PURE__ */ d({
|
|
|
1995
2007
|
window.removeEventListener("resize", Q);
|
|
1996
2008
|
});
|
|
1997
2009
|
function Q() {
|
|
1998
|
-
C.value = window.innerWidth ||
|
|
2010
|
+
C.value = window.innerWidth || Gn;
|
|
1999
2011
|
}
|
|
2000
2012
|
function fe(e, t, n) {
|
|
2001
2013
|
g.onImageLoad(t, n);
|
|
@@ -2008,7 +2020,7 @@ var cn = ["data-surface"], ln = ["data-surface"], un = /* @__PURE__ */ d({
|
|
|
2008
2020
|
function me(e, t) {
|
|
2009
2021
|
I(e, t);
|
|
2010
2022
|
}
|
|
2011
|
-
return (e, n) => (S(), s("div",
|
|
2023
|
+
return (e, n) => (S(), s("div", fn, [
|
|
2012
2024
|
c("div", {
|
|
2013
2025
|
class: _(["absolute inset-0 transition-[background] duration-200", M.value]),
|
|
2014
2026
|
style: y(j(F))
|
|
@@ -2025,7 +2037,7 @@ var cn = ["data-surface"], ln = ["data-surface"], un = /* @__PURE__ */ d({
|
|
|
2025
2037
|
onPointerup: n[3] ||= (...e) => j(g).onPointerUp && j(g).onPointerUp(...e),
|
|
2026
2038
|
onPointercancel: n[4] ||= (...e) => j(g).onPointerCancel && j(g).onPointerCancel(...e),
|
|
2027
2039
|
onWheel: n[5] ||= (...e) => j(g).onWheel && j(g).onWheel(...e)
|
|
2028
|
-
}, [j(g).activeItem.value ? (S(), s("div",
|
|
2040
|
+
}, [j(g).activeItem.value ? (S(), s("div", pn, [
|
|
2029
2041
|
(S(!0), s(t, null, E(j(g).renderedItems.value, ({ item: r, index: i }) => (S(), s("article", {
|
|
2030
2042
|
key: j(w).getItemKey(r),
|
|
2031
2043
|
"data-testid": "vibe-slide",
|
|
@@ -2037,12 +2049,12 @@ var cn = ["data-surface"], ln = ["data-surface"], un = /* @__PURE__ */ d({
|
|
|
2037
2049
|
class: _(["absolute inset-0 flex h-full min-h-full items-center justify-center will-change-transform", i === j(g).resolvedActiveIndex.value ? "pointer-events-auto" : "pointer-events-none"]),
|
|
2038
2050
|
style: y(j(g).getSlideStyle(i))
|
|
2039
2051
|
}, [c("div", {
|
|
2040
|
-
class: _(["absolute inset-0 opacity-85", j(
|
|
2052
|
+
class: _(["absolute inset-0 opacity-85", j(an)(r.type)]),
|
|
2041
2053
|
style: y(i === j(g).resolvedActiveIndex.value && r.type === "image" ? j(P) : void 0)
|
|
2042
2054
|
}, null, 6), j(g).isVisual(r) ? (S(), s("div", {
|
|
2043
2055
|
key: 0,
|
|
2044
|
-
class: _(["relative z-[1] flex h-full w-full items-center justify-center overflow-hidden", i === j(g).resolvedActiveIndex.value ?
|
|
2045
|
-
}, [j(w).isAssetLoading(i, r) ? (S(), s("div",
|
|
2056
|
+
class: _(["relative z-[1] flex h-full w-full items-center justify-center overflow-hidden", i === j(g).resolvedActiveIndex.value ? H.value : ""])
|
|
2057
|
+
}, [j(w).isAssetLoading(i, r) ? (S(), s("div", hn, [c("span", gn, [u(j(re), {
|
|
2046
2058
|
class: "h-5 w-5 animate-spin stroke-[1.9] text-[#f7f1ea]/78",
|
|
2047
2059
|
"aria-hidden": "true"
|
|
2048
2060
|
})])])) : o("", !0), j(w).isAssetErrored(i, r) ? (S(), s("div", {
|
|
@@ -2050,19 +2062,19 @@ var cn = ["data-surface"], ln = ["data-surface"], un = /* @__PURE__ */ d({
|
|
|
2050
2062
|
"data-testid": "vibe-asset-error",
|
|
2051
2063
|
"data-kind": j(w).getAssetErrorKind(r),
|
|
2052
2064
|
class: "grid h-full w-full place-items-center"
|
|
2053
|
-
}, [c("div",
|
|
2065
|
+
}, [c("div", vn, [
|
|
2054
2066
|
u(j(oe), {
|
|
2055
2067
|
class: "h-7 w-7 stroke-[1.9] text-[#f7f1ea]/72",
|
|
2056
2068
|
"aria-hidden": "true"
|
|
2057
2069
|
}),
|
|
2058
|
-
c("p",
|
|
2070
|
+
c("p", yn, k(j(w).getAssetErrorLabel(r)), 1),
|
|
2059
2071
|
j(g).canRetryAsset(j(w).getItemKey(r)) ? (S(), s("button", {
|
|
2060
2072
|
key: 0,
|
|
2061
2073
|
type: "button",
|
|
2062
2074
|
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",
|
|
2063
2075
|
onClick: z((e) => j(g).retryAsset(j(w).getItemKey(r)), ["stop"])
|
|
2064
|
-
}, " Retry ", 8,
|
|
2065
|
-
])], 8,
|
|
2076
|
+
}, " Retry ", 8, bn)) : o("", !0)
|
|
2077
|
+
])], 8, _n)) : r.type === "image" ? (S(), s("img", {
|
|
2066
2078
|
key: j(g).getAssetRenderKey(j(w).getItemKey(r)),
|
|
2067
2079
|
src: j(w).getFullscreenImageSource(i, r),
|
|
2068
2080
|
alt: r.title ?? "",
|
|
@@ -2073,7 +2085,7 @@ var cn = ["data-surface"], ln = ["data-surface"], un = /* @__PURE__ */ d({
|
|
|
2073
2085
|
ref: (e) => pe(j(w).getItemKey(r), e),
|
|
2074
2086
|
onLoad: (e) => fe(e, j(w).getItemKey(r), r.url),
|
|
2075
2087
|
onError: (e) => j(g).onImageError(j(w).getItemKey(r), r.url)
|
|
2076
|
-
}, null, 42,
|
|
2088
|
+
}, null, 42, xn)) : (S(), s("video", {
|
|
2077
2089
|
key: j(g).getAssetRenderKey(j(w).getItemKey(r)),
|
|
2078
2090
|
class: _(["block h-auto max-h-full w-auto max-w-full cursor-pointer object-contain shadow-[0_40px_120px_-60px_rgba(0,0,0,0.9)] transition-opacity duration-300", j(g).isMediaReady(j(w).getItemKey(r)) ? "opacity-100" : "opacity-0"]),
|
|
2079
2091
|
playsinline: "",
|
|
@@ -2096,10 +2108,10 @@ var cn = ["data-surface"], ln = ["data-surface"], un = /* @__PURE__ */ d({
|
|
|
2096
2108
|
onStalled: (e) => j(g).onMediaEvent(j(w).getItemKey(r), e),
|
|
2097
2109
|
onTimeupdate: (e) => j(g).onMediaEvent(j(w).getItemKey(r), e),
|
|
2098
2110
|
onWaiting: (e) => j(g).onMediaEvent(j(w).getItemKey(r), e)
|
|
2099
|
-
}, null, 42,
|
|
2111
|
+
}, null, 42, Sn))], 2)) : j(g).isAudio(r) ? (S(), s("div", {
|
|
2100
2112
|
key: 1,
|
|
2101
|
-
class: _(["relative z-[1] grid w-full max-w-[1100px] justify-items-center gap-6 px-[clamp(2rem,4vw,3rem)] py-[clamp(2rem,4vw,3rem)] text-center", i === j(g).resolvedActiveIndex.value ?
|
|
2102
|
-
}, [c("div",
|
|
2113
|
+
class: _(["relative z-[1] grid w-full max-w-[1100px] justify-items-center gap-6 px-[clamp(2rem,4vw,3rem)] py-[clamp(2rem,4vw,3rem)] text-center", i === j(g).resolvedActiveIndex.value ? H.value : ""])
|
|
2114
|
+
}, [c("div", Cn, [
|
|
2103
2115
|
c("button", {
|
|
2104
2116
|
type: "button",
|
|
2105
2117
|
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]",
|
|
@@ -2109,19 +2121,19 @@ var cn = ["data-surface"], ln = ["data-surface"], un = /* @__PURE__ */ d({
|
|
|
2109
2121
|
}, [
|
|
2110
2122
|
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),
|
|
2111
2123
|
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),
|
|
2112
|
-
c("span",
|
|
2113
|
-
icon: j(
|
|
2124
|
+
c("span", Tn, [D(e.$slots, "item-icon", {
|
|
2125
|
+
icon: j(Ct)(r.type),
|
|
2114
2126
|
item: r
|
|
2115
|
-
}, () => [(S(), a(O(j(
|
|
2127
|
+
}, () => [(S(), a(O(j(Ct)(r.type)), {
|
|
2116
2128
|
class: "h-6 w-6 stroke-[1.9]",
|
|
2117
2129
|
"aria-hidden": "true"
|
|
2118
2130
|
}))])]),
|
|
2119
|
-
c("span",
|
|
2131
|
+
c("span", En, [(S(), a(O(j(g).mediaStates.value[j(w).getItemKey(r)]?.paused ?? !0 ? j(ae) : j(ie)), {
|
|
2120
2132
|
class: "h-4 w-4 stroke-2",
|
|
2121
2133
|
"aria-hidden": "true"
|
|
2122
2134
|
}))])
|
|
2123
|
-
], 8,
|
|
2124
|
-
j(w).isAssetLoading(i, r) ? (S(), s("div",
|
|
2135
|
+
], 8, wn),
|
|
2136
|
+
j(w).isAssetLoading(i, r) ? (S(), s("div", Dn, [c("span", On, [u(j(re), {
|
|
2125
2137
|
class: "h-5 w-5 animate-spin stroke-[1.9] text-[#f7f1ea]/78",
|
|
2126
2138
|
"aria-hidden": "true"
|
|
2127
2139
|
})])])) : o("", !0),
|
|
@@ -2134,14 +2146,14 @@ var cn = ["data-surface"], ln = ["data-surface"], un = /* @__PURE__ */ d({
|
|
|
2134
2146
|
class: "h-7 w-7 stroke-[1.9] text-[#f7f1ea]/72",
|
|
2135
2147
|
"aria-hidden": "true"
|
|
2136
2148
|
}),
|
|
2137
|
-
c("p",
|
|
2149
|
+
c("p", An, k(j(w).getAssetErrorLabel(r)), 1),
|
|
2138
2150
|
j(g).canRetryAsset(j(w).getItemKey(r)) ? (S(), s("button", {
|
|
2139
2151
|
key: 0,
|
|
2140
2152
|
type: "button",
|
|
2141
2153
|
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",
|
|
2142
2154
|
onClick: z((e) => j(g).retryAsset(j(w).getItemKey(r)), ["stop"])
|
|
2143
|
-
}, " Retry ", 8,
|
|
2144
|
-
], 8,
|
|
2155
|
+
}, " Retry ", 8, jn)) : o("", !0)
|
|
2156
|
+
], 8, kn)], 64)) : o("", !0)
|
|
2145
2157
|
]), (S(), s("audio", {
|
|
2146
2158
|
key: j(g).getAssetRenderKey(j(w).getItemKey(r)),
|
|
2147
2159
|
src: j(w).getFullscreenMediaSource(i, r),
|
|
@@ -2162,15 +2174,15 @@ var cn = ["data-surface"], ln = ["data-surface"], un = /* @__PURE__ */ d({
|
|
|
2162
2174
|
onStalled: (e) => j(g).onMediaEvent(j(w).getItemKey(r), e),
|
|
2163
2175
|
onTimeupdate: (e) => j(g).onMediaEvent(j(w).getItemKey(r), e),
|
|
2164
2176
|
onWaiting: (e) => j(g).onMediaEvent(j(w).getItemKey(r), e)
|
|
2165
|
-
}, null, 40,
|
|
2166
|
-
icon: j(
|
|
2177
|
+
}, null, 40, Mn))], 2)) : (S(), s("div", Nn, [c("div", Pn, [D(e.$slots, "item-icon", {
|
|
2178
|
+
icon: j(Ct)(r.type),
|
|
2167
2179
|
item: r
|
|
2168
|
-
}, () => [(S(), a(O(j(
|
|
2180
|
+
}, () => [(S(), a(O(j(Ct)(r.type)), {
|
|
2169
2181
|
class: "h-6 w-6 stroke-[1.9]",
|
|
2170
2182
|
"aria-hidden": "true"
|
|
2171
|
-
}))])])]))], 14,
|
|
2172
|
-
|
|
2173
|
-
j(g).activeItem.value ? (S(), a(
|
|
2183
|
+
}))])])]))], 14, mn))), 128)),
|
|
2184
|
+
W.value && p["fullscreen-overlay"] ? (S(), s("div", Fn, [c("div", In, [D(e.$slots, "fullscreen-overlay", v(f(W.value)))])])) : o("", !0),
|
|
2185
|
+
j(g).activeItem.value ? (S(), a(bt, {
|
|
2174
2186
|
key: 1,
|
|
2175
2187
|
"current-index": j(g).resolvedActiveIndex.value,
|
|
2176
2188
|
loading: d.loading,
|
|
@@ -2180,9 +2192,9 @@ var cn = ["data-surface"], ln = ["data-surface"], un = /* @__PURE__ */ d({
|
|
|
2180
2192
|
title: j(g).activeItem.value.title ?? null,
|
|
2181
2193
|
total: j(g).items.value.length,
|
|
2182
2194
|
onBackToList: n[0] ||= (e) => m("back-to-list")
|
|
2183
|
-
}, l({ _: 2 }, [
|
|
2195
|
+
}, l({ _: 2 }, [ne.value && W.value ? {
|
|
2184
2196
|
name: "actions",
|
|
2185
|
-
fn: L(() => [D(e.$slots, "fullscreen-header-actions", v(f(
|
|
2197
|
+
fn: L(() => [D(e.$slots, "fullscreen-header-actions", v(f(W.value)))]),
|
|
2186
2198
|
key: "0"
|
|
2187
2199
|
} : void 0]), 1032, [
|
|
2188
2200
|
"current-index",
|
|
@@ -2193,7 +2205,7 @@ var cn = ["data-surface"], ln = ["data-surface"], un = /* @__PURE__ */ d({
|
|
|
2193
2205
|
"title",
|
|
2194
2206
|
"total"
|
|
2195
2207
|
])) : o("", !0),
|
|
2196
|
-
|
|
2208
|
+
B.value ? (S(), a(lt, {
|
|
2197
2209
|
key: 2,
|
|
2198
2210
|
"current-time": j(g).activeMediaState.value.currentTime,
|
|
2199
2211
|
"current-time-label": j(g).formatPlaybackTime(j(g).activeMediaState.value.currentTime),
|
|
@@ -2202,7 +2214,7 @@ var cn = ["data-surface"], ln = ["data-surface"], un = /* @__PURE__ */ d({
|
|
|
2202
2214
|
muted: j(g).activeMediaState.value.muted,
|
|
2203
2215
|
progress: j(g).activeMediaProgress.value,
|
|
2204
2216
|
volume: j(g).activeMediaState.value.volume,
|
|
2205
|
-
"volume-control-layout":
|
|
2217
|
+
"volume-control-layout": V.value,
|
|
2206
2218
|
onSeekInput: j(g).onMediaSeekInput,
|
|
2207
2219
|
onVolumeInput: j(g).onMediaVolumeInput,
|
|
2208
2220
|
onVolumeToggle: j(g).onMediaVolumeToggle
|
|
@@ -2219,18 +2231,18 @@ var cn = ["data-surface"], ln = ["data-surface"], un = /* @__PURE__ */ d({
|
|
|
2219
2231
|
"onVolumeInput",
|
|
2220
2232
|
"onVolumeToggle"
|
|
2221
2233
|
])) : o("", !0),
|
|
2222
|
-
|
|
2234
|
+
q.value ? (S(), s("div", {
|
|
2223
2235
|
key: 3,
|
|
2224
2236
|
class: _(["absolute left-1/2 z-[4] -translate-x-1/2", R.value])
|
|
2225
|
-
}, [ce.value ? D(e.$slots, "fullscreen-status", v(h({ key: 0 },
|
|
2237
|
+
}, [ce.value ? D(e.$slots, "fullscreen-status", v(h({ key: 0 }, q.value))) : (S(), s("div", {
|
|
2226
2238
|
key: 1,
|
|
2227
2239
|
"data-testid": "vibe-fullscreen-status-badge",
|
|
2228
|
-
class: _(["inline-flex w-auto items-center border border-white/14 bg-black/40 px-5 py-3 text-[0.75rem] font-bold uppercase tracking-[0.18em] text-[#f7f1ea]/74 backdrop-blur-[18px] max-[720px]:w-[calc(100%-2.5rem)] max-[720px]:justify-center",
|
|
2229
|
-
}, k(
|
|
2230
|
-
])) :
|
|
2240
|
+
class: _(["inline-flex w-auto items-center border border-white/14 bg-black/40 px-5 py-3 text-[0.75rem] font-bold uppercase tracking-[0.18em] text-[#f7f1ea]/74 backdrop-blur-[18px] max-[720px]:w-[calc(100%-2.5rem)] max-[720px]:justify-center", q.value.kind === "end" ? "border-amber-300/35 text-amber-200" : q.value.kind === "failed" ? "border-rose-400/45 text-rose-100" : ""])
|
|
2241
|
+
}, k(q.value.message), 3))], 2)) : o("", !0)
|
|
2242
|
+
])) : ee.value ? (S(), s("div", Ln, [c("div", Rn, [c("span", zn, [u(j(re), {
|
|
2231
2243
|
class: "h-5 w-5 animate-spin stroke-[1.9] text-[#f7f1ea]/78",
|
|
2232
2244
|
"aria-hidden": "true"
|
|
2233
|
-
})]), c("p",
|
|
2245
|
+
})]), c("p", Bn, k(U.value), 1)])])) : j(de) && j(Z) ? (S(), a(dn, {
|
|
2234
2246
|
key: 2,
|
|
2235
2247
|
message: j(Z).message,
|
|
2236
2248
|
mode: j(Z).mode,
|
|
@@ -2242,7 +2254,7 @@ var cn = ["data-surface"], ln = ["data-surface"], un = /* @__PURE__ */ d({
|
|
|
2242
2254
|
"message",
|
|
2243
2255
|
"mode",
|
|
2244
2256
|
"surface"
|
|
2245
|
-
])) : o("", !0), j(le) && j(Z) ? (S(), a(
|
|
2257
|
+
])) : o("", !0), j(le) && j(Z) ? (S(), a(dn, {
|
|
2246
2258
|
key: 3,
|
|
2247
2259
|
message: j(Z).message,
|
|
2248
2260
|
mode: j(Z).mode,
|
|
@@ -2262,7 +2274,7 @@ var cn = ["data-surface"], ln = ["data-surface"], un = /* @__PURE__ */ d({
|
|
|
2262
2274
|
"leave-from-class": "translate-x-0 opacity-100",
|
|
2263
2275
|
"leave-to-class": "translate-x-full opacity-0"
|
|
2264
2276
|
}, {
|
|
2265
|
-
default: L(() => [
|
|
2277
|
+
default: L(() => [X.value && W.value ? (S(), s("aside", Vn, [c("div", Hn, [D(e.$slots, "fullscreen-aside", v(f(W.value)))])])) : o("", !0)]),
|
|
2266
2278
|
_: 3
|
|
2267
2279
|
})], 4),
|
|
2268
2280
|
u(r, {
|
|
@@ -2273,29 +2285,29 @@ var cn = ["data-surface"], ln = ["data-surface"], un = /* @__PURE__ */ d({
|
|
|
2273
2285
|
"leave-from-class": "translate-x-0 opacity-100",
|
|
2274
2286
|
"leave-to-class": "translate-x-full opacity-0"
|
|
2275
2287
|
}, {
|
|
2276
|
-
default: L(() => [se.value &&
|
|
2288
|
+
default: L(() => [se.value && W.value ? (S(), s("aside", Un, [c("div", Wn, [D(e.$slots, "fullscreen-aside", v(f(W.value)))])])) : o("", !0)]),
|
|
2277
2289
|
_: 3
|
|
2278
2290
|
})
|
|
2279
2291
|
]));
|
|
2280
2292
|
}
|
|
2281
|
-
}),
|
|
2282
|
-
function
|
|
2293
|
+
}), Jn = 1, Yn = .5;
|
|
2294
|
+
function Xn(e) {
|
|
2283
2295
|
if (e.type !== "image" && e.type !== "video") return {
|
|
2284
|
-
width:
|
|
2285
|
-
height:
|
|
2296
|
+
width: Jn,
|
|
2297
|
+
height: Jn,
|
|
2286
2298
|
source: "fallback"
|
|
2287
2299
|
};
|
|
2288
2300
|
let t = e.preview?.width, n = e.preview?.height;
|
|
2289
|
-
if (
|
|
2290
|
-
let r =
|
|
2301
|
+
if (rr(t) && rr(n)) {
|
|
2302
|
+
let r = ir(e, t, n);
|
|
2291
2303
|
return {
|
|
2292
2304
|
width: r.width,
|
|
2293
2305
|
height: r.height,
|
|
2294
2306
|
source: "preview"
|
|
2295
2307
|
};
|
|
2296
2308
|
}
|
|
2297
|
-
if (
|
|
2298
|
-
let t =
|
|
2309
|
+
if (rr(e.width) && rr(e.height)) {
|
|
2310
|
+
let t = ir(e, e.width, e.height);
|
|
2299
2311
|
return {
|
|
2300
2312
|
width: t.width,
|
|
2301
2313
|
height: t.height,
|
|
@@ -2303,31 +2315,31 @@ function Yn(e) {
|
|
|
2303
2315
|
};
|
|
2304
2316
|
}
|
|
2305
2317
|
return {
|
|
2306
|
-
width:
|
|
2307
|
-
height:
|
|
2318
|
+
width: Jn,
|
|
2319
|
+
height: Jn,
|
|
2308
2320
|
source: "fallback"
|
|
2309
2321
|
};
|
|
2310
2322
|
}
|
|
2311
|
-
function
|
|
2323
|
+
function Zn(e, t) {
|
|
2312
2324
|
return !e || e <= 0 || !t || t <= 0 ? 1 : Math.max(1, Math.floor(e / t));
|
|
2313
2325
|
}
|
|
2314
|
-
function
|
|
2326
|
+
function Qn(e, t, n, r = 0) {
|
|
2315
2327
|
if (!e || e <= 0 || !t || t <= 0) return n;
|
|
2316
2328
|
let i = typeof r == "number" && r > 0 ? r : 0, a = e - Math.max(0, t - 1) * i;
|
|
2317
2329
|
return !a || a <= 0 ? n : a / t;
|
|
2318
2330
|
}
|
|
2319
|
-
function
|
|
2320
|
-
let n =
|
|
2331
|
+
function $n(e, t) {
|
|
2332
|
+
let n = Xn(e);
|
|
2321
2333
|
return n.height / n.width * t;
|
|
2322
2334
|
}
|
|
2323
|
-
function
|
|
2335
|
+
function er(e, t) {
|
|
2324
2336
|
let n = Array.from({ length: t.columnCount }, () => 0), r = Array(e.length), i = Array(e.length), a = /* @__PURE__ */ new Map(), o = /* @__PURE__ */ new Map(), s = 0;
|
|
2325
2337
|
for (let c = 0; c < e.length; c += 1) {
|
|
2326
2338
|
let l = e[c];
|
|
2327
2339
|
o.set($(l), c);
|
|
2328
2340
|
let u = 0;
|
|
2329
2341
|
for (let e = 1; e < n.length; e += 1) n[e] < n[u] && (u = e);
|
|
2330
|
-
let d = u * (t.columnWidth + t.gapX), f = n[u], p =
|
|
2342
|
+
let d = u * (t.columnWidth + t.gapX), f = n[u], p = $n(l, t.columnWidth);
|
|
2331
2343
|
r[c] = {
|
|
2332
2344
|
x: d,
|
|
2333
2345
|
y: f
|
|
@@ -2346,7 +2358,7 @@ function $n(e, t) {
|
|
|
2346
2358
|
indexById: o
|
|
2347
2359
|
};
|
|
2348
2360
|
}
|
|
2349
|
-
function
|
|
2361
|
+
function tr(e) {
|
|
2350
2362
|
if (e.itemCount <= 0) return [];
|
|
2351
2363
|
if (e.viewportHeight <= 0) return Array.from({ length: e.itemCount }, (e, t) => t);
|
|
2352
2364
|
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();
|
|
@@ -2356,7 +2368,7 @@ function er(e) {
|
|
|
2356
2368
|
}
|
|
2357
2369
|
return Array.from(a).sort((e, t) => e - t);
|
|
2358
2370
|
}
|
|
2359
|
-
function
|
|
2371
|
+
function nr(e, t, n) {
|
|
2360
2372
|
let r = /* @__PURE__ */ new Map();
|
|
2361
2373
|
for (let i of e) {
|
|
2362
2374
|
let e = t.get($(i));
|
|
@@ -2366,11 +2378,11 @@ function tr(e, t, n) {
|
|
|
2366
2378
|
}
|
|
2367
2379
|
return r;
|
|
2368
2380
|
}
|
|
2369
|
-
function
|
|
2381
|
+
function rr(e) {
|
|
2370
2382
|
return typeof e == "number" && Number.isFinite(e) && e > 0;
|
|
2371
2383
|
}
|
|
2372
|
-
function
|
|
2373
|
-
return e.type !== "image" || n / t >=
|
|
2384
|
+
function ir(e, t, n) {
|
|
2385
|
+
return e.type !== "image" || n / t >= Yn ? {
|
|
2374
2386
|
width: t,
|
|
2375
2387
|
height: n
|
|
2376
2388
|
} : {
|
|
@@ -2380,21 +2392,21 @@ function rr(e, t, n) {
|
|
|
2380
2392
|
}
|
|
2381
2393
|
//#endregion
|
|
2382
2394
|
//#region src/components/viewer-core/useMasonryMotion.ts
|
|
2383
|
-
var
|
|
2384
|
-
function
|
|
2395
|
+
var ar = 300, or = 600, sr = 40, cr = 300, lr = 400;
|
|
2396
|
+
function ur(e, t) {
|
|
2385
2397
|
return t === "top" ? [...e].reverse() : e;
|
|
2386
2398
|
}
|
|
2387
|
-
function
|
|
2388
|
-
return e <= 0 ?
|
|
2399
|
+
function dr(e) {
|
|
2400
|
+
return e <= 0 ? or : or + Math.min((e - 1) * sr, lr);
|
|
2389
2401
|
}
|
|
2390
|
-
function
|
|
2391
|
-
return
|
|
2402
|
+
function fr() {
|
|
2403
|
+
return cr;
|
|
2392
2404
|
}
|
|
2393
|
-
function
|
|
2405
|
+
function pr(e) {
|
|
2394
2406
|
let t = e.itemHeight > 0 ? e.itemHeight : e.columnWidth;
|
|
2395
2407
|
return e.direction === "top" ? e.scrollTop - t : e.scrollTop + e.viewportHeight + t;
|
|
2396
2408
|
}
|
|
2397
|
-
function
|
|
2409
|
+
function mr(e) {
|
|
2398
2410
|
let t = T(/* @__PURE__ */ new Set()), n = T(/* @__PURE__ */ new Set()), r = T(/* @__PURE__ */ new Map()), a = T(/* @__PURE__ */ new Map()), o = T(/* @__PURE__ */ new Map()), s = T(/* @__PURE__ */ new Set()), c = T(/* @__PURE__ */ new Map()), l = T(/* @__PURE__ */ new Map()), u = T(/* @__PURE__ */ new Set()), d = /* @__PURE__ */ new Set(), f = /* @__PURE__ */ new Set(), p = i(() => Array.from(o.value.values()));
|
|
2399
2411
|
F(e.visibleIndices, (i) => {
|
|
2400
2412
|
if (!i.length) return;
|
|
@@ -2404,20 +2416,20 @@ function pr(e) {
|
|
|
2404
2416
|
!r || !t.value.has(r) || d.has(r) || (d.add(r), o.push(r));
|
|
2405
2417
|
}
|
|
2406
2418
|
if (!o.length) return;
|
|
2407
|
-
let s =
|
|
2408
|
-
for (let e = 0; e < s.length; e += 1) c.set(s[e], Math.min(e *
|
|
2409
|
-
r.value = c,
|
|
2419
|
+
let s = ur(o, a.value.get(o[0]) ?? "bottom"), c = new Map(r.value);
|
|
2420
|
+
for (let e = 0; e < s.length; e += 1) c.set(s[e], Math.min(e * sr, lr));
|
|
2421
|
+
r.value = c, hr(() => {
|
|
2410
2422
|
let e = new Set(n.value);
|
|
2411
2423
|
for (let t of o) e.add(t);
|
|
2412
2424
|
n.value = e;
|
|
2413
|
-
}),
|
|
2425
|
+
}), gr(() => {
|
|
2414
2426
|
let e = new Set(t.value);
|
|
2415
2427
|
for (let t of o) e.delete(t);
|
|
2416
2428
|
t.value = e, S(() => {
|
|
2417
2429
|
let e = new Set(n.value), t = new Map(r.value), i = new Map(a.value);
|
|
2418
2430
|
for (let n of o) e.delete(n), t.delete(n), i.delete(n), d.delete(n);
|
|
2419
2431
|
n.value = e, r.value = t, a.value = i;
|
|
2420
|
-
},
|
|
2432
|
+
}, dr(o.length));
|
|
2421
2433
|
});
|
|
2422
2434
|
}, { flush: "post" }), F(() => e.items.value.map((e) => $(e)), (e) => {
|
|
2423
2435
|
if (!e.length || !o.value.size) return;
|
|
@@ -2444,7 +2456,7 @@ function pr(e) {
|
|
|
2444
2456
|
let e = $(t.item);
|
|
2445
2457
|
p.push(e), i.set(e, t), c.delete(e), l.delete(e), u.delete(e), f.delete(e), d.delete(e);
|
|
2446
2458
|
}
|
|
2447
|
-
o.value = i, t.value = c, n.value = l, r.value = u, a.value = f,
|
|
2459
|
+
o.value = i, t.value = c, n.value = l, r.value = u, a.value = f, hr(() => {
|
|
2448
2460
|
let e = new Set(s.value);
|
|
2449
2461
|
for (let t of p) e.add(t);
|
|
2450
2462
|
s.value = e;
|
|
@@ -2452,9 +2464,9 @@ function pr(e) {
|
|
|
2452
2464
|
let e = new Map(o.value), t = new Set(s.value);
|
|
2453
2465
|
for (let n of p) e.delete(n), t.delete(n);
|
|
2454
2466
|
o.value = e, s.value = t;
|
|
2455
|
-
},
|
|
2467
|
+
}, cr);
|
|
2456
2468
|
}
|
|
2457
|
-
function g(t, n, r =
|
|
2469
|
+
function g(t, n, r = ar) {
|
|
2458
2470
|
if (!t.size) return;
|
|
2459
2471
|
let i = /* @__PURE__ */ new Map(), a = [];
|
|
2460
2472
|
for (let [r, o] of t.entries()) {
|
|
@@ -2473,8 +2485,8 @@ function pr(e) {
|
|
|
2473
2485
|
c.value = i, u.value = /* @__PURE__ */ new Set();
|
|
2474
2486
|
let o = new Map(l.value);
|
|
2475
2487
|
for (let e of a) o.set(e, r);
|
|
2476
|
-
l.value = o,
|
|
2477
|
-
u.value = new Set(a),
|
|
2488
|
+
l.value = o, hr(() => {
|
|
2489
|
+
u.value = new Set(a), hr(() => {
|
|
2478
2490
|
c.value = /* @__PURE__ */ new Map();
|
|
2479
2491
|
});
|
|
2480
2492
|
}), S(() => {
|
|
@@ -2485,8 +2497,8 @@ function pr(e) {
|
|
|
2485
2497
|
}, r);
|
|
2486
2498
|
}
|
|
2487
2499
|
function _(e) {
|
|
2488
|
-
if (n.value.has(e)) return `transform ${
|
|
2489
|
-
if (u.value.has(e)) return `transform ${l.value.get(e) ??
|
|
2500
|
+
if (n.value.has(e)) return `transform ${or}ms ease-out`;
|
|
2501
|
+
if (u.value.has(e)) return `transform ${l.value.get(e) ?? ar}ms ease-out`;
|
|
2490
2502
|
}
|
|
2491
2503
|
function v(e) {
|
|
2492
2504
|
if (!n.value.has(e)) return;
|
|
@@ -2503,7 +2515,7 @@ function pr(e) {
|
|
|
2503
2515
|
} : {
|
|
2504
2516
|
dx: 0,
|
|
2505
2517
|
dy: 0
|
|
2506
|
-
}, u = s ? a.value.get(s) ?? "bottom" : "bottom", d = s && t.value.has(s) ?
|
|
2518
|
+
}, u = s ? a.value.get(s) ?? "bottom" : "bottom", d = s && t.value.has(s) ? pr({
|
|
2507
2519
|
columnWidth: e.columnWidth.value,
|
|
2508
2520
|
direction: u,
|
|
2509
2521
|
itemHeight: o,
|
|
@@ -2517,14 +2529,14 @@ function pr(e) {
|
|
|
2517
2529
|
if (!r) return {
|
|
2518
2530
|
opacity: "0",
|
|
2519
2531
|
transform: "translate3d(0, 0, 0) scale(0.96)",
|
|
2520
|
-
transition: `opacity ${
|
|
2532
|
+
transition: `opacity ${cr}ms ease-out, transform ${cr}ms ease-out`
|
|
2521
2533
|
};
|
|
2522
2534
|
let i = s.value.has(n);
|
|
2523
2535
|
return {
|
|
2524
2536
|
height: `${r.height}px`,
|
|
2525
2537
|
opacity: i ? "0" : "1",
|
|
2526
2538
|
transform: `translate3d(${r.position.x}px, ${r.position.y}px, 0) scale(${i ? "0.96" : "1"})`,
|
|
2527
|
-
transition: `opacity ${
|
|
2539
|
+
transition: `opacity ${cr}ms ease-out, transform ${cr}ms ease-out`,
|
|
2528
2540
|
width: `${e.columnWidth.value}px`
|
|
2529
2541
|
};
|
|
2530
2542
|
}
|
|
@@ -2545,28 +2557,28 @@ function pr(e) {
|
|
|
2545
2557
|
playFlipMoveAnimation: g
|
|
2546
2558
|
};
|
|
2547
2559
|
}
|
|
2548
|
-
function
|
|
2560
|
+
function hr(e) {
|
|
2549
2561
|
if (typeof requestAnimationFrame == "function") {
|
|
2550
2562
|
requestAnimationFrame(() => e());
|
|
2551
2563
|
return;
|
|
2552
2564
|
}
|
|
2553
2565
|
setTimeout(e, 0);
|
|
2554
2566
|
}
|
|
2555
|
-
function
|
|
2556
|
-
|
|
2567
|
+
function gr(e) {
|
|
2568
|
+
hr(() => hr(e));
|
|
2557
2569
|
}
|
|
2558
2570
|
//#endregion
|
|
2559
2571
|
//#region src/components/viewer-core/masonryViewport.ts
|
|
2560
|
-
function
|
|
2572
|
+
function _r(e, t) {
|
|
2561
2573
|
return e?.clientHeight || Math.round(e?.getBoundingClientRect().height ?? 0) || t || window.innerHeight || 1;
|
|
2562
2574
|
}
|
|
2563
|
-
function
|
|
2575
|
+
function vr(e, t, n) {
|
|
2564
2576
|
return e?.clientWidth || Math.round(e?.getBoundingClientRect().width ?? 0) || t || window.innerWidth || n;
|
|
2565
2577
|
}
|
|
2566
|
-
function
|
|
2578
|
+
function yr(e, t, n, r) {
|
|
2567
2579
|
return (e?.scrollHeight ?? r) - (t + n);
|
|
2568
2580
|
}
|
|
2569
|
-
function
|
|
2581
|
+
function br(e, t) {
|
|
2570
2582
|
return {
|
|
2571
2583
|
height: `${e}px`,
|
|
2572
2584
|
transform: `translate3d(0, ${t}px, 0)`
|
|
@@ -2574,8 +2586,8 @@ function yr(e, t) {
|
|
|
2574
2586
|
}
|
|
2575
2587
|
//#endregion
|
|
2576
2588
|
//#region src/components/viewer-core/useEdgeBoundary.ts
|
|
2577
|
-
var
|
|
2578
|
-
function
|
|
2589
|
+
var xr = 250, Sr = 1e3;
|
|
2590
|
+
function Cr(e) {
|
|
2579
2591
|
let t = T(!1), n = T(!1), r = T(0), i = T(0), a = T(!1), o = T(!1), s = 0, c = null;
|
|
2580
2592
|
b(() => {
|
|
2581
2593
|
y();
|
|
@@ -2591,7 +2603,7 @@ function Sr(e) {
|
|
|
2591
2603
|
function u(t) {
|
|
2592
2604
|
if (!x(t) || !e.isAtBoundary()) return;
|
|
2593
2605
|
let n = Date.now();
|
|
2594
|
-
n < s || (s = n +
|
|
2606
|
+
n < s || (s = n + xr, m());
|
|
2595
2607
|
}
|
|
2596
2608
|
function d() {
|
|
2597
2609
|
if (!g()) return;
|
|
@@ -2625,7 +2637,7 @@ function Sr(e) {
|
|
|
2625
2637
|
return e.hasPage.value && t.value && r.value > i.value && !e.interactionLocked?.value && !e.loading.value && !a.value && typeof e.requestPage.value == "function";
|
|
2626
2638
|
}
|
|
2627
2639
|
function _() {
|
|
2628
|
-
o.value = !1, v(
|
|
2640
|
+
o.value = !1, v(Sr);
|
|
2629
2641
|
}
|
|
2630
2642
|
function v(e) {
|
|
2631
2643
|
y(), a.value = !0, c = setTimeout(() => {
|
|
@@ -2648,30 +2660,42 @@ function Sr(e) {
|
|
|
2648
2660
|
}
|
|
2649
2661
|
//#endregion
|
|
2650
2662
|
//#region src/components/viewer-core/useMasonryList.ts
|
|
2651
|
-
var
|
|
2652
|
-
function
|
|
2653
|
-
let t = T(null), n = T(0), r = T(typeof window > "u" ? 0 : window.innerHeight || 0), a = T(typeof window > "u" ? 0 : window.innerWidth ||
|
|
2663
|
+
var wr = 600, Tr = 24, Er = 16, Dr = 300, Or = 200, kr = 200, Ar = Tr + Er, jr = 200, Mr = 300, Nr = 24, Pr = 48, Fr = 500, Ir = 1e3;
|
|
2664
|
+
function Lr(e) {
|
|
2665
|
+
let t = T(null), n = T(0), r = T(typeof window > "u" ? 0 : window.innerHeight || 0), a = T(typeof window > "u" ? 0 : window.innerWidth || Dr), o = T([]), s = T([]), c = T(/* @__PURE__ */ new Map()), l = T(0), u = T(/* @__PURE__ */ new Map()), d = T(null), f = T(null), p = T(!1), m = i(() => Math.max(Dr, a.value - Tr * 2)), h = i(() => Zn(m.value, Dr)), _ = i(() => Qn(m.value, h.value, Dr, Er)), v = i(() => Rr(e.activeIndex.value, 0, Math.max(0, e.items.value.length - 1))), y = i(() => tr({
|
|
2654
2666
|
itemCount: e.items.value.length,
|
|
2655
2667
|
viewportHeight: r.value,
|
|
2656
2668
|
scrollTop: n.value,
|
|
2657
|
-
overscanPx:
|
|
2658
|
-
bucketPx:
|
|
2669
|
+
overscanPx: Or,
|
|
2670
|
+
bucketPx: wr,
|
|
2659
2671
|
buckets: c.value
|
|
2660
2672
|
})), S = i(() => y.value.map((t) => ({
|
|
2661
2673
|
item: e.items.value[t],
|
|
2662
2674
|
index: t
|
|
2663
2675
|
}))), C = i(() => {
|
|
2664
|
-
let e = l.value +
|
|
2665
|
-
return Math.max(e, t, r.value) +
|
|
2666
|
-
}), w = i(() => e.hasNextPage.value || e.allowExhaustedNextPageRefresh.value), E = i(() =>
|
|
2667
|
-
|
|
2668
|
-
|
|
2669
|
-
|
|
2670
|
-
|
|
2671
|
-
|
|
2676
|
+
let e = l.value + Tr * 2, t = d.value ?? 0;
|
|
2677
|
+
return Math.max(e, t, r.value) + jr;
|
|
2678
|
+
}), w = i(() => e.hasNextPage.value || e.allowExhaustedNextPageRefresh.value), E = i(() => Br({
|
|
2679
|
+
active: e.active.value,
|
|
2680
|
+
maxScrollTop: oe(),
|
|
2681
|
+
progressDistancePx: n.value,
|
|
2682
|
+
thresholdPx: kr,
|
|
2683
|
+
triggerEnabled: w.value
|
|
2684
|
+
})), D = i(() => e.items.value.length > 0 ? `${v.value + 1} / ${e.items.value.length}` : "0 / 0"), O = i(() => zr({
|
|
2685
|
+
active: e.active.value,
|
|
2686
|
+
maxScrollTop: oe(),
|
|
2687
|
+
progressDistancePx: n.value,
|
|
2688
|
+
thresholdPx: Ar,
|
|
2689
|
+
triggerEnabled: e.hasPreviousPage.value
|
|
2690
|
+
})), k = i(() => Math.max(0, r.value - Nr * 2)), A = i(() => C.value > r.value + 1 && k.value > 0), j = i(() => {
|
|
2691
|
+
if (!A.value) return 0;
|
|
2692
|
+
let e = r.value / C.value * k.value;
|
|
2693
|
+
return Math.min(k.value, Math.max(Pr, e));
|
|
2694
|
+
}), M = i(() => {
|
|
2695
|
+
if (!A.value) return Nr;
|
|
2672
2696
|
let e = Math.max(0, C.value - r.value);
|
|
2673
|
-
return
|
|
2674
|
-
}),
|
|
2697
|
+
return Nr + Math.max(0, k.value - j.value) * (e > 0 ? Rr(n.value / e, 0, 1) : 0);
|
|
2698
|
+
}), N = mr({
|
|
2675
2699
|
items: e.items,
|
|
2676
2700
|
visibleIndices: y,
|
|
2677
2701
|
positions: o,
|
|
@@ -2680,37 +2704,37 @@ function Fr(e) {
|
|
|
2680
2704
|
columnWidth: _,
|
|
2681
2705
|
scrollTop: n,
|
|
2682
2706
|
viewportHeight: r
|
|
2683
|
-
}),
|
|
2707
|
+
}), P = Cr({
|
|
2684
2708
|
direction: "top",
|
|
2685
2709
|
getAnimationLockMs(e) {
|
|
2686
|
-
return Math.max(
|
|
2710
|
+
return Math.max(Fr, dr(e)) + Ir;
|
|
2687
2711
|
},
|
|
2688
2712
|
hasPage: e.hasPreviousPage,
|
|
2689
2713
|
interactionLocked: p,
|
|
2690
2714
|
isAtBoundary() {
|
|
2691
|
-
return n.value <=
|
|
2715
|
+
return n.value <= Ar;
|
|
2692
2716
|
},
|
|
2693
2717
|
loading: e.loading,
|
|
2694
2718
|
requestPage: e.requestPreviousPage
|
|
2695
|
-
}),
|
|
2719
|
+
}), I = Cr({
|
|
2696
2720
|
direction: "bottom",
|
|
2697
2721
|
getAnimationLockMs(e) {
|
|
2698
|
-
return
|
|
2722
|
+
return dr(e) + Ir;
|
|
2699
2723
|
},
|
|
2700
2724
|
hasPage: w,
|
|
2701
2725
|
interactionLocked: p,
|
|
2702
2726
|
isAtBoundary() {
|
|
2703
|
-
return
|
|
2727
|
+
return ae() <= kr;
|
|
2704
2728
|
},
|
|
2705
2729
|
loading: e.loading,
|
|
2706
2730
|
requestPage: e.requestNextPage
|
|
2707
|
-
}),
|
|
2731
|
+
}), L = null, R = 0, z = null, B = null, V = !1;
|
|
2708
2732
|
F([
|
|
2709
2733
|
() => e.items.value,
|
|
2710
2734
|
h,
|
|
2711
2735
|
_
|
|
2712
2736
|
], async ([t], [r = []]) => {
|
|
2713
|
-
let i = t.map((e) => $(e)), a = r ?? [], s = a.map((e) => $(e)), c =
|
|
2737
|
+
let i = t.map((e) => $(e)), a = r ?? [], s = a.map((e) => $(e)), c = nr(a, u.value, o.value), l = Z(a), d = new Set(s), f = new Set(i), p = t.filter((e) => !d.has($(e))), m = a.flatMap((e) => {
|
|
2714
2738
|
let t = $(e);
|
|
2715
2739
|
if (f.has(t)) return [];
|
|
2716
2740
|
let n = c.get(t), r = l.get(t);
|
|
@@ -2719,15 +2743,15 @@ function Fr(e) {
|
|
|
2719
2743
|
item: e,
|
|
2720
2744
|
position: n
|
|
2721
2745
|
}];
|
|
2722
|
-
}), h = i.length > s.length && s.length > 0 && i[0] !== s[0], _ = t.length === 0 && a.length > 0 && m.length > 0 && n.value > 0, y = m.length > 0 && n.value >
|
|
2723
|
-
y &&
|
|
2746
|
+
}), h = i.length > s.length && s.length > 0 && i[0] !== s[0], _ = t.length === 0 && a.length > 0 && m.length > 0 && n.value > 0, y = m.length > 0 && n.value > Tr + Er, b = h && n.value > Tr + Er ? t[v.value] : null, x = b ? $(b) : null;
|
|
2747
|
+
y && te(fr() + Ir), _ && q(), H(), m.length > 0 && N.markLeave(m), p.length > 0 && (N.markEnter(p, h ? "top" : "bottom"), h ? P.onItemsMutated(p.length) : I.onItemsMutated(p.length)), N.playFlipMoveAnimation(c, new Set(p.map((e) => $(e))), h ? Fr : void 0), x ? (await g(), K(x, c)) : e.active.value && s.length > 0 && ne();
|
|
2724
2748
|
}, { immediate: !0 }), F([
|
|
2725
2749
|
() => e.pendingAppendItems.value.map((e) => $(e)),
|
|
2726
2750
|
h,
|
|
2727
2751
|
_,
|
|
2728
2752
|
r
|
|
2729
2753
|
], ([t]) => {
|
|
2730
|
-
|
|
2754
|
+
ue(), t.length && (d.value = ce([...e.items.value, ...e.pendingAppendItems.value]), le());
|
|
2731
2755
|
}, { immediate: !0 }), F(() => e.active.value, async (e, i) => {
|
|
2732
2756
|
let a = t.value;
|
|
2733
2757
|
if (!a) return;
|
|
@@ -2737,75 +2761,75 @@ function Fr(e) {
|
|
|
2737
2761
|
}
|
|
2738
2762
|
if (i !== !1 || f.value == null) return;
|
|
2739
2763
|
await g();
|
|
2740
|
-
let o = Math.max(0, C.value - r.value), s =
|
|
2741
|
-
a.scrollTop = s, n.value = s,
|
|
2764
|
+
let o = Math.max(0, C.value - r.value), s = Rr(f.value, 0, o);
|
|
2765
|
+
a.scrollTop = s, n.value = s, P.syncBoundary(), I.syncBoundary();
|
|
2742
2766
|
}), F(() => e.loading.value, async (t) => {
|
|
2743
|
-
!t && !e.pendingAppendItems.value.length && !
|
|
2767
|
+
!t && !e.pendingAppendItems.value.length && !z && !V && (d.value = null), P.onLoadingChange(t), I.onLoadingChange(t), await g();
|
|
2744
2768
|
}), x(async () => {
|
|
2745
|
-
|
|
2746
|
-
|
|
2747
|
-
}), t.value &&
|
|
2769
|
+
X(), await g(), v.value > 0 ? G(v.value, "center") : J(), P.syncBoundary(), I.syncBoundary(), typeof ResizeObserver < "u" ? (L = new ResizeObserver(() => {
|
|
2770
|
+
X();
|
|
2771
|
+
}), t.value && L.observe(t.value)) : window.addEventListener("resize", X);
|
|
2748
2772
|
}), b(() => {
|
|
2749
|
-
|
|
2773
|
+
L?.disconnect(), L = null, window.removeEventListener("resize", X), ue(), de(), R &&= (cancelAnimationFrame(R), 0);
|
|
2750
2774
|
});
|
|
2751
|
-
function
|
|
2752
|
-
let t =
|
|
2775
|
+
function H() {
|
|
2776
|
+
let t = er(e.items.value, {
|
|
2753
2777
|
columnCount: h.value,
|
|
2754
2778
|
columnWidth: _.value,
|
|
2755
|
-
gapX:
|
|
2756
|
-
gapY:
|
|
2757
|
-
bucketPx:
|
|
2779
|
+
gapX: Er,
|
|
2780
|
+
gapY: Er,
|
|
2781
|
+
bucketPx: wr
|
|
2758
2782
|
});
|
|
2759
2783
|
o.value = t.positions.map((e) => ({
|
|
2760
|
-
x: e.x +
|
|
2761
|
-
y: e.y +
|
|
2784
|
+
x: e.x + Tr,
|
|
2785
|
+
y: e.y + Tr
|
|
2762
2786
|
})), s.value = t.heights, c.value = t.buckets, l.value = t.contentHeight, u.value = t.indexById;
|
|
2763
2787
|
}
|
|
2764
|
-
function
|
|
2765
|
-
e.active.value && (n.value = t.value?.scrollTop ?? 0, r.value =
|
|
2766
|
-
|
|
2788
|
+
function ee() {
|
|
2789
|
+
e.active.value && (n.value = t.value?.scrollTop ?? 0, r.value = re(), P.syncBoundary(), I.syncBoundary(), Y(), !ne() && (R ||= requestAnimationFrame(() => {
|
|
2790
|
+
R = 0, J();
|
|
2767
2791
|
})));
|
|
2768
2792
|
}
|
|
2769
|
-
function
|
|
2770
|
-
e.active.value && (
|
|
2793
|
+
function U(t) {
|
|
2794
|
+
e.active.value && (P.onWheel(t), I.onWheel(t), Y());
|
|
2771
2795
|
}
|
|
2772
|
-
function
|
|
2796
|
+
function W(t) {
|
|
2773
2797
|
let n = e.items.value[t], r = n ? $(n) : "";
|
|
2774
2798
|
return {
|
|
2775
2799
|
height: `${s.value[t] ?? _.value}px`,
|
|
2776
2800
|
width: `${_.value}px`,
|
|
2777
|
-
transition: r ?
|
|
2778
|
-
transitionDelay: r ?
|
|
2779
|
-
transform:
|
|
2801
|
+
transition: r ? N.getCardTransition(r) : void 0,
|
|
2802
|
+
transitionDelay: r ? N.getCardTransitionDelay(r) : void 0,
|
|
2803
|
+
transform: N.getCardTransform(t)
|
|
2780
2804
|
};
|
|
2781
2805
|
}
|
|
2782
|
-
function
|
|
2806
|
+
function G(e, i) {
|
|
2783
2807
|
let a = t.value, c = o.value[e], l = s.value[e];
|
|
2784
2808
|
if (!a || !c || !l) return;
|
|
2785
2809
|
let u = a.scrollTop, d = Math.max(0, C.value - r.value);
|
|
2786
|
-
i === "center" ? u = c.y - (r.value - l) / 2 : c.y < a.scrollTop ? u = c.y -
|
|
2810
|
+
i === "center" ? u = c.y - (r.value - l) / 2 : c.y < a.scrollTop ? u = c.y - Tr : c.y + l > a.scrollTop + r.value && (u = c.y + l - r.value + Tr), a.scrollTop = Rr(u, 0, d), n.value = a.scrollTop, J();
|
|
2787
2811
|
}
|
|
2788
|
-
function
|
|
2812
|
+
function K(e, r) {
|
|
2789
2813
|
let i = t.value, a = r.get(e), s = u.value.get(e), c = s == null ? null : o.value[s];
|
|
2790
2814
|
if (!i || !a || !c) return;
|
|
2791
2815
|
let l = c.y - a.y;
|
|
2792
2816
|
i.scrollTop += l, n.value = i.scrollTop;
|
|
2793
2817
|
}
|
|
2794
|
-
function
|
|
2818
|
+
function q() {
|
|
2795
2819
|
let e = t.value;
|
|
2796
2820
|
if (!e) {
|
|
2797
2821
|
n.value = 0;
|
|
2798
2822
|
return;
|
|
2799
2823
|
}
|
|
2800
|
-
e.scrollTop = 0, n.value = 0,
|
|
2824
|
+
e.scrollTop = 0, n.value = 0, P.syncBoundary(), I.syncBoundary();
|
|
2801
2825
|
}
|
|
2802
|
-
function
|
|
2803
|
-
|
|
2804
|
-
|
|
2826
|
+
function te(e) {
|
|
2827
|
+
de(), p.value = !0, B = setTimeout(() => {
|
|
2828
|
+
B = null, p.value = !1;
|
|
2805
2829
|
}, Math.max(0, e));
|
|
2806
2830
|
}
|
|
2807
|
-
function
|
|
2808
|
-
if (!y.value.length ||
|
|
2831
|
+
function J() {
|
|
2832
|
+
if (!y.value.length || ne()) return;
|
|
2809
2833
|
let t = n.value + r.value / 2, i = v.value, a = Infinity;
|
|
2810
2834
|
for (let e of y.value) {
|
|
2811
2835
|
let n = o.value[e], r = s.value[e];
|
|
@@ -2815,38 +2839,42 @@ function Fr(e) {
|
|
|
2815
2839
|
}
|
|
2816
2840
|
e.setActiveIndex(i);
|
|
2817
2841
|
}
|
|
2818
|
-
function
|
|
2819
|
-
let t = n.value <=
|
|
2842
|
+
function ne() {
|
|
2843
|
+
let t = n.value <= Ar, r = ae() <= kr;
|
|
2820
2844
|
return t ? (e.setActiveIndex(0), !0) : r ? (e.setActiveIndex(Math.max(0, e.items.value.length - 1)), !0) : !1;
|
|
2821
2845
|
}
|
|
2822
|
-
function J() {
|
|
2823
|
-
M.maybeRequestPage(), N.maybeRequestPage();
|
|
2824
|
-
}
|
|
2825
2846
|
function Y() {
|
|
2826
|
-
|
|
2847
|
+
P.maybeRequestPage(), I.maybeRequestPage();
|
|
2827
2848
|
}
|
|
2828
2849
|
function X() {
|
|
2829
|
-
|
|
2830
|
-
}
|
|
2831
|
-
function ne() {
|
|
2832
|
-
return _r(t.value, a.value, Er);
|
|
2850
|
+
r.value = re(), a.value = ie();
|
|
2833
2851
|
}
|
|
2834
2852
|
function re() {
|
|
2835
|
-
return
|
|
2853
|
+
return _r(t.value, r.value);
|
|
2836
2854
|
}
|
|
2837
2855
|
function ie() {
|
|
2838
|
-
return
|
|
2856
|
+
return vr(t.value, a.value, Dr);
|
|
2857
|
+
}
|
|
2858
|
+
function ae() {
|
|
2859
|
+
return yr(t.value, n.value, r.value, C.value);
|
|
2839
2860
|
}
|
|
2840
|
-
function
|
|
2841
|
-
|
|
2861
|
+
function oe() {
|
|
2862
|
+
let e = Math.max(t.value?.scrollHeight ?? 0, C.value);
|
|
2863
|
+
return Math.max(0, e - r.value);
|
|
2864
|
+
}
|
|
2865
|
+
function se() {
|
|
2866
|
+
return br(j.value, M.value);
|
|
2867
|
+
}
|
|
2868
|
+
function ce(e) {
|
|
2869
|
+
return e.length ? er(e, {
|
|
2842
2870
|
columnCount: h.value,
|
|
2843
2871
|
columnWidth: _.value,
|
|
2844
|
-
gapX:
|
|
2845
|
-
gapY:
|
|
2846
|
-
bucketPx:
|
|
2847
|
-
}).contentHeight +
|
|
2872
|
+
gapX: Er,
|
|
2873
|
+
gapY: Er,
|
|
2874
|
+
bucketPx: wr
|
|
2875
|
+
}).contentHeight + Tr * 2 : 0;
|
|
2848
2876
|
}
|
|
2849
|
-
function
|
|
2877
|
+
function Z(e) {
|
|
2850
2878
|
let t = /* @__PURE__ */ new Map();
|
|
2851
2879
|
for (let n of e) {
|
|
2852
2880
|
let e = $(n), r = u.value.get(e);
|
|
@@ -2856,52 +2884,64 @@ function Fr(e) {
|
|
|
2856
2884
|
}
|
|
2857
2885
|
return t;
|
|
2858
2886
|
}
|
|
2859
|
-
function
|
|
2887
|
+
function le() {
|
|
2860
2888
|
let t = e.commitPendingAppend.value;
|
|
2861
|
-
typeof t == "function" && (
|
|
2862
|
-
|
|
2889
|
+
typeof t == "function" && (z = setTimeout(async () => {
|
|
2890
|
+
z = null, V = !0;
|
|
2863
2891
|
try {
|
|
2864
2892
|
if (!e.pendingAppendItems.value.length) return;
|
|
2865
2893
|
await t(), await g(), await g();
|
|
2866
2894
|
} finally {
|
|
2867
|
-
d.value = null,
|
|
2895
|
+
d.value = null, V = !1;
|
|
2868
2896
|
}
|
|
2869
|
-
},
|
|
2897
|
+
}, Mr));
|
|
2870
2898
|
}
|
|
2871
|
-
function
|
|
2872
|
-
|
|
2899
|
+
function ue() {
|
|
2900
|
+
z &&= (clearTimeout(z), null);
|
|
2873
2901
|
}
|
|
2874
|
-
function
|
|
2875
|
-
|
|
2902
|
+
function de() {
|
|
2903
|
+
B && (clearTimeout(B), B = null, p.value = !1);
|
|
2876
2904
|
}
|
|
2877
2905
|
return {
|
|
2878
2906
|
columnWidth: _,
|
|
2879
2907
|
containerHeight: C,
|
|
2880
|
-
getCardStyle:
|
|
2881
|
-
getLeavingCardStyle:
|
|
2882
|
-
getScrollbarThumbStyle:
|
|
2883
|
-
leavingItems:
|
|
2884
|
-
|
|
2885
|
-
|
|
2886
|
-
|
|
2908
|
+
getCardStyle: W,
|
|
2909
|
+
getLeavingCardStyle: N.getLeavingCardStyle,
|
|
2910
|
+
getScrollbarThumbStyle: se,
|
|
2911
|
+
leavingItems: N.leavingItems,
|
|
2912
|
+
nextBoundaryLoadProgress: E,
|
|
2913
|
+
onScroll: ee,
|
|
2914
|
+
onWheel: U,
|
|
2915
|
+
paginationLabel: D,
|
|
2916
|
+
previousBoundaryLoadProgress: O,
|
|
2887
2917
|
renderedItems: S,
|
|
2888
2918
|
resolvedActiveIndex: v,
|
|
2889
|
-
scrollToIndex:
|
|
2890
|
-
showScrollbar:
|
|
2919
|
+
scrollToIndex: G,
|
|
2920
|
+
showScrollbar: A,
|
|
2891
2921
|
scrollViewportRef: t
|
|
2892
2922
|
};
|
|
2893
2923
|
}
|
|
2894
|
-
function
|
|
2924
|
+
function Rr(e, t, n) {
|
|
2895
2925
|
return Math.min(Math.max(e, t), n);
|
|
2896
2926
|
}
|
|
2927
|
+
function zr(e) {
|
|
2928
|
+
if (!e.active || !e.triggerEnabled) return 0;
|
|
2929
|
+
let t = Math.max(0, e.maxScrollTop - e.thresholdPx);
|
|
2930
|
+
return t <= 0 ? 1 : Rr(1 - (e.progressDistancePx - e.thresholdPx) / t, 0, 1);
|
|
2931
|
+
}
|
|
2932
|
+
function Br(e) {
|
|
2933
|
+
if (!e.active || !e.triggerEnabled) return 0;
|
|
2934
|
+
let t = Math.max(0, e.maxScrollTop - e.thresholdPx);
|
|
2935
|
+
return t <= 0 ? 1 : Rr(e.progressDistancePx / t, 0, 1);
|
|
2936
|
+
}
|
|
2897
2937
|
//#endregion
|
|
2898
2938
|
//#region src/components/viewer-core/listCardAsset.ts
|
|
2899
|
-
function
|
|
2939
|
+
function Vr(e) {
|
|
2900
2940
|
if (e) try {
|
|
2901
2941
|
e.removeAttribute("src"), e.src = "";
|
|
2902
2942
|
} catch {}
|
|
2903
2943
|
}
|
|
2904
|
-
function
|
|
2944
|
+
function Hr(e) {
|
|
2905
2945
|
if (e) {
|
|
2906
2946
|
try {
|
|
2907
2947
|
e.currentTime = 0;
|
|
@@ -2912,12 +2952,12 @@ function Rr(e) {
|
|
|
2912
2952
|
} catch {}
|
|
2913
2953
|
}
|
|
2914
2954
|
}
|
|
2915
|
-
function
|
|
2955
|
+
function Ur(e, t) {
|
|
2916
2956
|
if (t) return e.bottom > t.top && e.top < t.bottom;
|
|
2917
2957
|
let n = window.innerHeight || document.documentElement.clientHeight || 0;
|
|
2918
2958
|
return e.bottom > 0 && e.top < n;
|
|
2919
2959
|
}
|
|
2920
|
-
function
|
|
2960
|
+
function Wr(e) {
|
|
2921
2961
|
if (!e) return null;
|
|
2922
2962
|
try {
|
|
2923
2963
|
return new URL(e, window.location.href).href;
|
|
@@ -2927,22 +2967,22 @@ function Br(e) {
|
|
|
2927
2967
|
}
|
|
2928
2968
|
//#endregion
|
|
2929
2969
|
//#region src/components/viewer-core/listPreview.ts
|
|
2930
|
-
var
|
|
2931
|
-
function
|
|
2932
|
-
let t = e.preview?.url ?? e.url, n =
|
|
2970
|
+
var Gr = /\.(avif|gif|jpe?g|png|svg|webp)(\?|#|$)/i, Kr = /\.(m4v|mov|mp4|mpeg|ogg|ogv|webm)(\?|#|$)/i;
|
|
2971
|
+
function qr(e) {
|
|
2972
|
+
let t = e.preview?.url ?? e.url, n = Xn(e), r = e.title?.trim() || wt(e.type);
|
|
2933
2973
|
return e.type !== "image" && e.type !== "video" ? {
|
|
2934
2974
|
kind: "fallback",
|
|
2935
2975
|
url: null,
|
|
2936
2976
|
width: n.width,
|
|
2937
2977
|
height: n.height,
|
|
2938
2978
|
label: r
|
|
2939
|
-
} :
|
|
2979
|
+
} : Yr(e, t) ? {
|
|
2940
2980
|
kind: "video",
|
|
2941
2981
|
url: t,
|
|
2942
2982
|
width: n.width,
|
|
2943
2983
|
height: n.height,
|
|
2944
2984
|
label: r
|
|
2945
|
-
} :
|
|
2985
|
+
} : Jr(e, t) ? {
|
|
2946
2986
|
kind: "image",
|
|
2947
2987
|
url: t,
|
|
2948
2988
|
width: n.width,
|
|
@@ -2956,28 +2996,28 @@ function Ur(e) {
|
|
|
2956
2996
|
label: r
|
|
2957
2997
|
};
|
|
2958
2998
|
}
|
|
2959
|
-
function
|
|
2960
|
-
return e.type !== "image" || typeof t != "string" ? !1 :
|
|
2999
|
+
function Jr(e, t) {
|
|
3000
|
+
return e.type !== "image" || typeof t != "string" ? !1 : Gr.test(t) || Xr(t);
|
|
2961
3001
|
}
|
|
2962
|
-
function
|
|
2963
|
-
return e.type === "video" && typeof t == "string" &&
|
|
3002
|
+
function Yr(e, t) {
|
|
3003
|
+
return e.type === "video" && typeof t == "string" && Kr.test(t);
|
|
2964
3004
|
}
|
|
2965
|
-
function
|
|
3005
|
+
function Xr(e) {
|
|
2966
3006
|
return /^(https?:\/\/|\/\/|\/(?!\/)|\.{1,2}\/|blob:|data:)/i.test(e);
|
|
2967
3007
|
}
|
|
2968
3008
|
//#endregion
|
|
2969
3009
|
//#region src/components/viewer-core/useAssetLoadQueue.ts
|
|
2970
|
-
var
|
|
3010
|
+
var Zr = {
|
|
2971
3011
|
maxGlobal: 10,
|
|
2972
3012
|
maxPerDomain: 4,
|
|
2973
3013
|
maxVideoPerDomain: 2
|
|
2974
3014
|
};
|
|
2975
|
-
function
|
|
3015
|
+
function Qr(e = Zr) {
|
|
2976
3016
|
let t = /* @__PURE__ */ new Map(), n = /* @__PURE__ */ new Map(), r = 0;
|
|
2977
3017
|
function i(e) {
|
|
2978
3018
|
let i = {
|
|
2979
3019
|
...e,
|
|
2980
|
-
domain:
|
|
3020
|
+
domain: ti(e.url),
|
|
2981
3021
|
enqueuedAt: r,
|
|
2982
3022
|
id: `vibe-asset-load-${r += 1}`
|
|
2983
3023
|
};
|
|
@@ -2996,7 +3036,7 @@ function Jr(e = qr) {
|
|
|
2996
3036
|
function a() {
|
|
2997
3037
|
if (n.size === 0) return;
|
|
2998
3038
|
let r = [...n.values()].sort((e, t) => {
|
|
2999
|
-
let n =
|
|
3039
|
+
let n = ei(e) - ei(t);
|
|
3000
3040
|
return n === 0 ? e.enqueuedAt - t.enqueuedAt : n;
|
|
3001
3041
|
});
|
|
3002
3042
|
for (let i of r) {
|
|
@@ -3017,8 +3057,8 @@ function Jr(e = qr) {
|
|
|
3017
3057
|
}
|
|
3018
3058
|
return { request: i };
|
|
3019
3059
|
}
|
|
3020
|
-
var
|
|
3021
|
-
function
|
|
3060
|
+
var $r = Qr();
|
|
3061
|
+
function ei(e) {
|
|
3022
3062
|
try {
|
|
3023
3063
|
let t = e.getPriority();
|
|
3024
3064
|
return Number.isFinite(t) ? t : Infinity;
|
|
@@ -3026,7 +3066,7 @@ function Xr(e) {
|
|
|
3026
3066
|
return Infinity;
|
|
3027
3067
|
}
|
|
3028
3068
|
}
|
|
3029
|
-
function
|
|
3069
|
+
function ti(e) {
|
|
3030
3070
|
try {
|
|
3031
3071
|
return new URL(e).hostname || "local";
|
|
3032
3072
|
} catch {
|
|
@@ -3035,14 +3075,14 @@ function Zr(e) {
|
|
|
3035
3075
|
}
|
|
3036
3076
|
//#endregion
|
|
3037
3077
|
//#region src/components/ListCard.vue?vue&type=script&setup=true&lang.ts
|
|
3038
|
-
var
|
|
3078
|
+
var ni = ["aria-label"], ri = {
|
|
3039
3079
|
key: 0,
|
|
3040
3080
|
"data-testid": "vibe-list-card-spinner",
|
|
3041
3081
|
class: "pointer-events-none absolute inset-0 z-[4] grid place-items-center bg-black/18"
|
|
3042
|
-
},
|
|
3082
|
+
}, ii = { 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]" }, ai = ["src", "alt"], oi = ["src"], si = ["data-kind"], ci = { class: "grid justify-items-center gap-3 px-4 text-center" }, li = { class: "text-[0.68rem] font-bold uppercase tracking-[0.22em] text-[#f7f1ea]/72" }, ui = {
|
|
3043
3083
|
key: 4,
|
|
3044
3084
|
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))]"
|
|
3045
|
-
},
|
|
3085
|
+
}, di = { class: "inline-flex h-14 w-14 items-center justify-center border border-white/16 bg-black/20" }, fi = { class: "pointer-events-none absolute inset-0 z-[3]" }, pi = /* @__PURE__ */ d({
|
|
3046
3086
|
__name: "ListCard",
|
|
3047
3087
|
props: {
|
|
3048
3088
|
active: {
|
|
@@ -3066,48 +3106,48 @@ var Qr = ["aria-label"], $r = {
|
|
|
3066
3106
|
},
|
|
3067
3107
|
emits: ["open"],
|
|
3068
3108
|
setup(e, { emit: t }) {
|
|
3069
|
-
let n = e, r = t, l = i(() =>
|
|
3109
|
+
let n = e, r = t, l = i(() => qr(n.item)), d = T(!1), f = T(!1), p = T(!1), m = T(l.value.kind === "fallback"), h = T(!1), g = T(null), v = T(null), y = T(null), C = T(null), w = T(null), E = T(l.value.kind === "fallback"), A = i(() => E.value ? n.surfaceActive ? d.value ? l.value.url : null : l.value.url : null), M = i(() => n.surfaceActive && d.value && (l.value.kind === "image" || l.value.kind === "video") && !!l.value.url), N = i(() => l.value.kind === "image" && !!A.value), P = i(() => l.value.kind === "video" && !!A.value), I = i(() => !!g.value), L = i(() => Ut(g.value)), R = i(() => M.value && !g.value && (!E.value || !m.value)), B = null, V = null, H = /* @__PURE__ */ new Set();
|
|
3070
3110
|
F([A, () => l.value.kind], () => {
|
|
3071
3111
|
let e = l.value.kind === "fallback";
|
|
3072
3112
|
m.value = e, h.value = !1, g.value = null, e && (E.value = !0);
|
|
3073
3113
|
}), F(M, () => {
|
|
3074
|
-
|
|
3114
|
+
K();
|
|
3075
3115
|
}), F([
|
|
3076
3116
|
d,
|
|
3077
3117
|
m,
|
|
3078
3118
|
A
|
|
3079
3119
|
], () => {
|
|
3080
|
-
|
|
3120
|
+
q();
|
|
3081
3121
|
}), F(() => n.surfaceActive, (e) => {
|
|
3082
3122
|
if (!e) {
|
|
3083
|
-
J(),
|
|
3123
|
+
J(), q();
|
|
3084
3124
|
return;
|
|
3085
3125
|
}
|
|
3086
3126
|
requestAnimationFrame(() => {
|
|
3087
|
-
|
|
3127
|
+
ne(), K(), q();
|
|
3088
3128
|
});
|
|
3089
3129
|
}), x(() => {
|
|
3090
3130
|
if (!y.value || typeof IntersectionObserver > "u") {
|
|
3091
|
-
C.value = null, d.value = !0,
|
|
3131
|
+
C.value = null, d.value = !0, K();
|
|
3092
3132
|
return;
|
|
3093
3133
|
}
|
|
3094
|
-
C.value = y.value.closest("[data-testid=\"vibe-list-scroll\"]"),
|
|
3095
|
-
for (let t of e) t.target === y.value && (n.surfaceActive &&
|
|
3134
|
+
C.value = y.value.closest("[data-testid=\"vibe-list-scroll\"]"), B = new IntersectionObserver((e) => {
|
|
3135
|
+
for (let t of e) t.target === y.value && (n.surfaceActive && ne(t), K(), q());
|
|
3096
3136
|
}, {
|
|
3097
3137
|
root: C.value,
|
|
3098
3138
|
threshold: [0, 1]
|
|
3099
|
-
}),
|
|
3139
|
+
}), B.observe(y.value);
|
|
3100
3140
|
}), b(() => {
|
|
3101
|
-
|
|
3141
|
+
te(), B?.disconnect(), B = null;
|
|
3102
3142
|
});
|
|
3103
|
-
function
|
|
3104
|
-
ce(v.value) && (m.value = !0, g.value = null,
|
|
3143
|
+
function ee() {
|
|
3144
|
+
ce(v.value) && (m.value = !0, g.value = null, Y(A.value ?? n.item.url), J());
|
|
3105
3145
|
}
|
|
3106
|
-
async function
|
|
3146
|
+
async function U() {
|
|
3107
3147
|
if (!ce(v.value)) return;
|
|
3108
3148
|
let e = A.value ?? n.item.url;
|
|
3109
3149
|
m.value = !1, g.value = "generic";
|
|
3110
|
-
let t = await
|
|
3150
|
+
let t = await Wt(e);
|
|
3111
3151
|
g.value = t, n.reportAssetError?.({
|
|
3112
3152
|
item: n.item,
|
|
3113
3153
|
occurrenceKey: $(n.item),
|
|
@@ -3116,15 +3156,15 @@ var Qr = ["aria-label"], $r = {
|
|
|
3116
3156
|
surface: "grid"
|
|
3117
3157
|
}), J();
|
|
3118
3158
|
}
|
|
3119
|
-
function U() {
|
|
3120
|
-
ce(w.value) && (h.value = !0, m.value = !0, g.value = null, X(A.value ?? n.item.url), J(), K());
|
|
3121
|
-
}
|
|
3122
3159
|
function W() {
|
|
3123
|
-
ce(w.value) && (h.value
|
|
3160
|
+
ce(w.value) && (h.value = !0, m.value = !0, g.value = null, Y(A.value ?? n.item.url), J(), q());
|
|
3124
3161
|
}
|
|
3125
3162
|
function G() {
|
|
3163
|
+
ce(w.value) && (h.value || (m.value = !1));
|
|
3164
|
+
}
|
|
3165
|
+
function K() {
|
|
3126
3166
|
if (l.value.kind === "fallback") {
|
|
3127
|
-
|
|
3167
|
+
te(!1);
|
|
3128
3168
|
return;
|
|
3129
3169
|
}
|
|
3130
3170
|
if (!n.surfaceActive) {
|
|
@@ -3132,14 +3172,14 @@ var Qr = ["aria-label"], $r = {
|
|
|
3132
3172
|
return;
|
|
3133
3173
|
}
|
|
3134
3174
|
if (!M.value) {
|
|
3135
|
-
|
|
3175
|
+
te();
|
|
3136
3176
|
return;
|
|
3137
3177
|
}
|
|
3138
|
-
if (E.value ||
|
|
3139
|
-
|
|
3178
|
+
if (E.value || V) {
|
|
3179
|
+
V?.refresh();
|
|
3140
3180
|
return;
|
|
3141
3181
|
}
|
|
3142
|
-
|
|
3182
|
+
V = $r.request({
|
|
3143
3183
|
assetType: l.value.kind,
|
|
3144
3184
|
getPriority: se,
|
|
3145
3185
|
onGrant() {
|
|
@@ -3148,7 +3188,7 @@ var Qr = ["aria-label"], $r = {
|
|
|
3148
3188
|
url: l.value.url ?? n.item.url
|
|
3149
3189
|
});
|
|
3150
3190
|
}
|
|
3151
|
-
function
|
|
3191
|
+
function q() {
|
|
3152
3192
|
let e = w.value;
|
|
3153
3193
|
if (!(!e || l.value.kind !== "video")) {
|
|
3154
3194
|
if (g.value) {
|
|
@@ -3156,7 +3196,7 @@ var Qr = ["aria-label"], $r = {
|
|
|
3156
3196
|
return;
|
|
3157
3197
|
}
|
|
3158
3198
|
if (A.value && d.value && m.value) {
|
|
3159
|
-
e.muted = !0, e.loop = !0, e.playsInline = !0,
|
|
3199
|
+
e.muted = !0, e.loop = !0, e.playsInline = !0, qt(e);
|
|
3160
3200
|
return;
|
|
3161
3201
|
}
|
|
3162
3202
|
try {
|
|
@@ -3165,42 +3205,42 @@ var Qr = ["aria-label"], $r = {
|
|
|
3165
3205
|
e.pause();
|
|
3166
3206
|
}
|
|
3167
3207
|
}
|
|
3168
|
-
function
|
|
3208
|
+
function te(e = !0) {
|
|
3169
3209
|
E.value = l.value.kind === "fallback", g.value = null, m.value = l.value.kind === "fallback", e && (ie(), ae()), J();
|
|
3170
3210
|
}
|
|
3171
3211
|
function J() {
|
|
3172
|
-
|
|
3212
|
+
V?.release(), V = null;
|
|
3173
3213
|
}
|
|
3174
|
-
function
|
|
3214
|
+
function ne(e) {
|
|
3175
3215
|
let t = y.value;
|
|
3176
3216
|
if (!t) {
|
|
3177
3217
|
d.value = !0;
|
|
3178
3218
|
return;
|
|
3179
3219
|
}
|
|
3180
|
-
d.value =
|
|
3220
|
+
d.value = Ur(e?.boundingClientRect ?? t.getBoundingClientRect(), e?.rootBounds ?? C.value?.getBoundingClientRect() ?? null);
|
|
3181
3221
|
}
|
|
3182
|
-
function
|
|
3222
|
+
function Y(e) {
|
|
3183
3223
|
if (!e) return;
|
|
3184
3224
|
let t = $(n.item), r = `${t}|${e}`;
|
|
3185
|
-
|
|
3225
|
+
H.has(r) || (H.add(r), n.reportAssetLoad?.({
|
|
3186
3226
|
item: n.item,
|
|
3187
3227
|
occurrenceKey: t,
|
|
3188
3228
|
surface: "grid",
|
|
3189
3229
|
url: e
|
|
3190
3230
|
}));
|
|
3191
3231
|
}
|
|
3192
|
-
function
|
|
3232
|
+
function X() {
|
|
3193
3233
|
if (!L.value) return;
|
|
3194
3234
|
let e = $(n.item);
|
|
3195
|
-
|
|
3196
|
-
t.startsWith(`${e}|`) &&
|
|
3197
|
-
}), g.value = null, m.value = !1, E.value = !1, J(),
|
|
3235
|
+
H.forEach((t) => {
|
|
3236
|
+
t.startsWith(`${e}|`) && H.delete(t);
|
|
3237
|
+
}), g.value = null, m.value = !1, E.value = !1, J(), K();
|
|
3198
3238
|
}
|
|
3199
3239
|
function ie() {
|
|
3200
|
-
|
|
3240
|
+
Vr(v.value);
|
|
3201
3241
|
}
|
|
3202
3242
|
function ae() {
|
|
3203
|
-
|
|
3243
|
+
Hr(w.value);
|
|
3204
3244
|
}
|
|
3205
3245
|
function se() {
|
|
3206
3246
|
let e = y.value;
|
|
@@ -3214,8 +3254,8 @@ var Qr = ["aria-label"], $r = {
|
|
|
3214
3254
|
return Math.abs((t.top + t.bottom) / 2 - n);
|
|
3215
3255
|
}
|
|
3216
3256
|
function ce(e) {
|
|
3217
|
-
let t =
|
|
3218
|
-
return !e || !t ? !1 :
|
|
3257
|
+
let t = Wr(A.value);
|
|
3258
|
+
return !e || !t ? !1 : Wr("currentSrc" in e && e.currentSrc || e.getAttribute("src")) === t;
|
|
3219
3259
|
}
|
|
3220
3260
|
function Z() {
|
|
3221
3261
|
r("open");
|
|
@@ -3243,8 +3283,8 @@ var Qr = ["aria-label"], $r = {
|
|
|
3243
3283
|
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]",
|
|
3244
3284
|
"aria-label": n.item.title || `Open item ${n.index + 1}`,
|
|
3245
3285
|
onClick: Z
|
|
3246
|
-
}, null, 8,
|
|
3247
|
-
R.value ? (S(), s("div",
|
|
3286
|
+
}, null, 8, ni),
|
|
3287
|
+
R.value ? (S(), s("div", ri, [c("span", ii, [u(j(re), {
|
|
3248
3288
|
class: "h-5 w-5 animate-spin stroke-[1.9] text-[#f7f1ea]/78",
|
|
3249
3289
|
"aria-hidden": "true"
|
|
3250
3290
|
})])])) : o("", !0),
|
|
@@ -3256,9 +3296,9 @@ var Qr = ["aria-label"], $r = {
|
|
|
3256
3296
|
alt: l.value.label,
|
|
3257
3297
|
draggable: "false",
|
|
3258
3298
|
class: _(["block h-full w-full object-cover transition-opacity duration-300", m.value ? "pointer-events-none opacity-100" : "pointer-events-none opacity-0"]),
|
|
3259
|
-
onLoad:
|
|
3260
|
-
onError:
|
|
3261
|
-
}, null, 42,
|
|
3299
|
+
onLoad: ee,
|
|
3300
|
+
onError: U
|
|
3301
|
+
}, null, 42, ai)) : P.value && A.value && !I.value ? (S(), s("video", {
|
|
3262
3302
|
key: 2,
|
|
3263
3303
|
ref_key: "videoRef",
|
|
3264
3304
|
ref: w,
|
|
@@ -3268,37 +3308,37 @@ var Qr = ["aria-label"], $r = {
|
|
|
3268
3308
|
playsinline: "",
|
|
3269
3309
|
preload: "metadata",
|
|
3270
3310
|
class: _(["block h-full w-full object-cover transition-opacity duration-300", m.value ? "pointer-events-none opacity-100" : "pointer-events-none opacity-0"]),
|
|
3271
|
-
onCanplay:
|
|
3272
|
-
onError:
|
|
3273
|
-
onLoadstart:
|
|
3274
|
-
onPlaying:
|
|
3275
|
-
onStalled:
|
|
3276
|
-
onWaiting:
|
|
3277
|
-
}, null, 42,
|
|
3311
|
+
onCanplay: W,
|
|
3312
|
+
onError: U,
|
|
3313
|
+
onLoadstart: G,
|
|
3314
|
+
onPlaying: W,
|
|
3315
|
+
onStalled: G,
|
|
3316
|
+
onWaiting: G
|
|
3317
|
+
}, null, 42, oi)) : I.value ? (S(), s("div", {
|
|
3278
3318
|
key: 3,
|
|
3279
3319
|
"data-testid": "vibe-list-card-error",
|
|
3280
3320
|
"data-kind": g.value,
|
|
3281
3321
|
class: "relative z-[2] grid h-full w-full place-items-center bg-[radial-gradient(circle_at_center,rgba(239,68,68,0.12),transparent_65%),linear-gradient(180deg,rgba(255,255,255,0.04),rgba(255,255,255,0.02))]"
|
|
3282
|
-
}, [c("div",
|
|
3322
|
+
}, [c("div", ci, [
|
|
3283
3323
|
u(j(oe), {
|
|
3284
3324
|
class: "h-6 w-6 stroke-[1.8] text-[#f7f1ea]/78",
|
|
3285
3325
|
"aria-hidden": "true"
|
|
3286
3326
|
}),
|
|
3287
|
-
c("span",
|
|
3327
|
+
c("span", li, k(j(Ht)(g.value)), 1),
|
|
3288
3328
|
L.value ? (S(), s("button", {
|
|
3289
3329
|
key: 0,
|
|
3290
3330
|
type: "button",
|
|
3291
3331
|
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",
|
|
3292
|
-
onClick: z(
|
|
3332
|
+
onClick: z(X, ["stop"])
|
|
3293
3333
|
}, " Retry ")) : o("", !0)
|
|
3294
|
-
])], 8,
|
|
3295
|
-
icon: j(
|
|
3334
|
+
])], 8, si)) : (S(), s("div", ui, [c("div", di, [D(e.$slots, "item-icon", {
|
|
3335
|
+
icon: j(Ct)(n.item.type),
|
|
3296
3336
|
item: n.item
|
|
3297
|
-
}, () => [(S(), a(O(j(
|
|
3337
|
+
}, () => [(S(), a(O(j(Ct)(n.item.type)), {
|
|
3298
3338
|
class: "h-6 w-6 stroke-[1.8] text-[#f7f1ea]/78",
|
|
3299
3339
|
"aria-hidden": "true"
|
|
3300
3340
|
}))])])])),
|
|
3301
|
-
c("div",
|
|
3341
|
+
c("div", fi, [D(e.$slots, "grid-item-overlay", {
|
|
3302
3342
|
active: n.active,
|
|
3303
3343
|
focused: f.value,
|
|
3304
3344
|
hovered: p.value,
|
|
@@ -3308,24 +3348,24 @@ var Qr = ["aria-label"], $r = {
|
|
|
3308
3348
|
})])
|
|
3309
3349
|
], 34));
|
|
3310
3350
|
}
|
|
3311
|
-
}),
|
|
3351
|
+
}), mi = { 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)]" }, hi = { class: "pointer-events-none absolute inset-x-0 top-0 z-[2] flex justify-end p-6" }, gi = {
|
|
3312
3352
|
"data-testid": "vibe-pagination",
|
|
3313
3353
|
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]"
|
|
3314
|
-
},
|
|
3354
|
+
}, _i = { class: "whitespace-nowrap" }, vi = {
|
|
3315
3355
|
key: 0,
|
|
3316
3356
|
class: "whitespace-nowrap border-l border-white/12 pl-2 text-[#f7f1ea]/56 min-[721px]:pl-3"
|
|
3317
|
-
},
|
|
3357
|
+
}, yi = [
|
|
3318
3358
|
"data-active",
|
|
3319
3359
|
"data-index",
|
|
3320
3360
|
"data-item-id",
|
|
3321
3361
|
"data-occurrence-key"
|
|
3322
|
-
],
|
|
3362
|
+
], bi = ["data-item-id"], xi = {
|
|
3323
3363
|
key: 0,
|
|
3324
3364
|
class: "pointer-events-none absolute inset-y-0 right-0 z-[3] hidden w-8 min-[1024px]:block"
|
|
3325
|
-
},
|
|
3365
|
+
}, Si = {
|
|
3326
3366
|
key: 1,
|
|
3327
3367
|
class: "pointer-events-none absolute inset-x-0 bottom-0 z-[2] px-5 pb-5 sm:px-6"
|
|
3328
|
-
},
|
|
3368
|
+
}, Ci = { class: "mx-auto flex w-full max-w-[1600px] justify-center" }, wi = /* @__PURE__ */ d({
|
|
3329
3369
|
__name: "ListSurface",
|
|
3330
3370
|
props: {
|
|
3331
3371
|
active: {
|
|
@@ -3380,9 +3420,13 @@ var Qr = ["aria-label"], $r = {
|
|
|
3380
3420
|
default: !0
|
|
3381
3421
|
}
|
|
3382
3422
|
},
|
|
3383
|
-
emits: [
|
|
3423
|
+
emits: [
|
|
3424
|
+
"boundary-load-progress",
|
|
3425
|
+
"open-fullscreen",
|
|
3426
|
+
"update:activeIndex"
|
|
3427
|
+
],
|
|
3384
3428
|
setup(e, { emit: n }) {
|
|
3385
|
-
let r = e, d = N(), f = n, p =
|
|
3429
|
+
let r = e, d = N(), f = n, p = Lr({
|
|
3386
3430
|
active: A(r, "active"),
|
|
3387
3431
|
allowExhaustedNextPageRefresh: A(r, "allowExhaustedNextPageRefresh"),
|
|
3388
3432
|
items: A(r, "items"),
|
|
@@ -3398,11 +3442,11 @@ var Qr = ["aria-label"], $r = {
|
|
|
3398
3442
|
setActiveIndex(e) {
|
|
3399
3443
|
f("update:activeIndex", e);
|
|
3400
3444
|
}
|
|
3401
|
-
}), m = i(() =>
|
|
3445
|
+
}), m = i(() => Nt({
|
|
3402
3446
|
itemCount: r.items.length,
|
|
3403
3447
|
loading: r.loading,
|
|
3404
3448
|
phase: r.phase
|
|
3405
|
-
})), g = i(() =>
|
|
3449
|
+
})), g = i(() => Pt({
|
|
3406
3450
|
errorMessage: r.errorMessage,
|
|
3407
3451
|
hasItems: r.items.length > 0,
|
|
3408
3452
|
hasNextPage: r.hasNextPage,
|
|
@@ -3415,15 +3459,20 @@ var Qr = ["aria-label"], $r = {
|
|
|
3415
3459
|
message: g.value.message,
|
|
3416
3460
|
paginationDetail: r.paginationDetail,
|
|
3417
3461
|
total: r.items.length
|
|
3418
|
-
}), x = i(() => !b.value || !d["grid-status"] ? [] : d["grid-status"](b.value)), C = i(() =>
|
|
3462
|
+
}), x = i(() => !b.value || !d["grid-status"] ? [] : d["grid-status"](b.value)), C = i(() => Ot(x.value)), w = i(() => r.items.length + p.leavingItems.value.length), { emptyStateProps: T, showBadgeEmptyState: O, showCustomEmptyState: M, showInlineEmptyState: P } = jt({
|
|
3419
3463
|
emptyStateMode: A(r, "emptyStateMode"),
|
|
3420
3464
|
itemCount: w,
|
|
3421
3465
|
loading: A(r, "loading"),
|
|
3422
3466
|
renderSlot: d["empty-state"],
|
|
3423
3467
|
surface: "grid"
|
|
3424
3468
|
});
|
|
3425
|
-
return (
|
|
3426
|
-
|
|
3469
|
+
return F([p.nextBoundaryLoadProgress, p.previousBoundaryLoadProgress], ([e, t]) => {
|
|
3470
|
+
f("boundary-load-progress", {
|
|
3471
|
+
nextBoundaryLoadProgress: e,
|
|
3472
|
+
previousBoundaryLoadProgress: t
|
|
3473
|
+
});
|
|
3474
|
+
}, { immediate: !0 }), (e, n) => (S(), s("div", mi, [
|
|
3475
|
+
c("div", hi, [c("span", gi, [c("span", _i, k(j(p).paginationLabel.value), 1), r.paginationDetail ? (S(), s("span", vi, k(r.paginationDetail), 1)) : o("", !0)])]),
|
|
3427
3476
|
c("div", {
|
|
3428
3477
|
ref: j(p).scrollViewportRef,
|
|
3429
3478
|
"data-testid": "vibe-list-scroll",
|
|
@@ -3444,7 +3493,7 @@ var Qr = ["aria-label"], $r = {
|
|
|
3444
3493
|
"data-occurrence-key": j($)(t),
|
|
3445
3494
|
class: "absolute will-change-transform",
|
|
3446
3495
|
style: y(j(p).getCardStyle(n))
|
|
3447
|
-
}, [u(
|
|
3496
|
+
}, [u(pi, {
|
|
3448
3497
|
active: n === j(p).resolvedActiveIndex.value,
|
|
3449
3498
|
index: n,
|
|
3450
3499
|
item: t,
|
|
@@ -3468,14 +3517,14 @@ var Qr = ["aria-label"], $r = {
|
|
|
3468
3517
|
"report-asset-load",
|
|
3469
3518
|
"surface-active",
|
|
3470
3519
|
"onOpen"
|
|
3471
|
-
])], 12,
|
|
3520
|
+
])], 12, yi))), 128)),
|
|
3472
3521
|
(S(!0), s(t, null, E(j(p).leavingItems.value, (t) => (S(), s("article", {
|
|
3473
3522
|
key: `leaving-${j($)(t.item)}`,
|
|
3474
3523
|
"data-testid": "vibe-list-card-leaving",
|
|
3475
3524
|
"data-item-id": t.item.id,
|
|
3476
3525
|
class: "pointer-events-none absolute z-[2] will-change-[opacity,transform]",
|
|
3477
3526
|
style: y(j(p).getLeavingCardStyle(t.item))
|
|
3478
|
-
}, [u(
|
|
3527
|
+
}, [u(pi, {
|
|
3479
3528
|
active: !1,
|
|
3480
3529
|
index: -1,
|
|
3481
3530
|
item: t.item,
|
|
@@ -3490,8 +3539,8 @@ var Qr = ["aria-label"], $r = {
|
|
|
3490
3539
|
"item",
|
|
3491
3540
|
"report-asset-error",
|
|
3492
3541
|
"report-asset-load"
|
|
3493
|
-
])], 12,
|
|
3494
|
-
j(P) && j(T) ? (S(), a(
|
|
3542
|
+
])], 12, bi))), 128)),
|
|
3543
|
+
j(P) && j(T) ? (S(), a(dn, {
|
|
3495
3544
|
key: 0,
|
|
3496
3545
|
message: j(T).message,
|
|
3497
3546
|
mode: j(T).mode,
|
|
@@ -3505,12 +3554,12 @@ var Qr = ["aria-label"], $r = {
|
|
|
3505
3554
|
"surface"
|
|
3506
3555
|
])) : o("", !0)
|
|
3507
3556
|
], 4)], 544),
|
|
3508
|
-
j(p).showScrollbar.value ? (S(), s("div",
|
|
3557
|
+
j(p).showScrollbar.value ? (S(), s("div", xi, [n[2] ||= c("div", { class: "absolute bottom-6 right-3 top-6 w-px bg-white/8" }, null, -1), c("div", {
|
|
3509
3558
|
"data-testid": "vibe-list-scrollbar-thumb",
|
|
3510
3559
|
class: _(["absolute right-[0.625rem] w-1 bg-white/34 transition-[height,transform,background-color,opacity] duration-300 ease-out", r.loading ? "bg-white/52" : "bg-white/34"]),
|
|
3511
3560
|
style: y(j(p).getScrollbarThumbStyle())
|
|
3512
3561
|
}, null, 6)])) : o("", !0),
|
|
3513
|
-
d["grid-footer"] ? (S(), s("div",
|
|
3562
|
+
d["grid-footer"] ? (S(), s("div", Si, [c("div", Ci, [D(e.$slots, "grid-footer")])])) : o("", !0),
|
|
3514
3563
|
b.value ? (S(), s("div", {
|
|
3515
3564
|
key: 2,
|
|
3516
3565
|
class: _(["pointer-events-none absolute inset-x-0 bottom-0 z-[3] flex justify-center px-6", d["grid-footer"] ? "pb-24" : "pb-6"])
|
|
@@ -3519,7 +3568,7 @@ var Qr = ["aria-label"], $r = {
|
|
|
3519
3568
|
"data-testid": "vibe-grid-status-badge",
|
|
3520
3569
|
class: _(["inline-flex items-center border border-white/14 bg-black/55 px-4 py-3 text-[0.7rem] font-bold uppercase tracking-[0.18em] text-[#f7f1ea]/72 backdrop-blur-[18px]", b.value.kind === "end" ? "border-amber-300/35 text-amber-200" : b.value.kind === "failed" ? "border-rose-400/45 text-rose-100" : ""])
|
|
3521
3570
|
}, k(b.value.message), 3))], 2)) : o("", !0),
|
|
3522
|
-
j(O) && j(T) ? (S(), a(
|
|
3571
|
+
j(O) && j(T) ? (S(), a(dn, {
|
|
3523
3572
|
key: 3,
|
|
3524
3573
|
class: _(["z-[3]", d["grid-footer"] ? "pb-24" : "pb-6"]),
|
|
3525
3574
|
message: j(T).message,
|
|
@@ -3536,13 +3585,13 @@ var Qr = ["aria-label"], $r = {
|
|
|
3536
3585
|
])) : o("", !0)
|
|
3537
3586
|
]));
|
|
3538
3587
|
}
|
|
3539
|
-
}),
|
|
3588
|
+
}), Ti = ["data-surface-mode"], Ei = {
|
|
3540
3589
|
key: 1,
|
|
3541
3590
|
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"
|
|
3542
|
-
},
|
|
3591
|
+
}, Di = ["data-visible", "inert"], Oi = ["data-visible", "inert"], ki = {
|
|
3543
3592
|
key: 3,
|
|
3544
3593
|
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"
|
|
3545
|
-
},
|
|
3594
|
+
}, Ai = /* @__PURE__ */ d({
|
|
3546
3595
|
name: "VibeLayout",
|
|
3547
3596
|
__name: "Layout",
|
|
3548
3597
|
props: {
|
|
@@ -3597,7 +3646,7 @@ var Qr = ["aria-label"], $r = {
|
|
|
3597
3646
|
type: "button",
|
|
3598
3647
|
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",
|
|
3599
3648
|
onClick: n[0] ||= (...e) => j(h).retryInitialLoad && j(h).retryInitialLoad(...e)
|
|
3600
|
-
}, " Retry ")) : j(h).errorMessage.value && j(h).items.value.length > 0 ? (S(), s("div",
|
|
3649
|
+
}, " Retry ")) : j(h).errorMessage.value && j(h).items.value.length > 0 ? (S(), s("div", Ei, k(j(h).errorMessage.value), 1)) : o("", !0), j(h).isDesktop.value ? (S(), s(t, { key: 2 }, [u(r, {
|
|
3601
3650
|
appear: "",
|
|
3602
3651
|
"enter-active-class": "transition-[opacity,transform] duration-300 ease-out",
|
|
3603
3652
|
"enter-from-class": "translate-y-3 opacity-0",
|
|
@@ -3611,7 +3660,7 @@ var Qr = ["aria-label"], $r = {
|
|
|
3611
3660
|
"data-visible": j(h).surfaceMode.value === "list" ? "true" : "false",
|
|
3612
3661
|
inert: j(h).surfaceMode.value !== "list",
|
|
3613
3662
|
class: "absolute inset-0 z-[2]"
|
|
3614
|
-
}, [u(
|
|
3663
|
+
}, [u(wi, {
|
|
3615
3664
|
active: j(h).surfaceMode.value === "list",
|
|
3616
3665
|
"allow-exhausted-next-page-refresh": j(h).canRefreshExhaustedNextPage.value,
|
|
3617
3666
|
items: j(h).items.value,
|
|
@@ -3630,6 +3679,7 @@ var Qr = ["aria-label"], $r = {
|
|
|
3630
3679
|
"request-previous-page": j(h).prefetchPreviousPage,
|
|
3631
3680
|
"empty-state-mode": d.emptyStateMode,
|
|
3632
3681
|
"show-status-badges": d.showStatusBadges ?? !0,
|
|
3682
|
+
onBoundaryLoadProgress: j(h).setBoundaryLoadProgress,
|
|
3633
3683
|
onOpenFullscreen: j(h).openFullscreen,
|
|
3634
3684
|
"onUpdate:activeIndex": j(h).setActiveIndex
|
|
3635
3685
|
}, l({ _: 2 }, [
|
|
@@ -3677,9 +3727,10 @@ var Qr = ["aria-label"], $r = {
|
|
|
3677
3727
|
"request-previous-page",
|
|
3678
3728
|
"empty-state-mode",
|
|
3679
3729
|
"show-status-badges",
|
|
3730
|
+
"onBoundaryLoadProgress",
|
|
3680
3731
|
"onOpenFullscreen",
|
|
3681
3732
|
"onUpdate:activeIndex"
|
|
3682
|
-
])], 8,
|
|
3733
|
+
])], 8, Di), [[P, j(h).surfaceMode.value === "list"]])]),
|
|
3683
3734
|
_: 3
|
|
3684
3735
|
}), u(r, {
|
|
3685
3736
|
appear: "",
|
|
@@ -3695,7 +3746,7 @@ var Qr = ["aria-label"], $r = {
|
|
|
3695
3746
|
"data-visible": j(h).surfaceMode.value === "fullscreen" ? "true" : "false",
|
|
3696
3747
|
inert: j(h).surfaceMode.value !== "fullscreen",
|
|
3697
3748
|
class: "absolute inset-0 z-[3]"
|
|
3698
|
-
}, [u(
|
|
3749
|
+
}, [u(qn, {
|
|
3699
3750
|
items: j(h).items.value,
|
|
3700
3751
|
active: j(h).surfaceMode.value === "fullscreen",
|
|
3701
3752
|
"active-index": j(h).activeIndex.value,
|
|
@@ -3764,12 +3815,12 @@ var Qr = ["aria-label"], $r = {
|
|
|
3764
3815
|
"show-back-to-list",
|
|
3765
3816
|
"onBackToList",
|
|
3766
3817
|
"onUpdate:activeIndex"
|
|
3767
|
-
])], 8,
|
|
3818
|
+
])], 8, Oi), [[P, j(h).surfaceMode.value === "fullscreen"]])]),
|
|
3768
3819
|
_: 3
|
|
3769
|
-
})], 64)) : j(h).items.value.length === 0 && j(h).loading.value ? (S(), s("div",
|
|
3820
|
+
})], 64)) : j(h).items.value.length === 0 && j(h).loading.value ? (S(), s("div", ki, [u(j(re), {
|
|
3770
3821
|
class: "size-10 animate-spin text-[#f7f1ea]/82",
|
|
3771
3822
|
"aria-hidden": "true"
|
|
3772
|
-
}), n[1] ||= c("p", { class: "m-0 text-[0.9rem] font-semibold uppercase tracking-[0.22em] text-[#f7f1ea]/72" }, " Loading... ", -1)])) : (S(), a(
|
|
3823
|
+
}), n[1] ||= c("p", { class: "m-0 text-[0.9rem] font-semibold uppercase tracking-[0.22em] text-[#f7f1ea]/72" }, " Loading... ", -1)])) : (S(), a(qn, {
|
|
3773
3824
|
key: 4,
|
|
3774
3825
|
items: j(h).items.value,
|
|
3775
3826
|
active: !0,
|
|
@@ -3837,10 +3888,10 @@ var Qr = ["aria-label"], $r = {
|
|
|
3837
3888
|
"show-status-badges",
|
|
3838
3889
|
"onBackToList",
|
|
3839
3890
|
"onUpdate:activeIndex"
|
|
3840
|
-
]))], 8,
|
|
3891
|
+
]))], 8, Ti));
|
|
3841
3892
|
}
|
|
3842
|
-
}),
|
|
3843
|
-
e.component("VibeLayout",
|
|
3893
|
+
}), ji = { install(e) {
|
|
3894
|
+
e.component("VibeLayout", Ai);
|
|
3844
3895
|
} };
|
|
3845
3896
|
//#endregion
|
|
3846
|
-
export {
|
|
3897
|
+
export { Ai as VibeLayout, ji as VibePlugin, ji as default };
|