js-cloudimage-360-view 4.1.3 → 4.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +25 -8
- package/dist/js-cloudimage-360-view.min.js +1 -1
- package/dist/react/{ci360-CJCqgguJ.mjs → ci360-CILBSFAa.mjs} +512 -512
- package/dist/react/{ci360-CJCqgguJ.mjs.map → ci360-CILBSFAa.mjs.map} +1 -1
- package/dist/react/{ci360-D8dcdUHo.js → ci360-TSs45Yhc.js} +6 -6
- package/dist/react/{ci360-D8dcdUHo.js.map → ci360-TSs45Yhc.js.map} +1 -1
- package/dist/react/index.cjs +1 -1
- package/dist/react/index.cjs.map +1 -1
- package/dist/react/index.js +185 -155
- package/dist/react/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -5,17 +5,17 @@ var Mt = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : t
|
|
|
5
5
|
function ii(e) {
|
|
6
6
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
7
7
|
}
|
|
8
|
-
var Ze = "Expected a function", ce = NaN,
|
|
8
|
+
var Ze = "Expected a function", ce = NaN, si = "[object Symbol]", oi = /^\s+|\s+$/g, ni = /^[-+]0x[0-9a-f]+$/i, ri = /^0b[01]+$/i, ai = /^0o[0-7]+$/i, li = parseInt, ci = typeof Mt == "object" && Mt && Mt.Object === Object && Mt, hi = typeof self == "object" && self && self.Object === Object && self, di = ci || hi || Function("return this")(), ui = Object.prototype, pi = ui.toString, fi = Math.max, mi = Math.min, Kt = function() {
|
|
9
9
|
return di.Date.now();
|
|
10
10
|
};
|
|
11
11
|
function vi(e, t, i) {
|
|
12
|
-
var
|
|
12
|
+
var s, o, n, l, r, a, c = 0, h = !1, p = !1, f = !0;
|
|
13
13
|
if (typeof e != "function")
|
|
14
14
|
throw new TypeError(Ze);
|
|
15
15
|
t = he(t) || 0, Bt(i) && (h = !!i.leading, p = "maxWait" in i, n = p ? fi(he(i.maxWait) || 0, t) : n, f = "trailing" in i ? !!i.trailing : f);
|
|
16
16
|
function u(y) {
|
|
17
|
-
var O =
|
|
18
|
-
return
|
|
17
|
+
var O = s, S = o;
|
|
18
|
+
return s = o = void 0, c = y, l = e.apply(S, O), l;
|
|
19
19
|
}
|
|
20
20
|
function I(y) {
|
|
21
21
|
return c = y, r = setTimeout(m, t), h ? u(y) : l;
|
|
@@ -35,17 +35,17 @@ function vi(e, t, i) {
|
|
|
35
35
|
r = setTimeout(m, g(y));
|
|
36
36
|
}
|
|
37
37
|
function b(y) {
|
|
38
|
-
return r = void 0, f &&
|
|
38
|
+
return r = void 0, f && s ? u(y) : (s = o = void 0, l);
|
|
39
39
|
}
|
|
40
40
|
function x() {
|
|
41
|
-
r !== void 0 && clearTimeout(r), c = 0,
|
|
41
|
+
r !== void 0 && clearTimeout(r), c = 0, s = a = o = r = void 0;
|
|
42
42
|
}
|
|
43
43
|
function w() {
|
|
44
44
|
return r === void 0 ? l : b(Kt());
|
|
45
45
|
}
|
|
46
46
|
function C() {
|
|
47
47
|
var y = Kt(), O = v(y);
|
|
48
|
-
if (
|
|
48
|
+
if (s = arguments, o = this, a = y, O) {
|
|
49
49
|
if (r === void 0)
|
|
50
50
|
return I(a);
|
|
51
51
|
if (p)
|
|
@@ -56,13 +56,13 @@ function vi(e, t, i) {
|
|
|
56
56
|
return C.cancel = x, C.flush = w, C;
|
|
57
57
|
}
|
|
58
58
|
function gi(e, t, i) {
|
|
59
|
-
var
|
|
59
|
+
var s = !0, o = !0;
|
|
60
60
|
if (typeof e != "function")
|
|
61
61
|
throw new TypeError(Ze);
|
|
62
|
-
return Bt(i) && (
|
|
63
|
-
leading:
|
|
62
|
+
return Bt(i) && (s = "leading" in i ? !!i.leading : s, o = "trailing" in i ? !!i.trailing : o), vi(e, t, {
|
|
63
|
+
leading: s,
|
|
64
64
|
maxWait: t,
|
|
65
|
-
trailing:
|
|
65
|
+
trailing: o
|
|
66
66
|
});
|
|
67
67
|
}
|
|
68
68
|
function Bt(e) {
|
|
@@ -73,7 +73,7 @@ function yi(e) {
|
|
|
73
73
|
return !!e && typeof e == "object";
|
|
74
74
|
}
|
|
75
75
|
function bi(e) {
|
|
76
|
-
return typeof e == "symbol" || yi(e) && pi.call(e) ==
|
|
76
|
+
return typeof e == "symbol" || yi(e) && pi.call(e) == si;
|
|
77
77
|
}
|
|
78
78
|
function he(e) {
|
|
79
79
|
if (typeof e == "number")
|
|
@@ -86,7 +86,7 @@ function he(e) {
|
|
|
86
86
|
}
|
|
87
87
|
if (typeof e != "string")
|
|
88
88
|
return e === 0 ? e : +e;
|
|
89
|
-
e = e.replace(
|
|
89
|
+
e = e.replace(oi, "");
|
|
90
90
|
var i = ri.test(e);
|
|
91
91
|
return i || ai.test(e) ? li(e.slice(2), i ? 2 : 8) : ni.test(e) ? ce : +e;
|
|
92
92
|
}
|
|
@@ -201,8 +201,8 @@ const de = /* @__PURE__ */ ii(wi), M = {
|
|
|
201
201
|
const t = [];
|
|
202
202
|
e.amountX !== void 0 && e.amountX < 0 && t.push("amountX should be a positive number"), e.amountY !== void 0 && e.amountY < 0 && t.push("amountY should be a positive number"), e.speed !== void 0 && e.speed <= 0 && t.push("speed should be a positive number"), e.dragSpeed !== void 0 && e.dragSpeed <= 0 && t.push("dragSpeed should be a positive number"), e.pointerZoom !== void 0 && e.pointerZoom !== 0 && (e.pointerZoom < 1 || e.pointerZoom > 5) && t.push("pointerZoom should be between 1 and 5 (or 0 to disable)"), e.magnifier !== void 0 && e.magnifier !== null && e.magnifier !== 0 && (e.magnifier < 1 || e.magnifier > 5) && t.push("magnifier should be between 1 and 5 (or 0/null to disable)"), !e.folder && !e.imageListX && !e.imageListY && t.push("Either folder or imageListX/imageListY is required"), e.folder && !e.amountX && !e.imageListX && t.push("amountX is required when using folder (unless imageListX is provided)");
|
|
203
203
|
const i = ["spin-x", "spin-y", "spin-xy", "spin-yx"];
|
|
204
|
-
return e.autoplayBehavior && !i.includes(e.autoplayBehavior) && t.push(`autoplayBehavior should be one of: ${i.join(", ")}`), t.forEach((
|
|
205
|
-
console.warn(`CloudImage 360: ${
|
|
204
|
+
return e.autoplayBehavior && !i.includes(e.autoplayBehavior) && t.push(`autoplayBehavior should be one of: ${i.join(", ")}`), t.forEach((s) => {
|
|
205
|
+
console.warn(`CloudImage 360: ${s}`);
|
|
206
206
|
}), t.length === 0;
|
|
207
207
|
}, Xi = (e) => (Yi(e), {
|
|
208
208
|
folder: e.folder || d.folder,
|
|
@@ -260,35 +260,35 @@ const de = /* @__PURE__ */ ii(wi), M = {
|
|
|
260
260
|
onDragEnd: e.onDragEnd ?? d.onDragEnd
|
|
261
261
|
}), L = (e, t, i) => e.getAttribute(t) || e.getAttribute(`data-${t}`) || i, X = (e, t, i) => {
|
|
262
262
|
if (!(e.hasAttribute(t) || e.hasAttribute(`data-${t}`))) return i;
|
|
263
|
-
const
|
|
264
|
-
return
|
|
263
|
+
const o = L(e, t, null);
|
|
264
|
+
return o !== "false" && o !== "0";
|
|
265
265
|
}, Ht = (e, t) => L(e, t, null) === "false", Pi = (e = 1) => {
|
|
266
266
|
const t = Math.round(window.devicePixelRatio || 1);
|
|
267
267
|
return parseInt(e) * t;
|
|
268
268
|
}, Ri = (e, t, i) => new URL(e).origin.includes("cloudimg") ? e : `https://${t}.cloudimg.io/${i}${e}`, Mi = ({ ciTransformation: e, responsiveWidth: t, ciFilters: i }) => {
|
|
269
|
-
const
|
|
270
|
-
return `${
|
|
269
|
+
const s = `width=${t}`, o = e || s, n = i ? `&f=${i}` : "";
|
|
270
|
+
return `${o}${n}`;
|
|
271
271
|
}, Et = (e, t) => {
|
|
272
|
-
const { folder: i, apiVersion:
|
|
272
|
+
const { folder: i, apiVersion: s, filename: o = "", ciParams: n } = e, { ciToken: l, ciFilters: r, ciTransformation: a } = n || {}, c = `${i}${o}`;
|
|
273
273
|
if (!l) return c;
|
|
274
|
-
const h = Ii.includes(
|
|
274
|
+
const h = Ii.includes(s) ? null : s, p = h ? `${h}/` : "", f = Pi(t), u = Ri(c, l, p), I = Mi({
|
|
275
275
|
ciTransformation: a,
|
|
276
276
|
responsiveWidth: f,
|
|
277
277
|
ciFilters: r
|
|
278
278
|
});
|
|
279
279
|
return `${u}${I ? "?" : ""}${I}`;
|
|
280
280
|
}, Hi = (e, t, i) => {
|
|
281
|
-
const [
|
|
282
|
-
if (!
|
|
283
|
-
return `${
|
|
284
|
-
const l = new URLSearchParams(
|
|
285
|
-
return l.set(t, i), `${
|
|
286
|
-
}, Di = (e, t) => Hi(e, "width", t), Be = (e, t = 0) => (e += "", e.length >= t ? e : new Array(t - e.length + 1).join("0") + e), Zi = (e, { amount: t = 0, indexZeroBase: i = 0 } = {}) => Array.from({ length: t }, (
|
|
281
|
+
const [s, o] = e.split("?"), n = `${t}=${encodeURIComponent(i)}`;
|
|
282
|
+
if (!o)
|
|
283
|
+
return `${s}?${n}`;
|
|
284
|
+
const l = new URLSearchParams(o);
|
|
285
|
+
return l.set(t, i), `${s}?${l.toString()}`;
|
|
286
|
+
}, Di = (e, t) => Hi(e, "width", t), Be = (e, t = 0) => (e += "", e.length >= t ? e : new Array(t - e.length + 1).join("0") + e), Zi = (e, { amount: t = 0, indexZeroBase: i = 0 } = {}) => Array.from({ length: t }, (s, o) => e.replace("{index}", Be(o + 1, i))), Bi = ({
|
|
287
287
|
imagesUrls: e,
|
|
288
288
|
onFirstImageLoad: t,
|
|
289
289
|
onImageLoad: i,
|
|
290
|
-
onAllImagesLoad:
|
|
291
|
-
onError:
|
|
290
|
+
onAllImagesLoad: s,
|
|
291
|
+
onError: o,
|
|
292
292
|
autoplayReverse: n
|
|
293
293
|
}) => {
|
|
294
294
|
let l = 0, r = 0;
|
|
@@ -299,14 +299,14 @@ const de = /* @__PURE__ */ ii(wi), M = {
|
|
|
299
299
|
index: b,
|
|
300
300
|
isFirstImage: x
|
|
301
301
|
};
|
|
302
|
-
h.push(w), r++,
|
|
302
|
+
h.push(w), r++, o == null || o({
|
|
303
303
|
error: w,
|
|
304
304
|
errorCount: r,
|
|
305
305
|
totalImages: a,
|
|
306
306
|
errors: h
|
|
307
307
|
});
|
|
308
308
|
}, f = () => {
|
|
309
|
-
l === a && (
|
|
309
|
+
l === a && (s == null || s(c, { errorCount: r, errors: h }));
|
|
310
310
|
}, u = (m, b) => {
|
|
311
311
|
const x = new Image();
|
|
312
312
|
x.crossOrigin = "anonymous", x.src = m, x.onload = async () => {
|
|
@@ -353,14 +353,14 @@ const de = /* @__PURE__ */ ii(wi), M = {
|
|
|
353
353
|
cdnPathX: e,
|
|
354
354
|
cdnPathY: t,
|
|
355
355
|
configX: i,
|
|
356
|
-
configY:
|
|
357
|
-
onFirstImageLoad:
|
|
356
|
+
configY: s,
|
|
357
|
+
onFirstImageLoad: o,
|
|
358
358
|
onImageLoad: n,
|
|
359
359
|
onAllImagesLoad: l,
|
|
360
360
|
onError: r
|
|
361
361
|
}) => {
|
|
362
362
|
let a = { x: !1, y: !1 }, c = [], h = [], p = { errorCount: 0, errors: [] }, f = { errorCount: 0, errors: [] };
|
|
363
|
-
const u = e || i.imageList.length, I = t ||
|
|
363
|
+
const u = e || i.imageList.length, I = t || s.imageList.length, g = () => {
|
|
364
364
|
if (a.x && a.y) {
|
|
365
365
|
const m = {
|
|
366
366
|
errorCount: p.errorCount + f.errorCount,
|
|
@@ -393,14 +393,14 @@ const de = /* @__PURE__ */ ii(wi), M = {
|
|
|
393
393
|
orientation: P.X,
|
|
394
394
|
loadedImages: c,
|
|
395
395
|
loadStats: p,
|
|
396
|
-
onFirstImageLoad:
|
|
396
|
+
onFirstImageLoad: o
|
|
397
397
|
}) : a.x = !0, I ? v({
|
|
398
398
|
cdnPath: t,
|
|
399
|
-
config:
|
|
399
|
+
config: s,
|
|
400
400
|
orientation: P.Y,
|
|
401
401
|
loadedImages: h,
|
|
402
402
|
loadStats: f,
|
|
403
|
-
onFirstImageLoad: u ? void 0 :
|
|
403
|
+
onFirstImageLoad: u ? void 0 : o
|
|
404
404
|
}) : a.y = !0, !u && !I && g();
|
|
405
405
|
}, Wi = `
|
|
406
406
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1052 156" aria-hidden="true">
|
|
@@ -431,8 +431,8 @@ const de = /* @__PURE__ */ ii(wi), M = {
|
|
|
431
431
|
const t = document.createElement("div");
|
|
432
432
|
return t.className = "cloudimage-initial-icon", t.setAttribute("aria-label", "360 degree view - drag to rotate"), e ? (t.style.backgroundImage = `url('${e}')`, t.style.backgroundPosition = "50% 50%", t.style.backgroundSize = "contain", t.style.backgroundRepeat = "no-repeat") : t.innerHTML = Ni, t;
|
|
433
433
|
}, ji = (e, t) => {
|
|
434
|
-
const { width: i, height:
|
|
435
|
-
return
|
|
434
|
+
const { width: i, height: s } = t, o = document.createElement("canvas");
|
|
435
|
+
return o.width = i, o.height = s, o.style.width = "100%", o.style.height = "auto", e.appendChild(o), o;
|
|
436
436
|
}, $i = () => {
|
|
437
437
|
const e = document.createElement("button");
|
|
438
438
|
return e.className = "cloudimage-360-button cloudimage-360-close-icon", e.setAttribute("aria-label", "Close fullscreen"), e.setAttribute("type", "button"), e.innerHTML = '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M18 6 6 18"/><path d="m6 6 12 12"/></svg>', e;
|
|
@@ -470,10 +470,10 @@ const de = /* @__PURE__ */ ii(wi), M = {
|
|
|
470
470
|
}, Qi = (e) => {
|
|
471
471
|
const t = document.createElement("div");
|
|
472
472
|
return t.className = "cloudimage-360-hotspot-container", e.appendChild(t), t;
|
|
473
|
-
},
|
|
473
|
+
}, ts = (e) => {
|
|
474
474
|
const t = document.createElement("div");
|
|
475
475
|
return t.className = "cloudimage-360-sr-only", t.setAttribute("role", "status"), t.setAttribute("aria-live", "polite"), t.setAttribute("aria-atomic", "true"), e.appendChild(t), t;
|
|
476
|
-
},
|
|
476
|
+
}, es = (e, t) => {
|
|
477
477
|
e && (e.textContent = "", setTimeout(() => {
|
|
478
478
|
e.textContent = t;
|
|
479
479
|
}, 50));
|
|
@@ -484,91 +484,91 @@ const de = /* @__PURE__ */ ii(wi), M = {
|
|
|
484
484
|
pinch: '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M6 6l4 4"/><path d="M18 6l-4 4"/><path d="M6 18l4-4"/><path d="M18 18l-4-4"/><circle cx="12" cy="12" r="2"/></svg>',
|
|
485
485
|
keys: '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><rect width="20" height="16" x="2" y="4" rx="2"/><path d="m9 10 3 3 3-3"/></svg>',
|
|
486
486
|
fullscreen: '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><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>'
|
|
487
|
-
},
|
|
487
|
+
}, is = {
|
|
488
488
|
drag: "Drag to rotate",
|
|
489
489
|
swipe: "Swipe to rotate",
|
|
490
490
|
click: "Click to zoom",
|
|
491
491
|
pinch: "Pinch to zoom",
|
|
492
492
|
keys: "Use arrow keys",
|
|
493
493
|
fullscreen: "Click for fullscreen"
|
|
494
|
-
},
|
|
494
|
+
}, ss = (e) => {
|
|
495
495
|
const t = document.createElement("div");
|
|
496
496
|
return t.className = "cloudimage-360-hint-item", t.innerHTML = `
|
|
497
497
|
${We[e]}
|
|
498
|
-
<span>${
|
|
498
|
+
<span>${is[e]}</span>
|
|
499
499
|
`, t;
|
|
500
500
|
}, ye = (e, t = []) => {
|
|
501
501
|
if (!t || t.length === 0) return null;
|
|
502
502
|
const i = document.createElement("div");
|
|
503
503
|
i.className = "cloudimage-360-hints-overlay", i.setAttribute("role", "tooltip"), i.setAttribute("aria-label", "Interaction hints");
|
|
504
|
-
const
|
|
505
|
-
return
|
|
506
|
-
We[
|
|
507
|
-
}), i.appendChild(
|
|
504
|
+
const s = document.createElement("div");
|
|
505
|
+
return s.className = "cloudimage-360-hints-container", t.forEach((o) => {
|
|
506
|
+
We[o] && s.appendChild(ss(o));
|
|
507
|
+
}), i.appendChild(s), e.appendChild(i), i;
|
|
508
508
|
}, be = (e, t) => t ? ["swipe"] : ["drag", "click"], we = (e) => {
|
|
509
509
|
e && e.classList.add("visible");
|
|
510
|
-
},
|
|
510
|
+
}, os = (e) => {
|
|
511
511
|
e && (e.classList.remove("visible"), e.classList.add("hiding"), setTimeout(() => {
|
|
512
512
|
e.classList.remove("hiding");
|
|
513
513
|
}, 300));
|
|
514
|
-
},
|
|
514
|
+
}, ns = (e) => {
|
|
515
515
|
if (!e || typeof e != "object") return null;
|
|
516
|
-
const t = Object.keys(e).map((
|
|
516
|
+
const t = Object.keys(e).map((s) => parseInt(s, 10)).filter((s) => !isNaN(s)).sort((s, o) => s - o);
|
|
517
517
|
if (t.length === 0) return null;
|
|
518
518
|
const i = Math.floor(t.length / 2);
|
|
519
519
|
return t[i];
|
|
520
|
-
},
|
|
520
|
+
}, rs = (e) => {
|
|
521
521
|
const t = [];
|
|
522
|
-
return !e || !Array.isArray(e) || e.forEach((i,
|
|
523
|
-
const
|
|
524
|
-
|
|
525
|
-
id: i.id || `hotspot-${
|
|
526
|
-
frame:
|
|
522
|
+
return !e || !Array.isArray(e) || e.forEach((i, s) => {
|
|
523
|
+
const o = ns(i.positions);
|
|
524
|
+
o !== null && t.push({
|
|
525
|
+
id: i.id || `hotspot-${s}`,
|
|
526
|
+
frame: o,
|
|
527
527
|
label: i.label || null
|
|
528
528
|
});
|
|
529
529
|
}), t;
|
|
530
|
-
},
|
|
531
|
-
const
|
|
532
|
-
|
|
530
|
+
}, as = 400, ls = (e, t, i, s) => {
|
|
531
|
+
const o = document.createElement("button");
|
|
532
|
+
o.className = "cloudimage-360-hotspot-timeline-dot", o.setAttribute("type", "button"), o.setAttribute("aria-label", s || `Go to hotspot at frame ${t + 1}`), o.setAttribute("data-frame", t.toString()), o.setAttribute("data-hotspot-id", e);
|
|
533
533
|
const n = i > 1 ? t / (i - 1) * 100 : 0;
|
|
534
|
-
if (
|
|
534
|
+
if (o.style.left = `${n}%`, s) {
|
|
535
535
|
const l = document.createElement("span");
|
|
536
|
-
l.className = "cloudimage-360-hotspot-timeline-tooltip", l.textContent =
|
|
536
|
+
l.className = "cloudimage-360-hotspot-timeline-tooltip", l.textContent = s, o.appendChild(l);
|
|
537
537
|
let r = null;
|
|
538
|
-
|
|
538
|
+
o.addEventListener("mouseenter", () => {
|
|
539
539
|
r = setTimeout(() => {
|
|
540
540
|
l.classList.add("visible");
|
|
541
|
-
},
|
|
542
|
-
}),
|
|
541
|
+
}, as);
|
|
542
|
+
}), o.addEventListener("mouseleave", () => {
|
|
543
543
|
r && (clearTimeout(r), r = null), l.classList.remove("visible");
|
|
544
|
-
}),
|
|
544
|
+
}), o.addEventListener("click", () => {
|
|
545
545
|
r && (clearTimeout(r), r = null), l.classList.remove("visible");
|
|
546
546
|
});
|
|
547
547
|
}
|
|
548
|
-
return
|
|
549
|
-
},
|
|
550
|
-
const
|
|
551
|
-
if (
|
|
552
|
-
const
|
|
553
|
-
|
|
548
|
+
return o;
|
|
549
|
+
}, cs = (e, t, i) => {
|
|
550
|
+
const s = rs(i);
|
|
551
|
+
if (s.length === 0) return null;
|
|
552
|
+
const o = document.createElement("div");
|
|
553
|
+
o.className = "cloudimage-360-hotspot-timeline", o.setAttribute("role", "navigation"), o.setAttribute("aria-label", "Hotspot timeline navigation");
|
|
554
554
|
const n = document.createElement("div");
|
|
555
555
|
n.className = "cloudimage-360-hotspot-timeline-track";
|
|
556
556
|
const l = document.createElement("div");
|
|
557
|
-
return l.className = "cloudimage-360-hotspot-timeline-indicator",
|
|
558
|
-
const h =
|
|
557
|
+
return l.className = "cloudimage-360-hotspot-timeline-indicator", s.forEach(({ id: r, frame: a, label: c }) => {
|
|
558
|
+
const h = ls(r, a, t, c);
|
|
559
559
|
n.appendChild(h);
|
|
560
|
-
}), n.appendChild(l),
|
|
561
|
-
element:
|
|
560
|
+
}), n.appendChild(l), o.appendChild(n), e.appendChild(o), {
|
|
561
|
+
element: o,
|
|
562
562
|
indicator: l,
|
|
563
|
-
hotspotFrames:
|
|
563
|
+
hotspotFrames: s
|
|
564
564
|
};
|
|
565
|
-
},
|
|
565
|
+
}, hs = (e, t, i) => {
|
|
566
566
|
if (!e) return;
|
|
567
|
-
const
|
|
568
|
-
e.style.left = `${
|
|
569
|
-
},
|
|
567
|
+
const s = i > 1 ? t / (i - 1) * 100 : 0;
|
|
568
|
+
e.style.left = `${s}%`;
|
|
569
|
+
}, ds = (e) => {
|
|
570
570
|
e && e.classList.add("visible");
|
|
571
|
-
},
|
|
571
|
+
}, us = (e) => {
|
|
572
572
|
e && e.classList.remove("visible");
|
|
573
573
|
}, qt = (e, t = []) => {
|
|
574
574
|
if (!e) return t;
|
|
@@ -577,49 +577,49 @@ const de = /* @__PURE__ */ ii(wi), M = {
|
|
|
577
577
|
} catch (i) {
|
|
578
578
|
return console.warn("CloudImage 360: Failed to parse JSON:", i.message), t;
|
|
579
579
|
}
|
|
580
|
-
},
|
|
581
|
-
const [i,
|
|
582
|
-
if (!
|
|
583
|
-
const
|
|
580
|
+
}, ps = (e, t) => {
|
|
581
|
+
const [i, s] = e.split("?");
|
|
582
|
+
if (!s) return e;
|
|
583
|
+
const o = new RegExp(`^${t}=|&${t}=`), n = s.split("&").filter((l) => !o.test(l)).join("&");
|
|
584
584
|
return n ? `${i}?${n}` : i;
|
|
585
|
-
},
|
|
586
|
-
const t =
|
|
585
|
+
}, fs = (e) => {
|
|
586
|
+
const t = ps(e, "width"), i = t.includes("?") ? "&" : "?";
|
|
587
587
|
return `${t}${i}width=${150 * devicePixelRatio}`;
|
|
588
|
-
},
|
|
588
|
+
}, ms = (e) => {
|
|
589
589
|
const t = {
|
|
590
590
|
root: null,
|
|
591
591
|
rootMargin: "0px",
|
|
592
592
|
threshold: 0.1
|
|
593
|
-
}, i = (
|
|
594
|
-
const n =
|
|
595
|
-
n && (
|
|
593
|
+
}, i = (o) => {
|
|
594
|
+
const n = o.getAttribute("data-src");
|
|
595
|
+
n && (o.src = n);
|
|
596
596
|
};
|
|
597
|
-
new IntersectionObserver((
|
|
598
|
-
|
|
597
|
+
new IntersectionObserver((o, n) => {
|
|
598
|
+
o.forEach((l) => {
|
|
599
599
|
l.isIntersecting && (i(l.target), n.unobserve(l.target));
|
|
600
600
|
});
|
|
601
601
|
}, t).observe(e);
|
|
602
|
-
},
|
|
602
|
+
}, vs = (e, t) => {
|
|
603
603
|
const i = Be(1, t);
|
|
604
604
|
return e.replace("{index}", i);
|
|
605
|
-
},
|
|
606
|
-
const [i] = e,
|
|
605
|
+
}, gs = (e, t) => {
|
|
606
|
+
const [i] = e, s = /(https?):\/\//i.test(i);
|
|
607
607
|
return Et({
|
|
608
608
|
...t,
|
|
609
|
-
folder:
|
|
609
|
+
folder: s ? "" : t.folder,
|
|
610
610
|
filename: i
|
|
611
611
|
});
|
|
612
|
-
},
|
|
613
|
-
const { imageList: i, indexZeroBase:
|
|
612
|
+
}, ys = (e, t) => {
|
|
613
|
+
const { imageList: i, indexZeroBase: s } = t;
|
|
614
614
|
if (i.length) {
|
|
615
|
-
const
|
|
616
|
-
if (
|
|
617
|
-
return
|
|
615
|
+
const o = qt(i, null);
|
|
616
|
+
if (o)
|
|
617
|
+
return gs(o, t);
|
|
618
618
|
}
|
|
619
|
-
return
|
|
619
|
+
return vs(e, s);
|
|
620
620
|
}, Ie = (e, t, i) => {
|
|
621
|
-
const
|
|
622
|
-
return
|
|
621
|
+
const s = new Image();
|
|
622
|
+
return s.setAttribute(t ? "data-src" : "src", e), s.className = i, s.style.cssText = `
|
|
623
623
|
position: ${t ? "absolute" : "static"};
|
|
624
624
|
width: 100%;
|
|
625
625
|
inset: 0;
|
|
@@ -627,10 +627,10 @@ const de = /* @__PURE__ */ ii(wi), M = {
|
|
|
627
627
|
object-fit: contain;
|
|
628
628
|
object-position: center;
|
|
629
629
|
filter: blur(10px);
|
|
630
|
-
`,
|
|
630
|
+
`, s;
|
|
631
631
|
}, xe = (e, t, i) => {
|
|
632
|
-
const { innerBox:
|
|
633
|
-
Jt(
|
|
632
|
+
const { innerBox: s, imageList: o, lazyload: n } = t || {}, [l] = o, r = l || ys(e, t), a = fs(r), c = Ie(a, n, "cloudimage-lazy"), h = Ie(a, !1, "cloudimage-360-placeholder"), p = (f) => {
|
|
633
|
+
Jt(s, ".cloudimage-lazy"), i && i({
|
|
634
634
|
event: f,
|
|
635
635
|
width: c.width,
|
|
636
636
|
height: c.height,
|
|
@@ -639,39 +639,39 @@ const de = /* @__PURE__ */ ii(wi), M = {
|
|
|
639
639
|
src: a
|
|
640
640
|
});
|
|
641
641
|
};
|
|
642
|
-
c.onload = p,
|
|
643
|
-
},
|
|
644
|
-
const
|
|
645
|
-
|
|
642
|
+
c.onload = p, s.appendChild(c), s.appendChild(h), ms(c);
|
|
643
|
+
}, bs = (e, t, i) => {
|
|
644
|
+
const s = new Image();
|
|
645
|
+
s.src = e, s.onload = (o) => {
|
|
646
646
|
t && t({
|
|
647
|
-
event:
|
|
648
|
-
width:
|
|
649
|
-
height:
|
|
650
|
-
naturalWidth:
|
|
651
|
-
naturalHeight:
|
|
647
|
+
event: o,
|
|
648
|
+
width: s.width,
|
|
649
|
+
height: s.height,
|
|
650
|
+
naturalWidth: s.naturalWidth,
|
|
651
|
+
naturalHeight: s.naturalHeight,
|
|
652
652
|
src: e
|
|
653
653
|
});
|
|
654
|
-
},
|
|
654
|
+
}, s.onerror = (o) => {
|
|
655
655
|
const n = new Error(`Failed to load image: ${e}`);
|
|
656
|
-
n.url = e, n.event =
|
|
656
|
+
n.url = e, n.event = o, i ? i(n) : console.error(n.message);
|
|
657
657
|
};
|
|
658
|
-
},
|
|
659
|
-
const i = t.getBoundingClientRect(),
|
|
658
|
+
}, ws = (e, t) => {
|
|
659
|
+
const i = t.getBoundingClientRect(), s = e.touches ? e.touches[0].clientX : e.clientX, o = e.touches ? e.touches[0].clientY : e.clientY;
|
|
660
660
|
return {
|
|
661
|
-
x:
|
|
662
|
-
y:
|
|
661
|
+
x: s - i.left,
|
|
662
|
+
y: o - i.top
|
|
663
663
|
};
|
|
664
664
|
}, _t = (e, t, i) => {
|
|
665
|
-
const { container:
|
|
665
|
+
const { container: s, w: o, h: n, zoom: l, bw: r, offsetX: a, offsetY: c } = t, h = ws(e, s);
|
|
666
666
|
let p = h.x, f = h.y;
|
|
667
|
-
p = Math.max(
|
|
668
|
-
const u = (p - a) * l -
|
|
667
|
+
p = Math.max(o / l, Math.min(p, s.offsetWidth - o / l)), f = Math.max(n / l, Math.min(f, s.offsetHeight - n / l)), i.style.left = `${p - o}px`, i.style.top = `${f - n}px`;
|
|
668
|
+
const u = (p - a) * l - o + r, I = (f - c) * l - n + r;
|
|
669
669
|
i.style.backgroundPosition = `-${u}px -${I}px`;
|
|
670
|
-
},
|
|
670
|
+
}, Is = (e, t, i, s, o, n) => {
|
|
671
671
|
const { x: l = 0, y: r = 0 } = i || {}, a = (t.offsetWidth - l * 2) * n, c = (t.offsetHeight - r * 2) * n;
|
|
672
|
-
if (!
|
|
673
|
-
|
|
674
|
-
const h = 3, p =
|
|
672
|
+
if (!o) return;
|
|
673
|
+
o.setAttribute("class", "cloudimage-360-img-magnifier-glass"), t.prepend(o), o.style.backgroundImage = `url('${s.src}')`, o.style.backgroundSize = `${a}px ${c}px`;
|
|
674
|
+
const h = 3, p = o.offsetWidth / 2, f = o.offsetHeight / 2, u = {
|
|
675
675
|
container: t,
|
|
676
676
|
w: p,
|
|
677
677
|
h: f,
|
|
@@ -680,39 +680,39 @@ const de = /* @__PURE__ */ ii(wi), M = {
|
|
|
680
680
|
offsetX: l,
|
|
681
681
|
offsetY: r
|
|
682
682
|
};
|
|
683
|
-
_t(e, u,
|
|
683
|
+
_t(e, u, o);
|
|
684
684
|
const I = (v) => {
|
|
685
|
-
_t(v, u,
|
|
685
|
+
_t(v, u, o);
|
|
686
686
|
}, g = (v) => {
|
|
687
|
-
v.preventDefault(), _t(v, u,
|
|
687
|
+
v.preventDefault(), _t(v, u, o);
|
|
688
688
|
};
|
|
689
|
-
|
|
690
|
-
},
|
|
691
|
-
const { clientX:
|
|
689
|
+
o.addEventListener("mousemove", I), t.addEventListener("mousemove", I), t.addEventListener("touchmove", g);
|
|
690
|
+
}, xs = (e, t, i) => {
|
|
691
|
+
const { clientX: s, clientY: o } = e, n = t.getBoundingClientRect(), l = t.width / (n.width * i), r = t.height / (n.height * i), a = (s - n.left) * l, c = (o - n.top) * r;
|
|
692
692
|
return { offsetX: a, offsetY: c };
|
|
693
693
|
}, Ce = (e, { bottom: t, top: i }) => {
|
|
694
694
|
e ? t() : i();
|
|
695
695
|
}, Oe = (e, { left: t, right: i }) => {
|
|
696
696
|
e ? t() : i();
|
|
697
|
-
},
|
|
697
|
+
}, Cs = ({ autoplayBehavior: e, spinY: t, reversed: i, loopTriggers: s }) => {
|
|
698
698
|
switch (e) {
|
|
699
699
|
case M.SPIN_XY:
|
|
700
700
|
case M.SPIN_YX:
|
|
701
|
-
t ? Ce(i,
|
|
701
|
+
t ? Ce(i, s) : Oe(i, s);
|
|
702
702
|
break;
|
|
703
703
|
case M.SPIN_Y:
|
|
704
|
-
Ce(i,
|
|
704
|
+
Ce(i, s);
|
|
705
705
|
break;
|
|
706
706
|
case M.SPIN_X:
|
|
707
707
|
default:
|
|
708
|
-
Oe(i,
|
|
708
|
+
Oe(i, s);
|
|
709
709
|
}
|
|
710
|
-
},
|
|
710
|
+
}, Os = ({
|
|
711
711
|
autoplayBehavior: e,
|
|
712
712
|
activeImageX: t,
|
|
713
713
|
activeImageY: i,
|
|
714
|
-
amountX:
|
|
715
|
-
amountY:
|
|
714
|
+
amountX: s,
|
|
715
|
+
amountY: o,
|
|
716
716
|
autoplayReverse: n
|
|
717
717
|
}) => {
|
|
718
718
|
const l = (r, a) => {
|
|
@@ -722,24 +722,24 @@ const de = /* @__PURE__ */ ii(wi), M = {
|
|
|
722
722
|
switch (e) {
|
|
723
723
|
case M.SPIN_XY:
|
|
724
724
|
case M.SPIN_Y:
|
|
725
|
-
return l(i,
|
|
725
|
+
return l(i, o);
|
|
726
726
|
case M.SPIN_X:
|
|
727
727
|
case M.SPIN_YX:
|
|
728
728
|
default:
|
|
729
|
-
return l(t,
|
|
729
|
+
return l(t, s);
|
|
730
730
|
}
|
|
731
|
-
},
|
|
731
|
+
}, Es = ({
|
|
732
732
|
autoplayBehavior: e,
|
|
733
733
|
activeImageX: t,
|
|
734
734
|
activeImageY: i,
|
|
735
|
-
amountX:
|
|
736
|
-
amountY:
|
|
735
|
+
amountX: s,
|
|
736
|
+
amountY: o,
|
|
737
737
|
autoplayReverse: n,
|
|
738
738
|
spinDirection: l
|
|
739
739
|
}) => {
|
|
740
|
-
const r = t === (n ? 0 :
|
|
740
|
+
const r = t === (n ? 0 : s - 1), a = i === (n ? 0 : o - 1);
|
|
741
741
|
return e === M.SPIN_XY || e === M.SPIN_YX ? l === "x" && r || l === "y" && a : !1;
|
|
742
|
-
},
|
|
742
|
+
}, Ss = (e, t, i) => {
|
|
743
743
|
if (!i) return "x";
|
|
744
744
|
if (!t) return "y";
|
|
745
745
|
switch (e) {
|
|
@@ -753,21 +753,21 @@ const de = /* @__PURE__ */ ii(wi), M = {
|
|
|
753
753
|
default:
|
|
754
754
|
return "x";
|
|
755
755
|
}
|
|
756
|
-
},
|
|
756
|
+
}, As = (e) => e === "x" ? "y" : "x", Ee = (e, t) => {
|
|
757
757
|
const i = [...xi];
|
|
758
758
|
return t ? [...i, ...Ci].includes(e) : i.includes(e);
|
|
759
|
-
}, Se = ({ deltaX: e, deltaY: t, reversed: i, allowSpinX:
|
|
760
|
-
const l =
|
|
761
|
-
return
|
|
762
|
-
},
|
|
759
|
+
}, Se = ({ deltaX: e, deltaY: t, reversed: i, allowSpinX: s, allowSpinY: o, threshold: n = 0 }) => {
|
|
760
|
+
const l = s && !o || o && !s ? 0 : n, r = Math.abs(e), a = Math.abs(t);
|
|
761
|
+
return s && r - l > a ? i ? e > 0 ? "left" : "right" : e > 0 ? "right" : "left" : o && a - l > r ? i ? t > 0 ? "up" : "down" : t > 0 ? "down" : "up" : null;
|
|
762
|
+
}, Ls = () => "ontouchstart" in window || navigator.maxTouchPoints > 0 || navigator.msMaxTouchPoints > 0, ks = (e, t = 150) => {
|
|
763
763
|
let i;
|
|
764
|
-
return function(...
|
|
764
|
+
return function(...s) {
|
|
765
765
|
clearTimeout(i), i = setTimeout(() => {
|
|
766
|
-
e.apply(this,
|
|
766
|
+
e.apply(this, s);
|
|
767
767
|
}, t);
|
|
768
768
|
};
|
|
769
|
-
}, Fe = "KGZ1bmN0aW9uKCl7InVzZSBzdHJpY3QiO2NvbnN0IHY9KHQsYSxlKT0+e2NvbnN0IHM9dC9lLG49YS9lO3JldHVybnt6b29tZWRXaWR0aDpzLHpvb21lZEhlaWdodDpufX0sej0oe3BvaW50ZXJYOnQscG9pbnRlclk6YSxpbWFnZURhdGE6ZSx6b29tZWRXaWR0aDpzLHpvb21lZEhlaWdodDpuLGRyYXdXaWR0aDppLGRyYXdIZWlnaHQ6Y30pPT57Y29uc3R7bmF0dXJhbFdpZHRoOmcsbmF0dXJhbEhlaWdodDp1fT1lO2xldCBmPXQvaSpnLXMvMixtPWEvYyp1LW4vMjtjb25zdCB4PU1hdGgubWF4KDAsZy1zKSxPPU1hdGgubWF4KDAsdS1uKTtyZXR1cm4gZj1NYXRoLm1heCgwLE1hdGgubWluKGYseCkpLG09TWF0aC5tYXgoMCxNYXRoLm1pbihtLE8pKSx7em9vbU9mZnNldFg6Zix6b29tT2Zmc2V0WTptfX07bGV0IG8saCxyLGQsbCx3O3NlbGYub25tZXNzYWdlPWFzeW5jIHQ9Pntjb25zdHthY3Rpb246YSxvZmZzY3JlZW46ZSxkZXZpY2VQaXhlbFJhdGlvOnMsaW1hZ2VEYXRhOm4sem9vbVNjYWxlOmkscG9pbnRlclg6Yyxwb2ludGVyWTpnLGltYWdlQXNwZWN0UmF0aW86dSxjb250YWluZXJXaWR0aDpmLGNvbnRhaW5lckhlaWdodDptfT10LmRhdGE7c3dpdGNoKGEpe2Nhc2UiaW5pdENhbnZhcyI6QyhlLHMpO2JyZWFrO2Nhc2UiYWRhcHRDYW52YXNTaXplIjpwKHUsZixtKTticmVhaztjYXNlImRyYXdJbWFnZU9uQ2FudmFzIjpJKG4saSxjLGcpO2JyZWFrfX07Y29uc3QgQz0odCxhKT0+e289dCxoPW8uZ2V0Q29udGV4dCgiMmQiKSxyPWF9LHA9KHQsYSxlKT0+e2NvbnN0IHM9YS9lO3c9dD5zLG8ud2lkdGg9YSpyLG8uaGVpZ2h0PWUqcixoLnNjYWxlKHIsciksdz8oZD1hLGw9YS90KToobD1lLGQ9ZSp0KSxoLmltYWdlU21vb3RoaW5nRW5hYmxlZD0hMCxoLmltYWdlU21vb3RoaW5nUXVhbGl0eT0iaGlnaCJ9LEk9KHQ9e30sYT0xLGU9MCxzPTApPT57Y29uc3R7Yml0bWFwSW1hZ2U6bn09dDtpZighb3x8IW4pcmV0dXJuO2xldCBpLGM7aWYodz8oaT0wLGM9KG8uaGVpZ2h0L3ItbCkvMik6KGk9KG8ud2lkdGgvci1kKS8yLGM9MCksaC5jbGVhclJlY3QoMCwwLG8ud2lkdGgsby5oZWlnaHQpLGEhPT0xKXtjb25zdHtuYXR1cmFsV2lkdGg6ZyxuYXR1cmFsSGVpZ2h0OnV9PXQse3pvb21lZFdpZHRoOmYsem9vbWVkSGVpZ2h0Om19PXYoZyx1LGEpLHt6b29tT2Zmc2V0WDp4LHpvb21PZmZzZXRZOk99PXooe3BvaW50ZXJYOmUscG9pbnRlclk6cyxpbWFnZURhdGE6dCx6b29tZWRXaWR0aDpmLHpvb21lZEhlaWdodDptLGRyYXdXaWR0aDpkLGRyYXdIZWlnaHQ6bH0pO2guZHJhd0ltYWdlKG4seCxPLGYsbSxpLGMsZCxsKX1lbHNlIGguZHJhd0ltYWdlKG4saSxjLGQsbCl9fSkoKTsKLy8jIHNvdXJjZU1hcHBpbmdVUkw9Y2FudmFzLndvcmtlci1DZzBma3BEMS5qcy5tYXAK",
|
|
770
|
-
function
|
|
769
|
+
}, Fe = "KGZ1bmN0aW9uKCl7InVzZSBzdHJpY3QiO2NvbnN0IHY9KHQsYSxlKT0+e2NvbnN0IHM9dC9lLG49YS9lO3JldHVybnt6b29tZWRXaWR0aDpzLHpvb21lZEhlaWdodDpufX0sej0oe3BvaW50ZXJYOnQscG9pbnRlclk6YSxpbWFnZURhdGE6ZSx6b29tZWRXaWR0aDpzLHpvb21lZEhlaWdodDpuLGRyYXdXaWR0aDppLGRyYXdIZWlnaHQ6Y30pPT57Y29uc3R7bmF0dXJhbFdpZHRoOmcsbmF0dXJhbEhlaWdodDp1fT1lO2xldCBmPXQvaSpnLXMvMixtPWEvYyp1LW4vMjtjb25zdCB4PU1hdGgubWF4KDAsZy1zKSxPPU1hdGgubWF4KDAsdS1uKTtyZXR1cm4gZj1NYXRoLm1heCgwLE1hdGgubWluKGYseCkpLG09TWF0aC5tYXgoMCxNYXRoLm1pbihtLE8pKSx7em9vbU9mZnNldFg6Zix6b29tT2Zmc2V0WTptfX07bGV0IG8saCxyLGQsbCx3O3NlbGYub25tZXNzYWdlPWFzeW5jIHQ9Pntjb25zdHthY3Rpb246YSxvZmZzY3JlZW46ZSxkZXZpY2VQaXhlbFJhdGlvOnMsaW1hZ2VEYXRhOm4sem9vbVNjYWxlOmkscG9pbnRlclg6Yyxwb2ludGVyWTpnLGltYWdlQXNwZWN0UmF0aW86dSxjb250YWluZXJXaWR0aDpmLGNvbnRhaW5lckhlaWdodDptfT10LmRhdGE7c3dpdGNoKGEpe2Nhc2UiaW5pdENhbnZhcyI6QyhlLHMpO2JyZWFrO2Nhc2UiYWRhcHRDYW52YXNTaXplIjpwKHUsZixtKTticmVhaztjYXNlImRyYXdJbWFnZU9uQ2FudmFzIjpJKG4saSxjLGcpO2JyZWFrfX07Y29uc3QgQz0odCxhKT0+e289dCxoPW8uZ2V0Q29udGV4dCgiMmQiKSxyPWF9LHA9KHQsYSxlKT0+e2NvbnN0IHM9YS9lO3c9dD5zLG8ud2lkdGg9YSpyLG8uaGVpZ2h0PWUqcixoLnNjYWxlKHIsciksdz8oZD1hLGw9YS90KToobD1lLGQ9ZSp0KSxoLmltYWdlU21vb3RoaW5nRW5hYmxlZD0hMCxoLmltYWdlU21vb3RoaW5nUXVhbGl0eT0iaGlnaCJ9LEk9KHQ9e30sYT0xLGU9MCxzPTApPT57Y29uc3R7Yml0bWFwSW1hZ2U6bn09dDtpZighb3x8IW4pcmV0dXJuO2xldCBpLGM7aWYodz8oaT0wLGM9KG8uaGVpZ2h0L3ItbCkvMik6KGk9KG8ud2lkdGgvci1kKS8yLGM9MCksaC5jbGVhclJlY3QoMCwwLG8ud2lkdGgsby5oZWlnaHQpLGEhPT0xKXtjb25zdHtuYXR1cmFsV2lkdGg6ZyxuYXR1cmFsSGVpZ2h0OnV9PXQse3pvb21lZFdpZHRoOmYsem9vbWVkSGVpZ2h0Om19PXYoZyx1LGEpLHt6b29tT2Zmc2V0WDp4LHpvb21PZmZzZXRZOk99PXooe3BvaW50ZXJYOmUscG9pbnRlclk6cyxpbWFnZURhdGE6dCx6b29tZWRXaWR0aDpmLHpvb21lZEhlaWdodDptLGRyYXdXaWR0aDpkLGRyYXdIZWlnaHQ6bH0pO2guZHJhd0ltYWdlKG4seCxPLGYsbSxpLGMsZCxsKX1lbHNlIGguZHJhd0ltYWdlKG4saSxjLGQsbCl9fSkoKTsKLy8jIHNvdXJjZU1hcHBpbmdVUkw9Y2FudmFzLndvcmtlci1DZzBma3BEMS5qcy5tYXAK", Ts = (e) => Uint8Array.from(atob(e), (t) => t.charCodeAt(0)), Ae = typeof self < "u" && self.Blob && new Blob([Ts(Fe)], { type: "text/javascript;charset=utf-8" });
|
|
770
|
+
function Ys(e) {
|
|
771
771
|
let t;
|
|
772
772
|
try {
|
|
773
773
|
if (t = Ae && (self.URL || self.webkitURL).createObjectURL(Ae), !t) throw "";
|
|
@@ -788,7 +788,7 @@ function Xo(e) {
|
|
|
788
788
|
t && (self.URL || self.webkitURL).revokeObjectURL(t);
|
|
789
789
|
}
|
|
790
790
|
}
|
|
791
|
-
const
|
|
791
|
+
const Xs = /* @__PURE__ */ new Set([
|
|
792
792
|
// Basic HTML
|
|
793
793
|
"p",
|
|
794
794
|
"span",
|
|
@@ -875,78 +875,78 @@ const Po = /* @__PURE__ */ new Set([
|
|
|
875
875
|
clippath: ["id"],
|
|
876
876
|
mask: ["id"],
|
|
877
877
|
"*": ["class", "id", "style"]
|
|
878
|
-
},
|
|
878
|
+
}, Ps = [
|
|
879
879
|
/javascript:/gi,
|
|
880
880
|
/vbscript:/gi,
|
|
881
881
|
/data:/gi,
|
|
882
882
|
/on\w+\s*=/gi
|
|
883
|
-
],
|
|
883
|
+
], Rs = (e) => {
|
|
884
884
|
if (typeof e != "string")
|
|
885
885
|
return "";
|
|
886
886
|
const t = document.createElement("template");
|
|
887
887
|
t.innerHTML = e;
|
|
888
|
-
const i = (
|
|
889
|
-
if (Array.from(
|
|
890
|
-
const n =
|
|
891
|
-
if (!
|
|
888
|
+
const i = (s) => {
|
|
889
|
+
if (Array.from(s.childNodes).forEach(i), s.nodeType === Node.ELEMENT_NODE) {
|
|
890
|
+
const n = s.tagName.toLowerCase();
|
|
891
|
+
if (!Xs.has(n)) {
|
|
892
892
|
if (n === "script" || n === "style") {
|
|
893
|
-
|
|
893
|
+
s.remove();
|
|
894
894
|
return;
|
|
895
895
|
}
|
|
896
|
-
const a = document.createTextNode(
|
|
897
|
-
|
|
896
|
+
const a = document.createTextNode(s.textContent);
|
|
897
|
+
s.parentNode.replaceChild(a, s);
|
|
898
898
|
return;
|
|
899
899
|
}
|
|
900
900
|
const l = [
|
|
901
901
|
...Le[n] || [],
|
|
902
902
|
...Le["*"] || []
|
|
903
903
|
];
|
|
904
|
-
if (Array.from(
|
|
904
|
+
if (Array.from(s.attributes).forEach((a) => {
|
|
905
905
|
const c = a.name.toLowerCase();
|
|
906
906
|
if (c.startsWith("on")) {
|
|
907
|
-
|
|
907
|
+
s.removeAttribute(a.name);
|
|
908
908
|
return;
|
|
909
909
|
}
|
|
910
910
|
if (!l.includes(c)) {
|
|
911
|
-
|
|
911
|
+
s.removeAttribute(a.name);
|
|
912
912
|
return;
|
|
913
913
|
}
|
|
914
914
|
let h = a.value;
|
|
915
|
-
|
|
916
|
-
p.test(h) &&
|
|
915
|
+
Ps.forEach((p) => {
|
|
916
|
+
p.test(h) && s.removeAttribute(a.name);
|
|
917
917
|
});
|
|
918
918
|
}), n === "a") {
|
|
919
|
-
const a =
|
|
920
|
-
a && (/^(https?:|mailto:|tel:|#|\/)/i.test(a.trim()) ||
|
|
919
|
+
const a = s.getAttribute("href");
|
|
920
|
+
a && (/^(https?:|mailto:|tel:|#|\/)/i.test(a.trim()) || s.removeAttribute("href")), s.getAttribute("target") === "_blank" && s.setAttribute("rel", "noopener noreferrer");
|
|
921
921
|
}
|
|
922
922
|
if (n === "img") {
|
|
923
|
-
const a =
|
|
924
|
-
a && (/^(https?:|\/|data:image\/)/i.test(a.trim()) ||
|
|
923
|
+
const a = s.getAttribute("src");
|
|
924
|
+
a && (/^(https?:|\/|data:image\/)/i.test(a.trim()) || s.removeAttribute("src"));
|
|
925
925
|
}
|
|
926
926
|
}
|
|
927
927
|
};
|
|
928
928
|
return i(t.content), t.innerHTML;
|
|
929
|
-
},
|
|
930
|
-
(
|
|
931
|
-
),
|
|
929
|
+
}, Ms = (e) => e === "x" ? P.X : P.Y, Hs = (e, t, i) => e.filter(
|
|
930
|
+
(s) => Ms(s.orientation) === i && t in s.positions
|
|
931
|
+
), Ds = (e, t) => {
|
|
932
932
|
const i = document.createElement("button");
|
|
933
933
|
return i.id = e, i.className = "cloudimage-360-hotspot", i.dataset.hotspotId = e, i.setAttribute("type", "button"), i.setAttribute("aria-label", t || `Hotspot ${e}`), i.setAttribute("aria-haspopup", "true"), i.setAttribute("aria-expanded", "false"), i;
|
|
934
|
-
},
|
|
934
|
+
}, Zs = (e) => {
|
|
935
935
|
const t = Object.entries(e).sort(([n], [l]) => Number(n) - Number(l));
|
|
936
|
-
let i = null,
|
|
937
|
-
const
|
|
936
|
+
let i = null, s = null;
|
|
937
|
+
const o = {};
|
|
938
938
|
for (const [n, l] of t)
|
|
939
939
|
if (!l)
|
|
940
|
-
|
|
940
|
+
o[n] = { x: i, y: s };
|
|
941
941
|
else {
|
|
942
942
|
const { x: r, y: a } = l;
|
|
943
|
-
r != null && (i = r), a != null && (
|
|
943
|
+
r != null && (i = r), a != null && (s = a), o[n] = {
|
|
944
944
|
x: r || i,
|
|
945
|
-
y: a ||
|
|
945
|
+
y: a || s
|
|
946
946
|
};
|
|
947
947
|
}
|
|
948
|
-
return
|
|
949
|
-
},
|
|
948
|
+
return o;
|
|
949
|
+
}, Bs = (e) => [
|
|
950
950
|
{
|
|
951
951
|
name: "offset",
|
|
952
952
|
options: {
|
|
@@ -959,28 +959,28 @@ const Po = /* @__PURE__ */ new Set([
|
|
|
959
959
|
boundary: e
|
|
960
960
|
}
|
|
961
961
|
}
|
|
962
|
-
],
|
|
962
|
+
], Ws = (e, t) => {
|
|
963
963
|
const i = document.createElement("div");
|
|
964
|
-
return i.className = "cloudimage-360-popper", i.id = `cloudimage-360-popper-${t}`, i.dataset.popperId = t, i.setAttribute("role", "tooltip"), i.setAttribute("aria-hidden", "false"), typeof e == "string" && /<\/?[a-z][\s\S]*>/i.test(e) ? i.innerHTML =
|
|
965
|
-
},
|
|
964
|
+
return i.className = "cloudimage-360-popper", i.id = `cloudimage-360-popper-${t}`, i.dataset.popperId = t, i.setAttribute("role", "tooltip"), i.setAttribute("aria-hidden", "false"), typeof e == "string" && /<\/?[a-z][\s\S]*>/i.test(e) ? i.innerHTML = Rs(e) : i.textContent = e, document.body.appendChild(i), i;
|
|
965
|
+
}, Fs = (e) => {
|
|
966
966
|
const t = [...e];
|
|
967
|
-
return t.forEach((i,
|
|
968
|
-
const
|
|
969
|
-
t[
|
|
967
|
+
return t.forEach((i, s) => {
|
|
968
|
+
const o = { ...Zs(i.positions) };
|
|
969
|
+
t[s].initialPositions = o, t[s].positions = o;
|
|
970
970
|
}), t;
|
|
971
|
-
},
|
|
971
|
+
}, Ns = ({
|
|
972
972
|
newWidth: e,
|
|
973
973
|
newHeight: t,
|
|
974
974
|
initialContainerSize: i,
|
|
975
|
-
imageAspectRatio:
|
|
976
|
-
hotspotsConfig:
|
|
975
|
+
imageAspectRatio: s,
|
|
976
|
+
hotspotsConfig: o
|
|
977
977
|
}) => {
|
|
978
978
|
const [n, l] = i;
|
|
979
979
|
let r = e, a = t, c = 0, h = 0;
|
|
980
980
|
const p = e / t;
|
|
981
|
-
|
|
981
|
+
s > p ? (a = e / s, h = (t - a) / 2) : (r = t * s, c = (e - r) / 2);
|
|
982
982
|
const u = r / n, I = a / l;
|
|
983
|
-
return
|
|
983
|
+
return o.map((g) => {
|
|
984
984
|
const v = {};
|
|
985
985
|
return Object.entries(g.initialPositions).forEach(([m, b]) => {
|
|
986
986
|
v[m] = {
|
|
@@ -990,11 +990,11 @@ const Po = /* @__PURE__ */ new Set([
|
|
|
990
990
|
}), { ...g, positions: v };
|
|
991
991
|
});
|
|
992
992
|
};
|
|
993
|
-
var H = "top", F = "bottom", N = "right", D = "left", ee = "auto", Tt = [H, F, N, D], ut = "start", Lt = "end",
|
|
993
|
+
var H = "top", F = "bottom", N = "right", D = "left", ee = "auto", Tt = [H, F, N, D], ut = "start", Lt = "end", Vs = "clippingParents", Ne = "viewport", Ot = "popper", js = "reference", ke = /* @__PURE__ */ Tt.reduce(function(e, t) {
|
|
994
994
|
return e.concat([t + "-" + ut, t + "-" + Lt]);
|
|
995
995
|
}, []), Ve = /* @__PURE__ */ [].concat(Tt, [ee]).reduce(function(e, t) {
|
|
996
996
|
return e.concat([t, t + "-" + ut, t + "-" + Lt]);
|
|
997
|
-
}, []),
|
|
997
|
+
}, []), $s = "beforeRead", zs = "read", Gs = "afterRead", Us = "beforeMain", Ks = "main", _s = "afterMain", Js = "beforeWrite", qs = "write", Qs = "afterWrite", to = [$s, zs, Gs, Us, Ks, _s, Js, qs, Qs];
|
|
998
998
|
function $(e) {
|
|
999
999
|
return e ? (e.nodeName || "").toLowerCase() : null;
|
|
1000
1000
|
}
|
|
@@ -1021,17 +1021,17 @@ function ie(e) {
|
|
|
1021
1021
|
var t = B(e).ShadowRoot;
|
|
1022
1022
|
return e instanceof t || e instanceof ShadowRoot;
|
|
1023
1023
|
}
|
|
1024
|
-
function
|
|
1024
|
+
function eo(e) {
|
|
1025
1025
|
var t = e.state;
|
|
1026
1026
|
Object.keys(t.elements).forEach(function(i) {
|
|
1027
|
-
var
|
|
1028
|
-
!W(n) || !$(n) || (Object.assign(n.style,
|
|
1029
|
-
var r =
|
|
1027
|
+
var s = t.styles[i] || {}, o = t.attributes[i] || {}, n = t.elements[i];
|
|
1028
|
+
!W(n) || !$(n) || (Object.assign(n.style, s), Object.keys(o).forEach(function(l) {
|
|
1029
|
+
var r = o[l];
|
|
1030
1030
|
r === !1 ? n.removeAttribute(l) : n.setAttribute(l, r === !0 ? "" : r);
|
|
1031
1031
|
}));
|
|
1032
1032
|
});
|
|
1033
1033
|
}
|
|
1034
|
-
function
|
|
1034
|
+
function io(e) {
|
|
1035
1035
|
var t = e.state, i = {
|
|
1036
1036
|
popper: {
|
|
1037
1037
|
position: t.options.strategy,
|
|
@@ -1045,28 +1045,28 @@ function os(e) {
|
|
|
1045
1045
|
reference: {}
|
|
1046
1046
|
};
|
|
1047
1047
|
return Object.assign(t.elements.popper.style, i.popper), t.styles = i, t.elements.arrow && Object.assign(t.elements.arrow.style, i.arrow), function() {
|
|
1048
|
-
Object.keys(t.elements).forEach(function(
|
|
1049
|
-
var
|
|
1048
|
+
Object.keys(t.elements).forEach(function(s) {
|
|
1049
|
+
var o = t.elements[s], n = t.attributes[s] || {}, l = Object.keys(t.styles.hasOwnProperty(s) ? t.styles[s] : i[s]), r = l.reduce(function(a, c) {
|
|
1050
1050
|
return a[c] = "", a;
|
|
1051
1051
|
}, {});
|
|
1052
|
-
!W(
|
|
1053
|
-
|
|
1052
|
+
!W(o) || !$(o) || (Object.assign(o.style, r), Object.keys(n).forEach(function(a) {
|
|
1053
|
+
o.removeAttribute(a);
|
|
1054
1054
|
}));
|
|
1055
1055
|
});
|
|
1056
1056
|
};
|
|
1057
1057
|
}
|
|
1058
|
-
const
|
|
1058
|
+
const so = {
|
|
1059
1059
|
name: "applyStyles",
|
|
1060
1060
|
enabled: !0,
|
|
1061
1061
|
phase: "write",
|
|
1062
|
-
fn:
|
|
1063
|
-
effect:
|
|
1062
|
+
fn: eo,
|
|
1063
|
+
effect: io,
|
|
1064
1064
|
requires: ["computeStyles"]
|
|
1065
1065
|
};
|
|
1066
1066
|
function j(e) {
|
|
1067
1067
|
return e.split("-")[0];
|
|
1068
1068
|
}
|
|
1069
|
-
var
|
|
1069
|
+
var ot = Math.max, Wt = Math.min, pt = Math.round;
|
|
1070
1070
|
function Qt() {
|
|
1071
1071
|
var e = navigator.userAgentData;
|
|
1072
1072
|
return e != null && e.brands && Array.isArray(e.brands) ? e.brands.map(function(t) {
|
|
@@ -1078,9 +1078,9 @@ function je() {
|
|
|
1078
1078
|
}
|
|
1079
1079
|
function ft(e, t, i) {
|
|
1080
1080
|
t === void 0 && (t = !1), i === void 0 && (i = !1);
|
|
1081
|
-
var
|
|
1082
|
-
t && W(e) && (
|
|
1083
|
-
var l = nt(e) ? B(e) : window, r = l.visualViewport, a = !je() && i, c = (
|
|
1081
|
+
var s = e.getBoundingClientRect(), o = 1, n = 1;
|
|
1082
|
+
t && W(e) && (o = e.offsetWidth > 0 && pt(s.width) / e.offsetWidth || 1, n = e.offsetHeight > 0 && pt(s.height) / e.offsetHeight || 1);
|
|
1083
|
+
var l = nt(e) ? B(e) : window, r = l.visualViewport, a = !je() && i, c = (s.left + (a && r ? r.offsetLeft : 0)) / o, h = (s.top + (a && r ? r.offsetTop : 0)) / n, p = s.width / o, f = s.height / n;
|
|
1084
1084
|
return {
|
|
1085
1085
|
width: p,
|
|
1086
1086
|
height: f,
|
|
@@ -1092,13 +1092,13 @@ function ft(e, t, i) {
|
|
|
1092
1092
|
y: h
|
|
1093
1093
|
};
|
|
1094
1094
|
}
|
|
1095
|
-
function
|
|
1096
|
-
var t = ft(e), i = e.offsetWidth,
|
|
1097
|
-
return Math.abs(t.width - i) <= 1 && (i = t.width), Math.abs(t.height -
|
|
1095
|
+
function se(e) {
|
|
1096
|
+
var t = ft(e), i = e.offsetWidth, s = e.offsetHeight;
|
|
1097
|
+
return Math.abs(t.width - i) <= 1 && (i = t.width), Math.abs(t.height - s) <= 1 && (s = t.height), {
|
|
1098
1098
|
x: e.offsetLeft,
|
|
1099
1099
|
y: e.offsetTop,
|
|
1100
1100
|
width: i,
|
|
1101
|
-
height:
|
|
1101
|
+
height: s
|
|
1102
1102
|
};
|
|
1103
1103
|
}
|
|
1104
1104
|
function $e(e, t) {
|
|
@@ -1106,19 +1106,19 @@ function $e(e, t) {
|
|
|
1106
1106
|
if (e.contains(t))
|
|
1107
1107
|
return !0;
|
|
1108
1108
|
if (i && ie(i)) {
|
|
1109
|
-
var
|
|
1109
|
+
var s = t;
|
|
1110
1110
|
do {
|
|
1111
|
-
if (
|
|
1111
|
+
if (s && e.isSameNode(s))
|
|
1112
1112
|
return !0;
|
|
1113
|
-
|
|
1114
|
-
} while (
|
|
1113
|
+
s = s.parentNode || s.host;
|
|
1114
|
+
} while (s);
|
|
1115
1115
|
}
|
|
1116
1116
|
return !1;
|
|
1117
1117
|
}
|
|
1118
1118
|
function J(e) {
|
|
1119
1119
|
return B(e).getComputedStyle(e);
|
|
1120
1120
|
}
|
|
1121
|
-
function
|
|
1121
|
+
function oo(e) {
|
|
1122
1122
|
return ["table", "td", "th"].indexOf($(e)) >= 0;
|
|
1123
1123
|
}
|
|
1124
1124
|
function Q(e) {
|
|
@@ -1143,36 +1143,36 @@ function Te(e) {
|
|
|
1143
1143
|
return !W(e) || // https://github.com/popperjs/popper-core/issues/837
|
|
1144
1144
|
J(e).position === "fixed" ? null : e.offsetParent;
|
|
1145
1145
|
}
|
|
1146
|
-
function
|
|
1146
|
+
function no(e) {
|
|
1147
1147
|
var t = /firefox/i.test(Qt()), i = /Trident/i.test(Qt());
|
|
1148
1148
|
if (i && W(e)) {
|
|
1149
|
-
var
|
|
1150
|
-
if (
|
|
1149
|
+
var s = J(e);
|
|
1150
|
+
if (s.position === "fixed")
|
|
1151
1151
|
return null;
|
|
1152
1152
|
}
|
|
1153
|
-
var
|
|
1154
|
-
for (ie(
|
|
1155
|
-
var n = J(
|
|
1153
|
+
var o = Nt(e);
|
|
1154
|
+
for (ie(o) && (o = o.host); W(o) && ["html", "body"].indexOf($(o)) < 0; ) {
|
|
1155
|
+
var n = J(o);
|
|
1156
1156
|
if (n.transform !== "none" || n.perspective !== "none" || n.contain === "paint" || ["transform", "perspective"].indexOf(n.willChange) !== -1 || t && n.willChange === "filter" || t && n.filter && n.filter !== "none")
|
|
1157
|
-
return
|
|
1158
|
-
|
|
1157
|
+
return o;
|
|
1158
|
+
o = o.parentNode;
|
|
1159
1159
|
}
|
|
1160
1160
|
return null;
|
|
1161
1161
|
}
|
|
1162
1162
|
function Yt(e) {
|
|
1163
|
-
for (var t = B(e), i = Te(e); i &&
|
|
1163
|
+
for (var t = B(e), i = Te(e); i && oo(i) && J(i).position === "static"; )
|
|
1164
1164
|
i = Te(i);
|
|
1165
|
-
return i && ($(i) === "html" || $(i) === "body" && J(i).position === "static") ? t : i ||
|
|
1165
|
+
return i && ($(i) === "html" || $(i) === "body" && J(i).position === "static") ? t : i || no(e) || t;
|
|
1166
1166
|
}
|
|
1167
|
-
function
|
|
1167
|
+
function oe(e) {
|
|
1168
1168
|
return ["top", "bottom"].indexOf(e) >= 0 ? "x" : "y";
|
|
1169
1169
|
}
|
|
1170
1170
|
function St(e, t, i) {
|
|
1171
|
-
return
|
|
1171
|
+
return ot(e, Wt(t, i));
|
|
1172
1172
|
}
|
|
1173
|
-
function
|
|
1174
|
-
var
|
|
1175
|
-
return
|
|
1173
|
+
function ro(e, t, i) {
|
|
1174
|
+
var s = St(e, t, i);
|
|
1175
|
+
return s > i ? i : s;
|
|
1176
1176
|
}
|
|
1177
1177
|
function ze() {
|
|
1178
1178
|
return {
|
|
@@ -1186,53 +1186,53 @@ function Ge(e) {
|
|
|
1186
1186
|
return Object.assign({}, ze(), e);
|
|
1187
1187
|
}
|
|
1188
1188
|
function Ue(e, t) {
|
|
1189
|
-
return t.reduce(function(i,
|
|
1190
|
-
return i[
|
|
1189
|
+
return t.reduce(function(i, s) {
|
|
1190
|
+
return i[s] = e, i;
|
|
1191
1191
|
}, {});
|
|
1192
1192
|
}
|
|
1193
|
-
var
|
|
1193
|
+
var ao = function(t, i) {
|
|
1194
1194
|
return t = typeof t == "function" ? t(Object.assign({}, i.rects, {
|
|
1195
1195
|
placement: i.placement
|
|
1196
1196
|
})) : t, Ge(typeof t != "number" ? t : Ue(t, Tt));
|
|
1197
1197
|
};
|
|
1198
|
-
function
|
|
1199
|
-
var t, i = e.state,
|
|
1198
|
+
function lo(e) {
|
|
1199
|
+
var t, i = e.state, s = e.name, o = e.options, n = i.elements.arrow, l = i.modifiersData.popperOffsets, r = j(i.placement), a = oe(r), c = [D, N].indexOf(r) >= 0, h = c ? "height" : "width";
|
|
1200
1200
|
if (!(!n || !l)) {
|
|
1201
|
-
var p =
|
|
1202
|
-
i.modifiersData[
|
|
1201
|
+
var p = ao(o.padding, i), f = se(n), u = a === "y" ? H : D, I = a === "y" ? F : N, g = i.rects.reference[h] + i.rects.reference[a] - l[a] - i.rects.popper[h], v = l[a] - i.rects.reference[a], m = Yt(n), b = m ? a === "y" ? m.clientHeight || 0 : m.clientWidth || 0 : 0, x = g / 2 - v / 2, w = p[u], C = b - f[h] - p[I], y = b / 2 - f[h] / 2 + x, O = St(w, y, C), S = a;
|
|
1202
|
+
i.modifiersData[s] = (t = {}, t[S] = O, t.centerOffset = O - y, t);
|
|
1203
1203
|
}
|
|
1204
1204
|
}
|
|
1205
|
-
function
|
|
1206
|
-
var t = e.state, i = e.options,
|
|
1207
|
-
|
|
1205
|
+
function co(e) {
|
|
1206
|
+
var t = e.state, i = e.options, s = i.element, o = s === void 0 ? "[data-popper-arrow]" : s;
|
|
1207
|
+
o != null && (typeof o == "string" && (o = t.elements.popper.querySelector(o), !o) || $e(t.elements.popper, o) && (t.elements.arrow = o));
|
|
1208
1208
|
}
|
|
1209
|
-
const
|
|
1209
|
+
const ho = {
|
|
1210
1210
|
name: "arrow",
|
|
1211
1211
|
enabled: !0,
|
|
1212
1212
|
phase: "main",
|
|
1213
|
-
fn:
|
|
1214
|
-
effect:
|
|
1213
|
+
fn: lo,
|
|
1214
|
+
effect: co,
|
|
1215
1215
|
requires: ["popperOffsets"],
|
|
1216
1216
|
requiresIfExists: ["preventOverflow"]
|
|
1217
1217
|
};
|
|
1218
1218
|
function mt(e) {
|
|
1219
1219
|
return e.split("-")[1];
|
|
1220
1220
|
}
|
|
1221
|
-
var
|
|
1221
|
+
var uo = {
|
|
1222
1222
|
top: "auto",
|
|
1223
1223
|
right: "auto",
|
|
1224
1224
|
bottom: "auto",
|
|
1225
1225
|
left: "auto"
|
|
1226
1226
|
};
|
|
1227
|
-
function
|
|
1228
|
-
var i = e.x,
|
|
1227
|
+
function po(e, t) {
|
|
1228
|
+
var i = e.x, s = e.y, o = t.devicePixelRatio || 1;
|
|
1229
1229
|
return {
|
|
1230
|
-
x: pt(i *
|
|
1231
|
-
y: pt(
|
|
1230
|
+
x: pt(i * o) / o || 0,
|
|
1231
|
+
y: pt(s * o) / o || 0
|
|
1232
1232
|
};
|
|
1233
1233
|
}
|
|
1234
1234
|
function Ye(e) {
|
|
1235
|
-
var t, i = e.popper,
|
|
1235
|
+
var t, i = e.popper, s = e.popperRect, o = e.placement, n = e.variation, l = e.offsets, r = e.position, a = e.gpuAcceleration, c = e.adaptive, h = e.roundOffsets, p = e.isFixed, f = l.x, u = f === void 0 ? 0 : f, I = l.y, g = I === void 0 ? 0 : I, v = typeof h == "function" ? h({
|
|
1236
1236
|
x: u,
|
|
1237
1237
|
y: g
|
|
1238
1238
|
}) : {
|
|
@@ -1243,26 +1243,26 @@ function Ye(e) {
|
|
|
1243
1243
|
var m = l.hasOwnProperty("x"), b = l.hasOwnProperty("y"), x = D, w = H, C = window;
|
|
1244
1244
|
if (c) {
|
|
1245
1245
|
var y = Yt(i), O = "clientHeight", S = "clientWidth";
|
|
1246
|
-
if (y === B(i) && (y = Q(i), J(y).position !== "static" && r === "absolute" && (O = "scrollHeight", S = "scrollWidth")), y = y,
|
|
1246
|
+
if (y === B(i) && (y = Q(i), J(y).position !== "static" && r === "absolute" && (O = "scrollHeight", S = "scrollWidth")), y = y, o === H || (o === D || o === N) && n === Lt) {
|
|
1247
1247
|
w = F;
|
|
1248
1248
|
var E = p && y === C && C.visualViewport ? C.visualViewport.height : (
|
|
1249
1249
|
// $FlowFixMe[prop-missing]
|
|
1250
1250
|
y[O]
|
|
1251
1251
|
);
|
|
1252
|
-
g -= E -
|
|
1252
|
+
g -= E - s.height, g *= a ? 1 : -1;
|
|
1253
1253
|
}
|
|
1254
|
-
if (
|
|
1254
|
+
if (o === D || (o === H || o === F) && n === Lt) {
|
|
1255
1255
|
x = N;
|
|
1256
1256
|
var A = p && y === C && C.visualViewport ? C.visualViewport.width : (
|
|
1257
1257
|
// $FlowFixMe[prop-missing]
|
|
1258
1258
|
y[S]
|
|
1259
1259
|
);
|
|
1260
|
-
u -= A -
|
|
1260
|
+
u -= A - s.width, u *= a ? 1 : -1;
|
|
1261
1261
|
}
|
|
1262
1262
|
}
|
|
1263
1263
|
var k = Object.assign({
|
|
1264
1264
|
position: r
|
|
1265
|
-
}, c &&
|
|
1265
|
+
}, c && uo), R = h === !0 ? po({
|
|
1266
1266
|
x: u,
|
|
1267
1267
|
y: g
|
|
1268
1268
|
}, B(i)) : {
|
|
@@ -1275,13 +1275,13 @@ function Ye(e) {
|
|
|
1275
1275
|
}
|
|
1276
1276
|
return Object.assign({}, k, (t = {}, t[w] = b ? g + "px" : "", t[x] = m ? u + "px" : "", t.transform = "", t));
|
|
1277
1277
|
}
|
|
1278
|
-
function
|
|
1279
|
-
var t = e.state, i = e.options,
|
|
1278
|
+
function fo(e) {
|
|
1279
|
+
var t = e.state, i = e.options, s = i.gpuAcceleration, o = s === void 0 ? !0 : s, n = i.adaptive, l = n === void 0 ? !0 : n, r = i.roundOffsets, a = r === void 0 ? !0 : r, c = {
|
|
1280
1280
|
placement: j(t.placement),
|
|
1281
1281
|
variation: mt(t.placement),
|
|
1282
1282
|
popper: t.elements.popper,
|
|
1283
1283
|
popperRect: t.rects.popper,
|
|
1284
|
-
gpuAcceleration:
|
|
1284
|
+
gpuAcceleration: o,
|
|
1285
1285
|
isFixed: t.options.strategy === "fixed"
|
|
1286
1286
|
};
|
|
1287
1287
|
t.modifiersData.popperOffsets != null && (t.styles.popper = Object.assign({}, t.styles.popper, Ye(Object.assign({}, c, {
|
|
@@ -1298,18 +1298,18 @@ function fs(e) {
|
|
|
1298
1298
|
"data-popper-placement": t.placement
|
|
1299
1299
|
});
|
|
1300
1300
|
}
|
|
1301
|
-
const
|
|
1301
|
+
const mo = {
|
|
1302
1302
|
name: "computeStyles",
|
|
1303
1303
|
enabled: !0,
|
|
1304
1304
|
phase: "beforeWrite",
|
|
1305
|
-
fn:
|
|
1305
|
+
fn: fo,
|
|
1306
1306
|
data: {}
|
|
1307
1307
|
};
|
|
1308
1308
|
var Dt = {
|
|
1309
1309
|
passive: !0
|
|
1310
1310
|
};
|
|
1311
|
-
function
|
|
1312
|
-
var t = e.state, i = e.instance,
|
|
1311
|
+
function vo(e) {
|
|
1312
|
+
var t = e.state, i = e.instance, s = e.options, o = s.scroll, n = o === void 0 ? !0 : o, l = s.resize, r = l === void 0 ? !0 : l, a = B(t.elements.popper), c = [].concat(t.scrollParents.reference, t.scrollParents.popper);
|
|
1313
1313
|
return n && c.forEach(function(h) {
|
|
1314
1314
|
h.addEventListener("scroll", i.update, Dt);
|
|
1315
1315
|
}), r && a.addEventListener("resize", i.update, Dt), function() {
|
|
@@ -1318,16 +1318,16 @@ function vs(e) {
|
|
|
1318
1318
|
}), r && a.removeEventListener("resize", i.update, Dt);
|
|
1319
1319
|
};
|
|
1320
1320
|
}
|
|
1321
|
-
const
|
|
1321
|
+
const go = {
|
|
1322
1322
|
name: "eventListeners",
|
|
1323
1323
|
enabled: !0,
|
|
1324
1324
|
phase: "write",
|
|
1325
1325
|
fn: function() {
|
|
1326
1326
|
},
|
|
1327
|
-
effect:
|
|
1327
|
+
effect: vo,
|
|
1328
1328
|
data: {}
|
|
1329
1329
|
};
|
|
1330
|
-
var
|
|
1330
|
+
var yo = {
|
|
1331
1331
|
left: "right",
|
|
1332
1332
|
right: "left",
|
|
1333
1333
|
bottom: "top",
|
|
@@ -1335,34 +1335,34 @@ var ys = {
|
|
|
1335
1335
|
};
|
|
1336
1336
|
function Zt(e) {
|
|
1337
1337
|
return e.replace(/left|right|bottom|top/g, function(t) {
|
|
1338
|
-
return
|
|
1338
|
+
return yo[t];
|
|
1339
1339
|
});
|
|
1340
1340
|
}
|
|
1341
|
-
var
|
|
1341
|
+
var bo = {
|
|
1342
1342
|
start: "end",
|
|
1343
1343
|
end: "start"
|
|
1344
1344
|
};
|
|
1345
1345
|
function Xe(e) {
|
|
1346
1346
|
return e.replace(/start|end/g, function(t) {
|
|
1347
|
-
return
|
|
1347
|
+
return bo[t];
|
|
1348
1348
|
});
|
|
1349
1349
|
}
|
|
1350
1350
|
function ne(e) {
|
|
1351
|
-
var t = B(e), i = t.pageXOffset,
|
|
1351
|
+
var t = B(e), i = t.pageXOffset, s = t.pageYOffset;
|
|
1352
1352
|
return {
|
|
1353
1353
|
scrollLeft: i,
|
|
1354
|
-
scrollTop:
|
|
1354
|
+
scrollTop: s
|
|
1355
1355
|
};
|
|
1356
1356
|
}
|
|
1357
1357
|
function re(e) {
|
|
1358
1358
|
return ft(Q(e)).left + ne(e).scrollLeft;
|
|
1359
1359
|
}
|
|
1360
|
-
function
|
|
1361
|
-
var i = B(e),
|
|
1362
|
-
if (
|
|
1363
|
-
n =
|
|
1360
|
+
function wo(e, t) {
|
|
1361
|
+
var i = B(e), s = Q(e), o = i.visualViewport, n = s.clientWidth, l = s.clientHeight, r = 0, a = 0;
|
|
1362
|
+
if (o) {
|
|
1363
|
+
n = o.width, l = o.height;
|
|
1364
1364
|
var c = je();
|
|
1365
|
-
(c || !c && t === "fixed") && (r =
|
|
1365
|
+
(c || !c && t === "fixed") && (r = o.offsetLeft, a = o.offsetTop);
|
|
1366
1366
|
}
|
|
1367
1367
|
return {
|
|
1368
1368
|
width: n,
|
|
@@ -1371,9 +1371,9 @@ function ws(e, t) {
|
|
|
1371
1371
|
y: a
|
|
1372
1372
|
};
|
|
1373
1373
|
}
|
|
1374
|
-
function
|
|
1375
|
-
var t, i = Q(e),
|
|
1376
|
-
return J(
|
|
1374
|
+
function Io(e) {
|
|
1375
|
+
var t, i = Q(e), s = ne(e), o = (t = e.ownerDocument) == null ? void 0 : t.body, n = ot(i.scrollWidth, i.clientWidth, o ? o.scrollWidth : 0, o ? o.clientWidth : 0), l = ot(i.scrollHeight, i.clientHeight, o ? o.scrollHeight : 0, o ? o.clientHeight : 0), r = -s.scrollLeft + re(e), a = -s.scrollTop;
|
|
1376
|
+
return J(o || i).direction === "rtl" && (r += ot(i.clientWidth, o ? o.clientWidth : 0) - n), {
|
|
1377
1377
|
width: n,
|
|
1378
1378
|
height: l,
|
|
1379
1379
|
x: r,
|
|
@@ -1381,8 +1381,8 @@ function Is(e) {
|
|
|
1381
1381
|
};
|
|
1382
1382
|
}
|
|
1383
1383
|
function ae(e) {
|
|
1384
|
-
var t = J(e), i = t.overflow,
|
|
1385
|
-
return /auto|scroll|overlay|hidden/.test(i +
|
|
1384
|
+
var t = J(e), i = t.overflow, s = t.overflowX, o = t.overflowY;
|
|
1385
|
+
return /auto|scroll|overlay|hidden/.test(i + o + s);
|
|
1386
1386
|
}
|
|
1387
1387
|
function Ke(e) {
|
|
1388
1388
|
return ["html", "body", "#document"].indexOf($(e)) >= 0 ? e.ownerDocument.body : W(e) && ae(e) ? e : Ke(Nt(e));
|
|
@@ -1390,8 +1390,8 @@ function Ke(e) {
|
|
|
1390
1390
|
function At(e, t) {
|
|
1391
1391
|
var i;
|
|
1392
1392
|
t === void 0 && (t = []);
|
|
1393
|
-
var
|
|
1394
|
-
return
|
|
1393
|
+
var s = Ke(e), o = s === ((i = e.ownerDocument) == null ? void 0 : i.body), n = B(s), l = o ? [n].concat(n.visualViewport || [], ae(s) ? s : []) : s, r = t.concat(l);
|
|
1394
|
+
return o ? r : (
|
|
1395
1395
|
// $FlowFixMe[incompatible-call]: isBody tells us target will be an HTMLElement here
|
|
1396
1396
|
r.concat(At(Nt(l)))
|
|
1397
1397
|
);
|
|
@@ -1404,29 +1404,29 @@ function te(e) {
|
|
|
1404
1404
|
bottom: e.y + e.height
|
|
1405
1405
|
});
|
|
1406
1406
|
}
|
|
1407
|
-
function
|
|
1407
|
+
function xo(e, t) {
|
|
1408
1408
|
var i = ft(e, !1, t === "fixed");
|
|
1409
1409
|
return i.top = i.top + e.clientTop, i.left = i.left + e.clientLeft, i.bottom = i.top + e.clientHeight, i.right = i.left + e.clientWidth, i.width = e.clientWidth, i.height = e.clientHeight, i.x = i.left, i.y = i.top, i;
|
|
1410
1410
|
}
|
|
1411
1411
|
function Pe(e, t, i) {
|
|
1412
|
-
return t === Ne ? te(
|
|
1412
|
+
return t === Ne ? te(wo(e, i)) : nt(t) ? xo(t, i) : te(Io(Q(e)));
|
|
1413
1413
|
}
|
|
1414
|
-
function
|
|
1415
|
-
var t = At(Nt(e)), i = ["absolute", "fixed"].indexOf(J(e).position) >= 0,
|
|
1416
|
-
return nt(
|
|
1417
|
-
return nt(
|
|
1414
|
+
function Co(e) {
|
|
1415
|
+
var t = At(Nt(e)), i = ["absolute", "fixed"].indexOf(J(e).position) >= 0, s = i && W(e) ? Yt(e) : e;
|
|
1416
|
+
return nt(s) ? t.filter(function(o) {
|
|
1417
|
+
return nt(o) && $e(o, s) && $(o) !== "body";
|
|
1418
1418
|
}) : [];
|
|
1419
1419
|
}
|
|
1420
|
-
function
|
|
1421
|
-
var
|
|
1422
|
-
var h = Pe(e, c,
|
|
1423
|
-
return a.top =
|
|
1424
|
-
}, Pe(e, l,
|
|
1420
|
+
function Oo(e, t, i, s) {
|
|
1421
|
+
var o = t === "clippingParents" ? Co(e) : [].concat(t), n = [].concat(o, [i]), l = n[0], r = n.reduce(function(a, c) {
|
|
1422
|
+
var h = Pe(e, c, s);
|
|
1423
|
+
return a.top = ot(h.top, a.top), a.right = Wt(h.right, a.right), a.bottom = Wt(h.bottom, a.bottom), a.left = ot(h.left, a.left), a;
|
|
1424
|
+
}, Pe(e, l, s));
|
|
1425
1425
|
return r.width = r.right - r.left, r.height = r.bottom - r.top, r.x = r.left, r.y = r.top, r;
|
|
1426
1426
|
}
|
|
1427
1427
|
function _e(e) {
|
|
1428
|
-
var t = e.reference, i = e.element,
|
|
1429
|
-
switch (
|
|
1428
|
+
var t = e.reference, i = e.element, s = e.placement, o = s ? j(s) : null, n = s ? mt(s) : null, l = t.x + t.width / 2 - i.width / 2, r = t.y + t.height / 2 - i.height / 2, a;
|
|
1429
|
+
switch (o) {
|
|
1430
1430
|
case H:
|
|
1431
1431
|
a = {
|
|
1432
1432
|
x: l,
|
|
@@ -1457,7 +1457,7 @@ function _e(e) {
|
|
|
1457
1457
|
y: t.y
|
|
1458
1458
|
};
|
|
1459
1459
|
}
|
|
1460
|
-
var c =
|
|
1460
|
+
var c = o ? oe(o) : null;
|
|
1461
1461
|
if (c != null) {
|
|
1462
1462
|
var h = c === "y" ? "height" : "width";
|
|
1463
1463
|
switch (n) {
|
|
@@ -1473,10 +1473,10 @@ function _e(e) {
|
|
|
1473
1473
|
}
|
|
1474
1474
|
function kt(e, t) {
|
|
1475
1475
|
t === void 0 && (t = {});
|
|
1476
|
-
var i = t,
|
|
1476
|
+
var i = t, s = i.placement, o = s === void 0 ? e.placement : s, n = i.strategy, l = n === void 0 ? e.strategy : n, r = i.boundary, a = r === void 0 ? Vs : r, c = i.rootBoundary, h = c === void 0 ? Ne : c, p = i.elementContext, f = p === void 0 ? Ot : p, u = i.altBoundary, I = u === void 0 ? !1 : u, g = i.padding, v = g === void 0 ? 0 : g, m = Ge(typeof v != "number" ? v : Ue(v, Tt)), b = f === Ot ? js : Ot, x = e.rects.popper, w = e.elements[I ? b : f], C = Oo(nt(w) ? w : w.contextElement || Q(e.elements.popper), a, h, l), y = ft(e.elements.reference), O = _e({
|
|
1477
1477
|
reference: y,
|
|
1478
1478
|
element: x,
|
|
1479
|
-
placement:
|
|
1479
|
+
placement: o
|
|
1480
1480
|
}), S = te(Object.assign({}, x, O)), E = f === Ot ? S : y, A = {
|
|
1481
1481
|
top: C.top - E.top + m.top,
|
|
1482
1482
|
bottom: E.bottom - C.bottom + m.bottom,
|
|
@@ -1484,7 +1484,7 @@ function kt(e, t) {
|
|
|
1484
1484
|
right: E.right - C.right + m.right
|
|
1485
1485
|
}, k = e.modifiersData.offset;
|
|
1486
1486
|
if (f === Ot && k) {
|
|
1487
|
-
var R = k[
|
|
1487
|
+
var R = k[o];
|
|
1488
1488
|
Object.keys(A).forEach(function(T) {
|
|
1489
1489
|
var z = [N, F].indexOf(T) >= 0 ? 1 : -1, G = [H, F].indexOf(T) >= 0 ? "y" : "x";
|
|
1490
1490
|
A[T] += R[G] * z;
|
|
@@ -1492,9 +1492,9 @@ function kt(e, t) {
|
|
|
1492
1492
|
}
|
|
1493
1493
|
return A;
|
|
1494
1494
|
}
|
|
1495
|
-
function
|
|
1495
|
+
function Eo(e, t) {
|
|
1496
1496
|
t === void 0 && (t = {});
|
|
1497
|
-
var i = t,
|
|
1497
|
+
var i = t, s = i.placement, o = i.boundary, n = i.rootBoundary, l = i.padding, r = i.flipVariations, a = i.allowedAutoPlacements, c = a === void 0 ? Ve : a, h = mt(s), p = h ? r ? ke : ke.filter(function(I) {
|
|
1498
1498
|
return mt(I) === h;
|
|
1499
1499
|
}) : Tt, f = p.filter(function(I) {
|
|
1500
1500
|
return c.indexOf(I) >= 0;
|
|
@@ -1503,7 +1503,7 @@ function Es(e, t) {
|
|
|
1503
1503
|
var u = f.reduce(function(I, g) {
|
|
1504
1504
|
return I[g] = kt(e, {
|
|
1505
1505
|
placement: g,
|
|
1506
|
-
boundary:
|
|
1506
|
+
boundary: o,
|
|
1507
1507
|
rootBoundary: n,
|
|
1508
1508
|
padding: l
|
|
1509
1509
|
})[j(g)], I;
|
|
@@ -1512,17 +1512,17 @@ function Es(e, t) {
|
|
|
1512
1512
|
return u[I] - u[g];
|
|
1513
1513
|
});
|
|
1514
1514
|
}
|
|
1515
|
-
function
|
|
1515
|
+
function So(e) {
|
|
1516
1516
|
if (j(e) === ee)
|
|
1517
1517
|
return [];
|
|
1518
1518
|
var t = Zt(e);
|
|
1519
1519
|
return [Xe(e), t, Xe(t)];
|
|
1520
1520
|
}
|
|
1521
|
-
function
|
|
1522
|
-
var t = e.state, i = e.options,
|
|
1523
|
-
if (!t.modifiersData[
|
|
1524
|
-
for (var
|
|
1525
|
-
return q.concat(j(V) === ee ?
|
|
1521
|
+
function Ao(e) {
|
|
1522
|
+
var t = e.state, i = e.options, s = e.name;
|
|
1523
|
+
if (!t.modifiersData[s]._skip) {
|
|
1524
|
+
for (var o = i.mainAxis, n = o === void 0 ? !0 : o, l = i.altAxis, r = l === void 0 ? !0 : l, a = i.fallbackPlacements, c = i.padding, h = i.boundary, p = i.rootBoundary, f = i.altBoundary, u = i.flipVariations, I = u === void 0 ? !0 : u, g = i.allowedAutoPlacements, v = t.options.placement, m = j(v), b = m === v, x = a || (b || !I ? [Zt(v)] : So(v)), w = [v].concat(x).reduce(function(q, V) {
|
|
1525
|
+
return q.concat(j(V) === ee ? Eo(t, {
|
|
1526
1526
|
placement: V,
|
|
1527
1527
|
boundary: h,
|
|
1528
1528
|
rootBoundary: p,
|
|
@@ -1563,14 +1563,14 @@ function As(e) {
|
|
|
1563
1563
|
var lt = vt(tt);
|
|
1564
1564
|
if (lt === "break") break;
|
|
1565
1565
|
}
|
|
1566
|
-
t.placement !== E && (t.modifiersData[
|
|
1566
|
+
t.placement !== E && (t.modifiersData[s]._skip = !0, t.placement = E, t.reset = !0);
|
|
1567
1567
|
}
|
|
1568
1568
|
}
|
|
1569
|
-
const
|
|
1569
|
+
const Lo = {
|
|
1570
1570
|
name: "flip",
|
|
1571
1571
|
enabled: !0,
|
|
1572
1572
|
phase: "main",
|
|
1573
|
-
fn:
|
|
1573
|
+
fn: Ao,
|
|
1574
1574
|
requiresIfExists: ["offset"],
|
|
1575
1575
|
data: {
|
|
1576
1576
|
_skip: !1
|
|
@@ -1592,12 +1592,12 @@ function Me(e) {
|
|
|
1592
1592
|
return e[t] >= 0;
|
|
1593
1593
|
});
|
|
1594
1594
|
}
|
|
1595
|
-
function
|
|
1596
|
-
var t = e.state, i = e.name,
|
|
1595
|
+
function ko(e) {
|
|
1596
|
+
var t = e.state, i = e.name, s = t.rects.reference, o = t.rects.popper, n = t.modifiersData.preventOverflow, l = kt(t, {
|
|
1597
1597
|
elementContext: "reference"
|
|
1598
1598
|
}), r = kt(t, {
|
|
1599
1599
|
altBoundary: !0
|
|
1600
|
-
}), a = Re(l,
|
|
1600
|
+
}), a = Re(l, s), c = Re(r, o, n), h = Me(a), p = Me(c);
|
|
1601
1601
|
t.modifiersData[i] = {
|
|
1602
1602
|
referenceClippingOffsets: a,
|
|
1603
1603
|
popperEscapeOffsets: c,
|
|
@@ -1608,18 +1608,18 @@ function ks(e) {
|
|
|
1608
1608
|
"data-popper-escaped": p
|
|
1609
1609
|
});
|
|
1610
1610
|
}
|
|
1611
|
-
const
|
|
1611
|
+
const To = {
|
|
1612
1612
|
name: "hide",
|
|
1613
1613
|
enabled: !0,
|
|
1614
1614
|
phase: "main",
|
|
1615
1615
|
requiresIfExists: ["preventOverflow"],
|
|
1616
|
-
fn:
|
|
1616
|
+
fn: ko
|
|
1617
1617
|
};
|
|
1618
|
-
function
|
|
1619
|
-
var
|
|
1618
|
+
function Yo(e, t, i) {
|
|
1619
|
+
var s = j(e), o = [D, H].indexOf(s) >= 0 ? -1 : 1, n = typeof i == "function" ? i(Object.assign({}, t, {
|
|
1620
1620
|
placement: e
|
|
1621
1621
|
})) : i, l = n[0], r = n[1];
|
|
1622
|
-
return l = l || 0, r = (r || 0) *
|
|
1622
|
+
return l = l || 0, r = (r || 0) * o, [D, N].indexOf(s) >= 0 ? {
|
|
1623
1623
|
x: r,
|
|
1624
1624
|
y: l
|
|
1625
1625
|
} : {
|
|
@@ -1627,20 +1627,20 @@ function Ys(e, t, i) {
|
|
|
1627
1627
|
y: r
|
|
1628
1628
|
};
|
|
1629
1629
|
}
|
|
1630
|
-
function
|
|
1631
|
-
var t = e.state, i = e.options,
|
|
1632
|
-
return h[p] =
|
|
1630
|
+
function Xo(e) {
|
|
1631
|
+
var t = e.state, i = e.options, s = e.name, o = i.offset, n = o === void 0 ? [0, 0] : o, l = Ve.reduce(function(h, p) {
|
|
1632
|
+
return h[p] = Yo(p, t.rects, n), h;
|
|
1633
1633
|
}, {}), r = l[t.placement], a = r.x, c = r.y;
|
|
1634
|
-
t.modifiersData.popperOffsets != null && (t.modifiersData.popperOffsets.x += a, t.modifiersData.popperOffsets.y += c), t.modifiersData[
|
|
1634
|
+
t.modifiersData.popperOffsets != null && (t.modifiersData.popperOffsets.x += a, t.modifiersData.popperOffsets.y += c), t.modifiersData[s] = l;
|
|
1635
1635
|
}
|
|
1636
|
-
const
|
|
1636
|
+
const Po = {
|
|
1637
1637
|
name: "offset",
|
|
1638
1638
|
enabled: !0,
|
|
1639
1639
|
phase: "main",
|
|
1640
1640
|
requires: ["popperOffsets"],
|
|
1641
|
-
fn:
|
|
1641
|
+
fn: Xo
|
|
1642
1642
|
};
|
|
1643
|
-
function
|
|
1643
|
+
function Ro(e) {
|
|
1644
1644
|
var t = e.state, i = e.name;
|
|
1645
1645
|
t.modifiersData[i] = _e({
|
|
1646
1646
|
reference: t.rects.reference,
|
|
@@ -1648,23 +1648,23 @@ function Rs(e) {
|
|
|
1648
1648
|
placement: t.placement
|
|
1649
1649
|
});
|
|
1650
1650
|
}
|
|
1651
|
-
const
|
|
1651
|
+
const Mo = {
|
|
1652
1652
|
name: "popperOffsets",
|
|
1653
1653
|
enabled: !0,
|
|
1654
1654
|
phase: "read",
|
|
1655
|
-
fn:
|
|
1655
|
+
fn: Ro,
|
|
1656
1656
|
data: {}
|
|
1657
1657
|
};
|
|
1658
|
-
function
|
|
1658
|
+
function Ho(e) {
|
|
1659
1659
|
return e === "x" ? "y" : "x";
|
|
1660
1660
|
}
|
|
1661
|
-
function
|
|
1662
|
-
var t = e.state, i = e.options,
|
|
1661
|
+
function Do(e) {
|
|
1662
|
+
var t = e.state, i = e.options, s = e.name, o = i.mainAxis, n = o === void 0 ? !0 : o, l = i.altAxis, r = l === void 0 ? !1 : l, a = i.boundary, c = i.rootBoundary, h = i.altBoundary, p = i.padding, f = i.tether, u = f === void 0 ? !0 : f, I = i.tetherOffset, g = I === void 0 ? 0 : I, v = kt(t, {
|
|
1663
1663
|
boundary: a,
|
|
1664
1664
|
rootBoundary: c,
|
|
1665
1665
|
padding: p,
|
|
1666
1666
|
altBoundary: h
|
|
1667
|
-
}), m = j(t.placement), b = mt(t.placement), x = !b, w =
|
|
1667
|
+
}), m = j(t.placement), b = mt(t.placement), x = !b, w = oe(m), C = Ho(w), y = t.modifiersData.popperOffsets, O = t.rects.reference, S = t.rects.popper, E = typeof g == "function" ? g(Object.assign({}, t.rects, {
|
|
1668
1668
|
placement: t.placement
|
|
1669
1669
|
})) : g, A = typeof E == "number" ? {
|
|
1670
1670
|
mainAxis: E,
|
|
@@ -1678,84 +1678,84 @@ function Ds(e) {
|
|
|
1678
1678
|
};
|
|
1679
1679
|
if (y) {
|
|
1680
1680
|
if (n) {
|
|
1681
|
-
var T, z = w === "y" ? H : D, G = w === "y" ? F : N, Y = w === "y" ? "height" : "width", Z = y[w], rt = Z + v[z], U = Z - v[G], at = u ? -S[Y] / 2 : 0, vt = b === ut ? O[Y] : S[Y], tt = b === ut ? -S[Y] : -O[Y], lt = t.elements.arrow, q = u && lt ?
|
|
1681
|
+
var T, z = w === "y" ? H : D, G = w === "y" ? F : N, Y = w === "y" ? "height" : "width", Z = y[w], rt = Z + v[z], U = Z - v[G], at = u ? -S[Y] / 2 : 0, vt = b === ut ? O[Y] : S[Y], tt = b === ut ? -S[Y] : -O[Y], lt = t.elements.arrow, q = u && lt ? se(lt) : {
|
|
1682
1682
|
width: 0,
|
|
1683
1683
|
height: 0
|
|
1684
|
-
}, V = t.modifiersData["arrow#persistent"] ? t.modifiersData["arrow#persistent"].padding : ze(), et = V[z], it = V[G], K = St(0, O[Y], q[Y]), ct = x ? O[Y] / 2 - at - K - et - A.mainAxis : vt - K - et - A.mainAxis, Vt = x ? -O[Y] / 2 + at + K + it + A.mainAxis : tt + K + it + A.mainAxis, gt = t.elements.arrow && Yt(t.elements.arrow), jt = gt ? w === "y" ? gt.clientTop || 0 : gt.clientLeft || 0 : 0, Xt = (T = k == null ? void 0 : k[w]) != null ? T : 0, $t = Z + ct - Xt - jt, zt = Z + Vt - Xt, Pt = St(u ? Wt(rt, $t) : rt, Z, u ?
|
|
1684
|
+
}, V = t.modifiersData["arrow#persistent"] ? t.modifiersData["arrow#persistent"].padding : ze(), et = V[z], it = V[G], K = St(0, O[Y], q[Y]), ct = x ? O[Y] / 2 - at - K - et - A.mainAxis : vt - K - et - A.mainAxis, Vt = x ? -O[Y] / 2 + at + K + it + A.mainAxis : tt + K + it + A.mainAxis, gt = t.elements.arrow && Yt(t.elements.arrow), jt = gt ? w === "y" ? gt.clientTop || 0 : gt.clientLeft || 0 : 0, Xt = (T = k == null ? void 0 : k[w]) != null ? T : 0, $t = Z + ct - Xt - jt, zt = Z + Vt - Xt, Pt = St(u ? Wt(rt, $t) : rt, Z, u ? ot(U, zt) : U);
|
|
1685
1685
|
y[w] = Pt, R[w] = Pt - Z;
|
|
1686
1686
|
}
|
|
1687
1687
|
if (r) {
|
|
1688
|
-
var Rt, Gt = w === "x" ? H : D, Ut = w === "x" ? F : N, _ = y[C], ht = C === "y" ? "height" : "width", yt = _ + v[Gt], dt = _ - v[Ut],
|
|
1688
|
+
var Rt, Gt = w === "x" ? H : D, Ut = w === "x" ? F : N, _ = y[C], ht = C === "y" ? "height" : "width", yt = _ + v[Gt], dt = _ - v[Ut], st = [H, D].indexOf(m) !== -1, bt = (Rt = k == null ? void 0 : k[C]) != null ? Rt : 0, wt = st ? yt : _ - O[ht] - S[ht] - bt + A.altAxis, It = st ? _ + O[ht] + S[ht] - bt - A.altAxis : dt, xt = u && st ? ro(wt, _, It) : St(u ? wt : yt, _, u ? It : dt);
|
|
1689
1689
|
y[C] = xt, R[C] = xt - _;
|
|
1690
1690
|
}
|
|
1691
|
-
t.modifiersData[
|
|
1691
|
+
t.modifiersData[s] = R;
|
|
1692
1692
|
}
|
|
1693
1693
|
}
|
|
1694
|
-
const
|
|
1694
|
+
const Zo = {
|
|
1695
1695
|
name: "preventOverflow",
|
|
1696
1696
|
enabled: !0,
|
|
1697
1697
|
phase: "main",
|
|
1698
|
-
fn:
|
|
1698
|
+
fn: Do,
|
|
1699
1699
|
requiresIfExists: ["offset"]
|
|
1700
1700
|
};
|
|
1701
|
-
function
|
|
1701
|
+
function Bo(e) {
|
|
1702
1702
|
return {
|
|
1703
1703
|
scrollLeft: e.scrollLeft,
|
|
1704
1704
|
scrollTop: e.scrollTop
|
|
1705
1705
|
};
|
|
1706
1706
|
}
|
|
1707
|
-
function
|
|
1708
|
-
return e === B(e) || !W(e) ? ne(e) :
|
|
1707
|
+
function Wo(e) {
|
|
1708
|
+
return e === B(e) || !W(e) ? ne(e) : Bo(e);
|
|
1709
1709
|
}
|
|
1710
|
-
function
|
|
1711
|
-
var t = e.getBoundingClientRect(), i = pt(t.width) / e.offsetWidth || 1,
|
|
1712
|
-
return i !== 1 ||
|
|
1710
|
+
function Fo(e) {
|
|
1711
|
+
var t = e.getBoundingClientRect(), i = pt(t.width) / e.offsetWidth || 1, s = pt(t.height) / e.offsetHeight || 1;
|
|
1712
|
+
return i !== 1 || s !== 1;
|
|
1713
1713
|
}
|
|
1714
|
-
function
|
|
1714
|
+
function No(e, t, i) {
|
|
1715
1715
|
i === void 0 && (i = !1);
|
|
1716
|
-
var
|
|
1716
|
+
var s = W(t), o = W(t) && Fo(t), n = Q(t), l = ft(e, o, i), r = {
|
|
1717
1717
|
scrollLeft: 0,
|
|
1718
1718
|
scrollTop: 0
|
|
1719
1719
|
}, a = {
|
|
1720
1720
|
x: 0,
|
|
1721
1721
|
y: 0
|
|
1722
1722
|
};
|
|
1723
|
-
return (
|
|
1724
|
-
ae(n)) && (r =
|
|
1723
|
+
return (s || !s && !i) && (($(t) !== "body" || // https://github.com/popperjs/popper-core/issues/1078
|
|
1724
|
+
ae(n)) && (r = Wo(t)), W(t) ? (a = ft(t, !0), a.x += t.clientLeft, a.y += t.clientTop) : n && (a.x = re(n))), {
|
|
1725
1725
|
x: l.left + r.scrollLeft - a.x,
|
|
1726
1726
|
y: l.top + r.scrollTop - a.y,
|
|
1727
1727
|
width: l.width,
|
|
1728
1728
|
height: l.height
|
|
1729
1729
|
};
|
|
1730
1730
|
}
|
|
1731
|
-
function
|
|
1732
|
-
var t = /* @__PURE__ */ new Map(), i = /* @__PURE__ */ new Set(),
|
|
1731
|
+
function Vo(e) {
|
|
1732
|
+
var t = /* @__PURE__ */ new Map(), i = /* @__PURE__ */ new Set(), s = [];
|
|
1733
1733
|
e.forEach(function(n) {
|
|
1734
1734
|
t.set(n.name, n);
|
|
1735
1735
|
});
|
|
1736
|
-
function
|
|
1736
|
+
function o(n) {
|
|
1737
1737
|
i.add(n.name);
|
|
1738
1738
|
var l = [].concat(n.requires || [], n.requiresIfExists || []);
|
|
1739
1739
|
l.forEach(function(r) {
|
|
1740
1740
|
if (!i.has(r)) {
|
|
1741
1741
|
var a = t.get(r);
|
|
1742
|
-
a &&
|
|
1742
|
+
a && o(a);
|
|
1743
1743
|
}
|
|
1744
|
-
}),
|
|
1744
|
+
}), s.push(n);
|
|
1745
1745
|
}
|
|
1746
1746
|
return e.forEach(function(n) {
|
|
1747
|
-
i.has(n.name) ||
|
|
1748
|
-
}),
|
|
1749
|
-
}
|
|
1750
|
-
function
|
|
1751
|
-
var t =
|
|
1752
|
-
return
|
|
1753
|
-
return i.concat(t.filter(function(
|
|
1754
|
-
return
|
|
1747
|
+
i.has(n.name) || o(n);
|
|
1748
|
+
}), s;
|
|
1749
|
+
}
|
|
1750
|
+
function jo(e) {
|
|
1751
|
+
var t = Vo(e);
|
|
1752
|
+
return to.reduce(function(i, s) {
|
|
1753
|
+
return i.concat(t.filter(function(o) {
|
|
1754
|
+
return o.phase === s;
|
|
1755
1755
|
}));
|
|
1756
1756
|
}, []);
|
|
1757
1757
|
}
|
|
1758
|
-
function $
|
|
1758
|
+
function $o(e) {
|
|
1759
1759
|
var t;
|
|
1760
1760
|
return function() {
|
|
1761
1761
|
return t || (t = new Promise(function(i) {
|
|
@@ -1765,13 +1765,13 @@ function $s(e) {
|
|
|
1765
1765
|
})), t;
|
|
1766
1766
|
};
|
|
1767
1767
|
}
|
|
1768
|
-
function
|
|
1769
|
-
var t = e.reduce(function(i,
|
|
1770
|
-
var
|
|
1771
|
-
return i[
|
|
1772
|
-
options: Object.assign({},
|
|
1773
|
-
data: Object.assign({},
|
|
1774
|
-
}) :
|
|
1768
|
+
function zo(e) {
|
|
1769
|
+
var t = e.reduce(function(i, s) {
|
|
1770
|
+
var o = i[s.name];
|
|
1771
|
+
return i[s.name] = o ? Object.assign({}, o, s, {
|
|
1772
|
+
options: Object.assign({}, o.options, s.options),
|
|
1773
|
+
data: Object.assign({}, o.data, s.data)
|
|
1774
|
+
}) : s, i;
|
|
1775
1775
|
}, {});
|
|
1776
1776
|
return Object.keys(t).map(function(i) {
|
|
1777
1777
|
return t[i];
|
|
@@ -1785,13 +1785,13 @@ var He = {
|
|
|
1785
1785
|
function De() {
|
|
1786
1786
|
for (var e = arguments.length, t = new Array(e), i = 0; i < e; i++)
|
|
1787
1787
|
t[i] = arguments[i];
|
|
1788
|
-
return !t.some(function(
|
|
1789
|
-
return !(
|
|
1788
|
+
return !t.some(function(s) {
|
|
1789
|
+
return !(s && typeof s.getBoundingClientRect == "function");
|
|
1790
1790
|
});
|
|
1791
1791
|
}
|
|
1792
|
-
function
|
|
1792
|
+
function Go(e) {
|
|
1793
1793
|
e === void 0 && (e = {});
|
|
1794
|
-
var t = e, i = t.defaultModifiers,
|
|
1794
|
+
var t = e, i = t.defaultModifiers, s = i === void 0 ? [] : i, o = t.defaultOptions, n = o === void 0 ? He : o;
|
|
1795
1795
|
return function(r, a, c) {
|
|
1796
1796
|
c === void 0 && (c = n);
|
|
1797
1797
|
var h = {
|
|
@@ -1813,7 +1813,7 @@ function Gs(e) {
|
|
|
1813
1813
|
reference: nt(r) ? At(r) : r.contextElement ? At(r.contextElement) : [],
|
|
1814
1814
|
popper: At(a)
|
|
1815
1815
|
};
|
|
1816
|
-
var x =
|
|
1816
|
+
var x = jo(zo([].concat(s, h.options.modifiers)));
|
|
1817
1817
|
return h.orderedModifiers = x.filter(function(w) {
|
|
1818
1818
|
return w.enabled;
|
|
1819
1819
|
}), I(), u.update();
|
|
@@ -1828,8 +1828,8 @@ function Gs(e) {
|
|
|
1828
1828
|
var m = h.elements, b = m.reference, x = m.popper;
|
|
1829
1829
|
if (De(b, x)) {
|
|
1830
1830
|
h.rects = {
|
|
1831
|
-
reference:
|
|
1832
|
-
popper:
|
|
1831
|
+
reference: No(b, Yt(x), h.options.strategy === "fixed"),
|
|
1832
|
+
popper: se(x)
|
|
1833
1833
|
}, h.reset = !1, h.placement = h.options.placement, h.orderedModifiers.forEach(function(A) {
|
|
1834
1834
|
return h.modifiersData[A.name] = Object.assign({}, A.data);
|
|
1835
1835
|
});
|
|
@@ -1851,7 +1851,7 @@ function Gs(e) {
|
|
|
1851
1851
|
},
|
|
1852
1852
|
// Async and optimistically optimized update – it will not be executed if
|
|
1853
1853
|
// not necessary (debounced to run at most once-per-tick)
|
|
1854
|
-
update: $
|
|
1854
|
+
update: $o(function() {
|
|
1855
1855
|
return new Promise(function(v) {
|
|
1856
1856
|
u.forceUpdate(), v(h);
|
|
1857
1857
|
});
|
|
@@ -1888,19 +1888,19 @@ function Gs(e) {
|
|
|
1888
1888
|
return u;
|
|
1889
1889
|
};
|
|
1890
1890
|
}
|
|
1891
|
-
var
|
|
1892
|
-
defaultModifiers:
|
|
1891
|
+
var Uo = [go, Mo, mo, so, Po, Lo, Zo, ho, To], Ko = /* @__PURE__ */ Go({
|
|
1892
|
+
defaultModifiers: Uo
|
|
1893
1893
|
});
|
|
1894
|
-
class
|
|
1895
|
-
constructor(t, i,
|
|
1894
|
+
class _o {
|
|
1895
|
+
constructor(t, i, s) {
|
|
1896
1896
|
le(this, "updateHotspotPosition", (t, i) => {
|
|
1897
1897
|
this.currentActiveIndex = t, this.currentOrientation = i;
|
|
1898
|
-
const
|
|
1899
|
-
this.hideHotspots(),
|
|
1898
|
+
const s = Hs(this.hotspotsConfig, t, i);
|
|
1899
|
+
this.hideHotspots(), s.forEach((o) => this.updateAndShowHotspot(o, t));
|
|
1900
1900
|
});
|
|
1901
|
-
this.container = i, this.popper = null, this.popperInstance = null, this.hotspotsContainer = Qi(this.container), this.hotspotsConfig =
|
|
1902
|
-
const { containerSize:
|
|
1903
|
-
this.initialContainerSize =
|
|
1901
|
+
this.container = i, this.popper = null, this.popperInstance = null, this.hotspotsContainer = Qi(this.container), this.hotspotsConfig = Fs(t), this.shouldHidePopper = !0, this.hidePopper = this.hidePopper.bind(this), this.imageAspectRatio = s, this.hotspotElements = /* @__PURE__ */ new Map(), this.popperListeners = [];
|
|
1902
|
+
const { containerSize: o } = t[0];
|
|
1903
|
+
this.initialContainerSize = o || [i.offsetWidth, i.offsetHeight], this.initHotspots(), this.observeContainerResize();
|
|
1904
1904
|
}
|
|
1905
1905
|
observeContainerResize() {
|
|
1906
1906
|
this.resizeObserver = new ResizeObserver(() => {
|
|
@@ -1909,7 +1909,7 @@ class _s {
|
|
|
1909
1909
|
}), this.resizeObserver.observe(this.container);
|
|
1910
1910
|
}
|
|
1911
1911
|
updateHotspotsForResize(t, i) {
|
|
1912
|
-
this.hotspotsConfig =
|
|
1912
|
+
this.hotspotsConfig = Ns({
|
|
1913
1913
|
newWidth: t,
|
|
1914
1914
|
newHeight: i,
|
|
1915
1915
|
initialContainerSize: this.initialContainerSize,
|
|
@@ -1918,17 +1918,17 @@ class _s {
|
|
|
1918
1918
|
}), this.updateHotspotPosition(this.currentActiveIndex, this.currentOrientation);
|
|
1919
1919
|
}
|
|
1920
1920
|
cleanupPopperListeners() {
|
|
1921
|
-
this.popperListeners.forEach(({ element: t, event: i, handler:
|
|
1922
|
-
t.removeEventListener(i,
|
|
1921
|
+
this.popperListeners.forEach(({ element: t, event: i, handler: s }) => {
|
|
1922
|
+
t.removeEventListener(i, s);
|
|
1923
1923
|
}), this.popperListeners = [];
|
|
1924
1924
|
}
|
|
1925
|
-
showPopper({ hotspotElement: t, content: i, id:
|
|
1926
|
-
this.popperInstance && this.popperInstance.instanceId !==
|
|
1925
|
+
showPopper({ hotspotElement: t, content: i, id: s, keepOpen: o }) {
|
|
1926
|
+
this.popperInstance && this.popperInstance.instanceId !== s && this.hidePopper();
|
|
1927
1927
|
const n = {
|
|
1928
1928
|
placement: "top",
|
|
1929
|
-
modifiers:
|
|
1929
|
+
modifiers: Bs(this.container)
|
|
1930
1930
|
};
|
|
1931
|
-
this.popper =
|
|
1931
|
+
this.popper = Ws(i, s), this.popper.setAttribute("data-show", ""), this.currentHotspotElement = t, t.setAttribute("aria-expanded", "true"), t.setAttribute("aria-describedby", `cloudimage-360-popper-${s}`);
|
|
1932
1932
|
const l = () => {
|
|
1933
1933
|
this.shouldHidePopper = !1;
|
|
1934
1934
|
}, r = () => {
|
|
@@ -1944,9 +1944,9 @@ class _s {
|
|
|
1944
1944
|
{ element: t, event: "mouseleave", handler: a },
|
|
1945
1945
|
{ element: t, event: "mouseenter", handler: c }
|
|
1946
1946
|
), this.popperInstance = {
|
|
1947
|
-
...
|
|
1948
|
-
keepOpen:
|
|
1949
|
-
instanceId:
|
|
1947
|
+
...Ko(t, this.popper, n),
|
|
1948
|
+
keepOpen: o,
|
|
1949
|
+
instanceId: s
|
|
1950
1950
|
};
|
|
1951
1951
|
}
|
|
1952
1952
|
checkAndHidePopper() {
|
|
@@ -1965,15 +1965,15 @@ class _s {
|
|
|
1965
1965
|
}
|
|
1966
1966
|
}
|
|
1967
1967
|
createHotspot(t) {
|
|
1968
|
-
const { id: i, content:
|
|
1968
|
+
const { id: i, content: s, keepOpen: o, onClick: n, label: l } = t, r = Ds(i, l);
|
|
1969
1969
|
n && (r.style.cursor = "pointer"), r.onclick = (a) => {
|
|
1970
1970
|
a.stopPropagation(), n == null || n(a, this.popperInstance, i);
|
|
1971
|
-
},
|
|
1971
|
+
}, s && (r.addEventListener(
|
|
1972
1972
|
"mouseenter",
|
|
1973
|
-
() => this.showPopper({ hotspotElement: r, content:
|
|
1973
|
+
() => this.showPopper({ hotspotElement: r, content: s, id: i, keepOpen: o })
|
|
1974
1974
|
), r.addEventListener(
|
|
1975
1975
|
"focus",
|
|
1976
|
-
() => this.showPopper({ hotspotElement: r, content:
|
|
1976
|
+
() => this.showPopper({ hotspotElement: r, content: s, id: i, keepOpen: o })
|
|
1977
1977
|
), r.addEventListener("blur", () => {
|
|
1978
1978
|
this.shouldHidePopper = !0, this.checkAndHidePopper();
|
|
1979
1979
|
})), this.hotspotsContainer.appendChild(r);
|
|
@@ -1984,7 +1984,7 @@ class _s {
|
|
|
1984
1984
|
});
|
|
1985
1985
|
}
|
|
1986
1986
|
updateAndShowHotspot(t, i) {
|
|
1987
|
-
const { positions:
|
|
1987
|
+
const { positions: s, id: o } = t, { x: n, y: l } = s[i] ?? {}, r = this.hotspotsContainer.querySelector(`[data-hotspot-id="${o}"]`);
|
|
1988
1988
|
r && (r.style.translate = `${n}px ${l}px`, r.style.opacity = 1, r.style.pointerEvents = "all");
|
|
1989
1989
|
}
|
|
1990
1990
|
/**
|
|
@@ -1992,11 +1992,11 @@ class _s {
|
|
|
1992
1992
|
* @param {string} hotspotId - The ID of the hotspot to show
|
|
1993
1993
|
*/
|
|
1994
1994
|
showHotspotById(t) {
|
|
1995
|
-
const i = this.hotspotsConfig.find((
|
|
1995
|
+
const i = this.hotspotsConfig.find((o) => o.id === t);
|
|
1996
1996
|
if (!i || !i.content) return;
|
|
1997
|
-
const
|
|
1998
|
-
|
|
1999
|
-
hotspotElement:
|
|
1997
|
+
const s = this.hotspotsContainer.querySelector(`[data-hotspot-id="${t}"]`);
|
|
1998
|
+
s && s.style.opacity === "1" && this.showPopper({
|
|
1999
|
+
hotspotElement: s,
|
|
2000
2000
|
content: i.content,
|
|
2001
2001
|
id: t,
|
|
2002
2002
|
keepOpen: i.keepOpen
|
|
@@ -2013,26 +2013,26 @@ class _s {
|
|
|
2013
2013
|
}
|
|
2014
2014
|
}
|
|
2015
2015
|
class Ft {
|
|
2016
|
-
constructor(t, i,
|
|
2017
|
-
this.container = t, this.isClicked = !1, this.fullscreenView = !!
|
|
2016
|
+
constructor(t, i, s) {
|
|
2017
|
+
this.container = t, this.isClicked = !1, this.fullscreenView = !!s, this.imagesX = [], this.imagesY = [], this.devicePixelRatio = Math.round(window.devicePixelRatio || 1), this.id = t.id, this.movementStart = { x: 0, y: 0 }, this.draggingDirection = null, this.isReady = !1, this.velocityX = 0, this.velocityY = 0, this.lastDragTime = 0, this.lastDragX = 0, this.lastDragY = 0, this.inertiaAnimationId = null, this.hasInteracted = !1, this.currentZoomScale = 1, this.touchDevice = Ls(), this.dragJustEnded = !1, this.isPinching = !1, this.initialPinchDistance = 0, this.pinchZoomLevel = 1, this.pinchZoomEmitted = !1, this.lastEmittedZoom = 1, this.panOffsetX = 0, this.panOffsetY = 0, this.canvasWorker = new Ys(), this.hotspotTimeline = null, this.hotspotTimelineIndicator = null, this.isAnimatingToFrame = !1, this.onMoveHandler = this.onMoveHandler.bind(this), this.destroy = this.destroy.bind(this), this.init(this.container, i);
|
|
2018
2018
|
}
|
|
2019
2019
|
emit(t, i = {}) {
|
|
2020
|
-
const
|
|
2021
|
-
typeof
|
|
2020
|
+
const s = this[t];
|
|
2021
|
+
typeof s == "function" && s({ ...i, viewerId: this.id });
|
|
2022
2022
|
}
|
|
2023
2023
|
announce(t) {
|
|
2024
|
-
|
|
2024
|
+
es(this.ariaLiveRegion, t);
|
|
2025
2025
|
}
|
|
2026
2026
|
mouseDown(t) {
|
|
2027
2027
|
if (!this.isReady || this.glass) return;
|
|
2028
|
-
const { pageX: i, pageY:
|
|
2029
|
-
this.hideHints(), this.hideHotspotPopper(), this.inertiaAnimationId && (cancelAnimationFrame(this.inertiaAnimationId), this.inertiaAnimationId = null), this.autoplayJustStopped = !1, (this.autoplay || this.loopTimeoutId) && (this.stopAutoplay(), this.autoplay = !1, this.autoplayJustStopped = !0), this.movementStart = { x: i, y:
|
|
2028
|
+
const { pageX: i, pageY: s } = t;
|
|
2029
|
+
this.hideHints(), this.hideHotspotPopper(), this.inertiaAnimationId && (cancelAnimationFrame(this.inertiaAnimationId), this.inertiaAnimationId = null), this.autoplayJustStopped = !1, (this.autoplay || this.loopTimeoutId) && (this.stopAutoplay(), this.autoplay = !1, this.autoplayJustStopped = !0), this.movementStart = { x: i, y: s }, this.isClicked = !0, this.isDragging = !1, this.inertia && (this.velocityX = 0, this.velocityY = 0, this.lastDragTime = performance.now(), this.lastDragX = i, this.lastDragY = s);
|
|
2030
2030
|
}
|
|
2031
2031
|
mouseUp() {
|
|
2032
2032
|
this.isReady && (!this.isZoomed && !this.autoplayJustStopped && this.showAllIcons(), this.inertia && this.isDragging && (Math.abs(this.velocityX) > 0.1 || Math.abs(this.velocityY) > 0.1) && this.startInertia(), this.isDragging && (this.emit("onDragEnd"), this.dragJustEnded = !0), this.movementStart = { x: 0, y: 0 }, this.isClicked = !1, this.isDragging = !1, this.innerBox.style.cursor = "grab");
|
|
2033
2033
|
}
|
|
2034
2034
|
startInertia() {
|
|
2035
|
-
const
|
|
2035
|
+
const s = this.fullscreenView ? document.body : this.container, o = this.dragSpeed / fe, n = o * (this.amountX / s.offsetWidth), l = o * (this.amountY / s.offsetHeight), r = () => {
|
|
2036
2036
|
if (this.velocityX *= 0.95, this.velocityY *= 0.95, Math.abs(this.velocityX) < 0.01 && Math.abs(this.velocityY) < 0.01) {
|
|
2037
2037
|
this.inertiaAnimationId = null;
|
|
2038
2038
|
return;
|
|
@@ -2054,19 +2054,19 @@ class Ft {
|
|
|
2054
2054
|
}
|
|
2055
2055
|
drag(t, i) {
|
|
2056
2056
|
if (!this.isReady || !this.isClicked) return;
|
|
2057
|
-
const
|
|
2057
|
+
const s = t - this.movementStart.x, o = i - this.movementStart.y;
|
|
2058
2058
|
if (this.inertia) {
|
|
2059
2059
|
const f = performance.now(), u = f - this.lastDragTime;
|
|
2060
2060
|
u > 0 && u < 100 && (this.velocityX = (t - this.lastDragX) / u, this.velocityY = (i - this.lastDragY) / u), this.lastDragTime = f, this.lastDragX = t, this.lastDragY = i;
|
|
2061
2061
|
}
|
|
2062
2062
|
this.draggingDirection = Se({
|
|
2063
|
-
deltaX:
|
|
2064
|
-
deltaY:
|
|
2063
|
+
deltaX: s,
|
|
2064
|
+
deltaY: o,
|
|
2065
2065
|
reversed: this.dragReverse,
|
|
2066
2066
|
allowSpinX: this.allowSpinX,
|
|
2067
2067
|
allowSpinY: this.allowSpinY
|
|
2068
2068
|
}) || this.draggingDirection;
|
|
2069
|
-
const n = this.fullscreenView ? document.body : this.container, l = this.dragSpeed / fe, r = l * (this.amountX / n.offsetWidth), a = l * (this.amountY / n.offsetHeight), c = this.allowSpinX ? Math.abs(Math.round(
|
|
2069
|
+
const n = this.fullscreenView ? document.body : this.container, l = this.dragSpeed / fe, r = l * (this.amountX / n.offsetWidth), a = l * (this.amountY / n.offsetHeight), c = this.allowSpinX ? Math.abs(Math.round(s * r)) : 0, h = this.allowSpinY ? Math.abs(Math.round(o * a)) : 0;
|
|
2070
2070
|
(this.allowSpinX && c !== 0 || this.allowSpinY && h !== 0) && (this.hasInteracted = !0, this.hideHotspotPopper(), this.onMoveHandler(this.draggingDirection, c, h), this.movementStart = { x: t, y: i }, setTimeout(() => {
|
|
2071
2071
|
this.isDragging || (this.isDragging = !0, this.emit("onDragStart"));
|
|
2072
2072
|
}, Oi));
|
|
@@ -2092,10 +2092,10 @@ class Ft {
|
|
|
2092
2092
|
}
|
|
2093
2093
|
}
|
|
2094
2094
|
loadHigherQualityImages(t, i) {
|
|
2095
|
-
const
|
|
2095
|
+
const s = Et(this.srcXConfig, t), o = this.allowSpinY ? Et(this.srcYConfig, t) : null;
|
|
2096
2096
|
ve({
|
|
2097
|
-
cdnPathX:
|
|
2098
|
-
cdnPathY:
|
|
2097
|
+
cdnPathX: s,
|
|
2098
|
+
cdnPathY: o,
|
|
2099
2099
|
configX: this.srcXConfig,
|
|
2100
2100
|
configY: this.srcYConfig,
|
|
2101
2101
|
onAllImagesLoad: (n, l) => {
|
|
@@ -2131,8 +2131,8 @@ class Ft {
|
|
|
2131
2131
|
this.isZoomed && this.removeZoom();
|
|
2132
2132
|
}
|
|
2133
2133
|
applyZoom(t) {
|
|
2134
|
-
const { offsetX: i, offsetY:
|
|
2135
|
-
this.isZoomed = !0, this.hideAllIcons(), this.hideLoadingSpinner(), this.hideTransitionOverlay(), this.updateView(this.pointerZoom, i,
|
|
2134
|
+
const { offsetX: i, offsetY: s } = xs(t, this.canvas, this.devicePixelRatio);
|
|
2135
|
+
this.isZoomed = !0, this.hideAllIcons(), this.hideLoadingSpinner(), this.hideTransitionOverlay(), this.updateView(this.pointerZoom, i, s), this.emit("onZoomIn", { zoomLevel: this.pointerZoom }), this.announce("Zoomed in. Move mouse to pan. Click to zoom out.");
|
|
2136
2136
|
}
|
|
2137
2137
|
touchOutside(t) {
|
|
2138
2138
|
if (!this.glass) return;
|
|
@@ -2153,12 +2153,12 @@ class Ft {
|
|
|
2153
2153
|
return;
|
|
2154
2154
|
}
|
|
2155
2155
|
if (t.touches.length > 1) return;
|
|
2156
|
-
const { pageX:
|
|
2157
|
-
this.inertiaAnimationId && (cancelAnimationFrame(this.inertiaAnimationId), this.inertiaAnimationId = null), (this.autoplay || this.loopTimeoutId) && (this.stopAutoplay(), this.autoplay = !1), this.hideAllIcons(), this.hideHotspotPopper(), this.movementStart = { x:
|
|
2156
|
+
const { pageX: s, pageY: o } = t.touches[0];
|
|
2157
|
+
this.inertiaAnimationId && (cancelAnimationFrame(this.inertiaAnimationId), this.inertiaAnimationId = null), (this.autoplay || this.loopTimeoutId) && (this.stopAutoplay(), this.autoplay = !1), this.hideAllIcons(), this.hideHotspotPopper(), this.movementStart = { x: s, y: o }, this.isClicked = !0, this.isDragging = !1, this.inertia && (this.velocityX = 0, this.velocityY = 0, this.lastDragTime = performance.now(), this.lastDragX = s, this.lastDragY = o);
|
|
2158
2158
|
}
|
|
2159
2159
|
getPinchDistance(t, i) {
|
|
2160
|
-
const
|
|
2161
|
-
return Math.sqrt(
|
|
2160
|
+
const s = t.pageX - i.pageX, o = t.pageY - i.pageY;
|
|
2161
|
+
return Math.sqrt(s * s + o * o);
|
|
2162
2162
|
}
|
|
2163
2163
|
getPinchCenter(t, i) {
|
|
2164
2164
|
return {
|
|
@@ -2187,7 +2187,7 @@ class Ft {
|
|
|
2187
2187
|
if (!this.isReady || this.glass) return;
|
|
2188
2188
|
if (this.isPinching && t.touches.length === 2) {
|
|
2189
2189
|
t.preventDefault();
|
|
2190
|
-
const
|
|
2190
|
+
const o = t.touches[0], n = t.touches[1], l = this.getPinchDistance(o, n);
|
|
2191
2191
|
if (this.initialPinchDistance === 0) {
|
|
2192
2192
|
this.initialPinchDistance = l;
|
|
2193
2193
|
return;
|
|
@@ -2199,29 +2199,29 @@ class Ft {
|
|
|
2199
2199
|
return;
|
|
2200
2200
|
}
|
|
2201
2201
|
if (!this.isClicked || !t.touches || !t.touches[0]) return;
|
|
2202
|
-
const { pageX: i, pageY:
|
|
2202
|
+
const { pageX: i, pageY: s } = t.touches[0];
|
|
2203
2203
|
if (t.preventDefault(), this.isZoomed && this.pinchZoomLevel > 1) {
|
|
2204
|
-
const
|
|
2205
|
-
this.panOffsetX -=
|
|
2204
|
+
const o = i - this.movementStart.x, n = s - this.movementStart.y;
|
|
2205
|
+
this.panOffsetX -= o * this.devicePixelRatio, this.panOffsetY -= n * this.devicePixelRatio, this.movementStart = { x: i, y: s }, this.updateView(this.pinchZoomLevel, this.panOffsetX, this.panOffsetY);
|
|
2206
2206
|
return;
|
|
2207
2207
|
}
|
|
2208
|
-
this.drag(i,
|
|
2208
|
+
this.drag(i, s);
|
|
2209
2209
|
}
|
|
2210
2210
|
keyDown(t) {
|
|
2211
2211
|
if (!this.isReady) return;
|
|
2212
|
-
const { keyCode: i } = t,
|
|
2212
|
+
const { keyCode: i } = t, s = this.keysReverse;
|
|
2213
2213
|
switch (this.autoplay && this.stopAutoplay(), Ee(i, this.allowSpinY) && (this.hasInteracted = !0, this.hideAllIcons(), this.hideHints()), i) {
|
|
2214
2214
|
case 37:
|
|
2215
|
-
|
|
2215
|
+
s ? this.moveLeft() : this.moveRight();
|
|
2216
2216
|
break;
|
|
2217
2217
|
case 39:
|
|
2218
|
-
|
|
2218
|
+
s ? this.moveRight() : this.moveLeft();
|
|
2219
2219
|
break;
|
|
2220
2220
|
case 38:
|
|
2221
|
-
this.allowSpinY && (t.preventDefault(),
|
|
2221
|
+
this.allowSpinY && (t.preventDefault(), s ? this.moveTop() : this.moveBottom());
|
|
2222
2222
|
break;
|
|
2223
2223
|
case 40:
|
|
2224
|
-
this.allowSpinY && (t.preventDefault(),
|
|
2224
|
+
this.allowSpinY && (t.preventDefault(), s ? this.moveBottom() : this.moveTop());
|
|
2225
2225
|
break;
|
|
2226
2226
|
}
|
|
2227
2227
|
}
|
|
@@ -2253,8 +2253,8 @@ class Ft {
|
|
|
2253
2253
|
moveBottom(t, i = 1) {
|
|
2254
2254
|
t && this.activeImageY <= 0 || (this.moveActiveYIndexDown(i), this.isZoomed || this.updateView());
|
|
2255
2255
|
}
|
|
2256
|
-
onMoveHandler(t, i = 1,
|
|
2257
|
-
t === "right" ? this.moveRight(this.stopAtEdges, i) : t === "left" ? this.moveLeft(this.stopAtEdges, i) : t === "up" ? this.moveTop(this.stopAtEdges,
|
|
2256
|
+
onMoveHandler(t, i = 1, s = 1) {
|
|
2257
|
+
t === "right" ? this.moveRight(this.stopAtEdges, i) : t === "left" ? this.moveLeft(this.stopAtEdges, i) : t === "up" ? this.moveTop(this.stopAtEdges, s) : t === "down" && this.moveBottom(this.stopAtEdges, s), this.emit("onSpin", {
|
|
2258
2258
|
direction: t,
|
|
2259
2259
|
activeImageX: this.activeImageX,
|
|
2260
2260
|
activeImageY: this.activeImageY,
|
|
@@ -2262,59 +2262,59 @@ class Ft {
|
|
|
2262
2262
|
amountY: this.amountY
|
|
2263
2263
|
});
|
|
2264
2264
|
}
|
|
2265
|
-
updateView(t, i,
|
|
2266
|
-
const
|
|
2267
|
-
this.hotspotsInstance && !this.isZoomed && !this.autoplay && this.hotspotsInstance.updateHotspotPosition(
|
|
2265
|
+
updateView(t, i, s) {
|
|
2266
|
+
const o = this.orientation === P.X ? this.activeImageX : this.activeImageY, n = this.orientation === P.X ? this.imagesX[this.activeImageX] : this.imagesY[this.activeImageY];
|
|
2267
|
+
this.hotspotsInstance && !this.isZoomed && !this.autoplay && this.hotspotsInstance.updateHotspotPosition(o, this.orientation), this.hotspotTimelineIndicator && this.orientation === P.X && this.updateHotspotTimelinePosition(), this.drawImageOnCanvas(n, t, i, s);
|
|
2268
2268
|
}
|
|
2269
2269
|
updatePercentageInLoader(t = 0) {
|
|
2270
2270
|
this.loader && (this.loader.innerText = t + "%");
|
|
2271
2271
|
}
|
|
2272
2272
|
adaptCanvasSize(t) {
|
|
2273
|
-
const { naturalWidth: i, naturalHeight:
|
|
2274
|
-
this.imageAspectRatio = i /
|
|
2275
|
-
const
|
|
2273
|
+
const { naturalWidth: i, naturalHeight: s } = t;
|
|
2274
|
+
this.imageAspectRatio = i / s;
|
|
2275
|
+
const o = this.fullscreenView ? window.innerWidth : this.canvas.clientWidth, n = this.fullscreenView ? window.innerHeight : this.canvas.clientHeight;
|
|
2276
2276
|
this.canvasWorker.postMessage({
|
|
2277
2277
|
action: "adaptCanvasSize",
|
|
2278
2278
|
devicePixelRatio: this.devicePixelRatio,
|
|
2279
2279
|
imageAspectRatio: this.imageAspectRatio,
|
|
2280
|
-
containerWidth:
|
|
2280
|
+
containerWidth: o,
|
|
2281
2281
|
containerHeight: n
|
|
2282
2282
|
});
|
|
2283
2283
|
}
|
|
2284
|
-
drawImageOnCanvas(t, i = 1,
|
|
2284
|
+
drawImageOnCanvas(t, i = 1, s = 0, o = 0) {
|
|
2285
2285
|
this.canvasWorker.postMessage({
|
|
2286
2286
|
action: "drawImageOnCanvas",
|
|
2287
2287
|
imageData: t,
|
|
2288
2288
|
zoomScale: i,
|
|
2289
|
-
pointerX:
|
|
2290
|
-
pointerY:
|
|
2289
|
+
pointerX: s,
|
|
2290
|
+
pointerY: o
|
|
2291
2291
|
});
|
|
2292
2292
|
}
|
|
2293
|
-
pushImageToSet(t, i,
|
|
2294
|
-
|
|
2293
|
+
pushImageToSet(t, i, s) {
|
|
2294
|
+
s === P.X ? this.imagesX[i] = t : this.imagesY[i] = t;
|
|
2295
2295
|
}
|
|
2296
2296
|
calculatePercentage() {
|
|
2297
2297
|
const t = this.amountX + this.amountY, i = this.imagesX.length + this.imagesY.length;
|
|
2298
2298
|
return Math.round(i / t * 100);
|
|
2299
2299
|
}
|
|
2300
|
-
onImageLoad(t, i,
|
|
2301
|
-
this.pushImageToSet(t, i,
|
|
2300
|
+
onImageLoad(t, i, s) {
|
|
2301
|
+
this.pushImageToSet(t, i, s), this.updatePercentageInLoader(this.calculatePercentage());
|
|
2302
2302
|
}
|
|
2303
2303
|
onFirstImageLoaded(t, i) {
|
|
2304
2304
|
this.createContainers(t), this.adaptCanvasSize(i), this.drawImageOnCanvas(i);
|
|
2305
2305
|
}
|
|
2306
2306
|
onAllImagesLoaded() {
|
|
2307
|
-
if (this.addAllIcons(), this.isReady = !0, this.amountX = this.imagesX.length, this.amountY = this.imagesY.length, this.activeImageX = this.autoplayReverse ? this.amountX - 1 : 0, this.activeImageY = this.autoplayReverse ? this.amountY - 1 : 0, this.hotspots && (this.hotspotsInstance = new
|
|
2307
|
+
if (this.addAllIcons(), this.isReady = !0, this.amountX = this.imagesX.length, this.amountY = this.imagesY.length, this.activeImageX = this.autoplayReverse ? this.amountX - 1 : 0, this.activeImageY = this.autoplayReverse ? this.amountY - 1 : 0, this.hotspots && (this.hotspotsInstance = new _o(this.hotspots, this.innerBox, this.imageAspectRatio), this.addHotspotTimeline(), this.showHotspotTimeline()), this.emit("onLoad", { imagesX: this.imagesX.length, imagesY: this.imagesY.length }), this.emit("onReady"), this.announce("360 degree view loaded. Use mouse drag or arrow keys to rotate."), this.hints !== !1 && !this.autoplay) {
|
|
2308
2308
|
const t = this.hints === !0 || this.hints === void 0 ? be(this.viewerConfig, this.touchDevice) : this.hints;
|
|
2309
2309
|
t && t.length > 0 && (this.hintsOverlay = ye(this.innerBox, t), we(this.hintsOverlay));
|
|
2310
2310
|
}
|
|
2311
|
-
this.autoplay && (this.hideAllIcons(),
|
|
2311
|
+
this.autoplay && (this.hideAllIcons(), ks(this.play.bind(this))());
|
|
2312
2312
|
}
|
|
2313
2313
|
magnify(t) {
|
|
2314
2314
|
t.stopPropagation();
|
|
2315
|
-
const { src: i } = this.orientation === P.Y ? this.imagesY[this.activeImageY] : this.imagesX[this.activeImageX],
|
|
2316
|
-
this.showLoadingSpinner(), this.createGlass(),
|
|
2317
|
-
this.hideLoadingSpinner(), this.magnified = !0,
|
|
2315
|
+
const { src: i } = this.orientation === P.Y ? this.imagesY[this.activeImageY] : this.imagesX[this.activeImageX], o = (this.fullscreenView ? document.body : this.container).offsetWidth * this.magnifier, n = Di(i, o);
|
|
2316
|
+
this.showLoadingSpinner(), this.createGlass(), bs(n, (a) => {
|
|
2317
|
+
this.hideLoadingSpinner(), this.magnified = !0, Is(t, this.innerBox, this.offset, a, this.glass, this.magnifier);
|
|
2318
2318
|
}, (a) => {
|
|
2319
2319
|
this.hideLoadingSpinner(), this.removeGlass(), this.emit("onError", {
|
|
2320
2320
|
error: { message: a.message, url: a.url },
|
|
@@ -2342,7 +2342,7 @@ class Ft {
|
|
|
2342
2342
|
bottom: this.moveBottom.bind(this)
|
|
2343
2343
|
};
|
|
2344
2344
|
this.loopTimeoutId = window.setInterval(() => {
|
|
2345
|
-
if (this.playOnce &&
|
|
2345
|
+
if (this.playOnce && Os({
|
|
2346
2346
|
autoplayBehavior: this.autoplayBehavior,
|
|
2347
2347
|
activeImageX: this.activeImageX,
|
|
2348
2348
|
activeImageY: this.activeImageY,
|
|
@@ -2353,7 +2353,7 @@ class Ft {
|
|
|
2353
2353
|
this.stopAutoplay();
|
|
2354
2354
|
return;
|
|
2355
2355
|
}
|
|
2356
|
-
|
|
2356
|
+
Es({
|
|
2357
2357
|
autoplayBehavior: this.autoplayBehavior,
|
|
2358
2358
|
activeImageX: this.activeImageX,
|
|
2359
2359
|
activeImageY: this.activeImageY,
|
|
@@ -2361,9 +2361,9 @@ class Ft {
|
|
|
2361
2361
|
amountY: this.amountY,
|
|
2362
2362
|
autoplayReverse: this.autoplayReverse,
|
|
2363
2363
|
spinDirection: this.spinDirection
|
|
2364
|
-
}) && (this.spinDirection =
|
|
2364
|
+
}) && (this.spinDirection = As(this.spinDirection));
|
|
2365
2365
|
const n = this.spinDirection === "y";
|
|
2366
|
-
|
|
2366
|
+
Cs({
|
|
2367
2367
|
autoplayBehavior: this.autoplayBehavior,
|
|
2368
2368
|
spinY: n,
|
|
2369
2369
|
reversed: this.autoplayReverse,
|
|
@@ -2444,28 +2444,28 @@ class Ft {
|
|
|
2444
2444
|
this.loadingSpinner && (this.loadingSpinner.style.opacity = 0);
|
|
2445
2445
|
}
|
|
2446
2446
|
hideHints() {
|
|
2447
|
-
!this.hintsOverlay || this.hintsHidden || (this.hintsHidden = !0,
|
|
2447
|
+
!this.hintsOverlay || this.hintsHidden || (this.hintsHidden = !0, os(this.hintsOverlay));
|
|
2448
2448
|
}
|
|
2449
2449
|
addHotspotTimeline() {
|
|
2450
2450
|
if (!this.hotspots || this.hotspotTimeline) return;
|
|
2451
|
-
const t =
|
|
2451
|
+
const t = cs(this.container, this.amountX, this.hotspots);
|
|
2452
2452
|
if (!t) return;
|
|
2453
|
-
this.hotspotTimeline = t.element, this.hotspotTimelineIndicator = t.indicator, this.hotspotTimeline.querySelectorAll(".cloudimage-360-hotspot-timeline-dot").forEach((
|
|
2454
|
-
|
|
2455
|
-
|
|
2456
|
-
const n = parseInt(
|
|
2453
|
+
this.hotspotTimeline = t.element, this.hotspotTimelineIndicator = t.indicator, this.hotspotTimeline.querySelectorAll(".cloudimage-360-hotspot-timeline-dot").forEach((s) => {
|
|
2454
|
+
s.addEventListener("click", (o) => {
|
|
2455
|
+
o.stopPropagation();
|
|
2456
|
+
const n = parseInt(s.getAttribute("data-frame"), 10), l = s.getAttribute("data-hotspot-id");
|
|
2457
2457
|
isNaN(n) || this.animateToFrame(n, l);
|
|
2458
2458
|
});
|
|
2459
2459
|
}), this.updateHotspotTimelinePosition();
|
|
2460
2460
|
}
|
|
2461
2461
|
showHotspotTimeline() {
|
|
2462
|
-
|
|
2462
|
+
ds(this.hotspotTimeline);
|
|
2463
2463
|
}
|
|
2464
2464
|
hideHotspotTimeline() {
|
|
2465
|
-
|
|
2465
|
+
us(this.hotspotTimeline);
|
|
2466
2466
|
}
|
|
2467
2467
|
updateHotspotTimelinePosition() {
|
|
2468
|
-
|
|
2468
|
+
hs(this.hotspotTimelineIndicator, this.activeImageX, this.amountX);
|
|
2469
2469
|
}
|
|
2470
2470
|
/**
|
|
2471
2471
|
* Animates the viewer to a target frame, optionally showing a hotspot popup on arrival
|
|
@@ -2473,12 +2473,12 @@ class Ft {
|
|
|
2473
2473
|
* @param {string} [hotspotId] - Optional hotspot ID to show popup for after animation
|
|
2474
2474
|
*/
|
|
2475
2475
|
animateToFrame(t, i) {
|
|
2476
|
-
if (this.isAnimatingToFrame || t === this.activeImageX) {
|
|
2476
|
+
if (this.hotspotsInstance && this.hotspotsInstance.hidePopper(), this.isAnimatingToFrame || t === this.activeImageX) {
|
|
2477
2477
|
t === this.activeImageX && i && this.hotspotsInstance && this.hotspotTimelineOnClick && this.hotspotsInstance.showHotspotById(i);
|
|
2478
2478
|
return;
|
|
2479
2479
|
}
|
|
2480
2480
|
this.isAnimatingToFrame = !0, this.hasInteracted = !0, (this.autoplay || this.loopTimeoutId) && (this.stopAutoplay(), this.autoplay = !1), this.inertiaAnimationId && (cancelAnimationFrame(this.inertiaAnimationId), this.inertiaAnimationId = null);
|
|
2481
|
-
const
|
|
2481
|
+
const s = this.activeImageX, o = (t - s + this.amountX) % this.amountX, n = (s - t + this.amountX) % this.amountX, l = o <= n, r = l ? o : n;
|
|
2482
2482
|
if (r === 0) {
|
|
2483
2483
|
this.isAnimatingToFrame = !1;
|
|
2484
2484
|
return;
|
|
@@ -2513,8 +2513,8 @@ class Ft {
|
|
|
2513
2513
|
removeLoader() {
|
|
2514
2514
|
this.loader && (this.innerBox.removeChild(this.loader), this.loader = null);
|
|
2515
2515
|
}
|
|
2516
|
-
attachEvents(t, i,
|
|
2517
|
-
t && this.addMouseEvents(), i && this.addTouchEvents(),
|
|
2516
|
+
attachEvents(t, i, s) {
|
|
2517
|
+
t && this.addMouseEvents(), i && this.addTouchEvents(), s && this.addKeyboardEvents(), this.addEscKeyHandler();
|
|
2518
2518
|
}
|
|
2519
2519
|
removeEvents() {
|
|
2520
2520
|
this.removeMouseEvents(), this.removeTouchEvents(), this.removeKeyboardEvents(), this.removeEscKeyHandler();
|
|
@@ -2546,7 +2546,7 @@ class Ft {
|
|
|
2546
2546
|
document.removeEventListener("keydown", this.boundKeyDown), document.removeEventListener("keyup", this.boundKeyUp);
|
|
2547
2547
|
}
|
|
2548
2548
|
createContainers(t) {
|
|
2549
|
-
this.iconsContainer = ge(this.innerBox), this.canvas = ji(this.innerBox, t), this.loader = Ki(this.innerBox), this.ariaLiveRegion =
|
|
2549
|
+
this.iconsContainer = ge(this.innerBox), this.canvas = ji(this.innerBox, t), this.loader = Ki(this.innerBox), this.ariaLiveRegion = ts(this.innerBox);
|
|
2550
2550
|
const i = this.canvas.transferControlToOffscreen();
|
|
2551
2551
|
this.canvasWorker.postMessage(
|
|
2552
2552
|
{
|
|
@@ -2560,8 +2560,8 @@ class Ft {
|
|
|
2560
2560
|
update(t) {
|
|
2561
2561
|
this.isReady && (this.stopAutoplay(), Jt(this.innerBox, ".cloudimage-360-icons-container"), this.init(this.container, t, !0), this.iconsContainer = ge(this.innerBox), this.onAllImagesLoaded());
|
|
2562
2562
|
}
|
|
2563
|
-
init(t, i,
|
|
2564
|
-
const
|
|
2563
|
+
init(t, i, s) {
|
|
2564
|
+
const o = i ? Xi(i) : Ti(t), {
|
|
2565
2565
|
folder: n,
|
|
2566
2566
|
apiVersion: l,
|
|
2567
2567
|
filenameX: r,
|
|
@@ -2616,8 +2616,8 @@ class Ft {
|
|
|
2616
2616
|
onDragStart: Ut,
|
|
2617
2617
|
onDragEnd: _,
|
|
2618
2618
|
onError: ht
|
|
2619
|
-
} =
|
|
2620
|
-
if (this.viewerConfig =
|
|
2619
|
+
} = o, yt = { ciToken: A, ciFilters: k, ciTransformation: R }, dt = qt(c, []), st = qt(h, []);
|
|
2620
|
+
if (this.viewerConfig = o, this.amountX = dt.length || f, this.amountY = st.length || u, this.allowSpinX = !!this.amountX, this.allowSpinY = !!this.amountY, this.activeImageX = O ? this.amountX - 1 : 0, this.activeImageY = O ? this.amountY - 1 : 0, this.bottomCircleOffset = b, this.autoplay = x, this.autoplayBehavior = w, this.playOnce = C, this.speed = y, this.autoplayReverse = O, this.fullscreen = S, this.magnifier = E > 1 ? Math.min(E, Li) : 0, this.dragSpeed = Math.max(z, Ai), this.stopAtEdges = G, this.ciParams = yt, this.apiVersion = l, this.pointerZoom = Y > 1 ? Math.min(Y, me) : null, this.keysReverse = m, this.info = Z, this.keys = v, this.innerBox = this.innerBox ?? Gi(this.container), ct && (this.container.style.aspectRatio = ct), this.initialIconShown = rt, this.bottomCircle = U, this.spinDirection = Ss(this.autoplayBehavior, this.allowSpinX, this.allowSpinY), this.dragReverse = vt, this.hotspots = at, this.hide360Logo = tt, this.logoSrc = lt, this.inertia = q, this.pinchZoom = V, this.hints = et, this.hotspotTimelineOnClick = K, it === "dark" ? this.container.classList.add("ci360-theme-dark") : it === "light" && this.container.classList.remove("ci360-theme-dark"), this.onReady = Vt, this.onLoad = gt, this.onSpin = jt, this.onAutoplayStart = Xt, this.onAutoplayStop = $t, this.onFullscreenOpen = zt, this.onFullscreenClose = Pt, this.onZoomIn = Rt, this.onZoomOut = Gt, this.onDragStart = Ut, this.onDragEnd = _, this.onError = ht, this.srcXConfig = {
|
|
2621
2621
|
folder: n,
|
|
2622
2622
|
filename: r,
|
|
2623
2623
|
imageList: dt,
|
|
@@ -2633,11 +2633,11 @@ class Ft {
|
|
|
2633
2633
|
}, this.srcYConfig = {
|
|
2634
2634
|
...this.srcXConfig,
|
|
2635
2635
|
filename: a,
|
|
2636
|
-
imageList:
|
|
2636
|
+
imageList: st,
|
|
2637
2637
|
orientation: P.Y,
|
|
2638
2638
|
amount: this.amountY
|
|
2639
|
-
},
|
|
2640
|
-
const bt = (this.fullscreenView ? document.body : this.container).offsetWidth, wt = this.allowSpinX && !dt.length ? Et(this.srcXConfig, bt) : null, It = this.allowSpinY && !
|
|
2639
|
+
}, s && this.removeEvents(), this.attachEvents(I, g, v), s) return;
|
|
2640
|
+
const bt = (this.fullscreenView ? document.body : this.container).offsetWidth, wt = this.allowSpinX && !dt.length ? Et(this.srcXConfig, bt) : null, It = this.allowSpinY && !st.length ? Et(this.srcYConfig, bt) : null, xt = (Je) => {
|
|
2641
2641
|
ve({
|
|
2642
2642
|
cdnPathX: wt,
|
|
2643
2643
|
cdnPathY: It,
|
|
@@ -2652,26 +2652,26 @@ class Ft {
|
|
|
2652
2652
|
this.allowSpinX ? xe(wt, this.srcXConfig, xt) : this.allowSpinY && xe(It, this.srcYConfig, xt);
|
|
2653
2653
|
}
|
|
2654
2654
|
}
|
|
2655
|
-
class
|
|
2655
|
+
class qo {
|
|
2656
2656
|
constructor() {
|
|
2657
2657
|
this.views = /* @__PURE__ */ new Map(), this.initAll = this.initAll.bind(this), this.getViews = this.getViews.bind(this);
|
|
2658
2658
|
}
|
|
2659
2659
|
generateId() {
|
|
2660
2660
|
return `ci360-${Math.random().toString(36).slice(2, 11)}`;
|
|
2661
2661
|
}
|
|
2662
|
-
init(t, i,
|
|
2662
|
+
init(t, i, s) {
|
|
2663
2663
|
if (!t) return;
|
|
2664
|
-
const
|
|
2665
|
-
t.id || (t.id =
|
|
2666
|
-
const n = new Ft(t, i,
|
|
2667
|
-
return this.views.set(
|
|
2664
|
+
const o = t.id || this.generateId();
|
|
2665
|
+
t.id || (t.id = o);
|
|
2666
|
+
const n = new Ft(t, i, s);
|
|
2667
|
+
return this.views.set(o, n), n;
|
|
2668
2668
|
}
|
|
2669
2669
|
initAll(t = "cloudimage-360") {
|
|
2670
|
-
[...document.querySelectorAll(`.${t}`)].filter(Boolean).forEach((
|
|
2671
|
-
const
|
|
2672
|
-
|
|
2673
|
-
const n = new Ft(
|
|
2674
|
-
this.views.set(
|
|
2670
|
+
[...document.querySelectorAll(`.${t}`)].filter(Boolean).forEach((s) => {
|
|
2671
|
+
const o = s.id || this.generateId();
|
|
2672
|
+
s.id || (s.id = o);
|
|
2673
|
+
const n = new Ft(s);
|
|
2674
|
+
this.views.set(o, n);
|
|
2675
2675
|
});
|
|
2676
2676
|
}
|
|
2677
2677
|
destroy(t) {
|
|
@@ -2690,15 +2690,15 @@ class qs {
|
|
|
2690
2690
|
return Array.from(this.views.values());
|
|
2691
2691
|
}
|
|
2692
2692
|
updateView(t, i) {
|
|
2693
|
-
const
|
|
2694
|
-
if (!
|
|
2695
|
-
const
|
|
2696
|
-
|
|
2693
|
+
const s = this.getViewById(t);
|
|
2694
|
+
if (!s) return null;
|
|
2695
|
+
const o = { ...s.viewerConfig, ...i };
|
|
2696
|
+
s.destroy();
|
|
2697
2697
|
const n = document.getElementById(t);
|
|
2698
|
-
return this.init(n,
|
|
2698
|
+
return this.init(n, o);
|
|
2699
2699
|
}
|
|
2700
2700
|
}
|
|
2701
2701
|
export {
|
|
2702
|
-
|
|
2702
|
+
qo as default
|
|
2703
2703
|
};
|
|
2704
|
-
//# sourceMappingURL=ci360-
|
|
2704
|
+
//# sourceMappingURL=ci360-CILBSFAa.mjs.map
|