@flyfish-group/file-viewer 1.0.3 → 1.0.6
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/LICENSE +160 -0
- package/README.md +152 -67
- package/dist/components/CadViewer.js +1 -0
- package/dist/components/CodeViewer.js +1 -0
- package/dist/components/ImageViewer.js +1 -1936
- package/dist/components/MarkdownViewer.js +1 -1478
- package/dist/components/OfdViewer.js +1 -0
- package/dist/components/PdfView.js +1 -22627
- package/dist/components/PptxRender.js +1 -21757
- package/dist/components/XlsxTable.js +1 -54411
- package/dist/components/_commonjsHelpers.js +1 -30
- package/dist/components/docx-preview.js +7 -5622
- package/dist/components/index.js +1 -1877
- package/dist/components/index2.js +1 -0
- package/dist/components/jszip.min.js +1 -0
- package/dist/components/ofd.js +1 -0
- package/dist/components/worker-ref.js +1 -21
- package/dist/index.d.ts +45 -0
- package/dist/index.mjs +1 -6
- package/dist/index.umd.js +7 -260
- package/dist/package/index.d.ts +6 -2
- package/dist/style.css +15 -46
- package/dist/worker/pdf.worker.js +1 -58
- package/dist/worker/pptx.worker.js +1 -21
- package/dist/worker/sheet.worker.js +1 -38
- package/package.json +73 -43
- package/dist/components/_commonjs-dynamic-modules.js +0 -6
- package/dist/components/utils.d.ts +0 -3
- package/dist/main.d.ts +0 -0
- package/dist/package/common/type.d.ts +0 -30
- package/dist/package/common/util.d.ts +0 -5
- package/dist/package/common/worker-ref.d.ts +0 -12
- package/dist/package/components/FileViewer/FileViewer.vue.d.ts +0 -18
- package/dist/package/components/FileViewer/index.d.ts +0 -2
- package/dist/package/components/FileViewer/util.d.ts +0 -2
- package/dist/package/use/index.d.ts +0 -1
- package/dist/package/use/worker.d.ts +0 -24
- package/dist/package/vendors/docx/index.d.ts +0 -4
- package/dist/package/vendors/image/ImageViewer.vue.d.ts +0 -15
- package/dist/package/vendors/image/index.d.ts +0 -5
- package/dist/package/vendors/md/MarkdownViewer.vue.d.ts +0 -15
- package/dist/package/vendors/md/index.d.ts +0 -5
- package/dist/package/vendors/mp4/index.d.ts +0 -4
- package/dist/package/vendors/pdf/PdfView.vue.d.ts +0 -15
- package/dist/package/vendors/pdf/index.d.ts +0 -2
- package/dist/package/vendors/pdf/worker/index.d.ts +0 -4
- package/dist/package/vendors/pptx/PptxRender.vue.d.ts +0 -87
- package/dist/package/vendors/pptx/index.d.ts +0 -7
- package/dist/package/vendors/pptx/options.d.ts +0 -39
- package/dist/package/vendors/pptx/support/chart.d.ts +0 -4
- package/dist/package/vendors/pptx/worker/index.d.ts +0 -4
- package/dist/package/vendors/renders.d.ts +0 -3
- package/dist/package/vendors/text/CodeViewer.vue.d.ts +0 -15
- package/dist/package/vendors/text/index.d.ts +0 -7
- package/dist/package/vendors/xlsx/XlsxTable.vue.d.ts +0 -17
- package/dist/package/vendors/xlsx/index.d.ts +0 -5
- package/dist/package/vendors/xlsx/render.d.ts +0 -6
- package/dist/package/vendors/xlsx/util.d.ts +0 -8
- package/dist/package/vendors/xlsx/worker/index.d.ts +0 -6
- package/dist/package/vendors/xlsx/worker/xls/SheetJsModel.d.ts +0 -36
- package/dist/package/vendors/xlsx/worker/xls/index.d.ts +0 -4
- package/dist/package/vendors/xlsx/worker/xls/sheet.worker.d.ts +0 -1
- package/dist/package/vendors/xlsx/worker/xlsx/ExcelJsModel.d.ts +0 -39
- package/dist/package/vendors/xlsx/worker/xlsx/color.d.ts +0 -2
- package/dist/package/vendors/xlsx/worker/xlsx/context.d.ts +0 -7
- package/dist/package/vendors/xlsx/worker/xlsx/index.d.ts +0 -4
- package/dist/package/vendors/xlsx/worker/xlsx/util.d.ts +0 -10
- package/dist/package/vendors/xlsx/worker/xlsx/xlsx.worker.d.ts +0 -2
- package/dist/vite.svg +0 -1
- package/dist/worker/xlsx.worker.js +0 -62
|
@@ -1,1936 +1 @@
|
|
|
1
|
-
import { defineComponent as ke, computed as je } from "vue";
|
|
2
|
-
import { n as $e } from "./index.js";
|
|
3
|
-
/*!
|
|
4
|
-
* Viewer.js v1.11.6
|
|
5
|
-
* https://fengyuanchen.github.io/viewerjs
|
|
6
|
-
*
|
|
7
|
-
* Copyright 2015-present Chen Fengyuan
|
|
8
|
-
* Released under the MIT license
|
|
9
|
-
*
|
|
10
|
-
* Date: 2023-09-17T03:16:38.052Z
|
|
11
|
-
*/
|
|
12
|
-
function Vt(e, t) {
|
|
13
|
-
var i = Object.keys(e);
|
|
14
|
-
if (Object.getOwnPropertySymbols) {
|
|
15
|
-
var r = Object.getOwnPropertySymbols(e);
|
|
16
|
-
t && (r = r.filter(function(n) {
|
|
17
|
-
return Object.getOwnPropertyDescriptor(e, n).enumerable;
|
|
18
|
-
})), i.push.apply(i, r);
|
|
19
|
-
}
|
|
20
|
-
return i;
|
|
21
|
-
}
|
|
22
|
-
function At(e) {
|
|
23
|
-
for (var t = 1; t < arguments.length; t++) {
|
|
24
|
-
var i = arguments[t] != null ? arguments[t] : {};
|
|
25
|
-
t % 2 ? Vt(Object(i), !0).forEach(function(r) {
|
|
26
|
-
Ye(e, r, i[r]);
|
|
27
|
-
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(i)) : Vt(Object(i)).forEach(function(r) {
|
|
28
|
-
Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(i, r));
|
|
29
|
-
});
|
|
30
|
-
}
|
|
31
|
-
return e;
|
|
32
|
-
}
|
|
33
|
-
function Tt(e) {
|
|
34
|
-
"@babel/helpers - typeof";
|
|
35
|
-
return Tt = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(t) {
|
|
36
|
-
return typeof t;
|
|
37
|
-
} : function(t) {
|
|
38
|
-
return t && typeof Symbol == "function" && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t;
|
|
39
|
-
}, Tt(e);
|
|
40
|
-
}
|
|
41
|
-
function Fe(e, t) {
|
|
42
|
-
if (!(e instanceof t))
|
|
43
|
-
throw new TypeError("Cannot call a class as a function");
|
|
44
|
-
}
|
|
45
|
-
function Rt(e, t) {
|
|
46
|
-
for (var i = 0; i < t.length; i++) {
|
|
47
|
-
var r = t[i];
|
|
48
|
-
r.enumerable = r.enumerable || !1, r.configurable = !0, "value" in r && (r.writable = !0), Object.defineProperty(e, ye(r.key), r);
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
function Me(e, t, i) {
|
|
52
|
-
return t && Rt(e.prototype, t), i && Rt(e, i), Object.defineProperty(e, "prototype", {
|
|
53
|
-
writable: !1
|
|
54
|
-
}), e;
|
|
55
|
-
}
|
|
56
|
-
function Ye(e, t, i) {
|
|
57
|
-
return t = ye(t), t in e ? Object.defineProperty(e, t, {
|
|
58
|
-
value: i,
|
|
59
|
-
enumerable: !0,
|
|
60
|
-
configurable: !0,
|
|
61
|
-
writable: !0
|
|
62
|
-
}) : e[t] = i, e;
|
|
63
|
-
}
|
|
64
|
-
function We(e, t) {
|
|
65
|
-
if (typeof e != "object" || e === null)
|
|
66
|
-
return e;
|
|
67
|
-
var i = e[Symbol.toPrimitive];
|
|
68
|
-
if (i !== void 0) {
|
|
69
|
-
var r = i.call(e, t || "default");
|
|
70
|
-
if (typeof r != "object")
|
|
71
|
-
return r;
|
|
72
|
-
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
73
|
-
}
|
|
74
|
-
return (t === "string" ? String : Number)(e);
|
|
75
|
-
}
|
|
76
|
-
function ye(e) {
|
|
77
|
-
var t = We(e, "string");
|
|
78
|
-
return typeof t == "symbol" ? t : String(t);
|
|
79
|
-
}
|
|
80
|
-
var kt = {
|
|
81
|
-
/**
|
|
82
|
-
* Enable a modal backdrop, specify `static` for a backdrop
|
|
83
|
-
* which doesn't close the modal on click.
|
|
84
|
-
* @type {boolean}
|
|
85
|
-
*/
|
|
86
|
-
backdrop: !0,
|
|
87
|
-
/**
|
|
88
|
-
* Show the button on the top-right of the viewer.
|
|
89
|
-
* @type {boolean}
|
|
90
|
-
*/
|
|
91
|
-
button: !0,
|
|
92
|
-
/**
|
|
93
|
-
* Show the navbar.
|
|
94
|
-
* @type {boolean | number}
|
|
95
|
-
*/
|
|
96
|
-
navbar: !0,
|
|
97
|
-
/**
|
|
98
|
-
* Specify the visibility and the content of the title.
|
|
99
|
-
* @type {boolean | number | Function | Array}
|
|
100
|
-
*/
|
|
101
|
-
title: !0,
|
|
102
|
-
/**
|
|
103
|
-
* Show the toolbar.
|
|
104
|
-
* @type {boolean | number | Object}
|
|
105
|
-
*/
|
|
106
|
-
toolbar: !0,
|
|
107
|
-
/**
|
|
108
|
-
* Custom class name(s) to add to the viewer's root element.
|
|
109
|
-
* @type {string}
|
|
110
|
-
*/
|
|
111
|
-
className: "",
|
|
112
|
-
/**
|
|
113
|
-
* Define where to put the viewer in modal mode.
|
|
114
|
-
* @type {string | Element}
|
|
115
|
-
*/
|
|
116
|
-
container: "body",
|
|
117
|
-
/**
|
|
118
|
-
* Filter the images for viewing. Return true if the image is viewable.
|
|
119
|
-
* @type {Function}
|
|
120
|
-
*/
|
|
121
|
-
filter: null,
|
|
122
|
-
/**
|
|
123
|
-
* Enable to request fullscreen when play.
|
|
124
|
-
* {@link https://developer.mozilla.org/en-US/docs/Web/API/FullscreenOptions}
|
|
125
|
-
* @type {boolean|FullscreenOptions}
|
|
126
|
-
*/
|
|
127
|
-
fullscreen: !0,
|
|
128
|
-
/**
|
|
129
|
-
* Define the extra attributes to inherit from the original image.
|
|
130
|
-
* @type {Array}
|
|
131
|
-
*/
|
|
132
|
-
inheritedAttributes: ["crossOrigin", "decoding", "isMap", "loading", "referrerPolicy", "sizes", "srcset", "useMap"],
|
|
133
|
-
/**
|
|
134
|
-
* Define the initial coverage of the viewing image.
|
|
135
|
-
* @type {number}
|
|
136
|
-
*/
|
|
137
|
-
initialCoverage: 0.9,
|
|
138
|
-
/**
|
|
139
|
-
* Define the initial index of the image for viewing.
|
|
140
|
-
* @type {number}
|
|
141
|
-
*/
|
|
142
|
-
initialViewIndex: 0,
|
|
143
|
-
/**
|
|
144
|
-
* Enable inline mode.
|
|
145
|
-
* @type {boolean}
|
|
146
|
-
*/
|
|
147
|
-
inline: !1,
|
|
148
|
-
/**
|
|
149
|
-
* The amount of time to delay between automatically cycling an image when playing.
|
|
150
|
-
* @type {number}
|
|
151
|
-
*/
|
|
152
|
-
interval: 5e3,
|
|
153
|
-
/**
|
|
154
|
-
* Enable keyboard support.
|
|
155
|
-
* @type {boolean}
|
|
156
|
-
*/
|
|
157
|
-
keyboard: !0,
|
|
158
|
-
/**
|
|
159
|
-
* Focus the viewer when initialized.
|
|
160
|
-
* @type {boolean}
|
|
161
|
-
*/
|
|
162
|
-
focus: !0,
|
|
163
|
-
/**
|
|
164
|
-
* Indicate if show a loading spinner when load image or not.
|
|
165
|
-
* @type {boolean}
|
|
166
|
-
*/
|
|
167
|
-
loading: !0,
|
|
168
|
-
/**
|
|
169
|
-
* Indicate if enable loop viewing or not.
|
|
170
|
-
* @type {boolean}
|
|
171
|
-
*/
|
|
172
|
-
loop: !0,
|
|
173
|
-
/**
|
|
174
|
-
* Min width of the viewer in inline mode.
|
|
175
|
-
* @type {number}
|
|
176
|
-
*/
|
|
177
|
-
minWidth: 200,
|
|
178
|
-
/**
|
|
179
|
-
* Min height of the viewer in inline mode.
|
|
180
|
-
* @type {number}
|
|
181
|
-
*/
|
|
182
|
-
minHeight: 100,
|
|
183
|
-
/**
|
|
184
|
-
* Enable to move the image.
|
|
185
|
-
* @type {boolean}
|
|
186
|
-
*/
|
|
187
|
-
movable: !0,
|
|
188
|
-
/**
|
|
189
|
-
* Enable to rotate the image.
|
|
190
|
-
* @type {boolean}
|
|
191
|
-
*/
|
|
192
|
-
rotatable: !0,
|
|
193
|
-
/**
|
|
194
|
-
* Enable to scale the image.
|
|
195
|
-
* @type {boolean}
|
|
196
|
-
*/
|
|
197
|
-
scalable: !0,
|
|
198
|
-
/**
|
|
199
|
-
* Enable to zoom the image.
|
|
200
|
-
* @type {boolean}
|
|
201
|
-
*/
|
|
202
|
-
zoomable: !0,
|
|
203
|
-
/**
|
|
204
|
-
* Enable to zoom the current image by dragging on the touch screen.
|
|
205
|
-
* @type {boolean}
|
|
206
|
-
*/
|
|
207
|
-
zoomOnTouch: !0,
|
|
208
|
-
/**
|
|
209
|
-
* Enable to zoom the image by wheeling mouse.
|
|
210
|
-
* @type {boolean}
|
|
211
|
-
*/
|
|
212
|
-
zoomOnWheel: !0,
|
|
213
|
-
/**
|
|
214
|
-
* Enable to slide to the next or previous image by swiping on the touch screen.
|
|
215
|
-
* @type {boolean}
|
|
216
|
-
*/
|
|
217
|
-
slideOnTouch: !0,
|
|
218
|
-
/**
|
|
219
|
-
* Indicate if toggle the image size between its natural size
|
|
220
|
-
* and initial size when double click on the image or not.
|
|
221
|
-
* @type {boolean}
|
|
222
|
-
*/
|
|
223
|
-
toggleOnDblclick: !0,
|
|
224
|
-
/**
|
|
225
|
-
* Show the tooltip with image ratio (percentage) when zoom in or zoom out.
|
|
226
|
-
* @type {boolean}
|
|
227
|
-
*/
|
|
228
|
-
tooltip: !0,
|
|
229
|
-
/**
|
|
230
|
-
* Enable CSS3 Transition for some special elements.
|
|
231
|
-
* @type {boolean}
|
|
232
|
-
*/
|
|
233
|
-
transition: !0,
|
|
234
|
-
/**
|
|
235
|
-
* Define the CSS `z-index` value of viewer in modal mode.
|
|
236
|
-
* @type {number}
|
|
237
|
-
*/
|
|
238
|
-
zIndex: 2015,
|
|
239
|
-
/**
|
|
240
|
-
* Define the CSS `z-index` value of viewer in inline mode.
|
|
241
|
-
* @type {number}
|
|
242
|
-
*/
|
|
243
|
-
zIndexInline: 0,
|
|
244
|
-
/**
|
|
245
|
-
* Define the ratio when zoom the image by wheeling mouse.
|
|
246
|
-
* @type {number}
|
|
247
|
-
*/
|
|
248
|
-
zoomRatio: 0.1,
|
|
249
|
-
/**
|
|
250
|
-
* Define the min ratio of the image when zoom out.
|
|
251
|
-
* @type {number}
|
|
252
|
-
*/
|
|
253
|
-
minZoomRatio: 0.01,
|
|
254
|
-
/**
|
|
255
|
-
* Define the max ratio of the image when zoom in.
|
|
256
|
-
* @type {number}
|
|
257
|
-
*/
|
|
258
|
-
maxZoomRatio: 100,
|
|
259
|
-
/**
|
|
260
|
-
* Define where to get the original image URL for viewing.
|
|
261
|
-
* @type {string | Function}
|
|
262
|
-
*/
|
|
263
|
-
url: "src",
|
|
264
|
-
/**
|
|
265
|
-
* Event shortcuts.
|
|
266
|
-
* @type {Function}
|
|
267
|
-
*/
|
|
268
|
-
ready: null,
|
|
269
|
-
show: null,
|
|
270
|
-
shown: null,
|
|
271
|
-
hide: null,
|
|
272
|
-
hidden: null,
|
|
273
|
-
view: null,
|
|
274
|
-
viewed: null,
|
|
275
|
-
move: null,
|
|
276
|
-
moved: null,
|
|
277
|
-
rotate: null,
|
|
278
|
-
rotated: null,
|
|
279
|
-
scale: null,
|
|
280
|
-
scaled: null,
|
|
281
|
-
zoom: null,
|
|
282
|
-
zoomed: null,
|
|
283
|
-
play: null,
|
|
284
|
-
stop: null
|
|
285
|
-
}, Xe = '<div class="viewer-container" tabindex="-1" touch-action="none"><div class="viewer-canvas"></div><div class="viewer-footer"><div class="viewer-title"></div><div class="viewer-toolbar"></div><div class="viewer-navbar"><ul class="viewer-list" role="navigation"></ul></div></div><div class="viewer-tooltip" role="alert" aria-hidden="true"></div><div class="viewer-button" data-viewer-action="mix" role="button"></div><div class="viewer-player"></div></div>', bt = typeof window != "undefined" && typeof window.document != "undefined", $ = bt ? window : {}, G = bt && $.document.documentElement ? "ontouchstart" in $.document.documentElement : !1, xt = bt ? "PointerEvent" in $ : !1, g = "viewer", ft = "move", we = "switch", it = "zoom", lt = "".concat(g, "-active"), He = "".concat(g, "-close"), dt = "".concat(g, "-fade"), _t = "".concat(g, "-fixed"), qe = "".concat(g, "-fullscreen"), jt = "".concat(g, "-fullscreen-exit"), Y = "".concat(g, "-hide"), Ue = "".concat(g, "-hide-md-down"), Be = "".concat(g, "-hide-sm-down"), Ke = "".concat(g, "-hide-xs-down"), L = "".concat(g, "-in"), rt = "".concat(g, "-invisible"), Z = "".concat(g, "-loading"), Ge = "".concat(g, "-move"), $t = "".concat(g, "-open"), H = "".concat(g, "-show"), A = "".concat(g, "-transition"), J = "click", St = "dblclick", Ft = "dragstart", Mt = "focusin", Yt = "keydown", z = "load", W = "error", Ze = G ? "touchend touchcancel" : "mouseup", Je = G ? "touchmove" : "mousemove", Qe = G ? "touchstart" : "mousedown", Wt = xt ? "pointerdown" : Qe, Xt = xt ? "pointermove" : Je, Ht = xt ? "pointerup pointercancel" : Ze, qt = "resize", P = "transitionend", Ut = "wheel", Bt = "ready", Kt = "show", Gt = "shown", Zt = "hide", Jt = "hidden", Qt = "view", at = "viewed", te = "move", ee = "moved", ie = "rotate", re = "rotated", ne = "scale", ae = "scaled", se = "zoom", oe = "zoomed", le = "play", ue = "stop", gt = "".concat(g, "Action"), It = /\s\s*/, ut = ["zoom-in", "zoom-out", "one-to-one", "reset", "prev", "play", "next", "rotate-left", "rotate-right", "flip-horizontal", "flip-vertical"];
|
|
286
|
-
function st(e) {
|
|
287
|
-
return typeof e == "string";
|
|
288
|
-
}
|
|
289
|
-
var ti = Number.isNaN || $.isNaN;
|
|
290
|
-
function O(e) {
|
|
291
|
-
return typeof e == "number" && !ti(e);
|
|
292
|
-
}
|
|
293
|
-
function U(e) {
|
|
294
|
-
return typeof e == "undefined";
|
|
295
|
-
}
|
|
296
|
-
function Q(e) {
|
|
297
|
-
return Tt(e) === "object" && e !== null;
|
|
298
|
-
}
|
|
299
|
-
var ei = Object.prototype.hasOwnProperty;
|
|
300
|
-
function B(e) {
|
|
301
|
-
if (!Q(e))
|
|
302
|
-
return !1;
|
|
303
|
-
try {
|
|
304
|
-
var t = e.constructor, i = t.prototype;
|
|
305
|
-
return t && i && ei.call(i, "isPrototypeOf");
|
|
306
|
-
} catch (r) {
|
|
307
|
-
return !1;
|
|
308
|
-
}
|
|
309
|
-
}
|
|
310
|
-
function p(e) {
|
|
311
|
-
return typeof e == "function";
|
|
312
|
-
}
|
|
313
|
-
function y(e, t) {
|
|
314
|
-
if (e && p(t))
|
|
315
|
-
if (Array.isArray(e) || O(e.length)) {
|
|
316
|
-
var i = e.length, r;
|
|
317
|
-
for (r = 0; r < i && t.call(e, e[r], r, e) !== !1; r += 1)
|
|
318
|
-
;
|
|
319
|
-
} else
|
|
320
|
-
Q(e) && Object.keys(e).forEach(function(n) {
|
|
321
|
-
t.call(e, e[n], n, e);
|
|
322
|
-
});
|
|
323
|
-
return e;
|
|
324
|
-
}
|
|
325
|
-
var N = Object.assign || function(t) {
|
|
326
|
-
for (var i = arguments.length, r = new Array(i > 1 ? i - 1 : 0), n = 1; n < i; n++)
|
|
327
|
-
r[n - 1] = arguments[n];
|
|
328
|
-
return Q(t) && r.length > 0 && r.forEach(function(a) {
|
|
329
|
-
Q(a) && Object.keys(a).forEach(function(s) {
|
|
330
|
-
t[s] = a[s];
|
|
331
|
-
});
|
|
332
|
-
}), t;
|
|
333
|
-
}, ii = /^(?:width|height|left|top|marginLeft|marginTop)$/;
|
|
334
|
-
function V(e, t) {
|
|
335
|
-
var i = e.style;
|
|
336
|
-
y(t, function(r, n) {
|
|
337
|
-
ii.test(n) && O(r) && (r += "px"), i[n] = r;
|
|
338
|
-
});
|
|
339
|
-
}
|
|
340
|
-
function ri(e) {
|
|
341
|
-
return st(e) ? e.replace(/&(?!amp;|quot;|#39;|lt;|gt;)/g, "&").replace(/"/g, """).replace(/'/g, "'").replace(/</g, "<").replace(/>/g, ">") : e;
|
|
342
|
-
}
|
|
343
|
-
function q(e, t) {
|
|
344
|
-
return !e || !t ? !1 : e.classList ? e.classList.contains(t) : e.className.indexOf(t) > -1;
|
|
345
|
-
}
|
|
346
|
-
function f(e, t) {
|
|
347
|
-
if (!(!e || !t)) {
|
|
348
|
-
if (O(e.length)) {
|
|
349
|
-
y(e, function(r) {
|
|
350
|
-
f(r, t);
|
|
351
|
-
});
|
|
352
|
-
return;
|
|
353
|
-
}
|
|
354
|
-
if (e.classList) {
|
|
355
|
-
e.classList.add(t);
|
|
356
|
-
return;
|
|
357
|
-
}
|
|
358
|
-
var i = e.className.trim();
|
|
359
|
-
i ? i.indexOf(t) < 0 && (e.className = "".concat(i, " ").concat(t)) : e.className = t;
|
|
360
|
-
}
|
|
361
|
-
}
|
|
362
|
-
function m(e, t) {
|
|
363
|
-
if (!(!e || !t)) {
|
|
364
|
-
if (O(e.length)) {
|
|
365
|
-
y(e, function(i) {
|
|
366
|
-
m(i, t);
|
|
367
|
-
});
|
|
368
|
-
return;
|
|
369
|
-
}
|
|
370
|
-
if (e.classList) {
|
|
371
|
-
e.classList.remove(t);
|
|
372
|
-
return;
|
|
373
|
-
}
|
|
374
|
-
e.className.indexOf(t) >= 0 && (e.className = e.className.replace(t, ""));
|
|
375
|
-
}
|
|
376
|
-
}
|
|
377
|
-
function ot(e, t, i) {
|
|
378
|
-
if (t) {
|
|
379
|
-
if (O(e.length)) {
|
|
380
|
-
y(e, function(r) {
|
|
381
|
-
ot(r, t, i);
|
|
382
|
-
});
|
|
383
|
-
return;
|
|
384
|
-
}
|
|
385
|
-
i ? f(e, t) : m(e, t);
|
|
386
|
-
}
|
|
387
|
-
}
|
|
388
|
-
var ni = /([a-z\d])([A-Z])/g;
|
|
389
|
-
function Dt(e) {
|
|
390
|
-
return e.replace(ni, "$1-$2").toLowerCase();
|
|
391
|
-
}
|
|
392
|
-
function K(e, t) {
|
|
393
|
-
return Q(e[t]) ? e[t] : e.dataset ? e.dataset[t] : e.getAttribute("data-".concat(Dt(t)));
|
|
394
|
-
}
|
|
395
|
-
function Ot(e, t, i) {
|
|
396
|
-
Q(i) ? e[t] = i : e.dataset ? e.dataset[t] = i : e.setAttribute("data-".concat(Dt(t)), i);
|
|
397
|
-
}
|
|
398
|
-
var Ee = function() {
|
|
399
|
-
var e = !1;
|
|
400
|
-
if (bt) {
|
|
401
|
-
var t = !1, i = function() {
|
|
402
|
-
}, r = Object.defineProperty({}, "once", {
|
|
403
|
-
get: function() {
|
|
404
|
-
return e = !0, t;
|
|
405
|
-
},
|
|
406
|
-
/**
|
|
407
|
-
* This setter can fix a `TypeError` in strict mode
|
|
408
|
-
* {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Errors/Getter_only}
|
|
409
|
-
* @param {boolean} value - The value to set
|
|
410
|
-
*/
|
|
411
|
-
set: function(a) {
|
|
412
|
-
t = a;
|
|
413
|
-
}
|
|
414
|
-
});
|
|
415
|
-
$.addEventListener("test", i, r), $.removeEventListener("test", i, r);
|
|
416
|
-
}
|
|
417
|
-
return e;
|
|
418
|
-
}();
|
|
419
|
-
function b(e, t, i) {
|
|
420
|
-
var r = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : {}, n = i;
|
|
421
|
-
t.trim().split(It).forEach(function(a) {
|
|
422
|
-
if (!Ee) {
|
|
423
|
-
var s = e.listeners;
|
|
424
|
-
s && s[a] && s[a][i] && (n = s[a][i], delete s[a][i], Object.keys(s[a]).length === 0 && delete s[a], Object.keys(s).length === 0 && delete e.listeners);
|
|
425
|
-
}
|
|
426
|
-
e.removeEventListener(a, n, r);
|
|
427
|
-
});
|
|
428
|
-
}
|
|
429
|
-
function v(e, t, i) {
|
|
430
|
-
var r = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : {}, n = i;
|
|
431
|
-
t.trim().split(It).forEach(function(a) {
|
|
432
|
-
if (r.once && !Ee) {
|
|
433
|
-
var s = e.listeners, o = s === void 0 ? {} : s;
|
|
434
|
-
n = function() {
|
|
435
|
-
delete o[a][i], e.removeEventListener(a, n, r);
|
|
436
|
-
for (var l = arguments.length, h = new Array(l), c = 0; c < l; c++)
|
|
437
|
-
h[c] = arguments[c];
|
|
438
|
-
i.apply(e, h);
|
|
439
|
-
}, o[a] || (o[a] = {}), o[a][i] && e.removeEventListener(a, o[a][i], r), o[a][i] = n, e.listeners = o;
|
|
440
|
-
}
|
|
441
|
-
e.addEventListener(a, n, r);
|
|
442
|
-
});
|
|
443
|
-
}
|
|
444
|
-
function x(e, t, i, r) {
|
|
445
|
-
var n;
|
|
446
|
-
return p(Event) && p(CustomEvent) ? n = new CustomEvent(t, At({
|
|
447
|
-
bubbles: !0,
|
|
448
|
-
cancelable: !0,
|
|
449
|
-
detail: i
|
|
450
|
-
}, r)) : (n = document.createEvent("CustomEvent"), n.initCustomEvent(t, !0, !0, i)), e.dispatchEvent(n);
|
|
451
|
-
}
|
|
452
|
-
function ai(e) {
|
|
453
|
-
var t = e.getBoundingClientRect();
|
|
454
|
-
return {
|
|
455
|
-
left: t.left + (window.pageXOffset - document.documentElement.clientLeft),
|
|
456
|
-
top: t.top + (window.pageYOffset - document.documentElement.clientTop)
|
|
457
|
-
};
|
|
458
|
-
}
|
|
459
|
-
function vt(e) {
|
|
460
|
-
var t = e.rotate, i = e.scaleX, r = e.scaleY, n = e.translateX, a = e.translateY, s = [];
|
|
461
|
-
O(n) && n !== 0 && s.push("translateX(".concat(n, "px)")), O(a) && a !== 0 && s.push("translateY(".concat(a, "px)")), O(t) && t !== 0 && s.push("rotate(".concat(t, "deg)")), O(i) && i !== 1 && s.push("scaleX(".concat(i, ")")), O(r) && r !== 1 && s.push("scaleY(".concat(r, ")"));
|
|
462
|
-
var o = s.length ? s.join(" ") : "none";
|
|
463
|
-
return {
|
|
464
|
-
WebkitTransform: o,
|
|
465
|
-
msTransform: o,
|
|
466
|
-
transform: o
|
|
467
|
-
};
|
|
468
|
-
}
|
|
469
|
-
function si(e) {
|
|
470
|
-
return st(e) ? decodeURIComponent(e.replace(/^.*\//, "").replace(/[?&#].*$/, "")) : "";
|
|
471
|
-
}
|
|
472
|
-
var yt = $.navigator && /Version\/\d+(\.\d+)+?\s+Safari/i.test($.navigator.userAgent);
|
|
473
|
-
function Te(e, t, i) {
|
|
474
|
-
var r = document.createElement("img");
|
|
475
|
-
if (e.naturalWidth && !yt)
|
|
476
|
-
return i(e.naturalWidth, e.naturalHeight), r;
|
|
477
|
-
var n = document.body || document.documentElement;
|
|
478
|
-
return r.onload = function() {
|
|
479
|
-
i(r.width, r.height), yt || n.removeChild(r);
|
|
480
|
-
}, y(t.inheritedAttributes, function(a) {
|
|
481
|
-
var s = e.getAttribute(a);
|
|
482
|
-
s !== null && r.setAttribute(a, s);
|
|
483
|
-
}), r.src = e.src, yt || (r.style.cssText = "left:0;max-height:none!important;max-width:none!important;min-height:0!important;min-width:0!important;opacity:0;position:absolute;top:0;z-index:-1;", n.appendChild(r)), r;
|
|
484
|
-
}
|
|
485
|
-
function ht(e) {
|
|
486
|
-
switch (e) {
|
|
487
|
-
case 2:
|
|
488
|
-
return Ke;
|
|
489
|
-
case 3:
|
|
490
|
-
return Be;
|
|
491
|
-
case 4:
|
|
492
|
-
return Ue;
|
|
493
|
-
default:
|
|
494
|
-
return "";
|
|
495
|
-
}
|
|
496
|
-
}
|
|
497
|
-
function oi(e) {
|
|
498
|
-
var t = At({}, e), i = [];
|
|
499
|
-
return y(e, function(r, n) {
|
|
500
|
-
delete t[n], y(t, function(a) {
|
|
501
|
-
var s = Math.abs(r.startX - a.startX), o = Math.abs(r.startY - a.startY), u = Math.abs(r.endX - a.endX), l = Math.abs(r.endY - a.endY), h = Math.sqrt(s * s + o * o), c = Math.sqrt(u * u + l * l), d = (c - h) / h;
|
|
502
|
-
i.push(d);
|
|
503
|
-
});
|
|
504
|
-
}), i.sort(function(r, n) {
|
|
505
|
-
return Math.abs(r) < Math.abs(n);
|
|
506
|
-
}), i[0];
|
|
507
|
-
}
|
|
508
|
-
function ct(e, t) {
|
|
509
|
-
var i = e.pageX, r = e.pageY, n = {
|
|
510
|
-
endX: i,
|
|
511
|
-
endY: r
|
|
512
|
-
};
|
|
513
|
-
return t ? n : At({
|
|
514
|
-
timeStamp: Date.now(),
|
|
515
|
-
startX: i,
|
|
516
|
-
startY: r
|
|
517
|
-
}, n);
|
|
518
|
-
}
|
|
519
|
-
function li(e) {
|
|
520
|
-
var t = 0, i = 0, r = 0;
|
|
521
|
-
return y(e, function(n) {
|
|
522
|
-
var a = n.startX, s = n.startY;
|
|
523
|
-
t += a, i += s, r += 1;
|
|
524
|
-
}), t /= r, i /= r, {
|
|
525
|
-
pageX: t,
|
|
526
|
-
pageY: i
|
|
527
|
-
};
|
|
528
|
-
}
|
|
529
|
-
var ui = {
|
|
530
|
-
render: function() {
|
|
531
|
-
this.initContainer(), this.initViewer(), this.initList(), this.renderViewer();
|
|
532
|
-
},
|
|
533
|
-
initBody: function() {
|
|
534
|
-
var t = this.element.ownerDocument, i = t.body || t.documentElement;
|
|
535
|
-
this.body = i, this.scrollbarWidth = window.innerWidth - t.documentElement.clientWidth, this.initialBodyPaddingRight = i.style.paddingRight, this.initialBodyComputedPaddingRight = window.getComputedStyle(i).paddingRight;
|
|
536
|
-
},
|
|
537
|
-
initContainer: function() {
|
|
538
|
-
this.containerData = {
|
|
539
|
-
width: window.innerWidth,
|
|
540
|
-
height: window.innerHeight
|
|
541
|
-
};
|
|
542
|
-
},
|
|
543
|
-
initViewer: function() {
|
|
544
|
-
var t = this.options, i = this.parent, r;
|
|
545
|
-
t.inline && (r = {
|
|
546
|
-
width: Math.max(i.offsetWidth, t.minWidth),
|
|
547
|
-
height: Math.max(i.offsetHeight, t.minHeight)
|
|
548
|
-
}, this.parentData = r), (this.fulled || !r) && (r = this.containerData), this.viewerData = N({}, r);
|
|
549
|
-
},
|
|
550
|
-
renderViewer: function() {
|
|
551
|
-
this.options.inline && !this.fulled && V(this.viewer, this.viewerData);
|
|
552
|
-
},
|
|
553
|
-
initList: function() {
|
|
554
|
-
var t = this, i = this.element, r = this.options, n = this.list, a = [];
|
|
555
|
-
n.innerHTML = "", y(this.images, function(s, o) {
|
|
556
|
-
var u = s.src, l = s.alt || si(u), h = t.getImageURL(s);
|
|
557
|
-
if (u || h) {
|
|
558
|
-
var c = document.createElement("li"), d = document.createElement("img");
|
|
559
|
-
y(r.inheritedAttributes, function(_) {
|
|
560
|
-
var w = s.getAttribute(_);
|
|
561
|
-
w !== null && d.setAttribute(_, w);
|
|
562
|
-
}), r.navbar && (d.src = u || h), d.alt = l, d.setAttribute("data-original-url", h || u), c.setAttribute("data-index", o), c.setAttribute("data-viewer-action", "view"), c.setAttribute("role", "button"), r.keyboard && c.setAttribute("tabindex", 0), c.appendChild(d), n.appendChild(c), a.push(c);
|
|
563
|
-
}
|
|
564
|
-
}), this.items = a, y(a, function(s) {
|
|
565
|
-
var o = s.firstElementChild, u, l;
|
|
566
|
-
Ot(o, "filled", !0), r.loading && f(s, Z), v(o, z, u = function(c) {
|
|
567
|
-
b(o, W, l), r.loading && m(s, Z), t.loadImage(c);
|
|
568
|
-
}, {
|
|
569
|
-
once: !0
|
|
570
|
-
}), v(o, W, l = function() {
|
|
571
|
-
b(o, z, u), r.loading && m(s, Z);
|
|
572
|
-
}, {
|
|
573
|
-
once: !0
|
|
574
|
-
});
|
|
575
|
-
}), r.transition && v(i, at, function() {
|
|
576
|
-
f(n, A);
|
|
577
|
-
}, {
|
|
578
|
-
once: !0
|
|
579
|
-
});
|
|
580
|
-
},
|
|
581
|
-
renderList: function() {
|
|
582
|
-
var t = this.index, i = this.items[t];
|
|
583
|
-
if (i) {
|
|
584
|
-
var r = i.nextElementSibling, n = parseInt(window.getComputedStyle(r || i).marginLeft, 10), a = i.offsetWidth, s = a + n;
|
|
585
|
-
V(this.list, N({
|
|
586
|
-
width: s * this.length - n
|
|
587
|
-
}, vt({
|
|
588
|
-
translateX: (this.viewerData.width - a) / 2 - s * t
|
|
589
|
-
})));
|
|
590
|
-
}
|
|
591
|
-
},
|
|
592
|
-
resetList: function() {
|
|
593
|
-
var t = this.list;
|
|
594
|
-
t.innerHTML = "", m(t, A), V(t, vt({
|
|
595
|
-
translateX: 0
|
|
596
|
-
}));
|
|
597
|
-
},
|
|
598
|
-
initImage: function(t) {
|
|
599
|
-
var i = this, r = this.options, n = this.image, a = this.viewerData, s = this.footer.offsetHeight, o = a.width, u = Math.max(a.height - s, s), l = this.imageData || {}, h;
|
|
600
|
-
this.imageInitializing = {
|
|
601
|
-
abort: function() {
|
|
602
|
-
h.onload = null;
|
|
603
|
-
}
|
|
604
|
-
}, h = Te(n, r, function(c, d) {
|
|
605
|
-
var _ = c / d, w = Math.max(0, Math.min(1, r.initialCoverage)), S = o, I = u;
|
|
606
|
-
i.imageInitializing = !1, u * _ > o ? I = o / _ : S = u * _, w = O(w) ? w : 0.9, S = Math.min(S * w, c), I = Math.min(I * w, d);
|
|
607
|
-
var D = (o - S) / 2, C = (u - I) / 2, T = {
|
|
608
|
-
left: D,
|
|
609
|
-
top: C,
|
|
610
|
-
x: D,
|
|
611
|
-
y: C,
|
|
612
|
-
width: S,
|
|
613
|
-
height: I,
|
|
614
|
-
oldRatio: 1,
|
|
615
|
-
ratio: S / c,
|
|
616
|
-
aspectRatio: _,
|
|
617
|
-
naturalWidth: c,
|
|
618
|
-
naturalHeight: d
|
|
619
|
-
}, k = N({}, T);
|
|
620
|
-
r.rotatable && (T.rotate = l.rotate || 0, k.rotate = 0), r.scalable && (T.scaleX = l.scaleX || 1, T.scaleY = l.scaleY || 1, k.scaleX = 1, k.scaleY = 1), i.imageData = T, i.initialImageData = k, t && t();
|
|
621
|
-
});
|
|
622
|
-
},
|
|
623
|
-
renderImage: function(t) {
|
|
624
|
-
var i = this, r = this.image, n = this.imageData;
|
|
625
|
-
if (V(r, N({
|
|
626
|
-
width: n.width,
|
|
627
|
-
height: n.height,
|
|
628
|
-
// XXX: Not to use translateX/Y to avoid image shaking when zooming
|
|
629
|
-
marginLeft: n.x,
|
|
630
|
-
marginTop: n.y
|
|
631
|
-
}, vt(n))), t)
|
|
632
|
-
if ((this.viewing || this.moving || this.rotating || this.scaling || this.zooming) && this.options.transition && q(r, A)) {
|
|
633
|
-
var a = function() {
|
|
634
|
-
i.imageRendering = !1, t();
|
|
635
|
-
};
|
|
636
|
-
this.imageRendering = {
|
|
637
|
-
abort: function() {
|
|
638
|
-
b(r, P, a);
|
|
639
|
-
}
|
|
640
|
-
}, v(r, P, a, {
|
|
641
|
-
once: !0
|
|
642
|
-
});
|
|
643
|
-
} else
|
|
644
|
-
t();
|
|
645
|
-
},
|
|
646
|
-
resetImage: function() {
|
|
647
|
-
var t = this.image;
|
|
648
|
-
t && (this.viewing && this.viewing.abort(), t.parentNode.removeChild(t), this.image = null, this.title.innerHTML = "");
|
|
649
|
-
}
|
|
650
|
-
}, hi = {
|
|
651
|
-
bind: function() {
|
|
652
|
-
var t = this.options, i = this.viewer, r = this.canvas, n = this.element.ownerDocument;
|
|
653
|
-
v(i, J, this.onClick = this.click.bind(this)), v(i, Ft, this.onDragStart = this.dragstart.bind(this)), v(r, Wt, this.onPointerDown = this.pointerdown.bind(this)), v(n, Xt, this.onPointerMove = this.pointermove.bind(this)), v(n, Ht, this.onPointerUp = this.pointerup.bind(this)), v(n, Yt, this.onKeyDown = this.keydown.bind(this)), v(window, qt, this.onResize = this.resize.bind(this)), t.zoomable && t.zoomOnWheel && v(i, Ut, this.onWheel = this.wheel.bind(this), {
|
|
654
|
-
passive: !1,
|
|
655
|
-
capture: !0
|
|
656
|
-
}), t.toggleOnDblclick && v(r, St, this.onDblclick = this.dblclick.bind(this));
|
|
657
|
-
},
|
|
658
|
-
unbind: function() {
|
|
659
|
-
var t = this.options, i = this.viewer, r = this.canvas, n = this.element.ownerDocument;
|
|
660
|
-
b(i, J, this.onClick), b(i, Ft, this.onDragStart), b(r, Wt, this.onPointerDown), b(n, Xt, this.onPointerMove), b(n, Ht, this.onPointerUp), b(n, Yt, this.onKeyDown), b(window, qt, this.onResize), t.zoomable && t.zoomOnWheel && b(i, Ut, this.onWheel, {
|
|
661
|
-
passive: !1,
|
|
662
|
-
capture: !0
|
|
663
|
-
}), t.toggleOnDblclick && b(r, St, this.onDblclick);
|
|
664
|
-
}
|
|
665
|
-
}, ci = {
|
|
666
|
-
click: function(t) {
|
|
667
|
-
var i = this.options, r = this.imageData, n = t.target, a = K(n, gt);
|
|
668
|
-
switch (!a && n.localName === "img" && n.parentElement.localName === "li" && (n = n.parentElement, a = K(n, gt)), G && t.isTrusted && n === this.canvas && clearTimeout(this.clickCanvasTimeout), a) {
|
|
669
|
-
case "mix":
|
|
670
|
-
this.played ? this.stop() : i.inline ? this.fulled ? this.exit() : this.full() : this.hide();
|
|
671
|
-
break;
|
|
672
|
-
case "hide":
|
|
673
|
-
this.pointerMoved || this.hide();
|
|
674
|
-
break;
|
|
675
|
-
case "view":
|
|
676
|
-
this.view(K(n, "index"));
|
|
677
|
-
break;
|
|
678
|
-
case "zoom-in":
|
|
679
|
-
this.zoom(0.1, !0);
|
|
680
|
-
break;
|
|
681
|
-
case "zoom-out":
|
|
682
|
-
this.zoom(-0.1, !0);
|
|
683
|
-
break;
|
|
684
|
-
case "one-to-one":
|
|
685
|
-
this.toggle();
|
|
686
|
-
break;
|
|
687
|
-
case "reset":
|
|
688
|
-
this.reset();
|
|
689
|
-
break;
|
|
690
|
-
case "prev":
|
|
691
|
-
this.prev(i.loop);
|
|
692
|
-
break;
|
|
693
|
-
case "play":
|
|
694
|
-
this.play(i.fullscreen);
|
|
695
|
-
break;
|
|
696
|
-
case "next":
|
|
697
|
-
this.next(i.loop);
|
|
698
|
-
break;
|
|
699
|
-
case "rotate-left":
|
|
700
|
-
this.rotate(-90);
|
|
701
|
-
break;
|
|
702
|
-
case "rotate-right":
|
|
703
|
-
this.rotate(90);
|
|
704
|
-
break;
|
|
705
|
-
case "flip-horizontal":
|
|
706
|
-
this.scaleX(-r.scaleX || -1);
|
|
707
|
-
break;
|
|
708
|
-
case "flip-vertical":
|
|
709
|
-
this.scaleY(-r.scaleY || -1);
|
|
710
|
-
break;
|
|
711
|
-
default:
|
|
712
|
-
this.played && this.stop();
|
|
713
|
-
}
|
|
714
|
-
},
|
|
715
|
-
dblclick: function(t) {
|
|
716
|
-
t.preventDefault(), this.viewed && t.target === this.image && (G && t.isTrusted && clearTimeout(this.doubleClickImageTimeout), this.toggle(t.isTrusted ? t : t.detail && t.detail.originalEvent));
|
|
717
|
-
},
|
|
718
|
-
load: function() {
|
|
719
|
-
var t = this;
|
|
720
|
-
this.timeout && (clearTimeout(this.timeout), this.timeout = !1);
|
|
721
|
-
var i = this.element, r = this.options, n = this.image, a = this.index, s = this.viewerData;
|
|
722
|
-
m(n, rt), r.loading && m(this.canvas, Z), n.style.cssText = "height:0;" + "margin-left:".concat(s.width / 2, "px;") + "margin-top:".concat(s.height / 2, "px;") + "max-width:none!important;position:relative;width:0;", this.initImage(function() {
|
|
723
|
-
ot(n, Ge, r.movable), ot(n, A, r.transition), t.renderImage(function() {
|
|
724
|
-
t.viewed = !0, t.viewing = !1, p(r.viewed) && v(i, at, r.viewed, {
|
|
725
|
-
once: !0
|
|
726
|
-
}), x(i, at, {
|
|
727
|
-
originalImage: t.images[a],
|
|
728
|
-
index: a,
|
|
729
|
-
image: n
|
|
730
|
-
}, {
|
|
731
|
-
cancelable: !1
|
|
732
|
-
});
|
|
733
|
-
});
|
|
734
|
-
});
|
|
735
|
-
},
|
|
736
|
-
loadImage: function(t) {
|
|
737
|
-
var i = t.target, r = i.parentNode, n = r.offsetWidth || 30, a = r.offsetHeight || 50, s = !!K(i, "filled");
|
|
738
|
-
Te(i, this.options, function(o, u) {
|
|
739
|
-
var l = o / u, h = n, c = a;
|
|
740
|
-
a * l > n ? s ? h = a * l : c = n / l : s ? c = n / l : h = a * l, V(i, N({
|
|
741
|
-
width: h,
|
|
742
|
-
height: c
|
|
743
|
-
}, vt({
|
|
744
|
-
translateX: (n - h) / 2,
|
|
745
|
-
translateY: (a - c) / 2
|
|
746
|
-
})));
|
|
747
|
-
});
|
|
748
|
-
},
|
|
749
|
-
keydown: function(t) {
|
|
750
|
-
var i = this.options;
|
|
751
|
-
if (i.keyboard) {
|
|
752
|
-
var r = t.keyCode || t.which || t.charCode;
|
|
753
|
-
switch (r) {
|
|
754
|
-
case 13:
|
|
755
|
-
this.viewer.contains(t.target) && this.click(t);
|
|
756
|
-
break;
|
|
757
|
-
}
|
|
758
|
-
if (this.fulled)
|
|
759
|
-
switch (r) {
|
|
760
|
-
case 27:
|
|
761
|
-
this.played ? this.stop() : i.inline ? this.fulled && this.exit() : this.hide();
|
|
762
|
-
break;
|
|
763
|
-
case 32:
|
|
764
|
-
this.played && this.stop();
|
|
765
|
-
break;
|
|
766
|
-
case 37:
|
|
767
|
-
this.played && this.playing ? this.playing.prev() : this.prev(i.loop);
|
|
768
|
-
break;
|
|
769
|
-
case 38:
|
|
770
|
-
t.preventDefault(), this.zoom(i.zoomRatio, !0);
|
|
771
|
-
break;
|
|
772
|
-
case 39:
|
|
773
|
-
this.played && this.playing ? this.playing.next() : this.next(i.loop);
|
|
774
|
-
break;
|
|
775
|
-
case 40:
|
|
776
|
-
t.preventDefault(), this.zoom(-i.zoomRatio, !0);
|
|
777
|
-
break;
|
|
778
|
-
case 48:
|
|
779
|
-
case 49:
|
|
780
|
-
t.ctrlKey && (t.preventDefault(), this.toggle());
|
|
781
|
-
break;
|
|
782
|
-
}
|
|
783
|
-
}
|
|
784
|
-
},
|
|
785
|
-
dragstart: function(t) {
|
|
786
|
-
t.target.localName === "img" && t.preventDefault();
|
|
787
|
-
},
|
|
788
|
-
pointerdown: function(t) {
|
|
789
|
-
var i = this.options, r = this.pointers, n = t.buttons, a = t.button;
|
|
790
|
-
if (this.pointerMoved = !1, !(!this.viewed || this.showing || this.viewing || this.hiding || (t.type === "mousedown" || t.type === "pointerdown" && t.pointerType === "mouse") && // No primary button (Usually the left button)
|
|
791
|
-
(O(n) && n !== 1 || O(a) && a !== 0 || t.ctrlKey))) {
|
|
792
|
-
t.preventDefault(), t.changedTouches ? y(t.changedTouches, function(o) {
|
|
793
|
-
r[o.identifier] = ct(o);
|
|
794
|
-
}) : r[t.pointerId || 0] = ct(t);
|
|
795
|
-
var s = i.movable ? ft : !1;
|
|
796
|
-
i.zoomOnTouch && i.zoomable && Object.keys(r).length > 1 ? s = it : i.slideOnTouch && (t.pointerType === "touch" || t.type === "touchstart") && this.isSwitchable() && (s = we), i.transition && (s === ft || s === it) && m(this.image, A), this.action = s;
|
|
797
|
-
}
|
|
798
|
-
},
|
|
799
|
-
pointermove: function(t) {
|
|
800
|
-
var i = this.pointers, r = this.action;
|
|
801
|
-
!this.viewed || !r || (t.preventDefault(), t.changedTouches ? y(t.changedTouches, function(n) {
|
|
802
|
-
N(i[n.identifier] || {}, ct(n, !0));
|
|
803
|
-
}) : N(i[t.pointerId || 0] || {}, ct(t, !0)), this.change(t));
|
|
804
|
-
},
|
|
805
|
-
pointerup: function(t) {
|
|
806
|
-
var i = this, r = this.options, n = this.action, a = this.pointers, s;
|
|
807
|
-
t.changedTouches ? y(t.changedTouches, function(o) {
|
|
808
|
-
s = a[o.identifier], delete a[o.identifier];
|
|
809
|
-
}) : (s = a[t.pointerId || 0], delete a[t.pointerId || 0]), n && (t.preventDefault(), r.transition && (n === ft || n === it) && f(this.image, A), this.action = !1, G && n !== it && s && Date.now() - s.timeStamp < 500 && (clearTimeout(this.clickCanvasTimeout), clearTimeout(this.doubleClickImageTimeout), r.toggleOnDblclick && this.viewed && t.target === this.image ? this.imageClicked ? (this.imageClicked = !1, this.doubleClickImageTimeout = setTimeout(function() {
|
|
810
|
-
x(i.image, St, {
|
|
811
|
-
originalEvent: t
|
|
812
|
-
});
|
|
813
|
-
}, 50)) : (this.imageClicked = !0, this.doubleClickImageTimeout = setTimeout(function() {
|
|
814
|
-
i.imageClicked = !1;
|
|
815
|
-
}, 500)) : (this.imageClicked = !1, r.backdrop && r.backdrop !== "static" && t.target === this.canvas && (this.clickCanvasTimeout = setTimeout(function() {
|
|
816
|
-
x(i.canvas, J, {
|
|
817
|
-
originalEvent: t
|
|
818
|
-
});
|
|
819
|
-
}, 50)))));
|
|
820
|
-
},
|
|
821
|
-
resize: function() {
|
|
822
|
-
var t = this;
|
|
823
|
-
if (!(!this.isShown || this.hiding) && (this.fulled && (this.close(), this.initBody(), this.open()), this.initContainer(), this.initViewer(), this.renderViewer(), this.renderList(), this.viewed && this.initImage(function() {
|
|
824
|
-
t.renderImage();
|
|
825
|
-
}), this.played)) {
|
|
826
|
-
if (this.options.fullscreen && this.fulled && !(document.fullscreenElement || document.webkitFullscreenElement || document.mozFullScreenElement || document.msFullscreenElement)) {
|
|
827
|
-
this.stop();
|
|
828
|
-
return;
|
|
829
|
-
}
|
|
830
|
-
y(this.player.getElementsByTagName("img"), function(i) {
|
|
831
|
-
v(i, z, t.loadImage.bind(t), {
|
|
832
|
-
once: !0
|
|
833
|
-
}), x(i, z);
|
|
834
|
-
});
|
|
835
|
-
}
|
|
836
|
-
},
|
|
837
|
-
wheel: function(t) {
|
|
838
|
-
var i = this;
|
|
839
|
-
if (this.viewed && (t.preventDefault(), !this.wheeling)) {
|
|
840
|
-
this.wheeling = !0, setTimeout(function() {
|
|
841
|
-
i.wheeling = !1;
|
|
842
|
-
}, 50);
|
|
843
|
-
var r = Number(this.options.zoomRatio) || 0.1, n = 1;
|
|
844
|
-
t.deltaY ? n = t.deltaY > 0 ? 1 : -1 : t.wheelDelta ? n = -t.wheelDelta / 120 : t.detail && (n = t.detail > 0 ? 1 : -1), this.zoom(-n * r, !0, null, t);
|
|
845
|
-
}
|
|
846
|
-
}
|
|
847
|
-
}, fi = {
|
|
848
|
-
/** Show the viewer (only available in modal mode)
|
|
849
|
-
* @param {boolean} [immediate=false] - Indicates if show the viewer immediately or not.
|
|
850
|
-
* @returns {Viewer} this
|
|
851
|
-
*/
|
|
852
|
-
show: function() {
|
|
853
|
-
var t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : !1, i = this.element, r = this.options;
|
|
854
|
-
if (r.inline || this.showing || this.isShown || this.showing)
|
|
855
|
-
return this;
|
|
856
|
-
if (!this.ready)
|
|
857
|
-
return this.build(), this.ready && this.show(t), this;
|
|
858
|
-
if (p(r.show) && v(i, Kt, r.show, {
|
|
859
|
-
once: !0
|
|
860
|
-
}), x(i, Kt) === !1 || !this.ready)
|
|
861
|
-
return this;
|
|
862
|
-
this.hiding && this.transitioning.abort(), this.showing = !0, this.open();
|
|
863
|
-
var n = this.viewer;
|
|
864
|
-
if (m(n, Y), n.setAttribute("role", "dialog"), n.setAttribute("aria-labelledby", this.title.id), n.setAttribute("aria-modal", !0), n.removeAttribute("aria-hidden"), r.transition && !t) {
|
|
865
|
-
var a = this.shown.bind(this);
|
|
866
|
-
this.transitioning = {
|
|
867
|
-
abort: function() {
|
|
868
|
-
b(n, P, a), m(n, L);
|
|
869
|
-
}
|
|
870
|
-
}, f(n, A), n.initialOffsetWidth = n.offsetWidth, v(n, P, a, {
|
|
871
|
-
once: !0
|
|
872
|
-
}), f(n, L);
|
|
873
|
-
} else
|
|
874
|
-
f(n, L), this.shown();
|
|
875
|
-
return this;
|
|
876
|
-
},
|
|
877
|
-
/**
|
|
878
|
-
* Hide the viewer (only available in modal mode)
|
|
879
|
-
* @param {boolean} [immediate=false] - Indicates if hide the viewer immediately or not.
|
|
880
|
-
* @returns {Viewer} this
|
|
881
|
-
*/
|
|
882
|
-
hide: function() {
|
|
883
|
-
var t = this, i = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : !1, r = this.element, n = this.options;
|
|
884
|
-
if (n.inline || this.hiding || !(this.isShown || this.showing))
|
|
885
|
-
return this;
|
|
886
|
-
if (p(n.hide) && v(r, Zt, n.hide, {
|
|
887
|
-
once: !0
|
|
888
|
-
}), x(r, Zt) === !1)
|
|
889
|
-
return this;
|
|
890
|
-
this.showing && this.transitioning.abort(), this.hiding = !0, this.played ? this.stop() : this.viewing && this.viewing.abort();
|
|
891
|
-
var a = this.viewer, s = this.image, o = function() {
|
|
892
|
-
m(a, L), t.hidden();
|
|
893
|
-
};
|
|
894
|
-
if (n.transition && !i) {
|
|
895
|
-
var u = function h(c) {
|
|
896
|
-
c && c.target === a && (b(a, P, h), t.hidden());
|
|
897
|
-
}, l = function() {
|
|
898
|
-
q(a, A) ? (v(a, P, u), m(a, L)) : o();
|
|
899
|
-
};
|
|
900
|
-
this.transitioning = {
|
|
901
|
-
abort: function() {
|
|
902
|
-
t.viewed && q(s, A) ? b(s, P, l) : q(a, A) && b(a, P, u);
|
|
903
|
-
}
|
|
904
|
-
}, this.viewed && q(s, A) ? (v(s, P, l, {
|
|
905
|
-
once: !0
|
|
906
|
-
}), this.zoomTo(0, !1, null, null, !0)) : l();
|
|
907
|
-
} else
|
|
908
|
-
o();
|
|
909
|
-
return this;
|
|
910
|
-
},
|
|
911
|
-
/**
|
|
912
|
-
* View one of the images with image's index
|
|
913
|
-
* @param {number} index - The index of the image to view.
|
|
914
|
-
* @returns {Viewer} this
|
|
915
|
-
*/
|
|
916
|
-
view: function() {
|
|
917
|
-
var t = this, i = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : this.options.initialViewIndex;
|
|
918
|
-
if (i = Number(i) || 0, this.hiding || this.played || i < 0 || i >= this.length || this.viewed && i === this.index)
|
|
919
|
-
return this;
|
|
920
|
-
if (!this.isShown)
|
|
921
|
-
return this.index = i, this.show();
|
|
922
|
-
this.viewing && this.viewing.abort();
|
|
923
|
-
var r = this.element, n = this.options, a = this.title, s = this.canvas, o = this.items[i], u = o.querySelector("img"), l = K(u, "originalUrl"), h = u.getAttribute("alt"), c = document.createElement("img");
|
|
924
|
-
if (y(n.inheritedAttributes, function(I) {
|
|
925
|
-
var D = u.getAttribute(I);
|
|
926
|
-
D !== null && c.setAttribute(I, D);
|
|
927
|
-
}), c.src = l, c.alt = h, p(n.view) && v(r, Qt, n.view, {
|
|
928
|
-
once: !0
|
|
929
|
-
}), x(r, Qt, {
|
|
930
|
-
originalImage: this.images[i],
|
|
931
|
-
index: i,
|
|
932
|
-
image: c
|
|
933
|
-
}) === !1 || !this.isShown || this.hiding || this.played)
|
|
934
|
-
return this;
|
|
935
|
-
var d = this.items[this.index];
|
|
936
|
-
d && (m(d, lt), d.removeAttribute("aria-selected")), f(o, lt), o.setAttribute("aria-selected", !0), n.focus && o.focus(), this.image = c, this.viewed = !1, this.index = i, this.imageData = {}, f(c, rt), n.loading && f(s, Z), s.innerHTML = "", s.appendChild(c), this.renderList(), a.innerHTML = "";
|
|
937
|
-
var _ = function() {
|
|
938
|
-
var D = t.imageData, C = Array.isArray(n.title) ? n.title[1] : n.title;
|
|
939
|
-
a.innerHTML = ri(p(C) ? C.call(t, c, D) : "".concat(h, " (").concat(D.naturalWidth, " × ").concat(D.naturalHeight, ")"));
|
|
940
|
-
}, w, S;
|
|
941
|
-
return v(r, at, _, {
|
|
942
|
-
once: !0
|
|
943
|
-
}), this.viewing = {
|
|
944
|
-
abort: function() {
|
|
945
|
-
b(r, at, _), c.complete ? t.imageRendering ? t.imageRendering.abort() : t.imageInitializing && t.imageInitializing.abort() : (c.src = "", b(c, z, w), t.timeout && clearTimeout(t.timeout));
|
|
946
|
-
}
|
|
947
|
-
}, c.complete ? this.load() : (v(c, z, w = function() {
|
|
948
|
-
b(c, W, S), t.load();
|
|
949
|
-
}, {
|
|
950
|
-
once: !0
|
|
951
|
-
}), v(c, W, S = function() {
|
|
952
|
-
b(c, z, w), t.timeout && (clearTimeout(t.timeout), t.timeout = !1), m(c, rt), n.loading && m(t.canvas, Z);
|
|
953
|
-
}, {
|
|
954
|
-
once: !0
|
|
955
|
-
}), this.timeout && clearTimeout(this.timeout), this.timeout = setTimeout(function() {
|
|
956
|
-
m(c, rt), t.timeout = !1;
|
|
957
|
-
}, 1e3)), this;
|
|
958
|
-
},
|
|
959
|
-
/**
|
|
960
|
-
* View the previous image
|
|
961
|
-
* @param {boolean} [loop=false] - Indicate if view the last one
|
|
962
|
-
* when it is the first one at present.
|
|
963
|
-
* @returns {Viewer} this
|
|
964
|
-
*/
|
|
965
|
-
prev: function() {
|
|
966
|
-
var t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : !1, i = this.index - 1;
|
|
967
|
-
return i < 0 && (i = t ? this.length - 1 : 0), this.view(i), this;
|
|
968
|
-
},
|
|
969
|
-
/**
|
|
970
|
-
* View the next image
|
|
971
|
-
* @param {boolean} [loop=false] - Indicate if view the first one
|
|
972
|
-
* when it is the last one at present.
|
|
973
|
-
* @returns {Viewer} this
|
|
974
|
-
*/
|
|
975
|
-
next: function() {
|
|
976
|
-
var t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : !1, i = this.length - 1, r = this.index + 1;
|
|
977
|
-
return r > i && (r = t ? 0 : i), this.view(r), this;
|
|
978
|
-
},
|
|
979
|
-
/**
|
|
980
|
-
* Move the image with relative offsets.
|
|
981
|
-
* @param {number} x - The moving distance in the horizontal direction.
|
|
982
|
-
* @param {number} [y=x] The moving distance in the vertical direction.
|
|
983
|
-
* @returns {Viewer} this
|
|
984
|
-
*/
|
|
985
|
-
move: function(t) {
|
|
986
|
-
var i = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : t, r = this.imageData;
|
|
987
|
-
return this.moveTo(U(t) ? t : r.x + Number(t), U(i) ? i : r.y + Number(i)), this;
|
|
988
|
-
},
|
|
989
|
-
/**
|
|
990
|
-
* Move the image to an absolute point.
|
|
991
|
-
* @param {number} x - The new position in the horizontal direction.
|
|
992
|
-
* @param {number} [y=x] - The new position in the vertical direction.
|
|
993
|
-
* @param {Event} [_originalEvent=null] - The original event if any.
|
|
994
|
-
* @returns {Viewer} this
|
|
995
|
-
*/
|
|
996
|
-
moveTo: function(t) {
|
|
997
|
-
var i = this, r = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : t, n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : null, a = this.element, s = this.options, o = this.imageData;
|
|
998
|
-
if (t = Number(t), r = Number(r), this.viewed && !this.played && s.movable) {
|
|
999
|
-
var u = o.x, l = o.y, h = !1;
|
|
1000
|
-
if (O(t) ? h = !0 : t = u, O(r) ? h = !0 : r = l, h) {
|
|
1001
|
-
if (p(s.move) && v(a, te, s.move, {
|
|
1002
|
-
once: !0
|
|
1003
|
-
}), x(a, te, {
|
|
1004
|
-
x: t,
|
|
1005
|
-
y: r,
|
|
1006
|
-
oldX: u,
|
|
1007
|
-
oldY: l,
|
|
1008
|
-
originalEvent: n
|
|
1009
|
-
}) === !1)
|
|
1010
|
-
return this;
|
|
1011
|
-
o.x = t, o.y = r, o.left = t, o.top = r, this.moving = !0, this.renderImage(function() {
|
|
1012
|
-
i.moving = !1, p(s.moved) && v(a, ee, s.moved, {
|
|
1013
|
-
once: !0
|
|
1014
|
-
}), x(a, ee, {
|
|
1015
|
-
x: t,
|
|
1016
|
-
y: r,
|
|
1017
|
-
oldX: u,
|
|
1018
|
-
oldY: l,
|
|
1019
|
-
originalEvent: n
|
|
1020
|
-
}, {
|
|
1021
|
-
cancelable: !1
|
|
1022
|
-
});
|
|
1023
|
-
});
|
|
1024
|
-
}
|
|
1025
|
-
}
|
|
1026
|
-
return this;
|
|
1027
|
-
},
|
|
1028
|
-
/**
|
|
1029
|
-
* Rotate the image with a relative degree.
|
|
1030
|
-
* @param {number} degree - The rotate degree.
|
|
1031
|
-
* @returns {Viewer} this
|
|
1032
|
-
*/
|
|
1033
|
-
rotate: function(t) {
|
|
1034
|
-
return this.rotateTo((this.imageData.rotate || 0) + Number(t)), this;
|
|
1035
|
-
},
|
|
1036
|
-
/**
|
|
1037
|
-
* Rotate the image to an absolute degree.
|
|
1038
|
-
* @param {number} degree - The rotate degree.
|
|
1039
|
-
* @returns {Viewer} this
|
|
1040
|
-
*/
|
|
1041
|
-
rotateTo: function(t) {
|
|
1042
|
-
var i = this, r = this.element, n = this.options, a = this.imageData;
|
|
1043
|
-
if (t = Number(t), O(t) && this.viewed && !this.played && n.rotatable) {
|
|
1044
|
-
var s = a.rotate;
|
|
1045
|
-
if (p(n.rotate) && v(r, ie, n.rotate, {
|
|
1046
|
-
once: !0
|
|
1047
|
-
}), x(r, ie, {
|
|
1048
|
-
degree: t,
|
|
1049
|
-
oldDegree: s
|
|
1050
|
-
}) === !1)
|
|
1051
|
-
return this;
|
|
1052
|
-
a.rotate = t, this.rotating = !0, this.renderImage(function() {
|
|
1053
|
-
i.rotating = !1, p(n.rotated) && v(r, re, n.rotated, {
|
|
1054
|
-
once: !0
|
|
1055
|
-
}), x(r, re, {
|
|
1056
|
-
degree: t,
|
|
1057
|
-
oldDegree: s
|
|
1058
|
-
}, {
|
|
1059
|
-
cancelable: !1
|
|
1060
|
-
});
|
|
1061
|
-
});
|
|
1062
|
-
}
|
|
1063
|
-
return this;
|
|
1064
|
-
},
|
|
1065
|
-
/**
|
|
1066
|
-
* Scale the image on the x-axis.
|
|
1067
|
-
* @param {number} scaleX - The scale ratio on the x-axis.
|
|
1068
|
-
* @returns {Viewer} this
|
|
1069
|
-
*/
|
|
1070
|
-
scaleX: function(t) {
|
|
1071
|
-
return this.scale(t, this.imageData.scaleY), this;
|
|
1072
|
-
},
|
|
1073
|
-
/**
|
|
1074
|
-
* Scale the image on the y-axis.
|
|
1075
|
-
* @param {number} scaleY - The scale ratio on the y-axis.
|
|
1076
|
-
* @returns {Viewer} this
|
|
1077
|
-
*/
|
|
1078
|
-
scaleY: function(t) {
|
|
1079
|
-
return this.scale(this.imageData.scaleX, t), this;
|
|
1080
|
-
},
|
|
1081
|
-
/**
|
|
1082
|
-
* Scale the image.
|
|
1083
|
-
* @param {number} scaleX - The scale ratio on the x-axis.
|
|
1084
|
-
* @param {number} [scaleY=scaleX] - The scale ratio on the y-axis.
|
|
1085
|
-
* @returns {Viewer} this
|
|
1086
|
-
*/
|
|
1087
|
-
scale: function(t) {
|
|
1088
|
-
var i = this, r = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : t, n = this.element, a = this.options, s = this.imageData;
|
|
1089
|
-
if (t = Number(t), r = Number(r), this.viewed && !this.played && a.scalable) {
|
|
1090
|
-
var o = s.scaleX, u = s.scaleY, l = !1;
|
|
1091
|
-
if (O(t) ? l = !0 : t = o, O(r) ? l = !0 : r = u, l) {
|
|
1092
|
-
if (p(a.scale) && v(n, ne, a.scale, {
|
|
1093
|
-
once: !0
|
|
1094
|
-
}), x(n, ne, {
|
|
1095
|
-
scaleX: t,
|
|
1096
|
-
scaleY: r,
|
|
1097
|
-
oldScaleX: o,
|
|
1098
|
-
oldScaleY: u
|
|
1099
|
-
}) === !1)
|
|
1100
|
-
return this;
|
|
1101
|
-
s.scaleX = t, s.scaleY = r, this.scaling = !0, this.renderImage(function() {
|
|
1102
|
-
i.scaling = !1, p(a.scaled) && v(n, ae, a.scaled, {
|
|
1103
|
-
once: !0
|
|
1104
|
-
}), x(n, ae, {
|
|
1105
|
-
scaleX: t,
|
|
1106
|
-
scaleY: r,
|
|
1107
|
-
oldScaleX: o,
|
|
1108
|
-
oldScaleY: u
|
|
1109
|
-
}, {
|
|
1110
|
-
cancelable: !1
|
|
1111
|
-
});
|
|
1112
|
-
});
|
|
1113
|
-
}
|
|
1114
|
-
}
|
|
1115
|
-
return this;
|
|
1116
|
-
},
|
|
1117
|
-
/**
|
|
1118
|
-
* Zoom the image with a relative ratio.
|
|
1119
|
-
* @param {number} ratio - The target ratio.
|
|
1120
|
-
* @param {boolean} [showTooltip=false] - Indicates whether to show the tooltip.
|
|
1121
|
-
* @param {Object} [pivot] - The pivot point coordinate for zooming.
|
|
1122
|
-
* @param {Event} [_originalEvent=null] - The original event if any.
|
|
1123
|
-
* @returns {Viewer} this
|
|
1124
|
-
*/
|
|
1125
|
-
zoom: function(t) {
|
|
1126
|
-
var i = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1, r = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : null, n = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : null, a = this.imageData;
|
|
1127
|
-
return t = Number(t), t < 0 ? t = 1 / (1 - t) : t = 1 + t, this.zoomTo(a.width * t / a.naturalWidth, i, r, n), this;
|
|
1128
|
-
},
|
|
1129
|
-
/**
|
|
1130
|
-
* Zoom the image to an absolute ratio.
|
|
1131
|
-
* @param {number} ratio - The target ratio.
|
|
1132
|
-
* @param {boolean} [showTooltip] - Indicates whether to show the tooltip.
|
|
1133
|
-
* @param {Object} [pivot] - The pivot point coordinate for zooming.
|
|
1134
|
-
* @param {Event} [_originalEvent=null] - The original event if any.
|
|
1135
|
-
* @param {Event} [_zoomable=false] - Indicates if the current zoom is available or not.
|
|
1136
|
-
* @returns {Viewer} this
|
|
1137
|
-
*/
|
|
1138
|
-
zoomTo: function(t) {
|
|
1139
|
-
var i = this, r = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1, n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : null, a = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : null, s = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : !1, o = this.element, u = this.options, l = this.pointers, h = this.imageData, c = h.x, d = h.y, _ = h.width, w = h.height, S = h.naturalWidth, I = h.naturalHeight;
|
|
1140
|
-
if (t = Math.max(0, t), O(t) && this.viewed && !this.played && (s || u.zoomable)) {
|
|
1141
|
-
if (!s) {
|
|
1142
|
-
var D = Math.max(0.01, u.minZoomRatio), C = Math.min(100, u.maxZoomRatio);
|
|
1143
|
-
t = Math.min(Math.max(t, D), C);
|
|
1144
|
-
}
|
|
1145
|
-
if (a)
|
|
1146
|
-
switch (a.type) {
|
|
1147
|
-
case "wheel":
|
|
1148
|
-
u.zoomRatio >= 0.055 && t > 0.95 && t < 1.05 && (t = 1);
|
|
1149
|
-
break;
|
|
1150
|
-
case "pointermove":
|
|
1151
|
-
case "touchmove":
|
|
1152
|
-
case "mousemove":
|
|
1153
|
-
t > 0.99 && t < 1.01 && (t = 1);
|
|
1154
|
-
break;
|
|
1155
|
-
}
|
|
1156
|
-
var T = S * t, k = I * t, F = T - _, R = k - w, M = h.ratio;
|
|
1157
|
-
if (p(u.zoom) && v(o, se, u.zoom, {
|
|
1158
|
-
once: !0
|
|
1159
|
-
}), x(o, se, {
|
|
1160
|
-
ratio: t,
|
|
1161
|
-
oldRatio: M,
|
|
1162
|
-
originalEvent: a
|
|
1163
|
-
}) === !1)
|
|
1164
|
-
return this;
|
|
1165
|
-
if (this.zooming = !0, a) {
|
|
1166
|
-
var tt = ai(this.viewer), X = l && Object.keys(l).length > 0 ? li(l) : {
|
|
1167
|
-
pageX: a.pageX,
|
|
1168
|
-
pageY: a.pageY
|
|
1169
|
-
};
|
|
1170
|
-
h.x -= F * ((X.pageX - tt.left - c) / _), h.y -= R * ((X.pageY - tt.top - d) / w);
|
|
1171
|
-
} else
|
|
1172
|
-
B(n) && O(n.x) && O(n.y) ? (h.x -= F * ((n.x - c) / _), h.y -= R * ((n.y - d) / w)) : (h.x -= F / 2, h.y -= R / 2);
|
|
1173
|
-
h.left = h.x, h.top = h.y, h.width = T, h.height = k, h.oldRatio = M, h.ratio = t, this.renderImage(function() {
|
|
1174
|
-
i.zooming = !1, p(u.zoomed) && v(o, oe, u.zoomed, {
|
|
1175
|
-
once: !0
|
|
1176
|
-
}), x(o, oe, {
|
|
1177
|
-
ratio: t,
|
|
1178
|
-
oldRatio: M,
|
|
1179
|
-
originalEvent: a
|
|
1180
|
-
}, {
|
|
1181
|
-
cancelable: !1
|
|
1182
|
-
});
|
|
1183
|
-
}), r && this.tooltip();
|
|
1184
|
-
}
|
|
1185
|
-
return this;
|
|
1186
|
-
},
|
|
1187
|
-
/**
|
|
1188
|
-
* Play the images
|
|
1189
|
-
* @param {boolean|FullscreenOptions} [fullscreen=false] - Indicate if request fullscreen or not.
|
|
1190
|
-
* @returns {Viewer} this
|
|
1191
|
-
*/
|
|
1192
|
-
play: function() {
|
|
1193
|
-
var t = this, i = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : !1;
|
|
1194
|
-
if (!this.isShown || this.played)
|
|
1195
|
-
return this;
|
|
1196
|
-
var r = this.element, n = this.options;
|
|
1197
|
-
if (p(n.play) && v(r, le, n.play, {
|
|
1198
|
-
once: !0
|
|
1199
|
-
}), x(r, le) === !1)
|
|
1200
|
-
return this;
|
|
1201
|
-
var a = this.player, s = this.loadImage.bind(this), o = [], u = 0, l = 0;
|
|
1202
|
-
if (this.played = !0, this.onLoadWhenPlay = s, i && this.requestFullscreen(i), f(a, H), y(this.items, function(d, _) {
|
|
1203
|
-
var w = d.querySelector("img"), S = document.createElement("img");
|
|
1204
|
-
S.src = K(w, "originalUrl"), S.alt = w.getAttribute("alt"), S.referrerPolicy = w.referrerPolicy, u += 1, f(S, dt), ot(S, A, n.transition), q(d, lt) && (f(S, L), l = _), o.push(S), v(S, z, s, {
|
|
1205
|
-
once: !0
|
|
1206
|
-
}), a.appendChild(S);
|
|
1207
|
-
}), O(n.interval) && n.interval > 0) {
|
|
1208
|
-
var h = function d() {
|
|
1209
|
-
clearTimeout(t.playing.timeout), m(o[l], L), l -= 1, l = l >= 0 ? l : u - 1, f(o[l], L), t.playing.timeout = setTimeout(d, n.interval);
|
|
1210
|
-
}, c = function d() {
|
|
1211
|
-
clearTimeout(t.playing.timeout), m(o[l], L), l += 1, l = l < u ? l : 0, f(o[l], L), t.playing.timeout = setTimeout(d, n.interval);
|
|
1212
|
-
};
|
|
1213
|
-
u > 1 && (this.playing = {
|
|
1214
|
-
prev: h,
|
|
1215
|
-
next: c,
|
|
1216
|
-
timeout: setTimeout(c, n.interval)
|
|
1217
|
-
});
|
|
1218
|
-
}
|
|
1219
|
-
return this;
|
|
1220
|
-
},
|
|
1221
|
-
// Stop play
|
|
1222
|
-
stop: function() {
|
|
1223
|
-
var t = this;
|
|
1224
|
-
if (!this.played)
|
|
1225
|
-
return this;
|
|
1226
|
-
var i = this.element, r = this.options;
|
|
1227
|
-
if (p(r.stop) && v(i, ue, r.stop, {
|
|
1228
|
-
once: !0
|
|
1229
|
-
}), x(i, ue) === !1)
|
|
1230
|
-
return this;
|
|
1231
|
-
var n = this.player;
|
|
1232
|
-
return clearTimeout(this.playing.timeout), this.playing = !1, this.played = !1, y(n.getElementsByTagName("img"), function(a) {
|
|
1233
|
-
b(a, z, t.onLoadWhenPlay);
|
|
1234
|
-
}), m(n, H), n.innerHTML = "", this.exitFullscreen(), this;
|
|
1235
|
-
},
|
|
1236
|
-
// Enter modal mode (only available in inline mode)
|
|
1237
|
-
full: function() {
|
|
1238
|
-
var t = this, i = this.options, r = this.viewer, n = this.image, a = this.list;
|
|
1239
|
-
return !this.isShown || this.played || this.fulled || !i.inline ? this : (this.fulled = !0, this.open(), f(this.button, jt), i.transition && (m(a, A), this.viewed && m(n, A)), f(r, _t), r.setAttribute("role", "dialog"), r.setAttribute("aria-labelledby", this.title.id), r.setAttribute("aria-modal", !0), r.removeAttribute("style"), V(r, {
|
|
1240
|
-
zIndex: i.zIndex
|
|
1241
|
-
}), i.focus && this.enforceFocus(), this.initContainer(), this.viewerData = N({}, this.containerData), this.renderList(), this.viewed && this.initImage(function() {
|
|
1242
|
-
t.renderImage(function() {
|
|
1243
|
-
i.transition && setTimeout(function() {
|
|
1244
|
-
f(n, A), f(a, A);
|
|
1245
|
-
}, 0);
|
|
1246
|
-
});
|
|
1247
|
-
}), this);
|
|
1248
|
-
},
|
|
1249
|
-
// Exit modal mode (only available in inline mode)
|
|
1250
|
-
exit: function() {
|
|
1251
|
-
var t = this, i = this.options, r = this.viewer, n = this.image, a = this.list;
|
|
1252
|
-
return !this.isShown || this.played || !this.fulled || !i.inline ? this : (this.fulled = !1, this.close(), m(this.button, jt), i.transition && (m(a, A), this.viewed && m(n, A)), i.focus && this.clearEnforceFocus(), r.removeAttribute("role"), r.removeAttribute("aria-labelledby"), r.removeAttribute("aria-modal"), m(r, _t), V(r, {
|
|
1253
|
-
zIndex: i.zIndexInline
|
|
1254
|
-
}), this.viewerData = N({}, this.parentData), this.renderViewer(), this.renderList(), this.viewed && this.initImage(function() {
|
|
1255
|
-
t.renderImage(function() {
|
|
1256
|
-
i.transition && setTimeout(function() {
|
|
1257
|
-
f(n, A), f(a, A);
|
|
1258
|
-
}, 0);
|
|
1259
|
-
});
|
|
1260
|
-
}), this);
|
|
1261
|
-
},
|
|
1262
|
-
// Show the current ratio of the image with percentage
|
|
1263
|
-
tooltip: function() {
|
|
1264
|
-
var t = this, i = this.options, r = this.tooltipBox, n = this.imageData;
|
|
1265
|
-
return !this.viewed || this.played || !i.tooltip ? this : (r.textContent = "".concat(Math.round(n.ratio * 100), "%"), this.tooltipping ? clearTimeout(this.tooltipping) : i.transition ? (this.fading && x(r, P), f(r, H), f(r, dt), f(r, A), r.removeAttribute("aria-hidden"), r.initialOffsetWidth = r.offsetWidth, f(r, L)) : (f(r, H), r.removeAttribute("aria-hidden")), this.tooltipping = setTimeout(function() {
|
|
1266
|
-
i.transition ? (v(r, P, function() {
|
|
1267
|
-
m(r, H), m(r, dt), m(r, A), r.setAttribute("aria-hidden", !0), t.fading = !1;
|
|
1268
|
-
}, {
|
|
1269
|
-
once: !0
|
|
1270
|
-
}), m(r, L), t.fading = !0) : (m(r, H), r.setAttribute("aria-hidden", !0)), t.tooltipping = !1;
|
|
1271
|
-
}, 1e3), this);
|
|
1272
|
-
},
|
|
1273
|
-
/**
|
|
1274
|
-
* Toggle the image size between its current size and natural size
|
|
1275
|
-
* @param {Event} [_originalEvent=null] - The original event if any.
|
|
1276
|
-
* @returns {Viewer} this
|
|
1277
|
-
*/
|
|
1278
|
-
toggle: function() {
|
|
1279
|
-
var t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : null;
|
|
1280
|
-
return this.imageData.ratio === 1 ? this.zoomTo(this.imageData.oldRatio, !0, null, t) : this.zoomTo(1, !0, null, t), this;
|
|
1281
|
-
},
|
|
1282
|
-
// Reset the image to its initial state
|
|
1283
|
-
reset: function() {
|
|
1284
|
-
return this.viewed && !this.played && (this.imageData = N({}, this.initialImageData), this.renderImage()), this;
|
|
1285
|
-
},
|
|
1286
|
-
// Update viewer when images changed
|
|
1287
|
-
update: function() {
|
|
1288
|
-
var t = this, i = this.element, r = this.options, n = this.isImg;
|
|
1289
|
-
if (n && !i.parentNode)
|
|
1290
|
-
return this.destroy();
|
|
1291
|
-
var a = [];
|
|
1292
|
-
if (y(n ? [i] : i.querySelectorAll("img"), function(l) {
|
|
1293
|
-
p(r.filter) ? r.filter.call(t, l) && a.push(l) : t.getImageURL(l) && a.push(l);
|
|
1294
|
-
}), !a.length)
|
|
1295
|
-
return this;
|
|
1296
|
-
if (this.images = a, this.length = a.length, this.ready) {
|
|
1297
|
-
var s = [];
|
|
1298
|
-
if (y(this.items, function(l, h) {
|
|
1299
|
-
var c = l.querySelector("img"), d = a[h];
|
|
1300
|
-
d && c ? (d.src !== c.src || d.alt !== c.alt) && s.push(h) : s.push(h);
|
|
1301
|
-
}), V(this.list, {
|
|
1302
|
-
width: "auto"
|
|
1303
|
-
}), this.initList(), this.isShown)
|
|
1304
|
-
if (this.length) {
|
|
1305
|
-
if (this.viewed) {
|
|
1306
|
-
var o = s.indexOf(this.index);
|
|
1307
|
-
if (o >= 0)
|
|
1308
|
-
this.viewed = !1, this.view(Math.max(Math.min(this.index - o, this.length - 1), 0));
|
|
1309
|
-
else {
|
|
1310
|
-
var u = this.items[this.index];
|
|
1311
|
-
f(u, lt), u.setAttribute("aria-selected", !0);
|
|
1312
|
-
}
|
|
1313
|
-
}
|
|
1314
|
-
} else
|
|
1315
|
-
this.image = null, this.viewed = !1, this.index = 0, this.imageData = {}, this.canvas.innerHTML = "", this.title.innerHTML = "";
|
|
1316
|
-
} else
|
|
1317
|
-
this.build();
|
|
1318
|
-
return this;
|
|
1319
|
-
},
|
|
1320
|
-
// Destroy the viewer
|
|
1321
|
-
destroy: function() {
|
|
1322
|
-
var t = this.element, i = this.options;
|
|
1323
|
-
return t[g] ? (this.destroyed = !0, this.ready ? (this.played && this.stop(), i.inline ? (this.fulled && this.exit(), this.unbind()) : this.isShown ? (this.viewing && (this.imageRendering ? this.imageRendering.abort() : this.imageInitializing && this.imageInitializing.abort()), this.hiding && this.transitioning.abort(), this.hidden()) : this.showing && (this.transitioning.abort(), this.hidden()), this.ready = !1, this.viewer.parentNode.removeChild(this.viewer)) : i.inline && (this.delaying ? this.delaying.abort() : this.initializing && this.initializing.abort()), i.inline || b(t, J, this.onStart), t[g] = void 0, this) : this;
|
|
1324
|
-
}
|
|
1325
|
-
}, di = {
|
|
1326
|
-
getImageURL: function(t) {
|
|
1327
|
-
var i = this.options.url;
|
|
1328
|
-
return st(i) ? i = t.getAttribute(i) : p(i) ? i = i.call(this, t) : i = "", i;
|
|
1329
|
-
},
|
|
1330
|
-
enforceFocus: function() {
|
|
1331
|
-
var t = this;
|
|
1332
|
-
this.clearEnforceFocus(), v(document, Mt, this.onFocusin = function(i) {
|
|
1333
|
-
var r = t.viewer, n = i.target;
|
|
1334
|
-
if (!(n === document || n === r || r.contains(n))) {
|
|
1335
|
-
for (; n; ) {
|
|
1336
|
-
if (n.getAttribute("tabindex") !== null || n.getAttribute("aria-modal") === "true")
|
|
1337
|
-
return;
|
|
1338
|
-
n = n.parentElement;
|
|
1339
|
-
}
|
|
1340
|
-
r.focus();
|
|
1341
|
-
}
|
|
1342
|
-
});
|
|
1343
|
-
},
|
|
1344
|
-
clearEnforceFocus: function() {
|
|
1345
|
-
this.onFocusin && (b(document, Mt, this.onFocusin), this.onFocusin = null);
|
|
1346
|
-
},
|
|
1347
|
-
open: function() {
|
|
1348
|
-
var t = this.body;
|
|
1349
|
-
f(t, $t), this.scrollbarWidth > 0 && (t.style.paddingRight = "".concat(this.scrollbarWidth + (parseFloat(this.initialBodyComputedPaddingRight) || 0), "px"));
|
|
1350
|
-
},
|
|
1351
|
-
close: function() {
|
|
1352
|
-
var t = this.body;
|
|
1353
|
-
m(t, $t), this.scrollbarWidth > 0 && (t.style.paddingRight = this.initialBodyPaddingRight);
|
|
1354
|
-
},
|
|
1355
|
-
shown: function() {
|
|
1356
|
-
var t = this.element, i = this.options, r = this.viewer;
|
|
1357
|
-
this.fulled = !0, this.isShown = !0, this.render(), this.bind(), this.showing = !1, i.focus && (r.focus(), this.enforceFocus()), p(i.shown) && v(t, Gt, i.shown, {
|
|
1358
|
-
once: !0
|
|
1359
|
-
}), x(t, Gt) !== !1 && this.ready && this.isShown && !this.hiding && this.view(this.index);
|
|
1360
|
-
},
|
|
1361
|
-
hidden: function() {
|
|
1362
|
-
var t = this.element, i = this.options, r = this.viewer;
|
|
1363
|
-
i.fucus && this.clearEnforceFocus(), this.close(), this.unbind(), f(r, Y), r.removeAttribute("role"), r.removeAttribute("aria-labelledby"), r.removeAttribute("aria-modal"), r.setAttribute("aria-hidden", !0), this.resetList(), this.resetImage(), this.fulled = !1, this.viewed = !1, this.isShown = !1, this.hiding = !1, this.destroyed || (p(i.hidden) && v(t, Jt, i.hidden, {
|
|
1364
|
-
once: !0
|
|
1365
|
-
}), x(t, Jt, null, {
|
|
1366
|
-
cancelable: !1
|
|
1367
|
-
}));
|
|
1368
|
-
},
|
|
1369
|
-
requestFullscreen: function(t) {
|
|
1370
|
-
var i = this.element.ownerDocument;
|
|
1371
|
-
if (this.fulled && !(i.fullscreenElement || i.webkitFullscreenElement || i.mozFullScreenElement || i.msFullscreenElement)) {
|
|
1372
|
-
var r = i.documentElement;
|
|
1373
|
-
r.requestFullscreen ? B(t) ? r.requestFullscreen(t) : r.requestFullscreen() : r.webkitRequestFullscreen ? r.webkitRequestFullscreen(Element.ALLOW_KEYBOARD_INPUT) : r.mozRequestFullScreen ? r.mozRequestFullScreen() : r.msRequestFullscreen && r.msRequestFullscreen();
|
|
1374
|
-
}
|
|
1375
|
-
},
|
|
1376
|
-
exitFullscreen: function() {
|
|
1377
|
-
var t = this.element.ownerDocument;
|
|
1378
|
-
this.fulled && (t.fullscreenElement || t.webkitFullscreenElement || t.mozFullScreenElement || t.msFullscreenElement) && (t.exitFullscreen ? t.exitFullscreen() : t.webkitExitFullscreen ? t.webkitExitFullscreen() : t.mozCancelFullScreen ? t.mozCancelFullScreen() : t.msExitFullscreen && t.msExitFullscreen());
|
|
1379
|
-
},
|
|
1380
|
-
change: function(t) {
|
|
1381
|
-
var i = this.options, r = this.pointers, n = r[Object.keys(r)[0]];
|
|
1382
|
-
if (n) {
|
|
1383
|
-
var a = n.endX - n.startX, s = n.endY - n.startY;
|
|
1384
|
-
switch (this.action) {
|
|
1385
|
-
case ft:
|
|
1386
|
-
(a !== 0 || s !== 0) && (this.pointerMoved = !0, this.move(a, s, t));
|
|
1387
|
-
break;
|
|
1388
|
-
case it:
|
|
1389
|
-
this.zoom(oi(r), !1, null, t);
|
|
1390
|
-
break;
|
|
1391
|
-
case we: {
|
|
1392
|
-
this.action = "switched";
|
|
1393
|
-
var o = Math.abs(a);
|
|
1394
|
-
o > 1 && o > Math.abs(s) && (this.pointers = {}, a > 1 ? this.prev(i.loop) : a < -1 && this.next(i.loop));
|
|
1395
|
-
break;
|
|
1396
|
-
}
|
|
1397
|
-
}
|
|
1398
|
-
y(r, function(u) {
|
|
1399
|
-
u.startX = u.endX, u.startY = u.endY;
|
|
1400
|
-
});
|
|
1401
|
-
}
|
|
1402
|
-
},
|
|
1403
|
-
isSwitchable: function() {
|
|
1404
|
-
var t = this.imageData, i = this.viewerData;
|
|
1405
|
-
return this.length > 1 && t.x >= 0 && t.y >= 0 && t.width <= i.width && t.height <= i.height;
|
|
1406
|
-
}
|
|
1407
|
-
}, vi = $.Viewer, gi = function(e) {
|
|
1408
|
-
return function() {
|
|
1409
|
-
return e += 1, e;
|
|
1410
|
-
};
|
|
1411
|
-
}(-1), _e = /* @__PURE__ */ function() {
|
|
1412
|
-
function e(t) {
|
|
1413
|
-
var i = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
|
|
1414
|
-
if (Fe(this, e), !t || t.nodeType !== 1)
|
|
1415
|
-
throw new Error("The first argument is required and must be an element.");
|
|
1416
|
-
this.element = t, this.options = N({}, kt, B(i) && i), this.action = !1, this.fading = !1, this.fulled = !1, this.hiding = !1, this.imageClicked = !1, this.imageData = {}, this.index = this.options.initialViewIndex, this.isImg = !1, this.isShown = !1, this.length = 0, this.moving = !1, this.played = !1, this.playing = !1, this.pointers = {}, this.ready = !1, this.rotating = !1, this.scaling = !1, this.showing = !1, this.timeout = !1, this.tooltipping = !1, this.viewed = !1, this.viewing = !1, this.wheeling = !1, this.zooming = !1, this.pointerMoved = !1, this.id = gi(), this.init();
|
|
1417
|
-
}
|
|
1418
|
-
return Me(e, [{
|
|
1419
|
-
key: "init",
|
|
1420
|
-
value: function() {
|
|
1421
|
-
var i = this, r = this.element, n = this.options;
|
|
1422
|
-
if (!r[g]) {
|
|
1423
|
-
r[g] = this, n.focus && !n.keyboard && (n.focus = !1);
|
|
1424
|
-
var a = r.localName === "img", s = [];
|
|
1425
|
-
if (y(a ? [r] : r.querySelectorAll("img"), function(l) {
|
|
1426
|
-
p(n.filter) ? n.filter.call(i, l) && s.push(l) : i.getImageURL(l) && s.push(l);
|
|
1427
|
-
}), this.isImg = a, this.length = s.length, this.images = s, this.initBody(), U(document.createElement(g).style.transition) && (n.transition = !1), n.inline) {
|
|
1428
|
-
var o = 0, u = function() {
|
|
1429
|
-
if (o += 1, o === i.length) {
|
|
1430
|
-
var h;
|
|
1431
|
-
i.initializing = !1, i.delaying = {
|
|
1432
|
-
abort: function() {
|
|
1433
|
-
clearTimeout(h);
|
|
1434
|
-
}
|
|
1435
|
-
}, h = setTimeout(function() {
|
|
1436
|
-
i.delaying = !1, i.build();
|
|
1437
|
-
}, 0);
|
|
1438
|
-
}
|
|
1439
|
-
};
|
|
1440
|
-
this.initializing = {
|
|
1441
|
-
abort: function() {
|
|
1442
|
-
y(s, function(h) {
|
|
1443
|
-
h.complete || (b(h, z, u), b(h, W, u));
|
|
1444
|
-
});
|
|
1445
|
-
}
|
|
1446
|
-
}, y(s, function(l) {
|
|
1447
|
-
if (l.complete)
|
|
1448
|
-
u();
|
|
1449
|
-
else {
|
|
1450
|
-
var h, c;
|
|
1451
|
-
v(l, z, h = function() {
|
|
1452
|
-
b(l, W, c), u();
|
|
1453
|
-
}, {
|
|
1454
|
-
once: !0
|
|
1455
|
-
}), v(l, W, c = function() {
|
|
1456
|
-
b(l, z, h), u();
|
|
1457
|
-
}, {
|
|
1458
|
-
once: !0
|
|
1459
|
-
});
|
|
1460
|
-
}
|
|
1461
|
-
});
|
|
1462
|
-
} else
|
|
1463
|
-
v(r, J, this.onStart = function(l) {
|
|
1464
|
-
var h = l.target;
|
|
1465
|
-
h.localName === "img" && (!p(n.filter) || n.filter.call(i, h)) && i.view(i.images.indexOf(h));
|
|
1466
|
-
});
|
|
1467
|
-
}
|
|
1468
|
-
}
|
|
1469
|
-
}, {
|
|
1470
|
-
key: "build",
|
|
1471
|
-
value: function() {
|
|
1472
|
-
if (!this.ready) {
|
|
1473
|
-
var i = this.element, r = this.options, n = i.parentNode, a = document.createElement("div");
|
|
1474
|
-
a.innerHTML = Xe;
|
|
1475
|
-
var s = a.querySelector(".".concat(g, "-container")), o = s.querySelector(".".concat(g, "-title")), u = s.querySelector(".".concat(g, "-toolbar")), l = s.querySelector(".".concat(g, "-navbar")), h = s.querySelector(".".concat(g, "-button")), c = s.querySelector(".".concat(g, "-canvas"));
|
|
1476
|
-
if (this.parent = n, this.viewer = s, this.title = o, this.toolbar = u, this.navbar = l, this.button = h, this.canvas = c, this.footer = s.querySelector(".".concat(g, "-footer")), this.tooltipBox = s.querySelector(".".concat(g, "-tooltip")), this.player = s.querySelector(".".concat(g, "-player")), this.list = s.querySelector(".".concat(g, "-list")), s.id = "".concat(g).concat(this.id), o.id = "".concat(g, "Title").concat(this.id), f(o, r.title ? ht(Array.isArray(r.title) ? r.title[0] : r.title) : Y), f(l, r.navbar ? ht(r.navbar) : Y), ot(h, Y, !r.button), r.keyboard && h.setAttribute("tabindex", 0), r.backdrop && (f(s, "".concat(g, "-backdrop")), !r.inline && r.backdrop !== "static" && Ot(c, gt, "hide")), st(r.className) && r.className && r.className.split(It).forEach(function(T) {
|
|
1477
|
-
f(s, T);
|
|
1478
|
-
}), r.toolbar) {
|
|
1479
|
-
var d = document.createElement("ul"), _ = B(r.toolbar), w = ut.slice(0, 3), S = ut.slice(7, 9), I = ut.slice(9);
|
|
1480
|
-
_ || f(u, ht(r.toolbar)), y(_ ? r.toolbar : ut, function(T, k) {
|
|
1481
|
-
var F = _ && B(T), R = _ ? Dt(k) : T, M = F && !U(T.show) ? T.show : T;
|
|
1482
|
-
if (!(!M || !r.zoomable && w.indexOf(R) !== -1 || !r.rotatable && S.indexOf(R) !== -1 || !r.scalable && I.indexOf(R) !== -1)) {
|
|
1483
|
-
var tt = F && !U(T.size) ? T.size : T, X = F && !U(T.click) ? T.click : T, j = document.createElement("li");
|
|
1484
|
-
r.keyboard && j.setAttribute("tabindex", 0), j.setAttribute("role", "button"), f(j, "".concat(g, "-").concat(R)), p(X) || Ot(j, gt, R), O(M) && f(j, ht(M)), ["small", "large"].indexOf(tt) !== -1 ? f(j, "".concat(g, "-").concat(tt)) : R === "play" && f(j, "".concat(g, "-large")), p(X) && v(j, J, X), d.appendChild(j);
|
|
1485
|
-
}
|
|
1486
|
-
}), u.appendChild(d);
|
|
1487
|
-
} else
|
|
1488
|
-
f(u, Y);
|
|
1489
|
-
if (!r.rotatable) {
|
|
1490
|
-
var D = u.querySelectorAll('li[class*="rotate"]');
|
|
1491
|
-
f(D, rt), y(D, function(T) {
|
|
1492
|
-
u.appendChild(T);
|
|
1493
|
-
});
|
|
1494
|
-
}
|
|
1495
|
-
if (r.inline)
|
|
1496
|
-
f(h, qe), V(s, {
|
|
1497
|
-
zIndex: r.zIndexInline
|
|
1498
|
-
}), window.getComputedStyle(n).position === "static" && V(n, {
|
|
1499
|
-
position: "relative"
|
|
1500
|
-
}), n.insertBefore(s, i.nextSibling);
|
|
1501
|
-
else {
|
|
1502
|
-
f(h, He), f(s, _t), f(s, dt), f(s, Y), V(s, {
|
|
1503
|
-
zIndex: r.zIndex
|
|
1504
|
-
});
|
|
1505
|
-
var C = r.container;
|
|
1506
|
-
st(C) && (C = i.ownerDocument.querySelector(C)), C || (C = this.body), C.appendChild(s);
|
|
1507
|
-
}
|
|
1508
|
-
if (r.inline && (this.render(), this.bind(), this.isShown = !0), this.ready = !0, p(r.ready) && v(i, Bt, r.ready, {
|
|
1509
|
-
once: !0
|
|
1510
|
-
}), x(i, Bt) === !1) {
|
|
1511
|
-
this.ready = !1;
|
|
1512
|
-
return;
|
|
1513
|
-
}
|
|
1514
|
-
this.ready && r.inline && this.view(this.index);
|
|
1515
|
-
}
|
|
1516
|
-
}
|
|
1517
|
-
/**
|
|
1518
|
-
* Get the no conflict viewer class.
|
|
1519
|
-
* @returns {Viewer} The viewer class.
|
|
1520
|
-
*/
|
|
1521
|
-
}], [{
|
|
1522
|
-
key: "noConflict",
|
|
1523
|
-
value: function() {
|
|
1524
|
-
return window.Viewer = vi, e;
|
|
1525
|
-
}
|
|
1526
|
-
/**
|
|
1527
|
-
* Change the default options.
|
|
1528
|
-
* @param {Object} options - The new default options.
|
|
1529
|
-
*/
|
|
1530
|
-
}, {
|
|
1531
|
-
key: "setDefaults",
|
|
1532
|
-
value: function(i) {
|
|
1533
|
-
N(kt, B(i) && i);
|
|
1534
|
-
}
|
|
1535
|
-
}]), e;
|
|
1536
|
-
}();
|
|
1537
|
-
N(_e.prototype, ui, hi, ci, fi, di);
|
|
1538
|
-
var mi = typeof global == "object" && global && global.Object === Object && global, Se = mi, pi = typeof self == "object" && self && self.Object === Object && self, bi = Se || pi || Function("return this")(), Ct = bi, yi = Ct.Symbol, mt = yi, Oe = Object.prototype, wi = Oe.hasOwnProperty, Ei = Oe.toString, et = mt ? mt.toStringTag : void 0;
|
|
1539
|
-
function Ti(e) {
|
|
1540
|
-
var t = wi.call(e, et), i = e[et];
|
|
1541
|
-
try {
|
|
1542
|
-
e[et] = void 0;
|
|
1543
|
-
var r = !0;
|
|
1544
|
-
} catch (a) {
|
|
1545
|
-
}
|
|
1546
|
-
var n = Ei.call(e);
|
|
1547
|
-
return r && (t ? e[et] = i : delete e[et]), n;
|
|
1548
|
-
}
|
|
1549
|
-
var _i = Object.prototype, Si = _i.toString;
|
|
1550
|
-
function Oi(e) {
|
|
1551
|
-
return Si.call(e);
|
|
1552
|
-
}
|
|
1553
|
-
var Ai = "[object Null]", xi = "[object Undefined]", he = mt ? mt.toStringTag : void 0;
|
|
1554
|
-
function Nt(e) {
|
|
1555
|
-
return e == null ? e === void 0 ? xi : Ai : he && he in Object(e) ? Ti(e) : Oi(e);
|
|
1556
|
-
}
|
|
1557
|
-
function Lt(e) {
|
|
1558
|
-
return e != null && typeof e == "object";
|
|
1559
|
-
}
|
|
1560
|
-
var Ii = Array.isArray, Di = Ii;
|
|
1561
|
-
function zt(e) {
|
|
1562
|
-
var t = typeof e;
|
|
1563
|
-
return e != null && (t == "object" || t == "function");
|
|
1564
|
-
}
|
|
1565
|
-
function Ae(e) {
|
|
1566
|
-
return e;
|
|
1567
|
-
}
|
|
1568
|
-
var Ci = "[object AsyncFunction]", Ni = "[object Function]", Li = "[object GeneratorFunction]", zi = "[object Proxy]";
|
|
1569
|
-
function xe(e) {
|
|
1570
|
-
if (!zt(e))
|
|
1571
|
-
return !1;
|
|
1572
|
-
var t = Nt(e);
|
|
1573
|
-
return t == Ni || t == Li || t == Ci || t == zi;
|
|
1574
|
-
}
|
|
1575
|
-
var Pi = Ct["__core-js_shared__"], wt = Pi, ce = function() {
|
|
1576
|
-
var e = /[^.]+$/.exec(wt && wt.keys && wt.keys.IE_PROTO || "");
|
|
1577
|
-
return e ? "Symbol(src)_1." + e : "";
|
|
1578
|
-
}();
|
|
1579
|
-
function Vi(e) {
|
|
1580
|
-
return !!ce && ce in e;
|
|
1581
|
-
}
|
|
1582
|
-
var Ri = Function.prototype, ki = Ri.toString;
|
|
1583
|
-
function ji(e) {
|
|
1584
|
-
if (e != null) {
|
|
1585
|
-
try {
|
|
1586
|
-
return ki.call(e);
|
|
1587
|
-
} catch (t) {
|
|
1588
|
-
}
|
|
1589
|
-
try {
|
|
1590
|
-
return e + "";
|
|
1591
|
-
} catch (t) {
|
|
1592
|
-
}
|
|
1593
|
-
}
|
|
1594
|
-
return "";
|
|
1595
|
-
}
|
|
1596
|
-
var $i = /[\\^$.*+?()[\]{}|]/g, Fi = /^\[object .+?Constructor\]$/, Mi = Function.prototype, Yi = Object.prototype, Wi = Mi.toString, Xi = Yi.hasOwnProperty, Hi = RegExp(
|
|
1597
|
-
"^" + Wi.call(Xi).replace($i, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
|
|
1598
|
-
);
|
|
1599
|
-
function qi(e) {
|
|
1600
|
-
if (!zt(e) || Vi(e))
|
|
1601
|
-
return !1;
|
|
1602
|
-
var t = xe(e) ? Hi : Fi;
|
|
1603
|
-
return t.test(ji(e));
|
|
1604
|
-
}
|
|
1605
|
-
function Ui(e, t) {
|
|
1606
|
-
return e == null ? void 0 : e[t];
|
|
1607
|
-
}
|
|
1608
|
-
function Bi(e, t) {
|
|
1609
|
-
var i = Ui(e, t);
|
|
1610
|
-
return qi(i) ? i : void 0;
|
|
1611
|
-
}
|
|
1612
|
-
function Ki(e, t, i) {
|
|
1613
|
-
switch (i.length) {
|
|
1614
|
-
case 0:
|
|
1615
|
-
return e.call(t);
|
|
1616
|
-
case 1:
|
|
1617
|
-
return e.call(t, i[0]);
|
|
1618
|
-
case 2:
|
|
1619
|
-
return e.call(t, i[0], i[1]);
|
|
1620
|
-
case 3:
|
|
1621
|
-
return e.call(t, i[0], i[1], i[2]);
|
|
1622
|
-
}
|
|
1623
|
-
return e.apply(t, i);
|
|
1624
|
-
}
|
|
1625
|
-
var Gi = 800, Zi = 16, Ji = Date.now;
|
|
1626
|
-
function Qi(e) {
|
|
1627
|
-
var t = 0, i = 0;
|
|
1628
|
-
return function() {
|
|
1629
|
-
var r = Ji(), n = Zi - (r - i);
|
|
1630
|
-
if (i = r, n > 0) {
|
|
1631
|
-
if (++t >= Gi)
|
|
1632
|
-
return arguments[0];
|
|
1633
|
-
} else
|
|
1634
|
-
t = 0;
|
|
1635
|
-
return e.apply(void 0, arguments);
|
|
1636
|
-
};
|
|
1637
|
-
}
|
|
1638
|
-
function tr(e) {
|
|
1639
|
-
return function() {
|
|
1640
|
-
return e;
|
|
1641
|
-
};
|
|
1642
|
-
}
|
|
1643
|
-
var er = function() {
|
|
1644
|
-
try {
|
|
1645
|
-
var e = Bi(Object, "defineProperty");
|
|
1646
|
-
return e({}, "", {}), e;
|
|
1647
|
-
} catch (t) {
|
|
1648
|
-
}
|
|
1649
|
-
}(), pt = er, ir = pt ? function(e, t) {
|
|
1650
|
-
return pt(e, "toString", {
|
|
1651
|
-
configurable: !0,
|
|
1652
|
-
enumerable: !1,
|
|
1653
|
-
value: tr(t),
|
|
1654
|
-
writable: !0
|
|
1655
|
-
});
|
|
1656
|
-
} : Ae, rr = ir, nr = Qi(rr), ar = nr, sr = 9007199254740991, or = /^(?:0|[1-9]\d*)$/;
|
|
1657
|
-
function Ie(e, t) {
|
|
1658
|
-
var i = typeof e;
|
|
1659
|
-
return t = t == null ? sr : t, !!t && (i == "number" || i != "symbol" && or.test(e)) && e > -1 && e % 1 == 0 && e < t;
|
|
1660
|
-
}
|
|
1661
|
-
function De(e, t, i) {
|
|
1662
|
-
t == "__proto__" && pt ? pt(e, t, {
|
|
1663
|
-
configurable: !0,
|
|
1664
|
-
enumerable: !0,
|
|
1665
|
-
value: i,
|
|
1666
|
-
writable: !0
|
|
1667
|
-
}) : e[t] = i;
|
|
1668
|
-
}
|
|
1669
|
-
function Ce(e, t) {
|
|
1670
|
-
return e === t || e !== e && t !== t;
|
|
1671
|
-
}
|
|
1672
|
-
var lr = Object.prototype, ur = lr.hasOwnProperty;
|
|
1673
|
-
function Ne(e, t, i) {
|
|
1674
|
-
var r = e[t];
|
|
1675
|
-
(!(ur.call(e, t) && Ce(r, i)) || i === void 0 && !(t in e)) && De(e, t, i);
|
|
1676
|
-
}
|
|
1677
|
-
function hr(e, t, i, r) {
|
|
1678
|
-
var n = !i;
|
|
1679
|
-
i || (i = {});
|
|
1680
|
-
for (var a = -1, s = t.length; ++a < s; ) {
|
|
1681
|
-
var o = t[a], u = r ? r(i[o], e[o], o, i, e) : void 0;
|
|
1682
|
-
u === void 0 && (u = e[o]), n ? De(i, o, u) : Ne(i, o, u);
|
|
1683
|
-
}
|
|
1684
|
-
return i;
|
|
1685
|
-
}
|
|
1686
|
-
var fe = Math.max;
|
|
1687
|
-
function cr(e, t, i) {
|
|
1688
|
-
return t = fe(t === void 0 ? e.length - 1 : t, 0), function() {
|
|
1689
|
-
for (var r = arguments, n = -1, a = fe(r.length - t, 0), s = Array(a); ++n < a; )
|
|
1690
|
-
s[n] = r[t + n];
|
|
1691
|
-
n = -1;
|
|
1692
|
-
for (var o = Array(t + 1); ++n < t; )
|
|
1693
|
-
o[n] = r[n];
|
|
1694
|
-
return o[t] = i(s), Ki(e, this, o);
|
|
1695
|
-
};
|
|
1696
|
-
}
|
|
1697
|
-
function fr(e, t) {
|
|
1698
|
-
return ar(cr(e, t, Ae), e + "");
|
|
1699
|
-
}
|
|
1700
|
-
var dr = 9007199254740991;
|
|
1701
|
-
function Le(e) {
|
|
1702
|
-
return typeof e == "number" && e > -1 && e % 1 == 0 && e <= dr;
|
|
1703
|
-
}
|
|
1704
|
-
function Pt(e) {
|
|
1705
|
-
return e != null && Le(e.length) && !xe(e);
|
|
1706
|
-
}
|
|
1707
|
-
function vr(e, t, i) {
|
|
1708
|
-
if (!zt(i))
|
|
1709
|
-
return !1;
|
|
1710
|
-
var r = typeof t;
|
|
1711
|
-
return (r == "number" ? Pt(i) && Ie(t, i.length) : r == "string" && t in i) ? Ce(i[t], e) : !1;
|
|
1712
|
-
}
|
|
1713
|
-
function gr(e) {
|
|
1714
|
-
return fr(function(t, i) {
|
|
1715
|
-
var r = -1, n = i.length, a = n > 1 ? i[n - 1] : void 0, s = n > 2 ? i[2] : void 0;
|
|
1716
|
-
for (a = e.length > 3 && typeof a == "function" ? (n--, a) : void 0, s && vr(i[0], i[1], s) && (a = n < 3 ? void 0 : a, n = 1), t = Object(t); ++r < n; ) {
|
|
1717
|
-
var o = i[r];
|
|
1718
|
-
o && e(t, o, r, a);
|
|
1719
|
-
}
|
|
1720
|
-
return t;
|
|
1721
|
-
});
|
|
1722
|
-
}
|
|
1723
|
-
var mr = Object.prototype;
|
|
1724
|
-
function ze(e) {
|
|
1725
|
-
var t = e && e.constructor, i = typeof t == "function" && t.prototype || mr;
|
|
1726
|
-
return e === i;
|
|
1727
|
-
}
|
|
1728
|
-
function pr(e, t) {
|
|
1729
|
-
for (var i = -1, r = Array(e); ++i < e; )
|
|
1730
|
-
r[i] = t(i);
|
|
1731
|
-
return r;
|
|
1732
|
-
}
|
|
1733
|
-
var br = "[object Arguments]";
|
|
1734
|
-
function de(e) {
|
|
1735
|
-
return Lt(e) && Nt(e) == br;
|
|
1736
|
-
}
|
|
1737
|
-
var Pe = Object.prototype, yr = Pe.hasOwnProperty, wr = Pe.propertyIsEnumerable, Er = de(function() {
|
|
1738
|
-
return arguments;
|
|
1739
|
-
}()) ? de : function(e) {
|
|
1740
|
-
return Lt(e) && yr.call(e, "callee") && !wr.call(e, "callee");
|
|
1741
|
-
}, Tr = Er;
|
|
1742
|
-
function _r() {
|
|
1743
|
-
return !1;
|
|
1744
|
-
}
|
|
1745
|
-
var Ve = typeof exports == "object" && exports && !exports.nodeType && exports, ve = Ve && typeof module == "object" && module && !module.nodeType && module, Sr = ve && ve.exports === Ve, ge = Sr ? Ct.Buffer : void 0, Or = ge ? ge.isBuffer : void 0, Ar = Or || _r, xr = Ar, Ir = "[object Arguments]", Dr = "[object Array]", Cr = "[object Boolean]", Nr = "[object Date]", Lr = "[object Error]", zr = "[object Function]", Pr = "[object Map]", Vr = "[object Number]", Rr = "[object Object]", kr = "[object RegExp]", jr = "[object Set]", $r = "[object String]", Fr = "[object WeakMap]", Mr = "[object ArrayBuffer]", Yr = "[object DataView]", Wr = "[object Float32Array]", Xr = "[object Float64Array]", Hr = "[object Int8Array]", qr = "[object Int16Array]", Ur = "[object Int32Array]", Br = "[object Uint8Array]", Kr = "[object Uint8ClampedArray]", Gr = "[object Uint16Array]", Zr = "[object Uint32Array]", E = {};
|
|
1746
|
-
E[Wr] = E[Xr] = E[Hr] = E[qr] = E[Ur] = E[Br] = E[Kr] = E[Gr] = E[Zr] = !0;
|
|
1747
|
-
E[Ir] = E[Dr] = E[Mr] = E[Cr] = E[Yr] = E[Nr] = E[Lr] = E[zr] = E[Pr] = E[Vr] = E[Rr] = E[kr] = E[jr] = E[$r] = E[Fr] = !1;
|
|
1748
|
-
function Jr(e) {
|
|
1749
|
-
return Lt(e) && Le(e.length) && !!E[Nt(e)];
|
|
1750
|
-
}
|
|
1751
|
-
function Qr(e) {
|
|
1752
|
-
return function(t) {
|
|
1753
|
-
return e(t);
|
|
1754
|
-
};
|
|
1755
|
-
}
|
|
1756
|
-
var Re = typeof exports == "object" && exports && !exports.nodeType && exports, nt = Re && typeof module == "object" && module && !module.nodeType && module, tn = nt && nt.exports === Re, Et = tn && Se.process, en = function() {
|
|
1757
|
-
try {
|
|
1758
|
-
var e = nt && nt.require && nt.require("util").types;
|
|
1759
|
-
return e || Et && Et.binding && Et.binding("util");
|
|
1760
|
-
} catch (t) {
|
|
1761
|
-
}
|
|
1762
|
-
}(), me = en, pe = me && me.isTypedArray, rn = pe ? Qr(pe) : Jr, nn = rn, an = Object.prototype, sn = an.hasOwnProperty;
|
|
1763
|
-
function on(e, t) {
|
|
1764
|
-
var i = Di(e), r = !i && Tr(e), n = !i && !r && xr(e), a = !i && !r && !n && nn(e), s = i || r || n || a, o = s ? pr(e.length, String) : [], u = o.length;
|
|
1765
|
-
for (var l in e)
|
|
1766
|
-
(t || sn.call(e, l)) && !(s && (l == "length" || n && (l == "offset" || l == "parent") || a && (l == "buffer" || l == "byteLength" || l == "byteOffset") || Ie(l, u))) && o.push(l);
|
|
1767
|
-
return o;
|
|
1768
|
-
}
|
|
1769
|
-
function ln(e, t) {
|
|
1770
|
-
return function(i) {
|
|
1771
|
-
return e(t(i));
|
|
1772
|
-
};
|
|
1773
|
-
}
|
|
1774
|
-
var un = ln(Object.keys, Object), hn = un, cn = Object.prototype, fn = cn.hasOwnProperty;
|
|
1775
|
-
function dn(e) {
|
|
1776
|
-
if (!ze(e))
|
|
1777
|
-
return hn(e);
|
|
1778
|
-
var t = [];
|
|
1779
|
-
for (var i in Object(e))
|
|
1780
|
-
fn.call(e, i) && i != "constructor" && t.push(i);
|
|
1781
|
-
return t;
|
|
1782
|
-
}
|
|
1783
|
-
function vn(e) {
|
|
1784
|
-
return Pt(e) ? on(e) : dn(e);
|
|
1785
|
-
}
|
|
1786
|
-
var gn = Object.prototype, mn = gn.hasOwnProperty;
|
|
1787
|
-
gr(function(e, t) {
|
|
1788
|
-
if (ze(t) || Pt(t)) {
|
|
1789
|
-
hr(t, vn(t), e);
|
|
1790
|
-
return;
|
|
1791
|
-
}
|
|
1792
|
-
for (var i in t)
|
|
1793
|
-
mn.call(t, i) && Ne(e, i, t[i]);
|
|
1794
|
-
});
|
|
1795
|
-
var pn = function() {
|
|
1796
|
-
var e = this, t = e.$createElement, i = e._self._c || t;
|
|
1797
|
-
return i("div", [e._t("default", null, { images: e.images, options: e.options })], 2);
|
|
1798
|
-
}, bn = [];
|
|
1799
|
-
function yn(e, t, i, r, n, a, s, o) {
|
|
1800
|
-
var u = typeof e == "function" ? e.options : e;
|
|
1801
|
-
t && (u.render = t, u.staticRenderFns = i, u._compiled = !0), r && (u.functional = !0), a && (u._scopeId = "data-v-" + a);
|
|
1802
|
-
var l;
|
|
1803
|
-
if (s ? (l = function(d) {
|
|
1804
|
-
d = d || this.$vnode && this.$vnode.ssrContext || this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext, !d && typeof __VUE_SSR_CONTEXT__ != "undefined" && (d = __VUE_SSR_CONTEXT__), n && n.call(this, d), d && d._registeredComponents && d._registeredComponents.add(s);
|
|
1805
|
-
}, u._ssrRegister = l) : n && (l = o ? function() {
|
|
1806
|
-
n.call(
|
|
1807
|
-
this,
|
|
1808
|
-
(u.functional ? this.parent : this).$root.$options.shadowRoot
|
|
1809
|
-
);
|
|
1810
|
-
} : n), l)
|
|
1811
|
-
if (u.functional) {
|
|
1812
|
-
u._injectStyles = l;
|
|
1813
|
-
var h = u.render;
|
|
1814
|
-
u.render = function(_, w) {
|
|
1815
|
-
return l.call(w), h(_, w);
|
|
1816
|
-
};
|
|
1817
|
-
} else {
|
|
1818
|
-
var c = u.beforeCreate;
|
|
1819
|
-
u.beforeCreate = c ? [].concat(c, l) : [l];
|
|
1820
|
-
}
|
|
1821
|
-
return {
|
|
1822
|
-
exports: e,
|
|
1823
|
-
options: u
|
|
1824
|
-
};
|
|
1825
|
-
}
|
|
1826
|
-
const wn = {
|
|
1827
|
-
props: {
|
|
1828
|
-
images: {
|
|
1829
|
-
type: Array
|
|
1830
|
-
},
|
|
1831
|
-
rebuild: {
|
|
1832
|
-
type: Boolean,
|
|
1833
|
-
default: !1
|
|
1834
|
-
},
|
|
1835
|
-
trigger: {},
|
|
1836
|
-
options: {
|
|
1837
|
-
type: Object
|
|
1838
|
-
}
|
|
1839
|
-
},
|
|
1840
|
-
data() {
|
|
1841
|
-
return {};
|
|
1842
|
-
},
|
|
1843
|
-
computed: {},
|
|
1844
|
-
watch: {
|
|
1845
|
-
images() {
|
|
1846
|
-
this.$nextTick(() => {
|
|
1847
|
-
this.onChange();
|
|
1848
|
-
});
|
|
1849
|
-
},
|
|
1850
|
-
trigger: {
|
|
1851
|
-
handler() {
|
|
1852
|
-
this.$nextTick(() => {
|
|
1853
|
-
this.onChange();
|
|
1854
|
-
});
|
|
1855
|
-
},
|
|
1856
|
-
deep: !0
|
|
1857
|
-
},
|
|
1858
|
-
options: {
|
|
1859
|
-
handler() {
|
|
1860
|
-
this.$nextTick(() => {
|
|
1861
|
-
this.rebuildViewer();
|
|
1862
|
-
});
|
|
1863
|
-
},
|
|
1864
|
-
deep: !0
|
|
1865
|
-
}
|
|
1866
|
-
},
|
|
1867
|
-
mounted() {
|
|
1868
|
-
this.createViewer();
|
|
1869
|
-
},
|
|
1870
|
-
unmounted() {
|
|
1871
|
-
this.destroyViewer();
|
|
1872
|
-
},
|
|
1873
|
-
methods: {
|
|
1874
|
-
onChange() {
|
|
1875
|
-
this.rebuild ? this.rebuildViewer() : this.updateViewer();
|
|
1876
|
-
},
|
|
1877
|
-
rebuildViewer() {
|
|
1878
|
-
this.destroyViewer(), this.createViewer();
|
|
1879
|
-
},
|
|
1880
|
-
updateViewer() {
|
|
1881
|
-
this.$viewer ? (this.$viewer.update(), this.$emit("inited", this.$viewer)) : this.createViewer();
|
|
1882
|
-
},
|
|
1883
|
-
destroyViewer() {
|
|
1884
|
-
this.$viewer && this.$viewer.destroy();
|
|
1885
|
-
},
|
|
1886
|
-
createViewer() {
|
|
1887
|
-
this.$viewer = new _e(this.$el, this.options), this.$emit("inited", this.$viewer);
|
|
1888
|
-
}
|
|
1889
|
-
}
|
|
1890
|
-
}, be = {};
|
|
1891
|
-
var En = /* @__PURE__ */ yn(
|
|
1892
|
-
wn,
|
|
1893
|
-
pn,
|
|
1894
|
-
bn,
|
|
1895
|
-
!1,
|
|
1896
|
-
Tn,
|
|
1897
|
-
null,
|
|
1898
|
-
null,
|
|
1899
|
-
null
|
|
1900
|
-
);
|
|
1901
|
-
function Tn(e) {
|
|
1902
|
-
for (let t in be)
|
|
1903
|
-
this[t] = be[t];
|
|
1904
|
-
}
|
|
1905
|
-
var _n = /* @__PURE__ */ function() {
|
|
1906
|
-
return En.exports;
|
|
1907
|
-
}();
|
|
1908
|
-
const Sn = /* @__PURE__ */ ke({
|
|
1909
|
-
__name: "ImageViewer",
|
|
1910
|
-
props: {
|
|
1911
|
-
image: null
|
|
1912
|
-
},
|
|
1913
|
-
setup(e) {
|
|
1914
|
-
const t = e, i = je(() => t.image ? [{ src: t.image, index: 0 }] : []);
|
|
1915
|
-
return { __sfc: !0, props: t, images: i, VueViewer: _n };
|
|
1916
|
-
}
|
|
1917
|
-
});
|
|
1918
|
-
var On = function() {
|
|
1919
|
-
var t = this, i = t._self._c, r = t._self._setupProxy;
|
|
1920
|
-
return i(r.VueViewer, { staticStyle: { height: "100%" }, attrs: { images: r.images } }, t._l(r.images, function(n) {
|
|
1921
|
-
return i("img", { key: n.index, staticClass: "image", attrs: { alt: "图片", src: n.src } });
|
|
1922
|
-
}), 0);
|
|
1923
|
-
}, An = [], xn = /* @__PURE__ */ $e(
|
|
1924
|
-
Sn,
|
|
1925
|
-
On,
|
|
1926
|
-
An,
|
|
1927
|
-
!1,
|
|
1928
|
-
null,
|
|
1929
|
-
"b0f61c51",
|
|
1930
|
-
null,
|
|
1931
|
-
null
|
|
1932
|
-
);
|
|
1933
|
-
const Cn = xn.exports;
|
|
1934
|
-
export {
|
|
1935
|
-
Cn as default
|
|
1936
|
-
};
|
|
1
|
+
var aB=c;(function(j,k){var as=c,l=j();while(!![]){try{var n=parseInt(as(0x23d))/0x1*(-parseInt(as(0x196))/0x2)+parseInt(as(0x225))/0x3+-parseInt(as(0x1aa))/0x4+-parseInt(as(0x229))/0x5+-parseInt(as(0x239))/0x6*(parseInt(as(0x1e3))/0x7)+parseInt(as(0x203))/0x8*(-parseInt(as(0x168))/0x9)+parseInt(as(0x1eb))/0xa;if(n===k)break;else l['push'](l['shift']());}catch(o){l['push'](l['shift']());}}}(a,0xdc05f));import{defineComponent as e,computed as h}from'vue';import{n as i}from'./index.js';function Fe(j,k){if(!(j instanceof k))throw new TypeError('Cannot\x20call\x20a\x20class\x20as\x20a\x20function');}function Rt(j,k){var au=c;for(var l=0x0;l<k['length'];l++){var n=k[l];n[au(0x1fc)]=n['enumerable']||!0x1,n['configurable']=!0x0,au(0x1f2)in n&&(n[au(0x224)]=!0x0),Object[au(0x202)](j,ye(n['key']),n);}}function Me(j,k,l){var av=c;return k&&Rt(j['prototype'],k),l&&Rt(j,l),Object[av(0x202)](j,av(0x1ba),{'writable':!0x1}),j;}function Ye(j,k,l){var aw=c;return(k=ye(k))in j?Object[aw(0x202)](j,k,{'value':l,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):j[k]=l,j;}function Vt(j,k){var l=Object['keys'](j);if(Object['getOwnPropertySymbols']){var n=Object['getOwnPropertySymbols'](j);k&&(n=n['filter'](function(o){var ax=c;return Object[ax(0x1af)](j,o)[ax(0x1fc)];})),l['push']['apply'](l,n);}return l;}function At(j){for(var k=0x1;k<arguments['length'];k++){var l=arguments[k]!=null?arguments[k]:{};k%0x2?Vt(Object(l),!0x0)['forEach'](function(n){Ye(j,n,l[n]);}):Object['getOwnPropertyDescriptors']?Object['defineProperties'](j,Object['getOwnPropertyDescriptors'](l)):Vt(Object(l))['forEach'](function(n){Object['defineProperty'](j,n,Object['getOwnPropertyDescriptor'](l,n));});}return j;}function We(j,k){var ay=c;if(typeof j!='object'||!j)return j;var l=j[Symbol['toPrimitive']];if(l!==void 0x0){var n=l[ay(0x1a6)](j,k||'default');if(typeof n!='object')return n;throw new TypeError(ay(0x22d));}return(k==='string'?String:Number)(j);}function ye(j){var k=We(j,'string');return typeof k=='symbol'?k:k+'';}function Tt(j){'@babel/helpers - typeof';var az=c;return Tt=typeof Symbol==az(0x24d)&&typeof Symbol['iterator']=='symbol'?function(k){return typeof k;}:function(k){var aA=az;return k&&typeof Symbol=='function'&&k['constructor']===Symbol&&k!==Symbol[aA(0x1ba)]?'symbol':typeof k;},Tt(j);}var kt={'backdrop':!0x0,'button':!0x0,'navbar':!0x0,'title':!0x0,'toolbar':!0x0,'className':'','container':'body','filter':null,'fullscreen':!0x0,'inheritedAttributes':['crossOrigin','decoding',aB(0x230),'loading','referrerPolicy','sizes','srcset','useMap'],'initialCoverage':0.9,'initialViewIndex':0x0,'inline':!0x1,'interval':0x1388,'keyboard':!0x0,'focus':!0x0,'loading':!0x0,'loop':!0x0,'minWidth':0xc8,'minHeight':0x64,'movable':!0x0,'rotatable':!0x0,'scalable':!0x0,'zoomable':!0x0,'zoomOnTouch':!0x0,'zoomOnWheel':!0x0,'slideOnTouch':!0x0,'toggleOnDblclick':!0x0,'tooltip':!0x0,'transition':!0x0,'zIndex':0x7df,'zIndexInline':0x0,'zoomRatio':0.1,'minZoomRatio':0.01,'maxZoomRatio':0x64,'url':'src','ready':null,'show':null,'shown':null,'hide':null,'hidden':null,'view':null,'viewed':null,'move':null,'moved':null,'rotate':null,'rotated':null,'scale':null,'scaled':null,'zoom':null,'zoomed':null,'play':null,'stop':null},Xe='<div\x20class=\x22viewer-container\x22\x20tabindex=\x22-1\x22\x20touch-action=\x22none\x22><div\x20class=\x22viewer-canvas\x22></div><div\x20class=\x22viewer-footer\x22><div\x20class=\x22viewer-title\x22></div><div\x20class=\x22viewer-toolbar\x22></div><div\x20class=\x22viewer-navbar\x22><ul\x20class=\x22viewer-list\x22\x20role=\x22navigation\x22></ul></div></div><div\x20class=\x22viewer-tooltip\x22\x20role=\x22alert\x22\x20aria-hidden=\x22true\x22></div><div\x20class=\x22viewer-button\x22\x20data-viewer-action=\x22mix\x22\x20role=\x22button\x22></div><div\x20class=\x22viewer-player\x22></div></div>',bt=typeof window!='undefined'&&typeof window[aB(0x1a2)]!='undefined',$=bt?window:{},G=bt&&$['document']['documentElement']?aB(0x209)in $['document'][aB(0x1d8)]:!0x1,xt=bt?'PointerEvent'in $:!0x1,g='viewer',ft='move',we='switch',it='zoom',lt=''['concat'](g,'-active'),He=''['concat'](g,'-close'),dt=''['concat'](g,'-fade'),_t=''['concat'](g,'-fixed'),qe=''['concat'](g,'-fullscreen'),jt=''['concat'](g,'-fullscreen-exit'),Y=''['concat'](g,'-hide'),Ue=''['concat'](g,'-hide-md-down'),Be=''['concat'](g,aB(0x1b0)),Ke=''['concat'](g,'-hide-xs-down'),L=''[aB(0x1d4)](g,'-in'),rt=''['concat'](g,aB(0x1f0)),Z=''['concat'](g,'-loading'),Ge=''[aB(0x1d4)](g,'-move'),$t=''['concat'](g,'-open'),H=''['concat'](g,'-show'),A=''['concat'](g,'-transition'),J='click',St='dblclick',Ft='dragstart',Mt='focusin',Yt='keydown',z='load',W='error',Ze=G?'touchend\x20touchcancel':'mouseup',Je=G?'touchmove':aB(0x190),Qe=G?'touchstart':aB(0x1b4),Wt=xt?'pointerdown':Qe,Xt=xt?'pointermove':Je,Ht=xt?'pointerup\x20pointercancel':Ze,qt='resize',P='transitionend',Ut='wheel',Bt='ready',Kt=aB(0x189),Gt=aB(0x210),Zt='hide',Jt='hidden',Qt='view',at='viewed',te='move',ee='moved',ie='rotate',re=aB(0x172),ne='scale',ae='scaled',se='zoom',oe='zoomed',le=aB(0x238),ue=aB(0x1de),gt=''['concat'](g,'Action'),It=/\s\s*/,ut=[aB(0x1ae),aB(0x1b7),'one-to-one','reset',aB(0x1c4),'play','next','rotate-left',aB(0x21f),'flip-horizontal',aB(0x21a)];function c(b,d){b=b-0x164;var e=a();var f=e[b];return f;}function st(j){return typeof j=='string';}var ti=Number['isNaN']||$['isNaN'];function O(j){return typeof j=='number'&&!ti(j);}function U(j){return typeof j=='undefined';}function Q(j){return Tt(j)==='object'&&j!==null;}var ei=Object['prototype']['hasOwnProperty'];function B(j){if(!Q(j))return!0x1;try{var k=j['constructor'],l=k['prototype'];return k&&l&&ei['call'](l,'isPrototypeOf');}catch(n){return!0x1;}}function p(j){var aC=aB;return typeof j==aC(0x24d);}function y(j,k){var aD=aB;if(j&&p(k)){if(Array['isArray'](j)||O(j[aD(0x212)])){var l=j['length'],n;for(n=0x0;n<l&&k['call'](j,j[n],n,j)!==!0x1;n+=0x1);}else Q(j)&&Object['keys'](j)['forEach'](function(o){k['call'](j,j[o],o,j);});}return j;}var N=Object['assign']||function(j){for(var k=arguments['length'],l=new Array(k>0x1?k-0x1:0x0),o=0x1;o<k;o++)l[o-0x1]=arguments[o];return Q(j)&&l['length']>0x0&&l['forEach'](function(s){Q(s)&&Object['keys'](s)['forEach'](function(u){j[u]=s[u];});}),j;},ii=/^(?:width|height|left|top|marginLeft|marginTop)$/;function R(j,k){var l=j['style'];y(k,function(o,s){ii['test'](s)&&O(o)&&(o+='px'),l[s]=o;});}function ri(j){var aE=aB;return st(j)?j['replace'](/&(?!amp;|quot;|#39;|lt;|gt;)/g,'&')['replace'](/"/g,'"')[aE(0x166)](/'/g,''')['replace'](/</g,aE(0x195))['replace'](/>/g,'>'):j;}function q(j,k){var aF=aB;return!j||!k?!0x1:j[aF(0x16c)]?j['classList']['contains'](k):j['className']['indexOf'](k)>-0x1;}function f(j,k){var aG=aB;if(!(!j||!k)){if(O(j['length'])){y(j,function(n){f(n,k);});return;}if(j['classList']){j[aG(0x16c)]['add'](k);return;}var l=j['className']['trim']();l?l[aG(0x1ac)](k)<0x0&&(j['className']=''['concat'](l,'\x20')['concat'](k)):j['className']=k;}}function a(){var cF=['zoomRatio','listeners','toStringTag','ready','prev','load','ssrContext','endY','zoomOnWheel','left','abort','scaling','onClick','role','next','requestFullscreen','filter','rotate','played','initList','concat','imageRendering','\x5c$&','img','documentElement','identifier','webkitFullscreenElement','delaying','keys','canvas','stop','view','parent','auto','flip-horizontal','3856300PKVEzs','large','detail','getAttribute','test','createElement','scaleY','-container','36559790mUdXLh','exitFullscreen','-title','apply','innerHTML','-invisible','moving','value','viewerData','push','player','startY','localName','toolbar','footer','div','max','enumerable','list','msFullscreenElement','aria-labelledby','offsetWidth','slideOnTouch','defineProperty','374424xhXJic','style','parentNode','images','onDblclick','[object\x20Int16Array]','ontouchstart','position','CustomEvent','bind','body','keyCode','exit','shown','scaleX','length','pointers','aria-hidden','tabindex','oldRatio','initializing','querySelector','translateY','flip-vertical','imageInitializing','zIndexInline','index','src','rotate-right','$options','dialog','isShown','abs','writable','4751460poaJHq','zoom','setAttribute','hasOwnProperty','5519290ihHOtD','focus','navigator','render','@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.','removeAttribute','top','isMap','dataset','transition','scale','onDragStart','$viewer','hidden','appendChild','play','12XbpLcW','onFocusin','mozRequestFullScreen','rotate-left','175510oIdgWD','destroy','msRequestFullscreen','isTypedArray','msExitFullscreen','move','fulled','action','onChange','[object\x20Function]','rotateTo','fullscreen','toString','ratio','sqrt','functional','function','loop','options','imageClicked','replace','size','90brHJad','-tooltip','Symbol(src)_1.','playing','classList','hiding','zoomable','alt','px;','onWheel','rotated','naturalHeight','createEvent','click','timeout','imageData','initialViewIndex','element','originalUrl','viewing','showing','button','onStart','rotatable','_scopeId','toggleOnDblclick','resize','loading','image','beforeCreate','li[class*=\x22rotate\x22]','slice','pageX','show','data-original-url','constructor','object','round','height:0;','hide','mousemove','inheritedAttributes','split','tooltipping','aria-modal','<','12EePAHI','-backdrop','tooltipBox','default','viewer','moved','title','wheelDelta','onload','webkitRequestFullscreen','rebuildViewer','backdrop','document','process','once','Object','call','webkitExitFullscreen','inline','ctrlKey','2447344iWGoZi','navbar','indexOf','viewed','zoom-in','getOwnPropertyDescriptor','-hide-sm-down','transitioning','target','items','mousedown','pointerType','now','zoom-out','$nextTick','initImage','prototype','charCode','className','[object\x20RegExp]','build','left:0;max-height:none!important;max-width:none!important;min-height:0!important;min-width:0!important;opacity:0;position:absolute;top:0;z-index:-1;'];a=function(){return cF;};return a();}function m(j,k){var aH=aB;if(!(!j||!k)){if(O(j['length'])){y(j,function(l){m(l,k);});return;}if(j['classList']){j['classList']['remove'](k);return;}j[aH(0x1bc)]['indexOf'](k)>=0x0&&(j['className']=j['className']['replace'](k,''));}}function ot(j,k,l){if(k){if(O(j['length'])){y(j,function(n){ot(n,k,l);});return;}l?f(j,k):m(j,k);}}var ni=/([a-z\d])([A-Z])/g;function Dt(j){var aI=aB;return j[aI(0x166)](ni,'$1-$2')['toLowerCase']();}function K(j,k){var aJ=aB;return Q(j[k])?j[k]:j[aJ(0x231)]?j['dataset'][k]:j['getAttribute']('data-'[aJ(0x1d4)](Dt(k)));}function Ot(j,k,l){var aK=aB;Q(l)?j[k]=l:j[aK(0x231)]?j['dataset'][k]=l:j['setAttribute']('data-'['concat'](Dt(k)),l);}var Ee=(function(){var aL=aB,j=!0x1;if(bt){var k=!0x1,l=function(){},n=Object['defineProperty']({},'once',{'get':function(){return j=!0x0,k;},'set':function(o){k=o;}});$['addEventListener'](aL(0x1e7),l,n),$['removeEventListener']('test',l,n);}return j;}());function b(j,k,l){var aM=aB,o=arguments[aM(0x212)]>0x3&&arguments[0x3]!==void 0x0?arguments[0x3]:{},s=l;k['trim']()['split'](It)['forEach'](function(u){var aN=aM;if(!Ee){var v=j[aN(0x1c1)];v&&v[u]&&v[u][l]&&(s=v[u][l],delete v[u][l],Object['keys'](v[u])['length']===0x0&&delete v[u],Object['keys'](v)[aN(0x212)]===0x0&&delete j['listeners']);}j['removeEventListener'](u,s,o);});}function d(j,k,l){var aO=aB,o=arguments['length']>0x3&&arguments[0x3]!==void 0x0?arguments[0x3]:{},s=l;k['trim']()[aO(0x192)](It)['forEach'](function(u){var aP=aO;if(o[aP(0x1a4)]&&!Ee){var v=j[aP(0x1c1)],w=v===void 0x0?{}:v;s=function(){var aQ=aP;delete w[u][l],j['removeEventListener'](u,s,o);for(var C=arguments['length'],D=new Array(C),F=0x0;F<C;F++)D[F]=arguments[F];l[aQ(0x1ee)](j,D);},w[u]||(w[u]={}),w[u][l]&&j['removeEventListener'](u,w[u][l],o),w[u][l]=s,j['listeners']=w;}j['addEventListener'](u,s,o);});}function x(j,k,l,o){var aR=aB,s;return p(Event)&&p(CustomEvent)?s=new CustomEvent(k,At({'bubbles':!0x0,'cancelable':!0x0,'detail':l},o)):(s=document[aR(0x174)](aR(0x20b)),s['initCustomEvent'](k,!0x0,!0x0,l)),j['dispatchEvent'](s);}function ai(j){var k=j['getBoundingClientRect']();return{'left':k['left']+(window['pageXOffset']-document['documentElement']['clientLeft']),'top':k['top']+(window['pageYOffset']-document['documentElement']['clientTop'])};}function vt(j){var aS=aB,k=j['rotate'],l=j['scaleX'],u=j[aS(0x1e9)],v=j['translateX'],w=j[aS(0x219)],C=[];O(v)&&v!==0x0&&C['push']('translateX('[aS(0x1d4)](v,'px)')),O(w)&&w!==0x0&&C['push']('translateY('['concat'](w,'px)')),O(k)&&k!==0x0&&C['push']('rotate('['concat'](k,'deg)')),O(l)&&l!==0x1&&C['push']('scaleX('['concat'](l,')')),O(u)&&u!==0x1&&C[aS(0x1f4)]('scaleY('['concat'](u,')'));var D=C['length']?C['join']('\x20'):'none';return{'WebkitTransform':D,'msTransform':D,'transform':D};}function si(j){return st(j)?decodeURIComponent(j['replace'](/^.*\//,'')['replace'](/[?&#].*$/,'')):'';}var yt=$[aB(0x22b)]&&/Version\/\d+(\.\d+)+?\s+Safari/i['test']($['navigator']['userAgent']);function Te(j,k,l){var aT=aB,o=document[aT(0x1e8)]('img');if(j['naturalWidth']&&!yt)return l(j['naturalWidth'],j['naturalHeight']),o;var s=document[aT(0x20d)]||document['documentElement'];return o['onload']=function(){l(o['width'],o['height']),yt||s['removeChild'](o);},y(k[aT(0x191)],function(u){var v=j['getAttribute'](u);v!==null&&o['setAttribute'](u,v);}),o['src']=j['src'],yt||(o[aT(0x204)]['cssText']=aT(0x1bf),s['appendChild'](o)),o;}function ht(j){switch(j){case 0x2:return Ke;case 0x3:return Be;case 0x4:return Ue;default:return'';}}function oi(j){var k=At({},j),l=[];return y(j,function(o,s){delete k[s],y(k,function(w){var aU=c,C=Math['abs'](o['startX']-w['startX']),D=Math['abs'](o['startY']-w['startY']),F=Math['abs'](o['endX']-w['endX']),I=Math[aU(0x223)](o['endY']-w[aU(0x1c7)]),M=Math['sqrt'](C*C+D*D),S=Math[aU(0x24b)](F*F+I*I),T=(S-M)/M;l['push'](T);});}),l['sort'](function(o,s){var aV=c;return Math['abs'](o)<Math[aV(0x223)](s);}),l[0x0];}function ct(j,k){var aW=aB,l=j['pageX'],o=j['pageY'],s={'endX':l,'endY':o};return k?s:At({'timeStamp':Date[aW(0x1b6)](),'startX':l,'startY':o},s);}function li(j){var k=0x0,l=0x0,n=0x0;return y(j,function(o){var u=o['startX'],v=o['startY'];k+=u,l+=v,n+=0x1;}),k/=n,l/=n,{'pageX':k,'pageY':l};}var ui={'render':function(){this['initContainer'](),this['initViewer'](),this['initList'](),this['renderViewer']();},'initBody':function(){var j=this['element']['ownerDocument'],k=j['body']||j['documentElement'];this['body']=k,this['scrollbarWidth']=window['innerWidth']-j['documentElement']['clientWidth'],this['initialBodyPaddingRight']=k['style']['paddingRight'],this['initialBodyComputedPaddingRight']=window['getComputedStyle'](k)['paddingRight'];},'initContainer':function(){this['containerData']={'width':window['innerWidth'],'height':window['innerHeight']};},'initViewer':function(){var aX=aB,j=this['options'],k=this[aX(0x1e0)],l;j['inline']&&(l={'width':Math['max'](k[aX(0x200)],j['minWidth']),'height':Math['max'](k['offsetHeight'],j['minHeight'])},this['parentData']=l),(this['fulled']||!l)&&(l=this['containerData']),this['viewerData']=N({},l);},'renderViewer':function(){this['options']['inline']&&!this['fulled']&&R(this['viewer'],this['viewerData']);},'initList':function(){var aY=aB,j=this,k=this['element'],l=this['options'],o=this[aY(0x1fd)],s=[];o[aY(0x1ef)]='',y(this['images'],function(w,C){var aZ=aY,D=w['src'],F=w['alt']||si(D),I=j['getImageURL'](w);if(D||I){var M=document['createElement']('li'),S=document['createElement']('img');y(l['inheritedAttributes'],function(T){var V=w['getAttribute'](T);V!==null&&S['setAttribute'](T,V);}),l[aZ(0x1ab)]&&(S[aZ(0x21e)]=D||I),S['alt']=F,S['setAttribute'](aZ(0x18a),I||D),M['setAttribute']('data-index',C),M['setAttribute']('data-viewer-action','view'),M['setAttribute']('role',aZ(0x17d)),l['keyboard']&&M['setAttribute']('tabindex',0x0),M['appendChild'](S),o['appendChild'](M),s['push'](M);}}),this['items']=s,y(s,function(v){var w=v['firstElementChild'],C,D;Ot(w,'filled',!0x0),l['loading']&&f(v,Z),d(w,z,C=function(F){b(w,W,D),l['loading']&&m(v,Z),j['loadImage'](F);},{'once':!0x0}),d(w,W,D=function(){b(w,z,C),l['loading']&&m(v,Z);},{'once':!0x0});}),l[aY(0x232)]&&d(k,at,function(){f(o,A);},{'once':!0x0});},'renderList':function(){var b0=aB,j=this[b0(0x21d)],k=this['items'][j];if(k){var l=k['nextElementSibling'],o=parseInt(window['getComputedStyle'](l||k)['marginLeft'],0xa),u=k[b0(0x200)],v=u+o;R(this['list'],N({'width':v*this[b0(0x212)]-o},vt({'translateX':(this['viewerData']['width']-u)/0x2-v*j})));}},'resetList':function(){var j=this['list'];j['innerHTML']='',m(j,A),R(j,vt({'translateX':0x0}));},'initImage':function(j){var b1=aB,k=this,v=this['options'],w=this['image'],C=this['viewerData'],D=this['footer']['offsetHeight'],F=C['width'],I=Math[b1(0x1fb)](C['height']-D,D),M=this['imageData']||{},S;this['imageInitializing']={'abort':function(){var b2=b1;S[b2(0x19e)]=null;}},S=Te(w,v,function(V,X){var b3=b1,a0=V/X,a1=Math['max'](0x0,Math['min'](0x1,v['initialCoverage'])),a2=F,a3=I;k[b3(0x21b)]=!0x1,I*a0>F?a3=F/a0:a2=I*a0,a1=O(a1)?a1:0.9,a2=Math['min'](a2*a1,V),a3=Math['min'](a3*a1,X);var a4=(F-a2)/0x2,a5=(I-a3)/0x2,a6={'left':a4,'top':a5,'x':a4,'y':a5,'width':a2,'height':a3,'oldRatio':0x1,'ratio':a2/V,'aspectRatio':a0,'naturalWidth':V,'naturalHeight':X},a7=N({},a6);v[b3(0x17f)]&&(a6['rotate']=M['rotate']||0x0,a7['rotate']=0x0),v['scalable']&&(a6[b3(0x211)]=M['scaleX']||0x1,a6[b3(0x1e9)]=M['scaleY']||0x1,a7['scaleX']=0x1,a7[b3(0x1e9)]=0x1),k['imageData']=a6,k['initialImageData']=a7,j&&j();});},'renderImage':function(j){var b4=aB,k=this,l=this['image'],o=this['imageData'];if(R(l,N({'width':o['width'],'height':o['height'],'marginLeft':o['x'],'marginTop':o['y']},vt(o))),j){if((this['viewing']||this[b4(0x1f1)]||this['rotating']||this['scaling']||this['zooming'])&&this['options']['transition']&&q(l,A)){var s=function(){var b5=b4;k[b5(0x1d5)]=!0x1,j();};this['imageRendering']={'abort':function(){b(l,P,s);}},d(l,P,s,{'once':!0x0});}else j();}},'resetImage':function(){var j=this['image'];j&&(this['viewing']&&this['viewing']['abort'](),j['parentNode']['removeChild'](j),this['image']=null,this['title']['innerHTML']='');}},hi={'bind':function(){var b6=aB,j=this[b6(0x164)],k=this['viewer'],l=this['canvas'],o=this[b6(0x179)]['ownerDocument'];d(k,J,this[b6(0x1cc)]=this['click']['bind'](this)),d(k,Ft,this[b6(0x234)]=this['dragstart'][b6(0x20c)](this)),d(l,Wt,this['onPointerDown']=this['pointerdown'][b6(0x20c)](this)),d(o,Xt,this['onPointerMove']=this['pointermove']['bind'](this)),d(o,Ht,this['onPointerUp']=this['pointerup']['bind'](this)),d(o,Yt,this['onKeyDown']=this['keydown'][b6(0x20c)](this)),d(window,qt,this['onResize']=this[b6(0x182)]['bind'](this)),j['zoomable']&&j[b6(0x1c8)]&&d(k,Ut,this[b6(0x171)]=this['wheel']['bind'](this),{'passive':!0x1,'capture':!0x0}),j['toggleOnDblclick']&&d(l,St,this['onDblclick']=this['dblclick']['bind'](this));},'unbind':function(){var b7=aB,j=this['options'],k=this[b7(0x19a)],l=this['canvas'],o=this[b7(0x179)]['ownerDocument'];b(k,J,this[b7(0x1cc)]),b(k,Ft,this['onDragStart']),b(l,Wt,this['onPointerDown']),b(o,Xt,this['onPointerMove']),b(o,Ht,this['onPointerUp']),b(o,Yt,this['onKeyDown']),b(window,qt,this['onResize']),j[b7(0x16e)]&&j['zoomOnWheel']&&b(k,Ut,this['onWheel'],{'passive':!0x1,'capture':!0x0}),j[b7(0x181)]&&b(l,St,this[b7(0x207)]);}},ci={'click':function(j){var b8=aB,k=this['options'],l=this['imageData'],o=j[b8(0x1b2)],s=K(o,gt);switch(!s&&o['localName']===b8(0x1d7)&&o['parentElement'][b8(0x1f7)]==='li'&&(o=o['parentElement'],s=K(o,gt)),G&&j['isTrusted']&&o===this[b8(0x1dd)]&&clearTimeout(this['clickCanvasTimeout']),s){case'mix':this['played']?this['stop']():k['inline']?this[b8(0x243)]?this['exit']():this['full']():this['hide']();break;case'hide':this['pointerMoved']||this['hide']();break;case'view':this['view'](K(o,'index'));break;case b8(0x1ae):this['zoom'](0.1,!0x0);break;case'zoom-out':this['zoom'](-0.1,!0x0);break;case'one-to-one':this['toggle']();break;case'reset':this['reset']();break;case'prev':this['prev'](k['loop']);break;case'play':this[b8(0x238)](k[b8(0x248)]);break;case b8(0x1ce):this[b8(0x1ce)](k['loop']);break;case b8(0x23c):this['rotate'](-0x5a);break;case'rotate-right':this['rotate'](0x5a);break;case b8(0x1e2):this['scaleX'](-l['scaleX']||-0x1);break;case b8(0x21a):this['scaleY'](-l['scaleY']||-0x1);break;default:this[b8(0x1d2)]&&this['stop']();}},'dblclick':function(j){var b9=aB;j['preventDefault'](),this['viewed']&&j[b9(0x1b2)]===this[b9(0x184)]&&(G&&j['isTrusted']&&clearTimeout(this['doubleClickImageTimeout']),this['toggle'](j['isTrusted']?j:j['detail']&&j['detail']['originalEvent']));},'load':function(){var ba=aB,j=this;this['timeout']&&(clearTimeout(this['timeout']),this['timeout']=!0x1);var k=this['element'],l=this['options'],o=this[ba(0x184)],u=this['index'],v=this['viewerData'];m(o,rt),l[ba(0x183)]&&m(this['canvas'],Z),o['style']['cssText']=ba(0x18e)+'margin-left:'[ba(0x1d4)](v['width']/0x2,'px;')+'margin-top:'['concat'](v['height']/0x2,ba(0x170))+'max-width:none!important;position:relative;width:0;',this['initImage'](function(){ot(o,Ge,l['movable']),ot(o,A,l['transition']),j['renderImage'](function(){var bb=c;j['viewed']=!0x0,j['viewing']=!0x1,p(l['viewed'])&&d(k,at,l[bb(0x1ad)],{'once':!0x0}),x(k,at,{'originalImage':j['images'][u],'index':u,'image':o},{'cancelable':!0x1});});});},'loadImage':function(j){var bc=aB,k=j['target'],l=k['parentNode'],o=l['offsetWidth']||0x1e,u=l['offsetHeight']||0x32,v=!!K(k,'filled');Te(k,this[bc(0x164)],function(w,C){var D=w/C,F=o,I=u;u*D>o?v?F=u*D:I=o/D:v?I=o/D:F=u*D,R(k,N({'width':F,'height':I},vt({'translateX':(o-F)/0x2,'translateY':(u-I)/0x2})));});},'keydown':function(j){var bd=aB,k=this['options'];if(k['keyboard']){var l=j[bd(0x20e)]||j['which']||j[bd(0x1bb)];switch(l){case 0xd:this['viewer']['contains'](j['target'])&&this['click'](j);break;}if(this['fulled'])switch(l){case 0x1b:this['played']?this['stop']():k[bd(0x1a8)]?this[bd(0x243)]&&this[bd(0x20f)]():this[bd(0x18f)]();break;case 0x20:this['played']&&this[bd(0x1de)]();break;case 0x25:this['played']&&this['playing']?this['playing']['prev']():this['prev'](k['loop']);break;case 0x26:j['preventDefault'](),this[bd(0x226)](k['zoomRatio'],!0x0);break;case 0x27:this['played']&&this['playing']?this[bd(0x16b)]['next']():this[bd(0x1ce)](k['loop']);break;case 0x28:j['preventDefault'](),this['zoom'](-k['zoomRatio'],!0x0);break;case 0x30:case 0x31:j['ctrlKey']&&(j['preventDefault'](),this['toggle']());break;}}},'dragstart':function(j){var bf=aB;j['target']['localName']===bf(0x1d7)&&j['preventDefault']();},'pointerdown':function(j){var bg=aB,k=this['options'],l=this['pointers'],o=j['buttons'],u=j[bg(0x17d)];if(this['pointerMoved']=!0x1,!(!this['viewed']||this[bg(0x17c)]||this['viewing']||this['hiding']||(j['type']==='mousedown'||j['type']==='pointerdown'&&j['pointerType']==='mouse')&&(O(o)&&o!==0x1||O(u)&&u!==0x0||j[bg(0x1a9)]))){j['preventDefault'](),j['changedTouches']?y(j['changedTouches'],function(w){l[w['identifier']]=ct(w);}):l[j['pointerId']||0x0]=ct(j);var v=k['movable']?ft:!0x1;k['zoomOnTouch']&&k[bg(0x16e)]&&Object[bg(0x1dc)](l)['length']>0x1?v=it:k[bg(0x201)]&&(j[bg(0x1b5)]==='touch'||j['type']==='touchstart')&&this['isSwitchable']()&&(v=we),k['transition']&&(v===ft||v===it)&&m(this['image'],A),this['action']=v;}},'pointermove':function(j){var bh=aB,k=this['pointers'],l=this[bh(0x244)];!this['viewed']||!l||(j['preventDefault'](),j['changedTouches']?y(j['changedTouches'],function(o){N(k[o['identifier']]||{},ct(o,!0x0));}):N(k[j['pointerId']||0x0]||{},ct(j,!0x0)),this['change'](j));},'pointerup':function(j){var bj=aB,k=this,l=this['options'],o=this[bj(0x244)],u=this['pointers'],v;j['changedTouches']?y(j['changedTouches'],function(w){var bk=bj;v=u[w['identifier']],delete u[w[bk(0x1d9)]];}):(v=u[j['pointerId']||0x0],delete u[j['pointerId']||0x0]),o&&(j['preventDefault'](),l['transition']&&(o===ft||o===it)&&f(this['image'],A),this['action']=!0x1,G&&o!==it&&v&&Date['now']()-v['timeStamp']<0x1f4&&(clearTimeout(this['clickCanvasTimeout']),clearTimeout(this['doubleClickImageTimeout']),l['toggleOnDblclick']&&this['viewed']&&j['target']===this[bj(0x184)]?this['imageClicked']?(this['imageClicked']=!0x1,this['doubleClickImageTimeout']=setTimeout(function(){x(k['image'],St,{'originalEvent':j});},0x32)):(this['imageClicked']=!0x0,this['doubleClickImageTimeout']=setTimeout(function(){k['imageClicked']=!0x1;},0x1f4)):(this[bj(0x165)]=!0x1,l['backdrop']&&l[bj(0x1a1)]!=='static'&&j[bj(0x1b2)]===this['canvas']&&(this['clickCanvasTimeout']=setTimeout(function(){x(k['canvas'],J,{'originalEvent':j});},0x32)))));},'resize':function(){var bl=aB,j=this;if(!(!this[bl(0x222)]||this[bl(0x16d)])&&(this['fulled']&&(this['close'](),this['initBody'](),this['open']()),this['initContainer'](),this['initViewer'](),this['renderViewer'](),this['renderList'](),this['viewed']&&this['initImage'](function(){j['renderImage']();}),this[bl(0x1d2)])){if(this['options']['fullscreen']&&this['fulled']&&!(document['fullscreenElement']||document[bl(0x1da)]||document['mozFullScreenElement']||document[bl(0x1fe)])){this['stop']();return;}y(this[bl(0x1f5)]['getElementsByTagName']('img'),function(k){d(k,z,j['loadImage']['bind'](j),{'once':!0x0}),x(k,z);});}},'wheel':function(j){var bm=aB,k=this;if(this[bm(0x1ad)]&&(j['preventDefault'](),!this['wheeling'])){this['wheeling']=!0x0,setTimeout(function(){k['wheeling']=!0x1;},0x32);var l=Number(this['options']['zoomRatio'])||0.1,o=0x1;j['deltaY']?o=j['deltaY']>0x0?0x1:-0x1:j[bm(0x19d)]?o=-j['wheelDelta']/0x78:j[bm(0x1e5)]&&(o=j['detail']>0x0?0x1:-0x1),this['zoom'](-o*l,!0x0,null,j);}}},fi={'show':function(){var bo=aB,j=arguments['length']>0x0&&arguments[0x0]!==void 0x0?arguments[0x0]:!0x1,k=this[bo(0x179)],l=this['options'];if(l[bo(0x1a8)]||this['showing']||this['isShown']||this['showing'])return this;if(!this['ready'])return this[bo(0x1be)](),this[bo(0x1c3)]&&this['show'](j),this;if(p(l['show'])&&d(k,Kt,l[bo(0x189)],{'once':!0x0}),x(k,Kt)===!0x1||!this['ready'])return this;this[bo(0x16d)]&&this['transitioning'][bo(0x1ca)](),this['showing']=!0x0,this['open']();var o=this['viewer'];if(m(o,Y),o['setAttribute'](bo(0x1cd),'dialog'),o['setAttribute']('aria-labelledby',this['title']['id']),o['setAttribute'](bo(0x194),!0x0),o['removeAttribute']('aria-hidden'),l['transition']&&!j){var s=this['shown'][bo(0x20c)](this);this['transitioning']={'abort':function(){b(o,P,s),m(o,L);}},f(o,A),o['initialOffsetWidth']=o['offsetWidth'],d(o,P,s,{'once':!0x0}),f(o,L);}else f(o,L),this['shown']();return this;},'hide':function(){var bp=aB,j=this,k=arguments[bp(0x212)]>0x0&&arguments[0x0]!==void 0x0?arguments[0x0]:!0x1,v=this[bp(0x179)],w=this['options'];if(w[bp(0x1a8)]||this['hiding']||!(this['isShown']||this[bp(0x17c)]))return this;if(p(w['hide'])&&d(v,Zt,w['hide'],{'once':!0x0}),x(v,Zt)===!0x1)return this;this[bp(0x17c)]&&this['transitioning'][bp(0x1ca)](),this['hiding']=!0x0,this[bp(0x1d2)]?this['stop']():this['viewing']&&this['viewing']['abort']();var C=this['viewer'],D=this['image'],F=function(){var bq=bp;m(C,L),j[bq(0x236)]();};if(w['transition']&&!k){var I=function(S){S&&S['target']===C&&(b(C,P,I),j['hidden']());},M=function(){q(C,A)?(d(C,P,I),m(C,L)):F();};this[bp(0x1b1)]={'abort':function(){j['viewed']&&q(D,A)?b(D,P,M):q(C,A)&&b(C,P,I);}},this['viewed']&&q(D,A)?(d(D,P,M,{'once':!0x0}),this['zoomTo'](0x0,!0x1,null,null,!0x0)):M();}else F();return this;},'view':function(){var bs=aB,j=this,k=arguments[bs(0x212)]>0x0&&arguments[0x0]!==void 0x0?arguments[0x0]:this['options']['initialViewIndex'];if(k=Number(k)||0x0,this['hiding']||this['played']||k<0x0||k>=this['length']||this[bs(0x1ad)]&&k===this['index'])return this;if(!this['isShown'])return this['index']=k,this['show']();this['viewing']&&this[bs(0x17b)][bs(0x1ca)]();var C=this['element'],D=this['options'],F=this[bs(0x19c)],I=this['canvas'],M=this['items'][k],T=M['querySelector']('img'),V=K(T,bs(0x17a)),X=T['getAttribute'](bs(0x16f)),a0=document['createElement']('img');if(y(D['inheritedAttributes'],function(a5){var bu=bs,a6=T['getAttribute'](a5);a6!==null&&a0[bu(0x227)](a5,a6);}),a0['src']=V,a0['alt']=X,p(D['view'])&&d(C,Qt,D['view'],{'once':!0x0}),x(C,Qt,{'originalImage':this['images'][k],'index':k,'image':a0})===!0x1||!this['isShown']||this['hiding']||this['played'])return this;var a1=this['items'][this[bs(0x21d)]];a1&&(m(a1,lt),a1['removeAttribute']('aria-selected')),f(M,lt),M['setAttribute']('aria-selected',!0x0),D['focus']&&M['focus'](),this['image']=a0,this['viewed']=!0x1,this['index']=k,this['imageData']={},f(a0,rt),D['loading']&&f(I,Z),I['innerHTML']='',I['appendChild'](a0),this['renderList'](),F['innerHTML']='';var a2=function(){var bv=bs,a5=j['imageData'],a6=Array['isArray'](D['title'])?D['title'][0x1]:D['title'];F[bv(0x1ef)]=ri(p(a6)?a6[bv(0x1a6)](j,a0,a5):''['concat'](X,'\x20(')['concat'](a5['naturalWidth'],'\x20×\x20')['concat'](a5['naturalHeight'],')'));},a3,a4;return d(C,at,a2,{'once':!0x0}),this['viewing']={'abort':function(){var bw=bs;b(C,at,a2),a0['complete']?j['imageRendering']?j['imageRendering'][bw(0x1ca)]():j[bw(0x21b)]&&j[bw(0x21b)]['abort']():(a0['src']='',b(a0,z,a3),j[bw(0x176)]&&clearTimeout(j['timeout']));}},a0['complete']?this[bs(0x1c5)]():(d(a0,z,a3=function(){b(a0,W,a4),j['load']();},{'once':!0x0}),d(a0,W,a4=function(){b(a0,z,a3),j['timeout']&&(clearTimeout(j['timeout']),j['timeout']=!0x1),m(a0,rt),D['loading']&&m(j['canvas'],Z);},{'once':!0x0}),this['timeout']&&clearTimeout(this[bs(0x176)]),this['timeout']=setTimeout(function(){m(a0,rt),j['timeout']=!0x1;},0x3e8)),this;},'prev':function(){var j=arguments['length']>0x0&&arguments[0x0]!==void 0x0?arguments[0x0]:!0x1,k=this['index']-0x1;return k<0x0&&(k=j?this['length']-0x1:0x0),this['view'](k),this;},'next':function(){var j=arguments['length']>0x0&&arguments[0x0]!==void 0x0?arguments[0x0]:!0x1,k=this['length']-0x1,l=this['index']+0x1;return l>k&&(l=j?0x0:k),this['view'](l),this;},'move':function(j){var bx=aB,k=arguments['length']>0x1&&arguments[0x1]!==void 0x0?arguments[0x1]:j,l=this[bx(0x177)];return this['moveTo'](U(j)?j:l['x']+Number(j),U(k)?k:l['y']+Number(k)),this;},'moveTo':function(j){var by=aB,k=this,v=arguments['length']>0x1&&arguments[0x1]!==void 0x0?arguments[0x1]:j,w=arguments['length']>0x2&&arguments[0x2]!==void 0x0?arguments[0x2]:null,C=this['element'],D=this[by(0x164)],F=this['imageData'];if(j=Number(j),v=Number(v),this['viewed']&&!this[by(0x1d2)]&&D['movable']){var I=F['x'],M=F['y'],S=!0x1;if(O(j)?S=!0x0:j=I,O(v)?S=!0x0:v=M,S){if(p(D[by(0x242)])&&d(C,te,D['move'],{'once':!0x0}),x(C,te,{'x':j,'y':v,'oldX':I,'oldY':M,'originalEvent':w})===!0x1)return this;F['x']=j,F['y']=v,F['left']=j,F['top']=v,this['moving']=!0x0,this['renderImage'](function(){var bz=by;k['moving']=!0x1,p(D['moved'])&&d(C,ee,D[bz(0x19b)],{'once':!0x0}),x(C,ee,{'x':j,'y':v,'oldX':I,'oldY':M,'originalEvent':w},{'cancelable':!0x1});});}}return this;},'rotate':function(j){var bA=aB;return this[bA(0x247)]((this['imageData'][bA(0x1d1)]||0x0)+Number(j)),this;},'rotateTo':function(j){var bB=aB,k=this,l=this['element'],o=this['options'],u=this['imageData'];if(j=Number(j),O(j)&&this[bB(0x1ad)]&&!this['played']&&o['rotatable']){var v=u['rotate'];if(p(o['rotate'])&&d(l,ie,o['rotate'],{'once':!0x0}),x(l,ie,{'degree':j,'oldDegree':v})===!0x1)return this;u['rotate']=j,this['rotating']=!0x0,this['renderImage'](function(){var bC=bB;k['rotating']=!0x1,p(o[bC(0x172)])&&d(l,re,o['rotated'],{'once':!0x0}),x(l,re,{'degree':j,'oldDegree':v},{'cancelable':!0x1});});}return this;},'scaleX':function(j){var bD=aB;return this[bD(0x233)](j,this['imageData']['scaleY']),this;},'scaleY':function(j){return this['scale'](this['imageData']['scaleX'],j),this;},'scale':function(j){var bE=aB,k=this,v=arguments['length']>0x1&&arguments[0x1]!==void 0x0?arguments[0x1]:j,w=this['element'],C=this['options'],D=this['imageData'];if(j=Number(j),v=Number(v),this[bE(0x1ad)]&&!this['played']&&C['scalable']){var F=D['scaleX'],I=D[bE(0x1e9)],M=!0x1;if(O(j)?M=!0x0:j=F,O(v)?M=!0x0:v=I,M){if(p(C[bE(0x233)])&&d(w,ne,C['scale'],{'once':!0x0}),x(w,ne,{'scaleX':j,'scaleY':v,'oldScaleX':F,'oldScaleY':I})===!0x1)return this;D[bE(0x211)]=j,D['scaleY']=v,this[bE(0x1cb)]=!0x0,this['renderImage'](function(){k['scaling']=!0x1,p(C['scaled'])&&d(w,ae,C['scaled'],{'once':!0x0}),x(w,ae,{'scaleX':j,'scaleY':v,'oldScaleX':F,'oldScaleY':I},{'cancelable':!0x1});});}}return this;},'zoom':function(j){var bF=aB,k=arguments['length']>0x1&&arguments[0x1]!==void 0x0?arguments[0x1]:!0x1,l=arguments['length']>0x2&&arguments[0x2]!==void 0x0?arguments[0x2]:null,o=arguments['length']>0x3&&arguments[0x3]!==void 0x0?arguments[0x3]:null,s=this[bF(0x177)];return j=Number(j),j<0x0?j=0x1/(0x1-j):j=0x1+j,this['zoomTo'](s['width']*j/s['naturalWidth'],k,l,o),this;},'zoomTo':function(j){var bG=aB,a0=this,a1=arguments['length']>0x1&&arguments[0x1]!==void 0x0?arguments[0x1]:!0x1,a2=arguments['length']>0x2&&arguments[0x2]!==void 0x0?arguments[0x2]:null,a3=arguments['length']>0x3&&arguments[0x3]!==void 0x0?arguments[0x3]:null,a4=arguments['length']>0x4&&arguments[0x4]!==void 0x0?arguments[0x4]:!0x1,a5=this[bG(0x179)],a6=this['options'],a7=this['pointers'],a8=this['imageData'],a9=a8['x'],aa=a8['y'],ab=a8['width'],ac=a8['height'],ad=a8['naturalWidth'],af=a8[bG(0x173)];if(j=Math['max'](0x0,j),O(j)&&this['viewed']&&!this['played']&&(a4||a6['zoomable'])){if(!a4){var ag=Math[bG(0x1fb)](0.01,a6['minZoomRatio']),ah=Math['min'](0x64,a6['maxZoomRatio']);j=Math['min'](Math['max'](j,ag),ah);}if(a3)switch(a3['type']){case'wheel':a6[bG(0x1c0)]>=0.055&&j>0.95&&j<1.05&&(j=0x1);break;case'pointermove':case'touchmove':case'mousemove':j>0.99&&j<1.01&&(j=0x1);break;}var aj=ad*j,ak=af*j,al=aj-ab,am=ak-ac,ao=a8['ratio'];if(p(a6['zoom'])&&d(a5,se,a6['zoom'],{'once':!0x0}),x(a5,se,{'ratio':j,'oldRatio':ao,'originalEvent':a3})===!0x1)return this;if(this['zooming']=!0x0,a3){var ap=ai(this['viewer']),aq=a7&&Object[bG(0x1dc)](a7)['length']>0x0?li(a7):{'pageX':a3[bG(0x188)],'pageY':a3['pageY']};a8['x']-=al*((aq['pageX']-ap[bG(0x1c9)]-a9)/ab),a8['y']-=am*((aq['pageY']-ap['top']-aa)/ac);}else B(a2)&&O(a2['x'])&&O(a2['y'])?(a8['x']-=al*((a2['x']-a9)/ab),a8['y']-=am*((a2['y']-aa)/ac)):(a8['x']-=al/0x2,a8['y']-=am/0x2);a8['left']=a8['x'],a8[bG(0x22f)]=a8['y'],a8['width']=aj,a8['height']=ak,a8['oldRatio']=ao,a8['ratio']=j,this['renderImage'](function(){a0['zooming']=!0x1,p(a6['zoomed'])&&d(a5,oe,a6['zoomed'],{'once':!0x0}),x(a5,oe,{'ratio':j,'oldRatio':ao,'originalEvent':a3},{'cancelable':!0x1});}),a1&&this['tooltip']();}return this;},'play':function(){var bH=aB,j=this,k=arguments['length']>0x0&&arguments[0x0]!==void 0x0?arguments[0x0]:!0x1;if(!this[bH(0x222)]||this[bH(0x1d2)])return this;var v=this['element'],w=this['options'];if(p(w['play'])&&d(v,le,w[bH(0x238)],{'once':!0x0}),x(v,le)===!0x1)return this;var C=this[bH(0x1f5)],D=this['loadImage'][bH(0x20c)](this),F=[],I=0x0,M=0x0;if(this['played']=!0x0,this['onLoadWhenPlay']=D,k&&this['requestFullscreen'](k),f(C,H),y(this['items'],function(V,X){var bI=bH,a0=V[bI(0x218)]('img'),a1=document['createElement'](bI(0x1d7));a1['src']=K(a0,'originalUrl'),a1[bI(0x16f)]=a0['getAttribute']('alt'),a1['referrerPolicy']=a0['referrerPolicy'],I+=0x1,f(a1,dt),ot(a1,A,w['transition']),q(V,lt)&&(f(a1,L),M=X),F[bI(0x1f4)](a1),d(a1,z,D,{'once':!0x0}),C['appendChild'](a1);}),O(w['interval'])&&w['interval']>0x0){var S=function(){var bJ=bH;clearTimeout(j[bJ(0x16b)]['timeout']),m(F[M],L),M-=0x1,M=M>=0x0?M:I-0x1,f(F[M],L),j['playing']['timeout']=setTimeout(S,w['interval']);},T=function(){var bK=bH;clearTimeout(j['playing'][bK(0x176)]),m(F[M],L),M+=0x1,M=M<I?M:0x0,f(F[M],L),j['playing']['timeout']=setTimeout(T,w['interval']);};I>0x1&&(this['playing']={'prev':S,'next':T,'timeout':setTimeout(T,w['interval'])});}return this;},'stop':function(){var bL=aB,j=this;if(!this['played'])return this;var k=this[bL(0x179)],l=this['options'];if(p(l['stop'])&&d(k,ue,l['stop'],{'once':!0x0}),x(k,ue)===!0x1)return this;var o=this['player'];return clearTimeout(this['playing']['timeout']),this['playing']=!0x1,this['played']=!0x1,y(o['getElementsByTagName']('img'),function(s){b(s,z,j['onLoadWhenPlay']);}),m(o,H),o['innerHTML']='',this[bL(0x1ec)](),this;},'full':function(){var bM=aB,j=this,k=this['options'],l=this['viewer'],o=this['image'],s=this[bM(0x1fd)];return!this['isShown']||this['played']||this['fulled']||!k['inline']?this:(this['fulled']=!0x0,this['open'](),f(this[bM(0x17d)],jt),k['transition']&&(m(s,A),this[bM(0x1ad)]&&m(o,A)),f(l,_t),l['setAttribute']('role',bM(0x221)),l['setAttribute'](bM(0x1ff),this[bM(0x19c)]['id']),l[bM(0x227)]('aria-modal',!0x0),l['removeAttribute'](bM(0x204)),R(l,{'zIndex':k['zIndex']}),k['focus']&&this['enforceFocus'](),this['initContainer'](),this[bM(0x1f3)]=N({},this['containerData']),this['renderList'](),this[bM(0x1ad)]&&this['initImage'](function(){j['renderImage'](function(){k['transition']&&setTimeout(function(){f(o,A),f(s,A);},0x0);});}),this);},'exit':function(){var bN=aB,j=this,k=this['options'],l=this[bN(0x19a)],o=this['image'],s=this['list'];return!this['isShown']||this[bN(0x1d2)]||!this['fulled']||!k[bN(0x1a8)]?this:(this['fulled']=!0x1,this['close'](),m(this['button'],jt),k['transition']&&(m(s,A),this['viewed']&&m(o,A)),k['focus']&&this['clearEnforceFocus'](),l['removeAttribute']('role'),l['removeAttribute']('aria-labelledby'),l['removeAttribute']('aria-modal'),m(l,_t),R(l,{'zIndex':k[bN(0x21c)]}),this['viewerData']=N({},this['parentData']),this['renderViewer'](),this['renderList'](),this['viewed']&&this[bN(0x1b9)](function(){j['renderImage'](function(){k['transition']&&setTimeout(function(){f(o,A),f(s,A);},0x0);});}),this);},'tooltip':function(){var bO=aB,j=this,k=this['options'],l=this['tooltipBox'],o=this['imageData'];return!this['viewed']||this['played']||!k['tooltip']?this:(l['textContent']=''['concat'](Math[bO(0x18d)](o[bO(0x24a)]*0x64),'%'),this[bO(0x193)]?clearTimeout(this['tooltipping']):k['transition']?(this['fading']&&x(l,P),f(l,H),f(l,dt),f(l,A),l[bO(0x22e)](bO(0x214)),l['initialOffsetWidth']=l['offsetWidth'],f(l,L)):(f(l,H),l['removeAttribute'](bO(0x214))),this['tooltipping']=setTimeout(function(){var bP=bO;k['transition']?(d(l,P,function(){m(l,H),m(l,dt),m(l,A),l['setAttribute']('aria-hidden',!0x0),j['fading']=!0x1;},{'once':!0x0}),m(l,L),j['fading']=!0x0):(m(l,H),l['setAttribute'](bP(0x214),!0x0)),j['tooltipping']=!0x1;},0x3e8),this);},'toggle':function(){var bQ=aB,j=arguments['length']>0x0&&arguments[0x0]!==void 0x0?arguments[0x0]:null;return this['imageData']['ratio']===0x1?this['zoomTo'](this[bQ(0x177)][bQ(0x216)],!0x0,null,j):this['zoomTo'](0x1,!0x0,null,j),this;},'reset':function(){return this['viewed']&&!this['played']&&(this['imageData']=N({},this['initialImageData']),this['renderImage']()),this;},'update':function(){var bR=aB,j=this,k=this[bR(0x179)],l=this[bR(0x164)],v=this['isImg'];if(v&&!k['parentNode'])return this['destroy']();var w=[];if(y(v?[k]:k['querySelectorAll'](bR(0x1d7)),function(I){var bS=bR;p(l[bS(0x1d0)])?l['filter']['call'](j,I)&&w['push'](I):j['getImageURL'](I)&&w['push'](I);}),!w[bR(0x212)])return this;if(this['images']=w,this['length']=w['length'],this['ready']){var C=[];if(y(this[bR(0x1b3)],function(I,M){var bT=bR,S=I[bT(0x218)]('img'),T=w[M];T&&S?(T[bT(0x21e)]!==S['src']||T[bT(0x16f)]!==S['alt'])&&C['push'](M):C[bT(0x1f4)](M);}),R(this['list'],{'width':bR(0x1e1)}),this[bR(0x1d3)](),this['isShown']){if(this['length']){if(this[bR(0x1ad)]){var D=C['indexOf'](this['index']);if(D>=0x0)this['viewed']=!0x1,this[bR(0x1df)](Math[bR(0x1fb)](Math['min'](this['index']-D,this[bR(0x212)]-0x1),0x0));else{var F=this['items'][this['index']];f(F,lt),F['setAttribute']('aria-selected',!0x0);}}}else this['image']=null,this['viewed']=!0x1,this['index']=0x0,this['imageData']={},this['canvas']['innerHTML']='',this['title']['innerHTML']='';}}else this['build']();return this;},'destroy':function(){var bU=aB,j=this['element'],k=this['options'];return j[g]?(this['destroyed']=!0x0,this['ready']?(this['played']&&this['stop'](),k['inline']?(this[bU(0x243)]&&this[bU(0x20f)](),this['unbind']()):this['isShown']?(this['viewing']&&(this['imageRendering']?this['imageRendering']['abort']():this['imageInitializing']&&this['imageInitializing']['abort']()),this['hiding']&&this['transitioning'][bU(0x1ca)](),this['hidden']()):this['showing']&&(this[bU(0x1b1)]['abort'](),this['hidden']()),this['ready']=!0x1,this['viewer'][bU(0x205)]['removeChild'](this[bU(0x19a)])):k['inline']&&(this[bU(0x1db)]?this['delaying']['abort']():this['initializing']&&this['initializing']['abort']()),k['inline']||b(j,J,this[bU(0x17e)]),j[g]=void 0x0,this):this;}},di={'getImageURL':function(j){var bV=aB,k=this['options']['url'];return st(k)?k=j[bV(0x1e6)](k):p(k)?k=k['call'](this,j):k='',k;},'enforceFocus':function(){var j=this;this['clearEnforceFocus'](),d(document,Mt,this['onFocusin']=function(k){var l=j['viewer'],o=k['target'];if(!(o===document||o===l||l['contains'](o))){for(;o;){if(o['getAttribute']('tabindex')!==null||o['getAttribute']('aria-modal')==='true')return;o=o['parentElement'];}l['focus']();}});},'clearEnforceFocus':function(){var bW=aB;this[bW(0x23a)]&&(b(document,Mt,this[bW(0x23a)]),this['onFocusin']=null);},'open':function(){var bX=aB,j=this[bX(0x20d)];f(j,$t),this['scrollbarWidth']>0x0&&(j['style']['paddingRight']=''['concat'](this['scrollbarWidth']+(parseFloat(this['initialBodyComputedPaddingRight'])||0x0),'px'));},'close':function(){var j=this['body'];m(j,$t),this['scrollbarWidth']>0x0&&(j['style']['paddingRight']=this['initialBodyPaddingRight']);},'shown':function(){var bY=aB,j=this['element'],k=this['options'],l=this[bY(0x19a)];this['fulled']=!0x0,this['isShown']=!0x0,this['render'](),this['bind'](),this['showing']=!0x1,k[bY(0x22a)]&&(l['focus'](),this['enforceFocus']()),p(k['shown'])&&d(j,Gt,k['shown'],{'once':!0x0}),x(j,Gt)!==!0x1&&this['ready']&&this['isShown']&&!this['hiding']&&this['view'](this[bY(0x21d)]);},'hidden':function(){var bZ=aB,j=this['element'],k=this[bZ(0x164)],l=this['viewer'];k['fucus']&&this['clearEnforceFocus'](),this['close'](),this['unbind'](),f(l,Y),l['removeAttribute']('role'),l['removeAttribute']('aria-labelledby'),l['removeAttribute']('aria-modal'),l['setAttribute']('aria-hidden',!0x0),this['resetList'](),this['resetImage'](),this['fulled']=!0x1,this['viewed']=!0x1,this['isShown']=!0x1,this['hiding']=!0x1,this['destroyed']||(p(k[bZ(0x236)])&&d(j,Jt,k['hidden'],{'once':!0x0}),x(j,Jt,null,{'cancelable':!0x1}));},'requestFullscreen':function(j){var c0=aB,k=this['element']['ownerDocument'];if(this['fulled']&&!(k['fullscreenElement']||k['webkitFullscreenElement']||k['mozFullScreenElement']||k['msFullscreenElement'])){var l=k['documentElement'];l['requestFullscreen']?B(j)?l[c0(0x1cf)](j):l['requestFullscreen']():l[c0(0x19f)]?l['webkitRequestFullscreen'](Element['ALLOW_KEYBOARD_INPUT']):l['mozRequestFullScreen']?l[c0(0x23b)]():l['msRequestFullscreen']&&l[c0(0x23f)]();}},'exitFullscreen':function(){var c1=aB,j=this['element']['ownerDocument'];this[c1(0x243)]&&(j['fullscreenElement']||j['webkitFullscreenElement']||j['mozFullScreenElement']||j['msFullscreenElement'])&&(j['exitFullscreen']?j[c1(0x1ec)]():j['webkitExitFullscreen']?j[c1(0x1a7)]():j['mozCancelFullScreen']?j['mozCancelFullScreen']():j['msExitFullscreen']&&j[c1(0x241)]());},'change':function(j){var c2=aB,k=this['options'],l=this['pointers'],u=l[Object[c2(0x1dc)](l)[0x0]];if(u){var v=u['endX']-u['startX'],w=u['endY']-u[c2(0x1f6)];switch(this[c2(0x244)]){case ft:(v!==0x0||w!==0x0)&&(this['pointerMoved']=!0x0,this[c2(0x242)](v,w,j));break;case it:this['zoom'](oi(l),!0x1,null,j);break;case we:{this['action']='switched';var C=Math['abs'](v);C>0x1&&C>Math['abs'](w)&&(this[c2(0x213)]={},v>0x1?this['prev'](k[c2(0x24e)]):v<-0x1&&this[c2(0x1ce)](k['loop']));break;}}y(l,function(D){var c3=c2;D['startX']=D['endX'],D['startY']=D[c3(0x1c7)];});}},'isSwitchable':function(){var c4=aB,j=this[c4(0x177)],k=this['viewerData'];return this['length']>0x1&&j['x']>=0x0&&j['y']>=0x0&&j['width']<=k['width']&&j['height']<=k['height'];}},vi=$['Viewer'],gi=function(j){return function(){return j+=0x1,j;};}(-0x1),_e=(function(){var ca=aB;function j(k){var c5=c,l=arguments['length']>0x1&&arguments[0x1]!==void 0x0?arguments[0x1]:{};if(Fe(this,j),!k||k['nodeType']!==0x1)throw new Error('The\x20first\x20argument\x20is\x20required\x20and\x20must\x20be\x20an\x20element.');this[c5(0x179)]=k,this['options']=N({},kt,B(l)&&l),this[c5(0x244)]=!0x1,this['fading']=!0x1,this['fulled']=!0x1,this[c5(0x16d)]=!0x1,this['imageClicked']=!0x1,this['imageData']={},this[c5(0x21d)]=this['options'][c5(0x178)],this['isImg']=!0x1,this['isShown']=!0x1,this['length']=0x0,this['moving']=!0x1,this['played']=!0x1,this[c5(0x16b)]=!0x1,this['pointers']={},this['ready']=!0x1,this['rotating']=!0x1,this['scaling']=!0x1,this[c5(0x17c)]=!0x1,this['timeout']=!0x1,this['tooltipping']=!0x1,this[c5(0x1ad)]=!0x1,this['viewing']=!0x1,this['wheeling']=!0x1,this['zooming']=!0x1,this['pointerMoved']=!0x1,this['id']=gi(),this['init']();}return Me(j,[{'key':'init','value':function(){var c6=c,k=this,l=this['element'],t=this['options'];if(!l[g]){l[g]=this,t['focus']&&!t['keyboard']&&(t['focus']=!0x1);var v=l['localName']==='img',w=[];if(y(v?[l]:l['querySelectorAll'](c6(0x1d7)),function(F){p(t['filter'])?t['filter']['call'](k,F)&&w['push'](F):k['getImageURL'](F)&&w['push'](F);}),this['isImg']=v,this['length']=w['length'],this['images']=w,this['initBody'](),U(document['createElement'](g)['style']['transition'])&&(t['transition']=!0x1),t['inline']){var C=0x0,D=function(){var c7=c6;if(C+=0x1,C===k['length']){var F;k[c7(0x217)]=!0x1,k['delaying']={'abort':function(){clearTimeout(F);}},F=setTimeout(function(){var c8=c7;k['delaying']=!0x1,k[c8(0x1be)]();},0x0);}};this['initializing']={'abort':function(){y(w,function(F){F['complete']||(b(F,z,D),b(F,W,D));});}},y(w,function(F){if(F['complete'])D();else{var I,M;d(F,z,I=function(){b(F,W,M),D();},{'once':!0x0}),d(F,W,M=function(){b(F,z,I),D();},{'once':!0x0});}});}else d(l,J,this['onStart']=function(F){var c9=c6,I=F['target'];I['localName']==='img'&&(!p(t[c9(0x1d0)])||t['filter']['call'](k,I))&&k['view'](k['images']['indexOf'](I));});}}},{'key':ca(0x1be),'value':function(){var cb=ca;if(!this['ready']){var k=this[cb(0x179)],t=this['options'],F=k['parentNode'],M=document['createElement'](cb(0x1fa));M['innerHTML']=Xe;var T=M['querySelector']('.'[cb(0x1d4)](g,cb(0x1ea))),V=T['querySelector']('.'['concat'](g,cb(0x1ed))),X=T['querySelector']('.'['concat'](g,'-toolbar')),a0=T['querySelector']('.'['concat'](g,'-navbar')),a1=T['querySelector']('.'['concat'](g,'-button')),a2=T['querySelector']('.'['concat'](g,'-canvas'));if(this['parent']=F,this[cb(0x19a)]=T,this['title']=V,this['toolbar']=X,this['navbar']=a0,this['button']=a1,this['canvas']=a2,this[cb(0x1f9)]=T[cb(0x218)]('.'[cb(0x1d4)](g,'-footer')),this[cb(0x198)]=T['querySelector']('.'['concat'](g,cb(0x169))),this['player']=T['querySelector']('.'['concat'](g,'-player')),this['list']=T['querySelector']('.'['concat'](g,'-list')),T['id']=''[cb(0x1d4)](g)[cb(0x1d4)](this['id']),V['id']=''[cb(0x1d4)](g,'Title')['concat'](this['id']),f(V,t['title']?ht(Array['isArray'](t['title'])?t['title'][0x0]:t['title']):Y),f(a0,t['navbar']?ht(t['navbar']):Y),ot(a1,Y,!t['button']),t['keyboard']&&a1['setAttribute'](cb(0x215),0x0),t['backdrop']&&(f(T,''['concat'](g,cb(0x197))),!t['inline']&&t['backdrop']!=='static'&&Ot(a2,gt,'hide')),st(t['className'])&&t['className']&&t['className']['split'](It)['forEach'](function(aa){f(T,aa);}),t['toolbar']){var a3=document['createElement']('ul'),a4=B(t[cb(0x1f8)]),a5=ut['slice'](0x0,0x3),a6=ut['slice'](0x7,0x9),a7=ut[cb(0x187)](0x9);a4||f(X,ht(t['toolbar'])),y(a4?t['toolbar']:ut,function(aa,ab){var cc=cb,ac=a4&&B(aa),ad=a4?Dt(ab):aa,af=ac&&!U(aa['show'])?aa['show']:aa;if(!(!af||!t['zoomable']&&a5['indexOf'](ad)!==-0x1||!t['rotatable']&&a6['indexOf'](ad)!==-0x1||!t['scalable']&&a7['indexOf'](ad)!==-0x1)){var ag=ac&&!U(aa[cc(0x167)])?aa['size']:aa,ah=ac&&!U(aa[cc(0x175)])?aa['click']:aa,aj=document['createElement']('li');t['keyboard']&&aj['setAttribute']('tabindex',0x0),aj['setAttribute'](cc(0x1cd),cc(0x17d)),f(aj,''['concat'](g,'-')['concat'](ad)),p(ah)||Ot(aj,gt,ad),O(af)&&f(aj,ht(af)),['small',cc(0x1e4)]['indexOf'](ag)!==-0x1?f(aj,''['concat'](g,'-')['concat'](ag)):ad===cc(0x238)&&f(aj,''['concat'](g,'-large')),p(ah)&&d(aj,J,ah),a3['appendChild'](aj);}}),X[cb(0x237)](a3);}else f(X,Y);if(!t['rotatable']){var a8=X['querySelectorAll'](cb(0x186));f(a8,rt),y(a8,function(aa){X['appendChild'](aa);});}if(t['inline'])f(a1,qe),R(T,{'zIndex':t['zIndexInline']}),window['getComputedStyle'](F)[cb(0x20a)]==='static'&&R(F,{'position':'relative'}),F['insertBefore'](T,k['nextSibling']);else{f(a1,He),f(T,_t),f(T,dt),f(T,Y),R(T,{'zIndex':t['zIndex']});var a9=t['container'];st(a9)&&(a9=k['ownerDocument'][cb(0x218)](a9)),a9||(a9=this['body']),a9[cb(0x237)](T);}if(t['inline']&&(this['render'](),this['bind'](),this['isShown']=!0x0),this['ready']=!0x0,p(t['ready'])&&d(k,Bt,t['ready'],{'once':!0x0}),x(k,Bt)===!0x1){this['ready']=!0x1;return;}this['ready']&&t['inline']&&this['view'](this['index']);}}}],[{'key':'noConflict','value':function(){return window['Viewer']=vi,j;}},{'key':'setDefaults','value':function(k){N(kt,B(k)&&k);}}]);}());N(_e[aB(0x1ba)],ui,hi,ci,fi,di);var mi=typeof global=='object'&&global&&global['Object']===Object&&global,Se=mi,pi=typeof self==aB(0x18c)&&self&&self[aB(0x1a5)]===Object&&self,bi=Se||pi||Function('return\x20this')(),Ct=bi,yi=Ct['Symbol'],mt=yi,Oe=Object['prototype'],wi=Oe[aB(0x228)],Ei=Oe['toString'],et=mt?mt['toStringTag']:void 0x0;function Ti(j){var cd=aB,k=wi['call'](j,et),l=j[et];try{j[et]=void 0x0;var o=!0x0;}catch(u){}var s=Ei[cd(0x1a6)](j);return o&&(k?j[et]=l:delete j[et]),s;}var _i=Object['prototype'],Si=_i['toString'];function Oi(j){var cf=aB;return Si[cf(0x1a6)](j);}var Ai='[object\x20Null]',xi='[object\x20Undefined]',he=mt?mt[aB(0x1c2)]:void 0x0;function Nt(j){return j==null?j===void 0x0?xi:Ai:he&&he in Object(j)?Ti(j):Oi(j);}function Lt(j){return j!=null&&typeof j=='object';}var Ii=Array['isArray'],Di=Ii;function zt(j){var cg=aB,k=typeof j;return j!=null&&(k=='object'||k==cg(0x24d));}function Ae(j){return j;}var Ci='[object\x20AsyncFunction]',Ni='[object\x20Function]',Li='[object\x20GeneratorFunction]',zi='[object\x20Proxy]';function xe(j){if(!zt(j))return!0x1;var k=Nt(j);return k==Ni||k==Li||k==Ci||k==zi;}var Pi=Ct['__core-js_shared__'],wt=Pi,ce=(function(){var ch=aB,j=/[^.]+$/['exec'](wt&&wt[ch(0x1dc)]&&wt[ch(0x1dc)]['IE_PROTO']||'');return j?ch(0x16a)+j:'';}());function Ri(j){return!!ce&&ce in j;}var Vi=Function['prototype'],ki=Vi[aB(0x249)];function ji(j){if(j!=null){try{return ki['call'](j);}catch(k){}try{return j+'';}catch(l){}}return'';}var $i=/[\\^$.*+?()[\]{}|]/g,Fi=/^\[object .+?Constructor\]$/,Mi=Function['prototype'],Yi=Object['prototype'],Wi=Mi['toString'],Xi=Yi['hasOwnProperty'],Hi=RegExp('^'+Wi['call'](Xi)[aB(0x166)]($i,aB(0x1d6))['replace'](/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,'$1.*?')+'$');function qi(j){if(!zt(j)||Ri(j))return!0x1;var k=xe(j)?Hi:Fi;return k['test'](ji(j));}function Ui(j,k){return j==null?void 0x0:j[k];}function Bi(j,k){var l=Ui(j,k);return qi(l)?l:void 0x0;}function Ki(j,k,l){switch(l['length']){case 0x0:return j['call'](k);case 0x1:return j['call'](k,l[0x0]);case 0x2:return j['call'](k,l[0x0],l[0x1]);case 0x3:return j['call'](k,l[0x0],l[0x1],l[0x2]);}return j['apply'](k,l);}var Gi=0x320,Zi=0x10,Ji=Date['now'];function Qi(j){var k=0x0,l=0x0;return function(){var cj=c,o=Ji(),s=Zi-(o-l);if(l=o,s>0x0){if(++k>=Gi)return arguments[0x0];}else k=0x0;return j[cj(0x1ee)](void 0x0,arguments);};}function tr(j){return function(){return j;};}var er=(function(){try{var j=Bi(Object,'defineProperty');return j({},'',{}),j;}catch(k){}}()),pt=er,ir=pt?function(j,k){var ck=aB;return pt(j,ck(0x249),{'configurable':!0x0,'enumerable':!0x1,'value':tr(k),'writable':!0x0});}:Ae,rr=ir,nr=Qi(rr),ar=nr,sr=0x1fffffffffffff,or=/^(?:0|[1-9]\d*)$/;function Ie(j,k){var l=typeof j;return k=k==null?sr:k,!!k&&(l=='number'||l!='symbol'&&or['test'](j))&&j>-0x1&&j%0x1==0x0&&j<k;}function De(j,k,l){k=='__proto__'&&pt?pt(j,k,{'configurable':!0x0,'enumerable':!0x0,'value':l,'writable':!0x0}):j[k]=l;}function Ce(j,k){return j===k||j!==j&&k!==k;}var lr=Object['prototype'],ur=lr['hasOwnProperty'];function Ne(j,k,l){var n=j[k];(!(ur['call'](j,k)&&Ce(n,l))||l===void 0x0&&!(k in j))&&De(j,k,l);}function hr(j,k,l,v){var cl=aB,w=!l;l||(l={});for(var C=-0x1,D=k[cl(0x212)];++C<D;){var F=k[C],I=v?v(l[F],j[F],F,l,j):void 0x0;I===void 0x0&&(I=j[F]),w?De(l,F,I):Ne(l,F,I);}return l;}var fe=Math['max'];function cr(j,k,l){var cm=aB;return k=fe(k===void 0x0?j[cm(0x212)]-0x1:k,0x0),function(){for(var u=arguments,v=-0x1,w=fe(u['length']-k,0x0),C=Array(w);++v<w;)C[v]=u[k+v];v=-0x1;for(var D=Array(k+0x1);++v<k;)D[v]=u[v];return D[k]=l(C),Ki(j,this,D);};}function fr(j,k){return ar(cr(j,k,Ae),j+'');}var dr=0x1fffffffffffff;function Le(j){return typeof j=='number'&&j>-0x1&&j%0x1==0x0&&j<=dr;}function Pt(j){var co=aB;return j!=null&&Le(j[co(0x212)])&&!xe(j);}function vr(j,k,l){if(!zt(l))return!0x1;var n=typeof k;return(n=='number'?Pt(l)&&Ie(k,l['length']):n=='string'&&k in l)?Ce(l[k],j):!0x1;}function gr(j){return fr(function(k,l){var u=-0x1,v=l['length'],w=v>0x1?l[v-0x1]:void 0x0,C=v>0x2?l[0x2]:void 0x0;for(w=j['length']>0x3&&typeof w=='function'?(v--,w):void 0x0,C&&vr(l[0x0],l[0x1],C)&&(w=v<0x3?void 0x0:w,v=0x1),k=Object(k);++u<v;){var D=l[u];D&&j(k,D,u,w);}return k;});}var mr=Object['prototype'];function ze(j){var cp=aB,k=j&&j['constructor'],l=typeof k==cp(0x24d)&&k['prototype']||mr;return j===l;}function pr(j,k){for(var l=-0x1,n=Array(j);++l<j;)n[l]=k(l);return n;}var br='[object\x20Arguments]';function de(j){return Lt(j)&&Nt(j)==br;}var Pe=Object['prototype'],yr=Pe['hasOwnProperty'],wr=Pe['propertyIsEnumerable'],Er=de((function(){return arguments;}()))?de:function(j){var cq=aB;return Lt(j)&&yr['call'](j,'callee')&&!wr[cq(0x1a6)](j,'callee');},Tr=Er;function _r(){return!0x1;}var Re=typeof exports=='object'&&exports&&!exports['nodeType']&&exports,ve=Re&&typeof module=='object'&&module&&!module['nodeType']&&module,Sr=ve&&ve['exports']===Re,ge=Sr?Ct['Buffer']:void 0x0,Or=ge?ge['isBuffer']:void 0x0,Ar=Or||_r,xr=Ar,Ir='[object\x20Arguments]',Dr='[object\x20Array]',Cr='[object\x20Boolean]',Nr='[object\x20Date]',Lr='[object\x20Error]',zr=aB(0x246),Pr='[object\x20Map]',Rr='[object\x20Number]',Vr='[object\x20Object]',kr=aB(0x1bd),jr='[object\x20Set]',$r='[object\x20String]',Fr='[object\x20WeakMap]',Mr='[object\x20ArrayBuffer]',Yr='[object\x20DataView]',Wr='[object\x20Float32Array]',Xr='[object\x20Float64Array]',Hr='[object\x20Int8Array]',qr=aB(0x208),Ur='[object\x20Int32Array]',Br='[object\x20Uint8Array]',Kr='[object\x20Uint8ClampedArray]',Gr='[object\x20Uint16Array]',Zr='[object\x20Uint32Array]',E={};E[Wr]=E[Xr]=E[Hr]=E[qr]=E[Ur]=E[Br]=E[Kr]=E[Gr]=E[Zr]=!0x0,E[Ir]=E[Dr]=E[Mr]=E[Cr]=E[Yr]=E[Nr]=E[Lr]=E[zr]=E[Pr]=E[Rr]=E[Vr]=E[kr]=E[jr]=E[$r]=E[Fr]=!0x1;function Jr(j){return Lt(j)&&Le(j['length'])&&!!E[Nt(j)];}function Qr(j){return function(k){return j(k);};}var Ve=typeof exports=='object'&&exports&&!exports['nodeType']&&exports,nt=Ve&&typeof module==aB(0x18c)&&module&&!module['nodeType']&&module,tn=nt&&nt['exports']===Ve,Et=tn&&Se[aB(0x1a3)],en=(function(){try{var j=nt&&nt['require']&&nt['require']('util')['types'];return j||Et&&Et['binding']&&Et['binding']('util');}catch(k){}}()),me=en,pe=me&&me[aB(0x240)],rn=pe?Qr(pe):Jr,nn=rn,an=Object['prototype'],sn=an['hasOwnProperty'];function on(j,k){var v=Di(j),w=!v&&Tr(j),C=!v&&!w&&xr(j),D=!v&&!w&&!C&&nn(j),F=v||w||C||D,I=F?pr(j['length'],String):[],M=I['length'];for(var S in j)(k||sn['call'](j,S))&&!(F&&(S=='length'||C&&(S=='offset'||S=='parent')||D&&(S=='buffer'||S=='byteLength'||S=='byteOffset')||Ie(S,M)))&&I['push'](S);return I;}function ln(j,k){return function(l){return j(k(l));};}var un=ln(Object['keys'],Object),hn=un,cn=Object['prototype'],fn=cn['hasOwnProperty'];function dn(j){var cs=aB;if(!ze(j))return hn(j);var k=[];for(var l in Object(j))fn['call'](j,l)&&l!=cs(0x18b)&&k['push'](l);return k;}function vn(j){return Pt(j)?on(j):dn(j);}var gn=Object['prototype'],mn=gn['hasOwnProperty'];gr(function(j,k){if(ze(k)||Pt(k)){hr(k,vn(k),j);return;}for(var l in k)mn['call'](k,l)&&Ne(j,l,k[l]);});var pn=function(){var cu=aB,j=this,k=j['$createElement'],l=j['_self']['_c']||k;return l('div',[j['_t'](cu(0x199),null,{'images':j['images'],'options':j['options']})],0x2);},bn=[];function yn(j,k,v,w,C,D,F,I){var cv=aB,M=typeof j=='function'?j['options']:j;k&&(M[cv(0x22c)]=k,M['staticRenderFns']=v,M['_compiled']=!0x0),w&&(M['functional']=!0x0),D&&(M[cv(0x180)]='data-v-'+D);var S;if(F?(S=function(X){var cw=cv;X=X||this['$vnode']&&this['$vnode'][cw(0x1c6)]||this['parent']&&this['parent']['$vnode']&&this['parent']['$vnode']['ssrContext'],!X&&typeof __VUE_SSR_CONTEXT__!='undefined'&&(X=__VUE_SSR_CONTEXT__),C&&C['call'](this,X),X&&X['_registeredComponents']&&X['_registeredComponents']['add'](F);},M['_ssrRegister']=S):C&&(S=I?function(){var cx=cv;C['call'](this,(M[cx(0x24c)]?this['parent']:this)['$root'][cx(0x220)]['shadowRoot']);}:C),S){if(M['functional']){M['_injectStyles']=S;var T=M['render'];M['render']=function(X,a0){return S['call'](a0),T(X,a0);};}else{var V=M[cv(0x185)];M['beforeCreate']=V?[]['concat'](V,S):[S];}}return{'exports':j,'options':M};}const wn={'props':{'images':{'type':Array},'rebuild':{'type':Boolean,'default':!0x1},'trigger':{},'options':{'type':Object}},'data'(){return{};},'computed':{},'watch':{'images'(){this['$nextTick'](()=>{var cy=c;this[cy(0x245)]();});},'trigger':{'handler'(){var cz=aB;this[cz(0x1b8)](()=>{this['onChange']();});},'deep':!0x0},'options':{'handler'(){this['$nextTick'](()=>{this['rebuildViewer']();});},'deep':!0x0}},'mounted'(){this['createViewer']();},'unmounted'(){this['destroyViewer']();},'methods':{'onChange'(){var cA=aB;this['rebuild']?this[cA(0x1a0)]():this['updateViewer']();},'rebuildViewer'(){this['destroyViewer'](),this['createViewer']();},'updateViewer'(){var cB=aB;this['$viewer']?(this[cB(0x235)]['update'](),this['$emit']('inited',this[cB(0x235)])):this['createViewer']();},'destroyViewer'(){var cC=aB;this['$viewer']&&this['$viewer'][cC(0x23e)]();},'createViewer'(){var cD=aB;this['$viewer']=new _e(this['$el'],this['options']),this['$emit']('inited',this[cD(0x235)]);}}},be={};var En=yn(wn,pn,bn,!0x1,Tn,null,null,null);function Tn(j){for(let k in be)this[k]=be[k];}var _n=(function(){return En['exports'];}());const Sn=e({'__name':'ImageViewer','props':{'image':null},'setup'(j){const k=j,l=h(()=>k['image']?[{'src':k['image'],'index':0x0}]:[]);return{'__sfc':!0x0,'props':k,'images':l,'VueViewer':_n};}});var On=function(){var cE=aB,j=this,k=j['_self']['_c'],l=j['_self']['_setupProxy'];return k(l['VueViewer'],{'staticStyle':{'height':'100%'},'attrs':{'images':l['images']}},j['_l'](l[cE(0x206)],function(o){return k('img',{'key':o['index'],'staticClass':'image','attrs':{'alt':'图片','src':o['src']}});}),0x0);},An=[],xn=i(Sn,On,An,!0x1,null,'b0f61c51',null,null);const Cn=xn['exports'];export{Cn as default};
|