js-cloudimage-hotspot 1.1.3 → 1.1.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/core/ci-hotspot.d.ts.map +1 -1
- package/dist/core/config.d.ts +1 -1
- package/dist/core/config.d.ts.map +1 -1
- package/dist/core/types.d.ts +3 -0
- package/dist/core/types.d.ts.map +1 -1
- package/dist/editor/js-cloudimage-hotspot-editor.cjs.js +2 -2
- package/dist/editor/js-cloudimage-hotspot-editor.cjs.js.map +1 -1
- package/dist/editor/js-cloudimage-hotspot-editor.esm.js +58 -42
- package/dist/editor/js-cloudimage-hotspot-editor.esm.js.map +1 -1
- package/dist/editor/js-cloudimage-hotspot-editor.min.js +2 -2
- package/dist/editor/js-cloudimage-hotspot-editor.min.js.map +1 -1
- package/dist/js-cloudimage-hotspot.cjs.js +1 -1
- package/dist/js-cloudimage-hotspot.cjs.js.map +1 -1
- package/dist/js-cloudimage-hotspot.esm.js +86 -70
- package/dist/js-cloudimage-hotspot.esm.js.map +1 -1
- package/dist/js-cloudimage-hotspot.min.js +1 -1
- package/dist/js-cloudimage-hotspot.min.js.map +1 -1
- package/dist/popover/Popover.d.ts +1 -0
- package/dist/popover/Popover.d.ts.map +1 -1
- package/dist/popover/template.d.ts.map +1 -1
- package/dist/react/index.cjs +1 -1
- package/dist/react/index.cjs.map +1 -1
- package/dist/react/index.js +97 -81
- package/dist/react/index.js.map +1 -1
- package/package.json +1 -1
package/dist/react/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsxs as rt, Fragment as N, jsx as W } from "react/jsx-runtime";
|
|
2
|
-
import at, { useRef as
|
|
2
|
+
import at, { useRef as P, useEffect as O, forwardRef as ct, useImperativeHandle as lt } from "react";
|
|
3
3
|
import { createPortal as ht } from "react-dom";
|
|
4
4
|
const pt = {
|
|
5
5
|
alt: "",
|
|
@@ -89,7 +89,7 @@ function j(i) {
|
|
|
89
89
|
hotspots: i.hotspots || []
|
|
90
90
|
};
|
|
91
91
|
}
|
|
92
|
-
function
|
|
92
|
+
function V(i) {
|
|
93
93
|
if (i.scenes && i.scenes.length > 0) {
|
|
94
94
|
const t = /* @__PURE__ */ new Set();
|
|
95
95
|
for (const e of i.scenes) {
|
|
@@ -107,7 +107,7 @@ function B(i) {
|
|
|
107
107
|
} else if (!i.src)
|
|
108
108
|
throw new Error('CIHotspot: "src" is required');
|
|
109
109
|
}
|
|
110
|
-
const
|
|
110
|
+
const B = "ci-hotspot-styles";
|
|
111
111
|
function ot() {
|
|
112
112
|
return typeof window < "u" && typeof document < "u";
|
|
113
113
|
}
|
|
@@ -133,9 +133,9 @@ function y(i, ...t) {
|
|
|
133
133
|
i.classList.remove(...t);
|
|
134
134
|
}
|
|
135
135
|
function gt(i) {
|
|
136
|
-
if (!ot() || document.getElementById(
|
|
136
|
+
if (!ot() || document.getElementById(B)) return;
|
|
137
137
|
const t = document.createElement("style");
|
|
138
|
-
t.id =
|
|
138
|
+
t.id = B, t.textContent = i, document.head.appendChild(t);
|
|
139
139
|
}
|
|
140
140
|
function _(i) {
|
|
141
141
|
if (typeof i == "string") {
|
|
@@ -165,7 +165,7 @@ function vt(i, t) {
|
|
|
165
165
|
const o = i.className.trim().split(/\s+/).filter(Boolean);
|
|
166
166
|
o.length && m(e, ...o);
|
|
167
167
|
}
|
|
168
|
-
if (i.hidden && m(e, "ci-hotspot-marker--hidden"), t && m(e, "ci-hotspot-marker--pulse"), i.icon &&
|
|
168
|
+
if (i.hidden && m(e, "ci-hotspot-marker--hidden"), t && m(e, "ci-hotspot-marker--pulse"), i.icon && kt(e, i.icon), i.markerStyle === "dot-label" && i.label) {
|
|
169
169
|
m(e, "ci-hotspot-marker--dot-label");
|
|
170
170
|
const o = v("span", "ci-hotspot-marker-label");
|
|
171
171
|
o.textContent = i.label, e.appendChild(o);
|
|
@@ -206,7 +206,7 @@ function it(i) {
|
|
|
206
206
|
it(t);
|
|
207
207
|
}
|
|
208
208
|
}
|
|
209
|
-
function
|
|
209
|
+
function kt(i, t) {
|
|
210
210
|
const e = t.trim();
|
|
211
211
|
if (/^<svg[\s>]/i.test(e) || /^<\?xml/i.test(e))
|
|
212
212
|
i.innerHTML = bt(t);
|
|
@@ -225,44 +225,44 @@ function wt(i, t) {
|
|
|
225
225
|
function g(i, t) {
|
|
226
226
|
t ? (m(i, "ci-hotspot-marker--active"), i.setAttribute("aria-expanded", "true")) : (y(i, "ci-hotspot-marker--active"), i.setAttribute("aria-expanded", "false"));
|
|
227
227
|
}
|
|
228
|
-
function
|
|
228
|
+
function wt(i, t) {
|
|
229
229
|
t ? m(i, "ci-hotspot-marker--hidden") : y(i, "ci-hotspot-marker--hidden");
|
|
230
230
|
}
|
|
231
|
-
function
|
|
231
|
+
function F(i) {
|
|
232
232
|
i.remove();
|
|
233
233
|
}
|
|
234
234
|
function xt(i, t, e, o) {
|
|
235
|
-
const s = i.getBoundingClientRect(), c = e.getBoundingClientRect(), n = t.offsetWidth, r = t.offsetHeight, a = s.left + s.width / 2 - c.left, l = s.top + s.height / 2 - c.top, d = s.top - c.top, h = s.bottom - c.top, p = s.left - c.left, u = s.right - c.left,
|
|
236
|
-
top: d -
|
|
237
|
-
bottom: b - h -
|
|
238
|
-
left: p -
|
|
239
|
-
right:
|
|
235
|
+
const s = i.getBoundingClientRect(), c = e.getBoundingClientRect(), n = t.offsetWidth, r = t.offsetHeight, a = s.left + s.width / 2 - c.left, l = s.top + s.height / 2 - c.top, d = s.top - c.top, h = s.bottom - c.top, p = s.left - c.left, u = s.right - c.left, w = e.offsetWidth, b = e.offsetHeight, k = 8, L = {
|
|
236
|
+
top: d - k,
|
|
237
|
+
bottom: b - h - k,
|
|
238
|
+
left: p - k,
|
|
239
|
+
right: w - u - k
|
|
240
240
|
};
|
|
241
241
|
let E = o.placement;
|
|
242
|
-
E === "auto" && (E = Et(
|
|
243
|
-
let z, T,
|
|
242
|
+
E === "auto" && (E = Et(L)), E = zt(E, n, r, L);
|
|
243
|
+
let z, T, X = 0;
|
|
244
244
|
switch (E) {
|
|
245
245
|
case "top":
|
|
246
|
-
z = a - n / 2, T = d -
|
|
246
|
+
z = a - n / 2, T = d - k - r;
|
|
247
247
|
break;
|
|
248
248
|
case "bottom":
|
|
249
|
-
z = a - n / 2, T = h +
|
|
249
|
+
z = a - n / 2, T = h + k;
|
|
250
250
|
break;
|
|
251
251
|
case "left":
|
|
252
|
-
z = p -
|
|
252
|
+
z = p - k - n, T = l - r / 2;
|
|
253
253
|
break;
|
|
254
254
|
case "right":
|
|
255
|
-
z = u +
|
|
255
|
+
z = u + k, T = l - r / 2;
|
|
256
256
|
break;
|
|
257
257
|
default:
|
|
258
|
-
z = a - n / 2, T = d -
|
|
258
|
+
z = a - n / 2, T = d - k - r;
|
|
259
259
|
}
|
|
260
|
-
const
|
|
261
|
-
return
|
|
262
|
-
x:
|
|
263
|
-
y:
|
|
260
|
+
const A = Tt(z, T, n, r, w, b);
|
|
261
|
+
return X = E === "top" || E === "bottom" ? z - A.x : T - A.y, {
|
|
262
|
+
x: A.x,
|
|
263
|
+
y: A.y,
|
|
264
264
|
placement: E,
|
|
265
|
-
arrowOffset:
|
|
265
|
+
arrowOffset: X
|
|
266
266
|
};
|
|
267
267
|
}
|
|
268
268
|
function Et(i) {
|
|
@@ -319,7 +319,7 @@ const Ct = /* @__PURE__ */ new Set([
|
|
|
319
319
|
"title",
|
|
320
320
|
"target",
|
|
321
321
|
"rel"
|
|
322
|
-
]),
|
|
322
|
+
]), Pt = /^(?:https?:|mailto:)/i, Ht = /^(?:https?:|data:image\/(?!svg[+%]))/i, Mt = /* @__PURE__ */ new Set([
|
|
323
323
|
"noopener",
|
|
324
324
|
"noreferrer",
|
|
325
325
|
"nofollow",
|
|
@@ -358,9 +358,9 @@ function st(i) {
|
|
|
358
358
|
o.removeAttribute(n.name);
|
|
359
359
|
continue;
|
|
360
360
|
}
|
|
361
|
-
if (r === "href" && !
|
|
361
|
+
if (r === "href" && !Pt.test(n.value.trim()))
|
|
362
362
|
o.removeAttribute(n.name);
|
|
363
|
-
else if (r === "src" && !
|
|
363
|
+
else if (r === "src" && !Ht.test(n.value.trim()))
|
|
364
364
|
o.removeAttribute(n.name);
|
|
365
365
|
else if (r === "rel") {
|
|
366
366
|
const a = n.value.trim().toLowerCase().split(/\s+/).filter((l) => Mt.has(l));
|
|
@@ -373,16 +373,21 @@ function st(i) {
|
|
|
373
373
|
}
|
|
374
374
|
function At(i) {
|
|
375
375
|
const t = [];
|
|
376
|
-
i.image && t.push(`<div class="ci-hotspot-popover-image-wrapper"><img class="ci-hotspot-popover-image" src="${
|
|
376
|
+
i.image && t.push(`<div class="ci-hotspot-popover-image-wrapper"><img class="ci-hotspot-popover-image" src="${S(i.image)}" alt="${S(i.title || "")}"></div>`);
|
|
377
377
|
const e = [];
|
|
378
378
|
if (i.title && e.push(`<h3 class="ci-hotspot-popover-title">${C(i.title)}</h3>`), i.originalPrice || i.price) {
|
|
379
379
|
let o = "";
|
|
380
380
|
i.originalPrice && (o += `<span class="ci-hotspot-popover-original-price">${C(i.originalPrice)}</span>`), i.price && (o += `<span class="ci-hotspot-popover-price">${C(i.price)}</span>`), e.push(`<div class="ci-hotspot-popover-price-row">${o}</div>`);
|
|
381
381
|
}
|
|
382
382
|
if (i.description && e.push(`<p class="ci-hotspot-popover-description">${C(i.description)}</p>`), i.url && Dt(i.url)) {
|
|
383
|
+
const o = i.ctaText || "View details", s = i.id ? ` data-product-id="${S(i.id)}"` : "";
|
|
384
|
+
e.push(
|
|
385
|
+
`<a class="ci-hotspot-popover-cta" href="${S(i.url)}"${s}>${C(String(o))}</a>`
|
|
386
|
+
);
|
|
387
|
+
} else if (i.id) {
|
|
383
388
|
const o = i.ctaText || "View details";
|
|
384
389
|
e.push(
|
|
385
|
-
`<
|
|
390
|
+
`<button class="ci-hotspot-popover-cta" data-product-id="${S(i.id)}">${C(String(o))}</button>`
|
|
386
391
|
);
|
|
387
392
|
}
|
|
388
393
|
return e.length > 0 && t.push(`<div class="ci-hotspot-popover-body">${e.join("")}</div>`), t.join("");
|
|
@@ -397,7 +402,7 @@ function Dt(i) {
|
|
|
397
402
|
const t = i.replace(/[\s\x00-\x1f]/g, "");
|
|
398
403
|
return /^https?:\/\//i.test(t) || /^\/(?!\/)/.test(t) || /^#/.test(t);
|
|
399
404
|
}
|
|
400
|
-
function
|
|
405
|
+
function S(i) {
|
|
401
406
|
return i.replace(/&/g, "&").replace(/"/g, """).replace(/'/g, "'").replace(/</g, "<").replace(/>/g, ">");
|
|
402
407
|
}
|
|
403
408
|
class q {
|
|
@@ -412,7 +417,16 @@ class q {
|
|
|
412
417
|
...o && t.label ? { "aria-label": t.label } : {}
|
|
413
418
|
}), this.arrowEl = v("div", "ci-hotspot-popover-arrow"), this.contentEl = v("div", "ci-hotspot-popover-content"), this.element.appendChild(this.arrowEl), this.element.appendChild(this.contentEl);
|
|
414
419
|
const s = Ft(t, e.renderFn);
|
|
415
|
-
if (typeof s == "string" ? this.contentEl.innerHTML = s : s instanceof HTMLElement && this.contentEl.appendChild(s), e.
|
|
420
|
+
if (typeof s == "string" ? this.contentEl.innerHTML = s : s instanceof HTMLElement && this.contentEl.appendChild(s), e.onProductClick) {
|
|
421
|
+
const c = (n) => {
|
|
422
|
+
const r = n.target.closest(".ci-hotspot-popover-cta[data-product-id]");
|
|
423
|
+
if (!r) return;
|
|
424
|
+
const a = r.dataset.productId;
|
|
425
|
+
e.onProductClick(a, t);
|
|
426
|
+
};
|
|
427
|
+
this.contentEl.addEventListener("click", c), this.hoverCleanups.push(() => this.contentEl.removeEventListener("click", c));
|
|
428
|
+
}
|
|
429
|
+
if (e.triggerMode === "hover") {
|
|
416
430
|
const c = () => this.clearHideTimer(), n = () => this.scheduleHide();
|
|
417
431
|
this.element.addEventListener("mouseenter", c), this.element.addEventListener("mouseleave", n), this.hoverCleanups.push(
|
|
418
432
|
() => this.element.removeEventListener("mouseenter", c),
|
|
@@ -677,7 +691,7 @@ function Zt(i, t, e) {
|
|
|
677
691
|
};
|
|
678
692
|
}
|
|
679
693
|
const Yt = "Ctrl + scroll or pinch to zoom", Ot = 1500;
|
|
680
|
-
class
|
|
694
|
+
class $t {
|
|
681
695
|
constructor(t) {
|
|
682
696
|
this.hideTimer = null, this.el = document.createElement("div"), this.el.className = "ci-hotspot-scroll-hint", this.el.textContent = Yt, this.el.setAttribute("aria-hidden", "true"), t.appendChild(this.el);
|
|
683
697
|
}
|
|
@@ -690,21 +704,21 @@ class Xt {
|
|
|
690
704
|
this.hideTimer !== null && (clearTimeout(this.hideTimer), this.hideTimer = null), this.el.remove();
|
|
691
705
|
}
|
|
692
706
|
}
|
|
693
|
-
const
|
|
694
|
-
function Wt(i, t =
|
|
707
|
+
const Xt = "cloudimg.io", Nt = "v7", R = 100;
|
|
708
|
+
function Wt(i, t = R) {
|
|
695
709
|
return Math.ceil(i / t) * t;
|
|
696
710
|
}
|
|
697
|
-
function nt(i, t = 1, e = 1, o =
|
|
711
|
+
function nt(i, t = 1, e = 1, o = R) {
|
|
698
712
|
const s = i * t * e;
|
|
699
713
|
return Wt(s, o);
|
|
700
714
|
}
|
|
701
715
|
function H(i, t, e, o = 1, s = 1) {
|
|
702
|
-
const c = t.domain ||
|
|
716
|
+
const c = t.domain || Xt, n = t.apiVersion || Nt, r = t.limitFactor || R, a = nt(e, s, o, r), l = encodeURI(i);
|
|
703
717
|
let d = `https://${t.token}.${c}/${n}/${l}?width=${a}`;
|
|
704
718
|
return t.params && (d += `&${t.params}`), d;
|
|
705
719
|
}
|
|
706
720
|
function jt(i, t, e, o) {
|
|
707
|
-
const s = e.limitFactor ||
|
|
721
|
+
const s = e.limitFactor || R;
|
|
708
722
|
let c = 0;
|
|
709
723
|
const n = new ResizeObserver((r) => {
|
|
710
724
|
for (const a of r) {
|
|
@@ -719,8 +733,8 @@ function jt(i, t, e, o) {
|
|
|
719
733
|
destroy: () => n.disconnect()
|
|
720
734
|
};
|
|
721
735
|
}
|
|
722
|
-
const
|
|
723
|
-
class
|
|
736
|
+
const D = 50, K = 0.5;
|
|
737
|
+
class Vt {
|
|
724
738
|
constructor(t) {
|
|
725
739
|
this.cleanups = [];
|
|
726
740
|
const { container: e, getZoomPan: o, onEscape: s, onFullscreenToggle: c } = t, n = f(e, "keydown", (r) => {
|
|
@@ -733,16 +747,16 @@ class Bt {
|
|
|
733
747
|
s == null || s();
|
|
734
748
|
break;
|
|
735
749
|
case "ArrowUp":
|
|
736
|
-
l && l.getZoom() > 1 && (r.preventDefault(), l.pan(0,
|
|
750
|
+
l && l.getZoom() > 1 && (r.preventDefault(), l.pan(0, D));
|
|
737
751
|
break;
|
|
738
752
|
case "ArrowDown":
|
|
739
|
-
l && l.getZoom() > 1 && (r.preventDefault(), l.pan(0, -
|
|
753
|
+
l && l.getZoom() > 1 && (r.preventDefault(), l.pan(0, -D));
|
|
740
754
|
break;
|
|
741
755
|
case "ArrowLeft":
|
|
742
|
-
l && l.getZoom() > 1 && (r.preventDefault(), l.pan(
|
|
756
|
+
l && l.getZoom() > 1 && (r.preventDefault(), l.pan(D, 0));
|
|
743
757
|
break;
|
|
744
758
|
case "ArrowRight":
|
|
745
|
-
l && l.getZoom() > 1 && (r.preventDefault(), l.pan(-
|
|
759
|
+
l && l.getZoom() > 1 && (r.preventDefault(), l.pan(-D, 0));
|
|
746
760
|
break;
|
|
747
761
|
case "+":
|
|
748
762
|
case "=":
|
|
@@ -765,9 +779,9 @@ class Bt {
|
|
|
765
779
|
this.cleanups.forEach((t) => t()), this.cleanups = [];
|
|
766
780
|
}
|
|
767
781
|
}
|
|
768
|
-
const
|
|
782
|
+
const Bt = 'a[href], button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])';
|
|
769
783
|
function U(i) {
|
|
770
|
-
return Array.from(i.querySelectorAll(
|
|
784
|
+
return Array.from(i.querySelectorAll(Bt));
|
|
771
785
|
}
|
|
772
786
|
function J(i, t) {
|
|
773
787
|
let e = !1, o = null;
|
|
@@ -791,7 +805,7 @@ function J(i, t) {
|
|
|
791
805
|
}
|
|
792
806
|
return { activate: s, deactivate: c, destroy: n };
|
|
793
807
|
}
|
|
794
|
-
let x = null,
|
|
808
|
+
let x = null, I = 0;
|
|
795
809
|
function _t(i) {
|
|
796
810
|
ot() && (x || (x = v("div", void 0, {
|
|
797
811
|
"aria-live": "polite",
|
|
@@ -802,10 +816,10 @@ function _t(i) {
|
|
|
802
816
|
}));
|
|
803
817
|
}
|
|
804
818
|
function Q() {
|
|
805
|
-
|
|
819
|
+
I++;
|
|
806
820
|
}
|
|
807
821
|
function Gt() {
|
|
808
|
-
|
|
822
|
+
I = Math.max(0, I - 1), I === 0 && x && (x.remove(), x = null);
|
|
809
823
|
}
|
|
810
824
|
const tt = '<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="15 3 21 3 21 9"/><polyline points="9 21 3 21 3 15"/><line x1="21" x2="14" y1="3" y2="10"/><line x1="3" x2="10" y1="21" y2="14"/></svg>', qt = '<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="4 14 10 14 10 20"/><polyline points="20 10 14 10 14 4"/><line x1="14" x2="21" y1="10" y2="3"/><line x1="3" x2="10" y1="21" y2="14"/></svg>';
|
|
811
825
|
function Kt() {
|
|
@@ -869,9 +883,9 @@ function Jt(i, t = {}) {
|
|
|
869
883
|
destroy: h
|
|
870
884
|
};
|
|
871
885
|
}
|
|
872
|
-
const Qt = '.ci-hotspot-container{--ci-hotspot-marker-size: 24px;--ci-hotspot-marker-color: #1a1a1a;--ci-hotspot-marker-bg: rgba(255, 255, 255, .8);--ci-hotspot-marker-border-width: 2px;--ci-hotspot-marker-border-color: rgba(255, 255, 255, .4);--ci-hotspot-marker-border: var(--ci-hotspot-marker-border-width) solid var(--ci-hotspot-marker-border-color);--ci-hotspot-marker-border-radius: 50%;--ci-hotspot-marker-shadow: 0 2px 8px rgba(0, 0, 0, .15);--ci-hotspot-pulse-color: rgba(0, 0, 0, .15);--ci-hotspot-pulse-size: 40px;--ci-hotspot-pulse-duration: 1.8s;--ci-hotspot-popover-bg: #ffffff;--ci-hotspot-popover-color: #1a1a1a;--ci-hotspot-popover-border: 1px solid rgba(0, 0, 0, .1);--ci-hotspot-popover-border-radius: 12px;--ci-hotspot-popover-shadow: 0 8px 32px rgba(0, 0, 0, .12);--ci-hotspot-popover-padding: 16px;--ci-hotspot-popover-max-width: 320px;--ci-hotspot-popover-max-height: 400px;--ci-hotspot-popover-font-family: inherit;--ci-hotspot-popover-font-size: 14px;--ci-hotspot-popover-line-height: 1.5;--ci-hotspot-popover-z-index: 1000;--ci-hotspot-arrow-size: 8px;--ci-hotspot-arrow-color: var(--ci-hotspot-popover-bg);--ci-hotspot-title-font-size: 16px;--ci-hotspot-title-font-weight: 600;--ci-hotspot-title-color: #1a1a1a;--ci-hotspot-price-color: #2d8c3c;--ci-hotspot-price-font-size: 18px;--ci-hotspot-price-font-weight: 700;--ci-hotspot-description-color: #666666;--ci-hotspot-cta-bg: #0058a3;--ci-hotspot-cta-color: #ffffff;--ci-hotspot-cta-border-radius: 8px;--ci-hotspot-cta-padding: 8px 16px;--ci-hotspot-original-price-color: #999999;--ci-hotspot-popover-text-align: left;--ci-hotspot-hover-transition: .2s ease;--ci-hotspot-popover-transition: .3s ease;--ci-hotspot-scene-transition-duration: .4s;--ci-hotspot-zoom-controls-bg: rgba(255, 255, 255, .9);--ci-hotspot-zoom-controls-color: #333333;--ci-hotspot-zoom-controls-border-radius: 8px;--ci-hotspot-zoom-controls-shadow: 0 2px 8px rgba(0, 0, 0, .15)}.ci-hotspot-container *,.ci-hotspot-container *:before,.ci-hotspot-container *:after{box-sizing:border-box}.ci-hotspot-container{position:relative;overflow:hidden;width:100%;line-height:0;user-select:none;-webkit-user-select:none}.ci-hotspot-viewport{position:relative;width:100%;transform-origin:0 0;will-change:transform;transition:transform .3s ease}.ci-hotspot-viewport--dragging{transition:none}.ci-hotspot-image{display:block;width:100%;height:auto;pointer-events:none}.ci-hotspot-markers{position:absolute;top:0;right:0;bottom:0;left:0;pointer-events:none}.ci-hotspot-marker{position:absolute;width:var(--ci-hotspot-marker-size);height:var(--ci-hotspot-marker-size);padding:0;border:var(--ci-hotspot-marker-border);border-radius:var(--ci-hotspot-marker-border-radius);background:var(--ci-hotspot-marker-bg);color:var(--ci-hotspot-marker-color);box-shadow:var(--ci-hotspot-marker-shadow);cursor:pointer;pointer-events:auto;transform:translate(-50%,-50%) scale(calc(1 / var(--zoom, 1)));transition:transform var(--ci-hotspot-hover-transition),box-shadow var(--ci-hotspot-hover-transition);z-index:1;display:flex;align-items:center;justify-content:center;font-size:12px;line-height:1;outline:none}.ci-hotspot-marker:hover{transform:translate(-50%,-50%) scale(calc(1.2 / var(--zoom, 1)));box-shadow:0 4px 12px #0006}.ci-hotspot-marker:focus-visible{outline:3px solid var(--ci-hotspot-focus-ring, #4A90D9);outline-offset:2px}.ci-hotspot-marker--active{transform:translate(-50%,-50%) scale(calc(1.2 / var(--zoom, 1)));z-index:2}.ci-hotspot-marker--hidden{display:none}.ci-hotspot-marker--dot-label{overflow:visible}.ci-hotspot-marker-label{position:absolute;left:calc(50% + var(--ci-hotspot-marker-size) / 2 + 4px);top:50%;transform:translateY(-50%);padding:3px 10px;font-size:11px;font-weight:600;white-space:nowrap;color:var(--ci-hotspot-marker-color);background:var(--ci-hotspot-marker-bg);border:var(--ci-hotspot-marker-border);border-radius:100px;box-shadow:var(--ci-hotspot-marker-shadow)}.ci-hotspot-marker--dot-label.ci-hotspot-marker--pulse{animation:none}.ci-hotspot-marker--pulse:before{content:"";position:absolute;top:50%;left:50%;width:var(--ci-hotspot-pulse-size);height:var(--ci-hotspot-pulse-size);border-radius:50%;background:var(--ci-hotspot-pulse-color);transform:translate(-50%,-50%) scale(1);animation:ci-hotspot-pulse var(--ci-hotspot-pulse-duration) ease-out infinite;pointer-events:none}@keyframes ci-hotspot-pulse{0%{transform:translate(-50%,-50%) scale(1);opacity:1}to{transform:translate(-50%,-50%) scale(1.8);opacity:0}}.ci-hotspot-marker--pulse{animation:ci-hotspot-breathe 2.4s ease-in-out infinite}.ci-hotspot-marker--pulse:hover,.ci-hotspot-marker--pulse.ci-hotspot-marker--active{animation:none}@keyframes ci-hotspot-breathe{0%,to{transform:translate(-50%,-50%) scale(calc(1 / var(--zoom, 1)))}50%{transform:translate(-50%,-50%) scale(calc(1.15 / var(--zoom, 1)))}}.ci-hotspot-popover{position:absolute;z-index:var(--ci-hotspot-popover-z-index);max-width:var(--ci-hotspot-popover-max-width);background:var(--ci-hotspot-popover-bg);color:var(--ci-hotspot-popover-color);border:var(--ci-hotspot-popover-border);border-radius:var(--ci-hotspot-popover-border-radius);box-shadow:var(--ci-hotspot-popover-shadow);font-family:var(--ci-hotspot-popover-font-family);font-size:var(--ci-hotspot-popover-font-size);line-height:var(--ci-hotspot-popover-line-height);opacity:0;pointer-events:none;transform:translateY(4px);transition:opacity var(--ci-hotspot-popover-transition),transform var(--ci-hotspot-popover-transition)}.ci-hotspot-popover--visible{opacity:1;pointer-events:auto;transform:translateY(0);animation:ci-hotspot-popover-in var(--ci-hotspot-popover-transition) forwards}@keyframes ci-hotspot-popover-in{0%{opacity:0;transform:translateY(4px)}to{opacity:1;transform:translateY(0)}}.ci-hotspot-popover-arrow{position:absolute;width:calc(var(--ci-hotspot-arrow-size) * 2);height:calc(var(--ci-hotspot-arrow-size) * 2);background:var(--ci-hotspot-arrow-color);transform:rotate(45deg);pointer-events:none}.ci-hotspot-popover[data-placement=top] .ci-hotspot-popover-arrow{bottom:calc(var(--ci-hotspot-arrow-size) * -1)}.ci-hotspot-popover[data-placement=bottom] .ci-hotspot-popover-arrow{top:calc(var(--ci-hotspot-arrow-size) * -1)}.ci-hotspot-popover[data-placement=left] .ci-hotspot-popover-arrow{right:calc(var(--ci-hotspot-arrow-size) * -1)}.ci-hotspot-popover[data-placement=right] .ci-hotspot-popover-arrow{left:calc(var(--ci-hotspot-arrow-size) * -1)}.ci-hotspot-popover-content{padding:var(--ci-hotspot-popover-padding);max-height:var(--ci-hotspot-popover-max-height);overflow-y:auto;overflow-x:hidden;border-radius:var(--ci-hotspot-popover-border-radius)}.ci-hotspot-popover-image-wrapper{aspect-ratio:16 / 9;overflow:hidden;border-radius:calc(var(--ci-hotspot-popover-border-radius) - 4px) calc(var(--ci-hotspot-popover-border-radius) - 4px) 0 0;margin:calc(var(--ci-hotspot-popover-padding) * -1);margin-bottom:12px;width:calc(100% + var(--ci-hotspot-popover-padding) * 2)}.ci-hotspot-popover-image{display:block;width:100%;height:100%;object-fit:cover}.ci-hotspot-popover-body{line-height:1.5;text-align:var(--ci-hotspot-popover-text-align)}.ci-hotspot-popover-title{margin:0 0 4px;font-size:var(--ci-hotspot-title-font-size);font-weight:var(--ci-hotspot-title-font-weight);color:var(--ci-hotspot-title-color)}.ci-hotspot-popover-price{display:inline-block;margin-bottom:8px;font-size:var(--ci-hotspot-price-font-size);font-weight:var(--ci-hotspot-price-font-weight);color:var(--ci-hotspot-price-color)}.ci-hotspot-popover-price-row{display:inline-flex;align-items:baseline;gap:6px;margin-bottom:8px;flex-wrap:wrap}.ci-hotspot-popover-price-row .ci-hotspot-popover-price{margin-bottom:0}.ci-hotspot-popover-original-price{font-size:calc(var(--ci-hotspot-price-font-size) - 2px);font-weight:500;color:var(--ci-hotspot-original-price-color);text-decoration:line-through}.ci-hotspot-popover-description{margin:0 0 12px;color:var(--ci-hotspot-description-color)}.ci-hotspot-popover-cta{display:inline-block;padding:var(--ci-hotspot-cta-padding);background:var(--ci-hotspot-cta-bg);color:var(--ci-hotspot-cta-color);border-radius:var(--ci-hotspot-cta-border-radius);text-decoration:none;font-weight:600;font-size:14px;transition:opacity .2s ease}.ci-hotspot-popover-cta:hover{opacity:.9}.ci-hotspot-popover-cta:focus-visible{outline:3px solid var(--ci-hotspot-focus-ring, #4A90D9);outline-offset:2px}.ci-hotspot-zoom-controls{position:absolute;display:flex;gap:2px;background:var(--ci-hotspot-zoom-controls-bg);border-radius:var(--ci-hotspot-zoom-controls-border-radius);box-shadow:var(--ci-hotspot-zoom-controls-shadow);z-index:10;overflow:hidden}.ci-hotspot-zoom-controls button{display:flex;align-items:center;justify-content:center;width:36px;height:36px;border:none;background:transparent;color:var(--ci-hotspot-zoom-controls-color);cursor:pointer;font-size:18px;line-height:1;padding:0;transition:background .15s ease}.ci-hotspot-zoom-controls button:hover{background:#0000000d}.ci-hotspot-zoom-controls button:disabled{opacity:.3;cursor:default}.ci-hotspot-zoom-controls button:disabled:hover{background:transparent}.ci-hotspot-zoom-controls button svg{width:18px;height:18px}.ci-hotspot-zoom-controls button:focus-visible{outline:3px solid var(--ci-hotspot-focus-ring, #4A90D9);outline-offset:-3px}.ci-hotspot-zoom-controls[data-position=bottom-right]{bottom:16px;right:16px}.ci-hotspot-zoom-controls[data-position=bottom-left]{bottom:16px;left:16px}.ci-hotspot-zoom-controls[data-position=bottom-center]{bottom:16px;left:50%;transform:translate(-50%)}.ci-hotspot-zoom-controls[data-position=top-right]{top:16px;right:16px}.ci-hotspot-zoom-controls[data-position=top-left]{top:16px;left:16px}.ci-hotspot-zoom-controls[data-position=top-center]{top:16px;left:50%;transform:translate(-50%)}.ci-hotspot-zoom-controls[data-position=top-right]~.ci-hotspot-fullscreen-btn{right:136px}.ci-hotspot-cluster{position:absolute;display:flex;align-items:center;justify-content:center;min-width:32px;height:32px;padding:0 8px;border-radius:16px;border:2px solid rgba(255,255,255,.8);background:var(--ci-hotspot-marker-bg);color:var(--ci-hotspot-marker-color);font-size:13px;font-weight:700;cursor:pointer;pointer-events:auto;transform:translate(-50%,-50%) scale(calc(1 / var(--zoom, 1)));box-shadow:var(--ci-hotspot-marker-shadow)}.ci-hotspot-loading .ci-hotspot-image{opacity:0;transition:opacity .3s ease}.ci-hotspot-loading .ci-hotspot-markers{display:none}.ci-hotspot-theme-dark{--ci-hotspot-marker-bg: rgba(0, 0, 0, .6);--ci-hotspot-marker-color: #ffffff;--ci-hotspot-marker-border-color: rgba(255, 255, 255, .6);--ci-hotspot-pulse-color: rgba(255, 255, 255, .15);--ci-hotspot-popover-bg: #1a1a1a;--ci-hotspot-popover-color: #f0f0f0;--ci-hotspot-popover-border: 1px solid rgba(255, 255, 255, .1);--ci-hotspot-popover-shadow: 0 8px 32px rgba(0, 0, 0, .4);--ci-hotspot-title-color: #f0f0f0;--ci-hotspot-description-color: #aaaaaa;--ci-hotspot-original-price-color: #777777;--ci-hotspot-zoom-controls-bg: rgba(30, 30, 30, .9);--ci-hotspot-zoom-controls-color: #f0f0f0}.ci-hotspot-marker-inverted{--ci-hotspot-marker-bg: rgba(0, 0, 0, .6);--ci-hotspot-marker-color: #ffffff;--ci-hotspot-marker-border-color: rgba(255, 255, 255, .8);--ci-hotspot-marker-shadow: 0 2px 8px rgba(0, 0, 0, .3);--ci-hotspot-pulse-color: rgba(0, 0, 0, .2)}.ci-hotspot-theme-dark.ci-hotspot-marker-inverted{--ci-hotspot-marker-bg: rgba(255, 255, 255, .8);--ci-hotspot-marker-color: #1a1a1a;--ci-hotspot-marker-border-color: rgba(255, 255, 255, .4);--ci-hotspot-pulse-color: rgba(255, 255, 255, .2)}.ci-hotspot-marker-brand{--ci-hotspot-marker-bg: var(--ci-hotspot-brand-color, #00aaff);--ci-hotspot-marker-color: #ffffff;--ci-hotspot-marker-border-color: rgba(255, 255, 255, .9);--ci-hotspot-marker-shadow: 0 2px 8px rgba(0, 0, 0, .25);--ci-hotspot-pulse-color: var(--ci-hotspot-brand-color, #00aaff)}.ci-hotspot-scroll-hint{position:absolute;bottom:16px;left:50%;transform:translate(-50%) translateY(4px);padding:8px 16px;border-radius:20px;background:#000000b3;color:#fff;font-size:13px;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,sans-serif;line-height:1;white-space:nowrap;z-index:100;opacity:0;pointer-events:none;transition:opacity .3s ease,transform .3s ease}.ci-hotspot-scroll-hint--visible{opacity:1;transform:translate(-50%) translateY(0)}.ci-hotspot-container--fixed-ratio .ci-hotspot-viewport{overflow:hidden;height:0}.ci-hotspot-container--fixed-ratio .ci-hotspot-image{position:absolute;top:0;left:0;width:100%;height:100%;object-fit:contain}.ci-hotspot-container--fixed-ratio .ci-hotspot-markers{z-index:1}.ci-hotspot-scene-incoming{position:absolute;top:0;left:0;width:100%;height:100%;object-fit:contain;pointer-events:none;z-index:0}.ci-hotspot-scene-fade-in{animation:ci-hotspot-scene-fade-in var(--ci-hotspot-scene-transition-duration) ease forwards;z-index:1}.ci-hotspot-scene-fade-out{animation:ci-hotspot-scene-fade-out var(--ci-hotspot-scene-transition-duration) ease forwards}@keyframes ci-hotspot-scene-fade-in{0%{opacity:0}to{opacity:1}}@keyframes ci-hotspot-scene-fade-out{0%{opacity:1}to{opacity:0}}.ci-hotspot-scene-slide-in{animation:ci-hotspot-scene-slide-in var(--ci-hotspot-scene-transition-duration) ease forwards;z-index:1}.ci-hotspot-scene-slide-out{animation:ci-hotspot-scene-slide-out var(--ci-hotspot-scene-transition-duration) ease forwards}@keyframes ci-hotspot-scene-slide-in{0%{transform:translate(100%)}to{transform:translate(0)}}@keyframes ci-hotspot-scene-slide-out{0%{transform:translate(0)}to{transform:translate(-100%)}}.ci-hotspot-scene-slide-in-reverse{animation:ci-hotspot-scene-slide-in-reverse var(--ci-hotspot-scene-transition-duration) ease forwards;z-index:1}.ci-hotspot-scene-slide-out-reverse{animation:ci-hotspot-scene-slide-out-reverse var(--ci-hotspot-scene-transition-duration) ease forwards}@keyframes ci-hotspot-scene-slide-in-reverse{0%{transform:translate(-100%)}to{transform:translate(0)}}@keyframes ci-hotspot-scene-slide-out-reverse{0%{transform:translate(0)}to{transform:translate(100%)}}.ci-hotspot-scene-slide-in-up{animation:ci-hotspot-scene-slide-in-up var(--ci-hotspot-scene-transition-duration) ease forwards;z-index:1}.ci-hotspot-scene-slide-out-up{animation:ci-hotspot-scene-slide-out-up var(--ci-hotspot-scene-transition-duration) ease forwards}@keyframes ci-hotspot-scene-slide-in-up{0%{transform:translateY(-100%)}to{transform:translateY(0)}}@keyframes ci-hotspot-scene-slide-out-up{0%{transform:translateY(0)}to{transform:translateY(100%)}}.ci-hotspot-scene-slide-in-down{animation:ci-hotspot-scene-slide-in-down var(--ci-hotspot-scene-transition-duration) ease forwards;z-index:1}.ci-hotspot-scene-slide-out-down{animation:ci-hotspot-scene-slide-out-down var(--ci-hotspot-scene-transition-duration) ease forwards}@keyframes ci-hotspot-scene-slide-in-down{0%{transform:translateY(100%)}to{transform:translateY(0)}}@keyframes ci-hotspot-scene-slide-out-down{0%{transform:translateY(0)}to{transform:translateY(-100%)}}.ci-hotspot-navigate-icon{width:75%;height:75%;display:block}.ci-hotspot-scene-transitioning .ci-hotspot-markers{opacity:0;pointer-events:none;transition:opacity .1s ease}.ci-hotspot-scene-loading:after{content:"";position:absolute;top:50%;left:50%;width:32px;height:32px;margin:-16px 0 0 -16px;border:3px solid rgba(0,0,0,.1);border-top-color:#00000080;border-radius:50%;animation:ci-hotspot-spin .6s linear infinite;z-index:10;pointer-events:none}.ci-hotspot-theme-dark .ci-hotspot-scene-loading:after,.ci-hotspot-scene-loading.ci-hotspot-theme-dark:after{border-color:#ffffff1a;border-top-color:#ffffff80}@keyframes ci-hotspot-spin{to{transform:rotate(360deg)}}.ci-hotspot-fullscreen-btn{position:absolute;top:16px;right:16px;display:flex;align-items:center;justify-content:center;width:36px;height:36px;border:none;border-radius:var(--ci-hotspot-zoom-controls-border-radius);background:var(--ci-hotspot-zoom-controls-bg);color:var(--ci-hotspot-zoom-controls-color);box-shadow:var(--ci-hotspot-zoom-controls-shadow);cursor:pointer;padding:0;z-index:10;transition:background .15s ease}.ci-hotspot-fullscreen-btn:hover{background:#e6e6e6f2}.ci-hotspot-fullscreen-btn svg{width:18px;height:18px}.ci-hotspot-fullscreen-btn:focus-visible{outline:3px solid var(--ci-hotspot-focus-ring, #4A90D9);outline-offset:2px}.ci-hotspot-container--fullscreen{background:#000;width:100vw;height:100vh;display:flex;align-items:center;justify-content:center}.ci-hotspot-container--fullscreen .ci-hotspot-viewport{width:fit-content;max-width:100%;max-height:100%}.ci-hotspot-container--fullscreen .ci-hotspot-image{max-height:100vh;width:auto;max-width:100%;object-fit:contain}.ci-hotspot-container--fullscreen.ci-hotspot-container--fixed-ratio .ci-hotspot-viewport{width:100%;height:100%;padding-bottom:0}.ci-hotspot-container--fullscreen.ci-hotspot-container--fixed-ratio .ci-hotspot-image{width:100%;height:100%;max-height:none}.ci-hotspot-theme-dark .ci-hotspot-fullscreen-btn,.ci-hotspot-container--fullscreen .ci-hotspot-fullscreen-btn{background:#1e1e1ee6;color:#f0f0f0}.ci-hotspot-theme-dark .ci-hotspot-fullscreen-btn:hover,.ci-hotspot-container--fullscreen .ci-hotspot-fullscreen-btn:hover{background:#3c3c3cf2}@media (prefers-reduced-motion: reduce){.ci-hotspot-marker,.ci-hotspot-marker:before,.ci-hotspot-popover{animation:none!important;transition-duration:.01ms!important}.ci-hotspot-viewport,.ci-hotspot-scroll-hint{transition-duration:.01ms!important}.ci-hotspot-scene-fade-in,.ci-hotspot-scene-fade-out,.ci-hotspot-scene-slide-in,.ci-hotspot-scene-slide-out,.ci-hotspot-scene-slide-in-reverse,.ci-hotspot-scene-slide-out-reverse,.ci-hotspot-scene-slide-in-up,.ci-hotspot-scene-slide-out-up,.ci-hotspot-scene-slide-in-down,.ci-hotspot-scene-slide-out-down{animation-duration:.01ms!important}.ci-hotspot-scene-transitioning .ci-hotspot-markers{transition-duration:.01ms!important}.ci-hotspot-scene-loading:after{animation-duration:.01ms!important}.ci-hotspot-fullscreen-btn{transition-duration:.01ms!important}}', P = class P {
|
|
886
|
+
const Qt = '.ci-hotspot-container{--ci-hotspot-marker-size: 24px;--ci-hotspot-marker-color: #1a1a1a;--ci-hotspot-marker-bg: rgba(255, 255, 255, .8);--ci-hotspot-marker-border-width: 2px;--ci-hotspot-marker-border-color: rgba(255, 255, 255, .4);--ci-hotspot-marker-border: var(--ci-hotspot-marker-border-width) solid var(--ci-hotspot-marker-border-color);--ci-hotspot-marker-border-radius: 50%;--ci-hotspot-marker-shadow: 0 2px 8px rgba(0, 0, 0, .15);--ci-hotspot-pulse-color: rgba(0, 0, 0, .15);--ci-hotspot-pulse-size: 40px;--ci-hotspot-pulse-duration: 1.8s;--ci-hotspot-popover-bg: #ffffff;--ci-hotspot-popover-color: #1a1a1a;--ci-hotspot-popover-border: 1px solid rgba(0, 0, 0, .1);--ci-hotspot-popover-border-radius: 12px;--ci-hotspot-popover-shadow: 0 8px 32px rgba(0, 0, 0, .12);--ci-hotspot-popover-padding: 16px;--ci-hotspot-popover-max-width: 320px;--ci-hotspot-popover-max-height: 400px;--ci-hotspot-popover-font-family: inherit;--ci-hotspot-popover-font-size: 14px;--ci-hotspot-popover-line-height: 1.5;--ci-hotspot-popover-z-index: 1000;--ci-hotspot-arrow-size: 8px;--ci-hotspot-arrow-color: var(--ci-hotspot-popover-bg);--ci-hotspot-title-font-size: 16px;--ci-hotspot-title-font-weight: 600;--ci-hotspot-title-color: #1a1a1a;--ci-hotspot-price-color: #2d8c3c;--ci-hotspot-price-font-size: 18px;--ci-hotspot-price-font-weight: 700;--ci-hotspot-description-color: #666666;--ci-hotspot-cta-bg: #0058a3;--ci-hotspot-cta-color: #ffffff;--ci-hotspot-cta-border-radius: 8px;--ci-hotspot-cta-padding: 8px 16px;--ci-hotspot-original-price-color: #999999;--ci-hotspot-popover-text-align: left;--ci-hotspot-hover-transition: .2s ease;--ci-hotspot-popover-transition: .3s ease;--ci-hotspot-scene-transition-duration: .4s;--ci-hotspot-zoom-controls-bg: rgba(255, 255, 255, .9);--ci-hotspot-zoom-controls-color: #333333;--ci-hotspot-zoom-controls-border-radius: 8px;--ci-hotspot-zoom-controls-shadow: 0 2px 8px rgba(0, 0, 0, .15)}.ci-hotspot-container *,.ci-hotspot-container *:before,.ci-hotspot-container *:after{box-sizing:border-box}.ci-hotspot-container{position:relative;overflow:hidden;width:100%;line-height:0;user-select:none;-webkit-user-select:none}.ci-hotspot-viewport{position:relative;width:100%;transform-origin:0 0;will-change:transform;transition:transform .3s ease}.ci-hotspot-viewport--dragging{transition:none}.ci-hotspot-image{display:block;width:100%;height:auto;pointer-events:none}.ci-hotspot-markers{position:absolute;top:0;right:0;bottom:0;left:0;pointer-events:none}.ci-hotspot-marker{position:absolute;width:var(--ci-hotspot-marker-size);height:var(--ci-hotspot-marker-size);padding:0;border:var(--ci-hotspot-marker-border);border-radius:var(--ci-hotspot-marker-border-radius);background:var(--ci-hotspot-marker-bg);color:var(--ci-hotspot-marker-color);box-shadow:var(--ci-hotspot-marker-shadow);cursor:pointer;pointer-events:auto;transform:translate(-50%,-50%) scale(calc(1 / var(--zoom, 1)));transition:transform var(--ci-hotspot-hover-transition),box-shadow var(--ci-hotspot-hover-transition);z-index:1;display:flex;align-items:center;justify-content:center;font-size:12px;line-height:1;outline:none}.ci-hotspot-marker:hover{transform:translate(-50%,-50%) scale(calc(1.2 / var(--zoom, 1)));box-shadow:0 4px 12px #0006}.ci-hotspot-marker:focus-visible{outline:3px solid var(--ci-hotspot-focus-ring, #4A90D9);outline-offset:2px}.ci-hotspot-marker--active{transform:translate(-50%,-50%) scale(calc(1.2 / var(--zoom, 1)));z-index:2}.ci-hotspot-marker--hidden{display:none}.ci-hotspot-marker--dot-label{overflow:visible}.ci-hotspot-marker-label{position:absolute;left:calc(50% + var(--ci-hotspot-marker-size) / 2 + 4px);top:50%;transform:translateY(-50%);padding:3px 10px;font-size:11px;font-weight:600;white-space:nowrap;color:var(--ci-hotspot-marker-color);background:var(--ci-hotspot-marker-bg);border:var(--ci-hotspot-marker-border);border-radius:100px;box-shadow:var(--ci-hotspot-marker-shadow)}.ci-hotspot-marker--dot-label.ci-hotspot-marker--pulse{animation:none}.ci-hotspot-marker--pulse:before{content:"";position:absolute;top:50%;left:50%;width:var(--ci-hotspot-pulse-size);height:var(--ci-hotspot-pulse-size);border-radius:50%;background:var(--ci-hotspot-pulse-color);transform:translate(-50%,-50%) scale(1);animation:ci-hotspot-pulse var(--ci-hotspot-pulse-duration) ease-out infinite;pointer-events:none}@keyframes ci-hotspot-pulse{0%{transform:translate(-50%,-50%) scale(1);opacity:1}to{transform:translate(-50%,-50%) scale(1.8);opacity:0}}.ci-hotspot-marker--pulse{animation:ci-hotspot-breathe 2.4s ease-in-out infinite}.ci-hotspot-marker--pulse:hover,.ci-hotspot-marker--pulse.ci-hotspot-marker--active{animation:none}@keyframes ci-hotspot-breathe{0%,to{transform:translate(-50%,-50%) scale(calc(1 / var(--zoom, 1)))}50%{transform:translate(-50%,-50%) scale(calc(1.15 / var(--zoom, 1)))}}.ci-hotspot-popover{position:absolute;z-index:var(--ci-hotspot-popover-z-index);max-width:var(--ci-hotspot-popover-max-width);background:var(--ci-hotspot-popover-bg);color:var(--ci-hotspot-popover-color);border:var(--ci-hotspot-popover-border);border-radius:var(--ci-hotspot-popover-border-radius);box-shadow:var(--ci-hotspot-popover-shadow);font-family:var(--ci-hotspot-popover-font-family);font-size:var(--ci-hotspot-popover-font-size);line-height:var(--ci-hotspot-popover-line-height);opacity:0;pointer-events:none;transform:translateY(4px);transition:opacity var(--ci-hotspot-popover-transition),transform var(--ci-hotspot-popover-transition)}.ci-hotspot-popover--visible{opacity:1;pointer-events:auto;transform:translateY(0);animation:ci-hotspot-popover-in var(--ci-hotspot-popover-transition) forwards}@keyframes ci-hotspot-popover-in{0%{opacity:0;transform:translateY(4px)}to{opacity:1;transform:translateY(0)}}.ci-hotspot-popover-arrow{position:absolute;width:calc(var(--ci-hotspot-arrow-size) * 2);height:calc(var(--ci-hotspot-arrow-size) * 2);background:var(--ci-hotspot-arrow-color);transform:rotate(45deg);pointer-events:none}.ci-hotspot-popover[data-placement=top] .ci-hotspot-popover-arrow{bottom:calc(var(--ci-hotspot-arrow-size) * -1)}.ci-hotspot-popover[data-placement=bottom] .ci-hotspot-popover-arrow{top:calc(var(--ci-hotspot-arrow-size) * -1)}.ci-hotspot-popover[data-placement=left] .ci-hotspot-popover-arrow{right:calc(var(--ci-hotspot-arrow-size) * -1)}.ci-hotspot-popover[data-placement=right] .ci-hotspot-popover-arrow{left:calc(var(--ci-hotspot-arrow-size) * -1)}.ci-hotspot-popover-content{padding:var(--ci-hotspot-popover-padding);max-height:var(--ci-hotspot-popover-max-height);overflow-y:auto;overflow-x:hidden;border-radius:var(--ci-hotspot-popover-border-radius)}.ci-hotspot-popover-image-wrapper{aspect-ratio:16 / 9;overflow:hidden;border-radius:calc(var(--ci-hotspot-popover-border-radius) - 4px) calc(var(--ci-hotspot-popover-border-radius) - 4px) 0 0;margin:calc(var(--ci-hotspot-popover-padding) * -1);margin-bottom:12px;width:calc(100% + var(--ci-hotspot-popover-padding) * 2)}.ci-hotspot-popover-image{display:block;width:100%;height:100%;object-fit:cover}.ci-hotspot-popover-body{line-height:1.5;text-align:var(--ci-hotspot-popover-text-align)}.ci-hotspot-popover-title{margin:0 0 4px;font-size:var(--ci-hotspot-title-font-size);font-weight:var(--ci-hotspot-title-font-weight);color:var(--ci-hotspot-title-color)}.ci-hotspot-popover-price{display:inline-block;margin-bottom:8px;font-size:var(--ci-hotspot-price-font-size);font-weight:var(--ci-hotspot-price-font-weight);color:var(--ci-hotspot-price-color)}.ci-hotspot-popover-price-row{display:inline-flex;align-items:baseline;gap:6px;margin-bottom:8px;flex-wrap:wrap}.ci-hotspot-popover-price-row .ci-hotspot-popover-price{margin-bottom:0}.ci-hotspot-popover-original-price{font-size:calc(var(--ci-hotspot-price-font-size) - 2px);font-weight:500;color:var(--ci-hotspot-original-price-color);text-decoration:line-through}.ci-hotspot-popover-description{margin:0 0 12px;color:var(--ci-hotspot-description-color)}.ci-hotspot-popover-cta{display:inline-block;padding:var(--ci-hotspot-cta-padding);background:var(--ci-hotspot-cta-bg);color:var(--ci-hotspot-cta-color);border-radius:var(--ci-hotspot-cta-border-radius);text-decoration:none;font-weight:600;font-size:14px;transition:opacity .2s ease}.ci-hotspot-popover-cta:hover{opacity:.9}button.ci-hotspot-popover-cta{cursor:pointer;border:none;font:inherit;width:100%}.ci-hotspot-popover-cta:focus-visible{outline:3px solid var(--ci-hotspot-focus-ring, #4A90D9);outline-offset:2px}.ci-hotspot-zoom-controls{position:absolute;display:flex;gap:2px;background:var(--ci-hotspot-zoom-controls-bg);border-radius:var(--ci-hotspot-zoom-controls-border-radius);box-shadow:var(--ci-hotspot-zoom-controls-shadow);z-index:10;overflow:hidden}.ci-hotspot-zoom-controls button{display:flex;align-items:center;justify-content:center;width:36px;height:36px;border:none;background:transparent;color:var(--ci-hotspot-zoom-controls-color);cursor:pointer;font-size:18px;line-height:1;padding:0;transition:background .15s ease}.ci-hotspot-zoom-controls button:hover{background:#0000000d}.ci-hotspot-zoom-controls button:disabled{opacity:.3;cursor:default}.ci-hotspot-zoom-controls button:disabled:hover{background:transparent}.ci-hotspot-zoom-controls button svg{width:18px;height:18px}.ci-hotspot-zoom-controls button:focus-visible{outline:3px solid var(--ci-hotspot-focus-ring, #4A90D9);outline-offset:-3px}.ci-hotspot-zoom-controls[data-position=bottom-right]{bottom:16px;right:16px}.ci-hotspot-zoom-controls[data-position=bottom-left]{bottom:16px;left:16px}.ci-hotspot-zoom-controls[data-position=bottom-center]{bottom:16px;left:50%;transform:translate(-50%)}.ci-hotspot-zoom-controls[data-position=top-right]{top:16px;right:16px}.ci-hotspot-zoom-controls[data-position=top-left]{top:16px;left:16px}.ci-hotspot-zoom-controls[data-position=top-center]{top:16px;left:50%;transform:translate(-50%)}.ci-hotspot-zoom-controls[data-position=top-right]~.ci-hotspot-fullscreen-btn{right:136px}.ci-hotspot-cluster{position:absolute;display:flex;align-items:center;justify-content:center;min-width:32px;height:32px;padding:0 8px;border-radius:16px;border:2px solid rgba(255,255,255,.8);background:var(--ci-hotspot-marker-bg);color:var(--ci-hotspot-marker-color);font-size:13px;font-weight:700;cursor:pointer;pointer-events:auto;transform:translate(-50%,-50%) scale(calc(1 / var(--zoom, 1)));box-shadow:var(--ci-hotspot-marker-shadow)}.ci-hotspot-loading .ci-hotspot-image{opacity:0;transition:opacity .3s ease}.ci-hotspot-loading .ci-hotspot-markers{display:none}.ci-hotspot-theme-dark{--ci-hotspot-marker-bg: rgba(0, 0, 0, .6);--ci-hotspot-marker-color: #ffffff;--ci-hotspot-marker-border-color: rgba(255, 255, 255, .6);--ci-hotspot-pulse-color: rgba(255, 255, 255, .15);--ci-hotspot-popover-bg: #1a1a1a;--ci-hotspot-popover-color: #f0f0f0;--ci-hotspot-popover-border: 1px solid rgba(255, 255, 255, .1);--ci-hotspot-popover-shadow: 0 8px 32px rgba(0, 0, 0, .4);--ci-hotspot-title-color: #f0f0f0;--ci-hotspot-description-color: #aaaaaa;--ci-hotspot-original-price-color: #777777;--ci-hotspot-zoom-controls-bg: rgba(30, 30, 30, .9);--ci-hotspot-zoom-controls-color: #f0f0f0}.ci-hotspot-marker-inverted{--ci-hotspot-marker-bg: rgba(0, 0, 0, .6);--ci-hotspot-marker-color: #ffffff;--ci-hotspot-marker-border-color: rgba(255, 255, 255, .8);--ci-hotspot-marker-shadow: 0 2px 8px rgba(0, 0, 0, .3);--ci-hotspot-pulse-color: rgba(0, 0, 0, .2)}.ci-hotspot-theme-dark.ci-hotspot-marker-inverted{--ci-hotspot-marker-bg: rgba(255, 255, 255, .8);--ci-hotspot-marker-color: #1a1a1a;--ci-hotspot-marker-border-color: rgba(255, 255, 255, .4);--ci-hotspot-pulse-color: rgba(255, 255, 255, .2)}.ci-hotspot-marker-brand{--ci-hotspot-marker-bg: var(--ci-hotspot-brand-color, #00aaff);--ci-hotspot-marker-color: #ffffff;--ci-hotspot-marker-border-color: rgba(255, 255, 255, .9);--ci-hotspot-marker-shadow: 0 2px 8px rgba(0, 0, 0, .25);--ci-hotspot-pulse-color: var(--ci-hotspot-brand-color, #00aaff)}.ci-hotspot-scroll-hint{position:absolute;bottom:16px;left:50%;transform:translate(-50%) translateY(4px);padding:8px 16px;border-radius:20px;background:#000000b3;color:#fff;font-size:13px;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,sans-serif;line-height:1;white-space:nowrap;z-index:100;opacity:0;pointer-events:none;transition:opacity .3s ease,transform .3s ease}.ci-hotspot-scroll-hint--visible{opacity:1;transform:translate(-50%) translateY(0)}.ci-hotspot-container--fixed-ratio .ci-hotspot-viewport{overflow:hidden;height:0}.ci-hotspot-container--fixed-ratio .ci-hotspot-image{position:absolute;top:0;left:0;width:100%;height:100%;object-fit:contain}.ci-hotspot-container--fixed-ratio .ci-hotspot-markers{z-index:1}.ci-hotspot-scene-incoming{position:absolute;top:0;left:0;width:100%;height:100%;object-fit:contain;pointer-events:none;z-index:0}.ci-hotspot-scene-fade-in{animation:ci-hotspot-scene-fade-in var(--ci-hotspot-scene-transition-duration) ease forwards;z-index:1}.ci-hotspot-scene-fade-out{animation:ci-hotspot-scene-fade-out var(--ci-hotspot-scene-transition-duration) ease forwards}@keyframes ci-hotspot-scene-fade-in{0%{opacity:0}to{opacity:1}}@keyframes ci-hotspot-scene-fade-out{0%{opacity:1}to{opacity:0}}.ci-hotspot-scene-slide-in{animation:ci-hotspot-scene-slide-in var(--ci-hotspot-scene-transition-duration) ease forwards;z-index:1}.ci-hotspot-scene-slide-out{animation:ci-hotspot-scene-slide-out var(--ci-hotspot-scene-transition-duration) ease forwards}@keyframes ci-hotspot-scene-slide-in{0%{transform:translate(100%)}to{transform:translate(0)}}@keyframes ci-hotspot-scene-slide-out{0%{transform:translate(0)}to{transform:translate(-100%)}}.ci-hotspot-scene-slide-in-reverse{animation:ci-hotspot-scene-slide-in-reverse var(--ci-hotspot-scene-transition-duration) ease forwards;z-index:1}.ci-hotspot-scene-slide-out-reverse{animation:ci-hotspot-scene-slide-out-reverse var(--ci-hotspot-scene-transition-duration) ease forwards}@keyframes ci-hotspot-scene-slide-in-reverse{0%{transform:translate(-100%)}to{transform:translate(0)}}@keyframes ci-hotspot-scene-slide-out-reverse{0%{transform:translate(0)}to{transform:translate(100%)}}.ci-hotspot-scene-slide-in-up{animation:ci-hotspot-scene-slide-in-up var(--ci-hotspot-scene-transition-duration) ease forwards;z-index:1}.ci-hotspot-scene-slide-out-up{animation:ci-hotspot-scene-slide-out-up var(--ci-hotspot-scene-transition-duration) ease forwards}@keyframes ci-hotspot-scene-slide-in-up{0%{transform:translateY(-100%)}to{transform:translateY(0)}}@keyframes ci-hotspot-scene-slide-out-up{0%{transform:translateY(0)}to{transform:translateY(100%)}}.ci-hotspot-scene-slide-in-down{animation:ci-hotspot-scene-slide-in-down var(--ci-hotspot-scene-transition-duration) ease forwards;z-index:1}.ci-hotspot-scene-slide-out-down{animation:ci-hotspot-scene-slide-out-down var(--ci-hotspot-scene-transition-duration) ease forwards}@keyframes ci-hotspot-scene-slide-in-down{0%{transform:translateY(100%)}to{transform:translateY(0)}}@keyframes ci-hotspot-scene-slide-out-down{0%{transform:translateY(0)}to{transform:translateY(-100%)}}.ci-hotspot-navigate-icon{width:75%;height:75%;display:block}.ci-hotspot-scene-transitioning .ci-hotspot-markers{opacity:0;pointer-events:none;transition:opacity .1s ease}.ci-hotspot-scene-loading:after{content:"";position:absolute;top:50%;left:50%;width:32px;height:32px;margin:-16px 0 0 -16px;border:3px solid rgba(0,0,0,.1);border-top-color:#00000080;border-radius:50%;animation:ci-hotspot-spin .6s linear infinite;z-index:10;pointer-events:none}.ci-hotspot-theme-dark .ci-hotspot-scene-loading:after,.ci-hotspot-scene-loading.ci-hotspot-theme-dark:after{border-color:#ffffff1a;border-top-color:#ffffff80}@keyframes ci-hotspot-spin{to{transform:rotate(360deg)}}.ci-hotspot-fullscreen-btn{position:absolute;top:16px;right:16px;display:flex;align-items:center;justify-content:center;width:36px;height:36px;border:none;border-radius:var(--ci-hotspot-zoom-controls-border-radius);background:var(--ci-hotspot-zoom-controls-bg);color:var(--ci-hotspot-zoom-controls-color);box-shadow:var(--ci-hotspot-zoom-controls-shadow);cursor:pointer;padding:0;z-index:10;transition:background .15s ease}.ci-hotspot-fullscreen-btn:hover{background:#e6e6e6f2}.ci-hotspot-fullscreen-btn svg{width:18px;height:18px}.ci-hotspot-fullscreen-btn:focus-visible{outline:3px solid var(--ci-hotspot-focus-ring, #4A90D9);outline-offset:2px}.ci-hotspot-container--fullscreen{background:#000;width:100vw;height:100vh;display:flex;align-items:center;justify-content:center}.ci-hotspot-container--fullscreen .ci-hotspot-viewport{width:fit-content;max-width:100%;max-height:100%}.ci-hotspot-container--fullscreen .ci-hotspot-image{max-height:100vh;width:auto;max-width:100%;object-fit:contain}.ci-hotspot-container--fullscreen.ci-hotspot-container--fixed-ratio .ci-hotspot-viewport{width:100%;height:100%;padding-bottom:0!important}.ci-hotspot-container--fullscreen.ci-hotspot-container--fixed-ratio .ci-hotspot-image{width:100%;height:100%;max-height:none;object-fit:contain}.ci-hotspot-theme-dark .ci-hotspot-fullscreen-btn,.ci-hotspot-container--fullscreen .ci-hotspot-fullscreen-btn{background:#1e1e1ee6;color:#f0f0f0}.ci-hotspot-theme-dark .ci-hotspot-fullscreen-btn:hover,.ci-hotspot-container--fullscreen .ci-hotspot-fullscreen-btn:hover{background:#3c3c3cf2}@media (prefers-reduced-motion: reduce){.ci-hotspot-marker,.ci-hotspot-marker:before,.ci-hotspot-popover{animation:none!important;transition-duration:.01ms!important}.ci-hotspot-viewport,.ci-hotspot-scroll-hint{transition-duration:.01ms!important}.ci-hotspot-scene-fade-in,.ci-hotspot-scene-fade-out,.ci-hotspot-scene-slide-in,.ci-hotspot-scene-slide-out,.ci-hotspot-scene-slide-in-reverse,.ci-hotspot-scene-slide-out-reverse,.ci-hotspot-scene-slide-in-up,.ci-hotspot-scene-slide-out-up,.ci-hotspot-scene-slide-in-down,.ci-hotspot-scene-slide-out-down{animation-duration:.01ms!important}.ci-hotspot-scene-transitioning .ci-hotspot-markers{transition-duration:.01ms!important}.ci-hotspot-scene-loading:after{animation-duration:.01ms!important}.ci-hotspot-fullscreen-btn{transition-duration:.01ms!important}}', M = class M {
|
|
873
887
|
constructor(t, e) {
|
|
874
|
-
this.markers = /* @__PURE__ */ new Map(), this.popovers = /* @__PURE__ */ new Map(), this.normalizedHotspots = /* @__PURE__ */ new Map(), this.scrollHint = null, this.zoomPan = null, this.zoomControls = null, this.cloudimageHandler = null, this.resizeObserver = null, this.keyboardHandler = null, this.fullscreenControl = null, this.focusTraps = /* @__PURE__ */ new Map(), this.cleanups = [], this.hotspotCleanups = /* @__PURE__ */ new Map(), this.imageLoaded = !1, this.destroyed = !1, this.scenesMap = /* @__PURE__ */ new Map(), this.isTransitioning = !1, this.activeTimers = /* @__PURE__ */ new Set(), this.sceneHotspotOverrides = /* @__PURE__ */ new Map(), this.preloadedScenes = /* @__PURE__ */ new Set(), this.rootEl = mt(t), this.config = j(e),
|
|
888
|
+
this.markers = /* @__PURE__ */ new Map(), this.popovers = /* @__PURE__ */ new Map(), this.normalizedHotspots = /* @__PURE__ */ new Map(), this.scrollHint = null, this.zoomPan = null, this.zoomControls = null, this.cloudimageHandler = null, this.resizeObserver = null, this.keyboardHandler = null, this.fullscreenControl = null, this.focusTraps = /* @__PURE__ */ new Map(), this.cleanups = [], this.hotspotCleanups = /* @__PURE__ */ new Map(), this.imageLoaded = !1, this.destroyed = !1, this.scenesMap = /* @__PURE__ */ new Map(), this.isTransitioning = !1, this.activeTimers = /* @__PURE__ */ new Set(), this.sceneHotspotOverrides = /* @__PURE__ */ new Map(), this.preloadedScenes = /* @__PURE__ */ new Set(), this.rootEl = mt(t), this.config = j(e), V(this.config), this.config.scenes && this.config.scenes.length > 0 && this.initScenes(), Q(), gt(Qt), this.buildDOM(), this.applyTheme(), this.setupImage(), this.initHotspots(), this.config.zoom && this.initZoom(), this.initKeyboard(), this.initFullscreen(), this.setupResponsive();
|
|
875
889
|
}
|
|
876
890
|
/** Auto-initialize all elements with data-ci-hotspot-src or data-ci-hotspot-scenes attribute */
|
|
877
891
|
static autoInit(t) {
|
|
@@ -880,7 +894,7 @@ const Qt = '.ci-hotspot-container{--ci-hotspot-marker-size: 24px;--ci-hotspot-ma
|
|
|
880
894
|
), s = [];
|
|
881
895
|
return o.forEach((c) => {
|
|
882
896
|
const n = ut(c);
|
|
883
|
-
(n.src || n.scenes) && s.push(new
|
|
897
|
+
(n.src || n.scenes) && s.push(new M(c, n));
|
|
884
898
|
}), s;
|
|
885
899
|
}
|
|
886
900
|
buildDOM() {
|
|
@@ -948,11 +962,11 @@ const Qt = '.ci-hotspot-container{--ci-hotspot-marker-size: 24px;--ci-hotspot-ma
|
|
|
948
962
|
var d, h;
|
|
949
963
|
if (this.markers.has(t.id)) {
|
|
950
964
|
const p = this.markers.get(t.id);
|
|
951
|
-
|
|
965
|
+
F(p), this.markers.delete(t.id), (d = this.popovers.get(t.id)) == null || d.destroy(), this.popovers.delete(t.id);
|
|
952
966
|
const u = this.hotspotCleanups.get(t.id);
|
|
953
967
|
u && (u.forEach((b) => b()), this.hotspotCleanups.delete(t.id));
|
|
954
|
-
const
|
|
955
|
-
|
|
968
|
+
const w = this.focusTraps.get(t.id);
|
|
969
|
+
w && (w.destroy(), this.focusTraps.delete(t.id));
|
|
956
970
|
}
|
|
957
971
|
const { x: e, y: o } = G(
|
|
958
972
|
t.x,
|
|
@@ -967,12 +981,13 @@ const Qt = '.ci-hotspot-container{--ci-hotspot-marker-size: 24px;--ci-hotspot-ma
|
|
|
967
981
|
if (t.navigateTo) {
|
|
968
982
|
const p = this.enrichNavigateHotspot(t);
|
|
969
983
|
if (!!(p.data || p.content || this.config.renderPopover)) {
|
|
970
|
-
const
|
|
971
|
-
placement:
|
|
984
|
+
const w = t.placement || this.config.placement || "top", b = new q(p, {
|
|
985
|
+
placement: w,
|
|
972
986
|
triggerMode: "hover",
|
|
973
987
|
renderFn: this.config.renderPopover,
|
|
974
988
|
onOpen: this.config.onOpen,
|
|
975
|
-
onClose: this.config.onClose
|
|
989
|
+
onClose: this.config.onClose,
|
|
990
|
+
onProductClick: this.config.onProductClick
|
|
976
991
|
});
|
|
977
992
|
this.popovers.set(t.id, b), b.mount(this.containerEl, n), this.bindNavigateTrigger(t, n, b);
|
|
978
993
|
} else
|
|
@@ -984,7 +999,8 @@ const Qt = '.ci-hotspot-container{--ci-hotspot-marker-size: 24px;--ci-hotspot-ma
|
|
|
984
999
|
triggerMode: r,
|
|
985
1000
|
renderFn: this.config.renderPopover,
|
|
986
1001
|
onOpen: this.config.onOpen,
|
|
987
|
-
onClose: this.config.onClose
|
|
1002
|
+
onClose: this.config.onClose,
|
|
1003
|
+
onProductClick: this.config.onProductClick
|
|
988
1004
|
});
|
|
989
1005
|
this.popovers.set(t.id, l), l.mount(this.containerEl, n), this.bindTrigger(t, n, l, r), r === "load" && this.imageLoaded && (this.closeAll(), l.show(), g(n, !0), this.ensureFocusTrap(t.id, l.element, n), (h = this.focusTraps.get(t.id)) == null || h.activate());
|
|
990
1006
|
}
|
|
@@ -998,7 +1014,7 @@ const Qt = '.ci-hotspot-container{--ci-hotspot-marker-size: 24px;--ci-hotspot-ma
|
|
|
998
1014
|
} : t;
|
|
999
1015
|
}
|
|
1000
1016
|
bindNavigateTrigger(t, e, o) {
|
|
1001
|
-
if (m(e, "ci-hotspot-marker--navigate"), e.innerHTML =
|
|
1017
|
+
if (m(e, "ci-hotspot-marker--navigate"), e.innerHTML = M.NAVIGATE_ARROW_SVG, t.arrowDirection != null) {
|
|
1002
1018
|
const r = e.querySelector("svg");
|
|
1003
1019
|
r && (r.style.transform = `rotate(${t.arrowDirection}deg)`);
|
|
1004
1020
|
}
|
|
@@ -1103,7 +1119,7 @@ const Qt = '.ci-hotspot-container{--ci-hotspot-marker-size: 24px;--ci-hotspot-ma
|
|
|
1103
1119
|
}
|
|
1104
1120
|
}
|
|
1105
1121
|
initZoom() {
|
|
1106
|
-
this.config.scrollHint !== !1 && (this.scrollHint = new
|
|
1122
|
+
this.config.scrollHint !== !1 && (this.scrollHint = new $t(this.containerEl)), this.zoomPan = new Rt(this.viewportEl, this.containerEl, {
|
|
1107
1123
|
zoomMin: this.config.zoomMin || 1,
|
|
1108
1124
|
zoomMax: this.config.zoomMax || 4,
|
|
1109
1125
|
onZoom: (t) => {
|
|
@@ -1135,7 +1151,7 @@ const Qt = '.ci-hotspot-container{--ci-hotspot-marker-size: 24px;--ci-hotspot-ma
|
|
|
1135
1151
|
const c = this.markers.get(o);
|
|
1136
1152
|
if (!c) continue;
|
|
1137
1153
|
const n = s.responsive.maxWidth && e > s.responsive.maxWidth || s.responsive.minWidth && e < s.responsive.minWidth;
|
|
1138
|
-
|
|
1154
|
+
wt(c, !!n);
|
|
1139
1155
|
}
|
|
1140
1156
|
}));
|
|
1141
1157
|
}), this.cleanups.push(() => {
|
|
@@ -1161,7 +1177,7 @@ const Qt = '.ci-hotspot-container{--ci-hotspot-marker-size: 24px;--ci-hotspot-ma
|
|
|
1161
1177
|
this.config.src = e.src, this.config.alt = e.alt || "", this.config.hotspots = [...e.hotspots], this.currentSceneId = t;
|
|
1162
1178
|
}
|
|
1163
1179
|
initKeyboard() {
|
|
1164
|
-
this.keyboardHandler = new
|
|
1180
|
+
this.keyboardHandler = new Vt({
|
|
1165
1181
|
container: this.containerEl,
|
|
1166
1182
|
getZoomPan: () => this.zoomPan,
|
|
1167
1183
|
onEscape: () => {
|
|
@@ -1228,7 +1244,7 @@ const Qt = '.ci-hotspot-container{--ci-hotspot-marker-size: 24px;--ci-hotspot-ma
|
|
|
1228
1244
|
t.destroy();
|
|
1229
1245
|
this.popovers.clear();
|
|
1230
1246
|
for (const [, t] of this.markers)
|
|
1231
|
-
|
|
1247
|
+
F(t);
|
|
1232
1248
|
this.markers.clear(), this.normalizedHotspots.clear();
|
|
1233
1249
|
for (const [, t] of this.focusTraps)
|
|
1234
1250
|
t.destroy();
|
|
@@ -1389,7 +1405,7 @@ const Qt = '.ci-hotspot-container{--ci-hotspot-marker-size: 24px;--ci-hotspot-ma
|
|
|
1389
1405
|
const o = this.focusTraps.get(t);
|
|
1390
1406
|
o && (o.destroy(), this.focusTraps.delete(t));
|
|
1391
1407
|
const s = this.markers.get(t), c = this.popovers.get(t);
|
|
1392
|
-
c && (c.destroy(), this.popovers.delete(t)), s && (
|
|
1408
|
+
c && (c.destroy(), this.popovers.delete(t)), s && (F(s), this.markers.delete(t)), this.normalizedHotspots.delete(t), this.config.hotspots = this.config.hotspots.filter((n) => n.id !== t), this.syncCurrentSceneHotspots();
|
|
1393
1409
|
}
|
|
1394
1410
|
updateHotspot(t, e) {
|
|
1395
1411
|
if (this.destroyed) return;
|
|
@@ -1401,7 +1417,7 @@ const Qt = '.ci-hotspot-container{--ci-hotspot-marker-size: 24px;--ci-hotspot-ma
|
|
|
1401
1417
|
a && c && this.markersEl.contains(c) && this.markersEl.insertBefore(a, c), this.syncCurrentSceneHotspots();
|
|
1402
1418
|
}
|
|
1403
1419
|
update(t) {
|
|
1404
|
-
this.destroyed || (this.destroyInternal(), Q(), this.config = j({ ...this.config, ...t }),
|
|
1420
|
+
this.destroyed || (this.destroyInternal(), Q(), this.config = j({ ...this.config, ...t }), V(this.config), this.config.scenes && this.config.scenes.length > 0 && this.initScenes(), this.buildDOM(), this.applyTheme(), this.setupImage(), this.initHotspots(), this.config.zoom && this.initZoom(), this.initKeyboard(), this.initFullscreen(), this.setupResponsive());
|
|
1405
1421
|
}
|
|
1406
1422
|
destroy() {
|
|
1407
1423
|
this.destroyed || (this.destroyed = !0, this.destroyInternal(), this.rootEl.innerHTML = "");
|
|
@@ -1418,17 +1434,17 @@ const Qt = '.ci-hotspot-container{--ci-hotspot-marker-size: 24px;--ci-hotspot-ma
|
|
|
1418
1434
|
a.destroy();
|
|
1419
1435
|
this.popovers.clear();
|
|
1420
1436
|
for (const [, a] of this.markers)
|
|
1421
|
-
|
|
1437
|
+
F(a);
|
|
1422
1438
|
this.markers.clear(), this.normalizedHotspots.clear();
|
|
1423
1439
|
for (const [, a] of this.focusTraps)
|
|
1424
1440
|
a.destroy();
|
|
1425
1441
|
this.focusTraps.clear(), this.scenesMap.clear(), this.preloadedScenes.clear(), this.sceneHotspotOverrides.clear(), this.currentSceneId = void 0, this.isTransitioning = !1, this.transitionTimer !== void 0 && (clearTimeout(this.transitionTimer), this.transitionTimer = void 0), (t = this.fullscreenControl) == null || t.destroy(), this.fullscreenControl = null, (e = this.keyboardHandler) == null || e.destroy(), this.keyboardHandler = null, (o = this.zoomPan) == null || o.destroy(), this.zoomPan = null, (s = this.zoomControls) == null || s.destroy(), this.zoomControls = null, (c = this.scrollHint) == null || c.destroy(), this.scrollHint = null, (n = this.cloudimageHandler) == null || n.destroy(), this.cloudimageHandler = null, (r = this.resizeObserver) == null || r.disconnect(), this.resizeObserver = null, Gt();
|
|
1426
1442
|
}
|
|
1427
1443
|
};
|
|
1428
|
-
|
|
1429
|
-
let
|
|
1444
|
+
M.NAVIGATE_ARROW_SVG = '<svg class="ci-hotspot-navigate-icon" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="m9 18 6-6-6-6"/></svg>';
|
|
1445
|
+
let $ = M;
|
|
1430
1446
|
function Y(i) {
|
|
1431
|
-
const t =
|
|
1447
|
+
const t = P({ value: i, key: JSON.stringify(i) });
|
|
1432
1448
|
if (i !== t.current.value) {
|
|
1433
1449
|
const e = JSON.stringify(i);
|
|
1434
1450
|
e !== t.current.key ? t.current = { value: i, key: e } : t.current.value = i;
|
|
@@ -1436,7 +1452,7 @@ function Y(i) {
|
|
|
1436
1452
|
return t.current.key;
|
|
1437
1453
|
}
|
|
1438
1454
|
function te(i) {
|
|
1439
|
-
const t =
|
|
1455
|
+
const t = P(null), e = P(null), o = P(!1), s = P(i);
|
|
1440
1456
|
s.current = i, O(() => {
|
|
1441
1457
|
const a = t.current;
|
|
1442
1458
|
if (!a) return;
|
|
@@ -1472,7 +1488,7 @@ function te(i) {
|
|
|
1472
1488
|
const p = document.createElement("div");
|
|
1473
1489
|
return p.dataset.reactPortal = h.id, p;
|
|
1474
1490
|
});
|
|
1475
|
-
const d = new
|
|
1491
|
+
const d = new $(a, l);
|
|
1476
1492
|
return e.current = d, () => {
|
|
1477
1493
|
d.destroy(), e.current = null;
|
|
1478
1494
|
};
|
|
@@ -1604,17 +1620,17 @@ const se = ct(
|
|
|
1604
1620
|
})), O(() => {
|
|
1605
1621
|
if (!r.current || !c) return;
|
|
1606
1622
|
const h = new MutationObserver(() => {
|
|
1607
|
-
var
|
|
1608
|
-
const p = (
|
|
1623
|
+
var w;
|
|
1624
|
+
const p = (w = r.current) == null ? void 0 : w.querySelectorAll("[data-react-portal]");
|
|
1609
1625
|
if (!p) return;
|
|
1610
1626
|
const u = /* @__PURE__ */ new Map();
|
|
1611
1627
|
p.forEach((b) => {
|
|
1612
|
-
const
|
|
1613
|
-
|
|
1628
|
+
const k = b.dataset.reactPortal;
|
|
1629
|
+
k && u.set(k, b);
|
|
1614
1630
|
}), d((b) => {
|
|
1615
1631
|
if (b.size !== u.size) return u;
|
|
1616
|
-
for (const [
|
|
1617
|
-
if (b.get(
|
|
1632
|
+
for (const [k, L] of u)
|
|
1633
|
+
if (b.get(k) !== L) return u;
|
|
1618
1634
|
return b;
|
|
1619
1635
|
});
|
|
1620
1636
|
});
|
|
@@ -1622,8 +1638,8 @@ const se = ct(
|
|
|
1622
1638
|
}, [c]), /* @__PURE__ */ rt(N, { children: [
|
|
1623
1639
|
/* @__PURE__ */ W("div", { ref: r, className: o, style: s }),
|
|
1624
1640
|
c && Array.from(l.entries()).map(([h, p]) => {
|
|
1625
|
-
var
|
|
1626
|
-
const u = (
|
|
1641
|
+
var w;
|
|
1642
|
+
const u = (w = t.hotspots) == null ? void 0 : w.find((b) => b.id === h);
|
|
1627
1643
|
return u ? ht(
|
|
1628
1644
|
/* @__PURE__ */ W(N, { children: c(u) }),
|
|
1629
1645
|
p,
|