@wyxos/vibe 3.0.15 → 3.0.16

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.
Files changed (3) hide show
  1. package/lib/index.cjs +1 -1
  2. package/lib/index.js +542 -542
  3. package/package.json +1 -1
package/lib/index.js CHANGED
@@ -1,12 +1,12 @@
1
1
  import { Comment as e, Fragment as t, Text as n, Transition as r, computed as i, createBlock as a, createCommentVNode as o, createElementBlock as s, createElementVNode as c, createSlots as l, createVNode as u, defineComponent as d, guardReactiveProps as f, h as p, isVNode as m, mergeProps as h, nextTick as g, normalizeClass as _, normalizeProps as v, normalizeStyle as y, onBeforeUnmount as b, onMounted as x, openBlock as S, reactive as C, readonly as w, ref as T, renderList as E, renderSlot as D, resolveDynamicComponent as O, toDisplayString as k, toRef as A, unref as j, useAttrs as M, useSlots as N, vShow as P, watch as F, watchEffect as I, withCtx as L, withDirectives as R, withModifiers as z } from "vue";
2
2
  //#region node_modules/lucide-vue-next/dist/esm/shared/src/utils/hasA11yProp.js
3
- var B = (e) => {
3
+ var ee = (e) => {
4
4
  for (let t in e) if (t.startsWith("aria-") || t === "role" || t === "title") return !0;
5
5
  return !1;
6
- }, V = (e) => e === "", H = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e) === t).join(" ").trim(), U = (e) => e.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase(), W = (e) => e.replace(/^([A-Z])|[\s-_]+(\w)/g, (e, t, n) => n ? n.toUpperCase() : t.toLowerCase()), G = (e) => {
7
- let t = W(e);
6
+ }, B = (e) => e === "", V = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e) === t).join(" ").trim(), te = (e) => e.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase(), H = (e) => e.replace(/^([A-Z])|[\s-_]+(\w)/g, (e, t, n) => n ? n.toUpperCase() : t.toLowerCase()), U = (e) => {
7
+ let t = H(e);
8
8
  return t.charAt(0).toUpperCase() + t.slice(1);
9
- }, K = {
9
+ }, W = {
10
10
  xmlns: "http://www.w3.org/2000/svg",
11
11
  width: 24,
12
12
  height: 24,
@@ -16,27 +16,27 @@ var B = (e) => {
16
16
  "stroke-width": 2,
17
17
  "stroke-linecap": "round",
18
18
  "stroke-linejoin": "round"
19
- }, q = ({ name: e, iconNode: t, absoluteStrokeWidth: n, "absolute-stroke-width": r, strokeWidth: i, "stroke-width": a, size: o = K.width, color: s = K.stroke, ...c }, { slots: l }) => p("svg", {
20
- ...K,
19
+ }, G = ({ name: e, iconNode: t, absoluteStrokeWidth: n, "absolute-stroke-width": r, strokeWidth: i, "stroke-width": a, size: o = W.width, color: s = W.stroke, ...c }, { slots: l }) => p("svg", {
20
+ ...W,
21
21
  ...c,
22
22
  width: o,
23
23
  height: o,
24
24
  stroke: s,
25
- "stroke-width": V(n) || V(r) || n === !0 || r === !0 ? Number(i || a || K["stroke-width"]) * 24 / Number(o) : i || a || K["stroke-width"],
26
- class: H("lucide", c.class, ...e ? [`lucide-${U(G(e))}-icon`, `lucide-${U(e)}`] : ["lucide-icon"]),
27
- ...!l.default && !B(c) && { "aria-hidden": "true" }
28
- }, [...t.map((e) => p(...e)), ...l.default ? [l.default()] : []]), J = (e, t) => (n, { slots: r, attrs: i }) => p(q, {
25
+ "stroke-width": B(n) || B(r) || n === !0 || r === !0 ? Number(i || a || W["stroke-width"]) * 24 / Number(o) : i || a || W["stroke-width"],
26
+ class: V("lucide", c.class, ...e ? [`lucide-${te(U(e))}-icon`, `lucide-${te(e)}`] : ["lucide-icon"]),
27
+ ...!l.default && !ee(c) && { "aria-hidden": "true" }
28
+ }, [...t.map((e) => p(...e)), ...l.default ? [l.default()] : []]), K = (e, t) => (n, { slots: r, attrs: i }) => p(G, {
29
29
  ...i,
30
30
  ...n,
31
31
  iconNode: t,
32
32
  name: e
33
- }, r), Y = J("arrow-left", [["path", {
33
+ }, r), q = K("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
- }]]), ee = J("audio-lines", [
39
+ }]]), J = K("audio-lines", [
40
40
  ["path", {
41
41
  d: "M2 10v3",
42
42
  key: "1fnikh"
@@ -61,7 +61,7 @@ var B = (e) => {
61
61
  d: "M22 10v3",
62
62
  key: "154ddg"
63
63
  }]
64
- ]), X = J("clapperboard", [
64
+ ]), Y = K("clapperboard", [
65
65
  ["path", {
66
66
  d: "m12.296 3.464 3.02 3.956",
67
67
  key: "qash78"
@@ -78,13 +78,13 @@ var B = (e) => {
78
78
  d: "m6.18 5.276 3.1 3.899",
79
79
  key: "zjj9t3"
80
80
  }]
81
- ]), te = J("file", [["path", {
81
+ ]), X = K("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
- }]]), ne = J("image-plus", [
87
+ }]]), ne = K("image-plus", [
88
88
  ["path", {
89
89
  d: "M16 5h6",
90
90
  key: "1vod17"
@@ -107,10 +107,10 @@ var B = (e) => {
107
107
  r: "2",
108
108
  key: "af1f0g"
109
109
  }]
110
- ]), re = J("loader-circle", [["path", {
110
+ ]), re = K("loader-circle", [["path", {
111
111
  d: "M21 12a9 9 0 1 1-6.219-8.56",
112
112
  key: "13zald"
113
- }]]), ie = J("pause", [["rect", {
113
+ }]]), ie = K("pause", [["rect", {
114
114
  x: "14",
115
115
  y: "3",
116
116
  width: "5",
@@ -124,10 +124,10 @@ var B = (e) => {
124
124
  height: "18",
125
125
  rx: "1",
126
126
  key: "1wsw3u"
127
- }]]), ae = J("play", [["path", {
127
+ }]]), ae = K("play", [["path", {
128
128
  d: "M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z",
129
129
  key: "10ikf1"
130
- }]]), oe = J("triangle-alert", [
130
+ }]]), oe = K("triangle-alert", [
131
131
  ["path", {
132
132
  d: "m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",
133
133
  key: "wmoenq"
@@ -140,13 +140,13 @@ var B = (e) => {
140
140
  d: "M12 17h.01",
141
141
  key: "p32p05"
142
142
  }]
143
- ]), se = J("volume-1", [["path", {
143
+ ]), se = K("volume-1", [["path", {
144
144
  d: "M11 4.702a.705.705 0 0 0-1.203-.498L6.413 7.587A1.4 1.4 0 0 1 5.416 8H3a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2.416a1.4 1.4 0 0 1 .997.413l3.383 3.384A.705.705 0 0 0 11 19.298z",
145
145
  key: "uqj9uw"
146
146
  }], ["path", {
147
147
  d: "M16 9a5 5 0 0 1 0 6",
148
148
  key: "1q6k2b"
149
- }]]), ce = J("volume-2", [
149
+ }]]), ce = K("volume-2", [
150
150
  ["path", {
151
151
  d: "M11 4.702a.705.705 0 0 0-1.203-.498L6.413 7.587A1.4 1.4 0 0 1 5.416 8H3a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2.416a1.4 1.4 0 0 1 .997.413l3.383 3.384A.705.705 0 0 0 11 19.298z",
152
152
  key: "uqj9uw"
@@ -159,7 +159,7 @@ var B = (e) => {
159
159
  d: "M19.364 18.364a9 9 0 0 0 0-12.728",
160
160
  key: "ijwkga"
161
161
  }]
162
- ]), Z = J("volume-x", [
162
+ ]), Z = K("volume-x", [
163
163
  ["path", {
164
164
  d: "M11 4.702a.705.705 0 0 0-1.203-.498L6.413 7.587A1.4 1.4 0 0 1 5.416 8H3a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2.416a1.4 1.4 0 0 1 .997.413l3.383 3.384A.705.705 0 0 0 11 19.298z",
165
165
  key: "uqj9uw"
@@ -437,7 +437,7 @@ function Ve() {
437
437
  //#endregion
438
438
  //#region src/components/viewer-core/useAutoResolveSource.ts
439
439
  function He(e) {
440
- let t = !!e.initialState?.items.length, n = T([]), r = T(0), a = T([]), o = T(!1), s = T(null), c = T(!t && typeof e.resolve == "function" ? "initializing" : "idle"), l = T(null), u = Ve(), d = u.remainingMs, f = T(null), p = T(!1), m = T(!0), h = T(!1), g = /* @__PURE__ */ new Set(), _ = null, v = null, y = 0, S = 0, C = i(() => Be(e.fillDelayMs, Ie)), w = i(() => Be(e.fillDelayStepMs, Le)), E = i(() => typeof e.resolve == "function"), D = i(() => e.mode ?? "dynamic"), O = i(() => me(e.pageSize)), k = i(() => Se(n.value)), A = i(() => Ce(k.value, e.removedIds.value)), j = i(() => r.value), M = i(() => pe(c.value) || p.value), N = i(() => Ue(n.value, e.removedIds.value)), P = i(() => We(n.value, e.removedIds.value)), I = i(() => P.value?.nextCursor ?? null), L = i(() => o.value ? null : N.value?.previousCursor ?? null), R = i(() => !!I.value), z = i(() => !!L.value), B = i(() => E.value && n.value.length > 0), V = i(() => Ce(Se(a.value), e.removedIds.value)), H = i(() => Ee(n.value, e.removedIds.value, j.value)), U = i(() => !A.value.length && !M.value && !!s.value);
440
+ let t = !!e.initialState?.items.length, n = T([]), r = T(0), a = T([]), o = T(!1), s = T(null), c = T(!t && typeof e.resolve == "function" ? "initializing" : "idle"), l = T(null), u = Ve(), d = u.remainingMs, f = T(null), p = T(!1), m = T(!0), h = T(!1), g = /* @__PURE__ */ new Set(), _ = null, v = null, y = 0, S = 0, C = i(() => Be(e.fillDelayMs, Ie)), w = i(() => Be(e.fillDelayStepMs, Le)), E = i(() => typeof e.resolve == "function"), D = i(() => e.mode ?? "dynamic"), O = i(() => me(e.pageSize)), k = i(() => Se(n.value)), A = i(() => Ce(k.value, e.removedIds.value)), j = i(() => r.value), M = i(() => pe(c.value) || p.value), N = i(() => Ue(n.value, e.removedIds.value)), P = i(() => We(n.value, e.removedIds.value)), I = i(() => P.value?.nextCursor ?? null), L = i(() => o.value ? null : N.value?.previousCursor ?? null), R = i(() => !!I.value), z = i(() => !!L.value), ee = i(() => E.value && n.value.length > 0), B = i(() => Ce(Se(a.value), e.removedIds.value)), V = i(() => Ee(n.value, e.removedIds.value, j.value)), te = i(() => !A.value.length && !M.value && !!s.value);
441
441
  F(() => A.value.length, (e) => {
442
442
  if (e === 0) {
443
443
  r.value = 0;
@@ -447,12 +447,12 @@ function He(e) {
447
447
  }), F(() => r.value, () => {
448
448
  m.value && se();
449
449
  }), x(() => {
450
- fe() || e.resolve && W();
450
+ fe() || e.resolve && H();
451
451
  }), b(() => {
452
452
  _?.abort(), _ = null, u.clear(!0);
453
453
  });
454
- async function W() {
455
- v = W;
454
+ async function H() {
455
+ v = H;
456
456
  let t = await ue({
457
457
  continueUntilFilled: D.value === "dynamic",
458
458
  cursor: e.initialCursor ?? null,
@@ -461,46 +461,46 @@ function He(e) {
461
461
  });
462
462
  t && (n.value = t.buckets, r.value = 0, Q());
463
463
  }
464
- async function G() {
464
+ async function U() {
465
465
  if (!(h.value || M.value)) {
466
- if (!R.value) return B.value ? le("trailing") : void 0;
466
+ if (!R.value) return ee.value ? le("trailing") : void 0;
467
467
  if (D.value === "static" && ve("trailing")) return le("trailing");
468
468
  await ce(I.value);
469
469
  }
470
470
  }
471
- async function K() {
471
+ async function W() {
472
472
  if (!(h.value || !z.value || M.value)) {
473
473
  if (D.value === "static" && ve("leading")) return le("leading");
474
474
  await Z(L.value);
475
475
  }
476
476
  }
477
- async function q() {
478
- if (U.value) {
477
+ async function G() {
478
+ if (te.value) {
479
479
  if (n.value = [], r.value = 0, a.value = [], o.value = !1, s.value = null, c.value = E.value ? "initializing" : "idle", l.value = null, f.value = null, p.value = !1, g.clear(), _?.abort(), _ = null, u.clear(!0), fe()) {
480
480
  Q();
481
481
  return;
482
482
  }
483
- await W();
483
+ await H();
484
484
  }
485
485
  }
486
- async function J() {
487
- if (U.value) return q();
486
+ async function K() {
487
+ if (te.value) return G();
488
488
  h.value || c.value !== "failed" || !v || (s.value = null, await v());
489
489
  }
490
- async function Y() {
490
+ async function q() {
491
491
  if (!a.value.length) return p.value = !1, Q();
492
492
  n.value = [...n.value, ...a.value], a.value = [], p.value = !1, Q();
493
493
  }
494
- function ee(t) {
494
+ function J(t) {
495
495
  let n = A.value;
496
496
  if (!n.length) return;
497
497
  let i = ge(t, 0, n.length - 1);
498
498
  i !== r.value && (r.value = i, e.emit("update:activeIndex", i));
499
499
  }
500
- function X(e) {
500
+ function Y(e) {
501
501
  m.value = e;
502
502
  }
503
- function te() {
503
+ function X() {
504
504
  h.value = !0, u.clear(!0);
505
505
  }
506
506
  function ne() {
@@ -531,15 +531,15 @@ function He(e) {
531
531
  r.value = Pe(A.value, j.value, e);
532
532
  }
533
533
  function oe() {
534
- a.value.length > 0 && !V.value.length && Y();
534
+ a.value.length > 0 && !B.value.length && q();
535
535
  }
536
536
  async function se() {
537
537
  if (!(!m.value || _e())) {
538
538
  if (!A.value.length) {
539
- R.value && await G();
539
+ R.value && await U();
540
540
  return;
541
541
  }
542
- z.value && r.value < 3 && await K(), R.value && r.value >= A.value.length - 3 && await G();
542
+ z.value && r.value < 3 && await W(), R.value && r.value >= A.value.length - 3 && await U();
543
543
  }
544
544
  }
545
545
  async function ce(e) {
@@ -554,7 +554,7 @@ function He(e) {
554
554
  });
555
555
  if (t) {
556
556
  if (t.canceled) return n.value = [...n.value, ...t.buckets], a.value = [], p.value = !1, Q();
557
- if (a.value = t.buckets, !V.value.length) return n.value = [...n.value, ...a.value], a.value = [], p.value = !1, Q();
557
+ if (a.value = t.buckets, !B.value.length) return n.value = [...n.value, ...a.value], a.value = [], p.value = !1, Q();
558
558
  p.value = !0;
559
559
  }
560
560
  }
@@ -694,11 +694,11 @@ function He(e) {
694
694
  }
695
695
  return {
696
696
  activeIndex: j,
697
- canRetryInitialLoad: U,
697
+ canRetryInitialLoad: te,
698
698
  cancel: re,
699
- canRefreshTrailingBoundary: B,
700
- commitPendingAppend: Y,
701
- currentCursor: H,
699
+ canRefreshTrailingBoundary: ee,
700
+ commitPendingAppend: q,
701
+ currentCursor: V,
702
702
  errorMessage: s,
703
703
  fillCollectedCount: l,
704
704
  fillDelayRemainingMs: d,
@@ -708,20 +708,20 @@ function He(e) {
708
708
  isAutoPrefetchEnabled: m,
709
709
  isPageLoadingLocked: h,
710
710
  items: A,
711
- lockPageLoading: te,
711
+ lockPageLoading: X,
712
712
  loading: M,
713
713
  mode: D,
714
714
  maybePrefetchAround: se,
715
715
  nextCursor: I,
716
- pendingAppendItems: V,
716
+ pendingAppendItems: B,
717
717
  phase: c,
718
- prefetchNextPage: G,
719
- prefetchPreviousPage: K,
718
+ prefetchNextPage: U,
719
+ prefetchPreviousPage: W,
720
720
  previousCursor: L,
721
- retryInitialLoad: q,
722
- retry: J,
723
- setActiveIndex: ee,
724
- setAutoPrefetchEnabled: X,
721
+ retryInitialLoad: G,
722
+ retry: K,
723
+ setActiveIndex: J,
724
+ setAutoPrefetchEnabled: Y,
725
725
  syncActiveIndexAfterVisibilityChange: ae,
726
726
  unlockPageLoading: ne,
727
727
  getActiveOccurrenceKey: ie,
@@ -1073,7 +1073,7 @@ var Je = {
1073
1073
  class: "pointer-events-auto inline-flex h-11 w-11 shrink-0 items-center justify-center border border-white/14 bg-black/40 text-[#f7f1ea]/78 backdrop-blur-[18px] transition hover:border-white/28 hover:bg-black/55",
1074
1074
  "aria-label": "Back to list",
1075
1075
  onClick: t[0] ||= (e) => r("back-to-list")
1076
- }, [u(j(Y), {
1076
+ }, [u(j(q), {
1077
1077
  class: "h-4 w-4 stroke-[2.2]",
1078
1078
  "aria-hidden": "true"
1079
1079
  })])) : o("", !0), n.title ? (S(), s("h2", pt, k(n.title), 1)) : o("", !0)]), c("div", mt, [c("span", ht, [
@@ -1089,9 +1089,9 @@ var Je = {
1089
1089
  }
1090
1090
  }), bt = {
1091
1091
  image: ne,
1092
- video: X,
1093
- audio: ee,
1094
- other: te
1092
+ video: Y,
1093
+ audio: J,
1094
+ other: X
1095
1095
  }, xt = {
1096
1096
  image: "Image",
1097
1097
  video: "Video",
@@ -1106,8 +1106,8 @@ function Ct(e) {
1106
1106
  }
1107
1107
  //#endregion
1108
1108
  //#region src/components/viewer-core/useFullscreenSurfaceMedia.ts
1109
- var wt = 2;
1110
- function Tt(e) {
1109
+ var wt = 1, Tt = 2;
1110
+ function Et(e) {
1111
1111
  function t(e, t) {
1112
1112
  let n = t.title?.trim();
1113
1113
  return n ? `${e} ${n}` : `${e} ${Ct(t.type).toLowerCase()}`;
@@ -1117,7 +1117,7 @@ function Tt(e) {
1117
1117
  }
1118
1118
  function r(t) {
1119
1119
  let n = e.resolvedActiveIndex.value;
1120
- return !!e.active.value && t >= n && t <= n + wt;
1120
+ return !!e.active.value && t >= n - wt && t <= n + Tt;
1121
1121
  }
1122
1122
  function i(t, i) {
1123
1123
  let a = n(i);
@@ -1152,11 +1152,11 @@ function Tt(e) {
1152
1152
  }
1153
1153
  //#endregion
1154
1154
  //#region src/components/viewer-core/slotContent.ts
1155
- function Et(e) {
1155
+ function Dt(e) {
1156
1156
  if (!Array.isArray(e)) return !1;
1157
1157
  for (let t of e) {
1158
1158
  if (Array.isArray(t)) {
1159
- if (Et(t)) return !0;
1159
+ if (Dt(t)) return !0;
1160
1160
  continue;
1161
1161
  }
1162
1162
  if (!m(t)) {
@@ -1167,20 +1167,20 @@ function Et(e) {
1167
1167
  if (t != null && t !== !1) return !0;
1168
1168
  continue;
1169
1169
  }
1170
- if (!Dt(t)) return !0;
1170
+ if (!Ot(t)) return !0;
1171
1171
  }
1172
1172
  return !1;
1173
1173
  }
1174
- function Dt(r) {
1175
- return r.type === e ? !0 : r.type === n ? typeof r.children == "string" ? r.children.trim().length === 0 : !0 : r.type === t ? !Et(r.children) : !1;
1174
+ function Ot(r) {
1175
+ return r.type === e ? !0 : r.type === n ? typeof r.children == "string" ? r.children.trim().length === 0 : !0 : r.type === t ? !Dt(r.children) : !1;
1176
1176
  }
1177
1177
  //#endregion
1178
1178
  //#region src/components/viewer-core/useSurfaceEmptyState.ts
1179
- var Ot = "no items available";
1180
- function kt(e) {
1179
+ var kt = "no items available";
1180
+ function At(e) {
1181
1181
  let t = i(() => e.loading.value || e.itemCount.value > 0 || e.emptyStateMode.value === "hidden" ? null : {
1182
1182
  loading: !!e.loading.value,
1183
- message: Ot,
1183
+ message: kt,
1184
1184
  mode: e.emptyStateMode.value === "badge" ? "badge" : "inline",
1185
1185
  surface: e.surface,
1186
1186
  total: e.itemCount.value
@@ -1188,23 +1188,23 @@ function kt(e) {
1188
1188
  return {
1189
1189
  emptyStateProps: t,
1190
1190
  showBadgeEmptyState: i(() => t.value?.mode === "badge"),
1191
- showCustomEmptyState: i(() => Et(n.value)),
1191
+ showCustomEmptyState: i(() => Dt(n.value)),
1192
1192
  showInlineEmptyState: i(() => t.value?.mode === "inline")
1193
1193
  };
1194
1194
  }
1195
1195
  //#endregion
1196
1196
  //#region src/components/viewer-core/format.ts
1197
- function At(e) {
1197
+ function jt(e) {
1198
1198
  if (!Number.isFinite(e) || e <= 0) return "0:00";
1199
1199
  let t = Math.floor(e), n = Math.floor(t / 3600), r = Math.floor(t % 3600 / 60), i = t % 60;
1200
1200
  return n > 0 ? `${n}:${String(r).padStart(2, "0")}:${String(i).padStart(2, "0")}` : `${r}:${String(i).padStart(2, "0")}`;
1201
1201
  }
1202
1202
  //#endregion
1203
1203
  //#region src/components/viewer-core/surfaceStatus.ts
1204
- function jt(e) {
1204
+ function Mt(e) {
1205
1205
  return e.phase ? e.phase : e.loading ? e.itemCount > 0 ? "loading" : "initializing" : "idle";
1206
1206
  }
1207
- function Mt(e) {
1207
+ function Nt(e) {
1208
1208
  return e.phase === "failed" ? {
1209
1209
  kind: "failed",
1210
1210
  message: e.errorMessage ?? (e.hasItems ? "The viewer could not load more items." : "The viewer could not load items.")
@@ -1227,7 +1227,7 @@ function Mt(e) {
1227
1227
  }
1228
1228
  //#endregion
1229
1229
  //#region src/components/viewer-core/useActivation.ts
1230
- function Nt(e) {
1230
+ function Pt(e) {
1231
1231
  let t = !1;
1232
1232
  F(e.enabled, async (t) => {
1233
1233
  if (n(t), t) {
@@ -1250,7 +1250,7 @@ function Nt(e) {
1250
1250
  }
1251
1251
  //#endregion
1252
1252
  //#region src/components/viewer-core/assetState.ts
1253
- var Pt = {
1253
+ var Ft = {
1254
1254
  currentTime: 0,
1255
1255
  duration: 0,
1256
1256
  errorKind: null,
@@ -1259,35 +1259,35 @@ var Pt = {
1259
1259
  ready: !1,
1260
1260
  volume: 1
1261
1261
  };
1262
- function Ft() {
1263
- return { ...Pt };
1262
+ function It() {
1263
+ return { ...Ft };
1264
1264
  }
1265
- function It(e) {
1265
+ function Lt(e) {
1266
1266
  return e.complete && !!(e.currentSrc || e.getAttribute("src"));
1267
1267
  }
1268
- function Lt(e, t, n) {
1269
- e.currentTime = Number.isFinite(t.currentTime) ? t.currentTime : 0, e.duration = Number.isFinite(t.duration) ? t.duration : 0, e.muted = t.muted, e.paused = t.paused, e.volume = Number.isFinite(t.volume) ? t.volume : e.volume, n && n !== "error" && (e.errorKind = null), e.ready = Rt(t, n);
1268
+ function Rt(e, t, n) {
1269
+ e.currentTime = Number.isFinite(t.currentTime) ? t.currentTime : 0, e.duration = Number.isFinite(t.duration) ? t.duration : 0, e.muted = t.muted, e.paused = t.paused, e.volume = Number.isFinite(t.volume) ? t.volume : e.volume, n && n !== "error" && (e.errorKind = null), e.ready = zt(t, n);
1270
1270
  }
1271
- function Rt(e, t) {
1271
+ function zt(e, t) {
1272
1272
  return t === "error" || t === "loadstart" || t === "waiting" || t === "stalled" ? !1 : t === "canplay" || t === "canplaythrough" || t === "playing" ? !0 : e.readyState >= HTMLMediaElement.HAVE_CURRENT_DATA;
1273
1273
  }
1274
1274
  //#endregion
1275
1275
  //#region src/components/viewer-core/loadError.ts
1276
- var zt = /* @__PURE__ */ new Map();
1277
- function Bt(e) {
1276
+ var Bt = /* @__PURE__ */ new Map();
1277
+ function Vt(e) {
1278
1278
  return e === "not-found" ? "404" : "Load error";
1279
1279
  }
1280
- function Vt(e) {
1280
+ function Ht(e) {
1281
1281
  return e === "generic";
1282
1282
  }
1283
- function Ht(e) {
1284
- let t = zt.get(e);
1283
+ function Ut(e) {
1284
+ let t = Bt.get(e);
1285
1285
  if (t) return t;
1286
- let n = Ut(e);
1287
- return zt.set(e, n), n;
1286
+ let n = Wt(e);
1287
+ return Bt.set(e, n), n;
1288
1288
  }
1289
- async function Ut(e) {
1290
- if (!Wt(e)) return "generic";
1289
+ async function Wt(e) {
1290
+ if (!Gt(e)) return "generic";
1291
1291
  try {
1292
1292
  let t = await fetch(e, { method: "HEAD" });
1293
1293
  if (!t.ok && t.status === 404) return "not-found";
@@ -1296,12 +1296,12 @@ async function Ut(e) {
1296
1296
  }
1297
1297
  return "generic";
1298
1298
  }
1299
- function Wt(e) {
1299
+ function Gt(e) {
1300
1300
  return /^(https?:\/\/|\/)/i.test(e);
1301
1301
  }
1302
1302
  //#endregion
1303
1303
  //#region src/components/viewer-core/mediaPlayback.ts
1304
- function Gt(e) {
1304
+ function Kt(e) {
1305
1305
  try {
1306
1306
  let t = e.play();
1307
1307
  t && typeof t.catch == "function" && t.catch(() => {});
@@ -1309,12 +1309,12 @@ function Gt(e) {
1309
1309
  }
1310
1310
  //#endregion
1311
1311
  //#region src/components/viewer-core/useMedia.ts
1312
- function Kt(e) {
1312
+ function qt(e) {
1313
1313
  let t = T({}), n = T({}), r = T({}), a = T({}), o = T({}), s = /* @__PURE__ */ new Map(), c = /* @__PURE__ */ new Map(), l = /* @__PURE__ */ new Set(), u = i(() => e.activeItem.value ? $(e.activeItem.value) : null), d = i(() => e.activeMediaItem.value ? $(e.activeMediaItem.value) : null), f = i(() => {
1314
1314
  let t = /* @__PURE__ */ new Map();
1315
1315
  for (let n of e.items.value) t.set($(n), n);
1316
1316
  return t;
1317
- }), p = i(() => d.value ? r.value[d.value] ?? Pt : Pt), m = i(() => d.value ? p.value.duration : 0), h = i(() => m.value <= 0 ? 0 : qt(p.value.currentTime / m.value * 100, 0, 100)), _ = i(() => u.value ? L(u.value) : null);
1317
+ }), p = i(() => d.value ? r.value[d.value] ?? Ft : Ft), m = i(() => d.value ? p.value.duration : 0), h = i(() => m.value <= 0 ? 0 : Jt(p.value.currentTime / m.value * 100, 0, 100)), _ = i(() => u.value ? L(u.value) : null);
1318
1318
  F(() => u.value, async () => {
1319
1319
  await S();
1320
1320
  }), F(() => e.itemCount.value, async () => {
@@ -1324,62 +1324,62 @@ function Kt(e) {
1324
1324
  });
1325
1325
  function v(e, t) {
1326
1326
  if (t instanceof HTMLVideoElement) {
1327
- s.set(e, t), G(e, t);
1327
+ s.set(e, t), U(e, t);
1328
1328
  return;
1329
1329
  }
1330
1330
  s.delete(e);
1331
1331
  }
1332
1332
  function y(e, t) {
1333
1333
  if (t instanceof HTMLAudioElement) {
1334
- c.set(e, t), G(e, t);
1334
+ c.set(e, t), U(e, t);
1335
1335
  return;
1336
1336
  }
1337
1337
  c.delete(e);
1338
1338
  }
1339
1339
  function b(e, r) {
1340
- r instanceof HTMLImageElement && It(r) && (t.value[e] = !0, n.value[e] = null, X(e, r.currentSrc || r.src || ne(e)));
1340
+ r instanceof HTMLImageElement && Lt(r) && (t.value[e] = !0, n.value[e] = null, Y(e, r.currentSrc || r.src || ne(e)));
1341
1341
  }
1342
1342
  function x() {
1343
- U(), a.value = {}, n.value = {}, t.value = {}, o.value = {}, r.value = {}, l.clear();
1343
+ te(), a.value = {}, n.value = {}, t.value = {}, o.value = {}, r.value = {}, l.clear();
1344
1344
  }
1345
1345
  async function S() {
1346
1346
  if (!e.isEnabled.value) {
1347
- U();
1347
+ te();
1348
1348
  return;
1349
1349
  }
1350
1350
  await g();
1351
1351
  let t = u.value;
1352
1352
  for (let [n, i] of s.entries()) {
1353
1353
  if (n !== t || r.value[n]?.errorKind) {
1354
- H(i, n);
1354
+ V(i, n);
1355
1355
  continue;
1356
1356
  }
1357
- i.muted = !1, i.loop = e.loopFullscreenVideo.value, i.playsInline = !0, Gt(i), G(n, i);
1357
+ i.muted = !1, i.loop = e.loopFullscreenVideo.value, i.playsInline = !0, Kt(i), U(n, i);
1358
1358
  }
1359
1359
  for (let [e, n] of c.entries()) {
1360
1360
  if (e !== t || r.value[e]?.errorKind) {
1361
- H(n, e);
1361
+ V(n, e);
1362
1362
  continue;
1363
1363
  }
1364
- Gt(n), G(e, n);
1364
+ Kt(n), U(e, n);
1365
1365
  }
1366
1366
  }
1367
1367
  function C(e, t) {
1368
1368
  let n = t.currentTarget instanceof HTMLMediaElement ? t.currentTarget : t.target instanceof HTMLMediaElement ? t.target : null;
1369
1369
  if (n) {
1370
1370
  let i = r.value[e]?.ready ?? !1;
1371
- G(e, n, t.type);
1371
+ U(e, n, t.type);
1372
1372
  let a = r.value[e]?.ready ?? !1;
1373
- !i && a && X(e, n.currentSrc || n.src || ne(e));
1373
+ !i && a && Y(e, n.currentSrc || n.src || ne(e));
1374
1374
  }
1375
1375
  }
1376
1376
  function w(e, r) {
1377
- t.value[e] = !0, n.value[e] = null, X(e, r);
1377
+ t.value[e] = !0, n.value[e] = null, Y(e, r);
1378
1378
  }
1379
1379
  async function E(r, i) {
1380
- let a = te(r) ?? e.activeItem.value;
1380
+ let a = X(r) ?? e.activeItem.value;
1381
1381
  t.value[r] = !1, n.value[r] = "generic";
1382
- let o = await Ht(i);
1382
+ let o = await Ut(i);
1383
1383
  n.value[r] = o, a && e.onAssetError?.({
1384
1384
  item: a,
1385
1385
  occurrenceKey: r,
@@ -1389,7 +1389,7 @@ function Kt(e) {
1389
1389
  });
1390
1390
  }
1391
1391
  async function D(t, n) {
1392
- let r = J(t), i = W(t), a = te(t) ?? e.activeMediaItem.value ?? e.activeItem.value;
1392
+ let r = K(t), i = H(t), a = X(t) ?? e.activeMediaItem.value ?? e.activeItem.value;
1393
1393
  if (r) {
1394
1394
  r.pause();
1395
1395
  try {
@@ -1397,7 +1397,7 @@ function Kt(e) {
1397
1397
  } catch {}
1398
1398
  }
1399
1399
  i.currentTime = 0, i.duration = 0, i.paused = !0, i.ready = !1, i.errorKind = "generic";
1400
- let o = await Ht(n);
1400
+ let o = await Ut(n);
1401
1401
  i.errorKind = o, a && e.onAssetError?.({
1402
1402
  item: a,
1403
1403
  occurrenceKey: t,
@@ -1407,28 +1407,28 @@ function Kt(e) {
1407
1407
  });
1408
1408
  }
1409
1409
  function O(e, t, n) {
1410
- e.button !== 0 || Date.now() < n || ee(s.get(t) ?? null);
1410
+ e.button !== 0 || Date.now() < n || J(s.get(t) ?? null);
1411
1411
  }
1412
1412
  function k(e, t, n) {
1413
- e.button !== 0 || Date.now() < n || ee(J(t));
1413
+ e.button !== 0 || Date.now() < n || J(K(t));
1414
1414
  }
1415
1415
  function A(e) {
1416
- let t = Y(), n = d.value;
1416
+ let t = q(), n = d.value;
1417
1417
  if (!t || !n || !(e.target instanceof HTMLInputElement)) return;
1418
1418
  let r = Number.parseFloat(e.target.value);
1419
1419
  if (!Number.isFinite(r)) return;
1420
- let i = qt(r, 0, m.value || 0);
1421
- K(n, i, t), t.currentTime = i;
1420
+ let i = Jt(r, 0, m.value || 0);
1421
+ W(n, i, t), t.currentTime = i;
1422
1422
  }
1423
1423
  function j(e) {
1424
- let t = Y(), n = d.value;
1424
+ let t = q(), n = d.value;
1425
1425
  if (!t || !n || !(e.target instanceof HTMLInputElement)) return;
1426
- let r = qt(Number.parseFloat(e.target.value), 0, 1);
1427
- t.volume = r, t.muted = r <= 0, r > 0 && (o.value[n] = r), G(n, t);
1426
+ let r = Jt(Number.parseFloat(e.target.value), 0, 1);
1427
+ t.volume = r, t.muted = r <= 0, r > 0 && (o.value[n] = r), U(n, t);
1428
1428
  }
1429
1429
  function M() {
1430
- let e = Y(), t = d.value;
1431
- !e || !t || (e.muted || e.volume <= 0 ? (e.volume = q(t), e.muted = !1, o.value[t] = e.volume) : (o.value[t] = e.volume, e.muted = !0), G(t, e));
1430
+ let e = q(), t = d.value;
1431
+ !e || !t || (e.muted || e.volume <= 0 ? (e.volume = G(t), e.muted = !1, o.value[t] = e.volume) : (o.value[t] = e.volume, e.muted = !0), U(t, e));
1432
1432
  }
1433
1433
  function N(e) {
1434
1434
  return !!t.value[e] && !n.value[e];
@@ -1444,65 +1444,65 @@ function Kt(e) {
1444
1444
  }
1445
1445
  function R(e) {
1446
1446
  let t = L(e);
1447
- return t ? Bt(t) : null;
1447
+ return t ? Vt(t) : null;
1448
1448
  }
1449
1449
  function z(e) {
1450
- return Vt(L(e));
1450
+ return Ht(L(e));
1451
1451
  }
1452
- function B(e) {
1452
+ function ee(e) {
1453
1453
  return `${e}:${a.value[e] ?? 0}`;
1454
1454
  }
1455
- async function V(e) {
1455
+ async function B(e) {
1456
1456
  if (!z(e)) return;
1457
1457
  t.value[e] = !1, n.value[e] = null;
1458
- let r = W(e);
1458
+ let r = H(e);
1459
1459
  r.currentTime = 0, r.duration = 0, r.paused = !0, r.ready = !1, r.errorKind = null;
1460
- let i = J(e);
1461
- i && H(i, e), l.forEach((t) => {
1460
+ let i = K(e);
1461
+ i && V(i, e), l.forEach((t) => {
1462
1462
  t.startsWith(`${e}|`) && l.delete(t);
1463
1463
  }), a.value[e] = (a.value[e] ?? 0) + 1, await g(), await S();
1464
1464
  }
1465
- function H(e, t) {
1465
+ function V(e, t) {
1466
1466
  e.pause();
1467
1467
  try {
1468
1468
  e.currentTime = 0;
1469
1469
  } catch {}
1470
- G(t, e);
1470
+ U(t, e);
1471
1471
  }
1472
- function U() {
1473
- for (let [e, t] of s.entries()) H(t, e);
1474
- for (let [e, t] of c.entries()) H(t, e);
1472
+ function te() {
1473
+ for (let [e, t] of s.entries()) V(t, e);
1474
+ for (let [e, t] of c.entries()) V(t, e);
1475
1475
  }
1476
- function W(e) {
1477
- return r.value[e] || (r.value[e] = Ft()), r.value[e];
1476
+ function H(e) {
1477
+ return r.value[e] || (r.value[e] = It()), r.value[e];
1478
1478
  }
1479
- function G(e, t, n) {
1480
- Lt(W(e), t, n), !t.muted && t.volume > 0 && (o.value[e] = t.volume);
1479
+ function U(e, t, n) {
1480
+ Rt(H(e), t, n), !t.muted && t.volume > 0 && (o.value[e] = t.volume);
1481
1481
  }
1482
- function K(e, t, n) {
1483
- let r = W(e);
1482
+ function W(e, t, n) {
1483
+ let r = H(e);
1484
1484
  r.currentTime = t, r.duration = Number.isFinite(n.duration) ? n.duration : r.duration, r.muted = n.muted, r.paused = n.paused, r.volume = Number.isFinite(n.volume) ? n.volume : r.volume;
1485
1485
  }
1486
- function q(e) {
1487
- return qt(o.value[e] ?? 1, 0, 1);
1486
+ function G(e) {
1487
+ return Jt(o.value[e] ?? 1, 0, 1);
1488
1488
  }
1489
- function J(e) {
1489
+ function K(e) {
1490
1490
  return s.get(e) ?? c.get(e) ?? null;
1491
1491
  }
1492
- function Y() {
1493
- return d.value ? J(d.value) : null;
1492
+ function q() {
1493
+ return d.value ? K(d.value) : null;
1494
1494
  }
1495
- function ee(e) {
1495
+ function J(e) {
1496
1496
  if (e) {
1497
1497
  if (e.paused) {
1498
- Gt(e);
1498
+ Kt(e);
1499
1499
  return;
1500
1500
  }
1501
1501
  e.pause();
1502
1502
  }
1503
1503
  }
1504
- function X(t, n) {
1505
- let r = te(t) ?? e.activeMediaItem.value ?? e.activeItem.value;
1504
+ function Y(t, n) {
1505
+ let r = X(t) ?? e.activeMediaItem.value ?? e.activeItem.value;
1506
1506
  if (!r || !n) return;
1507
1507
  let i = `${t}|${n}`;
1508
1508
  l.has(i) || (l.add(i), e.onAssetLoad?.({
@@ -1512,11 +1512,11 @@ function Kt(e) {
1512
1512
  url: n
1513
1513
  }));
1514
1514
  }
1515
- function te(e) {
1515
+ function X(e) {
1516
1516
  return f.value.get(e) ?? null;
1517
1517
  }
1518
1518
  function ne(e) {
1519
- return te(e)?.url ?? null;
1519
+ return X(e)?.url ?? null;
1520
1520
  }
1521
1521
  return {
1522
1522
  activeAssetErrorKind: _,
@@ -1525,7 +1525,7 @@ function Kt(e) {
1525
1525
  activeMediaState: p,
1526
1526
  getAssetErrorKind: L,
1527
1527
  getAssetErrorLabel: R,
1528
- getAssetRenderKey: B,
1528
+ getAssetRenderKey: ee,
1529
1529
  getImageSource: I,
1530
1530
  isImageReady: N,
1531
1531
  isMediaReady: P,
@@ -1544,14 +1544,14 @@ function Kt(e) {
1544
1544
  registerImageElement: b,
1545
1545
  registerVideoElement: v,
1546
1546
  resetMediaState: x,
1547
- retryAsset: V,
1547
+ retryAsset: B,
1548
1548
  syncMediaPlayback: S
1549
1549
  };
1550
1550
  }
1551
- function qt(e, t, n) {
1551
+ function Jt(e, t, n) {
1552
1552
  return Math.min(Math.max(e, t), n);
1553
1553
  }
1554
- function Jt(e, t, n = 2) {
1554
+ function Yt(e, t, n = 2) {
1555
1555
  return t <= 0 ? {
1556
1556
  start: 0,
1557
1557
  end: -1
@@ -1560,14 +1560,14 @@ function Jt(e, t, n = 2) {
1560
1560
  end: Math.min(t - 1, e + n)
1561
1561
  };
1562
1562
  }
1563
- function Yt(e, t, n = 2) {
1564
- let r = Jt(t, e.length, n);
1563
+ function Xt(e, t, n = 2) {
1564
+ let r = Yt(t, e.length, n);
1565
1565
  return r.end < r.start ? [] : e.slice(r.start, r.end + 1).map((e, t) => ({
1566
1566
  item: e,
1567
1567
  index: r.start + t
1568
1568
  }));
1569
1569
  }
1570
- function Xt(e, t, n, r, i) {
1570
+ function Zt(e, t, n, r, i) {
1571
1571
  return {
1572
1572
  transform: `translate3d(0, ${(e - t) * n + r}px, 0)`,
1573
1573
  transition: i ? "none" : "transform 320ms cubic-bezier(0.22, 1, 0.36, 1)"
@@ -1575,12 +1575,12 @@ function Xt(e, t, n, r, i) {
1575
1575
  }
1576
1576
  //#endregion
1577
1577
  //#region src/components/viewer-core/useViewer.ts
1578
- function Zt(e, t, n = {}) {
1579
- let r = i(() => e.items), a = i(() => e.activeIndex ?? 0), o = i(() => e.errorMessage ?? null), s = i(() => e.loading ?? !1), c = i(() => e.hasNextPage ?? !1), l = i(() => e.loopFullscreenVideo ?? !0), u = i(() => e.paginationDetail ?? null), d = i(() => jt({
1578
+ function Qt(e, t, n = {}) {
1579
+ let r = i(() => e.items), a = i(() => e.activeIndex ?? 0), o = i(() => e.errorMessage ?? null), s = i(() => e.loading ?? !1), c = i(() => e.hasNextPage ?? !1), l = i(() => e.loopFullscreenVideo ?? !0), u = i(() => e.paginationDetail ?? null), d = i(() => Mt({
1580
1580
  itemCount: r.value.length,
1581
1581
  loading: s.value,
1582
1582
  phase: e.phase
1583
- })), f = i(() => !1), p = T(null), m = T(0), h = T(!1), g = T(1), _ = n.enabled ?? i(() => !0), v = null, y = 0, b = 0, x = 0, S = i(() => r.value.length === 0 ? 0 : P(a.value, 0, r.value.length - 1)), C = i(() => r.value[S.value] ?? null), w = i(() => C.value?.type === "audio" || C.value?.type === "video" ? C.value : null), E = Kt({
1583
+ })), f = i(() => !1), p = T(null), m = T(0), h = T(!1), g = T(1), _ = n.enabled ?? i(() => !0), v = null, y = 0, b = 0, x = 0, S = i(() => r.value.length === 0 ? 0 : P(a.value, 0, r.value.length - 1)), C = i(() => r.value[S.value] ?? null), w = i(() => C.value?.type === "audio" || C.value?.type === "video" ? C.value : null), E = qt({
1584
1584
  items: r,
1585
1585
  activeItem: C,
1586
1586
  activeMediaItem: w,
@@ -1589,22 +1589,22 @@ function Zt(e, t, n = {}) {
1589
1589
  loopFullscreenVideo: l,
1590
1590
  onAssetError: n.onAssetError,
1591
1591
  onAssetLoad: n.onAssetLoad
1592
- }), D = i(() => r.value.length > 0 && S.value === r.value.length - 1), O = i(() => Mt({
1592
+ }), D = i(() => r.value.length > 0 && S.value === r.value.length - 1), O = i(() => Nt({
1593
1593
  errorMessage: o.value,
1594
1594
  hasItems: r.value.length > 0,
1595
1595
  hasNextPage: c.value,
1596
1596
  phase: d.value,
1597
1597
  surface: "fullscreen"
1598
- })), k = i(() => O.value?.kind ?? null), A = i(() => O.value?.message ?? null), j = i(() => Math.min(96, g.value * .15 || 96)), M = i(() => Jt(S.value, r.value.length)), N = i(() => Yt(r.value, S.value));
1599
- Nt({
1598
+ })), k = i(() => O.value?.kind ?? null), A = i(() => O.value?.message ?? null), j = i(() => Math.min(96, g.value * .15 || 96)), M = i(() => Yt(S.value, r.value.length)), N = i(() => Xt(r.value, S.value));
1599
+ Pt({
1600
1600
  enabled: _,
1601
1601
  onDisable() {
1602
- W(), E.resetMediaState();
1602
+ H(), E.resetMediaState();
1603
1603
  },
1604
1604
  onEnable() {
1605
1605
  return E.syncMediaPlayback();
1606
1606
  },
1607
- onKeydown: K,
1607
+ onKeydown: W,
1608
1608
  onResize: F
1609
1609
  });
1610
1610
  function P(e, t, n) {
@@ -1628,53 +1628,53 @@ function Zt(e, t, n = {}) {
1628
1628
  function z(e) {
1629
1629
  !_.value || r.value.length === 0 || e.pointerType === "mouse" || fe(e.target) || (v = e.pointerId, y = e.clientY, m.value = 0, h.value = !0, p.value?.setPointerCapture?.(e.pointerId));
1630
1630
  }
1631
- function B(e) {
1631
+ function ee(e) {
1632
1632
  !_.value || !h.value || v !== e.pointerId || (m.value = R(e.clientY - y));
1633
1633
  }
1634
- function V(e) {
1635
- !_.value || v !== e.pointerId || (p.value?.releasePointerCapture?.(e.pointerId), U());
1634
+ function B(e) {
1635
+ !_.value || v !== e.pointerId || (p.value?.releasePointerCapture?.(e.pointerId), te());
1636
1636
  }
1637
- function H(e) {
1638
- !_.value || v !== e.pointerId || (p.value?.releasePointerCapture?.(e.pointerId), W());
1637
+ function V(e) {
1638
+ !_.value || v !== e.pointerId || (p.value?.releasePointerCapture?.(e.pointerId), H());
1639
1639
  }
1640
- function U() {
1641
- Math.abs(m.value) >= j.value && (x = Date.now() + 250, L(m.value < 0 ? 1 : -1)), W();
1640
+ function te() {
1641
+ Math.abs(m.value) >= j.value && (x = Date.now() + 250, L(m.value < 0 ? 1 : -1)), H();
1642
1642
  }
1643
- function W() {
1643
+ function H() {
1644
1644
  m.value = 0, h.value = !1, v = null;
1645
1645
  }
1646
- function G(e) {
1646
+ function U(e) {
1647
1647
  if (!_.value || r.value.length === 0 || h.value || fe(e.target) || Math.abs(e.deltaY) < Math.max(Math.abs(e.deltaX), 24)) return;
1648
1648
  e.preventDefault();
1649
1649
  let t = Date.now();
1650
1650
  t < b || (b = t + 400, L(e.deltaY > 0 ? 1 : -1));
1651
1651
  }
1652
- function K(e) {
1652
+ function W(e) {
1653
1653
  !_.value || r.value.length === 0 || Q(e.target) || ((e.key === "ArrowDown" || e.key === "PageDown") && (e.preventDefault(), L(1)), (e.key === "ArrowUp" || e.key === "PageUp") && (e.preventDefault(), L(-1)));
1654
1654
  }
1655
- function q(e, t) {
1655
+ function G(e, t) {
1656
1656
  E.onVideoClick(e, t, x);
1657
1657
  }
1658
- function J(e, t) {
1658
+ function K(e, t) {
1659
1659
  E.onAudioCoverClick(e, t, x);
1660
1660
  }
1661
- function Y(e) {
1661
+ function q(e) {
1662
1662
  E.onMediaSeekInput(e);
1663
1663
  }
1664
- function ee(e) {
1664
+ function J(e) {
1665
1665
  E.onMediaVolumeInput(e);
1666
1666
  }
1667
- function X() {
1667
+ function Y() {
1668
1668
  E.onMediaVolumeToggle();
1669
1669
  }
1670
- function te(e) {
1670
+ function X(e) {
1671
1671
  return e.type === "image" || e.type === "video";
1672
1672
  }
1673
1673
  function ne(e) {
1674
1674
  return e.type === "audio";
1675
1675
  }
1676
1676
  function re(e) {
1677
- return Xt(e, S.value, g.value, m.value, h.value);
1677
+ return Zt(e, S.value, g.value, m.value, h.value);
1678
1678
  }
1679
1679
  return {
1680
1680
  activeItem: C,
@@ -1689,32 +1689,32 @@ function Zt(e, t, n = {}) {
1689
1689
  getAssetErrorKind: E.getAssetErrorKind,
1690
1690
  getAssetErrorLabel: E.getAssetErrorLabel,
1691
1691
  getAssetRenderKey: E.getAssetRenderKey,
1692
- formatPlaybackTime: At,
1692
+ formatPlaybackTime: jt,
1693
1693
  getImageSource: E.getImageSource,
1694
1694
  getSlideStyle: re,
1695
1695
  hasNextPage: c,
1696
1696
  isAtEnd: D,
1697
1697
  isAudio: ne,
1698
- isVisual: te,
1698
+ isVisual: X,
1699
1699
  items: r,
1700
1700
  loading: s,
1701
1701
  mediaStates: E.mediaStates,
1702
1702
  isImageReady: E.isImageReady,
1703
1703
  isMediaReady: E.isMediaReady,
1704
- onAudioCoverClick: J,
1704
+ onAudioCoverClick: K,
1705
1705
  onImageError: E.onImageError,
1706
1706
  onImageLoad: E.onImageLoad,
1707
1707
  onMediaEvent: E.onMediaEvent,
1708
1708
  onMediaError: E.onMediaError,
1709
- onMediaSeekInput: Y,
1710
- onMediaVolumeInput: ee,
1711
- onMediaVolumeToggle: X,
1712
- onPointerCancel: H,
1709
+ onMediaSeekInput: q,
1710
+ onMediaVolumeInput: J,
1711
+ onMediaVolumeToggle: Y,
1712
+ onPointerCancel: V,
1713
1713
  onPointerDown: z,
1714
- onPointerMove: B,
1715
- onPointerUp: V,
1716
- onVideoClick: q,
1717
- onWheel: G,
1714
+ onPointerMove: ee,
1715
+ onPointerUp: B,
1716
+ onVideoClick: G,
1717
+ onWheel: U,
1718
1718
  registerAudioElement: E.registerAudioElement,
1719
1719
  registerImageElement: E.registerImageElement,
1720
1720
  registerVideoElement: E.registerVideoElement,
@@ -1732,21 +1732,21 @@ function Zt(e, t, n = {}) {
1732
1732
  }
1733
1733
  //#endregion
1734
1734
  //#region src/components/viewer-core/theme.ts
1735
- var Qt = "bg-[linear-gradient(180deg,#0a0b10,#05060a)]", $t = "bg-[linear-gradient(180deg,#0b0c11,#06070b)]", en = {
1735
+ var $t = "bg-[linear-gradient(180deg,#0a0b10,#05060a)]", en = "bg-[linear-gradient(180deg,#0b0c11,#06070b)]", tn = {
1736
1736
  image: !0,
1737
1737
  video: !0,
1738
1738
  audio: !0,
1739
1739
  other: !0
1740
1740
  };
1741
- function tn(e) {
1742
- return en[e], Qt;
1743
- }
1744
1741
  function nn(e) {
1745
- return en[e], $t;
1742
+ return tn[e], $t;
1743
+ }
1744
+ function rn(e) {
1745
+ return tn[e], en;
1746
1746
  }
1747
1747
  //#endregion
1748
1748
  //#region src/components/viewer-core/dominantImageTone.ts
1749
- function rn(e) {
1749
+ function an(e) {
1750
1750
  if (e.naturalWidth <= 0 || e.naturalHeight <= 0) return null;
1751
1751
  let t = document.createElement("canvas"), n = t.getContext("2d", { willReadFrequently: !0 });
1752
1752
  if (!n) return null;
@@ -1761,20 +1761,20 @@ function rn(e) {
1761
1761
  r += d, i += s * d, a += c * d, o += l * d;
1762
1762
  }
1763
1763
  return r <= 0 ? null : {
1764
- r: an(Math.round(i / r)),
1765
- g: an(Math.round(a / r)),
1766
- b: an(Math.round(o / r))
1764
+ r: on(Math.round(i / r)),
1765
+ g: on(Math.round(a / r)),
1766
+ b: on(Math.round(o / r))
1767
1767
  };
1768
1768
  } catch {
1769
1769
  return null;
1770
1770
  }
1771
1771
  }
1772
- function an(e) {
1772
+ function on(e) {
1773
1773
  return Math.min(235, Math.max(26, e));
1774
1774
  }
1775
1775
  //#endregion
1776
1776
  //#region src/components/viewer-core/useFullscreenDominantTone.ts
1777
- function on(e) {
1777
+ function sn(e) {
1778
1778
  let t = T({}), n = i(() => e.activeItem.value ? e.getItemKey(e.activeItem.value) : null), r = i(() => !e.showDominantImageTone.value || e.activeItem.value?.type !== "image" || !n.value || !e.isImageReady(n.value) ? null : t.value[n.value] ?? null), a = i(() => {
1779
1779
  if (!r.value) return;
1780
1780
  let { r: e, g: t, b: n } = r.value;
@@ -1789,7 +1789,7 @@ function on(e) {
1789
1789
  });
1790
1790
  function s(n, r) {
1791
1791
  if (!e.showDominantImageTone.value) return;
1792
- let i = rn(r);
1792
+ let i = an(r);
1793
1793
  i && (t.value[n] = i);
1794
1794
  }
1795
1795
  return {
@@ -1800,7 +1800,7 @@ function on(e) {
1800
1800
  }
1801
1801
  //#endregion
1802
1802
  //#region src/components/SurfaceEmptyState.vue?vue&type=script&setup=true&lang.ts
1803
- var sn = ["data-surface"], cn = ["data-surface"], ln = /* @__PURE__ */ d({
1803
+ var cn = ["data-surface"], ln = ["data-surface"], un = /* @__PURE__ */ d({
1804
1804
  inheritAttrs: !1,
1805
1805
  __name: "SurfaceEmptyState",
1806
1806
  props: {
@@ -1814,31 +1814,31 @@ var sn = ["data-surface"], cn = ["data-surface"], ln = /* @__PURE__ */ d({
1814
1814
  "data-testid": "vibe-empty-state-inline",
1815
1815
  "data-surface": e.surface,
1816
1816
  class: ["pointer-events-none absolute z-[4] text-center", e.surface === "grid" ? "inset-x-0 top-[clamp(6rem,22vh,11rem)] flex justify-center px-6" : "inset-0 grid place-items-center px-[clamp(2rem,4vw,3rem)] py-[clamp(2rem,4vw,3rem)]"]
1817
- }), [D(n.$slots, "default", {}, () => [c("p", { class: _(["m-0 text-[0.82rem] font-medium tracking-[0.08em]", e.surface === "grid" ? "text-[#f7f1ea]/58" : "text-[#f7f1ea]/64"]) }, k(e.message), 3)])], 16, sn)) : (S(), s("div", h({ key: 1 }, j(t), { class: ["pointer-events-none absolute z-[4]", e.surface === "grid" ? "inset-x-0 bottom-0 flex justify-center px-6" : "bottom-[1.8rem] left-1/2 -translate-x-1/2 max-[720px]:bottom-[1.3rem]"] }), [D(n.$slots, "default", {}, () => [c("span", {
1817
+ }), [D(n.$slots, "default", {}, () => [c("p", { class: _(["m-0 text-[0.82rem] font-medium tracking-[0.08em]", e.surface === "grid" ? "text-[#f7f1ea]/58" : "text-[#f7f1ea]/64"]) }, k(e.message), 3)])], 16, cn)) : (S(), s("div", h({ key: 1 }, j(t), { class: ["pointer-events-none absolute z-[4]", e.surface === "grid" ? "inset-x-0 bottom-0 flex justify-center px-6" : "bottom-[1.8rem] left-1/2 -translate-x-1/2 max-[720px]:bottom-[1.3rem]"] }), [D(n.$slots, "default", {}, () => [c("span", {
1818
1818
  "data-testid": "vibe-empty-state-badge",
1819
1819
  "data-surface": e.surface,
1820
1820
  class: _(["inline-flex items-center border border-white/14 backdrop-blur-[18px]", e.surface === "grid" ? "bg-black/55 px-4 py-3 text-[0.82rem] font-medium tracking-[0.08em] text-[#f7f1ea]/72" : "w-auto bg-black/40 px-5 py-3 text-[0.82rem] font-medium tracking-[0.08em] text-[#f7f1ea]/74 max-[720px]:w-[calc(100%-2.5rem)] max-[720px]:justify-center"])
1821
- }, k(e.message), 11, cn)])], 16));
1821
+ }, k(e.message), 11, ln)])], 16));
1822
1822
  }
1823
- }), un = { class: "relative h-full min-h-0 overflow-hidden bg-[#05060a] text-[#f7f1ea]" }, dn = {
1823
+ }), dn = { class: "relative h-full min-h-0 overflow-hidden bg-[#05060a] text-[#f7f1ea]" }, fn = {
1824
1824
  key: 0,
1825
1825
  class: "relative h-full min-h-0"
1826
- }, fn = [
1826
+ }, pn = [
1827
1827
  "data-item-id",
1828
1828
  "data-occurrence-key",
1829
1829
  "data-index",
1830
1830
  "data-active",
1831
1831
  "aria-hidden"
1832
- ], pn = {
1832
+ ], mn = {
1833
1833
  key: 0,
1834
1834
  "data-testid": "vibe-asset-spinner",
1835
1835
  class: "pointer-events-none absolute inset-0 z-[2] grid place-items-center"
1836
- }, mn = { 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]" }, hn = ["data-kind"], gn = { class: "grid justify-items-center gap-4 border border-white/14 bg-black/45 px-8 py-7 text-center backdrop-blur-[18px]" }, _n = { class: "m-0 text-[0.82rem] font-bold uppercase tracking-[0.28em] text-[#f7f1ea]/70" }, vn = ["onClick"], yn = [
1836
+ }, hn = { 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]" }, gn = ["data-kind"], _n = { class: "grid justify-items-center gap-4 border border-white/14 bg-black/45 px-8 py-7 text-center backdrop-blur-[18px]" }, vn = { class: "m-0 text-[0.82rem] font-bold uppercase tracking-[0.28em] text-[#f7f1ea]/70" }, yn = ["onClick"], bn = [
1837
1837
  "src",
1838
1838
  "alt",
1839
1839
  "onLoad",
1840
1840
  "onError"
1841
- ], bn = [
1841
+ ], xn = [
1842
1842
  "loop",
1843
1843
  "src",
1844
1844
  "preload",
@@ -1856,15 +1856,15 @@ var sn = ["data-surface"], cn = ["data-surface"], ln = /* @__PURE__ */ d({
1856
1856
  "onStalled",
1857
1857
  "onTimeupdate",
1858
1858
  "onWaiting"
1859
- ], xn = { class: "relative grid aspect-square w-[clamp(320px,46vw,560px)] max-w-[calc(100vw-2.5rem)] place-items-center" }, Sn = [
1859
+ ], Sn = { class: "relative grid aspect-square w-[clamp(320px,46vw,560px)] max-w-[calc(100vw-2.5rem)] place-items-center" }, Cn = [
1860
1860
  "aria-label",
1861
1861
  "disabled",
1862
1862
  "onClick"
1863
- ], Cn = { 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]" }, wn = { 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]" }, Tn = {
1863
+ ], wn = { 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]" }, Tn = { 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]" }, En = {
1864
1864
  key: 0,
1865
1865
  "data-testid": "vibe-asset-spinner",
1866
1866
  class: "pointer-events-none absolute inset-0 z-[3] grid place-items-center"
1867
- }, En = { 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]" }, Dn = ["data-kind"], On = { class: "m-0 text-[0.82rem] font-bold uppercase tracking-[0.28em] text-[#f7f1ea]/70" }, kn = ["onClick"], An = [
1867
+ }, Dn = { 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]" }, On = ["data-kind"], kn = { class: "m-0 text-[0.82rem] font-bold uppercase tracking-[0.28em] text-[#f7f1ea]/70" }, An = ["onClick"], jn = [
1868
1868
  "src",
1869
1869
  "preload",
1870
1870
  "onCanplay",
@@ -1880,25 +1880,25 @@ var sn = ["data-surface"], cn = ["data-surface"], ln = /* @__PURE__ */ d({
1880
1880
  "onStalled",
1881
1881
  "onTimeupdate",
1882
1882
  "onWaiting"
1883
- ], jn = {
1883
+ ], Mn = {
1884
1884
  key: 2,
1885
1885
  class: "relative z-[1] grid w-full max-w-[1100px] justify-items-center gap-6 px-[clamp(2rem,4vw,3rem)] py-[clamp(2rem,4vw,3rem)] text-center"
1886
- }, Mn = { 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]" }, Nn = {
1886
+ }, Nn = { 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]" }, Pn = {
1887
1887
  key: 0,
1888
1888
  class: "pointer-events-none absolute inset-0 z-[4]"
1889
- }, Pn = { class: "h-full w-full" }, Fn = {
1889
+ }, Fn = { class: "h-full w-full" }, In = {
1890
1890
  key: 1,
1891
1891
  "data-testid": "vibe-forward-fill-placeholder",
1892
1892
  class: "grid h-full min-h-0 place-items-center px-6 text-center"
1893
- }, In = { class: "grid justify-items-center gap-4 border border-white/14 bg-black/40 px-8 py-7 backdrop-blur-[18px]" }, Ln = { 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)]" }, Rn = { class: "m-0 text-[0.78rem] font-bold uppercase tracking-[0.24em] text-[#f7f1ea]/72" }, zn = {
1893
+ }, Ln = { class: "grid justify-items-center gap-4 border border-white/14 bg-black/40 px-8 py-7 backdrop-blur-[18px]" }, Rn = { 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)]" }, zn = { class: "m-0 text-[0.78rem] font-bold uppercase tracking-[0.24em] text-[#f7f1ea]/72" }, Bn = {
1894
1894
  key: 0,
1895
1895
  "data-testid": "vibe-fullscreen-aside",
1896
1896
  class: "h-full min-h-0 overflow-hidden border-l border-white/10 bg-black/45 backdrop-blur-[18px]"
1897
- }, Bn = { class: "h-full min-h-0 overflow-y-auto overscroll-y-contain" }, Vn = {
1897
+ }, Vn = { class: "h-full min-h-0 overflow-y-auto overscroll-y-contain" }, Hn = {
1898
1898
  key: 0,
1899
1899
  "data-testid": "vibe-fullscreen-aside",
1900
1900
  class: "absolute inset-y-0 right-0 z-[6] w-full max-w-[22rem] overflow-hidden border-l border-white/10 bg-black/82 backdrop-blur-[18px]"
1901
- }, Hn = { class: "h-full min-h-0 overflow-y-auto overscroll-y-contain" }, Un = 1280, Wn = 768, Gn = /* @__PURE__ */ d({
1901
+ }, Un = { class: "h-full min-h-0 overflow-y-auto overscroll-y-contain" }, Wn = 1280, Gn = 768, Kn = /* @__PURE__ */ d({
1902
1902
  __name: "FullscreenSurface",
1903
1903
  props: {
1904
1904
  active: {
@@ -1950,22 +1950,22 @@ var sn = ["data-surface"], cn = ["data-surface"], ln = /* @__PURE__ */ d({
1950
1950
  },
1951
1951
  emits: ["back-to-list", "update:activeIndex"],
1952
1952
  setup(e, { emit: n }) {
1953
- let d = e, p = N(), m = n, g = Zt(d, (e, t) => {
1953
+ let d = e, p = N(), m = n, g = Qt(d, (e, t) => {
1954
1954
  m("update:activeIndex", t);
1955
1955
  }, {
1956
1956
  enabled: A(d, "active"),
1957
1957
  onAssetError: d.reportAssetError ?? void 0,
1958
1958
  onAssetLoad: d.reportAssetLoad ?? void 0
1959
- }), C = T(typeof window > "u" ? Un : window.innerWidth || Un), w = Tt({
1959
+ }), C = T(typeof window > "u" ? Wn : window.innerWidth || Wn), w = Et({
1960
1960
  active: A(d, "active"),
1961
1961
  resolvedActiveIndex: g.resolvedActiveIndex,
1962
1962
  viewer: g
1963
- }), M = i(() => tn(g.activeItem.value?.type ?? "image")), { activeSlideToneStyle: P, activeStageToneStyle: F, updateFromImageElement: I } = on({
1963
+ }), M = i(() => nn(g.activeItem.value?.type ?? "image")), { activeSlideToneStyle: P, activeStageToneStyle: F, updateFromImageElement: I } = sn({
1964
1964
  activeItem: g.activeItem,
1965
1965
  getItemKey: w.getItemKey,
1966
1966
  isImageReady: g.isImageReady,
1967
1967
  showDominantImageTone: A(d, "showDominantImageTone")
1968
- }), R = i(() => g.activeMediaItem.value && !g.activeAssetErrorKind.value ? "bottom-[5.8rem] max-[720px]:bottom-[7.4rem]" : "bottom-[1.8rem] max-[720px]:bottom-[1.3rem]"), B = i(() => !!g.activeMediaItem.value && !g.activeAssetErrorKind.value), V = i(() => C.value < Wn ? "vertical" : "horizontal"), H = i(() => B.value ? "pb-[5.75rem] max-[720px]:pb-[7rem]" : ""), U = i(() => d.activeIndex >= d.items.length && (d.loading || d.hasNextPage)), W = i(() => d.hasNextPage ? "Loading more items" : g.statusMessage.value ?? "Loading more items"), G = i(() => {
1968
+ }), R = i(() => g.activeMediaItem.value && !g.activeAssetErrorKind.value ? "bottom-[5.8rem] max-[720px]:bottom-[7.4rem]" : "bottom-[1.8rem] max-[720px]:bottom-[1.3rem]"), ee = i(() => !!g.activeMediaItem.value && !g.activeAssetErrorKind.value), B = i(() => C.value < Gn ? "vertical" : "horizontal"), V = i(() => ee.value ? "pb-[5.75rem] max-[720px]:pb-[7rem]" : ""), te = i(() => d.activeIndex >= d.items.length && (d.loading || d.hasNextPage)), H = i(() => d.hasNextPage ? "Loading more items" : g.statusMessage.value ?? "Loading more items"), U = i(() => {
1969
1969
  let e = g.activeItem.value;
1970
1970
  return e ? {
1971
1971
  hasNextPage: d.hasNextPage,
@@ -1975,14 +1975,14 @@ var sn = ["data-surface"], cn = ["data-surface"], ln = /* @__PURE__ */ d({
1975
1975
  paginationDetail: d.paginationDetail,
1976
1976
  total: d.items.length
1977
1977
  } : null;
1978
- }), K = i(() => !G.value || !p["fullscreen-header-actions"] ? [] : p["fullscreen-header-actions"](G.value)), q = i(() => !G.value || !p["fullscreen-aside"] ? [] : p["fullscreen-aside"](G.value)), J = i(() => !d.showStatusBadges || !G.value || !g.statusKind.value || !g.statusMessage.value ? null : {
1979
- ...G.value,
1978
+ }), W = i(() => !U.value || !p["fullscreen-header-actions"] ? [] : p["fullscreen-header-actions"](U.value)), G = i(() => !U.value || !p["fullscreen-aside"] ? [] : p["fullscreen-aside"](U.value)), K = i(() => !d.showStatusBadges || !U.value || !g.statusKind.value || !g.statusMessage.value ? null : {
1979
+ ...U.value,
1980
1980
  kind: g.statusKind.value,
1981
1981
  message: g.statusMessage.value
1982
- }), Y = i(() => !J.value || !p["fullscreen-status"] ? [] : p["fullscreen-status"](J.value)), ee = i(() => ({
1982
+ }), q = i(() => !K.value || !p["fullscreen-status"] ? [] : p["fullscreen-status"](K.value)), J = i(() => ({
1983
1983
  gridTemplateColumns: ne.value ? "minmax(0, 1fr) 22rem" : "minmax(0, 1fr) 0rem",
1984
1984
  transition: "grid-template-columns 320ms cubic-bezier(0.22, 1, 0.36, 1)"
1985
- })), X = i(() => Et(K.value)), te = i(() => Et(q.value)), ne = i(() => te.value && C.value >= Un), se = i(() => te.value && !ne.value), ce = i(() => Et(Y.value)), { emptyStateProps: Z, showBadgeEmptyState: le, showCustomEmptyState: ue, showInlineEmptyState: de } = kt({
1985
+ })), Y = i(() => Dt(W.value)), X = i(() => Dt(G.value)), ne = i(() => X.value && C.value >= Wn), se = i(() => X.value && !ne.value), ce = i(() => Dt(q.value)), { emptyStateProps: Z, showBadgeEmptyState: le, showCustomEmptyState: ue, showInlineEmptyState: de } = At({
1986
1986
  emptyStateMode: A(d, "emptyStateMode"),
1987
1987
  itemCount: i(() => d.items.length),
1988
1988
  loading: A(d, "loading"),
@@ -1995,7 +1995,7 @@ var sn = ["data-surface"], cn = ["data-surface"], ln = /* @__PURE__ */ d({
1995
1995
  window.removeEventListener("resize", Q);
1996
1996
  });
1997
1997
  function Q() {
1998
- C.value = window.innerWidth || Un;
1998
+ C.value = window.innerWidth || Wn;
1999
1999
  }
2000
2000
  function fe(e, t, n) {
2001
2001
  g.onImageLoad(t, n);
@@ -2008,14 +2008,14 @@ var sn = ["data-surface"], cn = ["data-surface"], ln = /* @__PURE__ */ d({
2008
2008
  function me(e, t) {
2009
2009
  I(e, t);
2010
2010
  }
2011
- return (e, n) => (S(), s("div", un, [
2011
+ return (e, n) => (S(), s("div", dn, [
2012
2012
  c("div", {
2013
2013
  class: _(["absolute inset-0 transition-[background] duration-200", M.value]),
2014
2014
  style: y(j(F))
2015
2015
  }, null, 6),
2016
2016
  c("div", {
2017
2017
  class: "relative z-[1] grid h-full min-h-0",
2018
- style: y(ee.value)
2018
+ style: y(J.value)
2019
2019
  }, [c("div", {
2020
2020
  ref: "viewer.stageRef",
2021
2021
  "data-testid": "vibe-stage",
@@ -2025,7 +2025,7 @@ var sn = ["data-surface"], cn = ["data-surface"], ln = /* @__PURE__ */ d({
2025
2025
  onPointerup: n[3] ||= (...e) => j(g).onPointerUp && j(g).onPointerUp(...e),
2026
2026
  onPointercancel: n[4] ||= (...e) => j(g).onPointerCancel && j(g).onPointerCancel(...e),
2027
2027
  onWheel: n[5] ||= (...e) => j(g).onWheel && j(g).onWheel(...e)
2028
- }, [j(g).activeItem.value ? (S(), s("div", dn, [
2028
+ }, [j(g).activeItem.value ? (S(), s("div", fn, [
2029
2029
  (S(!0), s(t, null, E(j(g).renderedItems.value, ({ item: r, index: i }) => (S(), s("article", {
2030
2030
  key: j(w).getItemKey(r),
2031
2031
  "data-testid": "vibe-slide",
@@ -2037,12 +2037,12 @@ var sn = ["data-surface"], cn = ["data-surface"], ln = /* @__PURE__ */ d({
2037
2037
  class: _(["absolute inset-0 flex h-full min-h-full items-center justify-center will-change-transform", i === j(g).resolvedActiveIndex.value ? "pointer-events-auto" : "pointer-events-none"]),
2038
2038
  style: y(j(g).getSlideStyle(i))
2039
2039
  }, [c("div", {
2040
- class: _(["absolute inset-0 opacity-85", j(nn)(r.type)]),
2040
+ class: _(["absolute inset-0 opacity-85", j(rn)(r.type)]),
2041
2041
  style: y(i === j(g).resolvedActiveIndex.value && r.type === "image" ? j(P) : void 0)
2042
2042
  }, null, 6), j(g).isVisual(r) ? (S(), s("div", {
2043
2043
  key: 0,
2044
- class: _(["relative z-[1] flex h-full w-full items-center justify-center overflow-hidden", i === j(g).resolvedActiveIndex.value ? H.value : ""])
2045
- }, [j(w).isAssetLoading(i, r) ? (S(), s("div", pn, [c("span", mn, [u(j(re), {
2044
+ class: _(["relative z-[1] flex h-full w-full items-center justify-center overflow-hidden", i === j(g).resolvedActiveIndex.value ? V.value : ""])
2045
+ }, [j(w).isAssetLoading(i, r) ? (S(), s("div", mn, [c("span", hn, [u(j(re), {
2046
2046
  class: "h-5 w-5 animate-spin stroke-[1.9] text-[#f7f1ea]/78",
2047
2047
  "aria-hidden": "true"
2048
2048
  })])])) : o("", !0), j(w).isAssetErrored(i, r) ? (S(), s("div", {
@@ -2050,19 +2050,19 @@ var sn = ["data-surface"], cn = ["data-surface"], ln = /* @__PURE__ */ d({
2050
2050
  "data-testid": "vibe-asset-error",
2051
2051
  "data-kind": j(w).getAssetErrorKind(r),
2052
2052
  class: "grid h-full w-full place-items-center"
2053
- }, [c("div", gn, [
2053
+ }, [c("div", _n, [
2054
2054
  u(j(oe), {
2055
2055
  class: "h-7 w-7 stroke-[1.9] text-[#f7f1ea]/72",
2056
2056
  "aria-hidden": "true"
2057
2057
  }),
2058
- c("p", _n, k(j(w).getAssetErrorLabel(r)), 1),
2058
+ c("p", vn, k(j(w).getAssetErrorLabel(r)), 1),
2059
2059
  j(g).canRetryAsset(j(w).getItemKey(r)) ? (S(), s("button", {
2060
2060
  key: 0,
2061
2061
  type: "button",
2062
2062
  class: "inline-flex items-center justify-center border border-white/14 bg-black/35 px-4 py-2 text-[0.64rem] font-bold uppercase tracking-[0.22em] text-[#f7f1ea]/82 backdrop-blur-[18px] transition hover:border-white/28 hover:bg-black/50",
2063
2063
  onClick: z((e) => j(g).retryAsset(j(w).getItemKey(r)), ["stop"])
2064
- }, " Retry ", 8, vn)) : o("", !0)
2065
- ])], 8, hn)) : r.type === "image" ? (S(), s("img", {
2064
+ }, " Retry ", 8, yn)) : o("", !0)
2065
+ ])], 8, gn)) : r.type === "image" ? (S(), s("img", {
2066
2066
  key: j(g).getAssetRenderKey(j(w).getItemKey(r)),
2067
2067
  src: j(w).getFullscreenImageSource(i, r),
2068
2068
  alt: r.title ?? "",
@@ -2073,7 +2073,7 @@ var sn = ["data-surface"], cn = ["data-surface"], ln = /* @__PURE__ */ d({
2073
2073
  ref: (e) => pe(j(w).getItemKey(r), e),
2074
2074
  onLoad: (e) => fe(e, j(w).getItemKey(r), r.url),
2075
2075
  onError: (e) => j(g).onImageError(j(w).getItemKey(r), r.url)
2076
- }, null, 42, yn)) : (S(), s("video", {
2076
+ }, null, 42, bn)) : (S(), s("video", {
2077
2077
  key: j(g).getAssetRenderKey(j(w).getItemKey(r)),
2078
2078
  class: _(["block h-auto max-h-full w-auto max-w-full cursor-pointer object-contain shadow-[0_40px_120px_-60px_rgba(0,0,0,0.9)] transition-opacity duration-300", j(g).isMediaReady(j(w).getItemKey(r)) ? "opacity-100" : "opacity-0"]),
2079
2079
  playsinline: "",
@@ -2096,10 +2096,10 @@ var sn = ["data-surface"], cn = ["data-surface"], ln = /* @__PURE__ */ d({
2096
2096
  onStalled: (e) => j(g).onMediaEvent(j(w).getItemKey(r), e),
2097
2097
  onTimeupdate: (e) => j(g).onMediaEvent(j(w).getItemKey(r), e),
2098
2098
  onWaiting: (e) => j(g).onMediaEvent(j(w).getItemKey(r), e)
2099
- }, null, 42, bn))], 2)) : j(g).isAudio(r) ? (S(), s("div", {
2099
+ }, null, 42, xn))], 2)) : j(g).isAudio(r) ? (S(), s("div", {
2100
2100
  key: 1,
2101
- class: _(["relative z-[1] grid w-full max-w-[1100px] justify-items-center gap-6 px-[clamp(2rem,4vw,3rem)] py-[clamp(2rem,4vw,3rem)] text-center", i === j(g).resolvedActiveIndex.value ? H.value : ""])
2102
- }, [c("div", xn, [
2101
+ class: _(["relative z-[1] grid w-full max-w-[1100px] justify-items-center gap-6 px-[clamp(2rem,4vw,3rem)] py-[clamp(2rem,4vw,3rem)] text-center", i === j(g).resolvedActiveIndex.value ? V.value : ""])
2102
+ }, [c("div", Sn, [
2103
2103
  c("button", {
2104
2104
  type: "button",
2105
2105
  class: "relative grid h-full w-full place-items-center border border-white/12 bg-[linear-gradient(180deg,rgba(255,255,255,0.04),rgba(255,255,255,0.02)),radial-gradient(circle_at_center,rgba(16,185,129,0.14),transparent_58%)] text-[#f7f1ea] transition-[border-color,background] duration-200 hover:border-white/30 hover:bg-[linear-gradient(180deg,rgba(255,255,255,0.07),rgba(255,255,255,0.03)),radial-gradient(circle_at_center,rgba(16,185,129,0.18),transparent_58%)] focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-4 focus-visible:outline-[#f7f1ea]",
@@ -2109,19 +2109,19 @@ var sn = ["data-surface"], cn = ["data-surface"], ln = /* @__PURE__ */ d({
2109
2109
  }, [
2110
2110
  n[6] ||= c("span", { class: "pointer-events-none absolute inset-0 border border-white/8 bg-[radial-gradient(circle,rgba(16,185,129,0.16),transparent_66%)]" }, null, -1),
2111
2111
  n[7] ||= c("span", { class: "pointer-events-none absolute h-[clamp(220px,30vw,360px)] w-[clamp(220px,30vw,360px)] border border-white/8 bg-[radial-gradient(circle,rgba(255,255,255,0.08),transparent_62%)]" }, null, -1),
2112
- c("span", Cn, [D(e.$slots, "item-icon", {
2112
+ c("span", wn, [D(e.$slots, "item-icon", {
2113
2113
  icon: j(St)(r.type),
2114
2114
  item: r
2115
2115
  }, () => [(S(), a(O(j(St)(r.type)), {
2116
2116
  class: "h-6 w-6 stroke-[1.9]",
2117
2117
  "aria-hidden": "true"
2118
2118
  }))])]),
2119
- c("span", wn, [(S(), a(O(j(g).mediaStates.value[j(w).getItemKey(r)]?.paused ?? !0 ? j(ae) : j(ie)), {
2119
+ c("span", Tn, [(S(), a(O(j(g).mediaStates.value[j(w).getItemKey(r)]?.paused ?? !0 ? j(ae) : j(ie)), {
2120
2120
  class: "h-4 w-4 stroke-2",
2121
2121
  "aria-hidden": "true"
2122
2122
  }))])
2123
- ], 8, Sn),
2124
- j(w).isAssetLoading(i, r) ? (S(), s("div", Tn, [c("span", En, [u(j(re), {
2123
+ ], 8, Cn),
2124
+ j(w).isAssetLoading(i, r) ? (S(), s("div", En, [c("span", Dn, [u(j(re), {
2125
2125
  class: "h-5 w-5 animate-spin stroke-[1.9] text-[#f7f1ea]/78",
2126
2126
  "aria-hidden": "true"
2127
2127
  })])])) : o("", !0),
@@ -2134,14 +2134,14 @@ var sn = ["data-surface"], cn = ["data-surface"], ln = /* @__PURE__ */ d({
2134
2134
  class: "h-7 w-7 stroke-[1.9] text-[#f7f1ea]/72",
2135
2135
  "aria-hidden": "true"
2136
2136
  }),
2137
- c("p", On, k(j(w).getAssetErrorLabel(r)), 1),
2137
+ c("p", kn, k(j(w).getAssetErrorLabel(r)), 1),
2138
2138
  j(g).canRetryAsset(j(w).getItemKey(r)) ? (S(), s("button", {
2139
2139
  key: 0,
2140
2140
  type: "button",
2141
2141
  class: "pointer-events-auto inline-flex items-center justify-center border border-white/14 bg-black/35 px-4 py-2 text-[0.64rem] font-bold uppercase tracking-[0.22em] text-[#f7f1ea]/82 backdrop-blur-[18px] transition hover:border-white/28 hover:bg-black/50",
2142
2142
  onClick: z((e) => j(g).retryAsset(j(w).getItemKey(r)), ["stop"])
2143
- }, " Retry ", 8, kn)) : o("", !0)
2144
- ], 8, Dn)], 64)) : o("", !0)
2143
+ }, " Retry ", 8, An)) : o("", !0)
2144
+ ], 8, On)], 64)) : o("", !0)
2145
2145
  ]), (S(), s("audio", {
2146
2146
  key: j(g).getAssetRenderKey(j(w).getItemKey(r)),
2147
2147
  src: j(w).getFullscreenMediaSource(i, r),
@@ -2162,14 +2162,14 @@ var sn = ["data-surface"], cn = ["data-surface"], ln = /* @__PURE__ */ d({
2162
2162
  onStalled: (e) => j(g).onMediaEvent(j(w).getItemKey(r), e),
2163
2163
  onTimeupdate: (e) => j(g).onMediaEvent(j(w).getItemKey(r), e),
2164
2164
  onWaiting: (e) => j(g).onMediaEvent(j(w).getItemKey(r), e)
2165
- }, null, 40, An))], 2)) : (S(), s("div", jn, [c("div", Mn, [D(e.$slots, "item-icon", {
2165
+ }, null, 40, jn))], 2)) : (S(), s("div", Mn, [c("div", Nn, [D(e.$slots, "item-icon", {
2166
2166
  icon: j(St)(r.type),
2167
2167
  item: r
2168
2168
  }, () => [(S(), a(O(j(St)(r.type)), {
2169
2169
  class: "h-6 w-6 stroke-[1.9]",
2170
2170
  "aria-hidden": "true"
2171
- }))])])]))], 14, fn))), 128)),
2172
- G.value && p["fullscreen-overlay"] ? (S(), s("div", Nn, [c("div", Pn, [D(e.$slots, "fullscreen-overlay", v(f(G.value)))])])) : o("", !0),
2171
+ }))])])]))], 14, pn))), 128)),
2172
+ U.value && p["fullscreen-overlay"] ? (S(), s("div", Pn, [c("div", Fn, [D(e.$slots, "fullscreen-overlay", v(f(U.value)))])])) : o("", !0),
2173
2173
  j(g).activeItem.value ? (S(), a(yt, {
2174
2174
  key: 1,
2175
2175
  "current-index": j(g).resolvedActiveIndex.value,
@@ -2180,9 +2180,9 @@ var sn = ["data-surface"], cn = ["data-surface"], ln = /* @__PURE__ */ d({
2180
2180
  title: j(g).activeItem.value.title ?? null,
2181
2181
  total: j(g).items.value.length,
2182
2182
  onBackToList: n[0] ||= (e) => m("back-to-list")
2183
- }, l({ _: 2 }, [X.value && G.value ? {
2183
+ }, l({ _: 2 }, [Y.value && U.value ? {
2184
2184
  name: "actions",
2185
- fn: L(() => [D(e.$slots, "fullscreen-header-actions", v(f(G.value)))]),
2185
+ fn: L(() => [D(e.$slots, "fullscreen-header-actions", v(f(U.value)))]),
2186
2186
  key: "0"
2187
2187
  } : void 0]), 1032, [
2188
2188
  "current-index",
@@ -2193,7 +2193,7 @@ var sn = ["data-surface"], cn = ["data-surface"], ln = /* @__PURE__ */ d({
2193
2193
  "title",
2194
2194
  "total"
2195
2195
  ])) : o("", !0),
2196
- B.value ? (S(), a(ct, {
2196
+ ee.value ? (S(), a(ct, {
2197
2197
  key: 2,
2198
2198
  "current-time": j(g).activeMediaState.value.currentTime,
2199
2199
  "current-time-label": j(g).formatPlaybackTime(j(g).activeMediaState.value.currentTime),
@@ -2202,7 +2202,7 @@ var sn = ["data-surface"], cn = ["data-surface"], ln = /* @__PURE__ */ d({
2202
2202
  muted: j(g).activeMediaState.value.muted,
2203
2203
  progress: j(g).activeMediaProgress.value,
2204
2204
  volume: j(g).activeMediaState.value.volume,
2205
- "volume-control-layout": V.value,
2205
+ "volume-control-layout": B.value,
2206
2206
  onSeekInput: j(g).onMediaSeekInput,
2207
2207
  onVolumeInput: j(g).onMediaVolumeInput,
2208
2208
  onVolumeToggle: j(g).onMediaVolumeToggle
@@ -2219,18 +2219,18 @@ var sn = ["data-surface"], cn = ["data-surface"], ln = /* @__PURE__ */ d({
2219
2219
  "onVolumeInput",
2220
2220
  "onVolumeToggle"
2221
2221
  ])) : o("", !0),
2222
- J.value ? (S(), s("div", {
2222
+ K.value ? (S(), s("div", {
2223
2223
  key: 3,
2224
2224
  class: _(["absolute left-1/2 z-[4] -translate-x-1/2", R.value])
2225
- }, [ce.value ? D(e.$slots, "fullscreen-status", v(h({ key: 0 }, J.value))) : (S(), s("div", {
2225
+ }, [ce.value ? D(e.$slots, "fullscreen-status", v(h({ key: 0 }, K.value))) : (S(), s("div", {
2226
2226
  key: 1,
2227
2227
  "data-testid": "vibe-fullscreen-status-badge",
2228
- class: _(["inline-flex w-auto items-center border border-white/14 bg-black/40 px-5 py-3 text-[0.75rem] font-bold uppercase tracking-[0.18em] text-[#f7f1ea]/74 backdrop-blur-[18px] max-[720px]:w-[calc(100%-2.5rem)] max-[720px]:justify-center", J.value.kind === "end" ? "border-amber-300/35 text-amber-200" : J.value.kind === "failed" ? "border-rose-400/45 text-rose-100" : ""])
2229
- }, k(J.value.message), 3))], 2)) : o("", !0)
2230
- ])) : U.value ? (S(), s("div", Fn, [c("div", In, [c("span", Ln, [u(j(re), {
2228
+ class: _(["inline-flex w-auto items-center border border-white/14 bg-black/40 px-5 py-3 text-[0.75rem] font-bold uppercase tracking-[0.18em] text-[#f7f1ea]/74 backdrop-blur-[18px] max-[720px]:w-[calc(100%-2.5rem)] max-[720px]:justify-center", K.value.kind === "end" ? "border-amber-300/35 text-amber-200" : K.value.kind === "failed" ? "border-rose-400/45 text-rose-100" : ""])
2229
+ }, k(K.value.message), 3))], 2)) : o("", !0)
2230
+ ])) : te.value ? (S(), s("div", In, [c("div", Ln, [c("span", Rn, [u(j(re), {
2231
2231
  class: "h-5 w-5 animate-spin stroke-[1.9] text-[#f7f1ea]/78",
2232
2232
  "aria-hidden": "true"
2233
- })]), c("p", Rn, k(W.value), 1)])])) : j(de) && j(Z) ? (S(), a(ln, {
2233
+ })]), c("p", zn, k(H.value), 1)])])) : j(de) && j(Z) ? (S(), a(un, {
2234
2234
  key: 2,
2235
2235
  message: j(Z).message,
2236
2236
  mode: j(Z).mode,
@@ -2242,7 +2242,7 @@ var sn = ["data-surface"], cn = ["data-surface"], ln = /* @__PURE__ */ d({
2242
2242
  "message",
2243
2243
  "mode",
2244
2244
  "surface"
2245
- ])) : o("", !0), j(le) && j(Z) ? (S(), a(ln, {
2245
+ ])) : o("", !0), j(le) && j(Z) ? (S(), a(un, {
2246
2246
  key: 3,
2247
2247
  message: j(Z).message,
2248
2248
  mode: j(Z).mode,
@@ -2262,7 +2262,7 @@ var sn = ["data-surface"], cn = ["data-surface"], ln = /* @__PURE__ */ d({
2262
2262
  "leave-from-class": "translate-x-0 opacity-100",
2263
2263
  "leave-to-class": "translate-x-full opacity-0"
2264
2264
  }, {
2265
- default: L(() => [ne.value && G.value ? (S(), s("aside", zn, [c("div", Bn, [D(e.$slots, "fullscreen-aside", v(f(G.value)))])])) : o("", !0)]),
2265
+ default: L(() => [ne.value && U.value ? (S(), s("aside", Bn, [c("div", Vn, [D(e.$slots, "fullscreen-aside", v(f(U.value)))])])) : o("", !0)]),
2266
2266
  _: 3
2267
2267
  })], 4),
2268
2268
  u(r, {
@@ -2273,29 +2273,29 @@ var sn = ["data-surface"], cn = ["data-surface"], ln = /* @__PURE__ */ d({
2273
2273
  "leave-from-class": "translate-x-0 opacity-100",
2274
2274
  "leave-to-class": "translate-x-full opacity-0"
2275
2275
  }, {
2276
- default: L(() => [se.value && G.value ? (S(), s("aside", Vn, [c("div", Hn, [D(e.$slots, "fullscreen-aside", v(f(G.value)))])])) : o("", !0)]),
2276
+ default: L(() => [se.value && U.value ? (S(), s("aside", Hn, [c("div", Un, [D(e.$slots, "fullscreen-aside", v(f(U.value)))])])) : o("", !0)]),
2277
2277
  _: 3
2278
2278
  })
2279
2279
  ]));
2280
2280
  }
2281
- }), Kn = 1, qn = .5;
2282
- function Jn(e) {
2281
+ }), qn = 1, Jn = .5;
2282
+ function Yn(e) {
2283
2283
  if (e.type !== "image" && e.type !== "video") return {
2284
- width: Kn,
2285
- height: Kn,
2284
+ width: qn,
2285
+ height: qn,
2286
2286
  source: "fallback"
2287
2287
  };
2288
2288
  let t = e.preview?.width, n = e.preview?.height;
2289
- if (tr(t) && tr(n)) {
2290
- let r = nr(e, t, n);
2289
+ if (nr(t) && nr(n)) {
2290
+ let r = rr(e, t, n);
2291
2291
  return {
2292
2292
  width: r.width,
2293
2293
  height: r.height,
2294
2294
  source: "preview"
2295
2295
  };
2296
2296
  }
2297
- if (tr(e.width) && tr(e.height)) {
2298
- let t = nr(e, e.width, e.height);
2297
+ if (nr(e.width) && nr(e.height)) {
2298
+ let t = rr(e, e.width, e.height);
2299
2299
  return {
2300
2300
  width: t.width,
2301
2301
  height: t.height,
@@ -2303,31 +2303,31 @@ function Jn(e) {
2303
2303
  };
2304
2304
  }
2305
2305
  return {
2306
- width: Kn,
2307
- height: Kn,
2306
+ width: qn,
2307
+ height: qn,
2308
2308
  source: "fallback"
2309
2309
  };
2310
2310
  }
2311
- function Yn(e, t) {
2311
+ function Xn(e, t) {
2312
2312
  return !e || e <= 0 || !t || t <= 0 ? 1 : Math.max(1, Math.floor(e / t));
2313
2313
  }
2314
- function Xn(e, t, n, r = 0) {
2314
+ function Zn(e, t, n, r = 0) {
2315
2315
  if (!e || e <= 0 || !t || t <= 0) return n;
2316
2316
  let i = typeof r == "number" && r > 0 ? r : 0, a = e - Math.max(0, t - 1) * i;
2317
2317
  return !a || a <= 0 ? n : a / t;
2318
2318
  }
2319
- function Zn(e, t) {
2320
- let n = Jn(e);
2319
+ function Qn(e, t) {
2320
+ let n = Yn(e);
2321
2321
  return n.height / n.width * t;
2322
2322
  }
2323
- function Qn(e, t) {
2323
+ function $n(e, t) {
2324
2324
  let n = Array.from({ length: t.columnCount }, () => 0), r = Array(e.length), i = Array(e.length), a = /* @__PURE__ */ new Map(), o = /* @__PURE__ */ new Map(), s = 0;
2325
2325
  for (let c = 0; c < e.length; c += 1) {
2326
2326
  let l = e[c];
2327
2327
  o.set($(l), c);
2328
2328
  let u = 0;
2329
2329
  for (let e = 1; e < n.length; e += 1) n[e] < n[u] && (u = e);
2330
- let d = u * (t.columnWidth + t.gapX), f = n[u], p = Zn(l, t.columnWidth);
2330
+ let d = u * (t.columnWidth + t.gapX), f = n[u], p = Qn(l, t.columnWidth);
2331
2331
  r[c] = {
2332
2332
  x: d,
2333
2333
  y: f
@@ -2346,7 +2346,7 @@ function Qn(e, t) {
2346
2346
  indexById: o
2347
2347
  };
2348
2348
  }
2349
- function $n(e) {
2349
+ function er(e) {
2350
2350
  if (e.itemCount <= 0) return [];
2351
2351
  if (e.viewportHeight <= 0) return Array.from({ length: e.itemCount }, (e, t) => t);
2352
2352
  let t = Math.max(0, e.scrollTop - e.overscanPx), n = e.scrollTop + e.viewportHeight + e.overscanPx, r = Math.floor(t / e.bucketPx), i = Math.floor(n / e.bucketPx), a = /* @__PURE__ */ new Set();
@@ -2356,7 +2356,7 @@ function $n(e) {
2356
2356
  }
2357
2357
  return Array.from(a).sort((e, t) => e - t);
2358
2358
  }
2359
- function er(e, t, n) {
2359
+ function tr(e, t, n) {
2360
2360
  let r = /* @__PURE__ */ new Map();
2361
2361
  for (let i of e) {
2362
2362
  let e = t.get($(i));
@@ -2366,11 +2366,11 @@ function er(e, t, n) {
2366
2366
  }
2367
2367
  return r;
2368
2368
  }
2369
- function tr(e) {
2369
+ function nr(e) {
2370
2370
  return typeof e == "number" && Number.isFinite(e) && e > 0;
2371
2371
  }
2372
- function nr(e, t, n) {
2373
- return e.type !== "image" || n / t >= qn ? {
2372
+ function rr(e, t, n) {
2373
+ return e.type !== "image" || n / t >= Jn ? {
2374
2374
  width: t,
2375
2375
  height: n
2376
2376
  } : {
@@ -2380,21 +2380,21 @@ function nr(e, t, n) {
2380
2380
  }
2381
2381
  //#endregion
2382
2382
  //#region src/components/viewer-core/useMasonryMotion.ts
2383
- var rr = 300, ir = 600, ar = 40, or = 300, sr = 400;
2384
- function cr(e, t) {
2383
+ var ir = 300, ar = 600, or = 40, sr = 300, cr = 400;
2384
+ function lr(e, t) {
2385
2385
  return t === "top" ? [...e].reverse() : e;
2386
2386
  }
2387
- function lr(e) {
2388
- return e <= 0 ? ir : ir + Math.min((e - 1) * ar, sr);
2387
+ function ur(e) {
2388
+ return e <= 0 ? ar : ar + Math.min((e - 1) * or, cr);
2389
2389
  }
2390
- function ur() {
2391
- return or;
2390
+ function dr() {
2391
+ return sr;
2392
2392
  }
2393
- function dr(e) {
2393
+ function fr(e) {
2394
2394
  let t = e.itemHeight > 0 ? e.itemHeight : e.columnWidth;
2395
2395
  return e.direction === "top" ? e.scrollTop - t : e.scrollTop + e.viewportHeight + t;
2396
2396
  }
2397
- function fr(e) {
2397
+ function pr(e) {
2398
2398
  let t = T(/* @__PURE__ */ new Set()), n = T(/* @__PURE__ */ new Set()), r = T(/* @__PURE__ */ new Map()), a = T(/* @__PURE__ */ new Map()), o = T(/* @__PURE__ */ new Map()), s = T(/* @__PURE__ */ new Set()), c = T(/* @__PURE__ */ new Map()), l = T(/* @__PURE__ */ new Map()), u = T(/* @__PURE__ */ new Set()), d = /* @__PURE__ */ new Set(), f = /* @__PURE__ */ new Set(), p = i(() => Array.from(o.value.values()));
2399
2399
  F(e.visibleIndices, (i) => {
2400
2400
  if (!i.length) return;
@@ -2404,20 +2404,20 @@ function fr(e) {
2404
2404
  !r || !t.value.has(r) || d.has(r) || (d.add(r), o.push(r));
2405
2405
  }
2406
2406
  if (!o.length) return;
2407
- let s = cr(o, a.value.get(o[0]) ?? "bottom"), c = new Map(r.value);
2408
- for (let e = 0; e < s.length; e += 1) c.set(s[e], Math.min(e * ar, sr));
2409
- r.value = c, pr(() => {
2407
+ let s = lr(o, a.value.get(o[0]) ?? "bottom"), c = new Map(r.value);
2408
+ for (let e = 0; e < s.length; e += 1) c.set(s[e], Math.min(e * or, cr));
2409
+ r.value = c, mr(() => {
2410
2410
  let e = new Set(n.value);
2411
2411
  for (let t of o) e.add(t);
2412
2412
  n.value = e;
2413
- }), mr(() => {
2413
+ }), hr(() => {
2414
2414
  let e = new Set(t.value);
2415
2415
  for (let t of o) e.delete(t);
2416
2416
  t.value = e, S(() => {
2417
2417
  let e = new Set(n.value), t = new Map(r.value), i = new Map(a.value);
2418
2418
  for (let n of o) e.delete(n), t.delete(n), i.delete(n), d.delete(n);
2419
2419
  n.value = e, r.value = t, a.value = i;
2420
- }, lr(o.length));
2420
+ }, ur(o.length));
2421
2421
  });
2422
2422
  }, { flush: "post" }), F(() => e.items.value.map((e) => $(e)), (e) => {
2423
2423
  if (!e.length || !o.value.size) return;
@@ -2444,7 +2444,7 @@ function fr(e) {
2444
2444
  let e = $(t.item);
2445
2445
  p.push(e), i.set(e, t), c.delete(e), l.delete(e), u.delete(e), f.delete(e), d.delete(e);
2446
2446
  }
2447
- o.value = i, t.value = c, n.value = l, r.value = u, a.value = f, pr(() => {
2447
+ o.value = i, t.value = c, n.value = l, r.value = u, a.value = f, mr(() => {
2448
2448
  let e = new Set(s.value);
2449
2449
  for (let t of p) e.add(t);
2450
2450
  s.value = e;
@@ -2452,9 +2452,9 @@ function fr(e) {
2452
2452
  let e = new Map(o.value), t = new Set(s.value);
2453
2453
  for (let n of p) e.delete(n), t.delete(n);
2454
2454
  o.value = e, s.value = t;
2455
- }, or);
2455
+ }, sr);
2456
2456
  }
2457
- function g(t, n, r = rr) {
2457
+ function g(t, n, r = ir) {
2458
2458
  if (!t.size) return;
2459
2459
  let i = /* @__PURE__ */ new Map(), a = [];
2460
2460
  for (let [r, o] of t.entries()) {
@@ -2473,8 +2473,8 @@ function fr(e) {
2473
2473
  c.value = i, u.value = /* @__PURE__ */ new Set();
2474
2474
  let o = new Map(l.value);
2475
2475
  for (let e of a) o.set(e, r);
2476
- l.value = o, pr(() => {
2477
- u.value = new Set(a), pr(() => {
2476
+ l.value = o, mr(() => {
2477
+ u.value = new Set(a), mr(() => {
2478
2478
  c.value = /* @__PURE__ */ new Map();
2479
2479
  });
2480
2480
  }), S(() => {
@@ -2485,8 +2485,8 @@ function fr(e) {
2485
2485
  }, r);
2486
2486
  }
2487
2487
  function _(e) {
2488
- if (n.value.has(e)) return `transform ${ir}ms ease-out`;
2489
- if (u.value.has(e)) return `transform ${l.value.get(e) ?? rr}ms ease-out`;
2488
+ if (n.value.has(e)) return `transform ${ar}ms ease-out`;
2489
+ if (u.value.has(e)) return `transform ${l.value.get(e) ?? ir}ms ease-out`;
2490
2490
  }
2491
2491
  function v(e) {
2492
2492
  if (!n.value.has(e)) return;
@@ -2503,7 +2503,7 @@ function fr(e) {
2503
2503
  } : {
2504
2504
  dx: 0,
2505
2505
  dy: 0
2506
- }, u = s ? a.value.get(s) ?? "bottom" : "bottom", d = s && t.value.has(s) ? dr({
2506
+ }, u = s ? a.value.get(s) ?? "bottom" : "bottom", d = s && t.value.has(s) ? fr({
2507
2507
  columnWidth: e.columnWidth.value,
2508
2508
  direction: u,
2509
2509
  itemHeight: o,
@@ -2517,14 +2517,14 @@ function fr(e) {
2517
2517
  if (!r) return {
2518
2518
  opacity: "0",
2519
2519
  transform: "translate3d(0, 0, 0) scale(0.96)",
2520
- transition: `opacity ${or}ms ease-out, transform ${or}ms ease-out`
2520
+ transition: `opacity ${sr}ms ease-out, transform ${sr}ms ease-out`
2521
2521
  };
2522
2522
  let i = s.value.has(n);
2523
2523
  return {
2524
2524
  height: `${r.height}px`,
2525
2525
  opacity: i ? "0" : "1",
2526
2526
  transform: `translate3d(${r.position.x}px, ${r.position.y}px, 0) scale(${i ? "0.96" : "1"})`,
2527
- transition: `opacity ${or}ms ease-out, transform ${or}ms ease-out`,
2527
+ transition: `opacity ${sr}ms ease-out, transform ${sr}ms ease-out`,
2528
2528
  width: `${e.columnWidth.value}px`
2529
2529
  };
2530
2530
  }
@@ -2545,28 +2545,28 @@ function fr(e) {
2545
2545
  playFlipMoveAnimation: g
2546
2546
  };
2547
2547
  }
2548
- function pr(e) {
2548
+ function mr(e) {
2549
2549
  if (typeof requestAnimationFrame == "function") {
2550
2550
  requestAnimationFrame(() => e());
2551
2551
  return;
2552
2552
  }
2553
2553
  setTimeout(e, 0);
2554
2554
  }
2555
- function mr(e) {
2556
- pr(() => pr(e));
2555
+ function hr(e) {
2556
+ mr(() => mr(e));
2557
2557
  }
2558
2558
  //#endregion
2559
2559
  //#region src/components/viewer-core/masonryViewport.ts
2560
- function hr(e, t) {
2560
+ function gr(e, t) {
2561
2561
  return e?.clientHeight || Math.round(e?.getBoundingClientRect().height ?? 0) || t || window.innerHeight || 1;
2562
2562
  }
2563
- function gr(e, t, n) {
2563
+ function _r(e, t, n) {
2564
2564
  return e?.clientWidth || Math.round(e?.getBoundingClientRect().width ?? 0) || t || window.innerWidth || n;
2565
2565
  }
2566
- function _r(e, t, n, r) {
2566
+ function vr(e, t, n, r) {
2567
2567
  return (e?.scrollHeight ?? r) - (t + n);
2568
2568
  }
2569
- function vr(e, t) {
2569
+ function yr(e, t) {
2570
2570
  return {
2571
2571
  height: `${e}px`,
2572
2572
  transform: `translate3d(0, ${t}px, 0)`
@@ -2574,8 +2574,8 @@ function vr(e, t) {
2574
2574
  }
2575
2575
  //#endregion
2576
2576
  //#region src/components/viewer-core/useEdgeBoundary.ts
2577
- var yr = 250, br = 1e3;
2578
- function xr(e) {
2577
+ var br = 250, xr = 1e3;
2578
+ function Sr(e) {
2579
2579
  let t = T(!1), n = T(!1), r = T(0), i = T(0), a = T(!1), o = T(!1), s = 0, c = null;
2580
2580
  b(() => {
2581
2581
  y();
@@ -2591,7 +2591,7 @@ function xr(e) {
2591
2591
  function u(t) {
2592
2592
  if (!x(t) || !e.isAtBoundary()) return;
2593
2593
  let n = Date.now();
2594
- n < s || (s = n + yr, m());
2594
+ n < s || (s = n + br, m());
2595
2595
  }
2596
2596
  function d() {
2597
2597
  if (!g()) return;
@@ -2625,7 +2625,7 @@ function xr(e) {
2625
2625
  return e.hasPage.value && t.value && r.value > i.value && !e.interactionLocked?.value && !e.loading.value && !a.value && typeof e.requestPage.value == "function";
2626
2626
  }
2627
2627
  function _() {
2628
- o.value = !1, v(br);
2628
+ o.value = !1, v(xr);
2629
2629
  }
2630
2630
  function v(e) {
2631
2631
  y(), a.value = !0, c = setTimeout(() => {
@@ -2648,30 +2648,30 @@ function xr(e) {
2648
2648
  }
2649
2649
  //#endregion
2650
2650
  //#region src/components/viewer-core/useMasonryList.ts
2651
- var Sr = 600, Cr = 24, wr = 16, Tr = 300, Er = 200, Dr = 200, Or = 200, kr = 300, Ar = 24, jr = 48, Mr = 500, Nr = 1e3;
2652
- function Pr(e) {
2653
- let t = T(null), n = T(0), r = T(typeof window > "u" ? 0 : window.innerHeight || 0), a = T(typeof window > "u" ? 0 : window.innerWidth || Tr), o = T([]), s = T([]), c = T(/* @__PURE__ */ new Map()), l = T(0), u = T(/* @__PURE__ */ new Map()), d = T(null), f = T(null), p = T(!1), m = i(() => Math.max(Tr, a.value - Cr * 2)), h = i(() => Yn(m.value, Tr)), _ = i(() => Xn(m.value, h.value, Tr, wr)), v = i(() => Fr(e.activeIndex.value, 0, Math.max(0, e.items.value.length - 1))), y = i(() => $n({
2651
+ var Cr = 600, wr = 24, Tr = 16, Er = 300, Dr = 200, Or = 200, kr = 200, Ar = 300, jr = 24, Mr = 48, Nr = 500, Pr = 1e3;
2652
+ function Fr(e) {
2653
+ let t = T(null), n = T(0), r = T(typeof window > "u" ? 0 : window.innerHeight || 0), a = T(typeof window > "u" ? 0 : window.innerWidth || Er), o = T([]), s = T([]), c = T(/* @__PURE__ */ new Map()), l = T(0), u = T(/* @__PURE__ */ new Map()), d = T(null), f = T(null), p = T(!1), m = i(() => Math.max(Er, a.value - wr * 2)), h = i(() => Xn(m.value, Er)), _ = i(() => Zn(m.value, h.value, Er, Tr)), v = i(() => Ir(e.activeIndex.value, 0, Math.max(0, e.items.value.length - 1))), y = i(() => er({
2654
2654
  itemCount: e.items.value.length,
2655
2655
  viewportHeight: r.value,
2656
2656
  scrollTop: n.value,
2657
- overscanPx: Er,
2658
- bucketPx: Sr,
2657
+ overscanPx: Dr,
2658
+ bucketPx: Cr,
2659
2659
  buckets: c.value
2660
2660
  })), S = i(() => y.value.map((t) => ({
2661
2661
  item: e.items.value[t],
2662
2662
  index: t
2663
2663
  }))), C = i(() => {
2664
- let e = l.value + Cr * 2, t = d.value ?? 0;
2665
- return Math.max(e, t, r.value) + Or;
2666
- }), w = i(() => e.hasNextPage.value || e.allowExhaustedNextPageRefresh.value), E = i(() => e.items.value.length > 0 ? `${v.value + 1} / ${e.items.value.length}` : "0 / 0"), D = i(() => Math.max(0, r.value - Ar * 2)), O = i(() => C.value > r.value + 1 && D.value > 0), k = i(() => {
2664
+ let e = l.value + wr * 2, t = d.value ?? 0;
2665
+ return Math.max(e, t, r.value) + kr;
2666
+ }), w = i(() => e.hasNextPage.value || e.allowExhaustedNextPageRefresh.value), E = i(() => e.items.value.length > 0 ? `${v.value + 1} / ${e.items.value.length}` : "0 / 0"), D = i(() => Math.max(0, r.value - jr * 2)), O = i(() => C.value > r.value + 1 && D.value > 0), k = i(() => {
2667
2667
  if (!O.value) return 0;
2668
2668
  let e = r.value / C.value * D.value;
2669
- return Math.min(D.value, Math.max(jr, e));
2669
+ return Math.min(D.value, Math.max(Mr, e));
2670
2670
  }), A = i(() => {
2671
- if (!O.value) return Ar;
2671
+ if (!O.value) return jr;
2672
2672
  let e = Math.max(0, C.value - r.value);
2673
- return Ar + Math.max(0, D.value - k.value) * (e > 0 ? Fr(n.value / e, 0, 1) : 0);
2674
- }), j = fr({
2673
+ return jr + Math.max(0, D.value - k.value) * (e > 0 ? Ir(n.value / e, 0, 1) : 0);
2674
+ }), j = pr({
2675
2675
  items: e.items,
2676
2676
  visibleIndices: y,
2677
2677
  positions: o,
@@ -2680,27 +2680,27 @@ function Pr(e) {
2680
2680
  columnWidth: _,
2681
2681
  scrollTop: n,
2682
2682
  viewportHeight: r
2683
- }), M = xr({
2683
+ }), M = Sr({
2684
2684
  direction: "top",
2685
2685
  getAnimationLockMs(e) {
2686
- return Math.max(Mr, lr(e)) + Nr;
2686
+ return Math.max(Nr, ur(e)) + Pr;
2687
2687
  },
2688
2688
  hasPage: e.hasPreviousPage,
2689
2689
  interactionLocked: p,
2690
2690
  isAtBoundary() {
2691
- return n.value <= Cr + wr;
2691
+ return n.value <= wr + Tr;
2692
2692
  },
2693
2693
  loading: e.loading,
2694
2694
  requestPage: e.requestPreviousPage
2695
- }), N = xr({
2695
+ }), N = Sr({
2696
2696
  direction: "bottom",
2697
2697
  getAnimationLockMs(e) {
2698
- return lr(e) + Nr;
2698
+ return ur(e) + Pr;
2699
2699
  },
2700
2700
  hasPage: w,
2701
2701
  interactionLocked: p,
2702
2702
  isAtBoundary() {
2703
- return re() <= Dr;
2703
+ return re() <= Or;
2704
2704
  },
2705
2705
  loading: e.loading,
2706
2706
  requestPage: e.requestNextPage
@@ -2710,7 +2710,7 @@ function Pr(e) {
2710
2710
  h,
2711
2711
  _
2712
2712
  ], async ([t], [r = []]) => {
2713
- let i = t.map((e) => $(e)), a = r ?? [], s = a.map((e) => $(e)), c = er(a, u.value, o.value), l = oe(a), d = new Set(s), f = new Set(i), p = t.filter((e) => !d.has($(e))), m = a.flatMap((e) => {
2713
+ let i = t.map((e) => $(e)), a = r ?? [], s = a.map((e) => $(e)), c = tr(a, u.value, o.value), l = oe(a), d = new Set(s), f = new Set(i), p = t.filter((e) => !d.has($(e))), m = a.flatMap((e) => {
2714
2714
  let t = $(e);
2715
2715
  if (f.has(t)) return [];
2716
2716
  let n = c.get(t), r = l.get(t);
@@ -2719,8 +2719,8 @@ function Pr(e) {
2719
2719
  item: e,
2720
2720
  position: n
2721
2721
  }];
2722
- }), h = i.length > s.length && s.length > 0 && i[0] !== s[0], _ = t.length === 0 && a.length > 0 && m.length > 0 && n.value > 0, y = m.length > 0 && n.value > Cr + wr, b = h && n.value > Cr + wr ? t[v.value] : null, x = b ? $(b) : null;
2723
- y && q(ur() + Nr), _ && K(), B(), m.length > 0 && j.markLeave(m), p.length > 0 && (j.markEnter(p, h ? "top" : "bottom"), h ? M.onItemsMutated(p.length) : N.onItemsMutated(p.length)), j.playFlipMoveAnimation(c, new Set(p.map((e) => $(e))), h ? Mr : void 0), x ? (await g(), G(x, c)) : e.active.value && s.length > 0 && Y();
2722
+ }), h = i.length > s.length && s.length > 0 && i[0] !== s[0], _ = t.length === 0 && a.length > 0 && m.length > 0 && n.value > 0, y = m.length > 0 && n.value > wr + Tr, b = h && n.value > wr + Tr ? t[v.value] : null, x = b ? $(b) : null;
2723
+ y && G(dr() + Pr), _ && W(), ee(), m.length > 0 && j.markLeave(m), p.length > 0 && (j.markEnter(p, h ? "top" : "bottom"), h ? M.onItemsMutated(p.length) : N.onItemsMutated(p.length)), j.playFlipMoveAnimation(c, new Set(p.map((e) => $(e))), h ? Nr : void 0), x ? (await g(), U(x, c)) : e.active.value && s.length > 0 && q();
2724
2724
  }, { immediate: !0 }), F([
2725
2725
  () => e.pendingAppendItems.value.map((e) => $(e)),
2726
2726
  h,
@@ -2737,39 +2737,39 @@ function Pr(e) {
2737
2737
  }
2738
2738
  if (i !== !1 || f.value == null) return;
2739
2739
  await g();
2740
- let o = Math.max(0, C.value - r.value), s = Fr(f.value, 0, o);
2740
+ let o = Math.max(0, C.value - r.value), s = Ir(f.value, 0, o);
2741
2741
  a.scrollTop = s, n.value = s, M.syncBoundary(), N.syncBoundary();
2742
2742
  }), F(() => e.loading.value, async (t) => {
2743
2743
  !t && !e.pendingAppendItems.value.length && !L && !z && (d.value = null), M.onLoadingChange(t), N.onLoadingChange(t), await g();
2744
2744
  }), x(async () => {
2745
- X(), await g(), v.value > 0 ? W(v.value, "center") : J(), M.syncBoundary(), N.syncBoundary(), typeof ResizeObserver < "u" ? (P = new ResizeObserver(() => {
2746
- X();
2747
- }), t.value && P.observe(t.value)) : window.addEventListener("resize", X);
2745
+ Y(), await g(), v.value > 0 ? H(v.value, "center") : K(), M.syncBoundary(), N.syncBoundary(), typeof ResizeObserver < "u" ? (P = new ResizeObserver(() => {
2746
+ Y();
2747
+ }), t.value && P.observe(t.value)) : window.addEventListener("resize", Y);
2748
2748
  }), b(() => {
2749
- P?.disconnect(), P = null, window.removeEventListener("resize", X), ce(), Z(), I &&= (cancelAnimationFrame(I), 0);
2749
+ P?.disconnect(), P = null, window.removeEventListener("resize", Y), ce(), Z(), I &&= (cancelAnimationFrame(I), 0);
2750
2750
  });
2751
- function B() {
2752
- let t = Qn(e.items.value, {
2751
+ function ee() {
2752
+ let t = $n(e.items.value, {
2753
2753
  columnCount: h.value,
2754
2754
  columnWidth: _.value,
2755
- gapX: wr,
2756
- gapY: wr,
2757
- bucketPx: Sr
2755
+ gapX: Tr,
2756
+ gapY: Tr,
2757
+ bucketPx: Cr
2758
2758
  });
2759
2759
  o.value = t.positions.map((e) => ({
2760
- x: e.x + Cr,
2761
- y: e.y + Cr
2760
+ x: e.x + wr,
2761
+ y: e.y + wr
2762
2762
  })), s.value = t.heights, c.value = t.buckets, l.value = t.contentHeight, u.value = t.indexById;
2763
2763
  }
2764
- function V() {
2765
- e.active.value && (n.value = t.value?.scrollTop ?? 0, r.value = te(), M.syncBoundary(), N.syncBoundary(), ee(), !Y() && (I ||= requestAnimationFrame(() => {
2766
- I = 0, J();
2764
+ function B() {
2765
+ e.active.value && (n.value = t.value?.scrollTop ?? 0, r.value = X(), M.syncBoundary(), N.syncBoundary(), J(), !q() && (I ||= requestAnimationFrame(() => {
2766
+ I = 0, K();
2767
2767
  })));
2768
2768
  }
2769
- function H(t) {
2770
- e.active.value && (M.onWheel(t), N.onWheel(t), ee());
2769
+ function V(t) {
2770
+ e.active.value && (M.onWheel(t), N.onWheel(t), J());
2771
2771
  }
2772
- function U(t) {
2772
+ function te(t) {
2773
2773
  let n = e.items.value[t], r = n ? $(n) : "";
2774
2774
  return {
2775
2775
  height: `${s.value[t] ?? _.value}px`,
@@ -2779,19 +2779,19 @@ function Pr(e) {
2779
2779
  transform: j.getCardTransform(t)
2780
2780
  };
2781
2781
  }
2782
- function W(e, i) {
2782
+ function H(e, i) {
2783
2783
  let a = t.value, c = o.value[e], l = s.value[e];
2784
2784
  if (!a || !c || !l) return;
2785
2785
  let u = a.scrollTop, d = Math.max(0, C.value - r.value);
2786
- i === "center" ? u = c.y - (r.value - l) / 2 : c.y < a.scrollTop ? u = c.y - Cr : c.y + l > a.scrollTop + r.value && (u = c.y + l - r.value + Cr), a.scrollTop = Fr(u, 0, d), n.value = a.scrollTop, J();
2786
+ i === "center" ? u = c.y - (r.value - l) / 2 : c.y < a.scrollTop ? u = c.y - wr : c.y + l > a.scrollTop + r.value && (u = c.y + l - r.value + wr), a.scrollTop = Ir(u, 0, d), n.value = a.scrollTop, K();
2787
2787
  }
2788
- function G(e, r) {
2788
+ function U(e, r) {
2789
2789
  let i = t.value, a = r.get(e), s = u.value.get(e), c = s == null ? null : o.value[s];
2790
2790
  if (!i || !a || !c) return;
2791
2791
  let l = c.y - a.y;
2792
2792
  i.scrollTop += l, n.value = i.scrollTop;
2793
2793
  }
2794
- function K() {
2794
+ function W() {
2795
2795
  let e = t.value;
2796
2796
  if (!e) {
2797
2797
  n.value = 0;
@@ -2799,13 +2799,13 @@ function Pr(e) {
2799
2799
  }
2800
2800
  e.scrollTop = 0, n.value = 0, M.syncBoundary(), N.syncBoundary();
2801
2801
  }
2802
- function q(e) {
2802
+ function G(e) {
2803
2803
  Z(), p.value = !0, R = setTimeout(() => {
2804
2804
  R = null, p.value = !1;
2805
2805
  }, Math.max(0, e));
2806
2806
  }
2807
- function J() {
2808
- if (!y.value.length || Y()) return;
2807
+ function K() {
2808
+ if (!y.value.length || q()) return;
2809
2809
  let t = n.value + r.value / 2, i = v.value, a = Infinity;
2810
2810
  for (let e of y.value) {
2811
2811
  let n = o.value[e], r = s.value[e];
@@ -2815,36 +2815,36 @@ function Pr(e) {
2815
2815
  }
2816
2816
  e.setActiveIndex(i);
2817
2817
  }
2818
- function Y() {
2819
- let t = n.value <= Cr + wr, r = re() <= Dr;
2818
+ function q() {
2819
+ let t = n.value <= wr + Tr, r = re() <= Or;
2820
2820
  return t ? (e.setActiveIndex(0), !0) : r ? (e.setActiveIndex(Math.max(0, e.items.value.length - 1)), !0) : !1;
2821
2821
  }
2822
- function ee() {
2822
+ function J() {
2823
2823
  M.maybeRequestPage(), N.maybeRequestPage();
2824
2824
  }
2825
- function X() {
2826
- r.value = te(), a.value = ne();
2825
+ function Y() {
2826
+ r.value = X(), a.value = ne();
2827
2827
  }
2828
- function te() {
2829
- return hr(t.value, r.value);
2828
+ function X() {
2829
+ return gr(t.value, r.value);
2830
2830
  }
2831
2831
  function ne() {
2832
- return gr(t.value, a.value, Tr);
2832
+ return _r(t.value, a.value, Er);
2833
2833
  }
2834
2834
  function re() {
2835
- return _r(t.value, n.value, r.value, C.value);
2835
+ return vr(t.value, n.value, r.value, C.value);
2836
2836
  }
2837
2837
  function ie() {
2838
- return vr(k.value, A.value);
2838
+ return yr(k.value, A.value);
2839
2839
  }
2840
2840
  function ae(e) {
2841
- return e.length ? Qn(e, {
2841
+ return e.length ? $n(e, {
2842
2842
  columnCount: h.value,
2843
2843
  columnWidth: _.value,
2844
- gapX: wr,
2845
- gapY: wr,
2846
- bucketPx: Sr
2847
- }).contentHeight + Cr * 2 : 0;
2844
+ gapX: Tr,
2845
+ gapY: Tr,
2846
+ bucketPx: Cr
2847
+ }).contentHeight + wr * 2 : 0;
2848
2848
  }
2849
2849
  function oe(e) {
2850
2850
  let t = /* @__PURE__ */ new Map();
@@ -2866,7 +2866,7 @@ function Pr(e) {
2866
2866
  } finally {
2867
2867
  d.value = null, z = !1;
2868
2868
  }
2869
- }, kr));
2869
+ }, Ar));
2870
2870
  }
2871
2871
  function ce() {
2872
2872
  L &&= (clearTimeout(L), null);
@@ -2877,31 +2877,31 @@ function Pr(e) {
2877
2877
  return {
2878
2878
  columnWidth: _,
2879
2879
  containerHeight: C,
2880
- getCardStyle: U,
2880
+ getCardStyle: te,
2881
2881
  getLeavingCardStyle: j.getLeavingCardStyle,
2882
2882
  getScrollbarThumbStyle: ie,
2883
2883
  leavingItems: j.leavingItems,
2884
- onScroll: V,
2885
- onWheel: H,
2884
+ onScroll: B,
2885
+ onWheel: V,
2886
2886
  paginationLabel: E,
2887
2887
  renderedItems: S,
2888
2888
  resolvedActiveIndex: v,
2889
- scrollToIndex: W,
2889
+ scrollToIndex: H,
2890
2890
  showScrollbar: O,
2891
2891
  scrollViewportRef: t
2892
2892
  };
2893
2893
  }
2894
- function Fr(e, t, n) {
2894
+ function Ir(e, t, n) {
2895
2895
  return Math.min(Math.max(e, t), n);
2896
2896
  }
2897
2897
  //#endregion
2898
2898
  //#region src/components/viewer-core/listCardAsset.ts
2899
- function Ir(e) {
2899
+ function Lr(e) {
2900
2900
  if (e) try {
2901
2901
  e.removeAttribute("src"), e.src = "";
2902
2902
  } catch {}
2903
2903
  }
2904
- function Lr(e) {
2904
+ function Rr(e) {
2905
2905
  if (e) {
2906
2906
  try {
2907
2907
  e.currentTime = 0;
@@ -2912,12 +2912,12 @@ function Lr(e) {
2912
2912
  } catch {}
2913
2913
  }
2914
2914
  }
2915
- function Rr(e, t) {
2915
+ function zr(e, t) {
2916
2916
  if (t) return e.bottom > t.top && e.top < t.bottom;
2917
2917
  let n = window.innerHeight || document.documentElement.clientHeight || 0;
2918
2918
  return e.bottom > 0 && e.top < n;
2919
2919
  }
2920
- function zr(e) {
2920
+ function Br(e) {
2921
2921
  if (!e) return null;
2922
2922
  try {
2923
2923
  return new URL(e, window.location.href).href;
@@ -2927,22 +2927,22 @@ function zr(e) {
2927
2927
  }
2928
2928
  //#endregion
2929
2929
  //#region src/components/viewer-core/listPreview.ts
2930
- var Br = /\.(avif|gif|jpe?g|png|svg|webp)(\?|#|$)/i, Vr = /\.(m4v|mov|mp4|mpeg|ogg|ogv|webm)(\?|#|$)/i;
2931
- function Hr(e) {
2932
- let t = e.preview?.url ?? e.url, n = Jn(e), r = e.title?.trim() || Ct(e.type);
2930
+ var Vr = /\.(avif|gif|jpe?g|png|svg|webp)(\?|#|$)/i, Hr = /\.(m4v|mov|mp4|mpeg|ogg|ogv|webm)(\?|#|$)/i;
2931
+ function Ur(e) {
2932
+ let t = e.preview?.url ?? e.url, n = Yn(e), r = e.title?.trim() || Ct(e.type);
2933
2933
  return e.type !== "image" && e.type !== "video" ? {
2934
2934
  kind: "fallback",
2935
2935
  url: null,
2936
2936
  width: n.width,
2937
2937
  height: n.height,
2938
2938
  label: r
2939
- } : Wr(e, t) ? {
2939
+ } : Gr(e, t) ? {
2940
2940
  kind: "video",
2941
2941
  url: t,
2942
2942
  width: n.width,
2943
2943
  height: n.height,
2944
2944
  label: r
2945
- } : Ur(e, t) ? {
2945
+ } : Wr(e, t) ? {
2946
2946
  kind: "image",
2947
2947
  url: t,
2948
2948
  width: n.width,
@@ -2956,28 +2956,28 @@ function Hr(e) {
2956
2956
  label: r
2957
2957
  };
2958
2958
  }
2959
- function Ur(e, t) {
2960
- return e.type !== "image" || typeof t != "string" ? !1 : Br.test(t) || Gr(t);
2961
- }
2962
2959
  function Wr(e, t) {
2963
- return e.type === "video" && typeof t == "string" && Vr.test(t);
2960
+ return e.type !== "image" || typeof t != "string" ? !1 : Vr.test(t) || Kr(t);
2961
+ }
2962
+ function Gr(e, t) {
2963
+ return e.type === "video" && typeof t == "string" && Hr.test(t);
2964
2964
  }
2965
- function Gr(e) {
2965
+ function Kr(e) {
2966
2966
  return /^(https?:\/\/|\/\/|\/(?!\/)|\.{1,2}\/|blob:|data:)/i.test(e);
2967
2967
  }
2968
2968
  //#endregion
2969
2969
  //#region src/components/viewer-core/useAssetLoadQueue.ts
2970
- var Kr = {
2970
+ var qr = {
2971
2971
  maxGlobal: 10,
2972
2972
  maxPerDomain: 4,
2973
2973
  maxVideoPerDomain: 2
2974
2974
  };
2975
- function qr(e = Kr) {
2975
+ function Jr(e = qr) {
2976
2976
  let t = /* @__PURE__ */ new Map(), n = /* @__PURE__ */ new Map(), r = 0;
2977
2977
  function i(e) {
2978
2978
  let i = {
2979
2979
  ...e,
2980
- domain: Xr(e.url),
2980
+ domain: Zr(e.url),
2981
2981
  enqueuedAt: r,
2982
2982
  id: `vibe-asset-load-${r += 1}`
2983
2983
  };
@@ -2996,7 +2996,7 @@ function qr(e = Kr) {
2996
2996
  function a() {
2997
2997
  if (n.size === 0) return;
2998
2998
  let r = [...n.values()].sort((e, t) => {
2999
- let n = Yr(e) - Yr(t);
2999
+ let n = Xr(e) - Xr(t);
3000
3000
  return n === 0 ? e.enqueuedAt - t.enqueuedAt : n;
3001
3001
  });
3002
3002
  for (let i of r) {
@@ -3017,8 +3017,8 @@ function qr(e = Kr) {
3017
3017
  }
3018
3018
  return { request: i };
3019
3019
  }
3020
- var Jr = qr();
3021
- function Yr(e) {
3020
+ var Yr = Jr();
3021
+ function Xr(e) {
3022
3022
  try {
3023
3023
  let t = e.getPriority();
3024
3024
  return Number.isFinite(t) ? t : Infinity;
@@ -3026,7 +3026,7 @@ function Yr(e) {
3026
3026
  return Infinity;
3027
3027
  }
3028
3028
  }
3029
- function Xr(e) {
3029
+ function Zr(e) {
3030
3030
  try {
3031
3031
  return new URL(e).hostname || "local";
3032
3032
  } catch {
@@ -3035,14 +3035,14 @@ function Xr(e) {
3035
3035
  }
3036
3036
  //#endregion
3037
3037
  //#region src/components/ListCard.vue?vue&type=script&setup=true&lang.ts
3038
- var Zr = ["aria-label"], Qr = {
3038
+ var Qr = ["aria-label"], $r = {
3039
3039
  key: 0,
3040
3040
  "data-testid": "vibe-list-card-spinner",
3041
3041
  class: "pointer-events-none absolute inset-0 z-[4] grid place-items-center bg-black/18"
3042
- }, $r = { 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]" }, ei = ["src", "alt"], ti = ["src"], ni = ["data-kind"], ri = { class: "grid justify-items-center gap-3 px-4 text-center" }, ii = { class: "text-[0.68rem] font-bold uppercase tracking-[0.22em] text-[#f7f1ea]/72" }, ai = {
3042
+ }, ei = { class: "inline-flex h-12 w-12 items-center justify-center rounded-full bg-black/45 shadow-[0_18px_40px_-18px_rgba(0,0,0,0.85)] backdrop-blur-[18px]" }, ti = ["src", "alt"], ni = ["src"], ri = ["data-kind"], ii = { class: "grid justify-items-center gap-3 px-4 text-center" }, ai = { class: "text-[0.68rem] font-bold uppercase tracking-[0.22em] text-[#f7f1ea]/72" }, oi = {
3043
3043
  key: 4,
3044
3044
  class: "grid h-full w-full place-items-center bg-[radial-gradient(circle_at_center,rgba(255,255,255,0.08),transparent_65%),linear-gradient(180deg,rgba(255,255,255,0.04),rgba(255,255,255,0.02))]"
3045
- }, oi = { class: "inline-flex h-14 w-14 items-center justify-center border border-white/16 bg-black/20" }, si = { class: "pointer-events-none absolute inset-0 z-[3]" }, ci = /* @__PURE__ */ d({
3045
+ }, si = { class: "inline-flex h-14 w-14 items-center justify-center border border-white/16 bg-black/20" }, ci = { class: "pointer-events-none absolute inset-0 z-[3]" }, li = /* @__PURE__ */ d({
3046
3046
  __name: "ListCard",
3047
3047
  props: {
3048
3048
  active: {
@@ -3066,97 +3066,97 @@ var Zr = ["aria-label"], Qr = {
3066
3066
  },
3067
3067
  emits: ["open"],
3068
3068
  setup(e, { emit: t }) {
3069
- let n = e, r = t, l = i(() => Hr(n.item)), d = T(!1), f = T(!1), p = T(!1), m = T(l.value.kind === "fallback"), h = T(null), g = T(null), v = T(null), y = T(null), C = T(null), w = T(l.value.kind === "fallback"), E = i(() => w.value ? n.surfaceActive ? d.value ? l.value.url : null : l.value.url : null), A = i(() => n.surfaceActive && d.value && (l.value.kind === "image" || l.value.kind === "video") && !!l.value.url), M = i(() => l.value.kind === "image" && !!E.value), N = i(() => l.value.kind === "video" && !!E.value), P = i(() => !!h.value), I = i(() => Vt(h.value)), L = i(() => A.value && !h.value && (!w.value || !m.value)), R = null, B = null, V = /* @__PURE__ */ new Set();
3070
- F([E, () => l.value.kind], () => {
3069
+ let n = e, r = t, l = i(() => Ur(n.item)), d = T(!1), f = T(!1), p = T(!1), m = T(l.value.kind === "fallback"), h = T(!1), g = T(null), v = T(null), y = T(null), C = T(null), w = T(null), E = T(l.value.kind === "fallback"), A = i(() => E.value ? n.surfaceActive ? d.value ? l.value.url : null : l.value.url : null), M = i(() => n.surfaceActive && d.value && (l.value.kind === "image" || l.value.kind === "video") && !!l.value.url), N = i(() => l.value.kind === "image" && !!A.value), P = i(() => l.value.kind === "video" && !!A.value), I = i(() => !!g.value), L = i(() => Ht(g.value)), R = i(() => M.value && !g.value && (!E.value || !m.value)), ee = null, B = null, V = /* @__PURE__ */ new Set();
3070
+ F([A, () => l.value.kind], () => {
3071
3071
  let e = l.value.kind === "fallback";
3072
- m.value = e, h.value = null, e && (w.value = !0);
3073
- }), F(A, () => {
3074
- K();
3072
+ m.value = e, h.value = !1, g.value = null, e && (E.value = !0);
3073
+ }), F(M, () => {
3074
+ G();
3075
3075
  }), F([
3076
3076
  d,
3077
3077
  m,
3078
- E
3078
+ A
3079
3079
  ], () => {
3080
- q();
3080
+ K();
3081
3081
  }), F(() => n.surfaceActive, (e) => {
3082
3082
  if (!e) {
3083
- Y(), q();
3083
+ J(), K();
3084
3084
  return;
3085
3085
  }
3086
3086
  requestAnimationFrame(() => {
3087
- ee(), K(), q();
3087
+ Y(), G(), K();
3088
3088
  });
3089
3089
  }), x(() => {
3090
- if (!v.value || typeof IntersectionObserver > "u") {
3091
- y.value = null, d.value = !0, K();
3090
+ if (!y.value || typeof IntersectionObserver > "u") {
3091
+ C.value = null, d.value = !0, G();
3092
3092
  return;
3093
3093
  }
3094
- y.value = v.value.closest("[data-testid=\"vibe-list-scroll\"]"), R = new IntersectionObserver((e) => {
3095
- for (let t of e) t.target === v.value && (n.surfaceActive && ee(t), K(), q());
3094
+ C.value = y.value.closest("[data-testid=\"vibe-list-scroll\"]"), ee = new IntersectionObserver((e) => {
3095
+ for (let t of e) t.target === y.value && (n.surfaceActive && Y(t), G(), K());
3096
3096
  }, {
3097
- root: y.value,
3097
+ root: C.value,
3098
3098
  threshold: [0, 1]
3099
- }), R.observe(v.value);
3099
+ }), ee.observe(y.value);
3100
3100
  }), b(() => {
3101
- J(), R?.disconnect(), R = null;
3101
+ q(), ee?.disconnect(), ee = null;
3102
3102
  });
3103
- function H() {
3104
- se(g.value) && (m.value = !0, h.value = null, X(E.value ?? n.item.url), Y());
3105
- }
3106
- async function U() {
3107
- if (!se(g.value)) return;
3108
- let e = E.value ?? n.item.url;
3109
- m.value = !1, h.value = "generic";
3110
- let t = await Ht(e);
3111
- h.value = t, n.reportAssetError?.({
3103
+ function te() {
3104
+ ce(v.value) && (m.value = !0, g.value = null, X(A.value ?? n.item.url), J());
3105
+ }
3106
+ async function H() {
3107
+ if (!ce(v.value)) return;
3108
+ let e = A.value ?? n.item.url;
3109
+ m.value = !1, g.value = "generic";
3110
+ let t = await Ut(e);
3111
+ g.value = t, n.reportAssetError?.({
3112
3112
  item: n.item,
3113
3113
  occurrenceKey: $(n.item),
3114
3114
  url: e,
3115
3115
  kind: t,
3116
3116
  surface: "grid"
3117
- }), Y();
3117
+ }), J();
3118
+ }
3119
+ function U() {
3120
+ ce(w.value) && (h.value = !0, m.value = !0, g.value = null, X(A.value ?? n.item.url), J(), K());
3118
3121
  }
3119
3122
  function W() {
3120
- se(C.value) && (m.value = !0, h.value = null, X(E.value ?? n.item.url), Y(), q());
3123
+ ce(w.value) && (h.value || (m.value = !1));
3121
3124
  }
3122
3125
  function G() {
3123
- se(C.value) && (m.value = !1);
3124
- }
3125
- function K() {
3126
3126
  if (l.value.kind === "fallback") {
3127
- J(!1);
3127
+ q(!1);
3128
3128
  return;
3129
3129
  }
3130
3130
  if (!n.surfaceActive) {
3131
- Y();
3131
+ J();
3132
3132
  return;
3133
3133
  }
3134
- if (!A.value) {
3135
- J();
3134
+ if (!M.value) {
3135
+ q();
3136
3136
  return;
3137
3137
  }
3138
- if (w.value || B) {
3138
+ if (E.value || B) {
3139
3139
  B?.refresh();
3140
3140
  return;
3141
3141
  }
3142
- B = Jr.request({
3142
+ B = Yr.request({
3143
3143
  assetType: l.value.kind,
3144
- getPriority: ae,
3144
+ getPriority: se,
3145
3145
  onGrant() {
3146
- w.value = !0, m.value = !1, h.value = null;
3146
+ E.value = !0, m.value = !1, g.value = null;
3147
3147
  },
3148
3148
  url: l.value.url ?? n.item.url
3149
3149
  });
3150
3150
  }
3151
- function q() {
3152
- let e = C.value;
3151
+ function K() {
3152
+ let e = w.value;
3153
3153
  if (!(!e || l.value.kind !== "video")) {
3154
- if (h.value) {
3154
+ if (g.value) {
3155
3155
  e.pause();
3156
3156
  return;
3157
3157
  }
3158
- if (E.value && d.value && m.value) {
3159
- e.muted = !0, e.loop = !0, e.playsInline = !0, Gt(e);
3158
+ if (A.value && d.value && m.value) {
3159
+ e.muted = !0, e.loop = !0, e.playsInline = !0, Kt(e);
3160
3160
  return;
3161
3161
  }
3162
3162
  try {
@@ -3165,19 +3165,19 @@ var Zr = ["aria-label"], Qr = {
3165
3165
  e.pause();
3166
3166
  }
3167
3167
  }
3168
- function J(e = !0) {
3169
- w.value = l.value.kind === "fallback", h.value = null, m.value = l.value.kind === "fallback", e && (ne(), ie()), Y();
3168
+ function q(e = !0) {
3169
+ E.value = l.value.kind === "fallback", g.value = null, m.value = l.value.kind === "fallback", e && (ie(), ae()), J();
3170
3170
  }
3171
- function Y() {
3171
+ function J() {
3172
3172
  B?.release(), B = null;
3173
3173
  }
3174
- function ee(e) {
3175
- let t = v.value;
3174
+ function Y(e) {
3175
+ let t = y.value;
3176
3176
  if (!t) {
3177
3177
  d.value = !0;
3178
3178
  return;
3179
3179
  }
3180
- d.value = Rr(e?.boundingClientRect ?? t.getBoundingClientRect(), e?.rootBounds ?? y.value?.getBoundingClientRect() ?? null);
3180
+ d.value = zr(e?.boundingClientRect ?? t.getBoundingClientRect(), e?.rootBounds ?? C.value?.getBoundingClientRect() ?? null);
3181
3181
  }
3182
3182
  function X(e) {
3183
3183
  if (!e) return;
@@ -3189,51 +3189,51 @@ var Zr = ["aria-label"], Qr = {
3189
3189
  url: e
3190
3190
  }));
3191
3191
  }
3192
- function te() {
3193
- if (!I.value) return;
3192
+ function ne() {
3193
+ if (!L.value) return;
3194
3194
  let e = $(n.item);
3195
3195
  V.forEach((t) => {
3196
3196
  t.startsWith(`${e}|`) && V.delete(t);
3197
- }), h.value = null, m.value = !1, w.value = !1, Y(), K();
3198
- }
3199
- function ne() {
3200
- Ir(g.value);
3197
+ }), g.value = null, m.value = !1, E.value = !1, J(), G();
3201
3198
  }
3202
3199
  function ie() {
3203
- Lr(C.value);
3200
+ Lr(v.value);
3204
3201
  }
3205
3202
  function ae() {
3206
- let e = v.value;
3203
+ Rr(w.value);
3204
+ }
3205
+ function se() {
3206
+ let e = y.value;
3207
3207
  if (!e) return Infinity;
3208
3208
  let t = e.getBoundingClientRect();
3209
- if (y.value) {
3210
- let e = y.value.getBoundingClientRect(), n = e.top + e.height / 2;
3209
+ if (C.value) {
3210
+ let e = C.value.getBoundingClientRect(), n = e.top + e.height / 2;
3211
3211
  return Math.abs((t.top + t.bottom) / 2 - n);
3212
3212
  }
3213
3213
  let n = window.innerHeight / 2;
3214
3214
  return Math.abs((t.top + t.bottom) / 2 - n);
3215
3215
  }
3216
- function se(e) {
3217
- let t = zr(E.value);
3218
- return !e || !t ? !1 : zr("currentSrc" in e && e.currentSrc || e.getAttribute("src")) === t;
3216
+ function ce(e) {
3217
+ let t = Br(A.value);
3218
+ return !e || !t ? !1 : Br("currentSrc" in e && e.currentSrc || e.getAttribute("src")) === t;
3219
3219
  }
3220
- function ce() {
3220
+ function Z() {
3221
3221
  r("open");
3222
3222
  }
3223
- function Z() {
3223
+ function le() {
3224
3224
  f.value = !0;
3225
3225
  }
3226
- function le(e) {
3226
+ function ue(e) {
3227
3227
  let t = e.relatedTarget;
3228
- v.value && t instanceof Node && v.value.contains(t) || (f.value = !1);
3228
+ y.value && t instanceof Node && y.value.contains(t) || (f.value = !1);
3229
3229
  }
3230
3230
  return (e, t) => (S(), s("div", {
3231
3231
  ref_key: "rootRef",
3232
- ref: v,
3232
+ ref: y,
3233
3233
  "data-testid": "vibe-list-card-inner",
3234
3234
  class: _(["group relative h-full w-full overflow-hidden border bg-[#0a0b0f] text-[#f7f1ea] transition-[border-color,transform] duration-300", n.active ? "border-white/28" : "border-white/12 hover:border-white/24"]),
3235
- onFocusin: Z,
3236
- onFocusout: le,
3235
+ onFocusin: le,
3236
+ onFocusout: ue,
3237
3237
  onPointerenter: t[0] ||= (e) => p.value = !0,
3238
3238
  onPointerleave: t[1] ||= (e) => p.value = !1
3239
3239
  }, [
@@ -3242,90 +3242,90 @@ var Zr = ["aria-label"], Qr = {
3242
3242
  "data-testid": "vibe-list-card-open",
3243
3243
  class: "absolute inset-0 z-[1] block h-full w-full cursor-pointer text-left focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-4 focus-visible:outline-[#f7f1ea]",
3244
3244
  "aria-label": n.item.title || `Open item ${n.index + 1}`,
3245
- onClick: ce
3246
- }, null, 8, Zr),
3247
- L.value ? (S(), s("div", Qr, [c("span", $r, [u(j(re), {
3245
+ onClick: Z
3246
+ }, null, 8, Qr),
3247
+ R.value ? (S(), s("div", $r, [c("span", ei, [u(j(re), {
3248
3248
  class: "h-5 w-5 animate-spin stroke-[1.9] text-[#f7f1ea]/78",
3249
3249
  "aria-hidden": "true"
3250
3250
  })])])) : o("", !0),
3251
- M.value && E.value && !P.value ? (S(), s("img", {
3251
+ N.value && A.value && !I.value ? (S(), s("img", {
3252
3252
  key: 1,
3253
3253
  ref_key: "imageRef",
3254
- ref: g,
3255
- src: E.value,
3254
+ ref: v,
3255
+ src: A.value,
3256
3256
  alt: l.value.label,
3257
3257
  draggable: "false",
3258
3258
  class: _(["block h-full w-full object-cover transition-opacity duration-300", m.value ? "pointer-events-none opacity-100" : "pointer-events-none opacity-0"]),
3259
- onLoad: H,
3260
- onError: U
3261
- }, null, 42, ei)) : N.value && E.value && !P.value ? (S(), s("video", {
3259
+ onLoad: te,
3260
+ onError: H
3261
+ }, null, 42, ti)) : P.value && A.value && !I.value ? (S(), s("video", {
3262
3262
  key: 2,
3263
3263
  ref_key: "videoRef",
3264
- ref: C,
3265
- src: E.value,
3264
+ ref: w,
3265
+ src: A.value,
3266
3266
  muted: "",
3267
3267
  loop: "",
3268
3268
  playsinline: "",
3269
3269
  preload: "metadata",
3270
3270
  class: _(["block h-full w-full object-cover transition-opacity duration-300", m.value ? "pointer-events-none opacity-100" : "pointer-events-none opacity-0"]),
3271
- onCanplay: W,
3272
- onError: U,
3273
- onLoadstart: G,
3274
- onPlaying: W,
3275
- onStalled: G,
3276
- onWaiting: G
3277
- }, null, 42, ti)) : P.value ? (S(), s("div", {
3271
+ onCanplay: U,
3272
+ onError: H,
3273
+ onLoadstart: W,
3274
+ onPlaying: U,
3275
+ onStalled: W,
3276
+ onWaiting: W
3277
+ }, null, 42, ni)) : I.value ? (S(), s("div", {
3278
3278
  key: 3,
3279
3279
  "data-testid": "vibe-list-card-error",
3280
- "data-kind": h.value,
3280
+ "data-kind": g.value,
3281
3281
  class: "relative z-[2] grid h-full w-full place-items-center bg-[radial-gradient(circle_at_center,rgba(239,68,68,0.12),transparent_65%),linear-gradient(180deg,rgba(255,255,255,0.04),rgba(255,255,255,0.02))]"
3282
- }, [c("div", ri, [
3282
+ }, [c("div", ii, [
3283
3283
  u(j(oe), {
3284
3284
  class: "h-6 w-6 stroke-[1.8] text-[#f7f1ea]/78",
3285
3285
  "aria-hidden": "true"
3286
3286
  }),
3287
- c("span", ii, k(j(Bt)(h.value)), 1),
3288
- I.value ? (S(), s("button", {
3287
+ c("span", ai, k(j(Vt)(g.value)), 1),
3288
+ L.value ? (S(), s("button", {
3289
3289
  key: 0,
3290
3290
  type: "button",
3291
3291
  class: "pointer-events-auto inline-flex items-center justify-center border border-white/14 bg-black/35 px-3 py-2 text-[0.62rem] font-bold uppercase tracking-[0.22em] text-[#f7f1ea]/82 backdrop-blur-[18px] transition hover:border-white/28 hover:bg-black/50",
3292
- onClick: z(te, ["stop"])
3292
+ onClick: z(ne, ["stop"])
3293
3293
  }, " Retry ")) : o("", !0)
3294
- ])], 8, ni)) : (S(), s("div", ai, [c("div", oi, [D(e.$slots, "item-icon", {
3294
+ ])], 8, ri)) : (S(), s("div", oi, [c("div", si, [D(e.$slots, "item-icon", {
3295
3295
  icon: j(St)(n.item.type),
3296
3296
  item: n.item
3297
3297
  }, () => [(S(), a(O(j(St)(n.item.type)), {
3298
3298
  class: "h-6 w-6 stroke-[1.8] text-[#f7f1ea]/78",
3299
3299
  "aria-hidden": "true"
3300
3300
  }))])])])),
3301
- c("div", si, [D(e.$slots, "grid-item-overlay", {
3301
+ c("div", ci, [D(e.$slots, "grid-item-overlay", {
3302
3302
  active: n.active,
3303
3303
  focused: f.value,
3304
3304
  hovered: p.value,
3305
3305
  index: n.index,
3306
3306
  item: n.item,
3307
- openFullscreen: ce
3307
+ openFullscreen: Z
3308
3308
  })])
3309
3309
  ], 34));
3310
3310
  }
3311
- }), li = { 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)]" }, ui = { class: "pointer-events-none absolute inset-x-0 top-0 z-[2] flex justify-end p-6" }, di = {
3311
+ }), ui = { 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)]" }, di = { class: "pointer-events-none absolute inset-x-0 top-0 z-[2] flex justify-end p-6" }, fi = {
3312
3312
  "data-testid": "vibe-pagination",
3313
3313
  class: "inline-flex shrink-0 items-center gap-2 whitespace-nowrap border border-white/14 bg-black/40 px-3 py-2 text-[0.63rem] font-bold uppercase tracking-[0.12em] text-[#f7f1ea]/72 backdrop-blur-[18px] min-[721px]:gap-3 min-[721px]:px-4 min-[721px]:py-3 min-[721px]:text-[0.74rem] min-[721px]:tracking-[0.2em]"
3314
- }, fi = { class: "whitespace-nowrap" }, pi = {
3314
+ }, pi = { class: "whitespace-nowrap" }, mi = {
3315
3315
  key: 0,
3316
3316
  class: "whitespace-nowrap border-l border-white/12 pl-2 text-[#f7f1ea]/56 min-[721px]:pl-3"
3317
- }, mi = [
3317
+ }, hi = [
3318
3318
  "data-active",
3319
3319
  "data-index",
3320
3320
  "data-item-id",
3321
3321
  "data-occurrence-key"
3322
- ], hi = ["data-item-id"], gi = {
3322
+ ], gi = ["data-item-id"], _i = {
3323
3323
  key: 0,
3324
3324
  class: "pointer-events-none absolute inset-y-0 right-0 z-[3] hidden w-8 min-[1024px]:block"
3325
- }, _i = {
3325
+ }, vi = {
3326
3326
  key: 1,
3327
3327
  class: "pointer-events-none absolute inset-x-0 bottom-0 z-[2] px-5 pb-5 sm:px-6"
3328
- }, vi = { class: "mx-auto flex w-full max-w-[1600px] justify-center" }, yi = /* @__PURE__ */ d({
3328
+ }, yi = { class: "mx-auto flex w-full max-w-[1600px] justify-center" }, bi = /* @__PURE__ */ d({
3329
3329
  __name: "ListSurface",
3330
3330
  props: {
3331
3331
  active: {
@@ -3382,7 +3382,7 @@ var Zr = ["aria-label"], Qr = {
3382
3382
  },
3383
3383
  emits: ["open-fullscreen", "update:activeIndex"],
3384
3384
  setup(e, { emit: n }) {
3385
- let r = e, d = N(), f = n, p = Pr({
3385
+ let r = e, d = N(), f = n, p = Fr({
3386
3386
  active: A(r, "active"),
3387
3387
  allowExhaustedNextPageRefresh: A(r, "allowExhaustedNextPageRefresh"),
3388
3388
  items: A(r, "items"),
@@ -3398,11 +3398,11 @@ var Zr = ["aria-label"], Qr = {
3398
3398
  setActiveIndex(e) {
3399
3399
  f("update:activeIndex", e);
3400
3400
  }
3401
- }), m = i(() => jt({
3401
+ }), m = i(() => Mt({
3402
3402
  itemCount: r.items.length,
3403
3403
  loading: r.loading,
3404
3404
  phase: r.phase
3405
- })), g = i(() => Mt({
3405
+ })), g = i(() => Nt({
3406
3406
  errorMessage: r.errorMessage,
3407
3407
  hasItems: r.items.length > 0,
3408
3408
  hasNextPage: r.hasNextPage,
@@ -3415,15 +3415,15 @@ var Zr = ["aria-label"], Qr = {
3415
3415
  message: g.value.message,
3416
3416
  paginationDetail: r.paginationDetail,
3417
3417
  total: r.items.length
3418
- }), x = i(() => !b.value || !d["grid-status"] ? [] : d["grid-status"](b.value)), C = i(() => Et(x.value)), w = i(() => r.items.length + p.leavingItems.value.length), { emptyStateProps: T, showBadgeEmptyState: O, showCustomEmptyState: M, showInlineEmptyState: P } = kt({
3418
+ }), x = i(() => !b.value || !d["grid-status"] ? [] : d["grid-status"](b.value)), C = i(() => Dt(x.value)), w = i(() => r.items.length + p.leavingItems.value.length), { emptyStateProps: T, showBadgeEmptyState: O, showCustomEmptyState: M, showInlineEmptyState: P } = At({
3419
3419
  emptyStateMode: A(r, "emptyStateMode"),
3420
3420
  itemCount: w,
3421
3421
  loading: A(r, "loading"),
3422
3422
  renderSlot: d["empty-state"],
3423
3423
  surface: "grid"
3424
3424
  });
3425
- return (e, n) => (S(), s("div", li, [
3426
- c("div", ui, [c("span", di, [c("span", fi, k(j(p).paginationLabel.value), 1), r.paginationDetail ? (S(), s("span", pi, k(r.paginationDetail), 1)) : o("", !0)])]),
3425
+ return (e, n) => (S(), s("div", ui, [
3426
+ c("div", di, [c("span", fi, [c("span", pi, k(j(p).paginationLabel.value), 1), r.paginationDetail ? (S(), s("span", mi, k(r.paginationDetail), 1)) : o("", !0)])]),
3427
3427
  c("div", {
3428
3428
  ref: j(p).scrollViewportRef,
3429
3429
  "data-testid": "vibe-list-scroll",
@@ -3444,7 +3444,7 @@ var Zr = ["aria-label"], Qr = {
3444
3444
  "data-occurrence-key": j($)(t),
3445
3445
  class: "absolute will-change-transform",
3446
3446
  style: y(j(p).getCardStyle(n))
3447
- }, [u(ci, {
3447
+ }, [u(li, {
3448
3448
  active: n === j(p).resolvedActiveIndex.value,
3449
3449
  index: n,
3450
3450
  item: t,
@@ -3468,14 +3468,14 @@ var Zr = ["aria-label"], Qr = {
3468
3468
  "report-asset-load",
3469
3469
  "surface-active",
3470
3470
  "onOpen"
3471
- ])], 12, mi))), 128)),
3471
+ ])], 12, hi))), 128)),
3472
3472
  (S(!0), s(t, null, E(j(p).leavingItems.value, (t) => (S(), s("article", {
3473
3473
  key: `leaving-${j($)(t.item)}`,
3474
3474
  "data-testid": "vibe-list-card-leaving",
3475
3475
  "data-item-id": t.item.id,
3476
3476
  class: "pointer-events-none absolute z-[2] will-change-[opacity,transform]",
3477
3477
  style: y(j(p).getLeavingCardStyle(t.item))
3478
- }, [u(ci, {
3478
+ }, [u(li, {
3479
3479
  active: !1,
3480
3480
  index: -1,
3481
3481
  item: t.item,
@@ -3490,8 +3490,8 @@ var Zr = ["aria-label"], Qr = {
3490
3490
  "item",
3491
3491
  "report-asset-error",
3492
3492
  "report-asset-load"
3493
- ])], 12, hi))), 128)),
3494
- j(P) && j(T) ? (S(), a(ln, {
3493
+ ])], 12, gi))), 128)),
3494
+ j(P) && j(T) ? (S(), a(un, {
3495
3495
  key: 0,
3496
3496
  message: j(T).message,
3497
3497
  mode: j(T).mode,
@@ -3505,12 +3505,12 @@ var Zr = ["aria-label"], Qr = {
3505
3505
  "surface"
3506
3506
  ])) : o("", !0)
3507
3507
  ], 4)], 544),
3508
- j(p).showScrollbar.value ? (S(), s("div", gi, [n[2] ||= c("div", { class: "absolute bottom-6 right-3 top-6 w-px bg-white/8" }, null, -1), c("div", {
3508
+ j(p).showScrollbar.value ? (S(), s("div", _i, [n[2] ||= c("div", { class: "absolute bottom-6 right-3 top-6 w-px bg-white/8" }, null, -1), c("div", {
3509
3509
  "data-testid": "vibe-list-scrollbar-thumb",
3510
3510
  class: _(["absolute right-[0.625rem] w-1 bg-white/34 transition-[height,transform,background-color,opacity] duration-300 ease-out", r.loading ? "bg-white/52" : "bg-white/34"]),
3511
3511
  style: y(j(p).getScrollbarThumbStyle())
3512
3512
  }, null, 6)])) : o("", !0),
3513
- d["grid-footer"] ? (S(), s("div", _i, [c("div", vi, [D(e.$slots, "grid-footer")])])) : o("", !0),
3513
+ d["grid-footer"] ? (S(), s("div", vi, [c("div", yi, [D(e.$slots, "grid-footer")])])) : o("", !0),
3514
3514
  b.value ? (S(), s("div", {
3515
3515
  key: 2,
3516
3516
  class: _(["pointer-events-none absolute inset-x-0 bottom-0 z-[3] flex justify-center px-6", d["grid-footer"] ? "pb-24" : "pb-6"])
@@ -3519,7 +3519,7 @@ var Zr = ["aria-label"], Qr = {
3519
3519
  "data-testid": "vibe-grid-status-badge",
3520
3520
  class: _(["inline-flex items-center border border-white/14 bg-black/55 px-4 py-3 text-[0.7rem] font-bold uppercase tracking-[0.18em] text-[#f7f1ea]/72 backdrop-blur-[18px]", b.value.kind === "end" ? "border-amber-300/35 text-amber-200" : b.value.kind === "failed" ? "border-rose-400/45 text-rose-100" : ""])
3521
3521
  }, k(b.value.message), 3))], 2)) : o("", !0),
3522
- j(O) && j(T) ? (S(), a(ln, {
3522
+ j(O) && j(T) ? (S(), a(un, {
3523
3523
  key: 3,
3524
3524
  class: _(["z-[3]", d["grid-footer"] ? "pb-24" : "pb-6"]),
3525
3525
  message: j(T).message,
@@ -3536,13 +3536,13 @@ var Zr = ["aria-label"], Qr = {
3536
3536
  ])) : o("", !0)
3537
3537
  ]));
3538
3538
  }
3539
- }), bi = ["data-surface-mode"], xi = {
3539
+ }), xi = ["data-surface-mode"], Si = {
3540
3540
  key: 1,
3541
3541
  class: "absolute left-5 top-5 z-30 border border-amber-400/45 bg-black/35 px-4 py-2 text-xs font-medium uppercase tracking-[0.24em] text-amber-100 backdrop-blur"
3542
- }, Si = ["data-visible", "inert"], Ci = ["data-visible", "inert"], wi = {
3542
+ }, Ci = ["data-visible", "inert"], wi = ["data-visible", "inert"], Ti = {
3543
3543
  key: 3,
3544
3544
  class: "relative z-[1] grid h-full w-full content-center justify-items-center gap-6 px-[clamp(2rem,4vw,3rem)] py-[clamp(2rem,4vw,3rem)] text-center"
3545
- }, Ti = /* @__PURE__ */ d({
3545
+ }, Ei = /* @__PURE__ */ d({
3546
3546
  name: "VibeLayout",
3547
3547
  __name: "Layout",
3548
3548
  props: {
@@ -3597,7 +3597,7 @@ var Zr = ["aria-label"], Qr = {
3597
3597
  type: "button",
3598
3598
  class: "absolute left-5 top-5 z-30 inline-flex items-center border border-rose-400/55 bg-rose-500/18 px-4 py-2 text-xs font-medium uppercase tracking-[0.24em] text-white backdrop-blur transition hover:bg-rose-500/28",
3599
3599
  onClick: n[0] ||= (...e) => j(h).retryInitialLoad && j(h).retryInitialLoad(...e)
3600
- }, " Retry ")) : j(h).errorMessage.value && j(h).items.value.length > 0 ? (S(), s("div", xi, k(j(h).errorMessage.value), 1)) : o("", !0), j(h).isDesktop.value ? (S(), s(t, { key: 2 }, [u(r, {
3600
+ }, " Retry ")) : j(h).errorMessage.value && j(h).items.value.length > 0 ? (S(), s("div", Si, k(j(h).errorMessage.value), 1)) : o("", !0), j(h).isDesktop.value ? (S(), s(t, { key: 2 }, [u(r, {
3601
3601
  appear: "",
3602
3602
  "enter-active-class": "transition-[opacity,transform] duration-300 ease-out",
3603
3603
  "enter-from-class": "translate-y-3 opacity-0",
@@ -3611,7 +3611,7 @@ var Zr = ["aria-label"], Qr = {
3611
3611
  "data-visible": j(h).surfaceMode.value === "list" ? "true" : "false",
3612
3612
  inert: j(h).surfaceMode.value !== "list",
3613
3613
  class: "absolute inset-0 z-[2]"
3614
- }, [u(yi, {
3614
+ }, [u(bi, {
3615
3615
  active: j(h).surfaceMode.value === "list",
3616
3616
  "allow-exhausted-next-page-refresh": j(h).canRefreshExhaustedNextPage.value,
3617
3617
  items: j(h).items.value,
@@ -3679,7 +3679,7 @@ var Zr = ["aria-label"], Qr = {
3679
3679
  "show-status-badges",
3680
3680
  "onOpenFullscreen",
3681
3681
  "onUpdate:activeIndex"
3682
- ])], 8, Si), [[P, j(h).surfaceMode.value === "list"]])]),
3682
+ ])], 8, Ci), [[P, j(h).surfaceMode.value === "list"]])]),
3683
3683
  _: 3
3684
3684
  }), u(r, {
3685
3685
  appear: "",
@@ -3695,7 +3695,7 @@ var Zr = ["aria-label"], Qr = {
3695
3695
  "data-visible": j(h).surfaceMode.value === "fullscreen" ? "true" : "false",
3696
3696
  inert: j(h).surfaceMode.value !== "fullscreen",
3697
3697
  class: "absolute inset-0 z-[3]"
3698
- }, [u(Gn, {
3698
+ }, [u(Kn, {
3699
3699
  items: j(h).items.value,
3700
3700
  active: j(h).surfaceMode.value === "fullscreen",
3701
3701
  "active-index": j(h).activeIndex.value,
@@ -3764,12 +3764,12 @@ var Zr = ["aria-label"], Qr = {
3764
3764
  "show-back-to-list",
3765
3765
  "onBackToList",
3766
3766
  "onUpdate:activeIndex"
3767
- ])], 8, Ci), [[P, j(h).surfaceMode.value === "fullscreen"]])]),
3767
+ ])], 8, wi), [[P, j(h).surfaceMode.value === "fullscreen"]])]),
3768
3768
  _: 3
3769
- })], 64)) : j(h).items.value.length === 0 && j(h).loading.value ? (S(), s("div", wi, [u(j(re), {
3769
+ })], 64)) : j(h).items.value.length === 0 && j(h).loading.value ? (S(), s("div", Ti, [u(j(re), {
3770
3770
  class: "size-10 animate-spin text-[#f7f1ea]/82",
3771
3771
  "aria-hidden": "true"
3772
- }), n[1] ||= c("p", { class: "m-0 text-[0.9rem] font-semibold uppercase tracking-[0.22em] text-[#f7f1ea]/72" }, " Loading... ", -1)])) : (S(), a(Gn, {
3772
+ }), n[1] ||= c("p", { class: "m-0 text-[0.9rem] font-semibold uppercase tracking-[0.22em] text-[#f7f1ea]/72" }, " Loading... ", -1)])) : (S(), a(Kn, {
3773
3773
  key: 4,
3774
3774
  items: j(h).items.value,
3775
3775
  active: !0,
@@ -3837,10 +3837,10 @@ var Zr = ["aria-label"], Qr = {
3837
3837
  "show-status-badges",
3838
3838
  "onBackToList",
3839
3839
  "onUpdate:activeIndex"
3840
- ]))], 8, bi));
3840
+ ]))], 8, xi));
3841
3841
  }
3842
- }), Ei = { install(e) {
3843
- e.component("VibeLayout", Ti);
3842
+ }), Di = { install(e) {
3843
+ e.component("VibeLayout", Ei);
3844
3844
  } };
3845
3845
  //#endregion
3846
- export { Ti as VibeLayout, Ei as VibePlugin, Ei as default };
3846
+ export { Ei as VibeLayout, Di as VibePlugin, Di as default };