@car-cutter/react-webplayer 0.7.0 → 0.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,6 +1,6 @@
1
- import be, { createContext as ze, useContext as Ie, useRef as W, useState as F, useCallback as M, useEffect as Z, useMemo as te, Fragment as Pt } from "react";
2
- import { createRoot as Dt } from "react-dom/client";
3
- var et = { exports: {} }, fe = {};
1
+ import be, { createContext as Me, useContext as ze, useRef as Z, useState as $, useCallback as I, useEffect as O, useMemo as te, Fragment as Wt } from "react";
2
+ import { createRoot as Yt } from "react-dom/client";
3
+ var ct = { exports: {} }, ge = {};
4
4
  /**
5
5
  * @license React
6
6
  * react-jsx-runtime.production.min.js
@@ -10,31 +10,31 @@ var et = { exports: {} }, fe = {};
10
10
  * This source code is licensed under the MIT license found in the
11
11
  * LICENSE file in the root directory of this source tree.
12
12
  */
13
- var Ue;
14
- function Zt() {
15
- if (Ue) return fe;
16
- Ue = 1;
17
- var e = be, r = Symbol.for("react.element"), n = Symbol.for("react.fragment"), o = Object.prototype.hasOwnProperty, s = e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, p = { key: !0, ref: !0, __self: !0, __source: !0 };
18
- function d(a, l, w) {
19
- var m, c = {}, f = null, _ = null;
20
- w !== void 0 && (f = "" + w), l.key !== void 0 && (f = "" + l.key), l.ref !== void 0 && (_ = l.ref);
21
- for (m in l) o.call(l, m) && !p.hasOwnProperty(m) && (c[m] = l[m]);
22
- if (a && a.defaultProps) for (m in l = a.defaultProps, l) c[m] === void 0 && (c[m] = l[m]);
23
- return { $$typeof: r, type: a, key: f, ref: _, props: c, _owner: s.current };
13
+ var et;
14
+ function Xt() {
15
+ if (et) return ge;
16
+ et = 1;
17
+ var e = be, r = Symbol.for("react.element"), n = Symbol.for("react.fragment"), o = Object.prototype.hasOwnProperty, s = e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, u = { key: !0, ref: !0, __self: !0, __source: !0 };
18
+ function f(d, c, v) {
19
+ var l, m = {}, w = null, C = null;
20
+ v !== void 0 && (w = "" + v), c.key !== void 0 && (w = "" + c.key), c.ref !== void 0 && (C = c.ref);
21
+ for (l in c) o.call(c, l) && !u.hasOwnProperty(l) && (m[l] = c[l]);
22
+ if (d && d.defaultProps) for (l in c = d.defaultProps, c) m[l] === void 0 && (m[l] = c[l]);
23
+ return { $$typeof: r, type: d, key: w, ref: C, props: m, _owner: s.current };
24
24
  }
25
- return fe.Fragment = n, fe.jsx = d, fe.jsxs = d, fe;
25
+ return ge.Fragment = n, ge.jsx = f, ge.jsxs = f, ge;
26
26
  }
27
- et.exports = Zt();
28
- var tt = et.exports;
29
- const Ze = "cc-webplayer", Ae = "cc-webplayer-icon", rt = "composition-loading", nt = "composition-loaded", ot = "composition-load-error", st = "item-change", at = "extend-mode-on", it = "extend-mode-off", lt = "hotspots-on", ct = "hotspots-off", dt = "gallery-open", ut = "gallery-close", At = !1, Ft = !1, Wt = !1, $t = "quality", Yt = 1, Ut = !1, mt = "cc-webplayer:", Xt = !1;
30
- function yn(e, r) {
27
+ ct.exports = Xt();
28
+ var Ue = ct.exports;
29
+ const Ie = "cc-webplayer", We = "cc-webplayer-custom-media", Ye = "cc-webplayer-icon", dt = "composition-loading", ut = "composition-loaded", mt = "composition-load-error", pt = "item-change", ht = "extend-mode-on", ft = "extend-mode-off", gt = "hotspots-on", xt = "hotspots-off", wt = "gallery-open", vt = "gallery-close", Bt = !1, Gt = !1, Kt = !1, qt = "quality", Jt = 0, Qt = 1 / 0, er = 1, tr = !1, bt = "cc-webplayer:", rr = !1;
30
+ function Hn(e, r) {
31
31
  return `https://cdn.car-cutter.com/gallery/${e}/${r}/composition_v3.json`;
32
32
  }
33
- function Gt(e, r) {
33
+ function nr(e, r) {
34
34
  const n = e.split("/"), o = n.pop();
35
35
  return [n.join("/"), r, o].join("/");
36
36
  }
37
- var pt = { exports: {} }, xe = {};
37
+ var yt = { exports: {} }, xe = {};
38
38
  /**
39
39
  * @license React
40
40
  * react-jsx-runtime.production.min.js
@@ -44,35 +44,35 @@ var pt = { exports: {} }, xe = {};
44
44
  * This source code is licensed under the MIT license found in the
45
45
  * LICENSE file in the root directory of this source tree.
46
46
  */
47
- var Xe;
48
- function Bt() {
49
- if (Xe) return xe;
50
- Xe = 1;
51
- var e = be, r = Symbol.for("react.element"), n = Symbol.for("react.fragment"), o = Object.prototype.hasOwnProperty, s = e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, p = { key: !0, ref: !0, __self: !0, __source: !0 };
52
- function d(a, l, w) {
53
- var m, c = {}, f = null, _ = null;
54
- w !== void 0 && (f = "" + w), l.key !== void 0 && (f = "" + l.key), l.ref !== void 0 && (_ = l.ref);
55
- for (m in l) o.call(l, m) && !p.hasOwnProperty(m) && (c[m] = l[m]);
56
- if (a && a.defaultProps) for (m in l = a.defaultProps, l) c[m] === void 0 && (c[m] = l[m]);
57
- return { $$typeof: r, type: a, key: f, ref: _, props: c, _owner: s.current };
47
+ var tt;
48
+ function or() {
49
+ if (tt) return xe;
50
+ tt = 1;
51
+ var e = be, r = Symbol.for("react.element"), n = Symbol.for("react.fragment"), o = Object.prototype.hasOwnProperty, s = e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, u = { key: !0, ref: !0, __self: !0, __source: !0 };
52
+ function f(d, c, v) {
53
+ var l, m = {}, w = null, C = null;
54
+ v !== void 0 && (w = "" + v), c.key !== void 0 && (w = "" + c.key), c.ref !== void 0 && (C = c.ref);
55
+ for (l in c) o.call(c, l) && !u.hasOwnProperty(l) && (m[l] = c[l]);
56
+ if (d && d.defaultProps) for (l in c = d.defaultProps, c) m[l] === void 0 && (m[l] = c[l]);
57
+ return { $$typeof: r, type: d, key: w, ref: C, props: m, _owner: s.current };
58
58
  }
59
- return xe.Fragment = n, xe.jsx = d, xe.jsxs = d, xe;
59
+ return xe.Fragment = n, xe.jsx = f, xe.jsxs = f, xe;
60
60
  }
61
- pt.exports = Bt();
62
- var t = pt.exports;
63
- async function qt(e) {
61
+ yt.exports = or();
62
+ var t = yt.exports;
63
+ async function sr(e) {
64
64
  const r = await fetch(e);
65
65
  if (!r.ok)
66
66
  throw new Error(`Failed to fetch composition: ${r.statusText}`);
67
67
  return await r.json();
68
68
  }
69
- const Oe = /* @__PURE__ */ new Map(), Kt = (e) => {
70
- const [r, n] = F({
69
+ const De = /* @__PURE__ */ new Map(), ar = (e) => {
70
+ const [r, n] = $({
71
71
  status: "pending",
72
72
  isSuccess: !1
73
73
  });
74
- return Z(() => {
75
- const o = (p) => n({ status: "success", data: p, isSuccess: !0 }), s = Oe.get(e);
74
+ return O(() => {
75
+ const o = (u) => n({ status: "success", data: u, isSuccess: !0 }), s = De.get(e);
76
76
  if (s && !(s instanceof Promise)) {
77
77
  o(s);
78
78
  return;
@@ -82,67 +82,234 @@ const Oe = /* @__PURE__ */ new Map(), Kt = (e) => {
82
82
  isSuccess: !1
83
83
  }), async function() {
84
84
  try {
85
- let p;
85
+ let u;
86
86
  if (s)
87
- p = await s;
87
+ u = await s;
88
88
  else {
89
- const d = qt(e);
90
- Oe.set(e, d), p = await d, Oe.set(e, p);
89
+ const f = sr(e);
90
+ De.set(e, f), u = await f, De.set(e, u);
91
91
  }
92
- o(p);
93
- } catch (p) {
92
+ o(u);
93
+ } catch (u) {
94
94
  n({
95
95
  status: "error",
96
96
  isSuccess: !1,
97
- error: p
97
+ error: u
98
98
  });
99
99
  }
100
100
  }();
101
101
  }, [e]), r;
102
- }, ht = ze(null), re = () => {
103
- const e = Ie(ht);
102
+ }, jt = Me(null), re = () => {
103
+ const e = ze(jt);
104
+ if (!e)
105
+ throw new Error(
106
+ "useGlobalContext must be used within a GlobalContextProvider"
107
+ );
108
+ return e;
109
+ }, ir = ({ children: e, ...r }) => /* @__PURE__ */ t.jsx(jt.Provider, { value: r, children: e }), kt = Me(null), oe = () => {
110
+ const e = ze(kt);
104
111
  if (!e)
105
112
  throw new Error(
106
113
  "useCompositionContext must be used within a CompositionContextProvider"
107
114
  );
108
115
  return e;
109
- }, Jt = ({ composition: e, children: r }) => {
110
- const { aspectRatio: n, categories: o } = e, s = te(
111
- () => o.flatMap(({ items: d }) => d),
116
+ }, lr = ({ composition: e, children: r }) => {
117
+ const {
118
+ aspectRatio: n,
119
+ categories: o,
120
+ imageHdWidth: s,
121
+ imageSubWidths: u
122
+ } = e, { minMediaWidth: f, maxMediaWidth: d } = re(), c = te(
123
+ () => o.flatMap(({ items: m }) => m),
112
124
  [o]
113
- ), p = {
125
+ ), v = {
114
126
  aspectRatio: n.replace(":", " / ")
115
- };
127
+ }, l = te(() => {
128
+ const m = u.concat(s), w = m.sort((a, h) => a - h), C = w.filter(
129
+ (a) => a >= f && a <= d
130
+ );
131
+ if (C.length === 0) {
132
+ const a = (f + d) / 2, h = m.reduce(
133
+ (x, j) => Math.abs(j - a) < Math.abs(x - a) ? j : x,
134
+ s
135
+ );
136
+ return console.warn(
137
+ `None of available media widths (${w.join("|")}) match the given constraints (${f > 0 ? `${f} ≤ ` : ""}width${d < 1 / 0 ? ` ≤ ${d}` : ""}).`,
138
+ `Using the closest width instead (${h}).`
139
+ ), [h];
140
+ }
141
+ return C;
142
+ }, [u, s, f, d]);
116
143
  return /* @__PURE__ */ t.jsx(
117
- ht.Provider,
144
+ kt.Provider,
118
145
  {
119
146
  value: {
120
147
  ...e,
121
- items: s,
122
- aspectRatioStyle: p
148
+ items: c,
149
+ aspectRatioStyle: v,
150
+ usedMediaWidths: l
123
151
  },
124
152
  children: r
125
153
  }
126
154
  );
127
- }, gt = 500, De = 0.75, _e = 1 + De * 2;
128
- function ae(e, r, n) {
155
+ }, Et = 500, Ze = 0.75, _e = 1 + Ze * 2;
156
+ function le(e, r, n) {
129
157
  return Math.min(Math.max(e, r), n);
130
158
  }
131
- const Le = (e, r, n) => e + (r - e) * n, Ge = (e, r) => (e % r + r) % r, ft = ze(null), J = () => {
132
- const e = Ie(ft);
159
+ const Le = (e, r, n) => e + (r - e) * n, rt = (e, r) => (e % r + r) % r, Ct = Me(null), Xe = () => ze(Ct), ye = () => {
160
+ const e = Xe();
133
161
  if (!e)
134
162
  throw new Error(
135
- "useGlobalContext must be used within a GlobalContextProvider"
163
+ "useCustomizationContext must be used within a CustomizationContextProvider"
136
164
  );
137
165
  return e;
138
- }, Qt = ({ children: e, ...r }) => /* @__PURE__ */ t.jsx(ft.Provider, { value: r, children: e }), xt = ze(null), q = () => {
139
- const e = Ie(xt);
166
+ }, nt = "*:size-full", ot = "*:object-cover *:size-full", cr = ({ children: e }) => {
167
+ const { compositionUrl: r } = re(), n = I(
168
+ () => document.querySelector(
169
+ `${Ie}[composition-url="${r}"]`
170
+ ),
171
+ [r]
172
+ ), o = I((a) => {
173
+ const h = a.querySelectorAll(Ye), x = /* @__PURE__ */ new Map();
174
+ for (const j of h) {
175
+ const k = j.getAttribute("name");
176
+ if (!k) {
177
+ console.warn("Icon element is missing a name attribute");
178
+ continue;
179
+ }
180
+ const g = j.innerHTML, p = g ? /* @__PURE__ */ t.jsx(
181
+ "div",
182
+ {
183
+ className: nt,
184
+ dangerouslySetInnerHTML: { __html: g }
185
+ }
186
+ ) : void 0;
187
+ if (!p) {
188
+ console.warn(`Icon "${k}" customization is empty.`);
189
+ continue;
190
+ }
191
+ x.set(k, { Icon: p });
192
+ }
193
+ return x;
194
+ }, []), [s, u] = $(
195
+ () => {
196
+ const a = n();
197
+ return a ? o(a) : /* @__PURE__ */ new Map();
198
+ }
199
+ );
200
+ O(() => {
201
+ const a = n();
202
+ if (!a)
203
+ return;
204
+ const h = new MutationObserver(() => {
205
+ u(o(a));
206
+ });
207
+ return h.observe(a, {
208
+ childList: !0,
209
+ subtree: !0
210
+ }), () => h.disconnect();
211
+ }, [o, n]);
212
+ const f = I(
213
+ (a) => s.get(a),
214
+ [s]
215
+ ), d = I(
216
+ (a, h) => {
217
+ u((x) => {
218
+ const { Icon: j, ...k } = h;
219
+ return new Map(
220
+ x.set(a, {
221
+ ...k,
222
+ Icon: /* @__PURE__ */ t.jsx("div", { className: nt, children: j })
223
+ })
224
+ );
225
+ });
226
+ },
227
+ []
228
+ ), c = I((a) => {
229
+ u((h) => (h.delete(a), new Map(h)));
230
+ }, []), v = I((a) => {
231
+ const h = a.querySelectorAll(
232
+ We
233
+ ), x = new Array();
234
+ for (const j of h) {
235
+ const k = j.innerHTML;
236
+ if (!k) {
237
+ console.warn("Custom media element is empty");
238
+ continue;
239
+ }
240
+ const g = Number(j.getAttribute("index"));
241
+ if (Number.isNaN(g)) {
242
+ console.warn("Custom media element is missing the 'index' attribute");
243
+ continue;
244
+ }
245
+ const p = j.getAttribute("thumbnail-src") ?? void 0, b = JSON.stringify({ index: g, thumbnailSrc: p });
246
+ x.push({
247
+ id: b,
248
+ Media: /* @__PURE__ */ t.jsx(
249
+ "div",
250
+ {
251
+ className: ot,
252
+ dangerouslySetInnerHTML: { __html: k }
253
+ }
254
+ ),
255
+ index: g,
256
+ thumbnailSrc: p
257
+ });
258
+ }
259
+ return x;
260
+ }, []), [l, m] = $(() => {
261
+ const a = n();
262
+ return a ? v(a) : [];
263
+ });
264
+ O(() => {
265
+ const a = n();
266
+ if (!a)
267
+ return;
268
+ const h = new MutationObserver(() => {
269
+ m(v(a));
270
+ });
271
+ return h.observe(a, {
272
+ childList: !0,
273
+ subtree: !0
274
+ }), () => h.disconnect();
275
+ }, [v, n]);
276
+ const w = I((a) => {
277
+ const { Media: h, ...x } = a, j = /* @__PURE__ */ t.jsx("div", { className: ot, children: h }), k = JSON.stringify(x);
278
+ return m((g) => [
279
+ ...g,
280
+ {
281
+ id: k,
282
+ Media: j,
283
+ ...x
284
+ }
285
+ ]), k;
286
+ }, []), C = I((a) => {
287
+ m(
288
+ (h) => h.filter((x) => x.id !== a)
289
+ );
290
+ }, []);
291
+ return /* @__PURE__ */ t.jsx(
292
+ Ct.Provider,
293
+ {
294
+ value: {
295
+ getIconConfig: f,
296
+ registerIconConfig: d,
297
+ unregisterIconConfig: c,
298
+ customMediaList: l,
299
+ registerCustomMedia: w,
300
+ unregisterCustomMedia: C
301
+ },
302
+ children: e
303
+ }
304
+ );
305
+ }, Nt = Me(null), J = () => {
306
+ const e = ze(Nt);
140
307
  if (!e)
141
308
  throw new Error(
142
309
  "useControlsContext must be used within a ControlsContextProvider"
143
310
  );
144
311
  return e;
145
- }, er = ({
312
+ }, dr = ({
146
313
  children: e
147
314
  }) => {
148
315
  const {
@@ -150,196 +317,220 @@ const Le = (e, r, n) => e + (r - e) * n, Ge = (e, r) => (e % r + r) % r, ft = ze
150
317
  preventFullScreen: n,
151
318
  emitEvent: o,
152
319
  isFullScreen: s,
153
- requestFullscreen: p,
154
- exitFullscreen: d
155
- } = J(), { categories: a, items: l } = re(), [w, m] = F(l.map(() => null)), c = M(
156
- (D, Q) => {
157
- m(
158
- (ge) => ge.map((oe, Ot) => Ot === D ? Q : oe)
320
+ requestFullscreen: u,
321
+ exitFullscreen: f
322
+ } = re(), { customMediaList: d } = ye(), { categories: c, items: v } = oe(), l = te(() => {
323
+ const P = new Array(
324
+ ...v
325
+ ), K = d.slice().sort((X, B) => X.index < 0 && B.index < 0 ? B.index - X.index : X.index < 0 ? 1 : B.index < 0 ? -1 : X.index - B.index);
326
+ for (const X of K) {
327
+ let B = X.index;
328
+ B < 0 && (B = P.length + B + 1), P.splice(B, 0, {
329
+ type: "custom",
330
+ ...X
331
+ });
332
+ }
333
+ return P;
334
+ }, [v, d]), [m, w] = $(l.map(() => null));
335
+ O(() => {
336
+ w(l.map(() => null));
337
+ }, [l]);
338
+ const C = I(
339
+ (P, K) => {
340
+ w(
341
+ (X) => X.map((B, Ut) => Ut === P ? K : B)
159
342
  );
160
343
  },
161
344
  []
162
- ), [f, _] = F(0), [b, y] = F(null), L = b ?? f, x = l[L], T = w[L], [h, u] = F(
345
+ ), [a, h] = $(0), [x, j] = $(null), k = x ?? a, g = l[k], p = m[k], [b, E] = $(
163
346
  null
164
- ), g = !!h, v = M(() => u(null), []), z = M(() => {
165
- if (g || b !== null)
347
+ ), L = !!b, D = I(() => E(null), []), T = I(() => {
348
+ if (L || x !== null)
166
349
  return;
167
- const D = f - 1;
168
- D >= 0 ? y(D) : r && (u("first_to_last"), y(l.length - 1));
350
+ const P = a - 1;
351
+ P >= 0 ? j(P) : r && (E("first_to_last"), j(l.length - 1));
169
352
  }, [
170
- g,
171
- b,
172
- f,
353
+ L,
354
+ x,
355
+ a,
173
356
  r,
174
357
  l.length
175
- ]), H = M(() => {
176
- if (g || b !== null)
358
+ ]), N = I(() => {
359
+ if (L || x !== null)
177
360
  return;
178
- const D = f + 1;
179
- D < l.length ? y(D) : r && (u("last_to_first"), y(0));
361
+ const P = a + 1;
362
+ P < l.length ? j(P) : r && (E("last_to_first"), j(0));
180
363
  }, [
181
- g,
182
- b,
183
- f,
364
+ L,
365
+ x,
366
+ a,
184
367
  l.length,
185
368
  r
186
- ]), S = M(
187
- (D) => {
188
- const Q = Math.min(f, D), ge = Math.max(f, D);
189
- w.slice(Q, ge + 1).filter((oe) => oe === null).length > 2 && u("instant"), y(D);
369
+ ]), z = I(
370
+ (P) => {
371
+ const K = Math.min(a, P), X = Math.max(a, P);
372
+ m.slice(K, X + 1).filter((B) => B === null).length > 2 && E("instant"), j(P);
190
373
  },
191
- [f, w]
374
+ [a, m]
192
375
  );
193
- Z(() => {
194
- o(st, {
195
- index: L,
196
- item: x
376
+ O(() => {
377
+ o(pt, {
378
+ index: k,
379
+ item: g
197
380
  });
198
- }, [x, o, L]);
199
- const j = te(() => {
200
- for (const D of a)
201
- if (D.items.includes(x))
202
- return D.id;
381
+ }, [g, o, k]);
382
+ const S = te(() => {
383
+ let P;
384
+ if (g.type === "custom") {
385
+ const K = l.slice(0, k).reverse().find((X) => X.type !== "custom") ?? l.slice(k + 1).find((X) => X.type !== "custom");
386
+ if (!K)
387
+ throw new Error("No non-custom item found");
388
+ P = K;
389
+ } else
390
+ P = g;
391
+ for (const K of c)
392
+ if (K.items.includes(P))
393
+ return K.id;
203
394
  throw new Error("Current item not found in any category");
204
- }, [a, x]), E = M(
205
- (D) => {
206
- const Q = a.find(({ id: oe }) => oe === D)?.items[0];
207
- if (Q === void 0)
395
+ }, [c, g, l, k]), V = I(
396
+ (P) => {
397
+ const K = c.find(({ id: B }) => B === P)?.items[0];
398
+ if (K === void 0)
208
399
  throw new Error("Failed to find target category");
209
- const ge = l.findIndex((oe) => oe === Q);
210
- S(ge);
400
+ const X = l.findIndex((B) => B === K);
401
+ z(X);
211
402
  },
212
- [a, l, S]
213
- ), I = te(() => {
214
- switch (x.type) {
403
+ [c, l, z]
404
+ ), R = te(() => {
405
+ switch (g.type) {
215
406
  case "image":
216
- return !!x.hotspots?.length;
407
+ return !!g.hotspots?.length;
217
408
  case "360":
218
- return T === "running";
219
- case "video":
409
+ return p === "running";
410
+ default:
220
411
  return !1;
221
412
  }
222
- }, [x, T]), [V, P] = F(!0), C = M(() => {
223
- const D = !V;
224
- P(D), o(D ? lt : ct);
225
- }, [o, V]), i = te(() => {
226
- switch (x.type) {
227
- case "image":
228
- case "360":
229
- return !0;
413
+ }, [g, p]), [y, i] = $(!0), _ = I(() => {
414
+ const P = !y;
415
+ i(P), o(P ? gt : xt);
416
+ }, [o, y]), M = te(() => {
417
+ switch (g.type) {
230
418
  case "video":
231
- return T !== "running";
419
+ return p !== "running";
420
+ default:
421
+ return !0;
232
422
  }
233
- }, [x, T]), [k, N] = F(!1), O = M(() => {
234
- const D = !k;
235
- N(D), o(D ? dt : ut);
236
- }, [o, k]), [A, Y] = F(null), $ = M(() => Y(null), []), K = !!A, G = te(() => {
237
- switch (x.type) {
423
+ }, [g, p]), [A, F] = $(!1), U = I(() => {
424
+ const P = !A;
425
+ F(P), o(P ? wt : vt);
426
+ }, [o, A]), [W, Y] = $(null), q = I(() => Y(null), []), ee = !!W, fe = te(() => {
427
+ switch (g.type) {
238
428
  case "image":
239
429
  return !0;
240
430
  case "360":
241
- return T === "running";
242
- case "video":
431
+ return p === "running";
432
+ default:
243
433
  return !1;
244
434
  }
245
- }, [x.type, T]), [X, ne] = F(1), ye = X !== 1, pe = X < _e, je = X > 1, ie = M((D) => {
246
- ne((Q) => ae(Q + D, 1, _e));
247
- }, []), he = M(() => ne(1), []), Me = M(() => ie(De), [ie]), St = M(() => ie(-De), [ie]), Te = M(() => {
248
- he(), $();
249
- }, [he, $]), [le, Rt] = F(!1), [Ve, $e] = F(), [Se, Ye] = F(!1), ce = M(
250
- async (D) => {
251
- Te(), Rt(D), o(D ? at : it);
435
+ }, [g.type, p]), [se, ae] = $(1), je = se !== 1, Se = se < _e, Ve = se > 1, ce = I((P) => {
436
+ ae((K) => le(K + P, 1, _e));
437
+ }, []), Te = I(() => ae(1), []), Dt = I(() => ce(Ze), [ce]), Ft = I(() => ce(-Ze), [ce]), He = I(() => {
438
+ Te(), q();
439
+ }, [Te, q]), [de, $t] = $(!1), [Re, Je] = $(), [Ae, Qe] = $(!1), ue = I(
440
+ async (P) => {
441
+ He(), $t(P), o(P ? ht : ft);
252
442
  },
253
- [o, Te]
254
- ), de = M(() => {
255
- clearTimeout(Ve);
256
- const D = setTimeout(() => {
257
- $e(void 0);
258
- }, gt);
259
- $e(D);
260
- }, [Ve]), Re = M(async () => {
261
- if (de(), !n) {
262
- const D = await p();
263
- if (Ye(!D), D)
443
+ [o, He]
444
+ ), me = I(() => {
445
+ clearTimeout(Re);
446
+ const P = setTimeout(() => {
447
+ Je(void 0);
448
+ }, Et);
449
+ Je(P);
450
+ }, [Re]), Pe = I(async () => {
451
+ if (me(), !n) {
452
+ const P = await u();
453
+ if (Qe(!P), P)
264
454
  return;
265
455
  }
266
- ce(!0);
456
+ ue(!0);
267
457
  }, [
268
458
  n,
269
- ce,
270
- p,
271
- de
272
- ]), He = M(async () => {
273
- de(), !(!n && (Ye(!1), await d())) && ce(!1);
459
+ ue,
460
+ u,
461
+ me
462
+ ]), Oe = I(async () => {
463
+ me(), !(!n && (Qe(!1), await f())) && ue(!1);
274
464
  }, [
275
465
  n,
276
- ce,
277
- d,
278
- de
279
- ]), Ht = M(() => {
280
- le ? He() : Re();
281
- }, [He, Re, le]);
282
- return Z(() => {
283
- n || Se && le || s !== le && (de(), ce(s));
466
+ ue,
467
+ f,
468
+ me
469
+ ]), Zt = I(() => {
470
+ de ? Oe() : Pe();
471
+ }, [Oe, Pe, de]);
472
+ return O(() => {
473
+ n || Ae && de || s !== de && (me(), ue(s));
284
474
  }, [
285
475
  n,
286
- ce,
287
- le,
288
- Se,
476
+ ue,
477
+ de,
478
+ Ae,
289
479
  s,
290
- de
480
+ me
291
481
  ]), /* @__PURE__ */ t.jsx(
292
- xt.Provider,
482
+ Nt.Provider,
293
483
  {
294
484
  value: {
295
- setItemInteraction: c,
485
+ items: l,
486
+ setItemInteraction: C,
296
487
  slidable: l.length > 1,
297
- carrouselItemIndex: f,
298
- setCarrouselItemIndex: _,
299
- itemIndexCommand: b,
300
- setItemIndexCommand: y,
301
- masterItemIndex: L,
302
- specialCommand: h,
303
- isRunningSpecialCommand: g,
304
- finishSpecialCommand: v,
305
- prevItem: z,
306
- nextItem: H,
307
- scrollToItemIndex: S,
308
- displayedCategoryId: j,
309
- changeCategory: E,
310
- enableHotspotsControl: I,
311
- showHotspots: V,
312
- toggleHotspots: C,
313
- showGalleryControls: i,
314
- showGallery: k,
315
- toggleGallery: O,
316
- shownDetails: A,
317
- isShowingDetails: K,
488
+ carrouselItemIndex: a,
489
+ setCarrouselItemIndex: h,
490
+ itemIndexCommand: x,
491
+ setItemIndexCommand: j,
492
+ masterItemIndex: k,
493
+ specialCommand: b,
494
+ isRunningSpecialCommand: L,
495
+ finishSpecialCommand: D,
496
+ prevItem: T,
497
+ nextItem: N,
498
+ scrollToItemIndex: z,
499
+ displayedCategoryId: S,
500
+ changeCategory: V,
501
+ enableHotspotsControl: R,
502
+ showHotspots: y,
503
+ toggleHotspots: _,
504
+ showGalleryControls: M,
505
+ showGallery: A,
506
+ toggleGallery: U,
507
+ shownDetails: W,
508
+ isShowingDetails: ee,
318
509
  setShownDetails: Y,
319
- resetShownDetails: $,
320
- showZoomControls: G,
321
- zoom: X,
322
- isZooming: ye,
323
- setZoom: ne,
324
- resetZoom: he,
325
- canZoomIn: pe,
326
- zoomIn: Me,
327
- canZoomOut: je,
328
- zoomOut: St,
329
- resetView: Te,
330
- extendMode: le,
331
- enableExtendMode: Re,
332
- disableExtendMode: He,
333
- toggleExtendMode: Ht,
334
- extendTransition: !!Ve,
335
- fakeFullScreen: Se
510
+ resetShownDetails: q,
511
+ showZoomControls: fe,
512
+ zoom: se,
513
+ isZooming: je,
514
+ setZoom: ae,
515
+ resetZoom: Te,
516
+ canZoomIn: Se,
517
+ zoomIn: Dt,
518
+ canZoomOut: Ve,
519
+ zoomOut: Ft,
520
+ resetView: He,
521
+ extendMode: de,
522
+ enableExtendMode: Pe,
523
+ disableExtendMode: Oe,
524
+ toggleExtendMode: Zt,
525
+ extendTransition: !!Re,
526
+ fakeFullScreen: Ae
336
527
  },
337
528
  children: e
338
529
  }
339
530
  );
340
- }, wt = ["left", "center", "right", "fullW"], vt = ["top", "middle", "bottom", "fullH"], tr = [
341
- ...wt,
342
- ...vt,
531
+ }, Lt = ["left", "center", "right", "fullW"], _t = ["top", "middle", "bottom", "fullH"], ur = [
532
+ ...Lt,
533
+ ..._t,
343
534
  "top-left",
344
535
  "top-center",
345
536
  "top-right",
@@ -357,24 +548,24 @@ const Le = (e, r, n) => e + (r - e) * n, Ge = (e, r) => (e % r + r) % r, ft = ze
357
548
  "fullH-right",
358
549
  "fullW-fullW"
359
550
  ];
360
- function rr(e) {
361
- return wt.includes(e);
551
+ function mr(e) {
552
+ return Lt.includes(e);
362
553
  }
363
- function nr(e) {
364
- return vt.includes(e);
554
+ function pr(e) {
555
+ return _t.includes(e);
365
556
  }
366
- function or(e) {
367
- return tr.includes(e);
557
+ function hr(e) {
558
+ return ur.includes(e);
368
559
  }
369
- function sr(e) {
370
- if (!or(e))
560
+ function fr(e) {
561
+ if (!hr(e))
371
562
  throw new Error(`Invalid position: ${e}`);
372
- return nr(e) ? [e, void 0] : rr(e) ? [void 0, e] : e.split("-");
563
+ return pr(e) ? [e, void 0] : mr(e) ? [void 0, e] : e.split("-");
373
564
  }
374
- function R(...e) {
565
+ function H(...e) {
375
566
  return e.filter((r) => !!r).map((r) => r.trim()).join(" ");
376
567
  }
377
- function ar(e) {
568
+ function gr(e) {
378
569
  switch (e) {
379
570
  case "left":
380
571
  return "left-1 small:left-2";
@@ -386,7 +577,7 @@ function ar(e) {
386
577
  return "inset-x-1 small:inset-x-2";
387
578
  }
388
579
  }
389
- function bt(e) {
580
+ function Mt(e) {
390
581
  switch (e) {
391
582
  case "top":
392
583
  return "top-1 small:top-2";
@@ -398,82 +589,25 @@ function bt(e) {
398
589
  return "inset-y-1 small:inset-y-2";
399
590
  }
400
591
  }
401
- function ir({
592
+ function xr({
402
593
  positionX: e,
403
594
  positionY: r
404
595
  }) {
405
596
  const n = new Array();
406
- return e && n.push(ar(e)), r && n.push(bt(r)), n.join(" ");
597
+ return e && n.push(gr(e)), r && n.push(Mt(r)), n.join(" ");
407
598
  }
408
- function ue(e) {
409
- const [r, n] = sr(e);
410
- return ir({ positionX: n, positionY: r });
599
+ function pe(e) {
600
+ const [r, n] = fr(e);
601
+ return xr({ positionX: n, positionY: r });
411
602
  }
412
- const yt = ze(null), jt = () => Ie(yt), Fe = () => {
413
- const e = jt();
414
- if (!e)
415
- throw new Error(
416
- "useCustomizationContext must be used within a CustomizationContextProvider"
417
- );
418
- return e;
419
- }, lr = ({ children: e }) => {
420
- const [r, n] = F(
421
- /* @__PURE__ */ new Map()
422
- ), o = M(
423
- (d) => {
424
- const a = r.get(d);
425
- if (a)
426
- return a;
427
- const l = document.querySelector(
428
- `${Ae}[name="${d}"]`
429
- );
430
- if (!l)
431
- return;
432
- const w = l.getAttribute("color") ?? void 0, m = l.innerHTML, c = m ? /* @__PURE__ */ t.jsx(
433
- "div",
434
- {
435
- className: "size-full",
436
- dangerouslySetInnerHTML: { __html: m }
437
- }
438
- ) : void 0;
439
- if (!(!w && !c))
440
- return { Icon: c, color: w };
441
- },
442
- [r]
443
- ), s = M(
444
- (d, a) => {
445
- n((l) => new Map(l.set(d, a)));
446
- },
447
- []
448
- ), p = M((d) => {
449
- n((a) => (a.delete(d), new Map(a)));
450
- }, []);
451
- return /* @__PURE__ */ t.jsx(
452
- yt.Provider,
453
- {
454
- value: {
455
- getIconConfig: o,
456
- setIconConfig: s,
457
- resetIconConfig: p
458
- },
459
- children: e
460
- }
461
- );
462
- }, U = ({
603
+ const G = ({
463
604
  customizationKey: e,
464
- className: r = "",
605
+ className: r,
465
606
  children: n
466
607
  }) => {
467
- const { getIconConfig: o } = Fe(), s = o(e);
468
- return s ? /* @__PURE__ */ t.jsx(
469
- "div",
470
- {
471
- className: r,
472
- style: { color: s?.color },
473
- children: s?.Icon ?? n
474
- }
475
- ) : n;
476
- }, cr = ({ className: e }) => /* @__PURE__ */ t.jsx(U, { className: e, customizationKey: "UI_CLOSE", children: /* @__PURE__ */ t.jsx(
608
+ const { getIconConfig: o } = ye(), s = o(e)?.Icon;
609
+ return s ? r ? /* @__PURE__ */ t.jsx("div", { className: r, children: s }) : s : n;
610
+ }, wr = ({ className: e }) => /* @__PURE__ */ t.jsx(G, { className: e, customizationKey: "UI_CLOSE", children: /* @__PURE__ */ t.jsx(
477
611
  "svg",
478
612
  {
479
613
  className: e,
@@ -490,7 +624,7 @@ const yt = ze(null), jt = () => Ie(yt), Fe = () => {
490
624
  }
491
625
  )
492
626
  }
493
- ) }), dr = {
627
+ ) }), vr = {
494
628
  fill: {
495
629
  primary: "bg-primary text-primary-foreground hover:opacity-80",
496
630
  neutral: "bg-background text-neutral-foreground hover:opacity-80"
@@ -499,35 +633,35 @@ const yt = ze(null), jt = () => Ie(yt), Fe = () => {
499
633
  primary: "bg-transparent text-foreground hover:bg-primary/25",
500
634
  neutral: "bg-transparent text-background hover:bg-foreground/25"
501
635
  }
502
- }, ur = {
636
+ }, br = {
503
637
  button: "h-8 px-2",
504
638
  icon: "size-8 p-2"
505
- }, B = ({
639
+ }, Q = ({
506
640
  variant: e = "fill",
507
641
  shape: r = "button",
508
642
  color: n = "primary",
509
643
  className: o,
510
644
  children: s,
511
- ...p
645
+ ...u
512
646
  }) => {
513
- const d = dr[e][n], a = ur[r];
647
+ const f = vr[e][n], d = br[r];
514
648
  return /* @__PURE__ */ t.jsx(
515
649
  "button",
516
650
  {
517
- className: R(
651
+ className: H(
518
652
  "flex items-center justify-center rounded-ui text-sm transition-all disabled:opacity-60",
653
+ f,
519
654
  d,
520
- a,
521
655
  o
522
656
  ),
523
- ...p,
657
+ ...u,
524
658
  children: s
525
659
  }
526
660
  );
527
- }, Ct = (e) => /* @__PURE__ */ t.jsx(B, { color: "neutral", shape: "icon", ...e, children: /* @__PURE__ */ t.jsx(cr, { className: "size-full" }) }), kt = ({ text: e, className: r }) => /* @__PURE__ */ t.jsxs(
661
+ }, zt = (e) => /* @__PURE__ */ t.jsx(Q, { color: "neutral", shape: "icon", ...e, children: /* @__PURE__ */ t.jsx(wr, { className: "size-full" }) }), It = ({ text: e, className: r }) => /* @__PURE__ */ t.jsxs(
528
662
  "div",
529
663
  {
530
- className: R(
664
+ className: H(
531
665
  "flex size-full flex-col items-center justify-center gap-y-4",
532
666
  r
533
667
  ),
@@ -542,121 +676,117 @@ const yt = ze(null), jt = () => Ie(yt), Fe = () => {
542
676
  /* @__PURE__ */ t.jsx("div", { className: "text-2xl font-bold", children: e })
543
677
  ]
544
678
  }
545
- ), mr = {
679
+ ), yr = {
546
680
  primary: "border-primary",
547
681
  foreground: "border-foreground",
548
682
  background: "border-background"
549
- }, pr = {
683
+ }, jr = {
550
684
  sm: "size-4 border",
551
685
  md: "size-8 border-2",
552
686
  lg: "size-12 border-4"
553
- }, Et = ({
687
+ }, St = ({
554
688
  color: e = "foreground",
555
689
  size: r = "md"
556
690
  }) => {
557
- const n = mr[e], o = pr[r];
691
+ const n = yr[e], o = jr[r];
558
692
  return /* @__PURE__ */ t.jsx(
559
693
  "div",
560
694
  {
561
- className: R(
695
+ className: H(
562
696
  "inline-block animate-rotation rounded-full border-b-transparent",
563
697
  o,
564
698
  n
565
699
  )
566
700
  }
567
701
  );
568
- }, me = ({
702
+ }, he = ({
569
703
  src: e,
570
704
  className: r,
571
705
  onLoad: n,
572
706
  imgInPlayerWidthRatio: o = 1,
573
707
  onlyThumbnail: s,
574
- fadeIn: p,
575
- ...d
708
+ fadeIn: u,
709
+ ...f
576
710
  }) => {
577
- const {
578
- minMediaWidth: a,
579
- maxMediaWidth: l,
580
- mediaLoadStrategy: w,
581
- playerInViewportWidthRatio: m
582
- } = J(), { imageHdWidth: c, imageSubWidths: f } = re(), [_, b] = te(() => {
583
- const x = f.concat(c).sort((u, g) => u - g).filter((u) => !(a && u < a || l && u > l));
584
- if (x.length === 0)
585
- throw new Error("No image widths available for the given constraints");
586
- const T = x.map((u) => `${u !== c ? Gt(e, u) : e} ${u}w`);
587
- let h;
711
+ const { mediaLoadStrategy: d, playerInViewportWidthRatio: c } = re(), { imageHdWidth: v, usedMediaWidths: l } = oe(), [m, w] = te(() => {
712
+ const h = l.map((j) => `${j !== v ? nr(e, j) : e} ${j}w`);
713
+ let x;
588
714
  if (s)
589
- h = [`${x.shift()}px`];
715
+ x = [`${l[0]}px`];
590
716
  else {
591
- const u = 1 / (o * m);
592
- switch (w) {
717
+ const j = 1 / (o * c);
718
+ switch (d) {
593
719
  case "quality": {
594
- const g = x.pop();
595
- h = x.map(
596
- (v) => `(max-width: ${u * v}px) ${v}px`
597
- ), h.push(`${g}px`);
598
- break;
599
- }
600
- case "speed": {
601
- const g = x.shift();
602
- h = x.reverse().map(
603
- (v) => `(min-width: ${u * v}px) ${v}px`
604
- ), h.push(`${g}px`);
720
+ const k = [...l], g = k.pop();
721
+ x = k.map(
722
+ (p) => `(max-width: ${j * p}px) ${p}px`
723
+ ), x.push(`${g}px`);
605
724
  break;
606
725
  }
607
726
  case "balanced": {
608
- h = [];
609
- for (let g = 0; g < x.length - 1; g++) {
610
- const v = x[g], z = x[g + 1], H = (v + z) / 2;
611
- h.push(
612
- `(max-width: ${u * H}px) ${v}px`
727
+ x = [];
728
+ for (let k = 0; k < l.length - 1; k++) {
729
+ const g = l[k], p = l[k + 1], b = Math.round((g + p) / 2);
730
+ x.push(
731
+ `(max-width: ${j * b}px) ${g}px`
613
732
  );
614
733
  }
615
- h.push(`${x[x.length - 1]}px`);
734
+ x.push(`${l[l.length - 1]}px`);
735
+ break;
736
+ }
737
+ case "speed": {
738
+ const k = [...l], g = k.shift();
739
+ x = k.reverse().map(
740
+ (p) => `(min-width: ${j * p}px) ${p}px`
741
+ ), x.push(`${g}px`);
616
742
  break;
617
743
  }
618
744
  }
619
745
  }
620
- return [T.join(", "), h.join(", ")];
746
+ return [h.join(", "), x.join(", ")];
621
747
  }, [
622
- c,
623
- w,
624
- f,
748
+ v,
625
749
  o,
626
- l,
627
- a,
750
+ d,
628
751
  s,
629
- m,
630
- e
631
- ]), [y, L] = F();
632
- return Z(() => {
633
- if (y === !0)
752
+ c,
753
+ e,
754
+ l
755
+ ]), [C, a] = $();
756
+ return O(() => {
757
+ if (C === !0)
634
758
  return;
635
- const x = setTimeout(() => {
636
- L((T) => T ?? !1);
759
+ const h = setTimeout(() => {
760
+ a((x) => x ?? !1);
637
761
  }, 30);
638
- return () => clearTimeout(x);
639
- }, [y]), /* @__PURE__ */ t.jsx(
762
+ return () => clearTimeout(h);
763
+ }, [C]), /* @__PURE__ */ t.jsx(
640
764
  "img",
641
765
  {
642
766
  src: e,
643
- srcSet: _,
644
- sizes: b,
645
- className: R(
767
+ srcSet: m,
768
+ sizes: w,
769
+ className: H(
646
770
  r,
647
- p && R(
648
- y !== void 0 && "transition-opacity duration-200",
649
- y === !1 && "opacity-0",
650
- y === !0 && "opacity-100"
771
+ u && H(
772
+ C !== void 0 && "transition-opacity duration-200",
773
+ C === !1 && "opacity-0",
774
+ C === !0 && "opacity-100"
651
775
  )
652
776
  ),
653
- onLoad: (x) => {
654
- L(!0), n?.(x);
777
+ onLoad: (h) => {
778
+ a(!0), n?.(h);
655
779
  },
656
- ...d
780
+ ...f
657
781
  }
658
782
  );
659
- }, We = ({ className: e }) => /* @__PURE__ */ t.jsx(U, { className: e, customizationKey: "UI_PLAY", children: /* @__PURE__ */ t.jsx(
783
+ }, Vt = ({ className: e }) => /* @__PURE__ */ t.jsx(G, { className: e, customizationKey: "UI_IMAGE", children: /* @__PURE__ */ t.jsx("svg", { className: e, viewBox: "0 0 12 12", fill: "none", children: /* @__PURE__ */ t.jsx(
784
+ "path",
785
+ {
786
+ d: "M9.5 2.5V9.5H2.5V2.5H9.5ZM9.5 1.5H2.5C1.95 1.5 1.5 1.95 1.5 2.5V9.5C1.5 10.05 1.95 10.5 2.5 10.5H9.5C10.05 10.5 10.5 10.05 10.5 9.5V2.5C10.5 1.95 10.05 1.5 9.5 1.5ZM7.07 5.93L5.57 7.865L4.5 6.57L3 8.5H9L7.07 5.93Z",
787
+ fill: "currentColor"
788
+ }
789
+ ) }) }), Be = ({ className: e }) => /* @__PURE__ */ t.jsx(G, { className: e, customizationKey: "UI_PLAY", children: /* @__PURE__ */ t.jsx(
660
790
  "svg",
661
791
  {
662
792
  className: e,
@@ -668,7 +798,7 @@ const yt = ze(null), jt = () => Ie(yt), Fe = () => {
668
798
  strokeLinejoin: "round",
669
799
  children: /* @__PURE__ */ t.jsx("polygon", { points: "6 3 20 12 6 21 6 3" })
670
800
  }
671
- ) }), Nt = ({ className: e }) => /* @__PURE__ */ t.jsx(U, { className: e, customizationKey: "UI_360", children: /* @__PURE__ */ t.jsxs(
801
+ ) }), Tt = ({ className: e }) => /* @__PURE__ */ t.jsx(G, { className: e, customizationKey: "UI_360", children: /* @__PURE__ */ t.jsxs(
672
802
  "svg",
673
803
  {
674
804
  className: e,
@@ -723,427 +853,454 @@ const yt = ze(null), jt = () => Ie(yt), Fe = () => {
723
853
  /* @__PURE__ */ t.jsx("defs", { children: /* @__PURE__ */ t.jsx("clipPath", { id: "clip0_134_843", children: /* @__PURE__ */ t.jsx("rect", { width: "56", height: "56", fill: "white" }) }) })
724
854
  ]
725
855
  }
726
- ) }), Be = ({
856
+ ) }), kr = ({
857
+ src: e,
858
+ withCdn: r
859
+ }) => {
860
+ const { permanentGallery: n } = re();
861
+ if (!e)
862
+ return null;
863
+ const o = "size-full object-cover";
864
+ return r ? /* @__PURE__ */ t.jsx(
865
+ he,
866
+ {
867
+ className: o,
868
+ src: e,
869
+ onlyThumbnail: !0,
870
+ fadeIn: !n
871
+ }
872
+ ) : /* @__PURE__ */ t.jsx("img", { className: o, src: e });
873
+ }, Fe = ({
727
874
  children: e
728
875
  }) => {
729
- const { extendMode: r } = q();
876
+ const { extendMode: r } = J();
730
877
  return /* @__PURE__ */ t.jsx(
731
878
  "div",
732
879
  {
733
- className: R(
880
+ className: H(
734
881
  "flex aspect-square h-3/4 items-center justify-center rounded-full bg-foreground/50 p-1",
735
882
  r && "large:h-3/5 large:p-2"
736
883
  ),
737
884
  children: e
738
885
  }
739
886
  );
740
- }, hr = ({ item: e }) => {
741
- const { permanentGallery: r } = J(), { aspectRatioStyle: n } = re(), { type: o } = e;
742
- let s;
743
- switch (o) {
887
+ }, Er = ({ item: e }) => {
888
+ const { aspectRatioStyle: r } = oe(), { type: n } = e;
889
+ let o, s;
890
+ switch (n) {
744
891
  case "360":
745
- s = e.images[0].src;
892
+ o = e.images[0].src, s = !0;
746
893
  break;
747
894
  case "image":
748
- s = e.src;
895
+ o = e.src, s = !0;
749
896
  break;
750
897
  case "video":
751
- s = e.poster;
898
+ o = e.poster, s = !0;
899
+ break;
900
+ case "custom":
901
+ o = e.thumbnailSrc, s = !1;
752
902
  break;
753
903
  }
754
- const p = /* @__PURE__ */ t.jsx(
755
- me,
756
- {
757
- className: "size-full object-cover",
758
- src: s,
759
- onlyThumbnail: !0,
760
- fadeIn: !r
761
- }
762
- );
763
- let d;
764
- switch (o) {
904
+ const u = /* @__PURE__ */ t.jsx(kr, { src: o, withCdn: s });
905
+ let f;
906
+ switch (n) {
765
907
  case "360":
766
- d = /* @__PURE__ */ t.jsx(Be, { children: /* @__PURE__ */ t.jsx(Nt, { className: "size-full text-primary-light" }) });
908
+ f = /* @__PURE__ */ t.jsx(Fe, { children: /* @__PURE__ */ t.jsx(Tt, { className: "size-full text-primary-light" }) });
767
909
  break;
768
910
  case "video":
769
- d = /* @__PURE__ */ t.jsx(Be, { children: /* @__PURE__ */ t.jsx(We, { className: "size-full p-0.5 text-background" }) });
911
+ f = /* @__PURE__ */ t.jsx(Fe, { children: /* @__PURE__ */ t.jsx(Be, { className: "size-full p-0.5 text-background" }) });
912
+ break;
913
+ case "custom":
914
+ f = o ? null : /* @__PURE__ */ t.jsx(Fe, { children: /* @__PURE__ */ t.jsx(Vt, { className: "size-full p-0.5 text-background" }) });
770
915
  break;
771
916
  }
772
- return /* @__PURE__ */ t.jsxs("div", { className: "relative bg-foreground/30", style: n, children: [
773
- p,
774
- d && /* @__PURE__ */ t.jsx("div", { className: "absolute inset-0 flex items-center justify-center bg-foreground/25", children: d })
917
+ return /* @__PURE__ */ t.jsxs("div", { className: "relative bg-foreground/30", style: r, children: [
918
+ u,
919
+ f && /* @__PURE__ */ t.jsx("div", { className: "absolute inset-0 flex items-center justify-center bg-foreground/25", children: f })
775
920
  ] });
776
- }, gr = {
921
+ }, Cr = {
777
922
  primary: "bg-primary/50",
778
923
  neutral: "bg-neutral/50",
779
924
  background: "bg-background/50",
780
925
  foreground: "bg-foreground/50"
781
- }, Lt = ({
926
+ }, Ht = ({
782
927
  color: e = "neutral",
783
928
  orientation: r = "horizontal"
784
929
  }) => {
785
- const n = gr[e], o = r === "horizontal" ? "h-px w-full" : "w-px h-full";
786
- return /* @__PURE__ */ t.jsx("div", { className: R(n, o) });
787
- }, _t = ({
930
+ const n = Cr[e], o = r === "horizontal" ? "h-px w-full" : "w-px h-full";
931
+ return /* @__PURE__ */ t.jsx("div", { className: H(n, o) });
932
+ }, Rt = ({
788
933
  className: e = "",
789
934
  containerClassName: r = ""
790
935
  }) => {
791
- const { hideCategories: n, infiniteCarrousel: o, permanentGallery: s, isFullScreen: p } = J(), { categories: d, items: a, aspectRatioStyle: l } = re(), {
792
- extendMode: w,
793
- extendTransition: m,
794
- masterItemIndex: c,
795
- prevItem: f,
796
- nextItem: _,
797
- scrollToItemIndex: b,
798
- resetView: y
799
- } = q(), L = te(() => {
936
+ const { hideCategories: n, infiniteCarrousel: o, permanentGallery: s, isFullScreen: u } = re(), { categories: f, aspectRatioStyle: d } = oe(), {
937
+ items: c,
938
+ extendMode: v,
939
+ extendTransition: l,
940
+ masterItemIndex: m,
941
+ prevItem: w,
942
+ nextItem: C,
943
+ scrollToItemIndex: a,
944
+ resetView: h
945
+ } = J(), x = te(() => {
800
946
  if (n)
801
947
  return [];
802
- const j = new Array();
803
- let E = 0;
804
- for (let I = 0; I < d.length - 1; I++) {
805
- const V = d[I].items.length;
806
- j.push(E + V), E += V;
948
+ const N = new Array();
949
+ let z = f[0];
950
+ const S = (V) => f.find(
951
+ (R) => R.items.some((y) => y === V)
952
+ );
953
+ for (let V = 0; V < c.length; V++) {
954
+ const R = c[V], y = S(R);
955
+ y && y !== z && (N.push(V), z = y);
807
956
  }
808
- return j;
809
- }, [d, n]), x = W(null), T = M(() => {
810
- if (!x.current)
957
+ return N;
958
+ }, [f, n, c]), j = Z(null), k = I(() => {
959
+ if (!j.current)
811
960
  throw new Error("slider.current is null");
812
- return x.current;
813
- }, []), h = W(!1), u = W(
961
+ return j.current;
962
+ }, []), g = Z(!1), p = Z(
814
963
  null
815
- ), [g, v] = F(!1), z = M(
816
- (j, E) => {
817
- const I = T(), V = I.clientWidth, P = I.scrollWidth / a.length, C = (j + 1 / 2) * P - V / 2, i = I.scrollWidth - I.clientWidth;
818
- I.scrollTo({
819
- left: ae(C, 0, i),
820
- behavior: E
964
+ ), [b, E] = $(!1), L = I(
965
+ (N, z) => {
966
+ const S = k(), V = S.clientWidth, R = S.scrollWidth / c.length, y = (N + 1 / 2) * R - V / 2, i = S.scrollWidth - S.clientWidth;
967
+ S.scrollTo({
968
+ left: le(y, 0, i),
969
+ behavior: z
821
970
  });
822
971
  },
823
- [a.length, T]
972
+ [c.length, k]
824
973
  );
825
- Z(() => {
826
- const j = x.current;
827
- if (!j)
974
+ O(() => {
975
+ const N = j.current;
976
+ if (!N)
828
977
  return;
829
- const E = (P) => {
830
- P.preventDefault(), h.current = !0, u.current = {
831
- x: P.pageX - j.offsetLeft,
832
- scrollLeft: j.scrollLeft
978
+ const z = (R) => {
979
+ R.preventDefault(), g.current = !0, p.current = {
980
+ x: R.pageX - N.offsetLeft,
981
+ scrollLeft: N.scrollLeft
833
982
  };
834
- }, I = (P) => {
835
- if (!h.current)
983
+ }, S = (R) => {
984
+ if (!g.current)
836
985
  return;
837
- if (u.current === null)
986
+ if (p.current === null)
838
987
  throw new Error("[onMouseMove] scrollStart is null");
839
- const C = P.pageX - j.offsetLeft - u.current.x;
840
- if (!g && Math.abs(C) < 5)
988
+ const y = R.pageX - N.offsetLeft - p.current.x;
989
+ if (!b && Math.abs(y) < 5)
841
990
  return;
842
- const i = u.current.scrollLeft - C;
843
- v(!0), requestAnimationFrame(() => {
844
- j.scrollLeft = i;
991
+ const i = p.current.scrollLeft - y;
992
+ E(!0), requestAnimationFrame(() => {
993
+ N.scrollLeft = i;
845
994
  });
846
995
  }, V = () => {
847
- h.current && (h.current = !1, requestAnimationFrame(() => {
848
- v(!1);
996
+ g.current && (g.current = !1, requestAnimationFrame(() => {
997
+ E(!1);
849
998
  }));
850
999
  };
851
- return j.addEventListener("mousedown", E), document.addEventListener("mousemove", I), document.addEventListener("mouseleave", V), document.addEventListener("mouseup", V), document.addEventListener("contextmenu", V), () => {
852
- j.removeEventListener("mousedown", E), document.removeEventListener("mousemove", I), document.removeEventListener("mouseleave", V), document.removeEventListener("mouseup", V), document.removeEventListener("contextmenu", V);
1000
+ return N.addEventListener("mousedown", z), document.addEventListener("mousemove", S), document.addEventListener("mouseleave", V), document.addEventListener("mouseup", V), document.addEventListener("contextmenu", V), () => {
1001
+ N.removeEventListener("mousedown", z), document.removeEventListener("mousemove", S), document.removeEventListener("mouseleave", V), document.removeEventListener("mouseup", V), document.removeEventListener("contextmenu", V);
853
1002
  };
854
- }, [g]);
855
- const H = W(c);
856
- Z(() => {
857
- x.current && (z(c, "smooth"), H.current = c);
858
- }, [c, z]), Z(() => {
859
- x.current && z(H.current, "instant");
1003
+ }, [b]);
1004
+ const D = Z(m);
1005
+ O(() => {
1006
+ j.current && (L(m, "smooth"), D.current = m);
1007
+ }, [m, L]), O(() => {
1008
+ j.current && L(D.current, "instant");
860
1009
  }, [
861
- z,
1010
+ L,
862
1011
  // - Run the effect when those values change
863
- p,
864
- w,
865
- m
1012
+ u,
1013
+ v,
1014
+ l
866
1015
  ]);
867
- const S = (j, E) => {
868
- g || (o && E === a.length - 1 && c === 0 ? f() : o && E === 0 && c === a.length - 1 ? _() : b(E), y());
1016
+ const T = (N) => {
1017
+ b || (o && N === c.length - 1 && m === 0 ? w() : o && N === 0 && m === c.length - 1 ? C() : a(N), h());
869
1018
  };
870
1019
  return /* @__PURE__ */ t.jsx(
871
1020
  "div",
872
1021
  {
873
- ref: x,
874
- className: R(
1022
+ ref: j,
1023
+ className: H(
875
1024
  "relative w-full overflow-x-auto no-scrollbar",
876
- g ? "cursor-grab" : "cursor-grabbing",
1025
+ b ? "cursor-grab" : "cursor-grabbing",
877
1026
  e
878
1027
  ),
879
1028
  children: /* @__PURE__ */ t.jsx(
880
1029
  "div",
881
1030
  {
882
- className: R(
1031
+ className: H(
883
1032
  "flex h-10 w-fit gap-1 small:h-12 small:gap-2",
884
- w && "large:h-20 large:gap-4",
1033
+ v && "large:h-20 large:gap-4",
885
1034
  r
886
1035
  ),
887
- children: a.map((j, E) => /* @__PURE__ */ t.jsxs(Pt, { children: [
888
- L.includes(E) && /* @__PURE__ */ t.jsx("div", { className: "my-2", children: /* @__PURE__ */ t.jsx(
889
- Lt,
1036
+ children: c.map((N, z) => /* @__PURE__ */ t.jsxs(Wt, { children: [
1037
+ x.includes(z) && /* @__PURE__ */ t.jsx("div", { className: "my-2", children: /* @__PURE__ */ t.jsx(
1038
+ Ht,
890
1039
  {
891
- color: s && !p ? "neutral" : "background",
1040
+ color: s && !u ? "neutral" : "background",
892
1041
  orientation: "vertical"
893
1042
  }
894
1043
  ) }),
895
1044
  /* @__PURE__ */ t.jsx(
896
1045
  "div",
897
1046
  {
898
- className: R(
1047
+ className: H(
899
1048
  "relative h-full overflow-hidden rounded-gallery transition-radius",
900
- !g && "cursor-pointer",
1049
+ !b && "cursor-pointer",
901
1050
  "after:absolute after:inset-0 after:rounded-gallery after:border-2 after:border-primary after:transition-all",
902
- E === c ? "after:opacity-100" : "after:opacity-0 hover:after:opacity-70"
1051
+ z === m ? "after:opacity-100" : "after:opacity-0 hover:after:opacity-70"
903
1052
  ),
904
- style: l,
905
- onClick: () => S(j, E),
906
- children: /* @__PURE__ */ t.jsx(hr, { item: j })
1053
+ style: d,
1054
+ onClick: () => T(z),
1055
+ children: /* @__PURE__ */ t.jsx(Er, { item: N })
907
1056
  }
908
1057
  )
909
- ] }, E))
1058
+ ] }, z))
910
1059
  }
911
1060
  )
912
1061
  }
913
1062
  );
914
- }, zt = (e) => 1 - Math.pow(1 - e, 2), qe = (e, r) => Math.sqrt(
1063
+ }, At = (e) => 1 - Math.pow(1 - e, 2), Nr = ({
1064
+ Media: e,
1065
+ itemIndex: r
1066
+ }) => {
1067
+ const { setItemInteraction: n } = J();
1068
+ return O(() => {
1069
+ n(r, "ready");
1070
+ }, [r, n]), e;
1071
+ }, st = (e, r) => Math.sqrt(
915
1072
  (e.clientX - r.clientX) ** 2 + (e.clientY - r.clientY) ** 2
916
- ), fr = ({
1073
+ ), Lr = ({
917
1074
  onlyPreload: e,
918
1075
  ...r
919
1076
  }) => {
920
- const { zoom: n, isZooming: o, setZoom: s } = q(), p = W(null), d = W(null), a = M((h) => {
921
- if (!d.current)
1077
+ const { zoom: n, isZooming: o, setZoom: s } = J(), u = Z(null), f = Z(null), d = I((g) => {
1078
+ if (!f.current)
922
1079
  throw new Error(
923
- `[${h ?? "getTransformElementOrThrow"}] transformElementRef.current is null`
1080
+ `[${g ?? "getTransformElementOrThrow"}] transformElementRef.current is null`
924
1081
  );
925
- return d.current;
926
- }, []), l = W(!1), w = W(null), m = W(/* @__PURE__ */ new Map()), c = W({ x: 0, y: 0, scale: 1 }), f = W(null), _ = M(
927
- (h) => {
928
- const u = a("setTransformStyle"), {
929
- x: g,
930
- y: v,
931
- scale: z
1082
+ return f.current;
1083
+ }, []), c = Z(!1), v = Z(null), l = Z(/* @__PURE__ */ new Map()), m = Z({ x: 0, y: 0, scale: 1 }), w = Z(null), C = I(
1084
+ (g) => {
1085
+ const p = d("setTransformStyle"), {
1086
+ x: b,
1087
+ y: E,
1088
+ scale: L
932
1089
  } = {
933
- ...c.current,
934
- ...h
935
- }, H = ae(z, 1, _e), S = u.clientWidth, j = u.clientHeight, E = S * H, I = j * H, V = ae(g, -(E - S), 0), P = ae(v, -(I - j), 0);
936
- c.current = { x: V, y: P, scale: H }, u.style.transform = `translate(${V}px, ${P}px) scale(${H})`;
1090
+ ...m.current,
1091
+ ...g
1092
+ }, D = le(L, 1, _e), T = p.clientWidth, N = p.clientHeight, z = T * D, S = N * D, V = le(b, -(z - T), 0), R = le(E, -(S - N), 0);
1093
+ m.current = { x: V, y: R, scale: D }, p.style.transform = `translate(${V}px, ${R}px) scale(${D})`;
937
1094
  },
938
- [a]
939
- ), b = M(
940
- (h, u) => {
1095
+ [d]
1096
+ ), a = I(
1097
+ (g, p) => {
941
1098
  const {
942
- x: g,
943
- y: v,
944
- scale: z
945
- } = c.current, {
946
- x: H,
947
- y: S,
948
- scale: j
1099
+ x: b,
1100
+ y: E,
1101
+ scale: L
1102
+ } = m.current, {
1103
+ x: D,
1104
+ y: T,
1105
+ scale: N
949
1106
  } = {
950
- ...c.current,
951
- ...h
1107
+ ...m.current,
1108
+ ...g
952
1109
  };
953
- f.current && (cancelAnimationFrame(f.current), f.current = null);
954
- const E = () => {
955
- _({ x: H, y: S, scale: j }), s(j);
956
- }, I = Math.abs(H - g) < 1 && Math.abs(S - v) < 1 && Math.abs(j - z) < 5e-3;
957
- if (!u || I) {
958
- E();
1110
+ w.current && (cancelAnimationFrame(w.current), w.current = null);
1111
+ const z = () => {
1112
+ C({ x: D, y: T, scale: N }), s(N);
1113
+ }, S = Math.abs(D - b) < 1 && Math.abs(T - E) < 1 && Math.abs(N - L) < 5e-3;
1114
+ if (!p || S) {
1115
+ z();
959
1116
  return;
960
1117
  }
961
- const V = (/* @__PURE__ */ new Date()).getTime(), P = () => {
962
- const C = () => {
1118
+ const V = (/* @__PURE__ */ new Date()).getTime(), R = () => {
1119
+ const y = () => {
963
1120
  const i = (/* @__PURE__ */ new Date()).getTime() - V;
964
- if (i >= u) {
965
- E(), f.current = null;
1121
+ if (i >= p) {
1122
+ z(), w.current = null;
966
1123
  return;
967
1124
  }
968
- const k = Math.min(i / u, 1), N = zt(k), O = Le(g, H, N), A = Le(v, S, N), Y = Le(z, j, N);
969
- _({ x: O, y: A, scale: Y }), P();
1125
+ const _ = Math.min(i / p, 1), M = At(_), A = Le(b, D, M), F = Le(E, T, M), U = Le(L, N, M);
1126
+ C({ x: A, y: F, scale: U }), R();
970
1127
  };
971
- f.current = requestAnimationFrame(C);
1128
+ w.current = requestAnimationFrame(y);
972
1129
  };
973
- P();
1130
+ R();
974
1131
  },
975
- [_, s]
976
- ), y = M(
977
- (h, u) => {
978
- let { x: g, y: v } = c.current;
979
- h.x && (g += h.x), h.y && (v += h.y), b(
1132
+ [C, s]
1133
+ ), h = I(
1134
+ (g, p) => {
1135
+ let { x: b, y: E } = m.current;
1136
+ g.x && (b += g.x), g.y && (E += g.y), a(
980
1137
  {
981
- x: g,
982
- y: v
1138
+ x: b,
1139
+ y: E
983
1140
  },
984
- u
1141
+ p
985
1142
  );
986
1143
  },
987
- [b]
988
- ), L = M(
989
- (h, u, g) => {
990
- const v = c.current.scale, z = ae(h, 1, _e), H = z / v, { x: S, y: j } = c.current, { x: E, y: I } = u, V = -S + E, P = -j + I, C = V * H, i = P * H, k = C - E, N = i - I, O = -k, A = -N;
991
- b(
1144
+ [a]
1145
+ ), x = I(
1146
+ (g, p, b) => {
1147
+ const E = m.current.scale, L = le(g, 1, _e), D = L / E, { x: T, y: N } = m.current, { x: z, y: S } = p, V = -T + z, R = -N + S, y = V * D, i = R * D, _ = y - z, M = i - S, A = -_, F = -M;
1148
+ a(
992
1149
  {
993
- x: O,
994
- y: A,
995
- scale: z
1150
+ x: A,
1151
+ y: F,
1152
+ scale: L
996
1153
  },
997
- g
1154
+ b
998
1155
  );
999
1156
  },
1000
- [b]
1001
- ), x = M(
1002
- (h) => {
1003
- const u = a(
1157
+ [a]
1158
+ ), j = I(
1159
+ (g) => {
1160
+ const p = d(
1004
1161
  "shiftZoomFromButton"
1005
- ), g = u.clientWidth, v = u.clientHeight;
1006
- L(
1007
- h,
1162
+ ), b = p.clientWidth, E = p.clientHeight;
1163
+ x(
1164
+ g,
1008
1165
  {
1009
- x: g / 2,
1010
- y: v / 2
1166
+ x: b / 2,
1167
+ y: E / 2
1011
1168
  },
1012
1169
  200
1013
1170
  );
1014
1171
  },
1015
- [a, L]
1016
- ), T = M(
1017
- (h, u, g) => {
1018
- const { scale: v } = c.current;
1019
- L(
1020
- v + h,
1021
- u,
1022
- g
1172
+ [d, x]
1173
+ ), k = I(
1174
+ (g, p, b) => {
1175
+ const { scale: E } = m.current;
1176
+ x(
1177
+ E + g,
1178
+ p,
1179
+ b
1023
1180
  );
1024
1181
  },
1025
- [L]
1182
+ [x]
1026
1183
  );
1027
- return Z(() => {
1028
- e || d.current && x(n);
1029
- }, [e, x, n]), Z(() => {
1184
+ return O(() => {
1185
+ e || f.current && j(n);
1186
+ }, [e, j, n]), O(() => {
1030
1187
  if (e || !o)
1031
1188
  return;
1032
- const h = d.current;
1033
- if (!h)
1189
+ const g = f.current;
1190
+ if (!g)
1034
1191
  return;
1035
- const u = (z) => {
1036
- z.preventDefault(), z.stopPropagation(), l.current = !0, w.current = {
1037
- x: z.clientX,
1038
- y: z.clientY
1192
+ const p = (L) => {
1193
+ L.preventDefault(), L.stopPropagation(), c.current = !0, v.current = {
1194
+ x: L.clientX,
1195
+ y: L.clientY
1039
1196
  };
1040
- }, g = (z) => {
1041
- if (!l.current)
1197
+ }, b = (L) => {
1198
+ if (!c.current)
1042
1199
  return;
1043
- if (!w.current)
1200
+ if (!v.current)
1044
1201
  throw new Error("mouseStartXY.current is null");
1045
- z.stopPropagation();
1046
- const H = z.clientX - w.current.x, S = z.clientY - w.current.y;
1047
- y({
1048
- x: H,
1049
- y: S
1050
- }), w.current = {
1051
- x: z.clientX,
1052
- y: z.clientY
1202
+ L.stopPropagation();
1203
+ const D = L.clientX - v.current.x, T = L.clientY - v.current.y;
1204
+ h({
1205
+ x: D,
1206
+ y: T
1207
+ }), v.current = {
1208
+ x: L.clientX,
1209
+ y: L.clientY
1053
1210
  };
1054
- }, v = () => {
1055
- l.current = !1;
1211
+ }, E = () => {
1212
+ c.current = !1;
1056
1213
  };
1057
- return h.addEventListener("mousedown", u), document.addEventListener("mousemove", g), document.addEventListener("mouseleave", v), document.addEventListener("mouseup", v), document.addEventListener("contextmenu", v), () => {
1058
- h.removeEventListener("mousedown", u), document.removeEventListener("mousemove", g), document.removeEventListener("mouseleave", v), document.removeEventListener("mouseup", v), document.removeEventListener("contextmenu", v);
1214
+ return g.addEventListener("mousedown", p), document.addEventListener("mousemove", b), document.addEventListener("mouseleave", E), document.addEventListener("mouseup", E), document.addEventListener("contextmenu", E), () => {
1215
+ g.removeEventListener("mousedown", p), document.removeEventListener("mousemove", b), document.removeEventListener("mouseleave", E), document.removeEventListener("mouseup", E), document.removeEventListener("contextmenu", E);
1059
1216
  };
1060
- }, [o, y, e]), Z(() => {
1217
+ }, [o, h, e]), O(() => {
1061
1218
  if (e)
1062
1219
  return;
1063
- const h = p.current;
1064
- if (!h)
1220
+ const g = u.current;
1221
+ if (!g)
1065
1222
  return;
1066
- const u = (g) => {
1067
- const { ctrlKey: v, clientX: z, clientY: H, deltaX: S, deltaY: j } = g;
1068
- if (v) {
1069
- if (!o && j >= 0)
1223
+ const p = (b) => {
1224
+ const { ctrlKey: E, clientX: L, clientY: D, deltaX: T, deltaY: N } = b;
1225
+ if (E) {
1226
+ if (!o && N >= 0)
1070
1227
  return;
1071
- const { left: E, top: I } = h.getBoundingClientRect(), V = z - E, P = H - I;
1072
- T(-0.01 * j, {
1228
+ const { left: z, top: S } = g.getBoundingClientRect(), V = L - z, R = D - S;
1229
+ k(-0.01 * N, {
1073
1230
  x: V,
1074
- y: P
1231
+ y: R
1075
1232
  });
1076
1233
  } else {
1077
1234
  if (!o)
1078
1235
  return;
1079
- y({
1080
- x: -2 * S,
1081
- y: -2 * j
1236
+ h({
1237
+ x: -2 * T,
1238
+ y: -2 * N
1082
1239
  });
1083
1240
  }
1084
- g.preventDefault();
1241
+ b.preventDefault();
1085
1242
  };
1086
- return h.addEventListener("wheel", u), () => {
1087
- h.removeEventListener("wheel", u);
1243
+ return g.addEventListener("wheel", p), () => {
1244
+ g.removeEventListener("wheel", p);
1088
1245
  };
1089
- }, [o, y, T, e]), Z(() => {
1090
- const h = p.current, u = d.current;
1091
- if (!h || !u)
1246
+ }, [o, h, k, e]), O(() => {
1247
+ const g = u.current, p = f.current;
1248
+ if (!g || !p)
1092
1249
  return;
1093
- const g = m.current, v = (S) => {
1094
- for (let j = 0; j < S.changedTouches.length; j++) {
1095
- const E = S.changedTouches[j];
1096
- g.set(E.identifier, E);
1250
+ const b = l.current, E = (T) => {
1251
+ for (let N = 0; N < T.changedTouches.length; N++) {
1252
+ const z = T.changedTouches[N];
1253
+ b.set(z.identifier, z);
1097
1254
  }
1098
- }, z = (S) => {
1099
- for (let j = 0; j < S.changedTouches.length; j++) {
1100
- const E = S.changedTouches[j];
1101
- g.delete(E.identifier);
1255
+ }, L = (T) => {
1256
+ for (let N = 0; N < T.changedTouches.length; N++) {
1257
+ const z = T.changedTouches[N];
1258
+ b.delete(z.identifier);
1102
1259
  }
1103
- }, H = (S) => {
1104
- const j = S.touches.length;
1105
- if (j === 1) {
1260
+ }, D = (T) => {
1261
+ const N = T.touches.length;
1262
+ if (N === 1) {
1106
1263
  if (!o)
1107
1264
  return;
1108
- S.preventDefault();
1109
- const E = S.touches[0], I = g.get(E.identifier);
1110
- if (!I)
1265
+ T.preventDefault();
1266
+ const z = T.touches[0], S = b.get(z.identifier);
1267
+ if (!S)
1111
1268
  throw new Error("touchStart is null");
1112
- const V = E.clientX - I.clientX, P = E.clientY - I.clientY;
1113
- y({
1269
+ const V = z.clientX - S.clientX, R = z.clientY - S.clientY;
1270
+ h({
1114
1271
  x: V,
1115
- y: P
1116
- }), g.set(E.identifier, E);
1117
- } else if (j === 2) {
1118
- S.preventDefault();
1119
- const [E, I] = S.touches, V = g.get(E.identifier), P = g.get(I.identifier);
1120
- if (!V || !P)
1272
+ y: R
1273
+ }), b.set(z.identifier, z);
1274
+ } else if (N === 2) {
1275
+ T.preventDefault();
1276
+ const [z, S] = T.touches, V = b.get(z.identifier), R = b.get(S.identifier);
1277
+ if (!V || !R)
1121
1278
  throw new Error("intialTouch1 or intialTouch2 is null");
1122
- const C = qe(
1279
+ const y = st(
1123
1280
  V,
1124
- P
1125
- ), i = qe(E, I) / C, { left: k, top: N } = h.getBoundingClientRect();
1126
- T(i - 1, {
1127
- x: (E.clientX + I.clientX) / 2 - k,
1128
- y: (E.clientY + I.clientY) / 2 - N
1129
- }), g.set(E.identifier, E), g.set(I.identifier, I);
1281
+ R
1282
+ ), i = st(z, S) / y, { left: _, top: M } = g.getBoundingClientRect();
1283
+ k(i - 1, {
1284
+ x: (z.clientX + S.clientX) / 2 - _,
1285
+ y: (z.clientY + S.clientY) / 2 - M
1286
+ }), b.set(z.identifier, z), b.set(S.identifier, S);
1130
1287
  }
1131
1288
  };
1132
- return u.addEventListener("touchstart", v), u.addEventListener("touchmove", H), u.addEventListener("touchend", z), u.addEventListener("touchcancel", z), () => {
1133
- u.removeEventListener("touchstart", v), u.removeEventListener("touchmove", H), u.removeEventListener("touchend", z), u.removeEventListener("touchcancel", z);
1289
+ return p.addEventListener("touchstart", E), p.addEventListener("touchmove", D), p.addEventListener("touchend", L), p.addEventListener("touchcancel", L), () => {
1290
+ p.removeEventListener("touchstart", E), p.removeEventListener("touchmove", D), p.removeEventListener("touchend", L), p.removeEventListener("touchcancel", L);
1134
1291
  };
1135
- }, [o, y, T]), /* @__PURE__ */ t.jsx(
1292
+ }, [o, h, k]), /* @__PURE__ */ t.jsx(
1136
1293
  "div",
1137
1294
  {
1138
- ref: p,
1295
+ ref: u,
1139
1296
  className: `relative size-full overflow-hidden ${o ? "z-zoomed-image cursor-move" : ""}`,
1140
1297
  children: /* @__PURE__ */ t.jsx(
1141
1298
  "div",
1142
1299
  {
1143
- ref: d,
1300
+ ref: f,
1144
1301
  className: "origin-top-left",
1145
1302
  children: /* @__PURE__ */ t.jsx(
1146
- me,
1303
+ he,
1147
1304
  {
1148
1305
  ...r,
1149
1306
  imgInPlayerWidthRatio: e ? 1 : n
@@ -1153,16 +1310,10 @@ const yt = ze(null), jt = () => Ie(yt), Fe = () => {
1153
1310
  )
1154
1311
  }
1155
1312
  );
1156
- }, xr = ({ className: e }) => /* @__PURE__ */ t.jsx(U, { className: e, customizationKey: "UI_IMAGE", children: /* @__PURE__ */ t.jsx("svg", { className: e, viewBox: "0 0 12 12", fill: "none", children: /* @__PURE__ */ t.jsx(
1157
- "path",
1158
- {
1159
- d: "M9.5 2.5V9.5H2.5V2.5H9.5ZM9.5 1.5H2.5C1.95 1.5 1.5 1.95 1.5 2.5V9.5C1.5 10.05 1.95 10.5 2.5 10.5H9.5C10.05 10.5 10.5 10.05 10.5 9.5V2.5C10.5 1.95 10.05 1.5 9.5 1.5ZM7.07 5.93L5.57 7.865L4.5 6.57L3 8.5H9L7.07 5.93Z",
1160
- fill: "currentColor"
1161
- }
1162
- ) }) }), wr = ({ hotspot: e }) => {
1163
- const { title: r, icon: n, description: o, position: s, detail: p } = e, { getIconConfig: d } = Fe(), a = n ? d(n) : void 0, { extendMode: l, setShownDetails: w } = q(), m = !!p, c = p?.type === "image", f = !!r || !!o, _ = c ? /* @__PURE__ */ t.jsx(xr, { className: "size-4" }) : /* @__PURE__ */ t.jsx("div", { className: "size-1" }), b = () => {
1164
- c && w({
1165
- src: p.src,
1313
+ }, _r = ({ hotspot: e }) => {
1314
+ const { title: r, icon: n, description: o, position: s, detail: u } = e, { getIconConfig: f } = ye(), d = n ? f(n) : void 0, { extendMode: c, setShownDetails: v } = J(), l = !!u, m = u?.type === "image", w = !!r || !!o, C = m ? /* @__PURE__ */ t.jsx(Vt, { className: "size-4" }) : /* @__PURE__ */ t.jsx("div", { className: "size-1" }), a = () => {
1315
+ m && v({
1316
+ src: u.src,
1166
1317
  title: r,
1167
1318
  text: o
1168
1319
  });
@@ -1170,21 +1321,20 @@ const yt = ze(null), jt = () => Ie(yt), Fe = () => {
1170
1321
  return /* @__PURE__ */ t.jsxs(
1171
1322
  "div",
1172
1323
  {
1173
- className: R(
1324
+ className: H(
1174
1325
  "group absolute z-hotspot -translate-x-1/2 -translate-y-1/2 hover:z-hotspot-hover",
1175
- m ? "cursor-pointer" : "cursor-help"
1326
+ l ? "cursor-pointer" : "cursor-help"
1176
1327
  ),
1177
1328
  style: {
1178
1329
  top: `${100 * e.position.y}%`,
1179
1330
  left: `${100 * e.position.x}%`
1180
1331
  },
1181
- onClick: b,
1332
+ onClick: a,
1182
1333
  children: [
1183
1334
  /* @__PURE__ */ t.jsxs(
1184
1335
  "div",
1185
1336
  {
1186
1337
  className: "relative flex items-center justify-center rounded-full border-2 border-background bg-primary text-primary-foreground",
1187
- style: { backgroundColor: a?.color },
1188
1338
  children: [
1189
1339
  /* @__PURE__ */ t.jsx(
1190
1340
  "div",
@@ -1192,16 +1342,16 @@ const yt = ze(null), jt = () => Ie(yt), Fe = () => {
1192
1342
  className: "pointer-events-none absolute -z-20 size-8 animate-hotspot-ping rounded-full border-2 border-background"
1193
1343
  }
1194
1344
  ),
1195
- a?.Icon ? /* @__PURE__ */ t.jsx("div", { className: "size-5", children: a.Icon }) : /* @__PURE__ */ t.jsx("div", { className: "p-1", children: _ })
1345
+ /* @__PURE__ */ t.jsx("div", { className: "p-1", children: d?.Icon ? /* @__PURE__ */ t.jsx("div", { className: "size-4", children: d.Icon }) : C })
1196
1346
  ]
1197
1347
  }
1198
1348
  ),
1199
- !c && f && /* @__PURE__ */ t.jsx(
1349
+ !m && w && /* @__PURE__ */ t.jsx(
1200
1350
  "div",
1201
1351
  {
1202
- className: R(
1352
+ className: H(
1203
1353
  "absolute -z-10 w-max max-w-40 text-pretty rounded-ui bg-background p-2 small:max-w-48",
1204
- l && "large:max-w-56",
1354
+ c && "large:max-w-56",
1205
1355
  s.y < 0.55 ? "-top-1" : "-bottom-1",
1206
1356
  s.x < 0.55 ? "-left-1 pl-6 small:pl-8" : "-right-1 pr-4 small:pr-6",
1207
1357
  "pointer-events-none opacity-0 transition-opacity duration-200 group-hover:pointer-events-auto group-hover:opacity-100"
@@ -1215,207 +1365,181 @@ const yt = ze(null), jt = () => Ie(yt), Fe = () => {
1215
1365
  ]
1216
1366
  }
1217
1367
  );
1218
- }, vr = ({ hotspot: e }) => {
1219
- const { icon: r, detail: n } = e;
1220
- let o;
1221
- switch (r) {
1222
- case "WINDOW STICKER":
1223
- o = /* @__PURE__ */ t.jsx(
1224
- "img",
1225
- {
1226
- className: "h-10",
1227
- src: "https://cdn.car-cutter.com/libs/web-player/v2/assets/images/customers/autonation/window_sticker.png",
1228
- alt: "Window sticker"
1229
- }
1230
- );
1231
- break;
1232
- case "CARFAX":
1233
- o = /* @__PURE__ */ t.jsx(
1234
- "img",
1235
- {
1236
- className: "h-10",
1237
- src: "https://cdn.car-cutter.com/libs/web-player/v2/assets/images/customers/autonation/carfax.png",
1238
- alt: "Carfax"
1239
- }
1240
- );
1241
- break;
1242
- default:
1243
- o = /* @__PURE__ */ t.jsx(wr, { hotspot: e });
1244
- break;
1245
- }
1246
- switch (n?.type) {
1368
+ }, Mr = ({ hotspot: e }) => {
1369
+ const { detail: r } = e, n = /* @__PURE__ */ t.jsx(_r, { hotspot: e });
1370
+ switch (r?.type) {
1247
1371
  case "link":
1248
1372
  case "pdf":
1249
- return /* @__PURE__ */ t.jsx("a", { href: n.src, target: "_blank", rel: "noreferrer", children: o });
1373
+ return /* @__PURE__ */ t.jsx("a", { href: r.src, target: "_blank", rel: "noreferrer", children: n });
1250
1374
  default:
1251
- return o;
1375
+ return n;
1252
1376
  }
1253
- }, It = ({
1377
+ }, Pt = ({
1254
1378
  hotspots: e,
1255
1379
  itemIndex: r,
1256
1380
  className: n,
1257
1381
  onLoad: o,
1258
1382
  ...s
1259
1383
  }) => {
1260
- const { isShowingDetails: p, showHotspots: d, setItemInteraction: a } = q();
1261
- return /* @__PURE__ */ t.jsx("div", { className: R("relative size-full overflow-hidden", n), children: /* @__PURE__ */ t.jsxs(
1384
+ const { isShowingDetails: u, showHotspots: f, setItemInteraction: d } = J();
1385
+ return /* @__PURE__ */ t.jsx("div", { className: H("relative size-full overflow-hidden", n), children: /* @__PURE__ */ t.jsxs(
1262
1386
  "div",
1263
1387
  {
1264
- className: R(
1388
+ className: H(
1265
1389
  "size-full duration-details",
1266
- p ? "scale-105" : "scale-100"
1390
+ u ? "scale-105" : "scale-100"
1267
1391
  ),
1268
1392
  children: [
1269
1393
  /* @__PURE__ */ t.jsx(
1270
- fr,
1394
+ Lr,
1271
1395
  {
1272
1396
  className: "size-full object-cover",
1273
- onLoad: (l) => {
1274
- r !== void 0 && a(r, "ready"), o?.(l);
1397
+ onLoad: (c) => {
1398
+ r !== void 0 && d(r, "ready"), o?.(c);
1275
1399
  },
1276
1400
  ...s
1277
1401
  }
1278
1402
  ),
1279
- d && e?.map((l, w) => /* @__PURE__ */ t.jsx(vr, { hotspot: l }, w))
1403
+ f && e?.map((c, v) => /* @__PURE__ */ t.jsx(Mr, { hotspot: c }, v))
1280
1404
  ]
1281
1405
  }
1282
1406
  ) });
1283
- }, we = 10, br = 15, yr = ({
1407
+ }, we = 10, zr = 15, Ir = ({
1284
1408
  images: e,
1285
1409
  onlyPreload: r
1286
1410
  }) => {
1287
- const { reverse360: n } = J(), { isShowingDetails: o, isZooming: s } = q(), p = s || o, d = W(null), a = W(null), [l, w] = F(0), m = e.length, c = M(() => {
1288
- w((_) => (_ - 1 + m) % m);
1289
- }, [m]), f = M(() => {
1290
- w((_) => (_ + 1) % m);
1291
- }, [m]);
1292
- return Z(() => {
1293
- if (p)
1411
+ const { reverse360: n } = re(), { isShowingDetails: o, isZooming: s } = J(), u = s || o, f = Z(null), d = Z(null), [c, v] = $(0), l = e.length, m = I(() => {
1412
+ v((C) => (C - 1 + l) % l);
1413
+ }, [l]), w = I(() => {
1414
+ v((C) => (C + 1) % l);
1415
+ }, [l]);
1416
+ return O(() => {
1417
+ if (u)
1294
1418
  return;
1295
- const _ = d.current, b = a.current;
1296
- if (!_ || !b)
1419
+ const C = f.current, a = d.current;
1420
+ if (!C || !a)
1297
1421
  return;
1298
- let y = null, L = [], x = null;
1299
- const T = (i) => {
1300
- L.push(i), L.length > 20 && L.shift();
1301
- }, h = () => {
1302
- const i = Date.now(), k = (() => {
1303
- const Y = Date.now(), $ = L.filter(
1304
- (X) => Y - X.timestamp < 50
1422
+ let h = null, x = [], j = null;
1423
+ const k = (i) => {
1424
+ x.push(i), x.length > 20 && x.shift();
1425
+ }, g = () => {
1426
+ const i = Date.now(), _ = (() => {
1427
+ const U = Date.now(), W = x.filter(
1428
+ (ee) => U - ee.timestamp < 50
1305
1429
  );
1306
- if ($.length < 2)
1430
+ if (W.length < 2)
1307
1431
  return 0;
1308
- const K = $[0], G = $[$.length - 1];
1309
- return (G.value - K.value) / (1e-3 * Math.max(G.timestamp - K.timestamp, 1));
1432
+ const Y = W[0], q = W[W.length - 1];
1433
+ return (q.value - Y.value) / (1e-3 * Math.max(q.timestamp - Y.timestamp, 1));
1310
1434
  })();
1311
- let N = 0, O = i;
1312
- const A = () => {
1313
- x = requestAnimationFrame(() => {
1314
- const Y = Date.now(), $ = (Y - i) / 1e3, K = Math.pow(0.05, $), G = k * K, X = (Y - O) / 1e3;
1315
- if (N += G * X, Math.abs(G) < 5 * we && Math.abs(N) < we) {
1316
- x = null;
1435
+ let M = 0, A = i;
1436
+ const F = () => {
1437
+ j = requestAnimationFrame(() => {
1438
+ const U = Date.now(), W = (U - i) / 1e3, Y = Math.pow(0.05, W), q = _ * Y, ee = (U - A) / 1e3;
1439
+ if (M += q * ee, Math.abs(q) < 5 * we && Math.abs(M) < we) {
1440
+ j = null;
1317
1441
  return;
1318
1442
  }
1319
- Math.abs(N) >= we && (N > 0 !== n ? f() : c(), N = 0), O = Y, A();
1443
+ Math.abs(M) >= we && (M > 0 !== n ? w() : m(), M = 0), A = U, F();
1320
1444
  });
1321
1445
  };
1322
- A();
1323
- }, u = () => {
1324
- x && (cancelAnimationFrame(x), x = null);
1325
- }, g = (i) => {
1446
+ F();
1447
+ }, p = () => {
1448
+ j && (cancelAnimationFrame(j), j = null);
1449
+ }, b = (i) => {
1326
1450
  if (i.button !== 0)
1327
1451
  return;
1328
- i.preventDefault(), i.stopPropagation(), u();
1329
- const k = i.clientX;
1330
- y = k, L = [{ timestamp: Date.now(), value: k }];
1331
- }, v = (i) => {
1332
- if (y === null)
1452
+ i.preventDefault(), i.stopPropagation(), p();
1453
+ const _ = i.clientX;
1454
+ h = _, x = [{ timestamp: Date.now(), value: _ }];
1455
+ }, E = (i) => {
1456
+ if (h === null)
1333
1457
  return;
1334
1458
  i.stopPropagation();
1335
- const { clientX: k } = i;
1336
- T({ timestamp: Date.now(), value: k });
1337
- const N = k - y;
1338
- Math.abs(N) < we || (N > 0 !== n ? f() : c(), y = k);
1339
- }, z = () => {
1340
- y !== null && (y = null, h());
1459
+ const { clientX: _ } = i;
1460
+ k({ timestamp: Date.now(), value: _ });
1461
+ const M = _ - h;
1462
+ Math.abs(M) < we || (M > 0 !== n ? w() : m(), h = _);
1463
+ }, L = () => {
1464
+ h !== null && (h = null, g());
1341
1465
  };
1342
- _.addEventListener("mousedown", g), document.addEventListener("mousemove", v), document.addEventListener("mouseleave", z), document.addEventListener("mouseup", z), document.addEventListener("contextmenu", z);
1343
- const H = () => b.getBoundingClientRect().width, S = () => b.scrollWidth / 2 - H() / 2, j = () => {
1344
- const i = S();
1345
- b.scrollLeft = i;
1466
+ C.addEventListener("mousedown", b), document.addEventListener("mousemove", E), document.addEventListener("mouseleave", L), document.addEventListener("mouseup", L), document.addEventListener("contextmenu", L);
1467
+ const D = () => a.getBoundingClientRect().width, T = () => a.scrollWidth / 2 - D() / 2, N = () => {
1468
+ const i = T();
1469
+ a.scrollLeft = i;
1346
1470
  };
1347
- j();
1348
- const E = () => {
1349
- const i = b.scrollLeft - S();
1350
- Math.abs(i) < br || (i < 0 !== n ? f() : c(), j());
1471
+ N();
1472
+ const z = () => {
1473
+ const i = a.scrollLeft - T();
1474
+ Math.abs(i) < zr || (i < 0 !== n ? w() : m(), N());
1351
1475
  };
1352
- b.addEventListener("scroll", E);
1353
- let I = null;
1476
+ a.addEventListener("scroll", z);
1477
+ let S = null;
1354
1478
  const V = (i) => {
1355
- if (I !== null || i.changedTouches.length !== 1)
1479
+ if (S !== null || i.changedTouches.length !== 1)
1356
1480
  return;
1357
- u();
1358
- const { identifier: k, clientX: N } = i.changedTouches[0];
1359
- I = k, y = N, L = [{ timestamp: Date.now(), value: N }];
1360
- }, P = (i) => {
1361
- if (!y)
1481
+ p();
1482
+ const { identifier: _, clientX: M } = i.changedTouches[0];
1483
+ S = _, h = M, x = [{ timestamp: Date.now(), value: M }];
1484
+ }, R = (i) => {
1485
+ if (!h)
1362
1486
  return;
1363
- const k = Array.from(i.changedTouches).find(
1364
- ({ identifier: A }) => A === I
1487
+ const _ = Array.from(i.changedTouches).find(
1488
+ ({ identifier: F }) => F === S
1365
1489
  );
1366
- if (!k)
1490
+ if (!_)
1367
1491
  return;
1368
1492
  i.preventDefault();
1369
- const { clientX: N } = k;
1370
- T({ timestamp: Date.now(), value: N });
1371
- const O = N - y;
1372
- Math.abs(O) < we || (O > 0 !== n ? f() : c(), y = N);
1373
- }, C = (i) => {
1374
- !y || !Array.from(i.changedTouches).some(
1375
- ({ identifier: k }) => k === I
1376
- ) || (I = null, y = null, h());
1493
+ const { clientX: M } = _;
1494
+ k({ timestamp: Date.now(), value: M });
1495
+ const A = M - h;
1496
+ Math.abs(A) < we || (A > 0 !== n ? w() : m(), h = M);
1497
+ }, y = (i) => {
1498
+ !h || !Array.from(i.changedTouches).some(
1499
+ ({ identifier: _ }) => _ === S
1500
+ ) || (S = null, h = null, g());
1377
1501
  };
1378
- return b.addEventListener("touchstart", V), b.addEventListener("touchmove", P), b.addEventListener("touchend", C), b.addEventListener("touchcancel", C), () => {
1379
- _.removeEventListener("mousedown", g), document.removeEventListener("mousemove", v), document.removeEventListener("mouseleave", z), document.removeEventListener("mouseup", z), document.removeEventListener("contextmenu", z), b.removeEventListener("scroll", E), b.removeEventListener("touchstart", V), b.removeEventListener("touchmove", P), b.removeEventListener("touchend", C), b.removeEventListener("touchcancel", C);
1502
+ return a.addEventListener("touchstart", V), a.addEventListener("touchmove", R), a.addEventListener("touchend", y), a.addEventListener("touchcancel", y), () => {
1503
+ C.removeEventListener("mousedown", b), document.removeEventListener("mousemove", E), document.removeEventListener("mouseleave", L), document.removeEventListener("mouseup", L), document.removeEventListener("contextmenu", L), a.removeEventListener("scroll", z), a.removeEventListener("touchstart", V), a.removeEventListener("touchmove", R), a.removeEventListener("touchend", y), a.removeEventListener("touchcancel", y);
1380
1504
  };
1381
- }, [f, c, p, n]), /* @__PURE__ */ t.jsx("div", { ref: d, className: "cursor-ew-resize", children: /* @__PURE__ */ t.jsxs("div", { ref: a, className: "overflow-x-scroll no-scrollbar", children: [
1505
+ }, [w, m, u, n]), /* @__PURE__ */ t.jsx("div", { ref: f, className: "cursor-ew-resize", children: /* @__PURE__ */ t.jsxs("div", { ref: d, className: "overflow-x-scroll no-scrollbar", children: [
1382
1506
  /* @__PURE__ */ t.jsxs("div", { className: "sticky left-0 top-0", children: [
1383
- e.map((_) => /* @__PURE__ */ t.jsx(
1384
- me,
1507
+ e.map((C) => /* @__PURE__ */ t.jsx(
1508
+ he,
1385
1509
  {
1386
- src: _.src,
1510
+ src: C.src,
1387
1511
  className: "pointer-events-none !absolute left-0 top-0 -z-10"
1388
1512
  },
1389
- _.src
1513
+ C.src
1390
1514
  )),
1391
- /* @__PURE__ */ t.jsx(It, { ...e[l], onlyPreload: r })
1515
+ /* @__PURE__ */ t.jsx(Pt, { ...e[c], onlyPreload: r })
1392
1516
  ] }),
1393
1517
  /* @__PURE__ */ t.jsx("div", { className: "pointer-events-none -mt-px h-px w-[calc(100%+1024px)]" })
1394
1518
  ] }) });
1395
- }, jr = ({ images: e, onPlaceholderImageLoaded: r, onSpinImagesLoaded: n, onError: o }) => {
1396
- const s = te(() => e.map(({ src: m }) => m), [e]), [p, d] = F(null), a = p ? [...p.values()].filter((m) => m).length / e.length * 100 : null, l = M(() => {
1397
- a === null && d(new Map(s.map((m) => [m, !1])));
1398
- }, [s, a]), w = M((m) => {
1399
- d((c) => {
1400
- const f = new Map(c);
1401
- return f.set(m, !0), f;
1519
+ }, Sr = ({ images: e, onPlaceholderImageLoaded: r, onSpinImagesLoaded: n, onError: o }) => {
1520
+ const s = te(() => e.map(({ src: l }) => l), [e]), [u, f] = $(null), d = u ? [...u.values()].filter((l) => l).length / e.length * 100 : null, c = I(() => {
1521
+ d === null && f(new Map(s.map((l) => [l, !1])));
1522
+ }, [s, d]), v = I((l) => {
1523
+ f((m) => {
1524
+ const w = new Map(m);
1525
+ return w.set(l, !0), w;
1402
1526
  });
1403
1527
  }, []);
1404
- return Z(() => {
1405
- a === 100 && n();
1406
- }, [a, n]), /* @__PURE__ */ t.jsxs("div", { className: "relative size-full", children: [
1407
- a !== null && a !== 100 && // Add images to DOM to preload them
1408
- /* @__PURE__ */ t.jsx("div", { className: "hidden", children: s.map((m) => /* @__PURE__ */ t.jsx(
1409
- me,
1528
+ return O(() => {
1529
+ d === 100 && n();
1530
+ }, [d, n]), /* @__PURE__ */ t.jsxs("div", { className: "relative size-full", children: [
1531
+ d !== null && d !== 100 && // Add images to DOM to preload them
1532
+ /* @__PURE__ */ t.jsx("div", { className: "hidden", children: s.map((l) => /* @__PURE__ */ t.jsx(
1533
+ he,
1410
1534
  {
1411
- src: m,
1412
- onLoad: () => w(m),
1535
+ src: l,
1536
+ onLoad: () => v(l),
1413
1537
  onError: o
1414
1538
  },
1415
- m
1539
+ l
1416
1540
  )) }),
1417
1541
  /* @__PURE__ */ t.jsx(
1418
- me,
1542
+ he,
1419
1543
  {
1420
1544
  className: "size-full",
1421
1545
  src: s[0],
@@ -1423,46 +1547,46 @@ const yt = ze(null), jt = () => Ie(yt), Fe = () => {
1423
1547
  }
1424
1548
  ),
1425
1549
  /* @__PURE__ */ t.jsxs("div", { className: "absolute inset-0 flex flex-col items-center justify-center gap-y-4 bg-foreground/35", children: [
1426
- /* @__PURE__ */ t.jsx(Nt, { className: "size-20 text-primary-light" }),
1427
- /* @__PURE__ */ t.jsx(B, { color: "neutral", shape: "icon", onClick: l, children: /* @__PURE__ */ t.jsx(We, { className: "size-full" }) }),
1550
+ /* @__PURE__ */ t.jsx(Tt, { className: "size-20 text-primary-light" }),
1551
+ /* @__PURE__ */ t.jsx(Q, { color: "neutral", shape: "icon", onClick: c, children: /* @__PURE__ */ t.jsx(Be, { className: "size-full" }) }),
1428
1552
  /* @__PURE__ */ t.jsx(
1429
1553
  "div",
1430
1554
  {
1431
- className: R(
1555
+ className: H(
1432
1556
  "relative h-1 w-3/5 overflow-hidden rounded-full bg-background",
1433
- a === null && "invisible"
1557
+ d === null && "invisible"
1434
1558
  ),
1435
1559
  children: /* @__PURE__ */ t.jsx(
1436
1560
  "div",
1437
1561
  {
1438
1562
  className: "h-full bg-primary transition-[width]",
1439
- style: { width: `${a ?? 0}%` }
1563
+ style: { width: `${d ?? 0}%` }
1440
1564
  }
1441
1565
  )
1442
1566
  }
1443
1567
  )
1444
1568
  ] })
1445
1569
  ] });
1446
- }, Cr = (e) => {
1447
- const { itemIndex: r } = e, { setItemInteraction: n } = q(), [o, s] = F();
1448
- return Z(() => {
1570
+ }, Vr = (e) => {
1571
+ const { itemIndex: r } = e, { setItemInteraction: n } = J(), [o, s] = $();
1572
+ return O(() => {
1449
1573
  o === null || o === "error" || n(r, o === "spin" ? "running" : "ready");
1450
1574
  }, [r, n, o]), o === "error" ? /* @__PURE__ */ t.jsx(
1451
- kt,
1575
+ It,
1452
1576
  {
1453
1577
  className: "text-background",
1454
1578
  text: "Spin could not be loaded"
1455
1579
  }
1456
1580
  ) : o !== "spin" ? /* @__PURE__ */ t.jsx(
1457
- jr,
1581
+ Sr,
1458
1582
  {
1459
1583
  ...e,
1460
1584
  onPlaceholderImageLoaded: () => s("placeholder"),
1461
1585
  onSpinImagesLoaded: () => s("spin"),
1462
1586
  onError: () => s("error")
1463
1587
  }
1464
- ) : /* @__PURE__ */ t.jsx(yr, { ...e });
1465
- }, kr = (e) => /* @__PURE__ */ t.jsx(B, { color: "neutral", shape: "icon", ...e, children: /* @__PURE__ */ t.jsx(We, { className: "size-full" }) }), Er = ({ className: e }) => /* @__PURE__ */ t.jsx(U, { className: e, customizationKey: "UI_PAUSE", children: /* @__PURE__ */ t.jsx(
1588
+ ) : /* @__PURE__ */ t.jsx(Ir, { ...e });
1589
+ }, Tr = (e) => /* @__PURE__ */ t.jsx(Q, { color: "neutral", shape: "icon", ...e, children: /* @__PURE__ */ t.jsx(Be, { className: "size-full" }) }), Hr = ({ className: e }) => /* @__PURE__ */ t.jsx(G, { className: e, customizationKey: "UI_PAUSE", children: /* @__PURE__ */ t.jsx(
1466
1590
  "svg",
1467
1591
  {
1468
1592
  className: e,
@@ -1479,7 +1603,7 @@ const yt = ze(null), jt = () => Ie(yt), Fe = () => {
1479
1603
  }
1480
1604
  )
1481
1605
  }
1482
- ) }), Nr = ({ className: e }) => /* @__PURE__ */ t.jsx(U, { className: e, customizationKey: "UI_VOLUME", children: /* @__PURE__ */ t.jsx(
1606
+ ) }), Rr = ({ className: e }) => /* @__PURE__ */ t.jsx(G, { className: e, customizationKey: "UI_VOLUME", children: /* @__PURE__ */ t.jsx(
1483
1607
  "svg",
1484
1608
  {
1485
1609
  className: e,
@@ -1496,7 +1620,7 @@ const yt = ze(null), jt = () => Ie(yt), Fe = () => {
1496
1620
  }
1497
1621
  )
1498
1622
  }
1499
- ) }), Lr = ({ className: e }) => /* @__PURE__ */ t.jsx(U, { className: e, customizationKey: "UI_VOLUME_OFF", children: /* @__PURE__ */ t.jsx(
1623
+ ) }), Ar = ({ className: e }) => /* @__PURE__ */ t.jsx(G, { className: e, customizationKey: "UI_VOLUME_OFF", children: /* @__PURE__ */ t.jsx(
1500
1624
  "svg",
1501
1625
  {
1502
1626
  className: e,
@@ -1513,133 +1637,133 @@ const yt = ze(null), jt = () => Ie(yt), Fe = () => {
1513
1637
  }
1514
1638
  )
1515
1639
  }
1516
- ) }), Ke = ({ progress: e }) => /* @__PURE__ */ t.jsx("div", { className: "h-1 w-full overflow-hidden rounded-ui-sm bg-background/25", children: /* @__PURE__ */ t.jsx(
1640
+ ) }), at = ({ progress: e }) => /* @__PURE__ */ t.jsx("div", { className: "h-1 w-full overflow-hidden rounded-ui-sm bg-background/25", children: /* @__PURE__ */ t.jsx(
1517
1641
  "div",
1518
1642
  {
1519
1643
  className: "size-full rounded-ui-sm bg-background transition-transform",
1520
1644
  style: { transform: `translateX(-${100 * (1 - e)}%)` }
1521
1645
  }
1522
- ) }), _r = 3e3, zr = ({ src: e, poster: r, itemIndex: n }) => {
1523
- const { carrouselItemIndex: o, setItemInteraction: s } = q(), p = W(null), d = W(null), a = M(() => {
1524
- if (!d.current)
1646
+ ) }), Pr = 3e3, Or = ({ src: e, poster: r, itemIndex: n }) => {
1647
+ const { carrouselItemIndex: o, setItemInteraction: s } = J(), u = Z(null), f = Z(null), d = I(() => {
1648
+ if (!f.current)
1525
1649
  throw new Error("videoRef.current is null");
1526
- return d.current;
1650
+ return f.current;
1527
1651
  }, []);
1528
- Z(() => {
1652
+ O(() => {
1529
1653
  s(n, "ready");
1530
1654
  }, [n, s]);
1531
- const l = M(() => {
1532
- a().play();
1533
- }, [a]), w = M(() => {
1534
- a().pause();
1535
- }, [a]);
1536
- Z(() => {
1537
- o === n || w();
1538
- }, [o, n, w]);
1539
- const [m, c] = F(!1), [f, _] = F(!0), b = () => {
1540
- c(!0), s(n, "running");
1541
- }, y = () => {
1542
- c(!1), s(n, "ready");
1543
- }, L = () => {
1544
- _(!1);
1655
+ const c = I(() => {
1656
+ d().play();
1657
+ }, [d]), v = I(() => {
1658
+ d().pause();
1659
+ }, [d]);
1660
+ O(() => {
1661
+ o === n || v();
1662
+ }, [o, n, v]);
1663
+ const [l, m] = $(!1), [w, C] = $(!0), a = () => {
1664
+ m(!0), s(n, "running");
1665
+ }, h = () => {
1666
+ m(!1), s(n, "ready");
1545
1667
  }, x = () => {
1546
- _(!0);
1547
- }, [T, h] = F(null), u = (i) => {
1548
- const k = a(), N = i.currentTarget.getBoundingClientRect(), O = (i.clientX - N.left) / N.width, A = Math.min(1, Math.max(0, O));
1549
- k.volume = A, k.muted = !1;
1550
- }, g = (i) => {
1551
- const k = a();
1552
- k.muted = i;
1668
+ C(!1);
1669
+ }, j = () => {
1670
+ C(!0);
1671
+ }, [k, g] = $(null), p = (i) => {
1672
+ const _ = d(), M = i.currentTarget.getBoundingClientRect(), A = (i.clientX - M.left) / M.width, F = Math.min(1, Math.max(0, A));
1673
+ _.volume = F, _.muted = !1;
1674
+ }, b = (i) => {
1675
+ const _ = d();
1676
+ _.muted = i;
1553
1677
  };
1554
- Z(() => {
1555
- const i = d.current;
1678
+ O(() => {
1679
+ const i = f.current;
1556
1680
  if (!i)
1557
1681
  return;
1558
- const k = () => {
1559
- h({
1682
+ const _ = () => {
1683
+ g({
1560
1684
  volume: i.volume,
1561
1685
  isMuted: i.muted
1562
1686
  });
1563
1687
  };
1564
- return k(), i.addEventListener("volumechange", k), () => {
1565
- i.removeEventListener("volumechange", k);
1688
+ return _(), i.addEventListener("volumechange", _), () => {
1689
+ i.removeEventListener("volumechange", _);
1566
1690
  };
1567
1691
  }, []);
1568
- const [v, z] = F(null), H = v ? v.currentTime / v.duration : 0;
1569
- Z(() => {
1570
- const i = d.current;
1692
+ const [E, L] = $(null), D = E ? E.currentTime / E.duration : 0;
1693
+ O(() => {
1694
+ const i = f.current;
1571
1695
  if (!i) return;
1572
- const k = () => {
1573
- const N = i.currentTime, O = i.duration;
1574
- isNaN(N) || isNaN(O) || z({
1575
- currentTime: N,
1576
- duration: O
1696
+ const _ = () => {
1697
+ const M = i.currentTime, A = i.duration;
1698
+ isNaN(M) || isNaN(A) || L({
1699
+ currentTime: M,
1700
+ duration: A
1577
1701
  });
1578
1702
  };
1579
- return k(), i.addEventListener("timeupdate", k), () => {
1580
- i.removeEventListener("timeupdate", k);
1703
+ return _(), i.addEventListener("timeupdate", _), () => {
1704
+ i.removeEventListener("timeupdate", _);
1581
1705
  };
1582
1706
  }, []);
1583
- const S = (i) => {
1584
- const k = a(), N = i.currentTarget.getBoundingClientRect(), O = (i.clientX - N.left) / N.width, A = k.duration * O;
1585
- k.currentTime = A;
1586
- }, j = (i) => {
1587
- const k = Math.floor(i % 3600 / 60), N = Math.floor(i % 60);
1588
- return `${k}:${N.toString().padStart(2, "0")}`;
1589
- }, [E, I] = F(!1), V = W(void 0), P = M(
1707
+ const T = (i) => {
1708
+ const _ = d(), M = i.currentTarget.getBoundingClientRect(), A = (i.clientX - M.left) / M.width, F = _.duration * A;
1709
+ _.currentTime = F;
1710
+ }, N = (i) => {
1711
+ const _ = Math.floor(i % 3600 / 60), M = Math.floor(i % 60);
1712
+ return `${_}:${M.toString().padStart(2, "0")}`;
1713
+ }, [z, S] = $(!1), V = Z(void 0), R = I(
1590
1714
  () => clearTimeout(V.current),
1591
1715
  []
1592
- ), C = M(() => {
1593
- P(), V.current = setTimeout(() => {
1594
- I(!1);
1595
- }, _r);
1596
- }, [P]);
1597
- return Z(() => {
1598
- const i = p.current, k = d.current;
1599
- if (!i || !k)
1716
+ ), y = I(() => {
1717
+ R(), V.current = setTimeout(() => {
1718
+ S(!1);
1719
+ }, Pr);
1720
+ }, [R]);
1721
+ return O(() => {
1722
+ const i = u.current, _ = f.current;
1723
+ if (!i || !_)
1600
1724
  return;
1601
- const N = () => {
1602
- C(), I(!0);
1603
- }, O = () => {
1604
- P(), I(!1);
1725
+ const M = () => {
1726
+ y(), S(!0);
1727
+ }, A = () => {
1728
+ R(), S(!1);
1605
1729
  };
1606
- let A = !1;
1607
- const Y = () => {
1608
- A = !0;
1609
- }, $ = () => {
1610
- A && (A = !1, w());
1611
- }, K = () => {
1612
- A = !1, N();
1613
- }, G = (X) => {
1614
- X.preventDefault(), X.touches.length === 1 && (C(), I((ne) => !ne));
1730
+ let F = !1;
1731
+ const U = () => {
1732
+ F = !0;
1733
+ }, W = () => {
1734
+ F && (F = !1, v());
1735
+ }, Y = () => {
1736
+ F = !1, M();
1737
+ }, q = (ee) => {
1738
+ ee.preventDefault(), ee.touches.length === 1 && (y(), S((fe) => !fe));
1615
1739
  };
1616
- return i.addEventListener("mousedown", Y), i.addEventListener("mouseup", $), i.addEventListener("mouseenter", N), i.addEventListener("mousemove", K), i.addEventListener("mouseleave", O), k.addEventListener("touchstart", G), () => {
1617
- i.removeEventListener("mousedown", Y), i.removeEventListener("mouseup", $), i.removeEventListener("mouseenter", N), i.removeEventListener("mousemove", N), i.removeEventListener("mouseleave", O), k.removeEventListener("touchstart", G);
1740
+ return i.addEventListener("mousedown", U), i.addEventListener("mouseup", W), i.addEventListener("mouseenter", M), i.addEventListener("mousemove", Y), i.addEventListener("mouseleave", A), _.addEventListener("touchstart", q), () => {
1741
+ i.removeEventListener("mousedown", U), i.removeEventListener("mouseup", W), i.removeEventListener("mouseenter", M), i.removeEventListener("mousemove", M), i.removeEventListener("mouseleave", A), _.removeEventListener("touchstart", q);
1618
1742
  };
1619
- }, [P, w, C]), /* @__PURE__ */ t.jsxs("div", { ref: p, className: "relative size-full", children: [
1743
+ }, [R, v, y]), /* @__PURE__ */ t.jsxs("div", { ref: u, className: "relative size-full", children: [
1620
1744
  /* @__PURE__ */ t.jsx(
1621
1745
  "video",
1622
1746
  {
1623
- ref: d,
1747
+ ref: f,
1624
1748
  className: "size-full",
1625
1749
  src: e,
1626
1750
  poster: r,
1627
1751
  disablePictureInPicture: !0,
1628
1752
  playsInline: !0,
1629
- onPlay: b,
1630
- onPause: y,
1631
- onEnded: y,
1632
- onCanPlay: L,
1633
- onWaiting: x
1753
+ onPlay: a,
1754
+ onPause: h,
1755
+ onEnded: h,
1756
+ onCanPlay: x,
1757
+ onWaiting: j
1634
1758
  }
1635
1759
  ),
1636
- m ? /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
1760
+ l ? /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
1637
1761
  /* @__PURE__ */ t.jsxs(
1638
1762
  "div",
1639
1763
  {
1640
- className: R(
1764
+ className: H(
1641
1765
  "absolute inset-x-0 bottom-0 cursor-auto space-y-2 bg-gradient-to-t from-foreground to-transparent p-4 pr-12 pt-8 transition-opacity duration-300",
1642
- E ? "pointer-events-auto opacity-100" : "pointer-events-none opacity-0"
1766
+ z ? "pointer-events-auto opacity-100" : "pointer-events-none opacity-0"
1643
1767
  ),
1644
1768
  onMouseDownCapture: (i) => i.stopPropagation(),
1645
1769
  children: [
@@ -1650,25 +1774,25 @@ const yt = ze(null), jt = () => Ie(yt), Fe = () => {
1650
1774
  className: "flex items-center gap-x-4",
1651
1775
  children: [
1652
1776
  /* @__PURE__ */ t.jsx(
1653
- B,
1777
+ Q,
1654
1778
  {
1655
1779
  shape: "icon",
1656
1780
  variant: "ghost",
1657
1781
  color: "neutral",
1658
- onClick: w,
1659
- children: /* @__PURE__ */ t.jsx(Er, { className: "size-full" })
1782
+ onClick: v,
1783
+ children: /* @__PURE__ */ t.jsx(Hr, { className: "size-full" })
1660
1784
  }
1661
1785
  ),
1662
- v && /* @__PURE__ */ t.jsxs("span", { className: "text-sm", children: [
1663
- j(v.currentTime),
1786
+ E && /* @__PURE__ */ t.jsxs("span", { className: "text-sm", children: [
1787
+ N(E.currentTime),
1664
1788
  " /",
1665
1789
  " ",
1666
- j(v.duration)
1790
+ N(E.duration)
1667
1791
  ] })
1668
1792
  ]
1669
1793
  }
1670
1794
  ),
1671
- T && /* @__PURE__ */ t.jsxs(
1795
+ k && /* @__PURE__ */ t.jsxs(
1672
1796
  "div",
1673
1797
  {
1674
1798
  className: "group/volume flex items-center gap-x-4 rounded-ui-md p-2 transition-colors hover:bg-foreground/25",
@@ -1676,17 +1800,17 @@ const yt = ze(null), jt = () => Ie(yt), Fe = () => {
1676
1800
  /* @__PURE__ */ t.jsx(
1677
1801
  "div",
1678
1802
  {
1679
- className: `w-12 cursor-pointer py-1 opacity-0 transition-opacity ${T.isMuted ? "group-hover/volume:opacity-50" : "group-hover/volume:opacity-100"}`,
1680
- onClick: u,
1681
- children: /* @__PURE__ */ t.jsx(Ke, { progress: T.volume })
1803
+ className: `w-12 cursor-pointer py-1 opacity-0 transition-opacity ${k.isMuted ? "group-hover/volume:opacity-50" : "group-hover/volume:opacity-100"}`,
1804
+ onClick: p,
1805
+ children: /* @__PURE__ */ t.jsx(at, { progress: k.volume })
1682
1806
  }
1683
1807
  ),
1684
1808
  /* @__PURE__ */ t.jsx(
1685
1809
  "div",
1686
1810
  {
1687
1811
  className: "size-5 cursor-pointer",
1688
- onClick: () => g(!T.isMuted),
1689
- children: T.isMuted ? /* @__PURE__ */ t.jsx(Lr, { className: "size-full" }) : /* @__PURE__ */ t.jsx(Nr, { className: "size-full" })
1812
+ onClick: () => b(!k.isMuted),
1813
+ children: k.isMuted ? /* @__PURE__ */ t.jsx(Ar, { className: "size-full" }) : /* @__PURE__ */ t.jsx(Rr, { className: "size-full" })
1690
1814
  }
1691
1815
  )
1692
1816
  ]
@@ -1697,45 +1821,47 @@ const yt = ze(null), jt = () => Ie(yt), Fe = () => {
1697
1821
  "div",
1698
1822
  {
1699
1823
  className: "cursor-pointer py-1",
1700
- onClick: S,
1701
- children: /* @__PURE__ */ t.jsx(Ke, { progress: H })
1824
+ onClick: T,
1825
+ children: /* @__PURE__ */ t.jsx(at, { progress: D })
1702
1826
  }
1703
1827
  )
1704
1828
  ]
1705
1829
  }
1706
1830
  ),
1707
- f && /* @__PURE__ */ t.jsx(
1831
+ w && /* @__PURE__ */ t.jsx(
1708
1832
  "div",
1709
1833
  {
1710
1834
  className: "pointer-events-none absolute inset-0 flex items-center justify-center bg-foreground/25",
1711
- children: /* @__PURE__ */ t.jsx(Et, { size: "lg", color: "background" })
1835
+ children: /* @__PURE__ */ t.jsx(St, { size: "lg", color: "background" })
1712
1836
  }
1713
1837
  )
1714
1838
  ] }) : /* @__PURE__ */ t.jsx(
1715
1839
  "div",
1716
1840
  {
1717
1841
  className: "absolute inset-0 flex items-center justify-center bg-foreground/25",
1718
- children: /* @__PURE__ */ t.jsx(kr, { onClick: l })
1842
+ children: /* @__PURE__ */ t.jsx(Tr, { onClick: c })
1719
1843
  }
1720
1844
  )
1721
1845
  ] });
1722
- }, Ir = ({ index: e, item: r, isShown: n }) => {
1846
+ }, Dr = ({ index: e, item: r, isShown: n }) => {
1723
1847
  const { type: o } = r;
1724
1848
  let s;
1725
1849
  switch (o) {
1726
1850
  case "image":
1727
- s = /* @__PURE__ */ t.jsx(It, { itemIndex: e, onlyPreload: !n, ...r });
1851
+ s = /* @__PURE__ */ t.jsx(Pt, { itemIndex: e, onlyPreload: !n, ...r });
1728
1852
  break;
1729
1853
  case "video":
1730
- s = /* @__PURE__ */ t.jsx(zr, { itemIndex: e, ...r });
1854
+ s = /* @__PURE__ */ t.jsx(Or, { itemIndex: e, ...r });
1731
1855
  break;
1732
1856
  case "360":
1733
- s = /* @__PURE__ */ t.jsx(Cr, { itemIndex: e, onlyPreload: !n, ...r });
1857
+ s = /* @__PURE__ */ t.jsx(Vr, { itemIndex: e, onlyPreload: !n, ...r });
1734
1858
  break;
1859
+ case "custom":
1860
+ s = /* @__PURE__ */ t.jsx(Nr, { itemIndex: e, ...r });
1735
1861
  }
1736
- return s = /* @__PURE__ */ t.jsx("div", { className: R("-ml-px h-full w-[calc(100%+2px)]"), children: s }), s;
1737
- }, Mr = (e) => {
1738
- Z(() => {
1862
+ return s = /* @__PURE__ */ t.jsx("div", { className: "-ml-px h-full w-[calc(100%+2px)]", children: s }), s;
1863
+ }, Fr = (e) => {
1864
+ O(() => {
1739
1865
  const r = (n) => {
1740
1866
  n.key === "Escape" && e();
1741
1867
  };
@@ -1744,32 +1870,32 @@ const yt = ze(null), jt = () => Ie(yt), Fe = () => {
1744
1870
  };
1745
1871
  }, [e]);
1746
1872
  };
1747
- function Tr(e) {
1873
+ function $r(e) {
1748
1874
  return e.target === e.currentTarget;
1749
1875
  }
1750
- const Vr = ({ currentIndex: e, maxIndex: r }) => /* @__PURE__ */ t.jsxs("div", { className: "space-x-0.5 rounded-ui bg-foreground/40 px-1.5 py-0.5 text-xs text-background/75 transition-radius small:space-x-1 small:px-2 small:py-1 small:text-sm", children: [
1876
+ const Zr = ({ currentIndex: e, maxIndex: r }) => /* @__PURE__ */ t.jsxs("div", { className: "space-x-0.5 rounded-ui bg-foreground/40 px-1.5 py-0.5 text-xs text-background/75 transition-radius small:space-x-1 small:px-2 small:py-1 small:text-sm", children: [
1751
1877
  /* @__PURE__ */ t.jsx("span", { children: e + 1 }),
1752
1878
  /* @__PURE__ */ t.jsx("span", { children: "/" }),
1753
1879
  /* @__PURE__ */ t.jsx("span", { children: r + 1 })
1754
- ] }), Je = ({ className: e }) => /* @__PURE__ */ t.jsx(U, { className: e, customizationKey: "UI_ARROW_RIGHT", children: /* @__PURE__ */ t.jsx("svg", { className: e, viewBox: "0 0 16 16", fill: "none", children: /* @__PURE__ */ t.jsx(
1880
+ ] }), it = ({ className: e }) => /* @__PURE__ */ t.jsx(G, { className: e, customizationKey: "UI_ARROW_RIGHT", children: /* @__PURE__ */ t.jsx("svg", { className: e, viewBox: "0 0 16 16", fill: "none", children: /* @__PURE__ */ t.jsx(
1755
1881
  "path",
1756
1882
  {
1757
1883
  d: "M4.07666 13.4868L5.25666 14.6668L11.9233 8.00016L5.25666 1.3335L4.07666 2.5135L9.56333 8.00016L4.07666 13.4868Z",
1758
1884
  fill: "currentColor"
1759
1885
  }
1760
- ) }) }), Sr = ({ className: e }) => /* @__PURE__ */ t.jsx(U, { className: e, customizationKey: "UI_EXTEND", children: /* @__PURE__ */ t.jsx("svg", { className: e, viewBox: "0 0 16 16", fill: "none", children: /* @__PURE__ */ t.jsx(
1886
+ ) }) }), Ur = ({ className: e }) => /* @__PURE__ */ t.jsx(G, { className: e, customizationKey: "UI_EXTEND", children: /* @__PURE__ */ t.jsx("svg", { className: e, viewBox: "0 0 16 16", fill: "none", children: /* @__PURE__ */ t.jsx(
1761
1887
  "path",
1762
1888
  {
1763
1889
  d: "M4.66683 9.3335H3.3335V12.6668H6.66683V11.3335H4.66683V9.3335ZM3.3335 6.66683H4.66683V4.66683H6.66683V3.3335H3.3335V6.66683ZM11.3335 11.3335H9.3335V12.6668H12.6668V9.3335H11.3335V11.3335ZM9.3335 3.3335V4.66683H11.3335V6.66683H12.6668V3.3335H9.3335Z",
1764
1890
  fill: "currentColor"
1765
1891
  }
1766
- ) }) }), Rr = ({ className: e }) => /* @__PURE__ */ t.jsx(U, { className: e, customizationKey: "UI_GALLERY", children: /* @__PURE__ */ t.jsx("svg", { className: e, viewBox: "0 0 16 16", fill: "none", children: /* @__PURE__ */ t.jsx(
1892
+ ) }) }), Wr = ({ className: e }) => /* @__PURE__ */ t.jsx(G, { className: e, customizationKey: "UI_GALLERY", children: /* @__PURE__ */ t.jsx("svg", { className: e, viewBox: "0 0 16 16", fill: "none", children: /* @__PURE__ */ t.jsx(
1767
1893
  "path",
1768
1894
  {
1769
1895
  d: "M13.3334 2.66683V10.6668H5.33337V2.66683H13.3334ZM13.3334 1.3335H5.33337C4.60004 1.3335 4.00004 1.9335 4.00004 2.66683V10.6668C4.00004 11.4002 4.60004 12.0002 5.33337 12.0002H13.3334C14.0667 12.0002 14.6667 11.4002 14.6667 10.6668V2.66683C14.6667 1.9335 14.0667 1.3335 13.3334 1.3335ZM7.66671 7.78016L8.79337 9.28683L10.4467 7.22016L12.6667 10.0002H6.00004L7.66671 7.78016ZM1.33337 4.00016V13.3335C1.33337 14.0668 1.93337 14.6668 2.66671 14.6668H12V13.3335H2.66671V4.00016H1.33337Z",
1770
1896
  fill: "currentColor"
1771
1897
  }
1772
- ) }) }), Hr = ({ className: e }) => /* @__PURE__ */ t.jsx(U, { className: e, customizationKey: "UI_HOTSPOTS", children: /* @__PURE__ */ t.jsxs(
1898
+ ) }) }), Yr = ({ className: e }) => /* @__PURE__ */ t.jsx(G, { className: e, customizationKey: "UI_HOTSPOTS", children: /* @__PURE__ */ t.jsxs(
1773
1899
  "svg",
1774
1900
  {
1775
1901
  className: e,
@@ -1789,7 +1915,7 @@ const Vr = ({ currentIndex: e, maxIndex: r }) => /* @__PURE__ */ t.jsxs("div", {
1789
1915
  /* @__PURE__ */ t.jsx("defs", { children: /* @__PURE__ */ t.jsx("clipPath", { id: "clip0_418_982", children: /* @__PURE__ */ t.jsx("rect", { width: "12", height: "12", fill: "white" }) }) })
1790
1916
  ]
1791
1917
  }
1792
- ) }), Or = ({ className: e }) => /* @__PURE__ */ t.jsx(U, { className: e, customizationKey: "UI_MINUS", children: /* @__PURE__ */ t.jsx(
1918
+ ) }), Xr = ({ className: e }) => /* @__PURE__ */ t.jsx(G, { className: e, customizationKey: "UI_MINUS", children: /* @__PURE__ */ t.jsx(
1793
1919
  "svg",
1794
1920
  {
1795
1921
  className: e,
@@ -1806,7 +1932,7 @@ const Vr = ({ currentIndex: e, maxIndex: r }) => /* @__PURE__ */ t.jsxs("div", {
1806
1932
  }
1807
1933
  )
1808
1934
  }
1809
- ) }), Pr = ({ className: e }) => /* @__PURE__ */ t.jsx(U, { className: e, customizationKey: "UI_PLUS", children: /* @__PURE__ */ t.jsx(
1935
+ ) }), Br = ({ className: e }) => /* @__PURE__ */ t.jsx(G, { className: e, customizationKey: "UI_PLUS", children: /* @__PURE__ */ t.jsx(
1810
1936
  "svg",
1811
1937
  {
1812
1938
  className: e,
@@ -1823,13 +1949,13 @@ const Vr = ({ currentIndex: e, maxIndex: r }) => /* @__PURE__ */ t.jsxs("div", {
1823
1949
  }
1824
1950
  )
1825
1951
  }
1826
- ) }), Dr = ({ className: e }) => /* @__PURE__ */ t.jsx(U, { className: e, customizationKey: "UI_REDUCE", children: /* @__PURE__ */ t.jsx("svg", { className: e, viewBox: "0 0 16 16", fill: "none", children: /* @__PURE__ */ t.jsx(
1952
+ ) }), Gr = ({ className: e }) => /* @__PURE__ */ t.jsx(G, { className: e, customizationKey: "UI_REDUCE", children: /* @__PURE__ */ t.jsx("svg", { className: e, viewBox: "0 0 16 16", fill: "none", children: /* @__PURE__ */ t.jsx(
1827
1953
  "path",
1828
1954
  {
1829
1955
  d: "M3.33325 10.6668H5.33325V12.6668H6.66659V9.3335H3.33325V10.6668ZM5.33325 5.3335H3.33325V6.66683H6.66659V3.3335H5.33325V5.3335ZM9.33325 12.6668H10.6666V10.6668H12.6666V9.3335H9.33325V12.6668ZM10.6666 5.3335V3.3335H9.33325V6.66683H12.6666V5.3335H10.6666Z",
1830
1956
  fill: "currentColor"
1831
1957
  }
1832
- ) }) }), Zr = ({
1958
+ ) }) }), Kr = ({
1833
1959
  enabled: e,
1834
1960
  onToggle: r,
1835
1961
  label: n,
@@ -1838,7 +1964,7 @@ const Vr = ({ currentIndex: e, maxIndex: r }) => /* @__PURE__ */ t.jsxs("div", {
1838
1964
  }) => /* @__PURE__ */ t.jsxs(
1839
1965
  "label",
1840
1966
  {
1841
- className: R(
1967
+ className: H(
1842
1968
  "flex cursor-pointer items-center justify-center gap-x-2",
1843
1969
  o
1844
1970
  ),
@@ -1856,14 +1982,14 @@ const Vr = ({ currentIndex: e, maxIndex: r }) => /* @__PURE__ */ t.jsxs("div", {
1856
1982
  /* @__PURE__ */ t.jsx(
1857
1983
  "div",
1858
1984
  {
1859
- className: R(
1985
+ className: H(
1860
1986
  "flex h-5 w-8 items-center justify-center rounded-full transition-colors",
1861
1987
  e ? "bg-primary" : "bg-background/60"
1862
1988
  ),
1863
1989
  children: /* @__PURE__ */ t.jsx(
1864
1990
  "div",
1865
1991
  {
1866
- className: R(
1992
+ className: H(
1867
1993
  "flex size-4 items-center justify-center rounded-full p-0.5 transition",
1868
1994
  e ? "translate-x-1.5 bg-primary-foreground text-primary" : "-translate-x-1.5 bg-background text-foreground"
1869
1995
  ),
@@ -1874,7 +2000,7 @@ const Vr = ({ currentIndex: e, maxIndex: r }) => /* @__PURE__ */ t.jsxs("div", {
1874
2000
  )
1875
2001
  ]
1876
2002
  }
1877
- ), Ar = ({ className: e }) => /* @__PURE__ */ t.jsx(U, { className: e, customizationKey: "UI_BURGER", children: /* @__PURE__ */ t.jsx(
2003
+ ), qr = ({ className: e }) => /* @__PURE__ */ t.jsx(G, { className: e, customizationKey: "UI_BURGER", children: /* @__PURE__ */ t.jsx(
1878
2004
  "svg",
1879
2005
  {
1880
2006
  className: e,
@@ -1891,51 +2017,51 @@ const Vr = ({ currentIndex: e, maxIndex: r }) => /* @__PURE__ */ t.jsxs("div", {
1891
2017
  }
1892
2018
  )
1893
2019
  }
1894
- ) }), Fr = ({ sharedClassName: e }) => {
1895
- const { categories: r } = re(), { displayedCategoryId: n, changeCategory: o } = q(), [s, p] = F(!1), d = () => {
1896
- p(!s);
1897
- }, a = () => {
1898
- p(!1);
2020
+ ) }), Jr = ({ sharedClassName: e }) => {
2021
+ const { categories: r } = oe(), { displayedCategoryId: n, changeCategory: o } = J(), [s, u] = $(!1), f = () => {
2022
+ u(!s);
2023
+ }, d = () => {
2024
+ u(!1);
1899
2025
  };
1900
2026
  return /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
1901
2027
  s && /* @__PURE__ */ t.jsx(
1902
2028
  "div",
1903
2029
  {
1904
- className: R(e, "inset-0 small:hidden"),
1905
- onClick: a
2030
+ className: H(e, "inset-0 small:hidden"),
2031
+ onClick: d
1906
2032
  }
1907
2033
  ),
1908
2034
  /* @__PURE__ */ t.jsxs(
1909
2035
  "div",
1910
2036
  {
1911
- className: R(
2037
+ className: H(
1912
2038
  e,
1913
- ue("top-left"),
2039
+ pe("top-left"),
1914
2040
  "flex gap-x-2 small:hidden"
1915
2041
  ),
1916
2042
  children: [
1917
2043
  /* @__PURE__ */ t.jsx(
1918
- B,
2044
+ Q,
1919
2045
  {
1920
2046
  shape: "icon",
1921
2047
  color: s ? "primary" : "neutral",
1922
- onClick: d,
1923
- children: /* @__PURE__ */ t.jsx(Ar, {})
2048
+ onClick: f,
2049
+ children: /* @__PURE__ */ t.jsx(qr, {})
1924
2050
  }
1925
2051
  ),
1926
- s && /* @__PURE__ */ t.jsx("div", { className: "rounded-ui-md bg-background transition-radius", children: /* @__PURE__ */ t.jsx("ul", { className: "space-y-0.5 p-1", children: r.map(({ id: l, title: w }) => /* @__PURE__ */ t.jsx(
2052
+ s && /* @__PURE__ */ t.jsx("div", { className: "rounded-ui-md bg-background transition-radius", children: /* @__PURE__ */ t.jsx("ul", { className: "space-y-0.5 p-1", children: r.map(({ id: c, title: v }) => /* @__PURE__ */ t.jsx(
1927
2053
  "li",
1928
2054
  {
1929
- className: R(
2055
+ className: H(
1930
2056
  "cursor-pointer rounded-ui px-2 py-1 text-sm font-bold transition-all hover:bg-primary/30",
1931
- l === n && "bg-primary/50"
2057
+ c === n && "bg-primary/50"
1932
2058
  ),
1933
2059
  onClick: () => {
1934
- o(l), p(!1);
2060
+ o(c), u(!1);
1935
2061
  },
1936
- children: w
2062
+ children: v
1937
2063
  },
1938
- l
2064
+ c
1939
2065
  )) }) })
1940
2066
  ]
1941
2067
  }
@@ -1943,136 +2069,134 @@ const Vr = ({ currentIndex: e, maxIndex: r }) => /* @__PURE__ */ t.jsxs("div", {
1943
2069
  /* @__PURE__ */ t.jsx(
1944
2070
  "div",
1945
2071
  {
1946
- className: R(
2072
+ className: H(
1947
2073
  e,
1948
- bt("top"),
2074
+ Mt("top"),
1949
2075
  "w-full overflow-x-auto max-small:hidden"
1950
2076
  ),
1951
- children: /* @__PURE__ */ t.jsx("div", { className: "mx-auto flex w-fit gap-x-1 rounded-ui-md bg-background p-1 shadow", children: r.map(({ id: l, title: w }) => /* @__PURE__ */ t.jsx(
1952
- B,
2077
+ children: /* @__PURE__ */ t.jsx("div", { className: "mx-auto flex w-fit gap-x-1 rounded-ui-md bg-background p-1 shadow", children: r.map(({ id: c, title: v }) => /* @__PURE__ */ t.jsx(
2078
+ Q,
1953
2079
  {
1954
- variant: l === n ? "fill" : "ghost",
1955
- onClick: () => o(l),
1956
- children: w
2080
+ variant: c === n ? "fill" : "ghost",
2081
+ onClick: () => o(c),
2082
+ children: v
1957
2083
  },
1958
- l
2084
+ c
1959
2085
  )) })
1960
2086
  }
1961
2087
  )
1962
2088
  ] });
1963
- }, Wr = () => {
1964
- const { hideCategories: e, infiniteCarrousel: r, permanentGallery: n } = J(), {
1965
- items: { length: o },
1966
- aspectRatioStyle: s
1967
- } = re(), {
1968
- slidable: p,
1969
- carrouselItemIndex: d,
1970
- masterItemIndex: a,
1971
- prevItem: l,
1972
- nextItem: w,
1973
- showGalleryControls: m,
1974
- enableHotspotsControl: c,
1975
- showHotspots: f,
1976
- toggleHotspots: _,
1977
- showGallery: b,
1978
- toggleGallery: y,
1979
- extendMode: L,
1980
- toggleExtendMode: x,
1981
- shownDetails: T,
1982
- isShowingDetails: h,
1983
- resetShownDetails: u,
1984
- showZoomControls: g,
1985
- isZooming: v,
1986
- canZoomIn: z,
1987
- zoomIn: H,
1988
- canZoomOut: S,
1989
- zoomOut: j,
1990
- resetView: E
1991
- } = q(), I = M(
1992
- (P) => {
1993
- Tr(P) && u();
2089
+ }, Qr = () => {
2090
+ const { hideCategories: e, infiniteCarrousel: r, permanentGallery: n } = re(), { aspectRatioStyle: o } = oe(), {
2091
+ items: { length: s },
2092
+ slidable: u,
2093
+ carrouselItemIndex: f,
2094
+ masterItemIndex: d,
2095
+ prevItem: c,
2096
+ nextItem: v,
2097
+ showGalleryControls: l,
2098
+ enableHotspotsControl: m,
2099
+ showHotspots: w,
2100
+ toggleHotspots: C,
2101
+ showGallery: a,
2102
+ toggleGallery: h,
2103
+ extendMode: x,
2104
+ toggleExtendMode: j,
2105
+ shownDetails: k,
2106
+ isShowingDetails: g,
2107
+ resetShownDetails: p,
2108
+ showZoomControls: b,
2109
+ isZooming: E,
2110
+ canZoomIn: L,
2111
+ zoomIn: D,
2112
+ canZoomOut: T,
2113
+ zoomOut: N,
2114
+ resetView: z
2115
+ } = J(), S = I(
2116
+ (R) => {
2117
+ $r(R) && p();
1994
2118
  },
1995
- [u]
2119
+ [p]
1996
2120
  );
1997
- Mr(u);
2121
+ Fr(p);
1998
2122
  const V = "absolute z-overlay";
1999
2123
  return /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
2000
2124
  !e && /* @__PURE__ */ t.jsx(
2001
- Fr,
2125
+ Jr,
2002
2126
  {
2003
- sharedClassName: R(
2127
+ sharedClassName: H(
2004
2128
  V,
2005
2129
  "transition-opacity",
2006
- v ? "!pointer-events-none opacity-0" : "opacity-100"
2130
+ E ? "!pointer-events-none opacity-0" : "opacity-100"
2007
2131
  )
2008
2132
  }
2009
2133
  ),
2010
- p && !v && /* @__PURE__ */ t.jsx("div", { className: R(V, ue("top-right")), children: /* @__PURE__ */ t.jsx(
2011
- Vr,
2134
+ u && !E && /* @__PURE__ */ t.jsx("div", { className: H(V, pe("top-right")), children: /* @__PURE__ */ t.jsx(
2135
+ Zr,
2012
2136
  {
2013
- currentIndex: d,
2014
- maxIndex: o - 1
2137
+ currentIndex: f,
2138
+ maxIndex: s - 1
2015
2139
  }
2016
2140
  ) }),
2017
- p && /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
2141
+ u && /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
2018
2142
  /* @__PURE__ */ t.jsx(
2019
- B,
2143
+ Q,
2020
2144
  {
2021
2145
  shape: "icon",
2022
2146
  color: "neutral",
2023
- className: R(
2147
+ className: H(
2024
2148
  V,
2025
- ue("middle-left"),
2026
- v ? "!pointer-events-none opacity-0" : "opacity-100"
2149
+ pe("middle-left"),
2150
+ E ? "!pointer-events-none opacity-0" : "opacity-100"
2027
2151
  ),
2028
- onClick: l,
2029
- disabled: !r && a <= 0,
2030
- children: /* @__PURE__ */ t.jsx(U, { customizationKey: "CONTROLS_ARROW_LEFT", children: /* @__PURE__ */ t.jsx(Je, { className: "size-full rotate-180" }) })
2152
+ onClick: c,
2153
+ disabled: !r && d <= 0,
2154
+ children: /* @__PURE__ */ t.jsx(G, { customizationKey: "CONTROLS_PREV", children: /* @__PURE__ */ t.jsx(it, { className: "size-full -scale-x-100" }) })
2031
2155
  }
2032
2156
  ),
2033
2157
  /* @__PURE__ */ t.jsx(
2034
- B,
2158
+ Q,
2035
2159
  {
2036
2160
  shape: "icon",
2037
2161
  color: "neutral",
2038
- className: R(
2162
+ className: H(
2039
2163
  V,
2040
- ue("middle-right"),
2041
- v ? "!pointer-events-none opacity-0" : "opacity-100"
2164
+ pe("middle-right"),
2165
+ E ? "!pointer-events-none opacity-0" : "opacity-100"
2042
2166
  ),
2043
- onClick: w,
2044
- disabled: !r && a >= o - 1,
2045
- children: /* @__PURE__ */ t.jsx(U, { customizationKey: "CONTROLS_ARROW_RIGHT", children: /* @__PURE__ */ t.jsx(Je, { className: "size-full" }) })
2167
+ onClick: v,
2168
+ disabled: !r && d >= s - 1,
2169
+ children: /* @__PURE__ */ t.jsx(G, { customizationKey: "CONTROLS_NEXT", children: /* @__PURE__ */ t.jsx(it, { className: "size-full" }) })
2046
2170
  }
2047
2171
  )
2048
2172
  ] }),
2049
2173
  /* @__PURE__ */ t.jsxs(
2050
2174
  "div",
2051
2175
  {
2052
- className: R(
2176
+ className: H(
2053
2177
  V,
2054
- ue("bottom-fullW"),
2178
+ pe("bottom-fullW"),
2055
2179
  "pointer-events-none grid grid-cols-[auto,1fr,auto] items-end *:pointer-events-auto small:gap-x-2"
2056
2180
  ),
2057
2181
  children: [
2058
- !n && p && /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
2182
+ !n && u && /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
2059
2183
  /* @__PURE__ */ t.jsx(
2060
- B,
2184
+ Q,
2061
2185
  {
2062
- className: m && !v ? "opacity-100" : "!pointer-events-none opacity-0",
2186
+ className: l && !E ? "opacity-100" : "!pointer-events-none opacity-0",
2063
2187
  variant: "fill",
2064
- color: b ? "primary" : "neutral",
2188
+ color: a ? "primary" : "neutral",
2065
2189
  shape: "icon",
2066
- onClick: y,
2067
- children: /* @__PURE__ */ t.jsx(U, { customizationKey: "CONTROLS_GALLERY", children: /* @__PURE__ */ t.jsx(Rr, { className: "size-full" }) })
2190
+ onClick: h,
2191
+ children: /* @__PURE__ */ t.jsx(Wr, { className: "size-full" })
2068
2192
  }
2069
2193
  ),
2070
- b && /* @__PURE__ */ t.jsx(
2071
- _t,
2194
+ a && /* @__PURE__ */ t.jsx(
2195
+ Rt,
2072
2196
  {
2073
- className: R(
2197
+ className: H(
2074
2198
  "transition-opacity",
2075
- m && !v ? "opacity-100" : "!pointer-events-none opacity-0",
2199
+ l && !E ? "opacity-100" : "!pointer-events-none opacity-0",
2076
2200
  // Left & Right gradient mask to fade the gallery
2077
2201
  "[mask-image:linear-gradient(to_left,transparent_0px,black_4px,black_calc(100%-4px),transparent_100%)]"
2078
2202
  ),
@@ -2081,51 +2205,51 @@ const Vr = ({ currentIndex: e, maxIndex: r }) => /* @__PURE__ */ t.jsxs("div", {
2081
2205
  )
2082
2206
  ] }),
2083
2207
  /* @__PURE__ */ t.jsxs("div", { className: "col-start-3 flex flex-col items-end gap-y-1 small:gap-y-2", children: [
2084
- c && /* @__PURE__ */ t.jsx(
2085
- Zr,
2208
+ m && /* @__PURE__ */ t.jsx(
2209
+ Kr,
2086
2210
  {
2087
- className: R(
2211
+ className: H(
2088
2212
  "transition-opacity",
2089
- v ? "!pointer-events-none opacity-0" : "opacity-100"
2213
+ E ? "!pointer-events-none opacity-0" : "opacity-100"
2090
2214
  ),
2091
- enabled: f,
2092
- onToggle: _,
2093
- children: /* @__PURE__ */ t.jsx(Hr, { className: "size-full" })
2215
+ enabled: w,
2216
+ onToggle: C,
2217
+ children: /* @__PURE__ */ t.jsx(Yr, { className: "size-full" })
2094
2218
  }
2095
2219
  ),
2096
- g && /* @__PURE__ */ t.jsxs("div", { className: "max-small:hidden", children: [
2220
+ b && /* @__PURE__ */ t.jsxs("div", { className: "max-small:hidden", children: [
2097
2221
  /* @__PURE__ */ t.jsx(
2098
- B,
2222
+ Q,
2099
2223
  {
2100
2224
  className: "rounded-b-none",
2101
2225
  color: "neutral",
2102
2226
  shape: "icon",
2103
- disabled: !z,
2104
- onClick: H,
2105
- children: /* @__PURE__ */ t.jsx(Pr, { className: "size-full" })
2227
+ disabled: !L,
2228
+ onClick: D,
2229
+ children: /* @__PURE__ */ t.jsx(Br, { className: "size-full" })
2106
2230
  }
2107
2231
  ),
2108
- /* @__PURE__ */ t.jsx(Lt, { color: "background" }),
2232
+ /* @__PURE__ */ t.jsx(Ht, { color: "background" }),
2109
2233
  /* @__PURE__ */ t.jsx(
2110
- B,
2234
+ Q,
2111
2235
  {
2112
2236
  className: "rounded-t-none",
2113
2237
  color: "neutral",
2114
2238
  shape: "icon",
2115
- disabled: !S,
2116
- onClick: j,
2117
- children: /* @__PURE__ */ t.jsx(Or, { className: "size-full" })
2239
+ disabled: !T,
2240
+ onClick: N,
2241
+ children: /* @__PURE__ */ t.jsx(Xr, { className: "size-full" })
2118
2242
  }
2119
2243
  )
2120
2244
  ] }),
2121
2245
  /* @__PURE__ */ t.jsx(
2122
- B,
2246
+ Q,
2123
2247
  {
2124
2248
  variant: "fill",
2125
- color: L ? "primary" : "neutral",
2249
+ color: x ? "primary" : "neutral",
2126
2250
  shape: "icon",
2127
- onClick: x,
2128
- children: L ? /* @__PURE__ */ t.jsx(Dr, { className: "size-full" }) : /* @__PURE__ */ t.jsx(Sr, { className: "size-full" })
2251
+ onClick: j,
2252
+ children: x ? /* @__PURE__ */ t.jsx(Gr, { className: "size-full" }) : /* @__PURE__ */ t.jsx(Ur, { className: "size-full" })
2129
2253
  }
2130
2254
  )
2131
2255
  ] })
@@ -2135,55 +2259,55 @@ const Vr = ({ currentIndex: e, maxIndex: r }) => /* @__PURE__ */ t.jsxs("div", {
2135
2259
  /* @__PURE__ */ t.jsx(
2136
2260
  "div",
2137
2261
  {
2138
- className: R(
2262
+ className: H(
2139
2263
  V,
2140
2264
  "inset-0 flex justify-end overflow-hidden bg-foreground/60 transition-opacity duration-details",
2141
- h ? "opacity-100" : "pointer-events-none opacity-0"
2265
+ g ? "opacity-100" : "pointer-events-none opacity-0"
2142
2266
  ),
2143
- onClick: I,
2267
+ onClick: S,
2144
2268
  children: /* @__PURE__ */ t.jsx(
2145
2269
  "div",
2146
2270
  {
2147
- className: R(
2271
+ className: H(
2148
2272
  "h-full w-3/5 bg-background transition-transform duration-details",
2149
- h ? "translate-x-0" : "translate-x-full"
2273
+ g ? "translate-x-0" : "translate-x-full"
2150
2274
  ),
2151
- children: !!T && /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
2275
+ children: !!k && /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
2152
2276
  /* @__PURE__ */ t.jsx(
2153
- me,
2277
+ he,
2154
2278
  {
2155
2279
  className: "w-full bg-foreground/65",
2156
- style: s,
2157
- src: T.src,
2280
+ style: o,
2281
+ src: k.src,
2158
2282
  imgInPlayerWidthRatio: 0.6
2159
2283
  }
2160
2284
  ),
2161
2285
  /* @__PURE__ */ t.jsxs(
2162
2286
  "div",
2163
2287
  {
2164
- className: R(
2288
+ className: H(
2165
2289
  "space-y-1 px-2 py-1 small:p-3",
2166
- L && "large:p-4"
2290
+ x && "large:p-4"
2167
2291
  ),
2168
2292
  children: [
2169
- T.title && /* @__PURE__ */ t.jsx(
2293
+ k.title && /* @__PURE__ */ t.jsx(
2170
2294
  "span",
2171
2295
  {
2172
- className: R(
2296
+ className: H(
2173
2297
  "text-sm font-semibold small:text-base small:font-bold",
2174
- L && "large:text-lg"
2298
+ x && "large:text-lg"
2175
2299
  ),
2176
- children: T.title
2300
+ children: k.title
2177
2301
  }
2178
2302
  ),
2179
- T.text && /* @__PURE__ */ t.jsx(
2303
+ k.text && /* @__PURE__ */ t.jsx(
2180
2304
  "p",
2181
2305
  {
2182
- className: R(
2306
+ className: H(
2183
2307
  "text-xs text-foreground/65 small:text-sm",
2184
- L && "large:text-base"
2308
+ x && "large:text-base"
2185
2309
  ),
2186
- children: T.text
2310
+ children: k.text
2187
2311
  }
2188
2312
  )
2189
2313
  ]
@@ -2194,415 +2318,433 @@ const Vr = ({ currentIndex: e, maxIndex: r }) => /* @__PURE__ */ t.jsxs("div", {
2194
2318
  )
2195
2319
  }
2196
2320
  ),
2197
- (v || h) && /* @__PURE__ */ t.jsx(
2198
- Ct,
2321
+ (E || g) && /* @__PURE__ */ t.jsx(
2322
+ zt,
2199
2323
  {
2200
- className: R(V, ue("top-right")),
2201
- onClick: E
2324
+ className: H(V, pe("top-right")),
2325
+ onClick: z
2202
2326
  }
2203
2327
  )
2204
2328
  ] });
2205
- }, $r = ({ className: e = "" }) => {
2206
- const { infiniteCarrousel: r, preloadRange: n, isFullScreen: o } = J(), { items: s, aspectRatioStyle: p } = re(), {
2207
- slidable: d,
2208
- carrouselItemIndex: a,
2209
- setCarrouselItemIndex: l,
2210
- itemIndexCommand: w,
2211
- setItemIndexCommand: m,
2212
- specialCommand: c,
2213
- isRunningSpecialCommand: f,
2214
- finishSpecialCommand: _,
2215
- extendMode: b,
2216
- extendTransition: y
2217
- } = q(), L = W(null), x = M((C) => {
2218
- if (!L.current)
2219
- throw new Error(`[${C ?? "sliderOrThrow"}] slider.current is null`);
2220
- return L.current;
2221
- }, []), T = W(!1), h = W(null), u = W(null), g = W(null), v = M(() => {
2222
- g.current && cancelAnimationFrame(g.current);
2223
- }, []), z = M(() => {
2224
- const C = x("computeClosestSnapIndex"), i = Array.from(C.children), k = C.scrollLeft, N = i.reduce(
2225
- (O, A, Y) => {
2226
- const $ = A.offsetLeft;
2227
- return Math.abs($ - k) < Math.abs(i[O].offsetLeft - k) ? Y : O;
2329
+ }, en = ({ className: e = "" }) => {
2330
+ const { infiniteCarrousel: r, preloadRange: n, isFullScreen: o } = re(), { aspectRatioStyle: s } = oe(), {
2331
+ items: u,
2332
+ slidable: f,
2333
+ carrouselItemIndex: d,
2334
+ setCarrouselItemIndex: c,
2335
+ itemIndexCommand: v,
2336
+ setItemIndexCommand: l,
2337
+ specialCommand: m,
2338
+ isRunningSpecialCommand: w,
2339
+ finishSpecialCommand: C,
2340
+ extendMode: a,
2341
+ extendTransition: h
2342
+ } = J(), x = Z(null), j = I((y) => {
2343
+ if (!x.current)
2344
+ throw new Error(`[${y ?? "sliderOrThrow"}] slider.current is null`);
2345
+ return x.current;
2346
+ }, []), k = Z(!1), g = Z(null), p = Z(null), b = Z(null), E = I(() => {
2347
+ b.current && cancelAnimationFrame(b.current);
2348
+ }, []), L = I(() => {
2349
+ const y = j("computeClosestSnapIndex"), i = Array.from(y.children), _ = y.scrollLeft, M = i.reduce(
2350
+ (A, F, U) => {
2351
+ const W = F.offsetLeft;
2352
+ return Math.abs(W - _) < Math.abs(i[A].offsetLeft - _) ? U : A;
2228
2353
  },
2229
2354
  0
2230
2355
  );
2231
- return c === "first_to_last" ? Ge(N, s.length) : c === "last_to_first" ? Ge(N - 1, s.length) : N;
2232
- }, [c, x, s.length]), H = M(
2233
- (C) => {
2234
- const i = x("setStyleCursor");
2235
- i.style.cursor = C;
2356
+ return m === "first_to_last" ? rt(M, u.length) : m === "last_to_first" ? rt(M - 1, u.length) : M;
2357
+ }, [m, j, u.length]), D = I(
2358
+ (y) => {
2359
+ const i = j("setStyleCursor");
2360
+ i.style.cursor = y;
2236
2361
  },
2237
- [x]
2238
- ), S = M(
2239
- (C) => {
2240
- const i = x("setStyleSnapState");
2241
- C === "mandatory" ? i.style.scrollSnapType = "x mandatory" : i.style.scrollSnapType = "none";
2362
+ [j]
2363
+ ), T = I(
2364
+ (y) => {
2365
+ const i = j("setStyleSnapState");
2366
+ y === "mandatory" ? i.style.scrollSnapType = "x mandatory" : i.style.scrollSnapType = "none";
2242
2367
  },
2243
- [x]
2244
- ), j = M(
2245
- (C, i, k) => {
2246
- v();
2247
- const N = x("scrollToIndex"), O = Array.from(N.children), A = N.scrollLeft, Y = O[C].offsetLeft, $ = (pe) => {
2248
- N.scrollTo({
2249
- left: pe,
2368
+ [j]
2369
+ ), N = I(
2370
+ (y, i, _) => {
2371
+ E();
2372
+ const M = j("scrollToIndex"), A = Array.from(M.children), F = M.scrollLeft, U = A[y].offsetLeft, W = (ae) => {
2373
+ M.scrollTo({
2374
+ left: ae,
2250
2375
  behavior: "instant"
2251
2376
  });
2252
- }, K = () => {
2253
- $(Y), S("mandatory"), k?.();
2254
- }, G = Math.abs(A - Y);
2255
- if (G < 1 || i === "instant") {
2256
- K();
2377
+ }, Y = () => {
2378
+ W(U), T("mandatory"), _?.();
2379
+ }, q = Math.abs(F - U);
2380
+ if (q < 1 || i === "instant") {
2381
+ Y();
2257
2382
  return;
2258
2383
  }
2259
- const X = ae(G / 2.5, 300, 1e3), ne = (/* @__PURE__ */ new Date()).getTime();
2260
- S("none");
2261
- const ye = () => {
2262
- const pe = () => {
2263
- const je = (/* @__PURE__ */ new Date()).getTime() - ne;
2264
- if (je >= X) {
2265
- K();
2384
+ const ee = le(q / 2.5, 300, 1e3), fe = (/* @__PURE__ */ new Date()).getTime();
2385
+ T("none");
2386
+ const se = () => {
2387
+ const ae = () => {
2388
+ const je = (/* @__PURE__ */ new Date()).getTime() - fe;
2389
+ if (je >= ee) {
2390
+ Y();
2266
2391
  return;
2267
2392
  }
2268
- const ie = Math.min(je / X, 1), he = zt(ie), Me = Le(A, Y, he);
2269
- $(Me), ye();
2393
+ const Se = Math.min(je / ee, 1), Ve = At(Se), ce = Le(F, U, Ve);
2394
+ W(ce), se();
2270
2395
  };
2271
- g.current = requestAnimationFrame(pe);
2396
+ b.current = requestAnimationFrame(ae);
2272
2397
  };
2273
- ye();
2398
+ se();
2274
2399
  },
2275
- [v, x, S]
2276
- ), [E, I] = F(), V = !!E;
2277
- Z(() => {
2278
- const C = () => {
2279
- clearTimeout(E);
2400
+ [E, j, T]
2401
+ ), [z, S] = $(), V = !!z;
2402
+ O(() => {
2403
+ const y = () => {
2404
+ clearTimeout(z);
2280
2405
  const i = setTimeout(() => {
2281
- I(void 0);
2282
- }, gt);
2283
- I(i);
2406
+ S(void 0);
2407
+ }, Et);
2408
+ S(i);
2284
2409
  };
2285
- return addEventListener("resize", C), document.addEventListener("fullscreenchange", C), () => {
2286
- removeEventListener("resize", C), document.removeEventListener("fullscreenchange", C);
2410
+ return addEventListener("resize", y), document.addEventListener("fullscreenchange", y), () => {
2411
+ removeEventListener("resize", y), document.removeEventListener("fullscreenchange", y);
2287
2412
  };
2288
- }, [E]), Z(() => {
2289
- const C = z();
2290
- Number.isNaN(C) || C !== a && j(a, "instant");
2413
+ }, [z]), O(() => {
2414
+ const y = L();
2415
+ Number.isNaN(y) || y !== d && N(d, "instant");
2291
2416
  }, [
2292
- a,
2293
- j,
2294
- z,
2417
+ d,
2418
+ N,
2419
+ L,
2295
2420
  // - Run the effect when those values change
2296
- s,
2297
- E,
2421
+ u,
2422
+ z,
2298
2423
  o,
2299
- b,
2300
- y
2301
- ]), Z(() => {
2302
- if (!d || f) {
2303
- H("auto");
2424
+ a,
2425
+ h
2426
+ ]), O(() => {
2427
+ if (!f || w) {
2428
+ D("auto");
2304
2429
  return;
2305
2430
  }
2306
- const C = L.current;
2307
- if (!C)
2431
+ const y = x.current;
2432
+ if (!y)
2308
2433
  return;
2309
- H("grab"), S("mandatory");
2310
- const i = (O) => {
2311
- O.button === 0 && (O.preventDefault(), O.stopPropagation(), v(), T.current = !0, h.current = O.pageX - C.offsetLeft, u.current = C.scrollLeft, H("grabbing"));
2312
- }, k = (O) => {
2313
- if (!T.current)
2434
+ D("grab"), T("mandatory");
2435
+ const i = (A) => {
2436
+ A.button === 0 && (A.preventDefault(), A.stopPropagation(), E(), k.current = !0, g.current = A.pageX - y.offsetLeft, p.current = y.scrollLeft, D("grabbing"));
2437
+ }, _ = (A) => {
2438
+ if (!k.current)
2314
2439
  return;
2315
- if (h.current === null)
2440
+ if (g.current === null)
2316
2441
  throw new Error("[onMouseMove] startX is null");
2317
- S("none");
2318
- const A = O.pageX - C.offsetLeft - h.current;
2442
+ T("none");
2443
+ const F = A.pageX - y.offsetLeft - g.current;
2319
2444
  requestAnimationFrame(() => {
2320
- if (u.current === null)
2445
+ if (p.current === null)
2321
2446
  throw new Error("[onMouseMove] scrollLeft is null");
2322
- C.scrollLeft = u.current - A;
2447
+ y.scrollLeft = p.current - F;
2323
2448
  });
2324
- }, N = () => {
2325
- if (!T.current)
2449
+ }, M = () => {
2450
+ if (!k.current)
2326
2451
  return;
2327
- T.current = !1, H("grab");
2328
- const O = z();
2329
- j(O, "smooth");
2452
+ k.current = !1, D("grab");
2453
+ const A = L();
2454
+ N(A, "smooth");
2330
2455
  };
2331
- return C.addEventListener("mousedown", i), document.addEventListener("mousemove", k), document.addEventListener("mouseleave", N), document.addEventListener("mouseup", N), document.addEventListener("contextmenu", N), () => {
2332
- C.removeEventListener("mousedown", i), document.removeEventListener("mousemove", k), document.removeEventListener("mouseleave", N), document.removeEventListener("mouseup", N), document.removeEventListener("contextmenu", N);
2456
+ return y.addEventListener("mousedown", i), document.addEventListener("mousemove", _), document.addEventListener("mouseleave", M), document.addEventListener("mouseup", M), document.addEventListener("contextmenu", M), () => {
2457
+ y.removeEventListener("mousedown", i), document.removeEventListener("mousemove", _), document.removeEventListener("mouseleave", M), document.removeEventListener("mouseup", M), document.removeEventListener("contextmenu", M);
2333
2458
  };
2334
2459
  }, [
2335
- v,
2336
- z,
2337
- f,
2338
- j,
2339
- H,
2340
- S,
2341
- d
2342
- ]), Z(() => {
2343
- if (y || V)
2460
+ E,
2461
+ L,
2462
+ w,
2463
+ N,
2464
+ D,
2465
+ T,
2466
+ f
2467
+ ]), O(() => {
2468
+ if (h || V)
2344
2469
  return;
2345
- const C = L.current;
2346
- if (!C)
2470
+ const y = x.current;
2471
+ if (!y)
2347
2472
  return;
2348
2473
  const i = () => {
2349
- const k = z();
2350
- Number.isNaN(k) || (l(k), k === w && m(null));
2474
+ const _ = L();
2475
+ Number.isNaN(_) || (c(_), _ === v && l(null));
2351
2476
  };
2352
- return C.addEventListener("scroll", i), () => {
2353
- C.removeEventListener("scroll", i);
2477
+ return y.addEventListener("scroll", i), () => {
2478
+ y.removeEventListener("scroll", i);
2354
2479
  };
2355
2480
  }, [
2356
- z,
2357
- y,
2358
- f,
2359
- V,
2481
+ L,
2482
+ h,
2360
2483
  w,
2361
- s.length,
2362
- l,
2363
- m
2364
- ]), Z(() => {
2365
- if (w === null)
2484
+ V,
2485
+ v,
2486
+ u.length,
2487
+ c,
2488
+ l
2489
+ ]), O(() => {
2490
+ if (v === null)
2366
2491
  return;
2367
- const C = () => _();
2368
- switch (c) {
2492
+ const y = () => C();
2493
+ switch (m) {
2369
2494
  case "first_to_last":
2370
- j(s.length, "instant"), j(s.length - 1, "smooth", C);
2495
+ N(u.length, "instant"), N(u.length - 1, "smooth", y);
2371
2496
  break;
2372
2497
  case "last_to_first":
2373
- j(0, "instant"), j(1, "smooth", C);
2498
+ N(0, "instant"), N(1, "smooth", y);
2374
2499
  break;
2375
2500
  case "instant":
2376
- j(w, "instant", C);
2501
+ N(v, "instant", y);
2377
2502
  break;
2378
2503
  default:
2379
- j(w, "smooth");
2504
+ N(v, "smooth");
2380
2505
  break;
2381
2506
  }
2382
2507
  }, [
2383
- c,
2384
- _,
2385
- w,
2386
- s.length,
2387
- j
2508
+ m,
2509
+ C,
2510
+ v,
2511
+ u.length,
2512
+ N
2388
2513
  ]);
2389
- const P = () => /* @__PURE__ */ t.jsx("div", { className: "h-full", style: p });
2514
+ const R = () => /* @__PURE__ */ t.jsx("div", { className: "h-full", style: s });
2390
2515
  return /* @__PURE__ */ t.jsxs(
2391
2516
  "div",
2392
2517
  {
2393
- className: R(
2518
+ className: H(
2394
2519
  "relative overflow-hidden rounded-carrousel transition-radius",
2395
2520
  e
2396
2521
  ),
2397
- style: p,
2522
+ style: s,
2398
2523
  children: [
2399
2524
  /* @__PURE__ */ t.jsxs(
2400
2525
  "div",
2401
2526
  {
2402
- ref: L,
2403
- className: `flex size-full ${d ? "overflow-x-auto no-scrollbar *:snap-start *:snap-always" : "justify-center"}`,
2527
+ ref: x,
2528
+ className: `flex size-full ${f ? "overflow-x-auto no-scrollbar *:snap-start *:snap-always" : "justify-center"}`,
2404
2529
  children: [
2405
- c === "last_to_first" && /* @__PURE__ */ t.jsx(P, {}),
2406
- s.map((C, i) => {
2407
- const k = C.type === "360" ? C.images[0] : C.src, N = i === a, O = i === 0, A = i === s.length - 1, Y = (() => {
2408
- if (c === "first_to_last" && O)
2530
+ m === "last_to_first" && /* @__PURE__ */ t.jsx(R, {}),
2531
+ u.map((y, i) => {
2532
+ const _ = i === d, M = i === 0, A = i === u.length - 1, F = (() => {
2533
+ if (m === "first_to_last" && M)
2409
2534
  return {
2410
- transform: `translateX(${100 * s.length}%)`
2535
+ transform: `translateX(${100 * u.length}%)`
2411
2536
  };
2412
- if (c === "last_to_first" && A)
2537
+ if (m === "last_to_first" && A)
2413
2538
  return {
2414
- transform: `translateX(-${100 * s.length}%)`
2539
+ transform: `translateX(-${100 * u.length}%)`
2415
2540
  };
2416
2541
  })();
2417
- let $ = Math.abs(i - a) <= n;
2418
- return $ ||= i === w, r && ($ ||= a < n && s.length - i <= n - a, $ ||= a >= s.length - n && i <= n - (s.length - a)), /* @__PURE__ */ t.jsx(
2542
+ let U = Math.abs(i - d) <= n;
2543
+ U ||= i === v, r && (U ||= d < n && u.length - i <= n - d, U ||= d >= u.length - n && i <= n - (u.length - d));
2544
+ const W = (() => {
2545
+ let Y;
2546
+ switch (y.type) {
2547
+ case "360":
2548
+ Y = y.images[0].src;
2549
+ break;
2550
+ case "image":
2551
+ Y = y.src;
2552
+ break;
2553
+ case "video":
2554
+ Y = y.poster ?? "video";
2555
+ break;
2556
+ case "custom":
2557
+ Y = "custom";
2558
+ break;
2559
+ }
2560
+ return `${i}_${Y}`;
2561
+ })();
2562
+ return /* @__PURE__ */ t.jsx(
2419
2563
  "div",
2420
2564
  {
2421
- className: R(
2565
+ className: H(
2422
2566
  "h-full bg-foreground/35",
2423
- a === i && "z-1"
2567
+ d === i && "z-1"
2424
2568
  // Give high-ground to the shown item (to avoid 1px vertical line)
2425
2569
  ),
2426
- style: { ...p, ...Y },
2427
- children: $ && /* @__PURE__ */ t.jsx(Ir, { index: i, item: C, isShown: N })
2570
+ style: { ...s, ...F },
2571
+ children: U && /* @__PURE__ */ t.jsx(Dr, { index: i, item: y, isShown: _ })
2428
2572
  },
2429
- `${i}_${k}`
2573
+ W
2430
2574
  );
2431
2575
  }),
2432
- c === "first_to_last" && /* @__PURE__ */ t.jsx(P, {})
2576
+ m === "first_to_last" && /* @__PURE__ */ t.jsx(R, {})
2433
2577
  ]
2434
2578
  }
2435
2579
  ),
2436
- /* @__PURE__ */ t.jsx(Wr, {})
2580
+ /* @__PURE__ */ t.jsx(Qr, {})
2437
2581
  ]
2438
2582
  }
2439
2583
  );
2440
- }, Yr = () => {
2441
- const { permanentGallery: e } = J(), { aspectRatioStyle: r } = re(), {
2584
+ }, tn = () => {
2585
+ const { permanentGallery: e } = re(), { aspectRatioStyle: r } = oe(), {
2442
2586
  prevItem: n,
2443
2587
  nextItem: o,
2444
2588
  isShowingDetails: s,
2445
- resetShownDetails: p,
2446
- extendMode: d,
2447
- disableExtendMode: a,
2448
- isZooming: l,
2449
- resetZoom: w,
2450
- fakeFullScreen: m
2451
- } = q(), c = W(null), f = W(null), _ = W(null);
2452
- return Z(() => {
2453
- if (!d)
2589
+ resetShownDetails: u,
2590
+ extendMode: f,
2591
+ disableExtendMode: d,
2592
+ isZooming: c,
2593
+ resetZoom: v,
2594
+ fakeFullScreen: l
2595
+ } = J(), m = Z(null), w = Z(null), C = Z(null);
2596
+ return O(() => {
2597
+ if (!f)
2454
2598
  return;
2455
- const b = c.current, y = f.current, L = _.current;
2456
- if (!b || !y || !L)
2599
+ const a = m.current, h = w.current, x = C.current;
2600
+ if (!a || !h || !x)
2457
2601
  return;
2458
- let x = !1;
2459
- const T = (g) => [b, y, L].includes(g.target), h = (g) => {
2460
- x = T(g);
2461
- }, u = (g) => {
2462
- x && (T(g) && a(), x = !1);
2602
+ let j = !1;
2603
+ const k = (b) => [a, h, x].includes(b.target), g = (b) => {
2604
+ j = k(b);
2605
+ }, p = (b) => {
2606
+ j && (k(b) && d(), j = !1);
2463
2607
  };
2464
- return b.addEventListener("mousedown", h), b.addEventListener("mouseup", u), () => {
2465
- b.removeEventListener("mousedown", h), b.removeEventListener("mouseup", u);
2608
+ return a.addEventListener("mousedown", g), a.addEventListener("mouseup", p), () => {
2609
+ a.removeEventListener("mousedown", g), a.removeEventListener("mouseup", p);
2466
2610
  };
2467
- }, [a, d]), Z(() => {
2468
- const b = (y) => {
2469
- y.key === "Escape" && (l ? w() : s ? p() : a());
2611
+ }, [d, f]), O(() => {
2612
+ const a = (h) => {
2613
+ h.key === "Escape" && (c ? v() : s ? u() : d());
2470
2614
  };
2471
- return addEventListener("keydown", b), () => {
2472
- removeEventListener("keydown", b);
2615
+ return addEventListener("keydown", a), () => {
2616
+ removeEventListener("keydown", a);
2473
2617
  };
2474
2618
  }, [
2475
- a,
2619
+ d,
2476
2620
  s,
2477
- l,
2621
+ c,
2478
2622
  o,
2479
2623
  n,
2480
- p,
2481
- w
2624
+ u,
2625
+ v
2482
2626
  ]), /* @__PURE__ */ t.jsxs(
2483
2627
  "div",
2484
2628
  {
2485
- ref: c,
2486
- className: R(
2487
- m ? "fixed inset-0 z-overlay" : "relative",
2488
- d && "flex size-full items-center justify-center bg-foreground/75"
2629
+ ref: m,
2630
+ className: H(
2631
+ l ? "fixed inset-0 z-overlay" : "relative",
2632
+ f && "flex size-full items-center justify-center bg-foreground/75"
2489
2633
  ),
2490
2634
  children: [
2491
2635
  /* @__PURE__ */ t.jsxs(
2492
2636
  "div",
2493
2637
  {
2494
- ref: f,
2495
- className: d ? "flex size-full flex-col justify-center gap-y-2 small:gap-y-4" : "space-y-2",
2638
+ ref: w,
2639
+ className: f ? "flex size-full flex-col justify-center gap-y-2 small:gap-y-4" : "space-y-2",
2496
2640
  children: [
2497
2641
  /* @__PURE__ */ t.jsx(
2498
2642
  "div",
2499
2643
  {
2500
- ref: _,
2501
- className: R(
2502
- d && "mx-auto flex min-h-0 w-full max-w-[1600px] justify-center"
2644
+ ref: C,
2645
+ className: H(
2646
+ f && "mx-auto flex min-h-0 w-full max-w-[1600px] justify-center"
2503
2647
  ),
2504
2648
  style: r,
2505
- children: /* @__PURE__ */ t.jsx($r, { className: R(d && "h-full min-w-0") })
2649
+ children: /* @__PURE__ */ t.jsx(en, { className: H(f && "h-full min-w-0") })
2506
2650
  }
2507
2651
  ),
2508
- e && /* @__PURE__ */ t.jsx(_t, { className: R(d && "my-2 shrink-0 small:my-4") })
2652
+ e && /* @__PURE__ */ t.jsx(Rt, { className: H(f && "my-2 shrink-0 small:my-4") })
2509
2653
  ]
2510
2654
  }
2511
2655
  ),
2512
- d && /* @__PURE__ */ t.jsx(
2513
- Ct,
2656
+ f && /* @__PURE__ */ t.jsx(
2657
+ zt,
2514
2658
  {
2515
2659
  className: "absolute right-2 top-2 small:right-4 small:top-4",
2516
- onClick: a
2660
+ onClick: d
2517
2661
  }
2518
2662
  )
2519
2663
  ]
2520
2664
  }
2521
2665
  );
2522
- }, Ur = ({
2523
- compositionUrl: e
2524
- }) => {
2525
- const { emitEvent: r } = J(), {
2666
+ }, rn = () => {
2667
+ const { emitEvent: e, compositionUrl: r } = re(), {
2526
2668
  data: n,
2527
2669
  status: o,
2528
2670
  isSuccess: s,
2529
- error: p
2530
- } = Kt(e);
2531
- return Z(() => {
2532
- p ? r(ot, p) : o === "fetching" ? r(rt, e) : s && r(nt, n);
2533
- }, [n, e, r, p, s, o]), p ? /* @__PURE__ */ t.jsx(
2534
- kt,
2671
+ error: u
2672
+ } = ar(r);
2673
+ return O(() => {
2674
+ u ? e(mt, u) : o === "fetching" ? e(dt, r) : s && e(ut, n);
2675
+ }, [n, r, e, u, s, o]), u ? /* @__PURE__ */ t.jsx(
2676
+ It,
2535
2677
  {
2536
2678
  className: "aspect-square text-foreground/70",
2537
2679
  text: "Player could not be loaded"
2538
2680
  }
2539
- ) : s ? /* @__PURE__ */ t.jsx(Jt, { composition: n, children: /* @__PURE__ */ t.jsx(er, { children: /* @__PURE__ */ t.jsx(Yr, {}) }) }) : /* @__PURE__ */ t.jsxs("div", { className: "flex aspect-square size-full flex-col items-center justify-center gap-y-4", children: [
2681
+ ) : s ? /* @__PURE__ */ t.jsx(lr, { composition: n, children: /* @__PURE__ */ t.jsx(dr, { children: /* @__PURE__ */ t.jsx(tn, {}) }) }) : /* @__PURE__ */ t.jsxs("div", { className: "flex aspect-square size-full flex-col items-center justify-center gap-y-4", children: [
2540
2682
  /* @__PURE__ */ t.jsx("div", { className: "animate-pulse text-xl", children: "Loading Player" }),
2541
- /* @__PURE__ */ t.jsx(Et, { color: "foreground" })
2683
+ /* @__PURE__ */ t.jsx(St, { color: "foreground" })
2542
2684
  ] });
2543
- }, Xr = ({
2685
+ }, nn = ({
2544
2686
  compositionUrl: e,
2545
- hideCategories: r = At,
2546
- infiniteCarrousel: n = Ft,
2547
- permanentGallery: o = Wt,
2548
- mediaLoadStrategy: s = $t,
2549
- preloadRange: p = Yt,
2550
- preventFullScreen: d = Ut,
2551
- eventPrefix: a = mt,
2552
- reverse360: l = Xt,
2553
- children: w,
2687
+ hideCategories: r = Bt,
2688
+ infiniteCarrousel: n = Gt,
2689
+ permanentGallery: o = Kt,
2690
+ mediaLoadStrategy: s = qt,
2691
+ minMediaWidth: u = Jt,
2692
+ maxMediaWidth: f = Qt,
2693
+ preloadRange: d = er,
2694
+ preventFullScreen: c = tr,
2695
+ eventPrefix: v = bt,
2696
+ reverse360: l = rr,
2697
+ children: m
2554
2698
  // NOTE: use to customize the player, not to display the content
2555
- ...m
2556
- // Contains the rest of the props (minMediaWidth / maxMediaWidth)
2557
2699
  }) => {
2558
- const c = W(null), [f, _] = F(0.5), [b, y] = F(!1), L = M(
2559
- (h, u) => {
2560
- const g = a + h, v = new CustomEvent(g, { detail: u });
2561
- document.dispatchEvent(v);
2700
+ const w = Z(null), [C, a] = $(0.5), [h, x] = $(!1), j = I(
2701
+ (p, b) => {
2702
+ const E = v + p, L = new CustomEvent(E, { detail: b });
2703
+ document.dispatchEvent(L);
2562
2704
  },
2563
- [a]
2705
+ [v]
2564
2706
  );
2565
- Z(() => {
2566
- if (b) {
2567
- _(1);
2707
+ O(() => {
2708
+ if (h) {
2709
+ a(1);
2568
2710
  return;
2569
2711
  }
2570
- if (!c.current)
2712
+ if (!w.current)
2571
2713
  return;
2572
- const h = c.current, u = () => {
2573
- const g = window.innerWidth, v = h.clientWidth;
2574
- _(v / g);
2714
+ const p = w.current, b = () => {
2715
+ const E = window.innerWidth, L = p.clientWidth;
2716
+ a(L / E);
2575
2717
  };
2576
- return u(), addEventListener("resize", u), () => {
2577
- removeEventListener("resize", u);
2718
+ return b(), addEventListener("resize", b), () => {
2719
+ removeEventListener("resize", b);
2578
2720
  };
2579
- }, [b]), Z(() => {
2580
- if (d)
2721
+ }, [h]), O(() => {
2722
+ if (c)
2581
2723
  return;
2582
- const h = c.current;
2583
- if (!h)
2724
+ const p = w.current;
2725
+ if (!p)
2584
2726
  throw new Error("Wrapper not found");
2585
- const u = () => {
2586
- const { fullscreenElement: g } = document;
2587
- y(
2588
- g === h || // NOTE: For custom element, the web browser is making the whole custom element full-screen and not only the wrapper
2589
- g?.localName === Ze
2727
+ const b = () => {
2728
+ const { fullscreenElement: E } = document;
2729
+ x(
2730
+ E === p || // NOTE: For custom element, the web browser is making the whole custom element full-screen and not only the wrapper
2731
+ E?.localName === Ie
2590
2732
  );
2591
2733
  };
2592
- return document.addEventListener("fullscreenchange", u), () => {
2593
- document.removeEventListener("fullscreenchange", u);
2734
+ return document.addEventListener("fullscreenchange", b), () => {
2735
+ document.removeEventListener("fullscreenchange", b);
2594
2736
  };
2595
- }, [d]);
2596
- const x = M(async () => {
2597
- const h = c.current;
2598
- if (!h)
2737
+ }, [c]);
2738
+ const k = I(async () => {
2739
+ const p = w.current;
2740
+ if (!p)
2599
2741
  throw new Error("Wrapper not found");
2600
2742
  try {
2601
- return await h.requestFullscreen(), !0;
2743
+ return await p.requestFullscreen(), !0;
2602
2744
  } catch {
2603
2745
  return !1;
2604
2746
  }
2605
- }, []), T = M(async () => {
2747
+ }, []), g = I(async () => {
2606
2748
  try {
2607
2749
  return await document.exitFullscreen(), !0;
2608
2750
  } catch {
@@ -2610,48 +2752,63 @@ const Vr = ({ currentIndex: e, maxIndex: r }) => /* @__PURE__ */ t.jsxs("div", {
2610
2752
  }
2611
2753
  }, []);
2612
2754
  return /* @__PURE__ */ t.jsx(
2613
- Qt,
2755
+ ir,
2614
2756
  {
2615
- ...m,
2757
+ compositionUrl: e,
2616
2758
  hideCategories: r,
2617
2759
  infiniteCarrousel: n,
2618
2760
  permanentGallery: o,
2619
2761
  mediaLoadStrategy: s,
2620
- preloadRange: p,
2621
- preventFullScreen: d,
2762
+ minMediaWidth: u,
2763
+ maxMediaWidth: f,
2764
+ preloadRange: d,
2765
+ preventFullScreen: c,
2622
2766
  reverse360: l,
2623
- emitEvent: L,
2624
- playerInViewportWidthRatio: f,
2625
- isFullScreen: b,
2626
- requestFullscreen: x,
2627
- exitFullscreen: T,
2628
- children: /* @__PURE__ */ t.jsxs(lr, { children: [
2767
+ emitEvent: j,
2768
+ playerInViewportWidthRatio: C,
2769
+ isFullScreen: h,
2770
+ requestFullscreen: k,
2771
+ exitFullscreen: g,
2772
+ children: /* @__PURE__ */ t.jsxs(cr, { children: [
2629
2773
  /* @__PURE__ */ t.jsx(
2630
2774
  "div",
2631
2775
  {
2632
2776
  id: "cc-webplayer-wrapper",
2633
- ref: c,
2777
+ ref: w,
2634
2778
  className: "select-none text-foreground",
2635
- children: /* @__PURE__ */ t.jsx(Ur, { compositionUrl: e })
2779
+ children: /* @__PURE__ */ t.jsx(rn, {})
2636
2780
  }
2637
2781
  ),
2638
- w
2782
+ m
2639
2783
  ] })
2640
2784
  }
2641
2785
  );
2642
- }, Gr = ({ name: e, color: r, children: n }) => {
2643
- const { setIconConfig: o, resetIconConfig: s } = Fe();
2644
- return Z(() => {
2645
- if (!(!n && !r))
2646
- return o(e, {
2647
- Icon: n,
2648
- color: r
2786
+ }, on = ({ children: e, index: r, thumbnailSrc: n }) => {
2787
+ const { registerCustomMedia: o, unregisterCustomMedia: s } = ye();
2788
+ return O(() => {
2789
+ if (!e)
2790
+ return;
2791
+ const u = o({
2792
+ Media: e,
2793
+ index: r,
2794
+ thumbnailSrc: n
2795
+ });
2796
+ return () => {
2797
+ s(u);
2798
+ };
2799
+ }, [e, s, r, o, n]), null;
2800
+ }, sn = (e) => Xe() ? /* @__PURE__ */ t.jsx(on, { ...e }) : /* @__PURE__ */ t.jsx("slot", {}), an = ({ name: e, children: r }) => {
2801
+ const { registerIconConfig: n, unregisterIconConfig: o } = ye();
2802
+ return O(() => {
2803
+ if (r)
2804
+ return n(e, {
2805
+ Icon: r
2649
2806
  }), () => {
2650
- s(e);
2807
+ o(e);
2651
2808
  };
2652
- }, [n, r, e, s, o]), null;
2653
- }, Br = (e) => jt() ? /* @__PURE__ */ t.jsx(Gr, { ...e }) : /* @__PURE__ */ t.jsx("slot", {}), qr = '*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:currentColor}:before,:after{--tw-content: ""}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]{display:none}#cc-webplayer-wrapper{--background: var(--cc-webplayer-background, 0 0% 100%);--foreground: var(--cc-webplayer-foreground, 240 10% 3.9%);--primary: var(--cc-webplayer-primary, 216 100% 52%);--primary-foreground: var( --cc-webplayer-primary-foreground, var(--background) );--primary-light: var(--cc-webplayer-primary-light, var(--primary));--neutral: var(--cc-webplayer-neutral, 0 0% 39%);--neutral-foreground: var( --cc-webplayer-neutral-foreground, var(--foreground) );--radius-ui: var(--cc-webplayer-radius-ui, 1rem);--radius-carrousel: var(--cc-webplayer-radius-carrousel, 0);--radius-gallery: var(--cc-webplayer-radius-gallery, 0)}*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }.\\!container{width:100%!important}.container{width:100%}@media (min-width: 1280px){.\\!container{max-width:1280px!important}.container{max-width:1280px}}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}.\\!pointer-events-none{pointer-events:none!important}.pointer-events-none{pointer-events:none}.pointer-events-auto{pointer-events:auto}.invisible{visibility:hidden}.fixed{position:fixed}.\\!absolute{position:absolute!important}.absolute{position:absolute}.relative{position:relative}.sticky{position:sticky}.inset-0{inset:0}.inset-x-0{left:0;right:0}.inset-x-1{left:.25rem;right:.25rem}.inset-y-1{top:.25rem;bottom:.25rem}.-bottom-1{bottom:-.25rem}.-left-1{left:-.25rem}.-right-1{right:-.25rem}.-top-1{top:-.25rem}.bottom-0{bottom:0}.bottom-1{bottom:.25rem}.left-0{left:0}.left-1{left:.25rem}.left-1\\/2{left:50%}.right-1{right:.25rem}.right-2{right:.5rem}.top-0{top:0}.top-1{top:.25rem}.top-1\\/2{top:50%}.top-2{top:.5rem}.-z-10{z-index:-10}.-z-20{z-index:-20}.z-1{z-index:1}.z-hotspot{z-index:10}.z-overlay{z-index:30}.z-zoomed-image{z-index:20}.col-start-3{grid-column-start:3}.mx-1{margin-left:.25rem;margin-right:.25rem}.mx-auto{margin-left:auto;margin-right:auto}.my-2{margin-top:.5rem;margin-bottom:.5rem}.-ml-px{margin-left:-1px}.-mt-px{margin-top:-1px}.inline-block{display:inline-block}.flex{display:flex}.grid{display:grid}.hidden{display:none}.aspect-square{aspect-ratio:1 / 1}.size-1{width:.25rem;height:.25rem}.size-12{width:3rem;height:3rem}.size-20{width:5rem;height:5rem}.size-4{width:1rem;height:1rem}.size-5{width:1.25rem;height:1.25rem}.size-8{width:2rem;height:2rem}.size-full{width:100%;height:100%}.h-1{height:.25rem}.h-10{height:2.5rem}.h-20{height:5rem}.h-3\\/4{height:75%}.h-5{height:1.25rem}.h-8{height:2rem}.h-full{height:100%}.h-px{height:1px}.min-h-0{min-height:0px}.w-12{width:3rem}.w-3\\/5{width:60%}.w-8{width:2rem}.w-\\[calc\\(100\\%\\+1024px\\)\\]{width:calc(100% + 1024px)}.w-\\[calc\\(100\\%\\+2px\\)\\]{width:calc(100% + 2px)}.w-fit{width:-moz-fit-content;width:fit-content}.w-full{width:100%}.w-max{width:-moz-max-content;width:max-content}.w-px{width:1px}.min-w-0{min-width:0px}.max-w-40{max-width:10rem}.max-w-\\[1600px\\]{max-width:1600px}.shrink-0{flex-shrink:0}.origin-top-left{transform-origin:top left}.-translate-x-1\\.5{--tw-translate-x: -.375rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-translate-x-1\\/2{--tw-translate-x: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-translate-y-1\\/2{--tw-translate-y: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-x-0{--tw-translate-x: 0px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-x-1\\.5{--tw-translate-x: .375rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-x-full{--tw-translate-x: 100%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.rotate-180{--tw-rotate: 180deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.scale-100{--tw-scale-x: 1;--tw-scale-y: 1;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.scale-105{--tw-scale-x: 1.05;--tw-scale-y: 1.05;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes hotspot-ping{0%{transform:scale(0)}25%{opacity:1}75%,to{transform:scale(1.5);opacity:0}}.animate-hotspot-ping{animation:hotspot-ping 3s cubic-bezier(0,0,.2,1) infinite}@keyframes pulse{50%{opacity:1}0%,to{opacity:0}}.animate-pulse{animation:pulse 2s cubic-bezier(.4,0,.6,1) infinite}@keyframes rotation{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.animate-rotation{animation:rotation 1s linear infinite}.cursor-auto{cursor:auto}.cursor-ew-resize{cursor:ew-resize}.cursor-grab{cursor:grab}.cursor-grabbing{cursor:grabbing}.cursor-help{cursor:help}.cursor-move{cursor:move}.cursor-pointer{cursor:pointer}.resize{resize:both}.grid-cols-\\[auto\\,1fr\\,auto\\]{grid-template-columns:auto 1fr auto}.flex-col{flex-direction:column}.items-end{align-items:flex-end}.items-center{align-items:center}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-1{gap:.25rem}.gap-x-1{-moz-column-gap:.25rem;column-gap:.25rem}.gap-x-2{-moz-column-gap:.5rem;column-gap:.5rem}.gap-x-4{-moz-column-gap:1rem;column-gap:1rem}.gap-y-1{row-gap:.25rem}.gap-y-2{row-gap:.5rem}.gap-y-4{row-gap:1rem}.space-x-0\\.5>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.125rem * var(--tw-space-x-reverse));margin-left:calc(.125rem * calc(1 - var(--tw-space-x-reverse)))}.space-y-0\\.5>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.125rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.125rem * var(--tw-space-y-reverse))}.space-y-1>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.25rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.25rem * var(--tw-space-y-reverse))}.space-y-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.5rem * var(--tw-space-y-reverse))}.overflow-hidden{overflow:hidden}.overflow-x-auto{overflow-x:auto}.overflow-x-scroll{overflow-x:scroll}.text-pretty{text-wrap:pretty}.rounded-carrousel{border-radius:var(--radius-carrousel)}.rounded-full{border-radius:9999px}.rounded-gallery{border-radius:var(--radius-gallery)}.rounded-ui{border-radius:var(--radius-ui)}.rounded-ui-md{border-radius:calc(var(--radius-ui) + .125rem)}.rounded-ui-sm{border-radius:calc(var(--radius-ui) - .125rem)}.rounded-b-none{border-bottom-right-radius:0;border-bottom-left-radius:0}.rounded-t-none{border-top-left-radius:0;border-top-right-radius:0}.border{border-width:1px}.border-2{border-width:2px}.border-4{border-width:4px}.border-background{border-color:hsl(var(--background))}.border-foreground{border-color:hsl(var(--foreground))}.border-primary{border-color:hsl(var(--primary))}.border-b-transparent{border-bottom-color:transparent}.bg-background{background-color:hsl(var(--background))}.bg-background\\/25{background-color:hsl(var(--background) / .25)}.bg-background\\/50{background-color:hsl(var(--background) / .5)}.bg-background\\/60{background-color:hsl(var(--background) / .6)}.bg-foreground\\/25{background-color:hsl(var(--foreground) / .25)}.bg-foreground\\/30{background-color:hsl(var(--foreground) / .3)}.bg-foreground\\/35{background-color:hsl(var(--foreground) / .35)}.bg-foreground\\/40{background-color:hsl(var(--foreground) / .4)}.bg-foreground\\/50{background-color:hsl(var(--foreground) / .5)}.bg-foreground\\/60{background-color:hsl(var(--foreground) / .6)}.bg-foreground\\/65{background-color:hsl(var(--foreground) / .65)}.bg-foreground\\/75{background-color:hsl(var(--foreground) / .75)}.bg-neutral\\/50{background-color:hsl(var(--neutral) / .5)}.bg-primary{background-color:hsl(var(--primary))}.bg-primary-foreground{background-color:hsl(var(--primary-foreground))}.bg-primary\\/50{background-color:hsl(var(--primary) / .5)}.bg-transparent{background-color:transparent}.bg-gradient-to-t{background-image:linear-gradient(to top,var(--tw-gradient-stops))}.from-foreground{--tw-gradient-from: hsl(var(--foreground)) var(--tw-gradient-from-position);--tw-gradient-to: hsl(var(--foreground) / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.to-transparent{--tw-gradient-to: transparent var(--tw-gradient-to-position)}.object-cover{-o-object-fit:cover;object-fit:cover}.p-0\\.5{padding:.125rem}.p-1{padding:.25rem}.p-2{padding:.5rem}.p-4{padding:1rem}.px-1\\.5{padding-left:.375rem;padding-right:.375rem}.px-2{padding-left:.5rem;padding-right:.5rem}.py-0\\.5{padding-top:.125rem;padding-bottom:.125rem}.py-1{padding-top:.25rem;padding-bottom:.25rem}.pl-6{padding-left:1.5rem}.pr-12{padding-right:3rem}.pr-4{padding-right:1rem}.pt-8{padding-top:2rem}.text-2xl{font-size:1.5rem;line-height:2rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xl{font-size:1.25rem;line-height:1.75rem}.text-xs{font-size:.75rem;line-height:1rem}.font-bold{font-weight:700}.font-semibold{font-weight:600}.text-background{color:hsl(var(--background))}.text-background\\/75{color:hsl(var(--background) / .75)}.text-foreground{color:hsl(var(--foreground))}.text-foreground\\/65{color:hsl(var(--foreground) / .65)}.text-foreground\\/70{color:hsl(var(--foreground) / .7)}.text-neutral-foreground{color:hsl(var(--neutral-foreground))}.text-primary{color:hsl(var(--primary))}.text-primary-foreground{color:hsl(var(--primary-foreground))}.text-primary-light{color:hsl(var(--primary-light))}.opacity-0{opacity:0}.opacity-100{opacity:1}.shadow{--tw-shadow: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1);--tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-\\[width\\]{transition-property:width;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-opacity{transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-radius{transition-property:border-radius;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-transform{transition-property:transform;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.duration-200{transition-duration:.2s}.duration-300{transition-duration:.3s}.duration-details{transition-duration:.35s}.no-scrollbar{scrollbar-width:none;-ms-overflow-style:none}.no-scrollbar::-webkit-scrollbar{display:none}.\\[mask-image\\:linear-gradient\\(to_left\\,transparent_0px\\,black_4px\\,black_calc\\(100\\%-4px\\)\\,transparent_100\\%\\)\\]{-webkit-mask-image:linear-gradient(to left,transparent 0px,black 4px,black calc(100% - 4px),transparent 100%);mask-image:linear-gradient(to left,transparent 0px,black 4px,black calc(100% - 4px),transparent 100%)}.\\*\\:pointer-events-auto>*{pointer-events:auto}.\\*\\:snap-start>*{scroll-snap-align:start}.\\*\\:snap-always>*{scroll-snap-stop:always}.after\\:absolute:after{content:var(--tw-content);position:absolute}.after\\:inset-0:after{content:var(--tw-content);inset:0}.after\\:rounded-gallery:after{content:var(--tw-content);border-radius:var(--radius-gallery)}.after\\:border-2:after{content:var(--tw-content);border-width:2px}.after\\:border-primary:after{content:var(--tw-content);border-color:hsl(var(--primary))}.after\\:opacity-0:after{content:var(--tw-content);opacity:0}.after\\:opacity-100:after{content:var(--tw-content);opacity:1}.after\\:transition-all:after{content:var(--tw-content);transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.hover\\:z-hotspot-hover:hover{z-index:11}.hover\\:bg-foreground\\/25:hover{background-color:hsl(var(--foreground) / .25)}.hover\\:bg-primary\\/25:hover{background-color:hsl(var(--primary) / .25)}.hover\\:bg-primary\\/30:hover{background-color:hsl(var(--primary) / .3)}.hover\\:opacity-80:hover{opacity:.8}.hover\\:after\\:opacity-70:hover:after{content:var(--tw-content);opacity:.7}.disabled\\:opacity-60:disabled{opacity:.6}.group:hover .group-hover\\:pointer-events-auto{pointer-events:auto}.group\\/volume:hover .group-hover\\/volume\\:opacity-100{opacity:1}.group\\/volume:hover .group-hover\\/volume\\:opacity-50{opacity:.5}.group:hover .group-hover\\:opacity-100{opacity:1}@media ((orientation: portrait) and (max-width: 767px)) or ((orientation: landscape) and (max-width: 1023px)){.max-small\\:hidden{display:none}}@media ((orientation: portrait) and (min-width: 768px)) or ((orientation: landscape) and (min-width: 1024px)){.small\\:inset-x-2{left:.5rem;right:.5rem}.small\\:inset-y-2{top:.5rem;bottom:.5rem}.small\\:bottom-2{bottom:.5rem}.small\\:left-2{left:.5rem}.small\\:right-2{right:.5rem}.small\\:right-4{right:1rem}.small\\:top-2{top:.5rem}.small\\:top-4{top:1rem}.small\\:my-4{margin-top:1rem;margin-bottom:1rem}.small\\:hidden{display:none}.small\\:h-12{height:3rem}.small\\:h-28{height:7rem}.small\\:max-w-48{max-width:12rem}.small\\:gap-2{gap:.5rem}.small\\:gap-x-2{-moz-column-gap:.5rem;column-gap:.5rem}.small\\:gap-y-2{row-gap:.5rem}.small\\:gap-y-4{row-gap:1rem}.small\\:space-x-1>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.25rem * var(--tw-space-x-reverse));margin-left:calc(.25rem * calc(1 - var(--tw-space-x-reverse)))}.small\\:p-3{padding:.75rem}.small\\:px-2{padding-left:.5rem;padding-right:.5rem}.small\\:py-1{padding-top:.25rem;padding-bottom:.25rem}.small\\:pl-8{padding-left:2rem}.small\\:pr-6{padding-right:1.5rem}.small\\:text-base{font-size:1rem;line-height:1.5rem}.small\\:text-sm{font-size:.875rem;line-height:1.25rem}.small\\:font-bold{font-weight:700}}@media (min-width: 1280px){.large\\:h-20{height:5rem}.large\\:h-3\\/5{height:60%}.large\\:max-w-56{max-width:14rem}.large\\:gap-4{gap:1rem}.large\\:p-2{padding:.5rem}.large\\:p-4{padding:1rem}.large\\:text-base{font-size:1rem;line-height:1.5rem}.large\\:text-lg{font-size:1.125rem;line-height:1.75rem}}';
2654
- var Mt = { exports: {} }, ve = {};
2809
+ }, [r, e, n, o]), null;
2810
+ }, ln = (e) => Xe() ? /* @__PURE__ */ t.jsx(an, { ...e }) : /* @__PURE__ */ t.jsx("slot", {}), cn = '*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:currentColor}:before,:after{--tw-content: ""}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]{display:none}#cc-webplayer-wrapper{--background: var(--cc-webplayer-background, 0 0% 100%);--foreground: var(--cc-webplayer-foreground, 240 10% 3.9%);--primary: var(--cc-webplayer-primary, 216 100% 52%);--primary-foreground: var( --cc-webplayer-primary-foreground, var(--background) );--primary-light: var(--cc-webplayer-primary-light, var(--primary));--neutral: var(--cc-webplayer-neutral, 0 0% 39%);--neutral-foreground: var( --cc-webplayer-neutral-foreground, var(--foreground) );--radius-ui: var(--cc-webplayer-radius-ui, 1rem);--radius-carrousel: var(--cc-webplayer-radius-carrousel, 0);--radius-gallery: var(--cc-webplayer-radius-gallery, 0)}*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }.\\!container{width:100%!important}.container{width:100%}@media (min-width: 1280px){.\\!container{max-width:1280px!important}.container{max-width:1280px}}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}.\\!pointer-events-none{pointer-events:none!important}.pointer-events-none{pointer-events:none}.pointer-events-auto{pointer-events:auto}.invisible{visibility:hidden}.fixed{position:fixed}.\\!absolute{position:absolute!important}.absolute{position:absolute}.relative{position:relative}.sticky{position:sticky}.inset-0{inset:0}.inset-x-0{left:0;right:0}.inset-x-1{left:.25rem;right:.25rem}.inset-y-1{top:.25rem;bottom:.25rem}.-bottom-1{bottom:-.25rem}.-left-1{left:-.25rem}.-right-1{right:-.25rem}.-top-1{top:-.25rem}.bottom-0{bottom:0}.bottom-1{bottom:.25rem}.left-0{left:0}.left-1{left:.25rem}.left-1\\/2{left:50%}.right-1{right:.25rem}.right-2{right:.5rem}.top-0{top:0}.top-1{top:.25rem}.top-1\\/2{top:50%}.top-2{top:.5rem}.-z-10{z-index:-10}.-z-20{z-index:-20}.z-1{z-index:1}.z-hotspot{z-index:10}.z-overlay{z-index:30}.z-zoomed-image{z-index:20}.col-start-3{grid-column-start:3}.mx-1{margin-left:.25rem;margin-right:.25rem}.mx-auto{margin-left:auto;margin-right:auto}.my-2{margin-top:.5rem;margin-bottom:.5rem}.-ml-px{margin-left:-1px}.-mt-px{margin-top:-1px}.inline-block{display:inline-block}.flex{display:flex}.grid{display:grid}.hidden{display:none}.aspect-square{aspect-ratio:1 / 1}.size-1{width:.25rem;height:.25rem}.size-12{width:3rem;height:3rem}.size-20{width:5rem;height:5rem}.size-4{width:1rem;height:1rem}.size-5{width:1.25rem;height:1.25rem}.size-8{width:2rem;height:2rem}.size-full{width:100%;height:100%}.h-1{height:.25rem}.h-10{height:2.5rem}.h-20{height:5rem}.h-3\\/4{height:75%}.h-5{height:1.25rem}.h-8{height:2rem}.h-full{height:100%}.h-px{height:1px}.min-h-0{min-height:0px}.w-12{width:3rem}.w-3\\/5{width:60%}.w-8{width:2rem}.w-\\[calc\\(100\\%\\+1024px\\)\\]{width:calc(100% + 1024px)}.w-\\[calc\\(100\\%\\+2px\\)\\]{width:calc(100% + 2px)}.w-fit{width:-moz-fit-content;width:fit-content}.w-full{width:100%}.w-max{width:-moz-max-content;width:max-content}.w-px{width:1px}.min-w-0{min-width:0px}.max-w-40{max-width:10rem}.max-w-\\[1600px\\]{max-width:1600px}.shrink-0{flex-shrink:0}.origin-top-left{transform-origin:top left}.-translate-x-1\\.5{--tw-translate-x: -.375rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-translate-x-1\\/2{--tw-translate-x: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-translate-y-1\\/2{--tw-translate-y: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-x-0{--tw-translate-x: 0px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-x-1\\.5{--tw-translate-x: .375rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-x-full{--tw-translate-x: 100%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.scale-100{--tw-scale-x: 1;--tw-scale-y: 1;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.scale-105{--tw-scale-x: 1.05;--tw-scale-y: 1.05;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-scale-x-100{--tw-scale-x: -1;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes hotspot-ping{0%{transform:scale(0)}25%{opacity:1}75%,to{transform:scale(1.5);opacity:0}}.animate-hotspot-ping{animation:hotspot-ping 3s cubic-bezier(0,0,.2,1) infinite}@keyframes pulse{50%{opacity:1}0%,to{opacity:0}}.animate-pulse{animation:pulse 2s cubic-bezier(.4,0,.6,1) infinite}@keyframes rotation{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.animate-rotation{animation:rotation 1s linear infinite}.cursor-auto{cursor:auto}.cursor-ew-resize{cursor:ew-resize}.cursor-grab{cursor:grab}.cursor-grabbing{cursor:grabbing}.cursor-help{cursor:help}.cursor-move{cursor:move}.cursor-pointer{cursor:pointer}.resize{resize:both}.grid-cols-\\[auto\\,1fr\\,auto\\]{grid-template-columns:auto 1fr auto}.flex-col{flex-direction:column}.items-end{align-items:flex-end}.items-center{align-items:center}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-1{gap:.25rem}.gap-x-1{-moz-column-gap:.25rem;column-gap:.25rem}.gap-x-2{-moz-column-gap:.5rem;column-gap:.5rem}.gap-x-4{-moz-column-gap:1rem;column-gap:1rem}.gap-y-1{row-gap:.25rem}.gap-y-2{row-gap:.5rem}.gap-y-4{row-gap:1rem}.space-x-0\\.5>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.125rem * var(--tw-space-x-reverse));margin-left:calc(.125rem * calc(1 - var(--tw-space-x-reverse)))}.space-y-0\\.5>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.125rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.125rem * var(--tw-space-y-reverse))}.space-y-1>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.25rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.25rem * var(--tw-space-y-reverse))}.space-y-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.5rem * var(--tw-space-y-reverse))}.overflow-hidden{overflow:hidden}.overflow-x-auto{overflow-x:auto}.overflow-x-scroll{overflow-x:scroll}.text-pretty{text-wrap:pretty}.rounded-carrousel{border-radius:var(--radius-carrousel)}.rounded-full{border-radius:9999px}.rounded-gallery{border-radius:var(--radius-gallery)}.rounded-ui{border-radius:var(--radius-ui)}.rounded-ui-md{border-radius:calc(var(--radius-ui) + .125rem)}.rounded-ui-sm{border-radius:calc(var(--radius-ui) - .125rem)}.rounded-b-none{border-bottom-right-radius:0;border-bottom-left-radius:0}.rounded-t-none{border-top-left-radius:0;border-top-right-radius:0}.border{border-width:1px}.border-2{border-width:2px}.border-4{border-width:4px}.border-background{border-color:hsl(var(--background))}.border-foreground{border-color:hsl(var(--foreground))}.border-primary{border-color:hsl(var(--primary))}.border-b-transparent{border-bottom-color:transparent}.bg-background{background-color:hsl(var(--background))}.bg-background\\/25{background-color:hsl(var(--background) / .25)}.bg-background\\/50{background-color:hsl(var(--background) / .5)}.bg-background\\/60{background-color:hsl(var(--background) / .6)}.bg-foreground\\/25{background-color:hsl(var(--foreground) / .25)}.bg-foreground\\/30{background-color:hsl(var(--foreground) / .3)}.bg-foreground\\/35{background-color:hsl(var(--foreground) / .35)}.bg-foreground\\/40{background-color:hsl(var(--foreground) / .4)}.bg-foreground\\/50{background-color:hsl(var(--foreground) / .5)}.bg-foreground\\/60{background-color:hsl(var(--foreground) / .6)}.bg-foreground\\/65{background-color:hsl(var(--foreground) / .65)}.bg-foreground\\/75{background-color:hsl(var(--foreground) / .75)}.bg-neutral\\/50{background-color:hsl(var(--neutral) / .5)}.bg-primary{background-color:hsl(var(--primary))}.bg-primary-foreground{background-color:hsl(var(--primary-foreground))}.bg-primary\\/50{background-color:hsl(var(--primary) / .5)}.bg-transparent{background-color:transparent}.bg-gradient-to-t{background-image:linear-gradient(to top,var(--tw-gradient-stops))}.from-foreground{--tw-gradient-from: hsl(var(--foreground)) var(--tw-gradient-from-position);--tw-gradient-to: hsl(var(--foreground) / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.to-transparent{--tw-gradient-to: transparent var(--tw-gradient-to-position)}.object-cover{-o-object-fit:cover;object-fit:cover}.p-0\\.5{padding:.125rem}.p-1{padding:.25rem}.p-2{padding:.5rem}.p-4{padding:1rem}.px-1\\.5{padding-left:.375rem;padding-right:.375rem}.px-2{padding-left:.5rem;padding-right:.5rem}.py-0\\.5{padding-top:.125rem;padding-bottom:.125rem}.py-1{padding-top:.25rem;padding-bottom:.25rem}.pl-6{padding-left:1.5rem}.pr-12{padding-right:3rem}.pr-4{padding-right:1rem}.pt-8{padding-top:2rem}.text-2xl{font-size:1.5rem;line-height:2rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xl{font-size:1.25rem;line-height:1.75rem}.text-xs{font-size:.75rem;line-height:1rem}.font-bold{font-weight:700}.font-semibold{font-weight:600}.text-background{color:hsl(var(--background))}.text-background\\/75{color:hsl(var(--background) / .75)}.text-foreground{color:hsl(var(--foreground))}.text-foreground\\/65{color:hsl(var(--foreground) / .65)}.text-foreground\\/70{color:hsl(var(--foreground) / .7)}.text-neutral-foreground{color:hsl(var(--neutral-foreground))}.text-primary{color:hsl(var(--primary))}.text-primary-foreground{color:hsl(var(--primary-foreground))}.text-primary-light{color:hsl(var(--primary-light))}.opacity-0{opacity:0}.opacity-100{opacity:1}.shadow{--tw-shadow: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1);--tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-\\[width\\]{transition-property:width;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-opacity{transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-radius{transition-property:border-radius;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-transform{transition-property:transform;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.duration-200{transition-duration:.2s}.duration-300{transition-duration:.3s}.duration-details{transition-duration:.35s}.no-scrollbar{scrollbar-width:none;-ms-overflow-style:none}.no-scrollbar::-webkit-scrollbar{display:none}.\\[mask-image\\:linear-gradient\\(to_left\\,transparent_0px\\,black_4px\\,black_calc\\(100\\%-4px\\)\\,transparent_100\\%\\)\\]{-webkit-mask-image:linear-gradient(to left,transparent 0px,black 4px,black calc(100% - 4px),transparent 100%);mask-image:linear-gradient(to left,transparent 0px,black 4px,black calc(100% - 4px),transparent 100%)}.\\*\\:pointer-events-auto>*{pointer-events:auto}.\\*\\:size-full>*{width:100%;height:100%}.\\*\\:snap-start>*{scroll-snap-align:start}.\\*\\:snap-always>*{scroll-snap-stop:always}.\\*\\:object-cover>*{-o-object-fit:cover;object-fit:cover}.after\\:absolute:after{content:var(--tw-content);position:absolute}.after\\:inset-0:after{content:var(--tw-content);inset:0}.after\\:rounded-gallery:after{content:var(--tw-content);border-radius:var(--radius-gallery)}.after\\:border-2:after{content:var(--tw-content);border-width:2px}.after\\:border-primary:after{content:var(--tw-content);border-color:hsl(var(--primary))}.after\\:opacity-0:after{content:var(--tw-content);opacity:0}.after\\:opacity-100:after{content:var(--tw-content);opacity:1}.after\\:transition-all:after{content:var(--tw-content);transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.hover\\:z-hotspot-hover:hover{z-index:11}.hover\\:bg-foreground\\/25:hover{background-color:hsl(var(--foreground) / .25)}.hover\\:bg-primary\\/25:hover{background-color:hsl(var(--primary) / .25)}.hover\\:bg-primary\\/30:hover{background-color:hsl(var(--primary) / .3)}.hover\\:opacity-80:hover{opacity:.8}.hover\\:after\\:opacity-70:hover:after{content:var(--tw-content);opacity:.7}.disabled\\:opacity-60:disabled{opacity:.6}.group:hover .group-hover\\:pointer-events-auto{pointer-events:auto}.group\\/volume:hover .group-hover\\/volume\\:opacity-100{opacity:1}.group\\/volume:hover .group-hover\\/volume\\:opacity-50{opacity:.5}.group:hover .group-hover\\:opacity-100{opacity:1}@media ((orientation: portrait) and (max-width: 767px)) or ((orientation: landscape) and (max-width: 1023px)){.max-small\\:hidden{display:none}}@media ((orientation: portrait) and (min-width: 768px)) or ((orientation: landscape) and (min-width: 1024px)){.small\\:inset-x-2{left:.5rem;right:.5rem}.small\\:inset-y-2{top:.5rem;bottom:.5rem}.small\\:bottom-2{bottom:.5rem}.small\\:left-2{left:.5rem}.small\\:right-2{right:.5rem}.small\\:right-4{right:1rem}.small\\:top-2{top:.5rem}.small\\:top-4{top:1rem}.small\\:my-4{margin-top:1rem;margin-bottom:1rem}.small\\:hidden{display:none}.small\\:h-12{height:3rem}.small\\:h-28{height:7rem}.small\\:max-w-48{max-width:12rem}.small\\:gap-2{gap:.5rem}.small\\:gap-x-2{-moz-column-gap:.5rem;column-gap:.5rem}.small\\:gap-y-2{row-gap:.5rem}.small\\:gap-y-4{row-gap:1rem}.small\\:space-x-1>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.25rem * var(--tw-space-x-reverse));margin-left:calc(.25rem * calc(1 - var(--tw-space-x-reverse)))}.small\\:p-3{padding:.75rem}.small\\:px-2{padding-left:.5rem;padding-right:.5rem}.small\\:py-1{padding-top:.25rem;padding-bottom:.25rem}.small\\:pl-8{padding-left:2rem}.small\\:pr-6{padding-right:1.5rem}.small\\:text-base{font-size:1rem;line-height:1.5rem}.small\\:text-sm{font-size:.875rem;line-height:1.25rem}.small\\:font-bold{font-weight:700}}@media (min-width: 1280px){.large\\:h-20{height:5rem}.large\\:h-3\\/5{height:60%}.large\\:max-w-56{max-width:14rem}.large\\:gap-4{gap:1rem}.large\\:p-2{padding:.5rem}.large\\:p-4{padding:1rem}.large\\:text-base{font-size:1rem;line-height:1.5rem}.large\\:text-lg{font-size:1.125rem;line-height:1.75rem}}';
2811
+ var Ot = { exports: {} }, ve = {};
2655
2812
  /**
2656
2813
  * @license React
2657
2814
  * react-jsx-runtime.production.min.js
@@ -2661,32 +2818,32 @@ var Mt = { exports: {} }, ve = {};
2661
2818
  * This source code is licensed under the MIT license found in the
2662
2819
  * LICENSE file in the root directory of this source tree.
2663
2820
  */
2664
- var Qe;
2665
- function Kr() {
2666
- if (Qe) return ve;
2667
- Qe = 1;
2668
- var e = be, r = Symbol.for("react.element"), n = Symbol.for("react.fragment"), o = Object.prototype.hasOwnProperty, s = e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, p = { key: !0, ref: !0, __self: !0, __source: !0 };
2669
- function d(a, l, w) {
2670
- var m, c = {}, f = null, _ = null;
2671
- w !== void 0 && (f = "" + w), l.key !== void 0 && (f = "" + l.key), l.ref !== void 0 && (_ = l.ref);
2672
- for (m in l) o.call(l, m) && !p.hasOwnProperty(m) && (c[m] = l[m]);
2673
- if (a && a.defaultProps) for (m in l = a.defaultProps, l) c[m] === void 0 && (c[m] = l[m]);
2674
- return { $$typeof: r, type: a, key: f, ref: _, props: c, _owner: s.current };
2821
+ var lt;
2822
+ function dn() {
2823
+ if (lt) return ve;
2824
+ lt = 1;
2825
+ var e = be, r = Symbol.for("react.element"), n = Symbol.for("react.fragment"), o = Object.prototype.hasOwnProperty, s = e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, u = { key: !0, ref: !0, __self: !0, __source: !0 };
2826
+ function f(d, c, v) {
2827
+ var l, m = {}, w = null, C = null;
2828
+ v !== void 0 && (w = "" + v), c.key !== void 0 && (w = "" + c.key), c.ref !== void 0 && (C = c.ref);
2829
+ for (l in c) o.call(c, l) && !u.hasOwnProperty(l) && (m[l] = c[l]);
2830
+ if (d && d.defaultProps) for (l in c = d.defaultProps, c) m[l] === void 0 && (m[l] = c[l]);
2831
+ return { $$typeof: r, type: d, key: w, ref: C, props: m, _owner: s.current };
2675
2832
  }
2676
- return ve.Fragment = n, ve.jsx = d, ve.jsxs = d, ve;
2833
+ return ve.Fragment = n, ve.jsx = f, ve.jsxs = f, ve;
2677
2834
  }
2678
- Mt.exports = Kr();
2679
- var Ce = Mt.exports, Jr = Object.defineProperty, Qr = (e, r, n) => r in e ? Jr(e, r, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[r] = n, ke = (e, r, n) => (Qr(e, typeof r != "symbol" ? r + "" : r, n), n);
2680
- const en = {
2835
+ Ot.exports = dn();
2836
+ var ke = Ot.exports, un = Object.defineProperty, mn = (e, r, n) => r in e ? un(e, r, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[r] = n, Ee = (e, r, n) => (mn(e, typeof r != "symbol" ? r + "" : r, n), n);
2837
+ const pn = {
2681
2838
  stringify: (e) => e,
2682
2839
  parse: (e) => e
2683
- }, tn = {
2840
+ }, hn = {
2684
2841
  stringify: (e) => `${e}`,
2685
2842
  parse: (e) => parseFloat(e)
2686
- }, rn = {
2843
+ }, fn = {
2687
2844
  stringify: (e) => e ? "true" : "false",
2688
2845
  parse: (e) => /^[ty1-9]/i.test(e)
2689
- }, nn = {
2846
+ }, gn = {
2690
2847
  stringify: (e) => e.name,
2691
2848
  parse: (e, r, n) => {
2692
2849
  const o = (() => {
@@ -2697,117 +2854,120 @@ const en = {
2697
2854
  })();
2698
2855
  return typeof o == "function" ? o.bind(n) : void 0;
2699
2856
  }
2700
- }, on = {
2857
+ }, xn = {
2701
2858
  stringify: (e) => JSON.stringify(e),
2702
2859
  parse: (e) => JSON.parse(e)
2703
- }, Pe = {
2704
- string: en,
2705
- number: tn,
2706
- boolean: rn,
2707
- function: nn,
2708
- json: on
2860
+ }, $e = {
2861
+ string: pn,
2862
+ number: hn,
2863
+ boolean: fn,
2864
+ function: gn,
2865
+ json: xn
2709
2866
  };
2710
- function sn(e) {
2867
+ function wn(e) {
2711
2868
  return e.replace(
2712
2869
  /([a-z0-9])([A-Z])/g,
2713
2870
  (r, n, o) => `${n}-${o.toLowerCase()}`
2714
2871
  );
2715
2872
  }
2716
- const Ee = Symbol.for("r2wc.render"), Ne = Symbol.for("r2wc.connected"), se = Symbol.for("r2wc.context"), ee = Symbol.for("r2wc.props");
2717
- function an(e, r, n) {
2718
- var o, s, p;
2873
+ const Ce = Symbol.for("r2wc.render"), Ne = Symbol.for("r2wc.connected"), ie = Symbol.for("r2wc.context"), ne = Symbol.for("r2wc.props");
2874
+ function vn(e, r, n) {
2875
+ var o, s, u;
2719
2876
  r.props || (r.props = e.propTypes ? Object.keys(e.propTypes) : []);
2720
- const d = Array.isArray(r.props) ? r.props.slice() : Object.keys(r.props), a = {}, l = {}, w = {};
2721
- for (const c of d) {
2722
- a[c] = Array.isArray(r.props) ? "string" : r.props[c];
2723
- const f = sn(c);
2724
- l[c] = f, w[f] = c;
2877
+ const f = Array.isArray(r.props) ? r.props.slice() : Object.keys(r.props), d = {}, c = {}, v = {};
2878
+ for (const m of f) {
2879
+ d[m] = Array.isArray(r.props) ? "string" : r.props[m];
2880
+ const w = wn(m);
2881
+ c[m] = w, v[w] = m;
2725
2882
  }
2726
- class m extends HTMLElement {
2883
+ class l extends HTMLElement {
2727
2884
  constructor() {
2728
- super(), ke(this, o, !0), ke(this, s), ke(this, p, {}), ke(this, "container"), r.shadow ? this.container = this.attachShadow({
2885
+ super(), Ee(this, o, !0), Ee(this, s), Ee(this, u, {}), Ee(this, "container"), r.shadow ? this.container = this.attachShadow({
2729
2886
  mode: r.shadow
2730
- }) : this.container = this, this[ee].container = this.container;
2731
- for (const f of d) {
2732
- const _ = l[f], b = this.getAttribute(_), y = a[f], L = y ? Pe[y] : null;
2733
- L != null && L.parse && b && (this[ee][f] = L.parse(b, _, this));
2887
+ }) : this.container = this, this[ne].container = this.container;
2888
+ for (const w of f) {
2889
+ const C = c[w], a = this.getAttribute(C), h = d[w], x = h ? $e[h] : null;
2890
+ x != null && x.parse && a && (this[ne][w] = x.parse(a, C, this));
2734
2891
  }
2735
2892
  }
2736
2893
  static get observedAttributes() {
2737
- return Object.keys(w);
2894
+ return Object.keys(v);
2738
2895
  }
2739
2896
  connectedCallback() {
2740
- this[Ne] = !0, this[Ee]();
2897
+ this[Ne] = !0, this[Ce]();
2741
2898
  }
2742
2899
  disconnectedCallback() {
2743
- this[Ne] = !1, this[se] && n.unmount(this[se]), delete this[se];
2900
+ this[Ne] = !1, this[ie] && n.unmount(this[ie]), delete this[ie];
2744
2901
  }
2745
- attributeChangedCallback(f, _, b) {
2746
- const y = w[f], L = a[y], x = L ? Pe[L] : null;
2747
- y in a && x != null && x.parse && b && (this[ee][y] = x.parse(b, f, this), this[Ee]());
2902
+ attributeChangedCallback(w, C, a) {
2903
+ const h = v[w], x = d[h], j = x ? $e[x] : null;
2904
+ h in d && j != null && j.parse && a && (this[ne][h] = j.parse(a, w, this), this[Ce]());
2748
2905
  }
2749
- [(o = Ne, s = se, p = ee, Ee)]() {
2750
- this[Ne] && (this[se] ? n.update(this[se], this[ee]) : this[se] = n.mount(
2906
+ [(o = Ne, s = ie, u = ne, Ce)]() {
2907
+ this[Ne] && (this[ie] ? n.update(this[ie], this[ne]) : this[ie] = n.mount(
2751
2908
  this.container,
2752
2909
  e,
2753
- this[ee]
2910
+ this[ne]
2754
2911
  ));
2755
2912
  }
2756
2913
  }
2757
- for (const c of d) {
2758
- const f = l[c], _ = a[c];
2759
- Object.defineProperty(m.prototype, c, {
2914
+ for (const m of f) {
2915
+ const w = c[m], C = d[m];
2916
+ Object.defineProperty(l.prototype, m, {
2760
2917
  enumerable: !0,
2761
2918
  configurable: !0,
2762
2919
  get() {
2763
- return this[ee][c];
2920
+ return this[ne][m];
2764
2921
  },
2765
- set(b) {
2766
- this[ee][c] = b;
2767
- const y = _ ? Pe[_] : null;
2768
- if (y != null && y.stringify) {
2769
- const L = y.stringify(b, f, this);
2770
- this.getAttribute(f) !== L && this.setAttribute(f, L);
2922
+ set(a) {
2923
+ this[ne][m] = a;
2924
+ const h = C ? $e[C] : null;
2925
+ if (h != null && h.stringify) {
2926
+ const x = h.stringify(a, w, this);
2927
+ this.getAttribute(w) !== x && this.setAttribute(w, x);
2771
2928
  } else
2772
- this[Ee]();
2929
+ this[Ce]();
2773
2930
  }
2774
2931
  });
2775
2932
  }
2776
- return m;
2933
+ return l;
2777
2934
  }
2778
- function ln(e, r, n) {
2779
- const o = Dt(e), s = be.createElement(r, n);
2935
+ function bn(e, r, n) {
2936
+ const o = Yt(e), s = be.createElement(r, n);
2780
2937
  return o.render(s), {
2781
2938
  root: o,
2782
2939
  ReactComponent: r
2783
2940
  };
2784
2941
  }
2785
- function cn({ root: e, ReactComponent: r }, n) {
2942
+ function yn({ root: e, ReactComponent: r }, n) {
2786
2943
  const o = be.createElement(r, n);
2787
2944
  e.render(o);
2788
2945
  }
2789
- function dn({ root: e }) {
2946
+ function jn({ root: e }) {
2790
2947
  e.unmount();
2791
2948
  }
2792
- function Tt(e, r = {}) {
2793
- return an(e, r, { mount: ln, update: cn, unmount: dn });
2949
+ function Ge(e, r = {}) {
2950
+ return vn(e, r, { mount: bn, update: yn, unmount: jn });
2794
2951
  }
2795
- function un(e) {
2952
+ function kn(e) {
2796
2953
  return e.replace(
2797
2954
  /([a-z0-9])([A-Z])/g,
2798
2955
  (r, n, o) => `${n}-${o.toLowerCase()}`
2799
2956
  );
2800
2957
  }
2801
- function mn(e) {
2802
- const r = {};
2803
- return Object.entries(e).forEach(([n, o]) => {
2804
- r[un(n)] = o.toString();
2805
- }), r;
2958
+ function Ke(e) {
2959
+ return Object.entries(e).reduce((r, [n, o]) => {
2960
+ if (o !== void 0) {
2961
+ const s = kn(n);
2962
+ r[s] = o.toString();
2963
+ }
2964
+ return r;
2965
+ }, {});
2806
2966
  }
2807
- const pn = (e) => /* @__PURE__ */ Ce.jsxs(Ce.Fragment, { children: [
2808
- /* @__PURE__ */ Ce.jsx("style", { children: qr }),
2809
- /* @__PURE__ */ Ce.jsx(Xr, { ...e })
2810
- ] }), hn = Tt(pn, {
2967
+ const En = (e) => /* @__PURE__ */ ke.jsxs(ke.Fragment, { children: [
2968
+ /* @__PURE__ */ ke.jsx("style", { children: cn }),
2969
+ /* @__PURE__ */ ke.jsx(nn, { ...e })
2970
+ ] }), Cn = Ge(En, {
2811
2971
  shadow: "open",
2812
2972
  props: {
2813
2973
  compositionUrl: "string",
@@ -2821,91 +2981,117 @@ const pn = (e) => /* @__PURE__ */ Ce.jsxs(Ce.Fragment, { children: [
2821
2981
  eventPrefix: "string",
2822
2982
  reverse360: "boolean"
2823
2983
  }
2824
- }), gn = (e) => mn(e), fn = Tt(Br, {
2984
+ }), Nn = (e) => Ke(e), Ln = Ge(sn, {
2825
2985
  shadow: "closed",
2826
2986
  props: {
2827
- name: "string",
2828
- color: "string"
2987
+ index: "number",
2988
+ thumbnailSrc: "string"
2829
2989
  }
2830
- });
2831
- function xn() {
2832
- return !!customElements.get(Ze) && !!customElements.get(Ae);
2990
+ }), _n = (e) => Ke(e), Mn = Ge(ln, {
2991
+ shadow: "closed",
2992
+ props: {
2993
+ name: "string"
2994
+ }
2995
+ }), zn = (e) => Ke(e);
2996
+ function In() {
2997
+ return !!customElements.get(Ie) && !!customElements.get(We) && !!customElements.get(Ye);
2833
2998
  }
2834
- function wn() {
2835
- customElements.define(Ze, hn), customElements.define(Ae, fn);
2999
+ function Sn() {
3000
+ customElements.define(Ie, Cn), customElements.define(
3001
+ We,
3002
+ Ln
3003
+ ), customElements.define(Ye, Mn);
2836
3004
  }
2837
- function Vt() {
2838
- xn() || wn();
3005
+ function qe() {
3006
+ In() || Sn();
2839
3007
  }
2840
- Vt();
2841
- const jn = ({
3008
+ qe();
3009
+ const Rn = ({
2842
3010
  onCompositionLoading: e,
2843
3011
  onCompositionLoaded: r,
2844
3012
  onCompositionLoadError: n,
2845
3013
  onItemChange: o,
2846
3014
  onExtendModeOn: s,
2847
- onExtendModeOff: p,
2848
- onHotspotsOn: d,
2849
- onHotspotsOff: a,
2850
- onGalleryOpen: l,
2851
- onGalleryClose: w,
2852
- ...m
3015
+ onExtendModeOff: u,
3016
+ onHotspotsOn: f,
3017
+ onHotspotsOff: d,
3018
+ onGalleryOpen: c,
3019
+ onGalleryClose: v,
3020
+ className: l,
3021
+ style: m = {},
3022
+ children: w,
3023
+ ...C
2853
3024
  }) => {
2854
- const c = gn(m);
2855
- return Z(() => {
2856
- const f = m.eventPrefix ?? mt, _ = (L) => `${f}${L}`, b = {
2857
- [rt]: e,
2858
- [nt]: r,
2859
- [ot]: n,
2860
- [st]: o,
2861
- [at]: s,
2862
- [it]: p,
2863
- [lt]: d,
2864
- [ct]: a,
2865
- [dt]: l,
2866
- [ut]: w
2867
- }, y = /* @__PURE__ */ new Map();
2868
- return Object.entries(b).forEach(([L, x]) => {
2869
- if (!x)
3025
+ const a = te(() => {
3026
+ const h = Nn(C);
3027
+ return l && Object.assign(h, { class: l }), h;
3028
+ }, [l, C]);
3029
+ return O(() => {
3030
+ const h = C.eventPrefix ?? bt, x = (g) => `${h}${g}`, j = {
3031
+ [dt]: e,
3032
+ [ut]: r,
3033
+ [mt]: n,
3034
+ [pt]: o,
3035
+ [ht]: s,
3036
+ [ft]: u,
3037
+ [gt]: f,
3038
+ [xt]: d,
3039
+ [wt]: c,
3040
+ [vt]: v
3041
+ }, k = /* @__PURE__ */ new Map();
3042
+ return Object.entries(j).forEach(([g, p]) => {
3043
+ if (!p)
2870
3044
  return;
2871
- const T = _(L), h = (u) => x(u.detail);
2872
- y.set(T, h), document.addEventListener(T, h);
3045
+ const b = x(g), E = (L) => p(L.detail);
3046
+ k.set(b, E), document.addEventListener(b, E);
2873
3047
  }), () => {
2874
- y.forEach((L, x) => {
2875
- document.removeEventListener(x, L);
3048
+ k.forEach((g, p) => {
3049
+ document.removeEventListener(p, g);
2876
3050
  });
2877
3051
  };
2878
3052
  }, [
2879
- m.eventPrefix,
3053
+ C.eventPrefix,
2880
3054
  e,
2881
3055
  r,
2882
3056
  n,
2883
3057
  o,
2884
3058
  s,
2885
- p,
3059
+ u,
3060
+ f,
2886
3061
  d,
2887
- a,
2888
- l,
2889
- w
2890
- ]), /* @__PURE__ */ tt.jsx("cc-webplayer", { ...c });
3062
+ c,
3063
+ v
3064
+ ]), /* @__PURE__ */ Ue.jsx("cc-webplayer", { style: { display: "block", ...m }, ...a, children: w });
3065
+ };
3066
+ qe();
3067
+ const An = ({ children: e, ...r }) => {
3068
+ const n = _n(r);
3069
+ return /* @__PURE__ */ Ue.jsx("cc-webplayer-custom-media", { ...n, children: e });
3070
+ };
3071
+ qe();
3072
+ const Pn = ({
3073
+ children: e,
3074
+ ...r
3075
+ }) => {
3076
+ const n = zn(r);
3077
+ return /* @__PURE__ */ Ue.jsx("cc-webplayer-icon", { ...n, children: e });
2891
3078
  };
2892
- Vt();
2893
- const Cn = ({ name: e, color: r }) => /* @__PURE__ */ tt.jsx("cc-webplayer-icon", { name: e, color: r });
2894
3079
  export {
2895
- mt as DEFAULT_EVENT_PREFIX,
2896
- nt as EVENT_COMPOSITION_LOADED,
2897
- rt as EVENT_COMPOSITION_LOADING,
2898
- ot as EVENT_COMPOSITION_LOAD_ERROR,
2899
- it as EVENT_EXTEND_MODE_OFF,
2900
- at as EVENT_EXTEND_MODE_ON,
2901
- ut as EVENT_GALLERY_CLOSE,
2902
- dt as EVENT_GALLERY_OPEN,
2903
- ct as EVENT_HOTSPOTS_OFF,
2904
- lt as EVENT_HOTSPOTS_ON,
2905
- st as EVENT_ITEM_CHANGE,
2906
- Ae as WEB_PLAYER_ICON_WC_TAG,
2907
- Ze as WEB_PLAYER_WC_TAG,
2908
- jn as WebPlayer,
2909
- Cn as WebPlayerIcon,
2910
- yn as generateCompositionUrl
3080
+ bt as DEFAULT_EVENT_PREFIX,
3081
+ ut as EVENT_COMPOSITION_LOADED,
3082
+ dt as EVENT_COMPOSITION_LOADING,
3083
+ mt as EVENT_COMPOSITION_LOAD_ERROR,
3084
+ ft as EVENT_EXTEND_MODE_OFF,
3085
+ ht as EVENT_EXTEND_MODE_ON,
3086
+ vt as EVENT_GALLERY_CLOSE,
3087
+ wt as EVENT_GALLERY_OPEN,
3088
+ xt as EVENT_HOTSPOTS_OFF,
3089
+ gt as EVENT_HOTSPOTS_ON,
3090
+ pt as EVENT_ITEM_CHANGE,
3091
+ Ye as WEB_PLAYER_ICON_WC_TAG,
3092
+ Ie as WEB_PLAYER_WC_TAG,
3093
+ Rn as WebPlayer,
3094
+ An as WebPlayerCustomMedia,
3095
+ Pn as WebPlayerIcon,
3096
+ Hn as generateCompositionUrl
2911
3097
  };