vendor: 48,773 bytes, lines 1-2018
1/*! 2 * fancyBox - jQuery Plugin 3 * version: 2.1.5 (Fri, 14 Jun 2013) 4 * requires jQuery v1.6 or later 5 * 6 * Examples at http://fancyapps.com/fancybox/ 7 * License: www.fancyapps.com/fancybox/#license 8 * 9 * Copyright 2012 Janis Skarnelis - [email protected] 10 * 11 */ 12 13;(function (window, document, $, undefined) { 14 "use strict"; 15 16 var H = $("html"), 17 W = $(window), 18 D = $(document), 19 F = $.fancybox = function () { 20 F.open.apply( this, arguments ); 21 }, 22 IE = navigator.userAgent.match(/msie/i), 23 didUpdate = null, 24 isTouch = document.createTouch !== undefined, 25 26 isQuery = function(obj) { 27 return obj && obj.hasOwnProperty && obj instanceof $; 28 }, 29 isString = function(str) { 30 return str && $.type(str) === "string"; 31 }, 32 isPercentage = function(str) { 33 return isString(str) && str.indexOf('%') > 0; 34 }, 35 isScrollable = function(el) { 36 return (el && !(el.style.overflow && el.style.overflow === 'hidden') && ((el.clientWidth && el.scrollWidth > el.clientWidth) || (el.clientHeight && el.scrollHeight > el.clientHeight))); 37 }, 38 getScalar = function(orig, dim) { 39 var value = parseInt(orig, 10) || 0; 40 41 if (dim && isPercentage(orig)) { 42 value = F.getViewport()[ dim ] / 100 * value; 43 } 44 45 return Math.ceil(value); 46 }, 47 getValue = function(value, dim) { 48 return getScalar(value, dim) + 'px'; 49 }; 50 51 $.extend(F, { 52 // The current version of fancyBox 53 version: '2.1.5', 54 55 defaults: { 56 padding : 15, 57 margin : 20, 58 59 width : 800, 60 height : 600, 61 minWidth : 100, 62 minHeight : 100, 63 maxWidth : 9999, 64 maxHeight : 9999, 65 pixelRatio: 1, // Set to 2 for retina display support 66 67 autoSize : true, 68 autoHeight : false, 69 autoWidth : false, 70 71 autoResize : true, 72 autoCenter : !isTouch, 73 fitToView : true, 74 aspectRatio : false, 75 topRatio : 0.5, 76 leftRatio : 0.5, 77 78 scrolling : 'auto', // 'auto', 'yes' or 'no' 79 wrapCSS : '', 80 81 arrows : true, 82 closeBtn : true, 83 closeClick : false, 84 nextClick : false, 85 mouseWheel : true, 86 autoPlay : false, 87 playSpeed : 3000, 88 preload : 3, 89 modal : false, 90 loop : true, 91 92 ajax : { 93 dataType : 'html', 94 headers : { 'X-fancyBox': true } 95 }, 96 iframe : { 97 scrolling : 'auto', 98 preload : true 99 }, 100 swf : { 101 wmode: 'transparent', 102 allowfullscreen : 'true', 103 allowscriptaccess : 'always' 104 }, 105 106 keys : { 107 next : { 108 13 : 'left', // enter 109 34 : 'up', // page down 110 39 : 'left', // right arrow 111 40 : 'up' // down arrow 112 }, 113 prev : { 114 8 : 'right', // backspace 115 33 : 'down', // page up 116 37 : 'right', // left arrow 117 38 : 'down' // up arrow 118 }, 119 close : [27], // escape key 120 play : [32], // space - start/stop slideshow 121 toggle : [70] // letter "f" - toggle fullscreen 122 }, 123 124 direction : { 125 next : 'left', 126 prev : 'right' 127 }, 128 129 scrollOutside : true, 130 131 // Override some properties 132 index : 0, 133 type : null, 134 href : null, 135 content : null, 136 title : null, 137 138 // HTML templates 139 tpl: { 140 wrap : '<div class="fancybox-wrap" tabIndex="-1"><div class="fancybox-skin"><div class="fancybox-outer"><div class="fancybox-inner"></div></div></div></div>', 141 image : '<img class="fancybox-image" src="{href}" alt="" />', 142 iframe : '<iframe id="fancybox-frame{rnd}" name="fancybox-frame{rnd}" class="fancybox-iframe" frameborder="0" vspace="0" hspace="0" webkitAllowFullScreen mozallowfullscreen allowFullScreen' + (IE ? ' allowtransparency="true"' : '') + '></iframe>', 143 error : '<p class="fancybox-error">The requested content cannot be loaded.<br/>Please try again later.</p>', 144 closeBtn : '<a title="Close" class="fancybox-item fancybox-close" href="javascript:;"></a>', 145 next : '<a title="Next" class="fancybox-nav fancybox-next" href="javascript:;"><span></span></a>', 146 prev : '<a title="Previous" class="fancybox-nav fancybox-prev" href="javascript:;"><span></span></a>', 147 loading : '<div id="fancybox-loading"><div></div></div>' 148 }, 149 150 // Properties for each animation type 151 // Opening fancyBox 152 openEffect : 'fade', // 'elastic', 'fade' or 'none' 153 openSpeed : 250, 154 openEasing : 'swing', 155 openOpacity : true, 156 openMethod : 'zoomIn', 157 158 // Closing fancyBox 159 closeEffect : 'fade', // 'elastic', 'fade' or 'none' 160 closeSpeed : 250, 161 closeEasing : 'swing', 162 closeOpacity : true, 163 closeMethod : 'zoomOut', 164 165 // Changing next gallery item 166 nextEffect : 'elastic', // 'elastic', 'fade' or 'none' 167 nextSpeed : 250, 168 nextEasing : 'swing', 169 nextMethod : 'changeIn', 170 171 // Changing previous gallery item 172 prevEffect : 'elastic', // 'elastic', 'fade' or 'none' 173 prevSpeed : 250, 174 prevEasing : 'swing', 175 prevMethod : 'changeOut', 176 177 // Enable default helpers 178 helpers : { 179 overlay : true, 180 title : true 181 }, 182 183 // Callbacks 184 onCancel : $.noop, // If canceling 185 beforeLoad : $.noop, // Before loading 186 afterLoad : $.noop, // After loading 187 beforeShow : $.noop, // Before changing in current item 188 afterShow : $.noop, // After opening 189 beforeChange : $.noop, // Before changing gallery item 190 beforeClose : $.noop, // Before closing 191 afterClose : $.noop // After closing 192 }, 193 194 //Current state 195 group : {}, // Selected group 196 opts : {}, // Group options 197 previous : null, // Previous element 198 coming : null, // Element being loaded 199 current : null, // Currently loaded element 200 isActive : false, // Is activated 201 isOpen : false, // Is currently open 202 isOpened : false, // Have been fully opened at least once 203 204 wrap : null, 205 skin : null, 206 outer : null, 207 inner : null, 208 209 player : { 210 timer : null, 211 isActive : false 212 }, 213 214 // Loaders 215 ajaxLoad : null, 216 imgPreload : null, 217 218 // Some collections 219 transitions : {}, 220 helpers : {}, 221 222 /* 223 * Static methods 224 */ 225 226 open: function (group, opts) { 227 if (!group) { 228 return; 229 } 230 231 if (!$.isPlainObject(opts)) { 232 opts = {}; 233 } 234 235 // Close if already active 236 if (false === F.close(true)) { 237 return; 238 } 239 240 // Normalize group 241 if (!$.isArray(group)) { 242 group = isQuery(group) ? $(group).get() : [group]; 243 } 244 245 // Recheck if the type of each element is `object` and set content type (image, ajax, etc) 246 $.each(group, function(i, element) { 247 var obj = {}, 248 href, 249 title, 250 content, 251 type, 252 rez, 253 hrefParts, 254 selector; 255 256 if ($.type(element) === "object") { 257 // Check if is DOM element 258 if (element.nodeType) { 259 element = $(element); 260 } 261 262 if (isQuery(element)) { 263 obj = { 264 href : element.data('fancybox-href') || element.attr('href'), 265 title : $('<div/>').text( element.data('fancybox-title') || element.attr('title') || '' ).html(), 266 isDom : true, 267 element : element 268 }; 269 270 if ($.metadata) { 271 $.extend(true, obj, element.metadata()); 272 } 273 274 } else { 275 obj = element; 276 } 277 } 278 279 href = opts.href || obj.href || (isString(element) ? element : null); 280 title = opts.title !== undefined ? opts.title : obj.title || ''; 281 282 content = opts.content || obj.content; 283 type = content ? 'html' : (opts.type || obj.type); 284 285 if (!type && obj.isDom) { 286 type = element.data('fancybox-type'); 287 288 if (!type) { 289 rez = element.prop('class').match(/fancybox\.(\w+)/); 290 type = rez ? rez[1] : null; 291 } 292 } 293 294 if (isString(href)) { 295 // Try to guess the content type 296 if (!type) { 297 if (F.isImage(href)) { 298 type = 'image'; 299 300 } else if (F.isSWF(href)) { 301 type = 'swf'; 302 303 } else if (href.charAt(0) === '#') { 304 type = 'inline'; 305 306 } else if (isString(element)) { 307 type = 'html'; 308 content = element; 309 } 310 } 311 312 // Split url into two pieces with source url and content selector, e.g, 313 // "/mypage.html #my_id" will load "/mypage.html" and display element having id "my_id" 314 if (type === 'ajax') { 315 hrefParts = href.split(/\s+/, 2); 316 href = hrefParts.shift(); 317 selector = hrefParts.shift(); 318 } 319 } 320 321 if (!content) { 322 if (type === 'inline') { 323 if (href) { 324 content = $( isString(href) ? href.replace(/.*(?=#[^\s]+$)/, '') : href ); //strip for ie7 325 326 } else if (obj.isDom) { 327 content = element; 328 } 329 330 } else if (type === 'html') { 331 content = href; 332 333 } else if (!type && !href && obj.isDom) { 334 type = 'inline'; 335 content = element; 336 } 337 } 338 339 $.extend(obj, { 340 href : href, 341 type : type, 342 content : content, 343 title : title, 344 selector : selector 345 }); 346 347 group[ i ] = obj; 348 }); 349 350 // Extend the defaults 351 F.opts = $.extend(true, {}, F.defaults, opts); 352 353 // All options are merged recursive except keys 354 if (opts.keys !== undefined) { 355 F.opts.keys = opts.keys ? $.extend({}, F.defaults.keys, opts.keys) : false; 356 } 357 358 F.group = group; 359 360 return F._start(F.opts.index); 361 }, 362 363 // Cancel image loading or abort ajax request 364 cancel: function () { 365 var coming = F.coming; 366 367 if (coming && false === F.trigger('onCancel')) { 368 return; 369 } 370 371 F.hideLoading(); 372 373 if (!coming) { 374 return; 375 } 376 377 if (F.ajaxLoad) { 378 F.ajaxLoad.abort(); 379 } 380 381 F.ajaxLoad = null; 382 383 if (F.imgPreload) { 384 F.imgPreload.onload = F.imgPreload.onerror = null; 385 } 386 387 if (coming.wrap) { 388 coming.wrap.stop(true, true).trigger('onReset').remove(); 389 } 390 391 F.coming = null; 392 393 // If the first item has been canceled, then clear everything 394 if (!F.current) { 395 F._afterZoomOut( coming ); 396 } 397 }, 398 399 // Start closing animation if is open; remove immediately if opening/closing 400 close: function (event) { 401 F.cancel(); 402 403 if (false === F.trigger('beforeClose')) { 404 return; 405 } 406 407 F.unbindEvents(); 408 409 if (!F.isActive) { 410 return; 411 } 412 413 if (!F.isOpen || event === true) { 414 $('.fancybox-wrap').stop(true).trigger('onReset').remove(); 415 416 F._afterZoomOut(); 417 418 } else { 419 F.isOpen = F.isOpened = false; 420 F.isClosing = true; 421 422 $('.fancybox-item, .fancybox-nav').remove(); 423 424 F.wrap.stop(true, true).removeClass('fancybox-opened'); 425 426 F.transitions[ F.current.closeMethod ](); 427 } 428 }, 429 430 // Manage slideshow: 431 // $.fancybox.play(); - toggle slideshow 432 // $.fancybox.play( true ); - start 433 // $.fancybox.play( false ); - stop 434 play: function ( action ) { 435 var clear = function () { 436 clearTimeout(F.player.timer); 437 }, 438 set = function () { 439 clear(); 440 441 if (F.current && F.player.isActive) { 442 F.player.timer = setTimeout(F.next, F.current.playSpeed); 443 } 444 }, 445 stop = function () { 446 clear(); 447 448 D.unbind('.player'); 449 450 F.player.isActive = false; 451 452 F.trigger('onPlayEnd'); 453 }, 454 start = function () { 455 if (F.current && (F.current.loop || F.current.index < F.group.length - 1)) { 456 F.player.isActive = true; 457 458 D.bind({ 459 'onCancel.player beforeClose.player' : stop, 460 'onUpdate.player' : set, 461 'beforeLoad.player' : clear 462 }); 463 464 set(); 465 466 F.trigger('onPlayStart'); 467 } 468 }; 469 470 if (action === true || (!F.player.isActive && action !== false)) { 471 start(); 472 } else { 473 stop(); 474 } 475 }, 476 477 // Navigate to next gallery item 478 next: function ( direction ) { 479 var current = F.current; 480 481 if (current) { 482 if (!isString(direction)) { 483 direction = current.direction.next; 484 } 485 486 F.jumpto(current.index + 1, direction, 'next'); 487 } 488 }, 489 490 // Navigate to previous gallery item 491 prev: function ( direction ) { 492 var current = F.current; 493 494 if (current) { 495 if (!isString(direction)) { 496 direction = current.direction.prev; 497 } 498 499 F.jumpto(current.index - 1, direction, 'prev'); 500 } 501 }, 502 503 // Navigate to gallery item by index 504 jumpto: function ( index, direction, router ) { 505 var current = F.current; 506 507 if (!current) { 508 return; 509 } 510 511 index = getScalar(index); 512 513 F.direction = direction || current.direction[ (index >= current.index ? 'next' : 'prev') ]; 514 F.router = router || 'jumpto'; 515 516 if (current.loop) { 517 if (index < 0) { 518 index = current.group.length + (index % current.group.length); 519 } 520 521 index = index % current.group.length; 522 } 523 524 if (current.group[ index ] !== undefined) { 525 F.cancel(); 526 527 F._start(index); 528 } 529 }, 530 531 // Center inside viewport and toggle position type to fixed or absolute if needed 532 reposition: function (e, onlyAbsolute) { 533 var current = F.current, 534 wrap = current ? current.wrap : null, 535 pos; 536 537 if (wrap) { 538 pos = F._getPosition(onlyAbsolute); 539 540 if (e && e.type === 'scroll') { 541 delete pos.position; 542 543 wrap.stop(true, true).animate(pos, 200); 544 545 } else { 546 wrap.css(pos); 547 548 current.pos = $.extend({}, current.dim, pos); 549 } 550 } 551 }, 552 553 update: function (e) { 554 var type = (e && e.originalEvent && e.originalEvent.type), 555 anyway = !type || type === 'orientationchange'; 556 557 if (anyway) { 558 clearTimeout(didUpdate); 559 560 didUpdate = null; 561 } 562 563 if (!F.isOpen || didUpdate) { 564 return; 565 } 566 567 didUpdate = setTimeout(function() { 568 var current = F.current; 569 570 if (!current || F.isClosing) { 571 return; 572 } 573 574 F.wrap.removeClass('fancybox-tmp'); 575 576 if (anyway || type === 'load' || (type === 'resize' && current.autoResize)) { 577 F._setDimension(); 578 } 579 580 if (!(type === 'scroll' && current.canShrink)) { 581 F.reposition(e); 582 } 583 584 F.trigger('onUpdate'); 585 586 didUpdate = null; 587 588 }, (anyway && !isTouch ? 0 : 300)); 589 }, 590 591 // Shrink content to fit inside viewport or restore if resized 592 toggle: function ( action ) { 593 if (F.isOpen) { 594 F.current.fitToView = $.type(action) === "boolean" ? action : !F.current.fitToView; 595 596 // Help browser to restore document dimensions 597 if (isTouch) { 598 F.wrap.removeAttr('style').addClass('fancybox-tmp'); 599 600 F.trigger('onUpdate'); 601 } 602 603 F.update(); 604 } 605 }, 606 607 hideLoading: function () { 608 D.unbind('.loading'); 609 610 $('#fancybox-loading').remove(); 611 }, 612 613 showLoading: function () { 614 var el, viewport; 615 616 F.hideLoading(); 617 618 el = $(F.opts.tpl.loading).click(F.cancel).appendTo('body'); 619 620 // If user will press the escape-button, the request will be canceled 621 D.bind('keydown.loading', function(e) { 622 if ((e.which || e.keyCode) === 27) { 623 e.preventDefault(); 624 625 F.cancel(); 626 } 627 }); 628 629 if (!F.defaults.fixed) { 630 viewport = F.getViewport(); 631 632 el.css({ 633 position : 'absolute', 634 top : (viewport.h * 0.5) + viewport.y, 635 left : (viewport.w * 0.5) + viewport.x 636 }); 637 } 638 639 F.trigger('onLoading'); 640 }, 641 642 getViewport: function () { 643 var locked = (F.current && F.current.locked) || false, 644 rez = { 645 x: W.scrollLeft(), 646 y: W.scrollTop() 647 }; 648 649 if (locked && locked.length) { 650 rez.w = locked[0].clientWidth; 651 rez.h = locked[0].clientHeight; 652 653 } else { 654 // See http://bugs.jquery.com/ticket/6724 655 rez.w = isTouch && window.innerWidth ? window.innerWidth : W.width(); 656 rez.h = isTouch && window.innerHeight ? window.innerHeight : W.height(); 657 } 658 659 return rez; 660 }, 661 662 // Unbind the keyboard / clicking actions 663 unbindEvents: function () { 664 if (F.wrap && isQuery(F.wrap)) { 665 F.wrap.unbind('.fb'); 666 } 667 668 D.unbind('.fb'); 669 W.unbind('.fb'); 670 }, 671 672 bindEvents: function () { 673 var current = F.current, 674 keys; 675 676 if (!current) { 677 return; 678 } 679 680 // Changing document height on iOS devices triggers a 'resize' event, 681 // that can change document height... repeating infinitely 682 W.bind('orientationchange.fb' + (isTouch ? '' : ' resize.fb') + (current.autoCenter && !current.locked ? ' scroll.fb' : ''), F.update); 683 684 keys = current.keys; 685 686 if (keys) { 687 D.bind('keydown.fb', function (e) { 688 var code = e.which || e.keyCode, 689 target = e.target || e.srcElement; 690 691 // Skip esc key if loading, because showLoading will cancel preloading 692 if (code === 27 && F.coming) { 693 return false; 694 } 695 696 // Ignore key combinations and key events within form elements 697 if (!e.ctrlKey && !e.altKey && !e.shiftKey && !e.metaKey && !(target && (target.type || $(target).is('[contenteditable]')))) { 698 $.each(keys, function(i, val) { 699 if (current.group.length > 1 && val[ code ] !== undefined) { 700 F[ i ]( val[ code ] ); 701 702 e.preventDefault(); 703 return false; 704 } 705 706 if ($.inArray(code, val) > -1) { 707 F[ i ] (); 708 709 e.preventDefault(); 710 return false; 711 } 712 }); 713 } 714 }); 715 } 716 717 if ($.fn.mousewheel && current.mouseWheel) { 718 F.wrap.bind('mousewheel.fb', function (e, delta, deltaX, deltaY) { 719 var target = e.target || null, 720 parent = $(target), 721 canScroll = false; 722 723 while (parent.length) { 724 if (canScroll || parent.is('.fancybox-skin') || parent.is('.fancybox-wrap')) { 725 break; 726 } 727 728 canScroll = isScrollable( parent[0] ); 729 parent = $(parent).parent(); 730 } 731 732 if (delta !== 0 && !canScroll) { 733 if (F.group.length > 1 && !current.canShrink) { 734 if (deltaY > 0 || deltaX > 0) { 735 F.prev( deltaY > 0 ? 'down' : 'left' ); 736 737 } else if (deltaY < 0 || deltaX < 0) { 738 F.next( deltaY < 0 ? 'up' : 'right' ); 739 } 740 741 e.preventDefault(); 742 } 743 } 744 }); 745 } 746 }, 747 748 trigger: function (event, o) { 749 var ret, obj = o || F.coming || F.current; 750 751 if (obj) { 752 if ($.isFunction( obj[event] )) { 753 ret = obj[event].apply(obj, Array.prototype.slice.call(arguments, 1)); 754 } 755 756 if (ret === false) { 757 return false; 758 } 759 760 if (obj.helpers) { 761 $.each(obj.helpers, function (helper, opts) { 762 if (opts && F.helpers[helper] && $.isFunction(F.helpers[helper][event])) { 763 F.helpers[helper][event]($.extend(true, {}, F.helpers[helper].defaults, opts), obj); 764 } 765 }); 766 } 767 } 768 769 D.trigger(event); 770 }, 771 772 isImage: function (str) { 773 return isString(str) && str.match(/(^data:image\/.*,)|(\.(jp(e|g|eg)|gif|png|bmp|webp|svg)((\?|#).*)?$)/i); 774 }, 775 776 isSWF: function (str) { 777 return isString(str) && str.match(/\.(swf)((\?|#).*)?$/i); 778 }, 779 780 _start: function (index) { 781 var coming = {}, 782 obj, 783 href, 784 type, 785 margin, 786 padding; 787 788 index = getScalar( index ); 789 obj = F.group[ index ] || null; 790 791 if (!obj) { 792 return false; 793 } 794 795 coming = $.extend(true, {}, F.opts, obj); 796 797 // Convert margin and padding properties to array - top, right, bottom, left 798 margin = coming.margin; 799 padding = coming.padding; 800 801 if ($.type(margin) === 'number') { 802 coming.margin = [margin, margin, margin, margin]; 803 } 804 805 if ($.type(padding) === 'number') { 806 coming.padding = [padding, padding, padding, padding]; 807 } 808 809 // 'modal' propery is just a shortcut 810 if (coming.modal) { 811 $.extend(true, coming, { 812 closeBtn : false, 813 closeClick : false, 814 nextClick : false, 815 arrows : false, 816 mouseWheel : false, 817 keys : null, 818 helpers: { 819 overlay : { 820 closeClick : false 821 } 822 } 823 }); 824 } 825 826 // 'autoSize' property is a shortcut, too 827 if (coming.autoSize) { 828 coming.autoWidth = coming.autoHeight = true; 829 } 830 831 if (coming.width === 'auto') { 832 coming.autoWidth = true; 833 } 834 835 if (coming.height === 'auto') { 836 coming.autoHeight = true; 837 } 838 839 /* 840 * Add reference to the group, so it`s possible to access from callbacks, example: 841 * afterLoad : function() { 842 * this.title = 'Image ' + (this.index + 1) + ' of ' + this.group.length + (this.title ? ' - ' + this.title : ''); 843 * } 844 */ 845 846 coming.group = F.group; 847 coming.index = index; 848 849 // Give a chance for callback or helpers to update coming item (type, title, etc) 850 F.coming = coming; 851 852 if (false === F.trigger('beforeLoad')) { 853 F.coming = null; 854 855 return; 856 } 857 858 type = coming.type; 859 href = coming.href; 860 861 if (!type) { 862 F.coming = null; 863 864 //If we can not determine content type then drop silently or display next/prev item if looping through gallery 865 if (F.current && F.router && F.router !== 'jumpto') { 866 F.current.index = index; 867 868 return F[ F.router ]( F.direction ); 869 } 870 871 return false; 872 } 873 874 F.isActive = true; 875 876 if (type === 'image' || type === 'swf') { 877 coming.autoHeight = coming.autoWidth = false; 878 coming.scrolling = 'visible'; 879 } 880 881 if (type === 'image') { 882 coming.aspectRatio = true; 883 } 884 885 if (type === 'iframe' && isTouch) { 886 coming.scrolling = 'scroll'; 887 } 888 889 // Build the neccessary markup 890 coming.wrap = $(coming.tpl.wrap).addClass('fancybox-' + (isTouch ? 'mobile' : 'desktop') + ' fancybox-type-' + type + ' fancybox-tmp ' + coming.wrapCSS).appendTo( coming.parent || 'body' ); 891 892 $.extend(coming, { 893 skin : $('.fancybox-skin', coming.wrap), 894 outer : $('.fancybox-outer', coming.wrap), 895 inner : $('.fancybox-inner', coming.wrap) 896 }); 897 898 $.each(["Top", "Right", "Bottom", "Left"], function(i, v) { 899 coming.skin.css('padding' + v, getValue(coming.padding[ i ])); 900 }); 901 902 F.trigger('onReady'); 903 904 // Check before try to load; 'inline' and 'html' types need content, others - href 905 if (type === 'inline' || type === 'html') { 906 if (!coming.content || !coming.content.length) { 907 return F._error( 'content' ); 908 } 909 910 } else if (!href) { 911 return F._error( 'href' ); 912 } 913 914 if (type === 'image') { 915 F._loadImage(); 916 917 } else if (type === 'ajax') { 918 F._loadAjax(); 919 920 } else if (type === 'iframe') { 921 F._loadIframe(); 922 923 } else { 924 F._afterLoad(); 925 } 926 }, 927 928 _error: function ( type ) { 929 $.extend(F.coming, { 930 type : 'html', 931 autoWidth : true, 932 autoHeight : true, 933 minWidth : 0, 934 minHeight : 0, 935 scrolling : 'no', 936 hasError : type, 937 content : F.coming.tpl.error 938 }); 939 940 F._afterLoad(); 941 }, 942 943 _loadImage: function () { 944 // Reset preload image so it is later possible to check "complete" property 945 var img = F.imgPreload = new Image(); 946 947 img.onload = function () { 948 this.onload = this.onerror = null; 949 950 F.coming.width = this.width / F.opts.pixelRatio; 951 F.coming.height = this.height / F.opts.pixelRatio; 952 953 F._afterLoad(); 954 }; 955 956 img.onerror = function () { 957 this.onload = this.onerror = null; 958 959 F._error( 'image' ); 960 }; 961 962 img.src = F.coming.href; 963 964 if (img.complete !== true) { 965 F.showLoading(); 966 } 967 }, 968 969 _loadAjax: function () { 970 var coming = F.coming; 971 972 F.showLoading(); 973 974 F.ajaxLoad = $.ajax($.extend({}, coming.ajax, { 975 url: coming.href, 976 error: function (jqXHR, textStatus) { 977 if (F.coming && textStatus !== 'abort') { 978 F._error( 'ajax', jqXHR ); 979 980 } else { 981 F.hideLoading(); 982 } 983 }, 984 success: function (data, textStatus) { 985 if (textStatus === 'success') { 986 coming.content = data; 987 988 F._afterLoad(); 989 } 990 } 991 })); 992 }, 993 994 _loadIframe: function() { 995 var coming = F.coming, 996 iframe = $(coming.tpl.iframe.replace(/\{rnd\}/g, new Date().getTime())) 997 .attr('scrolling', isTouch ? 'auto' : coming.iframe.scrolling) 998 .attr('src', coming.href); 999 1000 // This helps IE 1001 $(coming.wrap).bind('onReset', function () { 1002 try { 1003 $(this).find('iframe').hide().attr('src', '//about:blank').end().empty(); 1004 } catch (e) {} 1005 }); 1006 1007 if (coming.iframe.preload) { 1008 F.showLoading(); 1009 1010 iframe.one('load', function() { 1011 $(this).data('ready', 1); 1012 1013 // iOS will lose scrolling if we resize 1014 if (!isTouch) { 1015 $(this).bind('load.fb', F.update); 1016 } 1017 1018 // Without this trick: 1019 // - iframe won't scroll on iOS devices 1020 // - IE7 sometimes displays empty iframe 1021 $(this).parents('.fancybox-wrap').width('100%').removeClass('fancybox-tmp').show(); 1022 1023 F._afterLoad(); 1024 }); 1025 } 1026 1027 coming.content = iframe.appendTo( coming.inner ); 1028 1029 if (!coming.iframe.preload) { 1030 F._afterLoad(); 1031 } 1032 }, 1033 1034 _preloadImages: function() { 1035 var group = F.group, 1036 current = F.current, 1037 len = group.length, 1038 cnt = current.preload ? Math.min(current.preload, len - 1) : 0, 1039 item, 1040 i; 1041 1042 for (i = 1; i <= cnt; i += 1) { 1043 item = group[ (current.index + i ) % len ]; 1044 1045 if (item.type === 'image' && item.href) { 1046 new Image().src = item.href; 1047 } 1048 } 1049 }, 1050 1051 _afterLoad: function () { 1052 var coming = F.coming, 1053 previous = F.current, 1054 placeholder = 'fancybox-placeholder', 1055 current, 1056 content, 1057 type, 1058 scrolling, 1059 href, 1060 embed; 1061 1062 F.hideLoading(); 1063 1064 if (!coming || F.isActive === false) { 1065 return; 1066 } 1067 1068 if (false === F.trigger('afterLoad', coming, previous)) { 1069 coming.wrap.stop(true).trigger('onReset').remove(); 1070 1071 F.coming = null; 1072 1073 return; 1074 } 1075 1076 if (previous) { 1077 F.trigger('beforeChange', previous); 1078 1079 previous.wrap.stop(true).removeClass('fancybox-opened') 1080 .find('.fancybox-item, .fancybox-nav') 1081 .remove(); 1082 } 1083 1084 F.unbindEvents(); 1085 1086 current = coming; 1087 content = coming.content; 1088 type = coming.type; 1089 scrolling = coming.scrolling; 1090 1091 $.extend(F, { 1092 wrap : current.wrap, 1093 skin : current.skin, 1094 outer : current.outer, 1095 inner : current.inner, 1096 current : current, 1097 previous : previous 1098 }); 1099 1100 href = current.href; 1101 1102 switch (type) { 1103 case 'inline': 1104 case 'ajax': 1105 case 'html': 1106 if (current.selector) { 1107 content = $('<div>').html(content).find(current.selector); 1108 1109 } else if (isQuery(content)) { 1110 if (!content.data(placeholder)) { 1111 content.data(placeholder, $('<div class="' + placeholder + '"></div>').insertAfter( content ).hide() ); 1112 } 1113 1114 content = content.show().detach(); 1115 1116 current.wrap.bind('onReset', function () { 1117 if ($(this).find(content).length) { 1118 content.hide().replaceAll( content.data(placeholder) ).data(placeholder, false); 1119 } 1120 }); 1121 } 1122 break; 1123 1124 case 'image': 1125 content = current.tpl.image.replace(/\{href\}/g, href); 1126 break; 1127 1128 case 'swf': 1129 content = '<object id="fancybox-swf" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="100%" height="100%"><param name="movie" value="' + href + '"></param>'; 1130 embed = ''; 1131 1132 $.each(current.swf, function(name, val) { 1133 content += '<param name="' + name + '" value="' + val + '"></param>'; 1134 embed += ' ' + name + '="' + val + '"'; 1135 }); 1136 1137 content += '<embed src="' + href + '" type="application/x-shockwave-flash" width="100%" height="100%"' + embed + '></embed></object>'; 1138 break; 1139 } 1140 1141 if (!(isQuery(content) && content.parent().is(current.inner))) { 1142 current.inner.append( content ); 1143 } 1144 1145 // Give a chance for helpers or callbacks to update elements 1146 F.trigger('beforeShow'); 1147 1148 // Set scrolling before calculating dimensions 1149 current.inner.css('overflow', scrolling === 'yes' ? 'scroll' : (scrolling === 'no' ? 'hidden' : scrolling)); 1150 1151 // Set initial dimensions and start position 1152 F._setDimension(); 1153 1154 F.reposition(); 1155 1156 F.isOpen = false; 1157 F.coming = null; 1158 1159 F.bindEvents(); 1160 1161 if (!F.isOpened) { 1162 $('.fancybox-wrap').not( current.wrap ).stop(true).trigger('onReset').remove(); 1163 1164 } else if (previous.prevMethod) { 1165 F.transitions[ previous.prevMethod ](); 1166 } 1167 1168 F.transitions[ F.isOpened ? current.nextMethod : current.openMethod ](); 1169 1170 F._preloadImages(); 1171 }, 1172 1173 _setDimension: function () { 1174 var viewport = F.getViewport(), 1175 steps = 0, 1176 canShrink = false, 1177 canExpand = false, 1178 wrap = F.wrap, 1179 skin = F.skin, 1180 inner = F.inner, 1181 current = F.current, 1182 width = current.width, 1183 height = current.height, 1184 minWidth = current.minWidth, 1185 minHeight = current.minHeight, 1186 maxWidth = current.maxWidth, 1187 maxHeight = current.maxHeight, 1188 scrolling = current.scrolling, 1189 scrollOut = current.scrollOutside ? current.scrollbarWidth : 0, 1190 margin = current.margin, 1191 wMargin = getScalar(margin[1] + margin[3]), 1192 hMargin = getScalar(margin[0] + margin[2]), 1193 wPadding, 1194 hPadding, 1195 wSpace, 1196 hSpace, 1197 origWidth, 1198 origHeight, 1199 origMaxWidth, 1200 origMaxHeight, 1201 ratio, 1202 width_, 1203 height_, 1204 maxWidth_, 1205 maxHeight_, 1206 iframe, 1207 body; 1208 1209 // Reset dimensions so we could re-check actual size 1210 wrap.add(skin).add(inner).width('auto').height('auto').removeClass('fancybox-tmp'); 1211 1212 wPadding = getScalar(skin.outerWidth(true) - skin.width()); 1213 hPadding = getScalar(skin.outerHeight(true) - skin.height()); 1214 1215 // Any space between content and viewport (margin, padding, border, title) 1216 wSpace = wMargin + wPadding; 1217 hSpace = hMargin + hPadding; 1218 1219 origWidth = isPercentage(width) ? (viewport.w - wSpace) * getScalar(width) / 100 : width; 1220 origHeight = isPercentage(height) ? (viewport.h - hSpace) * getScalar(height) / 100 : height; 1221 1222 if (current.type === 'iframe') { 1223 iframe = current.content; 1224 1225 if (current.autoHeight && iframe.data('ready') === 1) { 1226 try { 1227 if (iframe[0].contentWindow.document.location) { 1228 inner.width( origWidth ).height(9999); 1229 1230 body = iframe.contents().find('body'); 1231 1232 if (scrollOut) { 1233 body.css('overflow-x', 'hidden'); 1234 } 1235 1236 origHeight = body.outerHeight(true); 1237 } 1238 1239 } catch (e) {} 1240 } 1241 1242 } else if (current.autoWidth || current.autoHeight) { 1243 inner.addClass( 'fancybox-tmp' ); 1244 1245 // Set width or height in case we need to calculate only one dimension 1246 if (!current.autoWidth) { 1247 inner.width( origWidth ); 1248 } 1249 1250 if (!current.autoHeight) { 1251 inner.height( origHeight ); 1252 } 1253 1254 if (current.autoWidth) { 1255 origWidth = inner.width(); 1256 } 1257 1258 if (current.autoHeight) { 1259 origHeight = inner.height(); 1260 } 1261 1262 inner.removeClass( 'fancybox-tmp' ); 1263 } 1264 1265 width = getScalar( origWidth ); 1266 height = getScalar( origHeight ); 1267 1268 ratio = origWidth / origHeight; 1269 1270 // Calculations for the content 1271 minWidth = getScalar(isPercentage(minWidth) ? getScalar(minWidth, 'w') - wSpace : minWidth); 1272 maxWidth = getScalar(isPercentage(maxWidth) ? getScalar(maxWidth, 'w') - wSpace : maxWidth); 1273 1274 minHeight = getScalar(isPercentage(minHeight) ? getScalar(minHeight, 'h') - hSpace : minHeight); 1275 maxHeight = getScalar(isPercentage(maxHeight) ? getScalar(maxHeight, 'h') - hSpace : maxHeight); 1276 1277 // These will be used to determine if wrap can fit in the viewport 1278 origMaxWidth = maxWidth; 1279 origMaxHeight = maxHeight; 1280 1281 if (current.fitToView) { 1282 maxWidth = Math.min(viewport.w - wSpace, maxWidth); 1283 maxHeight = Math.min(viewport.h - hSpace, maxHeight); 1284 } 1285 1286 maxWidth_ = viewport.w - wMargin; 1287 maxHeight_ = viewport.h - hMargin; 1288 1289 if (current.aspectRatio) { 1290 if (width > maxWidth) { 1291 width = maxWidth; 1292 height = getScalar(width / ratio); 1293 } 1294 1295 if (height > maxHeight) { 1296 height = maxHeight; 1297 width = getScalar(height * ratio); 1298 } 1299 1300 if (width < minWidth) { 1301 width = minWidth; 1302 height = getScalar(width / ratio); 1303 } 1304 1305 if (height < minHeight) { 1306 height = minHeight; 1307 width = getScalar(height * ratio); 1308 } 1309 1310 } else { 1311 width = Math.max(minWidth, Math.min(width, maxWidth)); 1312 1313 if (current.autoHeight && current.type !== 'iframe') { 1314 inner.width( width ); 1315 1316 height = inner.height(); 1317 } 1318 1319 height = Math.max(minHeight, Math.min(height, maxHeight)); 1320 } 1321 1322 // Try to fit inside viewport (including the title) 1323 if (current.fitToView) { 1324 inner.width( width ).height( height ); 1325 1326 wrap.width( width + wPadding ); 1327 1328 // Real wrap dimensions 1329 width_ = wrap.width(); 1330 height_ = wrap.height(); 1331 1332 if (current.aspectRatio) { 1333 while ((width_ > maxWidth_ || height_ > maxHeight_) && width > minWidth && height > minHeight) { 1334 if (steps++ > 19) { 1335 break; 1336 } 1337 1338 height = Math.max(minHeight, Math.min(maxHeight, height - 10)); 1339 width = getScalar(height * ratio); 1340 1341 if (width < minWidth) { 1342 width = minWidth; 1343 height = getScalar(width / ratio); 1344 } 1345 1346 if (width > maxWidth) { 1347 width = maxWidth; 1348 height = getScalar(width / ratio); 1349 } 1350 1351 inner.width( width ).height( height ); 1352 1353 wrap.width( width + wPadding ); 1354 1355 width_ = wrap.width(); 1356 height_ = wrap.height(); 1357 } 1358 1359 } else { 1360 width = Math.max(minWidth, Math.min(width, width - (width_ - maxWidth_))); 1361 height = Math.max(minHeight, Math.min(height, height - (height_ - maxHeight_))); 1362 } 1363 } 1364 1365 if (scrollOut && scrolling === 'auto' && height < origHeight && (width + wPadding + scrollOut) < maxWidth_) { 1366 width += scrollOut; 1367 } 1368 1369 inner.width( width ).height( height ); 1370 1371 wrap.width( width + wPadding ); 1372 1373 width_ = wrap.width(); 1374 height_ = wrap.height(); 1375 1376 canShrink = (width_ > maxWidth_ || height_ > maxHeight_) && width > minWidth && height > minHeight; 1377 canExpand = current.aspectRatio ? (width < origMaxWidth && height < origMaxHeight && width < origWidth && height < origHeight) : ((width < origMaxWidth || height < origMaxHeight) && (width < origWidth || height < origHeight)); 1378 1379 $.extend(current, { 1380 dim : { 1381 width : getValue( width_ ), 1382 height : getValue( height_ ) 1383 }, 1384 origWidth : origWidth, 1385 origHeight : origHeight, 1386 canShrink : canShrink, 1387 canExpand : canExpand, 1388 wPadding : wPadding, 1389 hPadding : hPadding, 1390 wrapSpace : height_ - skin.outerHeight(true), 1391 skinSpace : skin.height() - height 1392 }); 1393 1394 if (!iframe && current.autoHeight && height > minHeight && height < maxHeight && !canExpand) { 1395 inner.height('auto'); 1396 } 1397 }, 1398 1399 _getPosition: function (onlyAbsolute) { 1400 var current = F.current, 1401 viewport = F.getViewport(), 1402 margin = current.margin, 1403 width = F.wrap.width() + margin[1] + margin[3], 1404 height = F.wrap.height() + margin[0] + margin[2], 1405 rez = { 1406 position: 'absolute', 1407 top : margin[0], 1408 left : margin[3] 1409 }; 1410 1411 if (current.autoCenter && current.fixed && !onlyAbsolute && height <= viewport.h && width <= viewport.w) { 1412 rez.position = 'fixed'; 1413 1414 } else if (!current.locked) { 1415 rez.top += viewport.y; 1416 rez.left += viewport.x; 1417 } 1418 1419 rez.top = getValue(Math.max(rez.top, rez.top + ((viewport.h - height) * current.topRatio))); 1420 rez.left = getValue(Math.max(rez.left, rez.left + ((viewport.w - width) * current.leftRatio))); 1421 1422 return rez; 1423 }, 1424 1425 _afterZoomIn: function () { 1426 var current = F.current; 1427 1428 if (!current) { 1429 return; 1430 } 1431 1432 F.isOpen = F.isOpened = true; 1433 1434 F.wrap.css('overflow', 'visible').addClass('fancybox-opened').hide().show(0); 1435 1436 F.update(); 1437 1438 // Assign a click event 1439 if ( current.closeClick || (current.nextClick && F.group.length > 1) ) { 1440 F.inner.css('cursor', 'pointer').bind('click.fb', function(e) { 1441 if (!$(e.target).is('a') && !$(e.target).parent().is('a')) { 1442 e.preventDefault(); 1443 1444 F[ current.closeClick ? 'close' : 'next' ](); 1445 } 1446 }); 1447 } 1448 1449 // Create a close button 1450 if (current.closeBtn) { 1451 $(current.tpl.closeBtn).appendTo(F.skin).bind('click.fb', function(e) { 1452 e.preventDefault(); 1453 1454 F.close(); 1455 }); 1456 } 1457 1458 // Create navigation arrows 1459 if (current.arrows && F.group.length > 1) { 1460 if (current.loop || current.index > 0) { 1461 $(current.tpl.prev).appendTo(F.outer).bind('click.fb', F.prev); 1462 } 1463 1464 if (current.loop || current.index < F.group.length - 1) { 1465 $(current.tpl.next).appendTo(F.outer).bind('click.fb', F.next); 1466 } 1467 } 1468 1469 F.trigger('afterShow'); 1470 1471 // Stop the slideshow if this is the last item 1472 if (!current.loop && current.index === current.group.length - 1) { 1473 1474 F.play( false ); 1475 1476 } else if (F.opts.autoPlay && !F.player.isActive) { 1477 F.opts.autoPlay = false; 1478 1479 F.play(true); 1480 } 1481 }, 1482 1483 _afterZoomOut: function ( obj ) { 1484 obj = obj || F.current; 1485 1486 $('.fancybox-wrap').trigger('onReset').remove(); 1487 1488 $.extend(F, { 1489 group : {}, 1490 opts : {}, 1491 router : false, 1492 current : null, 1493 isActive : false, 1494 isOpened : false, 1495 isOpen : false, 1496 isClosing : false, 1497 wrap : null, 1498 skin : null, 1499 outer : null, 1500 inner : null 1501 }); 1502 1503 F.trigger('afterClose', obj); 1504 } 1505 }); 1506 1507 /* 1508 * Default transitions 1509 */ 1510 1511 F.transitions = { 1512 getOrigPosition: function () { 1513 var current = F.current, 1514 element = current.element, 1515 orig = current.orig, 1516 pos = {}, 1517 width = 50, 1518 height = 50, 1519 hPadding = current.hPadding, 1520 wPadding = current.wPadding, 1521 viewport = F.getViewport(); 1522 1523 if (!orig && current.isDom && element.is(':visible')) { 1524 orig = element.find('img:first'); 1525 1526 if (!orig.length) { 1527 orig = element; 1528 } 1529 } 1530 1531 if (isQuery(orig)) { 1532 pos = orig.offset(); 1533 1534 if (orig.is('img')) { 1535 width = orig.outerWidth(); 1536 height = orig.outerHeight(); 1537 } 1538 1539 } else { 1540 pos.top = viewport.y + (viewport.h - height) * current.topRatio; 1541 pos.left = viewport.x + (viewport.w - width) * current.leftRatio; 1542 } 1543 1544 if (F.wrap.css('position') === 'fixed' || current.locked) { 1545 pos.top -= viewport.y; 1546 pos.left -= viewport.x; 1547 } 1548 1549 pos = { 1550 top : getValue(pos.top - hPadding * current.topRatio), 1551 left : getValue(pos.left - wPadding * current.leftRatio), 1552 width : getValue(width + wPadding), 1553 height : getValue(height + hPadding) 1554 }; 1555 1556 return pos; 1557 }, 1558 1559 step: function (now, fx) { 1560 var ratio, 1561 padding, 1562 value, 1563 prop = fx.prop, 1564 current = F.current, 1565 wrapSpace = current.wrapSpace, 1566 skinSpace = current.skinSpace; 1567 1568 if (prop === 'width' || prop === 'height') { 1569 ratio = fx.end === fx.start ? 1 : (now - fx.start) / (fx.end - fx.start); 1570 1571 if (F.isClosing) { 1572 ratio = 1 - ratio; 1573 } 1574 1575 padding = prop === 'width' ? current.wPadding : current.hPadding; 1576 value = now - padding; 1577 1578 F.skin[ prop ]( getScalar( prop === 'width' ? value : value - (wrapSpace * ratio) ) ); 1579 F.inner[ prop ]( getScalar( prop === 'width' ? value : value - (wrapSpace * ratio) - (skinSpace * ratio) ) ); 1580 } 1581 }, 1582 1583 zoomIn: function () { 1584 var current = F.current, 1585 startPos = current.pos, 1586 effect = current.openEffect, 1587 elastic = effect === 'elastic', 1588 endPos = $.extend({opacity : 1}, startPos); 1589 1590 // Remove "position" property that breaks older IE 1591 delete endPos.position; 1592 1593 if (elastic) { 1594 startPos = this.getOrigPosition(); 1595 1596 if (current.openOpacity) { 1597 startPos.opacity = 0.1; 1598 } 1599 1600 } else if (effect === 'fade') { 1601 startPos.opacity = 0.1; 1602 } 1603 1604 F.wrap.css(startPos).animate(endPos, { 1605 duration : effect === 'none' ? 0 : current.openSpeed, 1606 easing : current.openEasing, 1607 step : elastic ? this.step : null, 1608 complete : F._afterZoomIn 1609 }); 1610 }, 1611 1612 zoomOut: function () { 1613 var current = F.current, 1614 effect = current.closeEffect, 1615 elastic = effect === 'elastic', 1616 endPos = {opacity : 0.1}; 1617 1618 if (elastic) { 1619 endPos = this.getOrigPosition(); 1620 1621 if (current.closeOpacity) { 1622 endPos.opacity = 0.1; 1623 } 1624 } 1625 1626 F.wrap.animate(endPos, { 1627 duration : effect === 'none' ? 0 : current.closeSpeed, 1628 easing : current.closeEasing, 1629 step : elastic ? this.step : null, 1630 complete : F._afterZoomOut 1631 }); 1632 }, 1633 1634 changeIn: function () { 1635 var current = F.current, 1636 effect = current.nextEffect, 1637 startPos = current.pos, 1638 endPos = { opacity : 1 }, 1639 direction = F.direction, 1640 distance = 200, 1641 field; 1642 1643 startPos.opacity = 0.1; 1644 1645 if (effect === 'elastic') { 1646 field = direction === 'down' || direction === 'up' ? 'top' : 'left'; 1647 1648 if (direction === 'down' || direction === 'right') { 1649 startPos[ field ] = getValue(getScalar(startPos[ field ]) - distance); 1650 endPos[ field ] = '+=' + distance + 'px'; 1651 1652 } else { 1653 startPos[ field ] = getValue(getScalar(startPos[ field ]) + distance); 1654 endPos[ field ] = '-=' + distance + 'px'; 1655 } 1656 } 1657 1658 // Workaround for http://bugs.jquery.com/ticket/12273 1659 if (effect === 'none') { 1660 F._afterZoomIn(); 1661 1662 } else { 1663 F.wrap.css(startPos).animate(endPos, { 1664 duration : current.nextSpeed, 1665 easing : current.nextEasing, 1666 complete : F._afterZoomIn 1667 }); 1668 } 1669 }, 1670 1671 changeOut: function () { 1672 var previous = F.previous, 1673 effect = previous.prevEffect, 1674 endPos = { opacity : 0.1 }, 1675 direction = F.direction, 1676 distance = 200; 1677 1678 if (effect === 'elastic') { 1679 endPos[ direction === 'down' || direction === 'up' ? 'top' : 'left' ] = ( direction === 'up' || direction === 'left' ? '-' : '+' ) + '=' + distance + 'px'; 1680 } 1681 1682 previous.wrap.animate(endPos, { 1683 duration : effect === 'none' ? 0 : previous.prevSpeed, 1684 easing : previous.prevEasing, 1685 complete : function () { 1686 $(this).trigger('onReset').remove(); 1687 } 1688 }); 1689 } 1690 }; 1691 1692 /* 1693 * Overlay helper 1694 */ 1695 1696 F.helpers.overlay = { 1697 defaults : { 1698 closeClick : true, // if true, fancyBox will be closed when user clicks on the overlay 1699 speedOut : 200, // duration of fadeOut animation 1700 showEarly : true, // indicates if should be opened immediately or wait until the content is ready 1701 css : {}, // custom CSS properties 1702 locked : !isTouch, // if true, the content will be locked into overlay 1703 fixed : true // if false, the overlay CSS position property will not be set to "fixed" 1704 }, 1705 1706 overlay : null, // current handle 1707 fixed : false, // indicates if the overlay has position "fixed" 1708 el : $('html'), // element that contains "the lock" 1709 1710 // Public methods 1711 create : function(opts) { 1712 var parent; 1713 1714 opts = $.extend({}, this.defaults, opts); 1715 1716 if (this.overlay) { 1717 this.close(); 1718 } 1719 1720 parent = F.coming ? F.coming.parent : opts.parent; 1721 1722 this.overlay = $('<div class="fancybox-overlay"></div>').appendTo( parent && parent.length ? parent : 'body' ); 1723 this.fixed = false; 1724 1725 if (opts.fixed && F.defaults.fixed) { 1726 this.overlay.addClass('fancybox-overlay-fixed'); 1727 1728 this.fixed = true; 1729 } 1730 }, 1731 1732 open : function(opts) { 1733 var that = this; 1734 1735 opts = $.extend({}, this.defaults, opts); 1736 1737 if (this.overlay) { 1738 this.overlay.unbind('.overlay').width('auto').height('auto'); 1739 1740 } else { 1741 this.create(opts); 1742 } 1743 1744 if (!this.fixed) { 1745 W.bind('resize.overlay', $.proxy( this.update, this) ); 1746 1747 this.update(); 1748 } 1749 1750 if (opts.closeClick) { 1751 this.overlay.bind('click.overlay', function(e) { 1752 if ($(e.target).hasClass('fancybox-overlay')) { 1753 if (F.isActive) { 1754 F.close(); 1755 } else { 1756 that.close(); 1757 } 1758 1759 return false; 1760 } 1761 }); 1762 } 1763 1764 this.overlay.css( opts.css ).show(); 1765 }, 1766 1767 close : function() { 1768 W.unbind('resize.overlay'); 1769 1770 if (this.el.hasClass('fancybox-lock')) { 1771 $('.fancybox-margin').removeClass('fancybox-margin'); 1772 1773 this.el.removeClass('fancybox-lock'); 1774 1775 W.scrollTop( this.scrollV ).scrollLeft( this.scrollH ); 1776 } 1777 1778 $('.fancybox-overlay').remove().hide(); 1779 1780 $.extend(this, { 1781 overlay : null, 1782 fixed : false 1783 }); 1784 }, 1785 1786 // Private, callbacks 1787 1788 update : function () { 1789 var width = '100%', offsetWidth; 1790 1791 // Reset width/height so it will not mess 1792 this.overlay.width(width).height('100%'); 1793 1794 // jQuery does not return reliable result for IE 1795 if (IE) { 1796 offsetWidth = Math.max(document.documentElement.offsetWidth, document.body.offsetWidth); 1797 1798 if (D.width() > offsetWidth) { 1799 width = D.width(); 1800 } 1801 1802 } else if (D.width() > W.width()) { 1803 width = D.width(); 1804 } 1805 1806 this.overlay.width(width).height(D.height()); 1807 }, 1808 1809 // This is where we can manipulate DOM, because later it would cause iframes to reload 1810 onReady : function (opts, obj) { 1811 var overlay = this.overlay; 1812 1813 $('.fancybox-overlay').stop(true, true); 1814 1815 if (!overlay) { 1816 this.create(opts); 1817 } 1818 1819 if (opts.locked && this.fixed && obj.fixed) { 1820 obj.locked = this.overlay.append( obj.wrap ); 1821 obj.fixed = false; 1822 } 1823 1824 if (opts.showEarly === true) { 1825 this.beforeShow.apply(this, arguments); 1826 } 1827 }, 1828 1829 beforeShow : function(opts, obj) { 1830 if (obj.locked && !this.el.hasClass('fancybox-lock')) { 1831 if (this.fixPosition !== false) { 1832 $('*').filter(function(){ 1833 return ($(this).css('position') === 'fixed' && !$(this).hasClass("fancybox-overlay") && !$(this).hasClass("fancybox-wrap") ); 1834 }).addClass('fancybox-margin'); 1835 } 1836 1837 this.el.addClass('fancybox-margin'); 1838 1839 this.scrollV = W.scrollTop(); 1840 this.scrollH = W.scrollLeft(); 1841 1842 this.el.addClass('fancybox-lock'); 1843 1844 W.scrollTop( this.scrollV ).scrollLeft( this.scrollH ); 1845 } 1846 1847 this.open(opts); 1848 }, 1849 1850 onUpdate : function() { 1851 if (!this.fixed) { 1852 this.update(); 1853 } 1854 }, 1855 1856 afterClose: function (opts) { 1857 // Remove overlay if exists and fancyBox is not opening 1858 // (e.g., it is not being open using afterClose callback) 1859 if (this.overlay && !F.coming) { 1860 this.overlay.fadeOut(opts.speedOut, $.proxy( this.close, this )); 1861 } 1862 } 1863 }; 1864 1865 /* 1866 * Title helper 1867 */ 1868 1869 F.helpers.title = { 1870 defaults : { 1871 type : 'float', // 'float', 'inside', 'outside' or 'over', 1872 position : 'bottom' // 'top' or 'bottom' 1873 }, 1874 1875 beforeShow: function (opts) { 1876 var current = F.current, 1877 text = current.title, 1878 type = opts.type, 1879 title, 1880 target; 1881 1882 if ($.isFunction(text)) { 1883 text = text.call(current.element, current); 1884 } 1885 1886 if (!isString(text) || $.trim(text) === '') { 1887 return; 1888 } 1889 1890 title = $('<div class="fancybox-title fancybox-title-' + type + '-wrap">' + text + '</div>'); 1891 1892 switch (type) { 1893 case 'inside': 1894 target = F.skin; 1895 break; 1896 1897 case 'outside': 1898 target = F.wrap; 1899 break; 1900 1901 case 'over': 1902 target = F.inner; 1903 break; 1904 1905 default: // 'float' 1906 target = F.skin; 1907 1908 title.appendTo('body'); 1909 1910 if (IE) { 1911 title.width( title.width() ); 1912 } 1913 1914 title.wrapInner('<span class="child"></span>'); 1915 1916 //Increase bottom margin so this title will also fit into viewport 1917 F.current.margin[2] += Math.abs( getScalar(title.css('margin-bottom')) ); 1918 break; 1919 } 1920 1921 title[ (opts.position === 'top' ? 'prependTo' : 'appendTo') ](target); 1922 } 1923 }; 1924 1925 // jQuery plugin initialization 1926 $.fn.fancybox = function (options) { 1927 var index, 1928 that = $(this), 1929 selector = this.selector || '', 1930 run = function(e) { 1931 var what = $(this).blur(), idx = index, relType, relVal; 1932 1933 if (!(e.ctrlKey || e.altKey || e.shiftKey || e.metaKey) && !what.is('.fancybox-wrap')) { 1934 relType = options.groupAttr || 'data-fancybox-group'; 1935 relVal = what.attr(relType); 1936 1937 if (!relVal) { 1938 relType = 'rel'; 1939 relVal = what.get(0)[ relType ]; 1940 } 1941 1942 if (relVal && relVal !== '' && relVal !== 'nofollow') { 1943 what = selector.length ? $(selector) : that; 1944 what = what.filter('[' + relType + '="' + relVal + '"]'); 1945 idx = what.index(this); 1946 } 1947 1948 options.index = idx; 1949 1950 // Stop an event from bubbling if everything is fine 1951 if (F.open(what, options) !== false) { 1952 e.preventDefault(); 1953 } 1954 } 1955 }; 1956 1957 options = options || {}; 1958 index = options.index || 0; 1959 1960 if (!selector || options.live === false) { 1961 that.unbind('click.fb-start').bind('click.fb-start', run); 1962 1963 } else { 1964 D.undelegate(selector, 'click.fb-start').delegate(selector + ":not('.fancybox-item, .fancybox-nav')", 'click.fb-start', run); 1965 } 1966 1967 this.filter('[data-fancybox-start=1]').trigger('click'); 1968 1969 return this; 1970 }; 1971 1972 // Tests that need a body at doc ready 1973 D.ready(function() { 1974 var w1, w2; 1975 1976 if ( $.scrollbarWidth === undefined ) { 1977 // http://benalman.com/projects/jquery-misc-plugins/#scrollbarwidth 1978 $.scrollbarWidth = function() { 1979 var parent = $('<div style="width:50px;height:50px;overflow:auto"><div/></div>').appendTo('body'), 1980 child = parent.children(), 1981 width = child.innerWidth() - child.height( 99 ).innerWidth(); 1982 1983 parent.remove(); 1984 1985 return width; 1986 }; 1987 } 1988 1989 if ( $.support.fixedPosition === undefined ) { 1990 $.support.fixedPosition = (function() { 1991 var elem = $('<div style="position:fixed;top:20px;"></div>').appendTo('body'), 1992 fixed = ( elem[0].offsetTop === 20 || elem[0].offsetTop === 15 ); 1993 1994 elem.remove(); 1995 1996 return fixed; 1997 }()); 1998 } 1999 2000 $.extend(F.defaults, { 2001 scrollbarWidth : $.scrollbarWidth(), 2002 fixed : $.support.fixedPosition, 2003 parent : $('body') 2004 }); 2005 2006 //Get real width of page scroll-bar 2007 w1 = $(window).width(); 2008 2009 H.addClass('fancybox-lock-test'); 2010 2011 w2 = $(window).width(); 2012 2013 H.removeClass('fancybox-lock-test'); 2014 2015 $("<style type='text/css'>.fancybox-margin{margin-right:" + (w2 - w1) + "px;}</style>").appendTo("head"); 2016 }); 2017 2018}(window, document, jQuery));
2019 2020 2021(function () { 2022 "use strict"; 2023 function e() { 2024 this.init(); 2025 } 2026 e.prototype = { 2027 init: function () { 2028 var e = this || y; 2029 return ( 2030 (e._counter = 1e3), 2031 (e._html5AudioPool = []), 2032 (e.html5PoolSize = 10), 2033 (e._codecs = {}), 2034 (e._howls = []), 2035 (e._muted = !1), 2036 (e._volume = 1), 2037 (e._canPlayEvent = "canplaythrough"), 2038 (e._navigator = "undefined" != typeof window && window.navigator ? window.navigator : null), 2039 (e.masterGain = null), 2040 (e.noAudio = !1), 2041 (e.usingWebAudio = !0), 2042 (e.autoSuspend = !0), 2043 (e.ctx = null), 2044 (e.autoUnlock = !0), 2045 e._setup(), 2046 e 2047 ); 2048 }, 2049 volume: function (e) { 2050 var t = this || y; 2051 if (((e = parseFloat(e)), t.ctx || u(), void 0 !== e && 0 <= e && e <= 1)) { 2052 if (((t._volume = e), t._muted)) return t; 2053 t.usingWebAudio && t.masterGain.gain.setValueAtTime(e, y.ctx.currentTime); 2054 for (var n = 0; n < t._howls.length; n++) 2055 if (!t._howls[n]._webAudio) 2056 for (var a = t._howls[n]._getSoundIds(), i = 0; i < a.length; i++) { 2057 var r = t._howls[n]._soundById(a[i]); 2058 r && r._node && (r._node.volume = r._volume * e); 2059 } 2060 return t; 2061 } 2062 return t._volume; 2063 }, 2064 mute: function (e) { 2065 var t = this || y; 2066 t.ctx || u(), (t._muted = e), t.usingWebAudio && t.masterGain.gain.setValueAtTime(e ? 0 : t._volume, y.ctx.currentTime); 2067 for (var n = 0; n < t._howls.length; n++) 2068 if (!t._howls[n]._webAudio) 2069 for (var a = t._howls[n]._getSoundIds(), i = 0; i < a.length; i++) { 2070 var r = t._howls[n]._soundById(a[i]); 2071 r && r._node && (r._node.muted = !!e || r._muted); 2072 } 2073 return t; 2074 }, 2075 stop: function () { 2076 for (var e = this || y, t = 0; t < e._howls.length; t++) e._howls[t].stop(); 2077 return e; 2078 }, 2079 unload: function () { 2080 for (var e = this || y, t = e._howls.length - 1; 0 <= t; t--) e._howls[t].unload(); 2081 return e.usingWebAudio && e.ctx && void 0 !== e.ctx.close && (e.ctx.close(), (e.ctx = null), u()), e; 2082 }, 2083 codecs: function (e) { 2084 return (this || y)._codecs[e.replace(/^x-/, "")]; 2085 }, 2086 _setup: function () { 2087 var t = this || y; 2088 if (((t.state = (t.ctx && t.ctx.state) || "suspended"), t._autoSuspend(), !t.usingWebAudio)) 2089 if ("undefined" != typeof Audio) 2090 try { 2091 void 0 === new Audio().oncanplaythrough && (t._canPlayEvent = "canplay"); 2092 } catch (e) { 2093 t.noAudio = !0; 2094 } 2095 else t.noAudio = !0; 2096 try { 2097 new Audio().muted && (t.noAudio = !0);
2098 } catch (e) {} 2099 return t.noAudio || t._setupCodecs(), t; 2100 }, 2101 _setupCodecs: function () { 2102 var t = this || y, 2103 e = null; 2104 try { 2105 e = "undefined" != typeof Audio ? new Audio() : null; 2106 } catch (e) { 2107 return t; 2108 } 2109 if (!e || "function" != typeof e.canPlayType) return t; 2110 var n = e.canPlayType("audio/mpeg;").replace(/^no$/, ""), 2111 a = t._navigator ? t._navigator.userAgent : "", 2112 i = a.match(/OPR\/([0-6].)/g), 2113 r = i && parseInt(i[0].split("/")[1], 10) < 33, 2114 i = -1 !== a.indexOf("Safari") && -1 === a.indexOf("Chrome"), 2115 a = a.match(/Version\/(.*?) /), 2116 a = i && a && parseInt(a[1], 10) < 15; 2117 return ( 2118 (t._codecs = { 2119 mp3: !(r || (!n && !e.canPlayType("audio/mp3;").replace(/^no$/, ""))), 2120 mpeg: !!n, 2121 opus: !!e.canPlayType('audio/ogg; codecs="opus"').replace(/^no$/, ""), 2122 ogg: !!e.canPlayType('audio/ogg; codecs="vorbis"').replace(/^no$/, ""), 2123 oga: !!e.canPlayType('audio/ogg; codecs="vorbis"').replace(/^no$/, ""), 2124 wav: !!(e.canPlayType('audio/wav; codecs="1"') || e.canPlayType("audio/wav")).replace(/^no$/, ""), 2125 aac: !!e.canPlayType("audio/aac;").replace(/^no$/, ""), 2126 caf: !!e.canPlayType("audio/x-caf;").replace(/^no$/, ""), 2127 m4a: !!(e.canPlayType("audio/x-m4a;") || e.canPlayType("audio/m4a;") || e.canPlayType("audio/aac;")).replace(/^no$/, ""), 2128 m4b: !!(e.canPlayType("audio/x-m4b;") || e.canPlayType("audio/m4b;") || e.canPlayType("audio/aac;")).replace(/^no$/, ""), 2129 mp4: !!(e.canPlayType("audio/x-mp4;") || e.canPlayType("audio/mp4;") || e.canPlayType("audio/aac;")).replace(/^no$/, ""), 2130 weba: !(a || !e.canPlayType('audio/webm; codecs="vorbis"').replace(/^no$/, "")), 2131 webm: !(a || !e.canPlayType('audio/webm; codecs="vorbis"').replace(/^no$/, "")), 2132 dolby: !!e.canPlayType('audio/mp4; codecs="ec-3"').replace(/^no$/, ""), 2133 flac: !!(e.canPlayType("audio/x-flac;") || e.canPlayType("audio/flac;")).replace(/^no$/, ""), 2134 }), 2135 t 2136 ); 2137 }, 2138 _unlockAudio: function () { 2139 var s = this || y; 2140 if (!s._audioUnlocked && s.ctx) { 2141 (s._audioUnlocked = !1), (s.autoUnlock = !1), s._mobileUnloaded || 44100 === s.ctx.sampleRate || ((s._mobileUnloaded = !0), s.unload()), (s._scratchBuffer = s.ctx.createBuffer(1, 1, 22050)); 2142 var l = function (e) { 2143 for (; s._html5AudioPool.length < s.html5PoolSize; ) 2144 try { 2145 var t = new Audio(); 2146 (t._unlocked = !0), s._releaseHtml5Audio(t); 2147 } catch (e) { 2148 s.noAudio = !0; 2149 break; 2150 } 2151 for (var n = 0; n < s._howls.length; n++) 2152 if (!s._howls[n]._webAudio) 2153 for (var a = s._howls[n]._getSoundIds(), i = 0; i < a.length; i++) { 2154 var r = s._howls[n]._soundById(a[i]); 2155 r && r._node && !r._node._unlocked && ((r._node._unlocked = !0), r._node.load()); 2156 } 2157 s._autoResume(); 2158 var o = s.ctx.createBufferSource(); 2159 (o.buffer = s._scratchBuffer), 2160 o.connect(s.ctx.destination), 2161 void 0 === o.start ? o.noteOn(0) : o.start(0), 2162 "function" == typeof s.ctx.resume && s.ctx.resume(), 2163 (o.onended = function () { 2164 o.disconnect(0), 2165 (s._audioUnlocked = !0), 2166 document.removeEventListener("touchstart", l, !0), 2167 document.removeEventListener("touchend", l, !0), 2168 document.removeEventListener("click", l, !0), 2169 document.removeEventListener("keydown", l, !0); 2170 for (var e = 0; e < s._howls.length; e++) s._howls[e]._emit("unlock"); 2171 }); 2172 }; 2173 return document.addEventListener("touchstart", l, !0), document.addEventListener("touchend", l, !0), document.addEventListener("click", l, !0), document.addEventListener("keydown", l, !0), s; 2174 } 2175 }, 2176 _obtainHtml5Audio: function () { 2177 var e = this || y; 2178 if (e._html5AudioPool.length) return e._html5AudioPool.pop(); 2179 e = new Audio().play(); 2180 return ( 2181 e && 2182 "undefined" != typeof Promise && 2183 (e instanceof Promise || "function" == typeof e.then) && 2184 e.catch(function () { 2185 console.warn("HTML5 Audio pool exhausted, returning potentially locked audio object."); 2186 }), 2187 new Audio() 2188 ); 2189 }, 2190 _releaseHtml5Audio: function (e) { 2191 var t = this || y;
2192 return e._unlocked && t._html5AudioPool.push(e), t; 2193 }, 2194 _autoSuspend: function () { 2195 var t = this; 2196 if (t.autoSuspend && t.ctx && void 0 !== t.ctx.suspend && y.usingWebAudio) { 2197 for (var e = 0; e < t._howls.length; e++) if (t._howls[e]._webAudio) for (var n = 0; n < t._howls[e]._sounds.length; n++) if (!t._howls[e]._sounds[n]._paused) return t; 2198 return ( 2199 t._suspendTimer && clearTimeout(t._suspendTimer), 2200 (t._suspendTimer = setTimeout(function () { 2201 var e; 2202 t.autoSuspend && 2203 ((t._suspendTimer = null), 2204 (t.state = "suspending"), 2205 (e = function () { 2206 (t.state = "suspended"), t._resumeAfterSuspend && (delete t._resumeAfterSuspend, t._autoResume()); 2207 }), 2208 t.ctx.suspend().then(e, e)); 2209 }, 3e4)), 2210 t 2211 ); 2212 } 2213 }, 2214 _autoResume: function () { 2215 var t = this; 2216 if (t.ctx && void 0 !== t.ctx.resume && y.usingWebAudio) 2217 return ( 2218 "running" === t.state && "interrupted" !== t.ctx.state && t._suspendTimer 2219 ? (clearTimeout(t._suspendTimer), (t._suspendTimer = null)) 2220 : "suspended" === t.state || ("running" === t.state && "interrupted" === t.ctx.state) 2221 ? (t.ctx.resume().then(function () { 2222 t.state = "running"; 2223 for (var e = 0; e < t._howls.length; e++) t._howls[e]._emit("resume"); 2224 }), 2225 t._suspendTimer && (clearTimeout(t._suspendTimer), (t._suspendTimer = null))) 2226 : "suspending" === t.state && (t._resumeAfterSuspend = !0), 2227 t 2228 ); 2229 }, 2230 }; 2231 function t(e) { 2232 e.src && 0 !== e.src.length ? this.init(e) : console.error("An array of source files must be passed with any new Howl."); 2233 } 2234 var y = new e(); 2235 t.prototype = { 2236 init: function (e) { 2237 var t = this; 2238 return ( 2239 y.ctx || u(), 2240 (t._autoplay = e.autoplay || !1), 2241 (t._format = "string" != typeof e.format ? e.format : [e.format]), 2242 (t._html5 = e.html5 || !1), 2243 (t._muted = e.mute || !1), 2244 (t._loop = e.loop || !1), 2245 (t._pool = e.pool || 5), 2246 (t._preload = ("boolean" != typeof e.preload && "metadata" !== e.preload) || e.preload), 2247 (t._rate = e.rate || 1), 2248 (t._sprite = e.sprite || {}), 2249 (t._src = "string" != typeof e.src ? e.src : [e.src]), 2250 (t._volume = void 0 !== e.volume ? e.volume : 1), 2251 (t._xhr = { method: e.xhr && e.xhr.method ? e.xhr.method : "GET", headers: e.xhr && e.xhr.headers ? e.xhr.headers : null, withCredentials: !(!e.xhr || !e.xhr.withCredentials) && e.xhr.withCredentials }), 2252 (t._duration = 0), 2253 (t._state = "unloaded"), 2254 (t._sounds = []), 2255 (t._endTimers = {}), 2256 (t._queue = []), 2257 (t._playLock = !1), 2258 (t._onend = e.onend ? [{ fn: e.onend }] : []), 2259 (t._onfade = e.onfade ? [{ fn: e.onfade }] : []), 2260 (t._onload = e.onload ? [{ fn: e.onload }] : []), 2261 (t._onloaderror = e.onloaderror ? [{ fn: e.onloaderror }] : []), 2262 (t._onplayerror = e.onplayerror ? [{ fn: e.onplayerror }] : []), 2263 (t._onpause = e.onpause ? [{ fn: e.onpause }] : []), 2264 (t._onplay = e.onplay ? [{ fn: e.onplay }] : []), 2265 (t._onstop = e.onstop ? [{ fn: e.onstop }] : []), 2266 (t._onmute = e.onmute ? [{ fn: e.onmute }] : []), 2267 (t._onvolume = e.onvolume ? [{ fn: e.onvolume }] : []), 2268 (t._onrate = e.onrate ? [{ fn: e.onrate }] : []), 2269 (t._onseek = e.onseek ? [{ fn: e.onseek }] : []), 2270 (t._onunlock = e.onunlock ? [{ fn: e.onunlock }] : []), 2271 (t._onresume = []), 2272 (t._webAudio = y.usingWebAudio && !t._html5), 2273 void 0 !== y.ctx && y.ctx && y.autoUnlock && y._unlockAudio(), 2274 y._howls.push(t), 2275 t._autoplay && 2276 t._queue.push({ 2277 event: "play", 2278 action: function () { 2279 t.play(); 2280 }, 2281 }), 2282 t._preload && "none" !== t._preload && t.load(), 2283 t 2284 ); 2285 }, 2286 load: function () { 2287 var e = this, 2288 t = null; 2289 if (y.noAudio) e._emit("loaderror", null, "No audio support."); 2290 else { 2291 "string" == typeof e._src && (e._src = [e._src]); 2292 for (var n, a, i = 0; i < e._src.length; i++) { 2293 if (e._format && e._format[i]) n = e._format[i]; 2294 else {
2295 if ("string" != typeof (a = e._src[i])) { 2296 e._emit("loaderror", null, "Non-string found in selected audio sources - ignoring."); 2297 continue; 2298 } 2299 n = (n = (n = /^data:audio\/([^;,]+);/i.exec(a)) || /\.([^.]+)$/.exec(a.split("?", 1)[0])) && n[1].toLowerCase(); 2300 } 2301 if ((n || console.warn('No file extension was found. Consider using the "format" property or specify an extension.'), n && y.codecs(n))) { 2302 t = e._src[i]; 2303 break; 2304 } 2305 } 2306 if (t) return (e._src = t), (e._state = "loading"), "https:" === window.location.protocol && "http:" === t.slice(0, 5) && ((e._html5 = !0), (e._webAudio = !1)), new r(e), e._webAudio && s(e), e; 2307 e._emit("loaderror", null, "No codec support for selected audio sources."); 2308 } 2309 }, 2310 play: function (t, n) { 2311 var a = this, 2312 e = null; 2313 if ("number" == typeof t) (e = t), (t = null); 2314 else { 2315 if ("string" == typeof t && "loaded" === a._state && !a._sprite[t]) return null; 2316 if (void 0 === t && ((t = "__default"), !a._playLock)) { 2317 for (var i = 0, r = 0; r < a._sounds.length; r++) a._sounds[r]._paused && !a._sounds[r]._ended && (i++, (e = a._sounds[r]._id)); 2318 1 === i ? (t = null) : (e = null); 2319 } 2320 } 2321 var o = e ? a._soundById(e) : a._inactiveSound(); 2322 if (!o) return null; 2323 if ((e && !t && (t = o._sprite || "__default"), "loaded" !== a._state)) { 2324 (o._sprite = t), (o._ended = !1); 2325 var s = o._id; 2326 return ( 2327 a._queue.push({ 2328 event: "play", 2329 action: function () { 2330 a.play(s); 2331 }, 2332 }), 2333 s 2334 ); 2335 } 2336 if (e && !o._paused) return n || a._loadQueue("play"), o._id; 2337 a._webAudio && y._autoResume(); 2338 var l = Math.max(0, 0 < o._seek ? o._seek : a._sprite[t][0] / 1e3), 2339 d = Math.max(0, (a._sprite[t][0] + a._sprite[t][1]) / 1e3 - l), 2340 c = (1e3 * d) / Math.abs(o._rate), 2341 u = a._sprite[t][0] / 1e3, 2342 p = (a._sprite[t][0] + a._sprite[t][1]) / 1e3; 2343 (o._sprite = t), (o._ended = !1); 2344 var f = function () { 2345 (o._paused = !1), (o._seek = l), (o._start = u), (o._stop = p), (o._loop = !(!o._loop && !a._sprite[t][2])); 2346 }; 2347 if (!(p <= l)) { 2348 var h, 2349 m, 2350 v, 2351 g = o._node; 2352 return ( 2353 a._webAudio 2354 ? ((m = function () { 2355 (a._playLock = !1), f(), a._refreshBuffer(o); 2356 var e = o._muted || a._muted ? 0 : o._volume; 2357 g.gain.setValueAtTime(e, y.ctx.currentTime), 2358 (o._playStart = y.ctx.currentTime), 2359 void 0 === g.bufferSource.start ? (o._loop ? g.bufferSource.noteGrainOn(0, l, 86400) : g.bufferSource.noteGrainOn(0, l, d)) : o._loop ? g.bufferSource.start(0, l, 86400) : g.bufferSource.start(0, l, d), 2360 c !== 1 / 0 && (a._endTimers[o._id] = setTimeout(a._ended.bind(a, o), c)), 2361 n || 2362 setTimeout(function () { 2363 a._emit("play", o._id), a._loadQueue(); 2364 }, 0); 2365 }), 2366 "running" === y.state && "interrupted" !== y.ctx.state ? m() : ((a._playLock = !0), a.once("resume", m), a._clearTimer(o._id))) 2367 : ((h = function () { 2368 (g.currentTime = l), (g.muted = o._muted || a._muted || y._muted || g.muted), (g.volume = o._volume * y.volume()), (g.playbackRate = o._rate); 2369 try { 2370 var e = g.play(); 2371 if ( 2372 (e && "undefined" != typeof Promise && (e instanceof Promise || "function" == typeof e.then) 2373 ? ((a._playLock = !0), 2374 f(), 2375 e 2376 .then(function () { 2377 (a._playLock = !1), (g._unlocked = !0), n ? a._loadQueue() : a._emit("play", o._id); 2378 }) 2379 .catch(function () { 2380 (a._playLock = !1), 2381 a._emit("playerror", o._id, "Playback was unable to start. This is most commonly an issue on mobile devices and Chrome where playback was not within a user interaction."), 2382 (o._ended = !0), 2383 (o._paused = !0); 2384 })) 2385 : n || ((a._playLock = !1), f(), a._emit("play", o._id)), 2386 (g.playbackRate = o._rate), 2387 g.paused) 2388 ) 2389 return void a._emit("playerror", o._id, "Playback was unable to start. This is most commonly an issue on mobile devices and Chrome where playback was not within a user interaction.");
2390 "__default" !== t || o._loop 2391 ? (a._endTimers[o._id] = setTimeout(a._ended.bind(a, o), c)) 2392 : ((a._endTimers[o._id] = function () { 2393 a._ended(o), g.removeEventListener("ended", a._endTimers[o._id], !1); 2394 }), 2395 g.addEventListener("ended", a._endTimers[o._id], !1)); 2396 } catch (e) { 2397 a._emit("playerror", o._id, e); 2398 } 2399 }), 2400 "data:audio/wav;base64,UklGRigAAABXQVZFZm10IBIAAAABAAEARKwAAIhYAQACABAAAABkYXRhAgAAAAEA" === g.src && ((g.src = a._src), g.load()), 2401 (m = (window && window.ejecta) || (!g.readyState && y._navigator.isCocoonJS)), 2402 3 <= g.readyState || m 2403 ? h() 2404 : ((a._playLock = !0), 2405 (a._state = "loading"), 2406 (v = function () { 2407 (a._state = "loaded"), h(), g.removeEventListener(y._canPlayEvent, v, !1); 2408 }), 2409 g.addEventListener(y._canPlayEvent, v, !1), 2410 a._clearTimer(o._id))), 2411 o._id 2412 ); 2413 } 2414 a._ended(o); 2415 }, 2416 pause: function (e) { 2417 var t = this; 2418 if ("loaded" !== t._state || t._playLock) 2419 return ( 2420 t._queue.push({ 2421 event: "pause", 2422 action: function () { 2423 t.pause(e); 2424 }, 2425 }), 2426 t 2427 ); 2428 for (var n = t._getSoundIds(e), a = 0; a < n.length; a++) { 2429 t._clearTimer(n[a]); 2430 var i = t._soundById(n[a]); 2431 if (i && !i._paused && ((i._seek = t.seek(n[a])), (i._rateSeek = 0), (i._paused = !0), t._stopFade(n[a]), i._node)) 2432 if (t._webAudio) { 2433 if (!i._node.bufferSource) continue; 2434 void 0 === i._node.bufferSource.stop ? i._node.bufferSource.noteOff(0) : i._node.bufferSource.stop(0), t._cleanBuffer(i._node); 2435 } else (isNaN(i._node.duration) && i._node.duration !== 1 / 0) || i._node.pause(); 2436 arguments[1] || t._emit("pause", i ? i._id : null); 2437 } 2438 return t; 2439 }, 2440 stop: function (e, t) { 2441 var n = this; 2442 if ("loaded" !== n._state || n._playLock) 2443 return ( 2444 n._queue.push({ 2445 event: "stop", 2446 action: function () { 2447 n.stop(e); 2448 }, 2449 }), 2450 n 2451 ); 2452 for (var a = n._getSoundIds(e), i = 0; i < a.length; i++) { 2453 n._clearTimer(a[i]); 2454 var r = n._soundById(a[i]); 2455 r && 2456 ((r._seek = r._start || 0), 2457 (r._rateSeek = 0), 2458 (r._paused = !0), 2459 (r._ended = !0), 2460 n._stopFade(a[i]), 2461 r._node && 2462 (n._webAudio 2463 ? r._node.bufferSource && (void 0 === r._node.bufferSource.stop ? r._node.bufferSource.noteOff(0) : r._node.bufferSource.stop(0), n._cleanBuffer(r._node)) 2464 : (isNaN(r._node.duration) && r._node.duration !== 1 / 0) || ((r._node.currentTime = r._start || 0), r._node.pause(), r._node.duration === 1 / 0 && n._clearSound(r._node))), 2465 t || n._emit("stop", r._id)); 2466 } 2467 return n; 2468 }, 2469 mute: function (e, t) { 2470 var n = this; 2471 if ("loaded" !== n._state || n._playLock) 2472 return ( 2473 n._queue.push({ 2474 event: "mute", 2475 action: function () { 2476 n.mute(e, t); 2477 }, 2478 }), 2479 n 2480 ); 2481 if (void 0 === t) { 2482 if ("boolean" != typeof e) return n._muted; 2483 n._muted = e; 2484 } 2485 for (var a = n._getSoundIds(t), i = 0; i < a.length; i++) { 2486 var r = n._soundById(a[i]); 2487 r && ((r._muted = e), r._interval && n._stopFade(r._id), n._webAudio && r._node ? r._node.gain.setValueAtTime(e ? 0 : r._volume, y.ctx.currentTime) : r._node && (r._node.muted = !!y._muted || e), n._emit("mute", r._id)); 2488 } 2489 return n; 2490 }, 2491 volume: function () { 2492 var e, 2493 t, 2494 n = this, 2495 a = arguments; 2496 if (0 === a.length) return n._volume; 2497 if ( 2498 (1 === a.length || (2 === a.length && void 0 === a[1]) ? (0 <= n._getSoundIds().indexOf(a[0]) ? (i = parseInt(a[0], 10)) : (e = parseFloat(a[0]))) : 2 <= a.length && ((e = parseFloat(a[0])), (i = parseInt(a[1], 10))), 2499 !(void 0 !== e && 0 <= e && e <= 1)) 2500 ) 2501 return (t = i ? n._soundById(i) : n._sounds[0]) ? t._volume : 0; 2502 if ("loaded" !== n._state || n._playLock) 2503 return ( 2504 n._queue.push({ 2505 event: "volume", 2506 action: function () { 2507 n.volume.apply(n, a); 2508 }, 2509 }), 2510 n 2511 ); 2512 void 0 === i && (n._volume = e); 2513 for (var i = n._getSoundIds(i), r = 0; r < i.length; r++) 2514 (t = n._soundById(i[r])) && 2515 ((t._volume = e), 2516 a[2] || n._stopFade(i[r]), 2517 n._webAudio && t._node && !t._muted ? t._node.gain.setValueAtTime(e, y.ctx.currentTime) : t._node && !t._muted && (t._node.volume = e * y.volume()), 2518 n._emit("volume", t._id)); 2519 return n; 2520 }, 2521 fade: function (e, t, n, a) { 2522 var i = this; 2523 if ("loaded" !== i._state || i._playLock) 2524 return ( 2525 i._queue.push({ 2526 event: "fade", 2527 action: function () { 2528 i.fade(e, t, n, a); 2529 }, 2530 }), 2531 i 2532 ); 2533 (e = Math.min(Math.max(0, parseFloat(e)), 1)), (t = Math.min(Math.max(0, parseFloat(t)), 1)), (n = parseFloat(n)), i.volume(e, a); 2534 for (var r = i._getSoundIds(a), o = 0; o < r.length; o++) { 2535 var s, 2536 l, 2537 d = i._soundById(r[o]); 2538 d && 2539 (a || i._stopFade(r[o]), 2540 i._webAudio && !d._muted && ((l = (s = y.ctx.currentTime) + n / 1e3), (d._volume = e), d._node.gain.setValueAtTime(e, s), d._node.gain.linearRampToValueAtTime(t, l)), 2541 i._startFadeInterval(d, e, t, n, r[o], void 0 === a)); 2542 } 2543 return i; 2544 }, 2545 _startFadeInterval: function (t, n, a, i, e, r) { 2546 var o = this, 2547 s = n, 2548 l = a - n, 2549 d = Math.abs(l / 0.01), 2550 d = Math.max(4, 0 < d ? i / d : i), 2551 c = Date.now(); 2552 (t._fadeTo = a), 2553 (t._interval = setInterval(function () { 2554 var e = (Date.now() - c) / i; 2555 (c = Date.now()), 2556 (s += l * e), 2557 (s = Math.round(100 * s) / 100), 2558 (s = l < 0 ? Math.max(a, s) : Math.min(a, s)), 2559 o._webAudio ? (t._volume = s) : o.volume(s, t._id, !0), 2560 r && (o._volume = s), 2561 ((a < n && s <= a) || (n < a && a <= s)) && (clearInterval(t._interval), (t._interval = null), (t._fadeTo = null), o.volume(a, t._id), o._emit("fade", t._id)); 2562 }, d)); 2563 }, 2564 _stopFade: function (e) { 2565 var t = this, 2566 n = t._soundById(e); 2567 return n && n._interval && (t._webAudio && n._node.gain.cancelScheduledValues(y.ctx.currentTime), clearInterval(n._interval), (n._interval = null), t.volume(n._fadeTo, e), (n._fadeTo = null), t._emit("fade", e)), t; 2568 }, 2569 loop: function () { 2570 var e, 2571 t, 2572 n, 2573 a = this, 2574 i = arguments; 2575 if (0 === i.length) return a._loop; 2576 if (1 === i.length) { 2577 if ("boolean" != typeof i[0]) return !!(n = a._soundById(parseInt(i[0], 10))) && n._loop; 2578 a._loop = e = i[0]; 2579 } else 2 === i.length && ((e = i[0]), (t = parseInt(i[1], 10))); 2580 for (var r = a._getSoundIds(t), o = 0; o < r.length; o++) 2581 (n = a._soundById(r[o])) && 2582 ((n._loop = e), 2583 a._webAudio && 2584 n._node && 2585 n._node.bufferSource && 2586 (n._node.bufferSource.loop = e) && 2587 ((n._node.bufferSource.loopStart = n._start || 0), (n._node.bufferSource.loopEnd = n._stop), a.playing(r[o]) && (a.pause(r[o], !0), a.play(r[o], !0)))); 2588 return a; 2589 }, 2590 rate: function () { 2591 var e, 2592 t = this, 2593 n = arguments; 2594 if ( 2595 (0 === n.length 2596 ? (r = t._sounds[0]._id) 2597 : 1 === n.length 2598 ? 0 <= t._getSoundIds().indexOf(n[0]) 2599 ? (r = parseInt(n[0], 10)) 2600 : (e = parseFloat(n[0])) 2601 : 2 === n.length && ((e = parseFloat(n[0])), (r = parseInt(n[1], 10))), 2602 "number" != typeof e) 2603 ) 2604 return ((i = t._soundById(r)) || t)._rate; 2605 if ("loaded" !== t._state || t._playLock) 2606 return ( 2607 t._queue.push({ 2608 event: "rate", 2609 action: function () { 2610 t.rate.apply(t, n); 2611 }, 2612 }), 2613 t 2614 ); 2615 void 0 === r && (t._rate = e);
2616 for (var a, i, r = t._getSoundIds(r), o = 0; o < r.length; o++) 2617 (i = t._soundById(r[o])) && 2618 (t.playing(r[o]) && ((i._rateSeek = t.seek(r[o])), (i._playStart = t._webAudio ? y.ctx.currentTime : i._playStart)), 2619 (i._rate = e), 2620 t._webAudio && i._node && i._node.bufferSource ? i._node.bufferSource.playbackRate.setValueAtTime(e, y.ctx.currentTime) : i._node && (i._node.playbackRate = e), 2621 (a = t.seek(r[o])), 2622 (a = (1e3 * ((t._sprite[i._sprite][0] + t._sprite[i._sprite][1]) / 1e3 - a)) / Math.abs(i._rate)), 2623 (!t._endTimers[r[o]] && i._paused) || (t._clearTimer(r[o]), (t._endTimers[r[o]] = setTimeout(t._ended.bind(t, i), a))), 2624 t._emit("rate", i._id)); 2625 return t; 2626 }, 2627 seek: function () { 2628 var e, 2629 t, 2630 n = this, 2631 a = arguments; 2632 if ( 2633 (0 === a.length 2634 ? n._sounds.length && (t = n._sounds[0]._id) 2635 : 1 === a.length 2636 ? 0 <= n._getSoundIds().indexOf(a[0]) 2637 ? (t = parseInt(a[0], 10)) 2638 : n._sounds.length && ((t = n._sounds[0]._id), (e = parseFloat(a[0]))) 2639 : 2 === a.length && ((e = parseFloat(a[0])), (t = parseInt(a[1], 10))), 2640 void 0 === t) 2641 ) 2642 return 0; 2643 if ("number" == typeof e && ("loaded" !== n._state || n._playLock)) 2644 return ( 2645 n._queue.push({ 2646 event: "seek", 2647 action: function () { 2648 n.seek.apply(n, a); 2649 }, 2650 }), 2651 n 2652 ); 2653 var i = n._soundById(t); 2654 if (i) { 2655 if (!("number" == typeof e && 0 <= e)) { 2656 if (n._webAudio) { 2657 var r = n.playing(t) ? y.ctx.currentTime - i._playStart : 0, 2658 o = i._rateSeek ? i._rateSeek - i._seek : 0; 2659 return i._seek + (o + r * Math.abs(i._rate)); 2660 } 2661 return i._node.currentTime; 2662 } 2663 var s = n.playing(t); 2664 s && n.pause(t, !0), (i._seek = e), (i._ended = !1), n._clearTimer(t), n._webAudio || !i._node || isNaN(i._node.duration) || (i._node.currentTime = e); 2665 var l, 2666 d = function () { 2667 s && n.play(t, !0), n._emit("seek", t); 2668 }; 2669 s && !n._webAudio 2670 ? ((l = function () { 2671 n._playLock ? setTimeout(l, 0) : d(); 2672 }), 2673 setTimeout(l, 0)) 2674 : d(); 2675 } 2676 return n; 2677 }, 2678 playing: function (e) { 2679 if ("number" == typeof e) { 2680 e = this._soundById(e); 2681 return !!e && !e._paused; 2682 } 2683 for (var t = 0; t < this._sounds.length; t++) if (!this._sounds[t]._paused) return !0; 2684 return !1; 2685 }, 2686 duration: function (e) { 2687 var t = this._duration, 2688 e = this._soundById(e); 2689 return (t = e ? this._sprite[e._sprite][1] / 1e3 : t); 2690 }, 2691 state: function () { 2692 return this._state; 2693 }, 2694 unload: function () { 2695 for (var e = this, t = e._sounds, n = 0; n < t.length; n++) 2696 t[n]._paused || e.stop(t[n]._id), 2697 e._webAudio || 2698 (e._clearSound(t[n]._node), 2699 t[n]._node.removeEventListener("error", t[n]._errorFn, !1), 2700 t[n]._node.removeEventListener(y._canPlayEvent, t[n]._loadFn, !1), 2701 t[n]._node.removeEventListener("ended", t[n]._endFn, !1), 2702 y._releaseHtml5Audio(t[n]._node)), 2703 delete t[n]._node, 2704 e._clearTimer(t[n]._id); 2705 var a = y._howls.indexOf(e); 2706 0 <= a && y._howls.splice(a, 1); 2707 for (var i = !0, n = 0; n < y._howls.length; n++) 2708 if (y._howls[n]._src === e._src || 0 <= e._src.indexOf(y._howls[n]._src)) { 2709 i = !1; 2710 break; 2711 } 2712 return o && i && delete o[e._src], (y.noAudio = !1), (e._state = "unloaded"), (e._sounds = []), (e = null); 2713 }, 2714 on: function (e, t, n, a) { 2715 e = this["_on" + e]; 2716 return "function" == typeof t && e.push(a ? { id: n, fn: t, once: a } : { id: n, fn: t }), this; 2717 }, 2718 off: function (e, t, n) { 2719 var a = this, 2720 i = a["_on" + e], 2721 r = 0; 2722 if (("number" == typeof t && ((n = t), (t = null)), t || n)) 2723 for (r = 0; r < i.length; r++) { 2724 var o = n === i[r].id; 2725 if ((t === i[r].fn && o) || (!t && o)) { 2726 i.splice(r, 1); 2727 break; 2728 } 2729 } 2730 else if (e) a["_on" + e] = []; 2731 else for (var s = Object.keys(a), r = 0; r < s.length; r++) 0 === s[r].indexOf("_on") && Array.isArray(a[s[r]]) && (a[s[r]] = []); 2732 return a; 2733 }, 2734 once: function (e, t, n) { 2735 return this.on(e, t, n, 1), this; 2736 }, 2737 _emit: function (e, t, n) { 2738 for (var a = this, i = a["_on" + e], r = i.length - 1; 0 <= r; r--) 2739 (i[r].id && i[r].id !== t && "load" !== e) || 2740 (setTimeout( 2741 function (e) { 2742 e.call(this, t, n); 2743 }.bind(a, i[r].fn), 2744 0 2745 ), 2746 i[r].once && a.off(e, i[r].fn, i[r].id)); 2747 return a._loadQueue(e), a; 2748 }, 2749 _loadQueue: function (e) { 2750 var t, 2751 n = this; 2752 return 0 < n._queue.length && ((t = n._queue[0]).event === e && (n._queue.shift(), n._loadQueue()), e || t.action()), n; 2753 }, 2754 _ended: function (e) { 2755 var t = this, 2756 n = e._sprite; 2757 if (!t._webAudio && e._node && !e._node.paused && !e._node.ended && e._node.currentTime < e._stop
2757) return setTimeout(t._ended.bind(t, e), 100), t; 2758 var a = !(!e._loop && !t._sprite[n][2]); 2759 return ( 2760 t._emit("end", e._id), 2761 !t._webAudio && a && t.stop(e._id, !0).play(e._id), 2762 t._webAudio && 2763 a && 2764 (t._emit("play", e._id), 2765 (e._seek = e._start || 0), 2766 (e._rateSeek = 0), 2767 (e._playStart = y.ctx.currentTime), 2768 (n = (1e3 * (e._stop - e._start)) / Math.abs(e._rate)), 2769 (t._endTimers[e._id] = setTimeout(t._ended.bind(t, e), n))), 2770 t._webAudio && !a && ((e._paused = !0), (e._ended = !0), (e._seek = e._start || 0), (e._rateSeek = 0), t._clearTimer(e._id), t._cleanBuffer(e._node), y._autoSuspend()), 2771 t._webAudio || a || t.stop(e._id, !0), 2772 t 2773 ); 2774 }, 2775 _clearTimer: function (e) { 2776 var t, 2777 n = this; 2778 return n._endTimers[e] && ("function" != typeof n._endTimers[e] ? clearTimeout(n._endTimers[e]) : (t = n._soundById(e)) && t._node && t._node.removeEventListener("ended", n._endTimers[e], !1), delete n._endTimers[e]), n; 2779 }, 2780 _soundById: function (e) { 2781 for (var t = 0; t < this._sounds.length; t++) if (e === this._sounds[t]._id) return this._sounds[t]; 2782 return null; 2783 }, 2784 _inactiveSound: function () { 2785 var e = this; 2786 e._drain(); 2787 for (var t = 0; t < e._sounds.length; t++) if (e._sounds[t]._ended) return e._sounds[t].reset(); 2788 return new r(e); 2789 }, 2790 _drain: function () { 2791 var e = this, 2792 t = e._pool,
2793 n = 0, 2794 a = 0; 2795 if (!(e._sounds.length < t)) { 2796 for (a = 0; a < e._sounds.length; a++) e._sounds[a]._ended && n++; 2797 for (a = e._sounds.length - 1; 0 <= a; a--) { 2798 if (n <= t) return; 2799 e._sounds[a]._ended && (e._webAudio && e._sounds[a]._node && e._sounds[a]._node.disconnect(0), e._sounds.splice(a, 1), n--); 2800 } 2801 } 2802 }, 2803 _getSoundIds: function (e) { 2804 if (void 0 !== e) return [e]; 2805 for (var t = [], n = 0; n < this._sounds.length; n++) t.push(this._sounds[n]._id); 2806 return t; 2807 }, 2808 _refreshBuffer: function (e) { 2809 return ( 2810 (e._node.bufferSource = y.ctx.createBufferSource()), 2811 (e._node.bufferSource.buffer = o[this._src]), 2812 e._panner ? e._node.bufferSource.connect(e._panner) : e._node.bufferSource.connect(e._node), 2813 (e._node.bufferSource.loop = e._loop), 2814 e._loop && ((e._node.bufferSource.loopStart = e._start || 0), (e._node.bufferSource.loopEnd = e._stop || 0)), 2815 e._node.bufferSource.playbackRate.setValueAtTime(e._rate, y.ctx.currentTime), 2816 this 2817 ); 2818 }, 2819 _cleanBuffer: function (e) { 2820 var t = y._navigator && 0 <= y._navigator.vendor.indexOf("Apple"); 2821 if (y._scratchBuffer && e.bufferSource && ((e.bufferSource.onended = null), e.bufferSource.disconnect(0), t)) 2822 try { 2823 e.bufferSource.buffer = y._scratchBuffer; 2824 } catch (e) {} 2825 return (e.bufferSource = null), this; 2826 }, 2827 _clearSound: function (e) { 2828 /MSIE |Trident\//.test(y._navigator && y._navigator.userAgent) || (e.src = "data:audio/wav;base64,UklGRigAAABXQVZFZm10IBIAAAABAAEARKwAAIhYAQACABAAAABkYXRhAgAAAAEA"); 2829 }, 2830 }; 2831 var r = function (e) { 2832 (this._parent = e), this.init(); 2833 }; 2834 r.prototype = { 2835 init: function () { 2836 var e = this, 2837 t = e._parent; 2838 return ( 2839 (e._muted = t._muted), 2840 (e._loop = t._loop), 2841 (e._volume = t._volume), 2842 (e._rate = t._rate), 2843 (e._seek = 0), 2844 (e._paused = !0), 2845 (e._ended = !0), 2846 (e._sprite = "__default"), 2847 (e._id = ++y._counter), 2848 t._sounds.push(e), 2849 e.create(), 2850 e 2851 ); 2852 }, 2853 create: function () { 2854 var e = this, 2855 t = e._parent, 2856 n = y._muted || e._muted || e._parent._muted ? 0 : e._volume; 2857 return ( 2858 t._webAudio 2859 ? ((e._node = void 0 === y.ctx.createGain ? y.ctx.createGainNode() : y.ctx.createGain()), e._node.gain.setValueAtTime(n, y.ctx.currentTime), (e._node.paused = !0), e._node.connect(y.masterGain)) 2860 : y.noAudio || 2861 ((e._node = y._obtainHtml5Audio()), 2862 (e._errorFn = e._errorListener.bind(e)), 2863 e._node.addEventListener("error", e._errorFn, !1), 2864 (e._loadFn = e._loadListener.bind(e)), 2865 e._node.addEventListener(y._canPlayEvent, e._loadFn, !1), 2866 (e._endFn = e._endListener.bind(e)), 2867 e._node.addEventListener("ended", e._endFn, !1), 2868 (e._node.src = t._src), 2869 (e._node.preload = !0 === t._preload ? "auto" : t._preload), 2870 (e._node.volume = n * y.volume()), 2871 e._node.load()), 2872 e 2873 ); 2874 }, 2875 reset: function () { 2876 var e = this, 2877 t = e._parent; 2878 return (e._muted = t._muted), (e._loop = t._loop), (e._volume = t._volume), (e._rate = t._rate), (e._seek = 0), (e._rateSeek = 0), (e._paused = !0), (e._ended = !0), (e._sprite = "__default"), (e._id = ++y._counter), e; 2879 }, 2880 _errorListener: function () { 2881 var e = this; 2882 e._parent._emit("loaderror", e._id, e._node.error ? e._node.error.code : 0), e._node.removeEventListener("error", e._errorFn, !1); 2883 }, 2884 _loadListener: function () { 2885 var e = this._parent; 2886 (e._duration = Math.ceil(10 * this._node.duration) / 10), 2887 0 === Object.keys(e._sprite).length && (e._sprite = { __default: [0, 1e3 * e._duration] }), 2888 "loaded" !== e._state && ((e._state = "loaded"), e._emit("load"), e._loadQueue()), 2889 this._node.removeEventListener(y._canPlayEvent, this._loadFn, !1); 2890 }, 2891 _endListener: function () { 2892 var e = this, 2893 t = e._parent; 2894 t._duration === 1 / 0 && ((t._duration = Math.ceil(10 * e._node.duration) / 10), t._sprite.__default[1] === 1 / 0 && (t._sprite.__default[1] = 1e3 * t._duration), t._ended(e)), 2895 e._node.removeEventListener("ended", e._endFn, !1); 2896 }, 2897 }; 2898 var o = {}, 2899 s = function (t) { 2900 var e = t._src; 2901 if (o[e]) return (t._duration = o[e].duration), void c(t); 2902 if (/^data:[^;]+;base64,/.test(e)) { 2903 for (var n = atob(e.split(",")[1]), a = new Uint8Array(n.length), i = 0; i < n.length;
2903 ++i) a[i] = n.charCodeAt(i); 2904 d(a.buffer, t); 2905 } else { 2906 var r = new XMLHttpRequest(); 2907 r.open(t._xhr.method, e, !0), 2908 (r.withCredentials = t._xhr.withCredentials), 2909 (r.responseType = "arraybuffer"), 2910 t._xhr.headers && 2911 Object.keys(t._xhr.headers).forEach(function (e) { 2912 r.setRequestHeader(e, t._xhr.headers[e]); 2913 }), 2914 (r.onload = function () { 2915 var e = (r.status + "")[0]; 2916 "0" === e || "2" === e || "3" === e ? d(r.response, t) : t._emit("loaderror", null, "Failed loading audio file with status: " + r.status + "."); 2917 }), 2918 (r.onerror = function () { 2919 t._webAudio && ((t._html5 = !0), (t._webAudio = !1), (t._sounds = []), delete o[e], t.load()); 2920 }), 2921 l(r); 2922 } 2923 }, 2924 l = function (t) { 2925 try { 2926 t.send(); 2927 } catch (e) { 2928 t.onerror(); 2929 } 2930 }, 2931 d = function (e, t) { 2932 function n() { 2933 t._emit("loaderror", null, "Decoding audio data failed."); 2934 } 2935 function a(e) { 2936 e && 0 < t._sounds.length ? ((o[t._src] = e), c(t, e)) : n(); 2937 } 2938 "undefined" != typeof Promise && 1 === y.ctx.decodeAudioData.length ? y.ctx.decodeAudioData(e).then(a).catch(n) : y.ctx.decodeAudioData(e, a, n); 2939 }, 2940 c = function (e, t) { 2941 t && !e._duration && (e._duration = t.duration), 0 === Object.keys(e._sprite).length && (e._sprite = { __default: [0, 1e3 * e._duration] }), "loaded" !== e._state && ((e._state = "loaded"), e._emit("load"), e._loadQueue()); 2942 }, 2943 u = function () { 2944 if (y.usingWebAudio) { 2945 try { 2946 "undefined" != typeof AudioContext ? (y.ctx = new AudioContext()) : "undefined" != typeof webkitAudioContext ? (y.ctx = new webkitAudioContext()) : (y.usingWebAudio = !1); 2947 } catch (e) { 2948 y.usingWebAudio = !1; 2949 } 2950 y.ctx || (y.usingWebAudio = !1); 2951 var e = /iP(hone|od|ad)/.test(y._navigator && y._navigator.platform), 2952 t = y._navigator && y._navigator.appVersion.match(/OS (\d+)_(\d+)_?(\d+)?/), 2953 t = t ? parseInt(t[1], 10) : null; 2954 e && t && t < 9 && ((t = /safari/.test(y._navigator && y._navigator.userAgent.toLowerCase())), y._navigator && !t && (y.usingWebAudio = !1)), 2955 y.usingWebAudio && 2956 ((y.masterGain = void 0 === y.ctx.createGain ? y.ctx.createGainNode() : y.ctx.createGain()), 2957 y.masterGain.gain.setValueAtTime(y._muted ? 0 : y._volume, y.ctx.currentTime), 2958 y.masterGain.connect(y.ctx.destination)), 2959 y._setup(); 2960 } 2961 }; 2962 "function" == typeof define && 2963 define.amd && 2964 define([], function () { 2965 return { Howler: y, Howl: t }; 2966 }), 2967 "undefined" != typeof exports && ((exports.Howler = y), (exports.Howl = t)), 2968 "undefined" != typeof global 2969 ? ((global.HowlerGlobal = e), (global.Howler = y), (global.Howl = t), (global.Sound = r)) 2970 : "undefined" != typeof window && ((window.HowlerGlobal = e), (window.Howler = y), (window.Howl = t), (window.Sound = r)); 2971})(), 2972(function () { 2973 "use strict"; 2974 var n, a, i; 2975 (HowlerGlobal.prototype._pos = [0, 0, 0]), 2976 (HowlerGlobal.prototype._orientation = [0, 0, -1, 0, 1, 0]), 2977 (HowlerGlobal.prototype.stereo = function (e) { 2978 var t = this; 2979 if (!t.ctx || !t.ctx.listener) return t; 2980 for (var n = t._howls.length - 1; 0 <= n; n--) t._howls[n].stereo(e); 2981 return t; 2982 }), 2983 (HowlerGlobal.prototype.pos = function (e, t, n) { 2984 var a = this; 2985 return a.ctx && a.ctx.listener 2986 ? ((t = "number" != typeof t ? a._pos[1] : t), 2987 (n = "number" != typeof n ? a._pos[2] : n), 2988 "number" != typeof e 2989 ? a._pos 2990 : ((a._pos = [e, t, n]), 2991 void 0 !== a.ctx.listener.positionX 2992 ? (a.ctx.listener.positionX.setTargetAtTime(a._pos[0], Howler.ctx.currentTime, 0.1), 2993 a.ctx.listener.positionY.setTargetAtTime(a._pos[1], Howler.ctx.currentTime, 0.1), 2994 a.ctx.listener.positionZ.setTargetAtTime(a._pos[2], Howler.ctx.currentTime, 0.1)) 2995 : a.ctx.listener.setPosition(a._pos[0], a._pos[1], a._pos[2]), 2996 a)) 2997 : a; 2998 }), 2999 (HowlerGlobal.prototype.orientation = function (e, t, n, a, i, r) { 3000 var o = this; 3001 if (!o.ctx || !o.ctx.listener) return o; 3002 var s = o._orientation; 3003 return ( 3004 (t = "number" != typeof t ? s[1] : t), 3005 (n = "number" != typeof n ? s[2] : n), 3006 (a = "number" != typeof a ? s[3] : a), 3007 (i = "number" != typeof i ? s[4] : i), 3008 (r = "number" != typeof r ? s[5] : r), 3009 "number" != typeof e 3010 ? s 3011 : ((o._orientation = [e, t, n, a, i, r]), 3012 void 0 !== o.ctx.listener.forwardX 3013 ? (o.ctx.listener.forwardX.setTargetAtTime(e, Howler.ctx.currentTime, 0.1), 3014 o.ctx.listener.forwardY.setTargetAtTime(t, Howler.ctx.currentTime, 0.1), 3015 o.ctx.listener.forwardZ.setTargetAtTime(n, Howler.ctx.currentTime, 0.1), 3016 o.ctx.listener.upX.setTargetAtTime(a, Howler.ctx.currentTime, 0.1), 3017 o.ctx.listener.upY.setTargetAtTime(i, Howler.ctx.currentTime, 0.1), 3018 o.ctx.listener.upZ.setTargetAtTime(r, Howler.ctx.currentTime, 0.1)) 3019 : o.ctx.listener.setOrientation(e, t, n, a, i, r), 3020 o) 3021 ); 3022 }), 3023 (Howl.prototype.init = 3024 ((n = Howl.prototype.init), 3025 function (e) { 3026 var t = this; 3027 return ( 3028 (t._orientation = e.orientation || [1, 0, 0]), 3029 (t._stereo = e.stereo || null), 3030 (t._pos = e.pos || null), 3031 (t._pannerAttr = { 3032 coneInnerAngle: void 0 !== e.coneInnerAngle ? e.coneInnerAngle : 360, 3033 coneOuterAngle: void 0 !== e.coneOuterAngle ? e.coneOuterAngle : 360, 3034 coneOuterGain: void 0 !== e.coneOuterGain ? e.coneOuterGain : 0, 3035 distanceModel: void 0 !== e.distanceModel ? e.distanceModel : "inverse", 3036 maxDistance: void 0 !== e.maxDistance ? e.maxDistance : 1e4, 3037 panningModel: void 0 !== e.panningModel ? e.panningModel : "HRTF", 3038 refDistance: void 0 !== e.refDistance ? e.refDistance : 1, 3039 rolloffFactor: void 0 !== e.rolloffFactor ? e.rolloffFactor : 1, 3040 }), 3041 (t._onstereo = e.onstereo ? [{ fn: e.onstereo }] : []), 3042 (t._onpos = e.onpos ? [{ fn: e.onpos }] : []), 3043 (t._onorientation = e.onorientation ? [{ fn: e.onorientation }] : []), 3044 n.call(this, e) 3045 ); 3046 })), 3047 (Howl.prototype.stereo = function (e, t) { 3048 var n = this; 3049 if (!n._webAudio) return n; 3050 if ("loaded" !== n._state) 3051 return ( 3052 n._queue.push({ 3053 event: "stereo", 3054 action: function () { 3055 n.stereo(e, t); 3056 }, 3057 }), 3058 n 3059 ); 3060 var a = void 0 === Howler.ctx.createStereoPanner ? "spatial" : "stereo"; 3061 if (void 0 === t) { 3062 if ("number" != typeof e) return n._stereo; 3063 (n._stereo = e), (n._pos = [e, 0, 0]); 3064 } 3065 for (var i = n._getSoundIds(t), r = 0; r < i.length; r++) { 3066 var o = n._soundById(i[r]); 3067 if (o) { 3068 if ("number" != typeof e) return o._stereo; 3069 (o._stereo = e), 3070 (o._pos = [e, 0, 0]), 3071 o._node && 3072 ((o._pannerAttr.panningModel = "equalpower"), 3073 (o._panner && o._panner.pan) || d(o, a), 3074 "spatial" == a 3075 ? void 0 !== o._panner.positionX
3076 ? (o._panner.positionX.setValueAtTime(e, Howler.ctx.currentTime), o._panner.positionY.setValueAtTime(0, Howler.ctx.currentTime), o._panner.positionZ.setValueAtTime(0, Howler.ctx.currentTime)) 3077 : o._panner.setPosition(e, 0, 0) 3078 : o._panner.pan.setValueAtTime(e, Howler.ctx.currentTime)), 3079 n._emit("stereo", o._id); 3080 } 3081 } 3082 return n; 3083 }), 3084 (Howl.prototype.pos = function (e, t, n, a) { 3085 var i = this; 3086 if (!i._webAudio) return i; 3087 if ("loaded" !== i._state) 3088 return ( 3089 i._queue.push({ 3090 event: "pos", 3091 action: function () { 3092 i.pos(e, t, n, a); 3093 }, 3094 }), 3095 i 3096 ); 3097 if (((t = "number" != typeof t ? 0 : t), (n = "number" != typeof n ? -0.5 : n), void 0 === a)) { 3098 if ("number" != typeof e) return i._pos; 3099 i._pos = [e, t, n]; 3100 } 3101 for (var r = i._getSoundIds(a), o = 0; o < r.length; o++) { 3102 var s = i._soundById(r[o]); 3103 if (s) { 3104 if ("number" != typeof e) return s._pos; 3105 (s._pos = [e, t, n]), 3106 s._node && 3107 ((s._panner && !s._panner.pan) || d(s, "spatial"), 3108 void 0 !== s._panner.positionX 3109 ? (s._panner.positionX.setValueAtTime(e, Howler.ctx.currentTime), s._panner.positionY.setValueAtTime(t, Howler.ctx.currentTime), s._panner.positionZ.setValueAtTime(n, Howler.ctx.currentTime)) 3110 : s._panner.setPosition(e, t, n)), 3111 i._emit("pos", s._id); 3112 } 3113 } 3114 return i; 3115 }), 3116 (Howl.prototype.orientation = function (e, t, n, a) { 3117 var i = this; 3118 if (!i._webAudio) return i; 3119 if ("loaded" !== i._state) 3120 return ( 3121 i._queue.push({ 3122 event: "orientation", 3123 action: function () { 3124 i.orientation(e, t, n, a); 3125 }, 3126 }), 3127 i 3128 ); 3129 if (((t = "number" != typeof t ? i._orientation[1] : t), (n = "number" != typeof n ? i._orientation[2] : n), void 0 === a)) { 3130 if ("number" != typeof e) return i._orientation; 3131 i._orientation = [e, t, n]; 3132 } 3133 for (var r = i._getSoundIds(a), o = 0; o < r.length; o++) { 3134 var s = i._soundById(r[o]); 3135 if (s) { 3136 if ("number" != typeof e) return s._orientation; 3137 (s._orientation = [e, t, n]), 3138 s._node && 3139 (s._panner || (s._pos || (s._pos = i._pos || [0, 0, -0.5]), d(s, "spatial")), 3140 void 0 !== s._panner.orientationX 3141 ? (s._panner.orientationX.setValueAtTime(e, Howler.ctx.currentTime), s._panner.orientationY.setValueAtTime(t, Howler.ctx.currentTime), s._panner.orientationZ.setValueAtTime(n, Howler.ctx.currentTime)) 3142 : s._panner.setOrientation(e, t, n)), 3143 i._emit("orientation", s._id); 3144 } 3145 } 3146 return i; 3147 }), 3148 (Howl.prototype.pannerAttr = function () { 3149 var e, 3150 t, 3151 n = this, 3152 a = arguments; 3153 if (!n._webAudio) return n; 3154 if (0 === a.length) return n._pannerAttr; 3155 if (1 === a.length) { 3156 if ("object" != typeof a[0]) return ((o = n._soundById(parseInt(a[0], 10))) || n)._pannerAttr; 3157 (e = a[0]), 3158 void 0 === t && 3159 (e.pannerAttr || 3160 (e.pannerAttr = { 3161 coneInnerAngle: e.coneInnerAngle, 3162 coneOuterAngle: e.coneOuterAngle, 3163 coneOuterGain: e.coneOuterGain, 3164 distanceModel: e.distanceModel, 3165 maxDistance: e.maxDistance, 3166 refDistance: e.refDistance, 3167 rolloffFactor: e.rolloffFactor, 3168 panningModel: e.panningModel, 3169 }), 3170 (n._pannerAttr = { 3171 coneInnerAngle: void 0 !== e.pannerAttr.coneInnerAngle ? e.pannerAttr.coneInnerAngle : n._coneInnerAngle, 3172 coneOuterAngle: void 0 !== e.pannerAttr.coneOuterAngle ? e.pannerAttr.coneOuterAngle : n._coneOuterAngle, 3173 coneOuterGain: void 0 !== e.pannerAttr.coneOuterGain ? e.pannerAttr.coneOuterGain : n._coneOuterGain, 3174 distanceModel: void 0 !== e.pannerAttr.distanceModel ? e.pannerAttr.distanceModel : n._distanceModel, 3175 maxDistance: void 0 !== e.pannerAttr.maxDistance ? e.pannerAttr.maxDistance : n._maxDistance, 3176 refDistance: void 0 !== e.pannerAttr.refDistance ? e.pannerAttr.refDistance : n._refDistance, 3177 rolloffFactor: void 0 !== e.pannerAttr.rolloffFactor ? e.pannerAttr.rolloffFactor : n._rolloffFactor, 3178 panningModel: void 0 !== e.pannerAttr.panningModel ? e.pannerAttr.panningModel : n._panningModel, 3179 })); 3180 } else 2 === a.length && ((e = a[0]), (t = parseInt(a[1], 10))); 3181 for (var i, r, o, s = n._getSoundIds(t), l = 0; l < s.length; l++) 3182 (o = n._soundById(s[l])) && 3183 ((i = o._pannerAttr), 3184 (i = { 3185 coneInnerAngle: (void 0 !== e.coneInnerAngle ? e : i).coneInnerAngle, 3186 coneOuterAngle: (void 0 !== e.coneOuterAngle ? e : i).coneOuterAngle, 3187 coneOuterGain: (void 0 !== e.coneOuterGain ? e : i).coneOuterGain, 3188 distanceModel: (void 0 !== e.distanceModel ? e : i).distanceModel, 3189 maxDistance: (void 0 !== e.maxDistance ? e : i).maxDistance, 3190 refDistance: (void 0 !== e.refDistance ? e : i).refDistance, 3191 rolloffFactor: (void 0 !== e.rolloffFactor ? e : i).rolloffFactor, 3192 panningModel: (void 0 !== e.panningModel ? e : i).panningModel, 3193 }), 3194 (r = o._panner) 3195 ? ((r.coneInnerAngle = i.coneInnerAngle), 3196 (r.coneOuterAngle = i.coneOuterAngle), 3197 (r.coneOuterGain = i.coneOuterGain), 3198 (r.distanceModel = i.distanceModel), 3199 (r.maxDistance = i.maxDistance), 3200 (r.refDistance = i.refDistance), 3201 (r.rolloffFactor = i.rolloffFactor), 3202 (r.panningModel = i.panningModel)) 3203 : (o._pos || (o._pos = n._pos || [0, 0, -0.5]), d(o, "spatial"))); 3204 return n; 3205 }), 3206 (Sound.prototype.init = 3207 ((a = Sound.prototype.init), 3208 function () { 3209 var e = this, 3210 t = e._parent; 3211 (e._orientation = t._orientation), (e._stereo = t._stereo), (e._pos = t._pos), (e._pannerAttr = t._pannerAttr), a.call(this), e._stereo ? t.stereo(e._stereo) : e._pos && t.pos(e._pos[0], e._pos[1], e._pos[2], e._id); 3212 })), 3213 (Sound.prototype.reset = 3214 ((i = Sound.prototype.reset), 3215 function () { 3216 var e = this, 3217 t = e._parent; 3218 return ( 3219 (e._orientation = t._orientation), 3220 (e._stereo = t._stereo), 3221 (e._pos = t._pos), 3222 (e._pannerAttr = t._pannerAttr), 3223 e._stereo ? t.stereo(e._stereo) : e._pos ? t.pos(e._pos[0], e._pos[1], e._pos[2], e._id) : e._panner && (e._panner.disconnect(0), (e._panner = void 0), t._refreshBuffer(e)), 3224 i.call(this) 3225 ); 3226 })); 3227 var d = function (e, t) { 3228 "spatial" === (t = t || "spatial") 3229 ? ((e._panner = Howler.ctx.createPanner()), 3230 (e._panner.coneInnerAngle = e._pannerAttr.coneInnerAngle), 3231 (e._panner.coneOuterAngle = e._pannerAttr.coneOuterAngle), 3232 (e._panner.coneOuterGain = e._pannerAttr.coneOuterGain), 3233 (e._panner.distanceModel = e._pannerAttr.distanceModel), 3234 (e._panner.maxDistance = e._pannerAttr.maxDistance), 3235 (e._panner.refDistance = e._pannerAttr.refDistance), 3236 (e._panner.rolloffFactor = e._pannerAttr.rolloffFactor), 3237 (e._panner.panningModel = e._pannerAttr.panningModel), 3238 void 0 !== e._panner.positionX 3239 ? (e._panner.positionX.setValueAtTime(e._pos[0], Howler.ctx.currentTime), e._panner.positionY.setValueAtTime(e._pos[1], Howler.ctx.currentTime), e._panner.positionZ.setValueAtTime(e._pos[2], Howler.ctx.currentTime)) 3240 : e._panner.setPosition(e._pos[0], e._pos[1], e._pos[2]), 3241 void 0 !== e._panner.orientationX 3242 ? (e._panner.orientationX.setValueAtTime(e._orientation[0], Howler.ctx.currentTime), 3243 e._panner.orientationY.setValueAtTime(e._orientation[1], Howler.ctx.currentTime), 3244 e._panner.orientationZ.setValueAtTime(e._orientation[2], Howler.ctx.currentTime)) 3245 : e._panner.setOrientation(e._orientation[0], e._orientation[1], e._orientation[2])) 3246 : ((e._panner = Howler.ctx.createStereoPanner()), e._panner.pan.setValueAtTime(e._stereo, Howler.ctx.currentTime)), 3247 e._panner.connect(e._node), 3248 e._paused || e._parent.pause(e._id, !0).play(e._id, !0); 3249 }; 3250})(); 3251(function (e, t) { 3252 "object" == typeof exports && "undefined" != typeof module ? (module.exports = t()) : "function" == typeof define && define.amd ? define(t) : ((e = "undefined" != typeof globalThis ? globalThis : e || self).Swiper = t()); 3253})(this, function () { 3254 "use strict"; 3255 function a(e, t) { 3256 for (var n = 0; n < t.length; n++) { 3257 var a = t[n]; 3258 (a.enumerable = a.enumerable || !1), (a.configurable = !0), "value" in a && (a.writable = !0), Object.defineProperty(e, a.key, a); 3259 } 3260 } 3261 function e() { 3262 return (e = 3263 Object.assign || 3264 function (e) { 3265 for (var t = 1; t < arguments.length; t++) { 3266 var n, 3267 a = arguments[t]; 3268 for (n in a) Object.prototype.hasOwnProperty.call(a, n) && (e[n] = a[n]); 3269 } 3270 return e; 3271 }).apply(this, arguments); 3272 } 3273 function i(e) { 3274 return null !== e && "object" == typeof e && "constructor" in e && e.constructor === Object; 3275 } 3276 function r(t, n) { 3277 void 0 === t && (t = {}), 3278 void 0 === n && (n = {}),
3279 Object.keys(n).forEach(function (e) { 3280 void 0 === t[e] ? (t[e] = n[e]) : i(n[e]) && i(t[e]) && 0 < Object.keys(n[e]).length && r(t[e], n[e]); 3281 }); 3282 } 3283 var t = { 3284 body: {}, 3285 addEventListener: function () {}, 3286 removeEventListener: function () {}, 3287 activeElement: { blur: function () {}, nodeName: "" }, 3288 querySelector: function () { 3289 return null; 3290 }, 3291 querySelectorAll: function () { 3292 return []; 3293 }, 3294 getElementById: function () { 3295 return null; 3296 }, 3297 createEvent: function () { 3298 return { initEvent: function () {} }; 3299 }, 3300 createElement: function () { 3301 return { 3302 children: [], 3303 childNodes: [], 3304 style: {}, 3305 setAttribute: function () {}, 3306 getElementsByTagName: function () { 3307 return []; 3308 }, 3309 }; 3310 }, 3311 createElementNS: function () { 3312 return {}; 3313 }, 3314 importNode: function () { 3315 return null; 3316 }, 3317 location: { hash: "", host: "", hostname: "", href: "", origin: "", pathname: "", protocol: "", search: "" }, 3318 }; 3319 function b() { 3320 var e = "undefined" != typeof document ? document : {}; 3321 return r(e, t), e; 3322 } 3323 var n = { 3324 document: t, 3325 navigator: { userAgent: "" }, 3326 location: { hash: "", host: "", hostname: "", href: "", origin: "", pathname: "", protocol: "", search: "" }, 3327 history: { replaceState: function () {}, pushState: function () {}, go: function () {}, back: function () {} }, 3328 CustomEvent: function () { 3329 return this; 3330 }, 3331 addEventListener: function () {}, 3332 removeEventListener: function () {}, 3333 getComputedStyle: function () { 3334 return { 3335 getPropertyValue: function () { 3336 return ""; 3337 }, 3338 }; 3339 }, 3340 Image: function () {}, 3341 Date: function () {}, 3342 screen: {}, 3343 setTimeout: function () {}, 3344 clearTimeout: function () {}, 3345 matchMedia: function () { 3346 return {}; 3347 }, 3348 requestAnimationFrame: function (e) { 3349 return "undefined" == typeof setTimeout ? (e(), null) : setTimeout(e, 0); 3350 }, 3351 cancelAnimationFrame: function (e) { 3352 "undefined" != typeof setTimeout && clearTimeout(e); 3353 }, 3354 }; 3355 function w() { 3356 var e = "undefined" != typeof window ? window : {}; 3357 return r(e, n), e; 3358 } 3359 function o(e) { 3360 return (o = Object.setPrototypeOf 3361 ? Object.getPrototypeOf 3362 : function (e) { 3363 return e.__proto__ || Object.getPrototypeOf(e); 3364 })(e); 3365 } 3366 function s(e, t) { 3367 return (s = 3368 Object.setPrototypeOf || 3369 function (e, t) { 3370 return (e.__proto__ = t), e; 3371 })(e, t); 3372 } 3373 function l(e, t, n) { 3374 return (l = (function () { 3375 if ("undefined" != typeof Reflect && Reflect.construct && !Reflect.construct.sham) { 3376 if ("function" == typeof Proxy) return 1; 3377 try { 3378 return Date.prototype.toString.call(Reflect.construct(Date, [], function () {})), 1; 3379 } catch (e) { 3380 return; 3381 } 3382 } 3383 })() 3384 ? Reflect.construct 3385 : function (e, t, n) { 3386 var a = [null]; 3387 a.push.apply(a, t); 3388 a = new (Function.bind.apply(e, a))(); 3389 return n && s(a, n.prototype), a; 3390 }).apply(null, arguments); 3391 } 3392 function d(e) { 3393 var n = "function" == typeof Map ? new Map() : void 0; 3394 return (function (e) { 3395 if (null === e || -1 === Function.toString.call(e).indexOf("[native code]")) return e; 3396 if ("function" != typeof e) throw new TypeError("Super expression must either be null or a function"); 3397 if (void 0 !== n) { 3398 if (n.has(e)) return n.get(e); 3399 n.set(e, t); 3400 } 3401 function t() { 3402 return l(e, arguments, o(this).constructor); 3403 } 3404 return (t.prototype = Object.create(e.prototype, { constructor: { value: t, enumerable: !1, writable: !0, configurable: !0 } })), s(t, e); 3405 })(e); 3406 } 3407 var c = (function (a) { 3408 var e, t; 3409 function n(e) { 3410 var t, 3411 n = a.call.apply(a, [this].concat(e)) || this; 3412 return ( 3413 (e = (function (e) { 3414 if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); 3415 return e; 3416 })(n)), 3417 (t = e.__proto__), 3418 Object.defineProperty(e, "__proto__", { 3419 get: function () { 3420 return t; 3421 }, 3422 set: function (e) { 3423 t.__proto__ = e; 3424 }, 3425 }), 3426 n 3427 ); 3428 } 3429 return (t = a), ((e = n).prototype = Object.create(t.prototype)), ((e.prototype.constructor = e).__proto__ = t), n; 3430 })(d(Array)); 3431 function u(e) { 3432 var t = []; 3433 return ( 3434 (e = void 0 === e ? [] : e).forEach(function (e) { 3435 Array.isArray(e) ? t.push.apply(t, u(e)) : t.push(e); 3436 }), 3437 t 3438 ); 3439 } 3440 function p(e, t) { 3441 return Array.prototype.filter.call(e, t); 3442 } 3443 function E(e, t) { 3444 var n = w(), 3445 a = b(), 3446 i = []; 3447 if (!t && e instanceof c) return e; 3448 if (!e) return new c(i); 3449 if ("string" == typeof e) { 3450 var r = e.trim(); 3451 if (0 <= r.indexOf("<") && 0 <= r.indexOf(">")) { 3452 var o = "div";
3453 0 === r.indexOf("<li") && (o = "ul"), 3454 0 === r.indexOf("<tr") && (o = "tbody"), 3455 (0 !== r.indexOf("<td") && 0 !== r.indexOf("<th")) || (o = "tr"), 3456 0 === r.indexOf("<tbody") && (o = "table"), 3457 0 === r.indexOf("<option") && (o = "select"); 3458 var s = a.createElement(o); 3459 s.innerHTML = r; 3460 for (var l = 0; l < s.childNodes.length; l += 1) i.push(s.childNodes[l]); 3461 } else 3462 i = (function (e, t) { 3463 if ("string" != typeof e) return [e]; 3464 for (var n = [], a = t.querySelectorAll(e), i = 0; i < a.length; i += 1) n.push(a[i]); 3465 return n; 3466 })(e.trim(), t || a); 3467 } else if (e.nodeType || e === n || e === a) i.push(e); 3468 else if (Array.isArray(e)) { 3469 if (e instanceof c) return e; 3470 i = e; 3471 } 3472 return new c( 3473 (function (e) { 3474 for (var t = [], n = 0; n < e.length; n += 1) -1 === t.indexOf(e[n]) && t.push(e[n]); 3475 return t; 3476 })(i) 3477 ); 3478 } 3479 E.fn = c.prototype; 3480 var f, 3481 h, 3482 m, 3483 v = { 3484 addClass: function () { 3485 for (var e = arguments.length, t = new Array(e), n = 0; n < e; n++) t[n] = arguments[n]; 3486 var a = u( 3487 t.map(function (e) { 3488 return e.split(" "); 3489 }) 3490 ); 3491 return ( 3492 this.forEach(function (e) { 3493 (e = e.classList).add.apply(e, a); 3494 }), 3495 this 3496 ); 3497 }, 3498 removeClass: function () { 3499 for (var e = arguments.length, t = new Array(e), n = 0; n < e; n++) t[n] = arguments[n]; 3500 var a = u( 3501 t.map(function (e) { 3502 return e.split(" "); 3503 }) 3504 ); 3505 return ( 3506 this.forEach(function (e) { 3507 (e = e.classList).remove.apply(e, a); 3508 }), 3509 this 3510 ); 3511 }, 3512 hasClass: function () { 3513 for (var e = arguments.length, t = new Array(e), n = 0; n < e; n++) t[n] = arguments[n]; 3514 var a = u( 3515 t.map(function (e) { 3516 return e.split(" "); 3517 }) 3518 ); 3519 return ( 3520 0 < 3521 p(this, function (t) { 3522 return ( 3523 0 < 3524 a.filter(function (e) { 3525 return t.classList.contains(e); 3526 }).length 3527 ); 3528 }).length 3529 ); 3530 }, 3531 toggleClass: function () { 3532 for (var e = arguments.length, t = new Array(e), n = 0; n < e; n++) t[n] = arguments[n]; 3533 var a = u( 3534 t.map(function (e) { 3535 return e.split(" "); 3536 }) 3537 ); 3538 this.forEach(function (t) { 3539 a.forEach(function (e) { 3540 t.classList.toggle(e); 3541 }); 3542 }); 3543 }, 3544 attr: function (e, t) { 3545 if (1 === arguments.length && "string" == typeof e) return this[0] ? this[0].getAttribute(e) : void 0; 3546 for (var n = 0; n < this.length; n += 1) 3547 if (2 === arguments.length) this[n].setAttribute(e, t); 3548 else for (var a in e) (this[n][a] = e[a]), this[n].setAttribute(a, e[a]); 3549 return this; 3550 }, 3551 removeAttr: function (e) { 3552 for (var t = 0; t < this.length; t += 1) this[t].removeAttribute(e); 3553 return this; 3554 }, 3555 transform: function (e) { 3556 for (var t = 0; t < this.length; t += 1) this[t].style.transform = e; 3557 return this; 3558 }, 3559 transition: function (e) { 3560 for (var t = 0; t < this.length; t += 1) this[t].style.transitionDuration = "string" != typeof e ? e + "ms" : e; 3561 return this; 3562 }, 3563 on: function () { 3564 for (var e = arguments.length, t = new Array(e), n = 0; n < e; n++) t[n] = arguments[n]; 3565 var a = t[0], 3566 r = t[1], 3567 o = t[2], 3568 i = t[3]; 3569 function s(e) { 3570 var t = e.target; 3571 if (t) { 3572 var n = e.target.dom7EventData || []; 3573 if ((n.indexOf(e) < 0 && n.unshift(e), E(t).is(r))) o.apply(t, n); 3574 else for (var a = E(t).parents(), i = 0; i < a.length; i += 1) E(a[i]).is(r) && o.apply(a[i], n); 3575 } 3576 } 3577 function l(e) { 3578 var t = (e && e.target && e.target.dom7EventData) || []; 3579 t.indexOf(e) < 0 && t.unshift(e), o.apply(this, t); 3580 } 3581 "function" == typeof t[1] && ((a = t[0]), (o = t[1]), (i = t[2]), (r = void 0)); 3582 for (var d, i = i || !1, c = a.split(" "), u = 0; u < this.length; u += 1) { 3583 var p = this[u]; 3584 if (r) 3585 for (d = 0; d < c.length; d += 1) { 3586 var f = c[d]; 3587 p.dom7LiveListeners || (p.dom7LiveListeners = {}), p.dom7LiveListeners[f] || (p.dom7LiveListeners[f] = []), p.dom7LiveListeners[f].push({ listener: o, proxyListener: s }), p.addEventListener(f, s, i); 3588 } 3589 else 3590 for (d = 0; d < c.length; d += 1) { 3591 var h = c[d]; 3592 p.dom7Listeners || (p.dom7Listeners = {}), p.dom7Listeners[h] || (p.dom7Listeners[h] = []), p.dom7Listeners[h].push({ listener: o, proxyListener: l }), p.addEventListener(h, l, i); 3593 } 3594 } 3595 return this; 3596 }, 3597 off: function () { 3598 for (var e = arguments.length, t = new Array(e), n = 0; n < e; n++) t[n] = arguments[n]; 3599 var a = t[0], 3600 i = t[1], 3601 r = t[2], 3602 o = t[3]; 3603 "function" == typeof t[1] && ((a = t[0]), (r = t[1]), (o = t[2]), (i = void 0)); 3604 for (var o = o || !1, s = a.split(" "), l = 0; l < s.length; l += 1) 3605 for (var d = s[l], c = 0; c < this.length; c += 1) { 3606 var u = this[c], 3607 p = void 0; 3608 if ((!i && u.dom7Listeners ? (p = u.dom7Listeners[d]) : i && u.dom7LiveListeners && (p = u.dom7LiveListeners[d]), p && p.length)) 3609 for (var f = p.length - 1; 0 <= f; --f) { 3610 var h = p[f]; 3611 ((!r || h.listener !== r) && !(r && h.listener && h.listener.dom7proxy && h.listener.dom7proxy === r) && r) || (u.removeEventListener(d, h.proxyListener, o), p.splice(f, 1)); 3612 } 3613 } 3614 return this; 3615 }, 3616 trigger: function () { 3617 for (var e = w(), t = arguments.length, n = new Array(t), a = 0; a < t; a++) n[a] = arguments[a]; 3618 for (var i = n[0].split(" "), r = n[1], o = 0; o < i.length; o += 1) 3619 for (var s = i[o], l = 0; l < this.length; l += 1) { 3620 var d, 3621 c = this[l]; 3622 e.CustomEvent && 3623 ((d = new e.CustomEvent(s, { detail: r, bubbles: !0, cancelable: !0 })), 3624 (c.dom7EventData = n.filter(function (e, t) { 3625 return 0 < t; 3626 })), 3627 c.dispatchEvent(d), 3628 (c.dom7EventData = []), 3629 delete c.dom7EventData); 3630 } 3631 return this; 3632 }, 3633 transitionEnd: function (n) { 3634 var a = this; 3635 return ( 3636 n && 3637 a.on("transitionend", function e(t) { 3638 t.target === this && (n.call(this, t), a.off("transitionend", e)); 3639 }), 3640 this 3641 ); 3642 }, 3643 outerWidth: function (e) { 3644 if (0 < this.length) { 3645 if (e) { 3646 e = this.styles(); 3647 return this[0].offsetWidth + parseFloat(e.getPropertyValue("margin-right")) + parseFloat(e.getPropertyValue("margin-left")); 3648 } 3649 return this[0].offsetWidth; 3650 } 3651 return null; 3652 }, 3653 outerHeight: function (e) { 3654 if (0 < this.length) { 3655 if (e) { 3656 e = this.styles(); 3657 return this[0].offsetHeight + parseFloat(e.getPropertyValue("margin-top")) + parseFloat(e.getPropertyValue("margin-bottom")); 3658 } 3659 return this[0].offsetHeight; 3660 } 3661 return null; 3662 }, 3663 styles: function () { 3664 var e = w(); 3665 return this[0] ? e.getComputedStyle(this[0], null) : {}; 3666 }, 3667 offset: function () { 3668 if (0 < this.length) { 3669 var e = w(), 3670 t = b(), 3671 n = this[0], 3672 a = n.getBoundingClientRect(), 3673 i = t.body, 3674 r = n.clientTop || i.clientTop || 0, 3675 t = n.clientLeft || i.clientLeft || 0, 3676 i = n === e ? e.scrollY : n.scrollTop, 3677 n = n === e ? e.scrollX : n.scrollLeft; 3678 return { top: a.top + i - r, left: a.left + n - t }; 3679 } 3680 return null; 3681 }, 3682 css: function (e, t) { 3683 var n, 3684 a = w(); 3685 if (1 === arguments.length) { 3686 if ("string" != typeof e) { 3687 for (n = 0; n < this.length; n += 1) for (var i in e) this[n].style[i] = e[i]; 3688 return this; 3689 } 3690 if (this[0]) return a.getComputedStyle(this[0], null).getPropertyValue(e); 3691 } 3692 if (2 !== arguments.length || "string" != typeof e) return this; 3693 for (n = 0; n < this.length; n += 1) this[n].style[e] = t; 3694 return this; 3695 }, 3696 each: function (n) { 3697 return ( 3698 n && 3699 this.forEach(function (e, t) { 3700 n.apply(e, [e, t]); 3701 }), 3702 this 3703 ); 3704 }, 3705 html: function (e) { 3706 if (void 0 === e) return this[0] ? this[0].innerHTML : null; 3707 for (var t = 0; t < this.length; t += 1) this[t].innerHTML = e; 3708 return this; 3709 }, 3710 text: function (e) { 3711 if (void 0 === e) return this[0] ? this[0].textContent.trim() : null; 3712 for (var t = 0; t < this.length; t += 1) this[t].textContent = e; 3713 return this; 3714 }, 3715 is: function (e) { 3716 var t, 3717 n, 3718 a = w(), 3719 i = b(), 3720 r = this[0]; 3721 if (!r || void 0 === e) return !1; 3722 if ("string" == typeof e) { 3723 if (r.matches) return r.matches(e); 3724 if (r.webkitMatchesSelector) return r.webkitMatchesSelector(e); 3725 if (r.msMatchesSelector) return r.msMatchesSelector(e); 3726 for (t = E(e), n = 0; n < t.length; n += 1) if (t[n] === r) return !0; 3727 return !1; 3728 } 3729 if (e === i) return r === i; 3730 if (e === a) return r === a; 3731 if (e.nodeType || e instanceof c) { 3732 for (t = e.nodeType ? [e] : e, n = 0; n < t.length; n += 1) if (t[n] === r) return !0; 3733 return !1; 3734 } 3735 return !1; 3736 }, 3737 index: function () { 3738 var e, 3739 t = this[0]; 3740 if (t) { 3741 for (e = 0; null !== (t = t.previousSibling); ) 1 === t.nodeType && (e += 1); 3742 return e; 3743 } 3744 }, 3745 eq: function (e) { 3746 if (void 0 === e) return this; 3747 var t = this.length; 3748 if (t - 1 < e) return E([]); 3749 if (e < 0) { 3750 t = t + e; 3751 return t < 0 ? E([]) : E([this[t]]); 3752 } 3753 return E([this[e]]); 3754 }, 3755 append: function () { 3756 for (var e = b(), t = 0; t < arguments.length; t += 1) 3757 for (var n = t < 0 || arguments.length <= t ? void 0 : arguments[t], a = 0; a < this.length; a += 1) 3758 if ("string" == typeof n) { 3759 var i = e.createElement("div"); 3760 for (i.innerHTML = n; i.firstChild; ) this[a].appendChild(i.firstChild); 3761 } else if (n instanceof c) for (var r = 0; r < n.length; r += 1) this[a].appendChild(n[r]); 3762 else this[a].appendChild(n); 3763 return this; 3764 }, 3765 prepend: function (e) { 3766 for (var t, n = b(), a = 0; a < this.length; a += 1) 3767 if ("string" == typeof e) { 3768 var i = n.createElement("div"); 3769 for (i.innerHTML = e, t = i.childNodes.length - 1; 0 <= t; --t) this[a].insertBefore(i.childNodes[t], this[a].childNodes[0]); 3770 } else if (e instanceof c) for (t = 0; t < e.length; t += 1) this[a].insertBefore(e[t], this[a].childNodes[0]); 3771 else this[a].insertBefore(e, this[a].childNodes[0]); 3772 return this; 3773 }, 3774 next: function (e) { 3775 return 0 < this.length ? (e ? (this[0].nextElementSibling && E(this[0].nextElementSibling).is(e) ? E([this[0].nextElementSibling]) : E([])) : this[0].nextElementSibling ? E([this[0].nextElementSibling]) : E([])) : E([]); 3776 }, 3777 nextAll: function (e) { 3778 var t = [], 3779 n = this[0]; 3780 if (!n) return E([]); 3781 for (; n.nextElementSibling; ) { 3782 var a = n.nextElementSibling; 3783 (!e || E(a).is(e)) && t.push(a), (n = a); 3784 } 3785 return E(t); 3786 }, 3787 prev: function (e) { 3788 if (0 < this.length) { 3789 var t = this[0]; 3790 return e ? (t.previousElementSibling && E(t.previousElementSibling).is(e) ? E([t.previousElementSibling]) : E([])) : t.previousElementSibling ? E([t.previousElementSibling]) : E([]); 3791 } 3792 return E([]); 3793 }, 3794 prevAll: function (e) { 3795 var t = [], 3796 n = this[0]; 3797 if (!n) return E([]); 3798 for (; n.previousElementSibling; ) { 3799 var a = n.previousElementSibling; 3800 (!e || E(a).is(e)) && t.push(a), (n = a); 3801 } 3802 return E(t); 3803 }, 3804 parent: function (e) { 3805 for (var t = [], n = 0; n < this.length; n += 1) null === this[n].parentNode || (e && !E(this[n].parentNode).is(e)) || t.push(this[n].parentNode); 3806 return E(t); 3807 }, 3808 parents: function (e) { 3809 for (var t = [], n = 0; n < this.length; n += 1) for (var a = this[n].parentNode; a; ) (e && !E(a).is(e)) || t.push(a), (a = a.parentNode); 3810 return E(t); 3811 }, 3812 closest: function (e) { 3813 var t = this; 3814 return void 0 === e ? E([]) : t.is(e) ? t : t.parents(e).eq(0); 3815 }, 3816 find: function (e) { 3817 for (var t = [], n = 0; n < this.length; n += 1) for (var a = this[n].querySelectorAll(e), i = 0; i < a.length; i += 1) t.push(a[i]); 3818 return E(t); 3819 }, 3820 children: function (e) { 3821 for (var t = [], n = 0; n < this.length; n += 1) for (var a = this[n].children, i = 0; i < a.length; i += 1) (e && !E(a[i]).is(e)) || t.push(a[i]); 3822 return E(t); 3823 }, 3824 filter: function (e) { 3825 return E(p(this, e)); 3826 }, 3827 remove: function () { 3828 for (var e = 0; e < this.length; e += 1) this[e].parentNode && this[e].parentNode.removeChild(this[e]); 3829 return this; 3830 }, 3831 }; 3832 function S(e, t) { 3833 return void 0 === t && (t = 0), setTimeout(e, t); 3834 } 3835 function C() { 3836 return Date.now(); 3837 } 3838 function g(e, t) { 3839 void 0 === t && (t = "x"); 3840 var n, 3841 a, 3842 i, 3843 r, 3844 o, 3845 s = w(), 3846 o = ((r = e), (e = w()), (o = (o = !(o = e.getComputedStyle ? e.getComputedStyle(r, null) : o) && r.currentStyle ? r.currentStyle : o) || r.style)); 3847 return ( 3848 s.WebKitCSSMatrix 3849 ? (6 < (a = o.transform || o.webkitTransform).split(",").length && 3850 (a = a 3851 .split(", ") 3852 .map(function (e) { 3853 return e.replace(",", "."); 3854 }) 3855 .join(", ")), 3856 (i = new s.WebKitCSSMatrix("none" === a ? "" : a))) 3857 : (n = (i = o.MozTransform || o.OTransform || o.MsTransform || o.msTransform || o.transform || o.getPropertyValue("transform").replace("translate(", "matrix(1, 0, 0, 1,")).toString().split(",")), 3858 "x" === t && (a = s.WebKitCSSMatrix ? i.m41 : 16 === n.length ? parseFloat(n[12]) : parseFloat(n[4])), 3859 (a = "y" === t ? (s.WebKitCSSMatrix ? i.m42 : 16 === n.length ? parseFloat(n[13]) : parseFloat(n[5])) : a) || 0 3860 ); 3861 } 3862 function y(e) { 3863 return "object" == typeof e && null !== e && e.constructor && "Object" === Object.prototype.toString.call(e).slice(8, -1); 3864 } 3865 function Y(e) { 3866 for (var t, n = Object(arguments.length <= 0 ? void 0 : e), a = ["__proto__", "constructor", "prototype"], i = 1; i < arguments.length; i += 1) { 3867 var r = i < 0 || arguments.length <= i ? void 0 : arguments[i]; 3868 if (null != r && ((t = r), !("undefined" != typeof window && void 0 !== window.HTMLElement ? t instanceof HTMLElement : t && (1 === t.nodeType || 11 === t.nodeType)))) 3869 for ( 3870 var o = Object.keys(Object(r)).filter(function (e) { 3871 return a.indexOf(e) < 0; 3872 }), 3873 s = 0, 3874 l = o.length; 3875 s < l; 3876 s += 1 3877 ) { 3878 var d = o[s], 3879 c = Object.getOwnPropertyDescriptor(r, d); 3880 void 0 !== c && c.enumerable && (y(n[d]) && y(r[d]) ? (r[d].__swiper__ ? (n[d] = r[d]) : Y(n[d], r[d])) : !y(n[d]) && y(r[d]) ? ((n[d] = {}), r[d].__swiper__ ? (n[d] = r[d]) : Y(n[d], r[d])) : (n[d] = r[d])); 3881 } 3882 } 3883 return n; 3884 } 3885 function x(n, a) {
3886 Object.keys(a).forEach(function (t) { 3887 y(a[t]) && 3888 Object.keys(a[t]).forEach(function (e) { 3889 "function" == typeof a[t][e] && (a[t][e] = a[t][e].bind(n)); 3890 }), 3891 (n[t] = a[t]); 3892 }); 3893 } 3894 function _(e) { 3895 return ( 3896 "." + 3897 (e = void 0 === e ? "" : e) 3898 .trim() 3899 .replace(/([\.:!\/])/g, "\\$1") 3900 .replace(/ /g, ".") 3901 ); 3902 } 3903 function T(n, a, e, i) { 3904 var r = b(); 3905 return ( 3906 e && 3907 Object.keys(i).forEach(function (e) { 3908 var t; 3909 a[e] || !0 !== a.auto || (((t = r.createElement("div")).className = i[e]), n.append(t), (a[e] = t)); 3910 }), 3911 a 3912 ); 3913 } 3914 function M() { 3915 var n, e; 3916 return ( 3917 f || 3918 ((n = w()), 3919 (e = b()), 3920 (f = { 3921 touch: !!("ontouchstart" in n || (n.DocumentTouch && e instanceof n.DocumentTouch)), 3922 pointerEvents: !!n.PointerEvent && "maxTouchPoints" in n.navigator && 0 <= n.navigator.maxTouchPoints, 3923 observer: "MutationObserver" in n || "WebkitMutationObserver" in n, 3924 passiveListener: (function () { 3925 var e = !1; 3926 try { 3927 var t = Object.defineProperty({}, "passive", { 3928 get: function () { 3929 e = !0; 3930 }, 3931 }); 3932 n.addEventListener("testPassiveListener", null, t); 3933 } catch (e) {} 3934 return e; 3935 })(), 3936 gestures: "ongesturestart" in n, 3937 })), 3938 f 3939 ); 3940 } 3941 function k(e) { 3942 var t, n, a, i, r, o, s, l, d, c; 3943 return ( 3944 void 0 === e && (e = {}), 3945 h || 3946 ((n = (void 0 === (t = e) ? {} : t).userAgent), 3947 (a = M()), 3948 (i = (c = w()).navigator.platform), 3949 (r = n || c.navigator.userAgent), 3950 (o = { ios: !1, android: !1 }), 3951 (s = c.screen.width), 3952 (l = c.screen.height), 3953 (d = r.match(/(Android);?[\s\/]+([\d.]+)?/)), 3954 (e = r.match(/(iPad).*OS\s([\d_]+)/)), 3955 (t = r.match(/(iPod)(.*OS\s([\d_]+))?/)), 3956 (n = !e && r.match(/(iPhone\sOS|iOS)\s([\d_]+)/)), 3957 (c = "Win32" === i), 3958 (i = "MacIntel" === i), 3959 !e && 3960 i && 3961 a.touch && 3962 0 <= ["1024x1366", "1366x1024", "834x1194", "1194x834", "834x1112", "1112x834", "768x1024", "1024x768", "820x1180", "1180x820", "810x1080", "1080x810"].indexOf(s + "x" + l) && 3963 ((e = (e = r.match(/(Version)\/([\d.]+)/)) || [0, 1, "13_0_0"]), (i = !1)), 3964 d && !c && ((o.os = "android"), (o.android = !0)), 3965 (e || n || t) && ((o.os = "ios"), (o.ios = !0)), 3966 (h = o)), 3967 h 3968 ); 3969 } 3970 function A() { 3971 var e, t; 3972 return ( 3973 m || 3974 ((t = w()), 3975 (m = { 3976 isEdge: !!t.navigator.userAgent.match(/Edge/g), 3977 isSafari: 0 <= (e = t.navigator.userAgent.toLowerCase()).indexOf("safari") && e.indexOf("chrome") < 0 && e.indexOf("android") < 0, 3978 isWebView: /(iPhone|iPod|iPad).*AppleWebKit(?!.*Safari)/i.test(t.navigator.userAgent), 3979 })), 3980 m 3981 ); 3982 } 3983 Object.keys(v).forEach(function (e) { 3984 Object.defineProperty(E.fn, e, { value: v[e], writable: !0 }); 3985 }); 3986 var O = { 3987 name: "resize", 3988 create: function () { 3989 var r = this; 3990 Y(r, { 3991 resize: { 3992 observer: null, 3993 createObserver: function () { 3994 r && 3995 !r.destroyed && 3996 r.initialized && 3997 ((r.resize.observer = new ResizeObserver(function (e) { 3998 var t = r.width, 3999 n = r.height, 4000 a = t, 4001 i = n; 4002 e.forEach(function (e) { 4003 var t = e.contentBoxSize, 4004 n = e.contentRect, 4005 e = e.target; 4006 (e && e !== r.el) || ((a = n ? n.width : (t[0] || t).inlineSize), (i = n ? n.height : (t[0] || t).blockSize)); 4007 }), 4008 (a === t && i === n) || r.resize.resizeHandler(); 4009 })), 4010 r.resize.observer.observe(r.el)); 4011 }, 4012 removeObserver: function () { 4013 r.resize.observer && r.resize.observer.unobserve && r.el && (r.resize.observer.unobserve(r.el), (r.resize.observer = null)); 4014 }, 4015 resizeHandler: function () { 4016 r && !r.destroyed && r.initialized && (r.emit("beforeResize"), r.emit("resize")); 4017 }, 4018 orientationChangeHandler: function () { 4019 r && !r.destroyed && r.initialized && r.emit("orientationchange"); 4020 }, 4021 }, 4022 }); 4023 }, 4024 on: { 4025 init: function (e) { 4026 var t = w(); 4027 e.params.resizeObserver && void 0 !== w().ResizeObserver 4028 ? e.resize.createObserver() 4029 : (t.addEventListener("resize", e.resize.resizeHandler), t.addEventListener("orientationchange", e.resize.orientationChangeHandler)); 4030 }, 4031 destroy: function (e) { 4032 var t = w(); 4033 e.resize.removeObserver(), t.removeEventListener("resize", e.resize.resizeHandler), t.removeEventListener("orientationchange", e.resize.orientationChangeHandler); 4034 }, 4035 }, 4036 }, 4037 P = { 4038 attach: function (e, t) { 4039 void 0 === t && (t = {}); 4040 var n = w(), 4041 a = this, 4042 i = new (n.MutationObserver || n.WebkitMutationObserver)(function (e) { 4043 var t; 4044 1 !== e.length 4045 ? ((t = function () { 4046 a.emit("observerUpdate", e[0]); 4047 }), 4048 n.requestAnimationFrame ? n.requestAnimationFrame(t) : n.setTimeout(t, 0)) 4049 : a.emit("observerUpdate", e[0]); 4050 }); 4051 i.observe(e, { attributes: void 0 === t.attributes || t.attributes, childList: void 0 === t.childList || t.childList, characterData: void 0 === t.characterData || t.characterData }), a.observer.observers.push(i); 4052 }, 4053 init: function () { 4054 var e = this; 4055 if (e.support.observer && e.params.observer) { 4056 if (e.params.observeParents) for (var t = e.$el.parents(), n = 0; n < t.length; n += 1) e.observer.attach(t[n]); 4057 e.observer.attach(e.$el[0], { childList: e.params.observeSlideChildren }), e.observer.attach(e.$wrapperEl[0], { attributes: !1 }); 4058 } 4059 }, 4060 destroy: function () {
4061 this.observer.observers.forEach(function (e) { 4062 e.disconnect(); 4063 }), 4064 (this.observer.observers = []); 4065 }, 4066 }, 4067 L = { 4068 name: "observer", 4069 params: { observer: !1, observeParents: !1, observeSlideChildren: !1 }, 4070 create: function () { 4071 x(this, { observer: e({}, P, { observers: [] }) }); 4072 }, 4073 on: { 4074 init: function (e) { 4075 e.observer.init(); 4076 }, 4077 destroy: function (e) { 4078 e.observer.destroy(); 4079 }, 4080 }, 4081 }; 4082 function I(n, e) { 4083 return (function e(t) { 4084 return t && t !== b() && t !== w() ? (t = t.assignedSlot || t).closest(n) || e(t.getRootNode().host) : null; 4085 })((e = void 0 === e ? this : e)); 4086 } 4087 function z() { 4088 var e, 4089 t, 4090 n = this, 4091 a = n.params, 4092 i = n.el; 4093 (i && 0 === i.offsetWidth) || 4094 (a.breakpoints && n.setBreakpoint(), 4095 (e = n.allowSlideNext), 4096 (t = n.allowSlidePrev), 4097 (i = n.snapGrid), 4098 (n.allowSlideNext = !0), 4099 (n.allowSlidePrev = !0), 4100 n.updateSize(), 4101 n.updateSlides(), 4102 n.updateSlidesClasses(), 4103 ("auto" === a.slidesPerView || 1 < a.slidesPerView) && n.isEnd && !n.isBeginning && !n.params.centeredSlides ? n.slideTo(n.slides.length - 1, 0, !1, !0) : n.slideTo(n.activeIndex, 0, !1, !0), 4104 n.autoplay && n.autoplay.running && n.autoplay.paused && n.autoplay.run(), 4105 (n.allowSlidePrev = t), 4106 (n.allowSlideNext = e), 4107 n.params.watchOverflow && i !== n.snapGrid && n.checkOverflow()); 4108 } 4109 var D = !1; 4110 function $() {} 4111 var H = { 4112 init: !0, 4113 direction: "horizontal", 4114 touchEventsTarget: "container", 4115 initialSlide: 0, 4116 speed: 300, 4117 cssMode: !1, 4118 updateOnWindowResize: !0, 4119 resizeObserver: !1, 4120 nested: !1, 4121 createElements: !1, 4122 enabled: !0, 4123 focusableElements: "input, select, option, textarea, button, video, label", 4124 width: null, 4125 height: null, 4126 preventInteractionOnTransition: !1, 4127 userAgent: null, 4128 url: null, 4129 edgeSwipeDetection: !1, 4130 edgeSwipeThreshold: 20, 4131 freeMode: !1, 4132 freeModeMomentum: !0, 4133 freeModeMomentumRatio: 1, 4134 freeModeMomentumBounce: !0, 4135 freeModeMomentumBounceRatio: 1, 4136 freeModeMomentumVelocityRatio: 1, 4137 freeModeSticky: !1, 4138 freeModeMinimumVelocity: 0.02, 4139 autoHeight: !1, 4140 setWrapperSize: !1, 4141 virtualTranslate: !1, 4142 effect: "slide", 4143 breakpoints: void 0, 4144 breakpointsBase: "window", 4145 spaceBetween: 0, 4146 slidesPerView: 1, 4147 slidesPerColumn: 1, 4148 slidesPerColumnFill: "column", 4149 slidesPerGroup: 1, 4150 slidesPerGroupSkip: 0, 4151 centeredSlides: !1, 4152 centeredSlidesBounds: !1, 4153 slidesOffsetBefore: 0, 4154 slidesOffsetAfter: 0, 4155 normalizeSlideIndex: !0, 4156 centerInsufficientSlides: !1, 4157 watchOverflow: !1, 4158 roundLengths: !1, 4159 touchRatio: 1, 4160 touchAngle: 45, 4161 simulateTouch: !0, 4162 shortSwipes: !0, 4163 longSwipes: !0, 4164 longSwipesRatio: 0.5, 4165 longSwipesMs: 300, 4166 followFinger: !0, 4167 allowTouchMove: !0, 4168 threshold: 0, 4169 touchMoveStopPropagation: !1, 4170 touchStartPreventDefault: !0, 4171 touchStartForcePreventDefault: !1, 4172 touchReleaseOnEdges: !1, 4173 uniqueNavElements: !0, 4174 resistance: !0, 4175 resistanceRatio: 0.85, 4176 watchSlidesProgress: !1, 4177 watchSlidesVisibility: !1, 4178 grabCursor: !1, 4179 preventClicks: !0, 4180 preventClicksPropagation: !0, 4181 slideToClickedSlide: !1, 4182 preloadImages: !0, 4183 updateOnImagesReady: !0, 4184 loop: !1, 4185 loopAdditionalSlides: 0, 4186 loopedSlides: null, 4187 loopFillGroupWithBlank: !1, 4188 loopPreventsSlide: !0, 4189 allowSlidePrev: !0, 4190 allowSlideNext: !0, 4191 swipeHandler: null, 4192 noSwiping: !0, 4193 noSwipingClass: "swiper-no-swiping", 4194 noSwipingSelector: null, 4195 passiveListeners: !0, 4196 containerModifierClass: "swiper-container-", 4197 slideClass: "swiper-slide", 4198 slideBlankClass: "swiper-slide-invisible-blank", 4199 slideActiveClass: "swiper-slide-active", 4200 slideDuplicateActiveClass: "swiper-slide-duplicate-active", 4201 slideVisibleClass: "swiper-slide-visible", 4202 slideDuplicateClass: "swiper-slide-duplicate", 4203 slideNextClass: "swiper-slide-next", 4204 slideDuplicateNextClass: "swiper-slide-duplicate-next", 4205 slidePrevClass: "swiper-slide-prev", 4206 slideDuplicatePrevClass: "swiper-slide-duplicate-prev", 4207 wrapperClass: "swiper-wrapper", 4208 runCallbacksOnInit: !0, 4209 _emitClasses: !1, 4210 }, 4211 B = { 4212 modular: { 4213 useParams: function (t) { 4214 var n = this; 4215 n.modules &&
4216 Object.keys(n.modules).forEach(function (e) { 4217 e = n.modules[e]; 4218 e.params && Y(t, e.params); 4219 }); 4220 }, 4221 useModules: function (n) { 4222 void 0 === n && (n = {}); 4223 var a = this; 4224 a.modules && 4225 Object.keys(a.modules).forEach(function (e) { 4226 var t = a.modules[e], 4227 e = n[e] || {}; 4228 t.on && 4229 a.on && 4230 Object.keys(t.on).forEach(function (e) { 4231 a.on(e, t.on[e]); 4232 }), 4233 t.create && t.create.bind(a)(e); 4234 }); 4235 }, 4236 }, 4237 eventsEmitter: { 4238 on: function (e, t, n) { 4239 var a = this; 4240 if ("function" != typeof t) return a; 4241 var i = n ? "unshift" : "push"; 4242 return ( 4243 e.split(" ").forEach(function (e) { 4244 a.eventsListeners[e] || (a.eventsListeners[e] = []), a.eventsListeners[e][i](t); 4245 }), 4246 a 4247 ); 4248 }, 4249 once: function (a, i, e) { 4250 var r = this; 4251 return "function" != typeof i ? r : ((o.__emitterProxy = i), r.on(a, o, e)); 4252 function o() { 4253 r.off(a, o), o.__emitterProxy && delete o.__emitterProxy; 4254 for (var e = arguments.length, t = new Array(e), n = 0; n < e; n++) t[n] = arguments[n]; 4255 i.apply(r, t); 4256 } 4257 }, 4258 onAny: function (e, t) { 4259 if ("function" != typeof e) return this; 4260 t = t ? "unshift" : "push"; 4261 return this.eventsAnyListeners.indexOf(e) < 0 && this.eventsAnyListeners[t](e), this; 4262 }, 4263 offAny: function (e) { 4264 var t = this; 4265 if (!t.eventsAnyListeners) return t; 4266 e = t.eventsAnyListeners.indexOf(e); 4267 return 0 <= e && t.eventsAnyListeners.splice(e, 1), t; 4268 }, 4269 off: function (e, a) { 4270 var i = this; 4271 return ( 4272 i.eventsListeners && 4273 e.split(" ").forEach(function (n) { 4274 void 0 === a 4275 ? (i.eventsListeners[n] = []) 4276 : i.eventsListeners[n] && 4277 i.eventsListeners[n].forEach(function (e, t) { 4278 (e === a || (e.__emitterProxy && e.__emitterProxy === a)) && i.eventsListeners[n].splice(t, 1); 4279 }); 4280 }), 4281 i 4282 ); 4283 }, 4284 emit: function () { 4285 var e, 4286 n, 4287 a, 4288 i = this; 4289 if (!i.eventsListeners) return i; 4290 for (var t = arguments.length, r = new Array(t), o = 0; o < t; o++) r[o] = arguments[o]; 4291 return ( 4292 (a = "string" == typeof r[0] || Array.isArray(r[0]) ? ((e = r[0]), (n = r.slice(1, r.length)), i) : ((e = r[0].events), (n = r[0].data), r[0].context || i)), 4293 n.unshift(a), 4294 (Array.isArray(e) ? e : e.split(" ")).forEach(function (t) { 4295 i.eventsAnyListeners && 4296 i.eventsAnyListeners.length && 4297 i.eventsAnyListeners.forEach(function (e) { 4298 e.apply(a, [t].concat(n)); 4299 }), 4300 i.eventsListeners && 4301 i.eventsListeners[t] && 4302 i.eventsListeners[t].forEach(function (e) { 4303 e.apply(a, n); 4304 }); 4305 }), 4306 i 4307 ); 4308 }, 4309 }, 4310 update: { 4311 updateSize: function () { 4312 var e = this, 4313 t = e.$el, 4314 n = void 0 !== e.params.width && null !== e.params.width ? e.params.width : t[0].clientWidth, 4315 a = void 0 !== e.params.height && null !== e.params.height ? e.params.height : t[0].clientHeight; 4316 (0 === n && e.isHorizontal()) || 4317 (0 === a && e.isVertical()) || 4318 ((n = n - parseInt(t.css("padding-left") || 0, 10) - parseInt(t.css("padding-right") || 0, 10)), 4319 (a = a - parseInt(t.css("padding-top") || 0, 10) - parseInt(t.css("padding-bottom") || 0, 10)), 4320 Y(e, { width: (n = Number.isNaN(n) ? 0 : n), height: (a = Number.isNaN(a) ? 0 : a), size: e.isHorizontal() ? n : a })); 4321 }, 4322 updateSlides: function () { 4323 var t = this; 4324 function n(e) { 4325 return t.isHorizontal() 4326 ? e 4327 : { 4328 width: "height", 4329 "margin-top": "margin-left", 4330 "margin-bottom ": "margin-right", 4331 "margin-left": "margin-top", 4332 "margin-right": "margin-bottom", 4333 "padding-left": "padding-top", 4334 "padding-right": "padding-bottom", 4335 marginRight: "marginBottom", 4336 }[e]; 4337 } 4338 function e(e, t) { 4339 return parseFloat(e.getPropertyValue(n(t)) || 0); 4340 } 4341 var a = t.params, 4342 i = t.$wrapperEl, 4343 r = t.size, 4344 o = t.rtlTranslate, 4345 s = t.wrongRTL, 4346 l = ((y = t.virtual && a.virtual.enabled) ? t.virtual : t).slides.length, 4347 d = i.children("." + t.params.slideClass), 4348 c = (y ? t.virtual.slides : d).length, 4349 u = [], 4350 p = [], 4351 f = [], 4352 h = a.slidesOffsetBefore; 4353 "function" == typeof h && (h = a.slidesOffsetBefore.call(t)); 4354 var m = a.slidesOffsetAfter; 4355 "function" == typeof m && (m = a.slidesOffsetAfter.call(t)); 4356 var v, 4357 g = t.snapGrid.length, 4358 y = t.slidesGrid.length, 4359 b = a.spaceBetween, 4360 w = -h, 4361 x = 0, 4362 _ = 0; 4363 if (void 0 !== r) { 4364 "string" == typeof b && 0 <= b.indexOf("%") && (b = (parseFloat(b.replace("%", "")) / 100) * r), 4365 (t.virtualSize = -b), 4366 o ? d.css({ marginLeft: "", marginBottom: "", marginTop: "" }) : d.css({ marginRight: "", marginBottom: "", marginTop: "" }), 4367 1 < a.slidesPerColumn && 4368 ((v = Math.floor(c / a.slidesPerColumn) === c / t.params.slidesPerColumn ? c : Math.ceil(c / a.slidesPerColumn) * a.slidesPerColumn), 4369 "auto" !== a.slidesPerView && "row" === a.slidesPerColumnFill && (v = Math.max(v, a.slidesPerView * a.slidesPerColumn))); 4370 for (var T, E, S, C, M, k = a.slidesPerColumn, A = v / k, O = Math.floor(c / a.slidesPerColumn), P = 0; P < c; P += 1) { 4371 G = 0; 4372 var L, 4373 I, 4374 z, 4375 D, 4376 $, 4377 H, 4378 B, 4379 j, 4380 R, 4381 G, 4382 N = d.eq(P); 4383 1 < a.slidesPerColumn && 4384 ((R = B = H = void 0), 4385 "row" === a.slidesPerColumnFill && 1 < a.slidesPerGroup 4386 ? (($ = Math.floor(P / (a.slidesPerGroup * a.slidesPerColumn))), 4387 (z = P - a.slidesPerColumn * a.slidesPerGroup * $), 4388 (D = 0 === $ ? a.slidesPerGroup : Math.min(Math.ceil((c - $ * k * a.slidesPerGroup) / k), a.slidesPerGroup)), 4389 (B = z - (R = Math.floor(z / D)) * D + $ * a.slidesPerGroup), 4390 N.css({ "-webkit-box-ordinal-group": (H = B + (R * v) / k), "-moz-box-ordinal-group": H, "-ms-flex-order": H, "-webkit-order": H, order: H })) 4391 : "column" === a.slidesPerColumnFill 4392 ? ((R = P - (B = Math.floor(P / k)) * k), (O < B || (B === O && R === k - 1)) && k <= (R += 1) && ((R = 0), (B += 1))) 4393 : (B = P - (R = Math.floor(P / A)) * A), 4394 N.css(n("margin-top"), 0 !== R ? a.spaceBetween && a.spaceBetween + "px" : "")), 4395 "none" !== N.css("display") && 4396 ("auto" === a.slidesPerView 4397 ? ((j = getComputedStyle(N[0])), 4398 (L = N[0].style.transform), 4399 (I = N[0].style.webkitTransform), 4400 L && (N[0].style.transform = "none"), 4401 I && (N[0].style.webkitTransform = "none"), 4402 (G = a.roundLengths 4403 ? t.isHorizontal() 4404 ? N.outerWidth(!0) 4405 : N.outerHeight(!0) 4406 : ((z = e(j, "width")), 4407 (D = e(j, "padding-left")), 4408 ($ = e(j, "padding-right")), 4409 (H = e(j, "margin-left")), 4410 (B = e(j, "margin-right")), 4411 (R = j.getPropertyValue("box-sizing")) && "border-box" === R ? z + H + B : ((R = (j = N[0]).clientWidth), z + D + $ + H + B + (j.offsetWidth - R)))), 4412 L && (N[0].style.transform = L), 4413 I && (N[0].style.webkitTransform = I), 4414 a.roundLengths && (G = Math.floor(G))) 4415 : ((G = (r - (a.slidesPerView - 1) * b) / a.slidesPerView), a.roundLengths && (G = Math.floor(G)), d[P] && (d[P].style[n("width")] = G + "px")), 4416 d[P] && (d[P].swiperSlideSize = G), 4417 f.push(G), 4418 a.centeredSlides 4419 ? ((w = w + G / 2 + x / 2 + b), 4420 0 === x && 0 !== P && (w = w - r / 2 - b), 4421 0 === P && (w = w - r / 2 - b), 4422 Math.abs(w) < 0.001 && (w = 0), 4423 a.roundLengths && (w = Math.floor(w)), 4424 _ % a.slidesPerGroup == 0 && u.push(w), 4425 p.push(w)) 4426 : (a.roundLengths && (w = Math.floor(w)), (_ - Math.min(t.params.slidesPerGroupSkip, _)) % t.params.slidesPerGroup == 0 && u.push(w), p.push(w), (w = w + G + b)), 4427 (t.virtualSize += G + b), 4428 (x = G), 4429 (_ += 1)); 4430 } 4431 if ( 4432 ((t.virtualSize = Math.max(t.virtualSize, r) + m), 4433 o && s && ("slide" === a.effect || "coverflow" === a.effect) && i.css({ width: t.virtualSize + a.spaceBetween + "px" }), 4434 a.setWrapperSize && i.css((((s = {})[n("width")] = t.virtualSize + a.spaceBetween + "px"), s)), 4435 1 < a.slidesPerColumn) 4436 ) 4437 if ( 4438 ((t.virtualSize = (G + a.spaceBetween) * v),
4439 (t.virtualSize = Math.ceil(t.virtualSize / a.slidesPerColumn) - a.spaceBetween), 4440 i.css((((T = {})[n("width")] = t.virtualSize + a.spaceBetween + "px"), T)), 4441 a.centeredSlides) 4442 ) { 4443 for (var W = [], V = 0; V < u.length; V += 1) { 4444 var F = u[V]; 4445 a.roundLengths && (F = Math.floor(F)), u[V] < t.virtualSize + u[0] && W.push(F); 4446 } 4447 u = W; 4448 } 4449 if (!a.centeredSlides) { 4450 W = []; 4451 for (var q = 0; q < u.length; q += 1) { 4452 var X = u[q]; 4453 a.roundLengths && (X = Math.floor(X)), u[q] <= t.virtualSize - r && W.push(X); 4454 } 4455 (u = W), 1 < Math.floor(t.virtualSize - r) - Math.floor(u[u.length - 1]) && u.push(t.virtualSize - r); 4456 } 4457 0 === u.length && (u = [0]), 4458 0 !== a.spaceBetween && 4459 ((T = t.isHorizontal() && o ? "marginLeft" : n("marginRight")), 4460 d 4461 .filter(function (e, t) { 4462 return !a.cssMode || t !== d.length - 1; 4463 }) 4464 .css((((o = {})[T] = b + "px"), o))), 4465 a.centeredSlides && 4466 a.centeredSlidesBounds && 4467 ((E = 0), 4468 f.forEach(function (e) { 4469 E += e + (a.spaceBetween || 0); 4470 }), 4471 (S = (E -= a.spaceBetween) - r), 4472 (u = u.map(function (e) { 4473 return e < 0 ? -h : S < e ? S + m : e; 4474 }))), 4475 a.centerInsufficientSlides && 4476 ((C = 0), 4477 f.forEach(function (e) { 4478 C += e + (a.spaceBetween || 0); 4479 }), 4480 (C -= a.spaceBetween) < r && 4481 ((M = (r - C) / 2), 4482 u.forEach(function (e, t) { 4483 u[t] = e - M; 4484 }), 4485 p.forEach(function (e, t) { 4486 p[t] = e + M; 4487 }))), 4488 Y(t, { slides: d, snapGrid: u, slidesGrid: p, slidesSizesGrid: f }), 4489 c !== l && t.emit("slidesLengthChange"), 4490 u.length !== g && (t.params.watchOverflow && t.checkOverflow(), t.emit("snapGridLengthChange")), 4491 p.length !== y && t.emit("slidesGridLengthChange"), 4492 (a.watchSlidesProgress || a.watchSlidesVisibility) && t.updateSlidesOffset(); 4493 } 4494 }, 4495 updateAutoHeight: function (e) { 4496 var t, 4497 n, 4498 a = this, 4499 i = [], 4500 r = a.virtual && a.params.virtual.enabled, 4501 o = 0; 4502 function s(t) { 4503 return (r 4504 ? a.slides.filter(function (e) { 4505 return parseInt(e.getAttribute("data-swiper-slide-index"), 10) === t; 4506 }) 4507 : a.slides.eq(t))[0]; 4508 } 4509 if (("number" == typeof e ? a.setTransition(e) : !0 === e && a.setTransition(a.params.speed), "auto" !== a.params.slidesPerView && 1 < a.params.slidesPerView)) 4510 if (a.params.centeredSlides) 4511 a.visibleSlides.each(function (e) { 4512 i.push(e); 4513 }); 4514 else 4515 for (t = 0; t < Math.ceil(a.params.slidesPerView); t += 1) { 4516 var l = a.activeIndex + t; 4517 if (l > a.slides.length && !r) break; 4518 i.push(s(l)); 4519 } 4520 else i.push(s(a.activeIndex)); 4521 for (t = 0; t < i.length; t += 1) void 0 !== i[t] && (o = o < (n = i[t].offsetHeight) ? n : o); 4522 o && a.$wrapperEl.css("height", o + "px"); 4523 }, 4524 updateSlidesOffset: function () { 4525 for (var e = this.slides, t = 0; t < e.length; t += 1) e[t].swiperSlideOffset = this.isHorizontal() ? e[t].offsetLeft : e[t].offsetTop; 4526 }, 4527 updateSlidesProgress: function (e) { 4528 void 0 === e && (e = (this && this.translate) || 0); 4529 var t = this, 4530 n = t.params, 4531 a = t.slides, 4532 i = t.rtlTranslate; 4533 if (0 !== a.length) { 4534 void 0 === a[0].swiperSlideOffset && t.updateSlidesOffset(); 4535 var r = i ? e : -e; 4536 a.removeClass(n.slideVisibleClass), (t.visibleSlidesIndexes = []), (t.visibleSlides = []); 4537 for (var o = 0; o < a.length; o += 1) { 4538 var s, 4539 l, 4540 d = a[o], 4541 c = (r + (n.centeredSlides ? t.minTranslate() : 0) - d.swiperSlideOffset) / (d.swiperSlideSize + n.spaceBetween); 4542 (n.watchSlidesVisibility || (n.centeredSlides && n.autoHeight)) && 4543 ((l = (s = -(r - d.swiperSlideOffset)) + t.slidesSizesGrid[o]), 4544 ((0 <= s && s < t.size - 1) || (1 < l && l <= t.size) || (s <= 0 && l >= t.size)) && (t.visibleSlides.push(d), t.visibleSlidesIndexes.push(o), a.eq(o).addClass(n.slideVisibleClass))), 4545 (d.progress = i ? -c : c); 4546 } 4547 t.visibleSlides = E(t.visibleSlides); 4548 } 4549 }, 4550 updateProgress: function (e) { 4551 var t = this; 4552 void 0 === e && ((s = t.rtlTranslate ? -1 : 1), (e = (t && t.translate && t.translate * s) || 0)); 4553 var n = t.params, 4554 a = t.maxTranslate() - t.minTranslate(), 4555 i = t.progress, 4556 r = t.isBeginning, 4557 o = r, 4558 s = (l = t.isEnd), 4559 l = 0 == a ? (r = !(i = 0)) : ((r = (i = (e - t.minTranslate()) / a) <= 0), 1 <= i); 4560 Y(t, { progress: i, isBeginning: r, isEnd: l }), 4561 (n.watchSlidesProgress || n.watchSlidesVisibility || (n.centeredSlides && n.autoHeight)) && t.updateSlidesProgress(e), 4562 r && !o && t.emit("reachBeginning toEdge"), 4563 l && !s && t.emit("reachEnd toEdge"), 4564 ((o && !r) || (s && !l)) && t.emit("fromEdge"), 4565 t.emit("progress", i); 4566 }, 4567 updateSlidesClasses: function () { 4568 var e = this, 4569 t = e.slides, 4570 n = e.params, 4571 a = e.$wrapperEl, 4572 i = e.activeIndex, 4573 r = e.realIndex, 4574 o = e.virtual && n.virtual.enabled; 4575 t.removeClass(n.slideActiveClass + " " + n.slideNextClass + " " + n.slidePrevClass + " " + n.slideDuplicateActiveClass + " " + n.slideDuplicateNextClass + " " + n.slideDuplicatePrevClass), 4576 (i = o ? e.$wrapperEl.find("." + n.slideClass + '[data-swiper-slide-index="' + i + '"]') : t.eq(i)).addClass(n.slideActiveClass), 4577 n.loop && 4578 (i.hasClass(n.slideDuplicateClass) 4579 ? a.children("." + n.slideClass + ":not(." + n.slideDuplicateClass + ')[data-swiper-slide-index="' + r + '"]') 4580 : a.children("." + n.slideClass + "." + n.slideDuplicateClass + '[data-swiper-slide-index="' + r + '"]') 4581 ).addClass(n.slideDuplicateActiveClass), 4582 (r = i 4583 .nextAll("." + n.slideClass) 4584 .eq(0) 4585 .addClass(n.slideNextClass)), 4586 n.loop && 0 === r.length && (r = t.eq(0)).addClass(n.slideNextClass), 4587 (i = i 4588 .prevAll("." + n.slideClass) 4589 .eq(0) 4590 .addClass(n.slidePrevClass)), 4591 n.loop && 0 === i.length && (i = t.eq(-1)).addClass(n.slidePrevClass), 4592 n.loop && 4593 ((r.hasClass(n.slideDuplicateClass) 4594 ? a.children("." + n.slideClass + ":not(." + n.slideDuplicateClass + ')[data-swiper-slide-index="' + r.attr("data-swiper-slide-index") + '"]') 4595 : a.children("." + n.slideClass + "." + n.slideDuplicateClass + '[data-swiper-slide-index="' + r.attr("data-swiper-slide-index") + '"]') 4596 ).addClass(n.slideDuplicateNextClass), 4597 (i.hasClass(n.slideDuplicateClass) 4598 ? a.children("." + n.slideClass + ":not(." + n.slideDuplicateClass + ')[data-swiper-slide-index="' + i.attr("data-swiper-slide-index") + '"]') 4599 : a.children("." + n.slideClass + "." + n.slideDuplicateClass + '[data-swiper-slide-index="' + i.attr("data-swiper-slide-index") + '"]') 4600 ).addClass(n.slideDuplicatePrevClass)), 4601 e.emitSlidesClasses(); 4602 }, 4603 updateActiveIndex: function (e) { 4604 var t = this, 4605 n = t.rtlTranslate ? t.translate : -t.translate, 4606 a = t.slidesGrid, 4607 i = t.snapGrid, 4608 r = t.params, 4609 o = t.activeIndex, 4610 s = t.realIndex, 4611 l = t.snapIndex, 4612 d = e; 4613 if (void 0 === d) { 4614 for (var c = 0; c < a.length; c += 1) void 0 !== a[c + 1] ? (n >= a[c] && n < a[c + 1] - (a[c + 1] - a[c]) / 2 ? (d = c) : n >= a[c] && n < a[c + 1] && (d = c + 1)) : n >= a[c] && (d = c); 4615 r.normalizeSlideIndex && (d < 0 || void 0 === d) && (d = 0); 4616 } 4617 (r = 0 <= i.indexOf(n) ? i.indexOf(n) : (e = Math.min(r.slidesPerGroupSkip, d)) + Math.floor((d - e) / r.slidesPerGroup)) >= i.length && (r = i.length - 1), 4618 d !== o 4619 ? ((i = parseInt(t.slides.eq(d).attr("data-swiper-slide-index") || d, 10)), 4620 Y(t, { snapIndex: r, realIndex: i, previousIndex: o, activeIndex: d }), 4621 t.emit("activeIndexChange"), 4622 t.emit("snapIndexChange"), 4623 s !== i && t.emit("realIndexChange"), 4624 (t.initialized || t.params.runCallbacksOnInit) && t.emit("slideChange")) 4625 : r !== l && ((t.snapIndex = r), t.emit("snapIndexChange")); 4626 }, 4627 updateClickedSlide: function (e) { 4628 var t, 4629 n = this, 4630 a = n.params, 4631 i = E(e.target).closest("." + a.slideClass)[0], 4632 r = !1; 4633 if (i) 4634 for (var o = 0; o < n.slides.length; o += 1) 4635 if (n.slides[o] === i) { 4636 (r = !0), (t = o); 4637 break; 4638 } 4639 if (!i || !r) return (n.clickedSlide = void 0), void (n.clickedIndex = void 0); 4640 (n.clickedSlide = i), 4641 n.virtual && n.params.virtual.enabled ? (n.clickedIndex = parseInt(E(i).attr("data-swiper-slide-index"), 10)) : (n.clickedIndex = t), 4642 a.slideToClickedSlide && void 0 !== n.clickedIndex && n.clickedIndex !== n.activeIndex && n.slideToClickedSlide(); 4643 }, 4644 }, 4645 translate: { 4646 getTranslate: function (e) { 4647 void 0 === e && (e = this.isHorizontal() ? "x" : "y"); 4648 var t = this.params, 4649 n = this.rtlTranslate, 4650 a = this.translate, 4651 i = this.$wrapperEl; 4652 return t.virtualTranslate ? (n ? -a : a) : t.cssMode ? a : ((e = g(i[0], e)), (e = n ? -e : e) || 0); 4653 }, 4654 setTranslate: function (e, t) { 4655 var n = this, 4656 a = n.rtlTranslate, 4657 i = n.params, 4658 r = n.$wrapperEl, 4659 o = n.wrapperEl, 4660 s = n.progress, 4661 l = 0, 4662 d = 0; 4663 n.isHorizontal() ? (l = a ? -e : e) : (d = e), 4664 i.roundLengths && ((l = Math.floor(l)), (d = Math.floor(d))), 4665 i.cssMode ? (o[n.isHorizontal() ? "scrollLeft" : "scrollTop"] = n.isHorizontal() ? -l : -d) : i.virtualTranslate || r.transform("translate3d(" + l + "px, " + d + "px, 0px)"), 4666 (n.previousTranslate = n.translate), 4667 (n.translate = n.isHorizontal() ? l : d), 4668 (0 == (d = n.maxTranslate() - n.minTranslate()) ? 0 : (e - n.minTranslate()) / d) !== s && n.updateProgress(e), 4669 n.emit("setTranslate", n.translate, t); 4670 }, 4671 minTranslate: function () { 4672 return -this.snapGrid[0]; 4673 }, 4674 maxTranslate: function () { 4675 return -this.snapGrid[this.snapGrid.length - 1]; 4676 }, 4677 translateTo: function (e, t, n, a, i) { 4678 void 0 === e && (e = 0), void 0 === t && (t = this.params.speed), void 0 === n && (n = !0), void 0 === a && (a = !0); 4679 var r = this, 4680 o = r.params, 4681 s = r.wrapperEl; 4682 if (r.animating && o.preventInteractionOnTransition) return !1; 4683 var l = r.minTranslate(), 4684 d = r.maxTranslate(), 4685 d = a && l < e ? l : a && e < d ? d : e; 4686 if ((r.updateProgress(d), o.cssMode)) { 4687 e = r.isHorizontal(); 4688 return 0 !== t && s.scrollTo ? s.scrollTo((((o = {})[e ? "left" : "top"] = -d), (o.behavior = "smooth"), o)) : (s[e ? "scrollLeft" : "scrollTop"] = -d), !0; 4689 } 4690 return ( 4691 0 === t 4692 ? (r.setTransition(0), r.setTranslate(d), n && (r.emit("beforeTransitionStart", t, i), r.emit("transitionEnd"))) 4693 : (r.setTransition(t), 4694 r.setTranslate(d), 4695 n && (r.emit("beforeTransitionStart", t, i), r.emit("transitionStart")), 4696 r.animating || 4697 ((r.animating = !0), 4698 r.onTranslateToWrapperTransitionEnd || 4699 (r.onTranslateToWrapperTransitionEnd = function (e) { 4700 r && 4701 !r.destroyed && 4702 e.target === this && 4703 (r.$wrapperEl[0].removeEventListener("transitionend", r.onTranslateToWrapperTransitionEnd), 4704 r.$wrapperEl[0].removeEventListener("webkitTransitionEnd", r.onTranslateToWrapperTransitionEnd), 4705 (r.onTranslateToWrapperTransitionEnd = null),
4706 delete r.onTranslateToWrapperTransitionEnd, 4707 n && r.emit("transitionEnd")); 4708 }), 4709 r.$wrapperEl[0].addEventListener("transitionend", r.onTranslateToWrapperTransitionEnd), 4710 r.$wrapperEl[0].addEventListener("webkitTransitionEnd", r.onTranslateToWrapperTransitionEnd))), 4711 !0 4712 ); 4713 }, 4714 }, 4715 transition: { 4716 setTransition: function (e, t) { 4717 this.params.cssMode || this.$wrapperEl.transition(e), this.emit("setTransition", e, t); 4718 }, 4719 transitionStart: function (e, t) { 4720 void 0 === e && (e = !0); 4721 var n = this, 4722 a = n.activeIndex, 4723 i = n.params, 4724 r = n.previousIndex; 4725 i.cssMode || 4726 (i.autoHeight && n.updateAutoHeight(), 4727 (t = (t = t) || (r < a ? "next" : a < r ? "prev" : "reset")), 4728 n.emit("transitionStart"), 4729 e && a !== r && ("reset" !== t ? (n.emit("slideChangeTransitionStart"), "next" === t ? n.emit("slideNextTransitionStart") : n.emit("slidePrevTransitionStart")) : n.emit("slideResetTransitionStart"))); 4730 }, 4731 transitionEnd: function (e, t) { 4732 void 0 === e && (e = !0); 4733 var n = this, 4734 a = n.activeIndex, 4735 i = n.previousIndex, 4736 r = n.params; 4737 (n.animating = !1), 4738 r.cssMode || 4739 (n.setTransition(0), 4740 (t = (t = t) || (i < a ? "next" : a < i ? "prev" : "reset")), 4741 n.emit("transitionEnd"), 4742 e && a !== i && ("reset" !== t ? (n.emit("slideChangeTransitionEnd"), "next" === t ? n.emit("slideNextTransitionEnd") : n.emit("slidePrevTransitionEnd")) : n.emit("slideResetTransitionEnd"))); 4743 }, 4744 }, 4745 slide: { 4746 slideTo: function (e, t, n, a, i) { 4747 if ((void 0 === t && (t = this.params.speed), void 0 === n && (n = !0), "number" != typeof (e = void 0 === e ? 0 : e) && "string" != typeof e)) 4748 throw new Error("The 'index' argument cannot have type other than 'number' or 'string'. [" + typeof e + "] given."); 4749 if ("string" == typeof e) { 4750 var r = parseInt(e, 10); 4751 if (!isFinite(r)) throw new Error("The passed-in 'index' (string) couldn't be converted to 'number'. [" + e + "] given."); 4752 e = r; 4753 } 4754 var o = this, 4755 s = e; 4756 s < 0 && (s = 0); 4757 var l = o.params, 4758 d = o.snapGrid, 4759 c = o.slidesGrid, 4760 u = o.previousIndex, 4761 p = o.activeIndex, 4762 f = o.rtlTranslate, 4763 r = o.wrapperEl, 4764 e = o.enabled; 4765 if ((o.animating && l.preventInteractionOnTransition) || (!e && !a && !i)) return !1; 4766 (i = Math.min(o.params.slidesPerGroupSkip, s)), 4767 (i += Math.floor((s - i) / o.params.slidesPerGroup)) >= d.length && (i = d.length - 1), 4768 (p || l.initialSlide || 0) === (u || 0) && n && o.emit("beforeSlideChangeStart"); 4769 var h, 4770 m = -d[i]; 4771 if ((o.updateProgress(m), l.normalizeSlideIndex)) 4772 for (var v = 0; v < c.length; v += 1) { 4773 var g = -Math.floor(100 * m), 4774 y = Math.floor(100 * c[v]), 4775 b = Math.floor(100 * c[v + 1]); 4776 void 0 !== c[v + 1] ? (y <= g && g < b - (b - y) / 2 ? (s = v) : y <= g && g < b && (s = v + 1)) : y <= g && (s = v); 4777 } 4778 if (o.initialized && s !== p) { 4779 if (!o.allowSlideNext && m < o.translate && m < o.minTranslate()) return !1; 4780 if (!o.allowSlidePrev && m > o.translate && m > o.maxTranslate() && (p || 0) !== s) return !1; 4781 } 4782 if (((h = p < s ? "next" : s < p ? "prev" : "reset"), (f && -m === o.translate) || (!f && m === o.translate))) 4783 return o.updateActiveIndex(s), l.autoHeight && o.updateAutoHeight(), o.updateSlidesClasses(), "slide" !== l.effect && o.setTranslate(m), "reset" !== h && (o.transitionStart(n, h), o.transitionEnd(n, h)), !1; 4784 if (l.cssMode) { 4785 (p = o.isHorizontal()), (l = -m); 4786 return f && (l = r.scrollWidth - r.offsetWidth - l), 0 !== t && r.scrollTo ? r.scrollTo((((f = {})[p ? "left" : "top"] = l), (f.behavior = "smooth"), f)) : (r[p ? "scrollLeft" : "scrollTop"] = l), !0; 4787 } 4788 return ( 4789 0 === t 4790 ? (o.setTransition(0), o.setTranslate(m), o.updateActiveIndex(s), o.updateSlidesClasses(), o.emit("beforeTransitionStart", t, a), o.transitionStart(n, h), o.transitionEnd(n, h)) 4791 : (o.setTransition(t), 4792 o.setTranslate(m), 4793 o.updateActiveIndex(s), 4794 o.updateSlidesClasses(), 4795 o.emit("beforeTransitionStart", t, a), 4796 o.transitionStart(n, h), 4797 o.animating || 4798 ((o.animating = !0), 4799 o.onSlideToWrapperTransitionEnd || 4800 (o.onSlideToWrapperTransitionEnd = function (e) { 4801 o && 4802 !o.destroyed && 4803 e.target === this && 4804 (o.$wrapperEl[0].removeEventListener("transitionend", o.onSlideToWrapperTransitionEnd), 4805 o.$wrapperEl[0].removeEventListener("webkitTransitionEnd", o.onSlideToWrapperTransitionEnd), 4806 (o.onSlideToWrapperTransitionEnd = null),
4807 delete o.onSlideToWrapperTransitionEnd, 4808 o.transitionEnd(n, h)); 4809 }), 4810 o.$wrapperEl[0].addEventListener("transitionend", o.onSlideToWrapperTransitionEnd), 4811 o.$wrapperEl[0].addEventListener("webkitTransitionEnd", o.onSlideToWrapperTransitionEnd))), 4812 !0 4813 ); 4814 }, 4815 slideToLoop: function (e, t, n, a) { 4816 return void 0 === t && (t = this.params.speed), (e = void 0 === e ? 0 : e), this.params.loop && (e += this.loopedSlides), this.slideTo(e, t, (n = void 0 === n ? !0 : n), a); 4817 }, 4818 slideNext: function (e, t, n) { 4819 void 0 === e && (e = this.params.speed), void 0 === t && (t = !0); 4820 var a = this, 4821 i = a.params, 4822 r = a.animating; 4823 if (!a.enabled) return a; 4824 var o = a.activeIndex < i.slidesPerGroupSkip ? 1 : i.slidesPerGroup; 4825 if (i.loop) { 4826 if (r && i.loopPreventsSlide) return !1; 4827 a.loopFix(), (a._clientLeft = a.$wrapperEl[0].clientLeft); 4828 } 4829 return a.slideTo(a.activeIndex + o, e, t, n); 4830 }, 4831 slidePrev: function (e, t, n) { 4832 void 0 === e && (e = this.params.speed), void 0 === t && (t = !0); 4833 var a = this, 4834 i = a.params, 4835 r = a.animating, 4836 o = a.snapGrid, 4837 s = a.slidesGrid, 4838 l = a.rtlTranslate; 4839 if (!a.enabled) return a; 4840 if (i.loop) { 4841 if (r && i.loopPreventsSlide) return !1; 4842 a.loopFix(), (a._clientLeft = a.$wrapperEl[0].clientLeft); 4843 } 4844 function d(e) { 4845 return e < 0 ? -Math.floor(Math.abs(e)) : Math.floor(e); 4846 } 4847 var c, 4848 u = d(l ? a.translate : -a.translate), 4849 l = o.map(d), 4850 p = o[l.indexOf(u) - 1]; 4851 return ( 4852 void 0 === p && 4853 i.cssMode && 4854 o.forEach(function (e) { 4855 !p && e <= u && (p = e); 4856 }), 4857 void 0 !== p && (c = s.indexOf(p)) < 0 && (c = a.activeIndex - 1), 4858 a.slideTo(c, e, t, n) 4859 ); 4860 }, 4861 slideReset: function (e, t, n) { 4862 return void 0 === e && (e = this.params.speed), this.slideTo(this.activeIndex, e, (t = void 0 === t ? !0 : t), n); 4863 }, 4864 slideToClosest: function (e, t, n, a) { 4865 void 0 === e && (e = this.params.speed), void 0 === t && (t = !0), void 0 === a && (a = 0.5); 4866 var i = this, 4867 r = i.activeIndex, 4868 o = Math.min(i.params.slidesPerGroupSkip, r), 4869 s = o + Math.floor((r - o) / i.params.slidesPerGroup), 4870 l = i.rtlTranslate ? i.translate : -i.translate; 4871 return ( 4872 l >= i.snapGrid[s] ? ((o = i.snapGrid[s]), (i.snapGrid[s + 1] - o) * a < l - o && (r += i.params.slidesPerGroup)) : l - (l = i.snapGrid[s - 1]) <= (i.snapGrid[s] - l) * a && (r -= i.params.slidesPerGroup), 4873 (r = Math.max(r, 0)), 4874 (r = Math.min(r, i.slidesGrid.length - 1)), 4875 i.slideTo(r, e, t, n) 4876 ); 4877 }, 4878 slideToClickedSlide: function () { 4879 var e, 4880 t = this, 4881 n = t.params, 4882 a = t.$wrapperEl, 4883 i = "auto" === n.slidesPerView ? t.slidesPerViewDynamic() : n.slidesPerView, 4884 r = t.clickedIndex; 4885 n.loop 4886 ? t.animating || 4887 ((e = parseInt(E(t.clickedSlide).attr("data-swiper-slide-index"), 10)), 4888 n.centeredSlides 4889 ? r < t.loopedSlides - i / 2 || r > t.slides.length - t.loopedSlides + i / 2 4890 ? (t.loopFix(), 4891 (r = a 4892 .children("." + n.slideClass + '[data-swiper-slide-index="' + e + '"]:not(.' + n.slideDuplicateClass + ")") 4893 .eq(0) 4894 .index()), 4895 S(function () { 4896 t.slideTo(r); 4897 })) 4898 : t.slideTo(r) 4899 : r > t.slides.length - i 4900 ? (t.loopFix(), 4901 (r = a 4902 .children("." + n.slideClass + '[data-swiper-slide-index="' + e + '"]:not(.' + n.slideDuplicateClass + ")") 4903 .eq(0) 4904 .index()), 4905 S(function () { 4906 t.slideTo(r); 4907 })) 4908 : t.slideTo(r)) 4909 : t.slideTo(r); 4910 }, 4911 }, 4912 loop: { 4913 loopCreate: function () { 4914 var a = this, 4915 e = b(), 4916 t = a.params, 4917 n = a.$wrapperEl; 4918 n.children("." + t.slideClass + "." + t.slideDuplicateClass).remove(); 4919 var i = n.children("." + t.slideClass); 4920 if (t.loopFillGroupWithBlank) { 4921 var r = t.slidesPerGroup - (i.length % t.slidesPerGroup); 4922 if (r !== t.slidesPerGroup) { 4923 for (var o = 0; o < r; o += 1) { 4924 var s = E(e.createElement("div")).addClass(t.slideClass + " " + t.slideBlankClass); 4925 n.append(s); 4926 } 4927 i = n.children("." + t.slideClass); 4928 } 4929 } 4930 "auto" !== t.slidesPerView || t.loopedSlides || (t.loopedSlides = i.length), 4931 (a.loopedSlides = Math.ceil(parseFloat(t.loopedSlides || t.slidesPerView, 10))), 4932 (a.loopedSlides += t.loopAdditionalSlides), 4933 a.loopedSlides > i.length && (a.loopedSlides = i.length); 4934 var l = [], 4935 d = []; 4936 i.each(function (e, t) { 4937 var n = E(e);
4938 t < a.loopedSlides && d.push(e), t < i.length && t >= i.length - a.loopedSlides && l.push(e), n.attr("data-swiper-slide-index", t); 4939 }); 4940 for (var c = 0; c < d.length; c += 1) n.append(E(d[c].cloneNode(!0)).addClass(t.slideDuplicateClass)); 4941 for (var u = l.length - 1; 0 <= u; --u) n.prepend(E(l[u].cloneNode(!0)).addClass(t.slideDuplicateClass)); 4942 }, 4943 loopFix: function () { 4944 var e = this; 4945 e.emit("beforeLoopFix"); 4946 var t = e.activeIndex, 4947 n = e.slides, 4948 a = e.loopedSlides, 4949 i = e.allowSlidePrev, 4950 r = e.allowSlideNext, 4951 o = e.snapGrid, 4952 s = e.rtlTranslate; 4953 (e.allowSlidePrev = !0), (e.allowSlideNext = !0); 4954 var l, 4955 o = -o[t] - e.getTranslate(); 4956 t < a 4957 ? ((l = n.length - 3 * a + t), e.slideTo((l += a), 0, !1, !0) && 0 != o && e.setTranslate((s ? -e.translate : e.translate) - o)) 4958 : t >= n.length - a && ((l = -n.length + t + a), e.slideTo((l += a), 0, !1, !0) && 0 != o && e.setTranslate((s ? -e.translate : e.translate) - o)), 4959 (e.allowSlidePrev = i), 4960 (e.allowSlideNext = r), 4961 e.emit("loopFix"); 4962 }, 4963 loopDestroy: function () { 4964 var e = this.$wrapperEl, 4965 t = this.params, 4966 n = this.slides; 4967 e.children("." + t.slideClass + "." + t.slideDuplicateClass + ",." + t.slideClass + "." + t.slideBlankClass).remove(), n.removeAttr("data-swiper-slide-index"); 4968 }, 4969 }, 4970 grabCursor: { 4971 setGrabCursor: function (e) { 4972 var t = this; 4973 t.support.touch || 4974 !t.params.simulateTouch || 4975 (t.params.watchOverflow && t.isLocked) || 4976 t.params.cssMode || 4977 (((t = t.el).style.cursor = "move"), (t.style.cursor = e ? "-webkit-grabbing" : "-webkit-grab"), (t.style.cursor = e ? "-moz-grabbin" : "-moz-grab"), (t.style.cursor = e ? "grabbing" : "grab")); 4978 }, 4979 unsetGrabCursor: function () { 4980 var e = this; 4981 e.support.touch || (e.params.watchOverflow && e.isLocked) || e.params.cssMode || (e.el.style.cursor = ""); 4982 }, 4983 }, 4984 manipulation: { 4985 appendSlide: function (e) { 4986 var t = this, 4987 n = t.$wrapperEl, 4988 a = t.params; 4989 if ((a.loop && t.loopDestroy(), "object" == typeof e && "length" in e)) for (var i = 0; i < e.length; i += 1) e[i] && n.append(e[i]); 4990 else n.append(e); 4991 a.loop && t.loopCreate(), (a.observer && t.support.observer) || t.update(); 4992 }, 4993 prependSlide: function (e) { 4994 var t = this, 4995 n = t.params, 4996 a = t.$wrapperEl, 4997 i = t.activeIndex; 4998 n.loop && t.loopDestroy(); 4999 var r = i + 1; 5000 if ("object" == typeof e && "length" in e) { 5001 for (var o = 0; o < e.length; o += 1) e[o] && a.prepend(e[o]); 5002 r = i + e.length; 5003 } else a.prepend(e); 5004 n.loop && t.loopCreate(), (n.observer && t.support.observer) || t.update(), t.slideTo(r, 0, !1); 5005 }, 5006 addSlide: function (e, t) { 5007 var n = this, 5008 a = n.$wrapperEl, 5009 i = n.params, 5010 r = n.activeIndex; 5011 i.loop && ((r -= n.loopedSlides), n.loopDestroy(), (n.slides = a.children("." + i.slideClass))); 5012 var o = n.slides.length; 5013 if (e <= 0) n.prependSlide(t); 5014 else if (o <= e) n.appendSlide(t); 5015 else { 5016 for (var s = e < r ? r + 1 : r, l = [], d = o - 1; e <= d; --d) { 5017 var c = n.slides.eq(d); 5018 c.remove(), l.unshift(c); 5019 } 5020 if ("object" == typeof t && "length" in t) { 5021 for (var u = 0; u < t.length; u += 1) t[u] && a.append(t[u]); 5022 s = e < r ? r + t.length : r; 5023 } else a.append(t); 5024 for (var p = 0; p < l.length; p += 1) a.append(l[p]); 5025 i.loop && n.loopCreate(), (i.observer && n.support.observer) || n.update(), i.loop ? n.slideTo(s + n.loopedSlides, 0, !1) : n.slideTo(s, 0, !1); 5026 } 5027 }, 5028 removeSlide: function (e) { 5029 var t = this, 5030 n = t.params, 5031 a = t.$wrapperEl, 5032 i = t.activeIndex; 5033 n.loop && ((i -= t.loopedSlides), t.loopDestroy(), (t.slides = a.children("." + n.slideClass))); 5034 var r, 5035 o = i; 5036 if ("object" == typeof e && "length" in e) { 5037 for (var s = 0; s < e.length; s += 1) (r = e[s]), t.slides[r] && t.slides.eq(r).remove(), r < o && --o; 5038 o = Math.max(o, 0); 5039 } else t.slides[(r = e)] && t.slides.eq(r).remove(), r < o && --o, (
5039o = Math.max(o, 0)); 5040 n.loop && t.loopCreate(), (n.observer && t.support.observer) || t.update(), n.loop ? t.slideTo(o + t.loopedSlides, 0, !1) : t.slideTo(o, 0, !1); 5041 }, 5042 removeAllSlides: function () { 5043 for (var e = [], t = 0; t < this.slides.length; t += 1) e.push(t); 5044 this.removeSlide(e); 5045 }, 5046 }, 5047 events: { 5048 attachEvents: function () { 5049 var e = this, 5050 t = b(), 5051 n = e.params, 5052 a = e.touchEvents, 5053 i = e.el, 5054 r = e.wrapperEl, 5055 o = e.device, 5056 s = e.support; 5057 (e.onTouchStart = function (e) { 5058 var t = this, 5059 n = b(), 5060 a = w(), 5061 i = t.touchEventsData, 5062 r = t.params, 5063 o = t.touches, 5064 s = t.enabled; 5065 if (s && (!t.animating || !r.preventInteractionOnTransition)) { 5066 var l = e, 5067 d = E((l = l.originalEvent ? l.originalEvent : l).target); 5068 if ( 5069 ("wrapper" !== r.touchEventsTarget || d.closest(t.wrapperEl).length) && 5070 ((i.isTouchEvent = "touchstart" === l.type), (i.isTouchEvent || !("which" in l) || 3 !== l.which) && !((!i.isTouchEvent && "button" in l && 0 < l.button) || (i.isTouched && i.isMoved))) 5071 ) { 5072 !!r.noSwipingClass && "" !== r.noSwipingClass && l.target && l.target.shadowRoot && e.path && e.path[0] && (d = E(e.path[0])); 5073 var c = r.noSwipingSelector || "." + r.noSwipingClass, 5074 u = !(!l.target || !l.target.shadowRoot); 5075 if (r.noSwiping && (u ? I(c, l.target) : d.closest(c)[0])) t.allowClick = !0; 5076 else if (!r.swipeHandler || d.closest(r.swipeHandler)[0]) { 5077 (o.currentX = ("touchstart" === l.type ? l.targetTouches[0] : l).pageX), (o.currentY = ("touchstart" === l.type ? l.targetTouches[0] : l).pageY); 5078 var p = o.currentX, 5079 s = o.currentY, 5080 u = r.edgeSwipeDetection || r.iOSEdgeSwipeDetection, 5081 c = r.edgeSwipeThreshold || r.iOSEdgeSwipeThreshold; 5082 if (u && (p <= c || p >= a.innerWidth - c)) { 5083 if ("prevent" !== u) return; 5084 e.preventDefault(); 5085 } 5086 Y(i, { isTouched: !0, isMoved: !1, allowTouchCallbacks: !0, isScrolling: void 0, startMoving: void 0 }), 5087 (o.startX = p), 5088 (o.startY = s), 5089 (i.touchStartTime = C()), 5090 (t.allowClick = !0), 5091 t.updateSize(), 5092 (t.swipeDirection = void 0), 5093 0 < r.threshold && (i.allowThresholdMove = !1), 5094 "touchstart" !== l.type && 5095 ((s = !0), 5096 d.is(i.focusableElements) && (s = !1), 5097 n.activeElement && E(n.activeElement).is(i.focusableElements) && n.activeElement !== d[0] && n.activeElement.blur(), 5098 (s = s && t.allowTouchMove && r.touchStartPreventDefault), 5099 (!r.touchStartForcePreventDefault && !s) || d[0].isContentEditable || l.preventDefault()), 5100 t.emit("touchStart", l); 5101 } 5102 } 5103 } 5104 }.bind(e)), 5105 (e.onTouchMove = function (e) { 5106 var t = b(), 5107 n = this, 5108 a = n.touchEventsData, 5109 i = n.params, 5110 r = n.touches, 5111 o = n.rtlTranslate; 5112 if (n.enabled) { 5113 var s = e; 5114 if ((s.originalEvent && (s = s.originalEvent), a.isTouched)) { 5115 if (!a.isTouchEvent || "touchmove" === s.type) { 5116 var l = "touchmove" === s.type && s.targetTouches && (s.targetTouches[0] || s.changedTouches[0]), 5117 e = ("touchmove" === s.type ? l : s).pageX, 5118 l = ("touchmove" === s.type ? l : s).pageY; 5119 if (s.preventedByNestedSwiper) return (r.startX = e), void (r.startY = l); 5120 if (!n.allowTouchMove) return (n.allowClick = !1), void (a.isTouched && (Y(r, { startX: e, startY: l, currentX: e, currentY: l }), (a.touchStartTime = C()))); 5121 if (a.isTouchEvent && i.touchReleaseOnEdges && !i.loop) 5122 if (n.isVertical()) { 5123 if ((l < r.startY && n.translate <= n.maxTranslate()) || (l > r.startY && n.translate >= n.minTranslate())) return (a.isTouched = !1), void (a.isMoved = !1); 5124 } else if ((e < r.startX && n.translate <= n.maxTranslate()) || (e > r.startX && n.translate >= n.minTranslate())) return; 5125 if (a.isTouchEvent && t.activeElement && s.target === t.activeElement && E(s.target).is(a.focusableElements)) return (a.isMoved = !0), void (n.allowClick = !1); 5126 if ((a.allowTouchCallbacks && n.emit("touchMove", s), !(s.targetTouches && 1 < s.targetTouches.length))) { 5127 (r.currentX = e), (r.currentY = l); 5128 (t = r.currentX - r.startX), (e = r.currentY - r.startY); 5129 if (!(n.params.threshold && Math.sqrt(Math.pow(t, 2) + Math.pow(e, 2)) < n.params.threshold)) 5130 if ( 5131 (void 0 === a.isScrolling && 5132 ((n.isHorizontal() && r.currentY === r.startY) || (n.isVertical() && r.currentX === r.startX) 5133 ? (a.isScrolling = !1) 5134 : 25 <= t * t + e * e && ((l = (180 * Math.atan2(Math.abs(e), Math.abs(t))) / Math.PI), (a.isScrolling = n.isHorizontal() ? l > i.touchAngle : 90 - l > i.touchAngle))), 5135 a.isScrolling && n.emit("touchMoveOpposite", s), 5136 void 0 === a.startMoving && ((r.currentX === r.startX && r.currentY === r.startY) || (a.startMoving = !0)), 5137 a.isScrolling) 5138 ) 5139 a.isTouched = !1; 5140 else if (a.startMoving) { 5141 (n.allowClick = !1), 5142 !i.cssMode && s.cancelable && s.preventDefault(), 5143 i.touchMoveStopPropagation && !i.nested && s.stopPropagation(), 5144 a.isMoved || 5145 (i.loop && n.loopFix(), 5146 (a.startTranslate = n.getTranslate()), 5147 n.setTransition(0), 5148 n.animating && n.$wrapperEl.trigger("webkitTransitionEnd transitionend"), 5149 (a.allowMomentumBounce = !1), 5150 !i.grabCursor || (!0 !== n.allowSlideNext && !0 !== n.allowSlidePrev) || n.setGrabCursor(!0), 5151 n.emit("sliderFirstMove", s)), 5152 n.emit("sliderMove", s), 5153 (a.isMoved = !0); 5154 t = n.isHorizontal() ? t : e; 5155 (r.diff = t), (t *= i.touchRatio), (n.swipeDirection = 0 < (t = o ? -t : t) ? "prev" : "next"), (a.currentTranslate = t + a.startTranslate); 5156 (e = !0), (o = i.resistanceRatio); 5157 if ( 5158 (i.touchReleaseOnEdges && (o = 0), 5159 0 < t && a.currentTranslate > n.minTranslate() 5160 ? ((e = !1), i.resistance && (a.currentTranslate = n.minTranslate() - 1 + Math.pow(-n.minTranslate() + a.startTranslate + t, o))) 5161 : t < 0 && 5162 a.currentTranslate < n.maxTranslate() && 5163 ((e = !1), i.resistance && (a.currentTranslate = n.maxTranslate() + 1 - Math.pow(n.maxTranslate() - a.startTranslate - t, o))), 5164 e && (s.preventedByNestedSwiper = !0), 5165 !n.allowSlideNext && "next" === n.swipeDirection && a.currentTranslate < a.startTranslate && (a.currentTranslate = a.startTranslate), 5166 !n.allowSlidePrev && "prev" === n.swipeDirection && a.currentTranslate > a.startTranslate && (a.currentTranslate = a.startTranslate), 5167 n.allowSlidePrev || n.allowSlideNext || (a.currentTranslate = a.startTranslate), 5168 0 < i.threshold) 5169 ) { 5170 if (!(Math.abs(t) > i.threshold || a.allowThresholdMove)) return void (a.currentTranslate = a.startTranslate); 5171 if (!a.allowThresholdMove) 5172 return ( 5173 (a.allowThresholdMove = !0), 5174 (r.startX = r.currentX), 5175 (r.startY = r.currentY), 5176 (a.currentTranslate = a.startTranslate), 5177 void (r.diff = n.isHorizontal() ? r.currentX - r.startX : r.currentY - r.startY) 5178 ); 5179 } 5180 i.followFinger && 5181 !i.cssMode && 5182 ((i.freeMode || i.watchSlidesProgress || i.watchSlidesVisibility) && (n.updateActiveIndex(), n.updateSlidesClasses()), 5183 i.freeMode && 5184 (0 === a.velocities.length && a.velocities.push({ position: r[
5184n.isHorizontal() ? "startX" : "startY"], time: a.touchStartTime }), 5185 a.velocities.push({ position: r[n.isHorizontal() ? "currentX" : "currentY"], time: C() })), 5186 n.updateProgress(a.currentTranslate), 5187 n.setTranslate(a.currentTranslate)); 5188 } 5189 } 5190 } 5191 } else a.startMoving && a.isScrolling && n.emit("touchMoveOpposite", s); 5192 } 5193 }.bind(e)), 5194 (e.onTouchEnd = function (e) { 5195 var t = this, 5196 n = t.touchEventsData, 5197 a = t.params, 5198 i = t.touches, 5199 r = t.rtlTranslate, 5200 o = t.$wrapperEl, 5201 s = t.slidesGrid, 5202 l = t.snapGrid; 5203 if (t.enabled) { 5204 var d = e; 5205 if ((d.originalEvent && (d = d.originalEvent), n.allowTouchCallbacks && t.emit("touchEnd", d), (n.allowTouchCallbacks = !1), !n.isTouched)) 5206 return n.isMoved && a.grabCursor && t.setGrabCursor(!1), (n.isMoved = !1), void (n.startMoving = !1); 5207 a.grabCursor && n.isMoved && n.isTouched && (!0 === t.allowSlideNext || !0 === t.allowSlidePrev) && t.setGrabCursor(!1); 5208 var c, 5209 u = C(), 5210 e = u - n.touchStartTime; 5211 if ( 5212 (t.allowClick && (t.updateClickedSlide(d), t.emit("tap click", d), e < 300 && u - n.lastClickTime < 300 && t.emit("doubleTap doubleClick", d)), 5213 (n.lastClickTime = C()), 5214 S(function () { 5215 t.destroyed || (t.allowClick = !0); 5216 }), 5217 !n.isTouched || !n.isMoved || !t.swipeDirection || 0 === i.diff || n.currentTranslate === n.startTranslate) 5218 ) 5219 return (n.isTouched = !1), (n.isMoved = !1), void (n.startMoving = !1); 5220 if (((n.isTouched = !1), (n.isMoved = !1), (n.startMoving = !1), (c = a.followFinger ? (r ? t.translate : -t.translate) : -n.currentTranslate), !a.cssMode)) 5221 if (a.freeMode) 5222 if (c < -t.minTranslate()) t.slideTo(t.activeIndex); 5223 else if (c > -t.maxTranslate()) t.slides.length < l.length ? t.slideTo(l.length - 1) : t.slideTo(t.slides.length - 1); 5224 else { 5225 if (a.freeModeMomentum) { 5226 1 < n.velocities.length 5227 ? ((g = n.velocities.pop()), 5228 (f = n.velocities.pop()), 5229 (p = g.position - f.position), 5230 (f = g.time - f.time), 5231 (t.velocity = p / f), 5232 (t.velocity /= 2), 5233 Math.abs(t.velocity) < a.freeModeMinimumVelocity && (t.velocity = 0), 5234 (150 < f || 300 < C() - g.time) && (t.velocity = 0)) 5235 : (t.velocity = 0), 5236 (t.velocity *= a.freeModeMomentumVelocityRatio), 5237 (n.velocities.length = 0); 5238 var p = 1e3 * a.freeModeMomentumRatio, 5239 f = t.velocity * p, 5240 h = t.translate + f; 5241 r && (h = -h); 5242 var m, 5243 v, 5244 g = !1, 5245 f = 20 * Math.abs(t.velocity) * a.freeModeMomentumBounceRatio; 5246 if (h < t.maxTranslate()) 5247 a.freeModeMomentumBounce ? (h + t.maxTranslate() < -f && (h = t.maxTranslate() - f), (m = t.maxTranslate()), (n.allowMomentumBounce = g = !0)) : (h = t.maxTranslate()), 5248 a.loop && a.centeredSlides && (v = !0); 5249 else if (h > t.minTranslate()) 5250 a.freeModeMomentumBounce ? (h - t.minTranslate() > f && (h = t.minTranslate() + f), (m = t.minTranslate()), (n.allowMomentumBounce = g = !0)) : (h = t.minTranslate()), 5251 a.loop && a.centeredSlides && (v = !0); 5252 else if (a.freeModeSticky) { 5253 for (var y, b = 0; b < l.length; b += 1) 5254 if (l[b] > -h) { 5255 y = b; 5256 break; 5257 } 5258 h = -(h = Math.abs(l[y] - h) < Math.abs(l[y - 1] - h) || "next" === t.swipeDirection ? l[y] : l[y - 1]); 5259 } 5260 if ( 5261 (v && 5262 t.once("transitionEnd", function () { 5263 t.loopFix(); 5264 }), 5265 0 !== t.velocity) 5266 ) 5267 (p = r ? Math.abs((-h - t.translate) / t.velocity) : Math.abs((h - t.translate) / t.velocity)), 5268 a.freeModeSticky && (p = (v = Math.abs((r ? -h : h) - t.translate)) < (r = t.slidesSizesGrid[t.activeIndex]) ? a.speed : v < 2 * r ? 1.5 * a.speed : 2.5 * a.speed); 5269 else if (a.freeModeSticky) return void t.slideToClosest(); 5270 a.freeModeMomentumBounce && g 5271 ? (t.updateProgress(m), 5272 t.setTransition(p), 5273 t.setTranslate(h), 5274 t.transitionStart(!0, t.swipeDirection), 5275 (t.animating = !0), 5276 o.transitionEnd(function () { 5277 t && 5278 !t.destroyed && 5279 n.allowMomentumBounce && 5280 (t.emit("momentumBounce"), 5281 t.setTransition(a.speed), 5282 setTimeout(function () { 5283 t.setTranslate(m), 5284 o.transitionEnd(function () { 5285 t && !t.destroyed && t.transitionEnd(); 5286 }); 5287 }, 0)); 5288 })) 5289 : t.velocity 5290 ? (t.updateProgress(h), 5291 t.setTransition(p), 5292 t.setTranslate(h), 5293 t.transitionStart(!0, t.swipeDirection), 5294 t.animating || 5295 ((t.animating = !0), 5296 o.transitionEnd(function () { 5297 t && !t.destroyed && t.transitionEnd(); 5298 }))) 5299 : (t.emit("_freeModeNoMomentumRelease"), t.updateProgress(h)), 5300 t.updateActiveIndex(), 5301 t.updateSlidesClasses(); 5302 } else { 5303 if (a.freeModeSticky) return void t.slideToClosest(); 5304 a.freeMode && t.emit("_freeModeNoMomentumRelease"); 5305 } 5306 (!a.freeModeMomentum || e >= a.longSwipesMs) && (t.updateProgress(), t.updateActiveIndex(), t.updateSlidesClasses()); 5307 } 5308 else { 5309 for (var w = 0, x = t.slidesSizesGrid[0], _ = 0; _ < s.length; _ += _ < a.slidesPerGroupSkip ? 1 : a.slidesPerGroup) { 5310 var T = _ < a.slidesPerGroupSkip - 1 ? 1 : a.slidesPerGroup; 5311 void 0 !== s[_ + T] ? c >= s[_] && c < s[_ + T] && (x = s[(w = _) + T] - s[_]) : c >= s[_] && ((w = _), (x = s[s.length - 1] - s[s.length - 2])); 5312 } 5313 (g = (c - s[w]) / x), (p = w < a.slidesPerGroupSkip - 1 ? 1 : a.slidesPerGroup); 5314 e > a.longSwipesMs 5315 ? a.longSwipes 5316 ? ("next" === t.swipeDirection && (g >= a.longSwipesRatio ? t.slideTo(w + p) : t.slideTo(w)), "prev" === t.swipeDirection && (g > 1 - a.longSwipesRatio ? t.slideTo(w + p) : t.slideTo(w))) 5317 : t.slideTo(t.activeIndex) 5318 : a.shortSwipes 5319 ? t.navigation && (d.target === t.navigation.nextEl || d.target === t.navigation.prevEl) 5320 ? d.target === t.navigation.nextEl 5321 ? t.slideTo(w + p) 5322 : t.slideTo(w) 5323 : ("next" === t.swipeDirection && t.slideTo(w + p), "prev" === t.swipeDirection && t.slideTo(w)) 5324 : t.slideTo(t.activeIndex); 5325 } 5326 } 5327 }.bind(e)), 5328 n.cssMode && 5329 (e.onScroll = function () { 5330 var e = this, 5331 t = e.wrapperEl, 5332 n = e.rtlTranslate; 5333 e.enabled && 5334 ((e.previousTranslate = e.translate), 5335 e.isHorizontal() ? (e.translate = n ? t.scrollWidth - t.offsetWidth - t.scrollLeft : -t.scrollLeft) : (e.translate = -t.scrollTop), 5336 -0 === e.translate && (e.translate = 0), 5337 e.updateActiveIndex(), 5338 e.updateSlidesClasses(), 5339 (0 == (t = e.maxTranslate() - e.minTranslate()) ? 0 : (e.translate - e.minTranslate()) / t) !== e.progress && e.updateProgress(n ? -e.translate : e.translate), 5340 e.emit("setTranslate", e.translate, !1)); 5341 }.bind(e)), 5342 (e.onClick = function (e) { 5343 var t = this; 5344 t.enabled && (t.allowClick || (t.params.preventClicks && e.preventDefault(), t.params.preventClicksPropagation && t.animating && (e.stopPropagation(), e.stopImmediatePropagation()))); 5345 }.bind(e)); 5346 var l, 5347 d = !!n.nested; 5348 !s.touch && s.pointerEvents 5349 ? (i.addEventListener(a.start, e.onTouchStart, !1), t.addEventListener(a.move, e.onTouchMove, d), t.addEventListener(a.end, e.onTouchEnd, !1)) 5350 : (s.touch && 5351 ((l = !("touchstart" !== a.start || !s.passiveListener || !n.passiveListeners) && { passive: !0, capture: !1 }), 5352 i.addEventListener(a.start, e.onTouchStart, l), 5353 i.addEventListener(a.move, e.onTouchMove, s.passiveListener ? { passive: !1, capture: d } : d), 5354 i.addEventListener(a.end, e.onTouchEnd, l), 5355 a.cancel && i.addEventListener(a.cancel, e.onTouchEnd, l),
5356 D || (t.addEventListener("touchstart", $), (D = !0))), 5357 ((n.simulateTouch && !o.ios && !o.android) || (n.simulateTouch && !s.touch && o.ios)) && 5358 (i.addEventListener("mousedown", e.onTouchStart, !1), t.addEventListener("mousemove", e.onTouchMove, d), t.addEventListener("mouseup", e.onTouchEnd, !1))), 5359 (n.preventClicks || n.preventClicksPropagation) && i.addEventListener("click", e.onClick, !0), 5360 n.cssMode && r.addEventListener("scroll", e.onScroll), 5361 n.updateOnWindowResize ? e.on(o.ios || o.android ? "resize orientationchange observerUpdate" : "resize observerUpdate", z, !0) : e.on("observerUpdate", z, !0); 5362 }, 5363 detachEvents: function () { 5364 var e, 5365 t = this, 5366 n = b(), 5367 a = t.params, 5368 i = t.touchEvents, 5369 r = t.el, 5370 o = t.wrapperEl, 5371 s = t.device, 5372 l = t.support, 5373 d = !!a.nested; 5374 !l.touch && l.pointerEvents 5375 ? (r.removeEventListener(i.start, t.onTouchStart, !1), n.removeEventListener(i.move, t.onTouchMove, d), n.removeEventListener(i.end, t.onTouchEnd, !1)) 5376 : (l.touch && 5377 ((e = !("onTouchStart" !== i.start || !l.passiveListener || !a.passiveListeners) && { passive: !0, capture: !1 }), 5378 r.removeEventListener(i.start, t.onTouchStart, e), 5379 r.removeEventListener(i.move, t.onTouchMove, d), 5380 r.removeEventListener(i.end, t.onTouchEnd, e), 5381 i.cancel && r.removeEventListener(i.cancel, t.onTouchEnd, e)), 5382 ((a.simulateTouch && !s.ios && !s.android) || (a.simulateTouch && !l.touch && s.ios)) && 5383 (r.removeEventListener("mousedown", t.onTouchStart, !1), n.removeEventListener("mousemove", t.onTouchMove, d), n.removeEventListener("mouseup", t.onTouchEnd, !1))), 5384 (a.preventClicks || a.preventClicksPropagation) && r.removeEventListener("click", t.onClick, !0), 5385 a.cssMode && o.removeEventListener("scroll", t.onScroll), 5386 t.off(s.ios || s.android ? "resize orientationchange observerUpdate" : "resize observerUpdate", z); 5387 }, 5388 }, 5389 breakpoints: { 5390 setBreakpoint: function () { 5391 var e, 5392 n, 5393 t, 5394 a, 5395 i = this, 5396 r = i.activeIndex, 5397 o = i.initialized, 5398 s = i.loopedSlides, 5399 l = void 0 === s ? 0 : s, 5400 d = i.params, 5401 c = i.$el, 5402 u = d.breakpoints; 5403 !u || 5404 0 === Object.keys(u).length || 5405 ((e = i.getBreakpoint(u, i.params.breakpointsBase, i.el)) && 5406 i.currentBreakpoint !== e && 5407 ((n = e in u ? u[e] : void 0) && 5408 ["slidesPerView", "spaceBetween", "slidesPerGroup", "slidesPerGroupSkip", "slidesPerColumn"].forEach(function (e) { 5409 var t = n[e]; 5410 void 0 !== t && (n[e] = "slidesPerView" !== e || ("AUTO" !== t && "auto" !== t) ? ("slidesPerView" === e ? parseFloat(t) : parseInt(t, 10)) : "auto"); 5411 }), 5412 (t = n || i.originalParams), 5413 (a = 1 < d.slidesPerColumn), 5414 (s = 1 < t.slidesPerColumn), 5415 (u = d.enabled), 5416 a && !s 5417 ? (c.removeClass(d.containerModifierClass + "multirow " + d.containerModifierClass + "multirow-column"), i.emitContainerClasses()) 5418 : !a && 5419 s && 5420 (c.addClass(d.containerModifierClass + "multirow"), 5421 ((t.slidesPerColumnFill && "column" === t.slidesPerColumnFill) || (!t.slidesPerColumnFill && "column" === d.slidesPerColumnFill)) && c.addClass(d.containerModifierClass + "multirow-column"), 5422 i.emitContainerClasses()), 5423 (c = t.direction && t.direction !== d.direction), 5424 (d = d.loop && (t.slidesPerView !== d.slidesPerView || c)), 5425 c && o && i.changeDirection(), 5426 Y(i.params, t), 5427 (c = i.params.enabled), 5428 Y(i, { allowTouchMove: i.params.allowTouchMove, allowSlideNext: i.params.allowSlideNext, allowSlidePrev: i.params.allowSlidePrev }), 5429 u && !c ? i.disable() : !u && c && i.enable(), 5430 (i.currentBreakpoint = e), 5431 i.emit("_beforeBreakpoint", t), 5432 d && o && (i.loopDestroy(), i.loopCreate(), i.updateSlides(), i.slideTo(r - l + i.loopedSlides, 0, !1)), 5433 i.emit("breakpoint", t))); 5434 }, 5435 getBreakpoint: function (e, t, n) { 5436 if ((void 0 === t && (t = "window"), e && ("container" !== t || n))) { 5437 var a = !1, 5438 i = w(), 5439 r = "window" === t ? i.innerHeight : n.clientHeight, 5440 o = Object.keys(e).map(function (e) { 5441 if ("string" != typeof e || 0 !== e.indexOf("@")) return { value: e, point: e }; 5442 var t = parseFloat(e.substr(1)); 5443 return { value: r * t, point: e }; 5444 }); 5445 o.sort(function (e, t) { 5446 return parseInt(e.value, 10) - parseInt(t.value, 10); 5447 }); 5448 for (var s = 0; s < o.length; s += 1) { 5449 var l = o[s], 5450 d = l.point, 5451 l = l.value; 5452 "window" === t ? i.matchMedia("(min-width: " + l + "px)").matches && (a = d) : l <= n.clientWidth && (a = d); 5453 } 5454 return a || "max"; 5455 } 5456 }, 5457 }, 5458 checkOverflow: { 5459 checkOverflow: function () { 5460 var e = this, 5461 t = e.params, 5462 n = e.isLocked, 5463 a = 0 < e.slides.length && t.slidesOffsetBefore + t.spaceBetween * (e.slides.length - 1) + e.slides[0].offsetWidth * e.slides.length; 5464 t.slidesOffsetBefore && t.slidesOffsetAfter && a ? (e.isLocked
5464= a <= e.size) : (e.isLocked = 1 === e.snapGrid.length), 5465 (e.allowSlideNext = !e.isLocked), 5466 (e.allowSlidePrev = !e.isLocked), 5467 n !== e.isLocked && e.emit(e.isLocked ? "lock" : "unlock"), 5468 n && n !== e.isLocked && ((e.isEnd = !1), e.navigation && e.navigation.update()); 5469 }, 5470 }, 5471 classes: { 5472 addClasses: function () { 5473 var n, 5474 a, 5475 e = this, 5476 t = e.classNames, 5477 i = e.params, 5478 r = e.rtl, 5479 o = e.$el, 5480 s = e.device, 5481 l = e.support, 5482 s = 5483 ((s = [ 5484 "initialized", 5485 i.direction, 5486 { "pointer-events": l.pointerEvents && !l.touch }, 5487 { "free-mode": i.freeMode }, 5488 { autoheight: i.autoHeight }, 5489 { rtl: r }, 5490 { multirow: 1 < i.slidesPerColumn }, 5491 { "multirow-column": 1 < i.slidesPerColumn && "column" === i.slidesPerColumnFill }, 5492 { android: s.android }, 5493 { ios: s.ios }, 5494 { "css-mode": i.cssMode }, 5495 ]), 5496 (n = i.containerModifierClass), 5497 (a = []), 5498 s.forEac
5498h(function (t) { 5499 "object" == typeof t 5500 ? Object.keys(t).forEach(function (e) { 5501 t[e] && a.push(n + e); 5502 }) 5503 : "string" == typeof t && a.push(n + t); 5504 }), 5505 a); 5506 t.push.apply(t, s), o.addClass([].concat(t).join(" ")), e.emitContainerClasses(); 5507 }, 5508 removeClasses: function () { 5509 var e = this.$el, 5510 t = this.classNames; 5511 e.removeClass(t.join(" ")), this.emitContainerClasses(); 5512 }, 5513 }, 5514 images: { 5515 loadImage: function (e, t, n, a, i, r) { 5516 var o = w(); 5517 function s() { 5518 r && r(); 5519 } 5520 !(E(e).parent("picture")[0] || (e.complete && i)) && t ? (((o = new o.Image()).onload = s), (o.onerror = s), a && (o.sizes = a), n && (o.srcset = n), t && (o.src = t)) : s(); 5521 }, 5522 preloadImages: function () { 5523 var e = this; 5524 function t() { 5525 null != e && e && !e.destroyed && (void 0 !== e.imagesLoaded && (e.imagesLoaded += 1), e.imagesLoaded === e.imagesToLoad.length && (e.params.updateOnImagesReady && e.update(), e.emit("imagesReady"))); 5526 } 5527 e.imagesToLoad = e.$el.find("img"); 5528 for (var n = 0; n < e.imagesToLoad.length; n += 1) { 5529 var a = e.imagesToLoad[n]; 5530 e.loadImage(a, a.currentSrc || a.getAttribute("src"), a.srcset || a.getAttribute("srcset"), a.sizes || a.getAttribute("sizes"), !0, t); 5531 } 5532 }, 5533 }, 5534 }, 5535 j = {}, 5536 R = (function () { 5537 function l() { 5538 for (var n, e = arguments.length, t = new Array(e), a = 0; a < e; a++) t[a] = arguments[a]; 5539 if ( 5540 ((n = Y({}, (n = (n = 1 === t.length && t[0].constructor && "Object" === Object.prototype.toString.call(t[0]).slice(8, -1) ? t[0] : ((o = t[0]), t[1])) || {}))), o && !n.el && (n.el = o), n.el && 1 < E(n.el).length) 5541 ) { 5542 var i = []; 5543 return ( 5544 E(n.el).each(function (e) { 5545 e = Y({}, n, { el: e }); 5546 i.push(new l(e)); 5547 }), 5548 i 5549 ); 5550 } 5551 var r = this; 5552 (r.__swiper__ = !0), 5553 (r.support = M()), 5554 (r.device = k({ userAgent: n.userAgent })), 5555 (r.browser = A()), 5556 (r.eventsListeners = {}), 5557 (r.eventsAnyListeners = []), 5558 void 0 === r.modules && (r.modules = {}), 5559 Object.keys(r.modules).forEach(function (e) { 5560 var t = r.modules[e]; 5561 t.params && 5562 ((e = Object.keys(t.params)[0]), 5563 "object" == typeof (t = t.params[e]) && 5564 null !== t && 5565 (0 <= ["navigation", "pagination", "scrollbar"].indexOf(e) && !0 === n[e] && (n[e] = { auto: !0 }), 5566 e in n && "enabled" in t && (!0 === n[e] && (n[e] = { enabled: !0 }), "object" != typeof n[e] || "enabled" in n[e] || (n[e].enabled = !0), n[e] || (n[e] = { enabled: !1 })))); 5567 }); 5568 var o, 5569 s = Y({}, H); 5570 return ( 5571 r.useParams(s), 5572 (r.params = Y({}, s, j, n)), 5573 (r.originalParams = Y({}, r.params)), 5574 (r.passedParams = Y({}, n)), 5575 r.params && 5576 r.params.on &&
5577 Object.keys(r.params.on).forEach(function (e) { 5578 r.on(e, r.params.on[e]); 5579 }), 5580 r.params && r.params.onAny && r.onAny(r.params.onAny), 5581 (r.$ = E), 5582 Y(r, { 5583 enabled: r.params.enabled, 5584 el: o, 5585 classNames: [], 5586 slides: E(), 5587 slidesGrid: [], 5588 snapGrid: [], 5589 slidesSizesGrid: [], 5590 isHorizontal: function () { 5591 return "horizontal" === r.params.direction; 5592 }, 5593 isVertical: function () { 5594 return "vertical" === r.params.direction; 5595 }, 5596 activeIndex: 0, 5597 realIndex: 0, 5598 isBeginning: !0, 5599 isEnd: !1, 5600 translate: 0, 5601 previousTranslate: 0, 5602 progress: 0, 5603 velocity: 0, 5604 animating: !1, 5605 allowSlideNext: r.params.allowSlideNext, 5606 allowSlidePrev: r.params.allowSlidePrev, 5607 touchEvents: 5608 ((s = ["touchstart", "touchmove", "touchend", "touchcancel"]), 5609 (o = ["mousedown", "mousemove", "mouseup"]), 5610 r.support.pointerEvents && (o = ["pointerdown", "pointermove", "pointerup"]), 5611 (r.touchEventsTouch = { start: s[0], move: s[1], end: s[2], cancel: s[3] }), 5612 (r.touchEventsDesktop = { start: o[0], move: o[1], end: o[2] }), 5613 r.support.touch || !r.params.simulateTouch ? r.touchEventsTouch : r.touchEventsDesktop), 5614 touchEventsData: { 5615 isTouched: void 0, 5616 isMoved: void 0, 5617 allowTouchCallbacks: void 0, 5618 touchStartTime: void 0, 5619 isScrolling: void 0, 5620 currentTranslate: void 0, 5621 startTranslate: void 0, 5622 allowThresholdMove: void 0, 5623 focusableElements: r.params.focusableElements, 5624 lastClickTime: C(), 5625 clickTimeout: void 0, 5626 velocities: [], 5627 allowMomentumBounce: void 0, 5628 isTouchEvent: void 0, 5629 startMoving: void 0, 5630 }, 5631 allowClick: !0, 5632 allowTouchMove: r.params.allowTouchMove, 5633 touches: { startX: 0, startY: 0, currentX: 0, currentY: 0, diff: 0 }, 5634 imagesToLoad: [], 5635 imagesLoaded: 0, 5636 }), 5637 r.useModules(), 5638 r.emit("_swiper"), 5639 r.params.init && r.init(), 5640 r 5641 ); 5642 } 5643 var e, 5644 t, 5645 n = l.prototype; 5646 return ( 5647 (n.enable = function () { 5648 var e = this; 5649 e.enabled || ((e.enabled = !0), e.params.grabCursor && e.setGrabCursor(), e.emit("enable")); 5650 }), 5651 (n.disable = function () { 5652 var e = this; 5653 e.enabled && ((e.enabled = !1), e.params.grabCursor && e.unsetGrabCursor(), e.emit("disable")); 5654 }), 5655 (n.setProgress = function (e, t) { 5656 var n = this; 5657 e = Math.min(Math.max(e, 0), 1); 5658 var a = n.minTranslate(), 5659 i = n.maxTranslate(); 5660 n.translateTo((i - a) * e + a, void 0 === t ? 0 : t), n.updateActiveIndex(), n.updateSlidesClasses(); 5661 }), 5662 (n.emitContainerClasses = function () { 5663 var e, 5664 t = this; 5665 t.params._emitClasses && 5666 t.el && 5667 ((e = t.el.className.split(" ").filter(function (e) { 5668 return 0 === e.indexOf("swiper-container") || 0 === e.indexOf(t.params.containerModifierClass); 5669 })), 5670 t.emit("_containerClasses", e.join(" "))); 5671 }), 5672 (n.getSlideClasses = function (e) { 5673 var t = this; 5674 return e.className 5675 .split(" ") 5676 .filter(function (e) { 5677 return 0 === e.indexOf("swiper-slide") || 0 === e.indexOf(t.params.slideClass); 5678 }) 5679 .join(" "); 5680 }), 5681 (n.emitSlidesClasses = function () { 5682 var n, 5683 a = this; 5684 a.params._emitClasses && 5685 a.el && 5686 ((n = []), 5687 a.slides.each(function (e) { 5688 var t = a.getSlideClasses(e); 5689 n.push({ slideEl: e, classNames: t }), a.emit("_slideClass", e, t); 5690 }), 5691 a.emit("_slideClasses", n)); 5692 }), 5693 (n.slidesPerViewDynamic = function () { 5694 var e = this, 5695 t = e.params, 5696 n = e.slides, 5697 a = e.slidesGrid, 5698 i = e.size, 5699 r = e.activeIndex, 5700 o = 1; 5701 if (t.centeredSlides) { 5702 for (var s, l = n[r].swiperSlideSize, d = r + 1; d < n.length; d += 1) n[d] && !s && ((o += 1), i < (l += n[d].swiperSlideSize) && (s = !0)); 5703 for (var c = r - 1; 0 <= c; --c) n[c] && !s && ((o += 1), i < (l += n[c].swiperSlideSize) && (s = !0)); 5704 } else for (var u = r + 1; u < n.length; u += 1) a[u] - a[r] < i && (o += 1); 5705 return o; 5706 }), 5707 (n.update = function () { 5708 var e, 5709 t, 5710 n = this; 5711 function a() { 5712 var e = n.rtlTranslate ? -1 * n.translate : n.translate, 5713 e = Math.min(Math.max(e, n.maxTranslate()), n.minTranslate()); 5714 n.setTranslate(e), n.updateActiveIndex(), n.updateSlidesClasses(); 5715 } 5716 n && 5717 !n.destroyed && 5718 ((e = n.snapGrid), 5719 (t = n.params).breakpoints && n.setBreakpoint(), 5720 n.updateSize(), 5721 n.updateSlides(), 5722 n.updateProgress(), 5723 n.updateSlidesClasses(), 5724 n.params.freeMode 5725 ? (a(), n.params.autoHeight && n.updateAutoHeight()) 5726 : (("auto" === n.params.slidesPerView || 1 < n.params.slidesPerView) && n.isEnd && !n.params.centeredSlides ? n.slideTo(n.slides.length - 1, 0, !1, !0) : n.slideTo(n.activeIndex, 0, !1, !0)) || a(), 5727 t.watchOverflow && e !== n.snapGrid && n.checkOverflow(), 5728 n.emit("update")); 5729 }), 5730 (n.changeDirection = function (t, e) { 5731 void 0 === e && (e = !0); 5732 var n = this, 5733 a = n.params.direction; 5734 return ( 5735 (t = t || ("horizontal" === a ? "vertical" : "horizontal")) === a || 5736 ("horizontal" !== t && "vertical" !== t) || 5737 (n.$el.removeClass("" + n.params.containerModifierClass + a).addClass("" + n.params.containerModifierClass + t), 5738 n.emitContainerClasses(), 5739 (n.params.direction = t), 5740 n.slides.each(function (e) { 5741 "vertical" === t ? (e.style.width = "") : (e.style.height = ""); 5742 }), 5743 n.emit("changeDirection"), 5744 e && n.update()), 5745 n 5746 ); 5747 }), 5748 (n.mount = function (t) { 5749 var e = this; 5750 if (e.mounted) return !0; 5751 var n = E(t || e.params.el); 5752 if (!(t = n[0])) return !1; 5753 t.swiper = e; 5754 function a() { 5755 return "." + (e.params.wrapperClass || "").trim().split(" ").join("."); 5756 } 5757 var i, 5758 r = (function () { 5759 if (t && t.shadowRoot && t.shadowRoot.querySelector) { 5760 var e = E(t.shadowRoot.querySelector(a())); 5761 return ( 5762 (e.children = function (e) { 5763 return n.children(e); 5764 }), 5765 e 5766 ); 5767 } 5768 return n.children(a()); 5769 })(); 5770 return ( 5771 0 === r.length && 5772 e.params.createElements && 5773 ((i = b().createElement("div")), 5774 (r = E(i)), 5775 (i.className = e.params.wrapperClass), 5776 n.append(i), 5777 n.children("." + e.params.slideClass).each(function (e) { 5778 r.append(e); 5779 })), 5780 Y(e, { 5781 $el: n, 5782 el: t, 5783 $wrapperEl: r, 5784 wrapperEl: r[0], 5785 mounted: !0, 5786 rtl: "rtl" === t.dir.toLowerCase() || "rtl" === n.css("direction"), 5787 rtlTranslate: "horizontal" === e.params.direction && ("rtl" === t.dir.toLowerCase() || "rtl" === n.css("direction")), 5788 wrongRTL: "-webkit-box" === r.css("display"), 5789 }), 5790 !0 5791 ); 5792 }), 5793 (n.init = function (e) { 5794 var t = this; 5795 return ( 5796 t.initialized || 5797 !1 === t.mount(e) || 5798 (t.emit("beforeInit"), 5799 t.params.breakpoints && t.setBreakpoint(), 5800 t.addClasses(), 5801 t.params.loop && t.loopCreate(), 5802 t.updateSize(), 5803 t.updateSlides(), 5804 t.params.watchOverflow && t.checkOverflow(),
5805 t.params.grabCursor && t.enabled && t.setGrabCursor(), 5806 t.params.preloadImages && t.preloadImages(), 5807 t.params.loop ? t.slideTo(t.params.initialSlide + t.loopedSlides, 0, t.params.runCallbacksOnInit, !1, !0) : t.slideTo(t.params.initialSlide, 0, t.params.runCallbacksOnInit, !1, !0), 5808 t.attachEvents(), 5809 (t.initialized = !0), 5810 t.emit("init"), 5811 t.emit("afterInit")), 5812 t 5813 ); 5814 }), 5815 (n.destroy = function (e, t) { 5816 void 0 === e && (e = !0), void 0 === t && (t = !0); 5817 var n, 5818 a = this, 5819 i = a.params, 5820 r = a.$el, 5821 o = a.$wrapperEl, 5822 s = a.slides; 5823 return ( 5824 void 0 === a.params || 5825 a.destroyed || 5826 (a.emit("beforeDestroy"), 5827 (a.initialized = !1), 5828 a.detachEvents(), 5829 i.loop && a.loopDestroy(), 5830 t && 5831 (a.removeClasses(), 5832 r.removeAttr("style"), 5833 o.removeAttr("style"), 5834 s && s.length && s.removeClass([i.slideVisibleClass, i.slideActiveClass, i.slideNextClass, i.slidePrevClass].join(" ")).removeAttr("style").removeAttr("data-swiper-slide-index")), 5835 a.emit("destroy"), 5836 Object.keys(a.eventsListeners).forEach(function (e) { 5837 a.off(e); 5838 }), 5839 !1 !== e && 5840 ((a.$el[0].swiper = null), 5841 (n = a), 5842 Object.keys(n).forEach(function (e) { 5843 try { 5844 n[e] = null; 5845 } catch (e) {} 5846 try { 5847 delete n[e]; 5848 } catch (e) {} 5849 })), 5850 (a.destroyed = !0)), 5851 null 5852 ); 5853 }), 5854 (l.extendDefaults = function (e) { 5855 Y(j, e); 5856 }), 5857 (l.installModule = function (e) { 5858 l.prototype.modules || (l.prototype.modules = {}); 5859 var t = e.name || Object.keys(l.prototype.modules).length + "_" + C(); 5860 l.prototype.modules[t] = e; 5861 }), 5862 (l.use = function (e) { 5863 return ( 5864 Array.isArray(e) 5865 ? e.forEach(function (e) { 5866 return l.installModule(e); 5867 }) 5868 : l.installModule(e), 5869 l 5870 ); 5871 }), 5872 (e = l), 5873 (t = [ 5874 { 5875 key: "extendedDefaults", 5876 get: function () { 5877 return j; 5878 }, 5879 }, 5880 { 5881 key: "defaults", 5882 get: function () { 5883 return H; 5884 }, 5885 }, 5886 ]), 5887 (n = null) && a(e.prototype, n), 5888 t && a(e, t), 5889 l 5890 ); 5891 })(); 5892 Object.keys(B).forEach(function (t) { 5893 Object.keys(B[t]).forEach(function (e) { 5894 R.prototype[e] = B[t][e]; 5895 }); 5896 }), 5897 R.use([O, L]); 5898 var G = { 5899 update: function (e) { 5900 var t = this, 5901 n = t.params, 5902 a = n.slidesPerView, 5903 i = n.slidesPerGroup, 5904 r = n.centeredSlides, 5905 o = t.params.virtual, 5906 s = o.addSlidesBefore, 5907 l = o.addSlidesAfter, 5908 d = t.virtual, 5909 c = d.from, 5910 u = d.to, 5911 p = d.slides, 5912 f = d.slidesGrid, 5913 h = d.renderSlide, 5914 n = d.offset; 5915 t.updateActiveIndex(); 5916 var o = t.activeIndex || 0, 5917 d = t.rtlTranslate ? "right" : t.isHorizontal() ? "left" : "top", 5918 s = r ? ((g = Math.floor(a / 2) + i + l), Math.floor(a / 2) + i + s) : ((g = a + (i - 1) + l), i + s), 5919 m = Math.max((o || 0) - s, 0), 5920 v = Math.min((o || 0) + g, p.length - 1), 5921 g = (t.slidesGrid[m] || 0) - (t.slidesGrid[0] || 0); 5922 function y() { 5923 t.updateSlides(), t.updateProgress(), t.updateSlidesClasses(), t.lazy && t.params.lazy.enabled && t.lazy.load(); 5924 } 5925 if ((Y(t.virtual, { from: m, to: v, offset: g, slidesGrid: t.slidesGrid }), c === m && u === v && !e)) return t.slidesGrid !== f && g !== n && t.slides.css(d, g + "px"), void t.updateProgress(); 5926 if (t.params.virtual.renderExternal) 5927 return ( 5928 t.params.virtual.renderExternal.call(t, { 5929 offset: g, 5930 from: m, 5931 to: v, 5932 slides: (function () { 5933 for (var e = [], t = m; t <= v; t += 1) e.push(p[t]); 5934 return e; 5935 })(), 5936 }), 5937 void (t.params.virtual.renderExternalUpdate && y()) 5938 ); 5939 var b = [], 5940 w = []; 5941 if (e) t.$wrapperEl.find("." + t.params.slideClass).remove(); 5942 else for (var x = c; x <= u; x += 1) (x < m || v < x) && t.$wrapperEl.find("." + t.params.slideClass + '[data-swiper-slide-index="' + x + '"]').remove(); 5943 for (var _ = 0; _ < p.length;
5943 _ += 1) m <= _ && _ <= v && (void 0 === u || e ? w.push(_) : (u < _ && w.push(_), _ < c && b.push(_))); 5944 w.forEach(function (e) { 5945 t.$wrapperEl.append(h(p[e], e)); 5946 }), 5947 b 5948 .sort(function (e, t) { 5949 return t - e; 5950 }) 5951 .forEach(function (e) { 5952 t.$wrapperEl.prepend(h(p[e], e)); 5953 }), 5954 t.$wrapperEl.children(".swiper-slide").css(d, g + "px"), 5955 y(); 5956 }, 5957 renderSlide: function (e, t) { 5958 var n = this, 5959 a = n.params.virtual; 5960 if (a.cache && n.virtual.cache[t]) return n.virtual.cache[t]; 5961 e = a.renderSlide ? E(a.renderSlide.call(n, e, t)) : E('<div class="' + n.params.slideClass + '" data-swiper-slide-index="' + t + '">' + e + "</div>"); 5962 return e.attr("data-swiper-slide-index") || e.attr("data-swiper-slide-index", t), a.cache && (n.virtual.cache[t] = e), e; 5963 }, 5964 appendSlide: function (e) { 5965 if ("object" == typeof e && "length" in e) for (var t = 0; t < e.length; t += 1) e[t] && this.virtual.slides.push(e[t]); 5966 else this.virtual.slides.push(e); 5967 this.virtual.update(!0); 5968 }, 5969 prependSlide: function (e) { 5970 var a, 5971 i, 5972 t = this, 5973 n = t.activeIndex, 5974 r = n + 1, 5975 o = 1; 5976 if (Array.isArray(e)) { 5977 for (var s = 0; s < e.length; s += 1) e[s] && t.virtual.slides.unshift(e[s]); 5978 (r = n + e.length), (o = e.length); 5979 } else t.virtual.slides.unshift(e); 5980 t.params.virtual.cache && 5981 ((a = t.virtual.cache), 5982 (i = {}), 5983 Object.keys(a).forEach(function (e) { 5984 var t = a[e], 5985 n = t.attr("data-swiper-slide-index"); 5986 n && t.attr("data-swiper-slide-index", parseInt(n, 10) + 1), (i[parseInt(e, 10) + o] = t); 5987 }), 5988 (t.virtual.cache = i)), 5989 t.virtual.update(!0), 5990 t.slideTo(r, 0); 5991 }, 5992 removeSlide: function (e) { 5993 var t = this; 5994 if (null != e) { 5995 var n = t.activeIndex; 5996 if (Array.isArray(e)) for (var a = e.length - 1; 0 <= a; --a) t.virtual.slides.splice(e[a], 1), t.params.virtual.cache && delete t.virtual.cache[e[a]], e[a] < n && --n, (n = Math.max(n, 0)); 5997 else t.virtual.slides.splice(e, 1), t.params.virtual.cache && delete t.virtual.cache[e], e < n && --n, (n = Math.max(n, 0)); 5998 t.virtual.update(!0), t.slideTo(n, 0); 5999 } 6000 }, 6001 removeAllSlides: function () { 6002 var e = this; 6003 (e.virtual.slides = []), e.params.virtual.cache && (e.virtual.cache = {}), e.virtual.update(!0), e.slideTo(0, 0); 6004 }, 6005 }, 6006 N = { 6007 name: "virtual", 6008 params: { virtual: { enabled: !1, slides: [], cache: !0, renderSlide: null, renderExternal: null, renderExternalUpdate: !0, addSlidesBefore: 0, addSlidesAfter: 0 } }, 6009 create: function () { 6010 x(this, { virtual: e({}, G, { slides: this.params.virtual.slides, cache: {} }) }); 6011 }, 6012 on: { 6013 beforeInit: function (e) { 6014 var t; 6015 e.params.virtual.enabled && (e.classNames.push(e.params.containerModifierClass + "virtual"), Y(e.params, (t = { watchSlidesProgress: !0 })), Y(e.originalParams, t), e.params.initialSlide || e.virtual.update(
6015)); 6016 }, 6017 setTranslate: function (e) { 6018 e.params.virtual.enabled && e.virtual.update(); 6019 }, 6020 }, 6021 }, 6022 W = { 6023 handle: function (e) { 6024 var t = this; 6025 if (t.enabled) { 6026 var n = w(), 6027 a = b(), 6028 i = t.rtlTranslate, 6029 r = e, 6030 o = (r = r.originalEvent ? r.originalEvent : r).keyCode || r.charCode, 6031 s = t.params.keyboard.pageUpDown, 6032 l = s && 33 === o, 6033 d = s && 34 === o, 6034 c = 37 === o, 6035 u = 39 === o, 6036 p = 38 === o, 6037 e = 40 === o; 6038 if (!t.allowSlideNext && ((t.isHorizontal() && u) || (t.isVertical() && e) || d)) return !1; 6039 if (!t.allowSlidePrev && ((t.isHorizontal() && c) || (t.isVertical() && p) || l)) return !1; 6040 if ( 6041 !( 6042 r.shiftKey || 6043 r.altKey || 6044 r.ctrlKey || 6045 r.metaKey || 6046 (a.activeElement && a.activeElement.nodeName && ("input" === a.activeElement.nodeName.toLowerCase() || "textarea" === a.activeElement.nodeName.toLowerCase())) 6047 ) 6048 ) { 6049 if (t.params.keyboard.onlyInViewport && (l || d || c || u || p || e)) { 6050 var f = !1; 6051 if (0 < t.$el.parents("." + t.params.slideClass).length && 0 === t.$el.parents("." + t.params.slideActiveClass).length) return; 6052 var s = t.$el, 6053 a = s[0].clientWidth, 6054 s = s[0].clientHeight, 6055 h = n.innerWidth, 6056 m = n.innerHeight, 6057 n = t.$el.offset(); 6058 i && (n.left -= t.$el[0].scrollLeft); 6059 for ( 6060 var v = [ 6061 [n.left, n.top], 6062 [n.left + a, n.top], 6063 [n.left, n.top + s], 6064 [n.left + a, n.top + s], 6065 ], 6066 g = 0; 6067 g < v.length; 6068 g += 1 6069 ) { 6070 var y = v[g]; 6071 0 <= y[0] && y[0] <= h && 0 <= y[1] && y[1] <= m && ((0 === y[0] && 0 === y[1]) || (f = !0)); 6072 } 6073 if (!f) return; 6074 } 6075 t.isHorizontal() 6076 ? ((l || d || c || u) && (r.preventDefault ? r.preventDefault() : (r.returnValue = !1)), (((d || u) && !i) || ((l || c) && i)) && t.slideNext(), (((l || c) && !i) || ((d || u) && i)) && t.slidePrev()) 6077 : ((l || d || p || e) && (r.preventDefault ? r.preventDefault() : (r.returnValue = !1)), (d || e) && t.slideNext(), (l || p) && t.slidePrev()), 6078 t.emit("keyPress", o); 6079 } 6080 } 6081 }, 6082 enable: function () { 6083 var e = b(); 6084 this.keyboard.enabled || (E(e).on("keydown", this.keyboard.handle), (this.keyboard.enabled = !0)); 6085 }, 6086 disable: function () { 6087 var e = b(); 6088 this.keyboard.enabled && (E(e).off("keydown", this.keyboard.handle), (this.keyboard.enabled = !1)); 6089 }, 6090 }, 6091 V = { 6092 name: "keyboard", 6093 params: { keyboard: { enabled: !1, onlyInViewport: !0, pageUpDown: !0 } }, 6094 create: function () { 6095 x(this, { keyboard: e({ enabled: !1 }, W) }); 6096 }, 6097 on: { 6098 init: function (e) { 6099 e.params.keyboard.enabled && e.keyboard.enable(); 6100 }, 6101 destroy: function (e) { 6102 e.keyboard.enabled && e.keyboard.disable(); 6103 }, 6104 }, 6105 }; 6106 var F = { 6107 lastScrollTime: C(), 6108 lastEventBeforeSnap: void 0, 6109 recentWheelEvents: [], 6110 event: function () { 6111 var e, t, n, a; 6112 return -1 < w().navigator.userAgent.indexOf("firefox") 6113 ? "DOMMouseScroll" 6114 : ((t = b()), 6115 (a = (n = "onwheel") in t) || ((e = t.createElement("div")).setAttribute(n, "return;"), (a = "function" == typeof e[n])), 6116 (a = !a && t.implementation && t.implementation.hasFeature && !0 !== t.implementation.hasFeature("", "") ? t.implementation.hasFeature("Events.wheel", "3.0") : a) ? "wheel" : "mousewheel"); 6117 }, 6118 normalize: function (e) { 6119 var t = 0, 6120 n = 0, 6121 a = 0, 6122 i = 0; 6123 return ( 6124 "detail" in e && (n = e.detail), 6125 "wheelDelta" in e && (n = -e.wheelDelta / 120), 6126 "wheelDeltaY" in e && (n = -e.wheelDeltaY / 120), 6127 "wheelDeltaX" in e && (t = -e.wheelDeltaX / 120), 6128 "axis" in e && e.axis === e.HORIZONTAL_AXIS && ((t = n), (n = 0)), 6129 (a = 10 * t), 6130 (i = 10 * n), 6131 "deltaY" in e && (i = e.deltaY), 6132 "deltaX" in e && (a = e.deltaX), 6133 e.shiftKey && !a && ((a = i), (i = 0)), 6134 (a || i) && e.deltaMode && (1 === e.deltaMode ? ((a *= 40), (i *= 40)) : ((a *= 800), (i *= 800))), 6135 { spinX: (t = a && !t ? (a < 1 ? -1 : 1) : t), spinY: (n = i && !n ? (i < 1 ? -1 : 1) : n), pixelX: a, pixelY: i } 6136 ); 6137 }, 6138 handleMouseEnter: function () { 6139 this.enabled && (this.mouseEntered = !0); 6140 }, 6141 handleMouseLeave: function () { 6142 this.enabled && (this.mouseEntered = !1); 6143 }, 6144 handle: function (e) { 6145 var t = e, 6146 n = this; 6147 if (n.enabled) { 6148 var a = n.params.mousewheel; 6149 n.params.cssMode && t.preventDefault(); 6150 var i = n.$el; 6151 if (("container" !== n.params.mousewheel.eventsTarget && (i = E(n.params.mousewheel.eventsTarget)), !n.mouseEntered && !i[0].contains(t.target) && !a.releaseOnEdges)) return !0; 6152 t.originalEvent && (t = t.originalEvent); 6153 var r = 0, 6154 o = n.rtlTranslate ? -1 : 1, 6155 i = F.normalize(t); 6156 if (a.forceToAxis) 6157 if (n.isHorizontal()) { 6158 if (!(Math.abs(i.pixelX) > Math.abs(i.pixelY))) return !0; 6159 r = -i.pixelX * o; 6160 } else { 6161 if (!(Math.abs(i.pixelY) > Math.abs(i.pixelX))) return !0; 6162 r = -i.pixelY; 6163 } 6164 else r = Math.abs(i.pixelX) > Math.abs(i.pixelY) ? -i.pixelX * o : -i.pixelY; 6165 if (0 === r) return !0; 6166 a.invert && (r = -r); 6167 o = n.getTranslate() + r * a.sensitivity; 6168 if ( 6169 ((o = o >= n.minTranslate() ? n.minTranslate() : o) <= n.maxTranslate() && (o = n.maxTranslate()), 6170 (!!n.params.loop || !(o === n.minTranslate() || o === n.maxTranslate())) && n.params.nested && t.stopPropagation(), 6171 n.params.freeMode) 6172 ) { 6173 var s = { time: C(), delta: Math.abs(r), direction: Math.sign(r) }, 6174 i = n.mousewheel.lastEventBeforeSnap, 6175 o = i && s.time < i.time + 500 && s.delta <= i.delta && s.direction === i.direction; 6176 if (!o) { 6177 (n.mousewheel.lastEventBeforeSnap = void 0), n.params.loop && n.loopFix(); 6178 var l, 6179 d, 6180 c = n.getTranslate() + r * a.sensitivity, 6181 i = n.isBeginning, 6182 a = n.isEnd; 6183 if ( 6184 ((c = c >= n.minTranslate() ? n.minTranslate() : c) <= n.maxTranslate() && (c = n.maxTranslate()), 6185 n.setTransition(0), 6186 n.setTranslate(c), 6187 n.updateProgress(), 6188 n.updateActiveIndex(), 6189 n.updateSlidesClasses(), 6190 ((!i && n.isBeginning) || (!a && n.isEnd)) && n.updateSlidesClasses(), 6191 n.params.freeModeSticky && 6192 (clearTimeout(n.mousewheel.timeout), 6193 (n.mousewheel.timeout = void 0), 6194 15 <= (l = n.mousewheel.recentWheelEvents).length && l.shift(), 6195 (i = l.length ? l[l.length - 1] : void 0), 6196 (a = l[0]), 6197 l.push(s), 6198 i && (s.delta > i.delta || s.direction !== i.direction) 6199 ? l.splice(0) 6200 : 15 <= l.length && 6201 s.time - a.time < 500 && 6202 1 <= a.delta - s.delta && 6203 s.delta <= 6 && 6204 ((d = 0 < r ? 0.8 : 0.2), 6205 (n.mousewheel.lastEventBeforeSnap = s), 6206 l.splice(0), 6207 (n.mousewheel.timeout = S(function () { 6208 n.slideToClosest(n.params.speed, !0, void 0, d); 6209 }, 0))), 6210 n.mousewheel.timeout || 6211 (n.mousewheel.timeout = S(function () { 6212 (n.mousewheel.lastEventBeforeSnap = s), l.splice(0), n.slideToClosest(n.params.speed, !0, void 0, 0.5); 6213 }, 500))), 6214 o || n.emit("scroll", t), 6215 n.params.autoplay && n.params.autoplayDisableOnInteraction && n.autoplay.stop(), 6216 c === n.minTranslate() || c === n.maxTranslate()) 6217 ) 6218 return !0; 6219 } 6220 } else { 6221 (c = { time: C(), delta: Math.abs(r), direction: Math.sign(r), raw: e }), (r = n.mousewheel.recentWheelEvents); 6222 2 <= r.length && r.shift(); 6223 e = r.length ? r[r.length - 1] : void 0; 6224 if ((r.push(c), (!e || c.direction !== e.direction || c.delta > e.delta || c.time > e.time + 150) && n.mousewheel.animateSlider(c), n.mousewheel.releaseScroll(c))) return !0; 6225 } 6226 return t.preventDefault ? t.preventDefault() : (t.returnValue = !1), !1; 6227 } 6228 }, 6229 animateSlider: function (e) { 6230 var t = this, 6231 n = w(); 6232 return ( 6233 !(this.params.mousewheel.thresholdDelta && e.delta < this.params.mousewheel.thresholdDelta) && 6234 !(this.params.mousewheel.thresholdTime && C() - t.mousewheel.lastScrollTime < this.params.mousewheel.thresholdTime) && 6235 ((6 <= e.delta && C() - t.mousewheel.lastScrollTime < 60) || 6236 (e.direction < 0 ? (t.isEnd && !t.params.loop) || t.animating || (t.slideNext(), t.emit("scroll", e.raw)) : (t.isBeginning && !t.params.loop) || t.animating || (t.slidePrev(), t.emit("scroll", e.raw)), 6237 (t.mousewheel.lastScrollTime = new n.Date().getTime()), 6238 !1)) 6239 ); 6240 }, 6241 releaseScroll: function (e) { 6242 var t = this, 6243 n = t.params.mousewheel; 6244 if (e.direction < 0) { 6245 if (t.isEnd && !t.params.loop && n.releaseOnEdges) return !0; 6246 } else if (t.isBeginning && !t.params.loop && n.releaseOnEdges) return !0; 6247 return !1; 6248 }, 6249 enable: function () { 6250 var e = this, 6251 t = F.event(); 6252 if (e.params.cssMode) return e.wrapperEl.removeEventListener(t, e.mousewheel.handle), !0; 6253 if (!t) return !1; 6254 if (e.mousewheel.enabled) return !1; 6255 var n = e.$el; 6256 return ( 6257 (n = "container" !== e.params.mousewheel.eventsTarget ? E(e.params.mousewheel.eventsTarget) : n).on("mouseenter", e.mousewheel.handleMouseEnter), 6258 n.on("mouseleave", e.mousewheel.handleMouseLeave), 6259 n.on(t, e.mousewheel.handle), 6260 (e.mousewheel.enabled = !0) 6261 ); 6262 }, 6263 disable: function () { 6264 var e = this, 6265 t = F.event(); 6266 if (e.params.cssMode) return e.wrapperEl.addEventListener(t, e.mousewheel.handle), !0; 6267 if (!t) return !1; 6268 if (!e.mousewheel.enabled) return !1; 6269 var n = e.$el; 6270 return (n = "container" !== e.params.mousewheel.eventsTarget ? E(e.params.mousewheel.eventsTarget) : n).off(t, e.mousewheel.handle), !(e.mousewheel.enabled = !1); 6271 }, 6272 }, 6273 q = { 6274 toggleEl: function (e, t) { 6275 e[t ? "addClass" : "removeClass"](this.params.navigation.disabledClass), e[0] && "BUTTON" === e[0].tagName && (e[0].disabled = t); 6276 }, 6277 update: function () { 6278 var e, 6279 t, 6280 n = this, 6281 a = n.params.navigation, 6282 i = n.navigation.toggleEl; 6283 n.params.loop || 6284 ((e = (t = n.navigation).$nextEl), 6285 (t = t.$prevEl) && 0 < t.length && (n.isBeginning ? i(t, !0) : i(t, !1), n.params.watchOverflow && n.enabled && t[n.isLocked ? "addClass" : "removeClass"](a.lockClass)), 6286 e && 0 < e.length && (n.isEnd ? i(e, !0) : i(e, !1), n.params.watchOverflow && n.enabled && e[n.isLocked ? "addClass" : "removeClass"](a.lockClass))); 6287 }, 6288 onPrevClick: function (e) {
6289 e.preventDefault(), (this.isBeginning && !this.params.loop) || this.slidePrev(); 6290 }, 6291 onNextClick: function (e) { 6292 e.preventDefault(), (this.isEnd && !this.params.loop) || this.slideNext(); 6293 }, 6294 init: function () { 6295 var e, 6296 t, 6297 n = this, 6298 a = n.params.navigation; 6299 (n.params.navigation = T(n.$el, n.params.navigation, n.params.createElements, { nextEl: "swiper-button-next", prevEl: "swiper-button-prev" })), 6300 (a.nextEl || a.prevEl) && 6301 (a.nextEl && ((e = E(a.nextEl)), n.params.uniqueNavElements && "string" == typeof a.nextEl && 1 < e.length && 1 === n.$el.find(a.nextEl).length && (e = n.$el.find(a.nextEl))), 6302 a.prevEl && ((t = E(a.prevEl)), n.params.uniqueNavElements && "string" == typeof a.prevEl && 1 < t.length && 1 === n.$el.find(a.prevEl).length && (t = n.$el.find(a.prevEl))), 6303 e && 0 < e.length && e.on("click", n.navigation.onNextClick), 6304 t && 0 < t.length && t.on("click", n.navigation.onPrevClick), 6305 Y(n.navigation, { $nextEl: e, nextEl: e && e[0], $prevEl: t, prevEl: t && t[0] }), 6306 n.enabled || (e && e.addClass(a.lockClass), t && t.addClass(a.lockClass))); 6307 }, 6308 destroy: function () { 6309 var e = this, 6310 t = e.navigation, 6311 n = t.$nextEl, 6312 t = t.$prevEl; 6313 n && n.length && (n.off("click", e.navigation.onNextClick), n.removeClass(e.params.navigation.disabledClass)), 6314 t && t.length && (t.off("click", e.navigation.onPrevClick), t.removeClass(e.params.navigation.disabledClass)); 6315 }, 6316 }, 6317 X = { 6318 name: "navigation", 6319 params: { navigation: { nextEl: null, prevEl: null, hideOnClick: !1, disabledClass: "swiper-button-disabled", hiddenClass: "swiper-button-hidden", lockClass: "swiper-button-lock" } }, 6320 create: function () { 6321 x(this, { navigation: e({}, q) }); 6322 }, 6323 on: { 6324 init: function (e) { 6325 e.navigation.init(), e.navigation.update(); 6326 }, 6327 toEdge: function (e) { 6328 e.navigation.update(); 6329 }, 6330 fromEdge: function (e) { 6331 e.navigation.update(); 6332 }, 6333 destroy: function (e) { 6334 e.navigation.destroy(); 6335 }, 6336 "enable disable": function (e) { 6337 var t = e.navigation, 6338 n = t.$nextEl, 6339 t = t.$prevEl; 6340 n && n[e.enabled ? "removeClass" : "addClass"](e.params.navigation.lockClass), t && t[e.enabled ? "removeClass" : "addClass"](e.params.navigation.lockClass); 6341 }, 6342 click: function (e, t) { 6343 var n, 6344 a = e.navigation, 6345 i = a.$nextEl, 6346 a = a.$prevEl, 6347 t = t.target; 6348 !e.params.navigation.hideOnClick || 6349 E(t).is(a) || 6350 E(t).is(i) || 6351 (e.pagination && e.params.pagination && e.params.pagination.clickable && (e.pagination.el === t || e.pagination.el.contains(t))) || 6352 (i ? (n = i.hasClass(e.params.navigation.hiddenClass)) : a && (n = a.hasClass(e.params.navigation.hiddenClass)), 6353 !0 === n ? e.emit("navigationShow") : e.emit("navigationHide"), 6354 i && i.toggleClass(e.params.navigation.hiddenClass), 6355 a && a.toggleClass(e.params.navigation.hiddenClass)); 6356 }, 6357 }, 6358 }, 6359 U = { 6360 update: function () { 6361 var e = this, 6362 t = e.rtl, 6363 n = e.params.pagination; 6364 if (n.el && e.pagination.el && e.pagination.$el && 0 !== e.pagination.$el.length) { 6365 var a, 6366 i = (e.virtual && e.params.virtual.enabled ? e.virtual : e).slides.length, 6367 r = e.pagination.$el, 6368 o = e.params.loop ? Math.ceil((i - 2 * e.loopedSlides) / e.params.slidesPerGroup) : e.snapGrid.length; 6369 if ( 6370 (e.params.loop 6371 ? ((a = Math.ceil((e.activeIndex - e.loopedSlides) / e.params.slidesPerGroup)) > i - 1 - 2 * e.loopedSlides && (a -= i - 2 * e.loopedSlides), 6372 o - 1 < a && (a -= o), 6373 a < 0 && "bullets" !== e.params.paginationType && (a = o + a)) 6374 : (a = void 0 !== e.snapIndex ? e.snapIndex : e.activeIndex || 0), 6375 "bullets" === n.type && e.pagination.bullets && 0 < e.pagination.bullets.length) 6376 ) { 6377 var s, 6378 l, 6379 d, 6380 c, 6381 u, 6382 p = e.pagination.bullets; 6383 if ( 6384 (n.dynamicBullets && 6385 ((e.pagination.bulletSize = p.eq(0)[e.isHorizontal() ? "outerWidth" : "outerHeight"](!0)), 6386 r.css(e.isHorizontal() ? "width" : "height", e.pagination.bulletSize * (n.dynamicMainBullets + 4) + "px"), 6387 1 < n.dynamicMainBullets && 6388 void 0 !== e.previousIndex && 6389 ((e.pagination.dynamicBulletIndex += a - e.previousIndex), 6390 e.pagination.dynamicBulletIndex > n.dynamicMainBullets - 1 6391 ? (e.pagination.dynamicBulletIndex = n.dynamicMainBullets - 1) 6392 : e.pagination.dynamicBulletIndex < 0 && (e.pagination.dynamicBulletIndex = 0)), 6393 (s = a - e.pagination.dynamicBulletIndex), 6394 (d = ((l = s + (Math.min(p.length, n.dynamicMainBullets) - 1)) + s) / 2)), 6395 p.removeClass( 6396 n.bulletActiveClass + " " + n.bulletActiveClass + "-next " + n.bulletActiveClass + "-next-next " + n.bulletActiveClass + "-prev " + n.bulletActiveClass + "-prev-prev " + n.bulletActiveClass + "-main" 6397 ), 6398 1 < r.length) 6399 ) 6400 p.each(function (e) { 6401 var t = E(e), 6402 e = t.index(); 6403 e === a && t.addClass(n.bulletActiveClass), 6404 n.dynamicBullets && 6405 (s <= e && e <= l && t.addClass(n.bulletActiveClass + "-main"), 6406 e === s && 6407 t 6408 .prev() 6409 .addClass(n.bulletActiveClass + "-prev") 6410 .prev() 6411 .addClass(n.bulletActiveClass + "-prev-prev"), 6412 e === l && 6413 t 6414 .next() 6415 .addClass(n.bulletActiveClass + "-next") 6416 .next() 6417 .addClass(n.bulletActiveClass + "-next-next")); 6418 }); 6419 else { 6420 var f = p.eq(a), 6421 h = f.index(); 6422 if ((f.addClass(n.bulletActiveClass), n.dynamicBullets)) { 6423 for (var i = p.eq(s), f = p.eq(l), m = s; m <= l; m += 1) p.eq(m).addClass(n.bulletActiveClass + "-main"); 6424 if (e.params.loop) 6425 if (h >= p.length - n.dynamicMainBullets) { 6426 for (var v = n.dynamicMainBullets; 0 <= v; --v) p.eq(p.length - v).addClass(n.bulletActiveClass + "-main"); 6427 p.eq(p.length - n.dynamicMainBullets - 1).addClass(n.bulletActiveClass + "-prev"); 6428 } else 6429 i 6430 .prev() 6431 .addClass(n.bulletActiveClass + "-prev") 6432 .prev() 6433 .addClass(n.bulletActiveClass + "-prev-prev"), 6434 f 6435 .next() 6436 .addClass(n.bulletActiveClass + "-next") 6437 .next() 6438 .addClass(n.bulletActiveClass + "-next-next"); 6439 else 6440 i 6441 .prev() 6442 .addClass(n.bulletActiveClass + "-prev") 6443 .prev() 6444 .addClass(n.bulletActiveClass + "-prev-prev"), 6445 f 6446 .next() 6447 .addClass(n.bulletActiveClass + "-next") 6448 .next() 6449 .addClass(n.bulletActiveClass + "-next-next"); 6450 } 6451 } 6452 n.dynamicBullets && 6453 ((u = Math.min(p.length, n.dynamicMainBullets + 4)), 6454 (c = (e.pagination.bulletSize * u - e.pagination.bulletSize) / 2 - d * e.pagination.bulletSize), 6455 (u = t ? "right" : "left"), 6456 p.css(e.isHorizontal() ? u : "top", c + "px")); 6457 } 6458 "fraction" === n.type && (r.find(_(n.currentClass)).text(n.formatFractionCurrent(a + 1)), r.find(_(n.totalClass)).text(n.formatFractionTotal(o))), 6459 "progressbar" === n.type && 6460 ((d = n.progressbarOpposite ? (e.isHorizontal() ? "vertical" : "horizontal") : e.isHorizontal() ? "horizontal" : "vertical"), 6461 (t = (a + 1) / o), 6462 (c = u = 1), 6463 "horizontal" === d ? (u = t) : (c = t), 6464 r 6465 .find(_(n.progressbarFillClass))
6466 .transform("translate3d(0,0,0) scaleX(" + u + ") scaleY(" + c + ")") 6467 .transition(e.params.speed)), 6468 "custom" === n.type && n.renderCustom ? (r.html(n.renderCustom(e, a + 1, o)), e.emit("paginationRender", r[0])) : e.emit("paginationUpdate", r[0]), 6469 e.params.watchOverflow && e.enabled && r[e.isLocked ? "addClass" : "removeClass"](n.lockClass); 6470 } 6471 }, 6472 render: function () { 6473 var e = this, 6474 t = e.params.pagination; 6475 if (t.el && e.pagination.el && e.pagination.$el && 0 !== e.pagination.$el.length) { 6476 var n = (e.virtual && e.params.virtual.enabled ? e.virtual : e).slides.length, 6477 a = e.pagination.$el, 6478 i = ""; 6479 if ("bullets" === t.type) { 6480 var r = e.params.loop ? Math.ceil((n - 2 * e.loopedSlides) / e.params.slidesPerGroup) : e.snapGrid.length; 6481 e.params.freeMode && !e.params.loop && n < r && (r = n); 6482 for (var o = 0; o < r; o += 1) t.renderBullet ? (i += t.renderBullet.call(e, o, t.bulletClass)) : (i += "<" + t.bulletElement + ' class="' + t.bulletClass + '"></' + t.bulletElement + ">"); 6483 a.html(i), (e.pagination.bullets = a.find(_(t.bulletClass))); 6484 } 6485 "fraction" === t.type && ((i = t.renderFraction ? t.renderFraction.call(e, t.currentClass, t.totalClass) : '<span class="' + t.currentClass + '"></span> / <span class="' + t.totalClass + '"></span>'), a.html(i)), 6486 "progressbar" === t.type && ((i = t.renderProgressbar ? t.renderProgressbar.call(e, t.progressbarFillClass) : '<span class="' + t.progressbarFillClass + '"></span>'), a.html(i)), 6487 "custom" !== t.type && e.emit("paginationRender", e.pagination.$el[0]); 6488 } 6489 }, 6490 init: function () { 6491 var t = this; 6492 t.params.pagination = T(t.$el, t.params.pagination, t.params.createElements, { el: "swiper-pagination" }); 6493 var e, 6494 n = t.params.pagination; 6495 !n.el || 6496 (0 !== (e = E(n.el)).length && 6497 (t.params.uniqueNavElements && "string" == typeof n.el && 1 < e.length && (e = t.$el.find(n.el)), 6498 "bullets" === n.type && n.clickable && e.addClass(n.clickableClass), 6499 e.addClass(n.modifierClass + n.type), 6500 "bullets" === n.type && n.dynamicBullets && (e.addClass("" + n.modifierClass + n.type + "-dynamic"), (t.pagination.dynamicBulletIndex = 0), n.dynamicMainBullets < 1 && (n.dynamicMainBullets = 1)), 6501 "progressbar" === n.type && n.progressbarOpposite && e.addClass(n.progressbarOppositeClass), 6502 n.clickable && 6503 e.on("click", _(n.bulletClass), function (e) { 6504 e.preventDefault(); 6505 e = E(this).index() * t.params.slidesPerGroup; 6506 t.params.loop && (e += t.loopedSlides), t.slideTo(e); 6507 }), 6508 Y(t.pagination, { $el: e, el: e[0] }), 6509 t.enabled || e.addClass(n.lockClass))); 6510 }, 6511 destroy: function () { 6512 var e, 6513 t = this, 6514 n = t.params.pagination; 6515 n.el && 6516 t.pagination.el && 6517 t.pagination.$el && 6518 0 !== t.pagination.$el.length && 6519 ((e = t.pagination.$el).removeClass(n.hiddenClass), 6520 e.removeClass(n.modifierClass + n.type), 6521 t.pagination.bullets && t.pagination.bullets.removeClass(n.bulletActiveClass), 6522 n.clickable && e.off("click", _(n.bulletClass))); 6523 }, 6524 }, 6525 K = { 6526 name: "pagination", 6527 params: { 6528 pagination: { 6529 el: null, 6530 bulletElement: "span", 6531 clickable: !1, 6532 hideOnClick: !1, 6533 renderBullet: null, 6534 renderProgressbar: null, 6535 renderFraction: null, 6536 renderCustom: null, 6537 progressbarOpposite: !1, 6538 type: "bullets", 6539 dynamicBullets: !1, 6540 dynamicMainBullets: 1, 6541 formatFractionCurrent: function (e) { 6542 return e; 6543 }, 6544 formatFractionTotal: function (e) { 6545 return e; 6546 }, 6547 bulletClass: "swiper-pagination-bullet", 6548 bulletActiveClass: "swiper-pagination-bullet-active", 6549 modifierClass: "swiper-pagination-", 6550 currentClass: "swiper-pagination-current", 6551 totalClass: "swiper-pagination-total", 6552 hiddenClass: "swiper-pagination-hidden", 6553 progressbarFillClass: "swiper-pagination-progressbar-fill", 6554 progressbarOppositeClass: "swiper-pagination-progressbar-opposite", 6555 clickableClass: "swiper-pagination-clickable", 6556 lockClass: "swiper-pagination-lock", 6557 }, 6558 }, 6559 create: function () { 6560 x(this, { pagination: e({ dynamicBulletIndex: 0 }, U) }); 6561 }, 6562 on: { 6563 init: function (e) { 6564 e.pagination.init(), e.pagination.render(), e.pagination.update(); 6565 }, 6566 activeIndexChange: function (e) {
6567 (e.params.loop || void 0 === e.snapIndex) && e.pagination.update(); 6568 }, 6569 snapIndexChange: function (e) { 6570 e.params.loop || e.pagination.update(); 6571 }, 6572 slidesLengthChange: function (e) { 6573 e.params.loop && (e.pagination.render(), e.pagination.update()); 6574 }, 6575 snapGridLengthChange: function (e) { 6576 e.params.loop || (e.pagination.render(), e.pagination.update()); 6577 }, 6578 destroy: function (e) { 6579 e.pagination.destroy(); 6580 }, 6581 "enable disable": function (e) { 6582 var t = e.pagination.$el; 6583 t && t[e.enabled ? "removeClass" : "addClass"](e.params.pagination.lockClass); 6584 }, 6585 click: function (e, t) { 6586 t = t.target; 6587 e.params.pagination.el && 6588 e.params.pagination.hideOnClick && 6589 0 < e.pagination.$el.length && 6590 !E(t).hasClass(e.params.pagination.bulletClass) && 6591 ((e.navigation && ((e.navigation.nextEl && t === e.navigation.nextEl) || (e.navigation.prevEl && t === e.navigation.prevEl))) || 6592 (!0 === e.pagination.$el.hasClass(e.params.pagination.hiddenClass) ? e.emit("paginationShow") : e.emit("paginationHide"), e.pagination.$el.toggleClass(e.params.pagination.hiddenClass))); 6593 }, 6594 }, 6595 }, 6596 Z = { 6597 setTranslate: function () { 6598 var e, 6599 t, 6600 n, 6601 a, 6602 i, 6603 r, 6604 o, 6605 s, 6606 l = this; 6607 l.params.scrollbar.el && 6608 l.scrollbar.el && 6609 ((o = l.scrollbar), 6610 (e = l.rtlTranslate), 6611 (s = l.progress), 6612 (t = o.dragSize), 6613 (n = o.trackSize), 6614 (a = o.$dragEl), 6615 (i = o.$el), 6616 (r = l.params.scrollbar), 6617 (s = (n - (o = t)) * s), 6618 e ? (0 < (s = -s) ? ((o = t - s), (s = 0)) : n < -s + t && (o = n + s)) : s < 0 ? ((o = t + s), (s = 0)) : n < s + t && (o = n - s), 6619 l.isHorizontal() ? (a.transform("translate3d(" + s + "px, 0, 0)"), (a[0].style.width = o + "px")) : (a.transform("translate3d(0px, " + s + "px, 0)"), (a[0].style.height = o + "px")), 6620 r.hide && 6621 (clearTimeout(l.scrollbar.timeout), 6622 (i[0].style.opacity = 1), 6623 (l.scrollbar.timeout = setTimeout(function () { 6624 (i[0].style.opacity = 0), i.transition(400); 6625 }, 1e3)))); 6626 }, 6627 setTransition: function (e) { 6628 this.params.scrollbar.el && this.scrollbar.el && this.scrollbar.$dragEl.transition(e); 6629 }, 6630 updateSize: function () { 6631 var e, 6632 t, 6633 n, 6634 a, 6635 i, 6636 r, 6637 o, 6638 s = this; 6639 s.params.scrollbar.el && 6640 s.scrollbar.el && 6641 ((t = (e = s.scrollbar).$dragEl), 6642 (n = e.$el), 6643 (t[0].style.width = ""), 6644 (t[0].style.height = ""), 6645 (a = s.isHorizontal() ? n[0].offsetWidth : n[0].offsetHeight), 6646 (r = (i = s.size / s.virtualSize) * (a / s.size)), 6647 (o = "auto" === s.params.scrollbar.dragSize ? a * i : parseInt(s.params.scrollbar.dragSize, 10)), 6648 s.isHorizontal() ? (t[0].style.width = o + "px") : (t[0].style.height = o + "px"), 6649 (n[0].style.display = 1 <= i ? "none" : ""), 6650 s.params.scrollbar.hide && (n[0].style.opacity = 0), 6651 Y(e, { trackSize: a, divider: i, moveDivider: r, dragSize: o }), 6652 s.params.watchOverflow && s.enabled && e.$el[s.isLocked ? "addClass" : "removeClass"](s.params.scrollbar.lockClass)); 6653 }, 6654 getPointerPosition: function (e) { 6655 return this.isHorizontal() ? ("touchstart" === e.type || "touchmove" === e.type ? e.targetTouches[0] : e).clientX : ("touchstart" === e.type || "touchmove" === e.type ? e.targetTouches[0] : e).clientY; 6656 }, 6657 setDragPosition: function (e) { 6658 var t = this, 6659 n = t.scrollbar, 6660 a = t.rtlTranslate, 6661 i = n.$el, 6662 r = n.dragSize, 6663 o = n.trackSize, 6664 s = n.dragStartPos, 6665 r = (n.getPointerPosition(e) - i.offset()[t.isHorizontal() ? "left" : "top"] - (null !== s ? s : r / 2)) / (o - r); 6666 (r = Math.max(Math.min(r, 1), 0)), a && (r = 1 - r); 6667 r = t.minTranslate() + (t.maxTranslate() - t.minTranslate()) * r; 6668 t.updateProgress(r), t.setTranslate(r), t.updateActiveIndex(), t.updateSlidesClasses(); 6669 }, 6670 onDragStart: function (e) { 6671 var t = this, 6672 n = t.params.scrollbar, 6673 a = t.scrollbar, 6674 i = t.$wrapperEl, 6675 r = a.$el, 6676 o = a.$dragEl; 6677 (t.scrollbar.isTouched = !0), 6678 (t.scrollbar.dragStartPos = e.target === o[0] || e.target === o ? a.getPointerPosition(e) - e.target.getBoundingClientRect()[t.isHorizontal() ? "left" : "top"] : null),
6679 e.preventDefault(), 6680 e.stopPropagation(), 6681 i.transition(100), 6682 o.transition(100), 6683 a.setDragPosition(e), 6684 clearTimeout(t.scrollbar.dragTimeout), 6685 r.transition(0), 6686 n.hide && r.css("opacity", 1), 6687 t.params.cssMode && t.$wrapperEl.css("scroll-snap-type", "none"), 6688 t.emit("scrollbarDragStart", e); 6689 }, 6690 onDragMove: function (e) { 6691 var t = this.scrollbar, 6692 n = this.$wrapperEl, 6693 a = t.$el, 6694 i = t.$dragEl; 6695 this.scrollbar.isTouched && (e.preventDefault ? e.preventDefault() : (e.returnValue = !1), t.setDragPosition(e), n.transition(0), a.transition(0), i.transition(0), this.emit("scrollbarDragMove", e)); 6696 }, 6697 onDragEnd: function (e) { 6698 var t = this, 6699 n = t.params.scrollbar, 6700 a = t.scrollbar, 6701 i = t.$wrapperEl, 6702 r = a.$el; 6703 t.scrollbar.isTouched && 6704 ((t.scrollbar.isTouched = !1), 6705 t.params.cssMode && (t.$wrapperEl.css("scroll-snap-type", ""), i.transition("")), 6706 n.hide && 6707 (clearTimeout(t.scrollbar.dragTimeout), 6708 (t.scrollbar.dragTimeout = S(function () { 6709 r.css("opacity", 0), r.transition(400); 6710 }, 1e3))), 6711 t.emit("scrollbarDragEnd", e), 6712 n.snapOnRelease && t.slideToClosest()); 6713 }, 6714 enableDraggable: function () { 6715 var e, 6716 t, 6717 n, 6718 a, 6719 i, 6720 r, 6721 o, 6722 s = this; 6723 s.params.scrollbar.el && 6724 ((e = b()), 6725 (r = s.scrollbar), 6726 (t = s.touchEventsTouch), 6727 (n = s.touchEventsDesktop), 6728 (o = s.params), 6729 (a = s.support), 6730 (i = r.$el[0]), 6731 (r = !(!a.passiveListener || !o.passiveListeners) && { passive: !1, capture: !1 }), 6732 (o = !(!a.passiveListener || !o.passiveListeners) && { passive: !0, capture: !1 }), 6733 i && 6734 (a.touch 6735 ? (i.addEventListener(t.start, s.scrollbar.onDragStart, r), i.addEventListener(t.move, s.scrollbar.onDragMove, r), i.addEventListener(t.end, s.scrollbar.onDragEnd, o)) 6736 : (i.addEventListener(n.start, s.scrollbar.onDragStart, r), e.addEventListener(n.move, s.scrollbar.onDragMove, r), e.addEventListener(n.end, s.scrollbar.onDragEnd, o)))); 6737 }, 6738 disableDraggable: function () { 6739 var e, 6740 t, 6741 n, 6742 a, 6743 i, 6744 r, 6745 o, 6746 s = this; 6747 s.params.scrollbar.el && 6748 ((e = b()), 6749 (r = s.scrollbar), 6750 (t = s.touchEventsTouch), 6751 (n = s.touchEventsDesktop), 6752 (o = s.params), 6753 (a = s.support), 6754 (i = r.$el[0]), 6755 (r = !(!a.passiveListener || !o.passiveListeners) && { passive: !1, capture: !1 }), 6756 (o = !(!a.passiveListener || !o.passiveListeners) && { passive: !0, capture: !1 }), 6757 i && 6758 (a.touch 6759 ? (i.removeEventListener(t.start, s.scrollbar.onDragStart, r), i.removeEventListener(t.move, s.scrollbar.onDragMove, r), i.removeEventListener(t.end, s.scrollbar.onDragEnd, o)) 6760 : (i.removeEventListener(n.start, s.scrollbar.onDragStart, r), e.removeEventListener(n.move, s.scrollbar.onDragMove, r), e.removeEventListener(n.end, s.scrollbar.onDragEnd, o)))); 6761 }, 6762 init: function () { 6763 var e = this, 6764 t = e.scrollbar, 6765 n = e.$el; 6766 e.params.scrollbar = T(n, e.params.scrollbar, e.params.createElements, { el: "swiper-scrollbar" }); 6767 var a, 6768 i = e.params.scrollbar; 6769 i.el && 6770 ((a = E(i.el)), 6771 0 === (n = (a = e.params.uniqueNavElements && "string" == typeof i.el && 1 < a.length && 1 === n.find(i.el).length ? n.find(i.el) : a).find("." + e.params.scrollbar.dragClass)).length && 6772 ((n = E('<div class="' + e.params.scrollbar.dragClass + '"></div>')), a.append(n)), 6773 Y(t, { $el: a, el: a[0], $dragEl: n, dragEl: n[0] }), 6774 i.draggable && t.enableDraggable(), 6775 a && a[e.enabled ? "removeClass" : "addClass"](e.params.scrollbar.lockClass)); 6776 }, 6777 destroy: function () { 6778 this.scrollbar.disableDraggable(); 6779 }, 6780 }, 6781 Q = { 6782 name: "scrollbar", 6783 params: { scrollbar: { el: null, dragSize: "auto", hide: !1, draggable: !1, snapOnRelease: !0, lockClass: "swiper-scrollbar-lock", dragClass: "swiper-scrollbar-drag" } }, 6784 create: function () { 6785 x(this, { scrollbar: e({ isTouched: !1, timeout: null, dragTimeout: null }, Z) }); 6786 }, 6787 on: { 6788 init: function (e) { 6789 e.scrollbar.init(), e.scrollbar.updateSize(), e.scrollbar.setTranslate(); 6790 }, 6791 update: function (e) { 6792 e.scrollbar.updateSize(); 6793 }, 6794 resize: function (e) { 6795 e.scrollbar.updateSize(); 6796 }, 6797 observerUpdate: function (e) { 6798 e.scrollbar.updateSize(); 6799 }, 6800 setTranslate: function (e) { 6801 e.scrollbar.setTranslate(); 6802 }, 6803 setTransition: function (e, t) { 6804 e.scrollbar.setTransition(t); 6805 }, 6806 "enable disable": function (e) { 6807 var t = e.scrollbar.$el; 6808 t && t[e.enabled ? "removeClass" : "addClass"](e.params.scrollbar.lockClass); 6809 }, 6810 destroy: function (e) { 6811 e.scrollbar.destroy(); 6812 }, 6813 }, 6814 }, 6815 J = { 6816 setTransform: function (e, t) { 6817 var n = this.rtl, 6818 a = E(e), 6819 i = n ? -1 : 1, 6820 r = a.attr("data-swiper-parallax") || "0", 6821 o = a.attr("data-swiper-parallax-x"), 6822 s = a.attr("data-swiper-parallax-y"), 6823 e = a.attr("data-swiper-parallax-scale"), 6824 n = a.attr("data-swiper-parallax-opacity"); 6825 o || s ? ((o = o || "0"), (s = s || "0")) : this.isHorizontal() ? ((o = r), (s = "0")) : ((s = r), (o = "0")), 6826 (o = 0 <= o.indexOf("%") ? parseInt(o, 10) * t * i + "%" : o * t * i + "px"), 6827 (s = 0 <= s.indexOf("%") ? parseInt(s, 10) * t + "%" : s * t + "px"), 6828 null != n && ((n = n - (n - 1) * (1 - Math.abs(t))), (a[0].style.opacity = n
6828)), 6829 null == e ? a.transform("translate3d(" + o + ", " + s + ", 0px)") : ((t = e - (e - 1) * (1 - Math.abs(t))), a.transform("translate3d(" + o + ", " + s + ", 0px) scale(" + t + ")")); 6830 }, 6831 setTranslate: function () { 6832 var a = this, 6833 e = a.$el, 6834 t = a.slides, 6835 i = a.progress, 6836 r = a.snapGrid; 6837 e.children("[data-swiper-parallax], [data-swiper-parallax-x], [data-swiper-parallax-y], [data-swiper-parallax-opacity], [data-swiper-parallax-scale]").each(function (e) { 6838 a.parallax.setTransform(e, i); 6839 }), 6840 t.each(function (e, t) { 6841 var n = e.progress; 6842 1 < a.params.slidesPerGroup && "auto" !== a.params.slidesPerView && (n += Math.ceil(t / 2) - i * (r.length - 1)), 6843 (n = Math.min(Math.max(n, -1), 1)), 6844 E(e) 6845 .find("[data-swiper-parallax], [data-swiper-parallax-x], [data-swiper-parallax-y], [data-swiper-parallax-opacity], [data-swiper-parallax-scale]") 6846 .each(function (e) { 6847 a.parallax.setTransform(e, n); 6848 }); 6849 }); 6850 }, 6851 setTransition: function (n) { 6852 void 0 === n && (n = this.params.speed); 6853 this.$el.find("[data-swiper-parallax], [data-swiper-parallax-x], [data-swiper-parallax-y], [data-swiper-parallax-opacity], [data-swiper-parallax-scale]").each(function (e) { 6854 var t = E(e), 6855 e = parseInt(t.attr("data-swiper-parallax-duration"), 10) || n; 6856 0 === n && (e = 0), t.transition(e); 6857 }); 6858 }, 6859 }, 6860 ee = { 6861 name: "parallax", 6862 params: { parallax: { enabled: !1 } }, 6863 create: function () { 6864 x(this, { parallax: e({}, J) }); 6865 }, 6866 on: { 6867 beforeInit: function (e) { 6868 e.params.parallax.enabled && ((e.params.watchSlidesProgress = !0), (e.originalParams.watchSlidesProgress = !0)); 6869 }, 6870 init: function (e) { 6871 e.params.parallax.enabled && e.parallax.setTranslate(); 6872 }, 6873 setTranslate: function (e) { 6874 e.params.parallax.enabled && e.parallax.setTranslate(); 6875 }, 6876 setTransition: function (e, t) { 6877 e.params.parallax.enabled && e.parallax.setTransition(t); 6878 }, 6879 }, 6880 }, 6881 te = { 6882 getDistanceBetweenTouches: function (e) { 6883 if (e.targetTouches.length < 2) return 1; 6884 var t = e.targetTouches[0].pageX, 6885 n = e.targetTouches[0].pageY, 6886 a = e.targetTouches[1].pageX, 6887 e = e.targetTouches[1].pageY; 6888 return Math.sqrt(Math.pow(a - t, 2) + Math.pow(e - n, 2)); 6889 }, 6890 onGestureStart: function (e) { 6891 var t = this, 6892 n = t.support, 6893 a = t.params.zoom, 6894 i = t.zoom, 6895 r = i.gesture; 6896 if (((i.fakeGestureTouched = !1), (i.fakeGestureMoved = !1), !n.gestures)) { 6897 if ("touchstart" !== e.type || ("touchstart" === e.type && e.targetTouches.length < 2)) return; 6898 (i.fakeGestureTouched = !0), (r.scaleStart = te.getDistanceBetweenTouches(e)); 6899 } 6900 (r.$slideEl && r.$slideEl.length) || 6901 ((r.$slideEl = E(e.target).closest("." + t.params.slideClass)), 6902 0 === r.$slideEl.length && (r.$slideEl = t.slides.eq(t.activeIndex)), 6903 (r.$imageEl = r.$slideEl.find("img, svg, canvas, picture, .swiper-zoom-target")), 6904 (r.$imageWrapEl = r.$imageEl.parent("." + a.containerClass)), 6905 (r.maxRatio = r.$imageWrapEl.attr("data-swiper-zoom") || a.maxRatio), 6906 0 !== r.$imageWrapEl.length) 6907 ? (r.$imageEl && r.$imageEl.transition(0), (t.zoom.isScaling = !0)) 6908 : (r.$imageEl = void 0); 6909 }, 6910 onGestureChange: function (e) { 6911 var t = this.support, 6912 n = this.params.zoom, 6913 a = this.zoom, 6914 i = a.gesture; 6915 if (!t.gestures) { 6916 if ("touchmove" !== e.type || ("touchmove" === e.type && e.targetTouches.length < 2)) return; 6917 (a.fakeGestureMoved = !0), (i.scaleMove = te.getDistanceBetweenTouches(e)); 6918 } 6919 i.$imageEl && 0 !== i.$imageEl.length 6920 ? (t.gestures ? (a.scale = e.scale * a.currentScale) : (a.scale = (i.scaleMove / i.scaleStart) * a.currentScale), 6921 a.scale > i.maxRatio && (a.scale = i.maxRatio - 1 + Math.pow(a.scale - i.maxRatio + 1, 0.5)), 6922 a.scale < n.minRatio && (a.scale = n.minRatio + 1 - Math.pow(n.minRatio - a.scale + 1, 0.5)), 6923 i.$imageEl.transform("translate3d(0,0,0) scale(" + a.scale + ")")) 6924 : "gesturechange" === e.type && a.onGestureStart(e); 6925 }, 6926 onGestureEnd: function (e) { 6927 var t = this, 6928 n = t.device, 6929 a = t.support, 6930 i = t.params.zoom, 6931 r = t.zoom, 6932 o = r.gesture; 6933 if (!a.gestures) { 6934 if (!r.fakeGestureTouched || !r.fakeGestureMoved) return; 6935 if ("touchend" !== e.type || ("touchend" === e.type && e.changedTouches.length < 2 && !n.android)) return; 6936 (r.fakeGestureTouched = !1), (r.fakeGestureMoved = !1); 6937 } 6938 o.$imageEl && 6939 0 !== o.$imageEl.length && 6940 ((r.scale = Math.max(Math.min(r.scale, o.maxRatio), i.minRatio)), 6941 o.$imageEl.transition(t.params.speed).transform("translate3d(0,
69410,0) scale(" + r.scale + ")"), 6942 (r.currentScale = r.scale), 6943 (r.isScaling = !1), 6944 1 === r.scale && (o.$slideEl = void 0)); 6945 }, 6946 onTouchStart: function (e) { 6947 var t = this.device, 6948 n = this.zoom, 6949 a = n.gesture, 6950 n = n.image; 6951 a.$imageEl && 6952 0 !== a.$imageEl.length && 6953 (n.isTouched || 6954 (t.android && e.cancelable && e.preventDefault(), 6955 (n.isTouched = !0), 6956 (n.touchesStart.x = ("touchstart" === e.type ? e.targetTouches[0] : e).pageX), 6957 (n.touchesStart.y = ("touchstart" === e.type ? e.targetTouches[0] : e).pageY))); 6958 }, 6959 onTouchMove: function (e) { 6960 var t = this.zoom, 6961 n = t.gesture, 6962 a = t.image, 6963 i = t.velocity; 6964 if (n.$imageEl && 0 !== n.$imageEl.length && ((this.allowClick = !1), a.isTouched && n.$slideEl)) { 6965 a.isMoved || 6966 ((a.width = n.$imageEl[0].offsetWidth), 6967 (a.height = n.$imageEl[0].offsetHeight), 6968 (a.startX = g(n.$imageWrapEl[0], "x") || 0), 6969 (a.startY = g(n.$imageWrapEl[0], "y") || 0), 6970 (n.slideWidth = n.$slideEl[0].offsetWidth), 6971 (n.slideHeight = n.$slideEl[0].offsetHeight), 6972 n.$imageWrapEl.transition(0)); 6973 var r = a.width * t.scale, 6974 o = a.height * t.scale; 6975 if (!(r < n.slideWidth && o < n.slideHeight)) { 6976 if ( 6977 ((a.minX = Math.min(n.slideWidth / 2 - r / 2, 0)), 6978 (a.maxX = -a.minX), 6979 (a.minY = Math.min(n.slideHeight / 2 - o / 2, 0)), 6980 (a.maxY = -a.minY), 6981 (a.touchesCurrent.x = ("touchmove" === e.type ? e.targetTouches[0] : e).pageX), 6982 (a.touchesCurrent.y = ("touchmove" === e.type ? e.targetTouches[0] : e).pageY), 6983 !a.isMoved && !t.isScaling) 6984 ) { 6985 if (this.isHorizontal() && ((Math.floor(a.minX) === Math.floor(a.startX) && a.touchesCurrent.x < a.touchesStart.x) || (Math.floor(a.maxX) === Math.floor(a.startX) && a.touchesCurrent.x > a.touchesStart.x))) 6986 return void (a.isTouched = !1); 6987 if (!this.isHorizontal() && ((Math.floor(a.minY) === Math.floor(a.startY) && a.touchesCurrent.y < a.touchesStart.y) || (Math.floor(a.maxY) === Math.floor(a.startY) && a.touchesCurrent.y > a.touchesStart.y))) 6988 return void (a.isTouched = !1); 6989 } 6990 e.cancelable && e.preventDefault(), 6991 e.stopPropagation(), 6992 (a.isMoved = !0), 6993 (a.currentX = a.touchesCurrent.x - a.touchesStart.x + a.startX), 6994 (a.currentY = a.touchesCurrent.y - a.touchesStart.y + a.startY), 6995 a.currentX < a.minX && (a.currentX = a.minX + 1 - Math.pow(a.minX - a.currentX + 1, 0.8)), 6996 a.currentX > a.maxX && (a.currentX = a.maxX - 1 + Math.pow(a.currentX - a.maxX + 1, 0.8)), 6997 a.currentY < a.minY && (a.currentY = a.minY + 1 - Math.pow(a.minY - a.currentY + 1, 0.8)), 6998 a.currentY > a.maxY && (a.currentY = a.maxY - 1 + Math.pow(a.currentY - a.maxY + 1, 0.8)), 6999 i.prevPositionX || (i.prevPositionX = a.touchesCurrent.x), 7000 i.prevPositionY || (i.prevPositionY = a.touchesCurrent.y), 7001 i.prevTime || (i.prevTime = Date.now()), 7002 (i.x = (a.touchesCurrent.x - i.prevPositionX) / (Date.now() - i.prevTime) / 2), 7003 (i.y = (a.touchesCurrent.y - i.prevPositionY) / (Date.now() - i.prevTime) / 2), 7004 Math.abs(a.touchesCurrent.x - i.prevPositionX) < 2 && (i.x = 0), 7005 Math.abs(a.touchesCurrent.y - i.prevPositionY) < 2 && (i.y = 0), 7006 (i.prevPositionX = a.touchesCurrent.x), 7007 (i.prevPositionY = a.touchesCurrent.y), 7008 (i.prevTime = Date.now()), 7009 n.$imageWrapEl.transform("translate3d(" + a.currentX + "px, " + a.currentY + "px,0)"); 7010 } 7011 } 7012 }, 7013 onTouchEnd: function () { 7014 var e = this.zoom, 7015 t = e.gesture, 7016 n = e.image, 7017 a = e.velocity; 7018 if (t.$imageEl && 0 !== t.$imageEl.length) { 7019 if (!n.isTouched || !n.isMoved) return (n.isTouched = !1), void (n.isMoved = !1); 7020 (n.isTouched = !1), (n.isMoved = !1); 7021 var i = 300, 7022 r = 300, 7023 o = a.x * i, 7024 s = n.currentX + o, 7025 o = a.y * r, 7026 o = n.currentY + o; 7027 0 !== a.x && (i = Math.abs((s - n.currentX) / a.x)), 0 !== a.y && (r = Math.abs((o - n.currentY) / a.y)); 7028 r = Math.max(i, r); 7029 (n.currentX = s), (n.currentY = o); 7030 (o = n.width * e.scale), (e = n.height * e.scale); 7031 (n.minX = Math.min(t.slideWidth / 2 - o / 2, 0)), 7032 (n.maxX = -n.minX), 7033 (n.minY = Math.min(t.slideHeight / 2 - e / 2, 0)), 7034 (n.maxY = -n.minY), 7035 (n.currentX = Math.max(Math.min(n.currentX, n.maxX), n.minX)), 7036 (n.currentY = Math.max(Math.min(n.currentY, n.maxY), n.minY)), 7037 t.$imageWrapEl.transition(r).transform("translate3d(" + n.currentX + "px, " + n.currentY + "px,0
7037)"); 7038 } 7039 }, 7040 onTransitionEnd: function () { 7041 var e = this.zoom, 7042 t = e.gesture; 7043 t.$slideEl && 7044 this.previousIndex !== this.activeIndex && 7045 (t.$imageEl && t.$imageEl.transform("translate3d(0,0,0) scale(1)"), 7046 t.$imageWrapEl && t.$imageWrapEl.transform("translate3d(0,0,0)"), 7047 (e.scale = 1), 7048 (e.currentScale = 1), 7049 (t.$slideEl = void 0), 7050 (t.$imageEl = void 0), 7051 (t.$imageWrapEl = void 0)); 7052 }, 7053 toggle: function (e) { 7054 var t = this.zoom; 7055 t.scale && 1 !== t.scale ? t.out() : t.in(e); 7056 }, 7057 in: function (e) { 7058 var t, 7059 n, 7060 a, 7061 i = this, 7062 r = w(), 7063 o = i.zoom, 7064 s = i.params.zoom, 7065 l = o.gesture, 7066 d = o.image; 7067 l.$slideEl || 7068 (e && e.target && (l.$slideEl = E(e.target).closest("." + i.params.slideClass)), 7069 l.$slideEl || (i.params.virtual && i.params.virtual.enabled && i.virtual ? (l.$slideEl = i.$wrapperEl.children("." + i.params.slideActiveClass)) : (l.$slideEl = i.slides.eq(i.activeIndex))), 7070 (l.$imageEl = l.$slideEl.find("img, svg, canvas, picture, .swiper-zoom-target")), 7071 (l.$imageWrapEl = l.$imageEl.parent("." + s.containerClass))), 7072 l.$imageEl && 7073 0 !== l.$imageEl.length && 7074 l.$imageWrapEl && 7075 0 !== l.$imageWrapEl.length && 7076 (l.$slideEl.addClass("" + s.zoomedSlideClass), 7077 (d = void 0 === d.touchesStart.x && e ? ((t = ("touchend" === e.type ? e.changedTouches[0] : e).pageX), ("touchend" === e.type ? e.changedTouches[0] : e).pageY) : ((t = d.touchesStart.x), d.touchesStart.y)), 7078 (o.scale = l.$imageWrapEl.attr("data-swiper-zoom") || s.maxRatio), 7079 (o.currentScale = l.$imageWrapEl.attr("data-swiper-zoom") || s.maxRatio), 7080 e 7081 ? ((s = l.$slideEl[0].offsetWidth), 7082 (e = l.$slideEl[0].offsetHeight), 7083 (n = l.$slideEl.offset().left + r.scrollX + s / 2 - t), 7084 (a = l.$slideEl.offset().top + r.scrollY + e / 2 - d), 7085 (r = l.$imageEl[0].offsetWidth), 7086 (d = l.$imageEl[0].offsetHeight), 7087 (r = r * o.scale), 7088 (d = d * o.scale), 7089 (r = Math.min(s / 2 - r / 2, 0)), 7090 (e = Math.min(e / 2 - d / 2, 0)), 7091 (d = -r) < (n = (n = n * o.scale) < r ? r : n) && (n = d), 7092 (d = -e) < (a = (a = a * o.scale) < e ? e : a) && (a = d)) 7093 : (a = n = 0), 7094 l.$imageWrapEl.transition(300).transform("translate3d(" + n + "px, " + a + "px,0)"), 7095 l.$imageEl.transition(300).transform("translate3d(0,0,0) scale(" + o.scale + ")")); 7096 }, 7097 out: function () { 7098 var e = this, 7099 t = e.zoom, 7100 n = e.params.zoom, 7101 a = t.gesture; 7102 a.$slideEl || 7103 (e.params.virtual && e.params.virtual.enabled && e.virtual ? (a.$slideEl = e.$wrapperEl.children("." + e.params.slideActiveClass)) : (a.$slideEl = e.slides.eq(e.activeIndex)), 7104 (a.$imageEl = a.$slideEl.find("img, svg, canvas, picture, .swiper-zoom-target")), 7105 (a.$imageWrapEl = a.$imageEl.parent("." + n.containerClass))), 7106 a.$imageEl && 7107 0 !== a.$imageEl.length && 7108 a.$imageWrapEl && 7109 0 !== a.$imageWrapEl.length && 7110 ((t.scale = 1), 7111 (t.currentScale = 1), 7112 a.$imageWrapEl.transition(300).transform("translate3d(0,0,0)"), 7113 a.$imageEl.transition(300).transform("translate3d(0,0,0) scale(1)"), 7114 a.$slideEl.removeClass("" + n.zoomedSlideClass), 7115 (a.$slideEl = void 0)); 7116 }, 7117 toggleGestures: function (e) { 7118 var t = this.zoom, 7119 n = t.slideSelector, 7120 a = t.passiveListener; 7121 this.$wrapperEl[e]("gesturestart", n, t.onGestureStart, a), this.$wrapperEl[e]("gesturechange", n, t.onGestureChange, a), this.$wrapperEl[e]("gestureend", n, t.onGestureEnd, a); 7122 }, 7123 enableGestures: function () { 7124 this.zoom.gesturesEnabled || ((this.zoom.gesturesEnabled = !0), this.zoom.toggleGestures("on")); 7125 }, 7126 disableGestures: function () { 7127 this.zoom.gesturesEnabled && ((this.zoom.gesturesEnabled = !1), this.zoom.toggleGestures("off")); 7128 }, 7129 enable: function () { 7130 var e, 7131 t, 7132 n, 7133 a = this, 7134 i = a.support, 7135 r = a.zoom; 7136 r.enabled || 7137 ((r.enabled = !0), 7138 (e = !("touchstart" !== a.touchEvents.start || !i.passiveListener || !a.params.passiveListeners) && { passive: !0, capture: !1 }), 7139 (t = !i.passiveListener || { passive: !1, capture: !0 }), 7140 (n = "." + a.params.slideClass), 7141 (a.zoom.passiveListener = e), 7142 (a.zoom.slideSelector = n), 7143 i.gestures 7144 ? (a.$wrapperEl.on(a.touchEvents.start, a.zoom.enableGestures, e), a.$wrapperEl.on(a.touchEvents.end, a.zoom.disableGestures, e)) 7145 : "touchstart" === a.touchEvents.start && 7146 (a.$wrapperEl.on(a.touchEvents.start, n, r.onGestureStart, e), 7147 a.$wrapperEl.on(a.touchEvents.move, n, r.onGestureChange, t), 7148 a.$wrapperEl.on(a.touchEvents.end, n, r.onGestureEnd, e), 7149 a.touchEvents.cancel && a.$wrapperEl.on(a.touchEvents.cancel, n, r.onGestureEnd, e)), 7150 a.$wrapperEl.on(a.touchEvents.move, "." + a.params.zoom.containerClass, r.onTouchMove, t)); 7151 }, 7152 disable: function () { 7153 var e, 7154 t, 7155 n, 7156 a, 7157 i = this, 7158 r = i.zoom; 7159 r.enabled && 7160 ((e = i.support), 7161 (i.zoom.enabled = !1), 7162 (t = !("touchstart" !== i.touchEvents.start || !e.passiveListener || !i.params.passiveListeners) && { passive: !0, capture: !1 }), 7163 (n = !e.passiveListener || { passive: !1, capture: !0 }), 7164 (a = "." + i.params.slideClass), 7165 e.gestures 7166 ? (i.$wrapperEl.off(i.touchEvents.start, i.zoom.enableGestures, t), i.$wrapperEl.off(i.touchEvents.end, i.zoom.disableGestures, t)) 7167 : "touchstart" === i.touchEvents.start && 7168 (i.$wrapperEl.off(i.touchEvents.start, a, r.onGestureStart, t), 7169 i.$wrapperEl.off(i.touchEvents.move, a, r.onGestureChange, n), 7170 i.$wrapperEl.off(i.touchEvents.end, a, r.onGestureEnd, t), 7171 i.touchEvents.cancel && i.$wrapperEl.off(i.touchEvents.cancel, a, r.onGestureEnd, t)), 7172 i.$wrapperEl.off(i.touchEvents.move, "." + i.params.zoom.containerClass, r.onTouchMove, n)); 7173 }, 7174 }, 7175 ne = { 7176 name: "zoom", 7177 params: { zoom: { enabled: !1, maxRatio: 3, minRatio: 1, toggle: !0, containerClass: "swiper-zoom-container", zoomedSlideClass: "swiper-slide-zoomed" } }, 7178 create: function () { 7179 var a = this; 7180 x(a, { 7181 zoom: e( 7182 { 7183 enabled: !1, 7184 scale: 1, 7185 currentScale: 1, 7186 isScaling: !1, 7187 gesture: { $slideEl: void 0, slideWidth: void 0, slideHeight: void 0, $imageEl: void 0, $imageWrapEl: void 0, maxRatio: 3 }, 7188 image: { 7189 isTouched: void 0, 7190 isMoved: void 0, 7191 currentX: void 0, 7192 currentY: void 0, 7193 minX: void 0, 7194 minY: void 0, 7195 maxX: void 0, 7196 maxY: void 0, 7197 width: void 0, 7198 height: void 0, 7199 startX: void 0, 7200 startY: void 0, 7201 touchesStart: {}, 7202 touchesCurrent: {}, 7203 }, 7204 velocity: { x: void 0, y: void 0, prevPositionX: void 0, prevPositionY: void 0, prevTime: void 0 }, 7205 }, 7206 te 7207 ), 7208 }); 7209 var i = 1; 7210 Object.defineProperty(a.zoom, "scale", { 7211 get: function () { 7212 return i; 7213 }, 7214 set: function (e) { 7215 var t, n; 7216 i !== e && ((t = a.zoom.gesture.$imageEl ? a.zoom.gesture.$imageEl[0] : void 0), (n = a.zoom.gesture.$slideEl ? a.zoom.gesture.$slideEl[0] : void 0), a.emit("zoomChange", e, t, n)), (i = e); 7217 }, 7218 }); 7219 }, 7220 on: { 7221 init: function (e) { 7222 e.params.zoom.enabled && e.zoom.enable(); 7223 }, 7224 destroy: function (e) { 7225 e.zoom.disable(); 7226 }, 7227 touchStart: function (e, t) { 7228 e.zoom.enabled && e.zoom.onTouchStart(t); 7229 }, 7230 touchEnd: function (e, t) { 7231 e.zoom.enabled && e.zoom.onTouchEnd(t); 7232 }, 7233 doubleTap: function (e, t) { 7234 !e.animating && e.params.zoom.enabled && e.zoom.enabled && e.params.zoom.toggle && e.zoom.toggle(t); 7235 }, 7236 transitionEnd: function (e) { 7237 e.zoom.enabled && e.params.zoom.enabled && e.zoom.onTransitionEnd(); 7238 }, 7239 slideChange: function (e) { 7240 e.zoom.enabled && e.params.zoom.enabled && e.params.cssMode && e.zoom.onTransitionEnd(); 7241 }, 7242 }, 7243 }, 7244 ae = { 7245 loadInSlide: function (e, l) { 7246 void 0 === l && (l = !0); 7247 var d, 7248 c = this, 7249 u = c.params.lazy; 7250 void 0 !== e && 7251 0 !== c.slides.length && 7252 ((e = (d = c.virtual && c.params.virtual.enabled ? c.$wrapperEl.children("." + c.params.slideClass + '[data-swiper-slide-index="' + e + '"]') : c.slides.eq(e)).find( 7253 "." + u.elementClass + ":not(." + u.loadedClass + "):not(." + u.loadingClass + ")" 7254 )), 7255 !d.hasClass(u.elementClass) || d.hasClass(u.loadedClass) || d.hasClass(u.loadingClass) || e.push(d[0]), 7256 0 !== e.length && 7257 e.each(function (e) { 7258 var n = E(e); 7259 n.addClass(u.loadingClass); 7260 var a = n.attr("data-background"), 7261 i = n.attr("data-src"), 7262 r = n.attr("data-srcset"), 7263 o = n.attr("data-sizes"), 7264 s = n.parent("picture"); 7265 c.loadImage(n[0], i || a, r, o, !1, function () { 7266 var e, t; 7267 null == c || 7268 !c || 7269 (c && !c.params) || 7270 c.destroyed || 7271 (a 7272 ? (n.css("background-image", 'url("' + a + '")'), n.removeAttr("data-background")) 7273 : (r && (n.attr("srcset", r), n.removeAttr("data-srcset")), 7274 o && (n.attr("sizes", o), n.removeAttr("data-sizes")), 7275 s.length && 7276 s.children("source").each(function (e) { 7277 e = E(e); 7278 e.attr("data-srcset") && (e.attr("srcset", e.attr("data-srcset")), e.removeAttr("data-srcset")); 7279 }), 7280 i && (n.attr("src", i), n.removeAttr("data-src"))), 7281 n.addClass(u.loadedClass).removeClass(u.loadingClass), 7282 d.find("." + u.preloaderClass).remove(), 7283 c.params.loop && 7284 l && 7285 ((t = d.attr("data-swiper-slide-index")), 7286 d.hasClass(c.params.slideDuplicateClass) 7287 ? ((e = c.$wrapperEl.children('[data-swiper-slide-index="' + t + '"]:not(.' + c.params.slideDuplicateClass + ")")), c.lazy.loadInSlide(e.index(), !1)) 7288 : ((t = c.$wrapperEl.children("." + c.params.slideDuplicateClass + '[data-swiper-slide-index="' + t + '"]')), c.lazy.loadInSlide(t.index(), !1))), 7289 c.emit("lazyImageReady", d[0], n[0]), 7290 c.params.autoHeight && c.updateAutoHeight()); 7291 }), 7292 c.emit("lazyImageLoad", d[0], n[0]); 7293 })); 7294 }, 7295 load: function () { 7296 var t = this, 7297 n = t.$wrapperEl, 7298 a = t.params, 7299 i = t.slides, 7300 e = t.activeIndex, 7301 r = t.virtual && a.virtual.enabled, 7302 o = a.lazy, 7303 s = a.slidesPerView; 7304 function l(e) { 7305 if (r) { 7306 if (n.children("." + a.slideClass + '[data-swiper-slide-index="' + e + '"]').length) return 1; 7307 } else if (i[e]) return 1; 7308 } 7309 function d(e) { 7310 return r ? E(e).attr("data-swiper-slide-index") : E(e).index(); 7311 } 7312 if (("auto" === s && (s = 0), t.lazy.initialImageLoaded || (t.lazy.initialImageLoaded = !0), t.params.watchSlidesVisibility)) 7313 n.children("." + a.slideVisibleClass).each(function (e) { 7314 e = r ? E(e).attr("data-swiper-slide-index") : E(e).index(); 7315 t.lazy.loadInSlide(e); 7316 }); 7317 else if (1 < s) for (var c = e; c < e + s; c += 1) l(c) && t.lazy.loadInSlide(c); 7318 else t.lazy.loadInSlide(e); 7319 if (o.loadPrevNext) 7320 if (1 < s || (o.loadPrevNextAmount && 1 < o.loadPrevNextAmount)) { 7321 for (var u = o.loadPrevNextAmount, o = s, p = Math.min(e + o + Math.max(u, o), i.length), u = Math.max(e - Math.max(o, u), 0), f = e + s; f < p; f += 1) l(f) && t.lazy.loadInSlide(f); 7322 for (var h = u; h < e; h += 1) l(h) && t.lazy.loadInSlide(h); 7323 } else { 7324 u = n.children("." + a.slideNextClass); 7325 0 < u.length && t.lazy.loadInSlide(d(u)); 7326 u = n.children("." + a.slidePrevClass); 7327 0 < u.length && t.lazy.loadInSlide(d(u)); 7328 } 7329 }, 7330 checkInViewOnLoad: function () { 7331 var e = w(), 7332 t = this; 7333 if (t && !t.destroyed) { 7334 var n = t.params.lazy.scrollingElement ? E(t.params.lazy.scrollingElement) : E(e), 7335 a = n[0] === e, 7336 i = a ? e.innerWidth : n[0].offsetWidth,
7337 r = a ? e.innerHeight : n[0].offsetHeight, 7338 e = t.$el.offset(), 7339 o = !1; 7340 t.rtlTranslate && (e.left -= t.$el[0].scrollLeft); 7341 for ( 7342 var s = [ 7343 [e.left, e.top], 7344 [e.left + t.width, e.top], 7345 [e.left, e.top + t.height], 7346 [e.left + t.width, e.top + t.height], 7347 ], 7348 l = 0; 7349 l < s.length; 7350 l += 1 7351 ) { 7352 var d = s[l]; 7353 0 <= d[0] && d[0] <= i && 0 <= d[1] && d[1] <= r && ((0 === d[0] && 0 === d[1]) || (o = !0)); 7354 } 7355 e = !("touchstart" !== t.touchEvents.start || !t.support.passiveListener || !t.params.passiveListeners) && { passive: !0, capture: !1 }; 7356 o ? (t.lazy.load(), n.off("scroll", t.lazy.checkInViewOnLoad, e)) : t.lazy.scrollHandlerAttached || ((t.lazy.scrollHandlerAttached = !0), n.on("scroll", t.lazy.checkInViewOnLoad, e)); 7357 } 7358 }, 7359 }, 7360 ie = { 7361 name: "lazy", 7362 params: { 7363 lazy: { 7364 checkInView: !1, 7365 enabled: !1, 7366 loadPrevNext: !1, 7367 loadPrevNextAmount: 1, 7368 loadOnTransitionStart: !1, 7369 scrollingElement: "", 7370 elementClass: "swiper-lazy", 7371 loadingClass: "swiper-lazy-loading", 7372 loadedClass: "swiper-lazy-loaded", 7373 preloaderClass: "swiper-lazy-preloader", 7374 }, 7375 }, 7376 create: function () { 7377 x(this, { lazy: e({ initialImageLoaded: !1 }, ae) }); 7378 }, 7379 on: { 7380 beforeInit: function (e) { 7381 e.params.lazy.enabled && e.params.preloadImages && (e.params.preloadImages = !1); 7382 }, 7383 init: function (e) { 7384 e.params.lazy.enabled && !e.params.loop && 0 === e.params.initialSlide && (e.params.lazy.checkInView ? e.lazy.checkInViewOnLoad() : e.lazy.load()); 7385 }, 7386 scroll: function (e) { 7387 e.params.freeMode && !e.params.freeModeSticky && e.lazy.load(); 7388 }, 7389 "scrollbarDragMove resize _freeModeNoMomentumRelease": function (e) { 7390 e.params.lazy.enabled && e.lazy.load(); 7391 }, 7392 transitionStart: function (e) { 7393 e.params.lazy.enabled && ((!e.params.lazy.loadOnTransitionStart && (e.params.lazy.loadOnTransitionStart || e.lazy.initialImageLoaded)) || e.lazy.load()); 7394 }, 7395 transitionEnd: function (e) { 7396 e.params.lazy.enabled && !e.params.lazy.loadOnTransitionStart && e.lazy.load(); 7397 }, 7398 slideChange: function (e) { 7399 var t = e.params, 7400 n = t.lazy, 7401 a = t.cssMode, 7402 i = t.watchSlidesVisibility, 7403 r = t.watchSlidesProgress, 7404 o = t.touchReleaseOnEdges, 7405 t = t.resistanceRatio; 7406 n.enabled && (a || ((i || r) && (o || 0 === t))) && e.lazy.load(); 7407 }, 7408 }, 7409 }, 7410 re = { 7411 LinearSpline: function (e, t) { 7412 var n, 7413 a, 7414 i, 7415 r, 7416 o, 7417 s = function (e, t) { 7418 for (a = -1, n = e.length; 1 < n - a; ) e[(i = (n + a) >> 1)] <= t ? (a = i) : (n = i); 7419 return n; 7420 }; 7421 return ( 7422 (this.x = e), 7423 (this.y = t), 7424 (this.lastIndex = e.length - 1), 7425 (this.interpolate = function (e) { 7426 return e ? ((o = s(this.x, e)), (r = o - 1), ((e - this.x[r]) * (this.y[o] - this.y[r])) / (this.x[o] - this.x[r]) + this.y[r]) : 0; 7427 }), 7428 this 7429 ); 7430 }, 7431 getInterpolateFunction: function (e) { 7432 var t = this; 7433 t.controller.spline || (t.controller.spline = t.params.loop ? new re.LinearSpline(t.slidesGrid, e.slidesGrid) : new re.LinearSpline(t.snapGrid, e.snapGrid)); 7434 }, 7435 setTranslate: function (e, t) { 7436 var n, 7437 a, 7438 i = this, 7439 r = i.controller.control, 7440 o = i.constructor; 7441 function s(e) { 7442 var t = i.rtlTranslate ? -i.translate : i.translate; 7443 "slide" === i.params.controller.by && (i.controller.getInterpolateFunction(e), (a = -i.controller.spline.interpolate(-t))), 7444 (a && "container" !== i.params.controller.by) || ((n = (e.maxTranslate() - e.minTranslate()) / (i.maxTranslate() - i.minTranslate())), (a = (t - i.minTranslate()) * n + e.minTranslate())), 7445 i.params.controller.inverse && (a = e.maxTranslate() - a), 7446 e.updateProgress(a), 7447 e.setTranslate(a, i), 7448 e.updateActiveIndex(), 7449 e.updateSlidesClasses(); 7450 } 7451 if (Array.isArray(r)) for (var l = 0; l < r.length; l += 1) r[l] !== t && r[l] instanceof o && s(r[l]); 7452 else r instanceof o && t !== r && s(r); 7453 }, 7454 setTransition: function (t, e) { 7455 var n, 7456 a = this, 7457 i = a.constructor,
7458 r = a.controller.control; 7459 function o(e) { 7460 e.setTransition(t, a), 7461 0 !== t && 7462 (e.transitionStart(), 7463 e.params.autoHeight && 7464 S(function () { 7465 e.updateAutoHeight(); 7466 }), 7467 e.$wrapperEl.transitionEnd(function () { 7468 r && (e.params.loop && "slide" === a.params.controller.by && e.loopFix(), e.transitionEnd()); 7469 })); 7470 } 7471 if (Array.isArray(r)) for (n = 0; n < r.length; n += 1) r[n] !== e && r[n] instanceof i && o(r[n]); 7472 else r instanceof i && e !== r && o(r); 7473 }, 7474 }, 7475 oe = { 7476 name: "controller", 7477 params: { controller: { control: void 0, inverse: !1, by: "slide" } }, 7478 create: function () { 7479 x(this, { controller: e({ control: this.params.controller.control }, re) }); 7480 }, 7481 on: { 7482 update: function (e) { 7483 e.controller.control && e.controller.spline && ((e.controller.spline = void 0), delete e.controller.spline); 7484 }, 7485 resize: function (e) { 7486 e.controller.control && e.controller.spline && ((e.controller.spline = void 0), delete e.controller.spline); 7487 }, 7488 observerUpdate: function (e) { 7489 e.controller.control && e.controller.spline && ((e.controller.spline = void 0), delete e.controller.spline); 7490 }, 7491 setTranslate: function (e, t, n) { 7492 e.controller.control && e.controller.setTranslate(t, n); 7493 }, 7494 setTransition: function (e, t, n) { 7495 e.controller.control && e.controller.setTransition(t, n); 7496 }, 7497 }, 7498 }, 7499 se = { 7500 getRandomNumber: function (e) { 7501 return "x".repeat((e = void 0 === e ? 16 : e)).replace(/x/g, function () { 7502 return Math.round(16 * Math.random()).toString(16); 7503 }); 7504 }, 7505 makeElFocusable: function (e) { 7506 return e.attr("tabIndex", "0"), e; 7507 }, 7508 makeElNotFocusable: function (e) { 7509 return e.attr("tabIndex", "-1"), e; 7510 }, 7511 addElRole: function (e, t) { 7512 return e.attr("role", t), e; 7513 }, 7514 addElRoleDescription: function (e, t) { 7515 return e.attr("aria-roledescription", t), e; 7516 }, 7517 addElControls: function (e, t) { 7518 return e.attr("aria-controls", t), e; 7519 }, 7520 addElLabel: function (e, t) { 7521 return e.attr("aria-label", t), e; 7522 }, 7523 addElId: function (e, t) { 7524 return e.attr("id", t), e; 7525 }, 7526 addElLive: function (e, t) { 7527 return e.attr("aria-live", t), e; 7528 }, 7529 disableEl: function (e) { 7530 return e.attr("aria-disabled", !0), e; 7531 }, 7532 enableEl: function (e) { 7533 return e.attr("aria-disabled", !1), e; 7534 }, 7535 onEnterOrSpaceKey: function (e) { 7536 var t, n; 7537 (13 !== e.keyCode && 32 !== e.keyCode) || 7538 ((n = (t = this).params.a11y), 7539 (e = E(e.target)), 7540 t.navigation && t.navigation.$nextEl && e.is(t.navigation.$nextEl) && ((t.isEnd && !t.params.loop) || t.slideNext(), t.isEnd ? t.a11y.notify(n.lastSlideMessage) : t.a11y.notify(n.nextSlideMessage)), 7541 t.navigation && t.navigation.$prevEl && e.is(t.navigation.$prevEl) && ((t.isBeginning && !t.params.loop) || t.slidePrev(), t.isBeginning ? t.a11y.notify(n.firstSlideMessage) : t.a11y.notify(n.prevSlideMessage)), 7542 t.pagination && e.is(_(t.params.pagination.bulletClass)) && e[0].click()); 7543 }, 7544 notify: function (e) { 7545 var t = this.a11y.liveRegion; 7546 0 !== t.length && (t.html(""), t.html(e)); 7547 }, 7548 updateNavigation: function () { 7549 var e, 7550 t, 7551 n = this; 7552 !n.params.loop && 7553 n.navigation && 7554 ((e = (t = n.navigation).$nextEl), 7555 (t = t.$prevEl) && 0 < t.length && (n.isBeginning ? (n.a11y.disableEl(t), n.a11y.makeElNotFocusable(t)) : (n.a11y.enableEl(t), n.a11y.makeElFocusable(t))), 7556 e && 0 < e.length && (n.isEnd ? (n.a11y.disableEl(e), n.a11y.makeElNotFocusable(e)) : (n.a11y.enableEl(e), n.a11y.makeElFocusable(e)))); 7557 }, 7558 updatePagination: function () { 7559 var t = this, 7560 n = t.params.a11y; 7561 t.pagination && 7562 t.params.pagination.clickable && 7563 t.pagination.bullets && 7564 t.pagination.bullets.length && 7565 t.pagination.bullets.each(function (e) { 7566 e = E(e); 7567 t.a11y.makeElFocusable(e), t.params.pagination.renderBullet || (t.a11y.addElRole(e, "button"), t.a11y.addElLabel(e, n.paginationBulletMessage.replace(/\{\{index\}\}/, e.index() + 1))); 7568 }); 7569 }, 7570 init: function () { 7571 var n = this, 7572 a = n.params.a11y;
7573 n.$el.append(n.a11y.liveRegion); 7574 var e = n.$el; 7575 a.containerRoleDescriptionMessage && n.a11y.addElRoleDescription(e, a.containerRoleDescriptionMessage), a.containerMessage && n.a11y.addElLabel(e, a.containerMessage); 7576 var t = n.$wrapperEl, 7577 i = t.attr("id") || "swiper-wrapper-" + n.a11y.getRandomNumber(16), 7578 e = n.params.autoplay && n.params.autoplay.enabled ? "off" : "polite"; 7579 n.a11y.addElId(t, i), n.a11y.addElLive(t, e), a.itemRoleDescriptionMessage && n.a11y.addElRoleDescription(E(n.slides), a.itemRoleDescriptionMessage), n.a11y.addElRole(E(n.slides), a.slideRole); 7580 var r, 7581 o, 7582 s = (n.params.loop 7583 ? n.slides.filter(function (e) { 7584 return !e.classList.contains(n.params.slideDuplicateClass); 7585 }) 7586 : n.slides 7587 ).length; 7588 n.slides.each(function (e, t) { 7589 (e = E(e)), (t = n.params.loop ? parseInt(e.attr("data-swiper-slide-index"), 10) : t), (t = a.slideLabelMessage.replace(/\{\{index\}\}/, t + 1).replace(/\{\{slidesLength\}\}/, s)); 7590 n.a11y.addElLabel(e, t); 7591 }), 7592 n.navigation && n.navigation.$nextEl && (r = n.navigation.$nextEl), 7593 n.navigation && n.navigation.$prevEl && (o = n.navigation.$prevEl), 7594 r && 7595 r.length && 7596 (n.a11y.makeElFocusable(r), "BUTTON" !== r[0].tagName && (n.a11y.addElRole(r, "button"), r.on("keydown", n.a11y.onEnterOrSpaceKey)), n.a11y.addElLabel(r, a.nextSlideMessage), n.a11y.addElControls(r, i)), 7597 o && 7598 o.length && 7599 (n.a11y.makeElFocusable(o), "BUTTON" !== o[0].tagName && (n.a11y.addElRole(o, "button"), o.on("keydown", n.a11y.onEnterOrSpaceKey)), n.a11y.addElLabel(o, a.prevSlideMessage), n.a11y.addElControls(o, i)), 7600 n.pagination && n.params.pagination.clickable && n.pagination.bullets && n.pagination.bullets.length && n.pagination.$el.on("keydown", _(n.params.pagination.bulletClass), n.a11y.onEnterOrSpaceKey); 7601 }, 7602 destroy: function () { 7603 var e, 7604 t, 7605 n = this; 7606 n.a11y.liveRegion && 0 < n.a11y.liveRegion.length && n.a11y.liveRegion.remove(), 7607 n.navigation && n.navigation.$nextEl && (e = n.navigation.$nextEl), 7608 n.navigation && n.navigation.$prevEl && (t = n.navigation.$prevEl), 7609 e && e.off("keydown", n.a11y.onEnterOrSpaceKey), 7610 t && t.off("keydown", n.a11y.onEnterOrSpaceKey), 7611 n.pagination && n.params.pagination.clickable && n.pagination.bullets && n.pagination.bullets.length && n.pagination.$el.off("keydown", _(n.params.pagination.bulletClass), n.a11y.onEnterOrSpaceKey); 7612 }, 7613 }, 7614 le = { 7615 name: "a11y", 7616 params: { 7617 a11y: { 7618 enabled: !0, 7619 notificationClass: "swiper-notification", 7620 prevSlideMessage: "Previous slide", 7621 nextSlideMessage: "Next slide", 7622 firstSlideMessage: "This is the first slide", 7623 lastSlideMessage: "This is the last slide", 7624 paginationBulletMessage: "Go to slide {{index}}", 7625 slideLabelMessage: "{{index}} / {{slidesLength}}", 7626 containerMessage: null, 7627 containerRoleDescriptionMessage: null, 7628 itemRoleDescriptionMessage: null, 7629 slideRole: "group", 7630 }, 7631 }, 7632 create: function () { 7633 x(this, { a11y: e({}, se, { liveRegion: E('<span class="' + this.params.a11y.notificationClass + '" aria-live="assertive" aria-atomic="true"></span>') }) }); 7634 }, 7635 on: { 7636 afterInit: function (e) { 7637 e.params.a11y.enabled && (e.a11y.init(), e.a11y.updateNavigation()); 7638 }, 7639 toEdge: function (e) { 7640 e.params.a11y.enabled && e.a11y.updateNavigation(); 7641 }, 7642 fromEdge: function (e) { 7643 e.params.a11y.enabled && e.a11y.updateNavigation(); 7644 }, 7645 paginationUpdate: function (e) { 7646 e.params.a11y.enabled && e.a11y.updatePagination(); 7647 }, 7648 destroy: function (e) { 7649 e.params.a11y.enabled && e.a11y.destroy(); 7650 }, 7651 }, 7652 }, 7653 de = { 7654 init: function () { 7655 var e = this, 7656 t = w(); 7657 if (e.params.history) { 7658 if (!t.history || !t.history.pushState) return (e.params.history.enabled = !1), void (e.params.hashNavigation.enabled = !0); 7659 var n = e.history; 7660 (n.initialized = !0), 7661 (n.paths = de.getPathValues(e.params.url)), 7662 (n.paths.key || n.paths.value) && (n.scrollToSlide(0, n.paths.value, e.params.runCallbacksOnInit), e.params.history.replaceState || t.addEventListener("popstate", e.history.setHistoryPopState)); 7663 } 7664 }, 7665 destroy: function () { 7666 var e = w(); 7667 this.params.history.replaceState || e.removeEventListener("popstate", this.history.setHistoryPopState); 7668 }, 7669 setHistoryPopState: function () { 7670 var e = this; 7671 (e.history.paths = de.getPathValues(e.params.url)), e.history.scrollToSlide(e.params.speed, e.history.paths.value, !1); 7672 }, 7673 getPathValues: function (e) { 7674 var t = w(), 7675 e = e ? new URL(e) : t.location, 7676 t = e.pathname 7677 .slice(1) 7678 .split("/") 7679 .filter(function (e) { 7680 return "" !== e; 7681 }), 7682 e = t.length; 7683 return { key: t[e - 2], value: t[e - 1] }; 7684 }, 7685 setHistory: function (e, t) { 7686 var n, 7687 a, 7688 i = this, 7689 r = w(); 7690 i.history.initialized && 7691 i.params.history.enabled && 7692 ((n = i.params.url ? new URL(i.params.url) : r.location), 7693 (a = i.slides.eq(t)), 7694 (t = de.slugify(a.attr("data-history"))), 7695 0 < i.params.history.root.length ? (t = (a = "/" === (a = i.params.history.root)[a.length - 1] ? a.slice(0, a.length - 1) : a) + "/" + e + "/" + t)
7695: n.pathname.includes(e) || (t = e + "/" + t), 7696 ((e = r.history.state) && e.value === t) || (i.params.history.replaceState ? r.history.replaceState({ value: t }, null, t) : r.history.pushState({ value: t }, null, t))); 7697 }, 7698 slugify: function (e) { 7699 return e 7700 .toString() 7701 .replace(/\s+/g, "-") 7702 .replace(/[^\w-]+/g, "") 7703 .replace(/--+/g, "-") 7704 .replace(/^-+/, "") 7705 .replace(/-+$/, ""); 7706 }, 7707 scrollToSlide: function (e, t, n) { 7708 var a = this; 7709 if (t) 7710 for (var i = 0, r = a.slides.length; i < r; i += 1) { 7711 var o = a.slides.eq(i); 7712 de.slugify(o.attr("data-history")) !== t || o.hasClass(a.params.slideDuplicateClass) || ((o = o.index()), a.slideTo(o, e, n)); 7713 } 7714 else a.slideTo(0, e, n); 7715 }, 7716 }, 7717 ce = { 7718 name: "history", 7719 params: { history: { enabled: !1, root: "", replaceState: !1, key: "slides" } }, 7720 create: function () { 7721 x(this, { history: e({}, de) }); 7722 }, 7723 on: { 7724 init: function (e) { 7725 e.params.history.enabled && e.history.init(); 7726 }, 7727 destroy: function (e) { 7728 e.params.history.enabled && e.history.destroy(); 7729 }, 7730 "transitionEnd _freeModeNoMomentumRelease": function (e) { 7731 e.history.initialized && e.history.setHistory(e.params.history.key, e.activeIndex); 7732 }, 7733 slideChange: function (e) { 7734 e.history.initialized && e.params.cssMode && e.history.setHistory(e.params.history.key, e.activeIndex); 7735 }, 7736 }, 7737 }, 7738 ue = { 7739 onHashChange: function () { 7740 var e = this, 7741 t = b(); 7742 e.emit("hashChange"); 7743 t = t.location.hash.replace("#", ""); 7744 t === e.slides.eq(e.activeIndex).attr("data-hash") || (void 0 !== (t = e.$wrapperEl.children("." + e.params.slideClass + '[data-hash="' + t + '"]').index()) && e.slideTo(t)); 7745 }, 7746 setHash: function () { 7747 var e = this, 7748 t = w(), 7749 n = b(); 7750 e.hashNavigation.initialized && 7751 e.params.hashNavigation.enabled && 7752 (e.params.hashNavigation.replaceState && t.history && t.history.replaceState 7753 ? t.history.replaceState(null, null, "#" + e.slides.eq(e.activeIndex).attr("data-hash") || "") 7754 : ((t = (t = e.slides.eq(e.activeIndex)).attr("data-hash") || t.attr("data-history")), (n.location.hash = t || "")), 7755 e.emit("hashSet")); 7756 }, 7757 init: function () { 7758 var e = this, 7759 t = b(), 7760 n = w(); 7761 if (!(!e.params.hashNavigation.enabled || (e.params.history && e.params.history.enabled))) { 7762 e.hashNavigation.initialized = !0; 7763 var a = t.location.hash.replace("#", ""); 7764 if (a) 7765 for (var i = 0, r = e.slides.length; i < r; i += 1) { 7766 var o = e.slides.eq(i); 7767 (o.attr("data-hash") || o.attr("data-history")) !== a || o.hasClass(e.params.slideDuplicateClass) || ((o = o.index()), e.slideTo(o, 0, e.params.runCallbacksOnInit, !0)); 7768 } 7769 e.params.hashNavigation.watchState && E(n).on("hashchange", e.hashNavigation.onHashChange); 7770 } 7771 }, 7772 destroy: function () { 7773 var e = w(); 7774 this.params.hashNavigation.watchState && E(e).off("hashchange", this.hashNavigation.onHashChange); 7775 }, 7776 }, 7777 pe = { 7778 name: "hash-navigation", 7779 params: { hashNavigation: { enabled: !1, replaceState: !1, watchState: !1 } }, 7780 create: function () { 7781 x(this, { hashNavigation: e({ initialized: !1 }, ue) }); 7782 }, 7783 on: { 7784 init: function (e) { 7785 e.params.hashNavigation.enabled && e.hashNavigation.init(); 7786 }, 7787 destroy: function (e) { 7788 e.params.hashNavigation.enabled && e.hashNavigation.destroy(); 7789 }, 7790 "transitionEnd _freeModeNoMomentumRelease": function (e) { 7791 e.hashNavigation.initialized && e.hashNavigation.setHash(); 7792 }, 7793 slideChange: function (e) { 7794 e.hashNavigation.initialized && e.params.cssMode && e.hashNavigation.setHash(); 7795 }, 7796 }, 7797 }, 7798 fe = { 7799 run: function () { 7800 var t = this, 7801 e = t.slides.eq(t.activeIndex), 7802 n = t.params.autoplay.delay; 7803 e.attr("data-swiper-autoplay") && (n = e.attr("data-swiper-autoplay") || t.params.autoplay.delay), 7804 clearTimeout(t.autoplay.timeout), 7805 (t.autoplay.timeout = S(function () { 7806 var e; 7807 t.params.autoplay.reverseDirection 7808 ? t.params.loop 7809 ? (t.loopFix(), (e = t.slidePrev(t.params.speed, !0, !0)), t.emit("autoplay")) 7810 : t.isBeginning 7811 ? t.params.autoplay.stopOnLastSlide 7812 ? t.autoplay.stop() 7813 : ((e = t.slideTo(t.slides.length - 1, t.params.speed, !0, !0)), t.emit("autoplay")) 7814 : ((e = t.slidePrev(t.params.speed, !0, !0)), t.emit("autoplay")) 7815 : t.params.loop 7816 ? (t.loopFix(), (e = t.slideNext(t.params.speed, !0, !0)), t.emit("autoplay")) 7817 : t.isEnd 7818 ? t.params.autoplay.stopOnLastSlide 7819 ? t.autoplay.stop() 7820 : ((e = t.slideTo(0, t.params.speed, !0, !0)), t.emit("autoplay")) 7821 : ((e = t.slideNext(t.params.speed, !0, !0)), t.emit("autoplay")), 7822 ((t.params.cssMode && t.autoplay.running) || !1 === e) && t.autoplay.run(); 7823 }, n)); 7824 }, 7825 start: function () { 7826 var e = this; 7827 return void 0 === e.autoplay.timeout && !e.autoplay.running && ((e.autoplay.running = !0), e.emit("autoplayStart"), e.autoplay.run(), !0); 7828 }, 7829 stop: function () { 7830 var e = this; 7831 return !!e.autoplay.running && void 0 !== e.autoplay.timeout && (e.autoplay.timeout && (clearTimeout(e.autoplay.timeout), (e.autoplay.timeout = void 0)), (e.autoplay.running = !1), e.emit("autoplayStop"), !0); 7832 }, 7833 pause: function (e) { 7834 var t = this; 7835 t.autoplay.running &&
7836 (t.autoplay.paused || 7837 (t.autoplay.timeout && clearTimeout(t.autoplay.timeout), 7838 (t.autoplay.paused = !0), 7839 0 !== e && t.params.autoplay.waitForTransition 7840 ? ["transitionend", "webkitTransitionEnd"].forEach(function (e) { 7841 t.$wrapperEl[0].addEventListener(e, t.autoplay.onTransitionEnd); 7842 }) 7843 : ((t.autoplay.paused = !1), t.autoplay.run()))); 7844 }, 7845 onVisibilityChange: function () { 7846 var e = this, 7847 t = b(); 7848 "hidden" === t.visibilityState && e.autoplay.running && e.autoplay.pause(), "visible" === t.visibilityState && e.autoplay.paused && (e.autoplay.run(), (e.autoplay.paused = !1)); 7849 }, 7850 onTransitionEnd: function (e) { 7851 var t = this; 7852 t && 7853 !t.destroyed && 7854 t.$wrapperEl && 7855 e.target === t.$wrapperEl[0] && 7856 (["transitionend", "webkitTransitionEnd"].forEach(function (e) { 7857 t.$wrapperEl[0].removeEventListener(e, t.autoplay.onTransitionEnd); 7858 }), 7859 (t.autoplay.paused = !1), 7860 t.autoplay.running ? t.autoplay.run() : t.autoplay.stop()); 7861 }, 7862 onMouseEnter: function () { 7863 var t = this; 7864 t.params.autoplay.disableOnInteraction ? t.autoplay.stop() : t.autoplay.pause(), 7865 ["transitionend", "webkitTransitionEnd"].forEach(function (e) { 7866 t.$wrapperEl[0].removeEventListener(e, t.autoplay.onTransitionEnd); 7867 }); 7868 }, 7869 onMouseLeave: function () { 7870 this.params.autoplay.disableOnInteraction || ((this.autoplay.paused = !1), this.autoplay.run()); 7871 }, 7872 attachMouseEvents: function () { 7873 var e = this; 7874 e.params.autoplay.pauseOnMouseEnter && (e.$el.on("mouseenter", e.autoplay.onMouseEnter), e.$el.on("mouseleave", e.autoplay.onMouseLeave)); 7875 }, 7876 detachMouseEvents: function () { 7877 this.$el.off("mouseenter", this.autoplay.onMouseEnter), this.$el.off("mouseleave", this.autoplay.onMouseLeave); 7878 }, 7879 }, 7880 he = { 7881 name: "autoplay", 7882 params: { autoplay: { enabled: !1, delay: 3e3, waitForTransition: !0, disableOnInteraction: !0, stopOnLastSlide: !1, reverseDirection: !1, pauseOnMouseEnter: !1 } }, 7883 create: function () { 7884 x(this, { autoplay: e({}, fe, { running: !1, paused: !1 }) }); 7885 }, 7886 on: { 7887 init: function (e) { 7888 e.params.autoplay.enabled && (e.autoplay.start(), b().addEventListener("visibilitychange", e.autoplay.onVisibilityChange), e.autoplay.attachMouseEvents()); 7889 }, 7890 beforeTransitionStart: function (e, t, n) { 7891 e.autoplay.running && (n || !e.params.autoplay.disableOnInteraction ? e.autoplay.pause(t) : e.autoplay.stop()); 7892 }, 7893 sliderFirstMove: function (e) { 7894 e.autoplay.running && (e.params.autoplay.disableOnInteraction ? e.autoplay.stop() : e.autoplay.pause()); 7895 }, 7896 touchEnd: function (e) { 7897 e.params.cssMode && e.autoplay.paused && !e.params.autoplay.disableOnInteraction && e.autoplay.run(); 7898 }, 7899 destroy: function (e) { 7900 e.autoplay.detachMouseEvents(), e.autoplay.running && e.autoplay.stop(), b().removeEventListener("visibilitychange", e.autoplay.onVisibilityChange); 7901 }, 7902 }, 7903 }, 7904 me = { 7905 setTranslate: function () { 7906 for (var e = this, t = e.slides, n = 0; n < t.length; n += 1) { 7907 var a = e.slides.eq(n), 7908 i = -a[0].swiperSlideOffset; 7909 e.params.virtualTranslate || (i -= e.translate); 7910 var r = 0; 7911 e.isHorizontal() || ((r = i), (i = 0)); 7912 var o = e.params.fadeEffect.crossFade ? Math.max(1 - Math.abs(a[0].progress), 0) : 1 + Math.min(Math.max(a[0].progress, -1), 0); 7913 a.css({ opacity: o }).transform("translate3d(" + i + "px, " + r + "px, 0px)"); 7914 } 7915 }, 7916 setTransition: function (e) { 7917 var n, 7918 a = this, 7919 t = a.slides, 7920 i = a.$wrapperEl; 7921 t.transition(e), 7922 a.params.virtualTranslate && 7923 0 !== e && 7924 ((n = !1), 7925 t.transitionEnd(function () { 7926 if (!n && a && !a.destroyed) { 7927 (n = !0), (a.animating = !1); 7928 for (var e = ["webkitTransitionEnd", "transitionend"], t = 0; t < e.length; t += 1) i.trigger(e[t]); 7929 } 7930 })); 7931 }, 7932 }, 7933 ve = { 7934 name: "effect-fade", 7935 params: { fadeEffect: { crossFade: !1 } }, 7936 create: function () { 7937 x(this, { fadeEffect: e({}, me) }); 7938 }, 7939 on: { 7940 beforeInit: function (e) { 7941 var t; 7942 "fade" === e.params.effect && 7943 (e.classNames.push(e.params.containerModifierClass + "fade"), 7944 Y(e.params, (t = { slidesPerView: 1, slidesPerColumn: 1, slidesPerGroup: 1, watchSlidesProgress: !0, spaceBetween: 0, virtualTranslate: !0 })), 7945 Y(e.originalParams, t)); 7946 }, 7947 setTranslate: function (e) { 7948 "fade" === e.params.effect && e.fadeEffect.setTranslate(); 7949 }, 7950 setTransition: function (e, t) { 7951 "fade" === e.params.effect && e.fadeEffect.setTransition(t); 7952 }, 7953 }, 7954 }, 7955 ge = { 7956 setTranslate: function () { 7957 var e, 7958 t = this, 7959 n = t.$el, 7960 a = t.$wrapperEl, 7961 i = t.slides, 7962 r = t.width, 7963 o = t.height, 7964 s = t.rtlTranslate, 7965 l = t.size, 7966 d = t.browser, 7967 c = t.params.cubeEffect, 7968 u = t.isHorizontal(), 7969 p = t.virtual && t.params.virtual.enabled, 7970 f = 0; 7971 c.shadow && 7972 (u 7973 ? (0 === (e = a.find(".swiper-cube-shadow")).length && ((e = E('<div class="swiper-cube-shadow"></div>')), a.append(e)), e.css({ height: r + "px" })) 7974 : 0 === (e = n.find(".swiper-cube-shadow")).length && ((e = E('<div class="swiper-cube-shadow"></div>')), n.append(e))); 7975 for (var h, m = 0; m < i.length; m += 1) { 7976 var v = i.eq(m), 7977 g = m, 7978 y = 90 * (g = p ? parseInt(v.attr("data-swiper-slide-index"), 10) : g), 7979 b = Math.floor(y / 360); 7980 s && ((y = -y), (b = Math.floor(-y / 360))); 7981 var w = Math.max(Math.min(v[0].progress, 1), -1), 7982 x = 0, 7983 _ = 0, 7984 T = 0; 7985 g % 4 == 0 ? ((x = 4 * -b * l), (T = 0)) : (g - 1) % 4 == 0 ? ((x = 0), (T = 4 * -b * l)) : (g - 2) % 4 == 0 ? ((x = l + 4 * b * l), (T = l)) : (g - 3) % 4 == 0 && ((x = -l), (T = 3 * l + 4 * l * b)), 7986 s && (x = -x), 7987 u || ((_ = x), (x = 0)), 7988 w <= 1 && -1 < w && (f = s ? 90 * -g - 90 * w : 90 * g + 90 * w), 7989 v.transform("rotateX(" + (u ? 0 : -y) + "deg) rotateY(" + (u ? y : 0) + "deg) translate3d(" + x + "px, " + _ + "px, " + T + "px)"), 7990 c.slideShadows && 7991 ((_ = u ? v.find(".swiper-slide-shadow-left") : v.find(".swiper-slide-shadow-top")), 7992 (T = u ? v.find(".swiper-slide-shadow-right") : v.find(".swiper-slide-shadow-bottom")), 7993 0 === _.length && ((_ = E('<div class="swiper-slide-shadow-' + (u ? "left" : "top") + '"></div>')), v.append(_)), 7994 0 === T.length && ((T = E('<div class="swiper-slide-shadow-' + (u ? "right" : "bottom") + '"></div>')), v.append(T)), 7995 _.length && (_[0].style.opacity = Math.max(-w, 0)), 7996 T.length && (T[0].style.opacity = Math.max(w, 0))); 7997 } 7998 a.css({ "-webkit-transform-origin": "50% 50% -" + l / 2 + "px", "-moz-transform-origin": "50% 50% -" + l / 2 + "px", "-ms-transform-origin": "50% 50% -" + l / 2 + "px", "transform-origin": "50% 50% -" + l / 2 + "px" }), 7999 c.shadow && 8000 (u 8001 ? e.transform("translate3d(0px, " + (r / 2 + c.shadowOffset) + "px, " + -r / 2 + "px) rotateX(90deg) rotateZ(0deg) scale(" + c.shadowScale + ")") 8002 : ((h = Math.abs(f) - 90 * Math.floor(Math.abs(f) / 90)), 8003 (n = 1.5 - (Math.sin((2 * h * Math.PI) / 360) / 2 + Math.cos((2 * h * Math.PI) / 360) / 2)), 8004 (r = c.shadowScale), 8005 (h = c.shadowScale / n), 8006 (n = c.shadowOffset), 8007 e.transform("scale3d(" + r + ", 1, " + h + ") translate3d(0px, " + (o / 2 + n) + "px, " + -o / 2 / h + "px) rotateX(-90deg)"))); 8008 d = d.isSafari || d.isWebView ? -l / 2 : 0; 8009 a.transform("translate3d(0px,0," + d + "px) rotateX(" + (t.isHorizontal() ? 0 : f) + "deg) rotateY(" + (t.isHorizontal() ? -f : 0) + "deg)"); 8010 }, 8011 setTransition: function (e) { 8012 var t = this.$el; 8013 this.slides.transition(e).find(".swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left").transition(e), 8014 this.params.cubeEffect.shadow && !this.isHorizontal() && t.find(".swiper-cube-shadow").transition(e); 8015 }, 8016 }, 8017 ye = { 8018 name: "effect-cube", 8019 params: { cubeEffect: { slideShadows: !0, shadow: !0, shadowOffset: 20, shadowScale: 0.94 } }, 8020 create: function () { 8021 x(this, { cubeEffect: e({}, ge) }); 8022 }, 8023 on: { 8024 beforeInit: function (e) { 8025 var t; 8026 "cube" === e.params.effect && 8027 (e.classNames.push(e.params.containerModifierClass + "cube"), 8028 e.classNames.push(e.params.containerModifierClass + "3d"), 8029 Y(e.params, (t = { slidesPerView: 1, slidesPerColumn: 1, slidesPerGroup: 1, watchSlidesProgress: !0, resistanceRatio: 0, spaceBetween: 0, centeredSlides: !1, virtualTranslate: !0 })), 8030 Y(e.originalParams, t)); 8031 }, 8032 setTranslate: function (e) { 8033 "cube" === e.params.effect && e.cubeEffect.setTranslate(); 8034 }, 8035 setTransition: function (e, t) { 8036 "cube" === e.params.effect && e.cubeEffect.setTransition(t); 8037 }, 8038 }, 8039 }, 8040 be = { 8041 setTranslate: function () { 8042 for (var e = this, t = e.slides, n = e.rtlTranslate, a = 0; a < t.length; a += 1) { 8043 var i, 8044 r, 8045 o = t.eq(a), 8046 s = o[0].progress, 8047 l = -180 * (s = e.params.flipEffect.limitRotation ? Math.max(Math.min(o[0].progress, 1), -1) : s), 8048 d = 0, 8049 c = -o[0].swiperSlideOffset, 8050 u = 0; 8051 e.isHorizontal() ? n && (l = -l) : ((u = c), (d = -l), (l = c = 0)), 8052 (o[0].style.zIndex = -Math.abs(Math.round(s)) + t.length), 8053 e.params.flipEffect.slideShadows && 8054 ((i = e.isHorizontal() ? o.find(".swiper-slide-shadow-left") : o.find(".swiper-slide-shadow-top")), 8055 (r = e.isHorizontal() ? o.find(".swiper-slide-shadow-right") : o.find(".swiper-slide-shadow-bottom")), 8056 0 === i.length && ((i = E('<div class="swiper-slide-shadow-' + (e.isHorizontal() ? "left" : "top") + '"></div>')), o.append(i)), 8057 0 === r.length && ((r = E('<div class="swiper-slide-shadow-' + (e.isHorizontal() ? "right" : "bottom") + '"></div>')), o.append(r)), 8058 i.length && (i[0].style.opacity = Math.max(-s, 0)), 8059 r.length && (r[0].style.opacity = Math.max(s, 0))), 8060 o.transform("translate3d(" + c + "px, " + u + "px, 0px) rotateX(" + d + "deg) rotateY(" + l + "deg)"); 8061 } 8062 }, 8063 setTransition: function (e) { 8064 var n, 8065 a = this, 8066 t = a.slides, 8067 i = a.activeIndex, 8068 r = a.$wrapperEl; 8069 t.transition(e).find(".swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left").transition(e), 8070 a.params.virtualTranslate && 8071 0 !== e && 8072 ((n = !1), 8073 t.eq(i).transitionEnd(function () { 8074 if (!n && a && !a.destroyed) { 8075 (n = !0), (a.animating = !1); 8076 for (var e = ["webkitTransitionEnd", "transitionend"], t = 0; t < e.length; t += 1) r.trigger(e[t]); 8077 } 8078 })); 8079 }, 8080 }, 8081 we = { 8082 name: "effect-flip", 8083 params: { flipEffect: { slideShadows: !0, limitRotation: !0 } }, 8084 create: function () { 8085 x(this, { flipEffect: e({}, be) }); 8086 }, 8087 on: { 8088 beforeInit: function (e) { 8089 var t; 8090 "flip" === e.params.effect && 8091 (e.classNames.push(e.params.containerModifierClass + "flip"), 8092 e.classNames.push(e.params.containerModifierClass + "3d"), 8093 Y(e.params, (t = { slidesPerView: 1, slidesPerColumn: 1, slidesPerGroup: 1, watchSlidesProgress: !0, spaceBetween: 0, virtualTranslate: !0 })), 8094 Y(e.originalParams, t)); 8095 }, 8096 setTranslate: function (e) { 8097 "flip" === e.params.effect && e.flipEffect.setTranslate(); 8098 }, 8099 setTransition: function (e, t) { 8100 "flip" === e.params.effect && e.flipEffect.setTransition(t); 8101 }, 8102 }, 8103 }, 8104 xe = { 8105 setTranslate: function () { 8106 for ( 8107 var e = this, 8108 t = e.width, 8109 n = e.height, 8110 a = e.slides, 8111 i = e.slidesSizesGrid, 8112 r = e.params.coverflowEffect, 8113 o = e.isHorizontal(), 8114 e = e.translate, 8115 s = o ? t / 2 - e : n / 2 - e, 8116 l = o ? r.rotate : -r.rotate, 8117 d = r.depth, 8118 c = 0, 8119 u = a.length; 8120 c < u; 8121 c += 1 8122 ) { 8123 var p = a.eq(c), 8124 f = i[c], 8125 h = ((s - p[0].swiperSlideOffset - f / 2) / f) * r.modifier, 8126 m = o ? l * h : 0, 8127 v = o ? 0 : l * h, 8128 g = -d * Math.abs(h), 8129 y = r.stretch; 8130 "string" == typeof y && -1 !== y.indexOf("%") && (y = (parseFloat(r.stretch) / 100) * f); 8131 var b = o ? 0 : y * h, 8132 f = o ? y * h : 0, 8133 y = 1 - (1 - r.scale) * Math.abs(h); 8134 Math.abs(f) < 0.001 && (f = 0), 8135 Math.abs(b) < 0.001 && (b = 0), 8136 Math.abs(g) < 0.001 && (g = 0), 8137 Math.abs(m) < 0.001 && (m = 0), 8138 Math.abs(v) < 0.001 && (v = 0), 8139 Math.abs(y) < 0.001 && (y = 0), 8140 p.transform("translate3d(" + f + "px," + b + "px," + g + "px) rotateX(" + v + "deg) rotateY(" + m + "deg) scale(" + y + ")"), 8141 (p[0].style.zIndex = 1 - Math.abs(Math.round(h))), 8142 r.slideShadows && 8143 ((m = o ? p.find(".swiper-slide-shadow-left") : p.find(".swiper-slide-shadow-top")), 8144 (y = o ? p.find(".swiper-slide-shadow-right") : p.find(".swiper-slide-shadow-bottom")), 8145 0 === m.length && ((m = E('<div class="swiper-slide-shadow-' + (o ? "left" : "top") + '"></div>')), p.append(m)), 8146 0 === y.length && ((y = E('<div class="swiper-slide-shadow-' + (o ? "right" : "bottom") + '"></div>')), p.append(y)), 8147 m.length && (m[0].style.opacity = 0 < h ? h : 0), 8148 y.length && (y[0].style.opacity = 0 < -h ? -h : 0)); 8149 } 8150 }, 8151 setTransition: function (e) { 8152 this.slides.transition(e).find(".swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left").transition(e); 8153 }, 8154 }, 8155 O = { 8156 name: "effect-coverflow", 8157 params: { coverflowEffect: { rotate: 50, stretch: 0, depth: 100, scale: 1, modifier: 1, slideShadows: !0 } }, 8158 create: function () { 8159 x(this, { coverflowEffect: e({}, xe) }); 8160 }, 8161 on: { 8162 beforeInit: function (e) { 8163 "coverflow" === e.params.effect && 8164 (e.classNames.push(e.params.containerModifierClass + "coverflow"), e.classNames.push(e.params.containerModifierClass + "3d"), (e.params.watchSlidesProgress = !0), (e.originalParams.watchSlidesProgress = !0)); 8165 }, 8166 setTranslate: function (e) { 8167 "coverflow" === e.params.effect && e.coverflowEffect.setTranslate(); 8168 }, 8169 setTransition: function (e, t) { 8170 "coverflow" === e.params.effect && e.coverflowEffect.setTransition(t); 8171 }, 8172 }, 8173 }, 8174 _e = { 8175 init: function () { 8176 var e = this, 8177 t = e.params.thumbs; 8178 if (e.thumbs.initialized) return !1; 8179 e.thumbs.initialized = !0; 8180 var n = e.constructor; 8181 return ( 8182 t.swiper instanceof n 8183 ? ((e.thumbs.swiper = t.swiper), Y(e.thumbs.swiper.originalParams, { watchSlidesProgress: !0, slideToClickedSlide: !1 }), Y(e.thumbs.swiper.params, { watchSlidesProgress: !0, slideToClickedSlide: !1 })) 8184 : y(t.swiper) && ((e.thumbs.swiper = new n(Y({}, t.swiper, { watchSlidesVisibility: !0, watchSlidesProgress: !0, slideToClickedSlide: !1 }))), (e.thumbs.swiperCreated = !0)), 8185 e.thumbs.swiper.$el.addClass(e.params.thumbs.thumbsContainerClass), 8186 e.thumbs.swiper.on("tap", e.thumbs.onThumbClick), 8187 !0 8188 ); 8189 }, 8190 onThumbClick: function () { 8191 var e, 8192 t, 8193 n, 8194 a = this, 8195 i = a.thumbs.swiper; 8196 i && 8197 ((t = i.clickedIndex), 8198 ((e = i.clickedSlide) && E(e).hasClass(a.params.thumbs.slideThumbActiveClass)) || 8199 (null != t && 8200 ((n = i.params.loop ? parseInt(E(i.clickedSlide).attr("data-swiper-slide-index"), 10) : t), 8201 a.params.loop && 8202 ((e = a.activeIndex), 8203 a.slides.eq(e).hasClass(a.params.slideDuplicateClass) && (a.loopFix(), (a._clientLeft = a.$wrapperEl[0].clientLeft), (e = a.activeIndex)), 8204 (i = a.slides 8205 .eq(e) 8206 .prevAll('[data-swiper-slide-index="' + n + '"]') 8207 .eq(0) 8208 .index()), 8209 (t = a.slides 8210 .eq(e) 8211 .nextAll('[data-swiper-slide-index="' + n + '"]') 8212 .eq(0) 8213 .index()), 8214 (n = void 0 === i || (void 0 !== t && t - e < e - i) ? t : i)), 8215 a.slideTo(n)))); 8216 }, 8217 update: function (e) { 8218 var t = this, 8219 n = t.thumbs.swiper; 8220 if (n) { 8221 var a, 8222 i, 8223 r, 8224 o = "auto" === n.params.slidesPerView ? n.slidesPerViewDynamic() : n.params.slidesPerView, 8225 s = t.params.thumbs.autoScrollOffset, 8226 l = s && !n.params.loop; 8227 (t.realIndex === n.realIndex && !l)
8227|| 8228 ((a = n.activeIndex), 8229 (r = n.params.loop 8230 ? (n.slides.eq(a).hasClass(n.params.slideDuplicateClass) && (n.loopFix(), (n._clientLeft = n.$wrapperEl[0].clientLeft), (a = n.activeIndex)), 8231 (r = n.slides 8232 .eq(a) 8233 .prevAll('[data-swiper-slide-index="' + t.realIndex + '"]') 8234 .eq(0) 8235 .index()), 8236 (i = n.slides 8237 .eq(a) 8238 .nextAll('[data-swiper-slide-index="' + t.realIndex + '"]') 8239 .eq(0) 8240 .index()), 8241 (i = void 0 === r ? i : void 0 === i ? r : i - a == a - r ? (1 < n.params.slidesPerGroup ? i : a) : i - a < a - r ? i : r), 8242 t.activeIndex > t.previousIndex ? "next" : "prev") 8243 : (i = t.realIndex) > t.previousIndex 8244 ? "next" 8245 : "prev"), 8246 l && (i += "next" === r ? s : -1 * s), 8247 n.visibleSlidesIndexes && 8248 n.visibleSlidesIndexes.indexOf(i) < 0 && 8249 (n.params.centeredSlides ? (i = a < i ? i - Math.floor(o / 2) + 1 : i + Math.floor(o / 2) - 1) : a < i && n.params.slidesPerGroup, n.slideTo(i, e ? 0 : void 0))); 8250 var d = 1, 8251 c = t.params.thumbs.slideThumbActiveClass; 8252 if ( 8253 (1 < t.params.slidesPerView && !t.params.centeredSlides && (d = t.params.slidesPerView), 8254 t.params.thumbs.multipleActiveThumbs || (d = 1), 8255 (d = Math.floor(d)), 8256 n.slides.removeClass(c), 8257 n.params.loop || (n.params.virtual && n.params.virtual.enabled)) 8258 ) 8259 for (var u = 0; u < d; u += 1) n.$wrapperEl.children('[data-swiper-slide-index="' + (t.realIndex + u) + '"]').addClass(c); 8260 else for (var p = 0; p < d; p += 1) n.slides.eq(t.realIndex + p).addClass(c); 8261 } 8262 }, 8263 }, 8264 L = { 8265 name: "thumbs", 8266 params: { thumbs: { swiper: null, multipleActiveThumbs: !0, autoScrollOffset: 0, slideThumbActiveClass: "swiper-slide-thumb-active", thumbsContainerClass: "swiper-container-thumbs" } }, 8267 create: function () { 8268 x(this, { thumbs: e({ swiper: null, initialized: !1 }, _e) }); 8269 }, 8270 on: { 8271 beforeInit: function (e) { 8272 var t = e.params.thumbs; 8273 t && t.swiper && (e.thumbs.init(), e.thumbs.update(!0)); 8274 }, 8275 slideChange: function (e) { 8276 e.thumbs.swiper && e.thumbs.update(); 8277 }, 8278 update: function (e) { 8279 e.thumbs.swiper && e.thumbs.update(); 8280 }, 8281 resize: function (e) { 8282 e.thumbs.swiper && e.thumbs.update(); 8283 }, 8284 observerUpdate: function (e) { 8285 e.thumbs.swiper && e.thumbs.update(); 8286 }, 8287 setTransition: function (e, t) { 8288 e = e.thumbs.swiper; 8289 e && e.setTransition(t); 8290 }, 8291 beforeDestroy: function (e) { 8292 var t = e.thumbs.swiper; 8293 t && e.thumbs.swiperCreated && t && t.destroy(); 8294 }, 8295 }, 8296 }; 8297 return ( 8298 R.use([ 8299 N, 8300 V, 8301 { 8302 name: "mousewheel", 8303 params: { mousewheel: { enabled: !1, releaseOnEdges: !1, invert: !1, forceToAxis: !1, sensitivity: 1, eventsTarget: "container", thresholdDelta: null, thresholdTime: null } }, 8304 create: function () { 8305 x(this, { 8306 mousewheel: { 8307 enabled: !1, 8308 lastScrollTime: C(), 8309 lastEventBeforeSnap: void 0, 8310 recentWheelEvents: [], 8311 enable: F.enable, 8312 disable: F.disable, 8313 handle: F.handle, 8314 handleMouseEnter: F.handleMouseEnter, 8315 handleMouseLeave: F.handleMouseLeave, 8316 animateSlider: F.animateSlider, 8317 releaseScroll: F.releaseScroll, 8318 }, 8319 }); 8320 }, 8321 on: { 8322 init: function (e) { 8323 !e.params.mousewheel.enabled && e.params.cssMode && e.mousewheel.disable(), e.params.mousewheel.enabled && e.mousewheel.enable(); 8324 }, 8325 destroy: function (e) { 8326 e.params.cssMode && e.mousewheel.enable(), e.mousewheel.enabled && e.mousewheel.disable(); 8327 }, 8328 }, 8329 }, 8330 X, 8331 K, 8332 Q, 8333 ee, 8334 ne, 8335 ie, 8336 oe, 8337 le, 8338 ce, 8339 pe, 8340 he, 8341 ve, 8342 ye, 8343 we, 8344 O, 8345 L, 8346 ]), 8347 R 8348 ); 8349}); 8350 8351 (function (e, t) { 8352 "object" == typeof exports && "undefined" != typeof module ? t(exports) : "function" == typeof define && define.amd ? define(["exports"], t) : t(((e = "undefined" != typeof globalThis ? globalThis : e || self).Popper = {})); 8353 })(this, function (e) { 8354 "use strict"; 8355 function g(e) { 8356 if (null == e) return window; 8357 if ("[object Window]" === e.toString()) return e; 8358 e = e.ownerDocument; 8359 return (e && e.defaultView) || window; 8360 } 8361 function m(e) { 8362 return e instanceof g(e).Element || e instanceof Element; 8363 } 8364 function c(e) { 8365 return e instanceof g(e).HTMLElement || e instanceof HTMLElement; 8366 } 8367 function i(e) { 8368 return "undefined" != typeof ShadowRoot && (e instanceof g(e).ShadowRoot || e instanceof ShadowRoot); 8369 } 8370 var r = Math.round; 8371 function u(e, t) { 8372 void 0 === t && (t = !1);
8373 var n = e.getBoundingClientRect(), 8374 a = 1, 8375 i = 1; 8376 return ( 8377 c(e) && t && ((t = e.offsetHeight), 0 < (e = e.offsetWidth) && (a = n.width / e || 1), 0 < t && (i = n.height / t || 1)), 8378 { width: r(n.width / a), height: r(n.height / i), top: r(n.top / i), right: r(n.right / a), bottom: r(n.bottom / i), left: r(n.left / a), x: r(n.left / a), y: r(n.top / i) } 8379 ); 8380 } 8381 function p(e) { 8382 e = g(e); 8383 return { scrollLeft: e.pageXOffset, scrollTop: e.pageYOffset }; 8384 } 8385 function s(e) { 8386 return e ? (e.nodeName || "").toLowerCase() : null; 8387 } 8388 function y(e) { 8389 return ((m(e) ? e.ownerDocument : e.document) || window.document).documentElement; 8390 } 8391 function f(e) { 8392 return u(y(e)).left + p(e).scrollLeft; 8393 } 8394 function b(e) { 8395 return g(e).getComputedStyle(e); 8396 } 8397 function l(e) { 8398 var t = b(e), 8399 n = t.overflow, 8400 e = t.overflowX, 8401 t = t.overflowY; 8402 return /auto|scroll|overlay|hidden/.test(n + t + e); 8403 } 8404 function v(e, t, n) { 8405 void 0 === n && (n = !1); 8406 var a = c(t), 8407 i = c(t) && ((i = (o = t).getBoundingClientRect()), (r = i.width / o.offsetWidth || 1), (o = i.height / o.offsetHeight || 1), 1 !== r || 1 !== o), 8408 r = y(t), 8409 o = u(e, i), 8410 e = { scrollLeft: 0, scrollTop: 0 }, 8411 i = { x: 0, y: 0 }; 8412 return ( 8413 (!a && n) || 8414 (("body" === s(t) && !l(r)) || (e = (n = t) !== g(n) && c(n) ? { scrollLeft: n.scrollLeft, scrollTop: n.scrollTop } : p(n)), c(t) ? (((i = u(t, !0)).x += t.clientLeft), (i.y += t.clientTop)) : r && (i.x = f(r))), 8415 { x: o.left + e.scrollLeft - i.x, y: o.top + e.scrollTop - i.y, width: o.width, height: o.height } 8416 ); 8417 } 8418 function E(e) { 8419 var t = u(e), 8420 n = e.offsetWidth, 8421 a = e.offsetHeight; 8422 return Math.abs(t.width - n) <= 1 && (n = t.width), Math.abs(t.height - a) <= 1 && (a = t.height), { x: e.offsetLeft, y: e.offsetTop, width: n, height: a }; 8423 } 8424 function o(e) { 8425 return "html" === s(e) ? e : e.assignedSlot || e.parentNode || (i(e) ? e.host : null) || y(e); 8426 } 8427 function w(e, t) { 8428 void 0 === t && (t = []); 8429 var n = (function e(t) { 8430 return 0 <= ["html", "body", "#document"].indexOf(s(t)) ? t.ownerDocument.body : c(t) && l(t) ? t : e(o(t)); 8431 })(e), 8432 e = n === (null == (a = e.ownerDocument) ? void 0 : a.body), 8433 a = g(n), 8434 n = e ? [a].concat(a.visualViewport || [], l(n) ? n : []) : n, 8435 t = t.concat(n); 8436 return e ? t : t.concat(w(o(n))); 8437 } 8438 function d(e) { 8439 return c(e) && "fixed" !== b(e).position ? e.offsetParent : null; 8440 } 8441 function S(e) { 8442 for (var t, n = g(e), a = d(e); a && ((t = a), 0 <= ["table", "td", "th"].indexOf(s(t))) && "static" === b(a).position; ) a = d(a); 8443 return ( 8444 ((!a || ("html" !== s(a) && ("body" !== s(a) || "static" !== b(a).position))) && 8445 (a || 8446 (function (e) { 8447 var t = -1 !== navigator.userAgent.toLowerCase().indexOf("firefox"), 8448 n = -1 !== navigator.userAgent.indexOf("Trident"); 8449 if (n && c(e) && "fixed" === b(e).position) return null; 8450 for (var a = o(e); c(a) && ["html", "body"].indexOf(s(a)) < 0; ) { 8451 var i = b(a); 8452 if ( 8453 "none" !== i.transform || 8454 "none" !== i.perspective || 8455 "paint" === i.contain || 8456 -1 !== ["transform", "perspective"].indexOf(i.willChange) || 8457 (t && "filter" === i.willChange) || 8458 (t && i.filter && "none" !== i.filter) 8459 ) 8460 return a; 8461 a = a.parentNode; 8462 } 8463 return null; 8464 })(e))) || 8465 n 8466 ); 8467 } 8468 var M = "top", 8469 k = "bottom", 8470 A = "right", 8471 O = "left", 8472 P = "auto", 8473 L = [M, k, A, O], 8474 I = "start", 8475 x = "end", 8476 h = "clippingParents", 8477 _ = "viewport", 8478 T = "popper", 8479 C = "reference", 8480 z = L.reduce(function (e, t) { 8481 return e.concat([t + "-" + I, t + "-" + x]); 8482 }, []), 8483 D = [].concat(L, [P]).reduce(function (e, t) { 8484 return e.concat([t, t + "-" + I, t + "-" + x]); 8485 }, []), 8486 $ = ["beforeRead", "read", "afterRead", "beforeMain", "main", "afterMain", "beforeWrite", "write", "afterWrite"]; 8487 function H(e) { 8488 var n = new Map(), 8489 a = new Set(), 8490 i = []; 8491 return ( 8492 e.forEach(function (e) { 8493 n.set(e.name, e); 8494 }), 8495 e.forEach(function (e) { 8496 a.has(e.name) || 8497 !(function t(e) { 8498 a.add(e.name), 8499 [].concat(e.requires || [], e.requiresIfExists || []).forEac
8499h(function (e) { 8500 a.has(e) || ((e = n.get(e)) && t(e)); 8501 }), 8502 i.push(e); 8503 })(e); 8504 }), 8505 i 8506 ); 8507 } 8508 function B(e) { 8509 for (var t = arguments.length, n = new Array(1 < t ? t - 1 : 0), a = 1; a < t; a++) n[a - 1] = arguments[a]; 8510 return [].concat(n).reduce(function (e, t) { 8511 return e.replace(/%s/, t); 8512 }, e); 8513 } 8514 var j = 'Popper: modifier "%s" provided an invalid %s property, expected %s but got %s', 8515 R = 'Popper: modifier "%s" requires "%s", but "%s" modifier is not available', 8516 G = ["name", "enabled", "phase", "fn", "effect", "requires", "options"]; 8517 function N(e) { 8518 return e.split("-")[0]; 8519 } 8520 var W = Math.max, 8521 V = Math.min, 8522 F = Math.round; 8523 function q(e, t) { 8524 var n = t.getRootNode && t.getRootNode(); 8525 if (e.contains(t)) return !0; 8526 if (n && i(n)) { 8527 var a = t; 8528 do { 8529 if (a && e.isSameNode(a)) return !0; 8530 } while ((a = a.parentNode || a.host)); 8531 } 8532 return !1; 8533 } 8534 function X(e) { 8535 return Object.assign({}, e, { left: e.x, top: e.y, right: e.x + e.width, bottom: e.y + e.height }); 8536 } 8537 function Y(e, t) { 8538 return t === _ 8539 ? X( 8540 ((r = g((i = e))), 8541 (o = y(i)), 8542 (s = r.visualViewport), 8543 (l = o.clientWidth), 8544 (d = o.clientHeight), 8545 (o = r = 0), 8546 s && ((l = s.width), (d = s.height), /^((?!chrome|android).)*safari/i.test(navigator.userAgent) || ((r = s.offsetLeft), (o = s.offsetTop))), 8547 { width: l, height: d, x: r + f(i), y: o }) 8548 ) 8549 : c(t) 8550 ? (((a = u((n = t))).top = a.top + n.clientTop), 8551 (a.left = a.left + n.clientLeft), 8552 (a.bottom = a.top + n.clientHeight), 8553 (a.right = a.left + n.clientWidth), 8554 (a.width = n.clientWidth), 8555 (a.height = n.clientHeight), 8556 (a.x = a.left), 8557 (a.y = a.top), 8558 a) 8559 : X( 8560 ((i = y(e)), 8561 (o = y(i)), 8562 (t = p(i)), 8563 (a = null == (n = i.ownerDocument) ? void 0 : n.body), 8564 (e = W(o.scrollWidth, o.clientWidth, a ? a.scrollWidth : 0, a ? a.clientWidth : 0)), 8565 (n = W(o.scrollHeight, o.clientHeight, a ? a.scrollHeight : 0, a ? a.clientHeight : 0)), 8566 (i = -t.scrollLeft + f(i)), 8567 (t = -t.scrollTop), 8568 "rtl" === b(a || o).direction && (i += W(o.clientWidth, a ? a.clientWidth : 0) - e), 8569 { width: e, height: n, x: i, y: t }) 8570 ); 8571 var n, a, i, r, o, s, l, d; 8572 } 8573 function U(n, e, t) { 8574 var a, 8575 i, 8576 r, 8577 e = 8578 "clippingParents" === e 8579 ? ((i = w(o((a = n)))), 8580 m((r = 0 <= ["absolute", "fixed"].indexOf(b(a).position) && c(a) ? S(a) : a)) 8581 ? i.filter(function (e) { 8582 return m(e) && q(e, r) && "body" !== s(e); 8583 }) 8584 : []) 8585 : [].concat(e), 8586 e = [].concat(e, [t]), 8587 t = e[0], 8588 t = e.reduce(function (e, t) { 8589 t = Y(n, t); 8590 return (e.top = W(t.top, e.top)), (e.right = V(t.right, e.right)), (e.bottom = V(t.bottom, e.bottom)), (e.left = W(t.left, e.left)), e; 8591 }, Y(n, t));
8592 return (t.width = t.right - t.left), (t.height = t.bottom - t.top), (t.x = t.left), (t.y = t.top), t; 8593 } 8594 function K(e) { 8595 return e.split("-")[1]; 8596 } 8597 function Z(e) { 8598 return 0 <= ["top", "bottom"].indexOf(e) ? "x" : "y"; 8599 } 8600 function Q(e) { 8601 var t, 8602 n = e.reference, 8603 a = e.element, 8604 i = e.placement, 8605 e = i ? N(i) : null, 8606 i = i ? K(i) : null, 8607 r = n.x + n.width / 2 - a.width / 2, 8608 o = n.y + n.height / 2 - a.height / 2; 8609 switch (e) { 8610 case M: 8611 t = { x: r, y: n.y - a.height }; 8612 break; 8613 case k: 8614 t = { x: r, y: n.y + n.height }; 8615 break; 8616 case A: 8617 t = { x: n.x + n.width, y: o }; 8618 break; 8619 case O: 8620 t = { x: n.x - a.width, y: o }; 8621 break; 8622 default: 8623 t = { x: n.x, y: n.y }; 8624 } 8625 var s = e ? Z(e) : null; 8626 if (null != s) { 8627 var l = "y" === s ? "height" : "width"; 8628 switch (i) { 8629 case I: 8630 t[s] = t[s] - (n[l] / 2 - a[l] / 2); 8631 break; 8632 case x: 8633 t[s] = t[s] + (n[l] / 2 - a[l] / 2); 8634 } 8635 } 8636 return t; 8637 } 8638 function J() { 8639 return { top: 0, right: 0, bottom: 0, left: 0 }; 8640 } 8641 function ee(e) { 8642 return Object.assign({}, J(), e); 8643 } 8644 function te(n, e) { 8645 return e.reduce(function (e, t) { 8646 return (e[t] = n), e; 8647 }, {}); 8648 } 8649 function ne(e, t) { 8650 var a, 8651 n = (t = void 0 === t ? {} : t), 8652 i = n.placement, 8653 r = void 0 === i ? e.placement : i, 8654 o = n.boundary, 8655 s = void 0 === o ? h : o, 8656 l = n.rootBoundary, 8657 t = void 0 === l ? _ : l, 8658 i = n.elementContext, 8659 o = void 0 === i ? T : i, 8660 l = n.altBoundary, 8661 i = void 0 !== l && l, 8662 l = n.padding, 8663 n = void 0 === l ? 0 : l, 8664 l = ee("number" != typeof n ? n : te(n, L)), 8665 n = e.rects.popper, 8666 i = e.elements[i ? (o === T ? C : T) : o], 8667 i = U(m(i) ? i : i.contextElement || y(e.elements.popper), s, t), 8668 s = u(e.elements.reference), 8669 t = Q({ reference: s, element: n, strategy: "absolute", placement: r }), 8670 t = X(Object.assign({}, n, t)), 8671 s = o === T ? t : s, 8672 d = { top: i.top - s.top + l.top, bottom: s.bottom - i.bottom + l.bottom, left: i.left - s.left + l.left, right: s.right - i.right + l.right }, 8673 e = e.modifiersData.offset; 8674 return ( 8675 o === T && 8676 e && 8677 ((a = e[r]), 8678 Object.keys(d).forEach(function (e) { 8679 var t = 0 <= [A, k].indexOf(e) ? 1 : -1, 8680 n = 0 <= [M, k].indexOf(e) ? "y" : "x"; 8681 d[e] += a[n] * t; 8682 })), 8683 d 8684 ); 8685 } 8686 var ae = "Popper: Invalid reference or popper argument provided. They must be either a DOM element or virtual element.", 8687 ie = { placement: "bottom", modifiers: [], strategy: "absolute" }; 8688 function re() { 8689 for (var e = arguments.length, t = new Array(e), n = 0; n < e; n++) t[n] = arguments[n]; 8690 return !t.some(function (e) { 8691 return !(e && "function" == typeof e.getBoundingClientRect); 8692 }); 8693 } 8694 function t(e) { 8695 var t = (e = void 0 === e ? {} : e), 8696 e = t.defaultModifiers, 8697 f = void 0 === e ? [] : e, 8698 t = t.defaultOptions, 8699 h = void 0 === t ? ie : t; 8700 return function (o, s, t) { 8701 void 0 === t && (t = h); 8702 var n, 8703 a, 8704 l = { placement: "bottom", orderedModifiers: [], options: Object.assign({}, ie, h), modifiersData: {}, elements: { reference: o, popper: s }, attributes: {}, styles: {} }, 8705 d = [], 8706 c = !1, 8707 u = { 8708 state: l, 8709 setOptions: function (e) { 8710 e = "function" == typeof e ? e(l.options) : e; 8711 p(), (l.options = Object.assign({}, h, l.options, e)), (l.scrollParents = { reference: m(o) ? w(o) : o.contextElement ? w(o.contextElement) : [], popper: w(s) }); 8712 var n, 8713 t, 8714 e = 8715 ((e = [].concat(f, l.options.modifiers)), 8716 (t = e.reduce(function (e, t) { 8717 var n = e[t.name]; 8718 return (e[t.name] = n ? Object.assign({}, n, t, { options: Object.assign({}, n.options, t.options), data: Object.assign({}, n.data, t.data) }) : t), e; 8719 }, {})), 8720 (e = Object.keys(t).map(function (e) { 8721 return t[e]; 8722 })), 8723 (n = H(e)), 8724 $.reduce(function (e, t) { 8725 return e.concat( 8726 n.filter(function (e) { 8727 return e.phase === t; 8728 }) 8729 ); 8730 }, [])); 8731 l.orderedModifiers = e.filter(function (e) { 8732 return e.enabled; 8733 }); 8734 (e = [].concat(e, l.options.modifiers)), 8735 (i = function (e) { 8736 return e.name; 8737 }), 8738 (r = new Set()), 8739 (e = e.filter(function (e) { 8740 e = i(e); 8741 if (!r.has(e)) return r.add(e), !0; 8742 })); 8743 (a = e).forEach(function (n) { 8744 [] 8745 .concat(Object.keys(n), G) 8746 .filter(function (e, t, n) { 8747 return n.indexOf(e) === t; 8748 }) 8749 .forEach(function (e) { 8750 switch (e) { 8751 case "name": 8752 "string" != typeof n.name && console.error(B(j, String(n.name), '"name"', '"string"', '"' + String(n.name) + '"')); 8753 break; 8754 case "enabled": 8755 "boolean" != typeof n.enabled && console.error(B(j, n.name, '"enabled"', '"boolean"', '"' + String(n.enabled) + '"')); 8756 break; 8757 case "phase": 8758 $.indexOf(n.phase) < 0 && console.error(B(j, n.name, '"phase"', "either " + $.join(", "), '"' + String(n.phase) + '"')); 8759 break; 8760 case "fn": 8761 "function" != typeof n.fn && console.error(B(j, n.name, '"fn"', '"function"', '"' + String(n.fn) + '"')); 8762 break; 8763 case "effect": 8764 null != n.effect && "function" != typeof n.effect && console.error(B(j, n.name, '"effect"', '"function"', '"' + String(n.fn) + '"')); 8765 break; 8766 case "requires": 8767 null == n.requires || Array.isArray(n.requires) || console.error(B(j, n.name, '"requires"', '"array"', '"' + String(n.requires) + '"')); 8768 break; 8769 case "requiresIfExists": 8770 Array.isArray(n.requiresIfExists) || console.error(B(j, n.name, '"requiresIfExists"', '"array"', '"' + String(n.requiresIfExists) + '"')); 8771 break; 8772 case "options": 8773 case "data": 8774 break; 8775 default: 8776 console.error( 8777 'PopperJS: an invali
8777d property has been provided to the "' + 8778 n.name + 8779 '" modifier, valid properties are ' + 8780 G.map(function (e) { 8781 return '"' + e + '"'; 8782 }).join(", ") + 8783 '; but "' + 8784 e + 8785 '" was provided.' 8786 ); 8787 } 8788 n.requires && 8789 n.requires.forEach(function (t) { 8790 null == 8791 a.find(function (e) { 8792 return e.name === t; 8793 }) && console.error(B(R, String(n.name), t, t)); 8794 }); 8795 }); 8796 }), 8797 N(l.options.placement) === P && 8798 (l.orderedModifiers.find(function (e) { 8799 return "flip" === e.name; 8800 }) || 8801 console.error(['Popper: "auto" placements require the "flip" modifier be', "present and enabled to work."].join(" "))); 8802 var a, 8803 i, 8804 r, 8805 e = b(s); 8806 return ( 8807 [e.marginTop, e.marginRight, e.marginBottom, e.marginLeft].some(function (e) { 8808 return parseFloat(e); 8809 }) && 8810 console.warn( 8811 [ 8812 'Popper: CSS "margin" styles cannot be used to apply padding', 8813 "between the popper and its reference element or boundary.", 8814 "To replicate margin, use the `offset` modifier, as well as", 8815 "the `padding` option in the `preventOverflow` and `flip`", 8816 "modifiers.", 8817 ].join(" ") 8818 ), 8819 l.orderedModifiers.forEach(function (e) { 8820 var t = e.name, 8821 n = e.options, 8822 e = e.effect; 8823 "function" == typeof e && ((n = e({ state: l, name: t, instance: u, options: void 0 === n ? {} : n })), d.push(n || function () {})); 8824 }), 8825 u.update() 8826 ); 8827 }, 8828 forceUpdate: function () { 8829 if (!c) { 8830 var e = l.elements, 8831 t = e.reference, 8832 e = e.popper; 8833 if (re(t, e)) { 8834 (l.rects = { reference: v(t, S(e), "fixed" === l.options.strategy), popper: E(e) }), 8835 (l.reset = !1), 8836 (l.placement = l.options.placement), 8837 l.orderedModifiers.forEach(function (e) { 8838 return (l.modifiersData[e.name] = Object.assign({}, e.data)); 8839 }); 8840 for (var n, a, i, r = 0, o = 0; o < l.orderedModifiers.length; o++) { 8841 if (100 < (r += 1)) { 8842 console.error("Popper: An infinite loop in the modifiers cycle has been detected! The cycle has been interrupted to prevent a browser crash."); 8843 break; 8844 } 8845 !0 !== l.reset 8846 ? ((n = (i = l.orderedModifiers[o]).fn), (a = i.options), (i = i.name), "function" == typeof n && (l = n({ state: l, options: void 0 === a ? {} : a, name: i, instance: u }) || l)) 8847 : ((l.reset = !1), (o = -1)); 8848 } 8849 } else console.error(ae); 8850 } 8851 }, 8852 update: 8853 ((n = function () { 8854 return new Promise(function (e) { 8855 u.forceUpdate(), e(l); 8856 }); 8857 }), 8858 function () { 8859 return (a = 8860 a || 8861 new Promise(function (e) { 8862 Promise.resolve().then(function () { 8863 (a = void 0), e(n()); 8864 }); 8865 })); 8866 }), 8867 destroy: function () { 8868 p(), (c = !0);
8869 }, 8870 }; 8871 return ( 8872 re(o, s) 8873 ? u.setOptions(t).then(function (e) { 8874 !c && t.onFirstUpdate && t.onFirstUpdate(e); 8875 }) 8876 : console.error(ae), 8877 u 8878 ); 8879 function p() { 8880 d.forEach(function (e) { 8881 return e(); 8882 }), 8883 (d = []); 8884 } 8885 }; 8886 } 8887 var oe = { passive: !0 }; 8888 var n = { 8889 name: "eventListeners", 8890 enabled: !0, 8891 phase: "write", 8892 fn: function () {}, 8893 effect: function (e) { 8894 var t = e.state, 8895 n = e.instance, 8896 a = e.options, 8897 i = void 0 === (e = a.scroll) || e, 8898 r = void 0 === (a = a.resize) || a, 8899 o = g(t.elements.popper), 8900 s = [].concat(t.scrollParents.reference, t.scrollParents.popper); 8901 return ( 8902 i && 8903 s.forEach(function (e) { 8904 e.addEventListener("scroll", n.update, oe); 8905 }), 8906 r && o.addEventListener("resize", n.update, oe), 8907 function () { 8908 i && 8909 s.forEach(function (e) { 8910 e.removeEventListener("scroll", n.update, oe); 8911 }), 8912 r && o.removeEventListener("resize", n.update, oe); 8913 } 8914 ); 8915 }, 8916 data: {}, 8917 }; 8918 var a = { 8919 name: "popperOffsets", 8920 enabled: !0, 8921 phase: "read", 8922 fn: function (e) { 8923 var t = e.state, 8924 e = e.name; 8925 t.modifiersData[e] = Q({ reference: t.rects.reference, element: t.rects.popper, strategy: "absolute", placement: t.placement }); 8926 }, 8927 data: {}, 8928 }, 8929 se = { top: "auto", right: "auto", bottom: "auto", left: "auto" }; 8930 function le(e) { 8931 var t = e.popper, 8932 n = e.popperRect, 8933 a = e.placement, 8934 i = e.variation, 8935 r = e.offsets, 8936 o = e.position, 8937 s = e.gpuAcceleration, 8938 l = e.adaptive, 8939 d = e.roundOffsets, 8940 c = !0 === d ? ((h = (v = r).x), (m = v.y), (v = window.devicePixelRatio || 1), { x: F(F(h * v) / v) || 0, y: F(F(m * v) / v) || 0 }) : "function" == typeof d ? d(r) : r, 8941 u = c.x, 8942 p = void 0 === u ? 0 : u, 8943 f = c.y, 8944 e = void 0 === f ? 0 : f, 8945 h = r.hasOwnProperty("x"), 8946 m = r.hasOwnProperty("y"), 8947 v = O, 8948 d = M, 8949 u = window; 8950 l && 8951 ((c = "clientHeight"), 8952 (f = "clientWidth"), 8953 (r = S(t)) === g(t) && "static" !== b((r = y(t))).position && "absolute" === o && ((c = "scrollHeight"), (f = "scrollWidth")), 8954 (a !== M && ((a !== O && a !== A) || i !== x)) || ((d = k), (e -= r[c] - n.height), (e *= s ? 1 : -1)), 8955 (a !== O && ((a !== M && a !== k) || i !== x)) || ((v = A), (p -= r[f] - n.width), (p *= s ? 1 : -1))); 8956 var l = Object.assign({ position: o }, l && se); 8957 return s 8958 ? Object.assign({}, l, (((s = {})[d] = m ? "0" : ""), (s[v] = h ? "0" : ""), (s.transform = (u.devicePixelRatio || 1) <= 1 ? "translate(" + p + "px, " + e + "px)" : "translate3d(" + p + "px, " + e + "px, 0)"), s)) 8959 : Object.assign({}, l, (((l = {})[d] = m ? e + "px" : ""), (l[v] = h ? p + "px" : ""), (l.transform = ""), l)); 8960 } 8961 var de = { 8962 name: "computeStyles", 8963 enabled: !0, 8964 phase: "beforeWrite", 8965 fn: function (e) { 8966 var t = e.state, 8967 n = e.options, 8968 e = void 0 === (a = n.gpuAcceleration) || a, 8969 a = void 0 === (a = n.adaptive) || a, 8970 n = void 0 === (n = n.roundOffsets) || n, 8971 i = b(t.elements.popper).transitionProperty || ""; 8972 a && 8973 ["transform", "top", "right", "bottom", "left"].some(function (e) {
8974 return 0 <= i.indexOf(e); 8975 }) && 8976 console.warn( 8977 [ 8978 "Popper: Detected CSS transitions on at least one of the following", 8979 'CSS properties: "transform", "top", "right", "bottom", "left".', 8980 "\n\n", 8981 'Disable the "computeStyles" modifier\'s `adaptive` option to allow', 8982 "for smooth transitions, or remove these properties from the CSS", 8983 "transition declaration on the popper element if only transitioning", 8984 "opacity or background-color for example.", 8985 "\n\n", 8986 "We recommend using the popper element as a wrapper around an inner", 8987 "element that can have any CSS property transitioned for animations.", 8988 ].join(" ") 8989 ), 8990 (e = { placement: N(t.placement), variation: K(t.placement), popper: t.elements.popper, popperRect: t.rects.popper, gpuAcceleration: e }), 8991 null != t.modifiersData.popperOffsets && 8992 (t.styles.popper = Object.assign({}, t.styles.popper, le(Object.assign({}, e, { offsets: t.modifiersData.popperOffsets, position: t.options.strategy, adaptive: a, roundOffsets: n })))), 8993 null != t.modifiersData.arrow && (t.styles.arrow = Object.assign({}, t.styles.arrow, le(Object.assign({}, e, { offsets: t.modifiersData.arrow, position: "absolute", adaptive: !1, roun
8993dOffsets: n })))), 8994 (t.attributes.popper = Object.assign({}, t.attributes.popper, { "data-popper-placement": t.placement })); 8995 }, 8996 data: {}, 8997 }; 8998 var ce = { 8999 name: "applyStyles", 9000 enabled: !0, 9001 phase: "write", 9002 fn: function (e) { 9003 var i = e.state; 9004 Object.keys(i.elements).forEach(function (e) { 9005 var t = i.styles[e] || {}, 9006 n = i.attributes[e] || {}, 9007 a = i.elements[e]; 9008 c(a) && 9009 s(a) && 9010 (Object.assign(a.style, t), 9011 Object.keys(n).forEach(function (e) { 9012 var t = n[e]; 9013 !1 === t ? a.removeAttribute(e) : a.setAttribute(e, !0 === t ? "" : t); 9014 })); 9015 }); 9016 }, 9017 effect: function (e) { 9018 var a = e.state, 9019 i = { popper: { position: a.options.strategy, left: "0", top: "0", margin: "0" }, arrow: { position: "absolute" }, reference: {} }; 9020 return ( 9021 Object.assign(a.elements.popper.style, i.popper), 9022 (a.styles = i), 9023 a.elements.arrow && Object.assign(a.elements.arrow.style, i.arrow), 9024 function () { 9025 Object.keys(a.elements).forEach(function (e) { 9026 var t = a.elements[e], 9027 n = a.attributes[e] || {}, 9028 e = Object.keys((a.styles.hasOwnProperty(e) ? a.styles : i)[e]).reduce(function (e, t) { 9029 return (e[t] = ""), e; 9030 }, {}); 9031 c(t) && 9032 s(t) && 9033 (Object.assign(t.style, e), 9034 Object.keys(n).forEach(function (e) { 9035 t.removeAttribute(e); 9036 })); 9037 }); 9038 } 9039 ); 9040 }, 9041 requires: ["computeStyles"], 9042 }; 9043 var ue = { 9044 name: "offset", 9045 enabled: !0, 9046 phase: "main", 9047 requires: ["popperOffsets"], 9048 fn: function (e) { 9049 var o = e.state, 9050 t = e.options, 9051 n = e.name, 9052 s = void 0 === (a = t.offset) ? [0, 0] : a, 9053 e = D.reduce(function (e, t) { 9054 var n, a, i, r; 9055 return ( 9056 (e[t] = 9057 ((n = t), 9058 (a = o.rects), 9059 (i = s), 9060 (r = N(n)), 9061 (t = 0 <= [O, M].indexOf(r) ? -1 : 1), 9062 (i = (i = (n = "function" == typeof i ? i(Object.assign({}, a, { placement: n })) : i)[0]) || 0), 9063 (n = ((n = n[1]) || 0) * t), 9064 0 <= [O, A].indexOf(r) ? { x: n, y: i } : { x: i, y: n })), 9065 e 9066 ); 9067 }, {}), 9068 a = (t = e[o.placement]).x, 9069 t = t.y; 9070 null != o.modifiersData.popperOffsets && ((o.modifiersData.popperOffsets.x += a), (o.modifiersData.popperOffsets.y += t)), (o.modifiersData[n] = e); 9071 }, 9072 }, 9073 pe = { left: "right", right: "left", bottom: "top", top: "bottom" }; 9074 function fe(e) { 9075 return e.replace(/left|right|bottom|top/g, function (e) { 9076 return pe[e]; 9077 }); 9078 } 9079 var he = { start: "end", end: "start" }; 9080 function me(e) { 9081 return e.replace(/start|end/g, function (e) { 9082 return he[e]; 9083 }); 9084 } 9085 var ve = { 9086 name: "flip", 9087 enabled: !0, 9088 phase: "main", 9089 fn: function (e) { 9090 var n = e.state, 9091 t = e.options, 9092 a = e.name; 9093 if (!n.modifiersData[a]._skip) { 9094 for ( 9095 var i = t.mainAxis, 9096 r = void 0 === i || i, 9097 e = t.altAxis, 9098 o = void 0 === e || e, 9099 i = t.fallbackPlacements, 9100 s = t.padding, 9101 l = t.boundary, 9102 d = t.rootBoundary, 9103 c = t.altBoundary, 9104 e = t.flipVariations, 9105 u = void 0 === e || e, 9106 p = t.allowedAutoPlacements, 9107 e = n.options.placement, 9108 t = N(e), 9109 t = 9110 i || 9111 (t === e || !u 9112 ? [fe(e)] 9113 : (function (e) { 9114 if (N(e) === P) return []; 9115 var t = fe(e); 9116 return [me(e), t, me(t)]; 9117 })(e)), 9118 f = [e].concat(t).reduce(function (e, t) { 9119 return e.concat( 9120 N(t) === P 9121 ? (function (n, e) { 9122 var t = (e = void 0 === e ? {} : e), 9123 a = t.placement, 9124 i = t.boundary, 9125 r = t.rootBoundary, 9126 o = t.padding, 9127 e = t.flipVariations, 9128 s = void 0 === (t = t.allowedAutoPlacements) ? D : t, 9129 l = K(a), 9130 a = l 9131 ? e 9132 ? z 9133 : z.filter(function (e) { 9134 return K(e)
9134=== l; 9135 }) 9136 : L; 9137 0 === 9138 (e = a.filter(function (e) { 9139 return 0 <= s.indexOf(e); 9140 })).length && 9141 ((e = a), 9142 console.error( 9143 [ 9144 "Popper: The `allowedAutoPlacements` option did not allow any", 9145 "placements. Ensure the `placement` option matches the variation", 9146 "of the allowed placements.", 9147 'For example, "auto" cannot be used to allow "bottom-start".', 9148 'Use "auto-start" instead.', 9149 ].join(" ") 9150 )); 9151 var d = e.reduce(function (e, t) { 9152 return (e[t] = ne(n, { placement: t, boundary: i, rootBoundary: r, padding: o })[N(t)]), e; 9153 }, {}); 9154 return Object.keys(d).sort(function (e, t) { 9155 return d[e] - d[t]; 9156 }); 9157 })(n, { placement: t, boundary: l, rootBoundary: d, padding: s, flipVariations: u, allowedAutoPlacements: p }) 9158 : t 9159 ); 9160 }, []), 9161 h = n.rects.reference, 9162 m = n.rects.popper, 9163 v = new Map(), 9164 g = !0, 9165 y = f[0], 9166 b = 0; 9167 b < f.length; 9168 b++ 9169 ) { 9170 var w = f[b], 9171 x = N(w), 9172 _ = K(w) === I, 9173 T = 0 <= [M, k].indexOf(x), 9174 E = T ? "width" : "height", 9175 S = ne(n, { placement: w, boundary: l, rootBoundary: d, altBoundary: c, padding: s }), 9176 T = T ? (_ ? A : O) : _ ? k : M; 9177 h[E] > m[E] && (T = fe(T)); 9178 (_ = fe(T)), (E = []); 9179 if ( 9180 (r && E.push(S[x] <= 0), 9181 o && E.push(S[T] <= 0, S[_] <= 0), 9182 E.every(function (e) { 9183 return e; 9184 })) 9185 ) { 9186 (y = w), (g = !1); 9187 break; 9188 } 9189 v.set(w, E); 9190 } 9191 if (g) 9192 for (var C = u ? 3 : 1; 0 < C; C--) 9193 if ( 9194 "break" === 9195 (function (t) { 9196 var e = f.find(function (e) { 9197 e = v.get(e); 9198 if (e) 9199 return e.slice(0, t).every(function (e) { 9200 return e; 9201 }); 9202 }); 9203 if (e) return (y = e), "break"; 9204 })(C) 9205 ) 9206 break; 9207 n.placement !== y && ((n.modifiersData[a]._skip = !0), (n.placement = y), (n.reset = !0)); 9208 } 9209 }, 9210 requiresIfExists: ["offset"], 9211 data: { _skip: !1 }, 9212 }; 9213 function ge(e, t, n) { 9214 return W(e, V(t, n)); 9215 } 9216 var ye = { 9217 name: "preventOverflow", 9218 enabled: !0, 9219 phase: "main", 9220 fn: function (e) { 9221 var t = e.state, 9222 n = e.options, 9223 a = e.name, 9224 i = void 0 === (_ = n.mainAxis) || _, 9225 r = void 0 !== (T = n.altAxis) && T, 9226 o = n.boundary, 9227 s = n.rootBoundary, 9228 l = n.altBoundary, 9229 d = n.padding, 9230 c = n.tether, 9231 u = void 0 === c || c, 9232 p = n.tetherOffset, 9233 f = void 0 === p ? 0 : p, 9234 h = ne(t, { boundary: o, rootBoundary: s, padding: d, altBoundary: l }), 9235 m = N(t.placement), 9236 v = K(t.placement), 9237 g = !v, 9238 y = Z(m), 9239 b = "x" === y ? "y" : "x", 9240 w = t.modifiersData.popperOffsets, 9241 x = t.rects.reference, 9242 e = t.rects.popper, 9243 _ = "function" == typeof f ? f(Object.assign({}, t.rects, { placement: t.placement })) : f, 9244 T = { x: 0, y: 0 }; 9245 w && 9246 ((i || r) && 9247 ((c = "y" === y ? "height" : "width"), 9248 (n = w[y]), 9249 (o = w[y] + h[(p = "y" === y ? M : O)]), 9250 (d = w[y] - h[(s = "y" === y ? k : A)]), 9251 (l = u ? -e[c] / 2 : 0), 9252 (m = (v === I ? x : e)[c]), 9253 (f = v === I ? -e[c] : -x[c]), 9254 (v = t.elements.arrow),
9255 (e = u && v ? E(v) : { width: 0, height: 0 }), 9256 (p = (v = t.modifiersData["arrow#persistent"] ? t.modifiersData["arrow#persistent"].padding : J())[p]), 9257 (s = v[s]), 9258 (e = ge(0, x[c], e[c])), 9259 (p = g ? x[c] / 2 - l - e - p - _ : m - e - p - _), 9260 (e = g ? -x[c] / 2 + l + e + s + _ : f + e + s + _), 9261 (_ = (s = t.elements.arrow && S(t.elements.arrow)) ? ("y" === y ? s.clientTop || 0 : s.clientLeft || 0) : 0), 9262 (s = t.modifiersData.offset ? t.modifiersData.offset[t.placement][y] : 0), 9263 (_ = w[y] + p - s - _), 9264 (s = w[y] + e - s), 9265 i && ((d = ge(u ? V(o, _) : o, n, u ? W(d, s) : d)), (w[y] = d), (T[y] = d - n)), 9266 r && ((r = (n = w[b]) + h["x" === y ? M : O]), (y = n - h["x" === y ? k : A]), (y = ge(u ? V(r, _) : r, n, u ? W(y, s) : y)), (w[b] = y), (T[b] = y - n))), 9267 (t.modifiersData[a] = T)); 9268 }, 9269 requiresIfExists: ["offset"], 9270 }; 9271 var be = { 9272 name: "arrow", 9273 enabled: !0, 9274 phase: "main", 9275 fn: function (e) { 9276 var t, 9277 n, 9278 a = e.state, 9279 i = e.name, 9280 r = e.options, 9281 o = a.elements.arrow, 9282 s = a.modifiersData.popperOffsets, 9283 l = N(a.placement), 9284 d = Z(l), 9285 c = 0 <= [O, A].indexOf(l) ? "height" : "width"; 9286 o && 9287 s && 9288 ((t = r.padding), 9289 (n = a), 9290 (e = ee("number" != typeof (t = "function" == typeof t ? t(Object.assign({}, n.rects, { placement: n.placement })) : t) ? t : te(t, L))), 9291 (l = E(o)), 9292 (r = "y" === d ? M : O), 9293 (n = "y" === d ? k : A), 9294 (t = a.rects.reference[c] + a.rects.reference[d] - s[d] - a.rects.popper[c]), 9295 (s = s[d] - a.rects.reference[d]), 9296 (o = (o = S(o)) ? ("y" === d ? o.clientHeight || 0 : o.clientWidth || 0) : 0), 9297 (r = e[r]), 9298 (n = o - l[c] - e[n]), 9299 (n = ge(r, (s = o / 2 - l[c] / 2 + (t / 2 - s / 2)), n)), 9300 (a.modifiersData[i] = (((i = {})[d] = n), (i.centerOffset = n - s), i))); 9301 }, 9302 effect: function (e) { 9303 var t = e.state; 9304 null != (e = void 0 === (e = e.options.element) ? "[data-popper-arrow]" : e) && 9305 (("string" == typeof e && !(e = t.elements.popper.querySelector(e))) || 9306 (c(e) || console.error(['Popper: "arrow" element must be an HTMLElement (not an SVGElement).', "To use an SVG arrow, wrap it in an HTMLElement that will be used as", "the arrow."].join(" ")), 9307 q(t.elements.popper, e) ? (t.elements.arrow = e) : console.error(['Popper: "arrow" modifier\'s `element` must be a child of the popper', "element."].join(" ")))); 9308 }, 9309 requires: ["popperOffsets"], 9310 requiresIfExists: ["preventOverflow"], 9311 }; 9312 function we(e, t, n) { 9313 return { top: e.top - t.height - (n = void 0 === n ? { x: 0, y: 0 } : n).y, right: e.right - t.width + n.x, bottom: e.bottom - t.height + n.y, left: e.left - t.width - n.x }; 9314 } 9315 function xe(t) { 9316 return [M, A, k, O].some(function (e) { 9317 return 0 <= t[e]; 9318 }); 9319 } 9320 var _e = { 9321 name: "hide", 9322 enabled: !0, 9323 phase: "main", 9324 requiresIfExists: ["preventOverflow"], 9325 fn: function (e) { 9326 var t = e.state, 9327 n = e.name, 9328 a = t.rects.reference, 9329 i = t.rects.popper, 9330 r = t.modifiersData.preventOverflow, 9331 o = ne(t, { elementContext: "reference" }), 9332 e = ne(t, { altBoundary: !0 }), 9333 a = we(o, a), 9334 e = we(e, i, r), 9335 i = xe(a), 9336 r = xe(e); 9337 (t.modifiersData[n] = { referenceClippingOffsets: a, popperEscapeOffsets: e, isReferenceHidden: i, hasPopperEscaped: r }), 9338 (t.attributes.popper = Object.assign({}, t.attributes.popper, { "data-popper-reference-hidden": i, "data-popper-escaped": r })); 9339 }, 9340 }, 9341 Te = t({ defaultModifiers: [n, a, de, ce] }), 9342 Ee = [n, a, de, ce, ue, ve, ye, be, _e], 9343 Se = t({ defaultModifiers: Ee }); 9344 (e.applyStyles = ce), 9345 (e.arrow = be), 9346 (e.computeStyles = de), 9347 (e.createPopper = Se), 9348 (e.createPopperLite = Te), 9349 (e.defaultModifiers = Ee), 9350 (e.detectOverflow = ne), 9351 (e.eventListeners = n), 9352 (e.flip = ve), 9353 (e.hide = _e), 9354 (e.offset = ue), 9355 (e.popperGenerator = t), 9356 (e.popperOffsets = a), 9357 (e.preventOverflow = ye), 9358 Object.defineProperty(e, "__esModule", { value: !0 }); 9359 }), 9360 (function (e, t) { 9361 "object" == typeof exports && "undefined" != typeof module ? (module.exports = t(require("@popperjs/core"))) : "function" == typeof define && define.amd ? define(["@popperjs/core"], t) : ((e = e || self).tippy = t(e.Popper)); 9362 })(this, function (te) { 9363 "use strict"; 9364 var e = "undefined" != typeof window && "undefined" != typeof document, 9365 t = e ? navigator.userAgent : "", 9366 ne = /MSIE |Trident\//.test(t), 9367 a = "tippy-content", 9368 r = "tippy-backdrop", 9369 n = "tippy-arrow", 9370 i = "tippy-svg-arrow", 9371 ae = { passive: !0, capture: !0 }; 9372 function ie(e, t, n) { 9373 if (Array.isArray(e)) { 9374 var a = e[t]; 9375 return null == a ? (Array.isArray(n) ? n[t] : n) : a; 9376 } 9377 return e; 9378 } 9379 function o(e, t) { 9380 e = {}.toString.call(e); 9381 return 0 === e.indexOf("[object") && -1 < e.indexOf(t + "]"); 9382 } 9383 function re(e, t) { 9384 return "function" == typeof e ? e.apply(void 0, t) : e; 9385 } 9386 function oe(t, n) { 9387 return 0 === n 9388 ? t 9389 : function (e) { 9390 clearTimeout(a), 9391 (a = setTimeout(function () { 9392 t(e); 9393 }, n)); 9394 }; 9395 var a; 9396 } 9397 function m(e, t) { 9398 var n = Object.assign({}, e); 9399 return ( 9400 t.forEach(function (e) { 9401 delete n[e]; 9402 }), 9403 n 9404 ); 9405 } 9406 function se(e) { 9407 return [].concat(e); 9408 } 9409 function le(e, t) { 9410 -1 === e.indexOf(t) && e.push(t); 9411 } 9412 function de(e) { 9413 return e.split("-")[0]; 9414 } 9415 function ce(e) { 9416 return [].slice.call(e); 9417 } 9418 function ue() { 9419 return document.createElement("div"); 9420 } 9421 function s(t) { 9422 return ["Element", "Fragment"].some(function (e) { 9423 return o(t, e); 9424 }); 9425 } 9426 function pe(e) { 9427 return o(e, "MouseEvent"); 9428 } 9429 function l(e) { 9430 return e && e._tippy && e._tippy.reference === e; 9431 } 9432 function d(e) { 9433 return s(e) ? [e] : o(e, "NodeList") ? ce(e) : Array.isArray(e) ? e : ce(document.querySelectorAll(e));
9434 } 9435 function fe(e, t) { 9436 e.forEach(function (e) { 9437 e && (e.style.transitionDuration = t + "ms"); 9438 }); 9439 } 9440 function he(e, t) { 9441 e.forEach(function (e) { 9442 e && e.setAttribute("data-state", t); 9443 }); 9444 } 9445 function me(e) { 9446 var t = se(e)[0]; 9447 return null != t && null != (e = t.ownerDocument) && e.body ? t.ownerDocument : document; 9448 } 9449 function ve(t, e, n) { 9450 var a = e + "EventListener"; 9451 ["transitionend", "webkitTransitionEnd"].forEach(function (e) { 9452 t[a](e, n); 9453 }); 9454 } 9455 var ge = { isTouch: !1 }, 9456 c = 0; 9457 function u() { 9458 ge.isTouch || ((ge.isTouch = !0), window.performance && document.addEventListener("mousemove", p)); 9459 } 9460 function p() { 9461 var e = performance.now(); 9462 e - c < 20 && ((ge.isTouch = !1), document.removeEventListener("mousemove", p)), (c = e); 9463 } 9464 function f() { 9465 var e, 9466 t = document.activeElement; 9467 l(t) && ((e = t._tippy), t.blur && !e.state.isVisible && t.blur()); 9468 } 9469 function ye(e) { 9470 return [e + "() was called on a" + ("destroy" === e ? "n already-" : " ") + "destroyed instance. This is a no-op but", "indicates a potential memory leak."].join(" "); 9471 } 9472 function h(e) { 9473 return e 9474 .replace(/[ \t]{2,}/g, " ") 9475 .replace(/^[ \t]*/gm, "") 9476 .trim(); 9477 } 9478 function v(e) { 9479 return [ 9480 h("\n %ctippy.js\n\n %c" + h(e) + "\n\n %cð·â This is a development-only message. It will be removed in production.\n "), 9481 "color: #00C584; font-size: 1.3em; font-weight: bold;", 9482 "line-height: 1.5", 9483 "color: #a6a095;", 9484 ]; 9485 } 9486 function be(e, t) { 9487 e && !g.has(t) && (g.add(t), (e = console).warn.apply(e, v(t))); 9488 } 9489 function we(e, t) { 9490 e && !g.has(t) && (g.add(t), (e = console).error.apply(e, v(t))); 9491 } 9492 var g = new Set(), 9493 y = { animateFill: !1, followCursor: !1, inlinePositioning: !1, sticky: !1 }, 9494 xe = Object.assign( 9495 { 9496 appendTo: function () { 9497 return document.body; 9498 }, 9499 aria: { content: "auto", expanded: "auto" }, 9500 delay: 0, 9501 duration: [300, 250], 9502 getReferenceClientRect: null, 9503 hideOnClick: !0, 9504 ignoreAttributes: !1, 9505 interactive: !1, 9506 interactiveBorder: 2, 9507 interactiveDebounce: 0, 9508 moveTransition: "", 9509 offset: [0, 10], 9510 onAfterUpdate: function () {}, 9511 onBeforeUpdate: function () {}, 9512 onCreate: function () {}, 9513 onDestroy: function () {}, 9514 onHidden: function () {}, 9515 onHide: function () {}, 9516 onMount: function () {}, 9517 onShow: function () {}, 9518 onShown: function () {}, 9519 onTrigger: function () {}, 9520 onUntrigger: function () {}, 9521 onClickOutside: function () {}, 9522 placement: "top", 9523 plugins: [], 9524 popperOptions: {}, 9525 render: null, 9526 showOnCreate: !1, 9527 touch: !0, 9528 trigger: "mouseenter focus", 9529 triggerTarget: null, 9530 }, 9531 y, 9532 {}, 9533 { allowHTML: !1, animation: "fade", arrow: !0, content: "", inertia: !1, maxWidth: 350, role: "tooltip", theme: "", zIndex: 9999 } 9534 ), 9535 b = Object.keys(xe); 9536 function _e(a) { 9537 var e = (a.plugins || []).reduce(function (e, t) { 9538 var n = t.name, 9539 t = t.defaultValue; 9540 return n && (e[n] = void 0 !== a[n] ? a[n] : t), e; 9541 }, {}); 9542 return Object.assign({}, a, {}, e); 9543 } 9544 function Te(e, t) { 9545 var i, 9546 n, 9547 n = Object.assign( 9548 {}, 9549 t, 9550 { content: re(t.content, [e]) }, 9551 t.ignoreAttributes 9552 ? {} 9553 : ((i = e), 9554 ((n = t.plugins) ? Object.keys(_e(Object.assign({}, xe, { plugins: n }))) : b).reduce(function (t, n) { 9555 var a = (i.getAttribute("data-tippy-" + n) || "").trim(); 9556 if (!a) return t; 9557 if ("content" === n) t[n] = a; 9558 else 9559 try { 9560 t[n] = JSON.parse(a); 9561 } catch (e) { 9562 t[n] = a; 9563 } 9564 return t; 9565 }, {})) 9566 ); 9567 return ( 9568 (n.aria = Object.assign({}, xe.aria, {}, n.aria)), 9569 (n.aria = { expanded: "auto" === n.aria.expanded ? t.interactive : n.aria.expanded, content: "auto" === n.aria.content ? (t.interactive ? null : "describedby") : n.aria.content }), 9570 n 9571 ); 9572 } 9573 function w(e, n) { 9574 void 0 === e && (e = {}), 9575 void 0 === n && (n = []), 9576 Object.keys(e).forEach(function (t) { 9577 var e = m(xe, Object.keys(y)); 9578 be( 9579 !{}.hasOwnProperty.call(e, t) && 9580 0 === 9581 n.filter(function (e) { 9582 return e.name === t; 9583 }).length, 9584 [ 9585 "`" + t + "`", 9586 "is not a valid prop. You may have spelled it incorrectly, or if it's", 9587 "a plugin, forgot to pass it in an array as props.plugins.", 9588 "\n\n", 9589 "All props: https://atomiks.github.io/tippyjs/v6/all-props/\n", 9590 "Plugins: https://atomiks.github.io/tippyjs/v6/plugins/", 9591 ].join(" ") 9592 ); 9593 }); 9594 } 9595 function x() { 9596 return "innerHTML"; 9597 } 9598 function _(e, t) { 9599 e[x()] = t; 9600 } 9601 function T(e) { 9602 var t = ue(); 9603 return !0 === e ? (t.className = n) : ((t.className = i), s(e) ? t.appendChild(e) : _(t, e)), t; 9604 } 9605 function E(e, t) { 9606 s(t.content) ? (_(e, ""), e.appendChild(t.content)) : "function" != typeof t.content && (t.allowHTML ? _(e, t.content) : (e.textContent = t.content)); 9607 } 9608 function Ee(e) { 9609 var t = e.firstElementChild, 9610 e = ce(t.children); 9611 return { 9612 box: t, 9613 content: e.find(function (e) { 9614 return e.classList.contains(a); 9615 }), 9616 arrow: e.find(function (e) { 9617 return e.classList.contains(n) || e.classList.contains(i); 9618 }), 9619 backdrop: e.find(function (e) { 9620 return e.classList.contains(r); 9621 }), 9622 }; 9623 } 9624 function S(r) { 9625 var o = ue(), 9626 e = ue(); 9627 (e.className = "tippy-box"), e.setAttribute("data-state", "hidden"), e.setAttribute("tabindex", "-1"); 9628 var t = ue(); 9629 function n(e, t) { 9630 var n = Ee(o), 9631 a = n.box, 9632 i = n.content, 9633 n = n.arrow; 9634 t.theme ? a.setAttribute("data-theme", t.theme) : a.removeAttribute("data-theme"), 9635 "string" == typeof t.animation ? a.setAttribute("data-animation", t.animation) : a.removeAttribute("data-animation"), 9636 t.inertia ? a.setAttribute("data-inertia", "") : a.removeAttribute("data-inertia"), 9637 (a.style.maxWidth = "number" == typeof t.maxWidth ? t.maxWidth + "px" : t.maxWidth), 9638 t.role ? a.setAttribute("role", t.role) : a.removeAttribute("role"), 9639 (e.content === t.content && e.allowHTML === t.allowHTML) || E(i, r.props), 9640 t.arrow ? (n ? e.arrow !== t.arrow && (a.removeChild(n), a.appendChild(T(t.arrow))) : a.appendChild(T(t.arrow))) : n && a.removeChild(n); 9641 } 9642 return (t.className = a), t.setAttribute("data-state", "hidden"), E(t, r.props), o.appendChild(e), e.appendChild(t), n(r.props, r.props), { popper: o, onUp
9642date: n }; 9643 } 9644 S.$$tippy = !0; 9645 var Se = 1, 9646 Ce = [], 9647 Me = []; 9648 function C(o, e) { 9649 var n, 9650 a, 9651 t, 9652 i, 9653 r, 9654 s, 9655 l, 9656 d, 9657 c, 9658 u = Te( 9659 o, 9660 Object.assign( 9661 {}, 9662 xe, 9663 {}, 9664 _e( 9665 ((n = e), 9666 Object.keys(n).reduce(function (e, t) { 9667 return void 0 !== n[t] && (e[t] = n[t]), e; 9668 }, {})) 9669 ) 9670 ) 9671 ), 9672 p = !1, 9673 f = !1, 9674 h = !1, 9675 m = !1, 9676 v = [], 9677 g = oe(q, u.interactiveDebounce), 9678 y = Se++, 9679 e = (c = u.plugins).filter(function (e, t) { 9680 return c.indexOf(e) === t; 9681 }), 9682 b = { 9683 id: y, 9684 reference: o, 9685 popper: ue(), 9686 popperInstance: null, 9687 props: u, 9688 state: { isEnabled: !0, isVisible: !1, isDestroyed: !1, isMounted: !1, isShown: !1 }, 9689 plugins: e, 9690 clearDelayTimeouts: function () { 9691 clearTimeout(a), clearTimeout(t), cancelAnimationFrame(i); 9692 }, 9693 setProps: function (e) { 9694 var t, n; 9695 be(b.state.isDestroyed, ye("setProps")), 9696 b.state.isDestroyed || 9697 (L("onBeforeUpdate", [b, e]), 9698 V(), 9699 (t = b.props), 9700 (n = Te(o, Object.assign({}, b.props, {}, e, { ignoreAttributes: !0 }))), 9701 (b.props = n), 9702 W(), 9703 t.interactiveDebounce !== n.interactiveDebounce && (D(), (g = oe(q, n.interactiveDebounce))), 9704 t.triggerTarget && !n.triggerTarget 9705 ? se(t.triggerTarget).forEach(function (e) { 9706 e.removeAttribute("aria-expanded"); 9707 }) 9708 : n.triggerTarget && o.removeAttribute("aria-expanded"), 9709 z(), 9710 P(), 9711 x && x(t, n), 9712 b.popperInstance && 9713 (K(), 9714 Q().forEach(function (e) { 9715 requestAnimationFrame(e._tippy.popperInstance.forceUpdate); 9716 })), 9717 L("onAfterUpdate", [b, e])); 9718 }, 9719 setContent: function (e) { 9720 b.setProps({ content: e }); 9721 }, 9722 show: function () { 9723 be(b.state.isDestroyed, ye("show")); 9724 var e = b.state.isVisible, 9725 t = b.state.isDestroyed, 9726 n = !b.state.isEnabled, 9727 a = ge.isTouch && !b.props.touch, 9728 i = ie(b.props.duration, 0, xe.duration); 9729 e || 9730 t || 9731 n || 9732 a || 9733 M().hasAttribute("disabled") || 9734 (L("onShow", [b], !1), 9735 !1 !== b.props.onShow(b) && 9736 ((b.state.isVisible = !0), 9737 C() && (w.style.visibility = "visible"), 9738 P(), 9739 j(), 9740 b.state.isMounted || (w.style.transition = "none"), 9741 C() && ((n = A()), (a = n.box), (n = n.content), fe([a, n], 0)), 9742 (l = function () { 9743 var e, t; 9744 b.state.isVisible && 9745 !m && 9746 ((m = !0), 9747 w.offsetHeight, 9748 (w.style.transition = b.props.moveTransition), 9749 C() && b.props.animation && (fe([(e = (t = A()).box), (t = t.content)], i), he([e, t], "visible")), 9750 I(), 9751 z(), 9752 le(Me, b), 9753 null != (t = b.popperInstance) && t.forceUpdate(), 9754 (b.state.isMounted = !0), 9755 L("onMount", [b]), 9756 b.props.animation && 9757 C() && 9758 G(i, function () { 9759 (b.state.isShown = !0), L("onShown", [b]); 9760 })); 9761 }), 9762 (function () { 9763 var e, 9764 t = b.props.appendTo, 9765 n = M(); 9766 e = (b.props.interactive && t === xe.appendTo) || "parent" === t ? n.parentNode : re(t, [n]); 9767 e.contains(w) || e.appendChild(w); 9768 K(), 9769 be( 9770 b.props.interactive && t === xe.appendTo && n.nextElementSibling !== w, 9771 [ 9772 "Interactive tippy element may not be accessible via keyboard", 9773 "navigation because it is not directly after the reference element", 9774 "in the DOM source order.", 9775 "\n\n", 9776 "Using a wrapper <div> or <span> tag around the reference element", 9777 "solves this by creating a new parentNode context.", 9778 "\n\n", 9779 "Specifying `appendTo: document.body` silences this warning, but it", 9780 "assumes you are using a focus management solution to handle",
9781 "keyboard navigation.", 9782 "\n\n", 9783 "See: https://atomiks.github.io/tippyjs/v6/accessibility/#interactivity", 9784 ].join(" ") 9785 ); 9786 })())); 9787 }, 9788 hide: function () { 9789 be(b.state.isDestroyed, ye("hide")); 9790 var e = !b.state.isVisible, 9791 t = b.state.isDestroyed, 9792 n = !b.state.isEnabled, 9793 a = ie(b.props.duration, 1, xe.duration); 9794 e || 9795 t || 9796 n || 9797 (L("onHide", [b], !1), 9798 !1 !== b.props.onHide(b) && 9799 ((b.state.isVisible = !1), 9800 (b.state.isShown = !1), 9801 (p = m = !1), 9802 C() && (w.style.visibility = "hidden"), 9803 D(), 9804 R(), 9805 P(), 9806 C() && ((t = A()), (n = t.box), (t = t.content), b.props.animation && (fe([n, t], a), he([n, t], "hidden"))), 9807 I(), 9808 z(), 9809 b.props.animation 9810 ? C() && 9811 (function (e, t) { 9812 G(e, function () { 9813 !b.state.isVisible && w.parentNode && w.parentNode.contains(w) && t(); 9814 }); 9815 })(a, b.unmount) 9816 : b.unmount())); 9817 }, 9818 hideWithInteractivity: function (e) { 9819 be(b.state.isDestroyed, ye("hideWithInteractivity")), k().addEventListener("mousemove", g), le(Ce, g), g(e); 9820 }, 9821 enable: function () { 9822 b.state.isEnabled = !0; 9823 }, 9824 disable: function () { 9825 b.hide(), (b.state.isEnabled = !1); 9826 }, 9827 unmount: function () { 9828 be(b.state.isDestroyed, ye("unmount")), b.state.isVisible && b.hide(); 9829 b.state.isMounted && 9830 (Z(), 9831 Q().forEach(function (e) { 9832 e._tippy.unmount(); 9833 }), 9834 w.parentNode && w.parentNode.removeChild(w), 9835 (Me = Me.filter(function (e) { 9836 return e !== b; 9837 })), 9838 (b.state.isMounted = !1), 9839 L("onHidden", [b])); 9840 }, 9841 destroy: function () { 9842 be(b.state.isDestroyed, ye("destroy")), b.state.isDestroyed || (b.clearDelayTimeouts(), b.unmount(), V(), delete o._tippy, (b.state.isDestroyed = !0), L("onDestroy", [b])); 9843 }, 9844 }; 9845 if (!u.render) return we(!0, "render() function has not been supplied."), b; 9846 var y = u.render(b), 9847 w = y.popper, 9848 x = y.onUpdate; 9849 w.setAttribute("data-tippy-root", ""), (w.id = "tippy-" + b.id), (b.popper = w), (o._tippy = b), (w._tippy = b); 9850 var _ = e.map(function (e) { 9851 return e.fn(b); 9852 }), 9853 T = o.hasAttribute("aria-expanded"); 9854 return ( 9855 W(), 9856 z(), 9857 P(), 9858 L("onCreate", [b]),
9859 u.showOnCreate && J(), 9860 w.addEventListener("mouseenter", function () { 9861 b.props.interactive && b.state.isVisible && b.clearDelayTimeouts(); 9862 }), 9863 w.addEventListener("mouseleave", function (e) { 9864 b.props.interactive && 0 <= b.props.trigger.indexOf("mouseenter") && (k().addEventListener("mousemove", g), g(e)); 9865 }), 9866 b 9867 ); 9868 function E() { 9869 var e = b.props.touch; 9870 return Array.isArray(e) ? e : [e, 0]; 9871 } 9872 function S() { 9873 return "hold" === E()[0]; 9874 } 9875 function C() { 9876 var e; 9877 return null != (e = b.props.render) && e.$$tippy; 9878 } 9879 function M() { 9880 return d || o; 9881 } 9882 function k() { 9883 var e = M().parentNode; 9884 return e ? me(e) : document; 9885 } 9886 function A() { 9887 return Ee(w); 9888 } 9889 function O(e) { 9890 return (b.state.isMounted && !b.state.isVisible) || ge.isTouch || (r && "focus" === r.type) ? 0 : ie(b.props.delay, e ? 0 : 1, xe.delay); 9891 } 9892 function P() { 9893 (w.style.pointerEvents = b.props.interactive && b.state.isVisible ? "" : "none"), (w.style.zIndex = "" + b.props.zIndex); 9894 } 9895 function L(t, n, e) { 9896 void 0 === e && (e = !0), 9897 _.forEach(function (e) { 9898 e[t] && e[t].apply(void 0, n); 9899 }), 9900 e && (e = b.props)[t].apply(e, n); 9901 } 9902 function I() { 9903 var n, 9904 a, 9905 e = b.props.aria; 9906 e.content && 9907 ((n = "aria-" + e.content), 9908 (a = w.id), 9909 se(b.props.triggerTarget || o).forEach(function (e) { 9910 var t = e.getAttribute(n); 9911 b.state.isVisible ? e.setAttribute(n, t ? t + " " + a : a) : (t = t && t.replace(a, "").trim()) ? e.setAttribute(n, t) : e.removeAttribute(n); 9912 })); 9913 } 9914 function z() { 9915 !T && 9916 b.props.aria.expanded && 9917 se(b.props.triggerTarget || o).forEach(function (e) { 9918 b.props.interactive ? e.setAttribute("aria-expanded", b.state.isVisible && e === M() ? "true" : "false") : e.removeAttribute("aria-expanded"); 9919 }); 9920 } 9921 function D() { 9922 k().removeEventListener("mousemove", g), 9923 (Ce = Ce.filter(function (e) { 9924 return e !== g; 9925 })); 9926 } 9927 function $(e) { 9928 if (!((ge.isTouch && (h || "mousedown" === e.type)) || (b.props.interactive && w.contains(e.target)))) { 9929 if (M().contains(e.target)) { 9930 if (ge.isTouch) return; 9931 if (b.state.isVisible && 0 <= b.props.trigger.indexOf("click")) return; 9932 } else L("onClickOutside", [b, e]); 9933 !0 === b.props.hideOnClick && 9934 (b.clearDelayTimeouts(), 9935 b.hide(), 9936 (f = !0), 9937 setTimeout(function () { 9938 f = !1; 9939 }), 9940 b.state.isMounted || R()); 9941 } 9942 } 9943 function H() { 9944 h = !0; 9945 } 9946 function B() { 9947 h = !1; 9948 } 9949 function j() { 9950 var e = k(); 9951 e.addEventListener("mousedown", $, !0), e.addEventListener("touchend", $, ae), e.addEventListener("touchstart", B, ae), e.addEventListener("touchmove", H, ae); 9952 } 9953 function R() { 9954 var e = k(); 9955 e.removeEventListener("mousedown", $, !0), e.removeEventListener("touchend", $, ae), e.removeEventListener("touchstart", B, ae), e.removeEventListener("touchmove", H, ae); 9956 } 9957 function G(e, t) { 9958 var n = A().box; 9959 function a(e) { 9960 e.target === n && (ve(n, "remove", a), t()); 9961 } 9962 if (0 === e) return t(); 9963 ve(n, "remove", s), ve(n, "add", a), (s = a); 9964 } 9965 function N(t, n, a) { 9966 void 0 === a && (a = !1),
9967 se(b.props.triggerTarget || o).forEach(function (e) { 9968 e.addEventListener(t, n, a), v.push({ node: e, eventType: t, handler: n, options: a }); 9969 }); 9970 } 9971 function W() { 9972 S() && (N("touchstart", F, { passive: !0 }), N("touchend", X, { passive: !0 })), 9973 b.props.trigger 9974 .split(/\s+/) 9975 .filter(Boolean) 9976 .forEach(function (e) { 9977 if ("manual" !== e) 9978 switch ((N(e, F), e)) { 9979 case "mouseenter": 9980 N("mouseleave", X); 9981 break; 9982 case "focus": 9983 N(ne ? "focusout" : "blur", Y); 9984 break; 9985 case "focusin": 9986 N("focusout", Y); 9987 } 9988 }); 9989 } 9990 function V() { 9991 v.forEach(function (e) { 9992 var t = e.node, 9993 n = e.eventType, 9994 a = e.handler, 9995 e = e.options; 9996 t.removeEventListener(n, a, e); 9997 }), 9998 (v = []); 9999 } 10000 function F(t) { 10001 var e, 10002 n = !1; 10003 !b.state.isEnabled || 10004 U(t) || 10005 f || 10006 ((e = "focus" === (null == r ? void 0 : r.type)), 10007 (d = (r = t).currentTarget), 10008 z(), 10009 !b.state.isVisible && 10010 pe(t) && 10011 Ce.forEach(function (e) { 10012 return e(t); 10013 }), 10014 "click" === t.type && (b.props.trigger.indexOf("mouseenter") < 0 || p) && !1 !== b.props.hideOnClick && b.state.isVisible ? (n = !0) : J(t), 10015 "click" === t.type && (p = !n), 10016 n && !e && ee(t)); 10017 } 10018 function q(e) { 10019 var s, 10020 l, 10021 t = e.target, 10022 t = M().contains(t) || w.contains(t); 10023 ("mousemove" === e.type && t) || 10024 ((t = Q() 10025 .concat(w) 10026 .map(function (e) { 10027 var t = null == (t = e._tippy.popperInstance) ? void 0 : t.state; 10028 return t ? { popperRect: e.getBoundingClientRect(), popperState: t, props: u } : null; 10029 }) 10030 .filter(Boolean)), 10031 (s = e.clientX), 10032 (l = e.clientY), 10033 t.every(function (e) { 10034 var t = e.popperRect, 10035 n = e.popperState, 10036 a = e.props.interactiveBorder, 10037 i = de(n.placement), 10038 r = n.modifiersData.offset; 10039 if (!r) return !0; 10040 var o = "bottom" === i ? r.top.y : 0, 10041 e = "top" === i ? r.bottom.y : 0, 10042 n = "right" === i ? r.left.x : 0, 10043 r = "left" === i ? r.right.x : 0, 10044 o = t.top - l + o > a, 10045 e = l - t.bottom - e > a, 10046 n = t.left - s + n > a, 10047 a = s - t.right - r > a; 10048 return o || e || n || a; 10049 }) && (D(), ee(e))); 10050 } 10051 function X(e) { 10052 U(e) || (0 <= b.props.trigger.indexOf("click") && p) || (b.props.interactive ? b.hideWithInteractivity(e) : ee(e)); 10053 } 10054 function Y(e) { 10055 (b.props.trigger.indexOf("focusin") < 0 && e.target !== M()) || (b.props.interactive && e.relatedTarget && w.contains(e.relatedTarget)) || ee(e); 10056 } 10057 function U(e) { 10058 return !!ge.isTouch && S() !== 0 <= e.type.indexOf("touch"); 10059 } 10060 function K() { 10061 Z(); 10062 var e = b.props, 10063 t = e.popperOptions, 10064 n = e.placement, 10065 a = e.offset, 10066 i = e.getReferenceClientRect, 10067 r = e.moveTransition, 10068 e = C() ? Ee(w).arrow : null, 10069 i = i ? { getBoundingClientRect: i, contextElement: i.contextElement || M() } : o, 10070 r = [ 10071 { name: "offset", options: { offset: a } }, 10072 { name: "preventOverflow", options: { padding: { top: 2, bottom: 2, left: 5, right: 5 } } }, 10073 { name: "flip", options: { padding: 5 } }, 10074 { name: "computeStyles", options: { adaptive: !r } }, 10075 { 10076 name: "$$tippy", 10077 enabled: !0, 10078 phase: "beforeWrite", 10079 requires: ["computeStyles"], 10080 fn: function (e) { 10081 var t, 10082 n = e.state; 10083 C() && 10084 ((t = A().box), 10085 ["placement", "reference-hidden", "escaped"].forEach(function (e) { 10086 "placement" === e ? t.setAttribute("data-placement", n.placement) : n.attributes.popper["data-
10086popper-" + e] ? t.setAttribute("data-" + e, "") : t.removeAttribute("data-" + e); 10087 }), 10088 (n.attributes.popper = {})); 10089 }, 10090 }, 10091 ]; 10092 C() && e && r.push({ name: "arrow", options: { element: e, padding: 3 } }), 10093 r.push.apply(r, (null == t ? void 0 : t.modifiers) || []), 10094 (b.popperInstance = te.createPopper(i, w, Object.assign({}, t, { placement: n, onFirstUpdate: l, modifiers: r }))); 10095 } 10096 function Z() { 10097 b.popperInstance && (b.popperInstance.destroy(), (b.popperInstance = null)); 10098 } 10099 function Q() { 10100 return ce(w.querySelectorAll("[data-tippy-root]")); 10101 } 10102 function J(e) { 10103 b.clearDelayTimeouts(), e && L("onTrigger", [b, e]), j(); 10104 var t = O(!0), 10105 n = E(), 10106 e = n[0], 10107 n = n[1]; 10108 (t = ge.isTouch && "hold" === e && n ? n : t) 10109 ? (a = setTimeout(function () { 10110 b.show(); 10111 }, t)) 10112 : b.show(); 10113 } 10114 function ee(e) { 10115 b.clearDelayTimeouts(), 10116 L("onUntrigger", [b, e]), 10117 b.state.isVisible 10118 ? (0 <= b.props.trigger.indexOf("mouseenter") && 0 <= b.props.trigger.indexOf("click") && 0 <= ["mouseleave", "mousemove"].indexOf(e.type) && p) || 10119 ((e = O(!1)) 10120 ? (t = setTimeout(function () { 10121 b.state.isVisible && b.hide(); 10122 }, e)) 10123 : (i = requestAnimationFrame(function () { 10124 b.hide(); 10125 }))) 10126 : R(); 10127 } 10128 } 10129 function M(e, t) { 10130 var n, 10131 a, 10132 i = xe.plugins.concat((t = void 0 === t ? {} : t).plugins || []); 10133 (a = !(n = e)), 10134 (o = "[object Object]" === Object.prototype.toString.call(n) && !n.addEventListener), 10135 we(a, ["tippy() was passed", "`" + String(n) + "`", "as its targets (first) argument. Valid types are: String, Element,", "Element[], or NodeList."].join(" ")), 10136 we(o, ["tippy() was passed a plain object which is not supported as an argument", "for virtual positioning. Use props.getReferenceClientRect instead."].join(" ")), 10137 w(t, i), 10138 document.addEventListener("touchstart", u, ae), 10139 window.addEventListener("blur", f); 10140 var r = Object.assign({}, t, { plugins: i }), 10141 o = d(e), 10142 t = s(r.content), 10143 i = 1 < o.length; 10144 be( 10145 t && i, 10146 [ 10147 "tippy() was passed an Element as the `content` prop, but more than", 10148 "one tippy instance was created by this invocation. This means the", 10149 "content element will only be appended to the last tippy instance.", 10150 "\n\n", 10151 "Instead, pass the .innerHTML of the element, or use a function that", 10152 "returns a cloned version of the element instead.", 10153 "\n\n", 10154 "1) content: element.innerHTML\n", 10155 "2) content: () => element.cloneNode(true)", 10156 ].join(" ") 10157 ); 10158 o = o.reduce(function (e, t) { 10159 t = t && C(t, r); 10160 return t && e.push(t), e; 10161 }, []); 10162 return s(e) ? o[0] : o; 10163 } 10164 (M.defaultProps = xe), 10165 (M.setDefaultProps = function (t) { 10166 w(t, []), 10167 Object.keys(t).forEach(function (e) { 10168 xe[e] = t[e]; 10169 }); 10170 }), 10171 (M.currentInput = ge); 10172 var k = Object.assign({}, te.applyStyles, { 10173 effect: function (e) { 10174 var t = e.state, 10175 e = { popper: { position: t.options.strategy, left: "0", top: "0", margin: "0" }, arrow: { position: "absolute" }, reference: {} }; 10176 Object.assign(t.elements.popper.style, e.popper), (t.styles = e), t.elements.arrow && Object.assign(t.elements.arrow.style, e.arrow); 10177 }, 10178 }), 10179 A = { mouseover: "mouseenter", focusin: "focus", click: "click" }; 10180 var O = { 10181 name: "animateFill", 10182 defaultValue: !1, 10183 fn: function (e) {
10184 if (null == (t = e.props.render) || !t.$$tippy) return we(e.props.animateFill, "The `animateFill` plugin requires the default render function."), {}; 10185 var t = Ee(e.popper), 10186 n = t.box, 10187 a = t.content, 10188 i = e.props.animateFill ? (((t = ue()).className = r), he([t], "hidden"), t) : null; 10189 return { 10190 onCreate: function () { 10191 i && (n.insertBefore(i, n.firstElementChild), n.setAttribute("data-animatefill", ""), (n.style.overflow = "hidden"), e.setProps({ arrow: !1, animation: "shift-away" })); 10192 }, 10193 onMount: function () { 10194 var e, t; 10195 i && ((e = n.style.transitionDuration), (t = Number(e.replace("ms", ""))), (a.style.transitionDelay = Math.round(t / 10) + "ms"), (i.style.transitionDuration = e), he([i], "visible")); 10196 }, 10197 onShow: function () { 10198 i && (i.style.transitionDuration = "0ms"); 10199 }, 10200 onHide: function () { 10201 i && he([i], "hidden"); 10202 }, 10203 }; 10204 }, 10205 }; 10206 var P = { clientX: 0, clientY: 0 }, 10207 L = []; 10208 function I(e) { 10209 var t = e.clientX, 10210 e = e.clientY; 10211 P = { clientX: t, clientY: e }; 10212 } 10213 var z = { 10214 name: "followCursor", 10215 defaultValue: !1, 10216 fn: function (n) { 10217 var c = n.reference, 10218 t = me(n.props.triggerTarget || c), 10219 a = !1, 10220 i = !1, 10221 e = !0, 10222 r = n.props; 10223 function o() { 10224 return "initial" === n.props.followCursor && n.state.isVisible; 10225 } 10226 function s() { 10227 t.addEventListener("mousemove", u); 10228 } 10229 function l() { 10230 t.removeEventListener("mousemove", u); 10231 } 10232 function d() { 10233 (a = !0), n.setProps({ getReferenceClientRect: null }), (a = !1); 10234 } 10235 function u(e) { 10236 var t = !e.target || c.contains(e.target), 10237 r = n.props.followCursor, 10238 o = e.clientX, 10239 s = e.clientY, 10240 e = c.getBoundingClientRect(), 10241 l = o - e.left, 10242 d = s - e.top; 10243 (!t && n.props.interactive) || 10244 n.setProps({ 10245 getReferenceClientRect: function () { 10246 var e = c.getBoundingClientRect(), 10247 t = o, 10248 n = s; 10249 "initial" === r && ((t = e.left + l), (n = e.top + d)); 10250 var a = "horizontal" === r ? e.top : n, 10251 i = "vertical" === r ? e.right : t, 10252 n = "horizontal" === r ? e.bottom : n, 10253 t = "vertical" === r ? e.left : t; 10254 return { width: i - t, height: n - a, top: a, right: i, bottom: n, left: t }; 10255 }, 10256 }); 10257 } 10258 function p() { 10259 n.props.followCursor && (L.push({ instance: n, doc: t }), t.addEventListener("mousemove", I)); 10260 } 10261 function f() { 10262 0 === 10263 (L = L.filter(function (e) { 10264 return e.instance !== n; 10265 })).filter(function (e) { 10266 return e.doc === t; 10267 }).length && t.removeEventListener("mousemove", I); 10268 } 10269 return { 10270 onCreate: p, 10271 onDestroy: f, 10272 onBeforeUpdate: function () { 10273 r = n.props; 10274 }, 10275 onAfterUpdate: function (e, t) { 10276 t = t.followCursor; 10277 a || (void 0 !== t && r.followCursor !== t && (f(), t ? (p(), !n.state.isMounted || i || o() || s()) : (l(), d()))); 10278 }, 10279 onMount: function () { 10280 n.props.followCursor && !i && (e && (u(P), (e = !1)), o() || s()); 10281 }, 10282 onTrigger: function (e, t) { 10283 pe(t) && (P = { clientX: t.clientX, clientY: t.clientY }), (i = "focus" === t.type); 10284 }, 10285 onHidden: function () { 10286 n.props.followCursor && (d(), l(), (e = !0)); 10287 }, 10288 }; 10289 }, 10290 }; 10291 var D = { 10292 name: "inlinePositioning", 10293 defaultValue: !1, 10294 fn: function (i) { 10295 var n, 10296 a = i.reference; 10297 var r = -1, 10298 o = !1, 10299 s = { 10300 name: "tippyInlinePositioning", 10301 enabled: !0, 10302 phase: "afterWrite", 10303 fn: function (e) { 10304 var t = e.state; 10305 i.props.inlinePositioning && 10306 (n !== t.placement && 10307 i.setProps({ 10308 getReferenceClientRect: function () { 10309 return (function (t, e, n, a) { 10310 if (n.length < 2 || null === t) return e; 10311 if (2 === n.length && 0 <= a && n[0].left > n[1].right) return n[a] || e; 10312 switch (t) { 10313 case "top": 10314 case "bottom": 10315 var i = n[0], 10316 r = n[n.length - 1], 10317 o = "top" === t, 10318 s = i.top, 10319 l = r.bottom, 10320 d = (o ? i : r).left, 10321 r = (o ? i : r).right; 10322 return { top: s, bottom: l, left: d, right: r, width: r - d, height: l - s };
10323 case "left": 10324 case "right": 10325 var c = Math.min.apply( 10326 Math, 10327 n.map(function (e) { 10328 return e.left; 10329 }) 10330 ), 10331 u = Math.max.apply( 10332 Math, 10333 n.map(function (e) { 10334 return e.right; 10335 }) 10336 ), 10337 l = n.filter(function (e) { 10338 return "left" === t ? e.left === c : e.right === u; 10339 }), 10340 s = l[0].top, 10341 l = l[l.length - 1].bottom; 10342 return { top: s, bottom: l, left: c, right: u, width: u - c, height: l - s }; 10343 default: 10344 return e; 10345 } 10346 })(de(t.placement), a.getBoundingClientRect(), ce(a.getClientRects()), r); 10347 }, 10348 }), 10349 (n = t.placement)); 10350 }, 10351 }; 10352 function e() { 10353 var e, t; 10354 o || 10355 ((e = i.props), 10356 (t = s), 10357 (e = { 10358 popperOptions: Object.assign({}, e.popperOptions, { 10359 modifiers: [].concat( 10360 ((null == (e = e.popperOptions) ? void 0 : e.modifiers) || []).filter(function (e) { 10361 return e.name !== t.name; 10362 }), 10363 [t] 10364 ), 10365 }), 10366 }), 10367 (o = !0), 10368 i.setProps(e), 10369 (o = !1)); 10370 } 10371 return { 10372 onCreate: e, 10373 onAfterUpdate: e, 10374 onTrigger: function (e, t) { 10375 var n, a; 10376 pe(t) && 10377 ((a = (n = ce(i.reference.getClientRects())).find(function (e) { 10378 return e.left - 2 <= t.clientX && e.right + 2 >= t.clientX && e.top - 2 <= t.clientY && e.bottom + 2 >= t.clientY; 10379 })), 10380 (r = n.indexOf(a))); 10381 }, 10382 onUntrigger: function () { 10383 r = -1; 10384 }, 10385 }; 10386 }, 10387 }; 10388 t = { 10389 name: "sticky", 10390 defaultValue: !1, 10391 fn: function (n) { 10392 var a = n.reference, 10393 i = n.popper; 10394 function r(e) { 10395 return !0 === n.props.sticky || n.props.sticky === e; 10396 } 10397 var o = null, 10398 s = null; 10399 function l() { 10400 var e = r("reference") ? (n.popperInstance ? n.popperInstance.state.elements.reference : a).getBoundingClientRect() : null, 10401 t = r("popper") ? i.getBoundingClientRect() : null; 10402 ((e && $(o, e)) || (t && $(s, t))) && n.popperInstance && n.popperInstance.update(
10402), (o = e), (s = t), n.state.isMounted && requestAnimationFrame(l); 10403 } 10404 return { 10405 onMount: function () { 10406 n.props.sticky && l(); 10407 }, 10408 }; 10409 }, 10410 }; 10411 function $(e, t) { 10412 return !e || !t || e.top !== t.top || e.right !== t.right || e.bottom !== t.bottom || e.left !== t.left; 10413 } 10414 return ( 10415 e && 10416 (function (e) { 10417 var t = document.createElement("style"); 10418 (t.textContent = e), t.setAttribute("data-tippy-stylesheet", ""); 10419 var n = document.head; 10420 (e = document.querySelector("head>style,head>link")) ? n.insertBefore(t, e) : n.appendChild(t); 10421 })( 10422 '.tippy-box[data-animation=fade][data-state=hidden]{opacity:0}[data-tippy-root]{max-width:calc(100vw - 10px)}.tippy-box{position:relative;background-color:#333;color:#fff;border-radius:4px;font-size:14px;line-height:1.4;outline:0;transition-property:transform,visibility,opacity}.tippy-box[data-placement^=top]>.tippy-arrow{bottom:0}.tippy-box[data-placement^=top]>.tippy-arrow:before{bottom:-7px;left:0;border-width:8px 8px 0;border-top-color:initial;transform-origin:center top}.tippy-box[data-placement^=bottom]>.tippy-arrow{top:0}.tippy-box[data-placement^=bottom]>.tippy-arrow:before{top:-7px;left:0;border-width:0 8px 8px;border-bottom-color:initial;transform-origin:center bottom}.tippy-box[data-placement^=left]>.tippy-arrow{right:0}.tippy-box[data-placement^=left]>.tippy-arrow:before{border-width:8px 0 8px 8px;border-left-color:initial;right:-7px;transform-origin:center left}.tippy-box[data-placement^=right]>.tippy-arrow{left:0}.tippy-box[data-placement^=right]>.tippy-arrow:before{left:-7px;border-width:8px 8px 8px 0;border-right-color:initial;transform-origin:center right}.tippy-box[data-inertia][data-state=visible]{transition-timing-function:cubic-bezier(.54,1.5,.38,1.11)}.tippy-arrow{width:16px;height:16px;color:#333}.tippy-arrow:before{content:"";position:absolute;border-color:transparent;border-style:solid}.tippy-content{position:relative;padding:5px 9px;z-index:1}' 10423 ), 10424 M.setDefaultProps({ plugins: [O, z, D, t], render: S }), 10425 (M.createSingleton = function (e, t) { 10426 void 0 === t && (t = {}), we(!Array.isArray(e), ["The first argument passed to createSingleton() must be an array of", "tippy instances. The passed value was", String(e)].join(" ")); 10427 var i, 10428 r = e, 10429 o = [], 10430 s = t.overrides, 10431 n = [], 10432 a = !1; 10433 function l() { 10434 o = r.map(function (e) { 10435 return e.reference; 10436 }); 10437 } 10438 function d(t) { 10439 r.forEach(function (e) { 10440 t ? e.enable() : e.disable(); 10441 }); 10442 } 10443 function c(a) { 10444 return r.map(function (t) { 10445 var n = t.setProps; 10446 return ( 10447 (t.setProps = function (e) { 10448 n(e), t.reference === i && a.setProps(e); 10449 }), 10450 function () { 10451 t.setProps = n; 10452 } 10453 ); 10454 }); 10455 } 10456 function u(e, t) { 10457 var n, 10458 a = o.indexOf(t); 10459 t !== i && 10460 ((i = t), 10461 (n = (s || []).concat("content").reduce(function (e, t) { 10462 return (e[t] = r[a].props[t]), e; 10463 }, {})), 10464 e.setProps( 10465 Object.assign({}, n, { 10466 getReferenceClientRect: 10467 "function" == typeof n.getReferenceClientRect 10468 ? n.getReferenceClientRect 10469 : function () { 10470 return t.getBoundingClientRect(); 10471 }, 10472 }) 10473 )); 10474 } 10475 d(!1), l(); 10476 var e = { 10477 fn: function () { 10478 return { 10479 onDestroy: function () { 10480 d(!0); 10481 }, 10482 onHidden: function () { 10483 i = null; 10484 }, 10485 onClickOutside: function (e) { 10486 e.props.showOnCreate && !a && ((a = !0), (i = null)); 10487 }, 10488 onShow: function (e) { 10489 e.props.showOnCreate && !a && ((a = !0), u(e, o[0])); 10490 }, 10491 onTrigger: function (e, t) { 10492 u(e, t.currentTarget); 10493 }, 10494 }; 10495 }, 10496 }, 10497 p = M( 10498 ue(), 10499 Object.assign({}, m(t, ["overrides"]), { 10500 plugins: [e].concat(t.plugins || []), 10501 triggerTarget: o, 10502 popperOptions: Object.assign({}, t.popperOptions, { modifiers: [].concat((null == (t = t.popperOptions) ? void 0 : t.modifiers) || [], [k]) }), 10503 }) 10504 ), 10505 f = p.show; 10506 (p.show = function (e) { 10507 if ((f(), !i && null == e)) return u(p, o[0]); 10508 if (!i || null != e) { 10509 if ("number" == typeof e) return o[e] && u(p, o[e]); 10510 if (r.includes(e)) { 10511 var t = e.reference; 10512 return u(p, t); 10513 } 10514 return o.includes(e) ? u(p, e) : void 0; 10515 } 10516 }), 10517 (p.showNext = function () { 10518 var e = o[0]; 10519 if (!i) return p.show(0); 10520 var t = o.indexOf(i); 10521 p.show(o[t + 1] || e); 10522 }), 10523 (p.showPrevious = function () { 10524 var e = o[o.length - 1]; 10525 if (!i) return p.show(e); 10526 var t = o.indexOf(i), 10527 e = o[t - 1] || e; 10528 p.show(e); 10529 }); 10530 var h = p.setProps; 10531 return ( 10532 (p.setProps = function (e) { 10533 (s = e.overrides || s), h(e); 10534 }), 10535 (p.setInstances = function (e) { 10536 d(!0),
10537 n.forEach(function (e) { 10538 return e(); 10539 }), 10540 (r = e), 10541 d(!1), 10542 l(), 10543 c(p), 10544 p.setProps({ triggerTarget: o }); 10545 }), 10546 (n = c(p)), 10547 p 10548 ); 10549 }), 10550 (M.delegate = function (e, a) { 10551 we(!(a && a.target), ["You must specity a `target` prop indicating a CSS selector string matching", "the target elements that should receive a tippy."].join(" ")); 10552 var i = [], 10553 r = [], 10554 o = !1, 10555 s = a.target, 10556 t = m(a, ["target"]), 10557 n = Object.assign({}, t, { trigger: "manual", touch: !1 }), 10558 l = Object.assign({}, t, { showOnCreate: !0 }); 10559 function d(e) { 10560 var t, n; 10561 !e.target || 10562 o || 10563 ((n = e.target.closest(s)) && 10564 ((t = n.getAttribute("data-tippy-trigger") || a.trigger || xe.trigger), 10565 n._tippy || ("touchstart" === e.type && "boolean" == typeof l.touch) || ("touchstart" !== e.type && t.indexOf(A[e.type]) < 0) || ((n = M(n, l)) && (r = r.concat(n))))); 10566 } 10567 function c(e, t, n, a) { 10568 e.addEventListener(t, n, (a = void 0 === a ? !1 : a)), i.push({ node: e, eventType: t, handler: n, options: a }); 10569 } 10570 return ( 10571 se((n = M(e, n))).forEach(function (e) {
10572 var t = e.destroy, 10573 n = e.enable, 10574 a = e.disable; 10575 (e.destroy = function (e) { 10576 (e = void 0 === e ? !0 : e) && 10577 r.forEach(function (e) { 10578 e.destroy(); 10579 }), 10580 (r = []), 10581 i.forEach(function (e) { 10582 var t = e.node, 10583 n = e.eventType, 10584 a = e.handler, 10585 e = e.options; 10586 t.removeEventListener(n, a, e); 10587 }), 10588 (i = []), 10589 t(); 10590 }), 10591 (e.enable = function () { 10592 n(), 10593 r.forEach(function (e) { 10594 return e.enable(); 10595 }), 10596 (o = !1); 10597 }), 10598 (e.disable = function () { 10599 a(), 10600 r.forEach(function (e) { 10601 return e.disable(); 10602 }), 10603 (o = !0); 10604 }), 10605 c((e = (e = e).reference), "touchstart", d, ae), 10606 c(e, "mouseover", d), 10607 c(e, "focusin", d), 10608 c(e, "click", d); 10609 }), 10610 n 10611 ); 10612 }), 10613 (M.hideAll = function (e) { 10614 var e = void 0 === e ? {} : e, 10615 n = e.exclude, 10616 a = e.duration; 10617 Me.forEach(function (e) { 10618 var t = !1; 10619 (t = n ? (l(n) ? e.reference === n : e.popper === n.popper) : t) || ((t = e.props.duration), e.setProps({ duration: a }), e.hide(), e.state.isDestroyed || e.setProps({ duration: t })); 10620 }); 10621 }), 10622 (M.roundArrow = '<svg width="16" height="6" xmlns="http://www.w3.org/2000/svg"><path d="M0 6s1.796-.013 4.67-3.615C5.851.9 6.93.006 8 0c1.07-.006 2.148.887 3.343 2.385C14.233 6.005 16 6 16 6H0z"></svg>'), 10623 M 10624 ); 10625 }); 10626jQuery(function($) { 10627 'use strict'; 10628 10629 /** 10630 * Bundle switcher 10631 */ 10632 var Switcher = { 10633 10634 /** 10635 * Initialize 10636 */ 10637 init: function() { 10638 $('.bundle-switcher input:radio[name="add-to-cart"]').change(this.change); 10639 $('.bundle-switcher').submit(this.submit); 10640 }, 10641 10642 /** 10643 * @param {string} endpoint 10644 */ 10645 get_url: function(endpoint) { 10646 return melvil_params.wc_ajax_url.toString().replace( 10647 '%%endpoint%%', 10648 endpoint 10649 ); 10650 }, 10651 10652 /** 10653 * Change select 10654 * 10655 * @param {object} e 10656 */ 10657 change: function(e) { 10658 $('.bundle-switcher label').removeClass('active'); 10659 if ($(this).is(':checked')) { 10660 $(this).closest('label').addClass('active'); 10661 } 10662 }, 10663 10664 submit: function(e) { 10665 e.preventDefault(); 10666 10667 var $thisbutton = $(this).find('[type="submit"]'); 10668 10669 var productInputs = $(this).find("input[name='product_id']"); 10670 10671 if (productInputs.length < 1) { 10672 alert( 'Vyberte prosÃm balÃÄek, který chcete zakoupit' ); 10673 return; 10674 } 10675 10676 var isChecked = false; 10677 10678 productInputs.each(function() { 10679 if ($(this).is(':checked')) { 10680 isChecked = true; 10681 return false; // Exit the loop early since at least one is checked 10682 } 10683 }); 10684 10685 if (!isChecked) { 10686 alert('Vyberte prosÃm balÃÄek, který chcete zakoupit'); 10687 return; 10688 } 10689 10690 $thisbutton.removeClass('added'); 10691 $thisbutton.addClass('loading'); 10692 10693 $.ajax({ 10694 type: 'POST', 10695 url: Switcher.get_url('add_to_cart'), 10696 data: $(this).serialize(), 10697 success: function(res) { 10698 if (!res) { 10699 return; 10700 } 10701 10702 if (res.error && re.product_url) { 10703 window.location = res.product_url; 10704 return; 10705 } 10706 10707 $(document.body).trigger('added_to_cart', [res.fragments, res.cart_hash, $thisbutton] ); 10708 } 10709 }); 10710 } 10711 }; 10712 10713 Switcher.init(); 10714}); 10715 10716 10717 10718jQuery(function($) { 10719 'use strict'; 10720 10721 /** 10722 * Added to cart modal 10723 */ 10724 var Modal = { 10725 10726 /** 10727 * Init events 10728 */ 10729 init: function() { 10730 $('body').on('added_to_cart', this.open); 10731 $('.js-modal-close').click(this.close); 10732 }, 10733 10734 /** 10735 * Open modal 10736 * 10737 * @param {object} e 10738 */ 10739 open: function(e) { 10740 $.ajax({
10741 type: 'GET', 10742 url: melvil_params.added_to_cart_url, 10743 dataType: 'html', 10744 success: function(res) { 10745 $('#added-to-cart-modal .modal-content').html(res); 10746 }, 10747 complete: function() { 10748 $('#added-to-cart-modal').addClass('open'); 10749 } 10750 }); 10751 }, 10752 10753 /** 10754 * Close modal 10755 * 10756 * @param {object} e 10757 */ 10758 close: function(e) { 10759 e.preventDefault(); 10760 $('.modal').removeClass('open'); 10761 } 10762 }; 10763 10764 Modal.init(); 10765}); 10766 10767jQuery(function($) { 10768 'use strict'; 10769 10770 var Filter = { 10771 10772 /** 10773 * Initialize 10774 */ 10775 init: function() { 10776 this.change(); 10777 $('.filter-toggle').click(this.openFilters); 10778 $('.filter-block-toggle').click(this.openBlockFilter); 10779 $('.filter-form :input').change(this.change); 10780 $('.price_slider').on('slidechange', this.sliderChange); 10781 $('.filter-menu-toggle').click(this.openSubMenu); 10782 // TlaÄÃtko "PoužÃt filtry" na mobilu jen zavÅe panel (filtry se aplikujà live pÅi zmÄnÄ). 10783 $(document).on('click', '.filter-usage button, .filter-usage .btn', this.applyFilters); 10784 }, 10785 10786 /** 10787 * Apply filters on mobile = close the filter overlay (filters already applied live). 10788 * 10789 * @param {object} e 10790 */ 10791 applyFilters: function(e) { 10792 e.preventDefault(); 10793 $('body').removeClass('filter-opened'); 10794 }, 10795 10796 /** 10797 * @param {object} e 10798 */ 10799 openFilters: function(e) { 10800 e.preventDefault(); 10801 $('body').toggleClass('filter-opened'); 10802 }, 10803 10804 /** 10805 * @param {object} e 10806 */ 10807 openBlockFilter: function(e) { 10808 e.preventDefault(); 10809 $(this).closest('.filter-block').toggleClass('open'); 10810 }, 10811 10812 /** 10813 * Open a submenu 10814 * 10815 * @param {object} e 10816 */ 10817 openSubMenu: function(e) { 10818 e.preventDefault(); 10819 $(this).toggleClass('active') 10820 $(this).closest('.flex').next().toggleClass('open'); 10821 }, 10822 10823 /** 10824 * Change value in inputs 10825 * 10826 * @param {object} e 10827 */ 10828 change: function(e) { 10829 var count = Filter.count(); 10830 if (0 < count) { 10831 $('.filter-reset').show(); 10832 } else { 10833 $('.filter-reset').hide(); 10834 } 10835 10836 $('.filter-count').text('('+count+')'); 10837 10838 if (!$(this).is(':checked')) { 10839 $(this).closest('li').find('input[type="checkbox"]').prop('checked', false); 10840 } 10841 10842 var width = Math.max( 10843 document.body.scrollWidth, 10844 document.documentElement.scrollWidth, 10845 document.body.offsetWidth, 10846 document.documentElement.offsetWidth, 10847 document.documentElement.clientWidth 10848 ); 10849 10850 if ( 1080 <= width) { 10851 $(this).closest('.filter-form').submit(); 10852 } 10853 }, 10854 10855 /** 10856 * Change slider 10857 * 10858 * @param {object} e 10859 */ 10860 sliderChange: function(e) { 10861 var width = Math.max( 10862 document.body.scrollWidth, 10863 document.documentElement.scrollWidth, 10864 document.body.offsetWidth, 10865 document.documentElement.offsetWidth, 10866 document.documentElement.clientWidth 10867 ); 10868 10869 if ( 1080 <= width) { 10870 $(this).closest('.filter-form').submit(); 10871 } 10872 }, 10873 10874 /** 10875 * Count values 10876 * 10877 * @return {int} 10878 */ 10879 count: function() { 10880 var count = 0; 10881 $('.filter-form :input').each(function(el) { 10882 if ($(this).prop('checked')) { 10883 count++; 10884 } 10885 }); 10886 return count; 10887 } 10888 }; 10889 10890 Filter.init(); 10891}); 10892 10893jQuery(function($) { 10894 'use strict'; 10895 10896 /** 10897 * Audio player using Howler.js 10898 */ 10899 var AudioPlayer = { 10900 10901 /** 10902 * Collection of sounds 10903 */ 10904 sounds: [], 10905 10906 /** 10907 * Initialize 10908 */ 10909 init: function() { 10910 $('.audio-player .control').on('click', this.playStop); 10911 $('.audio-player .progress').on('click', this.next); 10912 }, 10913 10914 /** 10915 * Get file name from url 10916 * 10917 * @param {string} url 10918 * @return {string} 10919 */ 10920 getFileName: function(url) { 10921 return url.substring(url.lastIndexOf('/')+1); 10922 }, 10923 10924 /** 10925 * Get source 10926 * 10927 * @poram {object} control 10928 */ 10929 getSource: function(control) { 10930 return control.closest('.audio-player').data('src'); 10931 }, 10932 10933 /** 10934 * Get Howler object 10935 * 10936 * @param {string} song 10937 * @return {object}|null 10938 */ 10939 getSound: function(song, control) { 10940 // Stop playing other sounds â nikdy ne ten, o který si právÄ ÅÃkáme. 10941 // playStop() vola getSound() jeste pred rozhodnutim play/pause, takze zastaveni 10942 // tohoto zvuku by ho vratilo jako "nehraje" a klik na pauzu by ho zase spustil. 10943 for (var key in this.sounds) { 10944 if (key !== song && this.sounds[key] && this.sounds[key].playing()) { 10945 this.sounds[key].pause(); 10946 } 10947 } 10948 10949 // If exists 10950 if (this.sounds[song]) { 10951 return this.sounds[song]; 10952 } 10953 10954 // Create audio player 10955 var player = control.closest('.audio-player'); 10956 10957 this.sounds[song] = new Howl({ 10958 src: AudioPlayer.getSource(control), 10959 html5: true, // HTML5 Audio: streamovat (neÄekat na staženà celého souboru) + nenà umlÄeno iOS tichým režimem 10960 onplay: function() { 10961 control.removeClass('loading').addClass('playing'); 10962 var time = Math.round(this.duration()); 10963 player.find('.audio-player__time').html(AudioPlayer.formatTime(time)); 10964 requestAnimationFrame(AudioPlayer.updateTimeTracker.bind(this, player)); 10965 }, 10966 onpause: function() { 10967 control.removeClass('loading playing'); 10968 }, 10969 onend: function() { 10970 control.removeClass('loading playing'); 10971 }, 10972 onloaderror: function() { 10973 control.removeClass('loading playing'); 10974 player.find('.audio-player__time').html('Chyba naÄtenÃ'); 10975 }, 10976 onplayerror: function() { 10977 control.removeClass('loading playing'); 10978 }, 10979 onseek: function() { 10980 requestAnimationFrame(AudioPlayer.updateTimeTracker.bind(this, player)); 10981 } 10982 }); 10983 10984 return this.sounds[song]; 10985 }, 10986 10987 getPlayer: function(control) { 10988 10989 }, 10990 10991 /** 10992 * Format time 10993 * 10994 * @param {int} secs 10995 * @return string 10996 */ 10997 formatTime: function(secs) { 10998 var minutes = Math.floor(secs / 60) || 0; 10999 var seconds = (secs - minutes * 60) || 0; 11000 return minutes + ':' + (seconds < 10 ? '0' : '') + seconds; 11001 }, 11002 11003 /** 11004 * Update time tracker 11005 */ 11006 updateTimeTracker: function(player) { 11007 var self = this; 11008 var seek = self.seek() || 0; 11009 var currentTime = AudioPlayer.formatTime(Math.round(self.duration() - seek)); 11010 11011 player.find('.audio-player__time').html('-'+currentTime); 11012 player.find('.progress span').css('width', (((seek / self.duration()) * 100) || 0) + '%'); 11013 11014 if (self.playing()) { 11015 requestAnimationFrame(AudioPlayer.updateTimeTracker.bind(self, player)); 11016 } 11017 }, 11018 11019 /** 11020 * Play/Stop 11021 * 11022 * @param {object} e 11023 */ 11024 playStop: function(e) { 11025 var control = $(this); 11026
11027 // ProbÃhá naÄÃtánà â ignorovat dalšà klik (zabránà dvojÃmu play). 11028 if (control.hasClass('loading')) { 11029 return; 11030 } 11031 11032 // Get a file path 11033 var source = AudioPlayer.getSource(control); 11034 if (!source) { 11035 return; 11036 } 11037 11038 // Get a file name 11039 var song = AudioPlayer.getFileName(source); 11040 if (!song) { 11041 return; 11042 } 11043 11044 // Create a player 11045 var sound = AudioPlayer.getSound(song, control); 11046 11047 // Play/Pause â stav 'playing' ÅÃdà až Howler event onplay, aby tlaÄÃtko nelhalo. 11048 if (sound.playing()) { 11049 sound.pause(); // tÅÃdy odebere onpause 11050 } else { 11051 control.addClass('loading'); // "NaÄÃtámâ¦" dokud reálnÄ nezaÄne hrát 11052 control.closest('.audio-player').find('.audio-player__time').html('NaÄÃtámâ¦'); 11053 sound.play(); 11054 } 11055 }, 11056 11057 next: function(e) { 11058 var control = $(e.currentTarget).prev('.control'); 11059 11060 // Get a file path 11061 var source = AudioPlayer.getSource(control); 11062 if (!source) { 11063 return; 11064 } 11065 11066 // Get a file name 11067 var song = AudioPlayer.getFileName(source); 11068 if (!song) { 11069 return; 11070 } 11071 11072 // Create a player 11073 var sound = AudioPlayer.getSound(song, control); 11074 var width = $(e.currentTarget).width(); 11075 var duration = sound.duration(); 11076 var seek = e.offsetX / width * duration; 11077 control.removeClass('playing').addClass('loading'); // stav 'playing' nastavà až onplay 11078 sound.seek(seek); 11079 sound.play(); 11080 } 11081 }; 11082 11083 AudioPlayer.init(); 11084}); 11085 11086jQuery(function($) { 11087 'use strict'; 11088 11089 document.querySelectorAll('.js-carousel .swiper-container').forEach(function(elem) { 11090 var paginationEl = elem.parentElement.querySelector('.swiper-pagination'); 11091 new Swiper(elem, { 11092 loop: true, 11093 slidesPerView: 1.2, 11094 spaceBetween: 15, 11095 navigation: { 11096 nextEl: elem.nextElementSibling.nextElementSibling, 11097 prevEl: elem.nextElementSibling 11098 }, 11099 pagination: paginationEl ? { 11100 el: paginationEl, 11101 clickable: true 11102 } : false, 11103 breakpoints: { 11104 560: { 11105 slidesPerView: 2 11106 }, 11107 1080: { 11108 slidesPerView: 3 11109 } 11110 } 11111 }); 11112 }); 11113 11114 document.querySelectorAll('.js-carousel-product .swiper-container').forEach(function(elem) { 11115 new Swiper(elem, { 11116 loop: true, 11117 slidesPerView: 1.5, 11118 spaceBetween: 15, 11119 navigation: { 11120 nextEl: elem.nextElementSibling.nextElementSibling, 11121 prevEl: elem.nextElementSibling 11122 }, 11123 breakpoints: { 11124 420: { 11125 slidesPerView: 2 11126 }, 11127 640: { 11128 slidesPerView: 3, 11129 spaceBetween: 98 11130 } 11131 } 11132 }); 11133 }); 11134 11135 document.querySelectorAll('.slider .swiper-container').forEach(function(elem) { 11136 new Swiper(elem, { 11137 autoplay: { 11138 delay: 5000 11139 }, 11140 loop: true, 11141 slidesPerView: 1, 11142 autoHeight: true, 11143 navigation: { 11144 nextEl: elem.nextElementSibling.nextElementSibling, 11145 prevEl: elem.nextElementSibling 11146 } 11147 }); 11148 }); 11149}); 11150 11151jQuery(function($) { 11152 'use strict'; 11153 11154 /** 11155 * Checkout 11156 */ 11157 var Checkout = { 11158 11159 /** 11160 * Initialize 11161 */ 11162 init: function() { 11163 this.markup(); 11164 $('body').on('updated_checkout', this.markup); 11165 }, 11166 11167 /** 11168 * Change markup 11169 */ 11170 markup: function() { 11171 $('.mc4wp-checkbox').each(function() { 11172 var el = $(this); 11173 el.find('label').addClass('checkbox'); 11174 el.find('label').append('<span class="checkbox-toggle"></span>'); 11175 }); 11176 } 11177 } 11178 11179 Checkout.init(); 11180}); 11181 11182jQuery(function (t) { 11183 "use strict"; 11184 tippy("[data-tippy-content]"), 11185 t("body").on("click", ".js-open-coupon-form", function (e) { 11186 e.preventDefault(), t("tr.coupon-form").toggle(); 11187 }), 11188 t(".js-open-uservoice").click(function (e) { 11189 e.preventDefault(), t("body #uvTabLabel")[0].click(); 11190 }), 11191 t("body").on("click", ".js-cart-minus", function (e) { 11192 e.preventDefault(); 11193 e = t(this).closest(".quantity").find("input"); 11194 e.val(parseInt(e.val()) - 1), e.trigger("change"), t('button[name="update_cart"]').trigger("click"); 11195 }), 11196 t("body").on("click", ".js-cart-plus", function (e) { 11197 e.preventDefault(); 11198 e = t(this).closest(".quantity").find("input"); 11199 e.val(parseInt(e.val()) + 1), e.trigger("change"), t('button[name="update_cart"]').trigger("click"); 11200 }), 11201 t(document).on("click", ".navbar-toggle", function (e) { 11202 e.preventDefault(); 11203 var href = t(this).attr("href"); 11204 if (!href) return; 11205 var $target = t(href); 11206 var willOpen = !$target.hasClass("open"); 11207 $target.toggleClass("open", willOpen); 11208 t(this).toggleClass("active", willOpen); 11209 }), 11210 t(".js-tab") 11211 .find("a") 11212 .click(function (e) { 11213 e.preventDefault(), t(this).closest("ul").find("li").removeClass("menu-item-current"), t(this).closest("li").addClass("menu-item-current"); 11214 var tabTarget = t(this).closest("ul"); 11215 var divTarget = tabTarget.parent(); 11216 var tabLi = t(this).closest("li"); 11217 var targetType = tabLi.data("type"); 11218 divTarget.find(".tab-content").removeClass("open"); 11219 divTarget.find("div[data-type=" + targetType + "]").addClass("open"); 11220 }); 11221}); 11222jQuery(function (t) { 11223 function a() { 11224 t("#shipping_method li").removeClass("active"), t('#shipping_method input[type="radio"]:checked').closest("li").addClass("active"); 11225 } 11226 t("body").on("change", ".wc_payment_methods input", function () { 11227 a(); 11228 }), 11229 a(); 11230 function i() { 11231 t(".wc_payment_methods li").removeClass("active"), t('.wc_payment_methods input[name="payment_method"]:checked').closest("li").addClass("active"); 11232 } 11233 t("body").on("change", ".wc_payment_methods input", function () { 11234 i(); 11235 }), 11236 i(), 11237 t('a[href*=".jpg"], a[href*="jpeg"], a[href*=".png"], a[href*=".gif"]').fancybox(), 11238 "undefined" != typeof wc_checkout_params && 11239 t(document).ajaxComplete(function (e, t, n) { 11240 (updateCheckoutEvent = wc_checkout_params.wc_ajax_url.toString().replace("%%endpoint%%", "update_order_review")), n.url === updateCheckoutEvent && (i(), a()); 11241 }), 11242 t(".box .add_to_cart_button, .cross-sells .add_to_cart_button").on("click", function () { 11243 dataLayer.push({ event: "Kliknutà na tlaÄÃtko pro koupi knihy", action: t(this).data("action"), label: t(this).data("label") }); 11244 }); 11245 var e = t('#billing_options_field input[type="checkbox"]:checked'), 11246 n = t(".ml-company"); 11247 function r(e) { 11248 e.is(":checked") ? (0 == (e = t(".ml-company-required label")).find("abbr").length && e.append(' <abbr class="required" title="vyžadováno">*</abbr>'), n.show()) : n.hide(); 11249 } 11250 r(e), 11251 t('#billing_options_field input[type="checkbox"]').on("change", function () { 11252 r(t(this)); 11253 }); 11254});
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.