@wyxos/vibe 3.1.28 → 3.1.30
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/components/viewer-core/fullscreenPreviews.d.ts +8 -0
- package/lib/components/viewer-core/surfaceSlots.d.ts +3 -0
- package/lib/components/viewer-core/useMasonryMotion.d.ts +1 -0
- package/lib/index.cjs +1 -1
- package/lib/index.d.ts +4 -3
- package/lib/index.js +518 -612
- package/lib/style.css +1 -1
- package/package.json +2 -1
- package/lib/components/FullscreenPreviewRail.vue.d.ts +0 -15
package/lib/index.js
CHANGED
|
@@ -3,10 +3,10 @@ import { Comment as e, Fragment as t, Text as n, Transition as r, computed as i,
|
|
|
3
3
|
var U = (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
|
+
}, te = (e) => e === "", W = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e) === t).join(" ").trim(), G = (e) => e.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase(), K = (e) => e.replace(/^([A-Z])|[\s-_]+(\w)/g, (e, t, n) => n ? n.toUpperCase() : t.toLowerCase()), q = (e) => {
|
|
7
|
+
let t = K(e);
|
|
8
8
|
return t.charAt(0).toUpperCase() + t.slice(1);
|
|
9
|
-
},
|
|
9
|
+
}, J = {
|
|
10
10
|
xmlns: "http://www.w3.org/2000/svg",
|
|
11
11
|
width: 24,
|
|
12
12
|
height: 24,
|
|
@@ -16,27 +16,27 @@ var U = (e) => {
|
|
|
16
16
|
"stroke-width": 2,
|
|
17
17
|
"stroke-linecap": "round",
|
|
18
18
|
"stroke-linejoin": "round"
|
|
19
|
-
},
|
|
20
|
-
...
|
|
19
|
+
}, ne = ({ name: e, iconNode: t, absoluteStrokeWidth: n, "absolute-stroke-width": r, strokeWidth: i, "stroke-width": a, size: o = J.width, color: s = J.stroke, ...c }, { slots: l }) => m("svg", {
|
|
20
|
+
...J,
|
|
21
21
|
...c,
|
|
22
22
|
width: o,
|
|
23
23
|
height: o,
|
|
24
24
|
stroke: s,
|
|
25
|
-
"stroke-width":
|
|
26
|
-
class:
|
|
25
|
+
"stroke-width": te(n) || te(r) || n === !0 || r === !0 ? Number(i || a || J["stroke-width"]) * 24 / Number(o) : i || a || J["stroke-width"],
|
|
26
|
+
class: W("lucide", c.class, ...e ? [`lucide-${G(q(e))}-icon`, `lucide-${G(e)}`] : ["lucide-icon"]),
|
|
27
27
|
...!l.default && !U(c) && { "aria-hidden": "true" }
|
|
28
|
-
}, [...t.map((e) => m(...e)), ...l.default ? [l.default()] : []]),
|
|
28
|
+
}, [...t.map((e) => m(...e)), ...l.default ? [l.default()] : []]), Y = (e, t) => (n, { slots: r, attrs: i }) => m(ne, {
|
|
29
29
|
...i,
|
|
30
30
|
...n,
|
|
31
31
|
iconNode: t,
|
|
32
32
|
name: e
|
|
33
|
-
}, r),
|
|
33
|
+
}, r), X = Y("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
|
-
}]]),
|
|
39
|
+
}]]), re = Y("audio-lines", [
|
|
40
40
|
["path", {
|
|
41
41
|
d: "M2 10v3",
|
|
42
42
|
key: "1fnikh"
|
|
@@ -61,7 +61,7 @@ var U = (e) => {
|
|
|
61
61
|
d: "M22 10v3",
|
|
62
62
|
key: "154ddg"
|
|
63
63
|
}]
|
|
64
|
-
]),
|
|
64
|
+
]), ie = Y("clapperboard", [
|
|
65
65
|
["path", {
|
|
66
66
|
d: "m12.296 3.464 3.02 3.956",
|
|
67
67
|
key: "qash78"
|
|
@@ -78,13 +78,13 @@ var U = (e) => {
|
|
|
78
78
|
d: "m6.18 5.276 3.1 3.899",
|
|
79
79
|
key: "zjj9t3"
|
|
80
80
|
}]
|
|
81
|
-
]),
|
|
81
|
+
]), ae = Y("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
|
+
}]]), oe = Y("image-plus", [
|
|
88
88
|
["path", {
|
|
89
89
|
d: "M16 5h6",
|
|
90
90
|
key: "1vod17"
|
|
@@ -107,10 +107,10 @@ var U = (e) => {
|
|
|
107
107
|
r: "2",
|
|
108
108
|
key: "af1f0g"
|
|
109
109
|
}]
|
|
110
|
-
]), se =
|
|
110
|
+
]), se = Y("loader-circle", [["path", {
|
|
111
111
|
d: "M21 12a9 9 0 1 1-6.219-8.56",
|
|
112
112
|
key: "13zald"
|
|
113
|
-
}]]), ce =
|
|
113
|
+
}]]), ce = Y("maximize-2", [
|
|
114
114
|
["path", {
|
|
115
115
|
d: "M15 3h6v6",
|
|
116
116
|
key: "1q9fwt"
|
|
@@ -127,7 +127,7 @@ var U = (e) => {
|
|
|
127
127
|
d: "M9 21H3v-6",
|
|
128
128
|
key: "wtvkvv"
|
|
129
129
|
}]
|
|
130
|
-
]), le =
|
|
130
|
+
]), le = Y("pause", [["rect", {
|
|
131
131
|
x: "14",
|
|
132
132
|
y: "3",
|
|
133
133
|
width: "5",
|
|
@@ -141,10 +141,10 @@ var U = (e) => {
|
|
|
141
141
|
height: "18",
|
|
142
142
|
rx: "1",
|
|
143
143
|
key: "1wsw3u"
|
|
144
|
-
}]]), ue =
|
|
144
|
+
}]]), ue = Y("play", [["path", {
|
|
145
145
|
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",
|
|
146
146
|
key: "10ikf1"
|
|
147
|
-
}]]), de =
|
|
147
|
+
}]]), de = Y("triangle-alert", [
|
|
148
148
|
["path", {
|
|
149
149
|
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",
|
|
150
150
|
key: "wmoenq"
|
|
@@ -157,13 +157,13 @@ var U = (e) => {
|
|
|
157
157
|
d: "M12 17h.01",
|
|
158
158
|
key: "p32p05"
|
|
159
159
|
}]
|
|
160
|
-
]), fe =
|
|
160
|
+
]), fe = Y("volume-1", [["path", {
|
|
161
161
|
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",
|
|
162
162
|
key: "uqj9uw"
|
|
163
163
|
}], ["path", {
|
|
164
164
|
d: "M16 9a5 5 0 0 1 0 6",
|
|
165
165
|
key: "1q6k2b"
|
|
166
|
-
}]]), pe =
|
|
166
|
+
}]]), pe = Y("volume-2", [
|
|
167
167
|
["path", {
|
|
168
168
|
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",
|
|
169
169
|
key: "uqj9uw"
|
|
@@ -176,7 +176,7 @@ var U = (e) => {
|
|
|
176
176
|
d: "M19.364 18.364a9 9 0 0 0 0-12.728",
|
|
177
177
|
key: "ijwkga"
|
|
178
178
|
}]
|
|
179
|
-
]), me =
|
|
179
|
+
]), me = Y("volume-x", [
|
|
180
180
|
["path", {
|
|
181
181
|
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",
|
|
182
182
|
key: "uqj9uw"
|
|
@@ -841,7 +841,7 @@ function dt(e) {
|
|
|
841
841
|
setSequence: (e) => {
|
|
842
842
|
w = e;
|
|
843
843
|
}
|
|
844
|
-
}), E = i(() => lt(e.fillDelayMs, at)), O = i(() => lt(e.fillDelayStepMs, ot)), k = i(() => typeof e.resolve == "function"), A = i(() => be(e.pageSize)), j = i(() => De(n.value)), M = rt(() => j.value.length), N = i(() => Oe(j.value, e.removedIds.value)), P = i(() => r.value), F = i(() => ye(c.value) || m.value), I = i(() => Ge(n.value, e.removedIds.value)), L = i(() => Ke(n.value, e.removedIds.value)), R = i(() => L.value?.nextCursor ?? null), ee = i(() => o.value ? null : I.value?.previousCursor ?? null), B = i(() => !!R.value && L.value?.nextCursorExhausted !== !0), V = i(() => !!ee.value), H = i(() => _.value || g.value), U = i(() => k.value && !!L.value?.items.length),
|
|
844
|
+
}), E = i(() => lt(e.fillDelayMs, at)), O = i(() => lt(e.fillDelayStepMs, ot)), k = i(() => typeof e.resolve == "function"), A = i(() => be(e.pageSize)), j = i(() => De(n.value)), M = rt(() => j.value.length), N = i(() => Oe(j.value, e.removedIds.value)), P = i(() => r.value), F = i(() => ye(c.value) || m.value), I = i(() => Ge(n.value, e.removedIds.value)), L = i(() => Ke(n.value, e.removedIds.value)), R = i(() => L.value?.nextCursor ?? null), ee = i(() => o.value ? null : I.value?.previousCursor ?? null), B = i(() => !!R.value && L.value?.nextCursorExhausted !== !0), V = i(() => !!ee.value), H = i(() => _.value || g.value), U = i(() => k.value && !!L.value?.items.length), te = i(() => Oe(De(a.value), e.removedIds.value)), W = i(() => je(n.value, e.removedIds.value, P.value)), G = i(() => !N.value.length && !F.value && !!s.value), K = Qe({
|
|
845
845
|
autoBuckets: n,
|
|
846
846
|
clearActiveResolveController(e) {
|
|
847
847
|
y === e && (y = null);
|
|
@@ -878,17 +878,17 @@ function dt(e) {
|
|
|
878
878
|
b = e;
|
|
879
879
|
},
|
|
880
880
|
waitFillDelay: (e) => d.wait(e)
|
|
881
|
-
}),
|
|
881
|
+
}), q = it({
|
|
882
882
|
canRefreshTrailingBoundary: U,
|
|
883
883
|
hasNextPage: B,
|
|
884
884
|
isInitialLoading: Te,
|
|
885
885
|
isPageLoadingLocked: H,
|
|
886
886
|
items: N,
|
|
887
887
|
loading: F,
|
|
888
|
-
prefetchNextPage:
|
|
888
|
+
prefetchNextPage: Y,
|
|
889
889
|
removedIds: e.removedIds,
|
|
890
890
|
trailingBoundaryBucket: L
|
|
891
|
-
}),
|
|
891
|
+
}), J = nt({
|
|
892
892
|
autoBuckets: n,
|
|
893
893
|
clearActiveResolveController(e) {
|
|
894
894
|
y === e && (y = null);
|
|
@@ -923,19 +923,19 @@ function dt(e) {
|
|
|
923
923
|
});
|
|
924
924
|
z(() => N.value.length, (e) => {
|
|
925
925
|
if (e === 0) {
|
|
926
|
-
r.value = 0,
|
|
926
|
+
r.value = 0, q.schedule();
|
|
927
927
|
return;
|
|
928
928
|
}
|
|
929
|
-
|
|
929
|
+
q.resetRefreshAttempt(), o.value &&= (ke(), !1), r.value > e - 1 && (r.value = e - 1);
|
|
930
930
|
}), z(() => r.value, () => {
|
|
931
931
|
h.value && ge();
|
|
932
932
|
}), S(() => {
|
|
933
|
-
we() || e.resolve &&
|
|
933
|
+
we() || e.resolve && ne();
|
|
934
934
|
}), x(() => {
|
|
935
935
|
y?.abort(), y = null, d.clear(!0);
|
|
936
936
|
});
|
|
937
|
-
async function
|
|
938
|
-
b =
|
|
937
|
+
async function ne() {
|
|
938
|
+
b = ne;
|
|
939
939
|
let t = await xe({
|
|
940
940
|
continueUntilFilled: !0,
|
|
941
941
|
cursor: e.initialCursor ?? null,
|
|
@@ -944,7 +944,7 @@ function dt(e) {
|
|
|
944
944
|
});
|
|
945
945
|
t && (n.value = t.buckets, r.value = 0, Q());
|
|
946
946
|
}
|
|
947
|
-
async function
|
|
947
|
+
async function Y() {
|
|
948
948
|
if (H.value || F.value) return;
|
|
949
949
|
let e = !N.value.length, t = L.value, n = {
|
|
950
950
|
commitImmediately: e,
|
|
@@ -972,7 +972,7 @@ function dt(e) {
|
|
|
972
972
|
}
|
|
973
973
|
await _e(R.value, n);
|
|
974
974
|
}
|
|
975
|
-
async function
|
|
975
|
+
async function X() {
|
|
976
976
|
if (!(H.value || !V.value || F.value)) {
|
|
977
977
|
if (Ee("leading")) {
|
|
978
978
|
let e = await ve("leading");
|
|
@@ -982,43 +982,43 @@ function dt(e) {
|
|
|
982
982
|
await Z(ee.value);
|
|
983
983
|
}
|
|
984
984
|
}
|
|
985
|
-
async function
|
|
986
|
-
if (
|
|
985
|
+
async function re() {
|
|
986
|
+
if (G.value) {
|
|
987
987
|
if (n.value = [], r.value = 0, a.value = [], o.value = !1, s.value = null, c.value = k.value ? "initializing" : "idle", Ce(), M.reset(), m.value = !1, v.clear(), y?.abort(), y = null, d.clear(!0), we()) {
|
|
988
988
|
Q();
|
|
989
989
|
return;
|
|
990
990
|
}
|
|
991
|
-
await
|
|
991
|
+
await ne();
|
|
992
992
|
}
|
|
993
993
|
}
|
|
994
|
-
async function
|
|
995
|
-
if (
|
|
994
|
+
async function ie() {
|
|
995
|
+
if (G.value) return re();
|
|
996
996
|
H.value || c.value !== "failed" || !b || (s.value = null, await b());
|
|
997
997
|
}
|
|
998
|
-
async function
|
|
998
|
+
async function ae() {
|
|
999
999
|
if (!a.value.length) return m.value = !1, Q();
|
|
1000
1000
|
n.value = [...n.value, ...a.value], a.value = [], m.value = !1, Q();
|
|
1001
1001
|
}
|
|
1002
|
-
function
|
|
1002
|
+
function oe(t) {
|
|
1003
1003
|
let n = N.value;
|
|
1004
1004
|
if (!n.length) return;
|
|
1005
1005
|
let i = Se(t, 0, n.length - 1);
|
|
1006
1006
|
i !== r.value && (r.value = i, e.emit("update:activeIndex", i));
|
|
1007
1007
|
}
|
|
1008
1008
|
function se(e) {
|
|
1009
|
-
h.value = e,
|
|
1009
|
+
h.value = e, q.schedule();
|
|
1010
1010
|
}
|
|
1011
1011
|
function ce() {
|
|
1012
1012
|
_.value = !0, d.clear(!0);
|
|
1013
1013
|
}
|
|
1014
1014
|
function le() {
|
|
1015
|
-
_.value = !1,
|
|
1015
|
+
_.value = !1, q.schedule();
|
|
1016
1016
|
}
|
|
1017
1017
|
function ue() {
|
|
1018
|
-
fe(), s.value = null, Ce(),
|
|
1018
|
+
fe(), s.value = null, Ce(), K.cancel(), a.value.length > 0 && (n.value = [...n.value, ...a.value], a.value = []), m.value = !1, o.value = !1, Q();
|
|
1019
1019
|
}
|
|
1020
1020
|
function de() {
|
|
1021
|
-
g.value && (fe(), Ce(),
|
|
1021
|
+
g.value && (fe(), Ce(), K.cancel(), m.value = !1, Q());
|
|
1022
1022
|
}
|
|
1023
1023
|
function fe() {
|
|
1024
1024
|
C += 1, y?.abort(), y = null, d.clear(!0), v.clear();
|
|
@@ -1045,15 +1045,15 @@ function dt(e) {
|
|
|
1045
1045
|
r.value = He(N.value, P.value, e);
|
|
1046
1046
|
}
|
|
1047
1047
|
function he() {
|
|
1048
|
-
a.value.length > 0 && (!
|
|
1048
|
+
a.value.length > 0 && (!te.value.length || !N.value.length) && ae();
|
|
1049
1049
|
}
|
|
1050
1050
|
async function ge() {
|
|
1051
1051
|
if (!(!h.value || Te())) {
|
|
1052
1052
|
if (!N.value.length) {
|
|
1053
|
-
(B.value || U.value) && await
|
|
1053
|
+
(B.value || U.value) && await Y();
|
|
1054
1054
|
return;
|
|
1055
1055
|
}
|
|
1056
|
-
V.value && r.value < 3 && await
|
|
1056
|
+
V.value && r.value < 3 && await X(), B.value && r.value >= N.value.length - 3 && await Y();
|
|
1057
1057
|
}
|
|
1058
1058
|
}
|
|
1059
1059
|
async function _e(e, t = {}) {
|
|
@@ -1069,7 +1069,7 @@ function dt(e) {
|
|
|
1069
1069
|
if (r) {
|
|
1070
1070
|
if (!r.visibleCount) return n.value = Je(n.value, t.originCursor, e, !0), a.value = [], m.value = !1, Q();
|
|
1071
1071
|
if (r.canceled) return n.value = [...n.value, ...r.buckets], a.value = [], m.value = !1, Q();
|
|
1072
|
-
if (a.value = r.buckets, t.commitImmediately || !N.value.length || !
|
|
1072
|
+
if (a.value = r.buckets, t.commitImmediately || !N.value.length || !te.value.length) return n.value = [...n.value, ...a.value], a.value = [], m.value = !1, Q();
|
|
1073
1073
|
m.value = !0;
|
|
1074
1074
|
}
|
|
1075
1075
|
}
|
|
@@ -1090,13 +1090,13 @@ function dt(e) {
|
|
|
1090
1090
|
async function ve(e) {
|
|
1091
1091
|
return b = async () => {
|
|
1092
1092
|
await ve(e);
|
|
1093
|
-
},
|
|
1093
|
+
}, J.reloadBoundaryBucket(e);
|
|
1094
1094
|
}
|
|
1095
1095
|
function xe(e) {
|
|
1096
|
-
return
|
|
1096
|
+
return J.collectBuckets(e);
|
|
1097
1097
|
}
|
|
1098
1098
|
function Q() {
|
|
1099
|
-
c.value = "idle", Ce(), d.clear(),
|
|
1099
|
+
c.value = "idle", Ce(), d.clear(), q.schedule();
|
|
1100
1100
|
}
|
|
1101
1101
|
function Ce() {
|
|
1102
1102
|
l.value = null, u.value = null, p.value = null;
|
|
@@ -1121,20 +1121,20 @@ function dt(e) {
|
|
|
1121
1121
|
}
|
|
1122
1122
|
return {
|
|
1123
1123
|
activeIndex: P,
|
|
1124
|
-
canRetryInitialLoad:
|
|
1124
|
+
canRetryInitialLoad: G,
|
|
1125
1125
|
cancel: ue,
|
|
1126
1126
|
cancelFill: de,
|
|
1127
1127
|
canRefreshTrailingBoundary: U,
|
|
1128
|
-
commitPendingAppend:
|
|
1129
|
-
currentCursor:
|
|
1128
|
+
commitPendingAppend: ae,
|
|
1129
|
+
currentCursor: W,
|
|
1130
1130
|
errorMessage: s,
|
|
1131
1131
|
fillCollectedCount: l,
|
|
1132
1132
|
fillCursor: u,
|
|
1133
1133
|
fillDelayRemainingMs: f,
|
|
1134
1134
|
fillTargetCount: p,
|
|
1135
1135
|
...M.refs,
|
|
1136
|
-
fillUntil:
|
|
1137
|
-
fillUntilEnd:
|
|
1136
|
+
fillUntil: K.fillUntil,
|
|
1137
|
+
fillUntilEnd: K.fillUntilEnd,
|
|
1138
1138
|
hasNextPage: B,
|
|
1139
1139
|
hasPreviousPage: V,
|
|
1140
1140
|
isAutoPrefetchEnabled: h,
|
|
@@ -1144,14 +1144,14 @@ function dt(e) {
|
|
|
1144
1144
|
loading: F,
|
|
1145
1145
|
maybePrefetchAround: ge,
|
|
1146
1146
|
nextCursor: R,
|
|
1147
|
-
pendingAppendItems:
|
|
1147
|
+
pendingAppendItems: te,
|
|
1148
1148
|
phase: c,
|
|
1149
|
-
prefetchNextPage:
|
|
1150
|
-
prefetchPreviousPage:
|
|
1149
|
+
prefetchNextPage: Y,
|
|
1150
|
+
prefetchPreviousPage: X,
|
|
1151
1151
|
previousCursor: ee,
|
|
1152
|
-
retryInitialLoad:
|
|
1153
|
-
retry:
|
|
1154
|
-
setActiveIndex:
|
|
1152
|
+
retryInitialLoad: re,
|
|
1153
|
+
retry: ie,
|
|
1154
|
+
setActiveIndex: oe,
|
|
1155
1155
|
setAutoPrefetchEnabled: se,
|
|
1156
1156
|
syncActiveIndexAfterVisibilityChange: me,
|
|
1157
1157
|
unlockPageLoading: le,
|
|
@@ -1549,7 +1549,7 @@ var gt = {
|
|
|
1549
1549
|
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",
|
|
1550
1550
|
"aria-label": "Back to list",
|
|
1551
1551
|
onClick: t[0] ||= (e) => r("back-to-list")
|
|
1552
|
-
}, [u(F(
|
|
1552
|
+
}, [u(F(X), {
|
|
1553
1553
|
class: "h-4 w-4 stroke-[2.2]",
|
|
1554
1554
|
"aria-hidden": "true"
|
|
1555
1555
|
})])) : o("", !0), n.title ? (w(), s("h2", It, M(n.title), 1)) : o("", !0)]), c("div", Lt, [c("span", Rt, [
|
|
@@ -1564,10 +1564,10 @@ var gt = {
|
|
|
1564
1564
|
]), k(e.$slots, "actions")])])]), n.showEndBadge ? (w(), s("div", Vt, [...t[1] ||= [c("span", { class: "inline-flex items-center border border-amber-300/35 bg-black/40 px-4 py-3 text-[0.74rem] font-bold uppercase tracking-[0.2em] text-amber-200 backdrop-blur-[18px]" }, " End reached ", -1)]])) : o("", !0)]));
|
|
1565
1565
|
}
|
|
1566
1566
|
}), Ut = {
|
|
1567
|
-
image:
|
|
1568
|
-
video:
|
|
1569
|
-
audio:
|
|
1570
|
-
other:
|
|
1567
|
+
image: oe,
|
|
1568
|
+
video: ie,
|
|
1569
|
+
audio: re,
|
|
1570
|
+
other: ae
|
|
1571
1571
|
}, Wt = {
|
|
1572
1572
|
image: "Image",
|
|
1573
1573
|
video: "Video",
|
|
@@ -2064,20 +2064,20 @@ function On(e) {
|
|
|
2064
2064
|
});
|
|
2065
2065
|
function v(e, t) {
|
|
2066
2066
|
if (t instanceof HTMLVideoElement) {
|
|
2067
|
-
s.set(e, t),
|
|
2067
|
+
s.set(e, t), W(e, t);
|
|
2068
2068
|
return;
|
|
2069
2069
|
}
|
|
2070
2070
|
s.delete(e);
|
|
2071
2071
|
}
|
|
2072
2072
|
function y(e, t) {
|
|
2073
2073
|
if (t instanceof HTMLAudioElement) {
|
|
2074
|
-
c.set(e, t),
|
|
2074
|
+
c.set(e, t), W(e, t);
|
|
2075
2075
|
return;
|
|
2076
2076
|
}
|
|
2077
2077
|
c.delete(e);
|
|
2078
2078
|
}
|
|
2079
2079
|
function b(e, r) {
|
|
2080
|
-
r instanceof HTMLImageElement && hn(r) && (t.value[e] = !0, n.value[e] = null,
|
|
2080
|
+
r instanceof HTMLImageElement && hn(r) && (t.value[e] = !0, n.value[e] = null, Y(e, r.currentSrc || r.src || re(e)));
|
|
2081
2081
|
}
|
|
2082
2082
|
function x() {
|
|
2083
2083
|
U(), a.value = {}, n.value = {}, t.value = {}, o.value = {}, r.value = {}, l.clear();
|
|
@@ -2099,30 +2099,30 @@ function On(e) {
|
|
|
2099
2099
|
H(i, n);
|
|
2100
2100
|
continue;
|
|
2101
2101
|
}
|
|
2102
|
-
i.muted = !1, i.loop = e.loopFullscreenVideo.value, i.playsInline = !0, Tn(i),
|
|
2102
|
+
i.muted = !1, i.loop = e.loopFullscreenVideo.value, i.playsInline = !0, Tn(i), W(n, i);
|
|
2103
2103
|
}
|
|
2104
2104
|
for (let [e, n] of c.entries()) {
|
|
2105
2105
|
if (e !== t || r.value[e]?.errorKind) {
|
|
2106
2106
|
H(n, e);
|
|
2107
2107
|
continue;
|
|
2108
2108
|
}
|
|
2109
|
-
Tn(n),
|
|
2109
|
+
Tn(n), W(e, n);
|
|
2110
2110
|
}
|
|
2111
2111
|
}
|
|
2112
2112
|
function w(e, t) {
|
|
2113
2113
|
let n = t.currentTarget instanceof HTMLMediaElement ? t.currentTarget : t.target instanceof HTMLMediaElement ? t.target : null;
|
|
2114
2114
|
if (n) {
|
|
2115
2115
|
let i = r.value[e]?.ready ?? !1;
|
|
2116
|
-
|
|
2116
|
+
W(e, n, t.type);
|
|
2117
2117
|
let a = r.value[e]?.ready ?? !1;
|
|
2118
|
-
!i && a &&
|
|
2118
|
+
!i && a && Y(e, n.currentSrc || n.src || re(e));
|
|
2119
2119
|
}
|
|
2120
2120
|
}
|
|
2121
2121
|
function T(e, r) {
|
|
2122
|
-
t.value[e] = !0, n.value[e] = null,
|
|
2122
|
+
t.value[e] = !0, n.value[e] = null, Y(e, r);
|
|
2123
2123
|
}
|
|
2124
2124
|
async function E(r, i) {
|
|
2125
|
-
let a =
|
|
2125
|
+
let a = X(r) ?? e.activeItem.value;
|
|
2126
2126
|
t.value[r] = !1, n.value[r] = "generic";
|
|
2127
2127
|
let o = await xn(i);
|
|
2128
2128
|
n.value[r] = o, a && e.onAssetError?.({
|
|
@@ -2134,7 +2134,7 @@ function On(e) {
|
|
|
2134
2134
|
});
|
|
2135
2135
|
}
|
|
2136
2136
|
async function O(t, n) {
|
|
2137
|
-
let r =
|
|
2137
|
+
let r = q(t), i = te(t), a = X(t) ?? e.activeMediaItem.value ?? e.activeItem.value;
|
|
2138
2138
|
if (r) {
|
|
2139
2139
|
r.pause();
|
|
2140
2140
|
try {
|
|
@@ -2152,28 +2152,28 @@ function On(e) {
|
|
|
2152
2152
|
});
|
|
2153
2153
|
}
|
|
2154
2154
|
function k(e, t, n) {
|
|
2155
|
-
e.button !== 0 || Date.now() < n || En(e.currentTarget) ||
|
|
2155
|
+
e.button !== 0 || Date.now() < n || En(e.currentTarget) || ne(s.get(t) ?? null);
|
|
2156
2156
|
}
|
|
2157
2157
|
function A(e, t, n) {
|
|
2158
|
-
e.button !== 0 || Date.now() < n ||
|
|
2158
|
+
e.button !== 0 || Date.now() < n || ne(q(t));
|
|
2159
2159
|
}
|
|
2160
2160
|
function j(e) {
|
|
2161
|
-
let t =
|
|
2161
|
+
let t = J(), n = d.value;
|
|
2162
2162
|
if (!t || !n || !(e.target instanceof HTMLInputElement)) return;
|
|
2163
2163
|
let r = Number.parseFloat(e.target.value);
|
|
2164
2164
|
if (!Number.isFinite(r)) return;
|
|
2165
2165
|
let i = kn(r, 0, m.value || 0);
|
|
2166
|
-
|
|
2166
|
+
G(n, i, t), t.currentTime = i;
|
|
2167
2167
|
}
|
|
2168
2168
|
function M(e) {
|
|
2169
|
-
let t =
|
|
2169
|
+
let t = J(), n = d.value;
|
|
2170
2170
|
if (!t || !n || !(e.target instanceof HTMLInputElement)) return;
|
|
2171
2171
|
let r = kn(Number.parseFloat(e.target.value), 0, 1);
|
|
2172
|
-
t.volume = r, t.muted = r <= 0, r > 0 && (o.value[n] = r),
|
|
2172
|
+
t.volume = r, t.muted = r <= 0, r > 0 && (o.value[n] = r), W(n, t);
|
|
2173
2173
|
}
|
|
2174
2174
|
function N() {
|
|
2175
|
-
let e =
|
|
2176
|
-
!e || !t || (e.muted || e.volume <= 0 ? (e.volume =
|
|
2175
|
+
let e = J(), t = d.value;
|
|
2176
|
+
!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));
|
|
2177
2177
|
}
|
|
2178
2178
|
function P(e) {
|
|
2179
2179
|
return !!t.value[e] && !n.value[e];
|
|
@@ -2200,9 +2200,9 @@ function On(e) {
|
|
|
2200
2200
|
async function V(e) {
|
|
2201
2201
|
if (!ee(e)) return;
|
|
2202
2202
|
t.value[e] = !1, n.value[e] = null;
|
|
2203
|
-
let r =
|
|
2203
|
+
let r = te(e);
|
|
2204
2204
|
r.currentTime = 0, r.duration = 0, r.paused = !0, r.ready = !1, r.errorKind = null;
|
|
2205
|
-
let i =
|
|
2205
|
+
let i = q(e);
|
|
2206
2206
|
i && H(i, e), l.forEach((t) => {
|
|
2207
2207
|
t.startsWith(`${e}|`) && l.delete(t);
|
|
2208
2208
|
}), a.value[e] = (a.value[e] ?? 0) + 1, await _(), await C();
|
|
@@ -2212,32 +2212,32 @@ function On(e) {
|
|
|
2212
2212
|
try {
|
|
2213
2213
|
e.currentTime = 0;
|
|
2214
2214
|
} catch {}
|
|
2215
|
-
|
|
2215
|
+
W(t, e);
|
|
2216
2216
|
}
|
|
2217
2217
|
function U() {
|
|
2218
2218
|
for (let [e, t] of s.entries()) H(t, e);
|
|
2219
2219
|
for (let [e, t] of c.entries()) H(t, e);
|
|
2220
2220
|
}
|
|
2221
|
-
function
|
|
2221
|
+
function te(e) {
|
|
2222
2222
|
return r.value[e] || (r.value[e] = mn()), r.value[e];
|
|
2223
2223
|
}
|
|
2224
|
-
function
|
|
2225
|
-
gn(
|
|
2224
|
+
function W(e, t, n) {
|
|
2225
|
+
gn(te(e), t, n), !t.muted && t.volume > 0 && (o.value[e] = t.volume);
|
|
2226
2226
|
}
|
|
2227
|
-
function
|
|
2228
|
-
let r =
|
|
2227
|
+
function G(e, t, n) {
|
|
2228
|
+
let r = te(e);
|
|
2229
2229
|
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;
|
|
2230
2230
|
}
|
|
2231
|
-
function
|
|
2231
|
+
function K(e) {
|
|
2232
2232
|
return kn(o.value[e] ?? 1, 0, 1);
|
|
2233
2233
|
}
|
|
2234
|
-
function
|
|
2234
|
+
function q(e) {
|
|
2235
2235
|
return s.get(e) ?? c.get(e) ?? null;
|
|
2236
2236
|
}
|
|
2237
|
-
function
|
|
2238
|
-
return d.value ?
|
|
2237
|
+
function J() {
|
|
2238
|
+
return d.value ? q(d.value) : null;
|
|
2239
2239
|
}
|
|
2240
|
-
function
|
|
2240
|
+
function ne(e) {
|
|
2241
2241
|
if (e) {
|
|
2242
2242
|
if (e.paused) {
|
|
2243
2243
|
Tn(e);
|
|
@@ -2246,8 +2246,8 @@ function On(e) {
|
|
|
2246
2246
|
e.pause();
|
|
2247
2247
|
}
|
|
2248
2248
|
}
|
|
2249
|
-
function
|
|
2250
|
-
let r =
|
|
2249
|
+
function Y(t, n) {
|
|
2250
|
+
let r = X(t) ?? e.activeMediaItem.value ?? e.activeItem.value;
|
|
2251
2251
|
if (!r || !n) return;
|
|
2252
2252
|
let i = `${t}|${n}`;
|
|
2253
2253
|
l.has(i) || (l.add(i), e.onAssetLoad?.({
|
|
@@ -2257,11 +2257,11 @@ function On(e) {
|
|
|
2257
2257
|
url: n
|
|
2258
2258
|
}));
|
|
2259
2259
|
}
|
|
2260
|
-
function
|
|
2260
|
+
function X(e) {
|
|
2261
2261
|
return f.value.get(e) ?? null;
|
|
2262
2262
|
}
|
|
2263
|
-
function
|
|
2264
|
-
return
|
|
2263
|
+
function re(e) {
|
|
2264
|
+
return X(e)?.url ?? null;
|
|
2265
2265
|
}
|
|
2266
2266
|
return {
|
|
2267
2267
|
activeAssetErrorKind: g,
|
|
@@ -2356,7 +2356,7 @@ function Pn(e, t, n = {}) {
|
|
|
2356
2356
|
onEnable() {
|
|
2357
2357
|
return T.syncMediaPlayback();
|
|
2358
2358
|
},
|
|
2359
|
-
onKeydown:
|
|
2359
|
+
onKeydown: W,
|
|
2360
2360
|
onResize: F
|
|
2361
2361
|
});
|
|
2362
2362
|
function P(e, t, n) {
|
|
@@ -2395,37 +2395,37 @@ function Pn(e, t, n = {}) {
|
|
|
2395
2395
|
function U() {
|
|
2396
2396
|
m.value = 0, h.value = !1, v = null;
|
|
2397
2397
|
}
|
|
2398
|
-
function
|
|
2398
|
+
function te(e) {
|
|
2399
2399
|
if (!_.value || r.value.length === 0 || h.value || ve(e.target) || Math.abs(e.deltaY) < Math.max(Math.abs(e.deltaX), 24)) return;
|
|
2400
2400
|
e.preventDefault();
|
|
2401
2401
|
let t = Date.now();
|
|
2402
2402
|
t < b || (b = t + 400, L(e.deltaY > 0 ? 1 : -1));
|
|
2403
2403
|
}
|
|
2404
|
-
function
|
|
2404
|
+
function W(e) {
|
|
2405
2405
|
!_.value || r.value.length === 0 || Z(e.target) || ((e.key === "ArrowDown" || e.key === "PageDown") && (e.preventDefault(), L(1)), (e.key === "ArrowUp" || e.key === "PageUp") && (e.preventDefault(), L(-1)));
|
|
2406
2406
|
}
|
|
2407
|
-
function
|
|
2407
|
+
function G(e, t) {
|
|
2408
2408
|
T.onVideoClick(e, t, x);
|
|
2409
2409
|
}
|
|
2410
|
-
function
|
|
2410
|
+
function K(e, t) {
|
|
2411
2411
|
T.onAudioCoverClick(e, t, x);
|
|
2412
2412
|
}
|
|
2413
|
-
function
|
|
2413
|
+
function q(e) {
|
|
2414
2414
|
T.onMediaSeekInput(e);
|
|
2415
2415
|
}
|
|
2416
|
-
function
|
|
2416
|
+
function J(e) {
|
|
2417
2417
|
T.onMediaVolumeInput(e);
|
|
2418
2418
|
}
|
|
2419
|
-
function
|
|
2419
|
+
function ne() {
|
|
2420
2420
|
T.onMediaVolumeToggle();
|
|
2421
2421
|
}
|
|
2422
|
-
function
|
|
2422
|
+
function Y(e) {
|
|
2423
2423
|
return e.type === "image" || e.type === "video";
|
|
2424
2424
|
}
|
|
2425
|
-
function
|
|
2425
|
+
function X(e) {
|
|
2426
2426
|
return e.type === "audio";
|
|
2427
2427
|
}
|
|
2428
|
-
function
|
|
2428
|
+
function re(e) {
|
|
2429
2429
|
return Nn(e, S.value, g.value, m.value, h.value);
|
|
2430
2430
|
}
|
|
2431
2431
|
return {
|
|
@@ -2443,30 +2443,30 @@ function Pn(e, t, n = {}) {
|
|
|
2443
2443
|
getAssetRenderKey: T.getAssetRenderKey,
|
|
2444
2444
|
formatPlaybackTime: ln,
|
|
2445
2445
|
getImageSource: T.getImageSource,
|
|
2446
|
-
getSlideStyle:
|
|
2446
|
+
getSlideStyle: re,
|
|
2447
2447
|
hasNextPage: c,
|
|
2448
2448
|
isAtEnd: E,
|
|
2449
|
-
isAudio:
|
|
2450
|
-
isVisual:
|
|
2449
|
+
isAudio: X,
|
|
2450
|
+
isVisual: Y,
|
|
2451
2451
|
items: r,
|
|
2452
2452
|
loading: s,
|
|
2453
2453
|
mediaStates: T.mediaStates,
|
|
2454
2454
|
isImageReady: T.isImageReady,
|
|
2455
2455
|
isMediaReady: T.isMediaReady,
|
|
2456
|
-
onAudioCoverClick:
|
|
2456
|
+
onAudioCoverClick: K,
|
|
2457
2457
|
onImageError: T.onImageError,
|
|
2458
2458
|
onImageLoad: T.onImageLoad,
|
|
2459
2459
|
onMediaEvent: T.onMediaEvent,
|
|
2460
2460
|
onMediaError: T.onMediaError,
|
|
2461
|
-
onMediaSeekInput:
|
|
2462
|
-
onMediaVolumeInput:
|
|
2463
|
-
onMediaVolumeToggle:
|
|
2461
|
+
onMediaSeekInput: q,
|
|
2462
|
+
onMediaVolumeInput: J,
|
|
2463
|
+
onMediaVolumeToggle: ne,
|
|
2464
2464
|
onPointerCancel: V,
|
|
2465
2465
|
onPointerDown: z,
|
|
2466
2466
|
onPointerMove: ee,
|
|
2467
2467
|
onPointerUp: B,
|
|
2468
|
-
onVideoClick:
|
|
2469
|
-
onWheel:
|
|
2468
|
+
onVideoClick: G,
|
|
2469
|
+
onWheel: te,
|
|
2470
2470
|
registerAudioElement: T.registerAudioElement,
|
|
2471
2471
|
registerImageElement: T.registerImageElement,
|
|
2472
2472
|
registerVideoElement: T.registerVideoElement,
|
|
@@ -2677,24 +2677,44 @@ var Gn = {
|
|
|
2677
2677
|
}, null, 4)]))])) : o("", !0)
|
|
2678
2678
|
])]));
|
|
2679
2679
|
}
|
|
2680
|
-
}), er =
|
|
2681
|
-
|
|
2680
|
+
}), er = ["data-surface"], tr = ["data-surface"], nr = /* @__PURE__ */ d({
|
|
2681
|
+
inheritAttrs: !1,
|
|
2682
|
+
__name: "SurfaceEmptyState",
|
|
2683
|
+
props: {
|
|
2684
|
+
message: {},
|
|
2685
|
+
mode: {},
|
|
2686
|
+
surface: {}
|
|
2687
|
+
},
|
|
2688
|
+
setup(e) {
|
|
2689
|
+
let t = I();
|
|
2690
|
+
return (n, r) => e.mode === "inline" ? (w(), s("div", g({ key: 0 }, F(t), {
|
|
2691
|
+
"data-testid": "vibe-empty-state-inline",
|
|
2692
|
+
"data-surface": e.surface,
|
|
2693
|
+
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)]"]
|
|
2694
|
+
}), [k(n.$slots, "default", {}, () => [c("p", { class: v(["m-0 text-[0.82rem] font-medium tracking-[0.08em]", e.surface === "grid" ? "text-[#f7f1ea]/58" : "text-[#f7f1ea]/64"]) }, M(e.message), 3)])], 16, er)) : (w(), s("div", g({ key: 1 }, F(t), { class: ["pointer-events-none absolute z-[4]", e.surface === "grid" ? "inset-x-0 bottom-0 flex justify-center px-6" : "bottom-[1.8rem] left-1/2 -translate-x-1/2 max-[720px]:bottom-[1.3rem]"] }), [k(n.$slots, "default", {}, () => [c("span", {
|
|
2695
|
+
"data-testid": "vibe-empty-state-badge",
|
|
2696
|
+
"data-surface": e.surface,
|
|
2697
|
+
class: v(["inline-flex items-center border border-white/14 backdrop-blur-[18px]", e.surface === "grid" ? "bg-black/55 px-4 py-3 text-[0.82rem] font-medium tracking-[0.08em] text-[#f7f1ea]/72" : "w-auto bg-black/40 px-5 py-3 text-[0.82rem] font-medium tracking-[0.08em] text-[#f7f1ea]/74 max-[720px]:w-[calc(100%-2.5rem)] max-[720px]:justify-center"])
|
|
2698
|
+
}, M(e.message), 11, tr)])], 16));
|
|
2699
|
+
}
|
|
2700
|
+
}), rr = 1, ir = .5;
|
|
2701
|
+
function ar(e) {
|
|
2682
2702
|
if (e.type !== "image" && e.type !== "video") return {
|
|
2683
|
-
width:
|
|
2684
|
-
height:
|
|
2703
|
+
width: rr,
|
|
2704
|
+
height: rr,
|
|
2685
2705
|
source: "fallback"
|
|
2686
2706
|
};
|
|
2687
2707
|
let t = e.preview?.width, n = e.preview?.height;
|
|
2688
|
-
if (
|
|
2689
|
-
let r =
|
|
2708
|
+
if (mr(t) && mr(n)) {
|
|
2709
|
+
let r = hr(e, t, n);
|
|
2690
2710
|
return {
|
|
2691
2711
|
width: r.width,
|
|
2692
2712
|
height: r.height,
|
|
2693
2713
|
source: "preview"
|
|
2694
2714
|
};
|
|
2695
2715
|
}
|
|
2696
|
-
if (
|
|
2697
|
-
let t =
|
|
2716
|
+
if (mr(e.width) && mr(e.height)) {
|
|
2717
|
+
let t = hr(e, e.width, e.height);
|
|
2698
2718
|
return {
|
|
2699
2719
|
width: t.width,
|
|
2700
2720
|
height: t.height,
|
|
@@ -2702,24 +2722,24 @@ function nr(e) {
|
|
|
2702
2722
|
};
|
|
2703
2723
|
}
|
|
2704
2724
|
return {
|
|
2705
|
-
width:
|
|
2706
|
-
height:
|
|
2725
|
+
width: rr,
|
|
2726
|
+
height: rr,
|
|
2707
2727
|
source: "fallback"
|
|
2708
2728
|
};
|
|
2709
2729
|
}
|
|
2710
|
-
function
|
|
2730
|
+
function or(e, t) {
|
|
2711
2731
|
return !e || e <= 0 || !t || t <= 0 ? 1 : Math.max(1, Math.floor(e / t));
|
|
2712
2732
|
}
|
|
2713
|
-
function
|
|
2733
|
+
function sr(e, t, n, r = 0) {
|
|
2714
2734
|
if (!e || e <= 0 || !t || t <= 0) return n;
|
|
2715
2735
|
let i = typeof r == "number" && r > 0 ? r : 0, a = e - Math.max(0, t - 1) * i;
|
|
2716
2736
|
return !a || a <= 0 ? n : a / t;
|
|
2717
2737
|
}
|
|
2718
|
-
function
|
|
2719
|
-
let n =
|
|
2738
|
+
function cr(e, t) {
|
|
2739
|
+
let n = ar(e);
|
|
2720
2740
|
return n.height / n.width * t;
|
|
2721
2741
|
}
|
|
2722
|
-
function
|
|
2742
|
+
function lr(e, t) {
|
|
2723
2743
|
let n = Array.from({ length: t.columnCount }, () => 0), r = {
|
|
2724
2744
|
positions: Array(e.length),
|
|
2725
2745
|
heights: Array(e.length),
|
|
@@ -2728,18 +2748,18 @@ function or(e, t) {
|
|
|
2728
2748
|
indexById: /* @__PURE__ */ new Map(),
|
|
2729
2749
|
columnHeights: n
|
|
2730
2750
|
};
|
|
2731
|
-
return
|
|
2751
|
+
return ur(r, e, {
|
|
2732
2752
|
...t,
|
|
2733
2753
|
startIndex: 0
|
|
2734
2754
|
}), r;
|
|
2735
2755
|
}
|
|
2736
|
-
function
|
|
2756
|
+
function ur(e, t, n) {
|
|
2737
2757
|
for (let r = 0; r < t.length; r += 1) {
|
|
2738
2758
|
let i = t[r], a = n.startIndex + r;
|
|
2739
2759
|
e.indexById.set($(i), a);
|
|
2740
2760
|
let o = 0;
|
|
2741
2761
|
for (let t = 1; t < e.columnHeights.length; t += 1) e.columnHeights[t] < e.columnHeights[o] && (o = t);
|
|
2742
|
-
let s = o * (n.columnWidth + n.gapX), c = e.columnHeights[o], l =
|
|
2762
|
+
let s = o * (n.columnWidth + n.gapX), c = e.columnHeights[o], l = cr(i, n.columnWidth);
|
|
2743
2763
|
e.positions[a] = {
|
|
2744
2764
|
x: s + (n.positionOffsetX ?? 0),
|
|
2745
2765
|
y: c + (n.positionOffsetY ?? 0)
|
|
@@ -2752,20 +2772,20 @@ function sr(e, t, n) {
|
|
|
2752
2772
|
}
|
|
2753
2773
|
return e;
|
|
2754
2774
|
}
|
|
2755
|
-
function
|
|
2775
|
+
function dr(e, t) {
|
|
2756
2776
|
let n = [...t.columnHeights], r = t.contentHeight;
|
|
2757
2777
|
for (let i of e) {
|
|
2758
2778
|
let e = 0;
|
|
2759
2779
|
for (let t = 1; t < n.length; t += 1) n[t] < n[e] && (e = t);
|
|
2760
|
-
let a = n[e], o =
|
|
2780
|
+
let a = n[e], o = cr(i, t.columnWidth);
|
|
2761
2781
|
n[e] = a + o + t.gapY, r = Math.max(r, a + o);
|
|
2762
2782
|
}
|
|
2763
2783
|
return r;
|
|
2764
2784
|
}
|
|
2765
|
-
function
|
|
2785
|
+
function fr(e) {
|
|
2766
2786
|
return e.addedItems.length === 0 || e.removedItemCount > 0 || e.isPrepend || e.previousItems.length === 0 || e.layoutItemCount !== e.previousItems.length || e.columnHeights.length !== e.columnCount || e.currentItems.length !== e.previousItems.length + e.addedItems.length ? !1 : e.previousItems.every((t, n) => $(t) === $(e.currentItems[n]));
|
|
2767
2787
|
}
|
|
2768
|
-
function
|
|
2788
|
+
function pr(e) {
|
|
2769
2789
|
if (e.itemCount <= 0) return [];
|
|
2770
2790
|
if (e.viewportHeight <= 0) return Array.from({ length: e.itemCount }, (e, t) => t);
|
|
2771
2791
|
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();
|
|
@@ -2775,11 +2795,11 @@ function ur(e) {
|
|
|
2775
2795
|
}
|
|
2776
2796
|
return Array.from(a).sort((e, t) => e - t);
|
|
2777
2797
|
}
|
|
2778
|
-
function
|
|
2798
|
+
function mr(e) {
|
|
2779
2799
|
return typeof e == "number" && Number.isFinite(e) && e > 0;
|
|
2780
2800
|
}
|
|
2781
|
-
function
|
|
2782
|
-
return e.type !== "image" || n / t >=
|
|
2801
|
+
function hr(e, t, n) {
|
|
2802
|
+
return e.type !== "image" || n / t >= ir ? {
|
|
2783
2803
|
width: t,
|
|
2784
2804
|
height: n
|
|
2785
2805
|
} : {
|
|
@@ -2789,9 +2809,9 @@ function fr(e, t, n) {
|
|
|
2789
2809
|
}
|
|
2790
2810
|
//#endregion
|
|
2791
2811
|
//#region src/components/viewer-core/listPreview.ts
|
|
2792
|
-
var
|
|
2793
|
-
function
|
|
2794
|
-
let t =
|
|
2812
|
+
var gr = /\.(avif|gif|jpe?g|png|svg|webp)(\?|#|$)/i, _r = /\.(m4v|mov|mp4|mpeg|ogg|ogv|webm)(\?|#|$)/i, vr = /^(?:(?:https?:)?\/\/[^/]+)?\/api\/files\/[^/?#]+\/(?:preview|downloaded)(?:\?|#|$)/i;
|
|
2813
|
+
function yr(e) {
|
|
2814
|
+
let t = br(e), n = t?.url, r = ar(e), i = e.title?.trim() || Kt(e.type);
|
|
2795
2815
|
return t?.mediaType === "video" && typeof n == "string" ? {
|
|
2796
2816
|
kind: "video",
|
|
2797
2817
|
url: n,
|
|
@@ -2810,13 +2830,13 @@ function gr(e) {
|
|
|
2810
2830
|
width: r.width,
|
|
2811
2831
|
height: r.height,
|
|
2812
2832
|
label: i
|
|
2813
|
-
} : typeof n == "string" &&
|
|
2833
|
+
} : typeof n == "string" && Sr(e, n) ? {
|
|
2814
2834
|
kind: "video",
|
|
2815
2835
|
url: n,
|
|
2816
2836
|
width: r.width,
|
|
2817
2837
|
height: r.height,
|
|
2818
2838
|
label: i
|
|
2819
|
-
} : typeof n == "string" &&
|
|
2839
|
+
} : typeof n == "string" && xr(e, n) ? {
|
|
2820
2840
|
kind: "image",
|
|
2821
2841
|
url: n,
|
|
2822
2842
|
width: r.width,
|
|
@@ -2830,182 +2850,51 @@ function gr(e) {
|
|
|
2830
2850
|
label: i
|
|
2831
2851
|
};
|
|
2832
2852
|
}
|
|
2833
|
-
function
|
|
2853
|
+
function br(e) {
|
|
2834
2854
|
return e.preview?.url ? e.preview : typeof e.url != "string" || e.url.trim() === "" ? null : { url: e.url };
|
|
2835
2855
|
}
|
|
2836
|
-
function
|
|
2837
|
-
return e.type !== "image" || typeof t != "string" ? !1 :
|
|
2856
|
+
function xr(e, t) {
|
|
2857
|
+
return e.type !== "image" || typeof t != "string" ? !1 : gr.test(t) || Cr(t);
|
|
2838
2858
|
}
|
|
2839
|
-
function
|
|
2840
|
-
return e.type !== "video" || typeof t != "string" ? !1 :
|
|
2859
|
+
function Sr(e, t) {
|
|
2860
|
+
return e.type !== "video" || typeof t != "string" ? !1 : _r.test(t) || wr(t);
|
|
2841
2861
|
}
|
|
2842
|
-
function
|
|
2862
|
+
function Cr(e) {
|
|
2843
2863
|
return /^(https?:\/\/|\/\/|\/(?!\/)|\.{1,2}\/|blob:|data:)/i.test(e);
|
|
2844
2864
|
}
|
|
2845
|
-
function
|
|
2846
|
-
return
|
|
2865
|
+
function wr(e) {
|
|
2866
|
+
return vr.test(e) || /^blob:/i.test(e) || /^data:video\//i.test(e);
|
|
2847
2867
|
}
|
|
2848
2868
|
//#endregion
|
|
2849
|
-
//#region src/components/
|
|
2850
|
-
|
|
2851
|
-
|
|
2852
|
-
|
|
2853
|
-
|
|
2854
|
-
|
|
2855
|
-
|
|
2856
|
-
|
|
2857
|
-
|
|
2858
|
-
|
|
2859
|
-
],
|
|
2860
|
-
"src",
|
|
2861
|
-
"onError",
|
|
2862
|
-
"onLoad"
|
|
2863
|
-
], Tr = [
|
|
2864
|
-
"src",
|
|
2865
|
-
"onError",
|
|
2866
|
-
"onLoadedmetadata"
|
|
2867
|
-
], Er = {
|
|
2868
|
-
key: 2,
|
|
2869
|
-
class: "grid h-full w-full place-items-center bg-white/6",
|
|
2870
|
-
"aria-hidden": "true"
|
|
2871
|
-
}, Dr = {
|
|
2872
|
-
key: 3,
|
|
2873
|
-
class: "pointer-events-none absolute left-2 top-2 inline-flex h-6 w-6 items-center justify-center border border-white/14 bg-black/55 backdrop-blur-[14px]",
|
|
2874
|
-
"aria-hidden": "true"
|
|
2875
|
-
}, Or = {
|
|
2876
|
-
key: 4,
|
|
2877
|
-
"data-testid": "vibe-fullscreen-next-preview-spinner",
|
|
2878
|
-
class: "pointer-events-none absolute inset-0 grid place-items-center bg-black/18",
|
|
2879
|
-
"aria-hidden": "true"
|
|
2880
|
-
}, kr = { class: "inline-flex h-9 w-9 items-center justify-center rounded-full bg-black/50 shadow-[0_18px_40px_-18px_rgba(0,0,0,0.85)] backdrop-blur-[18px]" }, Ar = { class: "pointer-events-none absolute bottom-1.5 right-1.5 border border-white/14 bg-black/58 px-1.5 py-1 text-[0.56rem] font-bold leading-none tracking-[0.12em] text-[#f7f1ea]/78 backdrop-blur-[14px]" }, jr = /* @__PURE__ */ d({
|
|
2881
|
-
__name: "FullscreenPreviewRail",
|
|
2882
|
-
props: {
|
|
2883
|
-
activeIndex: {},
|
|
2884
|
-
items: {},
|
|
2885
|
-
maxItems: { default: 2 }
|
|
2886
|
-
},
|
|
2887
|
-
emits: ["select"],
|
|
2888
|
-
setup(e, { emit: n }) {
|
|
2889
|
-
let r = e, l = n, d = D({}), f = i(() => {
|
|
2890
|
-
let e = Math.min(Math.max(r.activeIndex + 1, 0), r.items.length);
|
|
2891
|
-
return r.items.slice(e, e + r.maxItems).map((t, n) => ({
|
|
2892
|
-
asset: gr(t),
|
|
2893
|
-
index: e + n,
|
|
2894
|
-
item: t
|
|
2895
|
-
}));
|
|
2896
|
-
});
|
|
2897
|
-
z(f, (e) => {
|
|
2898
|
-
let t = {};
|
|
2899
|
-
for (let n of e) {
|
|
2900
|
-
let e = p(n);
|
|
2901
|
-
_(n) && (t[e] = d.value[e] ?? "loading");
|
|
2902
|
-
}
|
|
2903
|
-
d.value = t;
|
|
2904
|
-
}, { immediate: !0 });
|
|
2905
|
-
function p(e) {
|
|
2906
|
-
return `${e.item.id}:${e.index}:${e.asset.url ?? "fallback"}`;
|
|
2907
|
-
}
|
|
2908
|
-
function m(e) {
|
|
2909
|
-
return `Open item ${e.index + 1} of ${r.items.length}: ${e.asset.label}`;
|
|
2910
|
-
}
|
|
2911
|
-
function h(e) {
|
|
2912
|
-
return g(e) ? "object-cover" : "object-contain";
|
|
2913
|
-
}
|
|
2914
|
-
function g(e) {
|
|
2915
|
-
if (e.width <= 0 || e.height <= 0) return !1;
|
|
2916
|
-
let t = e.width / e.height;
|
|
2917
|
-
return (t >= 1 ? 1 - 1 / t : 1 - t) >= .3;
|
|
2918
|
-
}
|
|
2919
|
-
function _(e) {
|
|
2920
|
-
return !!e.asset.url && (e.asset.kind === "image" || e.asset.kind === "video");
|
|
2921
|
-
}
|
|
2922
|
-
function y(e) {
|
|
2923
|
-
return _(e) && d.value[p(e)] === "loading";
|
|
2924
|
-
}
|
|
2925
|
-
function b(e, t) {
|
|
2926
|
-
return d.value[p(e)] === "ready" ? `${t} group-hover:opacity-100` : "opacity-0";
|
|
2927
|
-
}
|
|
2928
|
-
function x(e, t) {
|
|
2929
|
-
d.value = {
|
|
2930
|
-
...d.value,
|
|
2931
|
-
[p(e)]: t
|
|
2932
|
-
};
|
|
2933
|
-
}
|
|
2934
|
-
return (e, n) => f.value.length ? (w(), s("div", Sr, [(w(!0), s(t, null, O(f.value, (e) => (w(), s("button", {
|
|
2935
|
-
key: `${e.item.id}-${e.index}`,
|
|
2936
|
-
type: "button",
|
|
2937
|
-
"data-testid": "vibe-fullscreen-next-preview",
|
|
2938
|
-
"data-index": e.index,
|
|
2939
|
-
"aria-label": m(e),
|
|
2940
|
-
title: e.asset.label,
|
|
2941
|
-
class: "group relative h-[150px] w-[150px] overflow-hidden border border-white/14 bg-black/45 text-[#f7f1ea] shadow-[0_20px_50px_-30px_rgba(0,0,0,0.9)] backdrop-blur-[18px] transition hover:border-white/34 hover:bg-black/58 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-4 focus-visible:outline-[#f7f1ea]",
|
|
2942
|
-
onClick: (t) => l("select", e.index)
|
|
2943
|
-
}, [
|
|
2944
|
-
e.asset.kind === "image" ? (w(), s("img", {
|
|
2945
|
-
key: 0,
|
|
2946
|
-
src: e.asset.url ?? void 0,
|
|
2947
|
-
alt: "",
|
|
2948
|
-
"aria-hidden": "true",
|
|
2949
|
-
draggable: "false",
|
|
2950
|
-
loading: "lazy",
|
|
2951
|
-
class: v(["h-full w-full bg-black/18 object-center transition-[opacity,transform] duration-300 group-hover:scale-[1.04]", [h(e.asset), b(e, "opacity-[0.82]")]]),
|
|
2952
|
-
onError: (t) => x(e, "error"),
|
|
2953
|
-
onLoad: (t) => x(e, "ready")
|
|
2954
|
-
}, null, 42, wr)) : e.asset.kind === "video" ? (w(), s("video", {
|
|
2955
|
-
key: 1,
|
|
2956
|
-
src: e.asset.url ?? void 0,
|
|
2957
|
-
"aria-hidden": "true",
|
|
2958
|
-
class: v(["h-full w-full bg-black/18 object-center transition-[opacity,transform] duration-300 group-hover:scale-[1.04]", [h(e.asset), b(e, "opacity-[0.78]")]]),
|
|
2959
|
-
muted: "",
|
|
2960
|
-
playsinline: "",
|
|
2961
|
-
preload: "metadata",
|
|
2962
|
-
onError: (t) => x(e, "error"),
|
|
2963
|
-
onLoadedmetadata: (t) => x(e, "ready")
|
|
2964
|
-
}, null, 42, Tr)) : (w(), s("span", Er, [(w(), a(A(F(Gt)(e.item.type)), { class: "h-5 w-5 stroke-[1.9] text-[#f7f1ea]/70" }))])),
|
|
2965
|
-
e.asset.kind === "video" ? (w(), s("span", Dr, [(w(), a(A(F(Gt)(e.item.type)), { class: "h-3.5 w-3.5 stroke-[2]" }))])) : o("", !0),
|
|
2966
|
-
y(e) ? (w(), s("span", Or, [c("span", kr, [u(F(se), { class: "h-4 w-4 animate-spin stroke-[1.9] text-[#f7f1ea]/82" })])])) : o("", !0),
|
|
2967
|
-
c("span", Ar, M(e.index + 1) + " / " + M(r.items.length), 1)
|
|
2968
|
-
], 8, Cr))), 128))])) : o("", !0);
|
|
2969
|
-
}
|
|
2970
|
-
}), Mr = ["data-surface"], Nr = ["data-surface"], Pr = /* @__PURE__ */ d({
|
|
2971
|
-
inheritAttrs: !1,
|
|
2972
|
-
__name: "SurfaceEmptyState",
|
|
2973
|
-
props: {
|
|
2974
|
-
message: {},
|
|
2975
|
-
mode: {},
|
|
2976
|
-
surface: {}
|
|
2977
|
-
},
|
|
2978
|
-
setup(e) {
|
|
2979
|
-
let t = I();
|
|
2980
|
-
return (n, r) => e.mode === "inline" ? (w(), s("div", g({ key: 0 }, F(t), {
|
|
2981
|
-
"data-testid": "vibe-empty-state-inline",
|
|
2982
|
-
"data-surface": e.surface,
|
|
2983
|
-
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)]"]
|
|
2984
|
-
}), [k(n.$slots, "default", {}, () => [c("p", { class: v(["m-0 text-[0.82rem] font-medium tracking-[0.08em]", e.surface === "grid" ? "text-[#f7f1ea]/58" : "text-[#f7f1ea]/64"]) }, M(e.message), 3)])], 16, Mr)) : (w(), s("div", g({ key: 1 }, F(t), { class: ["pointer-events-none absolute z-[4]", e.surface === "grid" ? "inset-x-0 bottom-0 flex justify-center px-6" : "bottom-[1.8rem] left-1/2 -translate-x-1/2 max-[720px]:bottom-[1.3rem]"] }), [k(n.$slots, "default", {}, () => [c("span", {
|
|
2985
|
-
"data-testid": "vibe-empty-state-badge",
|
|
2986
|
-
"data-surface": e.surface,
|
|
2987
|
-
class: v(["inline-flex items-center border border-white/14 backdrop-blur-[18px]", e.surface === "grid" ? "bg-black/55 px-4 py-3 text-[0.82rem] font-medium tracking-[0.08em] text-[#f7f1ea]/72" : "w-auto bg-black/40 px-5 py-3 text-[0.82rem] font-medium tracking-[0.08em] text-[#f7f1ea]/74 max-[720px]:w-[calc(100%-2.5rem)] max-[720px]:justify-center"])
|
|
2988
|
-
}, M(e.message), 11, Nr)])], 16));
|
|
2989
|
-
}
|
|
2990
|
-
}), Fr = { class: "relative h-full min-h-0 overflow-hidden bg-[#05060a] text-[#f7f1ea]" }, Ir = {
|
|
2869
|
+
//#region src/components/viewer-core/fullscreenPreviews.ts
|
|
2870
|
+
function Tr(e, t, n = 2) {
|
|
2871
|
+
return e.slice(t + 1, t + 1 + n).map((e, n) => ({
|
|
2872
|
+
asset: yr(e),
|
|
2873
|
+
index: t + n + 1,
|
|
2874
|
+
item: e
|
|
2875
|
+
}));
|
|
2876
|
+
}
|
|
2877
|
+
//#endregion
|
|
2878
|
+
//#region src/components/FullscreenSurface.vue?vue&type=script&setup=true&lang.ts
|
|
2879
|
+
var Er = { class: "relative h-full min-h-0 overflow-hidden bg-[#05060a] text-[#f7f1ea]" }, Dr = {
|
|
2991
2880
|
key: 0,
|
|
2992
2881
|
class: "relative h-full min-h-0"
|
|
2993
|
-
},
|
|
2882
|
+
}, Or = [
|
|
2994
2883
|
"data-item-id",
|
|
2995
2884
|
"data-occurrence-key",
|
|
2996
2885
|
"data-index",
|
|
2997
2886
|
"data-active",
|
|
2998
2887
|
"aria-hidden"
|
|
2999
|
-
],
|
|
2888
|
+
], kr = {
|
|
3000
2889
|
key: 0,
|
|
3001
2890
|
"data-testid": "vibe-asset-spinner",
|
|
3002
2891
|
class: "pointer-events-none absolute inset-0 z-[2] grid place-items-center"
|
|
3003
|
-
},
|
|
2892
|
+
}, Ar = { 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]" }, jr = ["data-kind"], Mr = { class: "grid justify-items-center gap-4 border border-white/14 bg-black/45 px-8 py-7 text-center backdrop-blur-[18px]" }, Nr = { class: "m-0 text-[0.82rem] font-bold uppercase tracking-[0.28em] text-[#f7f1ea]/70" }, Pr = ["onClick"], Fr = [
|
|
3004
2893
|
"src",
|
|
3005
2894
|
"alt",
|
|
3006
2895
|
"onLoad",
|
|
3007
2896
|
"onError"
|
|
3008
|
-
],
|
|
2897
|
+
], Ir = [
|
|
3009
2898
|
"loop",
|
|
3010
2899
|
"src",
|
|
3011
2900
|
"preload",
|
|
@@ -3024,15 +2913,15 @@ var Sr = {
|
|
|
3024
2913
|
"onStalled",
|
|
3025
2914
|
"onTimeupdate",
|
|
3026
2915
|
"onWaiting"
|
|
3027
|
-
],
|
|
2916
|
+
], Lr = { class: "relative grid aspect-square w-[clamp(320px,46vw,560px)] max-w-[calc(100vw-2.5rem)] place-items-center" }, Rr = [
|
|
3028
2917
|
"aria-label",
|
|
3029
2918
|
"disabled",
|
|
3030
2919
|
"onClick"
|
|
3031
|
-
],
|
|
2920
|
+
], zr = { 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]" }, Br = { 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]" }, Vr = {
|
|
3032
2921
|
key: 0,
|
|
3033
2922
|
"data-testid": "vibe-asset-spinner",
|
|
3034
2923
|
class: "pointer-events-none absolute inset-0 z-[3] grid place-items-center"
|
|
3035
|
-
},
|
|
2924
|
+
}, Hr = { 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]" }, Ur = ["data-kind"], Wr = { class: "m-0 text-[0.82rem] font-bold uppercase tracking-[0.28em] text-[#f7f1ea]/70" }, Gr = ["onClick"], Kr = [
|
|
3036
2925
|
"src",
|
|
3037
2926
|
"preload",
|
|
3038
2927
|
"onCanplay",
|
|
@@ -3048,22 +2937,22 @@ var Sr = {
|
|
|
3048
2937
|
"onStalled",
|
|
3049
2938
|
"onTimeupdate",
|
|
3050
2939
|
"onWaiting"
|
|
3051
|
-
],
|
|
2940
|
+
], qr = {
|
|
3052
2941
|
key: 2,
|
|
3053
2942
|
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"
|
|
3054
|
-
},
|
|
2943
|
+
}, Jr = { 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]" }, Yr = {
|
|
3055
2944
|
key: 0,
|
|
3056
2945
|
"data-testid": "vibe-fullscreen-overlay",
|
|
3057
2946
|
class: "pointer-events-none absolute inset-0 z-[6]"
|
|
3058
|
-
},
|
|
2947
|
+
}, Xr = { class: "h-full w-full" }, Zr = {
|
|
3059
2948
|
key: 0,
|
|
3060
2949
|
"data-testid": "vibe-fullscreen-aside",
|
|
3061
2950
|
class: "h-full min-h-0 overflow-hidden border-l border-white/10 bg-black/45 backdrop-blur-[18px]"
|
|
3062
|
-
},
|
|
2951
|
+
}, Qr = { class: "h-full min-h-0 overflow-y-auto overscroll-y-contain" }, $r = {
|
|
3063
2952
|
key: 0,
|
|
3064
2953
|
"data-testid": "vibe-fullscreen-aside",
|
|
3065
2954
|
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]"
|
|
3066
|
-
},
|
|
2955
|
+
}, ei = { class: "h-full min-h-0 overflow-y-auto overscroll-y-contain" }, ti = 1280, ni = 768, ri = /* @__PURE__ */ d({
|
|
3067
2956
|
__name: "FullscreenSurface",
|
|
3068
2957
|
props: {
|
|
3069
2958
|
active: {
|
|
@@ -3129,7 +3018,7 @@ var Sr = {
|
|
|
3129
3018
|
enabled: N(d, "active"),
|
|
3130
3019
|
onAssetError: d.reportAssetError ?? void 0,
|
|
3131
3020
|
onAssetLoad: d.reportAssetLoad ?? void 0
|
|
3132
|
-
}), _ = D(typeof window > "u" ?
|
|
3021
|
+
}), _ = D(typeof window > "u" ? ti : window.innerWidth || ti), C = rn({
|
|
3133
3022
|
active: N(d, "active"),
|
|
3134
3023
|
items: h.items,
|
|
3135
3024
|
resolvedActiveIndex: h.resolvedActiveIndex,
|
|
@@ -3146,24 +3035,25 @@ var Sr = {
|
|
|
3146
3035
|
fullscreenMedia: C,
|
|
3147
3036
|
updateDominantToneFromImageElement: ve,
|
|
3148
3037
|
viewer: h
|
|
3149
|
-
}), z = i(() => h.activeMediaItem.value && !h.activeAssetErrorKind.value ? "bottom-[5.8rem] max-[720px]:bottom-[7.4rem]" : "bottom-[1.8rem] max-[720px]:bottom-[1.3rem]"), ee = i(() => !!h.activeMediaItem.value && !h.activeAssetErrorKind.value), V = i(() => _.value <
|
|
3038
|
+
}), z = i(() => h.activeMediaItem.value && !h.activeAssetErrorKind.value ? "bottom-[5.8rem] max-[720px]:bottom-[7.4rem]" : "bottom-[1.8rem] max-[720px]:bottom-[1.3rem]"), ee = i(() => !!h.activeMediaItem.value && !h.activeAssetErrorKind.value), V = i(() => _.value < ni ? "vertical" : "horizontal"), U = i(() => ee.value ? "pb-[5.75rem] max-[720px]:pb-[7rem]" : ""), te = i(() => d.activeIndex >= d.items.length && (d.loading || d.hasNextPage)), W = i(() => {
|
|
3150
3039
|
let e = h.activeItem.value;
|
|
3151
3040
|
return e ? {
|
|
3152
3041
|
hasNextPage: d.hasNextPage,
|
|
3153
3042
|
index: h.resolvedActiveIndex.value,
|
|
3154
3043
|
item: e,
|
|
3155
3044
|
loading: d.loading,
|
|
3045
|
+
nextPreviews: Tr(h.items.value, h.resolvedActiveIndex.value),
|
|
3156
3046
|
paginationDetail: d.paginationDetail,
|
|
3157
3047
|
total: d.items.length
|
|
3158
3048
|
} : null;
|
|
3159
|
-
}),
|
|
3160
|
-
...
|
|
3049
|
+
}), G = i(() => !W.value || !f["fullscreen-header-actions"] ? [] : f["fullscreen-header-actions"](W.value)), K = i(() => !W.value || !f["fullscreen-aside"] ? [] : f["fullscreen-aside"](W.value)), q = i(() => !d.showStatusBadges || !W.value || !h.statusKind.value || !h.statusMessage.value ? null : {
|
|
3050
|
+
...W.value,
|
|
3161
3051
|
kind: h.statusKind.value,
|
|
3162
3052
|
message: h.statusMessage.value
|
|
3163
|
-
}),
|
|
3164
|
-
gridTemplateColumns:
|
|
3053
|
+
}), J = i(() => !q.value || !f["fullscreen-status"] ? [] : f["fullscreen-status"](q.value)), ne = i(() => ({
|
|
3054
|
+
gridTemplateColumns: re.value ? "minmax(0, 1fr) 22rem" : "minmax(0, 1fr) 0rem",
|
|
3165
3055
|
transition: "grid-template-columns 320ms cubic-bezier(0.22, 1, 0.36, 1)"
|
|
3166
|
-
})),
|
|
3056
|
+
})), Y = i(() => an(G.value)), X = i(() => an(K.value)), re = i(() => X.value && _.value >= ti), ie = i(() => X.value && !re.value), ae = i(() => an(J.value)), { emptyStateProps: oe, showBadgeEmptyState: ce, showCustomEmptyState: fe, showInlineEmptyState: pe } = cn({
|
|
3167
3057
|
emptyStateMode: N(d, "emptyStateMode"),
|
|
3168
3058
|
itemCount: i(() => d.items.length),
|
|
3169
3059
|
loading: N(d, "loading"),
|
|
@@ -3176,7 +3066,7 @@ var Sr = {
|
|
|
3176
3066
|
window.removeEventListener("resize", me);
|
|
3177
3067
|
});
|
|
3178
3068
|
function me() {
|
|
3179
|
-
_.value = window.innerWidth ||
|
|
3069
|
+
_.value = window.innerWidth || ti;
|
|
3180
3070
|
}
|
|
3181
3071
|
function he(e, t) {
|
|
3182
3072
|
C.registerImageElement(e, t), h.registerImageElement(e, t), t instanceof HTMLImageElement && ve(e, t);
|
|
@@ -3205,24 +3095,24 @@ var Sr = {
|
|
|
3205
3095
|
let a = i.play();
|
|
3206
3096
|
a && typeof a.catch == "function" && a.catch(() => {});
|
|
3207
3097
|
}
|
|
3208
|
-
return (e, n) => (w(), s("div",
|
|
3098
|
+
return (e, n) => (w(), s("div", Er, [
|
|
3209
3099
|
c("div", {
|
|
3210
3100
|
class: v(["absolute inset-0 transition-[background] duration-200", E.value]),
|
|
3211
3101
|
style: b(F(P))
|
|
3212
3102
|
}, null, 6),
|
|
3213
3103
|
c("div", {
|
|
3214
3104
|
class: "relative z-[1] grid h-full min-h-0",
|
|
3215
|
-
style: b(
|
|
3105
|
+
style: b(ne.value)
|
|
3216
3106
|
}, [c("div", {
|
|
3217
3107
|
ref: "viewer.stageRef",
|
|
3218
3108
|
"data-testid": "vibe-stage",
|
|
3219
3109
|
class: "relative h-full min-h-0 touch-none overflow-hidden",
|
|
3220
|
-
onPointerdown: n[
|
|
3221
|
-
onPointermove: n[
|
|
3222
|
-
onPointerup: n[
|
|
3223
|
-
onPointercancel: n[
|
|
3224
|
-
onWheel: n[
|
|
3225
|
-
}, [F(h).activeItem.value ? (w(), s("div",
|
|
3110
|
+
onPointerdown: n[1] ||= (...e) => F(h).onPointerDown && F(h).onPointerDown(...e),
|
|
3111
|
+
onPointermove: n[2] ||= (...e) => F(h).onPointerMove && F(h).onPointerMove(...e),
|
|
3112
|
+
onPointerup: n[3] ||= (...e) => F(h).onPointerUp && F(h).onPointerUp(...e),
|
|
3113
|
+
onPointercancel: n[4] ||= (...e) => F(h).onPointerCancel && F(h).onPointerCancel(...e),
|
|
3114
|
+
onWheel: n[5] ||= (...e) => F(h).onWheel && F(h).onWheel(...e)
|
|
3115
|
+
}, [F(h).activeItem.value ? (w(), s("div", Dr, [
|
|
3226
3116
|
(w(!0), s(t, null, O(F(h).renderedItems.value, ({ item: r, index: i }) => (w(), s("article", {
|
|
3227
3117
|
key: F(C).getItemKey(r),
|
|
3228
3118
|
"data-testid": "vibe-slide",
|
|
@@ -3239,7 +3129,7 @@ var Sr = {
|
|
|
3239
3129
|
}, null, 6), F(h).isVisual(r) ? (w(), s("div", {
|
|
3240
3130
|
key: 0,
|
|
3241
3131
|
class: v(["relative z-[1] flex h-full w-full items-center justify-center overflow-hidden", i === F(h).resolvedActiveIndex.value ? U.value : ""])
|
|
3242
|
-
}, [F(C).isAssetLoading(i, r) ? (w(), s("div",
|
|
3132
|
+
}, [F(C).isAssetLoading(i, r) ? (w(), s("div", kr, [c("span", Ar, [u(F(se), {
|
|
3243
3133
|
class: "h-5 w-5 animate-spin stroke-[1.9] text-[#f7f1ea]/78",
|
|
3244
3134
|
"aria-hidden": "true"
|
|
3245
3135
|
})])])) : o("", !0), F(C).isAssetErrored(i, r) ? (w(), s("div", {
|
|
@@ -3247,19 +3137,19 @@ var Sr = {
|
|
|
3247
3137
|
"data-testid": "vibe-asset-error",
|
|
3248
3138
|
"data-kind": F(C).getAssetErrorKind(r),
|
|
3249
3139
|
class: "grid h-full w-full place-items-center"
|
|
3250
|
-
}, [c("div",
|
|
3140
|
+
}, [c("div", Mr, [
|
|
3251
3141
|
u(F(de), {
|
|
3252
3142
|
class: "h-7 w-7 stroke-[1.9] text-[#f7f1ea]/72",
|
|
3253
3143
|
"aria-hidden": "true"
|
|
3254
3144
|
}),
|
|
3255
|
-
c("p",
|
|
3145
|
+
c("p", Nr, M(F(C).getAssetErrorLabel(r)), 1),
|
|
3256
3146
|
F(h).canRetryAsset(F(C).getItemKey(r)) ? (w(), s("button", {
|
|
3257
3147
|
key: 0,
|
|
3258
3148
|
type: "button",
|
|
3259
3149
|
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",
|
|
3260
3150
|
onClick: H((e) => F(h).retryAsset(F(C).getItemKey(r)), ["stop"])
|
|
3261
|
-
}, " Retry ", 8,
|
|
3262
|
-
])], 8,
|
|
3151
|
+
}, " Retry ", 8, Pr)) : o("", !0)
|
|
3152
|
+
])], 8, jr)) : r.type === "image" ? (w(), s("img", {
|
|
3263
3153
|
key: F(h).getAssetRenderKey(F(C).getItemKey(r)),
|
|
3264
3154
|
src: F(C).getFullscreenImageSource(i, r),
|
|
3265
3155
|
alt: r.title ?? "",
|
|
@@ -3270,7 +3160,7 @@ var Sr = {
|
|
|
3270
3160
|
ref: (e) => he(F(C).getItemKey(r), e),
|
|
3271
3161
|
onLoad: (e) => F(R).onFullscreenImageLoad(e, i, r),
|
|
3272
3162
|
onError: (e) => F(R).onFullscreenImageError(i, r)
|
|
3273
|
-
}, null, 42,
|
|
3163
|
+
}, null, 42, Fr)) : (w(), s("video", {
|
|
3274
3164
|
key: F(h).getAssetRenderKey(F(C).getItemKey(r)),
|
|
3275
3165
|
class: v(["block h-auto max-h-full w-auto max-w-full cursor-pointer object-contain shadow-[0_40px_120px_-60px_rgba(0,0,0,0.9)] transition-opacity duration-300", F(h).isMediaReady(F(C).getItemKey(r)) ? "opacity-100" : "opacity-0"]),
|
|
3276
3166
|
playsinline: "",
|
|
@@ -3294,10 +3184,10 @@ var Sr = {
|
|
|
3294
3184
|
onStalled: (e) => Z(i, r, e),
|
|
3295
3185
|
onTimeupdate: (e) => Z(i, r, e),
|
|
3296
3186
|
onWaiting: (e) => Z(i, r, e)
|
|
3297
|
-
}, null, 42,
|
|
3187
|
+
}, null, 42, Ir))], 2)) : F(h).isAudio(r) ? (w(), s("div", {
|
|
3298
3188
|
key: 1,
|
|
3299
3189
|
class: v(["relative z-[1] grid w-full max-w-[1100px] justify-items-center gap-6 px-[clamp(2rem,4vw,3rem)] py-[clamp(2rem,4vw,3rem)] text-center", i === F(h).resolvedActiveIndex.value ? U.value : ""])
|
|
3300
|
-
}, [c("div",
|
|
3190
|
+
}, [c("div", Lr, [
|
|
3301
3191
|
c("button", {
|
|
3302
3192
|
type: "button",
|
|
3303
3193
|
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]",
|
|
@@ -3305,25 +3195,25 @@ var Sr = {
|
|
|
3305
3195
|
disabled: !!F(C).getAssetErrorKind(r),
|
|
3306
3196
|
onClick: (e) => F(h).onAudioCoverClick(e, F(C).getItemKey(r))
|
|
3307
3197
|
}, [
|
|
3308
|
-
n[
|
|
3309
|
-
n[
|
|
3310
|
-
c("span",
|
|
3198
|
+
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),
|
|
3199
|
+
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),
|
|
3200
|
+
c("span", zr, [k(e.$slots, "item-icon", {
|
|
3311
3201
|
icon: F(Gt)(r.type),
|
|
3312
3202
|
item: r
|
|
3313
3203
|
}, () => [(w(), a(A(F(Gt)(r.type)), {
|
|
3314
3204
|
class: "h-6 w-6 stroke-[1.9]",
|
|
3315
3205
|
"aria-hidden": "true"
|
|
3316
3206
|
}))])]),
|
|
3317
|
-
c("span",
|
|
3207
|
+
c("span", Br, [(w(), a(A(F(h).mediaStates.value[F(C).getItemKey(r)]?.paused ?? !0 ? F(ue) : F(le)), {
|
|
3318
3208
|
class: "h-4 w-4 stroke-2",
|
|
3319
3209
|
"aria-hidden": "true"
|
|
3320
3210
|
}))])
|
|
3321
|
-
], 8,
|
|
3322
|
-
F(C).isAssetLoading(i, r) ? (w(), s("div",
|
|
3211
|
+
], 8, Rr),
|
|
3212
|
+
F(C).isAssetLoading(i, r) ? (w(), s("div", Vr, [c("span", Hr, [u(F(se), {
|
|
3323
3213
|
class: "h-5 w-5 animate-spin stroke-[1.9] text-[#f7f1ea]/78",
|
|
3324
3214
|
"aria-hidden": "true"
|
|
3325
3215
|
})])])) : o("", !0),
|
|
3326
|
-
F(C).getAssetErrorKind(r) ? (w(), s(t, { key: 1 }, [n[
|
|
3216
|
+
F(C).getAssetErrorKind(r) ? (w(), s(t, { key: 1 }, [n[8] ||= c("div", { class: "pointer-events-none absolute inset-0 border border-white/8 bg-[radial-gradient(circle,rgba(239,68,68,0.12),transparent_66%)]" }, null, -1), c("div", {
|
|
3327
3217
|
"data-testid": "vibe-asset-error",
|
|
3328
3218
|
"data-kind": F(C).getAssetErrorKind(r),
|
|
3329
3219
|
class: "relative z-[1] grid justify-items-center gap-4"
|
|
@@ -3332,14 +3222,14 @@ var Sr = {
|
|
|
3332
3222
|
class: "h-7 w-7 stroke-[1.9] text-[#f7f1ea]/72",
|
|
3333
3223
|
"aria-hidden": "true"
|
|
3334
3224
|
}),
|
|
3335
|
-
c("p",
|
|
3225
|
+
c("p", Wr, M(F(C).getAssetErrorLabel(r)), 1),
|
|
3336
3226
|
F(h).canRetryAsset(F(C).getItemKey(r)) ? (w(), s("button", {
|
|
3337
3227
|
key: 0,
|
|
3338
3228
|
type: "button",
|
|
3339
3229
|
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",
|
|
3340
3230
|
onClick: H((e) => F(h).retryAsset(F(C).getItemKey(r)), ["stop"])
|
|
3341
|
-
}, " Retry ", 8,
|
|
3342
|
-
], 8,
|
|
3231
|
+
}, " Retry ", 8, Gr)) : o("", !0)
|
|
3232
|
+
], 8, Ur)], 64)) : o("", !0)
|
|
3343
3233
|
]), (w(), s("audio", {
|
|
3344
3234
|
key: F(h).getAssetRenderKey(F(C).getItemKey(r)),
|
|
3345
3235
|
src: F(C).getFullscreenMediaSource(i, r),
|
|
@@ -3360,14 +3250,14 @@ var Sr = {
|
|
|
3360
3250
|
onStalled: (e) => Z(i, r, e),
|
|
3361
3251
|
onTimeupdate: (e) => Z(i, r, e),
|
|
3362
3252
|
onWaiting: (e) => Z(i, r, e)
|
|
3363
|
-
}, null, 40,
|
|
3253
|
+
}, null, 40, Kr))], 2)) : (w(), s("div", qr, [c("div", Jr, [k(e.$slots, "item-icon", {
|
|
3364
3254
|
icon: F(Gt)(r.type),
|
|
3365
3255
|
item: r
|
|
3366
3256
|
}, () => [(w(), a(A(F(Gt)(r.type)), {
|
|
3367
3257
|
class: "h-6 w-6 stroke-[1.9]",
|
|
3368
3258
|
"aria-hidden": "true"
|
|
3369
|
-
}))])])]))], 14,
|
|
3370
|
-
|
|
3259
|
+
}))])])]))], 14, Or))), 128)),
|
|
3260
|
+
W.value && f["fullscreen-overlay"] ? (w(), s("div", Yr, [c("div", Xr, [k(e.$slots, "fullscreen-overlay", y(p(W.value)))])])) : o("", !0),
|
|
3371
3261
|
F(h).activeItem.value ? (w(), a(Ht, {
|
|
3372
3262
|
key: 1,
|
|
3373
3263
|
"current-index": F(h).resolvedActiveIndex.value,
|
|
@@ -3378,9 +3268,9 @@ var Sr = {
|
|
|
3378
3268
|
title: F(h).activeItem.value.title ?? null,
|
|
3379
3269
|
total: F(h).items.value.length,
|
|
3380
3270
|
onBackToList: n[0] ||= (e) => m("back-to-list")
|
|
3381
|
-
}, l({ _: 2 }, [
|
|
3271
|
+
}, l({ _: 2 }, [Y.value && W.value ? {
|
|
3382
3272
|
name: "actions",
|
|
3383
|
-
fn: B(() => [k(e.$slots, "fullscreen-header-actions", y(p(
|
|
3273
|
+
fn: B(() => [k(e.$slots, "fullscreen-header-actions", y(p(W.value)))]),
|
|
3384
3274
|
key: "0"
|
|
3385
3275
|
} : void 0]), 1032, [
|
|
3386
3276
|
"current-index",
|
|
@@ -3391,11 +3281,6 @@ var Sr = {
|
|
|
3391
3281
|
"title",
|
|
3392
3282
|
"total"
|
|
3393
3283
|
])) : o("", !0),
|
|
3394
|
-
u(jr, {
|
|
3395
|
-
"active-index": F(h).resolvedActiveIndex.value,
|
|
3396
|
-
items: F(h).items.value,
|
|
3397
|
-
onSelect: n[1] ||= (e) => m("update:activeIndex", e)
|
|
3398
|
-
}, null, 8, ["active-index", "items"]),
|
|
3399
3284
|
ee.value ? (w(), a(jt, {
|
|
3400
3285
|
key: 2,
|
|
3401
3286
|
"current-time": F(h).activeMediaState.value.currentTime,
|
|
@@ -3426,15 +3311,15 @@ var Sr = {
|
|
|
3426
3311
|
"onVolumeInput",
|
|
3427
3312
|
"onVolumeToggle"
|
|
3428
3313
|
])) : o("", !0),
|
|
3429
|
-
|
|
3314
|
+
q.value ? (w(), s("div", {
|
|
3430
3315
|
key: 3,
|
|
3431
3316
|
class: v(["absolute left-1/2 z-[4] -translate-x-1/2", z.value])
|
|
3432
|
-
}, [
|
|
3317
|
+
}, [ae.value ? k(e.$slots, "fullscreen-status", y(g({ key: 0 }, q.value))) : (w(), s("div", {
|
|
3433
3318
|
key: 1,
|
|
3434
3319
|
"data-testid": "vibe-fullscreen-status-badge",
|
|
3435
|
-
class: v(["inline-flex w-auto items-center border border-white/14 bg-black/40 px-5 py-3 text-[0.75rem] font-bold uppercase tracking-[0.18em] text-[#f7f1ea]/74 backdrop-blur-[18px] max-[720px]:w-[calc(100%-2.5rem)] max-[720px]:justify-center",
|
|
3436
|
-
}, M(
|
|
3437
|
-
])) :
|
|
3320
|
+
class: v(["inline-flex w-auto items-center border border-white/14 bg-black/40 px-5 py-3 text-[0.75rem] font-bold uppercase tracking-[0.18em] text-[#f7f1ea]/74 backdrop-blur-[18px] max-[720px]:w-[calc(100%-2.5rem)] max-[720px]:justify-center", q.value.kind === "end" ? "border-amber-300/35 text-amber-200" : q.value.kind === "failed" ? "border-rose-400/45 text-rose-100" : ""])
|
|
3321
|
+
}, M(q.value.message), 3))], 2)) : o("", !0)
|
|
3322
|
+
])) : te.value ? (w(), a($n, {
|
|
3438
3323
|
key: 1,
|
|
3439
3324
|
"fill-collected-count": d.fillCollectedCount,
|
|
3440
3325
|
"fill-completed-calls": d.fillCompletedCalls,
|
|
@@ -3459,25 +3344,25 @@ var Sr = {
|
|
|
3459
3344
|
"has-next-page",
|
|
3460
3345
|
"phase",
|
|
3461
3346
|
"status-message"
|
|
3462
|
-
])) : F(pe) && F(
|
|
3347
|
+
])) : F(pe) && F(oe) ? (w(), a(nr, {
|
|
3463
3348
|
key: 2,
|
|
3464
|
-
message: F(
|
|
3465
|
-
mode: F(
|
|
3466
|
-
surface: F(
|
|
3349
|
+
message: F(oe).message,
|
|
3350
|
+
mode: F(oe).mode,
|
|
3351
|
+
surface: F(oe).surface
|
|
3467
3352
|
}, {
|
|
3468
|
-
default: B(() => [F(fe) ? k(e.$slots, "empty-state", y(g({ key: 0 }, F(
|
|
3353
|
+
default: B(() => [F(fe) ? k(e.$slots, "empty-state", y(g({ key: 0 }, F(oe)))) : o("", !0)]),
|
|
3469
3354
|
_: 3
|
|
3470
3355
|
}, 8, [
|
|
3471
3356
|
"message",
|
|
3472
3357
|
"mode",
|
|
3473
3358
|
"surface"
|
|
3474
|
-
])) : o("", !0), F(ce) && F(
|
|
3359
|
+
])) : o("", !0), F(ce) && F(oe) ? (w(), a(nr, {
|
|
3475
3360
|
key: 3,
|
|
3476
|
-
message: F(
|
|
3477
|
-
mode: F(
|
|
3478
|
-
surface: F(
|
|
3361
|
+
message: F(oe).message,
|
|
3362
|
+
mode: F(oe).mode,
|
|
3363
|
+
surface: F(oe).surface
|
|
3479
3364
|
}, {
|
|
3480
|
-
default: B(() => [F(fe) ? k(e.$slots, "empty-state", y(g({ key: 0 }, F(
|
|
3365
|
+
default: B(() => [F(fe) ? k(e.$slots, "empty-state", y(g({ key: 0 }, F(oe)))) : o("", !0)]),
|
|
3481
3366
|
_: 3
|
|
3482
3367
|
}, 8, [
|
|
3483
3368
|
"message",
|
|
@@ -3491,7 +3376,7 @@ var Sr = {
|
|
|
3491
3376
|
"leave-from-class": "translate-x-0 opacity-100",
|
|
3492
3377
|
"leave-to-class": "translate-x-full opacity-0"
|
|
3493
3378
|
}, {
|
|
3494
|
-
default: B(() => [
|
|
3379
|
+
default: B(() => [re.value && W.value ? (w(), s("aside", Zr, [c("div", Qr, [k(e.$slots, "fullscreen-aside", y(p(W.value)))])])) : o("", !0)]),
|
|
3495
3380
|
_: 3
|
|
3496
3381
|
})], 4),
|
|
3497
3382
|
u(r, {
|
|
@@ -3502,7 +3387,7 @@ var Sr = {
|
|
|
3502
3387
|
"leave-from-class": "translate-x-0 opacity-100",
|
|
3503
3388
|
"leave-to-class": "translate-x-full opacity-0"
|
|
3504
3389
|
}, {
|
|
3505
|
-
default: B(() => [
|
|
3390
|
+
default: B(() => [ie.value && W.value ? (w(), s("aside", $r, [c("div", ei, [k(e.$slots, "fullscreen-aside", y(p(W.value)))])])) : o("", !0)]),
|
|
3506
3391
|
_: 3
|
|
3507
3392
|
})
|
|
3508
3393
|
]));
|
|
@@ -3510,10 +3395,10 @@ var Sr = {
|
|
|
3510
3395
|
});
|
|
3511
3396
|
//#endregion
|
|
3512
3397
|
//#region src/components/viewer-core/masonryLayoutState.ts
|
|
3513
|
-
function
|
|
3398
|
+
function ii(e) {
|
|
3514
3399
|
let t = j([]), n = j([]), r = j(/* @__PURE__ */ new Map()), i = j(0), a = j(/* @__PURE__ */ new Map()), o = j([]);
|
|
3515
3400
|
function s(s, c, l) {
|
|
3516
|
-
let u =
|
|
3401
|
+
let u = lr(s, {
|
|
3517
3402
|
columnCount: c,
|
|
3518
3403
|
columnWidth: l,
|
|
3519
3404
|
gapX: e.gapPx,
|
|
@@ -3523,7 +3408,7 @@ function pi(e) {
|
|
|
3523
3408
|
t.value = u.positions.map(d), n.value = u.heights, r.value = u.buckets, i.value = u.contentHeight, a.value = u.indexById, o.value = u.columnHeights;
|
|
3524
3409
|
}
|
|
3525
3410
|
function c(s, c, l, d) {
|
|
3526
|
-
i.value =
|
|
3411
|
+
i.value = ur(u(), s, {
|
|
3527
3412
|
columnCount: l,
|
|
3528
3413
|
columnWidth: d,
|
|
3529
3414
|
gapX: e.gapPx,
|
|
@@ -3535,7 +3420,7 @@ function pi(e) {
|
|
|
3535
3420
|
}).contentHeight, P(t), P(n), P(r), P(a), P(o);
|
|
3536
3421
|
}
|
|
3537
3422
|
function l(e, n, r, i) {
|
|
3538
|
-
return
|
|
3423
|
+
return fr({
|
|
3539
3424
|
addedItems: r.addedItems,
|
|
3540
3425
|
columnCount: i,
|
|
3541
3426
|
columnHeights: o.value,
|
|
@@ -3576,21 +3461,24 @@ function pi(e) {
|
|
|
3576
3461
|
}
|
|
3577
3462
|
//#endregion
|
|
3578
3463
|
//#region src/components/viewer-core/useMasonryMotion.ts
|
|
3579
|
-
var
|
|
3580
|
-
function
|
|
3464
|
+
var ai = 300, oi = 600, si = 40, ci = 300, li = 400, ui = 300;
|
|
3465
|
+
function di(e, t) {
|
|
3581
3466
|
return t === "top" ? [...e].reverse() : e;
|
|
3582
3467
|
}
|
|
3583
|
-
function
|
|
3584
|
-
return e <= 0 ?
|
|
3468
|
+
function fi(e) {
|
|
3469
|
+
return e <= 0 ? oi : oi + Math.min((e - 1) * si, li);
|
|
3470
|
+
}
|
|
3471
|
+
function pi(e, t, n = ui) {
|
|
3472
|
+
return e + t > n;
|
|
3585
3473
|
}
|
|
3586
|
-
function
|
|
3587
|
-
return
|
|
3474
|
+
function mi() {
|
|
3475
|
+
return ci;
|
|
3588
3476
|
}
|
|
3589
|
-
function
|
|
3477
|
+
function hi(e) {
|
|
3590
3478
|
let t = e.itemHeight > 0 ? e.itemHeight : e.columnWidth;
|
|
3591
3479
|
return e.direction === "top" ? e.scrollTop - t : e.scrollTop + e.viewportHeight + t;
|
|
3592
3480
|
}
|
|
3593
|
-
function
|
|
3481
|
+
function gi(e) {
|
|
3594
3482
|
let t = D(/* @__PURE__ */ new Set()), n = D(/* @__PURE__ */ new Set()), r = D(/* @__PURE__ */ new Map()), a = D(/* @__PURE__ */ new Map()), o = D(/* @__PURE__ */ new Map()), s = D(/* @__PURE__ */ new Set()), c = D(/* @__PURE__ */ new Map()), l = D(/* @__PURE__ */ new Map()), u = D(/* @__PURE__ */ new Set()), d = /* @__PURE__ */ new Set(), f = /* @__PURE__ */ new Set(), p = i(() => Array.from(o.value.values()));
|
|
3595
3483
|
z(e.visibleIndices, (i) => {
|
|
3596
3484
|
if (!i.length) return;
|
|
@@ -3600,20 +3488,20 @@ function Ci(e) {
|
|
|
3600
3488
|
!r || !t.value.has(r) || d.has(r) || (d.add(r), o.push(r));
|
|
3601
3489
|
}
|
|
3602
3490
|
if (!o.length) return;
|
|
3603
|
-
let s =
|
|
3604
|
-
for (let e = 0; e < s.length; e += 1) c.set(s[e], Math.min(e *
|
|
3605
|
-
r.value = c,
|
|
3491
|
+
let s = di(o, a.value.get(o[0]) ?? "bottom"), c = new Map(r.value);
|
|
3492
|
+
for (let e = 0; e < s.length; e += 1) c.set(s[e], Math.min(e * si, li));
|
|
3493
|
+
r.value = c, _i(() => {
|
|
3606
3494
|
let e = new Set(n.value);
|
|
3607
3495
|
for (let t of o) e.add(t);
|
|
3608
3496
|
n.value = e;
|
|
3609
|
-
}),
|
|
3497
|
+
}), vi(() => {
|
|
3610
3498
|
let e = new Set(t.value);
|
|
3611
3499
|
for (let t of o) e.delete(t);
|
|
3612
|
-
t.value = e,
|
|
3500
|
+
t.value = e, w(() => {
|
|
3613
3501
|
let e = new Set(n.value), t = new Map(r.value), i = new Map(a.value);
|
|
3614
3502
|
for (let n of o) e.delete(n), t.delete(n), i.delete(n), d.delete(n);
|
|
3615
3503
|
n.value = e, r.value = t, a.value = i;
|
|
3616
|
-
},
|
|
3504
|
+
}, fi(o.length));
|
|
3617
3505
|
});
|
|
3618
3506
|
}, { flush: "post" }), z(() => e.items.value.map((e) => $(e)), (e) => {
|
|
3619
3507
|
if (!e.length || !o.value.size) return;
|
|
@@ -3624,33 +3512,51 @@ function Ci(e) {
|
|
|
3624
3512
|
for (let e of f) clearTimeout(e);
|
|
3625
3513
|
f.clear();
|
|
3626
3514
|
});
|
|
3627
|
-
function m(
|
|
3628
|
-
if (!
|
|
3629
|
-
let
|
|
3630
|
-
for (let t of
|
|
3631
|
-
let
|
|
3632
|
-
|
|
3515
|
+
function m(n, r = "bottom") {
|
|
3516
|
+
if (!n.length) return;
|
|
3517
|
+
let i = pi(t.value.size, n.length), o = i ? new Set(e.visibleIndices.value) : null, s = o ? h(o) : new Set(t.value), c = i ? g(s) : new Map(a.value);
|
|
3518
|
+
for (let t of n) {
|
|
3519
|
+
let n = $(t), a = i ? e.indexById.value.get(n) : null;
|
|
3520
|
+
o && (a == null || !o.has(a)) || (s.add(n), c.set(n, r));
|
|
3633
3521
|
}
|
|
3634
|
-
t.value =
|
|
3522
|
+
t.value = s, a.value = c;
|
|
3635
3523
|
}
|
|
3636
|
-
function h(
|
|
3524
|
+
function h(r) {
|
|
3525
|
+
let i = /* @__PURE__ */ new Set();
|
|
3526
|
+
for (let n of r) {
|
|
3527
|
+
let r = e.items.value[n], a = r ? $(r) : null;
|
|
3528
|
+
a && t.value.has(a) && i.add(a);
|
|
3529
|
+
}
|
|
3530
|
+
for (let e of d) t.value.has(e) && i.add(e);
|
|
3531
|
+
for (let e of n.value) t.value.has(e) && i.add(e);
|
|
3532
|
+
return i;
|
|
3533
|
+
}
|
|
3534
|
+
function g(e) {
|
|
3535
|
+
let t = /* @__PURE__ */ new Map();
|
|
3536
|
+
for (let n of e) {
|
|
3537
|
+
let e = a.value.get(n);
|
|
3538
|
+
e && t.set(n, e);
|
|
3539
|
+
}
|
|
3540
|
+
return t;
|
|
3541
|
+
}
|
|
3542
|
+
function _(e) {
|
|
3637
3543
|
if (!e.length) return;
|
|
3638
3544
|
let i = new Map(o.value), c = new Set(t.value), l = new Set(n.value), u = new Map(r.value), f = new Map(a.value), p = [];
|
|
3639
3545
|
for (let t of e) {
|
|
3640
3546
|
let e = $(t.item);
|
|
3641
3547
|
p.push(e), i.set(e, t), c.delete(e), l.delete(e), u.delete(e), f.delete(e), d.delete(e);
|
|
3642
3548
|
}
|
|
3643
|
-
o.value = i, t.value = c, n.value = l, r.value = u, a.value = f,
|
|
3549
|
+
o.value = i, t.value = c, n.value = l, r.value = u, a.value = f, _i(() => {
|
|
3644
3550
|
let e = new Set(s.value);
|
|
3645
3551
|
for (let t of p) e.add(t);
|
|
3646
3552
|
s.value = e;
|
|
3647
|
-
}),
|
|
3553
|
+
}), w(() => {
|
|
3648
3554
|
let e = new Map(o.value), t = new Set(s.value);
|
|
3649
3555
|
for (let n of p) e.delete(n), t.delete(n);
|
|
3650
3556
|
o.value = e, s.value = t;
|
|
3651
|
-
},
|
|
3557
|
+
}, ci);
|
|
3652
3558
|
}
|
|
3653
|
-
function
|
|
3559
|
+
function v(t, n, r = ai) {
|
|
3654
3560
|
if (!t.size) return;
|
|
3655
3561
|
let i = /* @__PURE__ */ new Map(), a = [];
|
|
3656
3562
|
for (let [r, o] of t.entries()) {
|
|
@@ -3669,27 +3575,27 @@ function Ci(e) {
|
|
|
3669
3575
|
c.value = i, u.value = /* @__PURE__ */ new Set();
|
|
3670
3576
|
let o = new Map(l.value);
|
|
3671
3577
|
for (let e of a) o.set(e, r);
|
|
3672
|
-
l.value = o,
|
|
3673
|
-
u.value = new Set(a),
|
|
3578
|
+
l.value = o, _i(() => {
|
|
3579
|
+
u.value = new Set(a), _i(() => {
|
|
3674
3580
|
c.value = /* @__PURE__ */ new Map();
|
|
3675
3581
|
});
|
|
3676
|
-
}),
|
|
3582
|
+
}), w(() => {
|
|
3677
3583
|
u.value = /* @__PURE__ */ new Set();
|
|
3678
3584
|
let e = new Map(l.value);
|
|
3679
3585
|
for (let t of a) e.delete(t);
|
|
3680
3586
|
l.value = e;
|
|
3681
3587
|
}, r);
|
|
3682
3588
|
}
|
|
3683
|
-
function
|
|
3684
|
-
if (n.value.has(e)) return `transform ${
|
|
3685
|
-
if (u.value.has(e)) return `transform ${l.value.get(e) ??
|
|
3589
|
+
function y(e) {
|
|
3590
|
+
if (n.value.has(e)) return `transform ${oi}ms ease-out`;
|
|
3591
|
+
if (u.value.has(e)) return `transform ${l.value.get(e) ?? ai}ms ease-out`;
|
|
3686
3592
|
}
|
|
3687
|
-
function
|
|
3593
|
+
function b(e) {
|
|
3688
3594
|
if (!n.value.has(e)) return;
|
|
3689
3595
|
let t = r.value.get(e) ?? 0;
|
|
3690
3596
|
return t > 0 ? `${t}ms` : void 0;
|
|
3691
3597
|
}
|
|
3692
|
-
function
|
|
3598
|
+
function S(n) {
|
|
3693
3599
|
let r = e.items.value[n], i = e.positions.value[n] ?? {
|
|
3694
3600
|
x: 0,
|
|
3695
3601
|
y: 0
|
|
@@ -3699,7 +3605,7 @@ function Ci(e) {
|
|
|
3699
3605
|
} : {
|
|
3700
3606
|
dx: 0,
|
|
3701
3607
|
dy: 0
|
|
3702
|
-
}, u = s ? a.value.get(s) ?? "bottom" : "bottom", d = s && t.value.has(s) ?
|
|
3608
|
+
}, u = s ? a.value.get(s) ?? "bottom" : "bottom", d = s && t.value.has(s) ? hi({
|
|
3703
3609
|
columnWidth: e.columnWidth.value,
|
|
3704
3610
|
direction: u,
|
|
3705
3611
|
itemHeight: o,
|
|
@@ -3708,61 +3614,61 @@ function Ci(e) {
|
|
|
3708
3614
|
}) : i.y;
|
|
3709
3615
|
return `translate3d(${i.x + l.dx}px, ${d + l.dy}px, 0)`;
|
|
3710
3616
|
}
|
|
3711
|
-
function
|
|
3617
|
+
function C(t) {
|
|
3712
3618
|
let n = $(t), r = o.value.get(n);
|
|
3713
3619
|
if (!r) return {
|
|
3714
3620
|
opacity: "0",
|
|
3715
3621
|
transform: "translate3d(0, 0, 0) scale(0.96)",
|
|
3716
|
-
transition: `opacity ${
|
|
3622
|
+
transition: `opacity ${ci}ms ease-out, transform ${ci}ms ease-out`
|
|
3717
3623
|
};
|
|
3718
3624
|
let i = s.value.has(n);
|
|
3719
3625
|
return {
|
|
3720
3626
|
height: `${r.height}px`,
|
|
3721
3627
|
opacity: i ? "0" : "1",
|
|
3722
3628
|
transform: `translate3d(${r.position.x}px, ${r.position.y}px, 0) scale(${i ? "0.96" : "1"})`,
|
|
3723
|
-
transition: `opacity ${
|
|
3629
|
+
transition: `opacity ${ci}ms ease-out, transform ${ci}ms ease-out`,
|
|
3724
3630
|
width: `${e.columnWidth.value}px`
|
|
3725
3631
|
};
|
|
3726
3632
|
}
|
|
3727
|
-
function
|
|
3633
|
+
function w(e, t) {
|
|
3728
3634
|
let n = setTimeout(() => {
|
|
3729
3635
|
f.delete(n), e();
|
|
3730
3636
|
}, t);
|
|
3731
3637
|
f.add(n);
|
|
3732
3638
|
}
|
|
3733
3639
|
return {
|
|
3734
|
-
getCardTransform:
|
|
3735
|
-
getCardTransition:
|
|
3736
|
-
getCardTransitionDelay:
|
|
3737
|
-
getLeavingCardStyle:
|
|
3640
|
+
getCardTransform: S,
|
|
3641
|
+
getCardTransition: y,
|
|
3642
|
+
getCardTransitionDelay: b,
|
|
3643
|
+
getLeavingCardStyle: C,
|
|
3738
3644
|
leavingItems: p,
|
|
3739
3645
|
markEnter: m,
|
|
3740
|
-
markLeave:
|
|
3741
|
-
playFlipMoveAnimation:
|
|
3646
|
+
markLeave: _,
|
|
3647
|
+
playFlipMoveAnimation: v
|
|
3742
3648
|
};
|
|
3743
3649
|
}
|
|
3744
|
-
function
|
|
3650
|
+
function _i(e) {
|
|
3745
3651
|
if (typeof requestAnimationFrame == "function") {
|
|
3746
3652
|
requestAnimationFrame(() => e());
|
|
3747
3653
|
return;
|
|
3748
3654
|
}
|
|
3749
3655
|
setTimeout(e, 0);
|
|
3750
3656
|
}
|
|
3751
|
-
function
|
|
3752
|
-
|
|
3657
|
+
function vi(e) {
|
|
3658
|
+
_i(() => _i(e));
|
|
3753
3659
|
}
|
|
3754
3660
|
//#endregion
|
|
3755
3661
|
//#region src/components/viewer-core/masonryViewport.ts
|
|
3756
|
-
function
|
|
3662
|
+
function yi(e, t) {
|
|
3757
3663
|
return e?.clientHeight || Math.round(e?.getBoundingClientRect().height ?? 0) || t || window.innerHeight || 1;
|
|
3758
3664
|
}
|
|
3759
|
-
function
|
|
3665
|
+
function bi(e, t, n) {
|
|
3760
3666
|
return e?.clientWidth || Math.round(e?.getBoundingClientRect().width ?? 0) || t || window.innerWidth || n;
|
|
3761
3667
|
}
|
|
3762
|
-
function
|
|
3668
|
+
function xi(e, t, n, r) {
|
|
3763
3669
|
return Math.max(e?.scrollHeight ?? 0, r) - (t + n);
|
|
3764
3670
|
}
|
|
3765
|
-
function
|
|
3671
|
+
function Si(e, t) {
|
|
3766
3672
|
return {
|
|
3767
3673
|
height: `${e}px`,
|
|
3768
3674
|
transform: `translate3d(0, ${t}px, 0)`
|
|
@@ -3770,11 +3676,11 @@ function ki(e, t) {
|
|
|
3770
3676
|
}
|
|
3771
3677
|
//#endregion
|
|
3772
3678
|
//#region src/components/viewer-core/masonryScrollBehavior.ts
|
|
3773
|
-
var
|
|
3774
|
-
function
|
|
3679
|
+
var Ci = 24, wi = 48;
|
|
3680
|
+
function Ti(e) {
|
|
3775
3681
|
let t = D(0), n = 0, r = 0;
|
|
3776
3682
|
function i(e) {
|
|
3777
|
-
if (t.value =
|
|
3683
|
+
if (t.value = Ai(e), t.value <= 0) {
|
|
3778
3684
|
o();
|
|
3779
3685
|
return;
|
|
3780
3686
|
}
|
|
@@ -3794,7 +3700,7 @@ function Mi(e) {
|
|
|
3794
3700
|
let s = e.getViewport();
|
|
3795
3701
|
if (s && r > 0) {
|
|
3796
3702
|
let n = Math.min(Math.max(0, i - r), 250), a = t.value * n / 1e3;
|
|
3797
|
-
s.scrollTop =
|
|
3703
|
+
s.scrollTop = ji(s.scrollTop + a, 0, e.getMaxScrollTop()), e.onScroll();
|
|
3798
3704
|
}
|
|
3799
3705
|
r = i, a();
|
|
3800
3706
|
}
|
|
@@ -3804,44 +3710,44 @@ function Mi(e) {
|
|
|
3804
3710
|
stop: o
|
|
3805
3711
|
};
|
|
3806
3712
|
}
|
|
3807
|
-
function
|
|
3713
|
+
function Ei(e) {
|
|
3808
3714
|
if (!e.active || !e.triggerEnabled) return 0;
|
|
3809
3715
|
let t = Math.max(0, e.maxScrollTop - e.thresholdPx);
|
|
3810
|
-
return t <= 0 ? 1 :
|
|
3716
|
+
return t <= 0 ? 1 : ji(1 - (e.progressDistancePx - e.thresholdPx) / t, 0, 1);
|
|
3811
3717
|
}
|
|
3812
|
-
function
|
|
3718
|
+
function Di(e) {
|
|
3813
3719
|
if (!e.active || !e.triggerEnabled) return 0;
|
|
3814
3720
|
let t = Math.max(0, e.maxScrollTop - e.thresholdPx);
|
|
3815
|
-
return t <= 0 ? 1 :
|
|
3721
|
+
return t <= 0 ? 1 : ji(e.progressDistancePx / t, 0, 1);
|
|
3816
3722
|
}
|
|
3817
|
-
function
|
|
3818
|
-
let t = i(() => Math.max(0, e.viewportHeight.value -
|
|
3723
|
+
function Oi(e) {
|
|
3724
|
+
let t = i(() => Math.max(0, e.viewportHeight.value - Ci * 2)), n = i(() => e.containerHeight.value > e.viewportHeight.value + 1 && t.value > 0), r = i(() => {
|
|
3819
3725
|
if (!n.value) return 0;
|
|
3820
3726
|
let r = e.viewportHeight.value / e.containerHeight.value * t.value;
|
|
3821
|
-
return Math.min(t.value, Math.max(
|
|
3727
|
+
return Math.min(t.value, Math.max(wi, r));
|
|
3822
3728
|
}), a = i(() => {
|
|
3823
|
-
if (!n.value) return
|
|
3729
|
+
if (!n.value) return Ci;
|
|
3824
3730
|
let i = Math.max(0, e.containerHeight.value - e.viewportHeight.value);
|
|
3825
|
-
return
|
|
3731
|
+
return Ci + Math.max(0, t.value - r.value) * (i > 0 ? ji(e.scrollTop.value / i, 0, 1) : 0);
|
|
3826
3732
|
});
|
|
3827
3733
|
return {
|
|
3828
|
-
getScrollbarThumbStyle: () =>
|
|
3734
|
+
getScrollbarThumbStyle: () => Si(r.value, a.value),
|
|
3829
3735
|
showScrollbar: n
|
|
3830
3736
|
};
|
|
3831
3737
|
}
|
|
3832
|
-
function
|
|
3738
|
+
function ki(e) {
|
|
3833
3739
|
return typeof e == "number" && Number.isFinite(e) ? Math.max(0, e) : 0;
|
|
3834
3740
|
}
|
|
3835
|
-
function
|
|
3741
|
+
function Ai(e) {
|
|
3836
3742
|
return Number.isFinite(e) ? Math.max(0, e) : 0;
|
|
3837
3743
|
}
|
|
3838
|
-
function
|
|
3744
|
+
function ji(e, t, n) {
|
|
3839
3745
|
return Math.min(Math.max(e, t), n);
|
|
3840
3746
|
}
|
|
3841
3747
|
//#endregion
|
|
3842
3748
|
//#region src/components/viewer-core/useEdgeBoundary.ts
|
|
3843
|
-
var
|
|
3844
|
-
function
|
|
3749
|
+
var Mi = 250, Ni = 1e3;
|
|
3750
|
+
function Pi(e) {
|
|
3845
3751
|
let t = D(!1), n = D(!1), r = D(0), i = D(0), a = D(!1), o = D(!1), s = D(!1), c = 0, l = null;
|
|
3846
3752
|
x(() => {
|
|
3847
3753
|
S();
|
|
@@ -3864,7 +3770,7 @@ function Vi(e) {
|
|
|
3864
3770
|
if (!C(t) || !e.isAtBoundary()) return;
|
|
3865
3771
|
let n = Date.now();
|
|
3866
3772
|
if (!(n < c)) {
|
|
3867
|
-
if (c = n +
|
|
3773
|
+
if (c = n + Mi, a.value) {
|
|
3868
3774
|
s.value = !0;
|
|
3869
3775
|
return;
|
|
3870
3776
|
}
|
|
@@ -3903,7 +3809,7 @@ function Vi(e) {
|
|
|
3903
3809
|
return e.hasPage.value && t.value && r.value > i.value && !e.interactionLocked?.value && !e.loading.value && !a.value && typeof e.requestPage.value == "function";
|
|
3904
3810
|
}
|
|
3905
3811
|
function v() {
|
|
3906
|
-
o.value = !1, y(
|
|
3812
|
+
o.value = !1, y(Ni);
|
|
3907
3813
|
}
|
|
3908
3814
|
function y(e) {
|
|
3909
3815
|
S(), a.value = !0, l = setTimeout(() => {
|
|
@@ -3935,7 +3841,7 @@ function Vi(e) {
|
|
|
3935
3841
|
}
|
|
3936
3842
|
//#endregion
|
|
3937
3843
|
//#region src/components/viewer-core/masonryBoundaryLock.ts
|
|
3938
|
-
function
|
|
3844
|
+
function Fi() {
|
|
3939
3845
|
let e = D(!1), t = null;
|
|
3940
3846
|
x(() => {
|
|
3941
3847
|
r();
|
|
@@ -3956,8 +3862,8 @@ function Hi() {
|
|
|
3956
3862
|
}
|
|
3957
3863
|
//#endregion
|
|
3958
3864
|
//#region src/components/viewer-core/masonryItemMutation.ts
|
|
3959
|
-
function
|
|
3960
|
-
let t = e.currentItems.map((e) => $(e)), n = e.previousItems.map((e) => $(e)), r =
|
|
3865
|
+
function Ii(e) {
|
|
3866
|
+
let t = e.currentItems.map((e) => $(e)), n = e.previousItems.map((e) => $(e)), r = Ri(e.previousItems, e.layoutIndexById, e.layoutHeights), i = zi(e.previousItems, e.layoutIndexById, e.layoutPositions), a = new Set(n), o = new Set(t), s = e.currentItems.filter((e) => !a.has($(e))), c = Li(e.previousItems, o, r, i), l = t.length > n.length && n.length > 0 && t[0] !== n[0], u = e.scrollTop > e.contentInsetPx + e.gapPx, d = l && u ? e.currentItems[e.activeIndex] : null;
|
|
3961
3867
|
return {
|
|
3962
3868
|
addedItems: s,
|
|
3963
3869
|
anchorId: d ? $(d) : null,
|
|
@@ -3969,7 +3875,7 @@ function Ui(e) {
|
|
|
3969
3875
|
shouldResetScrollForEmptyRemoval: e.currentItems.length === 0 && e.previousItems.length > 0 && c.length > 0 && e.scrollTop > 0
|
|
3970
3876
|
};
|
|
3971
3877
|
}
|
|
3972
|
-
function
|
|
3878
|
+
function Li(e, t, n, r) {
|
|
3973
3879
|
return e.flatMap((e) => {
|
|
3974
3880
|
let i = $(e);
|
|
3975
3881
|
if (t.has(i)) return [];
|
|
@@ -3981,7 +3887,7 @@ function Wi(e, t, n, r) {
|
|
|
3981
3887
|
}] : [];
|
|
3982
3888
|
});
|
|
3983
3889
|
}
|
|
3984
|
-
function
|
|
3890
|
+
function Ri(e, t, n) {
|
|
3985
3891
|
let r = /* @__PURE__ */ new Map();
|
|
3986
3892
|
for (let i of e) {
|
|
3987
3893
|
let e = $(i), a = t.get(e), o = a == null ? void 0 : n[a];
|
|
@@ -3989,7 +3895,7 @@ function Gi(e, t, n) {
|
|
|
3989
3895
|
}
|
|
3990
3896
|
return r;
|
|
3991
3897
|
}
|
|
3992
|
-
function
|
|
3898
|
+
function zi(e, t, n) {
|
|
3993
3899
|
let r = /* @__PURE__ */ new Map();
|
|
3994
3900
|
for (let i of e) {
|
|
3995
3901
|
let e = $(i), a = t.get(e), o = a == null ? void 0 : n[a];
|
|
@@ -3999,7 +3905,7 @@ function Ki(e, t, n) {
|
|
|
3999
3905
|
}
|
|
4000
3906
|
//#endregion
|
|
4001
3907
|
//#region src/components/viewer-core/masonryPendingAppend.ts
|
|
4002
|
-
function
|
|
3908
|
+
function Bi(e) {
|
|
4003
3909
|
let t = D(null), n = D(!1), r = null;
|
|
4004
3910
|
function i() {
|
|
4005
3911
|
o(), e.pendingAppendItems.value.length && (t.value = c([...e.items.value, ...e.pendingAppendItems.value]), s());
|
|
@@ -4022,12 +3928,12 @@ function qi(e) {
|
|
|
4022
3928
|
}, 300));
|
|
4023
3929
|
}
|
|
4024
3930
|
function c(t) {
|
|
4025
|
-
return t.length ? e.pendingAppendItems.value.length && e.columnHeights.value.length === e.columnCount.value ?
|
|
3931
|
+
return t.length ? e.pendingAppendItems.value.length && e.columnHeights.value.length === e.columnCount.value ? dr(e.pendingAppendItems.value, {
|
|
4026
3932
|
columnHeights: e.columnHeights.value,
|
|
4027
3933
|
columnWidth: e.columnWidth.value,
|
|
4028
3934
|
contentHeight: e.contentHeight.value,
|
|
4029
3935
|
gapY: e.gapPx
|
|
4030
|
-
}) + e.contentInsetPx * 2 :
|
|
3936
|
+
}) + e.contentInsetPx * 2 : lr(t, {
|
|
4031
3937
|
bucketPx: e.bucketPx,
|
|
4032
3938
|
columnCount: e.columnCount.value,
|
|
4033
3939
|
columnWidth: e.columnWidth.value,
|
|
@@ -4044,42 +3950,42 @@ function qi(e) {
|
|
|
4044
3950
|
}
|
|
4045
3951
|
//#endregion
|
|
4046
3952
|
//#region src/components/viewer-core/useMasonryList.ts
|
|
4047
|
-
var
|
|
4048
|
-
function
|
|
4049
|
-
let t = D(null), n = D(0), r = D(typeof window > "u" ? 0 : window.innerHeight || 0), a = D(typeof window > "u" ? 0 : window.innerWidth ||
|
|
4050
|
-
bucketPx:
|
|
4051
|
-
contentInsetPx:
|
|
4052
|
-
gapPx:
|
|
4053
|
-
}), { buckets: s, columnHeights: c, contentHeight: l, heights: u, indexById: d, positions: f } = o, p = D(null), m =
|
|
3953
|
+
var Vi = 600, Hi = 24, Ui = 16, Wi = 300, Gi = 200, Ki = 0, qi = 1, Ji = Hi + Ui, Yi = 200, Xi = 500, Zi = 1e3;
|
|
3954
|
+
function Qi(e) {
|
|
3955
|
+
let t = D(null), n = D(0), r = D(typeof window > "u" ? 0 : window.innerHeight || 0), a = D(typeof window > "u" ? 0 : window.innerWidth || Wi), o = ii({
|
|
3956
|
+
bucketPx: Vi,
|
|
3957
|
+
contentInsetPx: Hi,
|
|
3958
|
+
gapPx: Ui
|
|
3959
|
+
}), { buckets: s, columnHeights: c, contentHeight: l, heights: u, indexById: d, positions: f } = o, p = D(null), m = Fi(), h = i(() => Math.max(Wi, a.value - Hi * 2)), g = i(() => or(h.value, Wi)), v = i(() => sr(h.value, g.value, Wi, Ui)), y = i(() => ki(e.bottomLoadBufferPx.value)), b = i(() => $i(e.activeIndex.value, 0, Math.max(0, e.items.value.length - 1))), C = i(() => pr({
|
|
4054
3960
|
itemCount: e.items.value.length,
|
|
4055
3961
|
viewportHeight: r.value,
|
|
4056
3962
|
scrollTop: n.value,
|
|
4057
|
-
overscanPx:
|
|
4058
|
-
bucketPx:
|
|
3963
|
+
overscanPx: Gi,
|
|
3964
|
+
bucketPx: Vi,
|
|
4059
3965
|
buckets: s.value
|
|
4060
3966
|
})), w = i(() => C.value.map((t) => ({
|
|
4061
3967
|
item: e.items.value[t],
|
|
4062
3968
|
index: t
|
|
4063
3969
|
}))), T = i(() => {
|
|
4064
|
-
let e = l.value +
|
|
4065
|
-
return Math.max(e, t, r.value) +
|
|
4066
|
-
}), E = i(() => e.hasNextPage.value || e.allowExhaustedNextPageRefresh.value), O = i(() =>
|
|
3970
|
+
let e = l.value + Hi * 2, t = I.reservedContentHeight.value ?? 0;
|
|
3971
|
+
return Math.max(e, t, r.value) + Yi + y.value;
|
|
3972
|
+
}), E = i(() => e.hasNextPage.value || e.allowExhaustedNextPageRefresh.value), O = i(() => Di({
|
|
4067
3973
|
active: e.active.value,
|
|
4068
|
-
maxScrollTop:
|
|
3974
|
+
maxScrollTop: X(),
|
|
4069
3975
|
progressDistancePx: n.value,
|
|
4070
|
-
thresholdPx:
|
|
3976
|
+
thresholdPx: Ki,
|
|
4071
3977
|
triggerEnabled: E.value
|
|
4072
|
-
})), k = i(() => e.items.value.length > 0 ? `${b.value + 1} / ${e.items.value.length}` : "0 / 0"), A = i(() =>
|
|
3978
|
+
})), k = i(() => e.items.value.length > 0 ? `${b.value + 1} / ${e.items.value.length}` : "0 / 0"), A = i(() => Ei({
|
|
4073
3979
|
active: e.active.value,
|
|
4074
|
-
maxScrollTop:
|
|
3980
|
+
maxScrollTop: X(),
|
|
4075
3981
|
progressDistancePx: n.value,
|
|
4076
|
-
thresholdPx:
|
|
3982
|
+
thresholdPx: Ji,
|
|
4077
3983
|
triggerEnabled: e.hasPreviousPage.value
|
|
4078
|
-
})), j =
|
|
3984
|
+
})), j = Oi({
|
|
4079
3985
|
containerHeight: T,
|
|
4080
3986
|
scrollTop: n,
|
|
4081
3987
|
viewportHeight: r
|
|
4082
|
-
}), M =
|
|
3988
|
+
}), M = gi({
|
|
4083
3989
|
items: e.items,
|
|
4084
3990
|
visibleIndices: C,
|
|
4085
3991
|
positions: f,
|
|
@@ -4088,44 +3994,44 @@ function aa(e) {
|
|
|
4088
3994
|
columnWidth: v,
|
|
4089
3995
|
scrollTop: n,
|
|
4090
3996
|
viewportHeight: r
|
|
4091
|
-
}), N =
|
|
3997
|
+
}), N = Pi({
|
|
4092
3998
|
direction: "top",
|
|
4093
3999
|
getAnimationLockMs(e) {
|
|
4094
|
-
return Math.max(
|
|
4000
|
+
return Math.max(Xi, fi(e)) + Zi;
|
|
4095
4001
|
},
|
|
4096
4002
|
hasPage: e.hasPreviousPage,
|
|
4097
4003
|
interactionLocked: m.isBoundaryInteractionLocked,
|
|
4098
4004
|
isAtBoundary() {
|
|
4099
|
-
return n.value <=
|
|
4005
|
+
return n.value <= Ji;
|
|
4100
4006
|
},
|
|
4101
4007
|
loading: e.loading,
|
|
4102
4008
|
requestPage: e.requestPreviousPage
|
|
4103
|
-
}), P =
|
|
4009
|
+
}), P = Pi({
|
|
4104
4010
|
direction: "bottom",
|
|
4105
4011
|
getAnimationLockMs(e) {
|
|
4106
|
-
return
|
|
4012
|
+
return fi(e) + Zi;
|
|
4107
4013
|
},
|
|
4108
4014
|
hasPage: E,
|
|
4109
4015
|
interactionLocked: m.isBoundaryInteractionLocked,
|
|
4110
4016
|
isAtBoundary() {
|
|
4111
|
-
return
|
|
4017
|
+
return Y() <= qi;
|
|
4112
4018
|
},
|
|
4113
4019
|
loading: e.loading,
|
|
4114
4020
|
requestPage: e.requestNextPage
|
|
4115
|
-
}), F =
|
|
4021
|
+
}), F = Ti({
|
|
4116
4022
|
active: e.active,
|
|
4117
|
-
getMaxScrollTop:
|
|
4023
|
+
getMaxScrollTop: X,
|
|
4118
4024
|
getViewport: () => t.value,
|
|
4119
4025
|
onScroll: ee
|
|
4120
|
-
}), I =
|
|
4121
|
-
bucketPx:
|
|
4026
|
+
}), I = Bi({
|
|
4027
|
+
bucketPx: Vi,
|
|
4122
4028
|
columnHeights: c,
|
|
4123
4029
|
columnCount: g,
|
|
4124
4030
|
columnWidth: v,
|
|
4125
4031
|
commitPendingAppend: e.commitPendingAppend,
|
|
4126
4032
|
contentHeight: l,
|
|
4127
|
-
contentInsetPx:
|
|
4128
|
-
gapPx:
|
|
4033
|
+
contentInsetPx: Hi,
|
|
4034
|
+
gapPx: Ui,
|
|
4129
4035
|
items: e.items,
|
|
4130
4036
|
pendingAppendItems: e.pendingAppendItems
|
|
4131
4037
|
}), L = null, R = 0;
|
|
@@ -4134,20 +4040,20 @@ function aa(e) {
|
|
|
4134
4040
|
g,
|
|
4135
4041
|
v
|
|
4136
4042
|
], async ([t], [r = []]) => {
|
|
4137
|
-
let i =
|
|
4043
|
+
let i = Ii({
|
|
4138
4044
|
activeIndex: b.value,
|
|
4139
|
-
contentInsetPx:
|
|
4045
|
+
contentInsetPx: Hi,
|
|
4140
4046
|
currentItems: t,
|
|
4141
|
-
gapPx:
|
|
4047
|
+
gapPx: Ui,
|
|
4142
4048
|
layoutHeights: u.value,
|
|
4143
4049
|
layoutIndexById: d.value,
|
|
4144
4050
|
layoutPositions: f.value,
|
|
4145
4051
|
previousItems: r ?? [],
|
|
4146
4052
|
scrollTop: n.value
|
|
4147
4053
|
});
|
|
4148
|
-
i.shouldLockBoundaryInteractionForRemoval && m.lockBoundaryInteraction(
|
|
4054
|
+
i.shouldLockBoundaryInteractionForRemoval && m.lockBoundaryInteraction(mi() + Zi), i.shouldResetScrollForEmptyRemoval && te();
|
|
4149
4055
|
let a = r ?? [];
|
|
4150
|
-
o.canAppend(t, a, i, g.value) ? o.append(i.addedItems, a.length, g.value, v.value) : o.rebuild(t, g.value, v.value), i.removedItems.length > 0 && M.markLeave(i.removedItems), i.addedItems.length > 0 && (M.markEnter(i.addedItems, i.isPrepend ? "top" : "bottom"), i.isPrepend ? N.onItemsMutated(i.addedItems.length) : P.onItemsMutated(i.addedItems.length)), M.playFlipMoveAnimation(i.oldPositionsById, new Set(i.addedItems.map((e) => $(e))), i.isPrepend ?
|
|
4056
|
+
o.canAppend(t, a, i, g.value) ? o.append(i.addedItems, a.length, g.value, v.value) : o.rebuild(t, g.value, v.value), i.removedItems.length > 0 && M.markLeave(i.removedItems), i.addedItems.length > 0 && (M.markEnter(i.addedItems, i.isPrepend ? "top" : "bottom"), i.isPrepend ? N.onItemsMutated(i.addedItems.length) : P.onItemsMutated(i.addedItems.length)), M.playFlipMoveAnimation(i.oldPositionsById, new Set(i.addedItems.map((e) => $(e))), i.isPrepend ? Xi : void 0), i.anchorId ? (await _(), U(i.anchorId, i.oldPositionsById)) : e.active.value && i.previousIds.length > 0 && G();
|
|
4151
4057
|
}, { immediate: !0 }), z([
|
|
4152
4058
|
() => e.pendingAppendItems.value.map((e) => $(e)),
|
|
4153
4059
|
g,
|
|
@@ -4161,24 +4067,24 @@ function aa(e) {
|
|
|
4161
4067
|
}
|
|
4162
4068
|
if (F.start(), !a || i !== !1 || p.value == null) return;
|
|
4163
4069
|
await _();
|
|
4164
|
-
let o = Math.max(0, T.value - r.value), s =
|
|
4070
|
+
let o = Math.max(0, T.value - r.value), s = $i(p.value, 0, o);
|
|
4165
4071
|
a.scrollTop = s, n.value = s, N.syncBoundary(), P.syncBoundary();
|
|
4166
4072
|
}), z(() => e.loading.value, async (e) => {
|
|
4167
4073
|
I.clearReservedHeightWhenIdle(e), N.onLoadingChange(e), P.onLoadingChange(e), await _();
|
|
4168
4074
|
}), S(async () => {
|
|
4169
|
-
|
|
4170
|
-
|
|
4171
|
-
}), t.value && L.observe(t.value)) : window.addEventListener("resize",
|
|
4075
|
+
q(), await _(), b.value > 0 ? H(b.value, "center") : W(), N.syncBoundary(), P.syncBoundary(), typeof ResizeObserver < "u" ? (L = new ResizeObserver(() => {
|
|
4076
|
+
q();
|
|
4077
|
+
}), t.value && L.observe(t.value)) : window.addEventListener("resize", q);
|
|
4172
4078
|
}), x(() => {
|
|
4173
|
-
L?.disconnect(), L = null, window.removeEventListener("resize",
|
|
4079
|
+
L?.disconnect(), L = null, window.removeEventListener("resize", q), I.clearAppendCommitTimer(), m.clearBoundaryInteractionReleaseTimer(), R &&= (cancelAnimationFrame(R), 0), F.stop();
|
|
4174
4080
|
});
|
|
4175
4081
|
function ee() {
|
|
4176
|
-
e.active.value && (n.value = t.value?.scrollTop ?? 0, r.value =
|
|
4177
|
-
R = 0,
|
|
4082
|
+
e.active.value && (n.value = t.value?.scrollTop ?? 0, r.value = J(), N.syncBoundary("scroll"), P.syncBoundary("scroll"), K(), !G() && (R ||= requestAnimationFrame(() => {
|
|
4083
|
+
R = 0, W();
|
|
4178
4084
|
})));
|
|
4179
4085
|
}
|
|
4180
4086
|
function B(t) {
|
|
4181
|
-
e.active.value && (N.onWheel(t), P.onWheel(t),
|
|
4087
|
+
e.active.value && (N.onWheel(t), P.onWheel(t), K());
|
|
4182
4088
|
}
|
|
4183
4089
|
function V(t) {
|
|
4184
4090
|
let n = e.items.value[t], r = n ? $(n) : "";
|
|
@@ -4194,7 +4100,7 @@ function aa(e) {
|
|
|
4194
4100
|
let a = t.value, o = f.value[e], s = u.value[e];
|
|
4195
4101
|
if (!a || !o || !s) return;
|
|
4196
4102
|
let c = a.scrollTop, l = Math.max(0, T.value - r.value);
|
|
4197
|
-
i === "center" ? c = o.y - (r.value - s) / 2 : o.y < a.scrollTop ? c = o.y -
|
|
4103
|
+
i === "center" ? c = o.y - (r.value - s) / 2 : o.y < a.scrollTop ? c = o.y - Hi : o.y + s > a.scrollTop + r.value && (c = o.y + s - r.value + Hi), a.scrollTop = $i(c, 0, l), n.value = a.scrollTop, W();
|
|
4198
4104
|
}
|
|
4199
4105
|
function U(e, r) {
|
|
4200
4106
|
let i = t.value, a = r.get(e), o = d.value.get(e), s = o == null ? null : f.value[o];
|
|
@@ -4202,7 +4108,7 @@ function aa(e) {
|
|
|
4202
4108
|
let c = s.y - a.y;
|
|
4203
4109
|
i.scrollTop += c, n.value = i.scrollTop;
|
|
4204
4110
|
}
|
|
4205
|
-
function
|
|
4111
|
+
function te() {
|
|
4206
4112
|
let e = t.value;
|
|
4207
4113
|
if (!e) {
|
|
4208
4114
|
n.value = 0;
|
|
@@ -4210,8 +4116,8 @@ function aa(e) {
|
|
|
4210
4116
|
}
|
|
4211
4117
|
e.scrollTop = 0, n.value = 0, N.syncBoundary(), P.syncBoundary();
|
|
4212
4118
|
}
|
|
4213
|
-
function
|
|
4214
|
-
if (!C.value.length ||
|
|
4119
|
+
function W() {
|
|
4120
|
+
if (!C.value.length || G()) return;
|
|
4215
4121
|
let t = n.value + r.value / 2, i = b.value, a = Infinity;
|
|
4216
4122
|
for (let e of C.value) {
|
|
4217
4123
|
let n = f.value[e], r = u.value[e];
|
|
@@ -4221,26 +4127,26 @@ function aa(e) {
|
|
|
4221
4127
|
}
|
|
4222
4128
|
e.setActiveIndex(i);
|
|
4223
4129
|
}
|
|
4224
|
-
function
|
|
4225
|
-
let t = n.value <=
|
|
4130
|
+
function G() {
|
|
4131
|
+
let t = n.value <= Ji, r = Y() <= qi;
|
|
4226
4132
|
return t ? (e.setActiveIndex(0), !0) : r ? (e.setActiveIndex(Math.max(0, e.items.value.length - 1)), !0) : !1;
|
|
4227
4133
|
}
|
|
4228
|
-
function ne() {
|
|
4229
|
-
N.maybeRequestPage(), P.maybeRequestPage();
|
|
4230
|
-
}
|
|
4231
4134
|
function K() {
|
|
4232
|
-
|
|
4135
|
+
N.maybeRequestPage(), P.maybeRequestPage();
|
|
4233
4136
|
}
|
|
4234
4137
|
function q() {
|
|
4235
|
-
|
|
4236
|
-
}
|
|
4237
|
-
function re() {
|
|
4238
|
-
return Di(t.value, a.value, Zi);
|
|
4138
|
+
r.value = J(), a.value = ne();
|
|
4239
4139
|
}
|
|
4240
4140
|
function J() {
|
|
4241
|
-
return
|
|
4141
|
+
return yi(t.value, r.value);
|
|
4142
|
+
}
|
|
4143
|
+
function ne() {
|
|
4144
|
+
return bi(t.value, a.value, Wi);
|
|
4242
4145
|
}
|
|
4243
4146
|
function Y() {
|
|
4147
|
+
return xi(t.value, n.value, r.value, T.value);
|
|
4148
|
+
}
|
|
4149
|
+
function X() {
|
|
4244
4150
|
let e = Math.max(t.value?.scrollHeight ?? 0, T.value);
|
|
4245
4151
|
return Math.max(0, e - r.value);
|
|
4246
4152
|
}
|
|
@@ -4264,17 +4170,17 @@ function aa(e) {
|
|
|
4264
4170
|
scrollViewportRef: t
|
|
4265
4171
|
};
|
|
4266
4172
|
}
|
|
4267
|
-
function
|
|
4173
|
+
function $i(e, t, n) {
|
|
4268
4174
|
return Math.min(Math.max(e, t), n);
|
|
4269
4175
|
}
|
|
4270
4176
|
//#endregion
|
|
4271
4177
|
//#region src/components/viewer-core/listCardAsset.ts
|
|
4272
|
-
function
|
|
4178
|
+
function ea(e) {
|
|
4273
4179
|
if (e) try {
|
|
4274
4180
|
e.removeAttribute("src"), e.src = "";
|
|
4275
4181
|
} catch {}
|
|
4276
4182
|
}
|
|
4277
|
-
function
|
|
4183
|
+
function ta(e) {
|
|
4278
4184
|
if (e) {
|
|
4279
4185
|
try {
|
|
4280
4186
|
e.currentTime = 0;
|
|
@@ -4285,12 +4191,12 @@ function ca(e) {
|
|
|
4285
4191
|
} catch {}
|
|
4286
4192
|
}
|
|
4287
4193
|
}
|
|
4288
|
-
function
|
|
4194
|
+
function na(e, t) {
|
|
4289
4195
|
if (t) return e.bottom > t.top && e.top < t.bottom;
|
|
4290
4196
|
let n = window.innerHeight || document.documentElement.clientHeight || 0;
|
|
4291
4197
|
return e.bottom > 0 && e.top < n;
|
|
4292
4198
|
}
|
|
4293
|
-
function
|
|
4199
|
+
function ra(e) {
|
|
4294
4200
|
if (!e) return null;
|
|
4295
4201
|
try {
|
|
4296
4202
|
return new URL(e, window.location.href).href;
|
|
@@ -4300,9 +4206,9 @@ function ua(e) {
|
|
|
4300
4206
|
}
|
|
4301
4207
|
//#endregion
|
|
4302
4208
|
//#region src/components/viewer-core/useListCardHealthCheck.ts
|
|
4303
|
-
function
|
|
4209
|
+
function ia(e) {
|
|
4304
4210
|
let t = D(null), n = i(() => {
|
|
4305
|
-
let t = typeof e.item.value.healthCheck?.url == "string" ?
|
|
4211
|
+
let t = typeof e.item.value.healthCheck?.url == "string" ? ra(e.item.value.healthCheck.url) : null;
|
|
4306
4212
|
return !t || t === e.attachedAssetUrl.value ? null : t;
|
|
4307
4213
|
}), r = null, a = 0, o = /* @__PURE__ */ new Map();
|
|
4308
4214
|
z(n, (e, n) => {
|
|
@@ -4380,14 +4286,14 @@ function da(e) {
|
|
|
4380
4286
|
}
|
|
4381
4287
|
//#endregion
|
|
4382
4288
|
//#region src/components/ListCard.vue?vue&type=script&setup=true&lang.ts
|
|
4383
|
-
var
|
|
4289
|
+
var aa = ["aria-label"], oa = {
|
|
4384
4290
|
key: 0,
|
|
4385
4291
|
"data-testid": "vibe-list-card-spinner",
|
|
4386
4292
|
class: "pointer-events-none absolute inset-0 z-[4] grid place-items-center bg-black/18"
|
|
4387
|
-
},
|
|
4293
|
+
}, sa = { 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]" }, ca = ["src", "alt"], la = ["src"], ua = ["data-kind"], da = { class: "grid justify-items-center gap-3 px-4 text-center" }, fa = { class: "text-[0.68rem] font-bold uppercase tracking-[0.22em] text-[#f7f1ea]/72" }, pa = {
|
|
4388
4294
|
key: 4,
|
|
4389
4295
|
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))]"
|
|
4390
|
-
},
|
|
4296
|
+
}, ma = { class: "inline-flex h-14 w-14 items-center justify-center border border-white/16 bg-black/20" }, ha = { class: "pointer-events-none absolute inset-0 z-[3]" }, ga = /* @__PURE__ */ d({
|
|
4391
4297
|
__name: "ListCard",
|
|
4392
4298
|
props: {
|
|
4393
4299
|
active: {
|
|
@@ -4411,7 +4317,7 @@ var fa = ["aria-label"], pa = {
|
|
|
4411
4317
|
},
|
|
4412
4318
|
emits: ["open"],
|
|
4413
4319
|
setup(e, { emit: t }) {
|
|
4414
|
-
let n = e, r = t, l = i(() =>
|
|
4320
|
+
let n = e, r = t, l = i(() => yr(n.item)), d = D(!1), f = D(!1), p = D(!1), m = D(l.value.kind === "fallback"), h = D(!1), g = D(null), _ = D(null), y = D(null), b = D(null), C = D(null), T = D(l.value.kind === "fallback"), E = i(() => T.value ? n.surfaceActive ? d.value ? l.value.url : null : l.value.url : null), O = i(() => n.surfaceActive && d.value && (l.value.kind === "image" || l.value.kind === "video") && !!l.value.url), j = i(() => l.value.kind === "image" && !!E.value), N = i(() => l.value.kind === "video" && !!E.value), P = ia({
|
|
4415
4321
|
attachedAssetUrl: E,
|
|
4416
4322
|
getPriority: ce,
|
|
4417
4323
|
isInView: d,
|
|
@@ -4425,39 +4331,39 @@ var fa = ["aria-label"], pa = {
|
|
|
4425
4331
|
let e = l.value.kind === "fallback";
|
|
4426
4332
|
m.value = e, h.value = !1, g.value = null, e && (T.value = !0);
|
|
4427
4333
|
}), z(O, () => {
|
|
4428
|
-
|
|
4334
|
+
q();
|
|
4429
4335
|
}), z([
|
|
4430
4336
|
d,
|
|
4431
4337
|
m,
|
|
4432
4338
|
E
|
|
4433
4339
|
], () => {
|
|
4434
|
-
|
|
4340
|
+
J();
|
|
4435
4341
|
}), z(() => n.surfaceActive, (e) => {
|
|
4436
4342
|
if (!e) {
|
|
4437
|
-
|
|
4343
|
+
Y(), J();
|
|
4438
4344
|
return;
|
|
4439
4345
|
}
|
|
4440
4346
|
requestAnimationFrame(() => {
|
|
4441
|
-
|
|
4347
|
+
X(), q(), J();
|
|
4442
4348
|
});
|
|
4443
4349
|
}), S(() => {
|
|
4444
4350
|
if (!y.value || typeof IntersectionObserver > "u") {
|
|
4445
|
-
b.value = null, d.value = !0,
|
|
4351
|
+
b.value = null, d.value = !0, q();
|
|
4446
4352
|
return;
|
|
4447
4353
|
}
|
|
4448
4354
|
b.value = y.value.closest("[data-testid=\"vibe-list-scroll\"]"), B = new IntersectionObserver((e) => {
|
|
4449
|
-
for (let t of e) t.target === y.value && (n.surfaceActive &&
|
|
4355
|
+
for (let t of e) t.target === y.value && (n.surfaceActive && X(t), q(), J());
|
|
4450
4356
|
}, {
|
|
4451
4357
|
root: b.value,
|
|
4452
4358
|
threshold: [0, 1]
|
|
4453
4359
|
}), B.observe(y.value);
|
|
4454
4360
|
}), x(() => {
|
|
4455
|
-
|
|
4361
|
+
ne(), P.release(), B?.disconnect(), B = null;
|
|
4456
4362
|
});
|
|
4457
|
-
function
|
|
4458
|
-
le(_.value) && (m.value = !0, g.value = null,
|
|
4363
|
+
function te() {
|
|
4364
|
+
le(_.value) && (m.value = !0, g.value = null, re(E.value ?? n.item.url), Y());
|
|
4459
4365
|
}
|
|
4460
|
-
async function
|
|
4366
|
+
async function W() {
|
|
4461
4367
|
if (!le(_.value)) return;
|
|
4462
4368
|
let e = E.value ?? n.item.url;
|
|
4463
4369
|
m.value = !1, g.value = "generic";
|
|
@@ -4468,25 +4374,25 @@ var fa = ["aria-label"], pa = {
|
|
|
4468
4374
|
url: e,
|
|
4469
4375
|
kind: t,
|
|
4470
4376
|
surface: "grid"
|
|
4471
|
-
}),
|
|
4377
|
+
}), Y();
|
|
4472
4378
|
}
|
|
4473
|
-
function
|
|
4474
|
-
le(C.value) && (h.value = !0, m.value = !0, g.value = null,
|
|
4379
|
+
function G() {
|
|
4380
|
+
le(C.value) && (h.value = !0, m.value = !0, g.value = null, re(E.value ?? n.item.url), Y(), J());
|
|
4475
4381
|
}
|
|
4476
|
-
function
|
|
4382
|
+
function K() {
|
|
4477
4383
|
le(C.value) && (h.value || (m.value = !1));
|
|
4478
4384
|
}
|
|
4479
|
-
function
|
|
4385
|
+
function q() {
|
|
4480
4386
|
if (l.value.kind === "fallback") {
|
|
4481
|
-
|
|
4387
|
+
ne(!1);
|
|
4482
4388
|
return;
|
|
4483
4389
|
}
|
|
4484
4390
|
if (!n.surfaceActive) {
|
|
4485
|
-
|
|
4391
|
+
Y();
|
|
4486
4392
|
return;
|
|
4487
4393
|
}
|
|
4488
4394
|
if (!O.value) {
|
|
4489
|
-
|
|
4395
|
+
ne();
|
|
4490
4396
|
return;
|
|
4491
4397
|
}
|
|
4492
4398
|
if (T.value || V) {
|
|
@@ -4502,7 +4408,7 @@ var fa = ["aria-label"], pa = {
|
|
|
4502
4408
|
url: l.value.url ?? n.item.url
|
|
4503
4409
|
});
|
|
4504
4410
|
}
|
|
4505
|
-
function
|
|
4411
|
+
function J() {
|
|
4506
4412
|
let e = C.value;
|
|
4507
4413
|
if (!(!e || l.value.kind !== "video")) {
|
|
4508
4414
|
if (I.value) {
|
|
@@ -4519,21 +4425,21 @@ var fa = ["aria-label"], pa = {
|
|
|
4519
4425
|
e.pause();
|
|
4520
4426
|
}
|
|
4521
4427
|
}
|
|
4522
|
-
function
|
|
4523
|
-
T.value = l.value.kind === "fallback", g.value = null, m.value = l.value.kind === "fallback", e && (
|
|
4428
|
+
function ne(e = !0) {
|
|
4429
|
+
T.value = l.value.kind === "fallback", g.value = null, m.value = l.value.kind === "fallback", e && (ae(), oe()), Y();
|
|
4524
4430
|
}
|
|
4525
|
-
function
|
|
4431
|
+
function Y() {
|
|
4526
4432
|
V?.release(), V = null;
|
|
4527
4433
|
}
|
|
4528
|
-
function
|
|
4434
|
+
function X(e) {
|
|
4529
4435
|
let t = y.value;
|
|
4530
4436
|
if (!t) {
|
|
4531
4437
|
d.value = !0;
|
|
4532
4438
|
return;
|
|
4533
4439
|
}
|
|
4534
|
-
d.value =
|
|
4440
|
+
d.value = na(e?.boundingClientRect ?? t.getBoundingClientRect(), e?.rootBounds ?? b.value?.getBoundingClientRect() ?? null);
|
|
4535
4441
|
}
|
|
4536
|
-
function
|
|
4442
|
+
function re(e) {
|
|
4537
4443
|
if (!e) return;
|
|
4538
4444
|
let t = $(n.item), r = `${t}|${e}`;
|
|
4539
4445
|
U.has(r) || (U.add(r), n.reportAssetLoad?.({
|
|
@@ -4543,18 +4449,18 @@ var fa = ["aria-label"], pa = {
|
|
|
4543
4449
|
url: e
|
|
4544
4450
|
}));
|
|
4545
4451
|
}
|
|
4546
|
-
function
|
|
4452
|
+
function ie() {
|
|
4547
4453
|
if (!R.value || P.retry()) return;
|
|
4548
4454
|
let e = $(n.item);
|
|
4549
4455
|
U.forEach((t) => {
|
|
4550
4456
|
t.startsWith(`${e}|`) && U.delete(t);
|
|
4551
|
-
}), g.value = null, m.value = !1, T.value = !1,
|
|
4457
|
+
}), g.value = null, m.value = !1, T.value = !1, Y(), q();
|
|
4552
4458
|
}
|
|
4553
|
-
function
|
|
4554
|
-
|
|
4459
|
+
function ae() {
|
|
4460
|
+
ea(_.value);
|
|
4555
4461
|
}
|
|
4556
|
-
function
|
|
4557
|
-
|
|
4462
|
+
function oe() {
|
|
4463
|
+
ta(C.value);
|
|
4558
4464
|
}
|
|
4559
4465
|
function ce() {
|
|
4560
4466
|
let e = y.value;
|
|
@@ -4568,8 +4474,8 @@ var fa = ["aria-label"], pa = {
|
|
|
4568
4474
|
return Math.abs((t.top + t.bottom) / 2 - n);
|
|
4569
4475
|
}
|
|
4570
4476
|
function le(e) {
|
|
4571
|
-
let t =
|
|
4572
|
-
return !e || !t ? !1 :
|
|
4477
|
+
let t = ra(E.value);
|
|
4478
|
+
return !e || !t ? !1 : ra("currentSrc" in e && e.currentSrc || e.getAttribute("src")) === t;
|
|
4573
4479
|
}
|
|
4574
4480
|
function ue() {
|
|
4575
4481
|
r("open");
|
|
@@ -4597,8 +4503,8 @@ var fa = ["aria-label"], pa = {
|
|
|
4597
4503
|
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]",
|
|
4598
4504
|
"aria-label": n.item.title || `Open item ${n.index + 1}`,
|
|
4599
4505
|
onClick: ue
|
|
4600
|
-
}, null, 8,
|
|
4601
|
-
ee.value ? (w(), s("div",
|
|
4506
|
+
}, null, 8, aa),
|
|
4507
|
+
ee.value ? (w(), s("div", oa, [c("span", sa, [u(F(se), {
|
|
4602
4508
|
class: "h-5 w-5 animate-spin stroke-[1.9] text-[#f7f1ea]/78",
|
|
4603
4509
|
"aria-hidden": "true"
|
|
4604
4510
|
})])])) : o("", !0),
|
|
@@ -4610,9 +4516,9 @@ var fa = ["aria-label"], pa = {
|
|
|
4610
4516
|
alt: l.value.label,
|
|
4611
4517
|
draggable: "false",
|
|
4612
4518
|
class: v(["block h-full w-full object-cover transition-opacity duration-300", m.value ? "pointer-events-none opacity-100" : "pointer-events-none opacity-0"]),
|
|
4613
|
-
onLoad:
|
|
4614
|
-
onError:
|
|
4615
|
-
}, null, 42,
|
|
4519
|
+
onLoad: te,
|
|
4520
|
+
onError: W
|
|
4521
|
+
}, null, 42, ca)) : N.value && E.value && !L.value ? (w(), s("video", {
|
|
4616
4522
|
key: 2,
|
|
4617
4523
|
ref_key: "videoRef",
|
|
4618
4524
|
ref: C,
|
|
@@ -4622,37 +4528,37 @@ var fa = ["aria-label"], pa = {
|
|
|
4622
4528
|
playsinline: "",
|
|
4623
4529
|
preload: "metadata",
|
|
4624
4530
|
class: v(["block h-full w-full object-cover transition-opacity duration-300", m.value ? "pointer-events-none opacity-100" : "pointer-events-none opacity-0"]),
|
|
4625
|
-
onCanplay:
|
|
4626
|
-
onError:
|
|
4627
|
-
onLoadstart:
|
|
4628
|
-
onPlaying:
|
|
4629
|
-
onStalled:
|
|
4630
|
-
onWaiting:
|
|
4631
|
-
}, null, 42,
|
|
4531
|
+
onCanplay: G,
|
|
4532
|
+
onError: W,
|
|
4533
|
+
onLoadstart: K,
|
|
4534
|
+
onPlaying: G,
|
|
4535
|
+
onStalled: K,
|
|
4536
|
+
onWaiting: K
|
|
4537
|
+
}, null, 42, la)) : L.value ? (w(), s("div", {
|
|
4632
4538
|
key: 3,
|
|
4633
4539
|
"data-testid": "vibe-list-card-error",
|
|
4634
4540
|
"data-kind": I.value,
|
|
4635
4541
|
class: "pointer-events-none relative z-[2] grid h-full w-full place-items-center bg-[radial-gradient(circle_at_center,rgba(239,68,68,0.12),transparent_65%),linear-gradient(180deg,rgba(255,255,255,0.04),rgba(255,255,255,0.02))]"
|
|
4636
|
-
}, [c("div",
|
|
4542
|
+
}, [c("div", da, [
|
|
4637
4543
|
u(F(de), {
|
|
4638
4544
|
class: "h-6 w-6 stroke-[1.8] text-[#f7f1ea]/78",
|
|
4639
4545
|
"aria-hidden": "true"
|
|
4640
4546
|
}),
|
|
4641
|
-
c("span",
|
|
4547
|
+
c("span", fa, M(F(yn)(I.value)), 1),
|
|
4642
4548
|
R.value ? (w(), s("button", {
|
|
4643
4549
|
key: 0,
|
|
4644
4550
|
type: "button",
|
|
4645
4551
|
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",
|
|
4646
|
-
onClick: H(
|
|
4552
|
+
onClick: H(ie, ["stop"])
|
|
4647
4553
|
}, " Retry ")) : o("", !0)
|
|
4648
|
-
])], 8,
|
|
4554
|
+
])], 8, ua)) : (w(), s("div", pa, [c("div", ma, [k(e.$slots, "item-icon", {
|
|
4649
4555
|
icon: F(Gt)(n.item.type),
|
|
4650
4556
|
item: n.item
|
|
4651
4557
|
}, () => [(w(), a(A(F(Gt)(n.item.type)), {
|
|
4652
4558
|
class: "h-6 w-6 stroke-[1.8] text-[#f7f1ea]/78",
|
|
4653
4559
|
"aria-hidden": "true"
|
|
4654
4560
|
}))])])])),
|
|
4655
|
-
c("div",
|
|
4561
|
+
c("div", ha, [k(e.$slots, "grid-item-overlay", {
|
|
4656
4562
|
active: n.active,
|
|
4657
4563
|
focused: f.value,
|
|
4658
4564
|
hovered: p.value,
|
|
@@ -4662,24 +4568,24 @@ var fa = ["aria-label"], pa = {
|
|
|
4662
4568
|
})])
|
|
4663
4569
|
], 34));
|
|
4664
4570
|
}
|
|
4665
|
-
}),
|
|
4571
|
+
}), _a = { 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)]" }, va = { class: "pointer-events-none absolute inset-x-0 top-0 z-[2] flex justify-end p-6" }, ya = {
|
|
4666
4572
|
"data-testid": "vibe-pagination",
|
|
4667
4573
|
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]"
|
|
4668
|
-
},
|
|
4574
|
+
}, ba = { class: "whitespace-nowrap" }, xa = {
|
|
4669
4575
|
key: 0,
|
|
4670
4576
|
class: "whitespace-nowrap border-l border-white/12 pl-2 text-[#f7f1ea]/56 min-[721px]:pl-3"
|
|
4671
|
-
},
|
|
4577
|
+
}, Sa = [
|
|
4672
4578
|
"data-active",
|
|
4673
4579
|
"data-index",
|
|
4674
4580
|
"data-item-id",
|
|
4675
4581
|
"data-occurrence-key"
|
|
4676
|
-
],
|
|
4582
|
+
], Ca = ["data-item-id"], wa = {
|
|
4677
4583
|
key: 0,
|
|
4678
4584
|
class: "pointer-events-none absolute inset-y-0 right-0 z-[3] hidden w-8 min-[1024px]:block"
|
|
4679
|
-
},
|
|
4585
|
+
}, Ta = {
|
|
4680
4586
|
key: 1,
|
|
4681
4587
|
class: "pointer-events-none absolute inset-x-0 bottom-0 z-[2] px-5 pb-5 sm:px-6"
|
|
4682
|
-
},
|
|
4588
|
+
}, Ea = { class: "mx-auto flex w-full justify-center" }, Da = /* @__PURE__ */ d({
|
|
4683
4589
|
__name: "ListSurface",
|
|
4684
4590
|
props: {
|
|
4685
4591
|
active: {
|
|
@@ -4741,7 +4647,7 @@ var fa = ["aria-label"], pa = {
|
|
|
4741
4647
|
"update:activeIndex"
|
|
4742
4648
|
],
|
|
4743
4649
|
setup(e, { expose: n, emit: r }) {
|
|
4744
|
-
let d = e, f = L(), p = r, m =
|
|
4650
|
+
let d = e, f = L(), p = r, m = Qi({
|
|
4745
4651
|
active: N(d, "active"),
|
|
4746
4652
|
allowExhaustedNextPageRefresh: N(d, "allowExhaustedNextPageRefresh"),
|
|
4747
4653
|
bottomLoadBufferPx: N(d, "bottomLoadBufferPx"),
|
|
@@ -4789,8 +4695,8 @@ var fa = ["aria-label"], pa = {
|
|
|
4789
4695
|
nextBoundaryLoadProgress: e,
|
|
4790
4696
|
previousBoundaryLoadProgress: t
|
|
4791
4697
|
});
|
|
4792
|
-
}, { immediate: !0 }), (e, n) => (w(), s("div",
|
|
4793
|
-
c("div",
|
|
4698
|
+
}, { immediate: !0 }), (e, n) => (w(), s("div", _a, [
|
|
4699
|
+
c("div", va, [c("span", ya, [c("span", ba, M(F(m).paginationLabel.value), 1), d.paginationDetail ? (w(), s("span", xa, M(d.paginationDetail), 1)) : o("", !0)])]),
|
|
4794
4700
|
c("div", {
|
|
4795
4701
|
ref: F(m).scrollViewportRef,
|
|
4796
4702
|
"data-testid": "vibe-list-scroll",
|
|
@@ -4811,7 +4717,7 @@ var fa = ["aria-label"], pa = {
|
|
|
4811
4717
|
"data-occurrence-key": F($)(t),
|
|
4812
4718
|
class: "absolute will-change-transform",
|
|
4813
4719
|
style: b(F(m).getCardStyle(n))
|
|
4814
|
-
}, [u(
|
|
4720
|
+
}, [u(ga, {
|
|
4815
4721
|
active: n === F(m).resolvedActiveIndex.value,
|
|
4816
4722
|
index: n,
|
|
4817
4723
|
item: t,
|
|
@@ -4835,14 +4741,14 @@ var fa = ["aria-label"], pa = {
|
|
|
4835
4741
|
"report-asset-load",
|
|
4836
4742
|
"surface-active",
|
|
4837
4743
|
"onOpen"
|
|
4838
|
-
])], 12,
|
|
4744
|
+
])], 12, Sa))), 128)),
|
|
4839
4745
|
(w(!0), s(t, null, O(F(m).leavingItems.value, (t) => (w(), s("article", {
|
|
4840
4746
|
key: `leaving-${F($)(t.item)}`,
|
|
4841
4747
|
"data-testid": "vibe-list-card-leaving",
|
|
4842
4748
|
"data-item-id": t.item.id,
|
|
4843
4749
|
class: "pointer-events-none absolute z-[2] will-change-[opacity,transform]",
|
|
4844
4750
|
style: b(F(m).getLeavingCardStyle(t.item))
|
|
4845
|
-
}, [u(
|
|
4751
|
+
}, [u(ga, {
|
|
4846
4752
|
active: !1,
|
|
4847
4753
|
index: -1,
|
|
4848
4754
|
item: t.item,
|
|
@@ -4857,8 +4763,8 @@ var fa = ["aria-label"], pa = {
|
|
|
4857
4763
|
"item",
|
|
4858
4764
|
"report-asset-error",
|
|
4859
4765
|
"report-asset-load"
|
|
4860
|
-
])], 12,
|
|
4861
|
-
F(j) && F(E) ? (w(), a(
|
|
4766
|
+
])], 12, Ca))), 128)),
|
|
4767
|
+
F(j) && F(E) ? (w(), a(nr, {
|
|
4862
4768
|
key: 0,
|
|
4863
4769
|
message: F(E).message,
|
|
4864
4770
|
mode: F(E).mode,
|
|
@@ -4872,12 +4778,12 @@ var fa = ["aria-label"], pa = {
|
|
|
4872
4778
|
"surface"
|
|
4873
4779
|
])) : o("", !0)
|
|
4874
4780
|
], 4)], 544),
|
|
4875
|
-
F(m).showScrollbar.value ? (w(), s("div",
|
|
4781
|
+
F(m).showScrollbar.value ? (w(), s("div", wa, [n[2] ||= c("div", { class: "absolute bottom-6 right-3 top-6 w-px bg-white/8" }, null, -1), c("div", {
|
|
4876
4782
|
"data-testid": "vibe-list-scrollbar-thumb",
|
|
4877
4783
|
class: v(["absolute right-[0.625rem] w-1 bg-white/34 transition-[height,transform,background-color,opacity] duration-300 ease-out", d.loading ? "bg-white/52" : "bg-white/34"]),
|
|
4878
4784
|
style: b(F(m).getScrollbarThumbStyle())
|
|
4879
4785
|
}, null, 6)])) : o("", !0),
|
|
4880
|
-
f["grid-footer"] ? (w(), s("div",
|
|
4786
|
+
f["grid-footer"] ? (w(), s("div", Ta, [c("div", Ea, [k(e.$slots, "grid-footer")])])) : o("", !0),
|
|
4881
4787
|
x.value ? (w(), s("div", {
|
|
4882
4788
|
key: 2,
|
|
4883
4789
|
class: v(["pointer-events-none absolute inset-x-0 bottom-0 z-[3] flex justify-center px-6", f["grid-footer"] ? "pb-24" : "pb-6"])
|
|
@@ -4886,7 +4792,7 @@ var fa = ["aria-label"], pa = {
|
|
|
4886
4792
|
"data-testid": "vibe-grid-status-badge",
|
|
4887
4793
|
class: v(["inline-flex items-center border border-white/14 bg-black/55 px-4 py-3 text-[0.7rem] font-bold uppercase tracking-[0.18em] text-[#f7f1ea]/72 backdrop-blur-[18px]", x.value.kind === "end" ? "border-amber-300/35 text-amber-200" : x.value.kind === "failed" ? "border-rose-400/45 text-rose-100" : ""])
|
|
4888
4794
|
}, M(x.value.message), 3))], 2)) : o("", !0),
|
|
4889
|
-
F(D) && F(E) ? (w(), a(
|
|
4795
|
+
F(D) && F(E) ? (w(), a(nr, {
|
|
4890
4796
|
key: 3,
|
|
4891
4797
|
class: v(["z-[3]", f["grid-footer"] ? "pb-24" : "pb-6"]),
|
|
4892
4798
|
message: F(E).message,
|
|
@@ -4903,13 +4809,13 @@ var fa = ["aria-label"], pa = {
|
|
|
4903
4809
|
])) : o("", !0)
|
|
4904
4810
|
]));
|
|
4905
4811
|
}
|
|
4906
|
-
}),
|
|
4812
|
+
}), Oa = ["data-surface-mode"], ka = {
|
|
4907
4813
|
key: 1,
|
|
4908
4814
|
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"
|
|
4909
|
-
},
|
|
4815
|
+
}, Aa = ["data-visible", "inert"], ja = ["data-visible", "inert"], Ma = {
|
|
4910
4816
|
key: 3,
|
|
4911
4817
|
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"
|
|
4912
|
-
},
|
|
4818
|
+
}, Na = /* @__PURE__ */ d({
|
|
4913
4819
|
name: "VibeLayout",
|
|
4914
4820
|
__name: "Layout",
|
|
4915
4821
|
props: {
|
|
@@ -4977,7 +4883,7 @@ var fa = ["aria-label"], pa = {
|
|
|
4977
4883
|
type: "button",
|
|
4978
4884
|
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",
|
|
4979
4885
|
onClick: n[0] ||= (...e) => F(h).retryInitialLoad && F(h).retryInitialLoad(...e)
|
|
4980
|
-
}, " Retry ")) : F(h).errorMessage.value && F(h).items.value.length > 0 ? (w(), s("div",
|
|
4886
|
+
}, " Retry ")) : F(h).errorMessage.value && F(h).items.value.length > 0 ? (w(), s("div", ka, M(F(h).errorMessage.value), 1)) : o("", !0), F(h).isDesktop.value ? (w(), s(t, { key: 2 }, [u(r, {
|
|
4981
4887
|
appear: "",
|
|
4982
4888
|
"enter-active-class": "transition-[opacity,transform] duration-300 ease-out",
|
|
4983
4889
|
"enter-from-class": "translate-y-3 opacity-0",
|
|
@@ -4991,7 +4897,7 @@ var fa = ["aria-label"], pa = {
|
|
|
4991
4897
|
"data-visible": F(h).surfaceMode.value === "list" ? "true" : "false",
|
|
4992
4898
|
inert: F(h).surfaceMode.value !== "list",
|
|
4993
4899
|
class: "absolute inset-0 z-[2]"
|
|
4994
|
-
}, [u(
|
|
4900
|
+
}, [u(Da, {
|
|
4995
4901
|
ref_key: "listSurfaceRef",
|
|
4996
4902
|
ref: g,
|
|
4997
4903
|
active: F(h).surfaceMode.value === "list",
|
|
@@ -5065,7 +4971,7 @@ var fa = ["aria-label"], pa = {
|
|
|
5065
4971
|
"onBoundaryLoadProgress",
|
|
5066
4972
|
"onOpenFullscreen",
|
|
5067
4973
|
"onUpdate:activeIndex"
|
|
5068
|
-
])], 8,
|
|
4974
|
+
])], 8, Aa), [[R, F(h).surfaceMode.value === "list"]])]),
|
|
5069
4975
|
_: 3
|
|
5070
4976
|
}), u(r, {
|
|
5071
4977
|
appear: "",
|
|
@@ -5081,7 +4987,7 @@ var fa = ["aria-label"], pa = {
|
|
|
5081
4987
|
"data-visible": F(h).surfaceMode.value === "fullscreen" ? "true" : "false",
|
|
5082
4988
|
inert: F(h).surfaceMode.value !== "fullscreen",
|
|
5083
4989
|
class: "absolute inset-0 z-[3]"
|
|
5084
|
-
}, [u(
|
|
4990
|
+
}, [u(ri, {
|
|
5085
4991
|
items: F(h).items.value,
|
|
5086
4992
|
active: F(h).surfaceMode.value === "fullscreen",
|
|
5087
4993
|
"active-index": F(h).activeIndex.value,
|
|
@@ -5139,12 +5045,12 @@ var fa = ["aria-label"], pa = {
|
|
|
5139
5045
|
fn: B((t) => [k(e.$slots, "item-icon", y(p(t)))]),
|
|
5140
5046
|
key: "5"
|
|
5141
5047
|
} : void 0
|
|
5142
|
-
]), 1032, /* @__PURE__ */ "items.active.active-index.error-message.fill-collected-count.fill-completed-calls.fill-loaded-count.fill-mode.fill-progress.fill-target-calls.fill-target-count.fill-total-count.loading.has-next-page.pagination-detail.phase.report-asset-error.report-asset-load.empty-state-mode.loop-fullscreen-video.show-dominant-image-tone.show-end-badge.show-status-badges.show-back-to-list.onBackToList.onUpdate:activeIndex".split("."))], 8,
|
|
5048
|
+
]), 1032, /* @__PURE__ */ "items.active.active-index.error-message.fill-collected-count.fill-completed-calls.fill-loaded-count.fill-mode.fill-progress.fill-target-calls.fill-target-count.fill-total-count.loading.has-next-page.pagination-detail.phase.report-asset-error.report-asset-load.empty-state-mode.loop-fullscreen-video.show-dominant-image-tone.show-end-badge.show-status-badges.show-back-to-list.onBackToList.onUpdate:activeIndex".split("."))], 8, ja), [[R, F(h).surfaceMode.value === "fullscreen"]])]),
|
|
5143
5049
|
_: 3
|
|
5144
|
-
})], 64)) : F(h).items.value.length === 0 && F(h).loading.value && F(h).phase.value === "initializing" ? (w(), s("div",
|
|
5050
|
+
})], 64)) : F(h).items.value.length === 0 && F(h).loading.value && F(h).phase.value === "initializing" ? (w(), s("div", Ma, [u(F(se), {
|
|
5145
5051
|
class: "size-10 animate-spin text-[#f7f1ea]/82",
|
|
5146
5052
|
"aria-hidden": "true"
|
|
5147
|
-
}), n[1] ||= c("p", { class: "m-0 text-[0.9rem] font-semibold uppercase tracking-[0.22em] text-[#f7f1ea]/72" }, " Loading... ", -1)])) : (w(), a(
|
|
5053
|
+
}), n[1] ||= c("p", { class: "m-0 text-[0.9rem] font-semibold uppercase tracking-[0.22em] text-[#f7f1ea]/72" }, " Loading... ", -1)])) : (w(), a(ri, {
|
|
5148
5054
|
key: 4,
|
|
5149
5055
|
items: F(h).items.value,
|
|
5150
5056
|
active: !0,
|
|
@@ -5228,10 +5134,10 @@ var fa = ["aria-label"], pa = {
|
|
|
5228
5134
|
"show-status-badges",
|
|
5229
5135
|
"onBackToList",
|
|
5230
5136
|
"onUpdate:activeIndex"
|
|
5231
|
-
]))], 8,
|
|
5137
|
+
]))], 8, Oa));
|
|
5232
5138
|
}
|
|
5233
|
-
}),
|
|
5234
|
-
e.component("VibeLayout",
|
|
5139
|
+
}), Pa = { install(e) {
|
|
5140
|
+
e.component("VibeLayout", Na);
|
|
5235
5141
|
} };
|
|
5236
5142
|
//#endregion
|
|
5237
|
-
export {
|
|
5143
|
+
export { Na as VibeLayout, Pa as VibePlugin, Pa as default };
|