js-cloudimage-hotspot 1.1.2 → 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 +9 -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 +128 -106
- 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 +137 -115
- 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 +135 -113
- package/dist/react/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -12,6 +12,8 @@ const et = {
|
|
|
12
12
|
sceneTransition: "fade",
|
|
13
13
|
scrollHint: !0,
|
|
14
14
|
invertMarkerTheme: !1,
|
|
15
|
+
markerTheme: "default",
|
|
16
|
+
brandColor: "#00aaff",
|
|
15
17
|
fullscreenButton: !0,
|
|
16
18
|
zoomControlsPosition: "bottom-right"
|
|
17
19
|
}, ot = {
|
|
@@ -38,6 +40,8 @@ const et = {
|
|
|
38
40
|
"data-ci-hotspot-scene-transition": { key: "sceneTransition", type: "string" },
|
|
39
41
|
"data-ci-hotspot-scene-aspect-ratio": { key: "sceneAspectRatio", type: "string" },
|
|
40
42
|
"data-ci-hotspot-invert-marker-theme": { key: "invertMarkerTheme", type: "boolean" },
|
|
43
|
+
"data-ci-hotspot-marker-theme": { key: "markerTheme", type: "string" },
|
|
44
|
+
"data-ci-hotspot-brand-color": { key: "brandColor", type: "string" },
|
|
41
45
|
"data-ci-hotspot-fullscreen-button": { key: "fullscreenButton", type: "boolean" },
|
|
42
46
|
"data-ci-hotspot-zoom-controls-position": { key: "zoomControlsPosition", type: "string" }
|
|
43
47
|
};
|
|
@@ -82,7 +86,7 @@ function Z(s) {
|
|
|
82
86
|
hotspots: s.hotspots || []
|
|
83
87
|
};
|
|
84
88
|
}
|
|
85
|
-
function
|
|
89
|
+
function $(s) {
|
|
86
90
|
if (s.scenes && s.scenes.length > 0) {
|
|
87
91
|
const t = /* @__PURE__ */ new Set();
|
|
88
92
|
for (const e of s.scenes) {
|
|
@@ -100,7 +104,7 @@ function O(s) {
|
|
|
100
104
|
} else if (!s.src)
|
|
101
105
|
throw new Error('CIHotspot: "src" is required');
|
|
102
106
|
}
|
|
103
|
-
const
|
|
107
|
+
const O = "ci-hotspot-styles";
|
|
104
108
|
function K() {
|
|
105
109
|
return typeof window < "u" && typeof document < "u";
|
|
106
110
|
}
|
|
@@ -119,18 +123,18 @@ function g(s, t, e) {
|
|
|
119
123
|
o.setAttribute(i, a);
|
|
120
124
|
return o;
|
|
121
125
|
}
|
|
122
|
-
function
|
|
126
|
+
function f(s, ...t) {
|
|
123
127
|
s.classList.add(...t);
|
|
124
128
|
}
|
|
125
|
-
function
|
|
129
|
+
function v(s, ...t) {
|
|
126
130
|
s.classList.remove(...t);
|
|
127
131
|
}
|
|
128
132
|
function rt(s) {
|
|
129
|
-
if (!K() || document.getElementById(
|
|
133
|
+
if (!K() || document.getElementById(O)) return;
|
|
130
134
|
const t = document.createElement("style");
|
|
131
|
-
t.id =
|
|
135
|
+
t.id = O, t.textContent = s, document.head.appendChild(t);
|
|
132
136
|
}
|
|
133
|
-
function
|
|
137
|
+
function X(s) {
|
|
134
138
|
if (typeof s == "string") {
|
|
135
139
|
const t = s.trim();
|
|
136
140
|
return t.endsWith("%") ? { value: parseFloat(t), isPercent: !0 } : { value: parseFloat(t), isPercent: !1 };
|
|
@@ -138,7 +142,7 @@ function $(s) {
|
|
|
138
142
|
return { value: s, isPercent: !1 };
|
|
139
143
|
}
|
|
140
144
|
function W(s, t, e, o) {
|
|
141
|
-
const i =
|
|
145
|
+
const i = X(s), a = X(t);
|
|
142
146
|
return {
|
|
143
147
|
x: i.isPercent ? i.value : i.value / e * 100,
|
|
144
148
|
y: a.isPercent ? a.value : a.value / o * 100
|
|
@@ -156,10 +160,10 @@ function at(s, t) {
|
|
|
156
160
|
});
|
|
157
161
|
if (e.style.left = `${s.x}%`, e.style.top = `${s.y}%`, s.className) {
|
|
158
162
|
const o = s.className.trim().split(/\s+/).filter(Boolean);
|
|
159
|
-
o.length &&
|
|
163
|
+
o.length && f(e, ...o);
|
|
160
164
|
}
|
|
161
|
-
if (s.hidden &&
|
|
162
|
-
|
|
165
|
+
if (s.hidden && f(e, "ci-hotspot-marker--hidden"), t && f(e, "ci-hotspot-marker--pulse"), s.icon && ht(e, s.icon), s.markerStyle === "dot-label" && s.label) {
|
|
166
|
+
f(e, "ci-hotspot-marker--dot-label");
|
|
163
167
|
const o = g("span", "ci-hotspot-marker-label");
|
|
164
168
|
o.textContent = s.label, e.appendChild(o);
|
|
165
169
|
}
|
|
@@ -215,45 +219,45 @@ function ht(s, t) {
|
|
|
215
219
|
s.appendChild(o);
|
|
216
220
|
}
|
|
217
221
|
}
|
|
218
|
-
function
|
|
219
|
-
t ? (
|
|
222
|
+
function m(s, t) {
|
|
223
|
+
t ? (f(s, "ci-hotspot-marker--active"), s.setAttribute("aria-expanded", "true")) : (v(s, "ci-hotspot-marker--active"), s.setAttribute("aria-expanded", "false"));
|
|
220
224
|
}
|
|
221
225
|
function pt(s, t) {
|
|
222
|
-
t ?
|
|
226
|
+
t ? f(s, "ci-hotspot-marker--hidden") : v(s, "ci-hotspot-marker--hidden");
|
|
223
227
|
}
|
|
224
|
-
function
|
|
228
|
+
function A(s) {
|
|
225
229
|
s.remove();
|
|
226
230
|
}
|
|
227
231
|
function dt(s, t, e, o) {
|
|
228
|
-
const i = s.getBoundingClientRect(), a = e.getBoundingClientRect(), n = t.offsetWidth, r = t.offsetHeight, c = i.left + i.width / 2 - a.left, l = i.top + i.height / 2 - a.top, h = i.top - a.top, d = i.bottom - a.top, p = i.left - a.left,
|
|
229
|
-
top: h -
|
|
230
|
-
bottom:
|
|
231
|
-
left: p -
|
|
232
|
-
right: E -
|
|
232
|
+
const i = s.getBoundingClientRect(), a = e.getBoundingClientRect(), n = t.offsetWidth, r = t.offsetHeight, c = i.left + i.width / 2 - a.left, l = i.top + i.height / 2 - a.top, h = i.top - a.top, d = i.bottom - a.top, p = i.left - a.left, b = i.right - a.left, E = e.offsetWidth, w = e.offsetHeight, k = 8, Y = {
|
|
233
|
+
top: h - k,
|
|
234
|
+
bottom: w - d - k,
|
|
235
|
+
left: p - k,
|
|
236
|
+
right: E - b - k
|
|
233
237
|
};
|
|
234
238
|
let x = o.placement;
|
|
235
239
|
x === "auto" && (x = ut(Y)), x = ft(x, n, r, Y);
|
|
236
240
|
let T, z, R = 0;
|
|
237
241
|
switch (x) {
|
|
238
242
|
case "top":
|
|
239
|
-
T = c - n / 2, z = h -
|
|
243
|
+
T = c - n / 2, z = h - k - r;
|
|
240
244
|
break;
|
|
241
245
|
case "bottom":
|
|
242
|
-
T = c - n / 2, z = d +
|
|
246
|
+
T = c - n / 2, z = d + k;
|
|
243
247
|
break;
|
|
244
248
|
case "left":
|
|
245
|
-
T = p -
|
|
249
|
+
T = p - k - n, z = l - r / 2;
|
|
246
250
|
break;
|
|
247
251
|
case "right":
|
|
248
|
-
T =
|
|
252
|
+
T = b + k, z = l - r / 2;
|
|
249
253
|
break;
|
|
250
254
|
default:
|
|
251
|
-
T = c - n / 2, z = h -
|
|
255
|
+
T = c - n / 2, z = h - k - r;
|
|
252
256
|
}
|
|
253
|
-
const
|
|
254
|
-
return R = x === "top" || x === "bottom" ? T -
|
|
255
|
-
x:
|
|
256
|
-
y:
|
|
257
|
+
const L = mt(T, z, n, r, E, w);
|
|
258
|
+
return R = x === "top" || x === "bottom" ? T - L.x : z - L.y, {
|
|
259
|
+
x: L.x,
|
|
260
|
+
y: L.y,
|
|
257
261
|
placement: x,
|
|
258
262
|
arrowOffset: R
|
|
259
263
|
};
|
|
@@ -312,7 +316,7 @@ const gt = /* @__PURE__ */ new Set([
|
|
|
312
316
|
"title",
|
|
313
317
|
"target",
|
|
314
318
|
"rel"
|
|
315
|
-
]), bt = /^(?:https?:|mailto:)/i, yt = /^(?:https?:|data:image\/(?!svg[+%]))/i,
|
|
319
|
+
]), bt = /^(?:https?:|mailto:)/i, yt = /^(?:https?:|data:image\/(?!svg[+%]))/i, kt = /* @__PURE__ */ new Set([
|
|
316
320
|
"noopener",
|
|
317
321
|
"noreferrer",
|
|
318
322
|
"nofollow",
|
|
@@ -326,7 +330,7 @@ const gt = /* @__PURE__ */ new Set([
|
|
|
326
330
|
"tag",
|
|
327
331
|
"bookmark"
|
|
328
332
|
]);
|
|
329
|
-
function
|
|
333
|
+
function wt(s) {
|
|
330
334
|
const o = new DOMParser().parseFromString(`<body>${s}</body>`, "text/html").body;
|
|
331
335
|
return Q(o), o.innerHTML;
|
|
332
336
|
}
|
|
@@ -356,7 +360,7 @@ function Q(s) {
|
|
|
356
360
|
else if (r === "src" && !yt.test(n.value.trim()))
|
|
357
361
|
o.removeAttribute(n.name);
|
|
358
362
|
else if (r === "rel") {
|
|
359
|
-
const c = n.value.trim().toLowerCase().split(/\s+/).filter((l) =>
|
|
363
|
+
const c = n.value.trim().toLowerCase().split(/\s+/).filter((l) => kt.has(l));
|
|
360
364
|
c.length === 0 ? o.removeAttribute(n.name) : o.setAttribute(n.name, c.join(" "));
|
|
361
365
|
}
|
|
362
366
|
}
|
|
@@ -366,22 +370,27 @@ function Q(s) {
|
|
|
366
370
|
}
|
|
367
371
|
function xt(s) {
|
|
368
372
|
const t = [];
|
|
369
|
-
s.image && t.push(`<div class="ci-hotspot-popover-image-wrapper"><img class="ci-hotspot-popover-image" src="${
|
|
373
|
+
s.image && t.push(`<div class="ci-hotspot-popover-image-wrapper"><img class="ci-hotspot-popover-image" src="${S(s.image)}" alt="${S(s.title || "")}"></div>`);
|
|
370
374
|
const e = [];
|
|
371
375
|
if (s.title && e.push(`<h3 class="ci-hotspot-popover-title">${C(s.title)}</h3>`), s.originalPrice || s.price) {
|
|
372
376
|
let o = "";
|
|
373
377
|
s.originalPrice && (o += `<span class="ci-hotspot-popover-original-price">${C(s.originalPrice)}</span>`), s.price && (o += `<span class="ci-hotspot-popover-price">${C(s.price)}</span>`), e.push(`<div class="ci-hotspot-popover-price-row">${o}</div>`);
|
|
374
378
|
}
|
|
375
379
|
if (s.description && e.push(`<p class="ci-hotspot-popover-description">${C(s.description)}</p>`), s.url && Tt(s.url)) {
|
|
380
|
+
const o = s.ctaText || "View details", i = s.id ? ` data-product-id="${S(s.id)}"` : "";
|
|
381
|
+
e.push(
|
|
382
|
+
`<a class="ci-hotspot-popover-cta" href="${S(s.url)}"${i}>${C(String(o))}</a>`
|
|
383
|
+
);
|
|
384
|
+
} else if (s.id) {
|
|
376
385
|
const o = s.ctaText || "View details";
|
|
377
386
|
e.push(
|
|
378
|
-
`<
|
|
387
|
+
`<button class="ci-hotspot-popover-cta" data-product-id="${S(s.id)}">${C(String(o))}</button>`
|
|
379
388
|
);
|
|
380
389
|
}
|
|
381
390
|
return e.length > 0 && t.push(`<div class="ci-hotspot-popover-body">${e.join("")}</div>`), t.join("");
|
|
382
391
|
}
|
|
383
392
|
function Et(s, t) {
|
|
384
|
-
return t ? t(s) : s.content ?
|
|
393
|
+
return t ? t(s) : s.content ? wt(s.content) : s.data ? xt(s.data) : "";
|
|
385
394
|
}
|
|
386
395
|
function C(s) {
|
|
387
396
|
return s.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """);
|
|
@@ -390,7 +399,7 @@ function Tt(s) {
|
|
|
390
399
|
const t = s.replace(/[\s\x00-\x1f]/g, "");
|
|
391
400
|
return /^https?:\/\//i.test(t) || /^\/(?!\/)/.test(t) || /^#/.test(t);
|
|
392
401
|
}
|
|
393
|
-
function
|
|
402
|
+
function S(s) {
|
|
394
403
|
return s.replace(/&/g, "&").replace(/"/g, """).replace(/'/g, "'").replace(/</g, "<").replace(/>/g, ">");
|
|
395
404
|
}
|
|
396
405
|
class N {
|
|
@@ -405,7 +414,16 @@ class N {
|
|
|
405
414
|
...o && t.label ? { "aria-label": t.label } : {}
|
|
406
415
|
}), this.arrowEl = g("div", "ci-hotspot-popover-arrow"), this.contentEl = g("div", "ci-hotspot-popover-content"), this.element.appendChild(this.arrowEl), this.element.appendChild(this.contentEl);
|
|
407
416
|
const i = Et(t, e.renderFn);
|
|
408
|
-
if (typeof i == "string" ? this.contentEl.innerHTML = i : i instanceof HTMLElement && this.contentEl.appendChild(i), e.
|
|
417
|
+
if (typeof i == "string" ? this.contentEl.innerHTML = i : i instanceof HTMLElement && this.contentEl.appendChild(i), e.onProductClick) {
|
|
418
|
+
const a = (n) => {
|
|
419
|
+
const r = n.target.closest(".ci-hotspot-popover-cta[data-product-id]");
|
|
420
|
+
if (!r) return;
|
|
421
|
+
const c = r.dataset.productId;
|
|
422
|
+
e.onProductClick(c, t);
|
|
423
|
+
};
|
|
424
|
+
this.contentEl.addEventListener("click", a), this.hoverCleanups.push(() => this.contentEl.removeEventListener("click", a));
|
|
425
|
+
}
|
|
426
|
+
if (e.triggerMode === "hover") {
|
|
409
427
|
const a = () => this.clearHideTimer(), n = () => this.scheduleHide();
|
|
410
428
|
this.element.addEventListener("mouseenter", a), this.element.addEventListener("mouseleave", n), this.hoverCleanups.push(
|
|
411
429
|
() => this.element.removeEventListener("mouseenter", a),
|
|
@@ -420,7 +438,7 @@ class N {
|
|
|
420
438
|
/** Show the popover */
|
|
421
439
|
show() {
|
|
422
440
|
var t, e;
|
|
423
|
-
this.clearHideTimer(), !this.visible && (this.visible = !0,
|
|
441
|
+
this.clearHideTimer(), !this.visible && (this.visible = !0, f(this.element, "ci-hotspot-popover--visible"), this.element.setAttribute("aria-hidden", "false"), this.updatePosition(), (e = (t = this.options).onOpen) == null || e.call(t, this.hotspot));
|
|
424
442
|
}
|
|
425
443
|
/** Schedule hide with delay (for hover mode) */
|
|
426
444
|
scheduleHide(t = 200) {
|
|
@@ -431,7 +449,7 @@ class N {
|
|
|
431
449
|
/** Hide the popover immediately */
|
|
432
450
|
hide() {
|
|
433
451
|
var t, e;
|
|
434
|
-
this.clearHideTimer(), this.visible && (this.visible = !1,
|
|
452
|
+
this.clearHideTimer(), this.visible && (this.visible = !1, v(this.element, "ci-hotspot-popover--visible"), this.element.setAttribute("aria-hidden", "true"), (e = (t = this.options).onClose) == null || e.call(t, this.hotspot));
|
|
435
453
|
}
|
|
436
454
|
/** Clear any pending hide timer */
|
|
437
455
|
clearHideTimer() {
|
|
@@ -520,14 +538,14 @@ class Ct {
|
|
|
520
538
|
}
|
|
521
539
|
bindEvents() {
|
|
522
540
|
const t = (n) => {
|
|
523
|
-
var p,
|
|
541
|
+
var p, b;
|
|
524
542
|
if (!this.enabled) return;
|
|
525
543
|
if (this.isGesturing) {
|
|
526
544
|
n.preventDefault();
|
|
527
545
|
return;
|
|
528
546
|
}
|
|
529
547
|
if (!n.ctrlKey) {
|
|
530
|
-
(
|
|
548
|
+
(b = (p = this.options).onScrollWithoutZoom) == null || b.call(p);
|
|
531
549
|
return;
|
|
532
550
|
}
|
|
533
551
|
n.preventDefault();
|
|
@@ -545,13 +563,13 @@ class Ct {
|
|
|
545
563
|
};
|
|
546
564
|
this.container.addEventListener("dblclick", e), this.cleanups.push(() => this.container.removeEventListener("dblclick", e));
|
|
547
565
|
const o = (n) => {
|
|
548
|
-
!this.enabled || this.zoom <= 1 || n.button === 0 && (this.isDragging = !0, this.dragStartX = n.clientX, this.dragStartY = n.clientY, this.lastPanX = this.panX, this.lastPanY = this.panY,
|
|
566
|
+
!this.enabled || this.zoom <= 1 || n.button === 0 && (this.isDragging = !0, this.dragStartX = n.clientX, this.dragStartY = n.clientY, this.lastPanX = this.panX, this.lastPanY = this.panY, f(this.viewport, "ci-hotspot-viewport--dragging"), this.container.style.cursor = "grabbing", n.preventDefault());
|
|
549
567
|
}, i = (n) => {
|
|
550
568
|
if (!this.isDragging) return;
|
|
551
569
|
const r = (n.clientX - this.dragStartX) / this.zoom, c = (n.clientY - this.dragStartY) / this.zoom;
|
|
552
570
|
this.panX = this.lastPanX + r, this.panY = this.lastPanY + c, this.clampPan(), this.applyTransform();
|
|
553
571
|
}, a = () => {
|
|
554
|
-
this.isDragging && (this.isDragging = !1,
|
|
572
|
+
this.isDragging && (this.isDragging = !1, v(this.viewport, "ci-hotspot-viewport--dragging"), this.container.style.cursor = this.zoom > 1 ? "grab" : "");
|
|
555
573
|
};
|
|
556
574
|
this.container.addEventListener("mousedown", o), document.addEventListener("mousemove", i), document.addEventListener("mouseup", a), this.cleanups.push(
|
|
557
575
|
() => this.container.removeEventListener("mousedown", o),
|
|
@@ -683,28 +701,28 @@ class Lt {
|
|
|
683
701
|
this.hideTimer !== null && (clearTimeout(this.hideTimer), this.hideTimer = null), this.el.remove();
|
|
684
702
|
}
|
|
685
703
|
}
|
|
686
|
-
const At = "cloudimg.io", Mt = "v7",
|
|
687
|
-
function Dt(s, t =
|
|
704
|
+
const At = "cloudimg.io", Mt = "v7", I = 100;
|
|
705
|
+
function Dt(s, t = I) {
|
|
688
706
|
return Math.ceil(s / t) * t;
|
|
689
707
|
}
|
|
690
|
-
function tt(s, t = 1, e = 1, o =
|
|
708
|
+
function tt(s, t = 1, e = 1, o = I) {
|
|
691
709
|
const i = s * t * e;
|
|
692
710
|
return Dt(i, o);
|
|
693
711
|
}
|
|
694
|
-
function
|
|
695
|
-
const a = t.domain || At, n = t.apiVersion || Mt, r = t.limitFactor ||
|
|
712
|
+
function P(s, t, e, o = 1, i = 1) {
|
|
713
|
+
const a = t.domain || At, n = t.apiVersion || Mt, r = t.limitFactor || I, c = tt(e, i, o, r), l = encodeURI(s);
|
|
696
714
|
let h = `https://${t.token}.${a}/${n}/${l}?width=${c}`;
|
|
697
715
|
return t.params && (h += `&${t.params}`), h;
|
|
698
716
|
}
|
|
699
717
|
function It(s, t, e, o) {
|
|
700
|
-
const i = e.limitFactor ||
|
|
718
|
+
const i = e.limitFactor || I;
|
|
701
719
|
let a = 0;
|
|
702
720
|
const n = new ResizeObserver((r) => {
|
|
703
721
|
for (const c of r) {
|
|
704
722
|
const l = c.contentRect.width;
|
|
705
723
|
if (l === 0) continue;
|
|
706
724
|
const h = typeof window < "u" && window.devicePixelRatio || 1, d = tt(l, h, o(), i);
|
|
707
|
-
d !== a && (a = d, s.src =
|
|
725
|
+
d !== a && (a = d, s.src = P(t, e, l, o(), h));
|
|
708
726
|
}
|
|
709
727
|
});
|
|
710
728
|
return {
|
|
@@ -712,7 +730,7 @@ function It(s, t, e, o) {
|
|
|
712
730
|
destroy: () => n.disconnect()
|
|
713
731
|
};
|
|
714
732
|
}
|
|
715
|
-
const
|
|
733
|
+
const M = 50, j = 0.5;
|
|
716
734
|
class Ft {
|
|
717
735
|
constructor(t) {
|
|
718
736
|
this.cleanups = [];
|
|
@@ -726,16 +744,16 @@ class Ft {
|
|
|
726
744
|
i == null || i();
|
|
727
745
|
break;
|
|
728
746
|
case "ArrowUp":
|
|
729
|
-
l && l.getZoom() > 1 && (r.preventDefault(), l.pan(0,
|
|
747
|
+
l && l.getZoom() > 1 && (r.preventDefault(), l.pan(0, M));
|
|
730
748
|
break;
|
|
731
749
|
case "ArrowDown":
|
|
732
|
-
l && l.getZoom() > 1 && (r.preventDefault(), l.pan(0, -
|
|
750
|
+
l && l.getZoom() > 1 && (r.preventDefault(), l.pan(0, -M));
|
|
733
751
|
break;
|
|
734
752
|
case "ArrowLeft":
|
|
735
|
-
l && l.getZoom() > 1 && (r.preventDefault(), l.pan(
|
|
753
|
+
l && l.getZoom() > 1 && (r.preventDefault(), l.pan(M, 0));
|
|
736
754
|
break;
|
|
737
755
|
case "ArrowRight":
|
|
738
|
-
l && l.getZoom() > 1 && (r.preventDefault(), l.pan(-
|
|
756
|
+
l && l.getZoom() > 1 && (r.preventDefault(), l.pan(-M, 0));
|
|
739
757
|
break;
|
|
740
758
|
case "+":
|
|
741
759
|
case "=":
|
|
@@ -784,7 +802,7 @@ function _(s, t) {
|
|
|
784
802
|
}
|
|
785
803
|
return { activate: i, deactivate: a, destroy: n };
|
|
786
804
|
}
|
|
787
|
-
let y = null,
|
|
805
|
+
let y = null, D = 0;
|
|
788
806
|
function Rt(s) {
|
|
789
807
|
K() && (y || (y = g("div", void 0, {
|
|
790
808
|
"aria-live": "polite",
|
|
@@ -795,16 +813,16 @@ function Rt(s) {
|
|
|
795
813
|
}));
|
|
796
814
|
}
|
|
797
815
|
function B() {
|
|
798
|
-
|
|
816
|
+
D++;
|
|
799
817
|
}
|
|
800
818
|
function Zt() {
|
|
801
|
-
|
|
819
|
+
D = Math.max(0, D - 1), D === 0 && y && (y.remove(), y = null);
|
|
802
820
|
}
|
|
803
|
-
const G = '<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>',
|
|
804
|
-
function
|
|
821
|
+
const G = '<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>', $t = '<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>';
|
|
822
|
+
function Ot() {
|
|
805
823
|
return !!(document.fullscreenEnabled || document.webkitFullscreenEnabled);
|
|
806
824
|
}
|
|
807
|
-
function
|
|
825
|
+
function Xt() {
|
|
808
826
|
return document.fullscreenElement || document.webkitFullscreenElement || null;
|
|
809
827
|
}
|
|
810
828
|
function q(s) {
|
|
@@ -814,7 +832,7 @@ function F() {
|
|
|
814
832
|
return document.exitFullscreen ? document.exitFullscreen() : document.webkitExitFullscreen ? (document.webkitExitFullscreen(), Promise.resolve()) : Promise.reject(new Error("Fullscreen API not supported"));
|
|
815
833
|
}
|
|
816
834
|
function Wt(s, t = {}) {
|
|
817
|
-
if (!
|
|
835
|
+
if (!Ot()) return null;
|
|
818
836
|
const e = g("button", "ci-hotspot-fullscreen-btn", {
|
|
819
837
|
"aria-label": "Enter fullscreen",
|
|
820
838
|
"aria-pressed": "false",
|
|
@@ -823,12 +841,12 @@ function Wt(s, t = {}) {
|
|
|
823
841
|
e.innerHTML = G;
|
|
824
842
|
const o = [];
|
|
825
843
|
function i() {
|
|
826
|
-
return
|
|
844
|
+
return Xt() === s;
|
|
827
845
|
}
|
|
828
846
|
function a() {
|
|
829
|
-
var
|
|
847
|
+
var b;
|
|
830
848
|
const p = i();
|
|
831
|
-
e.innerHTML = p ?
|
|
849
|
+
e.innerHTML = p ? $t : G, e.setAttribute("aria-label", p ? "Exit fullscreen" : "Enter fullscreen"), e.setAttribute("aria-pressed", String(p)), p ? f(s, "ci-hotspot-container--fullscreen") : v(s, "ci-hotspot-container--fullscreen"), (b = t.onChange) == null || b.call(t, p);
|
|
832
850
|
}
|
|
833
851
|
function n() {
|
|
834
852
|
i() ? F().catch(() => {
|
|
@@ -851,7 +869,7 @@ function Wt(s, t = {}) {
|
|
|
851
869
|
o.push(h), s.appendChild(e);
|
|
852
870
|
function d() {
|
|
853
871
|
i() && F().catch(() => {
|
|
854
|
-
}),
|
|
872
|
+
}), v(s, "ci-hotspot-container--fullscreen"), o.forEach((p) => p()), o.length = 0, e.remove();
|
|
855
873
|
}
|
|
856
874
|
return {
|
|
857
875
|
element: e,
|
|
@@ -862,9 +880,9 @@ function Wt(s, t = {}) {
|
|
|
862
880
|
destroy: d
|
|
863
881
|
};
|
|
864
882
|
}
|
|
865
|
-
const Nt = '.ci-hotspot-container{--ci-hotspot-marker-size: 24px;--ci-hotspot-marker-color: #ffffff;--ci-hotspot-marker-bg: rgba(0, 0, 0, .6);--ci-hotspot-marker-border-width: 2px;--ci-hotspot-marker-border-color: rgba(255, 255, 255, .8);--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, .3);--ci-hotspot-pulse-color: rgba(0, 0, 0, .2);--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(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-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(255, 255, 255, .8);--ci-hotspot-marker-color: #1a1a1a;--ci-hotspot-marker-border-color: rgba(0, 0, 0, .3);--ci-hotspot-marker-shadow: 0 2px 8px rgba(0, 0, 0, .15);--ci-hotspot-pulse-color: rgba(0, 0, 0, .15)}.ci-hotspot-theme-dark.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, .3);--ci-hotspot-pulse-color: rgba(255, 255, 255, .15)}.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-marker--navigate{--ci-hotspot-marker-bg: rgba(0, 88, 163, .7)}.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 {
|
|
883
|
+
const Nt = '.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}}', H = class H {
|
|
866
884
|
constructor(t, e) {
|
|
867
|
-
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 = nt(t), this.config = Z(e),
|
|
885
|
+
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 = nt(t), this.config = Z(e), $(this.config), this.config.scenes && this.config.scenes.length > 0 && this.initScenes(), B(), rt(Nt), this.buildDOM(), this.applyTheme(), this.setupImage(), this.initHotspots(), this.config.zoom && this.initZoom(), this.initKeyboard(), this.initFullscreen(), this.setupResponsive();
|
|
868
886
|
}
|
|
869
887
|
/** Auto-initialize all elements with data-ci-hotspot-src or data-ci-hotspot-scenes attribute */
|
|
870
888
|
static autoInit(t) {
|
|
@@ -873,7 +891,7 @@ const Nt = '.ci-hotspot-container{--ci-hotspot-marker-size: 24px;--ci-hotspot-ma
|
|
|
873
891
|
), i = [];
|
|
874
892
|
return o.forEach((a) => {
|
|
875
893
|
const n = it(a);
|
|
876
|
-
(n.src || n.scenes) && i.push(new
|
|
894
|
+
(n.src || n.scenes) && i.push(new H(a, n));
|
|
877
895
|
}), i;
|
|
878
896
|
}
|
|
879
897
|
buildDOM() {
|
|
@@ -881,18 +899,20 @@ const Nt = '.ci-hotspot-container{--ci-hotspot-marker-size: 24px;--ci-hotspot-ma
|
|
|
881
899
|
alt: this.config.alt || "",
|
|
882
900
|
draggable: "false"
|
|
883
901
|
}), this.markersEl = g("div", "ci-hotspot-markers"), this.viewportEl.appendChild(this.imgEl), this.viewportEl.appendChild(this.markersEl), this.containerEl.appendChild(this.viewportEl), this.containerEl.setAttribute("role", "group"), this.containerEl.setAttribute("aria-label", this.config.alt || "Image with hotspots"), this.config.sceneAspectRatio) {
|
|
884
|
-
|
|
902
|
+
f(this.containerEl, "ci-hotspot-container--fixed-ratio");
|
|
885
903
|
const t = this.config.sceneAspectRatio.split(/[:/\s]+/).map(Number);
|
|
886
904
|
t.length >= 2 && t[0] > 0 && t[1] > 0 && (this.viewportEl.style.paddingBottom = `${t[1] / t[0] * 100}%`);
|
|
887
905
|
}
|
|
888
|
-
this.rootEl.innerHTML = "", this.rootEl.appendChild(this.containerEl), this.config.lazyLoad &&
|
|
906
|
+
this.rootEl.innerHTML = "", this.rootEl.appendChild(this.containerEl), this.config.lazyLoad && f(this.containerEl, "ci-hotspot-loading");
|
|
889
907
|
}
|
|
890
908
|
applyTheme() {
|
|
891
|
-
this.config.theme === "dark"
|
|
909
|
+
this.config.theme === "dark" ? f(this.containerEl, "ci-hotspot-theme-dark") : v(this.containerEl, "ci-hotspot-theme-dark");
|
|
910
|
+
const t = this.config.markerTheme && this.config.markerTheme !== "default" ? this.config.markerTheme : this.config.invertMarkerTheme ? "inverted" : "default";
|
|
911
|
+
v(this.containerEl, "ci-hotspot-marker-inverted"), v(this.containerEl, "ci-hotspot-marker-brand"), this.containerEl.style.removeProperty("--ci-hotspot-brand-color"), t === "inverted" ? f(this.containerEl, "ci-hotspot-marker-inverted") : t === "brand" && (f(this.containerEl, "ci-hotspot-marker-brand"), this.config.brandColor && this.containerEl.style.setProperty("--ci-hotspot-brand-color", this.config.brandColor));
|
|
892
912
|
}
|
|
893
913
|
setupImage() {
|
|
894
914
|
const t = () => {
|
|
895
|
-
|
|
915
|
+
v(this.containerEl, "ci-hotspot-loading"), this.imageLoaded = !0, this.renormalizePixelCoordinates(), this.syncMarkersToImage(), this.showLoadTriggerPopovers();
|
|
896
916
|
};
|
|
897
917
|
if (this.imgEl.addEventListener("load", t), this.cleanups.push(() => this.imgEl.removeEventListener("load", t)), this.config.lazyLoad && typeof IntersectionObserver < "u") {
|
|
898
918
|
const e = new IntersectionObserver(
|
|
@@ -910,7 +930,7 @@ const Nt = '.ci-hotspot-container{--ci-hotspot-marker-size: 24px;--ci-hotspot-ma
|
|
|
910
930
|
var t, e;
|
|
911
931
|
if ((t = this.config.cloudimage) != null && t.token) {
|
|
912
932
|
const o = this.containerEl.offsetWidth || 300, i = window.devicePixelRatio || 1, a = ((e = this.zoomPan) == null ? void 0 : e.getZoom()) || 1;
|
|
913
|
-
this.imgEl.src =
|
|
933
|
+
this.imgEl.src = P(
|
|
914
934
|
this.config.src,
|
|
915
935
|
this.config.cloudimage,
|
|
916
936
|
o,
|
|
@@ -939,9 +959,9 @@ const Nt = '.ci-hotspot-container{--ci-hotspot-marker-size: 24px;--ci-hotspot-ma
|
|
|
939
959
|
var h, d;
|
|
940
960
|
if (this.markers.has(t.id)) {
|
|
941
961
|
const p = this.markers.get(t.id);
|
|
942
|
-
|
|
943
|
-
const
|
|
944
|
-
|
|
962
|
+
A(p), this.markers.delete(t.id), (h = this.popovers.get(t.id)) == null || h.destroy(), this.popovers.delete(t.id);
|
|
963
|
+
const b = this.hotspotCleanups.get(t.id);
|
|
964
|
+
b && (b.forEach((w) => w()), this.hotspotCleanups.delete(t.id));
|
|
945
965
|
const E = this.focusTraps.get(t.id);
|
|
946
966
|
E && (E.destroy(), this.focusTraps.delete(t.id));
|
|
947
967
|
}
|
|
@@ -958,14 +978,15 @@ const Nt = '.ci-hotspot-container{--ci-hotspot-marker-size: 24px;--ci-hotspot-ma
|
|
|
958
978
|
if (t.navigateTo) {
|
|
959
979
|
const p = this.enrichNavigateHotspot(t);
|
|
960
980
|
if (!!(p.data || p.content || this.config.renderPopover)) {
|
|
961
|
-
const E = t.placement || this.config.placement || "top",
|
|
981
|
+
const E = t.placement || this.config.placement || "top", w = new N(p, {
|
|
962
982
|
placement: E,
|
|
963
983
|
triggerMode: "hover",
|
|
964
984
|
renderFn: this.config.renderPopover,
|
|
965
985
|
onOpen: this.config.onOpen,
|
|
966
|
-
onClose: this.config.onClose
|
|
986
|
+
onClose: this.config.onClose,
|
|
987
|
+
onProductClick: this.config.onProductClick
|
|
967
988
|
});
|
|
968
|
-
this.popovers.set(t.id,
|
|
989
|
+
this.popovers.set(t.id, w), w.mount(this.containerEl, n), this.bindNavigateTrigger(t, n, w);
|
|
969
990
|
} else
|
|
970
991
|
this.bindNavigateTrigger(t, n);
|
|
971
992
|
return;
|
|
@@ -975,9 +996,10 @@ const Nt = '.ci-hotspot-container{--ci-hotspot-marker-size: 24px;--ci-hotspot-ma
|
|
|
975
996
|
triggerMode: r,
|
|
976
997
|
renderFn: this.config.renderPopover,
|
|
977
998
|
onOpen: this.config.onOpen,
|
|
978
|
-
onClose: this.config.onClose
|
|
999
|
+
onClose: this.config.onClose,
|
|
1000
|
+
onProductClick: this.config.onProductClick
|
|
979
1001
|
});
|
|
980
|
-
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(),
|
|
1002
|
+
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(), m(n, !0), this.ensureFocusTrap(t.id, l.element, n), (d = this.focusTraps.get(t.id)) == null || d.activate());
|
|
981
1003
|
}
|
|
982
1004
|
/** For navigateTo hotspots without explicit data/content, generate popover content from the destination scene */
|
|
983
1005
|
enrichNavigateHotspot(t) {
|
|
@@ -989,24 +1011,24 @@ const Nt = '.ci-hotspot-container{--ci-hotspot-marker-size: 24px;--ci-hotspot-ma
|
|
|
989
1011
|
} : t;
|
|
990
1012
|
}
|
|
991
1013
|
bindNavigateTrigger(t, e, o) {
|
|
992
|
-
if (
|
|
1014
|
+
if (f(e, "ci-hotspot-marker--navigate"), e.innerHTML = H.NAVIGATE_ARROW_SVG, t.arrowDirection != null) {
|
|
993
1015
|
const r = e.querySelector("svg");
|
|
994
1016
|
r && (r.style.transform = `rotate(${t.arrowDirection}deg)`);
|
|
995
1017
|
}
|
|
996
1018
|
const i = t.label || t.navigateTo;
|
|
997
1019
|
if (e.setAttribute("aria-label", `Navigate to ${i}`), e.setAttribute("aria-roledescription", "navigation hotspot"), o) {
|
|
998
1020
|
const r = u(e, "mouseenter", () => {
|
|
999
|
-
this.preloadSceneImage(t.navigateTo), o.clearHideTimer(), o.show(),
|
|
1021
|
+
this.preloadSceneImage(t.navigateTo), o.clearHideTimer(), o.show(), m(e, !0);
|
|
1000
1022
|
}), c = () => {
|
|
1001
1023
|
this.trackedTimeout(() => {
|
|
1002
|
-
o.isVisible() ||
|
|
1024
|
+
o.isVisible() || m(e, !1);
|
|
1003
1025
|
}, 250);
|
|
1004
1026
|
}, l = u(e, "mouseleave", () => {
|
|
1005
1027
|
o.scheduleHide(200), c();
|
|
1006
1028
|
}), h = u(o.element, "mouseleave", () => {
|
|
1007
1029
|
c();
|
|
1008
1030
|
}), d = u(e, "focus", () => {
|
|
1009
|
-
this.preloadSceneImage(t.navigateTo), o.clearHideTimer(), o.show(),
|
|
1031
|
+
this.preloadSceneImage(t.navigateTo), o.clearHideTimer(), o.show(), m(e, !0);
|
|
1010
1032
|
}), p = u(e, "blur", () => {
|
|
1011
1033
|
o.scheduleHide(200), c();
|
|
1012
1034
|
});
|
|
@@ -1021,10 +1043,10 @@ const Nt = '.ci-hotspot-container{--ci-hotspot-marker-size: 24px;--ci-hotspot-ma
|
|
|
1021
1043
|
}
|
|
1022
1044
|
const a = u(e, "click", (r) => {
|
|
1023
1045
|
var c, l, h;
|
|
1024
|
-
r.stopPropagation(), o == null || o.hide(),
|
|
1046
|
+
r.stopPropagation(), o == null || o.hide(), m(e, !1), (l = (c = this.config).onClick) == null || l.call(c, r, t), (h = t.onClick) == null || h.call(t, r, t), this.goToScene(t.navigateTo);
|
|
1025
1047
|
}), n = u(e, "keydown", (r) => {
|
|
1026
1048
|
var c, l, h;
|
|
1027
|
-
(r.key === "Enter" || r.key === " ") && (r.preventDefault(), o == null || o.hide(),
|
|
1049
|
+
(r.key === "Enter" || r.key === " ") && (r.preventDefault(), o == null || o.hide(), m(e, !1), (l = (c = this.config).onClick) == null || l.call(c, r, t), (h = t.onClick) == null || h.call(t, r, t), this.goToScene(t.navigateTo));
|
|
1028
1050
|
});
|
|
1029
1051
|
this.addHotspotCleanups(t.id, a, n);
|
|
1030
1052
|
}
|
|
@@ -1033,10 +1055,10 @@ const Nt = '.ci-hotspot-container{--ci-hotspot-marker-size: 24px;--ci-hotspot-ma
|
|
|
1033
1055
|
}
|
|
1034
1056
|
bindHoverTrigger(t, e, o) {
|
|
1035
1057
|
const i = u(e, "mouseenter", () => {
|
|
1036
|
-
o.clearHideTimer(), o.show(),
|
|
1058
|
+
o.clearHideTimer(), o.show(), m(e, !0);
|
|
1037
1059
|
}), a = () => {
|
|
1038
1060
|
this.trackedTimeout(() => {
|
|
1039
|
-
o.isVisible() ||
|
|
1061
|
+
o.isVisible() || m(e, !1);
|
|
1040
1062
|
}, 250);
|
|
1041
1063
|
}, n = u(e, "mouseleave", () => {
|
|
1042
1064
|
o.scheduleHide(200), a();
|
|
@@ -1050,22 +1072,22 @@ const Nt = '.ci-hotspot-container{--ci-hotspot-marker-size: 24px;--ci-hotspot-ma
|
|
|
1050
1072
|
this.focusTraps.set(t.id, i);
|
|
1051
1073
|
const a = u(e, "click", (r) => {
|
|
1052
1074
|
var c, l, h;
|
|
1053
|
-
r.stopPropagation(), (l = (c = this.config).onClick) == null || l.call(c, r, t), (h = t.onClick) == null || h.call(t, r, t), o.isVisible() ? (o.hide(),
|
|
1075
|
+
r.stopPropagation(), (l = (c = this.config).onClick) == null || l.call(c, r, t), (h = t.onClick) == null || h.call(t, r, t), o.isVisible() ? (o.hide(), m(e, !1), i.deactivate()) : (this.closeAll(), o.show(), m(e, !0), i.activate());
|
|
1054
1076
|
}), n = u(this.containerEl, "click", (r) => {
|
|
1055
|
-
o.isVisible() && !t.keepOpen && !o.element.contains(r.target) && !e.contains(r.target) && (o.hide(),
|
|
1077
|
+
o.isVisible() && !t.keepOpen && !o.element.contains(r.target) && !e.contains(r.target) && (o.hide(), m(e, !1), i.deactivate());
|
|
1056
1078
|
});
|
|
1057
1079
|
this.addHotspotCleanups(t.id, a, n);
|
|
1058
1080
|
}
|
|
1059
1081
|
bindKeyboardTrigger(t, e, o, i) {
|
|
1060
1082
|
const a = u(e, "focus", () => {
|
|
1061
|
-
i === "hover" && (o.clearHideTimer(), o.show(),
|
|
1083
|
+
i === "hover" && (o.clearHideTimer(), o.show(), m(e, !0));
|
|
1062
1084
|
}), n = u(e, "blur", () => {
|
|
1063
1085
|
i === "hover" && (o.scheduleHide(200), this.trackedTimeout(() => {
|
|
1064
|
-
o.isVisible() ||
|
|
1086
|
+
o.isVisible() || m(e, !1);
|
|
1065
1087
|
}, 250));
|
|
1066
1088
|
}), r = u(e, "keydown", (c) => {
|
|
1067
|
-
var l, h, d, p,
|
|
1068
|
-
c.key === "Enter" || c.key === " " ? (c.preventDefault(), (h = (l = this.config).onClick) == null || h.call(l, c, t), o.isVisible() ? (o.hide(),
|
|
1089
|
+
var l, h, d, p, b;
|
|
1090
|
+
c.key === "Enter" || c.key === " " ? (c.preventDefault(), (h = (l = this.config).onClick) == null || h.call(l, c, t), o.isVisible() ? (o.hide(), m(e, !1), (d = this.focusTraps.get(t.id)) == null || d.deactivate()) : (this.closeAll(), o.show(), m(e, !0), this.ensureFocusTrap(t.id, o.element, e), (p = this.focusTraps.get(t.id)) == null || p.activate())) : c.key === "Escape" && o.isVisible() && (o.hide(), m(e, !1), (b = this.focusTraps.get(t.id)) == null || b.deactivate(), e.focus());
|
|
1069
1091
|
});
|
|
1070
1092
|
this.addHotspotCleanups(t.id, a, n, r);
|
|
1071
1093
|
}
|
|
@@ -1088,7 +1110,7 @@ const Nt = '.ci-hotspot-container{--ci-hotspot-marker-size: 24px;--ci-hotspot-ma
|
|
|
1088
1110
|
if (((i == null ? void 0 : i.trigger) || this.config.trigger || "hover") === "load" && !o.isVisible()) {
|
|
1089
1111
|
o.show();
|
|
1090
1112
|
const n = this.markers.get(e);
|
|
1091
|
-
n && (
|
|
1113
|
+
n && (m(n, !0), this.ensureFocusTrap(e, o.element, n), (t = this.focusTraps.get(e)) == null || t.activate());
|
|
1092
1114
|
break;
|
|
1093
1115
|
}
|
|
1094
1116
|
}
|
|
@@ -1189,7 +1211,7 @@ const Nt = '.ci-hotspot-container{--ci-hotspot-marker-size: 24px;--ci-hotspot-ma
|
|
|
1189
1211
|
const o = new Image();
|
|
1190
1212
|
if ((i = this.config.cloudimage) != null && i.token) {
|
|
1191
1213
|
const a = this.containerEl.offsetWidth || 300, n = typeof window < "u" && window.devicePixelRatio || 1;
|
|
1192
|
-
o.src =
|
|
1214
|
+
o.src = P(e.src, this.config.cloudimage, a, 1, n);
|
|
1193
1215
|
} else
|
|
1194
1216
|
o.src = e.src;
|
|
1195
1217
|
}
|
|
@@ -1219,7 +1241,7 @@ const Nt = '.ci-hotspot-container{--ci-hotspot-marker-size: 24px;--ci-hotspot-ma
|
|
|
1219
1241
|
t.destroy();
|
|
1220
1242
|
this.popovers.clear();
|
|
1221
1243
|
for (const [, t] of this.markers)
|
|
1222
|
-
|
|
1244
|
+
A(t);
|
|
1223
1245
|
this.markers.clear(), this.normalizedHotspots.clear();
|
|
1224
1246
|
for (const [, t] of this.focusTraps)
|
|
1225
1247
|
t.destroy();
|
|
@@ -1238,30 +1260,30 @@ const Nt = '.ci-hotspot-container{--ci-hotspot-marker-size: 24px;--ci-hotspot-ma
|
|
|
1238
1260
|
return;
|
|
1239
1261
|
}
|
|
1240
1262
|
const a = this.getSceneTransitionDuration();
|
|
1241
|
-
|
|
1263
|
+
f(this.containerEl, "ci-hotspot-scene-transitioning");
|
|
1242
1264
|
const n = g("img", "ci-hotspot-scene-incoming", {
|
|
1243
1265
|
alt: t.alt || "",
|
|
1244
1266
|
draggable: "false"
|
|
1245
1267
|
});
|
|
1246
1268
|
if ((c = this.config.cloudimage) != null && c.token) {
|
|
1247
1269
|
const l = this.containerEl.offsetWidth || 300, h = typeof window < "u" && window.devicePixelRatio || 1;
|
|
1248
|
-
n.src =
|
|
1270
|
+
n.src = P(t.src, this.config.cloudimage, l, 1, h);
|
|
1249
1271
|
} else
|
|
1250
1272
|
n.src = t.src;
|
|
1251
1273
|
const r = () => {
|
|
1252
|
-
this.destroyed || (e === "fade" ? (
|
|
1274
|
+
this.destroyed || (e === "fade" ? (f(n, "ci-hotspot-scene-fade-in"), f(this.imgEl, "ci-hotspot-scene-fade-out")) : e === "slide" && (f(n, `ci-hotspot-scene-slide-in${o}`), f(this.imgEl, `ci-hotspot-scene-slide-out${o}`)), this.viewportEl.insertBefore(n, this.markersEl), this.transitionTimer = setTimeout(() => {
|
|
1253
1275
|
if (this.transitionTimer = void 0, this.destroyed) return;
|
|
1254
1276
|
this.clearHotspots(), this.switchToScene(t);
|
|
1255
1277
|
const l = () => {
|
|
1256
|
-
n.remove(),
|
|
1278
|
+
n.remove(), v(this.imgEl, "ci-hotspot-scene-fade-out"), v(this.imgEl, `ci-hotspot-scene-slide-out${o}`), v(this.containerEl, "ci-hotspot-scene-transitioning"), i();
|
|
1257
1279
|
};
|
|
1258
1280
|
this.imgEl.complete && this.imgEl.naturalWidth > 0 ? l() : (this.imgEl.addEventListener("load", l, { once: !0 }), this.imgEl.addEventListener("error", l, { once: !0 }));
|
|
1259
1281
|
}, a));
|
|
1260
1282
|
};
|
|
1261
|
-
n.complete ? r() : (
|
|
1262
|
-
|
|
1283
|
+
n.complete ? r() : (f(this.containerEl, "ci-hotspot-scene-loading"), n.onload = () => {
|
|
1284
|
+
v(this.containerEl, "ci-hotspot-scene-loading"), r();
|
|
1263
1285
|
}, n.onerror = () => {
|
|
1264
|
-
this.destroyed || (
|
|
1286
|
+
this.destroyed || (v(this.containerEl, "ci-hotspot-scene-loading"), n.remove(), v(this.containerEl, "ci-hotspot-scene-transitioning"), this.clearHotspots(), this.switchToScene(t), i());
|
|
1265
1287
|
});
|
|
1266
1288
|
}
|
|
1267
1289
|
switchToScene(t) {
|
|
@@ -1272,7 +1294,7 @@ const Nt = '.ci-hotspot-container{--ci-hotspot-marker-size: 24px;--ci-hotspot-ma
|
|
|
1272
1294
|
};
|
|
1273
1295
|
if (this.imgEl.addEventListener("load", e, { once: !0 }), (o = this.config.cloudimage) != null && o.token) {
|
|
1274
1296
|
const i = this.containerEl.offsetWidth || 300, a = typeof window < "u" && window.devicePixelRatio || 1;
|
|
1275
|
-
this.imgEl.src =
|
|
1297
|
+
this.imgEl.src = P(t.src, this.config.cloudimage, i, 1, a);
|
|
1276
1298
|
} else
|
|
1277
1299
|
this.imgEl.src = t.src;
|
|
1278
1300
|
this.imgEl.complete && this.imgEl.naturalWidth > 0 && !this.imageLoaded && (this.imgEl.removeEventListener("load", e), e()), this.initHotspots();
|
|
@@ -1291,13 +1313,13 @@ const Nt = '.ci-hotspot-container{--ci-hotspot-marker-size: 24px;--ci-hotspot-ma
|
|
|
1291
1313
|
var i;
|
|
1292
1314
|
if (this.destroyed) return;
|
|
1293
1315
|
const e = this.popovers.get(t), o = this.markers.get(t);
|
|
1294
|
-
!e || !o || e.isVisible() || (this.closeAll(), e.show(),
|
|
1316
|
+
!e || !o || e.isVisible() || (this.closeAll(), e.show(), m(o, !0), (i = this.focusTraps.get(t)) == null || i.activate());
|
|
1295
1317
|
}
|
|
1296
1318
|
close(t) {
|
|
1297
1319
|
var i;
|
|
1298
1320
|
if (this.destroyed) return;
|
|
1299
1321
|
const e = this.popovers.get(t), o = this.markers.get(t);
|
|
1300
|
-
e && o && (e.hide(),
|
|
1322
|
+
e && o && (e.hide(), m(o, !1), (i = this.focusTraps.get(t)) == null || i.deactivate());
|
|
1301
1323
|
}
|
|
1302
1324
|
closeAll() {
|
|
1303
1325
|
var t;
|
|
@@ -1306,7 +1328,7 @@ const Nt = '.ci-hotspot-container{--ci-hotspot-marker-size: 24px;--ci-hotspot-ma
|
|
|
1306
1328
|
if (o.isVisible()) {
|
|
1307
1329
|
o.hide();
|
|
1308
1330
|
const i = this.markers.get(e);
|
|
1309
|
-
i &&
|
|
1331
|
+
i && m(i, !1), (t = this.focusTraps.get(e)) == null || t.deactivate();
|
|
1310
1332
|
}
|
|
1311
1333
|
}
|
|
1312
1334
|
}
|
|
@@ -1380,7 +1402,7 @@ const Nt = '.ci-hotspot-container{--ci-hotspot-marker-size: 24px;--ci-hotspot-ma
|
|
|
1380
1402
|
const o = this.focusTraps.get(t);
|
|
1381
1403
|
o && (o.destroy(), this.focusTraps.delete(t));
|
|
1382
1404
|
const i = this.markers.get(t), a = this.popovers.get(t);
|
|
1383
|
-
a && (a.destroy(), this.popovers.delete(t)), i && (
|
|
1405
|
+
a && (a.destroy(), this.popovers.delete(t)), i && (A(i), this.markers.delete(t)), this.normalizedHotspots.delete(t), this.config.hotspots = this.config.hotspots.filter((n) => n.id !== t), this.syncCurrentSceneHotspots();
|
|
1384
1406
|
}
|
|
1385
1407
|
updateHotspot(t, e) {
|
|
1386
1408
|
if (this.destroyed) return;
|
|
@@ -1392,7 +1414,7 @@ const Nt = '.ci-hotspot-container{--ci-hotspot-marker-size: 24px;--ci-hotspot-ma
|
|
|
1392
1414
|
c && a && this.markersEl.contains(a) && this.markersEl.insertBefore(c, a), this.syncCurrentSceneHotspots();
|
|
1393
1415
|
}
|
|
1394
1416
|
update(t) {
|
|
1395
|
-
this.destroyed || (this.destroyInternal(), B(), this.config = Z({ ...this.config, ...t }),
|
|
1417
|
+
this.destroyed || (this.destroyInternal(), B(), this.config = Z({ ...this.config, ...t }), $(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());
|
|
1396
1418
|
}
|
|
1397
1419
|
destroy() {
|
|
1398
1420
|
this.destroyed || (this.destroyed = !0, this.destroyInternal(), this.rootEl.innerHTML = "");
|
|
@@ -1409,15 +1431,15 @@ const Nt = '.ci-hotspot-container{--ci-hotspot-marker-size: 24px;--ci-hotspot-ma
|
|
|
1409
1431
|
c.destroy();
|
|
1410
1432
|
this.popovers.clear();
|
|
1411
1433
|
for (const [, c] of this.markers)
|
|
1412
|
-
|
|
1434
|
+
A(c);
|
|
1413
1435
|
this.markers.clear(), this.normalizedHotspots.clear();
|
|
1414
1436
|
for (const [, c] of this.focusTraps)
|
|
1415
1437
|
c.destroy();
|
|
1416
1438
|
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, (i = this.zoomControls) == null || i.destroy(), this.zoomControls = null, (a = this.scrollHint) == null || a.destroy(), this.scrollHint = null, (n = this.cloudimageHandler) == null || n.destroy(), this.cloudimageHandler = null, (r = this.resizeObserver) == null || r.disconnect(), this.resizeObserver = null, Zt();
|
|
1417
1439
|
}
|
|
1418
1440
|
};
|
|
1419
|
-
|
|
1420
|
-
let U =
|
|
1441
|
+
H.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>';
|
|
1442
|
+
let U = H;
|
|
1421
1443
|
export {
|
|
1422
1444
|
U as CIHotspot,
|
|
1423
1445
|
U as default
|