1!function (a) { 2 "use strict"; 3 "function" == typeof define && define.amd ? define(["./blueimp-helper"], a) : (window.blueimp = window.blueimp || {}, window.blueimp.Gallery = a(window.blueimp.helper || window.jQuery)) 4}(function (a) { 5 "use strict"; 6 7 function b(a, c) { 8 return void 0 === document.body.style.maxHeight ? null : this && this.options === b.prototype.options ? a && a.length ? (this.list = a, this.num = a.length, this.initOptions(c), void this.initialize()) : void this.console.log("blueimp Gallery: No or empty list provided as first argument.", a) : new b(a, c) 9 } 10 11 return a.extend(b.prototype, { 12 options: { 13 container: "#blueimp-gallery", 14 slidesContainer: "div", 15 titleElement: "h3", 16 displayClass: "blueimp-gallery-display", 17 controlsClass: "blueimp-gallery-controls", 18 singleClass: "blueimp-gallery-single", 19 leftEdgeClass: "blueimp-gallery-left", 20 rightEdgeClass: "blueimp-gallery-right", 21 playingClass: "blueimp-gallery-playing", 22 slideClass: "slide", 23 slideLoadingClass: "slide-loading", 24 slideErrorClass: "slide-error", 25 slideContentClass: "slide-content", 26 toggleClass: "toggle", 27 prevClass: "prev", 28 nextClass: "next", 29 closeClass: "close", 30 playPauseClass: "play-pause", 31 typeProperty: "type", 32 titleProperty: "title", 33 urlProperty: "href", 34 displayTransition: !0, 35 clearSlides: !0, 36 stretchImages: !1, 37 toggleControlsOnReturn: !0, 38 toggleSlideshowOnSpace: !0, 39 enableKeyboardNavigation: !0, 40 closeOnEscape: !0, 41 closeOnSlideClick: !0, 42 closeOnSwipeUpOrDown: !0, 43 emulateTouchEvents: !0, 44 stopTouchEventsPropagation: !1, 45 hidePageScrollbars: !0, 46 disableScroll: !0, 47 carousel: !1, 48 continuous: !0, 49 unloadElements: !0, 50 startSlideshow: !1, 51 slideshowInterval: 5e3, 52 index: 0, 53 preloadRange: 2, 54 transitionSpeed: 400, 55 slideshowTransitionSpeed: void 0, 56 event: void 0, 57 onopen: void 0, 58 onopened: void 0, 59 onslide: void 0, 60 onslideend: void 0, 61 onslidecomplete: void 0, 62 onclose: void 0, 63 onclosed: void 0 64 }, 65 carouselOptions: { 66 hidePageScrollbars: !1, 67 toggleControlsOnReturn: !1, 68 toggleSlideshowOnSpace: !1, 69 enableKeyboardNavigation: !1, 70 closeOnEscape: !1, 71 closeOnSlideClick: !1, 72 closeOnSwipeUpOrDown: !1, 73 disableScroll: !1, 74 startSlideshow: !0 75 }, 76 console: window.console && "function" == typeof window.console.log ? window.console : { 77 log: function () { 78 } 79 }, 80 support: function (b) { 81 var c = {touch: void 0 !== window.ontouchstart || window.DocumentTouch && document instanceof DocumentTouch}, 82 d = { 83 webkitTransition: {end: "webkitTransitionEnd", prefix: "-webkit-"}, 84 MozTransition: {end: "transitionend", prefix: "-moz-"}, 85 OTransition: {end: "otransitionend", prefix: "-o-"}, 86 transition: {end: "transitionend", prefix: ""} 87 }, e = function () { 88 let a, d, e = c.transition; 89 document.body.appendChild(b), e && (a = e.name.slice(0, -9) + "ransform", void 0 !== b.style[a] && (b.style[a] = "translateZ(0)", d = window.getComputedStyle(b).getPropertyValue(e.prefix + "transform"), c.transform = { 90 prefix: e.prefix, 91 name: a, 92 translate: !0, 93 translateZ: !!d && "none" !== d 94 })), void 0 !== b.style.backgroundSize && (c.backgroundSize = {}, b.style.backgroundSize = "contain", c.backgroundSize.contain = "contain" === window.getComputedStyle(b).getPropertyValue("background-size"), b.style.backgroundSize = "cover", c.backgroundSize.cover = "cover" === window.getComputedStyle(b).getPropertyValue("background-size")), document.body.removeChild(b) 95 }; 96 return function (a, c) { 97 var d; 98 for (d in c) if (c.hasOwnProperty(d) && void 0 !== b.style[d]) { 99 a.transition = c[d], a.transition.name = d; 100 break 101 } 102 }(c, d), document.body ? e() : a(document).on("DOMContentLoaded", e), c 103 }(document.createElement("div")), 104 requestAnimationFrame: window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame, 105 initialize: function () { 106 this.opener = document.activeElement; 107 return this.initStartIndex(), this.initWidget() === !1 ? !1 : (this.initEventListeners(), this.onslide(this.index), this.ontransitionend(), void (this.options.startSlideshow && this.play())) 108 }, 109 slide: function (a, b) { 110 window.clearTimeout(this.timeout); 111 var c, d, e, f = this.index; 112 if (f !== a && 1 !== this.num) { 113 if (b || (b = this.options.transitionSpeed), this.support.transition) { 114 for (this.options.continuous || (a = this.circle(a)), c = Math.abs(f - a) / (f - a), this.options.continuous && (d = c, c = -this.positions[this.circle(a)] / this.slideWidth, c !== d && (a = -c * this.num + a)), e = Math.abs(f - a) - 1; e;) e -= 1, this.move(this.circle((a > f ? a : f) - e - 1), this.slideWidth * c, 0); 115 a = this.circle(a), this.move(f, this.slideWidth * c, b), this.move(a, 0, b), this.options.continuous && this.move(this.circle(a - c), -(this.slideWidth * c), 0) 116 } else a = this.circle(a), this.animate(f * -this.slideWidth, a * -this.slideWidth, b); 117 this.onslide(a) 118 } 119 }, 120 getIndex: function () { 121 return this.index 122 }, 123 getNumber: function () { 124 return this.num 125 }, 126 prev: function () { 127 (this.options.continuous || this.index) && this.slide(this.index - 1) 128 }, 129 next: function () { 130 (this.options.continuous || this.index < this.num - 1) && this.slide(this.index + 1) 131 }, 132 play: function (a) { 133 var b = this; 134 window.clearTimeout(this.timeout), this.interval = a || this.options.slideshowInterval, this.elements[this.index] > 1 && (this.timeout = this.setTimeout(!this.requestAnimationFrame && this.slide || function (a, c) { 135 b.animationFrameId = b.requestAnimationFrame.call(window, function () { 136 b.slide(a, c) 137 }) 138 }, [this.index + 1, this.options.slideshowTransitionSpeed], this.interval)), this.container.addClass(this.options.playingClass) 139 }, 140 pause: function () { 141 window.clearTimeout(this.timeout), this.interval = null, this.container.removeClass(this.options.playingClass) 142 }, 143 add: function (a) { 144 var b; 145 for (a.concat || (a = Array.prototype.slice.call(a)), this.list.concat || (this.list = Array.prototype.slice.call(this.list)), this.list = this.list.concat(a), this.num = this.list.length, this.num > 2 && null === this.options.continuous && (this.options.continuous = !0, this.container.removeClass(this.options.leftEdgeClass)), this.container.removeClass(this.options.rightEdgeClass).removeClass(this.options.singleClass), b = this.num - a.length; b < this.num; b += 1) this.addSlide(b), this.positionSlide(b); 146 this.positions.length = this.num, this.initSlides(!0) 147 }, 148 resetSlides: function () { 149 this.slidesContainer.empty(), this.slides = [] 150 }, 151 handleClose: function () { 152 var a = this.options; 153 this.destroyEventListeners(), this.pause(), this.container[0].style.display = "none", this.container.removeClass(a.displayClass).removeClass(a.singleClass).removeClass(a.leftEdgeClass).removeClass(a.rightEdgeClass), a.hidePageScrollbars && (document.body.style.overflow = this.bodyOverflowStyle), this.options.clearSlides && this.resetSlides(), this.options.onclosed && this.options.onclosed.call(this), this.container.attr("aria-hidden", "true"), this.opener && this.opener.focu
153s() 154 }, 155 close: function () { 156 var a = this, b = function (c) { 157 c.target === a.container[0] && (a.container.off(a.support.transition.end, b), a.handleClose()) 158 }; 159 this.options.onclose && this.options.onclose.call(this), this.support.transition && this.options.displayTransition ? (this.container.on(this.support.transition.end, b), this.container.removeClass(this.options.displayClass)) : this.handleClose() 160 }, 161 circle: function (a) { 162 return (this.num + a % this.num) % this.num 163 }, 164 move: function (a, b, c) { 165 this.translateX(a, b, c), this.positions[a] = b 166 }, 167 translate: function (a, b, c, d) { 168 var e = this.slides[a].style, f = this.support.transition, g = this.support.transform; 169 e[f.name + "Duration"] = d + "ms", e[g.name] = "translate(" + b + "px, " + c + "px)" + (g.translateZ ? " translateZ(0)" : "") 170 }, 171 translateX: function (a, b, c) { 172 this.translate(a, b, 0, c) 173 }, 174 translateY: function (a, b, c) { 175 this.translate(a, 0, b, c) 176 }, 177 animate: function (a, b, c) { 178 if (!c) return void (this.slidesContainer[0].style.left = b + "px"); 179 var d = this, e = (new Date).getTime(), f = window.setInterval(function () { 180 var g = (new Date).getTime() - e; 181 return g > c ? (d.slidesContainer[0].style.left = b + "px", d.ontransitionend(), void window.clearInterval(f)) : void (d.slidesContainer[0].style.left = (b - a) * (Math.floor(g / c * 100) / 100) + a + "px") 182 }, 4) 183 }, 184 preventDefault: function (a) { 185 a.preventDefault ? a.preventDefault() : a.returnValue = !1 186 }, 187 stopPropagation: function (a) { 188 a.stopPropagation ? a.stopPropagation() : a.cancelBubble = !0 189 }, 190 onresize: function () { 191 this.initSlides(!0) 192 }, 193 onmousedown: function (a) { 194 a.which && 1 === a.which && "VIDEO" !== a.target.nodeName && (a.preventDefault(), (a.originalEvent || a).touches = [{ 195 pageX: a.pageX, 196 pageY: a.pageY 197 }], this.ontouchstart(a)) 198 }, 199 onmousemove: function (a) { 200 this.touchStart && ((a.originalEvent || a).touches = [{ 201 pageX: a.pageX, 202 pageY: a.pageY 203 }], this.ontouchmove(a)) 204 }, 205 onmouseup: function (a) { 206 this.touchStart && (this.ontouchend(a), delete this.touchStart) 207 }, 208 onmouseout: function (b) { 209 if (this.touchStart) { 210 var c = b.target, d = b.relatedTarget; 211 (!d || d !== c && !a.contains(c, d)) && this.onmouseup(b) 212 } 213 }, 214 ontouchstart: function (a) { 215 this.options.stopTouchEventsPropagation && this.stopPropagation(a); 216 var b = (a.originalEvent || a).touches[0]; 217 this.touchStart = { 218 x: b.pageX, 219 y: b.pageY, 220 time: Date.now() 221 }, this.isScrolling = void 0, this.touchDelta = {} 222 }, 223 ontouchmove: function (a) { 224 this.options.stopTouchEventsPropagation && this.stopPropagation(a); 225 var b, c, d = (a.originalEvent || a).touches[0], e = (a.originalEvent || a).scale, f = this.index; 226 if (!(d.length > 1 || e && 1 !== e)) if (this.options.disableScroll && a.preventDefault(), this.touchDelta = { 227 x: d.pageX - this.touchStart.x, 228 y: d.pageY - this.touchStart.y 229 }, b = this.touchDelta.x, void 0 === this.isScrolling && (this.isScrolling = this.isScrolling || Math.abs(b) < Math.abs(this.touchDelta.y)), this.isScrolling) this.options.closeOnSwipeUpOrDown && this.translateY(f, this.touchDelta.y + this.positions[f], 0); else for (a.preventDefault(), window.clearTimeout(this.timeout), this.options.continuous ? c = [this.circle(f + 1), f, this.circle(f - 1)] : (this.touchDelta.x = b /= !f && b > 0 || f === this.num - 1 && 0 > b ? Math.abs(b) / this.slideWidth + 1 : 1, c = [f], f && c.push(f - 1), f < this.num - 1 && c.unshift(f + 1)); c.length;) f = c.pop(), this.translateX(f, b + this.positions[f], 0) 230 }, 231 ontouchend: function (a) { 232 this.options.stopTouchEventsPropagation && this.stopPropagation(a); 233 var b, c, d, e, f, g = this.index, h = this.options.transitionSpeed, i = this.slideWidth, 234 j = Number(Date.now() - this.touchStart.time) < 250, 235 k = j && Math.abs(this.touchDelta.x) > 20 || Math.abs(this.touchDelta.x) > i / 2, 236 l = !g && this.touchDelta.x > 0 || g === this.num - 1 && this.touchDelta.x < 0, 237 m = !k && this.options.closeOnSwipeUpOrDown && (j && Math.abs(this.touchDelta.y) > 20 || Math.abs(this.touchDelta.y) > this.slideHeight / 2); 238 this.options.continuous && (l = !1), b = this.touchDelta.x < 0 ? -1 : 1, this.isScrolling ? m ? this.close() : this.translateY(g, 0, h) : k && !l ? (c = g + b, d = g - b, e = i * b, f = -i * b, this.options.continuous ? (this.move(this.circle(c), e, 0), this.move(this.circle(g - 2 * b), f, 0)) : c >= 0 && c < this.num && this.move(c, e, 0), this.move(g, this.positions[g] + e, h), this.move(this.circle(d), this.positions[this.circle(d)] + e, h), g = this.circle(d), this.onslide(g)) : this.options.continuous ? (this.move(this.circle(g - 1), -i, h), this.move(g, 0, h), this.move(this.circle(g + 1), i, h)) : (g && this.move(g - 1, -i, h), this.move(g, 0, h), g < this.num - 1 && this.move(g + 1, i, h)) 239 }, 240 ontouchcancel: function (a) { 241 this.touchStart && (this.ontouchend(a), delete this.touchStart) 242 }, 243 ontransitionend: function (a) { 244 var b = this.slides[this.index]; 245 a && b !== a.target || (this.interval && this.play(), this.setTimeout(this.options.onslideend, [this.index, b])) 246 }, 247 oncomplete: function (b) { 248 var c, d = b.target || b.srcElement, e = d && d.parentNode; 249 d && e && (c = this.getNodeIndex(e), a(e).removeClass(this.options.slideLoadingClass), "error" === b.type ? (a(e).addClass(this.options.slideErrorClass), this.elements[c] = 3) : this.elements[c] = 2, d.clientHeight > this.container[0].clientHeight && (d.style.maxHeight = this.container[0].clientHeight), this.interval && this.slides[this.index] === e && this.play(), this.setTimeout(this.options.onslidecomplete, [c, e])) 250 }, 251 onload: function (a) { 252 this.oncomplete(a) 253 }, 254 onerror: function (a) { 255 this.oncomplete(a) 256 }, 257 onkeydown: function (a) { 258 switch (a.which || a.keyCode) { 259 case 9: 260 var b = this.container.find('button, [href], input, select, textarea, [tabindex]:not
260([tabindex="-1"]), .indicator li').filter(":visible"), 261 c = b.first(), d = b.last(); 262 a.shiftKey ? document.activeElement === c[0] && (this.preventDefault(a), d.focus()) : (document.activeElement === d[0] || document.activeElement === this.container[0]) && (this.preventDefault(a), c.focus()); 263 break; 264 case 13: 265 case 32: 266 if (a.target.parentNode === this.indicatorContainer[0]) { 267 this.preventDefault(a); 268 this.slide(this.getNodeIndex(a.target)) 269 } else if (a.which === 13 && a.target.nodeName !== "BUTTON" && a.target.nodeName !== "A") { 270 this.options.toggleControlsOnReturn && (this.preventDefault(a), this.toggleControls()) 271 } 272 break; 273 case 27: 274 this.options.closeOnEscape && this.close(); 275 break; 276 case 32: 277 this.options.toggleSlideshowOnSpace && (this.preventDefault(a), this.toggleSlideshow()); 278 break; 279 case 37: 280 this.options.enableKeyboardNavigation && (this.preventDefault(a), this.prev()); 281 break; 282 case 39: 283 this.options.enableKeyboardNavigation && (this.preventDefault(a), this.next()) 284 } 285 }, 286 handleClick: function (b) { 287 var c = this.options, d = b.target || b.srcElement, e = d.parentNode, f = function (b) { 288 return a(d).hasClass(b) || a(e).hasClass(b) 289 }; 290 f(c.toggleClass) ? (this.preventDefault(b), this.toggleControls()) : f(c.prevClass) ? (this.preventDefault(b), this.prev()) : f(c.nextClass) ? (this.preventDefault(b), this.next()) : f(c.closeClass) ? (this.preventDefault(b), this.close()) : f(c.playPauseClass) ? (this.preventDefault(b), this.toggleSlideshow()) : e === this.slidesContainer[0] ? (this.preventDefault(b), c.closeOnSlideClick ? this.close() : this.toggleControls()) : e.parentNode && e.parentNode === this.slidesContainer[0] && (this.preventDefault(b), this.toggleControls()) 291 }, 292 onclick: function (a) { 293 return this.options.emulateTouchEvents && this.touchDelta && (Math.abs(this.touchDelta.x) > 20 || Math.abs(this.touchDelta.y) > 20) ? void delete this.touchDelta : this.handleClick(a) 294 }, 295 updateEdgeClasses: function (a) { 296 a ? this.container.removeClass(this.options.leftEdgeClass) : this.container.addClass(this.options.leftEdgeClass), a === this.num - 1 ? this.container.addClass(this.options.rightEdgeClass) : this.container.removeClass(this.options.rightEdgeClass) 297 }, 298 handleSlide: function (a) { 299 this.options.continuous || this.updateEdgeClasses(a), this.loadElements(a), this.options.unloadElements && this.unloadElements(a), this.setTitle(a) 300 }, 301 onslide: function (a) { 302 this.index = a, this.handleSlide(a), this.setTimeout(this.options.onslide, [a, this.slides[a]]) 303 }, 304 setTitle: function (a) { 305 var b = this.slides[a].firstChild.title, c = this.titleElement; 306 c.length && (this.titleElement.empty(), b && c[0].appendChild(document.createTextNode(b))) 307 }, 308 setTimeout: function (a, b, c) { 309 var d = this; 310 return a && window.setTimeout(function () { 311 a.apply(d, b || []) 312 }, c || 0) 313 }, 314 imageFactory: function (b, c) { 315 var d, e, f, g = this, h = this.imagePrototype.cloneNode(!1), i = b, j = this.options.stretchImages, 316 k = function (b) { 317 if (!d) { 318 if (b = {type: b.type, target: e}, !e.parentNode) return g.setTimeout(k, [b]); 319 d = !0, a(h).off("load error", k), j && "load" === b.type && (e.style.background = 'url("' + i + '") center no-repeat', e.style.backgroundSize = j), c(b) 320 } 321 }; 322 return "string" != typeof i && (i = this.getItemProperty(b, this.options.urlProperty), f = this.getItemProperty(b, this.options.titleProperty) || a(b).find("img").attr("alt")), j === !0 && (j = "contain"), j = this.support.backgroundSize && this.support.backgroundSize[j] && j, j ? (e = this.elementPrototype.cloneNode(!1), f && (e.setAttribute("role", "img"), e.setAttribute("aria-label", f))) : (e = h, h.draggable = !1, f && (h.alt = f)), a(h
322).on("load error", k), h.src = i, e 323 }, 324 createElement: function (b, c) { 325 var d = b && this.getItemProperty(b, this.options.typeProperty), 326 e = d && this[d.split("/")[0] + "Factory"] || this.imageFactory, f = b && e.call(this, b, c); 327 return f || (f = this.elementPrototype.cloneNode(!1), this.setTimeout(c, [{ 328 type: "error", 329 target: f 330 }])), a(f).addClass(this.options.slideContentClass), f 331 }, 332 loadElement: function (b) { 333 this.elements[b] || (this.slides[b].firstChild ? this.elements[b] = a(this.slides[b]).hasClass(this.options.slideErrorClass) ? 3 : 2 : (this.elements[b] = 1, a(this.slides[b]).addClass(this.options.slideLoadingClass), this.slides[b].appendChild(this.createElement(this.list[b], this.proxyListener)))) 334 }, 335 loadElements: function (a) { 336 var b, c = Math.min(this.num, 2 * this.options.preloadRange + 1), d = a; 337 for (b = 0; c > b; b += 1) d += b * (b % 2 === 0 ? -1 : 1), d = this.circle(d), this.loadElement(d) 338 }, 339 unloadElements: function (a) { 340 var b, c, d; 341 for (b in this.elements) this.elements.hasOwnProperty(b) && (d = Math.abs(a - b), d > this.options.preloadRange && d + this.options.preloadRange < this.num && (c = this.slides[b], c.removeChild(c.firstChild), delete this.elements[b])) 342 }, 343 addSlide: function (a) { 344 var b = this.slidePrototype.cloneNode(!1); 345 b.setAttribute("data-index", a), this.slidesContainer[0].appendChild(b), this.slides.push(b) 346 }, 347 positionSlide: function (a) { 348 var b = this.slides[a]; 349 b.style.width = this.slideWidth + "px", this.support.transition && (b.style.left = a * -this.slideWidth + "px", this.move(a, this.index > a ? -this.slideWidth : this.index < a ? this.slideWidth : 0, 0)) 350 }, 351 initSlides: function (b) { 352 var c, d; 353 for (b || (this.positions = [], this.positions.length = this.num, this.elements = {}, this.imagePrototype = document.createElement("img"), this.elementPrototype = document.createElement("div"), this.slidePrototype = document.createElement("div"), a(this.slidePrototype).addClass(this.options.slideClass), this.slides = this.slidesContainer[0].children, c = this.options.clearSlides || this.slides.length !== this.num), this.slideWidth = this.container[0].offsetWidth, this.slideHeight = this.container[0].offsetHeight, this.slidesContainer[0].style.width = this.num * this.slideWidth + "px", c && this.resetSlides(), d = 0; d < this.num; d += 1) c && this.addSlide(d), this.positionSlide(d); 354 this.options.continuous && this.support.transition && (this.move(this.circle(this.index - 1), -this.slideWidth, 0), this.move(this.circle(this.index + 1), this.slideWidth, 0)), this.support.transition || (this.slidesContainer[0].style.left = this.index * -this.slideWidth + "px") 355 }, 356 toggleControls: function () { 357 var a = this.options.controlsClass; 358 this.container.hasClass(a) ? this.container.removeClass(a) : this.container.addClass(a) 359 }, 360 toggleSlideshow: function () { 361 this.interval ? this.pause() : this.play() 362 }, 363 getNodeIndex: function (a) { 364 return parseInt(a.getAttribute("data-index"), 10) 365 }, 366 getNestedProperty: function (a, b) { 367 return b.replace(/\[(?:'([^']+)'|"([^"]+)"|(\d+))\]|(?:(?:^|\.)([^\.\[]+))/g, function (b, c, d, e, f) { 368 var g = f || c || d || e && parseInt(e, 10); 369 b && a && (a = a[g]) 370 }), a 371 }, 372 getDataProperty: function (b, c) { 373 if (b.getAttribute) { 374 var d = b.getAttribute("data-" + c.replace(/([A-Z])/g, "-$1").toLowerCase()); 375 if ("string" == typeof d) { 376 if (/^(true|false|null|-?\d+(\.\d+)?|\{[\s\S]*\}|\[[\s\S]*\])$/.test(d)) try { 377 return a.parseJSON(d) 378 } catch (e) { 379 } 380 return d 381 } 382 } 383 }, 384 getItemProperty: function (a, b) { 385 var c = a[b]; 386 return void 0 === c && (c = this.getDataProperty(a, b), void 0 === c && (c = this.getNestedProperty(a, b))), c 387 }, 388 initStartIndex: function () { 389 var a, b = this.options.index, c = this.options.urlProperty; 390 if (b && "number" != typeof b) for (a = 0; a < this.num; a += 1) if (this.list[a] === b || this.getItemProperty(this.list[a], c) === this.getItemProperty(b, c)) { 391 b = a; 392 break 393 } 394 this.index = this.circle(parseInt(b, 10) || 0) 395 }, 396 initEventListeners: function () { 397 var b = this, c = this.slidesContainer, d = function (a) { 398 var c = b.support.transition && b.support.transition.end === a.type ? "transitionend" : a.type; 399 b["on" + c](a) 400 }; 401 a(window).on("resize", d), a(document.body).on("keydown", d), this.container.on("click", d), this.support.touch ? c.on("touchstart touchmove touchend touchcancel", d) : this.options.emulateTouchEvents && this.support.transition && c.on("mousedown mousemove mouseup mouseout", d), this.support.transition && c.on(this.support.transition.end, d), this.proxyListener = d 402 }, 403 destroyEventListeners: function () { 404 var b = this.slidesContainer, c = this.proxyListener; 405 a(window).off("resize", c), a(document.body).off("keydown", c), this.container.off("click", c), this.support.touch ? b.off("touchstart touchmove touchend touchcancel", c) : this.options.emulateTouchEvents && this.support.transition && b.off("mousedown mousemove mouseup mouseout", c), this.support.transition && b.off(this.support.transition.end, c) 406 }, 407 handleOpen: function () { 408 this.container.attr("aria-hidden", "false"), this.container.attr("tabindex", "-1").focus(), this.options.onopened && this.options.onopened.call(this) 409 }, 410 initWidget: function () { 411 var b = this, c = function (a) { 412 a.target === b.container[0] && (b.container.off(b.supp
412ort.transition.end, c), b.handleOpen()) 413 }; 414 return this.container = a(this.options.container), this.container.length ? (this.slidesContainer = this.container.find(this.options.slidesContainer).first(), this.slidesContainer.length ? (this.titleElement = this.container.find(this.options.titleElement).first(), 1 === this.num && this.container.addClass(this.options.singleClass), this.options.onopen && this.options.onopen.call(this), this.support.transition && this.options.displayTransition ? this.container.on(this.support.transition.end, c) : this.handleOpen(), this.options.hidePageScrollbars && (this.bodyOverflowStyle = document.body.style.overflow, document.body.style.overflow = "hidden"), this.container[0].style.display = "block", this.initSlides(), void this.container.addClass(this.options.displayClass)) : (this.console.log("blueimp Gallery: Slides container not found.", this.options.slidesContainer), !1)) : (this.console.log("blueimp Gallery: Widget container not found.", this.options.container), !1) 415 }, 416 initOptions: function (b) { 417 this.options = a.extend({}, this.options), (b && b.carousel || this.options.carousel && (!b || b.carousel !== !1)) && a.extend(this.options, this.carouselOptions), a.extend(this.options, b), this.num < 3 && (this.options.continuous = this.options.continuous ? null : !1), this.support.transition || (this.options.emulateTouchEvents = !1), this.options.event && this.preventDefault(this.options.event) 418 } 419 }), b 420}), function (a) { 421 "use strict"; 422 "function" == typeof define && define.amd ? define(["./blueimp-helper", "./blueimp-gallery"], a) : a(window.blueimp.helper || window.jQuery, window.blueimp.Gallery) 423}(function (a, b) { 424 "use strict"; 425 a.extend(b.prototype.options, {fullScreen: !1}); 426 var c = b.prototype.initialize, d = b.prototype.close; 427 return a.extend(b.prototype, { 428 getFullScreenElement: function () { 429 return document.fullscreenElement || document.webkitFullscreenElement || document.mozFullScreenElement || document.msFullscreenElement 430 }, requestFullScreen: function (a) { 431 a.requestFullscreen ? a.requestFullscreen() : a.webkitRequestFullscreen ? a.webkitRequestFullscreen() : a.mozRequestFullScreen ? a.mozRequestFullScreen() : a.msRequestFullscreen && a.msRequestFullscreen() 432 }, exitFullScreen: function () { 433 document.exitFullscreen ? document.exitFullscreen() : document.webkitCancelFullScreen ? document.webkitCancelFullScreen() : document.mozCancelFullScreen ? document.mozCancelFullScreen() : document.msExitFullscreen && document.msExitFullscreen() 434 }, initialize: function () { 435 c.call(this), this.options.fullScreen && !this.getFullScreenElement() && this.requestFullScreen(this.container[0]) 436 }, close: function () { 437 this.getFullScreenElement() === this.container[0] && this.exitFullScreen(), d.call(this) 438 } 439 }), b 440}), function (a) { 441 "use strict"; 442 "function" == typeof define && define.amd ? define(["./blueimp-helper", "./blueimp-gallery"], a) : a(window.blueimp.helper || window.jQuery, window.blueimp.Gallery) 443}(function (a, b) { 444 "use strict"; 445 a.extend(b.prototype.options, { 446 indicatorContainer: "ol", 447 activeIndicatorClass: "active", 448 thumbnailProperty: "thumbnail", 449 thumbnailIndicators: !0 450 }); 451 var c = b.prototype.initSlides, d = b.prototype.addSlide, e = b.prototype.resetSlides, f = b.prototype.handleClick, 452 g = b.prototype.handleSlide, h = b.prototype.handleClose; 453 return a.extend(b.prototype, { 454 createIndicator: function (b) { 455 var c, d, e = this.indicatorPrototype.cloneNode(!1), 456 f = this.getItemProperty(b, this.options.titleProperty), g = this.options.thumbnailProperty; 457 return this.options.thumbnailIndicators && (d = b.getElementsByTagName && a(b).find("img")[0], d ? c = d.src : g && (c = this.getItemProperty(b, g)), c && (e.style.backgroundImage = 'url("' + c + '")')), f && (e.title = f), e 458 }, addIndicator: function (a) { 459 if (this.indicatorContainer.length) { 460 var b = this.createIndicator(this.list[a]); 461 b.setAttribute("data-index", a), this.indicatorContainer[0].appendChild(b), this.indicators.push(b) 462 } 463 }, setActiveIndicator: function (b) { 464 this.indicators && (this.activeIndicator && this.activeIndicator.removeClass(this.options.activeIndicatorClass), this.activeIndicator = a(this.indicators[b]), this.activeIndicator.addClass(this.options.activeIndicatorClass)) 465 }, initSlides: function (a) { 466 a || (this.indicatorContainer = this.container.find(this.options.indicatorContainer), this.indicatorContainer.length && (this.indicatorPrototype = document.createElement("li"), this.indicators = [])), c.call(this, a) 467 }, addSlide: function (a) { 468 d.call(this, a), this.addIndicator(a) 469 }, resetSlides: function () { 470 e.call(this), this.indicatorContainer.empty(), this.indicators = [] 471 }, handleClick: function (a) { 472 var b = a.target || a.srcElement, c = b.parentNode; 473 if (c === this.indicatorContainer[0]) this.preventDefault(a), this.slide(this.getNodeIndex(b)); else { 474 if (c.parentNode !== this.indicatorContainer[0]) return f.call(this, a); 475 this.preventDefault(a), this.slide(this.getNodeIndex(c)) 476 } 477 }, handleSlide: function (a) { 478 g.call(this, a), this.setActiveIndicator(a) 479 }, handleClose: function () { 480 this.activeIndicator && this.activeIndicator.removeClass(this.options.activeIndicatorClass), h.call(this) 481 } 482 }), b 483}), function (a) { 484 "use strict"; 485 "function" == typeof define && define.amd ? define(["./blueimp-helper", "./blueimp-gallery"], a) : a(window.blueimp.helper || window.jQuery, window.blueimp.Gallery) 486}(function (a, b) { 487 "use strict"; 488 a.extend(b.prototype.options, { 489 videoContentClass: "video-content", 490 videoLoadingClass: "video-loading", 491 videoPlayingClass: "video-playing", 492 videoPosterProperty: "poster", 493 videoSourcesProperty: "sources" 494 });
495 var c = b.prototype.handleSlide; 496 return a.extend(b.prototype, { 497 handleSlide: function (a) { 498 c.call(this, a), this.playingVideo && this.playingVideo.pause() 499 }, videoFactory: function (b, c, d) { 500 var e, f, g, h, i, j = this, k = this.options, l = this.elementPrototype.cloneNode(!1), m = a(l), 501 n = [{type: "error", target: l}], o = d || document.createElement("video"), 502 p = this.getItemProperty(b, k.urlProperty), q = this.getItemProperty(b, k.typeProperty), 503 r = this.getItemProperty(b, k.titleProperty), s = this.getItemProperty(b, k.videoPosterProperty), 504 t = this.getItemProperty(b, k.videoSourcesProperty); 505 if (m.addClass(k.videoContentClass), r && (l.title = r), o.canPlayType) if (p && q && o.canPlayType(q)) o.src = p; else for (; t && t.length;) if (f = t.shift(), p = this.getItemProperty(f, k.urlProperty), q = this.getItemProperty(f, k.typeProperty), p && q && o.canPlayType(q)) { 506 o.src = p; 507 break 508 } 509 return s && (o.poster = s, e = this.imagePrototype.cloneNode(!1), a(e).addClass(k.toggleClass), e.src = s, e.draggable = !1, l.appendChild(e)), g = document.createElement("a"), g.setAttribute("target", "_blank"), d || g.setAttribute("download", r), g.href = p, o.src && (o.controls = !0, (d || a(o)).on("error", function () { 510 j.setTimeout(c, n) 511 }).on("pause", function () { 512 h = !1, m.removeClass(j.options.videoLoadingClass).removeClass(j.options.videoPlayingClass), i && j.container.addClass(j.options.controlsClass), delete j.playingVideo, j.interval && j.play() 513 }).on("playing", function () { 514 h = !1, m.removeClass(j.options.videoLoadingClass).addClass(j.options.videoPlayingClass), j.container.hasClass(j.options.controlsClass) ? (i = !0, j.container.removeClass(j.options.controlsClass)) : i = !1 515 }).on("play", function () { 516 window.clearTimeout(j.timeout), h = !0, m.addClass(j.options.videoLoadingClass), j.playingVideo = o 517 }), a(g).on("click", function (a) { 518 j.preventDefault(a), h ? o.pause() : o.play() 519 }), l.appendChild(d && d.element || o)), l.appendChild(g), this.setTimeout(c, [{ 520 type: "load", 521 target: l 522 }]), l 523 } 524 }), b 525}), function (a) { 526 "use strict"; 527 "function" == typeof define && define.amd ? define(["./blueimp-helper", "./blueimp-gallery-video"], a) : a(window.blueimp.helper || window.jQuery, window.blueimp.Gallery) 528}(function (a, b) { 529 "use strict"; 530 if (!window.postMessage) return b; 531 a.extend(b.prototype.options, { 532 vimeoVideoIdProperty: "vimeo", 533 vimeoPlayerUrl: "//player.vimeo.com/video/VIDEO_ID?api=1&player_id=PLAYER_ID", 534 vimeoPlayerIdPrefix: "vimeo-player-", 535 vimeoClickToPlay: !0 536 }); 537 var c = b.prototype.textFactory || b.prototype.imageFactory, d = function (a, b, c, d) { 538 this.url = a, this.videoId = b, this.playerId = c, this.clickToPlay = d, this.element = document.createElement("div"), this.listeners = {} 539 }, e = 0; 540 return a.extend(d.prototype, { 541 canPlayType: function () { 542 return !0 543 }, on: function (a, b) { 544 return this.listeners[a] = b, this 545 }, loadAPI: function () { 546 for (var b, c, d = this, e = "//" + ("https" === location.protocol ? "secure-" : "") + "a.vimeocdn.com/js/froogaloop2.min.js", f = document.getElementsByTagName("script"), g = f.length, h
546= function () { 547 !c && d.playOnReady && d.play(), c = !0 548 }; g;) if (g -= 1, f[g].src === e) { 549 b = f[g]; 550 break 551 } 552 b || (b = document.createElement("script"), b.src = e), a(b).on("load", h), f[0].parentNode.insertBefore(b, f[0]), /loaded|complete/.test(b.readyState) && h() 553 }, onReady: function () { 554 var a = this; 555 this.ready = !0, this.player.addEvent("play", function () { 556 a.hasPlayed = !0, a.onPlaying() 557 }), this.player.addEvent("pause", function () { 558 a.onPause() 559 }), this.player.addEvent("finish", function () { 560 a.onPause() 561 }), this.playOnReady && this.play() 562 }, onPlaying: function () { 563 this.playStatus < 2 && (this.listeners.playing(), this.playStatus = 2) 564 }, onPause: function () { 565 this.listeners.pause(), delete this.playStatus 566 }, insertIframe: function () { 567 var a = document.createElement("iframe"); 568 a.src = this.url.replace("VIDEO_ID", this.videoId).replace("PLAYER_ID", this.playerId), a.id = this.playerId, this.element.parentNode.replaceChild(a, this.element), this.element = a 569 }, play: function () { 570 var a = this; 571 this.playStatus || (this.listeners.play(), this.playStatus = 1), this.ready ? !this.hasPlayed && (this.clickToPlay || window.navigator && /iP(hone|od|ad)/.test(window.navigator.platform)) ? this.onPlaying() : this.player.api("play") : (this.playOnReady = !0, window.$f ? this.player || (this.insertIframe(), this.player = $f(this.element), this.player.addEvent("ready", function () { 572 a.onReady() 573 })) : this.loadAPI()) 574 }, pause: function () { 575 this.ready ? this.player.api("pause") : this.playStatus && (delete this.playOnReady, this.listeners.pause(), delete this.playStatus) 576 } 577 }), a.extend(b.prototype, { 578 VimeoPlayer: d, textFactory: function (a, b) { 579 var f = this.options, g = this.getItemProperty(a, f.vimeoVideoIdProperty); 580 return g ? (void 0 === this.getItemProperty(a, f.urlProperty) && (a[f.urlProperty] = "//vimeo.com/" + g), e += 1, this.videoFactory(a, b, new d(f.vimeoPlayerUrl, g, f.vimeoPlayerIdPrefix + e, f.vimeoClickToPlay))) : c.call(this, a, b) 581 } 582 }), b 583}), function (a) { 584 "use strict"; 585 "function" == typeof define && define.amd ? define(["./blueimp-helper", "./blueimp-gallery-video"], a) : a(window.blueimp.helper || window.jQuery, window.blueimp.Gallery) 586}(function (a, b) { 587 "use strict"; 588 if (!window.postMessage) return b; 589 a.extend(b.prototype.options, { 590 youTubeVideoIdProperty: "youtube", 591 youTubePlayerVars: {wmode: "transparent"}, 592 youTubeClickToPlay: !0 593 }); 594 var c = b.prototype.textFactory || b.prototype.imageFactory, d = function (a, b, c) { 595 this.videoId = a, this.playerVars = b, this.clickToPlay = c, this.element = document.createElement("div"), this.listeners = {} 596 }; 597 return a.extend(d.prototype, { 598 canPlayType: function () { 599 return !0 600 }, on: function (a, b) { 601 return this.listeners[a] = b, this 602 }, loadAPI: function () { 603 var a, b = this, c = window.onYouTubeIframeAPIReady, d = "//www.youtube.com/iframe_api", 604 e = document.getElementsByTagName("script"), f = e.length; 605 for (window.onYouTubeIframeAPIReady = function () { 606 c && c.apply(this), b.playOnReady && b.play() 607 }; f;) if (f -= 1, e[f].src === d) return; 608 a = document.createElement("script"), a.src = d, e[0].parentNode.insertBefore(a, e[0]) 609 }, onReady: function () { 610 this.ready = !0, this.playOnReady && this.play() 611 }, onPlaying: function () { 612 this.playStatus < 2 && (this.listeners.playing(), this.playStatus = 2) 613 }, onPause: function () { 614 b.prototype.setTimeout.call(this, this.checkSeek, null, 2e3) 615 }, checkSeek: function () { 616 (this.stateChange === YT.PlayerState.PAUSED || this.stateChange === YT.PlayerState.ENDED) && (this.listeners.pause(), delete this.playStatus) 617 }, onStateChange: function (a) { 618 switch (a.data) { 619 case YT.PlayerState.PLAYING: 620 this.hasPlayed = !0, this.onPlaying(); 621 break; 622 case YT.PlayerState.PAUSED: 623 case YT.PlayerState.ENDED: 624 this.onPause() 625 } 626 this.stateChange = a.data 627 }, onError: function (a) { 628 this.listeners.error(a) 629 }, play: function () { 630 var a = this; 631 this.playStatus || (this.listeners.play(), this.playStatus = 1), this.ready ? !this.hasPlayed && (this.clickToPlay || window.navigator && /iP(hone|od|ad)/.test(window.navigator.platform)) ? this.onPlaying() : this.player.playVideo() : (this.playOnReady = !0, window.YT && YT.Player ? this.player || (this.player = new YT.Player(this.element, { 632 videoId: this.videoId, 633 playerVars: this.playerVars, 634 events: { 635 onReady: function () { 636 a.onReady() 637 }, onStateChange: function (b) { 638 a.onStateChange(b) 639 }, onError: function (b) { 640 a.onError(b) 641 } 642 } 643 })) : this.loadAPI()) 644 }, pause: function () { 645 this.ready ? this.player.pauseVideo() : this.playStatus && (delete this.playOnReady, this.listeners.pause(), delete this.playStatus) 646 } 647 }), a.extend(b.prototype, { 648 YouTubePlayer: d, textFactory: function (a, b) { 649 var e = this.options, f = this.getItemProperty(a, e.youTubeVideoIdProperty); 650 return f ? (void 0 === this.getItemProperty(a, e.urlProperty) && (a[e.urlProperty] = "//www.youtube.com/watch?v=" + f), void 0 === this.getItemProperty(a, e.videoPosterProperty) && (a[e.videoPosterProperty] = "//img.youtube.com/vi/" + f + "/maxresdefault.jpg"), this.videoFactory(a, b, new d(f, e.youTubePlayerVars, e.youTubeClickToPlay))) : c.call(this, a, b) 651 } 652 }), b 653}), function (a) { 654 "use strict"; 655 "function" == typeof define && define.amd ? define(["jquery", "./blueimp-gallery"], a) : a(window.jQuery, window.blueimp.Gallery) 656}(function (a, b) { 657 "use strict"; 658 a(document).on("click", "[data-gallery]", function (c) { 659 var d = a(this).data("gallery"), e = a(d), f = e.length && e || a(b.prototype.options.container), g = { 660 onopen: function () { 661 f.data("gallery", this).trigger("open") 662 }, onopened: function () { 663 f.trigger("opened") 664 }, onslide: function () { 665 f.trigger("slide", arguments) 666 }, onslideend: function () { 667 f.trigger("slideend", arguments) 668 }, onslidecomplete: function () { 669 f.trigger("slidecomplete", arguments) 670 }, onclose: function () { 671 f.trigger("close") 672 }, onclosed: function () { 673 f.trigger("closed").removeData("gallery") 674 } 675 }, h = a.extend(f.data(), {container: f[0], index: this, event: c}, g), i = a('[data-gallery="' + d + '"]'); 676 return h.filter && (i = i.filter(h.filter)), new b(i, h) 677 }) 678});
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.