js-cloudimage-360-view 4.3.3 → 4.4.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 +12 -1
- package/dist/js-cloudimage-360-view.min.js +7 -7
- package/dist/react/{ci360-xUK7dmd6.mjs → ci360--3KbDLtq.mjs} +718 -678
- package/dist/react/ci360--3KbDLtq.mjs.map +1 -0
- package/dist/react/ci360-FVoLTUpQ.js +65 -0
- package/dist/react/ci360-FVoLTUpQ.js.map +1 -0
- package/dist/react/index.cjs +1 -1
- package/dist/react/index.cjs.map +1 -1
- package/dist/react/index.d.ts +15 -0
- package/dist/react/index.js +62 -58
- package/dist/react/index.js.map +1 -1
- package/dist/react/style.css +1 -1
- package/package.json +11 -11
- package/src/react/types.d.ts +15 -0
- package/dist/react/ci360-Bv2kRtqP.js +0 -65
- package/dist/react/ci360-Bv2kRtqP.js.map +0 -1
- package/dist/react/ci360-xUK7dmd6.mjs.map +0 -1
|
@@ -1,105 +1,105 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
var
|
|
5
|
-
function
|
|
1
|
+
var li = Object.defineProperty;
|
|
2
|
+
var ci = (e, t, i) => t in e ? li(e, t, { enumerable: !0, configurable: !0, writable: !0, value: i }) : e[t] = i;
|
|
3
|
+
var pe = (e, t, i) => ci(e, typeof t != "symbol" ? t + "" : t, i);
|
|
4
|
+
var Ht = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
|
|
5
|
+
function hi(e) {
|
|
6
6
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
7
7
|
}
|
|
8
|
-
var
|
|
9
|
-
return
|
|
8
|
+
var je = "Expected a function", me = NaN, di = "[object Symbol]", ui = /^\s+|\s+$/g, pi = /^[-+]0x[0-9a-f]+$/i, mi = /^0b[01]+$/i, fi = /^0o[0-7]+$/i, vi = parseInt, gi = typeof Ht == "object" && Ht && Ht.Object === Object && Ht, yi = typeof self == "object" && self && self.Object === Object && self, bi = gi || yi || Function("return this")(), wi = Object.prototype, Ii = wi.toString, Ci = Math.max, xi = Math.min, qt = function() {
|
|
9
|
+
return bi.Date.now();
|
|
10
10
|
};
|
|
11
|
-
function
|
|
12
|
-
var s, o, n,
|
|
11
|
+
function Oi(e, t, i) {
|
|
12
|
+
var s, o, n, a, r, l, c = 0, h = !1, u = !1, f = !0;
|
|
13
13
|
if (typeof e != "function")
|
|
14
|
-
throw new TypeError(
|
|
15
|
-
t =
|
|
14
|
+
throw new TypeError(je);
|
|
15
|
+
t = fe(t) || 0, Ft(i) && (h = !!i.leading, u = "maxWait" in i, n = u ? Ci(fe(i.maxWait) || 0, t) : n, f = "trailing" in i ? !!i.trailing : f);
|
|
16
16
|
function p(m) {
|
|
17
17
|
var g = s, C = o;
|
|
18
|
-
return s = o = void 0, c = m,
|
|
18
|
+
return s = o = void 0, c = m, a = e.apply(C, g), a;
|
|
19
19
|
}
|
|
20
20
|
function I(m) {
|
|
21
|
-
return c = m, r = setTimeout(O, t), h ? p(m) :
|
|
21
|
+
return c = m, r = setTimeout(O, t), h ? p(m) : a;
|
|
22
22
|
}
|
|
23
23
|
function b(m) {
|
|
24
|
-
var g = m -
|
|
25
|
-
return u ?
|
|
24
|
+
var g = m - l, C = m - c, A = t - g;
|
|
25
|
+
return u ? xi(A, n - C) : A;
|
|
26
26
|
}
|
|
27
27
|
function v(m) {
|
|
28
|
-
var g = m -
|
|
29
|
-
return
|
|
28
|
+
var g = m - l, C = m - c;
|
|
29
|
+
return l === void 0 || g >= t || g < 0 || u && C >= n;
|
|
30
30
|
}
|
|
31
31
|
function O() {
|
|
32
|
-
var m =
|
|
32
|
+
var m = qt();
|
|
33
33
|
if (v(m))
|
|
34
34
|
return E(m);
|
|
35
35
|
r = setTimeout(O, b(m));
|
|
36
36
|
}
|
|
37
37
|
function E(m) {
|
|
38
|
-
return r = void 0, f && s ? p(m) : (s = o = void 0,
|
|
38
|
+
return r = void 0, f && s ? p(m) : (s = o = void 0, a);
|
|
39
39
|
}
|
|
40
40
|
function w() {
|
|
41
|
-
r !== void 0 && clearTimeout(r), c = 0, s =
|
|
41
|
+
r !== void 0 && clearTimeout(r), c = 0, s = l = o = r = void 0;
|
|
42
42
|
}
|
|
43
43
|
function y() {
|
|
44
|
-
return r === void 0 ?
|
|
44
|
+
return r === void 0 ? a : E(qt());
|
|
45
45
|
}
|
|
46
46
|
function x() {
|
|
47
|
-
var m =
|
|
48
|
-
if (s = arguments, o = this,
|
|
47
|
+
var m = qt(), g = v(m);
|
|
48
|
+
if (s = arguments, o = this, l = m, g) {
|
|
49
49
|
if (r === void 0)
|
|
50
|
-
return I(
|
|
50
|
+
return I(l);
|
|
51
51
|
if (u)
|
|
52
|
-
return r = setTimeout(O, t), p(
|
|
52
|
+
return r = setTimeout(O, t), p(l);
|
|
53
53
|
}
|
|
54
|
-
return r === void 0 && (r = setTimeout(O, t)),
|
|
54
|
+
return r === void 0 && (r = setTimeout(O, t)), a;
|
|
55
55
|
}
|
|
56
56
|
return x.cancel = w, x.flush = y, x;
|
|
57
57
|
}
|
|
58
|
-
function
|
|
58
|
+
function Ei(e, t, i) {
|
|
59
59
|
var s = !0, o = !0;
|
|
60
60
|
if (typeof e != "function")
|
|
61
|
-
throw new TypeError(
|
|
62
|
-
return
|
|
61
|
+
throw new TypeError(je);
|
|
62
|
+
return Ft(i) && (s = "leading" in i ? !!i.leading : s, o = "trailing" in i ? !!i.trailing : o), Oi(e, t, {
|
|
63
63
|
leading: s,
|
|
64
64
|
maxWait: t,
|
|
65
65
|
trailing: o
|
|
66
66
|
});
|
|
67
67
|
}
|
|
68
|
-
function
|
|
68
|
+
function Ft(e) {
|
|
69
69
|
var t = typeof e;
|
|
70
70
|
return !!e && (t == "object" || t == "function");
|
|
71
71
|
}
|
|
72
|
-
function
|
|
72
|
+
function Ai(e) {
|
|
73
73
|
return !!e && typeof e == "object";
|
|
74
74
|
}
|
|
75
|
-
function
|
|
76
|
-
return typeof e == "symbol" ||
|
|
75
|
+
function Si(e) {
|
|
76
|
+
return typeof e == "symbol" || Ai(e) && Ii.call(e) == di;
|
|
77
77
|
}
|
|
78
|
-
function
|
|
78
|
+
function fe(e) {
|
|
79
79
|
if (typeof e == "number")
|
|
80
80
|
return e;
|
|
81
|
-
if (
|
|
82
|
-
return
|
|
83
|
-
if (
|
|
81
|
+
if (Si(e))
|
|
82
|
+
return me;
|
|
83
|
+
if (Ft(e)) {
|
|
84
84
|
var t = typeof e.valueOf == "function" ? e.valueOf() : e;
|
|
85
|
-
e =
|
|
85
|
+
e = Ft(t) ? t + "" : t;
|
|
86
86
|
}
|
|
87
87
|
if (typeof e != "string")
|
|
88
88
|
return e === 0 ? e : +e;
|
|
89
|
-
e = e.replace(
|
|
90
|
-
var i =
|
|
91
|
-
return i ||
|
|
89
|
+
e = e.replace(ui, "");
|
|
90
|
+
var i = mi.test(e);
|
|
91
|
+
return i || fi.test(e) ? vi(e.slice(2), i ? 2 : 8) : pi.test(e) ? me : +e;
|
|
92
92
|
}
|
|
93
|
-
var
|
|
94
|
-
const
|
|
93
|
+
var Li = Ei;
|
|
94
|
+
const ve = /* @__PURE__ */ hi(Li), X = {
|
|
95
95
|
SPIN_X: "spin-x",
|
|
96
96
|
SPIN_Y: "spin-y",
|
|
97
97
|
SPIN_XY: "spin-xy",
|
|
98
98
|
SPIN_YX: "spin-yx"
|
|
99
|
-
},
|
|
99
|
+
}, Ti = [!1, 0, null, void 0, "false", "0", "null", "undefined"], Y = {
|
|
100
100
|
X: "x-axis",
|
|
101
101
|
Y: "y-axis"
|
|
102
|
-
},
|
|
102
|
+
}, ki = [37, 39], Mi = [38, 40], Pi = typeof navigator < "u" && /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent), ge = Pi ? 32 : 10, Yi = 150, Zt = 800, Ri = 150, Xi = 200, ye = 50, Hi = 50, Zi = 5, be = 5, d = {
|
|
103
103
|
folder: "/",
|
|
104
104
|
apiVersion: "v7",
|
|
105
105
|
filenameX: "image-{index}.jpg",
|
|
@@ -155,7 +155,7 @@ const me = /* @__PURE__ */ ai(Ei), X = {
|
|
|
155
155
|
onZoomOut: null,
|
|
156
156
|
onDragStart: null,
|
|
157
157
|
onDragEnd: null
|
|
158
|
-
},
|
|
158
|
+
}, Di = (e) => ({
|
|
159
159
|
folder: L(e, "folder", d.folder),
|
|
160
160
|
apiVersion: L(e, "api-version", d.apiVersion),
|
|
161
161
|
filenameX: L(e, "filename") || L(e, "filename-x") || d.filenameX,
|
|
@@ -190,25 +190,25 @@ const me = /* @__PURE__ */ ai(Ei), X = {
|
|
|
190
190
|
dragReverse: P(e, "drag-reverse", d.dragReverse),
|
|
191
191
|
stopAtEdges: P(e, "stop-at-edges", d.stopAtEdges),
|
|
192
192
|
imageInfo: P(e, "info", d.imageInfo),
|
|
193
|
-
initialIconShown: !
|
|
194
|
-
bottomCircle: !
|
|
193
|
+
initialIconShown: !Dt(e, "initial-icon"),
|
|
194
|
+
bottomCircle: !Dt(e, "bottom-circle"),
|
|
195
195
|
hide360Logo: P(e, "hide-360-logo", d.hide360Logo),
|
|
196
196
|
logoSrc: L(e, "logo-src", d.logoSrc),
|
|
197
197
|
inertia: P(e, "inertia", d.inertia),
|
|
198
198
|
pinchZoom: P(e, "pinch-zoom", d.pinchZoom),
|
|
199
|
-
hints: !
|
|
199
|
+
hints: !Dt(e, "hints"),
|
|
200
200
|
theme: L(e, "theme", d.theme),
|
|
201
201
|
hotspotTrigger: L(e, "hotspot-trigger", d.hotspotTrigger),
|
|
202
|
-
hotspotTimelineOnClick: !
|
|
202
|
+
hotspotTimelineOnClick: !Dt(e, "hotspot-timeline-on-click"),
|
|
203
203
|
aspectRatio: L(e, "aspect-ratio", d.aspectRatio)
|
|
204
|
-
}),
|
|
204
|
+
}), Bi = (e) => {
|
|
205
205
|
const t = [];
|
|
206
206
|
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)");
|
|
207
207
|
const i = ["spin-x", "spin-y", "spin-xy", "spin-yx"];
|
|
208
208
|
return e.autoplayBehavior && !i.includes(e.autoplayBehavior) && t.push(`autoplayBehavior should be one of: ${i.join(", ")}`), t.forEach((s) => {
|
|
209
209
|
console.warn(`CloudImage 360: ${s}`);
|
|
210
210
|
}), t.length === 0;
|
|
211
|
-
},
|
|
211
|
+
}, Wi = (e) => (Bi(e), {
|
|
212
212
|
folder: e.folder || d.folder,
|
|
213
213
|
apiVersion: e.apiVersion || d.apiVersion,
|
|
214
214
|
filenameX: e.filenameX || e.filename || d.filenameX,
|
|
@@ -268,28 +268,28 @@ const me = /* @__PURE__ */ ai(Ei), X = {
|
|
|
268
268
|
if (!(e.hasAttribute(t) || e.hasAttribute(`data-${t}`))) return i;
|
|
269
269
|
const o = L(e, t, null);
|
|
270
270
|
return o !== "false" && o !== "0";
|
|
271
|
-
},
|
|
271
|
+
}, Dt = (e, t) => L(e, t, null) === "false", Fi = (e = 1) => {
|
|
272
272
|
const t = Math.round(window.devicePixelRatio || 1);
|
|
273
273
|
return parseInt(e) * t;
|
|
274
|
-
},
|
|
274
|
+
}, Vi = (e, t, i) => new URL(e).origin.includes("cloudimg") ? e : `https://${t}.cloudimg.io/${i}${e}`, Ni = ({ ciTransformation: e, responsiveWidth: t, ciFilters: i }) => {
|
|
275
275
|
const s = `width=${t}`, o = e || s, n = i ? `&f=${i}` : "";
|
|
276
276
|
return `${o}${n}`;
|
|
277
|
-
},
|
|
278
|
-
const { folder: i, apiVersion: s, filename: o = "", ciParams: n } = e, { ciToken:
|
|
279
|
-
if (!
|
|
280
|
-
const h =
|
|
281
|
-
ciTransformation:
|
|
277
|
+
}, Ot = (e, t) => {
|
|
278
|
+
const { folder: i, apiVersion: s, filename: o = "", ciParams: n } = e, { ciToken: a, ciFilters: r, ciTransformation: l } = n || {}, c = `${i}${o}`;
|
|
279
|
+
if (!a || !t) return c;
|
|
280
|
+
const h = Ti.includes(s) ? null : s, u = h ? `${h}/` : "", f = Fi(t), p = Vi(c, a, u), I = Ni({
|
|
281
|
+
ciTransformation: l,
|
|
282
282
|
responsiveWidth: f,
|
|
283
283
|
ciFilters: r
|
|
284
284
|
});
|
|
285
285
|
return `${p}${I ? "?" : ""}${I}`;
|
|
286
|
-
},
|
|
286
|
+
}, zi = (e, t, i) => {
|
|
287
287
|
const [s, o] = e.split("?"), n = `${t}=${encodeURIComponent(i)}`;
|
|
288
288
|
if (!o)
|
|
289
289
|
return `${s}?${n}`;
|
|
290
|
-
const
|
|
291
|
-
return
|
|
292
|
-
},
|
|
290
|
+
const a = new URLSearchParams(o);
|
|
291
|
+
return a.set(t, i), `${s}?${a.toString()}`;
|
|
292
|
+
}, $i = (e, t) => zi(e, "width", t), Ge = (e, t = 0) => (e += "", e.length >= t ? e : new Array(t - e.length + 1).join("0") + e), ji = (e, { amount: t = 0, indexZeroBase: i = 0 } = {}) => Array.from({ length: t }, (s, o) => e.replace("{index}", Ge(o + 1, i))), Gi = typeof navigator < "u" && /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent), _i = Gi ? 3 : 6, Ui = ({
|
|
293
293
|
imagesUrls: e,
|
|
294
294
|
onFirstImageLoad: t,
|
|
295
295
|
onImageLoad: i,
|
|
@@ -297,8 +297,8 @@ const me = /* @__PURE__ */ ai(Ei), X = {
|
|
|
297
297
|
onError: o,
|
|
298
298
|
autoplayReverse: n
|
|
299
299
|
}) => {
|
|
300
|
-
let
|
|
301
|
-
const
|
|
300
|
+
let a = 0, r = 0;
|
|
301
|
+
const l = e.length, c = [], h = [];
|
|
302
302
|
let u = 0, f = 0;
|
|
303
303
|
const p = [], I = (m, g, C = !1) => {
|
|
304
304
|
const A = {
|
|
@@ -310,13 +310,13 @@ const me = /* @__PURE__ */ ai(Ei), X = {
|
|
|
310
310
|
h.push(A), r++, o == null || o({
|
|
311
311
|
error: A,
|
|
312
312
|
errorCount: r,
|
|
313
|
-
totalImages:
|
|
313
|
+
totalImages: l,
|
|
314
314
|
errors: h
|
|
315
315
|
});
|
|
316
316
|
}, b = () => {
|
|
317
|
-
|
|
317
|
+
a === l && (s == null || s(c, { errorCount: r, errors: h }));
|
|
318
318
|
}, v = () => {
|
|
319
|
-
for (; u <
|
|
319
|
+
for (; u < _i && f < p.length; ) {
|
|
320
320
|
const m = p[f];
|
|
321
321
|
f++, O(e[m], m);
|
|
322
322
|
}
|
|
@@ -331,12 +331,12 @@ const me = /* @__PURE__ */ ai(Ei), X = {
|
|
|
331
331
|
naturalWidth: C.naturalWidth,
|
|
332
332
|
naturalHeight: C.naturalHeight
|
|
333
333
|
};
|
|
334
|
-
C.onload = null, C.onerror = null, C.src = "",
|
|
334
|
+
C.onload = null, C.onerror = null, C.src = "", a++, u--, c[g] = S, i == null || i(S, g), b(), v();
|
|
335
335
|
} catch {
|
|
336
|
-
C.onload = null, C.onerror = null, C.src = "",
|
|
336
|
+
C.onload = null, C.onerror = null, C.src = "", a++, u--, I(m, g), b(), v();
|
|
337
337
|
}
|
|
338
338
|
}, C.onerror = () => {
|
|
339
|
-
C.onload = null, C.onerror = null, C.src = "",
|
|
339
|
+
C.onload = null, C.onerror = null, C.src = "", a++, u--, I(m, g), b(), v();
|
|
340
340
|
};
|
|
341
341
|
}, E = (m) => {
|
|
342
342
|
for (let g = 0; g < e.length; g++)
|
|
@@ -351,35 +351,35 @@ const me = /* @__PURE__ */ ai(Ei), X = {
|
|
|
351
351
|
naturalWidth: w.naturalWidth,
|
|
352
352
|
naturalHeight: w.naturalHeight
|
|
353
353
|
};
|
|
354
|
-
w.onload = null, w.onerror = null, w.src = "", c[y] = g,
|
|
354
|
+
w.onload = null, w.onerror = null, w.src = "", c[y] = g, a++, t == null || t(g), i == null || i(g, y), l === 1 ? b() : E(y);
|
|
355
355
|
} catch {
|
|
356
|
-
w.onload = null, w.onerror = null, w.src = "",
|
|
356
|
+
w.onload = null, w.onerror = null, w.src = "", a++, I(x, y, !0), l === 1 ? b() : E(y);
|
|
357
357
|
}
|
|
358
358
|
}, w.onerror = () => {
|
|
359
|
-
w.onload = null, w.onerror = null, w.src = "",
|
|
359
|
+
w.onload = null, w.onerror = null, w.src = "", a++, I(x, y, !0), l === 1 ? b() : E(y);
|
|
360
360
|
};
|
|
361
|
-
},
|
|
361
|
+
}, we = ({
|
|
362
362
|
cdnPathX: e,
|
|
363
363
|
cdnPathY: t,
|
|
364
364
|
configX: i,
|
|
365
365
|
configY: s,
|
|
366
366
|
onFirstImageLoad: o,
|
|
367
367
|
onImageLoad: n,
|
|
368
|
-
onAllImagesLoad:
|
|
368
|
+
onAllImagesLoad: a,
|
|
369
369
|
onError: r
|
|
370
370
|
}) => {
|
|
371
|
-
let
|
|
371
|
+
let l = { x: !1, y: !1 }, c = [], h = [], u = { errorCount: 0, errors: [] }, f = { errorCount: 0, errors: [] };
|
|
372
372
|
const p = e || i.imageList.length, I = t || s.imageList.length, b = () => {
|
|
373
|
-
if (
|
|
373
|
+
if (l.x && l.y) {
|
|
374
374
|
const O = {
|
|
375
375
|
errorCount: u.errorCount + f.errorCount,
|
|
376
376
|
errors: [...u.errors, ...f.errors]
|
|
377
377
|
};
|
|
378
|
-
|
|
378
|
+
a == null || a(c, h, O);
|
|
379
379
|
}
|
|
380
380
|
}, v = ({ cdnPath: O, config: E, orientation: w, loadedImages: y, loadStats: x, onFirstImageLoad: m }) => {
|
|
381
|
-
const g = w === Y.X, C = E.imageList.length ? E.imageList :
|
|
382
|
-
|
|
381
|
+
const g = w === Y.X, C = E.imageList.length ? E.imageList : ji(O, E);
|
|
382
|
+
Ui({
|
|
383
383
|
imagesUrls: C,
|
|
384
384
|
onFirstImageLoad: m,
|
|
385
385
|
onImageLoad: (A, S) => {
|
|
@@ -389,9 +389,9 @@ const me = /* @__PURE__ */ ai(Ei), X = {
|
|
|
389
389
|
r == null || r({ ...A, orientation: w });
|
|
390
390
|
},
|
|
391
391
|
onAllImagesLoad: (A, S) => {
|
|
392
|
-
y.length = 0, A.forEach((
|
|
393
|
-
|
|
394
|
-
}), x.errorCount = S.errorCount, x.errors = S.errors.map((
|
|
392
|
+
y.length = 0, A.forEach((T, R) => {
|
|
393
|
+
T && (y[R] = T);
|
|
394
|
+
}), x.errorCount = S.errorCount, x.errors = S.errors.map((T) => ({ ...T, orientation: w })), l[g ? "x" : "y"] = !0, b();
|
|
395
395
|
},
|
|
396
396
|
autoplayReverse: E.autoplayReverse
|
|
397
397
|
});
|
|
@@ -403,15 +403,15 @@ const me = /* @__PURE__ */ ai(Ei), X = {
|
|
|
403
403
|
loadedImages: c,
|
|
404
404
|
loadStats: u,
|
|
405
405
|
onFirstImageLoad: o
|
|
406
|
-
}) :
|
|
406
|
+
}) : l.x = !0, I ? v({
|
|
407
407
|
cdnPath: t,
|
|
408
408
|
config: s,
|
|
409
409
|
orientation: Y.Y,
|
|
410
410
|
loadedImages: h,
|
|
411
411
|
loadStats: f,
|
|
412
412
|
onFirstImageLoad: p ? void 0 : o
|
|
413
|
-
}) :
|
|
414
|
-
},
|
|
413
|
+
}) : l.y = !0, !p && !I && b();
|
|
414
|
+
}, Ki = `
|
|
415
415
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1052 156" aria-hidden="true">
|
|
416
416
|
<path fill="currentColor" d="M409.9,145.6c-42.7-1.7-85.5-4.4-128.1-8.4c-21.3-2-42.6-4.3-63.8-7.1c-21.2-2.8-42.4-5.9-63.4-9.7c-21.1-3.8-42-8.2-62.7-13.7c-10.3-2.8-20.6-5.8-30.7-9.4c-10.1-3.5-20.1-7.6-29.5-12.7c-4.7-2.6-9.3-5.4-13.5-8.8c-2.1-1.7-4-3.6-5.8-5.6c-1.8-2-3.3-4.3-4.3-6.8c-1.1-2.5-1.6-5.3-1.4-8c0.2-2.7,1.1-5.4,2.4-7.7c2.7-4.8,6.7-8.5,11-11.7c8.6-6.4,18.4-10.9,28.3-15c9.9-4,20.1-7.3,30.4-10.3c-10.2,3.1-20.4,6.5-30.3,10.5c-9.8,4.1-19.6,8.7-28.1,15.1c-4.2,3.2-8.2,6.9-10.7,11.6c-1.2,2.3-2.1,4.8-2.3,7.5c-0.1,2.6,0.4,5.2,1.4,7.6c2.1,4.8,5.9,8.7,10,12.1c4.1,3.3,8.7,6.1,13.4,8.6c9.4,5,19.4,8.9,29.4,12.4c10.1,3.5,20.4,6.4,30.7,9.1c20.7,5.3,41.6,9.5,62.7,13.2c21,3.6,42.2,6.6,63.4,9.2c21.2,2.6,42.5,4.8,63.7,6.6c42.6,3.7,85.2,6,127.9,7.4L409.9,145.6z"/>
|
|
417
417
|
<path fill="currentColor" d="M977.1,11.6c13.8,4.1,27.4,8.8,40.4,15.2c6.4,3.2,12.7,6.9,18.3,11.5c2.7,2.4,5.3,5,7.3,8c2,3,3.3,6.6,3.3,10.3c0,3.7-1.4,7.2-3.3,10.3c-2,3.1-4.5,5.7-7.3,8.1c-2.7,2.4-5.7,4.4-8.8,6.3c-1.6,0.9-3.1,1.9-4.7,2.7l-2.4,1.3l-2.4,1.2C1004.5,93,990.8,97.8,977,102c-6.9,2.1-13.8,4-20.8,5.8c-7,1.8-14,3.5-21,5c-14.1,3.1-28.2,5.9-42.4,8.3c-28.4,4.9-57,8.8-85.6,12c-57.3,6.4-114.8,10.2-172.4,12.2c-57.6,2-115.2,2.3-172.9,0.8l0.1-4c57.5,1.8,115.1,1.9,172.6,0.2c57.5-1.7,115-5.2,172.3-11.2c28.6-3.1,57.2-6.7,85.6-11.5c14.2-2.4,28.3-5,42.4-8.1c7-1.5,14-3.1,21-4.9c7-1.7,13.9-3.6,20.8-5.7c13.8-4.1,27.4-8.8,40.3-15.2l2.4-1.2l2.4-1.3c1.6-0.8,3.1-1.8,4.7-2.7c3-1.9,6-3.9,8.7-6.2c2.7-2.3,5.2-4.9,7.2-7.9c1.9-3,3.2-6.4,3.3-10c0-3.6-1.2-7-3.1-10c-1.9-3-4.4-5.6-7.1-8c-5.5-4.7-11.7-8.3-18.1-11.6C1004.5,20.6,990.8,15.8,977.1,11.6z"/>
|
|
@@ -422,10 +422,10 @@ const me = /* @__PURE__ */ ai(Ei), X = {
|
|
|
422
422
|
<path fill="currentColor" d="M10.9,9.7c0-1.1-0.8-2-2.5-2.5c1.3-0.5,1.9-1.3,1.9-2.3c0-1.7-1.7-2.8-4.6-2.8c-1.5,0-2.7,0.3-3.6,0.8v1.7c0.9-0.4,2.3-0.7,3.4-0.7C7,3.9,8,4.4,8,5.1c0,0.8-0.7,1.3-2.4,1.3H4.3v1.6h1.3c2,0,2.9,0.8,2.9,1.6c0,0.8-1,1.5-2.8,1.5c-1.5,0-2.8-0.3-3.7-0.6v1.7c0.9,0.3,2.1,0.6,3.8,0.6C9.2,12.8,10.9,11.4,10.9,9.7"/>
|
|
423
423
|
</g>
|
|
424
424
|
</svg>
|
|
425
|
-
`,
|
|
425
|
+
`, qi = (e) => {
|
|
426
426
|
const t = document.createElement("div");
|
|
427
|
-
return t.innerHTML =
|
|
428
|
-
},
|
|
427
|
+
return t.innerHTML = Ki, t.style.bottom = `${e}%`, t.className = "cloudimage-360-view-360-circle", t;
|
|
428
|
+
}, Ji = `
|
|
429
429
|
<svg width="150" height="87" viewBox="0 0 150 87" xmlns="http://www.w3.org/2000/svg">
|
|
430
430
|
<g clip-path="url(#clip0_751_188)">
|
|
431
431
|
<g filter="url(#filter0_d_751_188)">
|
|
@@ -466,67 +466,67 @@ const me = /* @__PURE__ */ ai(Ei), X = {
|
|
|
466
466
|
</clipPath>
|
|
467
467
|
</defs>
|
|
468
468
|
</svg>
|
|
469
|
-
`,
|
|
469
|
+
`, Qi = (e) => {
|
|
470
470
|
const t = document.createElement("div");
|
|
471
|
-
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 =
|
|
472
|
-
},
|
|
471
|
+
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 = Ji, t;
|
|
472
|
+
}, ts = (e, t) => {
|
|
473
473
|
const { width: i, height: s } = t, o = document.createElement("canvas");
|
|
474
474
|
return o.width = i, o.height = s, o.style.width = "100%", o.style.height = "auto", e.appendChild(o), o;
|
|
475
|
-
},
|
|
475
|
+
}, es = () => {
|
|
476
476
|
const e = document.createElement("button");
|
|
477
477
|
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;
|
|
478
|
-
},
|
|
478
|
+
}, is = () => {
|
|
479
479
|
const e = document.createElement("button");
|
|
480
480
|
return e.className = "cloudimage-360-button cloudimage-360-fullscreen-button", e.setAttribute("aria-label", "View 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"><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>', e;
|
|
481
|
-
},
|
|
481
|
+
}, Ie = (e) => {
|
|
482
482
|
const t = document.createElement("div");
|
|
483
483
|
return t.className = "cloudimage-360-icons-container", e.appendChild(t), t;
|
|
484
|
-
},
|
|
484
|
+
}, ss = (e) => {
|
|
485
485
|
const t = document.createElement("div");
|
|
486
486
|
return t.className = "cloudimage-360-inner-box", t.setAttribute("role", "img"), t.setAttribute("aria-label", "360 degree product view. Use mouse drag or arrow keys to rotate."), e.appendChild(t), t;
|
|
487
|
-
},
|
|
487
|
+
}, os = () => {
|
|
488
488
|
const e = document.createElement("button");
|
|
489
489
|
return e.className = "cloudimage-360-button cloudimage-360-magnifier-button", e.setAttribute("aria-label", "Magnify image"), 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"><circle cx="11" cy="11" r="8"/><path d="m21 21-4.3-4.3"/><path d="M11 8v6"/><path d="M8 11h6"/></svg>', e;
|
|
490
|
-
},
|
|
490
|
+
}, ns = () => {
|
|
491
491
|
const e = document.createElement("button");
|
|
492
492
|
return e.className = "cloudimage-360-button cloudimage-360-zoom-out-button", e.setAttribute("aria-label", "Zoom out"), 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"><circle cx="11" cy="11" r="8"/><path d="m21 21-4.3-4.3"/><path d="M8 11h6"/></svg>', e;
|
|
493
|
-
},
|
|
493
|
+
}, rs = (e) => {
|
|
494
494
|
const t = document.createElement("div");
|
|
495
495
|
t.className = "cloudimage-360-loader";
|
|
496
496
|
const i = document.createElement("span");
|
|
497
497
|
return i.className = "percentage", i.innerText = "0%", t.appendChild(i), e.appendChild(t), t;
|
|
498
|
-
},
|
|
498
|
+
}, as = (e) => {
|
|
499
499
|
const t = document.createElement("div");
|
|
500
500
|
t.className = "cloudimage-360-fullscreen-modal";
|
|
501
501
|
const i = e.cloneNode();
|
|
502
502
|
return i.style.width = "100%", i.style.maxWidth = "100%", i.style.height = "100vh", i.style.maxHeight = "100%", t.appendChild(i), window.document.body.appendChild(t), i;
|
|
503
|
-
},
|
|
503
|
+
}, te = (e, t) => {
|
|
504
504
|
const i = e.querySelector(t);
|
|
505
505
|
i && i.parentNode.removeChild(i);
|
|
506
|
-
},
|
|
506
|
+
}, ls = () => {
|
|
507
507
|
const e = document.createElement("div");
|
|
508
508
|
return e.className = "cloudimage-loading-spinner", e;
|
|
509
|
-
},
|
|
509
|
+
}, cs = () => {
|
|
510
510
|
const e = document.createElement("div");
|
|
511
511
|
return e.className = "cloudimage-360-transition-overlay", e;
|
|
512
|
-
},
|
|
512
|
+
}, hs = (e) => {
|
|
513
513
|
const t = document.createElement("div");
|
|
514
514
|
return t.className = "cloudimage-360-hotspot-container", e.appendChild(t), t;
|
|
515
|
-
},
|
|
515
|
+
}, ds = (e) => {
|
|
516
516
|
const t = document.createElement("div");
|
|
517
517
|
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;
|
|
518
|
-
},
|
|
518
|
+
}, us = (e, t) => {
|
|
519
519
|
e && (e.textContent = "", setTimeout(() => {
|
|
520
520
|
e.textContent = t;
|
|
521
521
|
}, 50));
|
|
522
|
-
},
|
|
522
|
+
}, _e = {
|
|
523
523
|
drag: '<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 11V6a2 2 0 0 0-2-2a2 2 0 0 0-2 2"/><path d="M14 10V4a2 2 0 0 0-2-2a2 2 0 0 0-2 2v2"/><path d="M10 10.5V6a2 2 0 0 0-2-2a2 2 0 0 0-2 2v8"/><path d="M18 8a2 2 0 1 1 4 0v6a8 8 0 0 1-8 8h-2c-2.8 0-4.5-.86-5.99-2.34l-3.6-3.6a2 2 0 0 1 2.83-2.82L7 15"/></svg>',
|
|
524
524
|
swipe: '<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 16 4-4-4-4"/><path d="m6 8-4 4 4 4"/><path d="M8 12h8"/></svg>',
|
|
525
525
|
click: '<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="m9 9 5 12 1.8-5.2L21 14Z"/><path d="M7.2 2.2 8 5.1"/><path d="m5.1 8-2.9-.8"/><path d="M14 4.1 12 6"/><path d="m6 12-1.9 2"/></svg>',
|
|
526
526
|
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>',
|
|
527
527
|
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>',
|
|
528
528
|
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>'
|
|
529
|
-
},
|
|
529
|
+
}, Ce = {
|
|
530
530
|
drag: "Drag to rotate",
|
|
531
531
|
swipe: "Swipe to rotate",
|
|
532
532
|
click: "Click to zoom",
|
|
@@ -534,88 +534,88 @@ const me = /* @__PURE__ */ ai(Ei), X = {
|
|
|
534
534
|
pinch: "Pinch to zoom",
|
|
535
535
|
keys: "Use arrow keys",
|
|
536
536
|
fullscreen: "Click for fullscreen"
|
|
537
|
-
},
|
|
537
|
+
}, ps = (e, t = {}) => {
|
|
538
538
|
const i = document.createElement("div");
|
|
539
539
|
i.className = "cloudimage-360-hint-item";
|
|
540
|
-
let s =
|
|
541
|
-
return e === "click" && t.pointerZoomTrigger === "dblclick" && (s =
|
|
542
|
-
${
|
|
540
|
+
let s = Ce[e];
|
|
541
|
+
return e === "click" && t.pointerZoomTrigger === "dblclick" && (s = Ce.dblclick), i.innerHTML = `
|
|
542
|
+
${_e[e]}
|
|
543
543
|
<span>${s}</span>
|
|
544
544
|
`, i;
|
|
545
|
-
},
|
|
545
|
+
}, xe = (e, t = [], i = {}) => {
|
|
546
546
|
if (!t || t.length === 0) return null;
|
|
547
547
|
const s = document.createElement("div");
|
|
548
548
|
s.className = "cloudimage-360-hints-overlay", s.setAttribute("role", "tooltip"), s.setAttribute("aria-label", "Interaction hints");
|
|
549
549
|
const o = document.createElement("div");
|
|
550
550
|
return o.className = "cloudimage-360-hints-container", t.forEach((n) => {
|
|
551
|
-
|
|
551
|
+
_e[n] && o.appendChild(ps(n, i));
|
|
552
552
|
}), s.appendChild(o), e.appendChild(s), s;
|
|
553
|
-
},
|
|
553
|
+
}, Oe = (e, t) => t ? ["swipe", "pinch"] : ["drag", "click"], Ee = (e) => {
|
|
554
554
|
e && e.classList.add("visible");
|
|
555
|
-
},
|
|
555
|
+
}, ms = (e) => {
|
|
556
556
|
e && (e.classList.remove("visible"), e.classList.add("hiding"), setTimeout(() => {
|
|
557
557
|
e.classList.remove("hiding");
|
|
558
558
|
}, 300));
|
|
559
|
-
},
|
|
559
|
+
}, fs = (e) => {
|
|
560
560
|
if (!e || typeof e != "object") return null;
|
|
561
561
|
const t = Object.keys(e).map((s) => parseInt(s, 10)).filter((s) => !isNaN(s)).sort((s, o) => s - o);
|
|
562
562
|
if (t.length === 0) return null;
|
|
563
563
|
const i = Math.floor(t.length / 2);
|
|
564
564
|
return t[i];
|
|
565
|
-
},
|
|
565
|
+
}, vs = (e) => {
|
|
566
566
|
const t = [];
|
|
567
567
|
return !e || !Array.isArray(e) || e.forEach((i, s) => {
|
|
568
|
-
const o =
|
|
568
|
+
const o = fs(i.positions);
|
|
569
569
|
o !== null && t.push({
|
|
570
570
|
id: i.id || `hotspot-${s}`,
|
|
571
571
|
frame: o,
|
|
572
572
|
label: i.label || null
|
|
573
573
|
});
|
|
574
574
|
}), t;
|
|
575
|
-
},
|
|
575
|
+
}, gs = 400, ys = (e, t, i, s) => {
|
|
576
576
|
const o = document.createElement("button");
|
|
577
577
|
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);
|
|
578
578
|
const n = i > 1 ? t / (i - 1) * 100 : 0;
|
|
579
579
|
if (o.style.left = `${n}%`, s) {
|
|
580
|
-
const
|
|
581
|
-
|
|
580
|
+
const a = document.createElement("span");
|
|
581
|
+
a.className = "cloudimage-360-hotspot-timeline-tooltip", a.textContent = s, o.appendChild(a);
|
|
582
582
|
let r = null;
|
|
583
583
|
o.addEventListener("mouseenter", () => {
|
|
584
584
|
r = setTimeout(() => {
|
|
585
|
-
|
|
586
|
-
},
|
|
585
|
+
a.classList.add("visible");
|
|
586
|
+
}, gs);
|
|
587
587
|
}), o.addEventListener("mouseleave", () => {
|
|
588
|
-
r && (clearTimeout(r), r = null),
|
|
588
|
+
r && (clearTimeout(r), r = null), a.classList.remove("visible");
|
|
589
589
|
}), o.addEventListener("click", () => {
|
|
590
|
-
r && (clearTimeout(r), r = null),
|
|
590
|
+
r && (clearTimeout(r), r = null), a.classList.remove("visible");
|
|
591
591
|
});
|
|
592
592
|
}
|
|
593
593
|
return o;
|
|
594
|
-
},
|
|
595
|
-
const s =
|
|
594
|
+
}, bs = (e, t, i) => {
|
|
595
|
+
const s = vs(i);
|
|
596
596
|
if (s.length === 0) return null;
|
|
597
597
|
const o = document.createElement("div");
|
|
598
598
|
o.className = "cloudimage-360-hotspot-timeline", o.setAttribute("role", "navigation"), o.setAttribute("aria-label", "Hotspot timeline navigation");
|
|
599
599
|
const n = document.createElement("div");
|
|
600
600
|
n.className = "cloudimage-360-hotspot-timeline-track";
|
|
601
|
-
const
|
|
602
|
-
return
|
|
603
|
-
const h =
|
|
601
|
+
const a = document.createElement("div");
|
|
602
|
+
return a.className = "cloudimage-360-hotspot-timeline-indicator", s.forEach(({ id: r, frame: l, label: c }) => {
|
|
603
|
+
const h = ys(r, l, t, c);
|
|
604
604
|
n.appendChild(h);
|
|
605
|
-
}), n.appendChild(
|
|
605
|
+
}), n.appendChild(a), o.appendChild(n), e.appendChild(o), {
|
|
606
606
|
element: o,
|
|
607
|
-
indicator:
|
|
607
|
+
indicator: a,
|
|
608
608
|
hotspotFrames: s
|
|
609
609
|
};
|
|
610
|
-
},
|
|
610
|
+
}, ws = (e, t, i) => {
|
|
611
611
|
if (!e) return;
|
|
612
612
|
const s = i > 1 ? t / (i - 1) * 100 : 0;
|
|
613
613
|
e.style.left = `${s}%`;
|
|
614
|
-
},
|
|
614
|
+
}, Is = (e) => {
|
|
615
615
|
e && e.classList.add("visible");
|
|
616
|
-
},
|
|
616
|
+
}, Cs = (e) => {
|
|
617
617
|
e && e.classList.remove("visible");
|
|
618
|
-
},
|
|
618
|
+
}, ee = (e, t = []) => {
|
|
619
619
|
if (!e) return t;
|
|
620
620
|
if (Array.isArray(e)) return e;
|
|
621
621
|
try {
|
|
@@ -623,15 +623,15 @@ const me = /* @__PURE__ */ ai(Ei), X = {
|
|
|
623
623
|
} catch (i) {
|
|
624
624
|
return console.warn("CloudImage 360: Failed to parse JSON:", i.message), t;
|
|
625
625
|
}
|
|
626
|
-
},
|
|
626
|
+
}, xs = (e, t) => {
|
|
627
627
|
const [i, s] = e.split("?");
|
|
628
628
|
if (!s) return e;
|
|
629
|
-
const o = new RegExp(`^${t}=|&${t}=`), n = s.split("&").filter((
|
|
629
|
+
const o = new RegExp(`^${t}=|&${t}=`), n = s.split("&").filter((a) => !o.test(a)).join("&");
|
|
630
630
|
return n ? `${i}?${n}` : i;
|
|
631
|
-
},
|
|
632
|
-
const t =
|
|
631
|
+
}, Os = (e) => {
|
|
632
|
+
const t = xs(e, "width"), i = t.includes("?") ? "&" : "?";
|
|
633
633
|
return `${t}${i}width=${150 * devicePixelRatio}`;
|
|
634
|
-
},
|
|
634
|
+
}, Es = (e) => {
|
|
635
635
|
const t = {
|
|
636
636
|
root: null,
|
|
637
637
|
rootMargin: "0px",
|
|
@@ -641,29 +641,29 @@ const me = /* @__PURE__ */ ai(Ei), X = {
|
|
|
641
641
|
n && (o.src = n);
|
|
642
642
|
};
|
|
643
643
|
new IntersectionObserver((o, n) => {
|
|
644
|
-
o.forEach((
|
|
645
|
-
|
|
644
|
+
o.forEach((a) => {
|
|
645
|
+
a.isIntersecting && (i(a.target), n.unobserve(a.target));
|
|
646
646
|
});
|
|
647
647
|
}, t).observe(e);
|
|
648
|
-
},
|
|
649
|
-
const i =
|
|
648
|
+
}, As = (e, t) => {
|
|
649
|
+
const i = Ge(1, t);
|
|
650
650
|
return e.replace("{index}", i);
|
|
651
|
-
},
|
|
651
|
+
}, Ss = (e, t) => {
|
|
652
652
|
const [i] = e, s = /(https?):\/\//i.test(i);
|
|
653
|
-
return
|
|
653
|
+
return Ot({
|
|
654
654
|
...t,
|
|
655
655
|
folder: s ? "" : t.folder,
|
|
656
656
|
filename: i
|
|
657
657
|
});
|
|
658
|
-
},
|
|
658
|
+
}, Ls = (e, t) => {
|
|
659
659
|
const { imageList: i, indexZeroBase: s } = t;
|
|
660
660
|
if (i.length) {
|
|
661
|
-
const o =
|
|
661
|
+
const o = ee(i, null);
|
|
662
662
|
if (o)
|
|
663
|
-
return
|
|
663
|
+
return Ss(o, t);
|
|
664
664
|
}
|
|
665
|
-
return
|
|
666
|
-
},
|
|
665
|
+
return As(e, s);
|
|
666
|
+
}, Ae = (e, t, i) => {
|
|
667
667
|
const s = new Image();
|
|
668
668
|
return s.setAttribute(t ? "data-src" : "src", e), s.className = i, s.style.cssText = `
|
|
669
669
|
position: ${t ? "absolute" : "static"};
|
|
@@ -674,19 +674,19 @@ const me = /* @__PURE__ */ ai(Ei), X = {
|
|
|
674
674
|
object-position: center;
|
|
675
675
|
filter: blur(10px);
|
|
676
676
|
`, s;
|
|
677
|
-
},
|
|
678
|
-
const { innerBox: s, imageList: o, lazyload: n } = t || {}, [
|
|
679
|
-
|
|
677
|
+
}, Se = (e, t, i) => {
|
|
678
|
+
const { innerBox: s, imageList: o, lazyload: n } = t || {}, [a] = o, r = a || Ls(e, t), l = Os(r), c = Ae(l, n, "cloudimage-lazy"), h = Ae(l, !1, "cloudimage-360-placeholder"), u = (f) => {
|
|
679
|
+
te(s, ".cloudimage-lazy"), i && i({
|
|
680
680
|
event: f,
|
|
681
681
|
width: c.width,
|
|
682
682
|
height: c.height,
|
|
683
683
|
naturalWidth: c.naturalWidth,
|
|
684
684
|
naturalHeight: c.naturalHeight,
|
|
685
|
-
src:
|
|
685
|
+
src: l
|
|
686
686
|
});
|
|
687
687
|
};
|
|
688
|
-
c.onload = u, s.appendChild(c), s.appendChild(h),
|
|
689
|
-
},
|
|
688
|
+
c.onload = u, s.appendChild(c), s.appendChild(h), Es(c);
|
|
689
|
+
}, Ts = (e, t, i) => {
|
|
690
690
|
const s = new Image();
|
|
691
691
|
s.src = e, s.onload = (o) => {
|
|
692
692
|
t && t({
|
|
@@ -701,29 +701,29 @@ const me = /* @__PURE__ */ ai(Ei), X = {
|
|
|
701
701
|
const n = new Error(`Failed to load image: ${e}`);
|
|
702
702
|
n.url = e, n.event = o, i ? i(n) : console.error(n.message);
|
|
703
703
|
};
|
|
704
|
-
},
|
|
704
|
+
}, ks = (e, t) => {
|
|
705
705
|
const i = t.getBoundingClientRect(), s = e.touches ? e.touches[0].clientX : e.clientX, o = e.touches ? e.touches[0].clientY : e.clientY;
|
|
706
706
|
return {
|
|
707
707
|
x: s - i.left,
|
|
708
708
|
y: o - i.top
|
|
709
709
|
};
|
|
710
710
|
}, Jt = (e, t, i) => {
|
|
711
|
-
const { container: s, w: o, h: n, zoom:
|
|
711
|
+
const { container: s, w: o, h: n, zoom: a, bw: r, offsetX: l, offsetY: c } = t, h = ks(e, s);
|
|
712
712
|
let u = h.x, f = h.y;
|
|
713
|
-
u = Math.max(o /
|
|
714
|
-
const p = (u -
|
|
713
|
+
u = Math.max(o / a, Math.min(u, s.offsetWidth - o / a)), f = Math.max(n / a, Math.min(f, s.offsetHeight - n / a)), i.style.left = `${u - o}px`, i.style.top = `${f - n}px`;
|
|
714
|
+
const p = (u - l) * a - o + r, I = (f - c) * a - n + r;
|
|
715
715
|
i.style.backgroundPosition = `-${p}px -${I}px`;
|
|
716
|
-
},
|
|
717
|
-
const { x:
|
|
716
|
+
}, Ms = (e, t, i, s, o, n) => {
|
|
717
|
+
const { x: a = 0, y: r = 0 } = i || {}, l = (t.offsetWidth - a * 2) * n, c = (t.offsetHeight - r * 2) * n;
|
|
718
718
|
if (!o) return;
|
|
719
|
-
o.setAttribute("class", "cloudimage-360-img-magnifier-glass"), t.prepend(o), o.style.backgroundImage = `url('${s.src}')`, o.style.backgroundSize = `${
|
|
719
|
+
o.setAttribute("class", "cloudimage-360-img-magnifier-glass"), t.prepend(o), o.style.backgroundImage = `url('${s.src}')`, o.style.backgroundSize = `${l}px ${c}px`;
|
|
720
720
|
const h = 3, u = o.offsetWidth / 2, f = o.offsetHeight / 2, p = {
|
|
721
721
|
container: t,
|
|
722
722
|
w: u,
|
|
723
723
|
h: f,
|
|
724
724
|
zoom: n,
|
|
725
725
|
bw: h,
|
|
726
|
-
offsetX:
|
|
726
|
+
offsetX: a,
|
|
727
727
|
offsetY: r
|
|
728
728
|
};
|
|
729
729
|
Jt(e, p, o);
|
|
@@ -733,43 +733,43 @@ const me = /* @__PURE__ */ ai(Ei), X = {
|
|
|
733
733
|
v.preventDefault(), Jt(v, p, o);
|
|
734
734
|
};
|
|
735
735
|
o.addEventListener("mousemove", I), t.addEventListener("mousemove", I), t.addEventListener("touchmove", b);
|
|
736
|
-
},
|
|
737
|
-
const { clientX: s, clientY: o } = e, n = t.getBoundingClientRect(),
|
|
738
|
-
return { offsetX:
|
|
739
|
-
},
|
|
736
|
+
}, Ps = (e, t, i) => {
|
|
737
|
+
const { clientX: s, clientY: o } = e, n = t.getBoundingClientRect(), a = t.width / (n.width * i), r = t.height / (n.height * i), l = (s - n.left) * a, c = (o - n.top) * r;
|
|
738
|
+
return { offsetX: l, offsetY: c };
|
|
739
|
+
}, Ys = (e, t, i) => {
|
|
740
740
|
const s = e / i, o = t / i;
|
|
741
741
|
return { zoomedWidth: s, zoomedHeight: o };
|
|
742
|
-
},
|
|
742
|
+
}, Rs = ({
|
|
743
743
|
pointerX: e,
|
|
744
744
|
pointerY: t,
|
|
745
745
|
imageData: i,
|
|
746
746
|
zoomedWidth: s,
|
|
747
747
|
zoomedHeight: o,
|
|
748
748
|
drawWidth: n,
|
|
749
|
-
drawHeight:
|
|
749
|
+
drawHeight: a
|
|
750
750
|
}) => {
|
|
751
|
-
const { naturalWidth: r, naturalHeight:
|
|
752
|
-
let c = e / n * r - s / 2, h = t /
|
|
753
|
-
const u = Math.max(0, r - s), f = Math.max(0,
|
|
751
|
+
const { naturalWidth: r, naturalHeight: l } = i;
|
|
752
|
+
let c = e / n * r - s / 2, h = t / a * l - o / 2;
|
|
753
|
+
const u = Math.max(0, r - s), f = Math.max(0, l - o);
|
|
754
754
|
return c = Math.max(0, Math.min(c, u)), h = Math.max(0, Math.min(h, f)), { zoomOffsetX: c, zoomOffsetY: h };
|
|
755
|
-
},
|
|
755
|
+
}, Le = (e, { bottom: t, top: i }) => {
|
|
756
756
|
e ? t() : i();
|
|
757
|
-
},
|
|
757
|
+
}, Te = (e, { left: t, right: i }) => {
|
|
758
758
|
e ? t() : i();
|
|
759
|
-
},
|
|
759
|
+
}, Xs = ({ autoplayBehavior: e, spinY: t, reversed: i, loopTriggers: s }) => {
|
|
760
760
|
switch (e) {
|
|
761
761
|
case X.SPIN_XY:
|
|
762
762
|
case X.SPIN_YX:
|
|
763
|
-
t ?
|
|
763
|
+
t ? Le(i, s) : Te(i, s);
|
|
764
764
|
break;
|
|
765
765
|
case X.SPIN_Y:
|
|
766
|
-
|
|
766
|
+
Le(i, s);
|
|
767
767
|
break;
|
|
768
768
|
case X.SPIN_X:
|
|
769
769
|
default:
|
|
770
|
-
|
|
770
|
+
Te(i, s);
|
|
771
771
|
}
|
|
772
|
-
},
|
|
772
|
+
}, Hs = ({
|
|
773
773
|
autoplayBehavior: e,
|
|
774
774
|
activeImageX: t,
|
|
775
775
|
activeImageY: i,
|
|
@@ -777,31 +777,31 @@ const me = /* @__PURE__ */ ai(Ei), X = {
|
|
|
777
777
|
amountY: o,
|
|
778
778
|
autoplayReverse: n
|
|
779
779
|
}) => {
|
|
780
|
-
const
|
|
781
|
-
const c =
|
|
780
|
+
const a = (r, l) => {
|
|
781
|
+
const c = l - 1;
|
|
782
782
|
return n ? r === 0 : r === c;
|
|
783
783
|
};
|
|
784
784
|
switch (e) {
|
|
785
785
|
case X.SPIN_XY:
|
|
786
786
|
case X.SPIN_Y:
|
|
787
|
-
return
|
|
787
|
+
return a(i, o);
|
|
788
788
|
case X.SPIN_X:
|
|
789
789
|
case X.SPIN_YX:
|
|
790
790
|
default:
|
|
791
|
-
return
|
|
791
|
+
return a(t, s);
|
|
792
792
|
}
|
|
793
|
-
},
|
|
793
|
+
}, Zs = ({
|
|
794
794
|
autoplayBehavior: e,
|
|
795
795
|
activeImageX: t,
|
|
796
796
|
activeImageY: i,
|
|
797
797
|
amountX: s,
|
|
798
798
|
amountY: o,
|
|
799
799
|
autoplayReverse: n,
|
|
800
|
-
spinDirection:
|
|
800
|
+
spinDirection: a
|
|
801
801
|
}) => {
|
|
802
|
-
const r = t === (n ? 0 : s - 1),
|
|
803
|
-
return e === X.SPIN_XY || e === X.SPIN_YX ?
|
|
804
|
-
},
|
|
802
|
+
const r = t === (n ? 0 : s - 1), l = i === (n ? 0 : o - 1);
|
|
803
|
+
return e === X.SPIN_XY || e === X.SPIN_YX ? a === "x" && r || a === "y" && l : !1;
|
|
804
|
+
}, Ds = (e, t, i) => {
|
|
805
805
|
if (!i) return "x";
|
|
806
806
|
if (!t) return "y";
|
|
807
807
|
switch (e) {
|
|
@@ -815,24 +815,24 @@ const me = /* @__PURE__ */ ai(Ei), X = {
|
|
|
815
815
|
default:
|
|
816
816
|
return "x";
|
|
817
817
|
}
|
|
818
|
-
},
|
|
819
|
-
const i = [...
|
|
820
|
-
return t ? [...i, ...
|
|
821
|
-
},
|
|
822
|
-
const
|
|
823
|
-
return s && r -
|
|
824
|
-
},
|
|
818
|
+
}, Bs = (e) => e === "x" ? "y" : "x", ke = (e, t) => {
|
|
819
|
+
const i = [...ki];
|
|
820
|
+
return t ? [...i, ...Mi].includes(e) : i.includes(e);
|
|
821
|
+
}, Me = ({ deltaX: e, deltaY: t, reversed: i, allowSpinX: s, allowSpinY: o, threshold: n = 0 }) => {
|
|
822
|
+
const a = s && !o || o && !s ? 0 : n, r = Math.abs(e), l = Math.abs(t);
|
|
823
|
+
return s && r - a > l ? i ? e > 0 ? "left" : "right" : e > 0 ? "right" : "left" : o && l - a > r ? i ? t > 0 ? "up" : "down" : t > 0 ? "down" : "up" : null;
|
|
824
|
+
}, Ws = () => "ontouchstart" in window || navigator.maxTouchPoints > 0 || navigator.msMaxTouchPoints > 0, Fs = (e, t = 150) => {
|
|
825
825
|
let i;
|
|
826
826
|
return function(...s) {
|
|
827
827
|
clearTimeout(i), i = setTimeout(() => {
|
|
828
828
|
e.apply(this, s);
|
|
829
829
|
}, t);
|
|
830
830
|
};
|
|
831
|
-
},
|
|
832
|
-
function
|
|
831
|
+
}, Ue = "KGZ1bmN0aW9uKCl7InVzZSBzdHJpY3QiO2NvbnN0IHY9KHQsYSxlKT0+e2NvbnN0IHM9dC9lLG49YS9lO3JldHVybnt6b29tZWRXaWR0aDpzLHpvb21lZEhlaWdodDpufX0sej0oe3BvaW50ZXJYOnQscG9pbnRlclk6YSxpbWFnZURhdGE6ZSx6b29tZWRXaWR0aDpzLHpvb21lZEhlaWdodDpuLGRyYXdXaWR0aDppLGRyYXdIZWlnaHQ6Y30pPT57Y29uc3R7bmF0dXJhbFdpZHRoOmcsbmF0dXJhbEhlaWdodDp1fT1lO2xldCBmPXQvaSpnLXMvMixtPWEvYyp1LW4vMjtjb25zdCB4PU1hdGgubWF4KDAsZy1zKSxPPU1hdGgubWF4KDAsdS1uKTtyZXR1cm4gZj1NYXRoLm1heCgwLE1hdGgubWluKGYseCkpLG09TWF0aC5tYXgoMCxNYXRoLm1pbihtLE8pKSx7em9vbU9mZnNldFg6Zix6b29tT2Zmc2V0WTptfX07bGV0IG8saCxyLGQsbCx3O3NlbGYub25tZXNzYWdlPWFzeW5jIHQ9Pntjb25zdHthY3Rpb246YSxvZmZzY3JlZW46ZSxkZXZpY2VQaXhlbFJhdGlvOnMsaW1hZ2VEYXRhOm4sem9vbVNjYWxlOmkscG9pbnRlclg6Yyxwb2ludGVyWTpnLGltYWdlQXNwZWN0UmF0aW86dSxjb250YWluZXJXaWR0aDpmLGNvbnRhaW5lckhlaWdodDptfT10LmRhdGE7c3dpdGNoKGEpe2Nhc2UiaW5pdENhbnZhcyI6QyhlLHMpO2JyZWFrO2Nhc2UiYWRhcHRDYW52YXNTaXplIjpwKHUsZixtKTticmVhaztjYXNlImRyYXdJbWFnZU9uQ2FudmFzIjpJKG4saSxjLGcpO2JyZWFrfX07Y29uc3QgQz0odCxhKT0+e289dCxoPW8uZ2V0Q29udGV4dCgiMmQiKSxyPWF9LHA9KHQsYSxlKT0+e2NvbnN0IHM9YS9lO3c9dD5zLG8ud2lkdGg9YSpyLG8uaGVpZ2h0PWUqcixoLnNjYWxlKHIsciksdz8oZD1hLGw9YS90KToobD1lLGQ9ZSp0KSxoLmltYWdlU21vb3RoaW5nRW5hYmxlZD0hMCxoLmltYWdlU21vb3RoaW5nUXVhbGl0eT0iaGlnaCJ9LEk9KHQ9e30sYT0xLGU9MCxzPTApPT57Y29uc3R7Yml0bWFwSW1hZ2U6bn09dDtpZighb3x8IW4pcmV0dXJuO2xldCBpLGM7aWYodz8oaT0wLGM9KG8uaGVpZ2h0L3ItbCkvMik6KGk9KG8ud2lkdGgvci1kKS8yLGM9MCksaC5jbGVhclJlY3QoMCwwLG8ud2lkdGgsby5oZWlnaHQpLGEhPT0xKXtjb25zdHtuYXR1cmFsV2lkdGg6ZyxuYXR1cmFsSGVpZ2h0OnV9PXQse3pvb21lZFdpZHRoOmYsem9vbWVkSGVpZ2h0Om19PXYoZyx1LGEpLHt6b29tT2Zmc2V0WDp4LHpvb21PZmZzZXRZOk99PXooe3BvaW50ZXJYOmUscG9pbnRlclk6cyxpbWFnZURhdGE6dCx6b29tZWRXaWR0aDpmLHpvb21lZEhlaWdodDptLGRyYXdXaWR0aDpkLGRyYXdIZWlnaHQ6bH0pO2guZHJhd0ltYWdlKG4seCxPLGYsbSxpLGMsZCxsKX1lbHNlIGguZHJhd0ltYWdlKG4saSxjLGQsbCl9fSkoKTsKLy8jIHNvdXJjZU1hcHBpbmdVUkw9Y2FudmFzLndvcmtlci1DZzBma3BEMS5qcy5tYXAK", Vs = (e) => Uint8Array.from(atob(e), (t) => t.charCodeAt(0)), Pe = typeof self < "u" && self.Blob && new Blob([Vs(Ue)], { type: "text/javascript;charset=utf-8" });
|
|
832
|
+
function Ns(e) {
|
|
833
833
|
let t;
|
|
834
834
|
try {
|
|
835
|
-
if (t =
|
|
835
|
+
if (t = Pe && (self.URL || self.webkitURL).createObjectURL(Pe), !t) throw "";
|
|
836
836
|
const i = new Worker(t, {
|
|
837
837
|
name: e == null ? void 0 : e.name
|
|
838
838
|
});
|
|
@@ -841,7 +841,7 @@ function Ws(e) {
|
|
|
841
841
|
}), i;
|
|
842
842
|
} catch {
|
|
843
843
|
return new Worker(
|
|
844
|
-
"data:text/javascript;base64," +
|
|
844
|
+
"data:text/javascript;base64," + Ue,
|
|
845
845
|
{
|
|
846
846
|
name: e == null ? void 0 : e.name
|
|
847
847
|
}
|
|
@@ -850,7 +850,7 @@ function Ws(e) {
|
|
|
850
850
|
t && (self.URL || self.webkitURL).revokeObjectURL(t);
|
|
851
851
|
}
|
|
852
852
|
}
|
|
853
|
-
class
|
|
853
|
+
class zs {
|
|
854
854
|
constructor() {
|
|
855
855
|
this.canvas = null, this.ctx = null, this.dpr = 1, this.drawWidth = 0, this.drawHeight = 0, this.wideImage = !1;
|
|
856
856
|
}
|
|
@@ -864,9 +864,9 @@ class Fs {
|
|
|
864
864
|
// Will be a regular canvas on main thread
|
|
865
865
|
devicePixelRatio: o,
|
|
866
866
|
imageData: n,
|
|
867
|
-
zoomScale:
|
|
867
|
+
zoomScale: a,
|
|
868
868
|
pointerX: r,
|
|
869
|
-
pointerY:
|
|
869
|
+
pointerY: l,
|
|
870
870
|
imageAspectRatio: c,
|
|
871
871
|
containerWidth: h,
|
|
872
872
|
containerHeight: u
|
|
@@ -879,7 +879,7 @@ class Fs {
|
|
|
879
879
|
this.adaptCanvasSize(c, h, u);
|
|
880
880
|
break;
|
|
881
881
|
case "drawImageOnCanvas":
|
|
882
|
-
this.drawImageOnCanvas(n,
|
|
882
|
+
this.drawImageOnCanvas(n, a, r, l);
|
|
883
883
|
break;
|
|
884
884
|
}
|
|
885
885
|
}
|
|
@@ -901,9 +901,9 @@ class Fs {
|
|
|
901
901
|
drawImageOnCanvas(t = {}, i = 1, s = 0, o = 0) {
|
|
902
902
|
const { bitmapImage: n } = t;
|
|
903
903
|
if (!this.canvas || !this.ctx || !n) return;
|
|
904
|
-
let
|
|
905
|
-
if (this.wideImage ? (
|
|
906
|
-
const { naturalWidth:
|
|
904
|
+
let a, r;
|
|
905
|
+
if (this.wideImage ? (a = 0, r = (this.canvas.height / this.dpr - this.drawHeight) / 2) : (a = (this.canvas.width / this.dpr - this.drawWidth) / 2, r = 0), this.ctx.clearRect(0, 0, this.canvas.width, this.canvas.height), i !== 1) {
|
|
906
|
+
const { naturalWidth: l, naturalHeight: c } = t, { zoomedWidth: h, zoomedHeight: u } = Ys(l, c, i), { zoomOffsetX: f, zoomOffsetY: p } = Rs({
|
|
907
907
|
pointerX: s,
|
|
908
908
|
pointerY: o,
|
|
909
909
|
imageData: t,
|
|
@@ -918,16 +918,16 @@ class Fs {
|
|
|
918
918
|
p,
|
|
919
919
|
h,
|
|
920
920
|
u,
|
|
921
|
-
|
|
921
|
+
a,
|
|
922
922
|
r,
|
|
923
923
|
this.drawWidth,
|
|
924
924
|
this.drawHeight
|
|
925
925
|
);
|
|
926
926
|
} else
|
|
927
|
-
this.ctx.drawImage(n,
|
|
927
|
+
this.ctx.drawImage(n, a, r, this.drawWidth, this.drawHeight);
|
|
928
928
|
}
|
|
929
929
|
}
|
|
930
|
-
const
|
|
930
|
+
const $s = /* @__PURE__ */ new Set([
|
|
931
931
|
// Basic HTML
|
|
932
932
|
"p",
|
|
933
933
|
"span",
|
|
@@ -986,7 +986,7 @@ const Vs = /* @__PURE__ */ new Set([
|
|
|
986
986
|
"lineargradient",
|
|
987
987
|
"radialgradient",
|
|
988
988
|
"stop"
|
|
989
|
-
]),
|
|
989
|
+
]), Ye = {
|
|
990
990
|
a: ["href", "title", "target", "rel"],
|
|
991
991
|
img: ["src", "alt", "title", "width", "height"],
|
|
992
992
|
button: ["type", "disabled", "name", "value"],
|
|
@@ -1014,12 +1014,12 @@ const Vs = /* @__PURE__ */ new Set([
|
|
|
1014
1014
|
clippath: ["id"],
|
|
1015
1015
|
mask: ["id"],
|
|
1016
1016
|
"*": ["class", "id", "style"]
|
|
1017
|
-
},
|
|
1017
|
+
}, js = [
|
|
1018
1018
|
/javascript:/gi,
|
|
1019
1019
|
/vbscript:/gi,
|
|
1020
1020
|
/data:/gi,
|
|
1021
1021
|
/on\w+\s*=/gi
|
|
1022
|
-
],
|
|
1022
|
+
], Gs = (e) => {
|
|
1023
1023
|
if (typeof e != "string")
|
|
1024
1024
|
return "";
|
|
1025
1025
|
const t = document.createElement("template");
|
|
@@ -1027,98 +1027,108 @@ const Vs = /* @__PURE__ */ new Set([
|
|
|
1027
1027
|
const i = (s) => {
|
|
1028
1028
|
if (Array.from(s.childNodes).forEach(i), s.nodeType === Node.ELEMENT_NODE) {
|
|
1029
1029
|
const n = s.tagName.toLowerCase();
|
|
1030
|
-
if (
|
|
1030
|
+
if (!$s.has(n)) {
|
|
1031
1031
|
if (n === "script" || n === "style") {
|
|
1032
1032
|
s.remove();
|
|
1033
1033
|
return;
|
|
1034
1034
|
}
|
|
1035
|
-
const
|
|
1036
|
-
s.parentNode.replaceChild(
|
|
1035
|
+
const l = document.createTextNode(s.textContent);
|
|
1036
|
+
s.parentNode.replaceChild(l, s);
|
|
1037
1037
|
return;
|
|
1038
1038
|
}
|
|
1039
|
-
const
|
|
1040
|
-
...
|
|
1041
|
-
...
|
|
1039
|
+
const a = [
|
|
1040
|
+
...Ye[n] || [],
|
|
1041
|
+
...Ye["*"] || []
|
|
1042
1042
|
];
|
|
1043
|
-
if (Array.from(s.attributes).forEach((
|
|
1044
|
-
const c =
|
|
1043
|
+
if (Array.from(s.attributes).forEach((l) => {
|
|
1044
|
+
const c = l.name.toLowerCase();
|
|
1045
1045
|
if (c.startsWith("on")) {
|
|
1046
|
-
s.removeAttribute(
|
|
1046
|
+
s.removeAttribute(l.name);
|
|
1047
1047
|
return;
|
|
1048
1048
|
}
|
|
1049
|
-
if (!
|
|
1050
|
-
s.removeAttribute(
|
|
1049
|
+
if (!a.includes(c)) {
|
|
1050
|
+
s.removeAttribute(l.name);
|
|
1051
1051
|
return;
|
|
1052
1052
|
}
|
|
1053
|
-
let h =
|
|
1054
|
-
|
|
1055
|
-
u.test(h) && s.removeAttribute(
|
|
1053
|
+
let h = l.value;
|
|
1054
|
+
js.forEach((u) => {
|
|
1055
|
+
u.test(h) && s.removeAttribute(l.name);
|
|
1056
1056
|
});
|
|
1057
1057
|
}), n === "a") {
|
|
1058
|
-
const
|
|
1059
|
-
|
|
1058
|
+
const l = s.getAttribute("href");
|
|
1059
|
+
l && (/^(https?:|mailto:|tel:|#|\/)/i.test(l.trim()) || s.removeAttribute("href")), s.getAttribute("target") === "_blank" && s.setAttribute("rel", "noopener noreferrer");
|
|
1060
1060
|
}
|
|
1061
1061
|
if (n === "img") {
|
|
1062
|
-
const
|
|
1063
|
-
|
|
1062
|
+
const l = s.getAttribute("src");
|
|
1063
|
+
l && (/^(https?:|\/|data:image\/)/i.test(l.trim()) || s.removeAttribute("src"));
|
|
1064
1064
|
}
|
|
1065
1065
|
}
|
|
1066
1066
|
};
|
|
1067
1067
|
return i(t.content), t.innerHTML;
|
|
1068
|
-
},
|
|
1069
|
-
(s) =>
|
|
1070
|
-
),
|
|
1068
|
+
}, _s = (e) => e === "x" ? Y.X : Y.Y, Us = (e, t, i) => e.filter(
|
|
1069
|
+
(s) => _s(s.orientation) === i && t in s.positions
|
|
1070
|
+
), Ks = (e, t) => {
|
|
1071
1071
|
const i = document.createElement("button");
|
|
1072
1072
|
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;
|
|
1073
|
-
},
|
|
1074
|
-
const t = Object.entries(e).sort(([n], [
|
|
1073
|
+
}, qs = (e) => {
|
|
1074
|
+
const t = Object.entries(e).sort(([n], [a]) => Number(n) - Number(a));
|
|
1075
1075
|
let i = null, s = null;
|
|
1076
1076
|
const o = {};
|
|
1077
|
-
for (const [n,
|
|
1078
|
-
if (!
|
|
1077
|
+
for (const [n, a] of t)
|
|
1078
|
+
if (!a)
|
|
1079
1079
|
o[n] = { x: i, y: s };
|
|
1080
1080
|
else {
|
|
1081
|
-
const { x: r, y:
|
|
1082
|
-
r != null && (i = r),
|
|
1081
|
+
const { x: r, y: l } = a;
|
|
1082
|
+
r != null && (i = r), l != null && (s = l), o[n] = {
|
|
1083
1083
|
x: r || i,
|
|
1084
|
-
y:
|
|
1084
|
+
y: l || s
|
|
1085
1085
|
};
|
|
1086
1086
|
}
|
|
1087
1087
|
return o;
|
|
1088
|
-
},
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
1088
|
+
}, Js = (e) => ({
|
|
1089
|
+
placement: "top",
|
|
1090
|
+
modifiers: [
|
|
1091
|
+
{
|
|
1092
|
+
name: "offset",
|
|
1093
|
+
options: {
|
|
1094
|
+
offset: [0, 10]
|
|
1095
|
+
}
|
|
1096
|
+
},
|
|
1097
|
+
{
|
|
1098
|
+
name: "preventOverflow",
|
|
1099
|
+
options: {
|
|
1100
|
+
boundary: e
|
|
1101
|
+
}
|
|
1102
|
+
},
|
|
1103
|
+
{
|
|
1104
|
+
name: "flip",
|
|
1105
|
+
options: {
|
|
1106
|
+
boundary: e,
|
|
1107
|
+
fallbackPlacements: ["bottom", "right", "left"]
|
|
1108
|
+
}
|
|
1099
1109
|
}
|
|
1100
|
-
|
|
1101
|
-
|
|
1110
|
+
]
|
|
1111
|
+
}), Qs = (e, t) => {
|
|
1102
1112
|
const i = document.createElement("div");
|
|
1103
|
-
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 =
|
|
1104
|
-
},
|
|
1113
|
+
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 = Gs(e) : i.textContent = e, document.body.appendChild(i), i;
|
|
1114
|
+
}, to = (e) => {
|
|
1105
1115
|
const t = [...e];
|
|
1106
1116
|
return t.forEach((i, s) => {
|
|
1107
|
-
const o = { ...
|
|
1117
|
+
const o = { ...qs(i.positions) };
|
|
1108
1118
|
t[s].initialPositions = o, t[s].positions = o;
|
|
1109
1119
|
}), t;
|
|
1110
|
-
},
|
|
1120
|
+
}, eo = ({
|
|
1111
1121
|
newWidth: e,
|
|
1112
1122
|
newHeight: t,
|
|
1113
1123
|
initialContainerSize: i,
|
|
1114
1124
|
imageAspectRatio: s,
|
|
1115
1125
|
hotspotsConfig: o
|
|
1116
1126
|
}) => {
|
|
1117
|
-
const [n,
|
|
1118
|
-
let r = e,
|
|
1127
|
+
const [n, a] = i;
|
|
1128
|
+
let r = e, l = t, c = 0, h = 0;
|
|
1119
1129
|
const u = e / t;
|
|
1120
|
-
s > u ? (
|
|
1121
|
-
const p = r / n, I =
|
|
1130
|
+
s > u ? (l = e / s, h = (t - l) / 2) : (r = t * s, c = (e - r) / 2);
|
|
1131
|
+
const p = r / n, I = l / a;
|
|
1122
1132
|
return o.map((b) => {
|
|
1123
1133
|
const v = {};
|
|
1124
1134
|
return Object.entries(b.initialPositions).forEach(([O, E]) => {
|
|
@@ -1129,12 +1139,43 @@ const Vs = /* @__PURE__ */ new Set([
|
|
|
1129
1139
|
}), { ...b, positions: v };
|
|
1130
1140
|
});
|
|
1131
1141
|
};
|
|
1132
|
-
|
|
1133
|
-
|
|
1134
|
-
|
|
1135
|
-
|
|
1136
|
-
|
|
1137
|
-
|
|
1142
|
+
function io(e) {
|
|
1143
|
+
const t = [];
|
|
1144
|
+
e.image && t.push(
|
|
1145
|
+
`<div class="ci360-popper-image-wrapper"><img class="ci360-popper-image" src="${Qt(e.image)}" alt="${Qt(e.title || "")}"></div>`
|
|
1146
|
+
);
|
|
1147
|
+
const i = [];
|
|
1148
|
+
if (e.title && i.push(`<h3 class="ci360-popper-title">${Ct(e.title)}</h3>`), e.originalPrice || e.price) {
|
|
1149
|
+
let s = "";
|
|
1150
|
+
e.originalPrice && (s += `<span class="ci360-popper-original-price">${Ct(e.originalPrice)}</span>`), e.price && (s += `<span class="ci360-popper-price">${Ct(e.price)}</span>`), i.push(`<div class="ci360-popper-price-row">${s}</div>`);
|
|
1151
|
+
}
|
|
1152
|
+
if (e.description && i.push(`<p class="ci360-popper-description">${Ct(e.description)}</p>`), e.url && so(e.url)) {
|
|
1153
|
+
const s = e.ctaText || "View details";
|
|
1154
|
+
i.push(
|
|
1155
|
+
`<a class="ci360-popper-cta" href="${Qt(e.url)}">${Ct(String(s))}</a>`
|
|
1156
|
+
);
|
|
1157
|
+
}
|
|
1158
|
+
return i.length > 0 && t.push(`<div class="ci360-popper-body">${i.join("")}</div>`), t.join("");
|
|
1159
|
+
}
|
|
1160
|
+
function Re(e) {
|
|
1161
|
+
return e.content ? e.content : e.data ? io(e.data) : "";
|
|
1162
|
+
}
|
|
1163
|
+
function Ct(e) {
|
|
1164
|
+
return e.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """);
|
|
1165
|
+
}
|
|
1166
|
+
function Qt(e) {
|
|
1167
|
+
return e.replace(/&/g, "&").replace(/"/g, """).replace(/'/g, "'").replace(/</g, "<").replace(/>/g, ">");
|
|
1168
|
+
}
|
|
1169
|
+
function so(e) {
|
|
1170
|
+
const t = e.replace(/[\s\x00-\x1f]/g, "");
|
|
1171
|
+
return /^https?:\/\//i.test(t) || /^\/(?!\/)/.test(t) || /^#/.test(t);
|
|
1172
|
+
}
|
|
1173
|
+
var H = "top", F = "bottom", V = "right", Z = "left", oe = "auto", Tt = [H, F, V, Z], mt = "start", St = "end", oo = "clippingParents", Ke = "viewport", xt = "popper", no = "reference", Xe = /* @__PURE__ */ Tt.reduce(function(e, t) {
|
|
1174
|
+
return e.concat([t + "-" + mt, t + "-" + St]);
|
|
1175
|
+
}, []), qe = /* @__PURE__ */ [].concat(Tt, [oe]).reduce(function(e, t) {
|
|
1176
|
+
return e.concat([t, t + "-" + mt, t + "-" + St]);
|
|
1177
|
+
}, []), ro = "beforeRead", ao = "read", lo = "afterRead", co = "beforeMain", ho = "main", uo = "afterMain", po = "beforeWrite", mo = "write", fo = "afterWrite", vo = [ro, ao, lo, co, ho, uo, po, mo, fo];
|
|
1178
|
+
function $(e) {
|
|
1138
1179
|
return e ? (e.nodeName || "").toLowerCase() : null;
|
|
1139
1180
|
}
|
|
1140
1181
|
function B(e) {
|
|
@@ -1154,23 +1195,23 @@ function W(e) {
|
|
|
1154
1195
|
var t = B(e).HTMLElement;
|
|
1155
1196
|
return e instanceof t || e instanceof HTMLElement;
|
|
1156
1197
|
}
|
|
1157
|
-
function
|
|
1198
|
+
function ne(e) {
|
|
1158
1199
|
if (typeof ShadowRoot > "u")
|
|
1159
1200
|
return !1;
|
|
1160
1201
|
var t = B(e).ShadowRoot;
|
|
1161
1202
|
return e instanceof t || e instanceof ShadowRoot;
|
|
1162
1203
|
}
|
|
1163
|
-
function
|
|
1204
|
+
function go(e) {
|
|
1164
1205
|
var t = e.state;
|
|
1165
1206
|
Object.keys(t.elements).forEach(function(i) {
|
|
1166
1207
|
var s = t.styles[i] || {}, o = t.attributes[i] || {}, n = t.elements[i];
|
|
1167
|
-
!W(n) ||
|
|
1168
|
-
var r = o[
|
|
1169
|
-
r === !1 ? n.removeAttribute(
|
|
1208
|
+
!W(n) || !$(n) || (Object.assign(n.style, s), Object.keys(o).forEach(function(a) {
|
|
1209
|
+
var r = o[a];
|
|
1210
|
+
r === !1 ? n.removeAttribute(a) : n.setAttribute(a, r === !0 ? "" : r);
|
|
1170
1211
|
}));
|
|
1171
1212
|
});
|
|
1172
1213
|
}
|
|
1173
|
-
function
|
|
1214
|
+
function yo(e) {
|
|
1174
1215
|
var t = e.state, i = {
|
|
1175
1216
|
popper: {
|
|
1176
1217
|
position: t.options.strategy,
|
|
@@ -1185,41 +1226,41 @@ function po(e) {
|
|
|
1185
1226
|
};
|
|
1186
1227
|
return Object.assign(t.elements.popper.style, i.popper), t.styles = i, t.elements.arrow && Object.assign(t.elements.arrow.style, i.arrow), function() {
|
|
1187
1228
|
Object.keys(t.elements).forEach(function(s) {
|
|
1188
|
-
var o = t.elements[s], n = t.attributes[s] || {},
|
|
1189
|
-
return
|
|
1229
|
+
var o = t.elements[s], n = t.attributes[s] || {}, a = Object.keys(t.styles.hasOwnProperty(s) ? t.styles[s] : i[s]), r = a.reduce(function(l, c) {
|
|
1230
|
+
return l[c] = "", l;
|
|
1190
1231
|
}, {});
|
|
1191
|
-
!W(o) ||
|
|
1192
|
-
o.removeAttribute(
|
|
1232
|
+
!W(o) || !$(o) || (Object.assign(o.style, r), Object.keys(n).forEach(function(l) {
|
|
1233
|
+
o.removeAttribute(l);
|
|
1193
1234
|
}));
|
|
1194
1235
|
});
|
|
1195
1236
|
};
|
|
1196
1237
|
}
|
|
1197
|
-
const
|
|
1238
|
+
const bo = {
|
|
1198
1239
|
name: "applyStyles",
|
|
1199
1240
|
enabled: !0,
|
|
1200
1241
|
phase: "write",
|
|
1201
|
-
fn:
|
|
1202
|
-
effect:
|
|
1242
|
+
fn: go,
|
|
1243
|
+
effect: yo,
|
|
1203
1244
|
requires: ["computeStyles"]
|
|
1204
1245
|
};
|
|
1205
1246
|
function z(e) {
|
|
1206
1247
|
return e.split("-")[0];
|
|
1207
1248
|
}
|
|
1208
|
-
var it = Math.max,
|
|
1209
|
-
function
|
|
1249
|
+
var it = Math.max, Vt = Math.min, ft = Math.round;
|
|
1250
|
+
function ie() {
|
|
1210
1251
|
var e = navigator.userAgentData;
|
|
1211
1252
|
return e != null && e.brands && Array.isArray(e.brands) ? e.brands.map(function(t) {
|
|
1212
1253
|
return t.brand + "/" + t.version;
|
|
1213
1254
|
}).join(" ") : navigator.userAgent;
|
|
1214
1255
|
}
|
|
1215
|
-
function
|
|
1216
|
-
return !/^((?!chrome|android).)*safari/i.test(
|
|
1256
|
+
function Je() {
|
|
1257
|
+
return !/^((?!chrome|android).)*safari/i.test(ie());
|
|
1217
1258
|
}
|
|
1218
1259
|
function vt(e, t, i) {
|
|
1219
1260
|
t === void 0 && (t = !1), i === void 0 && (i = !1);
|
|
1220
1261
|
var s = e.getBoundingClientRect(), o = 1, n = 1;
|
|
1221
1262
|
t && W(e) && (o = e.offsetWidth > 0 && ft(s.width) / e.offsetWidth || 1, n = e.offsetHeight > 0 && ft(s.height) / e.offsetHeight || 1);
|
|
1222
|
-
var
|
|
1263
|
+
var a = st(e) ? B(e) : window, r = a.visualViewport, l = !Je() && i, c = (s.left + (l && r ? r.offsetLeft : 0)) / o, h = (s.top + (l && r ? r.offsetTop : 0)) / n, u = s.width / o, f = s.height / n;
|
|
1223
1264
|
return {
|
|
1224
1265
|
width: u,
|
|
1225
1266
|
height: f,
|
|
@@ -1231,7 +1272,7 @@ function vt(e, t, i) {
|
|
|
1231
1272
|
y: h
|
|
1232
1273
|
};
|
|
1233
1274
|
}
|
|
1234
|
-
function
|
|
1275
|
+
function re(e) {
|
|
1235
1276
|
var t = vt(e), i = e.offsetWidth, s = e.offsetHeight;
|
|
1236
1277
|
return Math.abs(t.width - i) <= 1 && (i = t.width), Math.abs(t.height - s) <= 1 && (s = t.height), {
|
|
1237
1278
|
x: e.offsetLeft,
|
|
@@ -1240,11 +1281,11 @@ function oe(e) {
|
|
|
1240
1281
|
height: s
|
|
1241
1282
|
};
|
|
1242
1283
|
}
|
|
1243
|
-
function
|
|
1284
|
+
function Qe(e, t) {
|
|
1244
1285
|
var i = t.getRootNode && t.getRootNode();
|
|
1245
1286
|
if (e.contains(t))
|
|
1246
1287
|
return !0;
|
|
1247
|
-
if (i &&
|
|
1288
|
+
if (i && ne(i)) {
|
|
1248
1289
|
var s = t;
|
|
1249
1290
|
do {
|
|
1250
1291
|
if (s && e.isSameNode(s))
|
|
@@ -1254,11 +1295,11 @@ function Ke(e, t) {
|
|
|
1254
1295
|
}
|
|
1255
1296
|
return !1;
|
|
1256
1297
|
}
|
|
1257
|
-
function
|
|
1298
|
+
function q(e) {
|
|
1258
1299
|
return B(e).getComputedStyle(e);
|
|
1259
1300
|
}
|
|
1260
|
-
function
|
|
1261
|
-
return ["table", "td", "th"].indexOf(
|
|
1301
|
+
function wo(e) {
|
|
1302
|
+
return ["table", "td", "th"].indexOf($(e)) >= 0;
|
|
1262
1303
|
}
|
|
1263
1304
|
function Q(e) {
|
|
1264
1305
|
return ((st(e) ? e.ownerDocument : (
|
|
@@ -1266,32 +1307,32 @@ function Q(e) {
|
|
|
1266
1307
|
e.document
|
|
1267
1308
|
)) || window.document).documentElement;
|
|
1268
1309
|
}
|
|
1269
|
-
function
|
|
1270
|
-
return
|
|
1310
|
+
function zt(e) {
|
|
1311
|
+
return $(e) === "html" ? e : (
|
|
1271
1312
|
// this is a quicker (but less type safe) way to save quite some bytes from the bundle
|
|
1272
1313
|
// $FlowFixMe[incompatible-return]
|
|
1273
1314
|
// $FlowFixMe[prop-missing]
|
|
1274
1315
|
e.assignedSlot || // step into the shadow DOM of the parent of a slotted node
|
|
1275
1316
|
e.parentNode || // DOM Element detected
|
|
1276
|
-
(
|
|
1317
|
+
(ne(e) ? e.host : null) || // ShadowRoot detected
|
|
1277
1318
|
// $FlowFixMe[incompatible-call]: HTMLElement is a Node
|
|
1278
1319
|
Q(e)
|
|
1279
1320
|
);
|
|
1280
1321
|
}
|
|
1281
|
-
function
|
|
1322
|
+
function He(e) {
|
|
1282
1323
|
return !W(e) || // https://github.com/popperjs/popper-core/issues/837
|
|
1283
|
-
|
|
1324
|
+
q(e).position === "fixed" ? null : e.offsetParent;
|
|
1284
1325
|
}
|
|
1285
|
-
function
|
|
1286
|
-
var t = /firefox/i.test(
|
|
1326
|
+
function Io(e) {
|
|
1327
|
+
var t = /firefox/i.test(ie()), i = /Trident/i.test(ie());
|
|
1287
1328
|
if (i && W(e)) {
|
|
1288
|
-
var s =
|
|
1329
|
+
var s = q(e);
|
|
1289
1330
|
if (s.position === "fixed")
|
|
1290
1331
|
return null;
|
|
1291
1332
|
}
|
|
1292
|
-
var o =
|
|
1293
|
-
for (
|
|
1294
|
-
var n =
|
|
1333
|
+
var o = zt(e);
|
|
1334
|
+
for (ne(o) && (o = o.host); W(o) && ["html", "body"].indexOf($(o)) < 0; ) {
|
|
1335
|
+
var n = q(o);
|
|
1295
1336
|
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")
|
|
1296
1337
|
return o;
|
|
1297
1338
|
o = o.parentNode;
|
|
@@ -1299,21 +1340,21 @@ function vo(e) {
|
|
|
1299
1340
|
return null;
|
|
1300
1341
|
}
|
|
1301
1342
|
function kt(e) {
|
|
1302
|
-
for (var t = B(e), i =
|
|
1303
|
-
i =
|
|
1304
|
-
return i && (
|
|
1343
|
+
for (var t = B(e), i = He(e); i && wo(i) && q(i).position === "static"; )
|
|
1344
|
+
i = He(i);
|
|
1345
|
+
return i && ($(i) === "html" || $(i) === "body" && q(i).position === "static") ? t : i || Io(e) || t;
|
|
1305
1346
|
}
|
|
1306
|
-
function
|
|
1347
|
+
function ae(e) {
|
|
1307
1348
|
return ["top", "bottom"].indexOf(e) >= 0 ? "x" : "y";
|
|
1308
1349
|
}
|
|
1309
|
-
function
|
|
1310
|
-
return it(e,
|
|
1350
|
+
function Et(e, t, i) {
|
|
1351
|
+
return it(e, Vt(t, i));
|
|
1311
1352
|
}
|
|
1312
|
-
function
|
|
1313
|
-
var s =
|
|
1353
|
+
function Co(e, t, i) {
|
|
1354
|
+
var s = Et(e, t, i);
|
|
1314
1355
|
return s > i ? i : s;
|
|
1315
1356
|
}
|
|
1316
|
-
function
|
|
1357
|
+
function ti() {
|
|
1317
1358
|
return {
|
|
1318
1359
|
top: 0,
|
|
1319
1360
|
right: 0,
|
|
@@ -1321,57 +1362,57 @@ function Je() {
|
|
|
1321
1362
|
left: 0
|
|
1322
1363
|
};
|
|
1323
1364
|
}
|
|
1324
|
-
function
|
|
1325
|
-
return Object.assign({},
|
|
1365
|
+
function ei(e) {
|
|
1366
|
+
return Object.assign({}, ti(), e);
|
|
1326
1367
|
}
|
|
1327
|
-
function
|
|
1368
|
+
function ii(e, t) {
|
|
1328
1369
|
return t.reduce(function(i, s) {
|
|
1329
1370
|
return i[s] = e, i;
|
|
1330
1371
|
}, {});
|
|
1331
1372
|
}
|
|
1332
|
-
var
|
|
1373
|
+
var xo = function(t, i) {
|
|
1333
1374
|
return t = typeof t == "function" ? t(Object.assign({}, i.rects, {
|
|
1334
1375
|
placement: i.placement
|
|
1335
|
-
})) : t,
|
|
1376
|
+
})) : t, ei(typeof t != "number" ? t : ii(t, Tt));
|
|
1336
1377
|
};
|
|
1337
|
-
function
|
|
1338
|
-
var t, i = e.state, s = e.name, o = e.options, n = i.elements.arrow,
|
|
1339
|
-
if (!(!n || !
|
|
1340
|
-
var u =
|
|
1378
|
+
function Oo(e) {
|
|
1379
|
+
var t, i = e.state, s = e.name, o = e.options, n = i.elements.arrow, a = i.modifiersData.popperOffsets, r = z(i.placement), l = ae(r), c = [Z, V].indexOf(r) >= 0, h = c ? "height" : "width";
|
|
1380
|
+
if (!(!n || !a)) {
|
|
1381
|
+
var u = xo(o.padding, i), f = re(n), p = l === "y" ? H : Z, I = l === "y" ? F : V, b = i.rects.reference[h] + i.rects.reference[l] - a[l] - i.rects.popper[h], v = a[l] - i.rects.reference[l], O = kt(n), E = O ? l === "y" ? O.clientHeight || 0 : O.clientWidth || 0 : 0, w = b / 2 - v / 2, y = u[p], x = E - f[h] - u[I], m = E / 2 - f[h] / 2 + w, g = Et(y, m, x), C = l;
|
|
1341
1382
|
i.modifiersData[s] = (t = {}, t[C] = g, t.centerOffset = g - m, t);
|
|
1342
1383
|
}
|
|
1343
1384
|
}
|
|
1344
|
-
function
|
|
1385
|
+
function Eo(e) {
|
|
1345
1386
|
var t = e.state, i = e.options, s = i.element, o = s === void 0 ? "[data-popper-arrow]" : s;
|
|
1346
|
-
o != null && (typeof o == "string" && (o = t.elements.popper.querySelector(o), !o) ||
|
|
1387
|
+
o != null && (typeof o == "string" && (o = t.elements.popper.querySelector(o), !o) || Qe(t.elements.popper, o) && (t.elements.arrow = o));
|
|
1347
1388
|
}
|
|
1348
|
-
const
|
|
1389
|
+
const Ao = {
|
|
1349
1390
|
name: "arrow",
|
|
1350
1391
|
enabled: !0,
|
|
1351
1392
|
phase: "main",
|
|
1352
|
-
fn:
|
|
1353
|
-
effect:
|
|
1393
|
+
fn: Oo,
|
|
1394
|
+
effect: Eo,
|
|
1354
1395
|
requires: ["popperOffsets"],
|
|
1355
1396
|
requiresIfExists: ["preventOverflow"]
|
|
1356
1397
|
};
|
|
1357
1398
|
function gt(e) {
|
|
1358
1399
|
return e.split("-")[1];
|
|
1359
1400
|
}
|
|
1360
|
-
var
|
|
1401
|
+
var So = {
|
|
1361
1402
|
top: "auto",
|
|
1362
1403
|
right: "auto",
|
|
1363
1404
|
bottom: "auto",
|
|
1364
1405
|
left: "auto"
|
|
1365
1406
|
};
|
|
1366
|
-
function
|
|
1407
|
+
function Lo(e, t) {
|
|
1367
1408
|
var i = e.x, s = e.y, o = t.devicePixelRatio || 1;
|
|
1368
1409
|
return {
|
|
1369
1410
|
x: ft(i * o) / o || 0,
|
|
1370
1411
|
y: ft(s * o) / o || 0
|
|
1371
1412
|
};
|
|
1372
1413
|
}
|
|
1373
|
-
function
|
|
1374
|
-
var t, i = e.popper, s = e.popperRect, o = e.placement, n = e.variation,
|
|
1414
|
+
function Ze(e) {
|
|
1415
|
+
var t, i = e.popper, s = e.popperRect, o = e.placement, n = e.variation, a = e.offsets, r = e.position, l = e.gpuAcceleration, c = e.adaptive, h = e.roundOffsets, u = e.isFixed, f = a.x, p = f === void 0 ? 0 : f, I = a.y, b = I === void 0 ? 0 : I, v = typeof h == "function" ? h({
|
|
1375
1416
|
x: p,
|
|
1376
1417
|
y: b
|
|
1377
1418
|
}) : {
|
|
@@ -1379,43 +1420,43 @@ function Re(e) {
|
|
|
1379
1420
|
y: b
|
|
1380
1421
|
};
|
|
1381
1422
|
p = v.x, b = v.y;
|
|
1382
|
-
var O =
|
|
1423
|
+
var O = a.hasOwnProperty("x"), E = a.hasOwnProperty("y"), w = Z, y = H, x = window;
|
|
1383
1424
|
if (c) {
|
|
1384
1425
|
var m = kt(i), g = "clientHeight", C = "clientWidth";
|
|
1385
|
-
if (m === B(i) && (m = Q(i),
|
|
1426
|
+
if (m === B(i) && (m = Q(i), q(m).position !== "static" && r === "absolute" && (g = "scrollHeight", C = "scrollWidth")), m = m, o === H || (o === Z || o === V) && n === St) {
|
|
1386
1427
|
y = F;
|
|
1387
1428
|
var A = u && m === x && x.visualViewport ? x.visualViewport.height : (
|
|
1388
1429
|
// $FlowFixMe[prop-missing]
|
|
1389
1430
|
m[g]
|
|
1390
1431
|
);
|
|
1391
|
-
b -= A - s.height, b *=
|
|
1432
|
+
b -= A - s.height, b *= l ? 1 : -1;
|
|
1392
1433
|
}
|
|
1393
|
-
if (o === Z || (o === H || o === F) && n ===
|
|
1434
|
+
if (o === Z || (o === H || o === F) && n === St) {
|
|
1394
1435
|
w = V;
|
|
1395
1436
|
var S = u && m === x && x.visualViewport ? x.visualViewport.width : (
|
|
1396
1437
|
// $FlowFixMe[prop-missing]
|
|
1397
1438
|
m[C]
|
|
1398
1439
|
);
|
|
1399
|
-
p -= S - s.width, p *=
|
|
1440
|
+
p -= S - s.width, p *= l ? 1 : -1;
|
|
1400
1441
|
}
|
|
1401
1442
|
}
|
|
1402
|
-
var
|
|
1443
|
+
var T = Object.assign({
|
|
1403
1444
|
position: r
|
|
1404
|
-
}, c &&
|
|
1445
|
+
}, c && So), R = h === !0 ? Lo({
|
|
1405
1446
|
x: p,
|
|
1406
1447
|
y: b
|
|
1407
1448
|
}, B(i)) : {
|
|
1408
1449
|
x: p,
|
|
1409
1450
|
y: b
|
|
1410
1451
|
};
|
|
1411
|
-
if (p = R.x, b = R.y,
|
|
1412
|
-
var
|
|
1413
|
-
return Object.assign({},
|
|
1452
|
+
if (p = R.x, b = R.y, l) {
|
|
1453
|
+
var k;
|
|
1454
|
+
return Object.assign({}, T, (k = {}, k[y] = E ? "0" : "", k[w] = O ? "0" : "", k.transform = (x.devicePixelRatio || 1) <= 1 ? "translate(" + p + "px, " + b + "px)" : "translate3d(" + p + "px, " + b + "px, 0)", k));
|
|
1414
1455
|
}
|
|
1415
|
-
return Object.assign({},
|
|
1456
|
+
return Object.assign({}, T, (t = {}, t[y] = E ? b + "px" : "", t[w] = O ? p + "px" : "", t.transform = "", t));
|
|
1416
1457
|
}
|
|
1417
|
-
function
|
|
1418
|
-
var t = e.state, i = e.options, s = i.gpuAcceleration, o = s === void 0 ? !0 : s, n = i.adaptive,
|
|
1458
|
+
function To(e) {
|
|
1459
|
+
var t = e.state, i = e.options, s = i.gpuAcceleration, o = s === void 0 ? !0 : s, n = i.adaptive, a = n === void 0 ? !0 : n, r = i.roundOffsets, l = r === void 0 ? !0 : r, c = {
|
|
1419
1460
|
placement: z(t.placement),
|
|
1420
1461
|
variation: gt(t.placement),
|
|
1421
1462
|
popper: t.elements.popper,
|
|
@@ -1423,119 +1464,119 @@ function Oo(e) {
|
|
|
1423
1464
|
gpuAcceleration: o,
|
|
1424
1465
|
isFixed: t.options.strategy === "fixed"
|
|
1425
1466
|
};
|
|
1426
|
-
t.modifiersData.popperOffsets != null && (t.styles.popper = Object.assign({}, t.styles.popper,
|
|
1467
|
+
t.modifiersData.popperOffsets != null && (t.styles.popper = Object.assign({}, t.styles.popper, Ze(Object.assign({}, c, {
|
|
1427
1468
|
offsets: t.modifiersData.popperOffsets,
|
|
1428
1469
|
position: t.options.strategy,
|
|
1429
|
-
adaptive:
|
|
1430
|
-
roundOffsets:
|
|
1431
|
-
})))), t.modifiersData.arrow != null && (t.styles.arrow = Object.assign({}, t.styles.arrow,
|
|
1470
|
+
adaptive: a,
|
|
1471
|
+
roundOffsets: l
|
|
1472
|
+
})))), t.modifiersData.arrow != null && (t.styles.arrow = Object.assign({}, t.styles.arrow, Ze(Object.assign({}, c, {
|
|
1432
1473
|
offsets: t.modifiersData.arrow,
|
|
1433
1474
|
position: "absolute",
|
|
1434
1475
|
adaptive: !1,
|
|
1435
|
-
roundOffsets:
|
|
1476
|
+
roundOffsets: l
|
|
1436
1477
|
})))), t.attributes.popper = Object.assign({}, t.attributes.popper, {
|
|
1437
1478
|
"data-popper-placement": t.placement
|
|
1438
1479
|
});
|
|
1439
1480
|
}
|
|
1440
|
-
const
|
|
1481
|
+
const ko = {
|
|
1441
1482
|
name: "computeStyles",
|
|
1442
1483
|
enabled: !0,
|
|
1443
1484
|
phase: "beforeWrite",
|
|
1444
|
-
fn:
|
|
1485
|
+
fn: To,
|
|
1445
1486
|
data: {}
|
|
1446
1487
|
};
|
|
1447
|
-
var
|
|
1488
|
+
var Bt = {
|
|
1448
1489
|
passive: !0
|
|
1449
1490
|
};
|
|
1450
|
-
function
|
|
1451
|
-
var t = e.state, i = e.instance, s = e.options, o = s.scroll, n = o === void 0 ? !0 : o,
|
|
1491
|
+
function Mo(e) {
|
|
1492
|
+
var t = e.state, i = e.instance, s = e.options, o = s.scroll, n = o === void 0 ? !0 : o, a = s.resize, r = a === void 0 ? !0 : a, l = B(t.elements.popper), c = [].concat(t.scrollParents.reference, t.scrollParents.popper);
|
|
1452
1493
|
return n && c.forEach(function(h) {
|
|
1453
|
-
h.addEventListener("scroll", i.update,
|
|
1454
|
-
}), r &&
|
|
1494
|
+
h.addEventListener("scroll", i.update, Bt);
|
|
1495
|
+
}), r && l.addEventListener("resize", i.update, Bt), function() {
|
|
1455
1496
|
n && c.forEach(function(h) {
|
|
1456
|
-
h.removeEventListener("scroll", i.update,
|
|
1457
|
-
}), r &&
|
|
1497
|
+
h.removeEventListener("scroll", i.update, Bt);
|
|
1498
|
+
}), r && l.removeEventListener("resize", i.update, Bt);
|
|
1458
1499
|
};
|
|
1459
1500
|
}
|
|
1460
|
-
const
|
|
1501
|
+
const Po = {
|
|
1461
1502
|
name: "eventListeners",
|
|
1462
1503
|
enabled: !0,
|
|
1463
1504
|
phase: "write",
|
|
1464
1505
|
fn: function() {
|
|
1465
1506
|
},
|
|
1466
|
-
effect:
|
|
1507
|
+
effect: Mo,
|
|
1467
1508
|
data: {}
|
|
1468
1509
|
};
|
|
1469
|
-
var
|
|
1510
|
+
var Yo = {
|
|
1470
1511
|
left: "right",
|
|
1471
1512
|
right: "left",
|
|
1472
1513
|
bottom: "top",
|
|
1473
1514
|
top: "bottom"
|
|
1474
1515
|
};
|
|
1475
|
-
function
|
|
1516
|
+
function Wt(e) {
|
|
1476
1517
|
return e.replace(/left|right|bottom|top/g, function(t) {
|
|
1477
|
-
return
|
|
1518
|
+
return Yo[t];
|
|
1478
1519
|
});
|
|
1479
1520
|
}
|
|
1480
|
-
var
|
|
1521
|
+
var Ro = {
|
|
1481
1522
|
start: "end",
|
|
1482
1523
|
end: "start"
|
|
1483
1524
|
};
|
|
1484
|
-
function
|
|
1525
|
+
function De(e) {
|
|
1485
1526
|
return e.replace(/start|end/g, function(t) {
|
|
1486
|
-
return
|
|
1527
|
+
return Ro[t];
|
|
1487
1528
|
});
|
|
1488
1529
|
}
|
|
1489
|
-
function
|
|
1530
|
+
function le(e) {
|
|
1490
1531
|
var t = B(e), i = t.pageXOffset, s = t.pageYOffset;
|
|
1491
1532
|
return {
|
|
1492
1533
|
scrollLeft: i,
|
|
1493
1534
|
scrollTop: s
|
|
1494
1535
|
};
|
|
1495
1536
|
}
|
|
1496
|
-
function
|
|
1497
|
-
return vt(Q(e)).left +
|
|
1537
|
+
function ce(e) {
|
|
1538
|
+
return vt(Q(e)).left + le(e).scrollLeft;
|
|
1498
1539
|
}
|
|
1499
|
-
function
|
|
1500
|
-
var i = B(e), s = Q(e), o = i.visualViewport, n = s.clientWidth,
|
|
1540
|
+
function Xo(e, t) {
|
|
1541
|
+
var i = B(e), s = Q(e), o = i.visualViewport, n = s.clientWidth, a = s.clientHeight, r = 0, l = 0;
|
|
1501
1542
|
if (o) {
|
|
1502
|
-
n = o.width,
|
|
1503
|
-
var c =
|
|
1504
|
-
(c || !c && t === "fixed") && (r = o.offsetLeft,
|
|
1543
|
+
n = o.width, a = o.height;
|
|
1544
|
+
var c = Je();
|
|
1545
|
+
(c || !c && t === "fixed") && (r = o.offsetLeft, l = o.offsetTop);
|
|
1505
1546
|
}
|
|
1506
1547
|
return {
|
|
1507
1548
|
width: n,
|
|
1508
|
-
height:
|
|
1509
|
-
x: r +
|
|
1510
|
-
y:
|
|
1549
|
+
height: a,
|
|
1550
|
+
x: r + ce(e),
|
|
1551
|
+
y: l
|
|
1511
1552
|
};
|
|
1512
1553
|
}
|
|
1513
|
-
function
|
|
1514
|
-
var t, i = Q(e), s =
|
|
1515
|
-
return
|
|
1554
|
+
function Ho(e) {
|
|
1555
|
+
var t, i = Q(e), s = le(e), o = (t = e.ownerDocument) == null ? void 0 : t.body, n = it(i.scrollWidth, i.clientWidth, o ? o.scrollWidth : 0, o ? o.clientWidth : 0), a = it(i.scrollHeight, i.clientHeight, o ? o.scrollHeight : 0, o ? o.clientHeight : 0), r = -s.scrollLeft + ce(e), l = -s.scrollTop;
|
|
1556
|
+
return q(o || i).direction === "rtl" && (r += it(i.clientWidth, o ? o.clientWidth : 0) - n), {
|
|
1516
1557
|
width: n,
|
|
1517
|
-
height:
|
|
1558
|
+
height: a,
|
|
1518
1559
|
x: r,
|
|
1519
|
-
y:
|
|
1560
|
+
y: l
|
|
1520
1561
|
};
|
|
1521
1562
|
}
|
|
1522
|
-
function
|
|
1523
|
-
var t =
|
|
1563
|
+
function he(e) {
|
|
1564
|
+
var t = q(e), i = t.overflow, s = t.overflowX, o = t.overflowY;
|
|
1524
1565
|
return /auto|scroll|overlay|hidden/.test(i + o + s);
|
|
1525
1566
|
}
|
|
1526
|
-
function
|
|
1527
|
-
return ["html", "body", "#document"].indexOf(
|
|
1567
|
+
function si(e) {
|
|
1568
|
+
return ["html", "body", "#document"].indexOf($(e)) >= 0 ? e.ownerDocument.body : W(e) && he(e) ? e : si(zt(e));
|
|
1528
1569
|
}
|
|
1529
|
-
function
|
|
1570
|
+
function At(e, t) {
|
|
1530
1571
|
var i;
|
|
1531
1572
|
t === void 0 && (t = []);
|
|
1532
|
-
var s =
|
|
1573
|
+
var s = si(e), o = s === ((i = e.ownerDocument) == null ? void 0 : i.body), n = B(s), a = o ? [n].concat(n.visualViewport || [], he(s) ? s : []) : s, r = t.concat(a);
|
|
1533
1574
|
return o ? r : (
|
|
1534
1575
|
// $FlowFixMe[incompatible-call]: isBody tells us target will be an HTMLElement here
|
|
1535
|
-
r.concat(
|
|
1576
|
+
r.concat(At(zt(a)))
|
|
1536
1577
|
);
|
|
1537
1578
|
}
|
|
1538
|
-
function
|
|
1579
|
+
function se(e) {
|
|
1539
1580
|
return Object.assign({}, e, {
|
|
1540
1581
|
left: e.x,
|
|
1541
1582
|
top: e.y,
|
|
@@ -1543,125 +1584,125 @@ function ee(e) {
|
|
|
1543
1584
|
bottom: e.y + e.height
|
|
1544
1585
|
});
|
|
1545
1586
|
}
|
|
1546
|
-
function
|
|
1587
|
+
function Zo(e, t) {
|
|
1547
1588
|
var i = vt(e, !1, t === "fixed");
|
|
1548
1589
|
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;
|
|
1549
1590
|
}
|
|
1550
|
-
function
|
|
1551
|
-
return t ===
|
|
1591
|
+
function Be(e, t, i) {
|
|
1592
|
+
return t === Ke ? se(Xo(e, i)) : st(t) ? Zo(t, i) : se(Ho(Q(e)));
|
|
1552
1593
|
}
|
|
1553
|
-
function
|
|
1554
|
-
var t =
|
|
1594
|
+
function Do(e) {
|
|
1595
|
+
var t = At(zt(e)), i = ["absolute", "fixed"].indexOf(q(e).position) >= 0, s = i && W(e) ? kt(e) : e;
|
|
1555
1596
|
return st(s) ? t.filter(function(o) {
|
|
1556
|
-
return st(o) &&
|
|
1597
|
+
return st(o) && Qe(o, s) && $(o) !== "body";
|
|
1557
1598
|
}) : [];
|
|
1558
1599
|
}
|
|
1559
|
-
function
|
|
1560
|
-
var o = t === "clippingParents" ?
|
|
1561
|
-
var h =
|
|
1562
|
-
return
|
|
1563
|
-
},
|
|
1600
|
+
function Bo(e, t, i, s) {
|
|
1601
|
+
var o = t === "clippingParents" ? Do(e) : [].concat(t), n = [].concat(o, [i]), a = n[0], r = n.reduce(function(l, c) {
|
|
1602
|
+
var h = Be(e, c, s);
|
|
1603
|
+
return l.top = it(h.top, l.top), l.right = Vt(h.right, l.right), l.bottom = Vt(h.bottom, l.bottom), l.left = it(h.left, l.left), l;
|
|
1604
|
+
}, Be(e, a, s));
|
|
1564
1605
|
return r.width = r.right - r.left, r.height = r.bottom - r.top, r.x = r.left, r.y = r.top, r;
|
|
1565
1606
|
}
|
|
1566
|
-
function
|
|
1567
|
-
var t = e.reference, i = e.element, s = e.placement, o = s ? z(s) : null, n = s ? gt(s) : null,
|
|
1607
|
+
function oi(e) {
|
|
1608
|
+
var t = e.reference, i = e.element, s = e.placement, o = s ? z(s) : null, n = s ? gt(s) : null, a = t.x + t.width / 2 - i.width / 2, r = t.y + t.height / 2 - i.height / 2, l;
|
|
1568
1609
|
switch (o) {
|
|
1569
1610
|
case H:
|
|
1570
|
-
|
|
1571
|
-
x:
|
|
1611
|
+
l = {
|
|
1612
|
+
x: a,
|
|
1572
1613
|
y: t.y - i.height
|
|
1573
1614
|
};
|
|
1574
1615
|
break;
|
|
1575
1616
|
case F:
|
|
1576
|
-
|
|
1577
|
-
x:
|
|
1617
|
+
l = {
|
|
1618
|
+
x: a,
|
|
1578
1619
|
y: t.y + t.height
|
|
1579
1620
|
};
|
|
1580
1621
|
break;
|
|
1581
1622
|
case V:
|
|
1582
|
-
|
|
1623
|
+
l = {
|
|
1583
1624
|
x: t.x + t.width,
|
|
1584
1625
|
y: r
|
|
1585
1626
|
};
|
|
1586
1627
|
break;
|
|
1587
1628
|
case Z:
|
|
1588
|
-
|
|
1629
|
+
l = {
|
|
1589
1630
|
x: t.x - i.width,
|
|
1590
1631
|
y: r
|
|
1591
1632
|
};
|
|
1592
1633
|
break;
|
|
1593
1634
|
default:
|
|
1594
|
-
|
|
1635
|
+
l = {
|
|
1595
1636
|
x: t.x,
|
|
1596
1637
|
y: t.y
|
|
1597
1638
|
};
|
|
1598
1639
|
}
|
|
1599
|
-
var c = o ?
|
|
1640
|
+
var c = o ? ae(o) : null;
|
|
1600
1641
|
if (c != null) {
|
|
1601
1642
|
var h = c === "y" ? "height" : "width";
|
|
1602
1643
|
switch (n) {
|
|
1603
1644
|
case mt:
|
|
1604
|
-
|
|
1645
|
+
l[c] = l[c] - (t[h] / 2 - i[h] / 2);
|
|
1605
1646
|
break;
|
|
1606
|
-
case
|
|
1607
|
-
|
|
1647
|
+
case St:
|
|
1648
|
+
l[c] = l[c] + (t[h] / 2 - i[h] / 2);
|
|
1608
1649
|
break;
|
|
1609
1650
|
}
|
|
1610
1651
|
}
|
|
1611
|
-
return
|
|
1652
|
+
return l;
|
|
1612
1653
|
}
|
|
1613
|
-
function
|
|
1654
|
+
function Lt(e, t) {
|
|
1614
1655
|
t === void 0 && (t = {});
|
|
1615
|
-
var i = t, s = i.placement, o = s === void 0 ? e.placement : s, n = i.strategy,
|
|
1656
|
+
var i = t, s = i.placement, o = s === void 0 ? e.placement : s, n = i.strategy, a = n === void 0 ? e.strategy : n, r = i.boundary, l = r === void 0 ? oo : r, c = i.rootBoundary, h = c === void 0 ? Ke : c, u = i.elementContext, f = u === void 0 ? xt : u, p = i.altBoundary, I = p === void 0 ? !1 : p, b = i.padding, v = b === void 0 ? 0 : b, O = ei(typeof v != "number" ? v : ii(v, Tt)), E = f === xt ? no : xt, w = e.rects.popper, y = e.elements[I ? E : f], x = Bo(st(y) ? y : y.contextElement || Q(e.elements.popper), l, h, a), m = vt(e.elements.reference), g = oi({
|
|
1616
1657
|
reference: m,
|
|
1617
1658
|
element: w,
|
|
1618
1659
|
placement: o
|
|
1619
|
-
}), C =
|
|
1660
|
+
}), C = se(Object.assign({}, w, g)), A = f === xt ? C : m, S = {
|
|
1620
1661
|
top: x.top - A.top + O.top,
|
|
1621
1662
|
bottom: A.bottom - x.bottom + O.bottom,
|
|
1622
1663
|
left: x.left - A.left + O.left,
|
|
1623
1664
|
right: A.right - x.right + O.right
|
|
1624
|
-
},
|
|
1625
|
-
if (f ===
|
|
1626
|
-
var R =
|
|
1627
|
-
Object.keys(S).forEach(function(
|
|
1628
|
-
var
|
|
1629
|
-
S[
|
|
1665
|
+
}, T = e.modifiersData.offset;
|
|
1666
|
+
if (f === xt && T) {
|
|
1667
|
+
var R = T[o];
|
|
1668
|
+
Object.keys(S).forEach(function(k) {
|
|
1669
|
+
var j = [V, F].indexOf(k) >= 0 ? 1 : -1, G = [H, F].indexOf(k) >= 0 ? "y" : "x";
|
|
1670
|
+
S[k] += R[G] * j;
|
|
1630
1671
|
});
|
|
1631
1672
|
}
|
|
1632
1673
|
return S;
|
|
1633
1674
|
}
|
|
1634
|
-
function
|
|
1675
|
+
function Wo(e, t) {
|
|
1635
1676
|
t === void 0 && (t = {});
|
|
1636
|
-
var i = t, s = i.placement, o = i.boundary, n = i.rootBoundary,
|
|
1677
|
+
var i = t, s = i.placement, o = i.boundary, n = i.rootBoundary, a = i.padding, r = i.flipVariations, l = i.allowedAutoPlacements, c = l === void 0 ? qe : l, h = gt(s), u = h ? r ? Xe : Xe.filter(function(I) {
|
|
1637
1678
|
return gt(I) === h;
|
|
1638
|
-
}) :
|
|
1679
|
+
}) : Tt, f = u.filter(function(I) {
|
|
1639
1680
|
return c.indexOf(I) >= 0;
|
|
1640
1681
|
});
|
|
1641
1682
|
f.length === 0 && (f = u);
|
|
1642
1683
|
var p = f.reduce(function(I, b) {
|
|
1643
|
-
return I[b] =
|
|
1684
|
+
return I[b] = Lt(e, {
|
|
1644
1685
|
placement: b,
|
|
1645
1686
|
boundary: o,
|
|
1646
1687
|
rootBoundary: n,
|
|
1647
|
-
padding:
|
|
1688
|
+
padding: a
|
|
1648
1689
|
})[z(b)], I;
|
|
1649
1690
|
}, {});
|
|
1650
1691
|
return Object.keys(p).sort(function(I, b) {
|
|
1651
1692
|
return p[I] - p[b];
|
|
1652
1693
|
});
|
|
1653
1694
|
}
|
|
1654
|
-
function
|
|
1655
|
-
if (z(e) ===
|
|
1695
|
+
function Fo(e) {
|
|
1696
|
+
if (z(e) === oe)
|
|
1656
1697
|
return [];
|
|
1657
|
-
var t =
|
|
1658
|
-
return [
|
|
1698
|
+
var t = Wt(e);
|
|
1699
|
+
return [De(e), t, De(t)];
|
|
1659
1700
|
}
|
|
1660
|
-
function
|
|
1701
|
+
function Vo(e) {
|
|
1661
1702
|
var t = e.state, i = e.options, s = e.name;
|
|
1662
1703
|
if (!t.modifiersData[s]._skip) {
|
|
1663
|
-
for (var o = i.mainAxis, n = o === void 0 ? !0 : o,
|
|
1664
|
-
return
|
|
1704
|
+
for (var o = i.mainAxis, n = o === void 0 ? !0 : o, a = i.altAxis, r = a === void 0 ? !0 : a, l = i.fallbackPlacements, c = i.padding, h = i.boundary, u = i.rootBoundary, f = i.altBoundary, p = i.flipVariations, I = p === void 0 ? !0 : p, b = i.allowedAutoPlacements, v = t.options.placement, O = z(v), E = O === v, w = l || (E || !I ? [Wt(v)] : Fo(v)), y = [v].concat(w).reduce(function(J, N) {
|
|
1705
|
+
return J.concat(z(N) === oe ? Wo(t, {
|
|
1665
1706
|
placement: N,
|
|
1666
1707
|
boundary: h,
|
|
1667
1708
|
rootBoundary: u,
|
|
@@ -1670,22 +1711,22 @@ function Zo(e) {
|
|
|
1670
1711
|
allowedAutoPlacements: b
|
|
1671
1712
|
}) : N);
|
|
1672
1713
|
}, []), x = t.rects.reference, m = t.rects.popper, g = /* @__PURE__ */ new Map(), C = !0, A = y[0], S = 0; S < y.length; S++) {
|
|
1673
|
-
var
|
|
1674
|
-
placement:
|
|
1714
|
+
var T = y[S], R = z(T), k = gt(T) === mt, j = [H, F].indexOf(R) >= 0, G = j ? "width" : "height", M = Lt(t, {
|
|
1715
|
+
placement: T,
|
|
1675
1716
|
boundary: h,
|
|
1676
1717
|
rootBoundary: u,
|
|
1677
1718
|
altBoundary: f,
|
|
1678
1719
|
padding: c
|
|
1679
|
-
}), D =
|
|
1680
|
-
x[G] > m[G] && (D =
|
|
1681
|
-
var ot =
|
|
1682
|
-
if (n && _.push(M[R] <= 0), r && _.push(M[D] <= 0, M[ot] <= 0), _.every(function(
|
|
1683
|
-
return
|
|
1720
|
+
}), D = j ? k ? V : Z : k ? F : H;
|
|
1721
|
+
x[G] > m[G] && (D = Wt(D));
|
|
1722
|
+
var ot = Wt(D), _ = [];
|
|
1723
|
+
if (n && _.push(M[R] <= 0), r && _.push(M[D] <= 0, M[ot] <= 0), _.every(function(J) {
|
|
1724
|
+
return J;
|
|
1684
1725
|
})) {
|
|
1685
|
-
A =
|
|
1726
|
+
A = T, C = !1;
|
|
1686
1727
|
break;
|
|
1687
1728
|
}
|
|
1688
|
-
g.set(
|
|
1729
|
+
g.set(T, _);
|
|
1689
1730
|
}
|
|
1690
1731
|
if (C)
|
|
1691
1732
|
for (var nt = I ? 3 : 1, yt = function(N) {
|
|
@@ -1705,17 +1746,17 @@ function Zo(e) {
|
|
|
1705
1746
|
t.placement !== A && (t.modifiersData[s]._skip = !0, t.placement = A, t.reset = !0);
|
|
1706
1747
|
}
|
|
1707
1748
|
}
|
|
1708
|
-
const
|
|
1749
|
+
const No = {
|
|
1709
1750
|
name: "flip",
|
|
1710
1751
|
enabled: !0,
|
|
1711
1752
|
phase: "main",
|
|
1712
|
-
fn:
|
|
1753
|
+
fn: Vo,
|
|
1713
1754
|
requiresIfExists: ["offset"],
|
|
1714
1755
|
data: {
|
|
1715
1756
|
_skip: !1
|
|
1716
1757
|
}
|
|
1717
1758
|
};
|
|
1718
|
-
function
|
|
1759
|
+
function We(e, t, i) {
|
|
1719
1760
|
return i === void 0 && (i = {
|
|
1720
1761
|
x: 0,
|
|
1721
1762
|
y: 0
|
|
@@ -1726,19 +1767,19 @@ function Ze(e, t, i) {
|
|
|
1726
1767
|
left: e.left - t.width - i.x
|
|
1727
1768
|
};
|
|
1728
1769
|
}
|
|
1729
|
-
function
|
|
1770
|
+
function Fe(e) {
|
|
1730
1771
|
return [H, V, F, Z].some(function(t) {
|
|
1731
1772
|
return e[t] >= 0;
|
|
1732
1773
|
});
|
|
1733
1774
|
}
|
|
1734
|
-
function
|
|
1735
|
-
var t = e.state, i = e.name, s = t.rects.reference, o = t.rects.popper, n = t.modifiersData.preventOverflow,
|
|
1775
|
+
function zo(e) {
|
|
1776
|
+
var t = e.state, i = e.name, s = t.rects.reference, o = t.rects.popper, n = t.modifiersData.preventOverflow, a = Lt(t, {
|
|
1736
1777
|
elementContext: "reference"
|
|
1737
|
-
}), r =
|
|
1778
|
+
}), r = Lt(t, {
|
|
1738
1779
|
altBoundary: !0
|
|
1739
|
-
}),
|
|
1780
|
+
}), l = We(a, s), c = We(r, o, n), h = Fe(l), u = Fe(c);
|
|
1740
1781
|
t.modifiersData[i] = {
|
|
1741
|
-
referenceClippingOffsets:
|
|
1782
|
+
referenceClippingOffsets: l,
|
|
1742
1783
|
popperEscapeOffsets: c,
|
|
1743
1784
|
isReferenceHidden: h,
|
|
1744
1785
|
hasPopperEscaped: u
|
|
@@ -1747,63 +1788,63 @@ function Bo(e) {
|
|
|
1747
1788
|
"data-popper-escaped": u
|
|
1748
1789
|
});
|
|
1749
1790
|
}
|
|
1750
|
-
const
|
|
1791
|
+
const $o = {
|
|
1751
1792
|
name: "hide",
|
|
1752
1793
|
enabled: !0,
|
|
1753
1794
|
phase: "main",
|
|
1754
1795
|
requiresIfExists: ["preventOverflow"],
|
|
1755
|
-
fn:
|
|
1796
|
+
fn: zo
|
|
1756
1797
|
};
|
|
1757
|
-
function
|
|
1798
|
+
function jo(e, t, i) {
|
|
1758
1799
|
var s = z(e), o = [Z, H].indexOf(s) >= 0 ? -1 : 1, n = typeof i == "function" ? i(Object.assign({}, t, {
|
|
1759
1800
|
placement: e
|
|
1760
|
-
})) : i,
|
|
1761
|
-
return
|
|
1801
|
+
})) : i, a = n[0], r = n[1];
|
|
1802
|
+
return a = a || 0, r = (r || 0) * o, [Z, V].indexOf(s) >= 0 ? {
|
|
1762
1803
|
x: r,
|
|
1763
|
-
y:
|
|
1804
|
+
y: a
|
|
1764
1805
|
} : {
|
|
1765
|
-
x:
|
|
1806
|
+
x: a,
|
|
1766
1807
|
y: r
|
|
1767
1808
|
};
|
|
1768
1809
|
}
|
|
1769
|
-
function
|
|
1770
|
-
var t = e.state, i = e.options, s = e.name, o = i.offset, n = o === void 0 ? [0, 0] : o,
|
|
1771
|
-
return h[u] =
|
|
1772
|
-
}, {}), r =
|
|
1773
|
-
t.modifiersData.popperOffsets != null && (t.modifiersData.popperOffsets.x +=
|
|
1810
|
+
function Go(e) {
|
|
1811
|
+
var t = e.state, i = e.options, s = e.name, o = i.offset, n = o === void 0 ? [0, 0] : o, a = qe.reduce(function(h, u) {
|
|
1812
|
+
return h[u] = jo(u, t.rects, n), h;
|
|
1813
|
+
}, {}), r = a[t.placement], l = r.x, c = r.y;
|
|
1814
|
+
t.modifiersData.popperOffsets != null && (t.modifiersData.popperOffsets.x += l, t.modifiersData.popperOffsets.y += c), t.modifiersData[s] = a;
|
|
1774
1815
|
}
|
|
1775
|
-
const
|
|
1816
|
+
const _o = {
|
|
1776
1817
|
name: "offset",
|
|
1777
1818
|
enabled: !0,
|
|
1778
1819
|
phase: "main",
|
|
1779
1820
|
requires: ["popperOffsets"],
|
|
1780
|
-
fn:
|
|
1821
|
+
fn: Go
|
|
1781
1822
|
};
|
|
1782
|
-
function
|
|
1823
|
+
function Uo(e) {
|
|
1783
1824
|
var t = e.state, i = e.name;
|
|
1784
|
-
t.modifiersData[i] =
|
|
1825
|
+
t.modifiersData[i] = oi({
|
|
1785
1826
|
reference: t.rects.reference,
|
|
1786
1827
|
element: t.rects.popper,
|
|
1787
1828
|
placement: t.placement
|
|
1788
1829
|
});
|
|
1789
1830
|
}
|
|
1790
|
-
const
|
|
1831
|
+
const Ko = {
|
|
1791
1832
|
name: "popperOffsets",
|
|
1792
1833
|
enabled: !0,
|
|
1793
1834
|
phase: "read",
|
|
1794
|
-
fn:
|
|
1835
|
+
fn: Uo,
|
|
1795
1836
|
data: {}
|
|
1796
1837
|
};
|
|
1797
|
-
function
|
|
1838
|
+
function qo(e) {
|
|
1798
1839
|
return e === "x" ? "y" : "x";
|
|
1799
1840
|
}
|
|
1800
|
-
function
|
|
1801
|
-
var t = e.state, i = e.options, s = e.name, o = i.mainAxis, n = o === void 0 ? !0 : o,
|
|
1802
|
-
boundary:
|
|
1841
|
+
function Jo(e) {
|
|
1842
|
+
var t = e.state, i = e.options, s = e.name, o = i.mainAxis, n = o === void 0 ? !0 : o, a = i.altAxis, r = a === void 0 ? !1 : a, l = i.boundary, c = i.rootBoundary, h = i.altBoundary, u = i.padding, f = i.tether, p = f === void 0 ? !0 : f, I = i.tetherOffset, b = I === void 0 ? 0 : I, v = Lt(t, {
|
|
1843
|
+
boundary: l,
|
|
1803
1844
|
rootBoundary: c,
|
|
1804
1845
|
padding: u,
|
|
1805
1846
|
altBoundary: h
|
|
1806
|
-
}), O = z(t.placement), E = gt(t.placement), w = !E, y =
|
|
1847
|
+
}), O = z(t.placement), E = gt(t.placement), w = !E, y = ae(O), x = qo(y), m = t.modifiersData.popperOffsets, g = t.rects.reference, C = t.rects.popper, A = typeof b == "function" ? b(Object.assign({}, t.rects, {
|
|
1807
1848
|
placement: t.placement
|
|
1808
1849
|
})) : b, S = typeof A == "number" ? {
|
|
1809
1850
|
mainAxis: A,
|
|
@@ -1811,74 +1852,74 @@ function Go(e) {
|
|
|
1811
1852
|
} : Object.assign({
|
|
1812
1853
|
mainAxis: 0,
|
|
1813
1854
|
altAxis: 0
|
|
1814
|
-
}, A),
|
|
1855
|
+
}, A), T = t.modifiersData.offset ? t.modifiersData.offset[t.placement] : null, R = {
|
|
1815
1856
|
x: 0,
|
|
1816
1857
|
y: 0
|
|
1817
1858
|
};
|
|
1818
1859
|
if (m) {
|
|
1819
1860
|
if (n) {
|
|
1820
|
-
var
|
|
1861
|
+
var k, j = y === "y" ? H : Z, G = y === "y" ? F : V, M = y === "y" ? "height" : "width", D = m[y], ot = D + v[j], _ = D - v[G], nt = p ? -C[M] / 2 : 0, yt = E === mt ? g[M] : C[M], tt = E === mt ? -C[M] : -g[M], rt = t.elements.arrow, J = p && rt ? re(rt) : {
|
|
1821
1862
|
width: 0,
|
|
1822
1863
|
height: 0
|
|
1823
|
-
}, N = t.modifiersData["arrow#persistent"] ? t.modifiersData["arrow#persistent"].padding :
|
|
1824
|
-
m[y] =
|
|
1864
|
+
}, N = t.modifiersData["arrow#persistent"] ? t.modifiersData["arrow#persistent"].padding : ti(), et = N[j], at = N[G], U = Et(0, g[M], J[M]), lt = w ? g[M] / 2 - nt - U - et - S.mainAxis : yt - U - et - S.mainAxis, $t = w ? -g[M] / 2 + nt + U + at + S.mainAxis : tt + U + at + S.mainAxis, ct = t.elements.arrow && kt(t.elements.arrow), jt = ct ? y === "y" ? ct.clientTop || 0 : ct.clientLeft || 0 : 0, Mt = (k = T == null ? void 0 : T[y]) != null ? k : 0, Gt = D + lt - Mt - jt, _t = D + $t - Mt, Pt = Et(p ? Vt(ot, Gt) : ot, D, p ? it(_, _t) : _);
|
|
1865
|
+
m[y] = Pt, R[y] = Pt - D;
|
|
1825
1866
|
}
|
|
1826
1867
|
if (r) {
|
|
1827
|
-
var
|
|
1868
|
+
var Yt, Ut = y === "x" ? H : Z, Kt = y === "x" ? F : V, K = m[x], ht = x === "y" ? "height" : "width", Rt = K + v[Ut], Xt = K - v[Kt], dt = [H, Z].indexOf(O) !== -1, ut = (Yt = T == null ? void 0 : T[x]) != null ? Yt : 0, pt = dt ? Rt : K - g[ht] - C[ht] - ut + S.altAxis, bt = dt ? K + g[ht] + C[ht] - ut - S.altAxis : Xt, wt = p && dt ? Co(pt, K, bt) : Et(p ? pt : Rt, K, p ? bt : Xt);
|
|
1828
1869
|
m[x] = wt, R[x] = wt - K;
|
|
1829
1870
|
}
|
|
1830
1871
|
t.modifiersData[s] = R;
|
|
1831
1872
|
}
|
|
1832
1873
|
}
|
|
1833
|
-
const
|
|
1874
|
+
const Qo = {
|
|
1834
1875
|
name: "preventOverflow",
|
|
1835
1876
|
enabled: !0,
|
|
1836
1877
|
phase: "main",
|
|
1837
|
-
fn:
|
|
1878
|
+
fn: Jo,
|
|
1838
1879
|
requiresIfExists: ["offset"]
|
|
1839
1880
|
};
|
|
1840
|
-
function
|
|
1881
|
+
function tn(e) {
|
|
1841
1882
|
return {
|
|
1842
1883
|
scrollLeft: e.scrollLeft,
|
|
1843
1884
|
scrollTop: e.scrollTop
|
|
1844
1885
|
};
|
|
1845
1886
|
}
|
|
1846
|
-
function
|
|
1847
|
-
return e === B(e) || !W(e) ?
|
|
1887
|
+
function en(e) {
|
|
1888
|
+
return e === B(e) || !W(e) ? le(e) : tn(e);
|
|
1848
1889
|
}
|
|
1849
|
-
function
|
|
1890
|
+
function sn(e) {
|
|
1850
1891
|
var t = e.getBoundingClientRect(), i = ft(t.width) / e.offsetWidth || 1, s = ft(t.height) / e.offsetHeight || 1;
|
|
1851
1892
|
return i !== 1 || s !== 1;
|
|
1852
1893
|
}
|
|
1853
|
-
function
|
|
1894
|
+
function on(e, t, i) {
|
|
1854
1895
|
i === void 0 && (i = !1);
|
|
1855
|
-
var s = W(t), o = W(t) &&
|
|
1896
|
+
var s = W(t), o = W(t) && sn(t), n = Q(t), a = vt(e, o, i), r = {
|
|
1856
1897
|
scrollLeft: 0,
|
|
1857
1898
|
scrollTop: 0
|
|
1858
|
-
},
|
|
1899
|
+
}, l = {
|
|
1859
1900
|
x: 0,
|
|
1860
1901
|
y: 0
|
|
1861
1902
|
};
|
|
1862
|
-
return (s || !s && !i) && ((
|
|
1863
|
-
|
|
1864
|
-
x:
|
|
1865
|
-
y:
|
|
1866
|
-
width:
|
|
1867
|
-
height:
|
|
1903
|
+
return (s || !s && !i) && (($(t) !== "body" || // https://github.com/popperjs/popper-core/issues/1078
|
|
1904
|
+
he(n)) && (r = en(t)), W(t) ? (l = vt(t, !0), l.x += t.clientLeft, l.y += t.clientTop) : n && (l.x = ce(n))), {
|
|
1905
|
+
x: a.left + r.scrollLeft - l.x,
|
|
1906
|
+
y: a.top + r.scrollTop - l.y,
|
|
1907
|
+
width: a.width,
|
|
1908
|
+
height: a.height
|
|
1868
1909
|
};
|
|
1869
1910
|
}
|
|
1870
|
-
function
|
|
1911
|
+
function nn(e) {
|
|
1871
1912
|
var t = /* @__PURE__ */ new Map(), i = /* @__PURE__ */ new Set(), s = [];
|
|
1872
1913
|
e.forEach(function(n) {
|
|
1873
1914
|
t.set(n.name, n);
|
|
1874
1915
|
});
|
|
1875
1916
|
function o(n) {
|
|
1876
1917
|
i.add(n.name);
|
|
1877
|
-
var
|
|
1878
|
-
|
|
1918
|
+
var a = [].concat(n.requires || [], n.requiresIfExists || []);
|
|
1919
|
+
a.forEach(function(r) {
|
|
1879
1920
|
if (!i.has(r)) {
|
|
1880
|
-
var
|
|
1881
|
-
|
|
1921
|
+
var l = t.get(r);
|
|
1922
|
+
l && o(l);
|
|
1882
1923
|
}
|
|
1883
1924
|
}), s.push(n);
|
|
1884
1925
|
}
|
|
@@ -1886,15 +1927,15 @@ function Qo(e) {
|
|
|
1886
1927
|
i.has(n.name) || o(n);
|
|
1887
1928
|
}), s;
|
|
1888
1929
|
}
|
|
1889
|
-
function
|
|
1890
|
-
var t =
|
|
1891
|
-
return
|
|
1930
|
+
function rn(e) {
|
|
1931
|
+
var t = nn(e);
|
|
1932
|
+
return vo.reduce(function(i, s) {
|
|
1892
1933
|
return i.concat(t.filter(function(o) {
|
|
1893
1934
|
return o.phase === s;
|
|
1894
1935
|
}));
|
|
1895
1936
|
}, []);
|
|
1896
1937
|
}
|
|
1897
|
-
function
|
|
1938
|
+
function an(e) {
|
|
1898
1939
|
var t;
|
|
1899
1940
|
return function() {
|
|
1900
1941
|
return t || (t = new Promise(function(i) {
|
|
@@ -1904,7 +1945,7 @@ function en(e) {
|
|
|
1904
1945
|
})), t;
|
|
1905
1946
|
};
|
|
1906
1947
|
}
|
|
1907
|
-
function
|
|
1948
|
+
function ln(e) {
|
|
1908
1949
|
var t = e.reduce(function(i, s) {
|
|
1909
1950
|
var o = i[s.name];
|
|
1910
1951
|
return i[s.name] = o ? Object.assign({}, o, s, {
|
|
@@ -1916,31 +1957,31 @@ function sn(e) {
|
|
|
1916
1957
|
return t[i];
|
|
1917
1958
|
});
|
|
1918
1959
|
}
|
|
1919
|
-
var
|
|
1960
|
+
var Ve = {
|
|
1920
1961
|
placement: "bottom",
|
|
1921
1962
|
modifiers: [],
|
|
1922
1963
|
strategy: "absolute"
|
|
1923
1964
|
};
|
|
1924
|
-
function
|
|
1965
|
+
function Ne() {
|
|
1925
1966
|
for (var e = arguments.length, t = new Array(e), i = 0; i < e; i++)
|
|
1926
1967
|
t[i] = arguments[i];
|
|
1927
1968
|
return !t.some(function(s) {
|
|
1928
1969
|
return !(s && typeof s.getBoundingClientRect == "function");
|
|
1929
1970
|
});
|
|
1930
1971
|
}
|
|
1931
|
-
function
|
|
1972
|
+
function cn(e) {
|
|
1932
1973
|
e === void 0 && (e = {});
|
|
1933
|
-
var t = e, i = t.defaultModifiers, s = i === void 0 ? [] : i, o = t.defaultOptions, n = o === void 0 ?
|
|
1934
|
-
return function(r,
|
|
1974
|
+
var t = e, i = t.defaultModifiers, s = i === void 0 ? [] : i, o = t.defaultOptions, n = o === void 0 ? Ve : o;
|
|
1975
|
+
return function(r, l, c) {
|
|
1935
1976
|
c === void 0 && (c = n);
|
|
1936
1977
|
var h = {
|
|
1937
1978
|
placement: "bottom",
|
|
1938
1979
|
orderedModifiers: [],
|
|
1939
|
-
options: Object.assign({},
|
|
1980
|
+
options: Object.assign({}, Ve, n),
|
|
1940
1981
|
modifiersData: {},
|
|
1941
1982
|
elements: {
|
|
1942
1983
|
reference: r,
|
|
1943
|
-
popper:
|
|
1984
|
+
popper: l
|
|
1944
1985
|
},
|
|
1945
1986
|
attributes: {},
|
|
1946
1987
|
styles: {}
|
|
@@ -1949,10 +1990,10 @@ function on(e) {
|
|
|
1949
1990
|
setOptions: function(O) {
|
|
1950
1991
|
var E = typeof O == "function" ? O(h.options) : O;
|
|
1951
1992
|
b(), h.options = Object.assign({}, n, h.options, E), h.scrollParents = {
|
|
1952
|
-
reference: st(r) ?
|
|
1953
|
-
popper:
|
|
1993
|
+
reference: st(r) ? At(r) : r.contextElement ? At(r.contextElement) : [],
|
|
1994
|
+
popper: At(l)
|
|
1954
1995
|
};
|
|
1955
|
-
var w =
|
|
1996
|
+
var w = rn(ln([].concat(s, h.options.modifiers)));
|
|
1956
1997
|
return h.orderedModifiers = w.filter(function(y) {
|
|
1957
1998
|
return y.enabled;
|
|
1958
1999
|
}), I(), p.update();
|
|
@@ -1965,10 +2006,10 @@ function on(e) {
|
|
|
1965
2006
|
forceUpdate: function() {
|
|
1966
2007
|
if (!f) {
|
|
1967
2008
|
var O = h.elements, E = O.reference, w = O.popper;
|
|
1968
|
-
if (
|
|
2009
|
+
if (Ne(E, w)) {
|
|
1969
2010
|
h.rects = {
|
|
1970
|
-
reference:
|
|
1971
|
-
popper:
|
|
2011
|
+
reference: on(E, kt(w), h.options.strategy === "fixed"),
|
|
2012
|
+
popper: re(w)
|
|
1972
2013
|
}, h.reset = !1, h.placement = h.options.placement, h.orderedModifiers.forEach(function(S) {
|
|
1973
2014
|
return h.modifiersData[S.name] = Object.assign({}, S.data);
|
|
1974
2015
|
});
|
|
@@ -1990,7 +2031,7 @@ function on(e) {
|
|
|
1990
2031
|
},
|
|
1991
2032
|
// Async and optimistically optimized update – it will not be executed if
|
|
1992
2033
|
// not necessary (debounced to run at most once-per-tick)
|
|
1993
|
-
update:
|
|
2034
|
+
update: an(function() {
|
|
1994
2035
|
return new Promise(function(v) {
|
|
1995
2036
|
p.forceUpdate(), v(h);
|
|
1996
2037
|
});
|
|
@@ -1999,7 +2040,7 @@ function on(e) {
|
|
|
1999
2040
|
b(), f = !0;
|
|
2000
2041
|
}
|
|
2001
2042
|
};
|
|
2002
|
-
if (!
|
|
2043
|
+
if (!Ne(r, l))
|
|
2003
2044
|
return p;
|
|
2004
2045
|
p.setOptions(c).then(function(v) {
|
|
2005
2046
|
!f && c.onFirstUpdate && c.onFirstUpdate(v);
|
|
@@ -2027,10 +2068,10 @@ function on(e) {
|
|
|
2027
2068
|
return p;
|
|
2028
2069
|
};
|
|
2029
2070
|
}
|
|
2030
|
-
var
|
|
2031
|
-
defaultModifiers:
|
|
2071
|
+
var hn = [Po, Ko, ko, bo, _o, No, Qo, Ao, $o], dn = /* @__PURE__ */ cn({
|
|
2072
|
+
defaultModifiers: hn
|
|
2032
2073
|
});
|
|
2033
|
-
class
|
|
2074
|
+
class un {
|
|
2034
2075
|
/**
|
|
2035
2076
|
* @param {Array} hotspotsConfig - Hotspot configuration array
|
|
2036
2077
|
* @param {HTMLElement} container - Container element
|
|
@@ -2039,12 +2080,12 @@ class an {
|
|
|
2039
2080
|
* @param {string} options.trigger - 'hover' or 'click' (default: 'hover')
|
|
2040
2081
|
*/
|
|
2041
2082
|
constructor(t, i, s, o = {}) {
|
|
2042
|
-
|
|
2083
|
+
pe(this, "updateHotspotPosition", (t, i) => {
|
|
2043
2084
|
this.currentActiveIndex = t, this.currentOrientation = i;
|
|
2044
|
-
const s =
|
|
2085
|
+
const s = Us(this.hotspotsConfig, t, i);
|
|
2045
2086
|
this.hideHotspots(), s.forEach((o) => this.updateAndShowHotspot(o, t));
|
|
2046
2087
|
});
|
|
2047
|
-
this.container = i, this.popper = null, this.popperInstance = null, this.hotspotsContainer =
|
|
2088
|
+
this.container = i, this.popper = null, this.popperInstance = null, this.hotspotsContainer = hs(this.container), this.hotspotsConfig = to(t), this.shouldHidePopper = !0, this.hidePopper = this.hidePopper.bind(this), this.forceHidePopper = this.forceHidePopper.bind(this), this.imageAspectRatio = s, this.hotspotElements = /* @__PURE__ */ new Map(), this.popperListeners = [], this.trigger = o.trigger || "hover";
|
|
2048
2089
|
const { containerSize: n } = t[0];
|
|
2049
2090
|
this.initialContainerSize = n || [i.offsetWidth, i.offsetHeight], this.initHotspots(), this.observeContainerResize();
|
|
2050
2091
|
}
|
|
@@ -2055,7 +2096,7 @@ class an {
|
|
|
2055
2096
|
}), this.resizeObserver.observe(this.container);
|
|
2056
2097
|
}
|
|
2057
2098
|
updateHotspotsForResize(t, i) {
|
|
2058
|
-
this.hotspotsConfig =
|
|
2099
|
+
this.hotspotsConfig = eo({
|
|
2059
2100
|
newWidth: t,
|
|
2060
2101
|
newHeight: i,
|
|
2061
2102
|
initialContainerSize: this.initialContainerSize,
|
|
@@ -2070,27 +2111,24 @@ class an {
|
|
|
2070
2111
|
}
|
|
2071
2112
|
showPopper({ hotspotElement: t, content: i, id: s, keepOpen: o }) {
|
|
2072
2113
|
this.popperInstance && this.hidePopper();
|
|
2073
|
-
const n =
|
|
2074
|
-
|
|
2075
|
-
|
|
2076
|
-
};
|
|
2077
|
-
this.popper = Ks(i, s), this.popper.setAttribute("data-show", ""), this.currentHotspotElement = t, t.setAttribute("aria-expanded", "true"), t.setAttribute("aria-describedby", `cloudimage-360-popper-${s}`);
|
|
2078
|
-
const l = () => {
|
|
2114
|
+
const n = Js(this.container);
|
|
2115
|
+
this.popper = Qs(i, s), this.popper.setAttribute("data-show", ""), this.currentHotspotElement = t, t.setAttribute("aria-expanded", "true"), t.setAttribute("aria-describedby", `cloudimage-360-popper-${s}`);
|
|
2116
|
+
const a = () => {
|
|
2079
2117
|
this.shouldHidePopper = !1;
|
|
2080
2118
|
}, r = () => {
|
|
2081
2119
|
this.shouldHidePopper = !0, this.checkAndHidePopper();
|
|
2082
|
-
},
|
|
2120
|
+
}, l = () => {
|
|
2083
2121
|
this.shouldHidePopper = !0, this.checkAndHidePopper();
|
|
2084
2122
|
}, c = () => {
|
|
2085
2123
|
this.shouldHidePopper = !1, this.hidePopperTimeout && clearTimeout(this.hidePopperTimeout);
|
|
2086
2124
|
};
|
|
2087
|
-
this.popper.addEventListener("mouseenter",
|
|
2088
|
-
{ element: this.popper, event: "mouseenter", handler:
|
|
2125
|
+
this.popper.addEventListener("mouseenter", a), this.popper.addEventListener("mouseleave", r), t.addEventListener("mouseleave", l), t.addEventListener("mouseenter", c), this.popperListeners.push(
|
|
2126
|
+
{ element: this.popper, event: "mouseenter", handler: a },
|
|
2089
2127
|
{ element: this.popper, event: "mouseleave", handler: r },
|
|
2090
|
-
{ element: t, event: "mouseleave", handler:
|
|
2128
|
+
{ element: t, event: "mouseleave", handler: l },
|
|
2091
2129
|
{ element: t, event: "mouseenter", handler: c }
|
|
2092
2130
|
), this.popperInstance = {
|
|
2093
|
-
...
|
|
2131
|
+
...dn(t, this.popper, n),
|
|
2094
2132
|
keepOpen: o,
|
|
2095
2133
|
instanceId: s
|
|
2096
2134
|
};
|
|
@@ -2099,7 +2137,7 @@ class an {
|
|
|
2099
2137
|
var t;
|
|
2100
2138
|
this.shouldHidePopper && !((t = this.popperInstance) != null && t.keepOpen) && (this.hidePopperTimeout = setTimeout(() => {
|
|
2101
2139
|
this.shouldHidePopper && this.hidePopper();
|
|
2102
|
-
},
|
|
2140
|
+
}, Ri));
|
|
2103
2141
|
}
|
|
2104
2142
|
hidePopper() {
|
|
2105
2143
|
if (this.hidePopperTimeout && (clearTimeout(this.hidePopperTimeout), this.hidePopperTimeout = null), this.cleanupPopperListeners(), this.currentHotspotElement && (this.currentHotspotElement.setAttribute("aria-expanded", "false"), this.currentHotspotElement.removeAttribute("aria-describedby"), this.currentHotspotElement = null), this.popperInstance && (this.popperInstance.destroy(), this.popperInstance = null), this.popper) {
|
|
@@ -2107,7 +2145,7 @@ class an {
|
|
|
2107
2145
|
const t = this.popper;
|
|
2108
2146
|
this.popper = null, setTimeout(() => {
|
|
2109
2147
|
t.remove();
|
|
2110
|
-
},
|
|
2148
|
+
}, Xi);
|
|
2111
2149
|
}
|
|
2112
2150
|
this.shouldHidePopper = !0;
|
|
2113
2151
|
}
|
|
@@ -2119,18 +2157,18 @@ class an {
|
|
|
2119
2157
|
this.shouldHidePopper = !0, this.popperInstance && (this.popperInstance.keepOpen = !1), this.hidePopper();
|
|
2120
2158
|
}
|
|
2121
2159
|
createHotspot(t) {
|
|
2122
|
-
const { id: i,
|
|
2123
|
-
(
|
|
2160
|
+
const { id: i, keepOpen: s, onClick: o, label: n } = t, a = Re(t), r = Ks(i, n);
|
|
2161
|
+
(o || a && this.trigger === "click") && (r.style.cursor = "pointer"), r.onclick = (l) => {
|
|
2124
2162
|
var c;
|
|
2125
|
-
|
|
2126
|
-
},
|
|
2163
|
+
l.stopPropagation(), a && this.trigger === "click" && (((c = this.popperInstance) == null ? void 0 : c.instanceId) === i ? this.hidePopper() : this.showPopper({ hotspotElement: r, content: a, id: i, keepOpen: s })), o == null || o(l, this.popperInstance, i);
|
|
2164
|
+
}, a && (this.trigger === "hover" && (r.addEventListener(
|
|
2127
2165
|
"mouseenter",
|
|
2128
|
-
() => this.showPopper({ hotspotElement: r, content:
|
|
2166
|
+
() => this.showPopper({ hotspotElement: r, content: a, id: i, keepOpen: s })
|
|
2129
2167
|
), r.addEventListener("mouseleave", () => {
|
|
2130
2168
|
this.shouldHidePopper = !0, this.checkAndHidePopper();
|
|
2131
2169
|
})), r.addEventListener(
|
|
2132
2170
|
"focus",
|
|
2133
|
-
() => this.showPopper({ hotspotElement: r, content:
|
|
2171
|
+
() => this.showPopper({ hotspotElement: r, content: a, id: i, keepOpen: s })
|
|
2134
2172
|
), r.addEventListener("blur", () => {
|
|
2135
2173
|
this.shouldHidePopper = !0, this.checkAndHidePopper();
|
|
2136
2174
|
})), this.hotspotsContainer.appendChild(r);
|
|
@@ -2141,20 +2179,22 @@ class an {
|
|
|
2141
2179
|
});
|
|
2142
2180
|
}
|
|
2143
2181
|
updateAndShowHotspot(t, i) {
|
|
2144
|
-
const { positions: s, id: o } = t, { x: n, y:
|
|
2145
|
-
r && (r.style.translate = `${n}px ${
|
|
2182
|
+
const { positions: s, id: o } = t, { x: n, y: a } = s[i] ?? {}, r = this.hotspotsContainer.querySelector(`[data-hotspot-id="${o}"]`);
|
|
2183
|
+
r && (r.style.translate = `${n}px ${a}px`, r.style.opacity = 1, r.style.pointerEvents = "all");
|
|
2146
2184
|
}
|
|
2147
2185
|
/**
|
|
2148
2186
|
* Shows the popper for a specific hotspot by ID
|
|
2149
2187
|
* @param {string} hotspotId - The ID of the hotspot to show
|
|
2150
2188
|
*/
|
|
2151
2189
|
showHotspotById(t) {
|
|
2152
|
-
const i = this.hotspotsConfig.find((
|
|
2153
|
-
if (!i
|
|
2154
|
-
const s =
|
|
2155
|
-
|
|
2156
|
-
|
|
2157
|
-
|
|
2190
|
+
const i = this.hotspotsConfig.find((n) => n.id === t);
|
|
2191
|
+
if (!i) return;
|
|
2192
|
+
const s = Re(i);
|
|
2193
|
+
if (!s) return;
|
|
2194
|
+
const o = this.hotspotsContainer.querySelector(`[data-hotspot-id="${t}"]`);
|
|
2195
|
+
o && o.style.opacity === "1" && this.showPopper({
|
|
2196
|
+
hotspotElement: o,
|
|
2197
|
+
content: s,
|
|
2158
2198
|
id: t,
|
|
2159
2199
|
keepOpen: i.keepOpen
|
|
2160
2200
|
});
|
|
@@ -2169,12 +2209,12 @@ class an {
|
|
|
2169
2209
|
this.hidePopperTimeout && clearTimeout(this.hidePopperTimeout), this.resizeObserver.disconnect(), this.hidePopper(), this.hotspotElements.clear(), this.hotspotsContainer.innerHTML = "";
|
|
2170
2210
|
}
|
|
2171
2211
|
}
|
|
2172
|
-
const
|
|
2173
|
-
class
|
|
2212
|
+
const ze = typeof navigator < "u" && /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);
|
|
2213
|
+
class Nt {
|
|
2174
2214
|
constructor(t, i, s) {
|
|
2175
2215
|
this.container = t, this.isClicked = !1, this.fullscreenView = !!s, this.imagesX = [], this.imagesY = [];
|
|
2176
2216
|
const o = Math.round(window.devicePixelRatio || 1);
|
|
2177
|
-
this.devicePixelRatio =
|
|
2217
|
+
this.devicePixelRatio = ze ? Math.min(o, 2) : o, 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 = Ws(), 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.useMainThreadCanvas = ze, this.canvasWorker = this.useMainThreadCanvas ? new zs() : new Ns(), 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);
|
|
2178
2218
|
}
|
|
2179
2219
|
/**
|
|
2180
2220
|
* Close ImageBitmap objects to free GPU memory
|
|
@@ -2191,12 +2231,12 @@ class Vt {
|
|
|
2191
2231
|
typeof s == "function" && s({ ...i, viewerId: this.id });
|
|
2192
2232
|
}
|
|
2193
2233
|
announce(t) {
|
|
2194
|
-
|
|
2234
|
+
us(this.ariaLiveRegion, t);
|
|
2195
2235
|
}
|
|
2196
2236
|
mouseDown(t) {
|
|
2197
2237
|
if (!this.isReady || this.glass) return;
|
|
2198
2238
|
const i = t.target;
|
|
2199
|
-
if (i && i.closest && (i.closest(".cloudimage-360-button") || i.closest(".cloudimage-360-hotspot-timeline
|
|
2239
|
+
if (i && i.closest && (i.closest(".cloudimage-360-button") || i.closest(".cloudimage-360-hotspot-timeline") || i.closest(".cloudimage-360-hotspot")))
|
|
2200
2240
|
return;
|
|
2201
2241
|
const { pageX: s, pageY: o } = t;
|
|
2202
2242
|
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: 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);
|
|
@@ -2205,20 +2245,20 @@ class Vt {
|
|
|
2205
2245
|
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");
|
|
2206
2246
|
}
|
|
2207
2247
|
startInertia() {
|
|
2208
|
-
const s = this.fullscreenView ? document.body : this.container, o = this.dragSpeed /
|
|
2248
|
+
const s = this.fullscreenView ? document.body : this.container, o = this.dragSpeed / ye, n = o * (this.amountX / s.offsetWidth), a = o * (this.amountY / s.offsetHeight), r = () => {
|
|
2209
2249
|
if (this.velocityX *= 0.95, this.velocityY *= 0.95, Math.abs(this.velocityX) < 0.01 && Math.abs(this.velocityY) < 0.01) {
|
|
2210
2250
|
this.inertiaAnimationId = null;
|
|
2211
2251
|
return;
|
|
2212
2252
|
}
|
|
2213
|
-
const
|
|
2214
|
-
deltaX:
|
|
2253
|
+
const l = this.velocityX * 16, c = this.velocityY * 16, h = Me({
|
|
2254
|
+
deltaX: l,
|
|
2215
2255
|
deltaY: c,
|
|
2216
2256
|
reversed: this.dragReverse,
|
|
2217
2257
|
allowSpinX: this.allowSpinX,
|
|
2218
2258
|
allowSpinY: this.allowSpinY
|
|
2219
2259
|
});
|
|
2220
2260
|
if (h) {
|
|
2221
|
-
const u = this.allowSpinX ? Math.max(1, Math.abs(Math.round(
|
|
2261
|
+
const u = this.allowSpinX ? Math.max(1, Math.abs(Math.round(l * n))) : 0, f = this.allowSpinY ? Math.max(1, Math.abs(Math.round(c * a))) : 0;
|
|
2222
2262
|
(u > 0 || f > 0) && this.onMoveHandler(h, u, f);
|
|
2223
2263
|
}
|
|
2224
2264
|
this.inertiaAnimationId = requestAnimationFrame(r);
|
|
@@ -2232,17 +2272,17 @@ class Vt {
|
|
|
2232
2272
|
const f = performance.now(), p = f - this.lastDragTime;
|
|
2233
2273
|
p > 0 && p < 100 && (this.velocityX = (t - this.lastDragX) / p, this.velocityY = (i - this.lastDragY) / p), this.lastDragTime = f, this.lastDragX = t, this.lastDragY = i;
|
|
2234
2274
|
}
|
|
2235
|
-
this.draggingDirection =
|
|
2275
|
+
this.draggingDirection = Me({
|
|
2236
2276
|
deltaX: s,
|
|
2237
2277
|
deltaY: o,
|
|
2238
2278
|
reversed: this.dragReverse,
|
|
2239
2279
|
allowSpinX: this.allowSpinX,
|
|
2240
2280
|
allowSpinY: this.allowSpinY
|
|
2241
2281
|
}) || this.draggingDirection;
|
|
2242
|
-
const n = this.fullscreenView ? document.body : this.container,
|
|
2282
|
+
const n = this.fullscreenView ? document.body : this.container, a = this.dragSpeed / ye, r = a * (this.amountX / n.offsetWidth), l = a * (this.amountY / n.offsetHeight), c = this.allowSpinX ? Math.abs(Math.round(s * r)) : 0, h = this.allowSpinY ? Math.abs(Math.round(o * l)) : 0;
|
|
2243
2283
|
(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(() => {
|
|
2244
2284
|
this.isDragging || (this.isDragging = !0, this.emit("onDragStart"));
|
|
2245
|
-
},
|
|
2285
|
+
}, Yi));
|
|
2246
2286
|
}
|
|
2247
2287
|
mouseMove(t) {
|
|
2248
2288
|
!this.isReady || !this.isClicked && !this.isZoomed || this.glass || (this.isZoomed || this.hideAllIcons(), this.drag(t.pageX, t.pageY), this.isZoomed && this.applyZoom(t));
|
|
@@ -2250,7 +2290,7 @@ class Vt {
|
|
|
2250
2290
|
mouseClick(t) {
|
|
2251
2291
|
if (!this.isReady || this.isDragging) return;
|
|
2252
2292
|
const i = t.target;
|
|
2253
|
-
if (!(i && i.closest && (i.closest(".cloudimage-360-button") || i.closest(".cloudimage-360-hotspot-timeline
|
|
2293
|
+
if (!(i && i.closest && (i.closest(".cloudimage-360-button") || i.closest(".cloudimage-360-hotspot-timeline") || i.closest(".cloudimage-360-hotspot")))) {
|
|
2254
2294
|
if (this.dragJustEnded) {
|
|
2255
2295
|
this.dragJustEnded = !1;
|
|
2256
2296
|
return;
|
|
@@ -2269,17 +2309,17 @@ class Vt {
|
|
|
2269
2309
|
mouseDblClick(t) {
|
|
2270
2310
|
if (!this.isReady) return;
|
|
2271
2311
|
const i = t.target;
|
|
2272
|
-
i && i.closest && (i.closest(".cloudimage-360-button") || i.closest(".cloudimage-360-hotspot-timeline
|
|
2312
|
+
i && i.closest && (i.closest(".cloudimage-360-button") || i.closest(".cloudimage-360-hotspot-timeline") || i.closest(".cloudimage-360-hotspot")) || this.pointerZoomTrigger === "dblclick" && this.pointerZoom && !this.glass && !this.touchDevice && this.toggleZoom(t);
|
|
2273
2313
|
}
|
|
2274
2314
|
loadHigherQualityImages(t, i) {
|
|
2275
|
-
const s =
|
|
2276
|
-
|
|
2315
|
+
const s = Ot(this.srcXConfig, t), o = this.allowSpinY ? Ot(this.srcYConfig, t) : null;
|
|
2316
|
+
we({
|
|
2277
2317
|
cdnPathX: s,
|
|
2278
2318
|
cdnPathY: o,
|
|
2279
2319
|
configX: this.srcXConfig,
|
|
2280
2320
|
configY: this.srcYConfig,
|
|
2281
|
-
onAllImagesLoad: (n,
|
|
2282
|
-
this.closeImageBitmaps(this.imagesX), this.closeImageBitmaps(this.imagesY), this.imagesX = n, this.imagesY =
|
|
2321
|
+
onAllImagesLoad: (n, a) => {
|
|
2322
|
+
this.closeImageBitmaps(this.imagesX), this.closeImageBitmaps(this.imagesY), this.imagesX = n, this.imagesY = a, i();
|
|
2283
2323
|
},
|
|
2284
2324
|
onError: (n) => this.emit("onError", n)
|
|
2285
2325
|
});
|
|
@@ -2294,13 +2334,13 @@ class Vt {
|
|
|
2294
2334
|
if (this.isZoomed)
|
|
2295
2335
|
this.showTransitionOverlay(), setTimeout(() => {
|
|
2296
2336
|
this.removeZoom();
|
|
2297
|
-
},
|
|
2337
|
+
}, Zt);
|
|
2298
2338
|
else {
|
|
2299
2339
|
let i = (this.fullscreenView || this.pointerZoom ? document.body : this.container).offsetWidth;
|
|
2300
2340
|
this.hideHotspots(), this.showLoadingSpinner(), this.loadHigherQualityImages(i, () => {
|
|
2301
2341
|
this.showTransitionOverlay(), setTimeout(() => {
|
|
2302
2342
|
this.applyZoom(t);
|
|
2303
|
-
},
|
|
2343
|
+
}, Zt);
|
|
2304
2344
|
});
|
|
2305
2345
|
}
|
|
2306
2346
|
}
|
|
@@ -2314,19 +2354,19 @@ class Vt {
|
|
|
2314
2354
|
this.hideHotspots(), this.hideAllIcons(), this.showLoadingSpinner(), this.loadHigherQualityImages(i, () => {
|
|
2315
2355
|
this.showTransitionOverlay(), setTimeout(() => {
|
|
2316
2356
|
this.applyZoom(t);
|
|
2317
|
-
},
|
|
2357
|
+
}, Zt);
|
|
2318
2358
|
});
|
|
2319
2359
|
}
|
|
2320
2360
|
zoomOut(t) {
|
|
2321
2361
|
this.isZoomed && (t == null || t.stopPropagation(), this.showTransitionOverlay(), setTimeout(() => {
|
|
2322
2362
|
this.removeZoom();
|
|
2323
|
-
},
|
|
2363
|
+
}, Zt));
|
|
2324
2364
|
}
|
|
2325
2365
|
mouseLeave() {
|
|
2326
2366
|
this.isZoomed && this.removeZoom();
|
|
2327
2367
|
}
|
|
2328
2368
|
applyZoom(t) {
|
|
2329
|
-
const { offsetX: i, offsetY: s } =
|
|
2369
|
+
const { offsetX: i, offsetY: s } = Ps(t, this.canvas, this.devicePixelRatio);
|
|
2330
2370
|
this.isZoomed || (this.isZoomed = !0, this.hideAllIcons(), this.hideLoadingSpinner(), this.hideTransitionOverlay(), this.showZoomOutIcon(), this.emit("onZoomIn", { zoomLevel: this.pointerZoom }), this.announce("Zoomed in. Move mouse to pan. Click to zoom out.")), this.updateView(this.pointerZoom, i, s);
|
|
2331
2371
|
}
|
|
2332
2372
|
touchOutside(t) {
|
|
@@ -2336,12 +2376,12 @@ class Vt {
|
|
|
2336
2376
|
touchStart(t) {
|
|
2337
2377
|
if (!this.isReady || this.glass || !t.touches || !t.touches.length) return;
|
|
2338
2378
|
const i = t.target;
|
|
2339
|
-
if (i && i.closest && (i.closest(".cloudimage-360-button") || i.closest(".cloudimage-360-hotspot-timeline
|
|
2379
|
+
if (i && i.closest && (i.closest(".cloudimage-360-button") || i.closest(".cloudimage-360-hotspot-timeline") || i.closest(".cloudimage-360-hotspot")))
|
|
2340
2380
|
return;
|
|
2341
2381
|
if (this.hideHints(), t.touches.length === 2 && this.pinchZoom && !this.isDragging) {
|
|
2342
2382
|
t.preventDefault(), this.isPinching = !0, this.isClicked = !1, this.inertiaAnimationId && (cancelAnimationFrame(this.inertiaAnimationId), this.inertiaAnimationId = null);
|
|
2343
|
-
const n = t.touches[0],
|
|
2344
|
-
if (this.initialPinchDistance = this.getPinchDistance(n,
|
|
2383
|
+
const n = t.touches[0], a = t.touches[1];
|
|
2384
|
+
if (this.initialPinchDistance = this.getPinchDistance(n, a), (this.autoplay || this.loopTimeoutId) && (this.stopAutoplay(), this.autoplay = !1), !this.isZoomed && this.pinchZoomLevel === 1) {
|
|
2345
2385
|
const r = (this.fullscreenView ? document.body : this.container).offsetWidth;
|
|
2346
2386
|
this.hideHotspots(), this.loadHigherQualityImages(r, () => {
|
|
2347
2387
|
});
|
|
@@ -2383,15 +2423,15 @@ class Vt {
|
|
|
2383
2423
|
if (!this.isReady || this.glass) return;
|
|
2384
2424
|
if (this.isPinching && t.touches.length === 2) {
|
|
2385
2425
|
t.preventDefault();
|
|
2386
|
-
const o = t.touches[0], n = t.touches[1],
|
|
2426
|
+
const o = t.touches[0], n = t.touches[1], a = this.getPinchDistance(o, n);
|
|
2387
2427
|
if (this.initialPinchDistance === 0) {
|
|
2388
|
-
this.initialPinchDistance =
|
|
2428
|
+
this.initialPinchDistance = a;
|
|
2389
2429
|
return;
|
|
2390
2430
|
}
|
|
2391
|
-
const r =
|
|
2392
|
-
if (this.initialPinchDistance =
|
|
2431
|
+
const r = a / this.initialPinchDistance, l = Math.max(1, Math.min(this.pinchZoomLevel * r, be));
|
|
2432
|
+
if (this.initialPinchDistance = a, this.pinchZoomLevel = l, !this.canvas) return;
|
|
2393
2433
|
const c = this.canvas.getBoundingClientRect(), h = c.width / 2 * this.devicePixelRatio, u = c.height / 2 * this.devicePixelRatio;
|
|
2394
|
-
|
|
2434
|
+
l > 1 ? (this.isZoomed = !0, this.hideAllIcons(), this.updateView(l, h, u), (!this.pinchZoomEmitted || l > this.lastEmittedZoom) && (this.emit("onZoomIn", { zoomLevel: l }), this.pinchZoomEmitted = !0, this.lastEmittedZoom = l)) : (this.isZoomed = !1, this.panOffsetX = 0, this.panOffsetY = 0, this.updateView());
|
|
2395
2435
|
return;
|
|
2396
2436
|
}
|
|
2397
2437
|
if (!this.isClicked || !t.touches || !t.touches[0]) return;
|
|
@@ -2406,7 +2446,7 @@ class Vt {
|
|
|
2406
2446
|
keyDown(t) {
|
|
2407
2447
|
if (!this.isReady) return;
|
|
2408
2448
|
const { keyCode: i } = t, s = this.keysReverse;
|
|
2409
|
-
switch (this.autoplay && this.stopAutoplay(),
|
|
2449
|
+
switch (this.autoplay && this.stopAutoplay(), ke(i, this.allowSpinY) && (this.hasInteracted = !0, this.hideAllIcons(), this.hideHints()), i) {
|
|
2410
2450
|
case 37:
|
|
2411
2451
|
s ? this.moveLeft() : this.moveRight();
|
|
2412
2452
|
break;
|
|
@@ -2423,7 +2463,7 @@ class Vt {
|
|
|
2423
2463
|
}
|
|
2424
2464
|
keyUp(t) {
|
|
2425
2465
|
const { keyCode: i } = t;
|
|
2426
|
-
|
|
2466
|
+
ke(i, this.allowSpinY) && this.showAllIcons();
|
|
2427
2467
|
}
|
|
2428
2468
|
moveActiveXIndexUp(t) {
|
|
2429
2469
|
this.orientation = Y.X, this.activeImageX = (this.activeImageX + t) % this.amountX;
|
|
@@ -2480,13 +2520,13 @@ class Vt {
|
|
|
2480
2520
|
drawImageOnCanvas(t, i = 1, s = 0, o = 0) {
|
|
2481
2521
|
this.pendingDrawData = { imageData: t, zoomScale: i, pointerX: s, pointerY: o }, this.drawFrameRequested || (this.drawFrameRequested = !0, requestAnimationFrame(() => {
|
|
2482
2522
|
if (this.drawFrameRequested = !1, this.pendingDrawData) {
|
|
2483
|
-
const { imageData: n, zoomScale:
|
|
2523
|
+
const { imageData: n, zoomScale: a, pointerX: r, pointerY: l } = this.pendingDrawData;
|
|
2484
2524
|
this.canvasWorker.postMessage({
|
|
2485
2525
|
action: "drawImageOnCanvas",
|
|
2486
2526
|
imageData: n,
|
|
2487
|
-
zoomScale:
|
|
2527
|
+
zoomScale: a,
|
|
2488
2528
|
pointerX: r,
|
|
2489
|
-
pointerY:
|
|
2529
|
+
pointerY: l
|
|
2490
2530
|
});
|
|
2491
2531
|
}
|
|
2492
2532
|
}));
|
|
@@ -2505,34 +2545,34 @@ class Vt {
|
|
|
2505
2545
|
this.createContainers(t), this.adaptCanvasSize(i), this.drawImageOnCanvas(i);
|
|
2506
2546
|
}
|
|
2507
2547
|
onAllImagesLoaded() {
|
|
2508
|
-
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
|
|
2548
|
+
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 un(this.hotspots, this.innerBox, this.imageAspectRatio, {
|
|
2509
2549
|
trigger: this.hotspotTrigger
|
|
2510
|
-
}), 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) {
|
|
2511
|
-
const t = this.hints === !0 || this.hints === void 0 ?
|
|
2512
|
-
t && t.length > 0 && (this.hintsOverlay =
|
|
2550
|
+
}), this.hotspotsInstance.updateHotspotPosition(this.activeImageX, this.orientation), 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) {
|
|
2551
|
+
const t = this.hints === !0 || this.hints === void 0 ? Oe(this.viewerConfig, this.touchDevice) : this.hints;
|
|
2552
|
+
t && t.length > 0 && (this.hintsOverlay = xe(this.innerBox, t, {
|
|
2513
2553
|
pointerZoomTrigger: this.pointerZoomTrigger
|
|
2514
|
-
}),
|
|
2554
|
+
}), Ee(this.hintsOverlay));
|
|
2515
2555
|
}
|
|
2516
|
-
this.autoplay && (this.hideAllIcons(),
|
|
2556
|
+
this.autoplay && (this.hideAllIcons(), Fs(this.play.bind(this))());
|
|
2517
2557
|
}
|
|
2518
2558
|
magnify(t) {
|
|
2519
2559
|
t.stopPropagation();
|
|
2520
|
-
const { src: i } = this.orientation === Y.Y ? this.imagesY[this.activeImageY] : this.imagesX[this.activeImageX], o = (this.fullscreenView ? document.body : this.container).offsetWidth * this.magnifier, n =
|
|
2521
|
-
this.showLoadingSpinner(), this.createGlass(),
|
|
2522
|
-
this.hideLoadingSpinner(), this.magnified = !0,
|
|
2523
|
-
}, (
|
|
2560
|
+
const { src: i } = this.orientation === Y.Y ? this.imagesY[this.activeImageY] : this.imagesX[this.activeImageX], o = (this.fullscreenView ? document.body : this.container).offsetWidth * this.magnifier, n = $i(i, o);
|
|
2561
|
+
this.showLoadingSpinner(), this.createGlass(), Ts(n, (l) => {
|
|
2562
|
+
this.hideLoadingSpinner(), this.magnified = !0, Ms(t, this.innerBox, this.offset, l, this.glass, this.magnifier);
|
|
2563
|
+
}, (l) => {
|
|
2524
2564
|
this.hideLoadingSpinner(), this.removeGlass(), this.emit("onError", {
|
|
2525
|
-
error: { message:
|
|
2565
|
+
error: { message: l.message, url: l.url },
|
|
2526
2566
|
errorCount: 1,
|
|
2527
2567
|
totalImages: 1,
|
|
2528
|
-
errors: [{ message:
|
|
2568
|
+
errors: [{ message: l.message, url: l.url }]
|
|
2529
2569
|
});
|
|
2530
2570
|
});
|
|
2531
2571
|
}
|
|
2532
2572
|
openFullscreenModal(t) {
|
|
2533
2573
|
t.stopPropagation(), this.hideHotspotPopper(), this.releaseMemory(), window.document.body.style.overflow = "hidden";
|
|
2534
|
-
const i =
|
|
2535
|
-
this.fullscreenInstance = new
|
|
2574
|
+
const i = as(this.container);
|
|
2575
|
+
this.fullscreenInstance = new Nt(i, this.viewerConfig, !0), this.fullscreenInstance.originalViewer = this, this.boundResizeHandler = () => {
|
|
2536
2576
|
this.fullscreenInstance && this.closeFullscreenModal(new Event("resize"));
|
|
2537
2577
|
}, window.addEventListener("resize", this.boundResizeHandler), this.emit("onFullscreenOpen"), this.announce("Opened fullscreen mode. Press Escape to exit.");
|
|
2538
2578
|
}
|
|
@@ -2556,7 +2596,7 @@ class Vt {
|
|
|
2556
2596
|
bottom: this.moveBottom.bind(this)
|
|
2557
2597
|
};
|
|
2558
2598
|
this.loopTimeoutId = window.setInterval(() => {
|
|
2559
|
-
if (this.playOnce &&
|
|
2599
|
+
if (this.playOnce && Hs({
|
|
2560
2600
|
autoplayBehavior: this.autoplayBehavior,
|
|
2561
2601
|
activeImageX: this.activeImageX,
|
|
2562
2602
|
activeImageY: this.activeImageY,
|
|
@@ -2567,7 +2607,7 @@ class Vt {
|
|
|
2567
2607
|
this.stopAutoplay();
|
|
2568
2608
|
return;
|
|
2569
2609
|
}
|
|
2570
|
-
|
|
2610
|
+
Zs({
|
|
2571
2611
|
autoplayBehavior: this.autoplayBehavior,
|
|
2572
2612
|
activeImageX: this.activeImageX,
|
|
2573
2613
|
activeImageY: this.activeImageY,
|
|
@@ -2575,9 +2615,9 @@ class Vt {
|
|
|
2575
2615
|
amountY: this.amountY,
|
|
2576
2616
|
autoplayReverse: this.autoplayReverse,
|
|
2577
2617
|
spinDirection: this.spinDirection
|
|
2578
|
-
}) && (this.spinDirection =
|
|
2618
|
+
}) && (this.spinDirection = Bs(this.spinDirection));
|
|
2579
2619
|
const n = this.spinDirection === "y";
|
|
2580
|
-
|
|
2620
|
+
Xs({
|
|
2581
2621
|
autoplayBehavior: this.autoplayBehavior,
|
|
2582
2622
|
spinY: n,
|
|
2583
2623
|
reversed: this.autoplayReverse,
|
|
@@ -2587,14 +2627,14 @@ class Vt {
|
|
|
2587
2627
|
}
|
|
2588
2628
|
stopAutoplay() {
|
|
2589
2629
|
if (this.showAllIcons(), this.autoplay = !1, window.clearTimeout(this.loopTimeoutId), this.loopTimeoutId = null, this.emit("onAutoplayStop"), this.hints !== !1 && !this.hintsOverlay && !this.hintsHidden) {
|
|
2590
|
-
const t = this.hints === !0 ?
|
|
2591
|
-
t && t.length > 0 && (this.hintsOverlay =
|
|
2630
|
+
const t = this.hints === !0 ? Oe(this.viewerConfig, this.touchDevice) : this.hints;
|
|
2631
|
+
t && t.length > 0 && (this.hintsOverlay = xe(this.innerBox, t, {
|
|
2592
2632
|
pointerZoomTrigger: this.pointerZoomTrigger
|
|
2593
|
-
}),
|
|
2633
|
+
}), Ee(this.hintsOverlay));
|
|
2594
2634
|
}
|
|
2595
2635
|
}
|
|
2596
2636
|
destroy() {
|
|
2597
|
-
this.stopAutoplay(), this.inertiaAnimationId && (cancelAnimationFrame(this.inertiaAnimationId), this.inertiaAnimationId = null), this.removeEvents(), this.closeImageBitmaps(this.imagesX), this.closeImageBitmaps(this.imagesY), this.imagesX = [], this.imagesY = [], this.canvasWorker && (this.canvasWorker.terminate(), this.canvasWorker = null), this.hotspotsInstance && this.hotspotsInstance.destroy(), this.hintsOverlay && this.hintsOverlay.parentNode && (this.hintsOverlay.parentNode.removeChild(this.hintsOverlay), this.hintsOverlay = null), this.hotspotTimeline && this.hotspotTimeline.parentNode && (this.hotspotTimeline.parentNode.removeChild(this.hotspotTimeline), this.hotspotTimeline = null, this.hotspotTimelineIndicator = null), this.container && (this.container.classList.remove("ci360-theme-dark"), this.container.innerHTML = "");
|
|
2637
|
+
this.stopAutoplay(), this.inertiaAnimationId && (cancelAnimationFrame(this.inertiaAnimationId), this.inertiaAnimationId = null), this.removeEvents(), this.closeImageBitmaps(this.imagesX), this.closeImageBitmaps(this.imagesY), this.imagesX = [], this.imagesY = [], this.canvasWorker && (this.canvasWorker.terminate(), this.canvasWorker = null), this.hotspotsInstance && this.hotspotsInstance.destroy(), this.hintsOverlay && this.hintsOverlay.parentNode && (this.hintsOverlay.parentNode.removeChild(this.hintsOverlay), this.hintsOverlay = null), this.hotspotTimeline && this.hotspotTimeline.parentNode && (this.hotspotTimeline.parentNode.removeChild(this.hotspotTimeline), this.hotspotTimeline = null, this.hotspotTimelineIndicator = null), this.innerBox && this.innerBox.classList.remove("has-hotspot-timeline"), this.container && (this.container.classList.remove("ci360-theme-dark"), this.container.innerHTML = "");
|
|
2598
2638
|
}
|
|
2599
2639
|
/**
|
|
2600
2640
|
* Release memory by closing ImageBitmap objects without destroying the viewer.
|
|
@@ -2617,7 +2657,7 @@ class Vt {
|
|
|
2617
2657
|
});
|
|
2618
2658
|
}
|
|
2619
2659
|
addInitialIcon() {
|
|
2620
|
-
this.initialIcon || this.hide360Logo || (this.initialIcon =
|
|
2660
|
+
this.initialIcon || this.hide360Logo || (this.initialIcon = Qi(this.logoSrc), this.innerBox.appendChild(this.initialIcon));
|
|
2621
2661
|
}
|
|
2622
2662
|
showInitialIcon() {
|
|
2623
2663
|
!this.initialIcon || this.hasInteracted || (this.initialIcon.style.opacity = 1);
|
|
@@ -2632,7 +2672,7 @@ class Vt {
|
|
|
2632
2672
|
this.showAllIcons(), this.innerBox.removeChild(this.glass), this.glass = null, this.magnified = !1;
|
|
2633
2673
|
}
|
|
2634
2674
|
addMagnifierIcon() {
|
|
2635
|
-
this.pointerZoom && (this.magnifierIcon =
|
|
2675
|
+
this.pointerZoom && (this.magnifierIcon = os(), this.magnifierIcon.onclick = this.zoomIn.bind(this), this.iconsContainer.appendChild(this.magnifierIcon), this.zoomOutIcon = ns(), this.zoomOutIcon.onclick = this.zoomOut.bind(this), this.zoomOutIcon.style.display = "none", this.iconsContainer.appendChild(this.zoomOutIcon));
|
|
2636
2676
|
}
|
|
2637
2677
|
showMagnifierIcon() {
|
|
2638
2678
|
this.magnifierIcon && (this.magnifierIcon.style.display = "", this.magnifierIcon.style.visibility = "visible", this.magnifierIcon.style.opacity = 1);
|
|
@@ -2647,10 +2687,10 @@ class Vt {
|
|
|
2647
2687
|
this.zoomOutIcon && (this.zoomOutIcon.style.display = "none", this.zoomOutIcon.style.visibility = "hidden", this.zoomOutIcon.style.opacity = 0);
|
|
2648
2688
|
}
|
|
2649
2689
|
addFullscreenIcon() {
|
|
2650
|
-
this.fullscreen && (this.fullscreenIcon =
|
|
2690
|
+
this.fullscreen && (this.fullscreenIcon = is(), this.fullscreenIcon.onclick = this.openFullscreenModal.bind(this), this.iconsContainer.appendChild(this.fullscreenIcon));
|
|
2651
2691
|
}
|
|
2652
2692
|
addCloseFullscreenIcon() {
|
|
2653
|
-
this.fullscreenCloseIcon =
|
|
2693
|
+
this.fullscreenCloseIcon = es(), this.fullscreenCloseIcon.onclick = this.closeFullscreenModal.bind(this), this.iconsContainer.appendChild(this.fullscreenCloseIcon);
|
|
2654
2694
|
}
|
|
2655
2695
|
showFullscreenIcon() {
|
|
2656
2696
|
this.fullscreenIcon && (this.fullscreenIcon.style.opacity = 1);
|
|
@@ -2659,7 +2699,7 @@ class Vt {
|
|
|
2659
2699
|
this.fullscreenIcon && (this.fullscreenIcon.style.opacity = 0);
|
|
2660
2700
|
}
|
|
2661
2701
|
add360ViewCircleIcon() {
|
|
2662
|
-
this.view360CircleIcon || (this.view360CircleIcon =
|
|
2702
|
+
this.view360CircleIcon || (this.view360CircleIcon = qi(this.bottomCircleOffset), this.innerBox.appendChild(this.view360CircleIcon));
|
|
2663
2703
|
}
|
|
2664
2704
|
show360ViewCircleIcon() {
|
|
2665
2705
|
this.view360CircleIcon && (this.view360CircleIcon.style.opacity = 1);
|
|
@@ -2668,13 +2708,13 @@ class Vt {
|
|
|
2668
2708
|
this.view360CircleIcon && (this.view360CircleIcon.style.opacity = 0);
|
|
2669
2709
|
}
|
|
2670
2710
|
addLoadingSpinner() {
|
|
2671
|
-
this.loadingSpinner =
|
|
2711
|
+
this.loadingSpinner = ls(), this.innerBox.appendChild(this.loadingSpinner);
|
|
2672
2712
|
}
|
|
2673
2713
|
showLoadingSpinner() {
|
|
2674
2714
|
this.loadingSpinner && (this.hideAllIcons(), this.loadingSpinner.style.opacity = 1);
|
|
2675
2715
|
}
|
|
2676
2716
|
createTransitionOverlay() {
|
|
2677
|
-
this.transitionOverlay =
|
|
2717
|
+
this.transitionOverlay = cs(), this.innerBox.appendChild(this.transitionOverlay);
|
|
2678
2718
|
}
|
|
2679
2719
|
showTransitionOverlay() {
|
|
2680
2720
|
this.transitionOverlay && (this.hideAllIcons(), this.transitionOverlay.style.opacity = 1);
|
|
@@ -2686,28 +2726,28 @@ class Vt {
|
|
|
2686
2726
|
this.loadingSpinner && (this.loadingSpinner.style.opacity = 0);
|
|
2687
2727
|
}
|
|
2688
2728
|
hideHints() {
|
|
2689
|
-
!this.hintsOverlay || this.hintsHidden || (this.hintsHidden = !0,
|
|
2729
|
+
!this.hintsOverlay || this.hintsHidden || (this.hintsHidden = !0, ms(this.hintsOverlay));
|
|
2690
2730
|
}
|
|
2691
2731
|
addHotspotTimeline() {
|
|
2692
2732
|
if (!this.hotspots || this.hotspotTimeline) return;
|
|
2693
|
-
const t =
|
|
2733
|
+
const t = bs(this.innerBox, this.amountX, this.hotspots);
|
|
2694
2734
|
if (!t) return;
|
|
2695
|
-
this.hotspotTimeline = t.element, this.hotspotTimelineIndicator = t.indicator, this.hotspotTimeline.querySelectorAll(".cloudimage-360-hotspot-timeline-dot").forEach((s) => {
|
|
2735
|
+
this.hotspotTimeline = t.element, this.hotspotTimelineIndicator = t.indicator, this.innerBox.classList.add("has-hotspot-timeline"), this.hotspotTimeline.querySelectorAll(".cloudimage-360-hotspot-timeline-dot").forEach((s) => {
|
|
2696
2736
|
s.addEventListener("click", (o) => {
|
|
2697
2737
|
o.stopPropagation(), this.hideAllIcons(), this.hideHints();
|
|
2698
|
-
const n = parseInt(s.getAttribute("data-frame"), 10),
|
|
2699
|
-
isNaN(n) || this.animateToFrame(n,
|
|
2738
|
+
const n = parseInt(s.getAttribute("data-frame"), 10), a = s.getAttribute("data-hotspot-id");
|
|
2739
|
+
isNaN(n) || this.animateToFrame(n, a);
|
|
2700
2740
|
});
|
|
2701
2741
|
}), this.updateHotspotTimelinePosition();
|
|
2702
2742
|
}
|
|
2703
2743
|
showHotspotTimeline() {
|
|
2704
|
-
|
|
2744
|
+
Is(this.hotspotTimeline);
|
|
2705
2745
|
}
|
|
2706
2746
|
hideHotspotTimeline() {
|
|
2707
|
-
|
|
2747
|
+
Cs(this.hotspotTimeline);
|
|
2708
2748
|
}
|
|
2709
2749
|
updateHotspotTimelinePosition() {
|
|
2710
|
-
|
|
2750
|
+
ws(this.hotspotTimelineIndicator, this.activeImageX, this.amountX);
|
|
2711
2751
|
}
|
|
2712
2752
|
/**
|
|
2713
2753
|
* Animates the viewer to a target frame, optionally showing a hotspot popup on arrival
|
|
@@ -2720,12 +2760,12 @@ class Vt {
|
|
|
2720
2760
|
return;
|
|
2721
2761
|
}
|
|
2722
2762
|
this.isAnimatingToFrame = !0, this.hasInteracted = !0, (this.autoplay || this.loopTimeoutId) && (this.stopAutoplay(), this.autoplay = !1), this.inertiaAnimationId && (cancelAnimationFrame(this.inertiaAnimationId), this.inertiaAnimationId = null);
|
|
2723
|
-
const s = this.activeImageX, o = (t - s + this.amountX) % this.amountX, n = (s - t + this.amountX) % this.amountX,
|
|
2763
|
+
const s = this.activeImageX, o = (t - s + this.amountX) % this.amountX, n = (s - t + this.amountX) % this.amountX, a = o <= n, r = a ? o : n;
|
|
2724
2764
|
if (r === 0) {
|
|
2725
2765
|
this.isAnimatingToFrame = !1;
|
|
2726
2766
|
return;
|
|
2727
2767
|
}
|
|
2728
|
-
const
|
|
2768
|
+
const l = 30;
|
|
2729
2769
|
let c = r;
|
|
2730
2770
|
const h = () => {
|
|
2731
2771
|
if (c <= 0) {
|
|
@@ -2734,7 +2774,7 @@ class Vt {
|
|
|
2734
2774
|
}, 50);
|
|
2735
2775
|
return;
|
|
2736
2776
|
}
|
|
2737
|
-
|
|
2777
|
+
a ? this.moveRight() : this.moveLeft(), c--, c > 0 ? setTimeout(h, l) : (this.isAnimatingToFrame = !1, i && this.hotspotsInstance && this.hotspotTimelineOnClick && setTimeout(() => {
|
|
2738
2778
|
this.hotspotsInstance.showHotspotById(i);
|
|
2739
2779
|
}, 50));
|
|
2740
2780
|
};
|
|
@@ -2762,10 +2802,10 @@ class Vt {
|
|
|
2762
2802
|
this.removeMouseEvents(), this.removeTouchEvents(), this.removeKeyboardEvents(), this.removeEscKeyHandler();
|
|
2763
2803
|
}
|
|
2764
2804
|
addMouseEvents() {
|
|
2765
|
-
this.boundMouseClick = this.mouseClick.bind(this), this.boundMouseDblClick = this.mouseDblClick.bind(this), this.boundMouseDown = this.mouseDown.bind(this), this.boundMouseMove =
|
|
2805
|
+
this.boundMouseClick = this.mouseClick.bind(this), this.boundMouseDblClick = this.mouseDblClick.bind(this), this.boundMouseDown = this.mouseDown.bind(this), this.boundMouseMove = ve(this.mouseMove.bind(this), ge), this.boundMouseUp = this.mouseUp.bind(this), this.boundMouseLeave = this.mouseLeave.bind(this), this.innerBox.addEventListener("click", this.boundMouseClick), this.innerBox.addEventListener("dblclick", this.boundMouseDblClick), this.innerBox.addEventListener("mousedown", this.boundMouseDown), this.innerBox.addEventListener("mouseleave", this.boundMouseLeave), document.addEventListener("mousemove", this.boundMouseMove), document.addEventListener("mouseup", this.boundMouseUp);
|
|
2766
2806
|
}
|
|
2767
2807
|
addTouchEvents() {
|
|
2768
|
-
this.boundTouchOutside = this.touchOutside.bind(this), this.boundTouchStart = this.touchStart.bind(this), this.boundTouchEnd = this.touchEnd.bind(this), this.boundTouchMove =
|
|
2808
|
+
this.boundTouchOutside = this.touchOutside.bind(this), this.boundTouchStart = this.touchStart.bind(this), this.boundTouchEnd = this.touchEnd.bind(this), this.boundTouchMove = ve(this.touchMove.bind(this), ge), document.addEventListener("touchstart", this.boundTouchOutside), this.container.addEventListener("touchstart", this.boundTouchStart), this.container.addEventListener("touchend", this.boundTouchEnd), this.container.addEventListener("touchmove", this.boundTouchMove);
|
|
2769
2809
|
}
|
|
2770
2810
|
addKeyboardEvents() {
|
|
2771
2811
|
this.boundKeyDown = this.keyDown.bind(this), this.boundKeyUp = this.keyUp.bind(this), document.addEventListener("keydown", this.boundKeyDown), document.addEventListener("keyup", this.boundKeyUp);
|
|
@@ -2788,7 +2828,7 @@ class Vt {
|
|
|
2788
2828
|
document.removeEventListener("keydown", this.boundKeyDown), document.removeEventListener("keyup", this.boundKeyUp);
|
|
2789
2829
|
}
|
|
2790
2830
|
createContainers(t) {
|
|
2791
|
-
if (this.iconsContainer =
|
|
2831
|
+
if (this.iconsContainer = Ie(this.innerBox), this.canvas = ts(this.innerBox, t), this.loader = rs(this.innerBox), this.ariaLiveRegion = ds(this.innerBox), this.useMainThreadCanvas)
|
|
2792
2832
|
this.canvasWorker.postMessage({
|
|
2793
2833
|
action: "initCanvas",
|
|
2794
2834
|
offscreen: this.canvas,
|
|
@@ -2805,17 +2845,17 @@ class Vt {
|
|
|
2805
2845
|
[i]
|
|
2806
2846
|
);
|
|
2807
2847
|
}
|
|
2808
|
-
this.fullscreenView && this.addCloseFullscreenIcon(),
|
|
2848
|
+
this.fullscreenView && this.addCloseFullscreenIcon(), te(this.innerBox, ".cloudimage-360-placeholder");
|
|
2809
2849
|
}
|
|
2810
2850
|
update(t) {
|
|
2811
|
-
this.isReady && (this.stopAutoplay(),
|
|
2851
|
+
this.isReady && (this.stopAutoplay(), te(this.innerBox, ".cloudimage-360-icons-container"), this.init(this.container, t, !0), this.iconsContainer = Ie(this.innerBox), this.onAllImagesLoaded());
|
|
2812
2852
|
}
|
|
2813
2853
|
init(t, i, s) {
|
|
2814
|
-
const o = i ?
|
|
2854
|
+
const o = i ? Wi(i) : Di(t), {
|
|
2815
2855
|
folder: n,
|
|
2816
|
-
apiVersion:
|
|
2856
|
+
apiVersion: a,
|
|
2817
2857
|
filenameX: r,
|
|
2818
|
-
filenameY:
|
|
2858
|
+
filenameY: l,
|
|
2819
2859
|
imageListX: c,
|
|
2820
2860
|
imageListY: h,
|
|
2821
2861
|
indexZeroBase: u,
|
|
@@ -2834,10 +2874,10 @@ class Vt {
|
|
|
2834
2874
|
fullscreen: C,
|
|
2835
2875
|
magnifier: A,
|
|
2836
2876
|
ciToken: S,
|
|
2837
|
-
ciFilters:
|
|
2877
|
+
ciFilters: T,
|
|
2838
2878
|
ciTransformation: R,
|
|
2839
|
-
lazyload:
|
|
2840
|
-
dragSpeed:
|
|
2879
|
+
lazyload: k,
|
|
2880
|
+
dragSpeed: j,
|
|
2841
2881
|
stopAtEdges: G,
|
|
2842
2882
|
pointerZoom: M,
|
|
2843
2883
|
pointerZoomTrigger: D = "dblclick",
|
|
@@ -2847,65 +2887,65 @@ class Vt {
|
|
|
2847
2887
|
hotspots: yt,
|
|
2848
2888
|
hotspotTrigger: tt = "hover",
|
|
2849
2889
|
dragReverse: rt,
|
|
2850
|
-
hide360Logo:
|
|
2890
|
+
hide360Logo: J,
|
|
2851
2891
|
logoSrc: N,
|
|
2852
2892
|
inertia: et,
|
|
2853
2893
|
pinchZoom: at,
|
|
2854
2894
|
hints: U,
|
|
2855
2895
|
theme: lt,
|
|
2856
|
-
hotspotTimelineOnClick:
|
|
2896
|
+
hotspotTimelineOnClick: $t = !0,
|
|
2857
2897
|
aspectRatio: ct,
|
|
2858
2898
|
// Event callbacks
|
|
2859
2899
|
onReady: jt,
|
|
2860
|
-
onLoad:
|
|
2861
|
-
onSpin:
|
|
2862
|
-
onAutoplayStart:
|
|
2863
|
-
onAutoplayStop:
|
|
2864
|
-
onFullscreenOpen:
|
|
2865
|
-
onFullscreenClose:
|
|
2866
|
-
onZoomIn:
|
|
2900
|
+
onLoad: Mt,
|
|
2901
|
+
onSpin: Gt,
|
|
2902
|
+
onAutoplayStart: _t,
|
|
2903
|
+
onAutoplayStop: Pt,
|
|
2904
|
+
onFullscreenOpen: Yt,
|
|
2905
|
+
onFullscreenClose: Ut,
|
|
2906
|
+
onZoomIn: Kt,
|
|
2867
2907
|
onZoomOut: K,
|
|
2868
2908
|
onDragStart: ht,
|
|
2869
|
-
onDragEnd:
|
|
2870
|
-
onError:
|
|
2871
|
-
} = o, dt = { ciToken: S, ciFilters:
|
|
2872
|
-
if (this.viewerConfig = o, this.amountX = ut.length || f, this.amountY = pt.length || p, this.allowSpinX = !!this.amountX, this.allowSpinY = !!this.amountY, this.activeImageX = g ? this.amountX - 1 : 0, this.activeImageY = g ? this.amountY - 1 : 0, this.bottomCircleOffset = E, this.autoplay = w, this.autoplayBehavior = y, this.playOnce = x, this.speed = m, this.autoplayReverse = g, this.fullscreen = C, this.magnifier = A > 1 ? Math.min(A,
|
|
2909
|
+
onDragEnd: Rt,
|
|
2910
|
+
onError: Xt
|
|
2911
|
+
} = o, dt = { ciToken: S, ciFilters: T, ciTransformation: R }, ut = ee(c, []), pt = ee(h, []);
|
|
2912
|
+
if (this.viewerConfig = o, this.amountX = ut.length || f, this.amountY = pt.length || p, this.allowSpinX = !!this.amountX, this.allowSpinY = !!this.amountY, this.activeImageX = g ? this.amountX - 1 : 0, this.activeImageY = g ? this.amountY - 1 : 0, this.bottomCircleOffset = E, this.autoplay = w, this.autoplayBehavior = y, this.playOnce = x, this.speed = m, this.autoplayReverse = g, this.fullscreen = C, this.magnifier = A > 1 ? Math.min(A, Zi) : 0, this.dragSpeed = Math.max(j, Hi), this.stopAtEdges = G, this.ciParams = dt, this.apiVersion = a, this.pointerZoom = M > 1 ? Math.min(M, be) : null, this.pointerZoomTrigger = D, this.keysReverse = O, this.info = ot, this.keys = v, this.innerBox = this.innerBox ?? ss(this.container), ct && (this.container.style.aspectRatio = ct), this.initialIconShown = _, this.bottomCircle = nt, this.spinDirection = Ds(this.autoplayBehavior, this.allowSpinX, this.allowSpinY), this.dragReverse = rt, this.hotspots = yt, this.hotspotTrigger = tt, this.hide360Logo = J, this.logoSrc = N, this.inertia = et, this.pinchZoom = at, this.hints = U, this.hotspotTimelineOnClick = $t, lt === "dark" ? this.container.classList.add("ci360-theme-dark") : lt === "light" && this.container.classList.remove("ci360-theme-dark"), this.onReady = jt, this.onLoad = Mt, this.onSpin = Gt, this.onAutoplayStart = _t, this.onAutoplayStop = Pt, this.onFullscreenOpen = Yt, this.onFullscreenClose = Ut, this.onZoomIn = Kt, this.onZoomOut = K, this.onDragStart = ht, this.onDragEnd = Rt, this.onError = Xt, this.srcXConfig = {
|
|
2873
2913
|
folder: n,
|
|
2874
2914
|
filename: r,
|
|
2875
2915
|
imageList: ut,
|
|
2876
2916
|
container: t,
|
|
2877
2917
|
innerBox: this.innerBox,
|
|
2878
|
-
apiVersion:
|
|
2918
|
+
apiVersion: a,
|
|
2879
2919
|
ciParams: dt,
|
|
2880
|
-
lazyload:
|
|
2920
|
+
lazyload: k,
|
|
2881
2921
|
amount: this.amountX,
|
|
2882
2922
|
indexZeroBase: u,
|
|
2883
2923
|
autoplayReverse: g,
|
|
2884
2924
|
orientation: Y.X
|
|
2885
2925
|
}, this.srcYConfig = {
|
|
2886
2926
|
...this.srcXConfig,
|
|
2887
|
-
filename:
|
|
2927
|
+
filename: l,
|
|
2888
2928
|
imageList: pt,
|
|
2889
2929
|
orientation: Y.Y,
|
|
2890
2930
|
amount: this.amountY
|
|
2891
2931
|
}, s && this.removeEvents(), this.attachEvents(I, b, v), s) return;
|
|
2892
|
-
const bt = (this.fullscreenView ? document.body : this.container).offsetWidth, wt = this.allowSpinX && !ut.length ?
|
|
2893
|
-
|
|
2932
|
+
const bt = (this.fullscreenView ? document.body : this.container).offsetWidth, wt = this.allowSpinX && !ut.length ? Ot(this.srcXConfig, bt) : null, de = this.allowSpinY && !pt.length ? Ot(this.srcYConfig, bt) : null, ue = (ni) => {
|
|
2933
|
+
we({
|
|
2894
2934
|
cdnPathX: wt,
|
|
2895
|
-
cdnPathY:
|
|
2935
|
+
cdnPathY: de,
|
|
2896
2936
|
configX: this.srcXConfig,
|
|
2897
2937
|
configY: this.srcYConfig,
|
|
2898
|
-
onImageLoad: (It,
|
|
2899
|
-
onFirstImageLoad: (It) => this.onFirstImageLoaded(
|
|
2938
|
+
onImageLoad: (It, ri, ai) => this.onImageLoad(It, ri, ai),
|
|
2939
|
+
onFirstImageLoad: (It) => this.onFirstImageLoaded(ni, It),
|
|
2900
2940
|
onAllImagesLoad: this.onAllImagesLoaded.bind(this),
|
|
2901
2941
|
onError: (It) => this.emit("onError", It)
|
|
2902
2942
|
});
|
|
2903
2943
|
};
|
|
2904
|
-
this.allowSpinX ?
|
|
2944
|
+
this.allowSpinX ? Se(wt, this.srcXConfig, ue) : this.allowSpinY && Se(de, this.srcYConfig, ue);
|
|
2905
2945
|
}
|
|
2906
2946
|
}
|
|
2907
|
-
const
|
|
2908
|
-
class
|
|
2947
|
+
const $e = typeof navigator < "u" && /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);
|
|
2948
|
+
class mn {
|
|
2909
2949
|
constructor() {
|
|
2910
2950
|
this.views = /* @__PURE__ */ new Map(), this.initAll = this.initAll.bind(this), this.getViews = this.getViews.bind(this), this.memoryObserver = null, this.memoryManagementAutoEnabled = !1;
|
|
2911
2951
|
}
|
|
@@ -2916,16 +2956,16 @@ class cn {
|
|
|
2916
2956
|
if (!t) return;
|
|
2917
2957
|
const o = t.id || this.generateId();
|
|
2918
2958
|
t.id || (t.id = o);
|
|
2919
|
-
const n = new
|
|
2920
|
-
return this.views.set(o, n),
|
|
2959
|
+
const n = new Nt(t, i, s);
|
|
2960
|
+
return this.views.set(o, n), $e && !this.memoryManagementAutoEnabled && (this.memoryManagementAutoEnabled = !0, setTimeout(() => this.enableMemoryManagement(), 100)), n;
|
|
2921
2961
|
}
|
|
2922
2962
|
initAll(t = "cloudimage-360") {
|
|
2923
2963
|
[...document.querySelectorAll(`.${t}`)].filter(Boolean).forEach((s) => {
|
|
2924
2964
|
const o = s.id || this.generateId();
|
|
2925
2965
|
s.id || (s.id = o);
|
|
2926
|
-
const n = new
|
|
2966
|
+
const n = new Nt(s);
|
|
2927
2967
|
this.views.set(o, n);
|
|
2928
|
-
}),
|
|
2968
|
+
}), $e && !this.memoryManagementAutoEnabled && this.views.size > 0 && (this.memoryManagementAutoEnabled = !0, setTimeout(() => this.enableMemoryManagement(), 100));
|
|
2929
2969
|
}
|
|
2930
2970
|
destroy(t) {
|
|
2931
2971
|
const i = this.getViewById(t);
|
|
@@ -2979,8 +3019,8 @@ class cn {
|
|
|
2979
3019
|
if (s.isMemoryReleased) {
|
|
2980
3020
|
const n = document.getElementById(o);
|
|
2981
3021
|
if (n) {
|
|
2982
|
-
const
|
|
2983
|
-
|
|
3022
|
+
const a = n.getBoundingClientRect();
|
|
3023
|
+
a.top < window.innerHeight && a.bottom > 0 && s.reloadImages();
|
|
2984
3024
|
}
|
|
2985
3025
|
}
|
|
2986
3026
|
});
|
|
@@ -2994,6 +3034,6 @@ class cn {
|
|
|
2994
3034
|
}
|
|
2995
3035
|
}
|
|
2996
3036
|
export {
|
|
2997
|
-
|
|
3037
|
+
mn as default
|
|
2998
3038
|
};
|
|
2999
|
-
//# sourceMappingURL=ci360
|
|
3039
|
+
//# sourceMappingURL=ci360--3KbDLtq.mjs.map
|