js-cloudimage-360-view 4.8.0 → 4.9.2
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 +69 -3
- package/dist/js-cloudimage-360-view.min.js +7 -7
- package/dist/react/ci360-B2r9u7br.js +65 -0
- package/dist/react/ci360-B2r9u7br.js.map +1 -0
- package/dist/react/{ci360-BJ_JCEiA.mjs → ci360-BFobl9uu.mjs} +1076 -859
- package/dist/react/ci360-BFobl9uu.mjs.map +1 -0
- package/dist/react/index.cjs +1 -1
- package/dist/react/index.cjs.map +1 -1
- package/dist/react/index.d.ts +10 -0
- package/dist/react/index.js +182 -165
- package/dist/react/index.js.map +1 -1
- package/dist/react/style.css +1 -1
- package/package.json +2 -1
- package/src/react/types.d.ts +10 -0
- package/dist/react/ci360-BJ_JCEiA.mjs.map +0 -1
- package/dist/react/ci360-DdSVW_xW.js +0 -65
- package/dist/react/ci360-DdSVW_xW.js.map +0 -1
|
@@ -1,111 +1,113 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
var
|
|
5
|
-
function
|
|
1
|
+
var Si = Object.defineProperty;
|
|
2
|
+
var Yi = (e, t, i) => t in e ? Si(e, t, { enumerable: !0, configurable: !0, writable: !0, value: i }) : e[t] = i;
|
|
3
|
+
var Ie = (e, t, i) => Yi(e, typeof t != "symbol" ? t + "" : t, i);
|
|
4
|
+
var Vt = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
|
|
5
|
+
function Li(e) {
|
|
6
6
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
7
7
|
}
|
|
8
|
-
var
|
|
9
|
-
return
|
|
8
|
+
var ii = "Expected a function", xe = NaN, Mi = "[object Symbol]", Oi = /^\s+|\s+$/g, Hi = /^[-+]0x[0-9a-f]+$/i, Ri = /^0b[01]+$/i, zi = /^0o[0-7]+$/i, Zi = parseInt, Di = typeof Vt == "object" && Vt && Vt.Object === Object && Vt, Bi = typeof self == "object" && self && self.Object === Object && self, Gi = Di || Bi || Function("return this")(), _i = Object.prototype, Fi = _i.toString, Ni = Math.max, Wi = Math.min, le = function() {
|
|
9
|
+
return Gi.Date.now();
|
|
10
10
|
};
|
|
11
|
-
function
|
|
11
|
+
function Vi(e, t, i) {
|
|
12
12
|
var o, s, n, r, a, l, c = 0, h = !1, u = !1, m = !0;
|
|
13
13
|
if (typeof e != "function")
|
|
14
|
-
throw new TypeError(
|
|
15
|
-
t =
|
|
16
|
-
function f
|
|
17
|
-
var
|
|
18
|
-
return o = s = void 0, c =
|
|
14
|
+
throw new TypeError(ii);
|
|
15
|
+
t = Pe(t) || 0, Kt(i) && (h = !!i.leading, u = "maxWait" in i, n = u ? Ni(Pe(i.maxWait) || 0, t) : n, m = "trailing" in i ? !!i.trailing : m);
|
|
16
|
+
function p(f) {
|
|
17
|
+
var y = o, I = s;
|
|
18
|
+
return o = s = void 0, c = f, r = e.apply(I, y), r;
|
|
19
19
|
}
|
|
20
|
-
function C(
|
|
21
|
-
return c =
|
|
20
|
+
function C(f) {
|
|
21
|
+
return c = f, a = setTimeout(x, t), h ? p(f) : r;
|
|
22
22
|
}
|
|
23
|
-
function
|
|
24
|
-
var
|
|
25
|
-
return u ?
|
|
23
|
+
function v(f) {
|
|
24
|
+
var y = f - l, I = f - c, T = t - y;
|
|
25
|
+
return u ? Wi(T, n - I) : T;
|
|
26
26
|
}
|
|
27
|
-
function b(
|
|
28
|
-
var
|
|
29
|
-
return l === void 0 ||
|
|
27
|
+
function b(f) {
|
|
28
|
+
var y = f - l, I = f - c;
|
|
29
|
+
return l === void 0 || y >= t || y < 0 || u && I >= n;
|
|
30
30
|
}
|
|
31
|
-
function
|
|
32
|
-
var
|
|
33
|
-
if (b(
|
|
34
|
-
return
|
|
35
|
-
a = setTimeout(
|
|
31
|
+
function x() {
|
|
32
|
+
var f = le();
|
|
33
|
+
if (b(f))
|
|
34
|
+
return P(f);
|
|
35
|
+
a = setTimeout(x, v(f));
|
|
36
36
|
}
|
|
37
|
-
function
|
|
38
|
-
return a = void 0, m && o ? f
|
|
37
|
+
function P(f) {
|
|
38
|
+
return a = void 0, m && o ? p(f) : (o = s = void 0, r);
|
|
39
39
|
}
|
|
40
40
|
function w() {
|
|
41
41
|
a !== void 0 && clearTimeout(a), c = 0, o = l = s = a = void 0;
|
|
42
42
|
}
|
|
43
|
-
function
|
|
44
|
-
return a === void 0 ? r :
|
|
43
|
+
function g() {
|
|
44
|
+
return a === void 0 ? r : P(le());
|
|
45
45
|
}
|
|
46
|
-
function
|
|
47
|
-
var
|
|
48
|
-
if (o = arguments, s = this, l =
|
|
46
|
+
function E() {
|
|
47
|
+
var f = le(), y = b(f);
|
|
48
|
+
if (o = arguments, s = this, l = f, y) {
|
|
49
49
|
if (a === void 0)
|
|
50
50
|
return C(l);
|
|
51
51
|
if (u)
|
|
52
|
-
return a = setTimeout(
|
|
52
|
+
return a = setTimeout(x, t), p(l);
|
|
53
53
|
}
|
|
54
|
-
return a === void 0 && (a = setTimeout(
|
|
54
|
+
return a === void 0 && (a = setTimeout(x, t)), r;
|
|
55
55
|
}
|
|
56
|
-
return
|
|
56
|
+
return E.cancel = w, E.flush = g, E;
|
|
57
57
|
}
|
|
58
|
-
function
|
|
58
|
+
function ji(e, t, i) {
|
|
59
59
|
var o = !0, s = !0;
|
|
60
60
|
if (typeof e != "function")
|
|
61
|
-
throw new TypeError(
|
|
62
|
-
return
|
|
61
|
+
throw new TypeError(ii);
|
|
62
|
+
return Kt(i) && (o = "leading" in i ? !!i.leading : o, s = "trailing" in i ? !!i.trailing : s), Vi(e, t, {
|
|
63
63
|
leading: o,
|
|
64
64
|
maxWait: t,
|
|
65
65
|
trailing: s
|
|
66
66
|
});
|
|
67
67
|
}
|
|
68
|
-
function
|
|
68
|
+
function Kt(e) {
|
|
69
69
|
var t = typeof e;
|
|
70
70
|
return !!e && (t == "object" || t == "function");
|
|
71
71
|
}
|
|
72
|
-
function
|
|
72
|
+
function Ui(e) {
|
|
73
73
|
return !!e && typeof e == "object";
|
|
74
74
|
}
|
|
75
|
-
function
|
|
76
|
-
return typeof e == "symbol" ||
|
|
75
|
+
function $i(e) {
|
|
76
|
+
return typeof e == "symbol" || Ui(e) && Fi.call(e) == Mi;
|
|
77
77
|
}
|
|
78
|
-
function
|
|
78
|
+
function Pe(e) {
|
|
79
79
|
if (typeof e == "number")
|
|
80
80
|
return e;
|
|
81
|
-
if (
|
|
82
|
-
return
|
|
83
|
-
if (
|
|
81
|
+
if ($i(e))
|
|
82
|
+
return xe;
|
|
83
|
+
if (Kt(e)) {
|
|
84
84
|
var t = typeof e.valueOf == "function" ? e.valueOf() : e;
|
|
85
|
-
e =
|
|
85
|
+
e = Kt(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(Oi, "");
|
|
90
|
+
var i = Ri.test(e);
|
|
91
|
+
return i || zi.test(e) ? Zi(e.slice(2), i ? 2 : 8) : Hi.test(e) ? xe : +e;
|
|
92
92
|
}
|
|
93
|
-
var
|
|
94
|
-
const
|
|
93
|
+
var Ki = ji;
|
|
94
|
+
const Ee = /* @__PURE__ */ Li(Ki), Y = {
|
|
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
|
+
}, qi = [!1, 0, null, void 0, "false", "0", "null", "undefined"], L = {
|
|
100
100
|
X: "x-axis",
|
|
101
101
|
Y: "y-axis"
|
|
102
|
-
},
|
|
102
|
+
}, Ji = [37, 39], Qi = [38, 40], to = typeof navigator < "u" && /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent), Te = to ? 32 : 10, eo = 150, io = 150, oo = 200, Ae = 50, so = 50, no = 50, d = {
|
|
103
103
|
folder: "/",
|
|
104
104
|
apiVersion: "v7",
|
|
105
105
|
filenameX: "image-{index}.jpg",
|
|
106
106
|
filenameY: null,
|
|
107
107
|
imageListX: null,
|
|
108
108
|
imageListY: null,
|
|
109
|
+
filenameGrid: null,
|
|
110
|
+
imageListGrid: null,
|
|
109
111
|
indexZeroBase: 0,
|
|
110
112
|
amountX: 0,
|
|
111
113
|
amountY: 0,
|
|
@@ -127,7 +129,7 @@ const Ce = /* @__PURE__ */ Pi(Fi), Y = {
|
|
|
127
129
|
zoomControls: !0,
|
|
128
130
|
zoomControlsPosition: "bottom-right",
|
|
129
131
|
scrollHint: !0,
|
|
130
|
-
bottomCircle: !
|
|
132
|
+
bottomCircle: !1,
|
|
131
133
|
bottomCircleOffset: 5,
|
|
132
134
|
ciToken: null,
|
|
133
135
|
ciFilters: null,
|
|
@@ -135,6 +137,8 @@ const Ce = /* @__PURE__ */ Pi(Fi), Y = {
|
|
|
135
137
|
lazyload: !0,
|
|
136
138
|
dragReverse: !1,
|
|
137
139
|
stopAtEdges: !1,
|
|
140
|
+
stopAtEdgesX: null,
|
|
141
|
+
stopAtEdgesY: null,
|
|
138
142
|
imageInfo: !1,
|
|
139
143
|
initialIconShown: !0,
|
|
140
144
|
hotspots: null,
|
|
@@ -168,75 +172,87 @@ const Ce = /* @__PURE__ */ Pi(Fi), Y = {
|
|
|
168
172
|
onProductClick: null,
|
|
169
173
|
onNavigate: null,
|
|
170
174
|
onError: null
|
|
171
|
-
},
|
|
172
|
-
folder:
|
|
173
|
-
apiVersion:
|
|
174
|
-
filenameX:
|
|
175
|
-
filenameY:
|
|
176
|
-
imageListX:
|
|
177
|
-
imageListY:
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
175
|
+
}, ro = (e) => ({
|
|
176
|
+
folder: A(e, "folder", d.folder),
|
|
177
|
+
apiVersion: A(e, "api-version", d.apiVersion),
|
|
178
|
+
filenameX: A(e, "filename") || A(e, "filename-x") || d.filenameX,
|
|
179
|
+
filenameY: A(e, "filename-y", d.filenameY),
|
|
180
|
+
imageListX: A(e, "image-list-x", d.imageListX),
|
|
181
|
+
imageListY: A(e, "image-list-y", d.imageListY),
|
|
182
|
+
filenameGrid: A(e, "filename-grid", d.filenameGrid),
|
|
183
|
+
imageListGrid: A(e, "image-list-grid", d.imageListGrid),
|
|
184
|
+
indexZeroBase: parseInt(A(e, "index-zero-base", d.indexZeroBase), 10),
|
|
185
|
+
amountX: parseInt(A(e, "amount-x", d.amountX), 10),
|
|
186
|
+
amountY: parseInt(A(e, "amount-y", d.amountY), 10),
|
|
187
|
+
speed: parseInt(A(e, "speed", d.speed), 10),
|
|
188
|
+
dragSpeed: parseInt(A(e, "drag-speed", d.dragSpeed), 10),
|
|
189
|
+
draggable: S(e, "draggable", d.draggable),
|
|
190
|
+
swipeable: S(e, "swipeable", d.swipeable),
|
|
191
|
+
keys: S(e, "keys", d.keys),
|
|
192
|
+
keysReverse: S(e, "keys-reverse", d.keysReverse),
|
|
193
|
+
autoplay: S(e, "autoplay", d.autoplay),
|
|
194
|
+
autoplayBehavior: A(e, "autoplay-behavior", d.autoplayBehavior),
|
|
195
|
+
playOnce: S(e, "play-once", d.playOnce),
|
|
196
|
+
autoplayReverse: S(e, "autoplay-reverse", d.autoplayReverse),
|
|
197
|
+
pointerZoom: parseFloat(A(e, "pointer-zoom", d.pointerZoom)),
|
|
198
|
+
pointerZoomTrigger: A(e, "pointer-zoom-trigger", d.pointerZoomTrigger),
|
|
199
|
+
fullscreen: S(e, "fullscreen") || S(e, "full-screen", d.fullscreen),
|
|
200
|
+
magnifier: A(e, "magnifier", null) != null ? parseFloat(A(e, "magnifier", null)) : null,
|
|
201
|
+
zoomMax: parseFloat(A(e, "zoom-max", d.zoomMax)),
|
|
202
|
+
zoomStep: parseFloat(A(e, "zoom-step", d.zoomStep)),
|
|
203
|
+
zoomControls: !Et(e, "zoom-controls"),
|
|
204
|
+
zoomControlsPosition: A(e, "zoom-controls-position", d.zoomControlsPosition),
|
|
205
|
+
scrollHint: !Et(e, "scroll-hint"),
|
|
200
206
|
bottomCircleOffset: parseInt(
|
|
201
|
-
|
|
207
|
+
A(e, "bottom-circle-offset", d.bottomCircleOffset),
|
|
202
208
|
10
|
|
203
209
|
),
|
|
204
|
-
ciToken:
|
|
205
|
-
ciFilters:
|
|
206
|
-
ciTransformation:
|
|
207
|
-
lazyload:
|
|
208
|
-
dragReverse:
|
|
209
|
-
stopAtEdges:
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
210
|
+
ciToken: A(e, "responsive", d.ciToken),
|
|
211
|
+
ciFilters: A(e, "filters", d.ciFilters),
|
|
212
|
+
ciTransformation: A(e, "transformation", d.ciTransformation),
|
|
213
|
+
lazyload: S(e, "lazyload", d.lazyload),
|
|
214
|
+
dragReverse: S(e, "drag-reverse", d.dragReverse),
|
|
215
|
+
stopAtEdges: S(e, "stop-at-edges", d.stopAtEdges),
|
|
216
|
+
stopAtEdgesX: A(e, "stop-at-edges-x", null) !== null ? S(e, "stop-at-edges-x", null) : null,
|
|
217
|
+
stopAtEdgesY: A(e, "stop-at-edges-y", null) !== null ? S(e, "stop-at-edges-y", null) : null,
|
|
218
|
+
imageInfo: S(e, "info", d.imageInfo),
|
|
219
|
+
initialIconShown: !Et(e, "initial-icon"),
|
|
220
|
+
bottomCircle: S(e, "bottom-circle", d.bottomCircle),
|
|
221
|
+
hide360Logo: S(e, "hide-360-logo", d.hide360Logo),
|
|
222
|
+
logoSrc: A(e, "logo-src", d.logoSrc),
|
|
223
|
+
inertia: S(e, "inertia", d.inertia),
|
|
224
|
+
pinchZoom: S(e, "pinch-zoom", d.pinchZoom),
|
|
225
|
+
hints: !Et(e, "hints"),
|
|
226
|
+
theme: A(e, "theme", d.theme),
|
|
227
|
+
markerTheme: A(e, "marker-theme", d.markerTheme),
|
|
228
|
+
brandColor: A(e, "brand-color", d.brandColor),
|
|
229
|
+
hotspotTrigger: A(e, "hotspot-trigger", d.hotspotTrigger),
|
|
230
|
+
hotspotTimelineOnClick: !Et(e, "hotspot-timeline-on-click"),
|
|
231
|
+
aspectRatio: A(e, "aspect-ratio", d.aspectRatio),
|
|
232
|
+
cropAspectRatio: A(e, "crop-aspect-ratio", d.cropAspectRatio),
|
|
233
|
+
cropGravity: A(e, "crop-gravity", d.cropGravity)
|
|
234
|
+
}), ao = (e) => {
|
|
227
235
|
const t = [];
|
|
228
|
-
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 && t.push("magnifier option is deprecated and will be ignored. Use zoomMax instead."), e.pointerZoomTrigger === "click" && t.push('pointerZoomTrigger: "click" is deprecated. Zoom is now always triggered by double-click. Use dblclick trigger or the new zoom controls.')
|
|
229
|
-
const i =
|
|
230
|
-
|
|
231
|
-
|
|
236
|
+
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 && t.push("magnifier option is deprecated and will be ignored. Use zoomMax instead."), e.pointerZoomTrigger === "click" && t.push('pointerZoomTrigger: "click" is deprecated. Zoom is now always triggered by double-click. Use dblclick trigger or the new zoom controls.');
|
|
237
|
+
const i = !!(e.filenameGrid || e.imageListGrid);
|
|
238
|
+
if (!i && !e.folder && !e.imageListX && !e.imageListY && t.push("Either folder or imageListX/imageListY is required"), !i && e.folder && !e.amountX && !e.imageListX && t.push("amountX is required when using folder (unless imageListX is provided)"), e.filenameGrid && (!e.amountX || e.amountX <= 0 || !e.amountY || e.amountY <= 0) && t.push("filenameGrid requires both amountX > 0 and amountY > 0"), e.imageListGrid) {
|
|
239
|
+
(!e.amountX || e.amountX <= 0 || !e.amountY || e.amountY <= 0) && t.push("imageListGrid requires both amountX > 0 and amountY > 0");
|
|
240
|
+
const s = Array.isArray(e.imageListGrid) ? e.imageListGrid.flat() : [];
|
|
241
|
+
s.length && e.amountX && e.amountY && s.length !== e.amountX * e.amountY && t.push(`imageListGrid length (${s.length}) does not match amountX * amountY (${e.amountX * e.amountY})`);
|
|
242
|
+
}
|
|
243
|
+
const o = ["spin-x", "spin-y", "spin-xy", "spin-yx"];
|
|
244
|
+
return e.autoplayBehavior && !o.includes(e.autoplayBehavior) && t.push(`autoplayBehavior should be one of: ${o.join(", ")}`), t.forEach((s) => {
|
|
245
|
+
console.warn(`CloudImage 360: ${s}`);
|
|
232
246
|
}), t.length === 0;
|
|
233
|
-
},
|
|
247
|
+
}, lo = (e) => (ao(e), {
|
|
234
248
|
folder: e.folder || d.folder,
|
|
235
249
|
apiVersion: e.apiVersion || d.apiVersion,
|
|
236
250
|
filenameX: e.filenameX || e.filename || d.filenameX,
|
|
237
251
|
filenameY: e.filenameY || d.filenameY,
|
|
238
252
|
imageListX: e.imageListX || d.imageListX,
|
|
239
253
|
imageListY: e.imageListY || d.imageListY,
|
|
254
|
+
filenameGrid: e.filenameGrid || d.filenameGrid,
|
|
255
|
+
imageListGrid: e.imageListGrid || d.imageListGrid,
|
|
240
256
|
indexZeroBase: parseInt(e.indexZeroBase ?? d.indexZeroBase, 10),
|
|
241
257
|
amountX: parseInt(e.amountX ?? d.amountX, 10),
|
|
242
258
|
amountY: parseInt(e.amountY ?? d.amountY, 10),
|
|
@@ -266,6 +282,8 @@ const Ce = /* @__PURE__ */ Pi(Fi), Y = {
|
|
|
266
282
|
lazyload: e.lazyload ?? d.lazyload,
|
|
267
283
|
dragReverse: e.dragReverse ?? d.dragReverse,
|
|
268
284
|
stopAtEdges: e.stopAtEdges ?? d.stopAtEdges,
|
|
285
|
+
stopAtEdgesX: e.stopAtEdgesX ?? d.stopAtEdgesX,
|
|
286
|
+
stopAtEdgesY: e.stopAtEdgesY ?? d.stopAtEdgesY,
|
|
269
287
|
imageInfo: e.imageInfo ?? d.imageInfo,
|
|
270
288
|
initialIconShown: e.initialIconShown ?? d.initialIconShown,
|
|
271
289
|
bottomCircle: e.bottomCircle ?? d.bottomCircle,
|
|
@@ -300,31 +318,46 @@ const Ce = /* @__PURE__ */ Pi(Fi), Y = {
|
|
|
300
318
|
onProductClick: e.onProductClick ?? d.onProductClick,
|
|
301
319
|
onNavigate: e.onNavigate ?? d.onNavigate,
|
|
302
320
|
onError: e.onError ?? d.onError
|
|
303
|
-
}),
|
|
321
|
+
}), A = (e, t, i) => e.getAttribute(t) || e.getAttribute(`data-${t}`) || i, S = (e, t, i) => {
|
|
304
322
|
if (!(e.hasAttribute(t) || e.hasAttribute(`data-${t}`))) return i;
|
|
305
|
-
const s =
|
|
323
|
+
const s = A(e, t, null);
|
|
306
324
|
return s !== "false" && s !== "0";
|
|
307
|
-
},
|
|
325
|
+
}, Et = (e, t) => A(e, t, null) === "false", ho = (e = 1) => {
|
|
308
326
|
const t = Math.round(window.devicePixelRatio || 1);
|
|
309
327
|
return parseInt(e) * t;
|
|
310
|
-
},
|
|
328
|
+
}, co = (e, t, i) => {
|
|
329
|
+
try {
|
|
330
|
+
if (new URL(e).origin.includes("cloudimg")) return e;
|
|
331
|
+
} catch {
|
|
332
|
+
}
|
|
333
|
+
const o = e.startsWith("/") ? e.slice(1) : e;
|
|
334
|
+
return `https://${t}.cloudimg.io/${i}${o}`;
|
|
335
|
+
}, ke = (e, t) => e ? `ar=${e}&gravity=${t || "auto"}` : "", uo = ({ ciTransformation: e, responsiveWidth: t, ciFilters: i }) => {
|
|
311
336
|
const o = `width=${t}`, s = e || o, n = i ? `&f=${i}` : "";
|
|
312
337
|
return `${s}${n}`;
|
|
313
|
-
},
|
|
338
|
+
}, at = (e, t) => {
|
|
314
339
|
const { folder: i, apiVersion: o, filename: s = "", ciParams: n } = e, { ciToken: r, ciFilters: a, ciTransformation: l, cropAspectRatio: c, cropGravity: h } = n || {}, u = `${i}${s}`;
|
|
315
340
|
if (!r || !t) {
|
|
316
|
-
const w =
|
|
341
|
+
const w = ke(c, h);
|
|
317
342
|
if (!w) return u;
|
|
318
|
-
const
|
|
319
|
-
return `${u}${
|
|
343
|
+
const g = u.includes("?") ? "&" : "?";
|
|
344
|
+
return `${u}${g}${w}`;
|
|
320
345
|
}
|
|
321
|
-
const m =
|
|
346
|
+
const m = qi.includes(o) ? null : o, p = m ? `${m}/` : "", C = ho(t), v = co(u, r, p), b = uo({
|
|
322
347
|
ciTransformation: l,
|
|
323
348
|
responsiveWidth: C,
|
|
324
349
|
ciFilters: a
|
|
325
|
-
}),
|
|
326
|
-
return `${
|
|
327
|
-
},
|
|
350
|
+
}), x = ke(c, h), P = [b, x].filter(Boolean).join("&");
|
|
351
|
+
return `${v}${P ? "?" : ""}${P}`;
|
|
352
|
+
}, qt = (e, t = 0) => (e += "", e.length >= t ? e : new Array(t - e.length + 1).join("0") + e), po = (e, { amount: t = 0, indexZeroBase: i = 0 } = {}) => Array.from({ length: t }, (o, s) => e.replace("{index}", qt(s + 1, i))), mo = (e, { amountX: t = 0, amountY: i = 0, indexZeroBase: o = 0 } = {}) => {
|
|
353
|
+
const s = [];
|
|
354
|
+
for (let n = 0; n < i; n++)
|
|
355
|
+
for (let r = 0; r < t; r++)
|
|
356
|
+
s.push(
|
|
357
|
+
e.replace("{indexX}", qt(r + 1, o)).replace("{indexY}", qt(n + 1, o))
|
|
358
|
+
);
|
|
359
|
+
return s;
|
|
360
|
+
}, fo = typeof navigator < "u" && /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent), go = fo ? 3 : 6, oi = ({
|
|
328
361
|
imagesUrls: e,
|
|
329
362
|
onFirstImageLoad: t,
|
|
330
363
|
onImageLoad: i,
|
|
@@ -335,65 +368,65 @@ const Ce = /* @__PURE__ */ Pi(Fi), Y = {
|
|
|
335
368
|
let r = 0, a = 0;
|
|
336
369
|
const l = e.length, c = [], h = [];
|
|
337
370
|
let u = 0, m = 0;
|
|
338
|
-
const
|
|
339
|
-
const
|
|
340
|
-
message: `Failed to load image: ${
|
|
341
|
-
url:
|
|
342
|
-
index:
|
|
343
|
-
isFirstImage:
|
|
371
|
+
const p = [], C = (f, y, I = !1) => {
|
|
372
|
+
const T = {
|
|
373
|
+
message: `Failed to load image: ${f}`,
|
|
374
|
+
url: f,
|
|
375
|
+
index: y,
|
|
376
|
+
isFirstImage: I
|
|
344
377
|
};
|
|
345
|
-
h.push(
|
|
346
|
-
error:
|
|
378
|
+
h.push(T), a++, s == null || s({
|
|
379
|
+
error: T,
|
|
347
380
|
errorCount: a,
|
|
348
381
|
totalImages: l,
|
|
349
382
|
errors: h
|
|
350
383
|
});
|
|
351
|
-
},
|
|
384
|
+
}, v = () => {
|
|
352
385
|
r === l && (o == null || o(c, { errorCount: a, errors: h }));
|
|
353
386
|
}, b = () => {
|
|
354
|
-
for (; u <
|
|
355
|
-
const
|
|
356
|
-
m++,
|
|
387
|
+
for (; u < go && m < p.length; ) {
|
|
388
|
+
const f = p[m];
|
|
389
|
+
m++, x(e[f], f);
|
|
357
390
|
}
|
|
358
|
-
},
|
|
391
|
+
}, x = (f, y) => {
|
|
359
392
|
u++;
|
|
360
|
-
const
|
|
361
|
-
|
|
393
|
+
const I = new Image();
|
|
394
|
+
I.crossOrigin = "anonymous", I.src = f, I.onload = async () => {
|
|
362
395
|
try {
|
|
363
|
-
const
|
|
364
|
-
src:
|
|
365
|
-
bitmapImage:
|
|
366
|
-
naturalWidth:
|
|
367
|
-
naturalHeight:
|
|
396
|
+
const T = await createImageBitmap(I), k = {
|
|
397
|
+
src: f,
|
|
398
|
+
bitmapImage: T,
|
|
399
|
+
naturalWidth: I.naturalWidth,
|
|
400
|
+
naturalHeight: I.naturalHeight
|
|
368
401
|
};
|
|
369
|
-
|
|
402
|
+
I.onload = null, I.onerror = null, I.src = "", r++, u--, c[y] = k, i == null || i(k, y), v(), b();
|
|
370
403
|
} catch {
|
|
371
|
-
|
|
404
|
+
I.onload = null, I.onerror = null, I.src = "", r++, u--, C(f, y), v(), b();
|
|
372
405
|
}
|
|
373
|
-
},
|
|
374
|
-
|
|
406
|
+
}, I.onerror = () => {
|
|
407
|
+
I.onload = null, I.onerror = null, I.src = "", r++, u--, C(f, y), v(), b();
|
|
375
408
|
};
|
|
376
|
-
},
|
|
377
|
-
for (let
|
|
378
|
-
|
|
409
|
+
}, P = (f) => {
|
|
410
|
+
for (let y = 0; y < e.length; y++)
|
|
411
|
+
y !== f && p.push(y);
|
|
379
412
|
m = 0, b();
|
|
380
|
-
}, w = new Image(),
|
|
381
|
-
w.crossOrigin = "anonymous", w.src =
|
|
413
|
+
}, w = new Image(), g = n ? e.length - 1 : 0, E = e[g];
|
|
414
|
+
w.crossOrigin = "anonymous", w.src = E, w.onload = async () => {
|
|
382
415
|
try {
|
|
383
|
-
const
|
|
384
|
-
src:
|
|
385
|
-
bitmapImage:
|
|
416
|
+
const f = await createImageBitmap(w), y = {
|
|
417
|
+
src: E,
|
|
418
|
+
bitmapImage: f,
|
|
386
419
|
naturalWidth: w.naturalWidth,
|
|
387
420
|
naturalHeight: w.naturalHeight
|
|
388
421
|
};
|
|
389
|
-
w.onload = null, w.onerror = null, w.src = "", c[
|
|
422
|
+
w.onload = null, w.onerror = null, w.src = "", c[g] = y, r++, t == null || t(y), i == null || i(y, g), l === 1 ? v() : P(g);
|
|
390
423
|
} catch {
|
|
391
|
-
w.onload = null, w.onerror = null, w.src = "", r++, C(
|
|
424
|
+
w.onload = null, w.onerror = null, w.src = "", r++, C(E, g, !0), l === 1 ? v() : P(g);
|
|
392
425
|
}
|
|
393
426
|
}, w.onerror = () => {
|
|
394
|
-
w.onload = null, w.onerror = null, w.src = "", r++, C(
|
|
427
|
+
w.onload = null, w.onerror = null, w.src = "", r++, C(E, g, !0), l === 1 ? v() : P(g);
|
|
395
428
|
};
|
|
396
|
-
},
|
|
429
|
+
}, Xe = ({
|
|
397
430
|
cdnPathX: e,
|
|
398
431
|
cdnPathY: t,
|
|
399
432
|
configX: i,
|
|
@@ -404,34 +437,34 @@ const Ce = /* @__PURE__ */ Pi(Fi), Y = {
|
|
|
404
437
|
onError: a
|
|
405
438
|
}) => {
|
|
406
439
|
let l = { x: !1, y: !1 }, c = [], h = [], u = { errorCount: 0, errors: [] }, m = { errorCount: 0, errors: [] };
|
|
407
|
-
const
|
|
440
|
+
const p = e || i.imageList.length, C = t || o.imageList.length, v = () => {
|
|
408
441
|
if (l.x && l.y) {
|
|
409
|
-
const
|
|
442
|
+
const x = {
|
|
410
443
|
errorCount: u.errorCount + m.errorCount,
|
|
411
444
|
errors: [...u.errors, ...m.errors]
|
|
412
445
|
};
|
|
413
|
-
r == null || r(c, h,
|
|
446
|
+
r == null || r(c, h, x);
|
|
414
447
|
}
|
|
415
|
-
}, b = ({ cdnPath:
|
|
416
|
-
const
|
|
417
|
-
|
|
418
|
-
imagesUrls:
|
|
419
|
-
onFirstImageLoad:
|
|
420
|
-
onImageLoad: (
|
|
421
|
-
n == null || n(
|
|
448
|
+
}, b = ({ cdnPath: x, config: P, orientation: w, loadedImages: g, loadStats: E, onFirstImageLoad: f }) => {
|
|
449
|
+
const y = w === L.X, I = P.imageList.length ? P.imageList : po(x, P);
|
|
450
|
+
oi({
|
|
451
|
+
imagesUrls: I,
|
|
452
|
+
onFirstImageLoad: f,
|
|
453
|
+
onImageLoad: (T, k) => {
|
|
454
|
+
n == null || n(T, k, w), g[k] = T;
|
|
422
455
|
},
|
|
423
|
-
onError: (
|
|
424
|
-
a == null || a({ ...
|
|
456
|
+
onError: (T) => {
|
|
457
|
+
a == null || a({ ...T, orientation: w });
|
|
425
458
|
},
|
|
426
|
-
onAllImagesLoad: (
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
}),
|
|
459
|
+
onAllImagesLoad: (T, k) => {
|
|
460
|
+
g.length = 0, T.forEach((X, O) => {
|
|
461
|
+
X && (g[O] = X);
|
|
462
|
+
}), E.errorCount = k.errorCount, E.errors = k.errors.map((X) => ({ ...X, orientation: w })), l[y ? "x" : "y"] = !0, v();
|
|
430
463
|
},
|
|
431
|
-
autoplayReverse:
|
|
464
|
+
autoplayReverse: P.autoplayReverse
|
|
432
465
|
});
|
|
433
466
|
};
|
|
434
|
-
|
|
467
|
+
p ? b({
|
|
435
468
|
cdnPath: e,
|
|
436
469
|
config: i,
|
|
437
470
|
orientation: L.X,
|
|
@@ -444,9 +477,32 @@ const Ce = /* @__PURE__ */ Pi(Fi), Y = {
|
|
|
444
477
|
orientation: L.Y,
|
|
445
478
|
loadedImages: h,
|
|
446
479
|
loadStats: m,
|
|
447
|
-
onFirstImageLoad:
|
|
448
|
-
}) : l.y = !0, !
|
|
449
|
-
},
|
|
480
|
+
onFirstImageLoad: p ? void 0 : s
|
|
481
|
+
}) : l.y = !0, !p && !C && v();
|
|
482
|
+
}, Se = ({
|
|
483
|
+
cdnPath: e,
|
|
484
|
+
config: t,
|
|
485
|
+
onFirstImageLoad: i,
|
|
486
|
+
onImageLoad: o,
|
|
487
|
+
onAllImagesLoad: s,
|
|
488
|
+
onError: n
|
|
489
|
+
}) => {
|
|
490
|
+
const r = t.imageList && t.imageList.length ? t.imageList : mo(e, t);
|
|
491
|
+
oi({
|
|
492
|
+
imagesUrls: r,
|
|
493
|
+
onFirstImageLoad: i,
|
|
494
|
+
onImageLoad: (a, l) => {
|
|
495
|
+
o == null || o(a, l);
|
|
496
|
+
},
|
|
497
|
+
onAllImagesLoad: (a, l) => {
|
|
498
|
+
s == null || s(a, l);
|
|
499
|
+
},
|
|
500
|
+
onError: (a) => {
|
|
501
|
+
n == null || n(a);
|
|
502
|
+
},
|
|
503
|
+
autoplayReverse: t.autoplayReverse
|
|
504
|
+
});
|
|
505
|
+
}, vo = `
|
|
450
506
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1052 156" aria-hidden="true">
|
|
451
507
|
<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"/>
|
|
452
508
|
<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"/>
|
|
@@ -457,10 +513,10 @@ const Ce = /* @__PURE__ */ Pi(Fi), Y = {
|
|
|
457
513
|
<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"/>
|
|
458
514
|
</g>
|
|
459
515
|
</svg>
|
|
460
|
-
`,
|
|
516
|
+
`, yo = (e) => {
|
|
461
517
|
const t = document.createElement("div");
|
|
462
|
-
return t.innerHTML =
|
|
463
|
-
},
|
|
518
|
+
return t.innerHTML = vo, t.style.bottom = `${e}%`, t.className = "cloudimage-360-view-360-circle", t;
|
|
519
|
+
}, bo = `
|
|
464
520
|
<svg width="150" height="87" viewBox="0 0 150 87" xmlns="http://www.w3.org/2000/svg">
|
|
465
521
|
<g clip-path="url(#clip0_751_188)">
|
|
466
522
|
<g filter="url(#filter0_d_751_188)">
|
|
@@ -501,45 +557,45 @@ const Ce = /* @__PURE__ */ Pi(Fi), Y = {
|
|
|
501
557
|
</clipPath>
|
|
502
558
|
</defs>
|
|
503
559
|
</svg>
|
|
504
|
-
`,
|
|
560
|
+
`, wo = (e) => {
|
|
505
561
|
const t = document.createElement("div");
|
|
506
|
-
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 =
|
|
507
|
-
},
|
|
562
|
+
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 = bo, t;
|
|
563
|
+
}, Co = (e, t) => {
|
|
508
564
|
const { width: i, height: o } = t, s = document.createElement("canvas");
|
|
509
565
|
return s.width = i, s.height = o, s.style.width = "100%", s.style.height = "auto", e.appendChild(s), s;
|
|
510
|
-
},
|
|
566
|
+
}, si = '<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>', Io = '<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="4 14 10 14 10 20"/><polyline points="20 10 14 10 14 4"/><line x1="14" x2="21" y1="10" y2="3"/><line x1="3" x2="10" y1="21" y2="14"/></svg>', xo = () => {
|
|
511
567
|
const e = document.createElement("button");
|
|
512
|
-
return e.className = "cloudimage-360-button cloudimage-360-fullscreen-button", e.setAttribute("aria-label", "View fullscreen"), e.setAttribute("type", "button"), e.innerHTML =
|
|
513
|
-
},
|
|
514
|
-
e && (e.innerHTML = t ?
|
|
515
|
-
},
|
|
568
|
+
return e.className = "cloudimage-360-button cloudimage-360-fullscreen-button", e.setAttribute("aria-label", "View fullscreen"), e.setAttribute("type", "button"), e.innerHTML = si, e;
|
|
569
|
+
}, Po = (e, t) => {
|
|
570
|
+
e && (e.innerHTML = t ? Io : si, e.setAttribute("aria-label", t ? "Exit fullscreen" : "View fullscreen"));
|
|
571
|
+
}, Ye = (e) => {
|
|
516
572
|
const t = document.createElement("div");
|
|
517
573
|
return t.className = "cloudimage-360-icons-container", e.appendChild(t), t;
|
|
518
|
-
},
|
|
574
|
+
}, Eo = (e) => {
|
|
519
575
|
const t = document.createElement("div");
|
|
520
576
|
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;
|
|
521
|
-
},
|
|
577
|
+
}, To = (e) => {
|
|
522
578
|
const t = document.createElement("div");
|
|
523
579
|
t.className = "cloudimage-360-loader";
|
|
524
580
|
const i = document.createElement("span");
|
|
525
581
|
return i.className = "percentage", i.innerText = "0%", t.appendChild(i), e.appendChild(t), t;
|
|
526
|
-
},
|
|
582
|
+
}, ue = (e, t) => {
|
|
527
583
|
const i = e.querySelector(t);
|
|
528
584
|
i && i.parentNode.removeChild(i);
|
|
529
|
-
},
|
|
585
|
+
}, Ao = () => {
|
|
530
586
|
const e = document.createElement("div");
|
|
531
587
|
return e.className = "cloudimage-loading-spinner", e;
|
|
532
|
-
},
|
|
588
|
+
}, ko = (e) => {
|
|
533
589
|
const t = document.createElement("div");
|
|
534
590
|
return t.className = "cloudimage-360-hotspot-container", e.appendChild(t), t;
|
|
535
|
-
},
|
|
591
|
+
}, Xo = (e) => {
|
|
536
592
|
const t = document.createElement("div");
|
|
537
593
|
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;
|
|
538
|
-
},
|
|
594
|
+
}, So = (e, t) => {
|
|
539
595
|
e && (e.textContent = "", setTimeout(() => {
|
|
540
596
|
e.textContent = t;
|
|
541
597
|
}, 50));
|
|
542
|
-
},
|
|
598
|
+
}, ni = {
|
|
543
599
|
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>',
|
|
544
600
|
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>',
|
|
545
601
|
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>',
|
|
@@ -547,7 +603,7 @@ const Ce = /* @__PURE__ */ Pi(Fi), Y = {
|
|
|
547
603
|
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>',
|
|
548
604
|
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>',
|
|
549
605
|
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>'
|
|
550
|
-
},
|
|
606
|
+
}, Yo = {
|
|
551
607
|
drag: "Drag to rotate",
|
|
552
608
|
swipe: "Swipe to rotate",
|
|
553
609
|
click: "Click to zoom",
|
|
@@ -555,45 +611,45 @@ const Ce = /* @__PURE__ */ Pi(Fi), Y = {
|
|
|
555
611
|
pinch: "Pinch to zoom",
|
|
556
612
|
keys: "Use arrow keys",
|
|
557
613
|
fullscreen: "Click for fullscreen"
|
|
558
|
-
},
|
|
614
|
+
}, Lo = (e) => {
|
|
559
615
|
const t = document.createElement("div");
|
|
560
616
|
t.className = "cloudimage-360-hint-item";
|
|
561
|
-
const i =
|
|
617
|
+
const i = Yo[e];
|
|
562
618
|
return t.innerHTML = `
|
|
563
|
-
${
|
|
619
|
+
${ni[e]}
|
|
564
620
|
<span>${i}</span>
|
|
565
621
|
`, t;
|
|
566
|
-
},
|
|
622
|
+
}, Le = (e, t = []) => {
|
|
567
623
|
if (!t || t.length === 0) return null;
|
|
568
624
|
const i = document.createElement("div");
|
|
569
625
|
i.className = "cloudimage-360-hints-overlay", i.setAttribute("role", "tooltip"), i.setAttribute("aria-label", "Interaction hints");
|
|
570
626
|
const o = document.createElement("div");
|
|
571
627
|
return o.className = "cloudimage-360-hints-container", t.forEach((s) => {
|
|
572
|
-
|
|
628
|
+
ni[s] && o.appendChild(Lo(s));
|
|
573
629
|
}), i.appendChild(o), e.appendChild(i), i;
|
|
574
|
-
},
|
|
630
|
+
}, Me = (e, t) => t ? ["swipe", "pinch"] : ["drag", "dblclick"], Oe = (e) => {
|
|
575
631
|
e && e.classList.add("visible");
|
|
576
|
-
},
|
|
632
|
+
}, Mo = (e) => {
|
|
577
633
|
e && (e.classList.remove("visible"), e.classList.add("hiding"), setTimeout(() => {
|
|
578
634
|
e.classList.remove("hiding");
|
|
579
635
|
}, 300));
|
|
580
|
-
},
|
|
636
|
+
}, Oo = (e) => {
|
|
581
637
|
if (!e || typeof e != "object") return null;
|
|
582
638
|
const t = Object.keys(e).map((o) => parseInt(o, 10)).filter((o) => !isNaN(o)).sort((o, s) => o - s);
|
|
583
639
|
if (t.length === 0) return null;
|
|
584
640
|
const i = Math.floor(t.length / 2);
|
|
585
641
|
return t[i];
|
|
586
|
-
},
|
|
642
|
+
}, Ho = (e) => {
|
|
587
643
|
const t = [];
|
|
588
644
|
return !e || !Array.isArray(e) || e.forEach((i, o) => {
|
|
589
|
-
const s =
|
|
645
|
+
const s = Oo(i.positions);
|
|
590
646
|
s !== null && t.push({
|
|
591
647
|
id: i.id || `hotspot-${o}`,
|
|
592
648
|
frame: s,
|
|
593
649
|
label: i.label || null
|
|
594
650
|
});
|
|
595
651
|
}), t;
|
|
596
|
-
},
|
|
652
|
+
}, Ro = 400, zo = (e, t, i, o) => {
|
|
597
653
|
const s = document.createElement("button");
|
|
598
654
|
s.className = "cloudimage-360-hotspot-timeline-dot", s.setAttribute("type", "button"), s.setAttribute("aria-label", o || `Go to hotspot at frame ${t + 1}`), s.setAttribute("data-frame", t.toString()), s.setAttribute("data-hotspot-id", e);
|
|
599
655
|
const n = i > 1 ? t / (i - 1) * 100 : 0;
|
|
@@ -604,7 +660,7 @@ const Ce = /* @__PURE__ */ Pi(Fi), Y = {
|
|
|
604
660
|
s.addEventListener("mouseenter", () => {
|
|
605
661
|
a = setTimeout(() => {
|
|
606
662
|
r.classList.add("visible");
|
|
607
|
-
},
|
|
663
|
+
}, Ro);
|
|
608
664
|
}), s.addEventListener("mouseleave", () => {
|
|
609
665
|
a && (clearTimeout(a), a = null), r.classList.remove("visible");
|
|
610
666
|
}), s.addEventListener("click", () => {
|
|
@@ -612,8 +668,8 @@ const Ce = /* @__PURE__ */ Pi(Fi), Y = {
|
|
|
612
668
|
});
|
|
613
669
|
}
|
|
614
670
|
return s;
|
|
615
|
-
},
|
|
616
|
-
const o =
|
|
671
|
+
}, Zo = (e, t, i) => {
|
|
672
|
+
const o = Ho(i);
|
|
617
673
|
if (o.length === 0) return null;
|
|
618
674
|
const s = document.createElement("div");
|
|
619
675
|
s.className = "cloudimage-360-hotspot-timeline", s.setAttribute("role", "navigation"), s.setAttribute("aria-label", "Hotspot timeline navigation");
|
|
@@ -621,22 +677,22 @@ const Ce = /* @__PURE__ */ Pi(Fi), Y = {
|
|
|
621
677
|
n.className = "cloudimage-360-hotspot-timeline-track";
|
|
622
678
|
const r = document.createElement("div");
|
|
623
679
|
return r.className = "cloudimage-360-hotspot-timeline-indicator", o.forEach(({ id: a, frame: l, label: c }) => {
|
|
624
|
-
const h =
|
|
680
|
+
const h = zo(a, l, t, c);
|
|
625
681
|
n.appendChild(h);
|
|
626
682
|
}), n.appendChild(r), s.appendChild(n), e.appendChild(s), {
|
|
627
683
|
element: s,
|
|
628
684
|
indicator: r,
|
|
629
685
|
hotspotFrames: o
|
|
630
686
|
};
|
|
631
|
-
},
|
|
687
|
+
}, He = (e, t, i) => {
|
|
632
688
|
if (!e) return;
|
|
633
689
|
const o = i > 1 ? t / (i - 1) * 100 : 0;
|
|
634
690
|
e.style.left = `${o}%`;
|
|
635
|
-
},
|
|
691
|
+
}, Do = (e) => {
|
|
636
692
|
e && e.classList.add("visible");
|
|
637
|
-
},
|
|
693
|
+
}, Bo = (e) => {
|
|
638
694
|
e && e.classList.remove("visible");
|
|
639
|
-
},
|
|
695
|
+
}, Ut = (e, t = []) => {
|
|
640
696
|
if (!e) return t;
|
|
641
697
|
if (Array.isArray(e)) return e;
|
|
642
698
|
try {
|
|
@@ -644,15 +700,15 @@ const Ce = /* @__PURE__ */ Pi(Fi), Y = {
|
|
|
644
700
|
} catch (i) {
|
|
645
701
|
return console.warn("CloudImage 360: Failed to parse JSON:", i.message), t;
|
|
646
702
|
}
|
|
647
|
-
},
|
|
703
|
+
}, Go = (e, t) => {
|
|
648
704
|
const [i, o] = e.split("?");
|
|
649
705
|
if (!o) return e;
|
|
650
706
|
const s = new RegExp(`^${t}=|&${t}=`), n = o.split("&").filter((r) => !s.test(r)).join("&");
|
|
651
707
|
return n ? `${i}?${n}` : i;
|
|
652
|
-
},
|
|
653
|
-
const t =
|
|
708
|
+
}, _o = (e) => {
|
|
709
|
+
const t = Go(e, "width"), i = t.includes("?") ? "&" : "?";
|
|
654
710
|
return `${t}${i}width=${150 * devicePixelRatio}`;
|
|
655
|
-
},
|
|
711
|
+
}, Fo = (e) => {
|
|
656
712
|
const t = {
|
|
657
713
|
root: null,
|
|
658
714
|
rootMargin: "0px",
|
|
@@ -666,25 +722,25 @@ const Ce = /* @__PURE__ */ Pi(Fi), Y = {
|
|
|
666
722
|
r.isIntersecting && (i(r.target), n.unobserve(r.target));
|
|
667
723
|
});
|
|
668
724
|
}, t).observe(e);
|
|
669
|
-
},
|
|
670
|
-
const i =
|
|
671
|
-
return e.replace("{index}", i);
|
|
672
|
-
},
|
|
725
|
+
}, No = (e, t) => {
|
|
726
|
+
const i = qt(1, t);
|
|
727
|
+
return e.replace("{index}", i).replace("{indexX}", i).replace("{indexY}", i);
|
|
728
|
+
}, Wo = (e, t) => {
|
|
673
729
|
const [i] = e, o = /(https?):\/\//i.test(i);
|
|
674
|
-
return
|
|
730
|
+
return at({
|
|
675
731
|
...t,
|
|
676
732
|
folder: o ? "" : t.folder,
|
|
677
733
|
filename: i
|
|
678
734
|
});
|
|
679
|
-
},
|
|
735
|
+
}, Vo = (e, t) => {
|
|
680
736
|
const { imageList: i, indexZeroBase: o } = t;
|
|
681
737
|
if (i.length) {
|
|
682
|
-
const s =
|
|
738
|
+
const s = Ut(i, null);
|
|
683
739
|
if (s)
|
|
684
|
-
return
|
|
740
|
+
return Wo(s, t);
|
|
685
741
|
}
|
|
686
|
-
return
|
|
687
|
-
},
|
|
742
|
+
return No(e, o);
|
|
743
|
+
}, Re = (e, t, i) => {
|
|
688
744
|
const o = new Image();
|
|
689
745
|
return o.setAttribute(t ? "data-src" : "src", e), o.className = i, o.style.cssText = `
|
|
690
746
|
position: ${t ? "absolute" : "static"};
|
|
@@ -695,9 +751,9 @@ const Ce = /* @__PURE__ */ Pi(Fi), Y = {
|
|
|
695
751
|
object-position: center;
|
|
696
752
|
filter: blur(10px);
|
|
697
753
|
`, o;
|
|
698
|
-
},
|
|
699
|
-
const { innerBox: o, imageList: s, lazyload: n } = t || {}, [r] = s, a = r ||
|
|
700
|
-
|
|
754
|
+
}, he = (e, t, i) => {
|
|
755
|
+
const { innerBox: o, imageList: s, lazyload: n } = t || {}, [r] = s, a = r || Vo(e, t), l = _o(a), c = Re(l, n, "cloudimage-lazy"), h = Re(l, !1, "cloudimage-360-placeholder"), u = (m) => {
|
|
756
|
+
ue(o, ".cloudimage-lazy"), i && i({
|
|
701
757
|
event: m,
|
|
702
758
|
width: c.width,
|
|
703
759
|
height: c.height,
|
|
@@ -706,11 +762,11 @@ const Ce = /* @__PURE__ */ Pi(Fi), Y = {
|
|
|
706
762
|
src: l
|
|
707
763
|
});
|
|
708
764
|
};
|
|
709
|
-
c.onload = u, o.appendChild(c), o.appendChild(h),
|
|
710
|
-
},
|
|
765
|
+
c.onload = u, o.appendChild(c), o.appendChild(h), Fo(c);
|
|
766
|
+
}, jo = (e, t, i) => {
|
|
711
767
|
const o = e / i, s = t / i;
|
|
712
768
|
return { zoomedWidth: o, zoomedHeight: s };
|
|
713
|
-
},
|
|
769
|
+
}, Uo = ({
|
|
714
770
|
pointerX: e,
|
|
715
771
|
pointerY: t,
|
|
716
772
|
imageData: i,
|
|
@@ -723,56 +779,70 @@ const Ce = /* @__PURE__ */ Pi(Fi), Y = {
|
|
|
723
779
|
let c = e / n * a - o / 2, h = t / r * l - s / 2;
|
|
724
780
|
const u = Math.max(0, a - o), m = Math.max(0, l - s);
|
|
725
781
|
return c = Math.max(0, Math.min(c, u)), h = Math.max(0, Math.min(h, m)), { zoomOffsetX: c, zoomOffsetY: h };
|
|
726
|
-
},
|
|
782
|
+
}, ze = (e, { bottom: t, top: i }) => {
|
|
727
783
|
e ? t() : i();
|
|
728
|
-
},
|
|
784
|
+
}, Ze = (e, { left: t, right: i }) => {
|
|
729
785
|
e ? t() : i();
|
|
730
|
-
},
|
|
786
|
+
}, $o = ({ autoplayBehavior: e, spinY: t, reversed: i, loopTriggers: o }) => {
|
|
731
787
|
switch (e) {
|
|
732
788
|
case Y.SPIN_XY:
|
|
733
789
|
case Y.SPIN_YX:
|
|
734
|
-
t ?
|
|
790
|
+
t ? ze(i, o) : Ze(i, o);
|
|
735
791
|
break;
|
|
736
792
|
case Y.SPIN_Y:
|
|
737
|
-
|
|
793
|
+
ze(i, o);
|
|
738
794
|
break;
|
|
739
795
|
case Y.SPIN_X:
|
|
740
796
|
default:
|
|
741
|
-
|
|
797
|
+
Ze(i, o);
|
|
742
798
|
}
|
|
743
|
-
},
|
|
799
|
+
}, Ko = ({
|
|
744
800
|
autoplayBehavior: e,
|
|
745
801
|
activeImageX: t,
|
|
746
802
|
activeImageY: i,
|
|
747
803
|
amountX: o,
|
|
748
804
|
amountY: s,
|
|
749
|
-
autoplayReverse: n
|
|
805
|
+
autoplayReverse: n,
|
|
806
|
+
isGridMode: r = !1
|
|
750
807
|
}) => {
|
|
751
|
-
const
|
|
752
|
-
const
|
|
753
|
-
return n ?
|
|
808
|
+
const a = (l, c) => {
|
|
809
|
+
const h = c - 1;
|
|
810
|
+
return n ? l === 0 : l === h;
|
|
754
811
|
};
|
|
812
|
+
if (r)
|
|
813
|
+
switch (e) {
|
|
814
|
+
case Y.SPIN_X:
|
|
815
|
+
return a(t, o);
|
|
816
|
+
case Y.SPIN_Y:
|
|
817
|
+
return a(i, s);
|
|
818
|
+
case Y.SPIN_XY:
|
|
819
|
+
case Y.SPIN_YX:
|
|
820
|
+
default:
|
|
821
|
+
return a(t, o) && a(i, s);
|
|
822
|
+
}
|
|
755
823
|
switch (e) {
|
|
756
824
|
case Y.SPIN_XY:
|
|
757
825
|
case Y.SPIN_Y:
|
|
758
|
-
return
|
|
826
|
+
return a(i, s);
|
|
759
827
|
case Y.SPIN_X:
|
|
760
828
|
case Y.SPIN_YX:
|
|
761
829
|
default:
|
|
762
|
-
return
|
|
830
|
+
return a(t, o);
|
|
763
831
|
}
|
|
764
|
-
},
|
|
832
|
+
}, qo = ({
|
|
765
833
|
autoplayBehavior: e,
|
|
766
834
|
activeImageX: t,
|
|
767
835
|
activeImageY: i,
|
|
768
836
|
amountX: o,
|
|
769
837
|
amountY: s,
|
|
770
838
|
autoplayReverse: n,
|
|
771
|
-
spinDirection: r
|
|
839
|
+
spinDirection: r,
|
|
840
|
+
isGridMode: a = !1
|
|
772
841
|
}) => {
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
842
|
+
if (a) return !1;
|
|
843
|
+
const l = t === (n ? 0 : o - 1), c = i === (n ? 0 : s - 1);
|
|
844
|
+
return e === Y.SPIN_XY || e === Y.SPIN_YX ? r === "x" && l || r === "y" && c : !1;
|
|
845
|
+
}, Jo = (e, t, i) => {
|
|
776
846
|
if (!i) return "x";
|
|
777
847
|
if (!t) return "y";
|
|
778
848
|
switch (e) {
|
|
@@ -786,21 +856,21 @@ const Ce = /* @__PURE__ */ Pi(Fi), Y = {
|
|
|
786
856
|
default:
|
|
787
857
|
return "x";
|
|
788
858
|
}
|
|
789
|
-
},
|
|
790
|
-
const i = [...
|
|
791
|
-
return t ? [...i, ...
|
|
792
|
-
},
|
|
859
|
+
}, Qo = (e) => e === "x" ? "y" : "x", De = (e, t) => {
|
|
860
|
+
const i = [...Ji];
|
|
861
|
+
return t ? [...i, ...Qi].includes(e) : i.includes(e);
|
|
862
|
+
}, Be = ({ deltaX: e, deltaY: t, reversed: i, allowSpinX: o, allowSpinY: s, threshold: n = 0 }) => {
|
|
793
863
|
const r = o && !s || s && !o ? 0 : n, a = Math.abs(e), l = Math.abs(t);
|
|
794
864
|
return o && a - r > l ? i ? e > 0 ? "left" : "right" : e > 0 ? "right" : "left" : s && l - r > a ? i ? t > 0 ? "up" : "down" : t > 0 ? "down" : "up" : null;
|
|
795
|
-
},
|
|
865
|
+
}, ts = () => "ontouchstart" in window || navigator.maxTouchPoints > 0 || navigator.msMaxTouchPoints > 0, es = (e, t = 150) => {
|
|
796
866
|
let i;
|
|
797
867
|
return function(...o) {
|
|
798
868
|
clearTimeout(i), i = setTimeout(() => {
|
|
799
869
|
e.apply(this, o);
|
|
800
870
|
}, t);
|
|
801
871
|
};
|
|
802
|
-
},
|
|
803
|
-
class
|
|
872
|
+
}, is = () => document.fullscreenEnabled || document.webkitFullscreenEnabled, ce = () => document.fullscreenElement || document.webkitFullscreenElement, os = (e) => e.requestFullscreen ? e.requestFullscreen() : e.webkitRequestFullscreen ? e.webkitRequestFullscreen() : Promise.reject(new Error("Fullscreen API not supported")), Ge = () => document.exitFullscreen ? document.exitFullscreen() : document.webkitExitFullscreen ? document.webkitExitFullscreen() : Promise.reject(new Error("Fullscreen API not supported")), N = 1;
|
|
873
|
+
class ss {
|
|
804
874
|
constructor(t, {
|
|
805
875
|
zoomMax: i = 5,
|
|
806
876
|
zoomStep: o = 0.5,
|
|
@@ -826,7 +896,7 @@ class qo {
|
|
|
826
896
|
this._applyZoom(this.zoom - this.zoomStep);
|
|
827
897
|
}
|
|
828
898
|
resetZoom() {
|
|
829
|
-
this._applyZoom(
|
|
899
|
+
this._applyZoom(N);
|
|
830
900
|
}
|
|
831
901
|
setZoom(t) {
|
|
832
902
|
this._applyZoom(t);
|
|
@@ -838,11 +908,11 @@ class qo {
|
|
|
838
908
|
return this.zoom;
|
|
839
909
|
}
|
|
840
910
|
isZoomed() {
|
|
841
|
-
return this.zoom >
|
|
911
|
+
return this.zoom > N;
|
|
842
912
|
}
|
|
843
913
|
// --- Mouse pan management ---
|
|
844
914
|
startPan(t, i) {
|
|
845
|
-
return this.zoom <=
|
|
915
|
+
return this.zoom <= N ? !1 : (this.isPanning = !0, this.panStartX = t, this.panStartY = i, document.addEventListener("mousemove", this._onMouseMove), document.addEventListener("mouseup", this._onMouseUp), !0);
|
|
846
916
|
}
|
|
847
917
|
_stopPanListeners() {
|
|
848
918
|
document.removeEventListener("mousemove", this._onMouseMove), document.removeEventListener("mouseup", this._onMouseUp);
|
|
@@ -859,12 +929,14 @@ class qo {
|
|
|
859
929
|
_onWheel(t) {
|
|
860
930
|
if (!t.ctrlKey && !t.metaKey) return;
|
|
861
931
|
t.preventDefault();
|
|
862
|
-
|
|
863
|
-
|
|
932
|
+
let i = -t.deltaY;
|
|
933
|
+
t.deltaMode === 1 && (i *= 40), t.deltaMode === 2 && (i *= 800);
|
|
934
|
+
const o = Math.pow(2, i / 300), s = this.zoom * o;
|
|
935
|
+
this._zoomTowardPoint(s, t.clientX, t.clientY);
|
|
864
936
|
}
|
|
865
937
|
// --- Double-click toggle ---
|
|
866
938
|
_onDblClick(t) {
|
|
867
|
-
t.target && t.target.closest && (t.target.closest(".cloudimage-360-button") || t.target.closest(".cloudimage-360-hotspot-timeline") || t.target.closest(".cloudimage-360-hotspot") || t.target.closest(".cloudimage-360-zoom-controls")) || (this.zoom >
|
|
939
|
+
t.target && t.target.closest && (t.target.closest(".cloudimage-360-button") || t.target.closest(".cloudimage-360-hotspot-timeline") || t.target.closest(".cloudimage-360-hotspot") || t.target.closest(".cloudimage-360-zoom-controls")) || (this.zoom > N ? this._applyZoom(N) : this._zoomTowardPoint(2, t.clientX, t.clientY));
|
|
868
940
|
}
|
|
869
941
|
// --- Safari GestureEvent (trackpad pinch) ---
|
|
870
942
|
_onGestureStart(t) {
|
|
@@ -883,7 +955,7 @@ class qo {
|
|
|
883
955
|
return t === 187 || t === 107 ? (this.zoomIn(), !0) : t === 189 || t === 109 ? (this.zoomOut(), !0) : t === 48 || t === 96 ? (this.resetZoom(), !0) : !1;
|
|
884
956
|
}
|
|
885
957
|
handleKeyPan(t, i = 50) {
|
|
886
|
-
if (this.zoom <=
|
|
958
|
+
if (this.zoom <= N) return !1;
|
|
887
959
|
let o = 0, s = 0;
|
|
888
960
|
switch (t) {
|
|
889
961
|
case 37:
|
|
@@ -905,7 +977,7 @@ class qo {
|
|
|
905
977
|
}
|
|
906
978
|
// --- Touch pan (called by GestureRecognizer) ---
|
|
907
979
|
applyTouchPan(t, i) {
|
|
908
|
-
this.zoom <=
|
|
980
|
+
this.zoom <= N || this._applyPan(this.panX - t, this.panY - i);
|
|
909
981
|
}
|
|
910
982
|
applyTouchZoom(t) {
|
|
911
983
|
this._applyZoom(t);
|
|
@@ -913,7 +985,7 @@ class qo {
|
|
|
913
985
|
// --- Internal ---
|
|
914
986
|
_zoomTowardPoint(t, i, o) {
|
|
915
987
|
var r;
|
|
916
|
-
const s = Math.max(
|
|
988
|
+
const s = Math.max(N, Math.min(t, this.zoomMax));
|
|
917
989
|
if (s === this.zoom) return;
|
|
918
990
|
const n = (r = this.container.querySelector("canvas")) == null ? void 0 : r.getBoundingClientRect();
|
|
919
991
|
if (n) {
|
|
@@ -923,14 +995,14 @@ class qo {
|
|
|
923
995
|
this.zoom = s, this._clampPan(), this._emit();
|
|
924
996
|
}
|
|
925
997
|
_applyZoom(t) {
|
|
926
|
-
const i = Math.max(
|
|
927
|
-
i !== this.zoom && (this.zoom = i, this.zoom <=
|
|
998
|
+
const i = Math.max(N, Math.min(t, this.zoomMax));
|
|
999
|
+
i !== this.zoom && (this.zoom = i, this.zoom <= N && (this.panX = this.drawWidth / 2, this.panY = this.drawHeight / 2), this._clampPan(), this._emit());
|
|
928
1000
|
}
|
|
929
1001
|
_applyPan(t, i) {
|
|
930
1002
|
this.panX = t, this.panY = i, this._clampPan(), this._emit();
|
|
931
1003
|
}
|
|
932
1004
|
_clampPan() {
|
|
933
|
-
if (this.zoom <=
|
|
1005
|
+
if (this.zoom <= N || !this.drawWidth || !this.drawHeight) return;
|
|
934
1006
|
const t = this.drawWidth / (2 * this.zoom), i = this.drawHeight / (2 * this.zoom);
|
|
935
1007
|
this.panX = Math.max(t, Math.min(this.panX, this.drawWidth - t)), this.panY = Math.max(i, Math.min(this.panY, this.drawHeight - i));
|
|
936
1008
|
}
|
|
@@ -938,7 +1010,7 @@ class qo {
|
|
|
938
1010
|
typeof this.onZoomChange == "function" && this.onZoomChange(this.zoom, this.panX, this.panY);
|
|
939
1011
|
}
|
|
940
1012
|
}
|
|
941
|
-
class
|
|
1013
|
+
class ns {
|
|
942
1014
|
constructor(t, {
|
|
943
1015
|
onPinchZoom: i,
|
|
944
1016
|
onPan: o,
|
|
@@ -1001,7 +1073,7 @@ class Jo {
|
|
|
1001
1073
|
this.isPinching && (!t.touches || t.touches.length < 2) && (this.isPinching = !1, this.initialPinchDistance = 0, t.touches && t.touches.length === 1 && (this.lastTouchX = t.touches[0].pageX, this.lastTouchY = t.touches[0].pageY));
|
|
1002
1074
|
}
|
|
1003
1075
|
}
|
|
1004
|
-
const
|
|
1076
|
+
const rs = '<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" 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"/><line x1="21" x2="16.65" y1="21" y2="16.65"/><line x1="11" x2="11" y1="8" y2="14"/><line x1="8" x2="14" y1="11" y2="11"/></svg>', as = '<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" 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"/><line x1="21" x2="16.65" y1="21" y2="16.65"/><line x1="8" x2="14" y1="11" y2="11"/></svg>', ls = '<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8"/><path d="M3 3v5h5"/></svg>', hs = (e, {
|
|
1005
1077
|
position: t = "bottom-right",
|
|
1006
1078
|
onZoomIn: i,
|
|
1007
1079
|
onZoomOut: o,
|
|
@@ -1011,20 +1083,22 @@ const Qo = '<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewB
|
|
|
1011
1083
|
const r = document.createElement("div");
|
|
1012
1084
|
r.className = "cloudimage-360-zoom-controls", r.setAttribute("data-position", t), r.setAttribute("role", "toolbar"), r.setAttribute("aria-label", "Zoom controls");
|
|
1013
1085
|
const a = document.createElement("button");
|
|
1014
|
-
a.className = "cloudimage-360-zoom-btn cloudimage-360-zoom-btn-in", a.setAttribute("aria-label", "Zoom in"), a.innerHTML =
|
|
1015
|
-
|
|
1086
|
+
a.className = "cloudimage-360-zoom-btn cloudimage-360-zoom-btn-in", a.setAttribute("aria-label", "Zoom in"), a.innerHTML = rs, a.addEventListener("click", (u) => {
|
|
1087
|
+
u.stopPropagation(), typeof i == "function" && i();
|
|
1016
1088
|
});
|
|
1017
1089
|
const l = document.createElement("button");
|
|
1018
|
-
l.className = "cloudimage-360-zoom-btn cloudimage-360-zoom-btn-out", l.setAttribute("aria-label", "Zoom out"), l.innerHTML =
|
|
1019
|
-
|
|
1090
|
+
l.className = "cloudimage-360-zoom-btn cloudimage-360-zoom-btn-out", l.setAttribute("aria-label", "Zoom out"), l.innerHTML = as, l.disabled = !0, l.addEventListener("click", (u) => {
|
|
1091
|
+
u.stopPropagation(), typeof o == "function" && o();
|
|
1020
1092
|
});
|
|
1021
1093
|
const c = document.createElement("button");
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
})
|
|
1094
|
+
c.className = "cloudimage-360-zoom-btn cloudimage-360-zoom-btn-reset", c.setAttribute("aria-label", "Reset zoom"), c.innerHTML = ls, c.disabled = !0, c.addEventListener("click", (u) => {
|
|
1095
|
+
u.stopPropagation(), typeof s == "function" && s();
|
|
1096
|
+
});
|
|
1097
|
+
const h = document.createElement("span");
|
|
1098
|
+
return h.className = "cloudimage-360-zoom-separator", r.appendChild(a), r.appendChild(l), r.appendChild(h), r.appendChild(c), e.appendChild(r), {
|
|
1025
1099
|
element: r,
|
|
1026
|
-
updateState(
|
|
1027
|
-
a.disabled =
|
|
1100
|
+
updateState(u) {
|
|
1101
|
+
a.disabled = u >= n, l.disabled = u <= 1, c.disabled = u <= 1;
|
|
1028
1102
|
},
|
|
1029
1103
|
show() {
|
|
1030
1104
|
r.classList.add("visible");
|
|
@@ -1036,11 +1110,11 @@ const Qo = '<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewB
|
|
|
1036
1110
|
r.parentNode && r.parentNode.removeChild(r);
|
|
1037
1111
|
}
|
|
1038
1112
|
};
|
|
1039
|
-
},
|
|
1040
|
-
function
|
|
1113
|
+
}, ri = "KGZ1bmN0aW9uKCl7InVzZSBzdHJpY3QiO2NvbnN0IHY9KHQsYSxlKT0+e2NvbnN0IHM9dC9lLG49YS9lO3JldHVybnt6b29tZWRXaWR0aDpzLHpvb21lZEhlaWdodDpufX0sej0oe3BvaW50ZXJYOnQscG9pbnRlclk6YSxpbWFnZURhdGE6ZSx6b29tZWRXaWR0aDpzLHpvb21lZEhlaWdodDpuLGRyYXdXaWR0aDppLGRyYXdIZWlnaHQ6Y30pPT57Y29uc3R7bmF0dXJhbFdpZHRoOmcsbmF0dXJhbEhlaWdodDp1fT1lO2xldCBmPXQvaSpnLXMvMixtPWEvYyp1LW4vMjtjb25zdCB4PU1hdGgubWF4KDAsZy1zKSxPPU1hdGgubWF4KDAsdS1uKTtyZXR1cm4gZj1NYXRoLm1heCgwLE1hdGgubWluKGYseCkpLG09TWF0aC5tYXgoMCxNYXRoLm1pbihtLE8pKSx7em9vbU9mZnNldFg6Zix6b29tT2Zmc2V0WTptfX07bGV0IG8saCxyLGQsbCx3O3NlbGYub25tZXNzYWdlPWFzeW5jIHQ9Pntjb25zdHthY3Rpb246YSxvZmZzY3JlZW46ZSxkZXZpY2VQaXhlbFJhdGlvOnMsaW1hZ2VEYXRhOm4sem9vbVNjYWxlOmkscG9pbnRlclg6Yyxwb2ludGVyWTpnLGltYWdlQXNwZWN0UmF0aW86dSxjb250YWluZXJXaWR0aDpmLGNvbnRhaW5lckhlaWdodDptfT10LmRhdGE7c3dpdGNoKGEpe2Nhc2UiaW5pdENhbnZhcyI6QyhlLHMpO2JyZWFrO2Nhc2UiYWRhcHRDYW52YXNTaXplIjpwKHUsZixtKTticmVhaztjYXNlImRyYXdJbWFnZU9uQ2FudmFzIjpJKG4saSxjLGcpO2JyZWFrfX07Y29uc3QgQz0odCxhKT0+e289dCxoPW8uZ2V0Q29udGV4dCgiMmQiKSxyPWF9LHA9KHQsYSxlKT0+e2NvbnN0IHM9YS9lO3c9dD5zLG8ud2lkdGg9YSpyLG8uaGVpZ2h0PWUqcixoLnNjYWxlKHIsciksdz8oZD1hLGw9YS90KToobD1lLGQ9ZSp0KSxoLmltYWdlU21vb3RoaW5nRW5hYmxlZD0hMCxoLmltYWdlU21vb3RoaW5nUXVhbGl0eT0iaGlnaCJ9LEk9KHQ9e30sYT0xLGU9MCxzPTApPT57Y29uc3R7Yml0bWFwSW1hZ2U6bn09dDtpZighb3x8IW4pcmV0dXJuO2xldCBpLGM7aWYodz8oaT0wLGM9KG8uaGVpZ2h0L3ItbCkvMik6KGk9KG8ud2lkdGgvci1kKS8yLGM9MCksaC5jbGVhclJlY3QoMCwwLG8ud2lkdGgsby5oZWlnaHQpLGEhPT0xKXtjb25zdHtuYXR1cmFsV2lkdGg6ZyxuYXR1cmFsSGVpZ2h0OnV9PXQse3pvb21lZFdpZHRoOmYsem9vbWVkSGVpZ2h0Om19PXYoZyx1LGEpLHt6b29tT2Zmc2V0WDp4LHpvb21PZmZzZXRZOk99PXooe3BvaW50ZXJYOmUscG9pbnRlclk6cyxpbWFnZURhdGE6dCx6b29tZWRXaWR0aDpmLHpvb21lZEhlaWdodDptLGRyYXdXaWR0aDpkLGRyYXdIZWlnaHQ6bH0pO2guZHJhd0ltYWdlKG4seCxPLGYsbSxpLGMsZCxsKX1lbHNlIGguZHJhd0ltYWdlKG4saSxjLGQsbCl9fSkoKTsKLy8jIHNvdXJjZU1hcHBpbmdVUkw9Y2FudmFzLndvcmtlci1DZzBma3BEMS5qcy5tYXAK", cs = (e) => Uint8Array.from(atob(e), (t) => t.charCodeAt(0)), _e = typeof self < "u" && self.Blob && new Blob([cs(ri)], { type: "text/javascript;charset=utf-8" });
|
|
1114
|
+
function ds(e) {
|
|
1041
1115
|
let t;
|
|
1042
1116
|
try {
|
|
1043
|
-
if (t =
|
|
1117
|
+
if (t = _e && (self.URL || self.webkitURL).createObjectURL(_e), !t) throw "";
|
|
1044
1118
|
const i = new Worker(t, {
|
|
1045
1119
|
name: e == null ? void 0 : e.name
|
|
1046
1120
|
});
|
|
@@ -1049,7 +1123,7 @@ function ss(e) {
|
|
|
1049
1123
|
}), i;
|
|
1050
1124
|
} catch {
|
|
1051
1125
|
return new Worker(
|
|
1052
|
-
"data:text/javascript;base64," +
|
|
1126
|
+
"data:text/javascript;base64," + ri,
|
|
1053
1127
|
{
|
|
1054
1128
|
name: e == null ? void 0 : e.name
|
|
1055
1129
|
}
|
|
@@ -1058,7 +1132,7 @@ function ss(e) {
|
|
|
1058
1132
|
t && (self.URL || self.webkitURL).revokeObjectURL(t);
|
|
1059
1133
|
}
|
|
1060
1134
|
}
|
|
1061
|
-
class
|
|
1135
|
+
class us {
|
|
1062
1136
|
constructor() {
|
|
1063
1137
|
this.canvas = null, this.ctx = null, this.dpr = 1, this.drawWidth = 0, this.drawHeight = 0, this.wideImage = !1;
|
|
1064
1138
|
}
|
|
@@ -1111,7 +1185,7 @@ class ns {
|
|
|
1111
1185
|
if (!this.canvas || !this.ctx || !n) return;
|
|
1112
1186
|
let r, a;
|
|
1113
1187
|
if (this.wideImage ? (r = 0, a = (this.canvas.height / this.dpr - this.drawHeight) / 2) : (r = (this.canvas.width / this.dpr - this.drawWidth) / 2, a = 0), this.ctx.clearRect(0, 0, this.canvas.width, this.canvas.height), i !== 1) {
|
|
1114
|
-
const { naturalWidth: l, naturalHeight: c } = t, { zoomedWidth: h, zoomedHeight: u } =
|
|
1188
|
+
const { naturalWidth: l, naturalHeight: c } = t, { zoomedWidth: h, zoomedHeight: u } = jo(l, c, i), { zoomOffsetX: m, zoomOffsetY: p } = Uo({
|
|
1115
1189
|
pointerX: o,
|
|
1116
1190
|
pointerY: s,
|
|
1117
1191
|
imageData: t,
|
|
@@ -1123,7 +1197,7 @@ class ns {
|
|
|
1123
1197
|
this.ctx.drawImage(
|
|
1124
1198
|
n,
|
|
1125
1199
|
m,
|
|
1126
|
-
|
|
1200
|
+
p,
|
|
1127
1201
|
h,
|
|
1128
1202
|
u,
|
|
1129
1203
|
r,
|
|
@@ -1135,7 +1209,7 @@ class ns {
|
|
|
1135
1209
|
this.ctx.drawImage(n, r, a, this.drawWidth, this.drawHeight);
|
|
1136
1210
|
}
|
|
1137
1211
|
}
|
|
1138
|
-
const
|
|
1212
|
+
const ps = /* @__PURE__ */ new Set([
|
|
1139
1213
|
// Basic HTML
|
|
1140
1214
|
"p",
|
|
1141
1215
|
"span",
|
|
@@ -1194,7 +1268,7 @@ const rs = /* @__PURE__ */ new Set([
|
|
|
1194
1268
|
"lineargradient",
|
|
1195
1269
|
"radialgradient",
|
|
1196
1270
|
"stop"
|
|
1197
|
-
]),
|
|
1271
|
+
]), Fe = {
|
|
1198
1272
|
a: ["href", "title", "target", "rel"],
|
|
1199
1273
|
img: ["src", "alt", "title", "width", "height"],
|
|
1200
1274
|
button: ["type", "disabled", "name", "value"],
|
|
@@ -1222,11 +1296,11 @@ const rs = /* @__PURE__ */ new Set([
|
|
|
1222
1296
|
clippath: ["id"],
|
|
1223
1297
|
mask: ["id"],
|
|
1224
1298
|
"*": ["class", "id", "style"]
|
|
1225
|
-
},
|
|
1299
|
+
}, ms = [
|
|
1226
1300
|
/javascript:/i,
|
|
1227
1301
|
/vbscript:/i,
|
|
1228
1302
|
/on\w+\s*=/i
|
|
1229
|
-
],
|
|
1303
|
+
], fs = (e) => {
|
|
1230
1304
|
if (typeof e != "string")
|
|
1231
1305
|
return "";
|
|
1232
1306
|
const t = document.createElement("template");
|
|
@@ -1234,7 +1308,7 @@ const rs = /* @__PURE__ */ new Set([
|
|
|
1234
1308
|
const i = (o) => {
|
|
1235
1309
|
if (Array.from(o.childNodes).forEach(i), o.nodeType === Node.ELEMENT_NODE) {
|
|
1236
1310
|
const n = o.tagName.toLowerCase();
|
|
1237
|
-
if (!
|
|
1311
|
+
if (!ps.has(n)) {
|
|
1238
1312
|
if (n === "script" || n === "style") {
|
|
1239
1313
|
o.remove();
|
|
1240
1314
|
return;
|
|
@@ -1244,8 +1318,8 @@ const rs = /* @__PURE__ */ new Set([
|
|
|
1244
1318
|
return;
|
|
1245
1319
|
}
|
|
1246
1320
|
const r = [
|
|
1247
|
-
...
|
|
1248
|
-
...
|
|
1321
|
+
...Fe[n] || [],
|
|
1322
|
+
...Fe["*"] || []
|
|
1249
1323
|
];
|
|
1250
1324
|
if (Array.from(o.attributes).forEach((l) => {
|
|
1251
1325
|
const c = l.name.toLowerCase();
|
|
@@ -1258,7 +1332,7 @@ const rs = /* @__PURE__ */ new Set([
|
|
|
1258
1332
|
return;
|
|
1259
1333
|
}
|
|
1260
1334
|
let h = l.value;
|
|
1261
|
-
|
|
1335
|
+
ms.forEach((u) => {
|
|
1262
1336
|
u.test(h) && o.removeAttribute(l.name);
|
|
1263
1337
|
});
|
|
1264
1338
|
}), n === "a") {
|
|
@@ -1272,9 +1346,7 @@ const rs = /* @__PURE__ */ new Set([
|
|
|
1272
1346
|
}
|
|
1273
1347
|
};
|
|
1274
1348
|
return i(t.content), t.innerHTML;
|
|
1275
|
-
},
|
|
1276
|
-
(o) => hs(o.orientation) === i && t in o.positions
|
|
1277
|
-
), ds = (e, t, i) => {
|
|
1349
|
+
}, gs = (e) => e === "y" ? L.Y : L.X, vs = (e, t, i) => e.filter((o) => t in o.positions ? i === "grid" ? !0 : gs(o.orientation) === i : !1), ys = (e, t, i) => {
|
|
1278
1350
|
const o = document.createElement("button");
|
|
1279
1351
|
if (o.id = e, o.className = "cloudimage-360-hotspot cloudimage-360-hotspot--pulse", o.dataset.hotspotId = e, o.setAttribute("type", "button"), o.setAttribute("aria-label", t || `Hotspot ${e}`), o.setAttribute("aria-haspopup", "true"), o.setAttribute("aria-expanded", "false"), i === "dot-label" && t) {
|
|
1280
1352
|
o.classList.add("cloudimage-360-hotspot--dot-label");
|
|
@@ -1282,7 +1354,7 @@ const rs = /* @__PURE__ */ new Set([
|
|
|
1282
1354
|
s.className = "cloudimage-360-hotspot-label", s.textContent = t, o.appendChild(s);
|
|
1283
1355
|
}
|
|
1284
1356
|
return o;
|
|
1285
|
-
},
|
|
1357
|
+
}, bs = (e) => {
|
|
1286
1358
|
const t = Object.entries(e).sort(([n], [r]) => Number(n) - Number(r));
|
|
1287
1359
|
let i = null, o = null;
|
|
1288
1360
|
const s = {};
|
|
@@ -1297,7 +1369,7 @@ const rs = /* @__PURE__ */ new Set([
|
|
|
1297
1369
|
};
|
|
1298
1370
|
}
|
|
1299
1371
|
return s;
|
|
1300
|
-
},
|
|
1372
|
+
}, ws = (e) => ({
|
|
1301
1373
|
placement: "top",
|
|
1302
1374
|
modifiers: [
|
|
1303
1375
|
{
|
|
@@ -1320,13 +1392,13 @@ const rs = /* @__PURE__ */ new Set([
|
|
|
1320
1392
|
}
|
|
1321
1393
|
}
|
|
1322
1394
|
]
|
|
1323
|
-
}),
|
|
1395
|
+
}), Cs = (e, t, i) => {
|
|
1324
1396
|
const o = document.createElement("div");
|
|
1325
|
-
return o.className = "cloudimage-360-popper", o.id = `cloudimage-360-popper-${t}`, o.dataset.popperId = t, o.setAttribute("role", "tooltip"), o.setAttribute("aria-hidden", "false"), typeof e == "string" && /<\/?[a-z][\s\S]*>/i.test(e) ? o.innerHTML =
|
|
1326
|
-
},
|
|
1327
|
-
const i = { ...
|
|
1397
|
+
return o.className = "cloudimage-360-popper", o.id = `cloudimage-360-popper-${t}`, o.dataset.popperId = t, o.setAttribute("role", "tooltip"), o.setAttribute("aria-hidden", "false"), typeof e == "string" && /<\/?[a-z][\s\S]*>/i.test(e) ? o.innerHTML = fs(e) : o.textContent = e, (i || document.body).appendChild(o), o;
|
|
1398
|
+
}, Is = (e) => e.map((t) => {
|
|
1399
|
+
const i = { ...bs(t.positions) };
|
|
1328
1400
|
return { ...t, initialPositions: i, positions: i };
|
|
1329
|
-
}),
|
|
1401
|
+
}), xs = ({
|
|
1330
1402
|
newWidth: e,
|
|
1331
1403
|
newHeight: t,
|
|
1332
1404
|
initialContainerSize: i,
|
|
@@ -1337,59 +1409,59 @@ const rs = /* @__PURE__ */ new Set([
|
|
|
1337
1409
|
let a = e, l = t, c = 0, h = 0;
|
|
1338
1410
|
const u = e / t;
|
|
1339
1411
|
o > u ? (l = e / o, h = (t - l) / 2) : (a = t * o, c = (e - a) / 2);
|
|
1340
|
-
const
|
|
1341
|
-
return s.map((
|
|
1412
|
+
const p = a / n, C = l / r;
|
|
1413
|
+
return s.map((v) => {
|
|
1342
1414
|
const b = {};
|
|
1343
|
-
return Object.entries(
|
|
1344
|
-
b[
|
|
1345
|
-
x:
|
|
1346
|
-
y:
|
|
1415
|
+
return Object.entries(v.initialPositions).forEach(([x, P]) => {
|
|
1416
|
+
b[x] = {
|
|
1417
|
+
x: P.x * p + c,
|
|
1418
|
+
y: P.y * C + h
|
|
1347
1419
|
};
|
|
1348
|
-
}), { ...
|
|
1420
|
+
}), { ...v, positions: b };
|
|
1349
1421
|
});
|
|
1350
1422
|
};
|
|
1351
|
-
function
|
|
1423
|
+
function Ps(e) {
|
|
1352
1424
|
const t = [];
|
|
1353
1425
|
e.image && t.push(
|
|
1354
|
-
`<div class="ci360-popper-image-wrapper"><img class="ci360-popper-image" src="${
|
|
1426
|
+
`<div class="ci360-popper-image-wrapper"><img class="ci360-popper-image" src="${Tt(e.image)}" alt="${Tt(e.title || "")}"></div>`
|
|
1355
1427
|
);
|
|
1356
1428
|
const i = [];
|
|
1357
|
-
if (e.title && i.push(`<h3 class="ci360-popper-title">${
|
|
1429
|
+
if (e.title && i.push(`<h3 class="ci360-popper-title">${ft(e.title)}</h3>`), e.originalPrice || e.price) {
|
|
1358
1430
|
let o = "";
|
|
1359
|
-
e.originalPrice && (o += `<span class="ci360-popper-original-price">${
|
|
1431
|
+
e.originalPrice && (o += `<span class="ci360-popper-original-price">${ft(e.originalPrice)}</span>`), e.price && (o += `<span class="ci360-popper-price">${ft(e.price)}</span>`), i.push(`<div class="ci360-popper-price-row">${o}</div>`);
|
|
1360
1432
|
}
|
|
1361
|
-
if (e.description && i.push(`<p class="ci360-popper-description">${
|
|
1362
|
-
const o = e.ctaText || "View details", s = e.id ? ` data-product-id="${
|
|
1433
|
+
if (e.description && i.push(`<p class="ci360-popper-description">${ft(e.description)}</p>`), e.url && Es(e.url)) {
|
|
1434
|
+
const o = e.ctaText || "View details", s = e.id ? ` data-product-id="${Tt(e.id)}"` : "";
|
|
1363
1435
|
i.push(
|
|
1364
|
-
`<a class="ci360-popper-cta" href="${
|
|
1436
|
+
`<a class="ci360-popper-cta" href="${Tt(e.url)}" target="_top"${s}>${ft(String(o))}</a>`
|
|
1365
1437
|
);
|
|
1366
1438
|
} else if (e.id) {
|
|
1367
1439
|
const o = e.ctaText || "View details";
|
|
1368
1440
|
i.push(
|
|
1369
|
-
`<button class="ci360-popper-cta" data-product-id="${
|
|
1441
|
+
`<button class="ci360-popper-cta" data-product-id="${Tt(e.id)}">${ft(String(o))}</button>`
|
|
1370
1442
|
);
|
|
1371
1443
|
}
|
|
1372
1444
|
return i.length > 0 && t.push(`<div class="ci360-popper-body">${i.join("")}</div>`), t.join("");
|
|
1373
1445
|
}
|
|
1374
|
-
function
|
|
1375
|
-
return e.content ? e.content : e.data ?
|
|
1446
|
+
function de(e) {
|
|
1447
|
+
return e.content ? e.content : e.data ? Ps(e.data) : "";
|
|
1376
1448
|
}
|
|
1377
|
-
function
|
|
1449
|
+
function ft(e) {
|
|
1378
1450
|
return e.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """);
|
|
1379
1451
|
}
|
|
1380
|
-
function
|
|
1452
|
+
function Tt(e) {
|
|
1381
1453
|
return e.replace(/&/g, "&").replace(/"/g, """).replace(/'/g, "'").replace(/</g, "<").replace(/>/g, ">");
|
|
1382
1454
|
}
|
|
1383
|
-
function
|
|
1455
|
+
function Es(e) {
|
|
1384
1456
|
const t = e.replace(/[\s\x00-\x1f]/g, "");
|
|
1385
1457
|
return /^https?:\/\//i.test(t) || /^\/(?!\/)/.test(t) || /^#/.test(t);
|
|
1386
1458
|
}
|
|
1387
|
-
var R = "top", _ = "bottom", F = "right", z = "left",
|
|
1388
|
-
return e.concat([t + "-" +
|
|
1389
|
-
}, []),
|
|
1390
|
-
return e.concat([t, t + "-" +
|
|
1391
|
-
}, []),
|
|
1392
|
-
function
|
|
1459
|
+
var R = "top", _ = "bottom", F = "right", z = "left", fe = "auto", Lt = [R, _, F, z], gt = "start", St = "end", Ts = "clippingParents", ai = "viewport", At = "popper", As = "reference", Ne = /* @__PURE__ */ Lt.reduce(function(e, t) {
|
|
1460
|
+
return e.concat([t + "-" + gt, t + "-" + St]);
|
|
1461
|
+
}, []), li = /* @__PURE__ */ [].concat(Lt, [fe]).reduce(function(e, t) {
|
|
1462
|
+
return e.concat([t, t + "-" + gt, t + "-" + St]);
|
|
1463
|
+
}, []), ks = "beforeRead", Xs = "read", Ss = "afterRead", Ys = "beforeMain", Ls = "main", Ms = "afterMain", Os = "beforeWrite", Hs = "write", Rs = "afterWrite", zs = [ks, Xs, Ss, Ys, Ls, Ms, Os, Hs, Rs];
|
|
1464
|
+
function j(e) {
|
|
1393
1465
|
return e ? (e.nodeName || "").toLowerCase() : null;
|
|
1394
1466
|
}
|
|
1395
1467
|
function D(e) {
|
|
@@ -1401,31 +1473,31 @@ function D(e) {
|
|
|
1401
1473
|
}
|
|
1402
1474
|
return e;
|
|
1403
1475
|
}
|
|
1404
|
-
function
|
|
1476
|
+
function ht(e) {
|
|
1405
1477
|
var t = D(e).Element;
|
|
1406
1478
|
return e instanceof t || e instanceof Element;
|
|
1407
1479
|
}
|
|
1408
|
-
function
|
|
1480
|
+
function G(e) {
|
|
1409
1481
|
var t = D(e).HTMLElement;
|
|
1410
1482
|
return e instanceof t || e instanceof HTMLElement;
|
|
1411
1483
|
}
|
|
1412
|
-
function
|
|
1484
|
+
function ge(e) {
|
|
1413
1485
|
if (typeof ShadowRoot > "u")
|
|
1414
1486
|
return !1;
|
|
1415
1487
|
var t = D(e).ShadowRoot;
|
|
1416
1488
|
return e instanceof t || e instanceof ShadowRoot;
|
|
1417
1489
|
}
|
|
1418
|
-
function
|
|
1490
|
+
function Zs(e) {
|
|
1419
1491
|
var t = e.state;
|
|
1420
1492
|
Object.keys(t.elements).forEach(function(i) {
|
|
1421
1493
|
var o = t.styles[i] || {}, s = t.attributes[i] || {}, n = t.elements[i];
|
|
1422
|
-
!
|
|
1494
|
+
!G(n) || !j(n) || (Object.assign(n.style, o), Object.keys(s).forEach(function(r) {
|
|
1423
1495
|
var a = s[r];
|
|
1424
1496
|
a === !1 ? n.removeAttribute(r) : n.setAttribute(r, a === !0 ? "" : a);
|
|
1425
1497
|
}));
|
|
1426
1498
|
});
|
|
1427
1499
|
}
|
|
1428
|
-
function
|
|
1500
|
+
function Ds(e) {
|
|
1429
1501
|
var t = e.state, i = {
|
|
1430
1502
|
popper: {
|
|
1431
1503
|
position: t.options.strategy,
|
|
@@ -1443,38 +1515,38 @@ function Ms(e) {
|
|
|
1443
1515
|
var s = t.elements[o], n = t.attributes[o] || {}, r = Object.keys(t.styles.hasOwnProperty(o) ? t.styles[o] : i[o]), a = r.reduce(function(l, c) {
|
|
1444
1516
|
return l[c] = "", l;
|
|
1445
1517
|
}, {});
|
|
1446
|
-
!
|
|
1518
|
+
!G(s) || !j(s) || (Object.assign(s.style, a), Object.keys(n).forEach(function(l) {
|
|
1447
1519
|
s.removeAttribute(l);
|
|
1448
1520
|
}));
|
|
1449
1521
|
});
|
|
1450
1522
|
};
|
|
1451
1523
|
}
|
|
1452
|
-
const
|
|
1524
|
+
const Bs = {
|
|
1453
1525
|
name: "applyStyles",
|
|
1454
1526
|
enabled: !0,
|
|
1455
1527
|
phase: "write",
|
|
1456
|
-
fn:
|
|
1457
|
-
effect:
|
|
1528
|
+
fn: Zs,
|
|
1529
|
+
effect: Ds,
|
|
1458
1530
|
requires: ["computeStyles"]
|
|
1459
1531
|
};
|
|
1460
1532
|
function V(e) {
|
|
1461
1533
|
return e.split("-")[0];
|
|
1462
1534
|
}
|
|
1463
|
-
var
|
|
1464
|
-
function
|
|
1535
|
+
var lt = Math.max, Jt = Math.min, vt = Math.round;
|
|
1536
|
+
function pe() {
|
|
1465
1537
|
var e = navigator.userAgentData;
|
|
1466
1538
|
return e != null && e.brands && Array.isArray(e.brands) ? e.brands.map(function(t) {
|
|
1467
1539
|
return t.brand + "/" + t.version;
|
|
1468
1540
|
}).join(" ") : navigator.userAgent;
|
|
1469
1541
|
}
|
|
1470
|
-
function
|
|
1471
|
-
return !/^((?!chrome|android).)*safari/i.test(
|
|
1542
|
+
function hi() {
|
|
1543
|
+
return !/^((?!chrome|android).)*safari/i.test(pe());
|
|
1472
1544
|
}
|
|
1473
|
-
function
|
|
1545
|
+
function yt(e, t, i) {
|
|
1474
1546
|
t === void 0 && (t = !1), i === void 0 && (i = !1);
|
|
1475
1547
|
var o = e.getBoundingClientRect(), s = 1, n = 1;
|
|
1476
|
-
t &&
|
|
1477
|
-
var r =
|
|
1548
|
+
t && G(e) && (s = e.offsetWidth > 0 && vt(o.width) / e.offsetWidth || 1, n = e.offsetHeight > 0 && vt(o.height) / e.offsetHeight || 1);
|
|
1549
|
+
var r = ht(e) ? D(e) : window, a = r.visualViewport, l = !hi() && i, c = (o.left + (l && a ? a.offsetLeft : 0)) / s, h = (o.top + (l && a ? a.offsetTop : 0)) / n, u = o.width / s, m = o.height / n;
|
|
1478
1550
|
return {
|
|
1479
1551
|
width: u,
|
|
1480
1552
|
height: m,
|
|
@@ -1486,8 +1558,8 @@ function mt(e, t, i) {
|
|
|
1486
1558
|
y: h
|
|
1487
1559
|
};
|
|
1488
1560
|
}
|
|
1489
|
-
function
|
|
1490
|
-
var t =
|
|
1561
|
+
function ve(e) {
|
|
1562
|
+
var t = yt(e), i = e.offsetWidth, o = e.offsetHeight;
|
|
1491
1563
|
return Math.abs(t.width - i) <= 1 && (i = t.width), Math.abs(t.height - o) <= 1 && (o = t.height), {
|
|
1492
1564
|
x: e.offsetLeft,
|
|
1493
1565
|
y: e.offsetTop,
|
|
@@ -1495,11 +1567,11 @@ function le(e) {
|
|
|
1495
1567
|
height: o
|
|
1496
1568
|
};
|
|
1497
1569
|
}
|
|
1498
|
-
function
|
|
1570
|
+
function ci(e, t) {
|
|
1499
1571
|
var i = t.getRootNode && t.getRootNode();
|
|
1500
1572
|
if (e.contains(t))
|
|
1501
1573
|
return !0;
|
|
1502
|
-
if (i &&
|
|
1574
|
+
if (i && ge(i)) {
|
|
1503
1575
|
var o = t;
|
|
1504
1576
|
do {
|
|
1505
1577
|
if (o && e.isSameNode(o))
|
|
@@ -1509,66 +1581,66 @@ function ni(e, t) {
|
|
|
1509
1581
|
}
|
|
1510
1582
|
return !1;
|
|
1511
1583
|
}
|
|
1512
|
-
function
|
|
1584
|
+
function tt(e) {
|
|
1513
1585
|
return D(e).getComputedStyle(e);
|
|
1514
1586
|
}
|
|
1515
|
-
function
|
|
1516
|
-
return ["table", "td", "th"].indexOf(
|
|
1587
|
+
function Gs(e) {
|
|
1588
|
+
return ["table", "td", "th"].indexOf(j(e)) >= 0;
|
|
1517
1589
|
}
|
|
1518
|
-
function
|
|
1519
|
-
return ((
|
|
1590
|
+
function ot(e) {
|
|
1591
|
+
return ((ht(e) ? e.ownerDocument : (
|
|
1520
1592
|
// $FlowFixMe[prop-missing]
|
|
1521
1593
|
e.document
|
|
1522
1594
|
)) || window.document).documentElement;
|
|
1523
1595
|
}
|
|
1524
|
-
function
|
|
1525
|
-
return
|
|
1596
|
+
function Qt(e) {
|
|
1597
|
+
return j(e) === "html" ? e : (
|
|
1526
1598
|
// this is a quicker (but less type safe) way to save quite some bytes from the bundle
|
|
1527
1599
|
// $FlowFixMe[incompatible-return]
|
|
1528
1600
|
// $FlowFixMe[prop-missing]
|
|
1529
1601
|
e.assignedSlot || // step into the shadow DOM of the parent of a slotted node
|
|
1530
1602
|
e.parentNode || // DOM Element detected
|
|
1531
|
-
(
|
|
1603
|
+
(ge(e) ? e.host : null) || // ShadowRoot detected
|
|
1532
1604
|
// $FlowFixMe[incompatible-call]: HTMLElement is a Node
|
|
1533
|
-
|
|
1605
|
+
ot(e)
|
|
1534
1606
|
);
|
|
1535
1607
|
}
|
|
1536
|
-
function
|
|
1537
|
-
return !
|
|
1538
|
-
|
|
1608
|
+
function We(e) {
|
|
1609
|
+
return !G(e) || // https://github.com/popperjs/popper-core/issues/837
|
|
1610
|
+
tt(e).position === "fixed" ? null : e.offsetParent;
|
|
1539
1611
|
}
|
|
1540
|
-
function
|
|
1541
|
-
var t = /firefox/i.test(
|
|
1542
|
-
if (i &&
|
|
1543
|
-
var o =
|
|
1612
|
+
function _s(e) {
|
|
1613
|
+
var t = /firefox/i.test(pe()), i = /Trident/i.test(pe());
|
|
1614
|
+
if (i && G(e)) {
|
|
1615
|
+
var o = tt(e);
|
|
1544
1616
|
if (o.position === "fixed")
|
|
1545
1617
|
return null;
|
|
1546
1618
|
}
|
|
1547
|
-
var s =
|
|
1548
|
-
for (
|
|
1549
|
-
var n =
|
|
1619
|
+
var s = Qt(e);
|
|
1620
|
+
for (ge(s) && (s = s.host); G(s) && ["html", "body"].indexOf(j(s)) < 0; ) {
|
|
1621
|
+
var n = tt(s);
|
|
1550
1622
|
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")
|
|
1551
1623
|
return s;
|
|
1552
1624
|
s = s.parentNode;
|
|
1553
1625
|
}
|
|
1554
1626
|
return null;
|
|
1555
1627
|
}
|
|
1556
|
-
function
|
|
1557
|
-
for (var t = D(e), i =
|
|
1558
|
-
i =
|
|
1559
|
-
return i && (
|
|
1628
|
+
function Mt(e) {
|
|
1629
|
+
for (var t = D(e), i = We(e); i && Gs(i) && tt(i).position === "static"; )
|
|
1630
|
+
i = We(i);
|
|
1631
|
+
return i && (j(i) === "html" || j(i) === "body" && tt(i).position === "static") ? t : i || _s(e) || t;
|
|
1560
1632
|
}
|
|
1561
|
-
function
|
|
1633
|
+
function ye(e) {
|
|
1562
1634
|
return ["top", "bottom"].indexOf(e) >= 0 ? "x" : "y";
|
|
1563
1635
|
}
|
|
1564
|
-
function
|
|
1565
|
-
return
|
|
1636
|
+
function kt(e, t, i) {
|
|
1637
|
+
return lt(e, Jt(t, i));
|
|
1566
1638
|
}
|
|
1567
|
-
function
|
|
1568
|
-
var o =
|
|
1639
|
+
function Fs(e, t, i) {
|
|
1640
|
+
var o = kt(e, t, i);
|
|
1569
1641
|
return o > i ? i : o;
|
|
1570
1642
|
}
|
|
1571
|
-
function
|
|
1643
|
+
function di() {
|
|
1572
1644
|
return {
|
|
1573
1645
|
top: 0,
|
|
1574
1646
|
right: 0,
|
|
@@ -1576,114 +1648,114 @@ function ri() {
|
|
|
1576
1648
|
left: 0
|
|
1577
1649
|
};
|
|
1578
1650
|
}
|
|
1579
|
-
function
|
|
1580
|
-
return Object.assign({},
|
|
1651
|
+
function ui(e) {
|
|
1652
|
+
return Object.assign({}, di(), e);
|
|
1581
1653
|
}
|
|
1582
|
-
function
|
|
1654
|
+
function pi(e, t) {
|
|
1583
1655
|
return t.reduce(function(i, o) {
|
|
1584
1656
|
return i[o] = e, i;
|
|
1585
1657
|
}, {});
|
|
1586
1658
|
}
|
|
1587
|
-
var
|
|
1659
|
+
var Ns = function(t, i) {
|
|
1588
1660
|
return t = typeof t == "function" ? t(Object.assign({}, i.rects, {
|
|
1589
1661
|
placement: i.placement
|
|
1590
|
-
})) : t,
|
|
1662
|
+
})) : t, ui(typeof t != "number" ? t : pi(t, Lt));
|
|
1591
1663
|
};
|
|
1592
|
-
function
|
|
1593
|
-
var t, i = e.state, o = e.name, s = e.options, n = i.elements.arrow, r = i.modifiersData.popperOffsets, a = V(i.placement), l =
|
|
1664
|
+
function Ws(e) {
|
|
1665
|
+
var t, i = e.state, o = e.name, s = e.options, n = i.elements.arrow, r = i.modifiersData.popperOffsets, a = V(i.placement), l = ye(a), c = [z, F].indexOf(a) >= 0, h = c ? "height" : "width";
|
|
1594
1666
|
if (!(!n || !r)) {
|
|
1595
|
-
var u =
|
|
1596
|
-
i.modifiersData[o] = (t = {}, t[
|
|
1667
|
+
var u = Ns(s.padding, i), m = ve(n), p = l === "y" ? R : z, C = l === "y" ? _ : F, v = i.rects.reference[h] + i.rects.reference[l] - r[l] - i.rects.popper[h], b = r[l] - i.rects.reference[l], x = Mt(n), P = x ? l === "y" ? x.clientHeight || 0 : x.clientWidth || 0 : 0, w = v / 2 - b / 2, g = u[p], E = P - m[h] - u[C], f = P / 2 - m[h] / 2 + w, y = kt(g, f, E), I = l;
|
|
1668
|
+
i.modifiersData[o] = (t = {}, t[I] = y, t.centerOffset = y - f, t);
|
|
1597
1669
|
}
|
|
1598
1670
|
}
|
|
1599
|
-
function
|
|
1671
|
+
function Vs(e) {
|
|
1600
1672
|
var t = e.state, i = e.options, o = i.element, s = o === void 0 ? "[data-popper-arrow]" : o;
|
|
1601
|
-
s != null && (typeof s == "string" && (s = t.elements.popper.querySelector(s), !s) ||
|
|
1673
|
+
s != null && (typeof s == "string" && (s = t.elements.popper.querySelector(s), !s) || ci(t.elements.popper, s) && (t.elements.arrow = s));
|
|
1602
1674
|
}
|
|
1603
|
-
const
|
|
1675
|
+
const js = {
|
|
1604
1676
|
name: "arrow",
|
|
1605
1677
|
enabled: !0,
|
|
1606
1678
|
phase: "main",
|
|
1607
|
-
fn:
|
|
1608
|
-
effect:
|
|
1679
|
+
fn: Ws,
|
|
1680
|
+
effect: Vs,
|
|
1609
1681
|
requires: ["popperOffsets"],
|
|
1610
1682
|
requiresIfExists: ["preventOverflow"]
|
|
1611
1683
|
};
|
|
1612
|
-
function
|
|
1684
|
+
function bt(e) {
|
|
1613
1685
|
return e.split("-")[1];
|
|
1614
1686
|
}
|
|
1615
|
-
var
|
|
1687
|
+
var Us = {
|
|
1616
1688
|
top: "auto",
|
|
1617
1689
|
right: "auto",
|
|
1618
1690
|
bottom: "auto",
|
|
1619
1691
|
left: "auto"
|
|
1620
1692
|
};
|
|
1621
|
-
function
|
|
1693
|
+
function $s(e, t) {
|
|
1622
1694
|
var i = e.x, o = e.y, s = t.devicePixelRatio || 1;
|
|
1623
1695
|
return {
|
|
1624
|
-
x:
|
|
1625
|
-
y:
|
|
1696
|
+
x: vt(i * s) / s || 0,
|
|
1697
|
+
y: vt(o * s) / s || 0
|
|
1626
1698
|
};
|
|
1627
1699
|
}
|
|
1628
|
-
function
|
|
1629
|
-
var t, i = e.popper, o = e.popperRect, s = e.placement, n = e.variation, r = e.offsets, a = e.position, l = e.gpuAcceleration, c = e.adaptive, h = e.roundOffsets, u = e.isFixed, m = r.x,
|
|
1630
|
-
x:
|
|
1631
|
-
y
|
|
1700
|
+
function Ve(e) {
|
|
1701
|
+
var t, i = e.popper, o = e.popperRect, s = e.placement, n = e.variation, r = e.offsets, a = e.position, l = e.gpuAcceleration, c = e.adaptive, h = e.roundOffsets, u = e.isFixed, m = r.x, p = m === void 0 ? 0 : m, C = r.y, v = C === void 0 ? 0 : C, b = typeof h == "function" ? h({
|
|
1702
|
+
x: p,
|
|
1703
|
+
y: v
|
|
1632
1704
|
}) : {
|
|
1633
|
-
x:
|
|
1634
|
-
y
|
|
1705
|
+
x: p,
|
|
1706
|
+
y: v
|
|
1635
1707
|
};
|
|
1636
|
-
|
|
1637
|
-
var
|
|
1708
|
+
p = b.x, v = b.y;
|
|
1709
|
+
var x = r.hasOwnProperty("x"), P = r.hasOwnProperty("y"), w = z, g = R, E = window;
|
|
1638
1710
|
if (c) {
|
|
1639
|
-
var
|
|
1640
|
-
if (
|
|
1641
|
-
|
|
1642
|
-
var
|
|
1711
|
+
var f = Mt(i), y = "clientHeight", I = "clientWidth";
|
|
1712
|
+
if (f === D(i) && (f = ot(i), tt(f).position !== "static" && a === "absolute" && (y = "scrollHeight", I = "scrollWidth")), f = f, s === R || (s === z || s === F) && n === St) {
|
|
1713
|
+
g = _;
|
|
1714
|
+
var T = u && f === E && E.visualViewport ? E.visualViewport.height : (
|
|
1643
1715
|
// $FlowFixMe[prop-missing]
|
|
1644
|
-
|
|
1716
|
+
f[y]
|
|
1645
1717
|
);
|
|
1646
|
-
|
|
1718
|
+
v -= T - o.height, v *= l ? 1 : -1;
|
|
1647
1719
|
}
|
|
1648
|
-
if (s === z || (s === R || s === _) && n ===
|
|
1720
|
+
if (s === z || (s === R || s === _) && n === St) {
|
|
1649
1721
|
w = F;
|
|
1650
|
-
var
|
|
1722
|
+
var k = u && f === E && E.visualViewport ? E.visualViewport.width : (
|
|
1651
1723
|
// $FlowFixMe[prop-missing]
|
|
1652
|
-
|
|
1724
|
+
f[I]
|
|
1653
1725
|
);
|
|
1654
|
-
|
|
1726
|
+
p -= k - o.width, p *= l ? 1 : -1;
|
|
1655
1727
|
}
|
|
1656
1728
|
}
|
|
1657
|
-
var
|
|
1729
|
+
var X = Object.assign({
|
|
1658
1730
|
position: a
|
|
1659
|
-
}, c &&
|
|
1660
|
-
x:
|
|
1661
|
-
y
|
|
1731
|
+
}, c && Us), O = h === !0 ? $s({
|
|
1732
|
+
x: p,
|
|
1733
|
+
y: v
|
|
1662
1734
|
}, D(i)) : {
|
|
1663
|
-
x:
|
|
1664
|
-
y
|
|
1735
|
+
x: p,
|
|
1736
|
+
y: v
|
|
1665
1737
|
};
|
|
1666
|
-
if (
|
|
1667
|
-
var
|
|
1668
|
-
return Object.assign({},
|
|
1738
|
+
if (p = O.x, v = O.y, l) {
|
|
1739
|
+
var M;
|
|
1740
|
+
return Object.assign({}, X, (M = {}, M[g] = P ? "0" : "", M[w] = x ? "0" : "", M.transform = (E.devicePixelRatio || 1) <= 1 ? "translate(" + p + "px, " + v + "px)" : "translate3d(" + p + "px, " + v + "px, 0)", M));
|
|
1669
1741
|
}
|
|
1670
|
-
return Object.assign({},
|
|
1742
|
+
return Object.assign({}, X, (t = {}, t[g] = P ? v + "px" : "", t[w] = x ? p + "px" : "", t.transform = "", t));
|
|
1671
1743
|
}
|
|
1672
|
-
function
|
|
1744
|
+
function Ks(e) {
|
|
1673
1745
|
var t = e.state, i = e.options, o = i.gpuAcceleration, s = o === void 0 ? !0 : o, n = i.adaptive, r = n === void 0 ? !0 : n, a = i.roundOffsets, l = a === void 0 ? !0 : a, c = {
|
|
1674
1746
|
placement: V(t.placement),
|
|
1675
|
-
variation:
|
|
1747
|
+
variation: bt(t.placement),
|
|
1676
1748
|
popper: t.elements.popper,
|
|
1677
1749
|
popperRect: t.rects.popper,
|
|
1678
1750
|
gpuAcceleration: s,
|
|
1679
1751
|
isFixed: t.options.strategy === "fixed"
|
|
1680
1752
|
};
|
|
1681
|
-
t.modifiersData.popperOffsets != null && (t.styles.popper = Object.assign({}, t.styles.popper,
|
|
1753
|
+
t.modifiersData.popperOffsets != null && (t.styles.popper = Object.assign({}, t.styles.popper, Ve(Object.assign({}, c, {
|
|
1682
1754
|
offsets: t.modifiersData.popperOffsets,
|
|
1683
1755
|
position: t.options.strategy,
|
|
1684
1756
|
adaptive: r,
|
|
1685
1757
|
roundOffsets: l
|
|
1686
|
-
})))), t.modifiersData.arrow != null && (t.styles.arrow = Object.assign({}, t.styles.arrow,
|
|
1758
|
+
})))), t.modifiersData.arrow != null && (t.styles.arrow = Object.assign({}, t.styles.arrow, Ve(Object.assign({}, c, {
|
|
1687
1759
|
offsets: t.modifiersData.arrow,
|
|
1688
1760
|
position: "absolute",
|
|
1689
1761
|
adaptive: !1,
|
|
@@ -1692,105 +1764,105 @@ function Ws(e) {
|
|
|
1692
1764
|
"data-popper-placement": t.placement
|
|
1693
1765
|
});
|
|
1694
1766
|
}
|
|
1695
|
-
const
|
|
1767
|
+
const qs = {
|
|
1696
1768
|
name: "computeStyles",
|
|
1697
1769
|
enabled: !0,
|
|
1698
1770
|
phase: "beforeWrite",
|
|
1699
|
-
fn:
|
|
1771
|
+
fn: Ks,
|
|
1700
1772
|
data: {}
|
|
1701
1773
|
};
|
|
1702
|
-
var
|
|
1774
|
+
var jt = {
|
|
1703
1775
|
passive: !0
|
|
1704
1776
|
};
|
|
1705
|
-
function
|
|
1777
|
+
function Js(e) {
|
|
1706
1778
|
var t = e.state, i = e.instance, o = e.options, s = o.scroll, n = s === void 0 ? !0 : s, r = o.resize, a = r === void 0 ? !0 : r, l = D(t.elements.popper), c = [].concat(t.scrollParents.reference, t.scrollParents.popper);
|
|
1707
1779
|
return n && c.forEach(function(h) {
|
|
1708
|
-
h.addEventListener("scroll", i.update,
|
|
1709
|
-
}), a && l.addEventListener("resize", i.update,
|
|
1780
|
+
h.addEventListener("scroll", i.update, jt);
|
|
1781
|
+
}), a && l.addEventListener("resize", i.update, jt), function() {
|
|
1710
1782
|
n && c.forEach(function(h) {
|
|
1711
|
-
h.removeEventListener("scroll", i.update,
|
|
1712
|
-
}), a && l.removeEventListener("resize", i.update,
|
|
1783
|
+
h.removeEventListener("scroll", i.update, jt);
|
|
1784
|
+
}), a && l.removeEventListener("resize", i.update, jt);
|
|
1713
1785
|
};
|
|
1714
1786
|
}
|
|
1715
|
-
const
|
|
1787
|
+
const Qs = {
|
|
1716
1788
|
name: "eventListeners",
|
|
1717
1789
|
enabled: !0,
|
|
1718
1790
|
phase: "write",
|
|
1719
1791
|
fn: function() {
|
|
1720
1792
|
},
|
|
1721
|
-
effect:
|
|
1793
|
+
effect: Js,
|
|
1722
1794
|
data: {}
|
|
1723
1795
|
};
|
|
1724
|
-
var
|
|
1796
|
+
var tn = {
|
|
1725
1797
|
left: "right",
|
|
1726
1798
|
right: "left",
|
|
1727
1799
|
bottom: "top",
|
|
1728
1800
|
top: "bottom"
|
|
1729
1801
|
};
|
|
1730
|
-
function
|
|
1802
|
+
function $t(e) {
|
|
1731
1803
|
return e.replace(/left|right|bottom|top/g, function(t) {
|
|
1732
|
-
return
|
|
1804
|
+
return tn[t];
|
|
1733
1805
|
});
|
|
1734
1806
|
}
|
|
1735
|
-
var
|
|
1807
|
+
var en = {
|
|
1736
1808
|
start: "end",
|
|
1737
1809
|
end: "start"
|
|
1738
1810
|
};
|
|
1739
|
-
function
|
|
1811
|
+
function je(e) {
|
|
1740
1812
|
return e.replace(/start|end/g, function(t) {
|
|
1741
|
-
return
|
|
1813
|
+
return en[t];
|
|
1742
1814
|
});
|
|
1743
1815
|
}
|
|
1744
|
-
function
|
|
1816
|
+
function be(e) {
|
|
1745
1817
|
var t = D(e), i = t.pageXOffset, o = t.pageYOffset;
|
|
1746
1818
|
return {
|
|
1747
1819
|
scrollLeft: i,
|
|
1748
1820
|
scrollTop: o
|
|
1749
1821
|
};
|
|
1750
1822
|
}
|
|
1751
|
-
function
|
|
1752
|
-
return
|
|
1823
|
+
function we(e) {
|
|
1824
|
+
return yt(ot(e)).left + be(e).scrollLeft;
|
|
1753
1825
|
}
|
|
1754
|
-
function
|
|
1755
|
-
var i = D(e), o =
|
|
1826
|
+
function on(e, t) {
|
|
1827
|
+
var i = D(e), o = ot(e), s = i.visualViewport, n = o.clientWidth, r = o.clientHeight, a = 0, l = 0;
|
|
1756
1828
|
if (s) {
|
|
1757
1829
|
n = s.width, r = s.height;
|
|
1758
|
-
var c =
|
|
1830
|
+
var c = hi();
|
|
1759
1831
|
(c || !c && t === "fixed") && (a = s.offsetLeft, l = s.offsetTop);
|
|
1760
1832
|
}
|
|
1761
1833
|
return {
|
|
1762
1834
|
width: n,
|
|
1763
1835
|
height: r,
|
|
1764
|
-
x: a +
|
|
1836
|
+
x: a + we(e),
|
|
1765
1837
|
y: l
|
|
1766
1838
|
};
|
|
1767
1839
|
}
|
|
1768
|
-
function
|
|
1769
|
-
var t, i =
|
|
1770
|
-
return
|
|
1840
|
+
function sn(e) {
|
|
1841
|
+
var t, i = ot(e), o = be(e), s = (t = e.ownerDocument) == null ? void 0 : t.body, n = lt(i.scrollWidth, i.clientWidth, s ? s.scrollWidth : 0, s ? s.clientWidth : 0), r = lt(i.scrollHeight, i.clientHeight, s ? s.scrollHeight : 0, s ? s.clientHeight : 0), a = -o.scrollLeft + we(e), l = -o.scrollTop;
|
|
1842
|
+
return tt(s || i).direction === "rtl" && (a += lt(i.clientWidth, s ? s.clientWidth : 0) - n), {
|
|
1771
1843
|
width: n,
|
|
1772
1844
|
height: r,
|
|
1773
1845
|
x: a,
|
|
1774
1846
|
y: l
|
|
1775
1847
|
};
|
|
1776
1848
|
}
|
|
1777
|
-
function
|
|
1778
|
-
var t =
|
|
1849
|
+
function Ce(e) {
|
|
1850
|
+
var t = tt(e), i = t.overflow, o = t.overflowX, s = t.overflowY;
|
|
1779
1851
|
return /auto|scroll|overlay|hidden/.test(i + s + o);
|
|
1780
1852
|
}
|
|
1781
|
-
function
|
|
1782
|
-
return ["html", "body", "#document"].indexOf(
|
|
1853
|
+
function mi(e) {
|
|
1854
|
+
return ["html", "body", "#document"].indexOf(j(e)) >= 0 ? e.ownerDocument.body : G(e) && Ce(e) ? e : mi(Qt(e));
|
|
1783
1855
|
}
|
|
1784
|
-
function
|
|
1856
|
+
function Xt(e, t) {
|
|
1785
1857
|
var i;
|
|
1786
1858
|
t === void 0 && (t = []);
|
|
1787
|
-
var o =
|
|
1859
|
+
var o = mi(e), s = o === ((i = e.ownerDocument) == null ? void 0 : i.body), n = D(o), r = s ? [n].concat(n.visualViewport || [], Ce(o) ? o : []) : o, a = t.concat(r);
|
|
1788
1860
|
return s ? a : (
|
|
1789
1861
|
// $FlowFixMe[incompatible-call]: isBody tells us target will be an HTMLElement here
|
|
1790
|
-
a.concat(
|
|
1862
|
+
a.concat(Xt(Qt(r)))
|
|
1791
1863
|
);
|
|
1792
1864
|
}
|
|
1793
|
-
function
|
|
1865
|
+
function me(e) {
|
|
1794
1866
|
return Object.assign({}, e, {
|
|
1795
1867
|
left: e.x,
|
|
1796
1868
|
top: e.y,
|
|
@@ -1798,28 +1870,28 @@ function ne(e) {
|
|
|
1798
1870
|
bottom: e.y + e.height
|
|
1799
1871
|
});
|
|
1800
1872
|
}
|
|
1801
|
-
function
|
|
1802
|
-
var i =
|
|
1873
|
+
function nn(e, t) {
|
|
1874
|
+
var i = yt(e, !1, t === "fixed");
|
|
1803
1875
|
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;
|
|
1804
1876
|
}
|
|
1805
|
-
function
|
|
1806
|
-
return t ===
|
|
1877
|
+
function Ue(e, t, i) {
|
|
1878
|
+
return t === ai ? me(on(e, i)) : ht(t) ? nn(t, i) : me(sn(ot(e)));
|
|
1807
1879
|
}
|
|
1808
|
-
function
|
|
1809
|
-
var t =
|
|
1810
|
-
return
|
|
1811
|
-
return
|
|
1880
|
+
function rn(e) {
|
|
1881
|
+
var t = Xt(Qt(e)), i = ["absolute", "fixed"].indexOf(tt(e).position) >= 0, o = i && G(e) ? Mt(e) : e;
|
|
1882
|
+
return ht(o) ? t.filter(function(s) {
|
|
1883
|
+
return ht(s) && ci(s, o) && j(s) !== "body";
|
|
1812
1884
|
}) : [];
|
|
1813
1885
|
}
|
|
1814
|
-
function
|
|
1815
|
-
var s = t === "clippingParents" ?
|
|
1816
|
-
var h =
|
|
1817
|
-
return l.top =
|
|
1818
|
-
},
|
|
1886
|
+
function an(e, t, i, o) {
|
|
1887
|
+
var s = t === "clippingParents" ? rn(e) : [].concat(t), n = [].concat(s, [i]), r = n[0], a = n.reduce(function(l, c) {
|
|
1888
|
+
var h = Ue(e, c, o);
|
|
1889
|
+
return l.top = lt(h.top, l.top), l.right = Jt(h.right, l.right), l.bottom = Jt(h.bottom, l.bottom), l.left = lt(h.left, l.left), l;
|
|
1890
|
+
}, Ue(e, r, o));
|
|
1819
1891
|
return a.width = a.right - a.left, a.height = a.bottom - a.top, a.x = a.left, a.y = a.top, a;
|
|
1820
1892
|
}
|
|
1821
|
-
function
|
|
1822
|
-
var t = e.reference, i = e.element, o = e.placement, s = o ? V(o) : null, n = o ?
|
|
1893
|
+
function fi(e) {
|
|
1894
|
+
var t = e.reference, i = e.element, o = e.placement, s = o ? V(o) : null, n = o ? bt(o) : null, r = t.x + t.width / 2 - i.width / 2, a = t.y + t.height / 2 - i.height / 2, l;
|
|
1823
1895
|
switch (s) {
|
|
1824
1896
|
case R:
|
|
1825
1897
|
l = {
|
|
@@ -1851,126 +1923,126 @@ function ci(e) {
|
|
|
1851
1923
|
y: t.y
|
|
1852
1924
|
};
|
|
1853
1925
|
}
|
|
1854
|
-
var c = s ?
|
|
1926
|
+
var c = s ? ye(s) : null;
|
|
1855
1927
|
if (c != null) {
|
|
1856
1928
|
var h = c === "y" ? "height" : "width";
|
|
1857
1929
|
switch (n) {
|
|
1858
|
-
case
|
|
1930
|
+
case gt:
|
|
1859
1931
|
l[c] = l[c] - (t[h] / 2 - i[h] / 2);
|
|
1860
1932
|
break;
|
|
1861
|
-
case
|
|
1933
|
+
case St:
|
|
1862
1934
|
l[c] = l[c] + (t[h] / 2 - i[h] / 2);
|
|
1863
1935
|
break;
|
|
1864
1936
|
}
|
|
1865
1937
|
}
|
|
1866
1938
|
return l;
|
|
1867
1939
|
}
|
|
1868
|
-
function
|
|
1940
|
+
function Yt(e, t) {
|
|
1869
1941
|
t === void 0 && (t = {});
|
|
1870
|
-
var i = t, o = i.placement, s = o === void 0 ? e.placement : o, n = i.strategy, r = n === void 0 ? e.strategy : n, a = i.boundary, l = a === void 0 ?
|
|
1871
|
-
reference:
|
|
1942
|
+
var i = t, o = i.placement, s = o === void 0 ? e.placement : o, n = i.strategy, r = n === void 0 ? e.strategy : n, a = i.boundary, l = a === void 0 ? Ts : a, c = i.rootBoundary, h = c === void 0 ? ai : c, u = i.elementContext, m = u === void 0 ? At : u, p = i.altBoundary, C = p === void 0 ? !1 : p, v = i.padding, b = v === void 0 ? 0 : v, x = ui(typeof b != "number" ? b : pi(b, Lt)), P = m === At ? As : At, w = e.rects.popper, g = e.elements[C ? P : m], E = an(ht(g) ? g : g.contextElement || ot(e.elements.popper), l, h, r), f = yt(e.elements.reference), y = fi({
|
|
1943
|
+
reference: f,
|
|
1872
1944
|
element: w,
|
|
1873
1945
|
placement: s
|
|
1874
|
-
}),
|
|
1875
|
-
top:
|
|
1876
|
-
bottom:
|
|
1877
|
-
left:
|
|
1878
|
-
right:
|
|
1879
|
-
},
|
|
1880
|
-
if (m ===
|
|
1881
|
-
var
|
|
1882
|
-
Object.keys(
|
|
1883
|
-
var
|
|
1884
|
-
|
|
1946
|
+
}), I = me(Object.assign({}, w, y)), T = m === At ? I : f, k = {
|
|
1947
|
+
top: E.top - T.top + x.top,
|
|
1948
|
+
bottom: T.bottom - E.bottom + x.bottom,
|
|
1949
|
+
left: E.left - T.left + x.left,
|
|
1950
|
+
right: T.right - E.right + x.right
|
|
1951
|
+
}, X = e.modifiersData.offset;
|
|
1952
|
+
if (m === At && X) {
|
|
1953
|
+
var O = X[s];
|
|
1954
|
+
Object.keys(k).forEach(function(M) {
|
|
1955
|
+
var U = [F, _].indexOf(M) >= 0 ? 1 : -1, $ = [R, _].indexOf(M) >= 0 ? "y" : "x";
|
|
1956
|
+
k[M] += O[$] * U;
|
|
1885
1957
|
});
|
|
1886
1958
|
}
|
|
1887
|
-
return
|
|
1959
|
+
return k;
|
|
1888
1960
|
}
|
|
1889
|
-
function
|
|
1961
|
+
function ln(e, t) {
|
|
1890
1962
|
t === void 0 && (t = {});
|
|
1891
|
-
var i = t, o = i.placement, s = i.boundary, n = i.rootBoundary, r = i.padding, a = i.flipVariations, l = i.allowedAutoPlacements, c = l === void 0 ?
|
|
1892
|
-
return
|
|
1893
|
-
}) :
|
|
1963
|
+
var i = t, o = i.placement, s = i.boundary, n = i.rootBoundary, r = i.padding, a = i.flipVariations, l = i.allowedAutoPlacements, c = l === void 0 ? li : l, h = bt(o), u = h ? a ? Ne : Ne.filter(function(C) {
|
|
1964
|
+
return bt(C) === h;
|
|
1965
|
+
}) : Lt, m = u.filter(function(C) {
|
|
1894
1966
|
return c.indexOf(C) >= 0;
|
|
1895
1967
|
});
|
|
1896
1968
|
m.length === 0 && (m = u);
|
|
1897
|
-
var
|
|
1898
|
-
return C[
|
|
1899
|
-
placement:
|
|
1969
|
+
var p = m.reduce(function(C, v) {
|
|
1970
|
+
return C[v] = Yt(e, {
|
|
1971
|
+
placement: v,
|
|
1900
1972
|
boundary: s,
|
|
1901
1973
|
rootBoundary: n,
|
|
1902
1974
|
padding: r
|
|
1903
|
-
})[V(
|
|
1975
|
+
})[V(v)], C;
|
|
1904
1976
|
}, {});
|
|
1905
|
-
return Object.keys(
|
|
1906
|
-
return
|
|
1977
|
+
return Object.keys(p).sort(function(C, v) {
|
|
1978
|
+
return p[C] - p[v];
|
|
1907
1979
|
});
|
|
1908
1980
|
}
|
|
1909
|
-
function
|
|
1910
|
-
if (V(e) ===
|
|
1981
|
+
function hn(e) {
|
|
1982
|
+
if (V(e) === fe)
|
|
1911
1983
|
return [];
|
|
1912
|
-
var t =
|
|
1913
|
-
return [
|
|
1984
|
+
var t = $t(e);
|
|
1985
|
+
return [je(e), t, je(t)];
|
|
1914
1986
|
}
|
|
1915
|
-
function
|
|
1987
|
+
function cn(e) {
|
|
1916
1988
|
var t = e.state, i = e.options, o = e.name;
|
|
1917
1989
|
if (!t.modifiersData[o]._skip) {
|
|
1918
|
-
for (var s = i.mainAxis, n = s === void 0 ? !0 : s, r = i.altAxis, a = r === void 0 ? !0 : r, l = i.fallbackPlacements, c = i.padding, h = i.boundary, u = i.rootBoundary, m = i.altBoundary,
|
|
1919
|
-
return
|
|
1920
|
-
placement:
|
|
1990
|
+
for (var s = i.mainAxis, n = s === void 0 ? !0 : s, r = i.altAxis, a = r === void 0 ? !0 : r, l = i.fallbackPlacements, c = i.padding, h = i.boundary, u = i.rootBoundary, m = i.altBoundary, p = i.flipVariations, C = p === void 0 ? !0 : p, v = i.allowedAutoPlacements, b = t.options.placement, x = V(b), P = x === b, w = l || (P || !C ? [$t(b)] : hn(b)), g = [b].concat(w).reduce(function(it, W) {
|
|
1991
|
+
return it.concat(V(W) === fe ? ln(t, {
|
|
1992
|
+
placement: W,
|
|
1921
1993
|
boundary: h,
|
|
1922
1994
|
rootBoundary: u,
|
|
1923
1995
|
padding: c,
|
|
1924
1996
|
flipVariations: C,
|
|
1925
|
-
allowedAutoPlacements:
|
|
1926
|
-
}) :
|
|
1927
|
-
}, []),
|
|
1928
|
-
var
|
|
1929
|
-
placement:
|
|
1997
|
+
allowedAutoPlacements: v
|
|
1998
|
+
}) : W);
|
|
1999
|
+
}, []), E = t.rects.reference, f = t.rects.popper, y = /* @__PURE__ */ new Map(), I = !0, T = g[0], k = 0; k < g.length; k++) {
|
|
2000
|
+
var X = g[k], O = V(X), M = bt(X) === gt, U = [R, _].indexOf(O) >= 0, $ = U ? "width" : "height", H = Yt(t, {
|
|
2001
|
+
placement: X,
|
|
1930
2002
|
boundary: h,
|
|
1931
2003
|
rootBoundary: u,
|
|
1932
2004
|
altBoundary: m,
|
|
1933
2005
|
padding: c
|
|
1934
|
-
}), Z =
|
|
1935
|
-
|
|
1936
|
-
var
|
|
1937
|
-
if (n &&
|
|
1938
|
-
return
|
|
2006
|
+
}), Z = U ? M ? F : z : M ? _ : R;
|
|
2007
|
+
E[$] > f[$] && (Z = $t(Z));
|
|
2008
|
+
var ct = $t(Z), K = [];
|
|
2009
|
+
if (n && K.push(H[O] <= 0), a && K.push(H[Z] <= 0, H[ct] <= 0), K.every(function(it) {
|
|
2010
|
+
return it;
|
|
1939
2011
|
})) {
|
|
1940
|
-
|
|
2012
|
+
T = X, I = !1;
|
|
1941
2013
|
break;
|
|
1942
2014
|
}
|
|
1943
|
-
|
|
2015
|
+
y.set(X, K);
|
|
1944
2016
|
}
|
|
1945
|
-
if (
|
|
1946
|
-
for (var
|
|
1947
|
-
var
|
|
1948
|
-
var
|
|
1949
|
-
if (
|
|
1950
|
-
return
|
|
1951
|
-
return
|
|
2017
|
+
if (I)
|
|
2018
|
+
for (var dt = C ? 3 : 1, ut = function(W) {
|
|
2019
|
+
var nt = g.find(function(pt) {
|
|
2020
|
+
var q = y.get(pt);
|
|
2021
|
+
if (q)
|
|
2022
|
+
return q.slice(0, W).every(function(wt) {
|
|
2023
|
+
return wt;
|
|
1952
2024
|
});
|
|
1953
2025
|
});
|
|
1954
|
-
if (
|
|
1955
|
-
return
|
|
1956
|
-
},
|
|
1957
|
-
var
|
|
1958
|
-
if (
|
|
2026
|
+
if (nt)
|
|
2027
|
+
return T = nt, "break";
|
|
2028
|
+
}, st = dt; st > 0; st--) {
|
|
2029
|
+
var et = ut(st);
|
|
2030
|
+
if (et === "break") break;
|
|
1959
2031
|
}
|
|
1960
|
-
t.placement !==
|
|
2032
|
+
t.placement !== T && (t.modifiersData[o]._skip = !0, t.placement = T, t.reset = !0);
|
|
1961
2033
|
}
|
|
1962
2034
|
}
|
|
1963
|
-
const
|
|
2035
|
+
const dn = {
|
|
1964
2036
|
name: "flip",
|
|
1965
2037
|
enabled: !0,
|
|
1966
2038
|
phase: "main",
|
|
1967
|
-
fn:
|
|
2039
|
+
fn: cn,
|
|
1968
2040
|
requiresIfExists: ["offset"],
|
|
1969
2041
|
data: {
|
|
1970
2042
|
_skip: !1
|
|
1971
2043
|
}
|
|
1972
2044
|
};
|
|
1973
|
-
function
|
|
2045
|
+
function $e(e, t, i) {
|
|
1974
2046
|
return i === void 0 && (i = {
|
|
1975
2047
|
x: 0,
|
|
1976
2048
|
y: 0
|
|
@@ -1981,17 +2053,17 @@ function Ne(e, t, i) {
|
|
|
1981
2053
|
left: e.left - t.width - i.x
|
|
1982
2054
|
};
|
|
1983
2055
|
}
|
|
1984
|
-
function
|
|
2056
|
+
function Ke(e) {
|
|
1985
2057
|
return [R, F, _, z].some(function(t) {
|
|
1986
2058
|
return e[t] >= 0;
|
|
1987
2059
|
});
|
|
1988
2060
|
}
|
|
1989
|
-
function
|
|
1990
|
-
var t = e.state, i = e.name, o = t.rects.reference, s = t.rects.popper, n = t.modifiersData.preventOverflow, r =
|
|
2061
|
+
function un(e) {
|
|
2062
|
+
var t = e.state, i = e.name, o = t.rects.reference, s = t.rects.popper, n = t.modifiersData.preventOverflow, r = Yt(t, {
|
|
1991
2063
|
elementContext: "reference"
|
|
1992
|
-
}), a =
|
|
2064
|
+
}), a = Yt(t, {
|
|
1993
2065
|
altBoundary: !0
|
|
1994
|
-
}), l =
|
|
2066
|
+
}), l = $e(r, o), c = $e(a, s, n), h = Ke(l), u = Ke(c);
|
|
1995
2067
|
t.modifiersData[i] = {
|
|
1996
2068
|
referenceClippingOffsets: l,
|
|
1997
2069
|
popperEscapeOffsets: c,
|
|
@@ -2002,14 +2074,14 @@ function nn(e) {
|
|
|
2002
2074
|
"data-popper-escaped": u
|
|
2003
2075
|
});
|
|
2004
2076
|
}
|
|
2005
|
-
const
|
|
2077
|
+
const pn = {
|
|
2006
2078
|
name: "hide",
|
|
2007
2079
|
enabled: !0,
|
|
2008
2080
|
phase: "main",
|
|
2009
2081
|
requiresIfExists: ["preventOverflow"],
|
|
2010
|
-
fn:
|
|
2082
|
+
fn: un
|
|
2011
2083
|
};
|
|
2012
|
-
function
|
|
2084
|
+
function mn(e, t, i) {
|
|
2013
2085
|
var o = V(e), s = [z, R].indexOf(o) >= 0 ? -1 : 1, n = typeof i == "function" ? i(Object.assign({}, t, {
|
|
2014
2086
|
placement: e
|
|
2015
2087
|
})) : i, r = n[0], a = n[1];
|
|
@@ -2021,108 +2093,108 @@ function an(e, t, i) {
|
|
|
2021
2093
|
y: a
|
|
2022
2094
|
};
|
|
2023
2095
|
}
|
|
2024
|
-
function
|
|
2025
|
-
var t = e.state, i = e.options, o = e.name, s = i.offset, n = s === void 0 ? [0, 0] : s, r =
|
|
2026
|
-
return h[u] =
|
|
2096
|
+
function fn(e) {
|
|
2097
|
+
var t = e.state, i = e.options, o = e.name, s = i.offset, n = s === void 0 ? [0, 0] : s, r = li.reduce(function(h, u) {
|
|
2098
|
+
return h[u] = mn(u, t.rects, n), h;
|
|
2027
2099
|
}, {}), a = r[t.placement], l = a.x, c = a.y;
|
|
2028
2100
|
t.modifiersData.popperOffsets != null && (t.modifiersData.popperOffsets.x += l, t.modifiersData.popperOffsets.y += c), t.modifiersData[o] = r;
|
|
2029
2101
|
}
|
|
2030
|
-
const
|
|
2102
|
+
const gn = {
|
|
2031
2103
|
name: "offset",
|
|
2032
2104
|
enabled: !0,
|
|
2033
2105
|
phase: "main",
|
|
2034
2106
|
requires: ["popperOffsets"],
|
|
2035
|
-
fn
|
|
2107
|
+
fn
|
|
2036
2108
|
};
|
|
2037
|
-
function
|
|
2109
|
+
function vn(e) {
|
|
2038
2110
|
var t = e.state, i = e.name;
|
|
2039
|
-
t.modifiersData[i] =
|
|
2111
|
+
t.modifiersData[i] = fi({
|
|
2040
2112
|
reference: t.rects.reference,
|
|
2041
2113
|
element: t.rects.popper,
|
|
2042
2114
|
placement: t.placement
|
|
2043
2115
|
});
|
|
2044
2116
|
}
|
|
2045
|
-
const
|
|
2117
|
+
const yn = {
|
|
2046
2118
|
name: "popperOffsets",
|
|
2047
2119
|
enabled: !0,
|
|
2048
2120
|
phase: "read",
|
|
2049
|
-
fn:
|
|
2121
|
+
fn: vn,
|
|
2050
2122
|
data: {}
|
|
2051
2123
|
};
|
|
2052
|
-
function
|
|
2124
|
+
function bn(e) {
|
|
2053
2125
|
return e === "x" ? "y" : "x";
|
|
2054
2126
|
}
|
|
2055
|
-
function
|
|
2056
|
-
var t = e.state, i = e.options, o = e.name, s = i.mainAxis, n = s === void 0 ? !0 : s, r = i.altAxis, a = r === void 0 ? !1 : r, l = i.boundary, c = i.rootBoundary, h = i.altBoundary, u = i.padding, m = i.tether,
|
|
2127
|
+
function wn(e) {
|
|
2128
|
+
var t = e.state, i = e.options, o = e.name, s = i.mainAxis, n = s === void 0 ? !0 : s, r = i.altAxis, a = r === void 0 ? !1 : r, l = i.boundary, c = i.rootBoundary, h = i.altBoundary, u = i.padding, m = i.tether, p = m === void 0 ? !0 : m, C = i.tetherOffset, v = C === void 0 ? 0 : C, b = Yt(t, {
|
|
2057
2129
|
boundary: l,
|
|
2058
2130
|
rootBoundary: c,
|
|
2059
2131
|
padding: u,
|
|
2060
2132
|
altBoundary: h
|
|
2061
|
-
}),
|
|
2133
|
+
}), x = V(t.placement), P = bt(t.placement), w = !P, g = ye(x), E = bn(g), f = t.modifiersData.popperOffsets, y = t.rects.reference, I = t.rects.popper, T = typeof v == "function" ? v(Object.assign({}, t.rects, {
|
|
2062
2134
|
placement: t.placement
|
|
2063
|
-
})) :
|
|
2064
|
-
mainAxis:
|
|
2065
|
-
altAxis:
|
|
2135
|
+
})) : v, k = typeof T == "number" ? {
|
|
2136
|
+
mainAxis: T,
|
|
2137
|
+
altAxis: T
|
|
2066
2138
|
} : Object.assign({
|
|
2067
2139
|
mainAxis: 0,
|
|
2068
2140
|
altAxis: 0
|
|
2069
|
-
},
|
|
2141
|
+
}, T), X = t.modifiersData.offset ? t.modifiersData.offset[t.placement] : null, O = {
|
|
2070
2142
|
x: 0,
|
|
2071
2143
|
y: 0
|
|
2072
2144
|
};
|
|
2073
|
-
if (
|
|
2145
|
+
if (f) {
|
|
2074
2146
|
if (n) {
|
|
2075
|
-
var
|
|
2147
|
+
var M, U = g === "y" ? R : z, $ = g === "y" ? _ : F, H = g === "y" ? "height" : "width", Z = f[g], ct = Z + b[U], K = Z - b[$], dt = p ? -I[H] / 2 : 0, ut = P === gt ? y[H] : I[H], st = P === gt ? -I[H] : -y[H], et = t.elements.arrow, it = p && et ? ve(et) : {
|
|
2076
2148
|
width: 0,
|
|
2077
2149
|
height: 0
|
|
2078
|
-
},
|
|
2079
|
-
|
|
2150
|
+
}, W = t.modifiersData["arrow#persistent"] ? t.modifiersData["arrow#persistent"].padding : di(), nt = W[U], pt = W[$], q = kt(0, y[H], it[H]), wt = w ? y[H] / 2 - dt - q - nt - k.mainAxis : ut - q - nt - k.mainAxis, te = w ? -y[H] / 2 + dt + q + pt + k.mainAxis : st + q + pt + k.mainAxis, Ct = t.elements.arrow && Mt(t.elements.arrow), ee = Ct ? g === "y" ? Ct.clientTop || 0 : Ct.clientLeft || 0 : 0, Ot = (M = X == null ? void 0 : X[g]) != null ? M : 0, ie = Z + wt - Ot - ee, oe = Z + te - Ot, Ht = kt(p ? Jt(ct, ie) : ct, Z, p ? lt(K, oe) : K);
|
|
2151
|
+
f[g] = Ht, O[g] = Ht - Z;
|
|
2080
2152
|
}
|
|
2081
2153
|
if (a) {
|
|
2082
|
-
var
|
|
2083
|
-
|
|
2154
|
+
var It, Rt = g === "x" ? R : z, zt = g === "x" ? _ : F, J = f[E], mt = E === "y" ? "height" : "width", Zt = J + b[Rt], Dt = J - b[zt], xt = [R, z].indexOf(x) !== -1, Bt = (It = X == null ? void 0 : X[E]) != null ? It : 0, Gt = xt ? Zt : J - y[mt] - I[mt] - Bt + k.altAxis, _t = xt ? J + y[mt] + I[mt] - Bt - k.altAxis : Dt, Ft = p && xt ? Fs(Gt, J, _t) : kt(p ? Gt : Zt, J, p ? _t : Dt);
|
|
2155
|
+
f[E] = Ft, O[E] = Ft - J;
|
|
2084
2156
|
}
|
|
2085
|
-
t.modifiersData[o] =
|
|
2157
|
+
t.modifiersData[o] = O;
|
|
2086
2158
|
}
|
|
2087
2159
|
}
|
|
2088
|
-
const
|
|
2160
|
+
const Cn = {
|
|
2089
2161
|
name: "preventOverflow",
|
|
2090
2162
|
enabled: !0,
|
|
2091
2163
|
phase: "main",
|
|
2092
|
-
fn:
|
|
2164
|
+
fn: wn,
|
|
2093
2165
|
requiresIfExists: ["offset"]
|
|
2094
2166
|
};
|
|
2095
|
-
function
|
|
2167
|
+
function In(e) {
|
|
2096
2168
|
return {
|
|
2097
2169
|
scrollLeft: e.scrollLeft,
|
|
2098
2170
|
scrollTop: e.scrollTop
|
|
2099
2171
|
};
|
|
2100
2172
|
}
|
|
2101
|
-
function
|
|
2102
|
-
return e === D(e) || !
|
|
2173
|
+
function xn(e) {
|
|
2174
|
+
return e === D(e) || !G(e) ? be(e) : In(e);
|
|
2103
2175
|
}
|
|
2104
|
-
function
|
|
2105
|
-
var t = e.getBoundingClientRect(), i =
|
|
2176
|
+
function Pn(e) {
|
|
2177
|
+
var t = e.getBoundingClientRect(), i = vt(t.width) / e.offsetWidth || 1, o = vt(t.height) / e.offsetHeight || 1;
|
|
2106
2178
|
return i !== 1 || o !== 1;
|
|
2107
2179
|
}
|
|
2108
|
-
function
|
|
2180
|
+
function En(e, t, i) {
|
|
2109
2181
|
i === void 0 && (i = !1);
|
|
2110
|
-
var o =
|
|
2182
|
+
var o = G(t), s = G(t) && Pn(t), n = ot(t), r = yt(e, s, i), a = {
|
|
2111
2183
|
scrollLeft: 0,
|
|
2112
2184
|
scrollTop: 0
|
|
2113
2185
|
}, l = {
|
|
2114
2186
|
x: 0,
|
|
2115
2187
|
y: 0
|
|
2116
2188
|
};
|
|
2117
|
-
return (o || !o && !i) && ((
|
|
2118
|
-
|
|
2189
|
+
return (o || !o && !i) && ((j(t) !== "body" || // https://github.com/popperjs/popper-core/issues/1078
|
|
2190
|
+
Ce(n)) && (a = xn(t)), G(t) ? (l = yt(t, !0), l.x += t.clientLeft, l.y += t.clientTop) : n && (l.x = we(n))), {
|
|
2119
2191
|
x: r.left + a.scrollLeft - l.x,
|
|
2120
2192
|
y: r.top + a.scrollTop - l.y,
|
|
2121
2193
|
width: r.width,
|
|
2122
2194
|
height: r.height
|
|
2123
2195
|
};
|
|
2124
2196
|
}
|
|
2125
|
-
function
|
|
2197
|
+
function Tn(e) {
|
|
2126
2198
|
var t = /* @__PURE__ */ new Map(), i = /* @__PURE__ */ new Set(), o = [];
|
|
2127
2199
|
e.forEach(function(n) {
|
|
2128
2200
|
t.set(n.name, n);
|
|
@@ -2141,15 +2213,15 @@ function bn(e) {
|
|
|
2141
2213
|
i.has(n.name) || s(n);
|
|
2142
2214
|
}), o;
|
|
2143
2215
|
}
|
|
2144
|
-
function
|
|
2145
|
-
var t =
|
|
2146
|
-
return
|
|
2216
|
+
function An(e) {
|
|
2217
|
+
var t = Tn(e);
|
|
2218
|
+
return zs.reduce(function(i, o) {
|
|
2147
2219
|
return i.concat(t.filter(function(s) {
|
|
2148
2220
|
return s.phase === o;
|
|
2149
2221
|
}));
|
|
2150
2222
|
}, []);
|
|
2151
2223
|
}
|
|
2152
|
-
function
|
|
2224
|
+
function kn(e) {
|
|
2153
2225
|
var t;
|
|
2154
2226
|
return function() {
|
|
2155
2227
|
return t || (t = new Promise(function(i) {
|
|
@@ -2159,7 +2231,7 @@ function Cn(e) {
|
|
|
2159
2231
|
})), t;
|
|
2160
2232
|
};
|
|
2161
2233
|
}
|
|
2162
|
-
function
|
|
2234
|
+
function Xn(e) {
|
|
2163
2235
|
var t = e.reduce(function(i, o) {
|
|
2164
2236
|
var s = i[o.name];
|
|
2165
2237
|
return i[o.name] = s ? Object.assign({}, s, o, {
|
|
@@ -2171,27 +2243,27 @@ function xn(e) {
|
|
|
2171
2243
|
return t[i];
|
|
2172
2244
|
});
|
|
2173
2245
|
}
|
|
2174
|
-
var
|
|
2246
|
+
var qe = {
|
|
2175
2247
|
placement: "bottom",
|
|
2176
2248
|
modifiers: [],
|
|
2177
2249
|
strategy: "absolute"
|
|
2178
2250
|
};
|
|
2179
|
-
function
|
|
2251
|
+
function Je() {
|
|
2180
2252
|
for (var e = arguments.length, t = new Array(e), i = 0; i < e; i++)
|
|
2181
2253
|
t[i] = arguments[i];
|
|
2182
2254
|
return !t.some(function(o) {
|
|
2183
2255
|
return !(o && typeof o.getBoundingClientRect == "function");
|
|
2184
2256
|
});
|
|
2185
2257
|
}
|
|
2186
|
-
function
|
|
2258
|
+
function Sn(e) {
|
|
2187
2259
|
e === void 0 && (e = {});
|
|
2188
|
-
var t = e, i = t.defaultModifiers, o = i === void 0 ? [] : i, s = t.defaultOptions, n = s === void 0 ?
|
|
2260
|
+
var t = e, i = t.defaultModifiers, o = i === void 0 ? [] : i, s = t.defaultOptions, n = s === void 0 ? qe : s;
|
|
2189
2261
|
return function(a, l, c) {
|
|
2190
2262
|
c === void 0 && (c = n);
|
|
2191
2263
|
var h = {
|
|
2192
2264
|
placement: "bottom",
|
|
2193
2265
|
orderedModifiers: [],
|
|
2194
|
-
options: Object.assign({},
|
|
2266
|
+
options: Object.assign({}, qe, n),
|
|
2195
2267
|
modifiersData: {},
|
|
2196
2268
|
elements: {
|
|
2197
2269
|
reference: a,
|
|
@@ -2199,18 +2271,18 @@ function In(e) {
|
|
|
2199
2271
|
},
|
|
2200
2272
|
attributes: {},
|
|
2201
2273
|
styles: {}
|
|
2202
|
-
}, u = [], m = !1,
|
|
2274
|
+
}, u = [], m = !1, p = {
|
|
2203
2275
|
state: h,
|
|
2204
|
-
setOptions: function(
|
|
2205
|
-
var
|
|
2206
|
-
|
|
2207
|
-
reference:
|
|
2208
|
-
popper:
|
|
2276
|
+
setOptions: function(x) {
|
|
2277
|
+
var P = typeof x == "function" ? x(h.options) : x;
|
|
2278
|
+
v(), h.options = Object.assign({}, n, h.options, P), h.scrollParents = {
|
|
2279
|
+
reference: ht(a) ? Xt(a) : a.contextElement ? Xt(a.contextElement) : [],
|
|
2280
|
+
popper: Xt(l)
|
|
2209
2281
|
};
|
|
2210
|
-
var w =
|
|
2211
|
-
return h.orderedModifiers = w.filter(function(
|
|
2212
|
-
return
|
|
2213
|
-
}), C(),
|
|
2282
|
+
var w = An(Xn([].concat(o, h.options.modifiers)));
|
|
2283
|
+
return h.orderedModifiers = w.filter(function(g) {
|
|
2284
|
+
return g.enabled;
|
|
2285
|
+
}), C(), p.update();
|
|
2214
2286
|
},
|
|
2215
2287
|
// Sync update – it will always be executed, even if not necessary. This
|
|
2216
2288
|
// is useful for low frequency updates where sync behavior simplifies the
|
|
@@ -2219,25 +2291,25 @@ function In(e) {
|
|
|
2219
2291
|
// prefer the async Popper#update method
|
|
2220
2292
|
forceUpdate: function() {
|
|
2221
2293
|
if (!m) {
|
|
2222
|
-
var
|
|
2223
|
-
if (
|
|
2294
|
+
var x = h.elements, P = x.reference, w = x.popper;
|
|
2295
|
+
if (Je(P, w)) {
|
|
2224
2296
|
h.rects = {
|
|
2225
|
-
reference:
|
|
2226
|
-
popper:
|
|
2227
|
-
}, h.reset = !1, h.placement = h.options.placement, h.orderedModifiers.forEach(function(
|
|
2228
|
-
return h.modifiersData[
|
|
2297
|
+
reference: En(P, Mt(w), h.options.strategy === "fixed"),
|
|
2298
|
+
popper: ve(w)
|
|
2299
|
+
}, h.reset = !1, h.placement = h.options.placement, h.orderedModifiers.forEach(function(k) {
|
|
2300
|
+
return h.modifiersData[k.name] = Object.assign({}, k.data);
|
|
2229
2301
|
});
|
|
2230
|
-
for (var
|
|
2302
|
+
for (var g = 0; g < h.orderedModifiers.length; g++) {
|
|
2231
2303
|
if (h.reset === !0) {
|
|
2232
|
-
h.reset = !1,
|
|
2304
|
+
h.reset = !1, g = -1;
|
|
2233
2305
|
continue;
|
|
2234
2306
|
}
|
|
2235
|
-
var
|
|
2236
|
-
typeof
|
|
2307
|
+
var E = h.orderedModifiers[g], f = E.fn, y = E.options, I = y === void 0 ? {} : y, T = E.name;
|
|
2308
|
+
typeof f == "function" && (h = f({
|
|
2237
2309
|
state: h,
|
|
2238
|
-
options:
|
|
2239
|
-
name:
|
|
2240
|
-
instance:
|
|
2310
|
+
options: I,
|
|
2311
|
+
name: T,
|
|
2312
|
+
instance: p
|
|
2241
2313
|
}) || h);
|
|
2242
2314
|
}
|
|
2243
2315
|
}
|
|
@@ -2245,48 +2317,48 @@ function In(e) {
|
|
|
2245
2317
|
},
|
|
2246
2318
|
// Async and optimistically optimized update – it will not be executed if
|
|
2247
2319
|
// not necessary (debounced to run at most once-per-tick)
|
|
2248
|
-
update:
|
|
2320
|
+
update: kn(function() {
|
|
2249
2321
|
return new Promise(function(b) {
|
|
2250
|
-
|
|
2322
|
+
p.forceUpdate(), b(h);
|
|
2251
2323
|
});
|
|
2252
2324
|
}),
|
|
2253
2325
|
destroy: function() {
|
|
2254
|
-
|
|
2326
|
+
v(), m = !0;
|
|
2255
2327
|
}
|
|
2256
2328
|
};
|
|
2257
|
-
if (!
|
|
2258
|
-
return
|
|
2259
|
-
|
|
2329
|
+
if (!Je(a, l))
|
|
2330
|
+
return p;
|
|
2331
|
+
p.setOptions(c).then(function(b) {
|
|
2260
2332
|
!m && c.onFirstUpdate && c.onFirstUpdate(b);
|
|
2261
2333
|
});
|
|
2262
2334
|
function C() {
|
|
2263
2335
|
h.orderedModifiers.forEach(function(b) {
|
|
2264
|
-
var
|
|
2265
|
-
if (typeof
|
|
2266
|
-
var
|
|
2336
|
+
var x = b.name, P = b.options, w = P === void 0 ? {} : P, g = b.effect;
|
|
2337
|
+
if (typeof g == "function") {
|
|
2338
|
+
var E = g({
|
|
2267
2339
|
state: h,
|
|
2268
|
-
name:
|
|
2269
|
-
instance:
|
|
2340
|
+
name: x,
|
|
2341
|
+
instance: p,
|
|
2270
2342
|
options: w
|
|
2271
|
-
}),
|
|
2343
|
+
}), f = function() {
|
|
2272
2344
|
};
|
|
2273
|
-
u.push(
|
|
2345
|
+
u.push(E || f);
|
|
2274
2346
|
}
|
|
2275
2347
|
});
|
|
2276
2348
|
}
|
|
2277
|
-
function
|
|
2349
|
+
function v() {
|
|
2278
2350
|
u.forEach(function(b) {
|
|
2279
2351
|
return b();
|
|
2280
2352
|
}), u = [];
|
|
2281
2353
|
}
|
|
2282
|
-
return
|
|
2354
|
+
return p;
|
|
2283
2355
|
};
|
|
2284
2356
|
}
|
|
2285
|
-
var
|
|
2286
|
-
defaultModifiers:
|
|
2357
|
+
var Yn = [Qs, yn, qs, Bs, gn, dn, Cn, js, pn], Ln = /* @__PURE__ */ Sn({
|
|
2358
|
+
defaultModifiers: Yn
|
|
2287
2359
|
});
|
|
2288
|
-
const
|
|
2289
|
-
class
|
|
2360
|
+
const Mn = '<svg class="ci360-navigate-icon" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="m9 18 6-6-6-6"/></svg>';
|
|
2361
|
+
class On {
|
|
2290
2362
|
/**
|
|
2291
2363
|
* @param {Array} hotspotsConfig - Hotspot configuration array
|
|
2292
2364
|
* @param {HTMLElement} container - Container element
|
|
@@ -2295,12 +2367,12 @@ class Tn {
|
|
|
2295
2367
|
* @param {string} options.trigger - 'hover' or 'click' (default: 'hover')
|
|
2296
2368
|
*/
|
|
2297
2369
|
constructor(t, i, o, s = {}) {
|
|
2298
|
-
|
|
2370
|
+
Ie(this, "updateHotspotPosition", (t, i) => {
|
|
2299
2371
|
this.currentActiveIndex = t, this.currentOrientation = i;
|
|
2300
|
-
const o =
|
|
2372
|
+
const o = vs(this.hotspotsConfig, t, i);
|
|
2301
2373
|
this.hideHotspots(), o.forEach((s) => this.updateAndShowHotspot(s, t));
|
|
2302
2374
|
});
|
|
2303
|
-
this.container = i, this.popper = null, this.popperInstance = null, this.hotspotsContainer =
|
|
2375
|
+
this.container = i, this.popper = null, this.popperInstance = null, this.hotspotsContainer = ko(this.container), this.hotspotsConfig = Is(t), this.shouldHidePopper = !0, this.hidePopper = this.hidePopper.bind(this), this.forceHidePopper = this.forceHidePopper.bind(this), this.imageAspectRatio = o, this.popperListeners = [], this.trigger = s.trigger || "hover", this.onOpen = s.onOpen || null, this.onClose = s.onClose || null, this.onProductClick = s.onProductClick || null, this.onNavigate = s.onNavigate || null;
|
|
2304
2376
|
const { containerSize: n } = t[0];
|
|
2305
2377
|
this.initialContainerSize = n || [i.offsetWidth, i.offsetHeight], this.initHotspots(), this.updateHotspotsForResize(i.offsetWidth, i.offsetHeight), this.observeContainerResize();
|
|
2306
2378
|
}
|
|
@@ -2311,7 +2383,7 @@ class Tn {
|
|
|
2311
2383
|
}), this.resizeObserver.observe(this.container);
|
|
2312
2384
|
}
|
|
2313
2385
|
updateHotspotsForResize(t, i) {
|
|
2314
|
-
this.hotspotsConfig =
|
|
2386
|
+
this.hotspotsConfig = xs({
|
|
2315
2387
|
newWidth: t,
|
|
2316
2388
|
newHeight: i,
|
|
2317
2389
|
initialContainerSize: this.initialContainerSize,
|
|
@@ -2327,8 +2399,8 @@ class Tn {
|
|
|
2327
2399
|
showPopper({ hotspotElement: t, content: i, id: o, keepOpen: s }) {
|
|
2328
2400
|
var u;
|
|
2329
2401
|
this.popperInstance && this.hidePopper();
|
|
2330
|
-
const n =
|
|
2331
|
-
this.popper =
|
|
2402
|
+
const n = ws(this.container);
|
|
2403
|
+
this.popper = Cs(i, o, this.container.parentElement), this.currentHotspotElement = t, t.setAttribute("aria-expanded", "true"), t.setAttribute("aria-describedby", `cloudimage-360-popper-${o}`);
|
|
2332
2404
|
const r = () => {
|
|
2333
2405
|
this.shouldHidePopper = !1;
|
|
2334
2406
|
}, a = () => {
|
|
@@ -2344,15 +2416,15 @@ class Tn {
|
|
|
2344
2416
|
{ element: t, event: "mouseleave", handler: l },
|
|
2345
2417
|
{ element: t, event: "mouseenter", handler: c }
|
|
2346
2418
|
), this.onProductClick) {
|
|
2347
|
-
const m = this.onProductClick,
|
|
2348
|
-
const
|
|
2349
|
-
|
|
2419
|
+
const m = this.onProductClick, p = (C) => {
|
|
2420
|
+
const v = C.target.closest(".ci360-popper-cta");
|
|
2421
|
+
v && m(v.dataset.productId ?? "", o);
|
|
2350
2422
|
};
|
|
2351
|
-
this.popper.addEventListener("click",
|
|
2352
|
-
{ element: this.popper, event: "click", handler:
|
|
2423
|
+
this.popper.addEventListener("click", p), this.popperListeners.push(
|
|
2424
|
+
{ element: this.popper, event: "click", handler: p }
|
|
2353
2425
|
);
|
|
2354
2426
|
}
|
|
2355
|
-
const h =
|
|
2427
|
+
const h = Ln(t, this.popper, n);
|
|
2356
2428
|
h.forceUpdate(), this.popper.setAttribute("data-show", ""), this.shouldHidePopper = !1, this.popperInstance = {
|
|
2357
2429
|
...h,
|
|
2358
2430
|
keepOpen: s,
|
|
@@ -2368,7 +2440,7 @@ class Tn {
|
|
|
2368
2440
|
var t;
|
|
2369
2441
|
this.shouldHidePopper && !((t = this.popperInstance) != null && t.keepOpen) && (this.hidePopperTimeout && clearTimeout(this.hidePopperTimeout), this.hidePopperTimeout = setTimeout(() => {
|
|
2370
2442
|
this.shouldHidePopper && this.hidePopper();
|
|
2371
|
-
},
|
|
2443
|
+
}, io));
|
|
2372
2444
|
}
|
|
2373
2445
|
hidePopper() {
|
|
2374
2446
|
var o, s;
|
|
@@ -2387,7 +2459,7 @@ class Tn {
|
|
|
2387
2459
|
const n = this.popper;
|
|
2388
2460
|
this.popper = null, setTimeout(() => {
|
|
2389
2461
|
i == null || i.destroy(), n.remove();
|
|
2390
|
-
},
|
|
2462
|
+
}, oo);
|
|
2391
2463
|
} else
|
|
2392
2464
|
i == null || i.destroy();
|
|
2393
2465
|
this.shouldHidePopper = !0;
|
|
@@ -2400,12 +2472,12 @@ class Tn {
|
|
|
2400
2472
|
this.shouldHidePopper = !0, this.popperInstance && (this.popperInstance.keepOpen = !1), this.hidePopper();
|
|
2401
2473
|
}
|
|
2402
2474
|
createHotspot(t) {
|
|
2403
|
-
const { id: i, keepOpen: o, onClick: s, label: n, markerStyle: r, navigateTo: a } = t, l = typeof a == "string" ? a.trim() : void 0, c =
|
|
2475
|
+
const { id: i, keepOpen: o, onClick: s, label: n, markerStyle: r, navigateTo: a } = t, l = typeof a == "string" ? a.trim() : void 0, c = de(t), h = ys(i, n, r);
|
|
2404
2476
|
if (l) {
|
|
2405
|
-
h.classList.add("cloudimage-360-hotspot--navigate"), h.innerHTML =
|
|
2477
|
+
h.classList.add("cloudimage-360-hotspot--navigate"), h.innerHTML = Mn;
|
|
2406
2478
|
const u = n || l;
|
|
2407
2479
|
h.setAttribute("role", "button"), h.setAttribute("aria-label", `Navigate to ${u}`), h.setAttribute("aria-roledescription", "navigation hotspot"), h.style.cursor = "pointer";
|
|
2408
|
-
const m = c || (n ?
|
|
2480
|
+
const m = c || (n ? de({ data: { title: n } }) : "");
|
|
2409
2481
|
m ? (h.setAttribute("aria-haspopup", "true"), h.addEventListener(
|
|
2410
2482
|
"mouseenter",
|
|
2411
2483
|
() => this.showPopper({ hotspotElement: h, content: m, id: i, keepOpen: !1 })
|
|
@@ -2417,13 +2489,13 @@ class Tn {
|
|
|
2417
2489
|
), h.addEventListener("blur", () => {
|
|
2418
2490
|
this.shouldHidePopper = !0, this.checkAndHidePopper();
|
|
2419
2491
|
})) : (h.removeAttribute("aria-haspopup"), h.removeAttribute("aria-expanded"));
|
|
2420
|
-
const
|
|
2492
|
+
const p = () => {
|
|
2421
2493
|
this.hidePopper(), this.onNavigate ? this.onNavigate(l) : console.warn(`[ci360] navigateTo hotspot "${i}" clicked but no onNavigate callback is configured.`);
|
|
2422
2494
|
};
|
|
2423
2495
|
h.onclick = (C) => {
|
|
2424
|
-
C.stopPropagation(),
|
|
2496
|
+
C.stopPropagation(), p();
|
|
2425
2497
|
}, h.addEventListener("keydown", (C) => {
|
|
2426
|
-
(C.key === "Enter" || C.key === " ") && (C.preventDefault(),
|
|
2498
|
+
(C.key === "Enter" || C.key === " ") && (C.preventDefault(), p());
|
|
2427
2499
|
}), this.hotspotsContainer.appendChild(h);
|
|
2428
2500
|
return;
|
|
2429
2501
|
}
|
|
@@ -2458,7 +2530,7 @@ class Tn {
|
|
|
2458
2530
|
showHotspotById(t) {
|
|
2459
2531
|
const i = this.hotspotsConfig.find((n) => n.id === t);
|
|
2460
2532
|
if (!i || i.navigateTo) return;
|
|
2461
|
-
const o =
|
|
2533
|
+
const o = de(i);
|
|
2462
2534
|
if (!o) return;
|
|
2463
2535
|
const s = this.hotspotsContainer.querySelector(`[data-hotspot-id="${t}"]`);
|
|
2464
2536
|
s && s.style.opacity === "1" && this.showPopper({
|
|
@@ -2478,12 +2550,12 @@ class Tn {
|
|
|
2478
2550
|
this.hidePopperTimeout && clearTimeout(this.hidePopperTimeout), this.resizeObserver.disconnect(), this.hidePopper(), this.hotspotsContainer.innerHTML = "";
|
|
2479
2551
|
}
|
|
2480
2552
|
}
|
|
2481
|
-
const
|
|
2482
|
-
class
|
|
2553
|
+
const Qe = typeof navigator < "u" && /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);
|
|
2554
|
+
class ti {
|
|
2483
2555
|
constructor(t, i) {
|
|
2484
|
-
this.container = t, this.isClicked = !1, this.imagesX = [], this.imagesY = [];
|
|
2556
|
+
this.container = t, this.isClicked = !1, this.imagesX = [], this.imagesY = [], this.imagesGrid = [], this.isGridMode = !1;
|
|
2485
2557
|
const o = Math.round(window.devicePixelRatio || 1);
|
|
2486
|
-
this.devicePixelRatio =
|
|
2558
|
+
this.devicePixelRatio = Qe ? 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.touchDevice = ts(), this.dragJustEnded = !1, this.zoomPan = null, this.gestureRecognizer = null, this.zoomControlsUI = null, this.scrollHintUI = null, this.highResLoaded = !1, this.useMainThreadCanvas = Qe, this.canvasWorker = this.useMainThreadCanvas ? new us() : new ds(), 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);
|
|
2487
2559
|
}
|
|
2488
2560
|
/**
|
|
2489
2561
|
* Close ImageBitmap objects to free GPU memory
|
|
@@ -2500,7 +2572,7 @@ class $e {
|
|
|
2500
2572
|
typeof o == "function" && o({ ...i, viewerId: this.id });
|
|
2501
2573
|
}
|
|
2502
2574
|
announce(t) {
|
|
2503
|
-
|
|
2575
|
+
So(this.ariaLiveRegion, t);
|
|
2504
2576
|
}
|
|
2505
2577
|
mouseDown(t) {
|
|
2506
2578
|
if (!this.isReady) return;
|
|
@@ -2518,12 +2590,12 @@ class $e {
|
|
|
2518
2590
|
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");
|
|
2519
2591
|
}
|
|
2520
2592
|
startInertia() {
|
|
2521
|
-
const o = this.dragSpeed /
|
|
2593
|
+
const o = this.dragSpeed / Ae, s = o * (this.amountX / this.container.offsetWidth), n = o * (this.amountY / this.container.offsetHeight), r = () => {
|
|
2522
2594
|
if (this.velocityX *= 0.95, this.velocityY *= 0.95, Math.abs(this.velocityX) < 0.01 && Math.abs(this.velocityY) < 0.01) {
|
|
2523
2595
|
this.inertiaAnimationId = null;
|
|
2524
2596
|
return;
|
|
2525
2597
|
}
|
|
2526
|
-
const a = this.velocityX * 16, l = this.velocityY * 16, c =
|
|
2598
|
+
const a = this.velocityX * 16, l = this.velocityY * 16, c = Be({
|
|
2527
2599
|
deltaX: a,
|
|
2528
2600
|
deltaY: l,
|
|
2529
2601
|
reversed: this.dragReverse,
|
|
@@ -2545,17 +2617,17 @@ class $e {
|
|
|
2545
2617
|
const u = performance.now(), m = u - this.lastDragTime;
|
|
2546
2618
|
m > 0 && m < 100 && (this.velocityX = (t - this.lastDragX) / m, this.velocityY = (i - this.lastDragY) / m), this.lastDragTime = u, this.lastDragX = t, this.lastDragY = i;
|
|
2547
2619
|
}
|
|
2548
|
-
this.draggingDirection =
|
|
2620
|
+
this.draggingDirection = Be({
|
|
2549
2621
|
deltaX: o,
|
|
2550
2622
|
deltaY: s,
|
|
2551
2623
|
reversed: this.dragReverse,
|
|
2552
2624
|
allowSpinX: this.allowSpinX,
|
|
2553
2625
|
allowSpinY: this.allowSpinY
|
|
2554
2626
|
}) || this.draggingDirection;
|
|
2555
|
-
const n = this.dragSpeed /
|
|
2627
|
+
const n = this.dragSpeed / Ae, r = n * (this.amountX / this.container.offsetWidth), a = n * (this.amountY / this.container.offsetHeight), l = this.allowSpinX ? Math.abs(Math.round(o * r)) : 0, c = this.allowSpinY ? Math.abs(Math.round(s * a)) : 0;
|
|
2556
2628
|
(this.allowSpinX && l !== 0 || this.allowSpinY && c !== 0) && (this.hasInteracted = !0, this.hideHotspotPopper(), this.onMoveHandler(this.draggingDirection, l, c), this.movementStart = { x: t, y: i }, setTimeout(() => {
|
|
2557
2629
|
this.isDragging || (this.isDragging = !0, this.emit("onDragStart"));
|
|
2558
|
-
},
|
|
2630
|
+
}, eo));
|
|
2559
2631
|
}
|
|
2560
2632
|
mouseMove(t) {
|
|
2561
2633
|
!this.isReady || !this.isClicked || this.isZoomed || (this.hideAllIcons(), this.drag(t.pageX, t.pageY));
|
|
@@ -2564,8 +2636,20 @@ class $e {
|
|
|
2564
2636
|
this.dragJustEnded = !1, this.autoplayJustStopped = !1;
|
|
2565
2637
|
}
|
|
2566
2638
|
loadHigherQualityImages(t, i) {
|
|
2567
|
-
|
|
2568
|
-
|
|
2639
|
+
if (this.isGridMode) {
|
|
2640
|
+
const n = at(this.srcGridConfig, t);
|
|
2641
|
+
Se({
|
|
2642
|
+
cdnPath: n,
|
|
2643
|
+
config: this.srcGridConfig,
|
|
2644
|
+
onAllImagesLoad: (r) => {
|
|
2645
|
+
this.closeImageBitmaps(this.imagesGrid), this.imagesGrid = r, i();
|
|
2646
|
+
},
|
|
2647
|
+
onError: (r) => this.emit("onError", r)
|
|
2648
|
+
});
|
|
2649
|
+
return;
|
|
2650
|
+
}
|
|
2651
|
+
const o = at(this.srcXConfig, t), s = this.allowSpinY ? at(this.srcYConfig, t) : null;
|
|
2652
|
+
Xe({
|
|
2569
2653
|
cdnPathX: o,
|
|
2570
2654
|
cdnPathY: s,
|
|
2571
2655
|
configX: this.srcXConfig,
|
|
@@ -2594,13 +2678,13 @@ class $e {
|
|
|
2594
2678
|
}
|
|
2595
2679
|
initZoom() {
|
|
2596
2680
|
const t = this.zoomMax || 5, i = this.zoomStep || 0.5;
|
|
2597
|
-
this.zoomPan = new
|
|
2681
|
+
this.zoomPan = new ss(this.innerBox, {
|
|
2598
2682
|
zoomMax: t,
|
|
2599
2683
|
zoomStep: i,
|
|
2600
2684
|
onZoomChange: (s, n, r) => this.onZoomChange(s, n, r)
|
|
2601
2685
|
});
|
|
2602
2686
|
const o = this.getDrawDimensions();
|
|
2603
|
-
o && this.zoomPan.setDrawSize(o.drawWidth, o.drawHeight), this.touchDevice && this.pinchZoom !== !1 && (this.gestureRecognizer = new
|
|
2687
|
+
o && this.zoomPan.setDrawSize(o.drawWidth, o.drawHeight), this.touchDevice && this.pinchZoom !== !1 && (this.gestureRecognizer = new ns(this.innerBox, {
|
|
2604
2688
|
zoomMax: t,
|
|
2605
2689
|
getZoom: () => this.zoomPan ? this.zoomPan.getZoom() : 1,
|
|
2606
2690
|
onPinchZoom: (s, n, r) => {
|
|
@@ -2612,7 +2696,7 @@ class $e {
|
|
|
2612
2696
|
onDoubleTap: (s, n) => {
|
|
2613
2697
|
this.zoomPan && (this.zoomPan.isZoomed() ? this.zoomPan.resetZoom() : this.zoomPan.zoomTowardPoint(2, s, n));
|
|
2614
2698
|
}
|
|
2615
|
-
})), this.zoomControls && !this.touchDevice && (this.zoomControlsUI =
|
|
2699
|
+
})), this.zoomControls && !this.touchDevice && (this.zoomControlsUI = hs(this.innerBox, {
|
|
2616
2700
|
position: this.zoomControlsPosition || "bottom-left",
|
|
2617
2701
|
zoomMax: t,
|
|
2618
2702
|
onZoomIn: () => this.zoomPan && this.zoomPan.zoomIn(),
|
|
@@ -2671,11 +2755,11 @@ class $e {
|
|
|
2671
2755
|
t.preventDefault(), this.hideHints();
|
|
2672
2756
|
return;
|
|
2673
2757
|
}
|
|
2674
|
-
if (this.isZoomed && this.zoomPan && this.zoomPan.handleKeyPan(o,
|
|
2758
|
+
if (this.isZoomed && this.zoomPan && this.zoomPan.handleKeyPan(o, no)) {
|
|
2675
2759
|
t.preventDefault();
|
|
2676
2760
|
return;
|
|
2677
2761
|
}
|
|
2678
|
-
switch (
|
|
2762
|
+
switch (De(o, this.allowSpinY) && (this.hasInteracted = !0, this.hideAllIcons(), this.hideHints()), o) {
|
|
2679
2763
|
case 37:
|
|
2680
2764
|
s ? this.moveLeft() : this.moveRight();
|
|
2681
2765
|
break;
|
|
@@ -2692,44 +2776,53 @@ class $e {
|
|
|
2692
2776
|
}
|
|
2693
2777
|
keyUp(t) {
|
|
2694
2778
|
const { keyCode: i } = t;
|
|
2695
|
-
|
|
2779
|
+
De(i, this.allowSpinY) && this.showAllIcons();
|
|
2696
2780
|
}
|
|
2697
2781
|
moveActiveXIndexUp(t) {
|
|
2698
|
-
this.orientation = L.X, this.activeImageX = (this.activeImageX + t) % this.amountX;
|
|
2782
|
+
this.isGridMode || (this.orientation = L.X), this.activeImageX = (this.activeImageX + t) % this.amountX;
|
|
2699
2783
|
}
|
|
2700
2784
|
moveActiveXIndexDown(t) {
|
|
2701
|
-
this.orientation = L.X, this.activeImageX = (this.activeImageX - t + this.amountX) % this.amountX;
|
|
2785
|
+
this.isGridMode || (this.orientation = L.X), this.activeImageX = (this.activeImageX - t + this.amountX) % this.amountX;
|
|
2702
2786
|
}
|
|
2703
2787
|
moveActiveYIndexUp(t) {
|
|
2704
|
-
this.orientation = L.Y, this.activeImageY = (this.activeImageY + t) % this.amountY;
|
|
2788
|
+
this.isGridMode || (this.orientation = L.Y), this.activeImageY = (this.activeImageY + t) % this.amountY;
|
|
2705
2789
|
}
|
|
2706
2790
|
moveActiveYIndexDown(t) {
|
|
2707
|
-
this.orientation = L.Y, this.activeImageY = (this.activeImageY - t + this.amountY) % this.amountY;
|
|
2791
|
+
this.isGridMode || (this.orientation = L.Y), this.activeImageY = (this.activeImageY - t + this.amountY) % this.amountY;
|
|
2708
2792
|
}
|
|
2709
2793
|
moveRight(t, i = 1) {
|
|
2710
|
-
|
|
2794
|
+
const o = this.isGridMode ? this.amountX - 1 : this.imagesX.length - 1;
|
|
2795
|
+
t && this.activeImageX >= o || (this.moveActiveXIndexUp(i), this.isZoomed || this.updateView());
|
|
2711
2796
|
}
|
|
2712
2797
|
moveLeft(t, i = 1) {
|
|
2713
2798
|
t && this.activeImageX <= 0 || (this.moveActiveXIndexDown(i), this.isZoomed || this.updateView());
|
|
2714
2799
|
}
|
|
2715
2800
|
moveTop(t, i = 1) {
|
|
2716
|
-
|
|
2801
|
+
const o = this.isGridMode ? this.amountY - 1 : this.imagesY.length - 1;
|
|
2802
|
+
t && this.activeImageY >= o || (this.moveActiveYIndexUp(i), this.isZoomed || this.updateView());
|
|
2717
2803
|
}
|
|
2718
2804
|
moveBottom(t, i = 1) {
|
|
2719
2805
|
t && this.activeImageY <= 0 || (this.moveActiveYIndexDown(i), this.isZoomed || this.updateView());
|
|
2720
2806
|
}
|
|
2721
2807
|
onMoveHandler(t, i = 1, o = 1) {
|
|
2722
|
-
t === "right" ? this.moveRight(this.
|
|
2808
|
+
t === "right" ? this.moveRight(this.stopAtEdgesX, i) : t === "left" ? this.moveLeft(this.stopAtEdgesX, i) : t === "up" ? this.moveTop(this.stopAtEdgesY, o) : t === "down" && this.moveBottom(this.stopAtEdgesY, o), this.emit("onSpin", {
|
|
2723
2809
|
direction: t,
|
|
2724
2810
|
activeImageX: this.activeImageX,
|
|
2725
2811
|
activeImageY: this.activeImageY,
|
|
2726
2812
|
amountX: this.amountX,
|
|
2727
|
-
amountY: this.amountY
|
|
2813
|
+
amountY: this.amountY,
|
|
2814
|
+
isGridMode: this.isGridMode
|
|
2728
2815
|
});
|
|
2729
2816
|
}
|
|
2730
2817
|
updateView(t, i, o) {
|
|
2731
|
-
|
|
2732
|
-
|
|
2818
|
+
let s;
|
|
2819
|
+
if (this.isGridMode) {
|
|
2820
|
+
const r = this.activeImageY * this.amountX + this.activeImageX;
|
|
2821
|
+
s = this.imagesGrid[r];
|
|
2822
|
+
} else
|
|
2823
|
+
s = this.orientation === L.X ? this.imagesX[this.activeImageX] : this.imagesY[this.activeImageY];
|
|
2824
|
+
const n = this.isGridMode ? this.activeImageY * this.amountX + this.activeImageX : this.orientation === L.X ? this.activeImageX : this.activeImageY;
|
|
2825
|
+
this.hotspotsInstance && !this.isZoomed && !this.autoplay && this.hotspotsInstance.updateHotspotPosition(n, this.isGridMode ? "grid" : this.orientation), this.hotspotTimelineIndicator && (this.isGridMode || this.orientation === L.X) && this.updateHotspotTimelinePosition(), this.drawImageOnCanvas(s, t, i, o);
|
|
2733
2826
|
}
|
|
2734
2827
|
updatePercentageInLoader(t = 0) {
|
|
2735
2828
|
this.loader && (this.loader.innerText = t + "%");
|
|
@@ -2761,10 +2854,14 @@ class $e {
|
|
|
2761
2854
|
}));
|
|
2762
2855
|
}
|
|
2763
2856
|
pushImageToSet(t, i, o) {
|
|
2764
|
-
o === L.X ? this.imagesX[i] = t : this.imagesY[i] = t;
|
|
2857
|
+
o === "grid" ? this.imagesGrid[i] = t : o === L.X ? this.imagesX[i] = t : this.imagesY[i] = t;
|
|
2765
2858
|
}
|
|
2766
2859
|
calculatePercentage() {
|
|
2767
|
-
|
|
2860
|
+
if (this.isGridMode) {
|
|
2861
|
+
const o = this.amountX * this.amountY, s = this.imagesGrid.filter(Boolean).length;
|
|
2862
|
+
return Math.round(s / o * 100);
|
|
2863
|
+
}
|
|
2864
|
+
const t = this.amountX + this.amountY, i = this.imagesX.filter(Boolean).length + this.imagesY.filter(Boolean).length;
|
|
2768
2865
|
return Math.round(i / t * 100);
|
|
2769
2866
|
}
|
|
2770
2867
|
onImageLoad(t, i, o) {
|
|
@@ -2781,10 +2878,11 @@ class $e {
|
|
|
2781
2878
|
if (!o) return;
|
|
2782
2879
|
const s = Math.round(o.contentRect.width);
|
|
2783
2880
|
s === t || s === 0 || (t = s, requestAnimationFrame(() => {
|
|
2784
|
-
|
|
2785
|
-
|
|
2786
|
-
|
|
2787
|
-
|
|
2881
|
+
let n;
|
|
2882
|
+
if (this.isGridMode ? n = this.imagesGrid[this.activeImageY * this.amountX + this.activeImageX] : this.orientation === L.Y && this.imagesY.length > 0 ? n = this.imagesY[this.activeImageY] : n = this.imagesX[this.activeImageX], n) {
|
|
2883
|
+
if (this.adaptCanvasSize(n), this.zoomPan) {
|
|
2884
|
+
const r = this.getDrawDimensions();
|
|
2885
|
+
r && this.zoomPan.setDrawSize(r.drawWidth, r.drawHeight, !0);
|
|
2788
2886
|
}
|
|
2789
2887
|
this.updateView();
|
|
2790
2888
|
}
|
|
@@ -2792,47 +2890,69 @@ class $e {
|
|
|
2792
2890
|
}), this.resizeObserver.observe(this.container);
|
|
2793
2891
|
}
|
|
2794
2892
|
onAllImagesLoaded() {
|
|
2795
|
-
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
|
|
2796
|
-
|
|
2797
|
-
|
|
2798
|
-
|
|
2799
|
-
|
|
2800
|
-
|
|
2801
|
-
|
|
2802
|
-
|
|
2803
|
-
|
|
2893
|
+
if (this.addAllIcons(), this.isReady = !0, this.isGridMode || (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)
|
|
2894
|
+
if (this.hotspotsInstance = new On(this.hotspots, this.innerBox, this.imageAspectRatio, {
|
|
2895
|
+
trigger: this.hotspotTrigger,
|
|
2896
|
+
onOpen: this.onHotspotOpen,
|
|
2897
|
+
onClose: this.onHotspotClose,
|
|
2898
|
+
onProductClick: this.onProductClick,
|
|
2899
|
+
onNavigate: this.onNavigate
|
|
2900
|
+
}), this.addHotspotTimeline(), this.autoplay)
|
|
2901
|
+
this.hotspotsInstance.hideHotspots(), this.hideHotspotTimeline();
|
|
2902
|
+
else {
|
|
2903
|
+
const t = this.isGridMode ? this.activeImageY * this.amountX + this.activeImageX : this.activeImageX, i = this.isGridMode ? "grid" : this.orientation;
|
|
2904
|
+
this.hotspotsInstance.updateHotspotPosition(t, i), this.showHotspotTimeline();
|
|
2905
|
+
}
|
|
2906
|
+
if (this.emit("onLoad", {
|
|
2907
|
+
imagesX: this.isGridMode ? this.amountX : this.imagesX.length,
|
|
2908
|
+
imagesY: this.isGridMode ? this.amountY : this.imagesY.length,
|
|
2909
|
+
...this.isGridMode && { imagesGrid: this.imagesGrid.filter(Boolean).length }
|
|
2910
|
+
}), this.emit("onReady"), this.announce("360 degree view loaded. Use mouse drag or arrow keys to rotate."), this.hints !== !1 && !this.autoplay) {
|
|
2911
|
+
const t = this.hints === !0 || this.hints === void 0 ? Me(this.viewerConfig, this.touchDevice) : this.hints;
|
|
2912
|
+
t && t.length > 0 && (this.hintsOverlay = Le(this.innerBox, t), Oe(this.hintsOverlay));
|
|
2804
2913
|
}
|
|
2805
|
-
this.autoplay && (this.hideAllIcons(),
|
|
2914
|
+
this.autoplay && (this.hideAllIcons(), es(this.play.bind(this))());
|
|
2806
2915
|
}
|
|
2807
2916
|
toggleFullscreen(t) {
|
|
2808
|
-
t.stopPropagation(), this.hideHotspotPopper(),
|
|
2917
|
+
t.stopPropagation(), this.hideHotspotPopper(), ce() ? Ge() : os(this.container);
|
|
2809
2918
|
}
|
|
2810
2919
|
onFullscreenChange() {
|
|
2811
|
-
const t =
|
|
2812
|
-
t !== i && (this.container.classList.toggle("cloudimage-360--fullscreen", t),
|
|
2920
|
+
const t = ce() === this.container, i = this.container.classList.contains("cloudimage-360--fullscreen");
|
|
2921
|
+
t !== i && (this.container.classList.toggle("cloudimage-360--fullscreen", t), Po(this.fullscreenIcon, t), t ? (this.emit("onFullscreenOpen"), this.announce("Opened fullscreen mode. Press Escape to exit.")) : (this.emit("onFullscreenClose"), this.announce("Exited fullscreen mode")));
|
|
2813
2922
|
}
|
|
2814
2923
|
play() {
|
|
2815
2924
|
if (this.isClicked) return;
|
|
2816
2925
|
this.hide360ViewCircleIcon(), this.emit("onAutoplayStart");
|
|
2817
|
-
|
|
2926
|
+
let t;
|
|
2927
|
+
if (this.isGridMode) {
|
|
2928
|
+
const s = this.autoplayBehavior;
|
|
2929
|
+
s === "spin-x" ? t = this.amountX : s === "spin-y" ? t = this.amountY : t = Math.max(this.amountX, this.amountY);
|
|
2930
|
+
} else
|
|
2931
|
+
t = this.amountX + this.amountY;
|
|
2932
|
+
const i = this.speed * 36 / t, o = {
|
|
2818
2933
|
left: this.moveLeft.bind(this),
|
|
2819
2934
|
right: this.moveRight.bind(this),
|
|
2820
2935
|
top: this.moveTop.bind(this),
|
|
2821
2936
|
bottom: this.moveBottom.bind(this)
|
|
2822
2937
|
};
|
|
2823
2938
|
this.loopTimeoutId = window.setInterval(() => {
|
|
2824
|
-
if (this.playOnce &&
|
|
2939
|
+
if (this.playOnce && Ko({
|
|
2825
2940
|
autoplayBehavior: this.autoplayBehavior,
|
|
2826
2941
|
activeImageX: this.activeImageX,
|
|
2827
2942
|
activeImageY: this.activeImageY,
|
|
2828
2943
|
amountX: this.amountX,
|
|
2829
2944
|
amountY: this.amountY,
|
|
2830
|
-
autoplayReverse: this.autoplayReverse
|
|
2945
|
+
autoplayReverse: this.autoplayReverse,
|
|
2946
|
+
isGridMode: this.isGridMode
|
|
2831
2947
|
})) {
|
|
2832
2948
|
this.stopAutoplay();
|
|
2833
2949
|
return;
|
|
2834
2950
|
}
|
|
2835
|
-
|
|
2951
|
+
if (this.isGridMode) {
|
|
2952
|
+
this.gridAutoplayTick(o);
|
|
2953
|
+
return;
|
|
2954
|
+
}
|
|
2955
|
+
qo({
|
|
2836
2956
|
autoplayBehavior: this.autoplayBehavior,
|
|
2837
2957
|
activeImageX: this.activeImageX,
|
|
2838
2958
|
activeImageY: this.activeImageY,
|
|
@@ -2840,24 +2960,62 @@ class $e {
|
|
|
2840
2960
|
amountY: this.amountY,
|
|
2841
2961
|
autoplayReverse: this.autoplayReverse,
|
|
2842
2962
|
spinDirection: this.spinDirection
|
|
2843
|
-
}) && (this.spinDirection =
|
|
2844
|
-
const
|
|
2845
|
-
|
|
2963
|
+
}) && (this.spinDirection = Qo(this.spinDirection));
|
|
2964
|
+
const r = this.spinDirection === "y";
|
|
2965
|
+
$o({
|
|
2846
2966
|
autoplayBehavior: this.autoplayBehavior,
|
|
2847
|
-
spinY:
|
|
2967
|
+
spinY: r,
|
|
2848
2968
|
reversed: this.autoplayReverse,
|
|
2849
|
-
loopTriggers:
|
|
2969
|
+
loopTriggers: o
|
|
2850
2970
|
});
|
|
2851
|
-
},
|
|
2971
|
+
}, i);
|
|
2972
|
+
}
|
|
2973
|
+
gridAutoplayTick(t) {
|
|
2974
|
+
const i = this.autoplayReverse, o = this.autoplayBehavior;
|
|
2975
|
+
if (o === "spin-x") {
|
|
2976
|
+
i ? t.left() : t.right();
|
|
2977
|
+
return;
|
|
2978
|
+
}
|
|
2979
|
+
if (o === "spin-y") {
|
|
2980
|
+
i ? t.bottom() : t.top();
|
|
2981
|
+
return;
|
|
2982
|
+
}
|
|
2983
|
+
if (o === "spin-xy") {
|
|
2984
|
+
const s = i ? 0 : this.amountX - 1, n = this.activeImageX === s;
|
|
2985
|
+
i ? this.activeImageX = (this.activeImageX - 1 + this.amountX) % this.amountX : this.activeImageX = (this.activeImageX + 1) % this.amountX, n && (i ? this.activeImageY = (this.activeImageY - 1 + this.amountY) % this.amountY : this.activeImageY = (this.activeImageY + 1) % this.amountY), this.isZoomed || this.updateView(), this.emit("onSpin", {
|
|
2986
|
+
direction: i ? "left" : "right",
|
|
2987
|
+
activeImageX: this.activeImageX,
|
|
2988
|
+
activeImageY: this.activeImageY,
|
|
2989
|
+
amountX: this.amountX,
|
|
2990
|
+
amountY: this.amountY,
|
|
2991
|
+
isGridMode: !0
|
|
2992
|
+
});
|
|
2993
|
+
return;
|
|
2994
|
+
}
|
|
2995
|
+
if (o === "spin-yx") {
|
|
2996
|
+
const s = i ? 0 : this.amountY - 1, n = this.activeImageY === s;
|
|
2997
|
+
i ? this.activeImageY = (this.activeImageY - 1 + this.amountY) % this.amountY : this.activeImageY = (this.activeImageY + 1) % this.amountY, n && (i ? this.activeImageX = (this.activeImageX - 1 + this.amountX) % this.amountX : this.activeImageX = (this.activeImageX + 1) % this.amountX), this.isZoomed || this.updateView(), this.emit("onSpin", {
|
|
2998
|
+
direction: i ? "down" : "up",
|
|
2999
|
+
activeImageX: this.activeImageX,
|
|
3000
|
+
activeImageY: this.activeImageY,
|
|
3001
|
+
amountX: this.amountX,
|
|
3002
|
+
amountY: this.amountY,
|
|
3003
|
+
isGridMode: !0
|
|
3004
|
+
});
|
|
3005
|
+
}
|
|
2852
3006
|
}
|
|
2853
3007
|
stopAutoplay() {
|
|
2854
|
-
if (this.showAllIcons(), this.autoplay = !1, window.
|
|
2855
|
-
const t = this.
|
|
2856
|
-
|
|
3008
|
+
if (this.showAllIcons(), this.autoplay = !1, window.clearInterval(this.loopTimeoutId), this.loopTimeoutId = null, this.emit("onAutoplayStop"), this.hotspotsInstance) {
|
|
3009
|
+
const t = this.isGridMode ? this.activeImageY * this.amountX + this.activeImageX : this.activeImageX, i = this.isGridMode ? "grid" : this.orientation;
|
|
3010
|
+
this.hotspotsInstance.updateHotspotPosition(t, i), this.showHotspotTimeline();
|
|
3011
|
+
}
|
|
3012
|
+
if (this.hints !== !1 && !this.hintsOverlay && !this.hintsHidden) {
|
|
3013
|
+
const t = this.hints === !0 ? Me(this.viewerConfig, this.touchDevice) : this.hints;
|
|
3014
|
+
t && t.length > 0 && (this.hintsOverlay = Le(this.innerBox, t), Oe(this.hintsOverlay));
|
|
2857
3015
|
}
|
|
2858
3016
|
}
|
|
2859
3017
|
destroy() {
|
|
2860
|
-
this.stopAutoplay(), this.inertiaAnimationId && (cancelAnimationFrame(this.inertiaAnimationId), this.inertiaAnimationId = null), this.removeEvents(), this.zoomPan && (this.zoomPan.destroy(), this.zoomPan = null), this.gestureRecognizer && (this.gestureRecognizer.destroy(), this.gestureRecognizer = null), this.zoomControlsUI && (this.zoomControlsUI.destroy(), this.zoomControlsUI = null), this.scrollHintUI && (this.scrollHintUI.destroy(), this.scrollHintUI = null), this.closeImageBitmaps(this.imagesX), this.closeImageBitmaps(this.imagesY), this.imagesX = [], this.imagesY = [], this.resizeObserver && (this.resizeObserver.disconnect(), this.resizeObserver = null), 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"),
|
|
3018
|
+
this.stopAutoplay(), this.inertiaAnimationId && (cancelAnimationFrame(this.inertiaAnimationId), this.inertiaAnimationId = null), this.removeEvents(), this.zoomPan && (this.zoomPan.destroy(), this.zoomPan = null), this.gestureRecognizer && (this.gestureRecognizer.destroy(), this.gestureRecognizer = null), this.zoomControlsUI && (this.zoomControlsUI.destroy(), this.zoomControlsUI = null), this.scrollHintUI && (this.scrollHintUI.destroy(), this.scrollHintUI = null), this.closeImageBitmaps(this.imagesX), this.closeImageBitmaps(this.imagesY), this.closeImageBitmaps(this.imagesGrid), this.imagesX = [], this.imagesY = [], this.imagesGrid = [], this.isGridMode = !1, this.isReady = !1, this.resizeObserver && (this.resizeObserver.disconnect(), this.resizeObserver = null), 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"), ce() === this.container && Ge(), this.container && (this.container.classList.remove("ci360-theme-dark", "ci360-hotspot-marker-inverted", "ci360-hotspot-marker-brand", "cloudimage-360--fullscreen"), this.container.style.removeProperty("--ci360-hotspot-brand-color"), this.container.innerHTML = "");
|
|
2861
3019
|
}
|
|
2862
3020
|
/**
|
|
2863
3021
|
* Release memory by closing ImageBitmap objects without destroying the viewer.
|
|
@@ -2865,7 +3023,7 @@ class $e {
|
|
|
2865
3023
|
* Call reloadImages() to restore the images when the viewer becomes visible again.
|
|
2866
3024
|
*/
|
|
2867
3025
|
releaseMemory() {
|
|
2868
|
-
this.stopAutoplay(), this.closeImageBitmaps(this.imagesX), this.closeImageBitmaps(this.imagesY), this.imagesX = [], this.imagesY = [], this.isMemoryReleased = !0;
|
|
3026
|
+
this.stopAutoplay(), this.closeImageBitmaps(this.imagesX), this.closeImageBitmaps(this.imagesY), this.closeImageBitmaps(this.imagesGrid), this.imagesX = [], this.imagesY = [], this.imagesGrid = [], this.isMemoryReleased = !0;
|
|
2869
3027
|
}
|
|
2870
3028
|
/**
|
|
2871
3029
|
* Reload images after memory was released.
|
|
@@ -2880,7 +3038,7 @@ class $e {
|
|
|
2880
3038
|
});
|
|
2881
3039
|
}
|
|
2882
3040
|
addInitialIcon() {
|
|
2883
|
-
this.initialIcon || this.hide360Logo || (this.initialIcon =
|
|
3041
|
+
this.initialIcon || this.hide360Logo || (this.initialIcon = wo(this.logoSrc), this.innerBox.appendChild(this.initialIcon));
|
|
2884
3042
|
}
|
|
2885
3043
|
showInitialIcon() {
|
|
2886
3044
|
!this.initialIcon || this.hasInteracted || (this.initialIcon.style.opacity = 1);
|
|
@@ -2889,7 +3047,7 @@ class $e {
|
|
|
2889
3047
|
this.initialIcon && (this.initialIcon.style.opacity = 0);
|
|
2890
3048
|
}
|
|
2891
3049
|
addFullscreenIcon() {
|
|
2892
|
-
!this.fullscreen ||
|
|
3050
|
+
!this.fullscreen || !is() || (this.fullscreenIcon = xo(), this.fullscreenIcon.onclick = this.toggleFullscreen.bind(this), this.iconsContainer.appendChild(this.fullscreenIcon));
|
|
2893
3051
|
}
|
|
2894
3052
|
showFullscreenIcon() {
|
|
2895
3053
|
this.fullscreenIcon && (this.fullscreenIcon.style.opacity = 1);
|
|
@@ -2898,7 +3056,7 @@ class $e {
|
|
|
2898
3056
|
this.fullscreenIcon && (this.fullscreenIcon.style.opacity = 0);
|
|
2899
3057
|
}
|
|
2900
3058
|
add360ViewCircleIcon() {
|
|
2901
|
-
this.view360CircleIcon || (this.view360CircleIcon =
|
|
3059
|
+
this.view360CircleIcon || (this.view360CircleIcon = yo(this.bottomCircleOffset), this.innerBox.appendChild(this.view360CircleIcon));
|
|
2902
3060
|
}
|
|
2903
3061
|
show360ViewCircleIcon() {
|
|
2904
3062
|
this.view360CircleIcon && (this.view360CircleIcon.style.opacity = 1);
|
|
@@ -2907,7 +3065,7 @@ class $e {
|
|
|
2907
3065
|
this.view360CircleIcon && (this.view360CircleIcon.style.opacity = 0);
|
|
2908
3066
|
}
|
|
2909
3067
|
addLoadingSpinner() {
|
|
2910
|
-
this.loadingSpinner =
|
|
3068
|
+
this.loadingSpinner = Ao(), this.innerBox.appendChild(this.loadingSpinner);
|
|
2911
3069
|
}
|
|
2912
3070
|
showLoadingSpinner() {
|
|
2913
3071
|
this.loadingSpinner && (this.hideAllIcons(), this.loadingSpinner.style.opacity = 1);
|
|
@@ -2916,28 +3074,32 @@ class $e {
|
|
|
2916
3074
|
this.loadingSpinner && (this.loadingSpinner.style.opacity = 0);
|
|
2917
3075
|
}
|
|
2918
3076
|
hideHints() {
|
|
2919
|
-
!this.hintsOverlay || this.hintsHidden || (this.hintsHidden = !0,
|
|
3077
|
+
!this.hintsOverlay || this.hintsHidden || (this.hintsHidden = !0, Mo(this.hintsOverlay));
|
|
2920
3078
|
}
|
|
2921
3079
|
addHotspotTimeline() {
|
|
2922
3080
|
if (!this.hotspots || this.hotspotTimeline) return;
|
|
2923
|
-
const t =
|
|
2924
|
-
if (!
|
|
2925
|
-
this.hotspotTimeline =
|
|
2926
|
-
|
|
2927
|
-
|
|
2928
|
-
const
|
|
2929
|
-
isNaN(
|
|
3081
|
+
const t = this.isGridMode ? this.amountX * this.amountY : this.amountX, i = Zo(this.innerBox, t, this.hotspots);
|
|
3082
|
+
if (!i) return;
|
|
3083
|
+
this.hotspotTimeline = i.element, this.hotspotTimelineIndicator = i.indicator, this.innerBox.classList.add("has-hotspot-timeline"), this.hotspotTimeline.querySelectorAll(".cloudimage-360-hotspot-timeline-dot").forEach((s) => {
|
|
3084
|
+
s.addEventListener("click", (n) => {
|
|
3085
|
+
n.stopPropagation(), this.hideAllIcons(), this.hideHints();
|
|
3086
|
+
const r = parseInt(s.getAttribute("data-frame"), 10), a = s.getAttribute("data-hotspot-id");
|
|
3087
|
+
isNaN(r) || this.animateToFrame(r, a);
|
|
2930
3088
|
});
|
|
2931
3089
|
}), this.updateHotspotTimelinePosition();
|
|
2932
3090
|
}
|
|
2933
3091
|
showHotspotTimeline() {
|
|
2934
|
-
|
|
3092
|
+
Do(this.hotspotTimeline);
|
|
2935
3093
|
}
|
|
2936
3094
|
hideHotspotTimeline() {
|
|
2937
|
-
|
|
3095
|
+
Bo(this.hotspotTimeline);
|
|
2938
3096
|
}
|
|
2939
3097
|
updateHotspotTimelinePosition() {
|
|
2940
|
-
|
|
3098
|
+
if (this.isGridMode) {
|
|
3099
|
+
const t = this.activeImageY * this.amountX + this.activeImageX;
|
|
3100
|
+
He(this.hotspotTimelineIndicator, t, this.amountX * this.amountY);
|
|
3101
|
+
} else
|
|
3102
|
+
He(this.hotspotTimelineIndicator, this.activeImageX, this.amountX);
|
|
2941
3103
|
}
|
|
2942
3104
|
/**
|
|
2943
3105
|
* Animates the viewer to a target frame, optionally showing a hotspot popup on arrival
|
|
@@ -2945,30 +3107,45 @@ class $e {
|
|
|
2945
3107
|
* @param {string} [hotspotId] - Optional hotspot ID to show popup for after animation
|
|
2946
3108
|
*/
|
|
2947
3109
|
animateToFrame(t, i) {
|
|
2948
|
-
|
|
2949
|
-
|
|
3110
|
+
this.hotspotsInstance && this.hotspotsInstance.hidePopper();
|
|
3111
|
+
const o = this.isGridMode ? this.activeImageY * this.amountX + this.activeImageX : this.activeImageX;
|
|
3112
|
+
if (this.isAnimatingToFrame || t === o) {
|
|
3113
|
+
t === o && i && this.hotspotsInstance && this.hotspotTimelineOnClick && this.hotspotsInstance.showHotspotById(i);
|
|
3114
|
+
return;
|
|
3115
|
+
}
|
|
3116
|
+
if (this.isAnimatingToFrame = !0, this.hasInteracted = !0, (this.autoplay || this.loopTimeoutId) && (this.stopAutoplay(), this.autoplay = !1), this.inertiaAnimationId && (cancelAnimationFrame(this.inertiaAnimationId), this.inertiaAnimationId = null), this.isGridMode) {
|
|
3117
|
+
const m = this.amountX * this.amountY, p = Math.max(0, Math.min(t, m - 1));
|
|
3118
|
+
this.activeImageY = Math.floor(p / this.amountX), this.activeImageX = p % this.amountX, this.isZoomed || this.updateView(), this.emit("onSpin", {
|
|
3119
|
+
direction: p > o ? "right" : "left",
|
|
3120
|
+
activeImageX: this.activeImageX,
|
|
3121
|
+
activeImageY: this.activeImageY,
|
|
3122
|
+
amountX: this.amountX,
|
|
3123
|
+
amountY: this.amountY,
|
|
3124
|
+
isGridMode: !0
|
|
3125
|
+
}), this.isAnimatingToFrame = !1, i && this.hotspotsInstance && this.hotspotTimelineOnClick && setTimeout(() => {
|
|
3126
|
+
this.hotspotsInstance.showHotspotById(i);
|
|
3127
|
+
}, 50);
|
|
2950
3128
|
return;
|
|
2951
3129
|
}
|
|
2952
|
-
|
|
2953
|
-
|
|
2954
|
-
if (a === 0) {
|
|
3130
|
+
const s = this.activeImageX, n = (t - s + this.amountX) % this.amountX, r = (s - t + this.amountX) % this.amountX, a = n <= r, l = a ? n : r;
|
|
3131
|
+
if (l === 0) {
|
|
2955
3132
|
this.isAnimatingToFrame = !1;
|
|
2956
3133
|
return;
|
|
2957
3134
|
}
|
|
2958
|
-
const
|
|
2959
|
-
let
|
|
2960
|
-
const
|
|
2961
|
-
if (
|
|
3135
|
+
const c = 30;
|
|
3136
|
+
let h = l;
|
|
3137
|
+
const u = () => {
|
|
3138
|
+
if (h <= 0) {
|
|
2962
3139
|
this.isAnimatingToFrame = !1, i && this.hotspotsInstance && this.hotspotTimelineOnClick && setTimeout(() => {
|
|
2963
3140
|
this.hotspotsInstance.showHotspotById(i);
|
|
2964
3141
|
}, 50);
|
|
2965
3142
|
return;
|
|
2966
3143
|
}
|
|
2967
|
-
|
|
3144
|
+
a ? this.moveRight() : this.moveLeft(), h--, h > 0 ? setTimeout(u, c) : (this.isAnimatingToFrame = !1, i && this.hotspotsInstance && this.hotspotTimelineOnClick && setTimeout(() => {
|
|
2968
3145
|
this.hotspotsInstance.showHotspotById(i);
|
|
2969
3146
|
}, 50));
|
|
2970
3147
|
};
|
|
2971
|
-
|
|
3148
|
+
u();
|
|
2972
3149
|
}
|
|
2973
3150
|
remove360ViewCircleIcon() {
|
|
2974
3151
|
this.view360CircleIcon && (this.innerBox.removeChild(this.view360CircleIcon), this.view360CircleIcon = null);
|
|
@@ -2992,10 +3169,10 @@ class $e {
|
|
|
2992
3169
|
this.removeMouseEvents(), this.removeTouchEvents(), this.removeKeyboardEvents(), this.removeEscKeyHandler(), this.removeFullscreenChangeHandler();
|
|
2993
3170
|
}
|
|
2994
3171
|
addMouseEvents() {
|
|
2995
|
-
this.boundMouseClick = this.mouseClick.bind(this), this.boundMouseDown = this.mouseDown.bind(this), this.boundMouseMove =
|
|
3172
|
+
this.boundMouseClick = this.mouseClick.bind(this), this.boundMouseDown = this.mouseDown.bind(this), this.boundMouseMove = Ee(this.mouseMove.bind(this), Te), this.boundMouseUp = this.mouseUp.bind(this), this.innerBox.addEventListener("click", this.boundMouseClick), this.innerBox.addEventListener("mousedown", this.boundMouseDown), document.addEventListener("mousemove", this.boundMouseMove), document.addEventListener("mouseup", this.boundMouseUp);
|
|
2996
3173
|
}
|
|
2997
3174
|
addTouchEvents() {
|
|
2998
|
-
this.boundTouchStart = this.touchStart.bind(this), this.boundTouchEnd = this.touchEnd.bind(this), this.boundTouchMove =
|
|
3175
|
+
this.boundTouchStart = this.touchStart.bind(this), this.boundTouchEnd = this.touchEnd.bind(this), this.boundTouchMove = Ee(this.touchMove.bind(this), Te), this.container.addEventListener("touchstart", this.boundTouchStart, { passive: !1 }), this.container.addEventListener("touchend", this.boundTouchEnd), this.container.addEventListener("touchmove", this.boundTouchMove, { passive: !1 });
|
|
2999
3176
|
}
|
|
3000
3177
|
addKeyboardEvents() {
|
|
3001
3178
|
this.boundKeyDown = this.keyDown.bind(this), this.boundKeyUp = this.keyUp.bind(this), document.addEventListener("keydown", this.boundKeyDown), document.addEventListener("keyup", this.boundKeyUp);
|
|
@@ -3024,7 +3201,7 @@ class $e {
|
|
|
3024
3201
|
document.removeEventListener("keydown", this.boundKeyDown), document.removeEventListener("keyup", this.boundKeyUp);
|
|
3025
3202
|
}
|
|
3026
3203
|
createContainers(t) {
|
|
3027
|
-
if (this.iconsContainer =
|
|
3204
|
+
if (this.iconsContainer = Ye(this.innerBox), this.canvas = Co(this.innerBox, t), this.loader = To(this.innerBox), this.ariaLiveRegion = Xo(this.innerBox), this.useMainThreadCanvas)
|
|
3028
3205
|
this.canvasWorker.postMessage({
|
|
3029
3206
|
action: "initCanvas",
|
|
3030
3207
|
offscreen: this.canvas,
|
|
@@ -3041,119 +3218,159 @@ class $e {
|
|
|
3041
3218
|
[i]
|
|
3042
3219
|
);
|
|
3043
3220
|
}
|
|
3044
|
-
|
|
3221
|
+
ue(this.innerBox, ".cloudimage-360-placeholder");
|
|
3045
3222
|
}
|
|
3046
3223
|
update(t) {
|
|
3047
|
-
this.isReady && (this.stopAutoplay(), this.zoomPan && (this.zoomPan.destroy(), this.zoomPan = null), this.gestureRecognizer && (this.gestureRecognizer.destroy(), this.gestureRecognizer = null), this.zoomControlsUI && (this.zoomControlsUI.destroy(), this.zoomControlsUI = null), this.scrollHintUI && (this.scrollHintUI.destroy(), this.scrollHintUI = null), this.isZoomed = !1, this.highResLoaded = !1,
|
|
3224
|
+
this.isReady && (this.stopAutoplay(), this.zoomPan && (this.zoomPan.destroy(), this.zoomPan = null), this.gestureRecognizer && (this.gestureRecognizer.destroy(), this.gestureRecognizer = null), this.zoomControlsUI && (this.zoomControlsUI.destroy(), this.zoomControlsUI = null), this.scrollHintUI && (this.scrollHintUI.destroy(), this.scrollHintUI = null), this.isZoomed = !1, this.highResLoaded = !1, this.hotspotsInstance && (this.hotspotsInstance.destroy(), this.hotspotsInstance = 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.hintsOverlay && this.hintsOverlay.parentNode && (this.hintsOverlay.parentNode.removeChild(this.hintsOverlay), this.hintsOverlay = null), this.hintsHidden = !1, ue(this.innerBox, ".cloudimage-360-icons-container"), this.init(this.container, t, !0), this.iconsContainer = Ye(this.innerBox), this.onAllImagesLoaded());
|
|
3048
3225
|
}
|
|
3049
3226
|
init(t, i, o) {
|
|
3050
|
-
const s = i ?
|
|
3227
|
+
const s = i ? lo(i) : ro(t), {
|
|
3051
3228
|
folder: n,
|
|
3052
3229
|
apiVersion: r,
|
|
3053
3230
|
filenameX: a,
|
|
3054
3231
|
filenameY: l,
|
|
3055
|
-
|
|
3056
|
-
|
|
3057
|
-
|
|
3058
|
-
|
|
3059
|
-
|
|
3060
|
-
|
|
3061
|
-
|
|
3062
|
-
|
|
3063
|
-
|
|
3064
|
-
|
|
3065
|
-
|
|
3066
|
-
|
|
3067
|
-
|
|
3068
|
-
|
|
3069
|
-
|
|
3070
|
-
|
|
3071
|
-
|
|
3072
|
-
|
|
3073
|
-
|
|
3074
|
-
|
|
3075
|
-
|
|
3076
|
-
|
|
3077
|
-
|
|
3078
|
-
|
|
3079
|
-
|
|
3080
|
-
|
|
3081
|
-
|
|
3082
|
-
|
|
3083
|
-
|
|
3084
|
-
|
|
3085
|
-
|
|
3086
|
-
|
|
3087
|
-
|
|
3088
|
-
|
|
3089
|
-
|
|
3090
|
-
|
|
3091
|
-
|
|
3092
|
-
|
|
3093
|
-
|
|
3094
|
-
|
|
3095
|
-
|
|
3096
|
-
|
|
3097
|
-
|
|
3098
|
-
|
|
3099
|
-
|
|
3100
|
-
|
|
3101
|
-
|
|
3232
|
+
filenameGrid: c,
|
|
3233
|
+
imageListX: h,
|
|
3234
|
+
imageListY: u,
|
|
3235
|
+
imageListGrid: m,
|
|
3236
|
+
indexZeroBase: p,
|
|
3237
|
+
amountX: C,
|
|
3238
|
+
amountY: v,
|
|
3239
|
+
draggable: b = !0,
|
|
3240
|
+
swipeable: x = !0,
|
|
3241
|
+
keys: P,
|
|
3242
|
+
keysReverse: w,
|
|
3243
|
+
bottomCircleOffset: g,
|
|
3244
|
+
autoplay: E,
|
|
3245
|
+
autoplayBehavior: f,
|
|
3246
|
+
playOnce: y,
|
|
3247
|
+
speed: I,
|
|
3248
|
+
autoplayReverse: T,
|
|
3249
|
+
fullscreen: k,
|
|
3250
|
+
magnifier: X,
|
|
3251
|
+
pointerZoom: O,
|
|
3252
|
+
zoomMax: M,
|
|
3253
|
+
zoomStep: U,
|
|
3254
|
+
zoomControls: $,
|
|
3255
|
+
zoomControlsPosition: H,
|
|
3256
|
+
scrollHint: Z,
|
|
3257
|
+
ciToken: ct,
|
|
3258
|
+
ciFilters: K,
|
|
3259
|
+
ciTransformation: dt,
|
|
3260
|
+
lazyload: ut,
|
|
3261
|
+
dragSpeed: st,
|
|
3262
|
+
stopAtEdges: et,
|
|
3263
|
+
stopAtEdgesX: it,
|
|
3264
|
+
stopAtEdgesY: W,
|
|
3265
|
+
imageInfo: nt = "black",
|
|
3266
|
+
initialIconShown: pt,
|
|
3267
|
+
bottomCircle: q,
|
|
3268
|
+
hotspots: wt,
|
|
3269
|
+
hotspotTrigger: te = "hover",
|
|
3270
|
+
dragReverse: Ct,
|
|
3271
|
+
hide360Logo: ee,
|
|
3272
|
+
logoSrc: Ot,
|
|
3273
|
+
inertia: ie,
|
|
3274
|
+
pinchZoom: oe,
|
|
3275
|
+
hints: Ht,
|
|
3276
|
+
theme: It,
|
|
3277
|
+
markerTheme: Rt,
|
|
3278
|
+
brandColor: zt,
|
|
3279
|
+
hotspotTimelineOnClick: J = !0,
|
|
3280
|
+
aspectRatio: mt,
|
|
3281
|
+
cropAspectRatio: Zt,
|
|
3282
|
+
cropGravity: Dt,
|
|
3102
3283
|
// Event callbacks
|
|
3103
|
-
onReady:
|
|
3104
|
-
onLoad:
|
|
3105
|
-
onSpin:
|
|
3106
|
-
onAutoplayStart:
|
|
3107
|
-
onAutoplayStop:
|
|
3108
|
-
onFullscreenOpen:
|
|
3109
|
-
onFullscreenClose:
|
|
3110
|
-
onZoomIn:
|
|
3111
|
-
onZoomOut:
|
|
3112
|
-
onDragStart:
|
|
3113
|
-
onDragEnd:
|
|
3114
|
-
onHotspotOpen:
|
|
3115
|
-
onHotspotClose:
|
|
3116
|
-
onProductClick:
|
|
3117
|
-
onNavigate:
|
|
3118
|
-
onError:
|
|
3119
|
-
} = s,
|
|
3120
|
-
|
|
3284
|
+
onReady: xt,
|
|
3285
|
+
onLoad: Bt,
|
|
3286
|
+
onSpin: Gt,
|
|
3287
|
+
onAutoplayStart: _t,
|
|
3288
|
+
onAutoplayStop: Ft,
|
|
3289
|
+
onFullscreenOpen: gi,
|
|
3290
|
+
onFullscreenClose: vi,
|
|
3291
|
+
onZoomIn: yi,
|
|
3292
|
+
onZoomOut: bi,
|
|
3293
|
+
onDragStart: wi,
|
|
3294
|
+
onDragEnd: Ci,
|
|
3295
|
+
onHotspotOpen: Ii,
|
|
3296
|
+
onHotspotClose: xi,
|
|
3297
|
+
onProductClick: Pi,
|
|
3298
|
+
onNavigate: Ei,
|
|
3299
|
+
onError: Ti
|
|
3300
|
+
} = s, se = { ciToken: ct, ciFilters: K, ciTransformation: dt, cropAspectRatio: Zt, cropGravity: Dt }, ne = Ut(h, []), re = Ut(u, []);
|
|
3301
|
+
let rt = Ut(m, []);
|
|
3302
|
+
rt.length && Array.isArray(rt[0]) && (rt = rt.flat()), this.isGridMode = !!(c || rt.length);
|
|
3303
|
+
const Ai = s.zoomMax === 5 && O > 1 ? Math.min(O, 5) : M || 5;
|
|
3304
|
+
if (this.viewerConfig = s, this.amountX = ne.length || C, this.amountY = re.length || v, this.allowSpinX = !!this.amountX, this.allowSpinY = !!this.amountY, this.isGridMode && (this.allowSpinX = !0, this.allowSpinY = !0), this.orientation = this.allowSpinX ? L.X : L.Y, this.activeImageX = T ? this.amountX - 1 : 0, this.activeImageY = T ? this.amountY - 1 : 0, this.bottomCircleOffset = g, this.autoplay = E, this.autoplayBehavior = f, this.playOnce = y, this.speed = I, this.autoplayReverse = T, this.fullscreen = k, this.zoomMax = Ai, this.zoomStep = U || 0.5, this.zoomControls = $ ?? !0, this.zoomControlsPosition = H || "bottom-left", this.scrollHint = Z ?? !0, this.dragSpeed = Math.max(st, so), this.stopAtEdges = et, this.stopAtEdgesX = it ?? et, this.stopAtEdgesY = W ?? et, this.ciParams = se, this.apiVersion = r, this.keysReverse = w, this.info = nt, this.keys = P, this.innerBox = this.innerBox ?? Eo(this.container), this.container.style.aspectRatio = mt || "", this.initialIconShown = pt, this.bottomCircle = q, this.spinDirection = Jo(this.autoplayBehavior, this.allowSpinX, this.allowSpinY), this.dragReverse = Ct, this.hotspots = wt, this.hotspotTrigger = te, this.onHotspotOpen = Ii, this.onHotspotClose = xi, this.onProductClick = Pi, this.onNavigate = Ei, this.hide360Logo = ee, this.logoSrc = Ot, this.inertia = ie, this.pinchZoom = oe, this.hints = Ht, this.hotspotTimelineOnClick = J, It === "dark" ? this.container.classList.add("ci360-theme-dark") : It === "light" && this.container.classList.remove("ci360-theme-dark"), this.container.classList.remove("ci360-hotspot-marker-inverted", "ci360-hotspot-marker-brand"), Rt === "inverted" ? this.container.classList.add("ci360-hotspot-marker-inverted") : Rt === "brand" && (this.container.classList.add("ci360-hotspot-marker-brand"), zt && this.container.style.setProperty("--ci360-hotspot-brand-color", zt)), this.onReady = xt, this.onLoad = Bt, this.onSpin = Gt, this.onAutoplayStart = _t, this.onAutoplayStop = Ft, this.onFullscreenOpen = gi, this.onFullscreenClose = vi, this.onZoomIn = yi, this.onZoomOut = bi, this.onDragStart = wi, this.onDragEnd = Ci, this.onError = Ti, this.srcXConfig = {
|
|
3121
3305
|
folder: n,
|
|
3122
3306
|
filename: a,
|
|
3123
|
-
imageList:
|
|
3307
|
+
imageList: ne,
|
|
3124
3308
|
container: t,
|
|
3125
3309
|
innerBox: this.innerBox,
|
|
3126
3310
|
apiVersion: r,
|
|
3127
|
-
ciParams:
|
|
3128
|
-
lazyload:
|
|
3311
|
+
ciParams: se,
|
|
3312
|
+
lazyload: ut,
|
|
3129
3313
|
amount: this.amountX,
|
|
3130
|
-
indexZeroBase:
|
|
3131
|
-
autoplayReverse:
|
|
3314
|
+
indexZeroBase: p,
|
|
3315
|
+
autoplayReverse: T,
|
|
3132
3316
|
orientation: L.X
|
|
3133
3317
|
}, this.srcYConfig = {
|
|
3134
3318
|
...this.srcXConfig,
|
|
3135
3319
|
filename: l,
|
|
3136
|
-
imageList:
|
|
3320
|
+
imageList: re,
|
|
3137
3321
|
orientation: L.Y,
|
|
3138
3322
|
amount: this.amountY
|
|
3139
|
-
},
|
|
3140
|
-
|
|
3141
|
-
|
|
3142
|
-
|
|
3143
|
-
|
|
3144
|
-
|
|
3145
|
-
|
|
3146
|
-
|
|
3147
|
-
|
|
3148
|
-
|
|
3149
|
-
|
|
3150
|
-
|
|
3151
|
-
|
|
3152
|
-
|
|
3323
|
+
}, this.srcGridConfig = {
|
|
3324
|
+
folder: n,
|
|
3325
|
+
filename: c,
|
|
3326
|
+
imageList: rt,
|
|
3327
|
+
container: t,
|
|
3328
|
+
innerBox: this.innerBox,
|
|
3329
|
+
apiVersion: r,
|
|
3330
|
+
ciParams: se,
|
|
3331
|
+
lazyload: ut,
|
|
3332
|
+
amount: this.amountX * this.amountY,
|
|
3333
|
+
amountX: this.amountX,
|
|
3334
|
+
amountY: this.amountY,
|
|
3335
|
+
indexZeroBase: p,
|
|
3336
|
+
autoplayReverse: T
|
|
3337
|
+
}, o && this.removeEvents(), this.attachEvents(b, x, P), o) return;
|
|
3338
|
+
const ae = this.container.offsetWidth;
|
|
3339
|
+
if (this.isGridMode) {
|
|
3340
|
+
const Pt = rt.length ? null : at(this.srcGridConfig, ae), Nt = (Wt) => {
|
|
3341
|
+
Se({
|
|
3342
|
+
cdnPath: Pt,
|
|
3343
|
+
config: this.srcGridConfig,
|
|
3344
|
+
onImageLoad: (Q, B) => {
|
|
3345
|
+
this.pushImageToSet(Q, B, "grid"), this.updatePercentageInLoader(this.calculatePercentage());
|
|
3346
|
+
},
|
|
3347
|
+
onFirstImageLoad: (Q) => this.onFirstImageLoaded(Wt, Q),
|
|
3348
|
+
onAllImagesLoad: (Q, B) => {
|
|
3349
|
+
this.imagesGrid = Q, B && B.errorCount > 0 && this.emit("onError", { errorCount: B.errorCount, errors: B.errors, totalImages: this.amountX * this.amountY }), this.onAllImagesLoaded();
|
|
3350
|
+
},
|
|
3351
|
+
onError: (Q) => this.emit("onError", Q)
|
|
3352
|
+
});
|
|
3353
|
+
};
|
|
3354
|
+
he(Pt, this.srcGridConfig, Nt);
|
|
3355
|
+
} else {
|
|
3356
|
+
const Pt = this.allowSpinX && !ne.length ? at(this.srcXConfig, ae) : null, Nt = this.allowSpinY && !re.length ? at(this.srcYConfig, ae) : null, Wt = (Q) => {
|
|
3357
|
+
Xe({
|
|
3358
|
+
cdnPathX: Pt,
|
|
3359
|
+
cdnPathY: Nt,
|
|
3360
|
+
configX: this.srcXConfig,
|
|
3361
|
+
configY: this.srcYConfig,
|
|
3362
|
+
onImageLoad: (B, ki, Xi) => this.onImageLoad(B, ki, Xi),
|
|
3363
|
+
onFirstImageLoad: (B) => this.onFirstImageLoaded(Q, B),
|
|
3364
|
+
onAllImagesLoad: this.onAllImagesLoaded.bind(this),
|
|
3365
|
+
onError: (B) => this.emit("onError", B)
|
|
3366
|
+
});
|
|
3367
|
+
};
|
|
3368
|
+
this.allowSpinX ? he(Pt, this.srcXConfig, Wt) : this.allowSpinY && he(Nt, this.srcYConfig, Wt);
|
|
3369
|
+
}
|
|
3153
3370
|
}
|
|
3154
3371
|
}
|
|
3155
|
-
const
|
|
3156
|
-
class
|
|
3372
|
+
const ei = typeof navigator < "u" && /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);
|
|
3373
|
+
class Rn {
|
|
3157
3374
|
constructor() {
|
|
3158
3375
|
this.views = /* @__PURE__ */ new Map(), this.initAll = this.initAll.bind(this), this.getViews = this.getViews.bind(this), this.memoryObserver = null, this.memoryManagementAutoEnabled = !1;
|
|
3159
3376
|
}
|
|
@@ -3164,16 +3381,16 @@ class An {
|
|
|
3164
3381
|
if (!t) return;
|
|
3165
3382
|
const o = t.id || this.generateId();
|
|
3166
3383
|
t.id || (t.id = o);
|
|
3167
|
-
const s = new
|
|
3168
|
-
return this.views.set(o, s),
|
|
3384
|
+
const s = new ti(t, i);
|
|
3385
|
+
return this.views.set(o, s), ei && !this.memoryManagementAutoEnabled && (this.memoryManagementAutoEnabled = !0, setTimeout(() => this.enableMemoryManagement(), 100)), s;
|
|
3169
3386
|
}
|
|
3170
3387
|
initAll(t = "cloudimage-360") {
|
|
3171
3388
|
[...document.querySelectorAll(`.${t}`)].filter(Boolean).forEach((o) => {
|
|
3172
3389
|
const s = o.id || this.generateId();
|
|
3173
3390
|
o.id || (o.id = s);
|
|
3174
|
-
const n = new
|
|
3391
|
+
const n = new ti(o);
|
|
3175
3392
|
this.views.set(s, n);
|
|
3176
|
-
}),
|
|
3393
|
+
}), ei && !this.memoryManagementAutoEnabled && this.views.size > 0 && (this.memoryManagementAutoEnabled = !0, setTimeout(() => this.enableMemoryManagement(), 100));
|
|
3177
3394
|
}
|
|
3178
3395
|
destroy(t) {
|
|
3179
3396
|
const i = this.getViewById(t);
|
|
@@ -3242,6 +3459,6 @@ class An {
|
|
|
3242
3459
|
}
|
|
3243
3460
|
}
|
|
3244
3461
|
export {
|
|
3245
|
-
|
|
3462
|
+
Rn as default
|
|
3246
3463
|
};
|
|
3247
|
-
//# sourceMappingURL=ci360-
|
|
3464
|
+
//# sourceMappingURL=ci360-BFobl9uu.mjs.map
|