1// placeholder 2$(function() { 3 function loginPlaceholder(){ 4 if ($('.xans-member-login').val() != undefined) { 5 var loginId = $('#member_id').parent().attr('title'); 6 $('#member_id').attr('placeholder', loginId); 7 $('#member_passwd').attr('placeholder', 'Password'); 8 } 9 } 10 loginPlaceholder(); 11}); 12 13// keyboard 14$('.keyboard button').on('click', function(){ 15 if($(this).hasClass('selected')==true){ 16 $('.keyboard .btnKey').removeClass('selected'); 17 $('.view div').hide(); 18 } 19 else{ 20 $('.keyboard .btnKey').removeClass('selected'); 21 $('.view div').hide(); 22 $(this).addClass('selected'); 23 var key=$(this).attr('title'); 24 $(this).parent().next().children('.'+key+'').show(); 25 } 26}); 27 28// toggle 29$('.ec-base-tab').each(function(){ 30 var selected = $(this).find('> ul > li.selected > a'); 31}); 32 33$('body').on('click', '.ec-base-tab a', function(e){ 34 var _target = $(this).attr('href'); 35 if (_target == '#member') { 36 $('#member_login_module_id').show();
37 $('#order_history_nologin_id').hide(); 38 } else { 39 $('#member_login_module_id').hide(); 40 $('#order_history_nologin_id').show(); 41 } 42 e.preventDefault(); 43}); 44 45EC$(function($) { 46 var filter = "win16|win32|win64|mac|macintel"; 47 var device = "pc"; 48 if (navigator.platform) { 49 if (filter.indexOf(navigator.platform.toLowerCase()) < 0) { 50 device = "mobile"; 51 } 52 } 53 54 /** 55 * ìíìì¸, ìí íë보기(íì ) - ìë¹ìê° í ì¸íì */ 56 var oPriceInfoEl = $('#ec-product-price-info'); 57 if (oPriceInfoEl.length > 0) { 58 var salePriceEl = $('#span_product_price_text'); 59 percentageCul(oPriceInfoEl, salePriceEl); 60 } 61 62 /** 63 * ìí목ë¡/ë©ì¸ì§ì´ - ìë¹ìê° í ì¸íì*/ 64 function sale_percent() { 65 var mainEl = $("#contents"); 66 if (mainEl.length > 0) { 67 var productListEl = $('.xans-product-listmain, .xans-product-listrecommend, .xans-product-listnew, .xans-product-listnormal, .xans-search-result'); 68 for (var i = 0; i < productListEl.length; i++) { 69 var prdListEl = productListEl.eq(i).find('.prdList > li'); 70 for (var j = 0; j < prdListEl.length; j++) { 71 var priceEl = prdListEl.eq(j).find('.description'), 72 salePriceEl = priceEl.parent().find('.thumbnail'); 73 if (device == "mobile") { 74 salePriceEl = priceEl.parent().find('.thumbnail'); 75 } 76 percentageCul(priceEl, salePriceEl); 77 78 } 79 } 80 } 81 } 82 83 function percentageCul(target, salePriceEl) { 84 var iCustomPrice = parseInt(target.attr('ec-data-custom').replace(",", "")); // ê²ìíì´ì§ìì ì¼í ìì 85 var iPrice = parseInt(target.attr('ec-data-price').replace(",", "")); // ê²ìíì´ì§ìì ì¼í ìì 86 var sDisplayAmount = 'p', // p:í ì¸ì¨, w:í ì¸ê¸ì¡ 87 iOfftoFixed = 0, // í ì¸ì¨ ììì ì릿ì 88 sSaleText = '', 89 regexp = /B(?=(d{3})+(?!d))/g; 90 91 if (iCustomPrice > 0 && iPrice > 0 && iPrice != iCustomPrice) { 92 if (sDisplayAmount == 'p') { 93 sSaleText = (((iCustomPrice - iPrice) / iCustomPrice) * 100).toFixed(iOfftoFixed) + '%'; 94 } else if (sDisplayAmount == 'w') { 95 sSaleText = parseInt(iCustomPrice - iPrice).toString().replace(regexp, ',') + 'ì OFF'; 96 } 97 salePriceEl.append("<div class='sale_box'>" + sSaleText + "</div>"); 98 } 99 } 100 101 /* ìí í ì¸ì¨ ì¤í */ 102 setTimeout(function(){ 103 sale_percent(); 104 }, 300); 105 106 /* [ë보기] ë²í¼ í´ë¦ì ìíë¡ë©ëê³ 0.6ì´í ì¬ê³ì° */ 107 jQuery(".btnMore").click( function( ){ 108 setTimeout(function(){ 109 sale_percent(); 110 }, 600); 111 }); 112}); 113/** 114 * hasClass 115 */ 116function hasClass(element, className){ 117 return (' ' + element.className + ' ').indexOf(' ' + className+ ' ') > -1; 118}; 119 120/** 121 * toggle 122 */ 123function toggleClassAll(element, handler, className){ 124 var _handler = document.querySelector(handler); 125 document.querySelectorAll(handler).forEach(function(item){ 126 item.addEventListener('click', function(){ 127 var _element = item.parentNode; 128 if ( hasClass( _element, className ) ) { 129 _element.classList.remove( className ); 130 } else { 131 _element.classList.add( className ); 132 } 133 }) 134 }) 135}; 136 137/** 138 * findElements 139 */ 140function findElements(element, findElement){ 141 var resultElements = []; 142 document.querySelectorAll(element).forEach(function(item){ 143 var findElementList = item.querySelectorAll(findElement); 144 findElementList = Array.prototype.slice.call(findElementList); 145 resultElements = resultElements.concat(findElementList); 146 }) 147 return resultElements; 148}; 149 150/** 151 * setAttributeAl 152 */ 153function setAttributeAll(elements, name, value){ 154 elements.forEach(function(item){ 155 item.setAttribute(name, value); 156 }) 157}; 158 159/** 160 * ìí ì¬ë¤ì¼ ë¡ëëì§ ìì ê²½ì°, ê¸°ë³¸ê° ì¤ì 161 */ 162function setDefaultImage(element) { 163 document.querySelectorAll(element).forEach(function(item){ 164 var $img = new Image(); 165 $img.onerror = function () { 166 item.src="//img.echosting.cafe24.com/thumb/img_product_big.gif"; 167 } 168 $img.src = item.src; 169 }); 170}; 171 172/** 173 * tooltip 174 */ 175function setTooltipEvent(){ 176 var input = findElements('.eTooltip', 'input'); 177 input.forEach(function(item){ 178 item.addEventListener('focusin', function(event){ 179 var targetName = returnTargetName(event.target); 180 targetName.nextElementSibling.style.display = 'block' 181 }); 182 item.addEventListener('focusout', function(event){ 183 var targetName = returnTargetName(event.target); 184 targetName.nextElementSibling.style.display = 'none' 185 }); 186 }); 187} 188 189/** 190 * tooltip input focus 191 */ 192function returnTargetName(_this){ 193 var ePlacename = _this.parentElement.getAttribute("class"); 194 var targetName; 195 if(ePlacename == "ePlaceholder"){ //ePlaceholder supported 196 targetName = _this.parentElement; 197 }else{ 198 targetName = _this; 199 } 200 return targetName; 201} 202
203/** 204 * window load 205 */ 206window.addEventListener('load', function(){ 207 if (document.querySelector('.thumbnail')){ 208 setDefaultImage('.thumbnail img'); 209 } 210 if (document.querySelector('.eTooltip')){ 211 setAttributeAll(findElements('.eTooltip', '.btnClose'),'tabIndex','-1'); 212 setTooltipEvent(); 213 } 214 if (document.querySelector('div.eToggle')){ 215 toggleClassAll(false, 'div.eToggle .title', 'selected'); 216 } 217}); 218window.addEventListener('load', function(){ 219 //fixedHeader(); 220 //handleNav(); 221 //quickGoTop(); ì¬ì©ìí¨ 222 //ssearchLayer(); 223 //toggleClass('.xans-layout-info.info__customer', '.xans-layout-info.info__customer .toggle', 'selected'); ì¬ì©ìí¨ 224 //topBanner(); ì¬ì©ìí¨ 225 //handleScroll(); 226}); 227 228function handleScroll(){ 229 var scrollPosition = 0; 230 var ticking = false; 231 var quickMenu = document.querySelector('#quick'); 232 var scrollY = window.scrollY || window.pageYOffset; 233 //setQuickScrollEvent(scrollY, quickMenu); ì¬ì©ìí¨ 234 window.addEventListener('scroll', function(e) { 235 scrollPosition = window.scrollY || window.pageYOffset; 236 if (ticking) return; 237 window.requestAnimationFrame(function() { 238 fixedHeader() 239 //setQuickScrollEvent(scrollPosition, quickMenu) ì¬ì©ìí¨ 240 ticking = false; 241 }); 242 ticking = true; 243 }); 244} 245 246function toggleClass(element, handler, className){ 247 var _handler = document.querySelector(handler); 248 var _element = document.querySelector(element); 249 250 _handler.addEventListener('click', function(){ 251 if ( _element.classList.contains(className) ) { 252 _element.classList.remove( className ); 253 } else { 254 _element.classList.add( className ); 255 } 256 }); 257} 258 259function fixedHeader() { 260 var header = document.getElementById("header"); 261 var fixed_margin = document.getElementById("contents"); 262 var scrollY = window.pageYOffset || document.documentElement.scrollTop; 263 var header_height = document.getElementById("header").scrollHeight+'px'; 264 265 if(scrollY > header.offsetTop) { 266 header.classList.add("fixed"); 267 fixed_margin.style.marginTop = header_height; 268 } else { 269 header.classList.remove("fixed"); 270 fixed_margin.style.marginTop = '0px'; 271 } 272} 273 274function handleNav() { 275 var btnNavs = document.querySelectorAll('.eNavFold'); 276 var btnClose = document.querySelector('#aside .btnClose'); 277 var dimmed = document.querySelector('#layoutDimmed'); 278 var elements = document.getElementsByClassName("test"); 279 btnNavs.forEach( function(btnNav) { 280 btnNav.addEventListener('click', function(){ 281 document.body.classList.add('expand'); 282 }); 283 }); 284 btnClose.addEventListener('click', function(){ 285 document.body.classList.remove('expand'); 286 }); 287 handleDimmed(dimmed, document.body, 'expand'); 288} 289 290 291function searchLayer() { 292 var btnSearchs = document.querySelectorAll('.eSearch'); 293 var btnClose = document.querySelector('.xans-layout-searchheader .btnClose'); 294 btnSearchs.forEach( function(btnSearch) { 295 btnSearch.addEventListener('click', function(){ 296 document.body.classList.add('searchExpand'); 297 var input = document.querySelector('#keyword'); 298 //input.focus(); 299 }); 300 }); 301 btnClose.addEventListener('click', function(){ 302 document.body.classList.remove('searchExpand'); 303 }); 304 var dimmed = document.querySelector('#layoutDimmed'); 305 handleDimmed(dimmed, document.body, 'searchExpand'); 306} 307 308function handleDimmed(target, element, className){ 309 target.addEventListener('click', function(){ 310 element.classList.remove(className); 311 }); 312} 313 314function bottomScroll(){ 315 var lastScrollTop = 0; 316 var delta = 5; 317 var fixBox = document.querySelector('.bottom-nav__top'); 318 var fixBoxHeight = fixBox.offsetHeight; 319 var didScroll; 320 321 window.onscroll = function(e) { 322 didScroll = true; 323 }; 324 325 setInterval(function(){ 326 if(didScroll){ 327 hasScrolled(); 328 didScroll = false; 329 } 330 }, 250); 331 332 function hasScrolled(){ 333 var nowScrollTop = window.scrollY; 334 if(Math.abs(lastScrollTop - nowScrollTop) <= delta){ 335 return; 336 } 337 if(nowScrollTop > lastScrollTop && nowScrollTop > fixBoxHeight){ 338 //Scroll down 339 var scrollTop = window.scrollTop(); 340 var innerHeight = window.innerHeight(); 341 var scrollHeight = $('body').prop('scrollHeight');
342 if (scrollTop + innerHeight >= scrollHeight) { 343 fixBox.classList.add('bottom-nav--hide'); 344 return true; 345 } 346 }else{ 347 if(nowScrollTop + window.innerHeight < document.body.offsetHeight){ 348 //Scroll up 349 fixBox.classList.remove('bottom-nav--hide'); 350 } 351 } 352 lastScrollTop = nowScrollTop; 353 } 354} 355 356 357function getOffset(element){ 358 if (!element.getClientRects().length) 359 { 360 return { top: 0, left: 0 }; 361 } 362 363 var rect = element.getBoundingClientRect(); 364 var win = element.ownerDocument.defaultView; 365 return ( 366 { 367 top: rect.top + win.pageYOffset, 368 left: rect.left + win.pageXOffset 369 }); 370} 371 372function getQuickPosition(){ 373 var role = document.querySelector("meta[name='path_role']").getAttribute('content'); 374 if (role === "MAIN") { 375 return getMainQuickPosition(); 376 } else { 377 return getSubQuickPosition(); 378 } 379} 380 381function getMainQuickPosition(){ 382 var quickMenu = document.querySelector('#quick'); 383 var collection = document.querySelector('.collection'); 384 var snsItem = document.querySelector('.snsItem'); 385 386 var mainTopSpace = 115; 387 var mainFooterSpace = 34; 388 389 var top = collection.offsetTop + collection.clientHeight + mainTopSpace; 390 var footTop = getOffset(snsItem).top + mainFooterSpace; 391 var maxY = footTop - quickMenu.offsetHeight; 392 393 return [top, maxY] 394} 395 396function getSubQuickPosition(){ 397 var quickMenu = document.querySelector('#quick'); 398 var footer = document.querySelector("#footer"); 399 400 var footerSpace = 60; 401 var top = 284; 402 var footTop = getOffset(footer).top; 403 var maxY = footTop - quickMenu.offsetHeight - footerSpace; 404 405 return [top, maxY] 406} 407 408function setQuickScrollEvent(y, quick){ 409 var header = document.querySelector('#header'); 410 var position = getQuickPosition(); 411 var scrollY = y; 412 if (scrollY >= position[0] - header.offsetHeight){ 413 if (scrollY < position[1]) { 414 quick.classList.add('fixed'); 415 quick.removeAttribute('style'); 416 } else { 417 quick.classList.remove('fixed'); 418 quick.style.position = 'absolute'; 419 quick.style.top = position[1] + 'px'; 420 } 421 } else { 422 quick.style.top = position[0] + 'px'; 423 quick.classList.remove('fixed'); 424 } 425} 426 427function quickGoTop(){ 428 var btnTop = document.querySelector('#quick .pageTop'); 429 btnTop.addEventListener('click', function(){ 430 window.scrollTo({ 431 top: 0, 432 behavior: 'smooth' 433 }); 434 }); 435} 436 437function topBanner(){ 438 var banner = document.querySelector('#topBanner'); 439 if(!banner) return; 440 var btnClose = banner.querySelector('.btnClose'); 441 btnClose.addEventListener('click', function(){ 442 banner.classList.add("hidden"); 443 }); 444} 445 446 447function getCurrentScrollPercentage(){ 448 return (window.scrollY + window.innerHeight) / document.body.clientHeight * 100 449} 450 451 452jQuery(document).ready(function() { 453 454 /* ì¹´í ê³ ë¦¬ê° ëëì¼ë ëë¨¸ì§ ì¨ê¹ 455 jQuery("#header .inner .top_nav_box .top_category").each(function(){ 456 var top_category_length = jQuery(' > ul > li',this).length; 457 if ( top_category_length > 20 ) { 458 jQuery(this).append('<div class="cate_more"></div>'); 459 } 460 jQuery(' > ul > li:lt(20)',this).show(); 461 }); */ 462 463 /* ì¹´í ê³ ë¦¬ê° ëëì¼ë ì´ìì¼ë ì¶ë ¥ë²í¼ 464 jQuery("#header .inner .top_nav_box .top_category .cate_more").click(function() { 465 var cate_more_on = jQuery(this).hasClass('on'); 466 if ( cate_more_on == false ) { 467 jQuery('#header .inner .top_nav_box .top_category > ul > li').show(); 468 jQuery('#header .inner .top_nav_box .top_category .cate_more').addClass("on"); 469 } else { 470 jQuery('#header .inner .top_nav_box .top_category .cate_more').removeClass("on"); 471 jQuery('#header .inner .top_nav_box .top_category > ul > li').hide(); 472 jQuery('#header .inner .top_nav_box .top_category > ul > li:lt(20)').show(); 473 } 474 }); */ 475 476 /* ìµìë¨ë°°ë í루ëì ë«ê¸° */ 477 jQuery(".main_top_banner .top_banner_box_inner .top_banner_close .icon").bind("click", function() { 478 if(jQuery("#top_banner_box_cloase").is(":checked")){ 479 jQuery(".main_top_banner").slideUp("fast");
480 setCookiem("top_banner_cookie", "top_banner_cookie", 1); 481 } else { 482 jQuery(".main_top_banner").slideUp("fast"); 483 } 484 }); 485 var main_top_banner_diplay = jQuery(".main_top_banner").attr("data-ez-display"); 486 if (!getCookiem("top_banner_cookie") && (main_top_banner_diplay == 'visible')) { 487 jQuery(".main_top_banner").slideDown("fast"); 488 } 489 490 /* ìµìë¨ë°°ë ë«ê¸°ë²í¼ ììì ëì´ ìì */ 491 if(jQuery(".top_banner_close").css("display") == "none"){ 492 jQuery(".main_top_banner").addClass('close_none'); 493 if (main_top_banner_diplay == 'visible') { 494 jQuery(".main_top_banner").slideDown("fast"); 495 } 496 } 497 498 /* ìë¨ ê³ ê°ì¼í° */ 499 jQuery("#header .inner .toparea .toparea_state .toparea_state_board").click(function() { 500 var theme_cl = jQuery(this).attr('class'); 501 jQuery(this).toggleClass('on'); 502 }); 503 504 /* ë¡ê·¸ì¸í¼ placeholder ì¶ê° */ 505 if (jQuery('.xans-member-login').val() != undefined) { 506 jQuery('#member_passwd').attr('placeholder', 'ë¹ë°ë²í¸'); 507 } 508 509 /* ë¹íì 주문조ííì´ì§ placeholder ì¶ê° */ 510 setTimeout(function(){ 511 if (jQuery('.xans-myshop-orderhistorynologin').val() != undefined) { 512 jQuery('#order_name').attr('placeholder', '주문ìëª '); 513 jQuery('#order_id').attr('placeholder', '주문ë²í¸(íì´í(-) í¬í¨)'); 514 jQuery('#order_password').attr('placeholder', 'ë¹íì주문 ë¹ë°ë²í¸'); 515 } 516 }, 100); 517 518 /* ê²ìíì´ì§ ì¸íë°ì¤ìì í ì¤í¸ ìì */ 519 jQuery('#ec-product-searchdata-searchkeyword_form').find('button.btnDelete').bind('click', function() { 520 jQuery('#ec-product-searchdata-keyword').val('').focus(); 521 }); 522 523 /* ë©í°ìµ ììê²½ì° ì¨ê¹ */ 524 jQuery(".xans-layout-multishoplist").each(function(){ 525 var multishoplist_count = jQuery('li', this).length; 526 if ( multishoplist_count == 1 ) { 527 jQuery(this).hide(); 528 } 529 }); 530 531 /* íë¨ ìì¤í¬ë¡ ì¬ì©íë©´ ì¶ë ¥ */ 532 jQuery("#footer .inner .bt_escrow").each(function(){ 533 var bt_escrow = jQuery(this).attr("data-ez-escrow"); 534 if ( !bt_escrow == '' ) { 535 var bt_escrow_name = jQuery("a img[data-ez-escrow-id="+ bt_escrow +"]", this).addClass('on'); 536 jQuery(this).css('display','flex'); 537 } 538 }); 539 540 /* ë¡ê·¸ì¸íì´ì§ SNS ì¬ì©íë©´ ì¶ë ¥ */ 541 jQuery(".xans-member-login .login__sns .wrap_sns_log a").each(function(){ 542 var wrap_sns_log = jQuery(this).hasClass('displaynone'); 543 if( wrap_sns_log == false){ 544 jQuery(".xans-member-login .login__sns").css('display','block'); 545 } 546 }); 547 548 /* 기íì ë ì´ììë³ê²½ì ë°ë¥¸ íê²ê³ ì ìì¹ ë³ê²½ */ 549 var header_height = document.getElementById("header").scrollHeight; 550 jQuery('.xans-project-list h3 span').css('top',-header_height+30); 551 552 /* 모ë°ì¼ìì ì¼ííë ì´ì */ 553 jQuery('#shoppQbtn').click(function(){ 554 if (jQuery("#searchContent.xans-product-searchdata").is(":hidden")) { 555 jQuery('#searchContent.xans-product-searchdata').slideDown('normal'); 556 jQuery(this).text('ìì¸ê²ì ë«ê¸°'); 557 jQuery(this).css('margin-top','0'); 558 } else { 559 jQuery('#searchContent.xans-product-searchdata').slideUp('normal'); 560 jQuery(this).text('ìì¸ê²ì'); 561 } 562 }); 563 564 /* 모ë°ì¼ìì ì¼ííë ì´ì ììì ë²í¼ ì¨ê¹ */ 565 jQuery("#searchContent").each(function(){
566 var prdCount_count = jQuery("#ec-searchdata-area", this).length; 567 if ( prdCount_count == '0' ) { 568 jQuery('#shoppQbtn').hide(); 569 } 570 }); 571 572 /* ë§ì´íì´ì§ ëìê²ìê¸ ììë ë©ìì§ íì */ 573 jQuery(".xans-myshop-boardpackage").each(function(){ 574 var boardlist = jQuery(".xans-myshop-boardlist table", this).length; 575 if ( boardlist == '0' ) { 576 jQuery('.myshop_boardlist_empty').css('display','flex'); 577 } 578 }); 579 580 /* ë보기 í´ë¦ì */ 581 jQuery('.btnMore').click(function(){ 582 setTimeout(function(){ 583 ifmore(); 584 },600) 585 }); 586 setTimeout(function(){ 587 ifmore(); 588 },300) 589 590 /* ìë¨ ì¹´í ê³ ë¦¬ ë³ê²½ ê°ì§ */ 591 top_category(); // ìë¨ì¹´í ê³ ë¦¬ 592 jQuery('#header .xans-layout-category > ul').on('DOMSubtreeModified', function() { 593 top_category(); 594 }); 595}); 596 597/* ìë¨ ì¹´í ê³ ë¦¬ */ 598function top_category(){ 599 /* ìë¨ì¹´í ê³ ë¦¬ */ 600 jQuery('#header .top_category li').mouseenter(function(e) { 601 var $this = jQuery(this).addClass('on') 602 }).mouseleave(function(e) { 603 jQuery(this).removeClass('on'); 604 }); 605 606 /* ìë¨ì¹´í ê³ ë¦¬ ì¤ë¶ë¥ì²´í¬ */ 607 jQuery('#header .top_category ul.sub_cate01 li').each(function() { 608 if (jQuery(this).children('ul').length == 0) { 609 jQuery(this).addClass('noChild'); 610 } 611 }); 612} 613 614/* ìµìë¨ë°°ë ì¿ í¤ ì¤í¬ë¦½í¸ */ 615function setCookiem(cookie_name, cookie_value, expire_date) { 616 var today = new Date(); 617 var expire = new Date(); 618 expire.setTime(today.getTime() + 3600000 * 24 * expire_date); 619 cookies = cookie_name + '=' + cookie_value + '; path=/;'; 620 if (expire_date != 0) cookies += 'expires=' + expire.toGMTString(); 621 document.cookie = cookies; 622} 623 624function delCookiem(cookie_name) { 625 var _today = new Date(); 626 var value = ''; 627 _today.setDate(_today.getDate() - 1); 628 document.cookie = cookie_name + "=" + value + '; path=/;' + "; expires=" + _today.toGMTString(); 629} 630 631function getCookiem(name) { 632 lims = document.cookie; 633 var index = lims.indexOf(name + "="); 634 if (index == -1) { 635 return null; 636 } 637 index = lims.indexOf("=", index) + 1; // first character 638 var endstr = lims.indexOf(';', index); 639 if (endstr == -1) { 640 endstr = lims.length; // last character 641 } 642 return unescape(lims.substring(index, endstr)); 643} 644 645/* ë보기 í´ë¦ì */ 646function ifmore(){ 647 /* ìí ì¸ë¤ì¼ ê´ì¬ìí ì¶ë ¥ & ì¨ê¹ */ 648 setTimeout(function(){ 649 jQuery('.ec-base-product .prdList .icon__box .wish').each(function(){ 650 var isstatus = jQuery(this).children('img').attr('icon_status'); 651 if ( isstatus == 'on' ) { 652 jQuery(this).addClass('on'); 653 } 654 }); 655 jQuery('.ec-base-product .prdList .icon__box .wish').click(function(){ 656 var isstatus = jQuery(this).children('img').attr('icon_status'); 657 if ( isstatus == 'off' ) { 658 jQuery(this).addClass('on'); 659 } else { 660 jQuery(this).removeClass('on'); 661 } 662 }); 663 },200) 664 jQuery('.ec-base-product .prdList > li').each(function(){ 665 /* ìíì§ì´ ì¥ë°êµ¬ë ì¬ì©ìí ì ì¨ê¹ */ 666 if (jQuery(".icon__box .cart > .ec-admin-icon", this).length == 1) { 667 } else { 668 jQuery('.icon__box .cart', this).hide(); 669 } 670 /* ìíì§ì´ ìµì 미리보기 ì¬ì©ìí ì ì¨ê¹ */ 671 if (jQuery(".icon__box .option > a", this).length == 1) { 672 } else { 673 jQuery('.icon__box .option', this).hide(); 674 } 675 /* ìíì§ì´ ê´ì¬ìí ì¬ì©ìí ì ì¨ê¹ */ 676 if (jQuery(".icon__box .wish > .ec-product-listwishicon", this).length == 1) { 677 } else { 678 jQuery('.icon__box .wish', this).hide(); 679 } 680 }); 681} 682//window popup script 683function winPop(url) { 684 window.open(url, "popup", "width=300,height=300,left=10,top=10,resizable=no,scrollbars=no"); 685} 686/** 687 * document.location.href split 688 * return array Param 689 */ 690function getQueryString(sKey) 691{ 692 var sQueryString = document.location.search.substring(1); 693 var aParam = {}; 694 695 if (sQueryString) { 696 var aFields = sQueryString.split("&"); 697 var aField = []; 698 for(var i=0; i<aFields.length; i++){ 699 aField = aFields[i].split('='); 700 aParam[aField[0]] = aField[1]; 701 } 702 } 703 704 aParam.page = aParam.page ? aParam.page : 1; 705 return sKey ? aParam[sKey] : aParam; 706}; 707 708/** 709 * 구매ë²í¼ 710*/ 711var globalBuyBtnScrollFunc = function() { 712 // 구매ë²í¼ ê´ë ¨ë³ì 713 var sFixId = $('#orderFixItem').length > 0 ? 'orderFixItem' : 'fixedActionButton', 714 $area = $('#orderFixArea'), 715 $item = $('#' + sFixId + '').not($area); 716 717 $(window).scroll(function(){ 718 try { 719 // 구매ë²í¼ ê´ë ¨ë³ì
720 var iCurrentHeightPos = $(this).scrollTop() + $(this).height(), 721 iButtonHeightPos = $item.offset().top; 722 723 if (iCurrentHeightPos > iButtonHeightPos || iButtonHeightPos < $(this).scrollTop() + $item.height()) { 724 if (iButtonHeightPos < $(this).scrollTop() - $item.height()) { 725 $area.fadeIn('fast'); 726 } else { 727 $area.hide(); 728 } 729 } else { 730 $area.fadeIn('fast'); 731 } 732 } catch(e) { } 733 }); 734}; 735 736$(function(){ 737 // tab 738 $.eTab = function(ul) { 739 $(ul).find('a').on('click', function() { 740 var _li = $(this).parent('li').addClass('selected').siblings().removeClass('selected'), 741 _target = $(this).attr('href'), 742 _siblings = '.' + $(_target).attr('class'); 743 $(_target).show().siblings(_siblings).hide(); 744 return false 745 }); 746 } 747 if ( window.call_eTab ) { 748 call_eTab(); 749 }; 750 globalBuyBtnScrollFunc(); 751}); 752$(function(){ 753 754 755 var popArr = []; 756 757 758 function movePopup(num) { 759 var siteWidth = $( window ).width(), 760 popRight = $('#popup_'+num).offset().left + $('#popup_'+num).outerWidth(), 761 popWidth = $('#popup_'+num).width(), 762 popiframeWidth = $('#popup_'+num+' iframe').width(); 763 764 $('#popup_'+num).css('z-index','501'); 765 766 if(popWidth<popiframeWidth){ 767 $('#popup_'+num).css('width',popiframeWidth+'px'); 768 } 769 770 if(siteWidth < popRight){ 771 $('#popup_'+num).css('left','auto'); 772 $('#popup_'+num).css('right','0px'); 773 $('#popup_'+num).css('margin-right','20px'); 774 } 775 } 776 777 778 for (var i = 0; i < 9999; i++) { 779 popArr[i] = 0; 780 781 if($('#popup_'+i).length) { 782 popArr[i] = 1; 783 } 784 785 if(popArr[i] == 1 ){ 786 movePopup(i); 787 } 788 } 789 790 791 $(window).resize(function(){ 792 for (var i = 1; i < 9999; i++) { 793 if(popArr[i] == 1 ){ 794 movePopup(i); 795 } 796 } 797 }); 798 799 800 801 802 803 $('.ec-base-product .prdList .option').each(function(){ 804 if($(this).children('a').length < 1){ 805 $(this).attr('style', 'display: none !important'); 806 $(this).siblings('.cart').css('transform','translate(-50%,-50%)'); 807 } 808 }) 809 810 811 812}); 813$(function(){ 814 if (typeof(EC_SHOP_MULTISHOP_SHIPPING) != "undefined") { 815 var sShippingCountryCode4Cookie = 'shippingCountryCode'; 816 var bShippingCountryProc = false; 817 818 // ë°°ì¡êµê° ì í ì¤ì ì´ ì¬ì©ìí¨ì´ë©´ ì¨ê¹ 819 if (EC_SHOP_MULTISHOP_SHIPPING.bMultishopShippingCountrySelection === false) { 820 $('.xans-layout-multishopshipping .xans-layout-multishopshippingcountrylist').hide(); 821 $('.xans-layout-multishoplist .xans-layout-multishoplistmultioption .xans-layout-multishoplistmultioptioncountry').hide(); 822 } else { 823 $('.thumb .xans-layout-multishoplistitem').hide(); 824 var aShippingCountryCode = document.cookie.match('(^|;) ?'+sShippingCountryCode4Cookie+'=([^;]*)(;|$)'); 825 if (typeof(aShippingCountryCode) != 'undefined' && aS
825hippingCountryCode != null && aShippingCountryCode.length > 2) { 826 var sShippingCountryValue = aShippingCountryCode[2]; 827 } 828 829 // query stringì¼ë¡ ëì´ ì¨ ë°°ì¡êµê° ê°ì´ ìë¤ë©´, ê·¸ ê°ì ì ì©í¨ 830 var aHrefCountryValue = decodeURIComponent(location.href).split("/?country="); 831 832 if (aHrefCountryValue.length == 2) { 833 var sShippingCountryValue = aHrefCountryValue[1]; 834 } 835 836 // ë©ì¸ íì´ì§ìì êµê°ì íì ìí ê²½ì°, ê·¸ ì¸ì íì´ì§ìì ì í ë ê°ì´ ì ëì¤ë íì ì²ë¦¬ 837 if (location.href.split("/").length != 4 && $(".xans-layout-multishopshipping .xans-layout-multishopshippingcountrylist").val()) { 838 $(".xans-layout-multishoplist .xans-layout-multishoplistmultioption a .ship span").text(" : "+$(".xans-layout-multishopshipping .xans-layout-multishopshippingcountrylist option:selected").text().split("SHIPPING TO : ").join("")); 839 840 if ($("#f_country").length > 0 && location.href.indexOf("orderform.html") > -1) { 841 $("#f_country").val($(".xans-layout-multishopshipping .xans-layout-multishopshippingcountrylist").val()); 842 } 843 } 844 if (typeof(sShippingCountryValue) != "undefined" && sShippingCountryValue != "" && sShippingCountryValue != null) { 845 sShippingCountryValue = sShippingCountryValue.split("#")[0]; 846 var bShippingCountryProc = true; 847 848 $(".xans-layout-multishopshipping .xans-layout-multishopshippingcountrylist").val(sShippingCountryValue); 849 $(".xans-layout-multishoplist .xans-layout-multishoplistmultioption a .ship span").text(" : "+$(".xans-layout-multishopshipping .xans-layout-multishopshippingcountrylist option:selected").text().split("SHIPPING TO : ").join("")); 850 var expires = new Date(); 851 expires.setTime(expires.getTime() + (30 * 24 * 60 * 60 * 1000)); // 30ì¼ê° ì¿ í¤ ì ì§ 852 document.cookie = sShippingCountryCode4Cookie+'=' + $(".xans-layout-multishopshipping .xans-layout-multishopshippingcountrylist").val() +';path=/'+ ';expires=' + expires.toUTCString(); 853 if ($("#f_country").length > 0 && location.href.indexOf("orderform.html") > -1) { 854 $("#f_country").val(sShippingCountryValue).change(); 855 } 856 } 857 } 858 // ì¸ì´ì í ì¤ì ì´ ì¬ì©ìí¨ì´ë©´ ì¨ê¹ 859 if (EC_SHOP_MULTISHOP_SHIPPING.bMultishopShippingLanguageSelection === false) { 860 $('.xans-layout-multishopshipping .xans-layout-multishopshippinglanguagelist').hide(); 861 $('.xans-layout-multishoplist .xans-layout-multishoplistmultioption .xans-layout-multishoplistmultioptionlanguage').hide(); 862 } else { 863 $('.thumb .xans-layout-multishoplistitem').hide(); 864 } 865 866 // ë°°ì¡êµê° ë° ì¸ì´ ì¤ì ì´ ë ë¤ ì¬ì©ìí¨ì´ë©´ ì¨ê¹ 867 if (EC_SHOP_MULTISHOP_SHIPPING.bMultishopShipping === false) { 868 $(".xans-layout-multishopshipping").hide(); 869 $('.xans-layout-multishoplist .xans-layout-multishoplistmultioption').hide(); 870 } else if (bShippingCountryProc === false && location.href.split("/").length == 4) { // ë°°ì¡êµê° ê°ì ì²ë¦¬í ì ì´ ìê³ , ë©ì¸íë©´ì¼ ëë§ ì í ë ì´ì´ë¥¼ ëì 871 var sShippingCountryValue = $(".xans-layout-multishopshipping .xans-layout-multishopshippingcountrylist").val(); 872 $(".xans-layout-multishopshipping .xans-layout-multishopshippingcountrylist").val(sShippingCountryValue); 873 $(".xans-layout-multishoplist .xans-layout-multishoplistmultioption a .ship span").text(" : "+$(".xans-layout-multishopshipping .xans-layout-multishopshippingcountrylist option:selected").text().split("SHIPPING TO : ").join("")); 874 // ë°°ì¡êµê° ì íì ì¬ì©í´ì¼ ë ì´ì´ë¥¼ ë³´ì´ê² í¨ 875 if (EC_SHOP_MULTISHOP_SHIPPING.bMultishopShippingCountrySelection === true) { 876 $(".xans-layout-multishopshipping").show(); 877 } 878 } 879 880 $(".xans-layout-multishopshipping .btnClose").on("click", function() { 881 $(".xans-layout-multishopshipping").hide(); 882 }); 883 884 $(".xans-layout-multishopshipping .ec-base-button a").on("click", function() { 885 var expires = new Date(); 886 expires.setTime(expires.getTime() + (30 * 24 * 60 * 60 * 1000)); // 30ì¼ê° ì¿ í¤ ì ì§ 887 document.cookie = sShippingCountryCode4Cookie+'=' + $(".xans-layout-multishopshipping .xans-layout-multishopshippingcountrylist").val() +';path=/'+ ';expires=' + expires.toUTCString(); 888 889 // ëë©ì¸ 문ì ë¡ ì¿ í¤ë¡ ë°°ì¡êµê° ì¤ì ì´ ì ëë ê²½ì°ë¥¼ ìí´ query stringì¼ë¡ ë°°ì¡êµê° ê°
vendor: 45,953 bytes, lines 889-910
889ì ëê¹ 890 var sQuerySting = (EC_SHOP_MULTISHOP_SHIPPING.bMultishopShippingCountrySelection === false) ? "" : "/?country="+encodeURIComponent($(".xans-layout-multishopshipping .xans-layout-multishopshippingcountrylist").val()); 891 892 location.href = '//'+$(".xans-layout-multishopshipping .xans-layout-multishopshippinglanguagelist").val()+sQuerySting; 893 }); 894 $(".xans-layout-multishoplist .xans-layout-multishoplistmultioption a").on("click", function() { 895 $(".xans-layout-multishopshipping").show(); 896 }); 897 } 898}); 899/** 900 * Swiper 4.5.1 901 * Most modern mobile touch slider and framework with hardware accelerated transitions 902 * http://www.idangero.us/swiper/ 903 * 904 * Copyright 2014-2019 Vladimir Kharlampidi 905 * 906 * Released under the MIT License 907 * 908 * Released on: September 13, 2019 909 */ 910!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e=e||self).Swiper=t()}(this,function(){"use strict";var f="undefined"==typeof document?{body:{},addEventListener:function(){},removeEventListener:function(){},activeElement:{blur:function(){},nodeName:""},querySelector:function(){return null},querySelectorAll:function(){return[]},getElementById:function(){return null},createEvent:function(){return{initEvent:function(){}}},createElement:function(){return{children:[],childNodes:[],style:{},setAttribute:function(){},getElementsByTagName:function(){return[]}}},location:{hash:""}}:document,ee="undefined"==typeof window?{document:f,navigator:{userAgent:""},location:{},history:{},CustomEvent:function(){return this},addEventListener:function(){},removeEventListener:function(){},getComputedStyle:function(){return{getPropertyValue:function(){return""}}},Image:function(){},Date:function(){},screen:{},setTimeout:function(){},clearTimeout:function(){}}:window,l=function(e){for(var t=0;t<e.length;t+=1)this[t]=e[t];return this.length=e.length,this};function I(e,t){var a=[],i=0;if(e&&!t&&e instanceof l)return e;if(e)if("string"==typeof e){var s,r,n=e.trim();if(0<=n.indexOf("<")&&0<=n.indexOf(">")){var o="div";for(0===n.indexOf("<li")&&(o="ul"),0===n.indexOf("<tr")&&(o="tbody"),0!==n.indexOf("<td")&&0!==n.indexOf("<th")||(o="tr"),0===n.indexOf("<tbody")&&(o="table"),0===n.indexOf("<option")&&(o="select"),(r=f.createElement(o)).innerHTML=n,i=0;i<r.childNodes.length;i+=1)a.push(r.childNodes[i])}else for(s=t||"#"!==e[0]||e.match(/[ .<>:~]/)?(t||f).querySelectorAll(e.trim()):[f.getElementById(e.trim().split("#")[1])],i=0;i<s.length;i+=1)s[i]&&a.push(s[i])}else if(e.nodeType||e===ee||e===f)a.push(e);else if(0<e.length&&e[0].nodeType)for(i=0;i<e.length;i+=1)a.push(e[i]);return new l(a)}function r(e){for(var t=[],a=0;a<e.length;a+=1)-1===t.indexOf(e[a])&&t.push(e[a]);return t}I.fn=l.prototype,I.Class=l,I.Dom7=l;var t={addClass:function(e){if(void 0===e)return this;for(var t=e.split(" "),a=0;a<t.length;a+=1)for(var i=0;i<this.length;i+=1)void 0!==this[i]&&void 0!==this[i].classList&&this[i].classList.add(t[a]);return this},removeClass:function(e){for(var t=e.split(" "),a=0;a<t.length;a+=1)for(var i=0;i<this.length;i+=1)void 0!==this[i]&&void 0!==this[i].classList&&this[i].classList.remove(t[a]);return this},hasClass:function(e){return!!this[0]&&this[0].classList.contains(e)},toggleClass:function(e){for(var t=e.split(" "),a=0;a<t.length;a+=1)for(var i=0;i<this.length;i+=1)void 0!==this[i]&&void 0!==this[i].classList&&this[i].classList.toggle(t[a]);return this},attr:function(e,t){var a=arguments;if(1===arguments.length&&"string"==typeof e)return this[0]?this[0].getAttribute(e):void 0;for(var i=0;i<this.length;i+=1)if(2===a.length)this[i].setAttribute(e,t);else for(var s in e)this[i][s]=e[s],this[i].setAttribute(s,e[s]);return this},removeAttr:function(e){for(var t=0;t<this.length;t+=1)this[t].removeAttribute(e);return this},data:function(e,t){var a;if(void 0!==t){for(var i=0;i<this.length;i+=1)(a=this[i]).dom7ElementDataStorage||(a.dom7ElementDataStorage={}),a.dom7ElementDataStorage[e]=t;return this}if(a=this[0]){if(a.dom7ElementDataStorage&&e in a.dom7ElementDataStorage)return a.dom7ElementDataStorage[e];var s=a.getAttribute("data-"+e);return s||void 0}},transform:function(e){for(var t=0;t<this.length;t+=1){var a=this[t].style;a.webkitTransform=e,a.transform=e}return this},transition:function(e){"string"!=typeof e&&(e+="ms");for(var t=0;t<this.length;t+=1){var a=this[t].style;a.webkitTransitionDuration=e,a.transitionDuration=e}return this},on:function(){for(var e,t=[],a=arguments.length;a--;)t[a]=arguments[a];var i=t[0],r=t[1],n=t[2],s=t[3];function o(e){var t=e.target;if(t){var a=e.target.dom7EventData||[];if(a.indexOf(e)<0&&a.unshift(e),I(t).is(r))n.apply(t,a);else for(var i=I(t).parents(),s=0;s<i.length;s+=1)I(i[s]).is(r)&&n.apply(i[s],a)}}function l(e){var t=e&&e.target&&e.target.dom7EventData||[];t.indexOf(e)<0&&t.unshift(e),n.apply(this,t)}"function"==typeof t[1]&&(i=(e=t)[0],n=e[1],s=e[2],r=void 0),s=s||!1;for(var d,p=i.split(" "),c=0;c<this.length;c+=1){var u=this[c];if(r)for(d=0;d<p.length;d+=1){var h=p[d];u.dom7LiveListeners||(u.dom7LiveListeners={}),u.dom7LiveListeners[h]||(u.dom7LiveListeners[h]=[]),u.dom7LiveListeners[h].push({listener:n,proxyListener:o}),u.addEventListener(h,o,s)}else for(d=0;d<p.length;d+=1){var v=p[d];u.dom7Listeners||(u.dom7Listeners={}),u.dom7Listeners[v]||(u.dom7Listeners[v]=[]),u.dom7Listeners[v].push({listener:n,proxyListener:l}),u.addEventListener(v,l,s)}}return this},off:function(){for(var e,t=[],a=arguments.length;a--;)t[a]=arguments[a];var i=t[0],s=t[1],r=t[2],n=t[3];"function"==typeof t[1]&&(i=(e=t)[0],r=e[1],n=e[2],s=void 0),n=n||!1;for(var o=i.split(" "),l=0;l<o.length;l+=1)for(var d=o[l],p=0;p<this.length;p+=1){var c=this[p],u=void 0;if(!s&&c.dom7Listeners?u=c.dom7Listeners[d]:s&&c.dom7LiveListeners&&(u=c.dom7LiveListeners[d]),u&&u.length)for(var h=u.length-1;0<=h;h-=1){var v=u[h];r&&v.listener===r?(c.removeEventListener(d,v.proxyListener,n),u.splice(h,1)):r&&v.listener&&v.listener.dom7proxy&&v.listener.dom7proxy===r?(c.removeEventListener(d,v.proxyListener,n),u.splice(h,1)):r||(c.removeEventListener(d,v.proxyListener,n),u.splice(h,1))}}return this},trigger:function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];for(var a=e[0].split(" "),i=e[1],s=0;s<a.length;s+=1)for(var r=a[s],n=0;n<this.length;n+=1){var o=this[n],l=void 0;try{l=new ee.CustomEvent(r,{detail:i,bubbles:!0,cancelable:!0})}catch(e){(l=f.createEvent("Event")).initEvent(r,!0,!0),l.detail=i}o.dom7EventData=e.filter(function(e,t){return 0<t}),o.dispatchEvent(l),o.dom7EventData=[],delete o.dom7EventData}return this},transitionEnd:function(t){var a,i=["webkitTransitionEnd","transitionend"],s=this;function r(e){if(e.target===this)for(t.call(this,e),a=0;a<i.length;a+=1)s.off(i[a],r)}if(t)for(a=0;a<i.length;a+=1)s.on(i[a],r);return this},outerWidth:function(e){if(0<this.length){if(e){var t=this.styles();return this[0].offsetWidth+parseFloat(t.getPropertyValue("margin-right"))+parseFloat(t.getPropertyValue("margin-left"))}return this[0].offsetWidth}return null},outerHeight:function(e){if(0<this.length){if(e){var t=this.styles();return this[0].offsetHeight+parseFloat(t.getPropertyValue("margin-top"))+parseFloat(t.getPropertyValue("margin-bottom"))}return this[0].offsetHeight}return null},offset:function(){if(0<this.length){var e=this[0],t=e.getBoundingClientRect(),a=f.body,i=e.clientTop||a.clientTop||0,s=e.clientLeft||a.clientLeft||0,r=e===ee?ee.scrollY:e.scrollTop,n=e===ee?ee.scrollX:e.scrollLeft;return{top:t.top+r-i,left:t.left+n-s}}return null},css:function(e,t){var a;if(1===arguments.length){if("string"!=typeof e){for(a=0;a<this.length;a+=1)for(var i in e)this[a].style[i]=e[i];return this}if(this[0])return ee.getComputedStyle(this[0],null).getPropertyValue(e)}if(2!==arguments.length||"string"!=typeof e)return this;for(a=0;a<this.length;a+=1)this[a].style[e]=t;return this},each:function(e){if(!e)return this;for(var t=0;t<this.length;t+=1)if(!1===e.call(this[t],t,this[t]))return this;return this},html:function(e){if(void 0===e)return this[0]?this[0].innerHTML:void 0;for(var t=0;t<this.length;t+=1)this[t].innerHTML=e;return this},text:function(e){if(void 0===e)return this[0]?this[0].textContent.trim():null;for(var t=0;t<this.length;t+=1)this[t].textContent=e;return this},is:function(e){var t,a,i=this[0];if(!i||void 0===e)return!1;if("string"==typeof e){if(i.matches)return i.matches(e);if(i.webkitMatchesSelector)return i.webkitMatchesSelector(e);if(i.msMatchesSelector)return i.msMatchesSelector(e);for(t=I(e),a=0;a<t.length;a+=1)if(t[a]===i)return!0;return!1}if(e===f)return i===f;if(e===ee)return i===ee;if(e.nodeType||e instanceof l){for(t=e.nodeType?[e]:e,a=0;a<t.length;a+=1)if(t[a]===i)return!0;return!1}return!1},index:function(){var e,t=this[0];if(t){for(e=0;null!==(t=t.previousSibling);)1===t.nodeType&&(e+=1);return e}},eq:function(e){if(void 0===e)return this;var t,a=this.length;return new l(a-1<e?[]:e<0?(t=a+e)<0?[]:[this[t]]:[this[e]])},append:function(){for(var e,t=[],a=arguments.length;a--;)t[a]=arguments[a];for(var i=0;i<t.length;i+=1){e=t[i];for(var s=0;s<this.length;s+=1)if("string"==typeof e){var r=f.createElement("div");for(r.innerHTML=e;r.firstChild;)this[s].appendChild(r.firstChild)}else if(e instanceof l)for(var n=0;n<e.length;n+=1)this[s].appendChild(e[n]);else this[s].appendChild(e)}return this},prepend:function(e){var t,a;for(t=0;t<this.length;t+=1)if("string"==typeof e){var i=f.createElement("div");for(i.innerHTML=e,a=i.childNodes.length-1;0<=a;a-=1)this[t].insertBefore(i.childNodes[a],this[t].childNodes[0])}else if(e instanceof l)for(a=0;a<e.length;a+=1)this[t].insertBefore(e[a],this[t].childNodes[0]);else this[t].insertBefore(e,this[t].childNodes[0]);return this},next:function(e){return 0<this.length?e?this[0].nextElementSibling&&I(this[0].nextElementSibling).is(e)?new l([this[0].nextElementSibling]):new l([]):this[0].nextElementSibling?new l([this[0].nextElementSibling]):new l([]):new l([])},nextAll:function(e){var t=[],a=this[0];if(!a)return new l([]);for(;a.nextElementSibling;){var i=a.nextElementSibling;e?I(i).is(e)&&t.push(i):t.push(i),a=i}return new l(t)},prev:function(e){if(0<this.length){var t=this[0];return e?t.previousElementSibling&&I(t.previousElementSibling).is(e)?new l([t.previousElementSibling]):new l([]):t.previousElementSibling?new l([t.previousElementSibling]):new l([])}return new l([])},prevAll:function(e){var t=[],a=this[0];if(!a)return new l([]);for(;a.previousElementSibling;){var i=a.previousElementSibling;e?I(i).is(e)&&t.push(i):t.push(i),a=i}return new l(t)},parent:function(e){for(var t=[],a=0;a<this.length;a+=1)null!==this[a].parentNode&&(e?I(this[a].parentNode).is(e)&&t.push(this[a].parentNode):t.push(this[a].parentNode));return I(r(t))},parents:function(e){for(var t=[],a=0;a<this.length;a+=1)for(var i=this[a].parentNode;i;)e?I(i).is(e)&&t.push(i):t.push(i),i=i.parentNode;return I(r(t))},closest:function(e){var t=this;return void 0===e?new l([]):(t.is(e)||(t=t.parents(e).eq(0)),t)},find:function(e){for(var t=[],a=0;a<this.length;a+=1)for(var i=this[a].querySelectorAll(e),s=0;s<i.length;s+=1)t.push(i[s]);return new l(t)},children:function(e){for(var t=[],a=0;a<this.length;a+=1)for(var i=this[a].childNodes,s=0;s<i.length;s+=1)e?1===i[s].nodeType&&I(i[s]).is(e)&&t.push(i[s]):1===i[s].nodeType&&t.push(i[s]);return new l(r(t))},remove:function(){for(var e=0;e<this.length;e+=1)this[e].parentNode&&this[e].parentNode.removeChild(this[e]);return this},add:function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var a,i;for(a=0;a<e.length;a+=1){var s=I(e[a]);for(i=0;i<s.length;i+=1)this[this.length]=s[i],this.length+=1}return this},styles:function(){return this[0]?ee.getComputedStyle(this[0],null):{}}};Object.keys(t).forEach(function(e){I.fn[e]=I.fn[e]||t[e]});function e(e){void 0===e&&(e={});var t=this;t.params=e,t.eventsListeners={},t.params&&t.params.on&&Object.keys(t.params.on).forEach(function(e){t.on(e,t.params.on[e])})}var a,i,s,n,te={deleteProps:function(e){var t=e;Object.keys(t).forEach(function(e){try{t[e]=null}catch(e){}try{delete t[e]}catch(e){}})},nextTick:function(e,t){return void 0===t&&(t=0),setTimeout(e,t)},now:function(){return Date.now()},getTranslate:function(e,t){var a,i,s;void 0===t&&(t="x");var r=ee.getComputedStyle(e,null);return ee.WebKitCSSMatrix?(6<(i=r.transform||r.webkitTransform).split(",").length&&(i=i.split(", ").map(function(e){return e.replace(",",".")}).join(", ")),s=new ee.WebKitCSSMatrix("none"===i?"":i)):a=(s=r.MozTransform||r.OTransform||r.MsTransform||r.msTransform||r.transform||r.getPropertyValue("transform").replace("translate(","matrix(1, 0, 0, 1,")).toString().split(","),"x"===t&&(i=ee.WebKitCSSMatrix?s.m41:16===a.length?parseFloat(a[12]):parseFloat(a[4])),"y"===t&&(i=ee.WebKitCSSMatrix?s.m42:16===a.length?parseFloat(a[13]):parseFloat(a[5])),i||0},parseUrlQuery:function(e){var t,a,i,s,r={},n=e||ee.location.href;if("string"==typeof n&&n.length)for(s=(a=(n=-1<n.indexOf("?")?n.replace(/\S*\?/,""):"").split("&").filter(function(e){return""!==e})).length,t=0;t<s;t+=1)i=a[t].replace(/#\S+/g,"").split("="),r[decodeURIComponent(i[0])]=void 0===i[1]?void 0:decodeURIComponent(i[1])||"";return r},isObject:function(e){return"object"==typeof e&&null!==e&&e.constructor&&e.constructor===Object},extend:function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];for(var a=Object(e[0]),i=1;i<e.length;i+=1){var s=e[i];if(null!=s)for(var r=Object.keys(Object(s)),n=0,o=r.length;n<o;n+=1){var l=r[n],d=Object.getOwnPropertyDescriptor(s,l);void 0!==d&&d.enumerable&&(te.isObject(a[l])&&te.isObject(s[l])?te.extend(a[l],s[l]):!te.isObject(a[l])&&te.isObject(s[l])?(a[l]={},te.extend(a[l],s[l])):a[l]=s[l])}}return a}},ae=(s=f.createElement("div"),{touch:ee.Modernizr&&!0===ee.Modernizr.touch||!!(0<ee.navigator.maxTouchPoints||"ontouchstart"in ee||ee.DocumentTouch&&f instanceof ee.DocumentTouch),pointerEvents:!!(ee.navigator.pointerEnabled||ee.PointerEvent||"maxTouchPoints"in ee.navigator&&0<ee.navigator.maxTouchPoints),prefixedPointerEvents:!!ee.navigator.msPointerEnabled,transition:(i=s.style,"transition"in i||"webkitTransition"in i||"MozTransition"in i),transforms3d:ee.Modernizr&&!0===ee.Modernizr.csstransforms3d||(a=s.style,"webkitPerspective"in a||"MozPerspective"in a||"OPerspective"in a||"MsPerspective"in a||"perspective"in a),flexbox:function(){for(var e=s.style,t="alignItems webkitAlignItems webkitBoxAlign msFlexAlign mozBoxAlign webkitFlexDirection msFlexDirection mozBoxDirection mozBoxOrient webkitBoxDirection webkitBoxOrient".split(" "),a=0;a<t.length;a+=1)if(t[a]in e)return!0;return!1}(),observer:"MutationObserver"in ee||"WebkitMutationObserver"in ee,passiveListener:function(){var e=!1;try{var t=Object.defineProperty({},"passive",{get:function(){e=!0}});ee.addEventListener("testPassiveListener",null,t)}catch(e){}return e}(),gestures:"ongesturestart"in ee}),ie={isIE:!!ee.navigator.userAgent.match(/Trident/g)||!!ee.navigator.userAgent.match(/MSIE/g),isEdge:!!ee.navigator.userAgent.match(/Edge/g),isSafari:(n=ee.navigator.userAgent.toLowerCase(),0<=n.indexOf("safari")&&n.indexOf("chrome")<0&&n.indexOf("android")<0),isUiWebView:/(iPhone|iPod|iPad).*AppleWebKit(?!.*Safari)/i.test(ee.navigator.userAgent)},o={components:{configurable:!0}};e.prototype.on=function(e,t,a){var i=this;if("function"!=typeof t)return i;var s=a?"unshift":"push";return e.split(" ").forEach(function(e){i.eventsListeners[e]||(i.eventsListeners[e]=[]),i.eventsListeners[e][s](t)}),i},e.prototype.once=function(a,i,e){var s=this;if("function"!=typeof i)return s;function r(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];i.apply(s,e),s.off(a,r),r.f7proxy&&delete r.f7proxy}return r.f7proxy=i,s.on(a,r,e)},e.prototype.off=function(e,i){var s=this;return s.eventsListeners&&e.split(" ").forEach(function(a){void 0===i?s.eventsListeners[a]=[]:s.eventsListeners[a]&&s.eventsListeners[a].length&&s.eventsListeners[a].forEach(function(e,t){(e===i||e.f7proxy&&e.f7proxy===i)&&s.eventsListeners[a].splice(t,1)})}),s},e.prototype.emit=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var a,i,s,r=this;return r.eventsListeners&&(s="string"==typeof e[0]||Array.isArray(e[0])?(a=e[0],i=e.slice(1,e.length),r):(a=e[0].events,i=e[0].data,e[0].context||r),(Array.isArray(a)?a:a.split(" ")).forEach(function(e){if(r.eventsListeners&&r.eventsListeners[e]){var t=[];r.eventsListeners[e].forEach(function(e){t.push(e)}),t.forEach(function(e){e.apply(s,i)})}})),r},e.prototype.useModulesParams=function(a){var i=this;i.modules&&Object.keys(i.modules).forEach(function(e){var t=i.modules[e];t.params&&te.extend(a,t.params)})},e.prototype.useModules=function(i){void 0===i&&(i={});var s=this;s.modules&&Object.keys(s.modules).forEach(function(e){var a=s.modules[e],t=i[e]||{};a.instance&&Object.keys(a.instance).forEach(function(e){var t=a.instance[e];s[e]="function"==typeof t?t.bind(s):t}),a.on&&s.on&&Object.keys(a.on).forEach(function(e){s.on(e,a.on[e])}),a.create&&a.create.bind(s)(t)})},o.components.set=function(e){this.use&&this.use(e)},e.installModule=function(t){for(var e=[],a=arguments.length-1;0<a--;)e[a]=arguments[a+1];var i=this;i.prototype.modules||(i.prototype.modules={});var s=t.name||Object.keys(i.prototype.modules).length+"_"+te.now();return(i.prototype.modules[s]=t).proto&&Object.keys(t.proto).forEach(function(e){i.prototype[e]=t.proto[e]}),t.static&&Object.keys(t.static).forEach(function(e){i[e]=t.static[e]}),t.install&&t.install.apply(i,e),i},e.use=function(e){for(var t=[],a=arguments.length-1;0<a--;)t[a]=arguments[a+1];var i=this;return Array.isArray(e)?(e.forEach(function(e){return i.installModule(e)}),i):i.installModule.apply(i,[e].concat(t))},Object.defineProperties(e,o);var d={updateSize:function(){var e,t,a=this,i=a.$el;e=void 0!==a.params.width?a.params.width:i[0].clientWidth,t=void 0!==a.params.height?a.params.height:i[0].clientHeight,0===e&&a.isHorizontal()||0===t&&a.isVertical()||(e=e-parseInt(i.css("padding-left"),10)-parseInt(i.css("padding-right"),10),t=t-parseInt(i.css("padding-top"),10)-parseInt(i.css("padding-bottom"),10),te.extend(a,{width:e,height:t,size:a.isHorizontal()?e:t}))},updateSlides:function(){var e=this,t=e.params,a=e.$wrapperEl,i=e.size,s=e.rtlTranslate,r=e.wrongRTL,n=e.virtual&&t.virtual.enabled,o=n?e.virtual.slides.length:e.slides.length,l=a.children("."+e.params.slideClass),d=n?e.virtual.slides.length:l.length,p=[],c=[],u=[],h=t.slidesOffsetBefore;"function"==typeof h&&(h=t.slidesOffsetBefore.call(e));var v=t.slidesOffsetAfter;"function"==typeof v&&(v=t.slidesOffsetAfter.call(e));var f=e.snapGrid.length,m=e.snapGrid.length,g=t.spaceBetween,b=-h,w=0,y=0;if(void 0!==i){var x,T;"string"==typeof g&&0<=g.indexOf("%")&&(g=parseFloat(g.replace("%",""))/100*i),e.virtualSize=-g,s?l.css({marginLeft:"",marginTop:""}):l.css({marginRight:"",marginBottom:""}),1<t.slidesPerColumn&&(x=Math.floor(d/t.slidesPerColumn)===d/e.params.slidesPerColumn?d:Math.ceil(d/t.slidesPerColumn)*t.slidesPerColumn,"auto"!==t.slidesPerView&&"row"===t.slidesPerColumnFill&&(x=Math.max(x,t.slidesPerView*t.slidesPerColumn)));for(var E,S=t.slidesPerColumn,C=x/S,M=Math.floor(d/t.slidesPerColumn),P=0;P<d;P+=1){T=0;var k=l.eq(P);if(1<t.slidesPerColumn){var z=void 0,$=void 0,I=void 0;if("column"===t.slidesPerColumnFill||"row"===t.slidesPerColumnFill&&1<t.slidesPerGroup){if("column"===t.slidesPerColumnFill)I=P-($=Math.floor(P/S))*S,(M<$||$===M&&I===S-1)&&S<=(I+=1)&&(I=0,$+=1);else{var L=Math.floor(P/t.slidesPerGroup);$=P-(I=Math.floor(P/t.slidesPerView)-L*t.slidesPerColumn)*t.slidesPerView-L*t.slidesPerView}z=$+I*x/S,k.css({"-webkit-box-ordinal-group":z,"-moz-box-ordinal-group":z,"-ms-flex-order":z,"-webkit-order":z,order:z})}else $=P-(I=Math.floor(P/C))*C;k.css("margin-"+(e.isHorizontal()?"top":"left"),0!==I&&t.spaceBetween&&t.spaceBetween+"px").attr("data-swiper-column",$).attr("data-swiper-row",I)}if("none"!==k.css("display")){if("auto"===t.slidesPerView){var D=ee.getComputedStyle(k[0],null),O=k[0].style.transform,A=k[0].style.webkitTransform;if(O&&(k[0].style.transform="none"),A&&(k[0].style.webkitTransform="none"),t.roundLengths)T=e.isHorizontal()?k.outerWidth(!0):k.outerHeight(!0);else if(e.isHorizontal()){var H=parseFloat(D.getPropertyValue("width")),G=parseFloat(D.getPropertyValue("padding-left")),N=parseFloat(D.getPropertyValue("padding-right")),B=parseFloat(D.getPropertyValue("margin-left")),X=parseFloat(D.getPropertyValue("margin-right")),V=D.getPropertyValue("box-sizing");T=V&&"border-box"===V&&!ie.isIE?H+B+X:H+G+N+B+X}else{var Y=parseFloat(D.getPropertyValue("height")),F=parseFloat(D.getPropertyValue("padding-top")),R=parseFloat(D.getPropertyValue("padding-bottom")),q=parseFloat(D.getPropertyValue("margin-top")),W=parseFloat(D.getPropertyValue("margin-bottom")),j=D.getPropertyValue("box-sizing");T=j&&"border-box"===j&&!ie.isIE?Y+q+W:Y+F+R+q+W}O&&(k[0].style.transform=O),A&&(k[0].style.webkitTransform=A),t.roundLengths&&(T=Math.floor(T))}else T=(i-(t.slidesPerView-1)*g)/t.slidesPerView,t.roundLengths&&(T=Math.floor(T)),l[P]&&(e.isHorizontal()?l[P].style.width=T+"px":l[P].style.height=T+"px");l[P]&&(l[P].swiperSlideSize=T),u.push(T),t.centeredSlides?(b=b+T/2+w/2+g,0===w&&0!==P&&(b=b-i/2-g),0===P&&(b=b-i/2-g),Math.abs(b)<.001&&(b=0),t.roundLengths&&(b=Math.floor(b)),y%t.slidesPerGroup==0&&p.push(b),c.push(b)):(t.roundLengths&&(b=Math.floor(b)),y%t.slidesPerGroup==0&&p.push(b),c.push(b),b=b+T+g),e.virtualSize+=T+g,w=T,y+=1}}if(e.virtualSize=Math.max(e.virtualSize,i)+v,s&&r&&("slide"===t.effect||"coverflow"===t.effect)&&a.css({width:e.virtualSize+t.spaceBetween+"px"}),ae.flexbox&&!t.setWrapperSize||(e.isHorizontal()?a.css({width:e.virtualSize+t.spaceBetween+"px"}):a.css({height:e.virtualSize+t.spaceBetween+"px"})),1<t.slidesPerColumn&&(e.virtualSize=(T+t.spaceBetween)*x,e.virtualSize=Math.ceil(e.virtualSize/t.slidesPerColumn)-t.spaceBetween,e.isHorizontal()?a.css({width:e.virtualSize+t.spaceBetween+"px"}):a.css({height:e.virtualSize+t.spaceBetween+"px"}),t.centeredSlides)){E=[];for(var U=0;U<p.length;U+=1){var K=p[U];t.roundLengths&&(K=Math.floor(K)),p[U]<e.virtualSize+p[0]&&E.push(K)}p=E}if(!t.centeredSlides){E=[];for(var _=0;_<p.length;_+=1){var Z=p[_];t.roundLengths&&(Z=Math.floor(Z)),p[_]<=e.virtualSize-i&&E.push(Z)}p=E,1<Math.floor(e.virtualSize-i)-Math.floor(p[p.length-1])&&p.push(e.virtualSize-i)}if(0===p.length&&(p=[0]),0!==t.spaceBetween&&(e.isHorizontal()?s?l.css({marginLeft:g+"px"}):l.css({marginRight:g+"px"}):l.css({marginBottom:g+"px"})),t.centerInsufficientSlides){var Q=0;if(u.forEach(function(e){Q+=e+(t.spaceBetween?t.spaceBetween:0)}),(Q-=t.spaceBetween)<i){var J=(i-Q)/2;p.forEach(function(e,t){p[t]=e-J}),c.forEach(function(e,t){c[t]=e+J})}}te.extend(e,{slides:l,snapGrid:p,slidesGrid:c,slidesSizesGrid:u}),d!==o&&e.emit("slidesLengthChange"),p.length!==f&&(e.params.watchOverflow&&e.checkOverflow(),e.emit("snapGridLengthChange")),c.length!==m&&e.emit("slidesGridLengthChange"),(t.watchSlidesProgress||t.watchSlidesVisibility)&&e.updateSlidesOffset()}},updateAutoHeight:function(e){var t,a=this,i=[],s=0;if("number"==typeof e?a.setTransition(e):!0===e&&a.setTransition(a.params.speed),"auto"!==a.params.slidesPerView&&1<a.params.slidesPerView)for(t=0;t<Math.ceil(a.params.slidesPerView);t+=1){var r=a.activeIndex+t;if(r>a.slides.length)break;i.push(a.slides.eq(r)[0])}else i.push(a.slides.eq(a.activeIndex)[0]);for(t=0;t<i.length;t+=1)if(void 0!==i[t]){var n=i[t].offsetHeight;s=s<n?n:s}s&&a.$wrapperEl.css("height",s+"px")},updateSlidesOffset:function(){for(var e=this.slides,t=0;t<e.length;t+=1)e[t].swiperSlideOffset=this.isHorizontal()?e[t].offsetLeft:e[t].offsetTop},updateSlidesProgress:function(e){void 0===e&&(e=this&&this.translate||0);var t=this,a=t.params,i=t.slides,s=t.rtlTranslate;if(0!==i.length){void 0===i[0].swiperSlideOffset&&t.updateSlidesOffset();var r=-e;s&&(r=e),i.removeClass(a.slideVisibleClass),t.visibleSlidesIndexes=[],t.visibleSlides=[];for(var n=0;n<i.length;n+=1){var o=i[n],l=(r+(a.centeredSlides?t.minTranslate():0)-o.swiperSlideOffset)/(o.swiperSlideSize+a.spaceBetween);if(a.watchSlidesVisibility){var d=-(r-o.swiperSlideOffset),p=d+t.slidesSizesGrid[n];(0<=d&&d<t.size-1||1<p&&p<=t.size||d<=0&&p>=t.size)&&(t.visibleSlides.push(o),t.visibleSlidesIndexes.push(n),i.eq(n).addClass(a.slideVisibleClass))}o.progress=s?-l:l}t.visibleSlides=I(t.visibleSlides)}},updateProgress:function(e){void 0===e&&(e=this&&this.translate||0);var t=this,a=t.params,i=t.maxTranslate()-t.minTranslate(),s=t.progress,r=t.isBeginning,n=t.isEnd,o=r,l=n;n=0==i?r=!(s=0):(r=(s=(e-t.minTranslate())/i)<=0,1<=s),te.extend(t,{progress:s,isBeginning:r,isEnd:n}),(a.watchSlidesProgress||a.watchSlidesVisibility)&&t.updateSlidesProgress(e),r&&!o&&t.emit("reachBeginning toEdge"),n&&!l&&t.emit("reachEnd toEdge"),(o&&!r||l&&!n)&&t.emit("fromEdge"),t.emit("progress",s)},updateSlidesClasses:function(){var e,t=this,a=t.slides,i=t.params,s=t.$wrapperEl,r=t.activeIndex,n=t.realIndex,o=t.virtual&&i.virtual.enabled;a.removeClass(i.slideActiveClass+" "+i.slideNextClass+" "+i.slidePrevClass+" "+i.slideDuplicateActiveClass+" "+i.slideDuplicateNextClass+" "+i.slideDuplicatePrevClass),(e=o?t.$wrapperEl.find("."+i.slideClass+'[data-swiper-slide-index="'+r+'"]'):a.eq(r)).addClass(i.slideActiveClass),i.loop&&(e.hasClass(i.slideDuplicateClass)?s.children("."+i.slideClass+":not(."+i.slideDuplicateClass+')[data-swiper-slide-index="'+n+'"]').addClass(i.slideDuplicateActiveClass):s.children("."+i.slideClass+"."+i.slideDuplicateClass+'[data-swiper-slide-index="'+n+'"]').addClass(i.slideDuplicateActiveClass));var l=e.nextAll("."+i.slideClass).eq(0).addClass(i.slideNextClass);i.loop&&0===l.length&&(l=a.eq(0)).addClass(i.slideNextClass);var d=e.prevAll("."+i.slideClass).eq(0).addClass(i.slidePrevClass);i.loop&&0===d.length&&(d=a.eq(-1)).addClass(i.slidePrevClass),i.loop&&(l.hasClass(i.slideDuplicateClass)?s.children("."+i.slideClass+":not(."+i.slideDuplicateClass+')[data-swiper-slide-index="'+l.attr("data-swiper-slide-index")+'"]').addClass(i.slideDuplicateNextClass):s.children("."+i.slideClass+"."+i.slideDuplicateClass+'[data-swiper-slide-index="'+l.attr("data-swiper-slide-index")+'"]').addClass(i.slideDuplicateNextClass),d.hasClass(i.slideDuplicateClass)?s.children("."+i.slideClass+":not(."+i.slideDuplicateClass+')[data-swiper-slide-index="'+d.attr("data-swiper-slide-index")+'"]').addClass(i.slideDuplicatePrevClass):s.children("."+i.slideClass+"."+i.slideDuplicateClass+'[data-swiper-slide-index="'+d.attr("data-swiper-slide-index")+'"]').addClass(i.slideDuplicatePrevClass))},updateActiveIndex:function(e){var t,a=this,i=a.rtlTranslate?a.translate:-a.translate,s=a.slidesGrid,r=a.snapGrid,n=a.params,o=a.activeIndex,l=a.realIndex,d=a.snapIndex,p=e;if(void 0===p){for(var c=0;c<s.length;c+=1)void 0!==s[c+1]?i>=s[c]&&i<s[c+1]-(s[c+1]-s[c])/2?p=c:i>=s[c]&&i<s[c+1]&&(p=c+1):i>=s[c]&&(p=c);n.normalizeSlideIndex&&(p<0||void 0===p)&&(p=0)}if((t=0<=r.indexOf(i)?r.indexOf(i):Math.floor(p/n.slidesPerGroup))>=r.length&&(t=r.length-1),p!==o){var u=parseInt(a.slides.eq(p).attr("data-swiper-slide-index")||p,10);te.extend(a,{snapIndex:t,realIndex:u,previousIndex:o,activeIndex:p}),a.emit("activeIndexChange"),a.emit("snapIndexChange"),l!==u&&a.emit("realIndexChange"),(a.initialized||a.runCallbacksOnInit)&&a.emit("slideChange")}else t!==d&&(a.snapIndex=t,a.emit("snapIndexChange"))},updateClickedSlide:function(e){var t=this,a=t.params,i=I(e.target).closest("."+a.slideClass)[0],s=!1;if(i)for(var r=0;r<t.slides.length;r+=1)t.slides[r]===i&&(s=!0);if(!i||!s)return t.clickedSlide=void 0,void(t.clickedIndex=void 0);t.clickedSlide=i,t.virtual&&t.params.virtual.enabled?t.clickedIndex=parseInt(I(i).attr("data-swiper-slide-index"),10):t.clickedIndex=I(i).index(),a.slideToClickedSlide&&void 0!==t.clickedIndex&&t.clickedIndex!==t.activeIndex&&t.slideToClickedSlide()}};var p={getTranslate:function(e){void 0===e&&(e=this.isHorizontal()?"x":"y");var t=this.params,a=this.rtlTranslate,i=this.translate,s=this.$wrapperEl;if(t.virtualTranslate)return a?-i:i;var r=te.getTranslate(s[0],e);return a&&(r=-r),r||0},setTranslate:function(e,t){var a=this,i=a.rtlTranslate,s=a.params,r=a.$wrapperEl,n=a.progress,o=0,l=0;a.isHorizontal()?o=i?-e:e:l=e,s.roundLengths&&(o=Math.floor(o),l=Math.floor(l)),s.virtualTranslate||(ae.transforms3d?r.transform("translate3d("+o+"px, "+l+"px, 0px)"):r.transform("translate("+o+"px, "+l+"px)")),a.previousTranslate=a.translate,a.translate=a.isHorizontal()?o:l;var d=a.maxTranslate()-a.minTranslate();(0==d?0:(e-a.minTranslate())/d)!==n&&a.updateProgress(e),a.emit("setTranslate",a.translate,t)},minTranslate:function(){return-this.snapGrid[0]},maxTranslate:function(){return-this.snapGrid[this.snapGrid.length-1]}};var c={setTransition:function(e,t){this.$wrapperEl.transition(e),this.emit("setTransition",e,t)},transitionStart:function(e,t){void 0===e&&(e=!0);var a=this,i=a.activeIndex,s=a.params,r=a.previousIndex;s.autoHeight&&a.updateAutoHeight();var n=t;if(n=n||(r<i?"next":i<r?"prev":"reset"),a.emit("transitionStart"),e&&i!==r){if("reset"===n)return void a.emit("slideResetTransitionStart");a.emit("slideChangeTransitionStart"),"next"===n?a.emit("slideNextTransitionStart"):a.emit("slidePrevTransitionStart")}},transitionEnd:function(e,t){void 0===e&&(e=!0);var a=this,i=a.activeIndex,s=a.previousIndex;a.animating=!1,a.setTransition(0);var r=t;if(r=r||(s<i?"next":i<s?"prev":"reset"),a.emit("transitionEnd"),e&&i!==s){if("reset"===r)return void a.emit("slideResetTransitionEnd");a.emit("slideChangeTransitionEnd"),"next"===r?a.emit("slideNextTransitionEnd"):a.emit("slidePrevTransitionEnd")}}};var u={slideTo:function(e,t,a,i){void 0===e&&(e=0),void 0===t&&(t=this.params.speed),void 0===a&&(a=!0);var s=this,r=e;r<0&&(r=0);var n=s.params,o=s.snapGrid,l=s.slidesGrid,d=s.previousIndex,p=s.activeIndex,c=s.rtlTranslate;if(s.animating&&n.preventInteractionOnTransition)return!1;var u=Math.floor(r/n.slidesPerGroup);u>=o.length&&(u=o.length-1),(p||n.initialSlide||0)===(d||0)&&a&&s.emit("beforeSlideChangeStart");var h,v=-o[u];if(s.updateProgress(v),n.normalizeSlideIndex)for(var f=0;f<l.length;f+=1)-Math.floor(100*v)>=Math.floor(100*l[f])&&(r=f);if(s.initialized&&r!==p){if(!s.allowSlideNext&&v<s.translate&&v<s.minTranslate())return!1;if(!s.allowSlidePrev&&v>s.translate&&v>s.maxTranslate()&&(p||0)!==r)return!1}return h=p<r?"next":r<p?"prev":"reset",c&&-v===s.translate||!c&&v===s.translate?(s.updateActiveIndex(r),n.autoHeight&&s.updateAutoHeight(),s.updateSlidesClasses(),"slide"!==n.effect&&s.setTranslate(v),"reset"!==h&&(s.transitionStart(a,h),s.transitionEnd(a,h)),!1):(0!==t&&ae.transition?(s.setTransition(t),s.setTranslate(v),s.updateActiveIndex(r),s.updateSlidesClasses(),s.emit("beforeTransitionStart",t,i),s.transitionStart(a,h),s.animating||(s.animating=!0,s.onSlideToWrapperTransitionEnd||(s.onSlideToWrapperTransitionEnd=function(e){s&&!s.destroyed&&e.target===this&&(s.$wrapperEl[0].removeEventListener("transitionend",s.onSlideToWrapperTransitionEnd),s.$wrapperEl[0].removeEventListener("webkitTransitionEnd",s.onSlideToWrapperTransitionEnd),s.onSlideToWrapperTransitionEnd=null,delete s.onSlideToWrapperTransitionEnd,s.transitionEnd(a,h))}),s.$wrapperEl[0].addEventListener("transitionend",s.onSlideToWrapperTransitionEnd),s.$wrapperEl[0].addEventListener("webkitTransitionEnd",s.onSlideToWrapperTransitionEnd))):(s.setTransition(0),s.setTranslate(v),s.updateActiveIndex(r),s.updateSlidesClasses(),s.emit("beforeTransitionStart",t,i),s.transitionStart(a,h),s.transitionEnd(a,h)),!0)},slideToLoop:function(e,t,a,i){void 0===e&&(e=0),void 0===t&&(t=this.params.speed),void 0===a&&(a=!0);var s=e;return this.params.loop&&(s+=this.loopedSlides),this.slideTo(s,t,a,i)},slideNext:function(e,t,a){void 0===e&&(e=this.params.speed),void 0===t&&(t=!0);var i=this,s=i.params,r=i.animating;return s.loop?!r&&(i.loopFix(),i._clientLeft=i.$wrapperEl[0].clientLeft,i.slideTo(i.activeIndex+s.slidesPerGroup,e,t,a)):i.slideTo(i.activeIndex+s.slidesPerGroup,e,t,a)},slidePrev:function(e,t,a){void 0===e&&(e=this.params.speed),void 0===t&&(t=!0);var i=this,s=i.params,r=i.animating,n=i.snapGrid,o=i.slidesGrid,l=i.rtlTranslate;if(s.loop){if(r)return!1;i.loopFix(),i._clientLeft=i.$wrapperEl[0].clientLeft}function d(e){return e<0?-Math.floor(Math.abs(e)):Math.floor(e)}var p,c=d(l?i.translate:-i.translate),u=n.map(function(e){return d(e)}),h=(o.map(function(e){return d(e)}),n[u.indexOf(c)],n[u.indexOf(c)-1]);return void 0!==h&&(p=o.indexOf(h))<0&&(p=i.activeIndex-1),i.slideTo(p,e,t,a)},slideReset:function(e,t,a){return void 0===e&&(e=this.params.speed),void 0===t&&(t=!0),this.slideTo(this.activeIndex,e,t,a)},slideToClosest:function(e,t,a){void 0===e&&(e=this.params.speed),void 0===t&&(t=!0);var i=this,s=i.activeIndex,r=Math.floor(s/i.params.slidesPerGroup);if(r<i.snapGrid.length-1){var n=i.rtlTranslate?i.translate:-i.translate,o=i.snapGrid[r];(i.snapGrid[r+1]-o)/2<n-o&&(s=i.params.slidesPerGroup)}return i.slideTo(s,e,t,a)},slideToClickedSlide:function(){var e,t=this,a=t.params,i=t.$wrapperEl,s="auto"===a.slidesPerView?t.slidesPerViewDynamic():a.slidesPerView,r=t.clickedIndex;if(a.loop){if(t.animating)return;e=parseInt(I(t.clickedSlide).attr("data-swiper-slide-index"),10),a.centeredSlides?r<t.loopedSlides-s/2||r>t.slides.length-t.loopedSlides+s/2?(t.loopFix(),r=i.children("."+a.slideClass+'[data-swiper-slide-index="'+e+'"]:not(.'+a.slideDuplicateClass+")").eq(0).index(),te.nextTick(function(){t.slideTo(r)})):t.slideTo(r):r>t.slides.length-s?(t.loopFix(),r=i.children("."+a.slideClass+'[data-swiper-slide-index="'+e+'"]:not(.'+a.slideDuplicateClass+")").eq(0).index(),te.nextTick(function(){t.slideTo(r)})):t.slideTo(r)}else t.slideTo(r)}};var h={loopCreate:function(){var i=this,e=i.params,t=i.$wrapperEl;t.children("."+e.slideClass+"."+e.slideDuplicateClass).remove();var s=t.children("."+e.slideClass);if(e.loopFillGroupWithBlank){var a=e.slidesPerGroup-s.length%e.slidesPerGroup;if(a!==e.slidesPerGroup){for(var r=0;r<a;r+=1){var n=I(f.createElement("div")).addClass(e.slideClass+" "+e.slideBlankClass);t.append(n)}s=t.children("."+e.slideClass)}}"auto"!==e.slidesPerView||e.loopedSlides||(e.loopedSlides=s.length),i.loopedSlides=parseInt(e.loopedSlides||e.slidesPerView,10),i.loopedSlides+=e.loopAdditionalSlides,i.loopedSlides>s.length&&(i.loopedSlides=s.length);var o=[],l=[];s.each(function(e,t){var a=I(t);e<i.loopedSlides&&l.push(t),e<s.length&&e>=s.length-i.loopedSlides&&o.push(t),a.attr("data-swiper-slide-index",e)});for(var d=0;d<l.length;d+=1)t.append(I(l[d].cloneNode(!0)).addClass(e.slideDuplicateClass));for(var p=o.length-1;0<=p;p-=1)t.prepend(I(o[p].cloneNode(!0)).addClass(e.slideDuplicateClass))},loopFix:function(){var e,t=this,a=t.params,i=t.activeIndex,s=t.slides,r=t.loopedSlides,n=t.allowSlidePrev,o=t.allowSlideNext,l=t.snapGrid,d=t.rtlTranslate;t.allowSlidePrev=!0,t.allowSlideNext=!0;var p=-l[i]-t.getTranslate();if(i<r)e=s.length-3*r+i,e+=r,t.slideTo(e,0,!1,!0)&&0!=p&&t.setTranslate((d?-t.translate:t.translate)-p);else if("auto"===a.slidesPerView&&2*r<=i||i>=s.length-r){e=-s.length+i+r,e+=r,t.slideTo(e,0,!1,!0)&&0!=p&&t.setTranslate((d?-t.translate:t.translate)-p)}t.allowSlidePrev=n,t.allowSlideNext=o},loopDestroy:function(){var e=this.$wrapperEl,t=this.params,a=this.slides;e.children("."+t.slideClass+"."+t.slideDuplicateClass+",."+t.slideClass+"."+t.slideBlankClass).remove(),a.removeAttr("data-swiper-slide-index")}};var v={setGrabCursor:function(e){if(!(ae.touch||!this.params.simulateTouch||this.params.watchOverflow&&this.isLocked)){var t=this.el;t.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"}},unsetGrabCursor:function(){ae.touch||this.params.watchOverflow&&this.isLocked||(this.el.style.cursor="")}};var m={appendSlide:function(e){var t=this,a=t.$wrapperEl,i=t.params;if(i.loop&&t.loopDestroy(),"object"==typeof e&&"length"in e)for(var s=0;s<e.length;s+=1)e[s]&&a.append(e[s]);else a.append(e);i.loop&&t.loopCreate(),i.observer&&ae.observer||t.update()},prependSlide:function(e){var t=this,a=t.params,i=t.$wrapperEl,s=t.activeIndex;a.loop&&t.loopDestroy();var r=s+1;if("object"==typeof e&&"length"in e){for(var n=0;n<e.length;n+=1)e[n]&&i.prepend(e[n]);r=s+e.length}else i.prepend(e);a.loop&&t.loopCreate(),a.observer&&ae.observer||t.update(),t.slideTo(r,0,!1)},addSlide:function(e,t){var a=this,i=a.$wrapperEl,s=a.params,r=a.activeIndex;s.loop&&(r-=a.loopedSlides,a.loopDestroy(),a.slides=i.children("."+s.slideClass));var n=a.slides.length;if(e<=0)a.prependSlide(t);else if(n<=e)a.appendSlide(t);else{for(var o=e<r?r+1:r,l=[],d=n-1;e<=d;d-=1){var p=a.slides.eq(d);p.remove(),l.unshift(p)}if("object"==typeof t&&"length"in t){for(var c=0;c<t.length;c+=1)t[c]&&i.append(t[c]);o=e<r?r+t.length:r}else i.append(t);for(var u=0;u<l.length;u+=1)i.append(l[u]);s.loop&&a.loopCreate(),s.observer&&ae.observer||a.update(),s.loop?a.slideTo(o+a.loopedSlides,0,!1):a.slideTo(o,0,!1)}},removeSlide:function(e){var t=this,a=t.params,i=t.$wrapperEl,s=t.activeIndex;a.loop&&(s-=t.loopedSlides,t.loopDestroy(),t.slides=i.children("."+a.slideClass));var r,n=s;if("object"==typeof e&&"length"in e){for(var o=0;o<e.length;o+=1)r=e[o],t.slides[r]&&t.slides.eq(r).remove(),r<n&&(n-=1);n=Math.max(n,0)}else r=e,t.slides[r]&&t.slides.eq(r).remove(),r<n&&(n-=1),n=Math.max(n,0);a.loop&&t.loopCreate(),a.observer&&ae.observer||t.update(),a.loop?t.slideTo(n+t.loopedSlides,0,!1):t.slideTo(n,0,!1)},removeAllSlides:function(){for(var e=[],t=0;t<this.slides.length;t+=1)e.push(t);this.removeSlide(e)}},g=function(){var e=ee.navigator.userAgent,t={ios:!1,android:!1,androidChrome:!1,desktop:!1,windows:!1,iphone:!1,ipod:!1,ipad:!1,cordova:ee.cordova||ee.phonegap,phonegap:ee.cordova||ee.phonegap},a=e.match(/(Windows Phone);?[\s\/]+([\d.]+)?/),i=e.match(/(Android);?[\s\/]+([\d.]+)?/),s=e.match(/(iPad).*OS\s([\d_]+)/),r=e.match(/(iPod)(.*OS\s([\d_]+))?/),n=!s&&e.match(/(iPhone\sOS|iOS)\s([\d_]+)/);if(a&&(t.os="windows",t.osVersion=a[2],t.windows=!0),i&&!a&&(t.os="android",t.osVersion=i[2],t.android=!0,t.androidChrome=0<=e.toLowerCase().indexOf("chrome")),(s||n||r)&&(t.os="ios",t.ios=!0),n&&!r&&(t.osVersion=n[2].replace(/_/g,"."),t.iphone=!0),s&&(t.osVersion=s[2].replace(/_/g,"."),t.ipad=!0),r&&(t.osVersion=r[3]?r[3].replace(/_/g,"."):null,t.iphone=!0),t.ios&&t.osVersion&&0<=e.indexOf("Version/")&&"10"===t.osVersion.split(".")[0]&&(t.osVersion=e.toLowerCase().split("version/")[1].split(" ")[0]),t.desktop=!(t.os||t.android||t.webView),t.webView=(n||s||r)&&e.match(/.*AppleWebKit(?!.*Safari)/i),t.os&&"ios"===t.os){var o=t.osVersion.split("."),l=f.querySelector('meta[name="viewport"]');t.minimalUi=!t.webView&&(r||n)&&(1*o[0]==7?1<=1*o[1]:7<1*o[0])&&l&&0<=l.getAttribute("content").indexOf("minimal-ui")}return t.pixelRatio=ee.devicePixelRatio||1,t}();function b(){var e=this,t=e.params,a=e.el;if(!a||0!==a.offsetWidth){t.breakpoints&&e.setBreakpoint();var i=e.allowSlideNext,s=e.allowSlidePrev,r=e.snapGrid;if(e.allowSlideNext=!0,e.allowSlidePrev=!0,e.updateSize(),e.updateSlides(),t.freeMode){var n=Math.min(Math.max(e.translate,e.maxTranslate()),e.minTranslate());e.setTranslate(n),e.updateActiveIndex(),e.updateSlidesClasses(),t.autoHeight&&e.updateAutoHeight()}else e.updateSlidesClasses(),("auto"===t.slidesPerView||1<t.slidesPerView)&&e.isEnd&&!e.params.centeredSlides?e.slideTo(e.slides.length-1,0,!1,!0):e.slideTo(e.activeIndex,0,!1,!0);e.autoplay&&e.autoplay.running&&e.autoplay.paused&&e.autoplay.run(),e.allowSlidePrev=s,e.allowSlideNext=i,e.params.watchOverflow&&r!==e.snapGrid&&e.checkOverflow()}}var w={init:!0,direction:"horizontal",touchEventsTarget:"container",initialSlide:0,speed:300,preventInteractionOnTransition:!1,edgeSwipeDetection:!1,edgeSwipeThreshold:20,freeMode:!1,freeModeMomentum:!0,freeModeMomentumRatio:1,freeModeMomentumBounce:!0,freeModeMomentumBounceRatio:1,freeModeMomentumVelocityRatio:1,freeModeSticky:!1,freeModeMinimumVelocity:.02,autoHeight:!1,setWrapperSize:!1,virtualTranslate:!1,effect:"slide",breakpoints:void 0,breakpointsInverse:!1,spaceBetween:0,slidesPerView:1,slidesPerColumn:1,slidesPerColumnFill:"column",slidesPerGroup:1,centeredSlides:!1,slidesOffsetBefore:0,slidesOffsetAfter:0,normalizeSlideIndex:!0,centerInsufficientSlides:!1,watchOverflow:!1,roundLengths:!1,touchRatio:1,touchAngle:45,simulateTouch:!0,shortSwipes:!0,longSwipes:!0,longSwipesRatio:.5,longSwipesMs:300,followFinger:!0,allowTouchMove:!0,threshold:0,touchMoveStopPropagation:!0,touchStartPreventDefault:!0,touchStartForcePreventDefault:!1,touchReleaseOnEdges:!1,uniqueNavElements:!0,resistance:!0,resistanceRatio:.85,watchSlidesProgress:!1,watchSlidesVisibility:!1,grabCursor:!1,preventClicks:!0,preventClicksPropagation:!0,slideToClickedSlide:!1,preloadImages:!0,updateOnImagesReady:!0,loop:!1,loopAdditionalSlides:0,loopedSlides:null,loopFillGroupWithBlank:!1,allowSlidePrev:!0,allowSlideNext:!0,swipeHandler:null,noSwiping:!0,noSwipingClass:"swiper-no-swiping",noSwipingSelector:null,passiveListeners:!0,containerModifierClass:"swiper-container-",slideClass:"swiper-slide",slideBlankClass:"swiper-slide-invisible-blank",slideActiveClass:"swiper-slide-active",slideDuplicateActiveClass:"swiper-slide-duplicate-active",slideVisibleClass:"swiper-slide-visible",slideDuplicateClass:"swiper-slide-duplicate",slideNextClass:"swiper-slide-next",slideDuplicateNextClass:"swiper-slide-duplicate-next",slidePrevClass:"swiper-slide-prev",slideDuplicatePrevClass:"swiper-slide-duplicate-prev",wrapperClass:"swiper-wrapper",runCallbacksOnInit:!0},y={update:d,translate:p,transition:c,slide:u,loop:h,grabCursor:v,manipulation:m,events:{attachEvents:function(){var e=this,t=e.params,a=e.touchEvents,i=e.el,s=e.wrapperEl;e.onTouchStart=function(e){var t=this,a=t.touchEventsData,i=t.params,s=t.touches;if(!t.animating||!i.preventInteractionOnTransition){var r=e;if(r.originalEvent&&(r=r.originalEvent),a.isTouchEvent="touchstart"===r.type,(a.isTouchEvent||!("which"in r)||3!==r.which)&&!(!a.isTouchEvent&&"button"in r&&0<r.button||a.isTouched&&a.isMoved))if(i.noSwiping&&I(r.target).closest(i.noSwipingSelector?i.noSwipingSelector:"."+i.noSwipingClass)[0])t.allowClick=!0;else if(!i.swipeHandler||I(r).closest(i.swipeHandler)[0]){s.currentX="touchstart"===r.type?r.targetTouches[0].pageX:r.pageX,s.currentY="touchstart"===r.type?r.targetTouches[0].pageY:r.pageY;var n=s.currentX,o=s.currentY,l=i.edgeSwipeDetection||i.iOSEdgeSwipeDetection,d=i.edgeSwipeThreshold||i.iOSEdgeSwipeThreshold;if(!l||!(n<=d||n>=ee.screen.width-d)){if(te.extend(a,{isTouched:!0,isMoved:!1,allowTouchCallbacks:!0,isScrolling:void 0,startMoving:void 0}),s.startX=n,s.startY=o,a.touchStartTime=te.now(),t.allowClick=!0,t.updateSize(),t.swipeDirection=void 0,0<i.threshold&&(a.allowThresholdMove=!1),"touchstart"!==r.type){var p=!0;I(r.target).is(a.formElements)&&(p=!1),f.activeElement&&I(f.activeElement).is(a.formElements)&&f.activeElement!==r.target&&f.activeElement.blur();var c=p&&t.allowTouchMove&&i.touchStartPreventDefault;(i.touchStartForcePreventDefault||c)&&r.preventDefault()}t.emit("touchStart",r)}}}}.bind(e),e.onTouchMove=function(e){var t=this,a=t.touchEventsData,i=t.params,s=t.touches,r=t.rtlTranslate,n=e;if(n.originalEvent&&(n=n.originalEvent),a.isTouched){if(!a.isTouchEvent||"mousemove"!==n.type){var o="touchmove"===n.type?n.targetTouches[0].pageX:n.pageX,l="touchmove"===n.type?n.targetTouches[0].pageY:n.pageY;if(n.preventedByNestedSwiper)return s.startX=o,void(s.startY=l);if(!t.allowTouchMove)return t.allowClick=!1,void(a.isTouched&&(te.extend(s,{startX:o,startY:l,currentX:o,currentY:l}),a.touchStartTime=te.now()));if(a.isTouchEvent&&i.touchReleaseOnEdges&&!i.loop)if(t.isVertical()){if(l<s.startY&&t.translate<=t.maxTranslate()||l>s.startY&&t.translate>=t.minTranslate())return a.isTouched=!1,void(a.isMoved=!1)}else if(o<s.startX&&t.translate<=t.maxTranslate()||o>s.startX&&t.translate>=t.minTranslate())return;if(a.isTouchEvent&&f.activeElement&&n.target===f.activeElement&&I(n.target).is(a.formElements))return a.isMoved=!0,void(t.allowClick=!1);if(a.allowTouchCallbacks&&t.emit("touchMove",n),!(n.targetTouches&&1<n.targetTouches.length)){s.currentX=o,s.currentY=l;var d=s.currentX-s.startX,p=s.currentY-s.startY;if(!(t.params.threshold&&Math.sqrt(Math.pow(d,2)+Math.pow(p,2))<t.params.threshold)){var c;if(void 0===a.isScrolling)t.isHorizontal()&&s.currentY===s.startY||t.isVertical()&&s.currentX===s.startX?a.isScrolling=!1:25<=d*d+p*p&&(c=180*Math.atan2(Math.abs(p),Math.abs(d))/Math.PI,a.isScrolling=t.isHorizontal()?c>i.touchAngle:90-c>i.touchAngle);if(a.isScrolling&&t.emit("touchMoveOpposite",n),void 0===a.startMoving&&(s.currentX===s.startX&&s.currentY===s.startY||(a.startMoving=!0)),a.isScrolling)a.isTouched=!1;else if(a.startMoving){t.allowClick=!1,n.preventDefault(),i.touchMoveStopPropagation&&!i.nested&&n.stopPropagation(),a.isMoved||(i.loop&&t.loopFix(),a.startTranslate=t.getTranslate(),t.setTransition(0),t.animating&&t.$wrapperEl.trigger("webkitTransitionEnd transitionend"),a.allowMomentumBounce=!1,!i.grabCursor||!0!==t.allowSlideNext&&!0!==t.allowSlidePrev||t.setGrabCursor(!0),t.emit("sliderFirstMove",n)),t.emit("sliderMove",n),a.isMoved=!0;var u=t.isHorizontal()?d:p;s.diff=u,u*=i.touchRatio,r&&(u=-u),t.swipeDirection=0<u?"prev":"next",a.currentTranslate=u+a.startTranslate;var h=!0,v=i.resistanceRatio;if(i.touchReleaseOnEdges&&(v=0),0<u&&a.currentTranslate>t.minTranslate()?(h=!1,i.resistance&&(a.currentTranslate=t.minTranslate()-1+Math.pow(-t.minTranslate()+a.startTranslate+u,v))):u<0&&a.currentTranslate<t.maxTranslate()&&(h=!1,i.resistance&&(a.currentTranslate=t.maxTranslate()+1-Math.pow(t.maxTranslate()-a.startTranslate-u,v))),h&&(n.preventedByNestedSwiper=!0),!t.allowSlideNext&&"next"===t.swipeDirection&&a.currentTranslate<a.startTranslate&&(a.currentTranslate=a.startTranslate),!t.allowSlidePrev&&"prev"===t.swipeDirection&&a.currentTranslate>a.startTranslate&&(a.currentTranslate=a.startTranslate),0<i.threshold){if(!(Math.abs(u
vendor: 5,426 bytes, line 910
910)>i.threshold||a.allowThresholdMove))return void(a.currentTranslate=a.startTranslate);if(!a.allowThresholdMove)return a.allowThresholdMove=!0,s.startX=s.currentX,s.startY=s.currentY,a.currentTranslate=a.startTranslate,void(s.diff=t.isHorizontal()?s.currentX-s.startX:s.currentY-s.startY)}i.followFinger&&((i.freeMode||i.watchSlidesProgress||i.watchSlidesVisibility)&&(t.updateActiveIndex(),t.updateSlidesClasses()),i.freeMode&&(0===a.velocities.length&&a.velocities.push({position:s[t.isHorizontal()?"startX":"startY"],time:a.touchStartTime}),a.velocities.push({position:s[t.isHorizontal()?"currentX":"currentY"],time:te.now()})),t.updateProgress(a.currentTranslate),t.setTranslate(a.currentTranslate))}}}}}else a.startMoving&&a.isScrolling&&t.emit("touchMoveOpposite",n)}.bind(e),e.onTouchEnd=function(e){var t=this,a=t.touchEventsData,i=t.params,s=t.touches,r=t.rtlTranslate,n=t.$wrapperEl,o=t.slidesGrid,l=t.snapGrid,d=e;if(d.originalEvent&&(d=d.originalEvent),a.allowTouchCallbacks&&t.emit("touchEnd",d),a.allowTouchCallbacks=!1,!a.isTouched)return a.isMoved&&i.grabCursor&&t.setGrabCursor(!1),a.isMoved=!1,void(a.startMoving=!1);i.grabCursor&&a.isMoved&&a.isTouched&&(!0===t.allowSlideNext||!0===t.allowSlidePrev)&&t.setGrabCursor(!1);var p,c=te.now(),u=c-a.touchStartTime;if(t.allowClick&&(t.updateClickedSlide(d),t.emit("tap",d),u<300&&300<c-a.lastClickTime&&(a.clickTimeout&&clearTimeout(a.clickTimeout),a.clickTimeout=te.nextTick(function(){t&&!t.destroyed&&t.emit("click",d)},300)),u<300&&c-a.lastClickTime<300&&(a.clickTimeout&&clearTimeout(a.clickTimeout),t.emit("doubleTap",d))),a.lastClickTime=te.now(),te.nextTick(function(){t.destroyed||(t.allowClick=!0)}),!a.isTouched||!a.isMoved||!t.swipeDirection||0===s.diff||a.currentTranslate===a.startTranslate)return a.isTouched=!1,a.isMoved=!1,void(a.startMoving=!1);if(a.isTouched=!1,a.isMoved=!1,a.startMoving=!1,p=i.followFinger?r?t.translate:-t.translate:-a.currentTranslate,i.freeMode){if(p<-t.minTranslate())return void t.slideTo(t.activeIndex);if(p>-t.maxTranslate())return void(t.slides.length<l.length?t.slideTo(l.length-1):t.slideTo(t.slides.length-1));if(i.freeModeMomentum){if(1<a.velocities.length){var h=a.velocities.pop(),v=a.velocities.pop(),f=h.position-v.position,m=h.time-v.time;t.velocity=f/m,t.velocity/=2,Math.abs(t.velocity)<i.freeModeMinimumVelocity&&(t.velocity=0),(150<m||300<te.now()-h.time)&&(t.velocity=0)}else t.velocity=0;t.velocity*=i.freeModeMomentumVelocityRatio,a.velocities.length=0;var g=1e3*i.freeModeMomentumRatio,b=t.velocity*g,w=t.translate+b;r&&(w=-w);var y,x,T=!1,E=20*Math.abs(t.velocity)*i.freeModeMomentumBounceRatio;if(w<t.maxTranslate())i.freeModeMomentumBounce?(w+t.maxTranslate()<-E&&(w=t.maxTranslate()-E),y=t.maxTranslate(),T=!0,a.allowMomentumBounce=!0):w=t.maxTranslate(),i.loop&&i.centeredSlides&&(x=!0);else if(w>t.minTranslate())i.freeModeMomentumBounce?(w-t.minTranslate()>E&&(w=t.minTranslate()+E),y=t.minTranslate(),T=!0,a.allowMomentumBounce=!0):w=t.minTranslate(),i.loop&&i.centeredSlides&&(x=!0);else if(i.freeModeSticky){for(var S,C=0;C<l.length;C+=1)if(l[C]>-w){S=C;break}w=-(w=Math.abs(l[S]-w)<Math.abs(l[S-1]-w)||"next"===t.swipeDirection?l[S]:l[S-1])}if(x&&t.once("transitionEnd",function(){t.loopFix()}),0!==t.velocity)g=r?Math.abs((-w-t.translate)/t.velocity):Math.abs((w-t.translate)/t.velocity);else if(i.freeModeSticky)return void t.slideToClosest();i.freeModeMomentumBounce&&T?(t.updateProgress(y),t.setTransition(g),t.setTranslate(w),t.transitionStart(!0,t.swipeDirection),t.animating=!0,n.transitionEnd(function(){t&&!t.destroyed&&a.allowMomentumBounce&&(t.emit("momentumBounce"),t.setTransition(i.speed),t.setTranslate(y),n.transitionEnd(function(){t&&!t.destroyed&&t.transitionEnd()}))})):t.velocity?(t.updateProgress(w),t.setTransition(g),t.setTranslate(w),t.transitionStart(!0,t.swipeDirection),t.animating||(t.animating=!0,n.transitionEnd(function(){t&&!t.destroyed&&t.transitionEnd()}))):t.updateProgress(w),t.updateActiveIndex(),t.updateSlidesClasses()}else if(i.freeModeSticky)return void t.slideToClosest();(!i.freeModeMomentum||u>=i.longSwipesMs)&&(t.updateProgress(),t.updateActiveIndex(),t.updateSlidesClasses())}else{for(var M=0,P=t.slidesSizesGrid[0],k=0;k<o.length;k+=i.slidesPerGroup)void 0!==o[k+i.slidesPerGroup]?p>=o[k]&&p<o[k+i.slidesPerGroup]&&(P=o[(M=k)+i.slidesPerGroup]-o[k]):p>=o[k]&&(M=k,P=o[o.length-1]-o[o.length-2]);var z=(p-o[M])/P;if(u>i.longSwipesMs){if(!i.longSwipes)return void t.slideTo(t.activeIndex);"next"===t.swipeDirection&&(z>=i.longSwipesRatio?t.slideTo(M+i.slidesPerGroup):t.slideTo(M)),"prev"===t.swipeDirection&&(z>1-i.longSwipesRatio?t.slideTo(M+i.slidesPerGroup):t.slideTo(M))}else{if(!i.shortSwipes)return void t.slideTo(t.activeIndex);"next"===t.swipeDirection&&t.slideTo(M+i.slidesPerGroup),"prev"===t.swipeDirection&&t.slideTo(M)}}}.bind(e),e.onClick=function(e){this.allowClick||(this.params.preventClicks&&e.preventDefault(),this.params.preventClicksPropagation&&this.animating&&(e.stopPropagation(),e.stopImmediatePropagation()))}.bind(e);var r="container"===t.touchEventsTarget?i:s,n=!!t.nested;if(ae.touch||!ae.pointerEvents&&!ae.prefixedPointerEvents){if(ae.touch){var o=!("touchstart"!==a.start||!ae.passiveListener||!t.passiveListeners)&&{passive:!0,capture:!1};r.addEventListener(a.start,e.onTouchStart,o),r.addEventListener(a.move,e.onTouchMove,ae.passiveListener?{passive:!1,capture:n}:n),r.addEventListener(a.end,e.onTouchEnd,o)
vendor: 5,404 bytes, line 910
910}(t.simulateTouch&&!g.ios&&!g.android||t.simulateTouch&&!ae.touch&&g.ios)&&(r.addEventListener("mousedown",e.onTouchStart,!1),f.addEventListener("mousemove",e.onTouchMove,n),f.addEventListener("mouseup",e.onTouchEnd,!1))}else r.addEventListener(a.start,e.onTouchStart,!1),f.addEventListener(a.move,e.onTouchMove,n),f.addEventListener(a.end,e.onTouchEnd,!1);(t.preventClicks||t.preventClicksPropagation)&&r.addEventListener("click",e.onClick,!0),e.on(g.ios||g.android?"resize orientationchange observerUpdate":"resize observerUpdate",b,!0)},detachEvents:function(){var e=this,t=e.params,a=e.touchEvents,i=e.el,s=e.wrapperEl,r="container"===t.touchEventsTarget?i:s,n=!!t.nested;if(ae.touch||!ae.pointerEvents&&!ae.prefixedPointerEvents){if(ae.touch){var o=!("onTouchStart"!==a.start||!ae.passiveListener||!t.passiveListeners)&&{passive:!0,capture:!1};r.removeEventListener(a.start,e.onTouchStart,o),r.removeEventListener(a.move,e.onTouchMove,n),r.removeEventListener(a.end,e.onTouchEnd,o)}(t.simulateTouch&&!g.ios&&!g.android||t.simulateTouch&&!ae.touch&&g.ios)&&(r.removeEventListener("mousedown",e.onTouchStart,!1),f.removeEventListener("mousemove",e.onTouchMove,n),f.removeEventListener("mouseup",e.onTouchEnd,!1))}else r.removeEventListener(a.start,e.onTouchStart,!1),f.removeEventListener(a.move,e.onTouchMove,n),f.removeEventListener(a.end,e.onTouchEnd,!1);(t.preventClicks||t.preventClicksPropagation)&&r.removeEventListener("click",e.onClick,!0),e.off(g.ios||g.android?"resize orientationchange observerUpdate":"resize observerUpdate",b)}},breakpoints:{setBreakpoint:function(){var e=this,t=e.activeIndex,a=e.initialized,i=e.loopedSlides;void 0===i&&(i=0);var s=e.params,r=s.breakpoints;if(r&&(!r||0!==Object.keys(r).length)){var n=e.getBreakpoint(r);if(n&&e.currentBreakpoint!==n){var o=n in r?r[n]:void 0;o&&["slidesPerView","spaceBetween","slidesPerGroup"].forEach(function(e){var t=o[e];void 0!==t&&(o[e]="slidesPerView"!==e||"AUTO"!==t&&"auto"!==t?"slidesPerView"===e?parseFloat(t):parseInt(t,10):"auto")});var l=o||e.originalParams,d=l.direction&&l.direction!==s.direction,p=s.loop&&(l.slidesPerView!==s.slidesPerView||d);d&&a&&e.changeDirection(),te.extend(e.params,l),te.extend(e,{allowTouchMove:e.params.allowTouchMove,allowSlideNext:e.params.allowSlideNext,allowSlidePrev:e.params.allowSlidePrev}),e.currentBreakpoint=n,p&&a&&(e.loopDestroy(),e.loopCreate(),e.updateSlides(),e.slideTo(t-i+e.loopedSlides,0,!1)),e.emit("breakpoint",l)}}},getBreakpoint:function(e){if(e){var t=!1,a=[];Object.keys(e).forEach(function(e){a.push(e)}),a.sort(function(e,t){return parseInt(e,10)-parseInt(t,10)});for(var i=0;i<a.length;i+=1){var s=a[i];this.params.breakpointsInverse?s<=ee.innerWidth&&(t=s):s>=ee.innerWidth&&!t&&(t=s)}return t||"max"}}},checkOverflow:{checkOverflow:function(){var e=this,t=e.isLocked;e.isLocked=1===e.snapGrid.length,e.allowSlideNext=!e.isLocked,e.allowSlidePrev=!e.isLocked,t!==e.isLocked&&e.emit(e.isLocked?"lock":"unlock"),t&&t!==e.isLocked&&(e.isEnd=!1,e.navigation.update())}},classes:{addClasses:function(){var t=this.classNames,a=this.params,e=this.rtl,i=this.$el,s=[];s.push("initialized"),s.push(a.direction),a.freeMode&&s.push("free-mode"),ae.flexbox||s.push("no-flexbox"),a.autoHeight&&s.push("autoheight"),e&&s.push("rtl"),1<a.slidesPerColumn&&s.push("multirow"),g.android&&s.push("android"),g.ios&&s.push("ios"),(ie.isIE||ie.isEdge)&&(ae.pointerEvents||ae.prefixedPointerEvents)&&s.push("wp8-"+a.direction),s.forEach(function(e){t.push(a.containerModifierClass+e)}),i.addClass(t.join(" "))},removeClasses:function(){var e=this.$el,t=this.classNames;e.removeClass(t.join(" "))}},images:{loadImage:function(e,t,a,i,s,r){var n;function o(){r&&r()}e.complete&&s?o():t?((n=new ee.Image).onload=o,n.onerror=o,i&&(n.sizes=i),a&&(n.srcset=a),t&&(n.src=t)):o()},preloadImages:function(){var e=this;function t(){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")))}e.imagesToLoad=e.$el.find("img");for(var a=0;a<e.imagesToLoad.length;a+=1){var i=e.imagesToLoad[a];e.loadImage(i,i.currentSrc||i.getAttribute("src"),i.srcset||i.getAttribute("srcset"),i.sizes||i.getAttribute("sizes"),!0,t)}}}},x={},T=function(u){function h(){for(var e,t,s,a=[],i=arguments.length;i--;)a[i]=arguments[i];s=(s=1===a.length&&a[0].constructor&&a[0].constructor===Object?a[0]:(t=(e=a)[0],e[1]))||{},s=te.extend({},s),t&&!s.el&&(s.el=t),u.call(this,s),Object.keys(y).forEach(function(t){Object.keys(y[t]).forEach(function(e){h.prototype[e]||(h.prototype[e]=y[t][e])})});var r=this;void 0===r.modules&&(r.modules={}),Object.keys(r.modules).forEach(function(e){var t=r.modules[e];if(t.params){var a=Object.keys(t.params)[0],i=t.params[a];if("object"!=typeof i||null===i)return;if(!(a in s&&"enabled"in i))return;!0===s[a]&&(s[a]={enabled:!0}),"object"!=typeof s[a]||"enabled"in s[a]||(s[a].enabled=!0),s[a]||(s[a]={enabled:!1})}});var n=te.extend({},w);r.useModulesParams(n),r.params=te.extend({},n,x,s),r.originalParams=te.extend({},r.params),r.passedParams=te.extend({},s);var o=(r.$=I)(r.params.el);if(t=o[0]){if(1<o.length){var l=[];return o.each(function(e,t){var a=te.extend({},s,{el:t});l.push(new h(a))}),l}t.swiper=r,o.data("swiper",r);var d,p,c=o.children("."+r.params.wrapperClass);return te.extend(r,{$el:o,el:t,$wrapperEl:c,wrapperEl:c[0],classNames:[],slides:I
vendor: 4,684 bytes, line 910
910(),slidesGrid:[],snapGrid:[],slidesSizesGrid:[],isHorizontal:function(){return"horizontal"===r.params.direction},isVertical:function(){return"vertical"===r.params.direction},rtl:"rtl"===t.dir.toLowerCase()||"rtl"===o.css("direction"),rtlTranslate:"horizontal"===r.params.direction&&("rtl"===t.dir.toLowerCase()||"rtl"===o.css("direction")),wrongRTL:"-webkit-box"===c.css("display"),activeIndex:0,realIndex:0,isBeginning:!0,isEnd:!1,translate:0,previousTranslate:0,progress:0,velocity:0,animating:!1,allowSlideNext:r.params.allowSlideNext,allowSlidePrev:r.params.allowSlidePrev,touchEvents:(d=["touchstart","touchmove","touchend"],p=["mousedown","mousemove","mouseup"],ae.pointerEvents?p=["pointerdown","pointermove","pointerup"]:ae.prefixedPointerEvents&&(p=["MSPointerDown","MSPointerMove","MSPointerUp"]),r.touchEventsTouch={start:d[0],move:d[1],end:d[2]},r.touchEventsDesktop={start:p[0],move:p[1],end:p[2]},ae.touch||!r.params.simulateTouch?r.touchEventsTouch:r.touchEventsDesktop),touchEventsData:{isTouched:void 0,isMoved:void 0,allowTouchCallbacks:void 0,touchStartTime:void 0,isScrolling:void 0,currentTranslate:void 0,startTranslate:void 0,allowThresholdMove:void 0,formElements:"input, select, option, textarea, button, video",lastClickTime:te.now(),clickTimeout:void 0,velocities:[],allowMomentumBounce:void 0,isTouchEvent:void 0,startMoving:void 0},allowClick:!0,allowTouchMove:r.params.allowTouchMove,touches:{startX:0,startY:0,currentX:0,currentY:0,diff:0},imagesToLoad:[],imagesLoaded:0}),r.useModules(),r.params.init&&r.init(),r}}u&&(h.__proto__=u);var e={extendedDefaults:{configurable:!0},defaults:{configurable:!0},Class:{configurable:!0},$:{configurable:!0}};return((h.prototype=Object.create(u&&u.prototype)).constructor=h).prototype.slidesPerViewDynamic=function(){var e=this,t=e.params,a=e.slides,i=e.slidesGrid,s=e.size,r=e.activeIndex,n=1;if(t.centeredSlides){for(var o,l=a[r].swiperSlideSize,d=r+1;d<a.length;d+=1)a[d]&&!o&&(n+=1,s<(l+=a[d].swiperSlideSize)&&(o=!0));for(var p=r-1;0<=p;p-=1)a[p]&&!o&&(n+=1,s<(l+=a[p].swiperSlideSize)&&(o=!0))}else for(var c=r+1;c<a.length;c+=1)i[c]-i[r]<s&&(n+=1);return n},h.prototype.update=function(){var a=this;if(a&&!a.destroyed){var e=a.snapGrid,t=a.params;t.breakpoints&&a.setBreakpoint(),a.updateSize(),a.updateSlides(),a.updateProgress(),a.updateSlidesClasses(),a.params.freeMode?(i(),a.params.autoHeight&&a.updateAutoHeight()):(("auto"===a.params.slidesPerView||1<a.params.slidesPerView)&&a.isEnd&&!a.params.centeredSlides?a.slideTo(a.slides.length-1,0,!1,!0):a.slideTo(a.activeIndex,0,!1,!0))||i(),t.watchOverflow&&e!==a.snapGrid&&a.checkOverflow(),a.emit("update")}function i(){var e=a.rtlTranslate?-1*a.translate:a.translate,t=Math.min(Math.max(e,a.maxTranslate()),a.minTranslate());a.setTranslate(t),a.updateActiveIndex(),a.updateSlidesClasses()}},h.prototype.changeDirection=function(a,e){void 0===e&&(e=!0);var t=this,i=t.params.direction;return(a=a||("horizontal"===i?"vertical":"horizontal"))===i||"horizontal"!==a&&"vertical"!==a||(t.$el.removeClass(""+t.params.containerModifierClass+i+" wp8-"+i).addClass(""+t.params.containerModifierClass+a),(ie.isIE||ie.isEdge)&&(ae.pointerEvents||ae.prefixedPointerEvents)&&t.$el.addClass(t.params.containerModifierClass+"wp8-"+a),t.params.direction=a,t.slides.each(function(e,t){"vertical"===a?t.style.width="":t.style.height=""}),t.emit("changeDirection"),e&&t.update()),t},h.prototype.init=function(){var e=this;e.initialized||(e.emit("beforeInit"),e.params.breakpoints&&e.setBreakpoint(),e.addClasses(),e.params.loop&&e.loopCreate(),e.updateSize(),e.updateSlides(),e.params.watchOverflow&&e.checkOverflow(),e.params.grabCursor&&e.setGrabCursor(),e.params.preloadImages&&e.preloadImages(),e.params.loop?e.slideTo(e.params.initialSlide+e.loopedSlides,0,e.params.runCallbacksOnInit):e.slideTo(e.params.initialSlide,0,e.params.runCallbacksOnInit),e.attachEvents(),e.initialized=!0,e.emit("init"))},h.prototype.destroy=function(e,t){void 0===e&&(e=!0),void 0===t&&(t=!0);var a=this,i=a.params,s=a.$el,r=a.$wrapperEl,n=a.slides;return void 0===a.params||a.destroyed||(a.emit("beforeDestroy"),a.initialized=!1,a.detachEvents(),i.loop&&a.loopDestroy(),t&&(a.removeClasses(),s.removeAttr("style"),r.removeAttr("style"),n&&n.length&&n.removeClass([i.slideVisibleClass,i.slideActiveClass,i.slideNextClass,i.slidePrevClass].join(" ")).removeAttr("style").removeAttr("data-swiper-slide-index").removeAttr("data-swiper-column").removeAttr("data-swiper-row")),a.emit("destroy"),Object.keys(a.eventsListeners).forEach(function(e){a.off(e)}),!1!==e&&(a.$el[0].swiper=null,a.$el.data("swiper",null),te.deleteProps(a)),a.destroyed=!0),null},h.extendDefaults=function(e){te.extend(
vendor: 15,102 bytes, line 910
910x,e)},e.extendedDefaults.get=function(){return x},e.defaults.get=function(){return w},e.Class.get=function(){return u},e.$.get=function(){return I},Object.defineProperties(h,e),h}(e),E={name:"device",proto:{device:g},static:{device:g}},S={name:"support",proto:{support:ae},static:{support:ae}},C={name:"browser",proto:{browser:ie},static:{browser:ie}},M={name:"resize",create:function(){var e=this;te.extend(e,{resize:{resizeHandler:function(){e&&!e.destroyed&&e.initialized&&(e.emit("beforeResize"),e.emit("resize"))},orientationChangeHandler:function(){e&&!e.destroyed&&e.initialized&&e.emit("orientationchange")}}})},on:{init:function(){ee.addEventListener("resize",this.resize.resizeHandler),ee.addEventListener("orientationchange",this.resize.orientationChangeHandler)},destroy:function(){ee.removeEventListener("resize",this.resize.resizeHandler),ee.removeEventListener("orientationchange",this.resize.orientationChangeHandler)}}},P={func:ee.MutationObserver||ee.WebkitMutationObserver,attach:function(e,t){void 0===t&&(t={});var a=this,i=new P.func(function(e){if(1!==e.length){var t=function(){a.emit("observerUpdate",e[0])};ee.requestAnimationFrame?ee.requestAnimationFrame(t):ee.setTimeout(t,0)}else a.emit("observerUpdate",e[0])});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)},init:function(){var e=this;if(ae.observer&&e.params.observer){if(e.params.observeParents)for(var t=e.$el.parents(),a=0;a<t.length;a+=1)e.observer.attach(t[a]);e.observer.attach(e.$el[0],{childList:e.params.observeSlideChildren}),e.observer.attach(e.$wrapperEl[0],{attributes:!1})}},destroy:function(){this.observer.observers.forEach(function(e){e.disconnect()}),this.observer.observers=[]}},k={name:"observer",params:{observer:!1,observeParents:!1,observeSlideChildren:!1},create:function(){te.extend(this,{observer:{init:P.init.bind(this),attach:P.attach.bind(this),destroy:P.destroy.bind(this),observers:[]}})},on:{init:function(){this.observer.init()},destroy:function(){this.observer.destroy()}}},z={update:function(e){var t=this,a=t.params,i=a.slidesPerView,s=a.slidesPerGroup,r=a.centeredSlides,n=t.params.virtual,o=n.addSlidesBefore,l=n.addSlidesAfter,d=t.virtual,p=d.from,c=d.to,u=d.slides,h=d.slidesGrid,v=d.renderSlide,f=d.offset;t.updateActiveIndex();var m,g,b,w=t.activeIndex||0;m=t.rtlTranslate?"right":t.isHorizontal()?"left":"top",b=r?(g=Math.floor(i/2)+s+o,Math.floor(i/2)+s+l):(g=i+(s-1)+o,s+l);var y=Math.max((w||0)-b,0),x=Math.min((w||0)+g,u.length-1),T=(t.slidesGrid[y]||0)-(t.slidesGrid[0]||0);function E(){t.updateSlides(),t.updateProgress(),t.updateSlidesClasses(),t.lazy&&t.params.lazy.enabled&&t.lazy.load()}if(te.extend(t.virtual,{from:y,to:x,offset:T,slidesGrid:t.slidesGrid}),p===y&&c===x&&!e)return t.slidesGrid!==h&&T!==f&&t.slides.css(m,T+"px"),void t.updateProgress();if(t.params.virtual.renderExternal)return t.params.virtual.renderExternal.call(t,{offset:T,from:y,to:x,slides:function(){for(var e=[],t=y;t<=x;t+=1)e.push(u[t]);return e}()}),void E();var S=[],C=[];if(e)t.$wrapperEl.find("."+t.params.slideClass).remove();else for(var M=p;M<=c;M+=1)(M<y||x<M)&&t.$wrapperEl.find("."+t.params.slideClass+'[data-swiper-slide-index="'+M+'"]').remove();for(var P=0;P<u.length;P+=1)y<=P&&P<=x&&(void 0===c||e?C.push(P):(c<P&&C.push(P),P<p&&S.push(P)));C.forEach(function(e){t.$wrapperEl.append(v(u[e],e))}),S.sort(function(e,t){return t-e}).forEach(function(e){t.$wrapperEl.prepend(v(u[e],e))}),t.$wrapperEl.children(".swiper-slide").css(m,T+"px"),E()},renderSlide:function(e,t){var a=this,i=a.params.virtual;if(i.cache&&a.virtual.cache[t])return a.virtual.cache[t];var s=i.renderSlide?I(i.renderSlide.call(a,e,t)):I('<div class="'+a.params.slideClass+'" data-swiper-slide-index="'+t+'">'+e+"</div>");return s.attr("data-swiper-slide-index")||s.attr("data-swiper-slide-index",t),i.cache&&(a.virtual.cache[t]=s),s},appendSlide:function(e){if("object"==typeof e&&"length"in e)for(var t=0;t<e.length;t+=1)e[t]&&this.virtual.slides.push(e[t]);else this.virtual.slides.push(e);this.virtual.update(!0)},prependSlide:function(e){var t=this,a=t.activeIndex,i=a+1,s=1;if(Array.isArray(e)){for(var r=0;r<e.length;r+=1)e[r]&&t.virtual.slides.unshift(e[r]);i=a+e.length,s=e.length}else t.virtual.slides.unshift(e);if(t.params.virtual.cache){var n=t.virtual.cache,o={};Object.keys(n).forEach(function(e){o[parseInt(e,10)+s]=n[e]}),t.virtual.cache=o}t.virtual.update(!0),t.slideTo(i,0)},removeSlide:function(e){var t=this;if(null!=e){var a=t.activeIndex;if(Array.isArray(e))for(var i=e.length-1;0<=i;i-=1)t.virtual.slides.splice(e[i],1),t.params.virtual.cache&&delete t.virtual.cache[e[i]],e[i]<a&&(a-=1),a=Math.max(a,0);else t.virtual.slides.splice(e,1),t.params.virtual.cache&&delete t.virtual.cache[e],e<a&&(a-=1),a=Math.max(a,0);t.virtual.update(!0),t.slideTo(a,0)}},removeAllSlides:function(){var e=this;e.virtual.slides=[],e.params.virtual.cache&&(e.virtual.cache={}),e.virtual.update(!0),e.slideTo(0,0)}},$={name:"virtual",params:{virtual:{enabled:!1,slides:[],cache:!0,renderSlide:null,renderExternal:null,addSlidesBefore:0,addSlidesAfter:0}},create:function(){var e=this;te.extend(e,{virtual:{update:z.update.bind(e),appendSlide:z.appendSlide.bind(e),prependSlide:z.prependSlide.bind(e),removeSlide:z.removeSlide.bind(e),removeAllSlides:z.removeAllSlides.bind(e),renderSlide:z.renderSlide.bind(e),slides:e.params.virtual.slides,cache:{}}})},on:{beforeInit:function(){var e=this;if(e.params.virtual.enabled){e.classNames.push(e.params.containerModifierClass+"virtual");var t={watchSlidesProgress:!0};te.extend(e.params,t),te.extend(e.originalParams,t),e.params.initialSlide||e.virtual.update()}},setTranslate:function(){this.params.virtual.enabled&&this.virtual.update()}}},L={handle:function(e){var t=this,a=t.rtlTranslate,i=e;i.originalEvent&&(i=i.originalEvent);var s=i.keyCode||i.charCode;if(!t.allowSlideNext&&(t.isHorizontal()&&39===s||t.isVertical()&&40===s||34===s))return!1;if(!t.allowSlidePrev&&(t.isHorizontal()&&37===s||t.isVertical()&&38===s||33===s))return!1;if(!(i.shiftKey||i.altKey||i.ctrlKey||i.metaKey||f.activeElement&&f.activeElement.nodeName&&("input"===f.activeElement.nodeName.toLowerCase()||"textarea"===f.activeElement.nodeName.toLowerCase()))){if(t.params.keyboard.onlyInViewport&&(33===s||34===s||37===s||39===s||38===s||40===s)){var r=!1;if(0<t.$el.parents("."+t.params.slideClass).length&&0===t.$el.parents("."+t.params.slideActiveClass).length)return;var n=ee.innerWidth,o=ee.innerHeight,l=t.$el.offset();a&&(l.left-=t.$el[0].scrollLeft);for(var d=[[l.left,l.top],[l.left+t.width,l.top],[l.left,l.top+t.height],[l.left+t.width,l.top+t.height]],p=0;p<d.length;p+=1){var c=d[p];0<=c[0]&&c[0]<=n&&0<=c[1]&&c[1]<=o&&(r=!0)}if(!r)return}t.isHorizontal()?(33!==s&&34!==s&&37!==s&&39!==s||(i.preventDefault?i.preventDefault():i.returnValue=!1),(34!==s&&39!==s||a)&&(33!==s&&37!==s||!a)||t.slideNext(),(33!==s&&37!==s||a)&&(34!==s&&39!==s||!a)||t.slidePrev()):(33!==s&&34!==s&&38!==s&&40!==s||(i.preventDefault?i.preventDefault():i.returnValue=!1),34!==s&&40!==s||t.slideNext(),33!==s&&38!==s||t.slidePrev()),t.emit("keyPress",s)}},enable:function(){this.keyboard.enabled||(I(f).on("keydown",this.keyboard.handle),this.keyboard.enabled=!0)},disable:function(){this.keyboard.enabled&&(I(f).off("keydown",this.keyboard.handle),this.keyboard.enabled=!1)}},D={name:"keyboard",params:{keyboard:{enabled:!1,onlyInViewport:!0}},create:function(){te.extend(this,{keyboard:{enabled:!1,enable:L.enable.bind(this),disable:L.disable.bind(this),handle:L.handle.bind(this)}})},on:{init:function(){this.params.keyboard.enabled&&this.keyboard.enable()},destroy:function(){this.keyboard.enabled&&this.keyboard.disable()}}};var O={lastScrollTime:te.now(),event:-1<ee.navigator.userAgent.indexOf("firefox")?"DOMMouseScroll":function(){var e="onwheel",t=e in f;if(!t){var a=f.createElement("div");a.setAttribute(e,"return;"),t="function"==typeof a[e]}return!t&&f.implementation&&f.implementation.hasFeature&&!0!==f.implementation.hasFeature("","")&&(t=f.implementation.hasFeature("Events.wheel","3.0")),t}()?"wheel":"mousewheel",normalize:function(e){var t=0,a=0,i=0,s=0;return"detail"in e&&(a=e.detail),"wheelDelta"in e&&(a=-e.wheelDelta/120),"wheelDeltaY"in e&&(a=-e.wheelDeltaY/120),"wheelDeltaX"in e&&(t=-e.wheelDeltaX/120),"axis"in e&&e.axis===e.HORIZONTAL_AXIS&&(t=a,a=0),i=10*t,s=10*a,"deltaY"in e&&(s=e.deltaY),"deltaX"in e&&(i=e.deltaX),(i||s)&&e.deltaMode&&(1===e.deltaMode?(i*=40,s*=40):(i*=800,s*=800)),i&&!t&&(t=i<1?-1:1),s&&!a&&(a=s<1?-1:1),{spinX:t,spinY:a,pixelX:i,pixelY:s}},handleMouseEnter:function(){this.mouseEntered=!0},handleMouseLeave:function(){this.mouseEntered=!1},handle:function(e){var t=e,a=this,i=a.params.mousewheel;if(!a.mouseEntered&&!i.releaseOnEdges)return!0;t.originalEvent&&(t=t.originalEvent);var s=0,r=a.rtlTranslate?-1:1,n=O.normalize(t);if(i.forceToAxis)if(a.isHorizontal()){if(!(Math.abs(n.pixelX)>Math.abs(n.pixelY)))return!0;s=n.pixelX*r}else{if(!(Math.abs(n.pixelY)>Math.abs(n.pixelX)))return!0;s=n.pixelY}else s=Math.abs(n.pixelX)>Math.abs(n.pixelY)?-n.pixelX*r:-n.pixelY;if(0===s)return!0;if(i.invert&&(s=-s),a.params.freeMode){a.params.loop&&a.loopFix();var o=a.getTranslate()+s*i.sensitivity,l=a.isBeginning,d=a.isEnd;if(o>=a.minTranslate()&&(o=a.minTranslate()),o<=a.maxTranslate()&&(o=a.maxTranslate()),a.setTransition(0),a.setTranslate(o),a.updateProgress(),a.updateActiveIndex(),a.updateSlidesClasses(),(!l&&a.isBeginning||!d&&a.isEnd)&&a.updateSlidesClasses(),a.params.freeModeSticky&&(clearTimeout(a.mousewheel.timeout),a.mousewheel.timeout=te.nextTick(function(){a.slideToClosest()},300)),a.emit("scroll",t),a.params.autoplay&&a.params.autoplayDisableOnInteraction&&a.autoplay.stop(),o===a.minTranslate()||o===a.maxTranslate())return!0}else{if(60<te.now()-a.mousewheel.lastScrollTime)if(s<0)if(a.isEnd&&!a.params.loop||a.animating){if(i.releaseOnEdges)return!0}else a.slideNext(),a.emit("scroll",t);else if(a.isBeginning&&!a.params.loop||a.animating){if(i.releaseOnEdges)return!0}else a.slidePrev(),a.emit("scroll",t);a.mousewheel.lastScrollTime=(new ee.Date).getTime()}return t.preventDefault?t.preventDefault():t.returnValue=!1,!1},enable:function(){var e=this;if(!O.event)return!1;if(e.mousewheel.enabled)return!1;var t=e.$el;return"container"!==e.params.mousewheel.eventsTarged&&(t=I(e.params.mousewheel.eventsTarged)),t.on("mouseenter",e.mousewheel.handleMouseEnter),t.on("mouseleave",e.mousewheel.handleMouseLeave),t.on(O.event,e.mousewheel.handle),e.mousewheel.enabled=!0},disable:function(){var e=this;if(!O.event)return!1;if(!e.mousewheel.enabled)return!1;var t=e.$el;return"container"!==e.params.mousewheel.eventsTarged&&(t=I(e.params.mousewheel.eventsTarged)),t.off(O.event,e.mousewheel.handle),!(e.mousewheel.enabled=!1)}},A={update:function(){var e=this,t=e.params.navigation;if(!e.params.loop){var a=e.navigation,i=a.$nextEl,s=a.$prevEl;s&&0<s.length&&(e.isBeginning?s.addClass(t.disabledClass):s.removeClass(t.disabledClass),s[e.params.watchOverflow&&e.isLocked?"addClass":"removeClass"](t.lockClass)),i&&0<i.length&&(e.isEnd?i.addClass(t.disabledClass):i.removeClass(t.disabledClass),i[e.params.watchOverflow&&e.isLocked?"addClass":"removeClass"](t.lockClass))}},onPrevClick:function(e){e.preventDefault(),this.isBeginning&&!this.params.loop||this.slidePrev()},onNextClick:function(e){e.preventDefault(),this.isEnd&&!this.params.loop||this.slideNext()},init:function(){var e,t,a=this,i=a.params.navigation;(i.nextEl||i.prevEl)&&(i.nextEl&&(e=I(i.nextEl),a.params.uniqueNavElements&&"string"==typeof i.nextEl&&1<e.length&&1===a.$el.find(i.nextEl).length&&(e=a.$el.find(i.nextEl))),i.prevEl&&(t=I(i.prevEl),a.params.uniqueNavElements&&"string"==typeof i.prevEl&&1<t.length&&1===a.$el.find(i.prevEl).length&&(t=a.$el.find(i.prevEl))),e&&0<e.length&&e.on("click",a.navigation.onNextClick),t&&0<t.length&&t.on("click",a.navigation.onPrevClick),te.extend(a.navigation,{$nextEl:e,nextEl:e&&e[0],$prevEl:t,prevEl:t&&t[0]}))},destroy:function(){var e=this,t=e.navigation,a=t.$nextEl,i=t.$prevEl;a&&a.length&&(a.off("click",e.navigation.onNextClick),a.removeClass(e.params.navigation.disabledClass)),i&&i.length&&(i.off("click",e.navigation.onPrevClick),i.removeClass(e.params.navigation.disabledClass))}},H={update:function(){var e=this,t=e.rtl,s=e.params.pagination;if(s.el&&e.pagination.el&&e.pagination.$el&&0!==e.pagination.$el.length){var r,a=e.virtual&&e.params.virtual.enabled?e.virtual.slides.length:e.slides.length,i=e.pagination.$el,n=e.params.loop?Math.ceil((a-2*e.loopedSlides)/e.params.slidesPerGroup):e.snapGrid.length;if(e.params.loop?((r=Math.ceil((e.activeIndex-e.loopedSlides)/e.params.slidesPerGroup))>a-1-2*e.loopedSlides&&(r-=a-2*e.loopedSlides),n-1<r&&(r-=n),r<0&&"bullets"!==e.params.paginationType&&(r=n+r)):r=void 0!==e.snapIndex?e.snapIndex:e.activeIndex||0,"bullets"===s.type&&e.pagination.bullets&&0<e.pagination.bullets.length){var o,l,d,p=e.pagination.bullets;if(s.dynamicBullets&&(e.pagination.bulletSize=p.eq(0)[e.isHorizontal()?"outerWidth":"outerHeight"](!0),i.css(e.isHorizontal()?"width":"height",e.pagination.bulletSize*(s.dynamicMainBullets+4)+"px"),1<s.dynamicMainBullets&&void 0!==e.previousIndex&&(e.pagination.dynamicBulletIndex+=r-e.previousIndex,e.pagination.dynamicBulletIndex>s.dynamicMainBullets-1?e.pagination.dynamicBulletIndex=s.dynamicMainBullets-1:e.pagination.dynamicBulletIndex<0&&(e.pagination.dynamicBulletIndex=0)),o=r-e.pagination.dynamicBulletIndex,d=((l=o+(Math.min(p.length,s.dynamicMainBullets)-1))+o)/2),p.removeClass(s.bulletActiveClass+" "+s.bulletActiveClass+"-next "+s.bulletActiveClass+"-next-next "+s.bulletActiveClass+"-prev "+s.bulletActiveClass+"-prev-prev "+s.bulletActiveClass+"-main"),1<i.length)p.each(function(e,t){var a=I(t),i=a.index();i===r&&a.addClass(s.bulletActiveClass),s.dynamicBullets&&(o<=i&&i<=l&&a.addClass(s.bulletActiveClass+"-main"),i===o&&a.prev().addClass(s.bulletActiveClass+"-prev").prev().addClass(s.bulletActiveClass+"-prev-prev"),i===l&&a.next().addClass(s.bulletActiveClass+"-next").next().addClass(s.bulletActiveClass+"-next-next"))});else if(p.eq(r).addClass(s.bulletActiveClass),s.dynamicBullets){for(var c=p.eq(o),u=p.eq(l),h=o;h<=l;h+=1)p.eq(h).addClass(s.bulletActiveClass+"-main");c.prev().addClass(s.bulletActiveClass+"-prev").prev().addClass(s.bulletActiveClass+"-prev-prev"),u.next().addClass(s.bulletActiveClass+"-next").next().addClass(s.bulletActiveClass+"-next-next")}if(s.dynamicBullets){var v=Math.min(p.length,s.dynamicMainBullets+4),f=(e.pagination.bulletSize*v-e.pagination.bulletSize)/2-d*e.pagination.bulletSize,m=t?"right":"left";p.css(e.isHorizontal()?m:"top",f+"px")}}if("fraction"===s.type&&(i.find("."+s.currentClass).text(s.formatFractionCurrent(r+1)),i.find("."+s.totalClass).text(s.formatFractionTotal(n))),"progressbar"===s.type){var g;g=s.progressbarOpposite?e.isHorizontal()?"vertical":"horizontal":e.isHorizontal()?"horizontal":"vertical";var b=(r+1)/n,w=1,y=1;"horizontal"===g?w=b:y=b,i.find("."+s.progressbarFillClass).transform("translate3d(0,
9100,0) scaleX("+w+") scaleY("+y+")").transition(e.params.speed)}"custom"===s.type&&s.renderCustom?(i.html(s.renderCustom(e,r+1,n)),e.emit("paginationRender",e,i[0])):e.emit("paginationUpdate",e,i[0]),i[e.params.watchOverflow&&e.isLocked?"addClass":"removeClass"](s.lockClass)}},render:function(){var e=this,t=e.params.pagination;if(t.el&&e.pagination.el&&e.pagination.$el&&0!==e.pagination.$el.length){var a=e.virtual&&e.params.virtual.enabled?e.virtual.slides.length:e.slides.length,i=e.pagination.$el,s="";if("bullets"===t.type){for(var r=e.params.loop?Math.ceil((a-2*e.loopedSlides)/e.params.slidesPerGroup):e.snapGrid.length,n=0;n<r;n+=1)t.renderBullet?s+=t.renderBullet.call(e,n,t.bulletClass):s+="<"+t.bulletElement+' class="'+t.bulletClass+'"></'+t.bulletElement+">";i.html(s),e.pagination.bullets=i.find("."+t.bulletClass)}"fraction"===t.type&&(s=t.renderFraction?t.renderFraction.call(e,t.currentClass,t.totalClass):'<span class="'+t.currentClass+'"></span> / <span class="'+t.totalClass+'"></span>',i.html(s)),"progressbar"===t.type&&(s=t.renderProgressbar?t.renderProgressbar.call(e,t.progressbarFillClass):'<span class="'+t.progressbarFillClass+'"></span>',i.html(s)),"custom"!==t.type&&e.emit("paginationRender",e.pagination.$el[0])}},init:function(){var a=this,e=a.params.pagination;if(e.el){var t=I(e.el);0!==t.length&&(a.params.uniqueNavElements&&"string"==typeof e.el&&1<t.length&&1===a.$el.find(e.el).length&&(t=a.$el.find(e.el)),"bullets"===e.type&&e.clickable&&t.addClass(e.clickableClass),t.addClass(e.modifierClass+e.type),"bullets"===e.type&&e.dynamicBullets&&(t.addClass(""+e.modifierClass+e.type+"-dynamic"),a.pagination.dynamicBulletIndex=0,e.dynamicMainBullets<1&&(e.dynamicMainBullets=1)),"progressbar"===e.type&&e.progressbarOpposite&&t.addClass(e.progressbarOppositeClass),e.clickable&&t.on("click","."+e.bulletClass,function(e){e.preventDefault();var t=I(this).index()*a.params.slidesPerGroup;a.params.loop&&(t+=a.loopedSlides),a.slideTo(t)}),te.extend(a.pagination,{$el:t,el:t[0]}))}},destroy:function(){var e=this,t=e.params.pagination;if(t.el&&e.pagination.el&&e.pagination.$el&&0!==e.pagination.$el.length){var a=e.pagination.$el;a.removeClass(t.hiddenClass),a.removeClass(t.modifierClass+t.type),e.pagination.bullets&&e.pagination.bullets.removeClass(t.bulletActiveClass),t.clickable&&a.off("click","."+t.bulletClass)}}},G={setTranslate:function(){var e=this;if(e.params.scrollbar.el&&e.scrollbar.el){var t=e.scrollbar,a=e.rtlTranslate,i=e.progress,s=t.dragSize,r=t.trackSize,n=t.$dragEl,o=t.$el,l=e.params.scrollbar,d=s,p=(r-s)*i;a?0<(p=-p)?(d=s-p,p=0):r<-p+s&&(d=r+p):p<0?(d=s+p,p=0):r<p+s&&(d=r-p),e.isHorizontal()?(ae.transforms3d?n.transform("translate3d("+p+"px, 0, 0)"):n.transform("translateX("+p+"px)"),n[0].style.width=d+"px"):(ae.transforms3d?n.transform("translate3d(0px, "+p+"px, 0)"):n.transform("translateY("+p+"px)"),n[0].style.height=d+"px"),l.hide&&(clearTimeout(e.scrollbar.timeout),o[0].style.opacity=1,e.scrollbar.timeout=setTimeout(function(){o[0].style.opacity=0,o.transition(400)},1e3))}},setTransition:function(e){this.params.scrollbar.el&&this.scrollbar.el&&this.scrollbar.$dragEl.transition(e)},updateSize:function(){var e=this;if(e.params.scrollbar.el&&e.scrollbar.el){var t=e.scrollbar,a=t.$dragEl,i=t.$el;a[0].style.width="",a[0].style.height="";var s,r=e.isHorizontal()?i[0].offsetWidth:i[0].offsetHeight,n=e.size/e.virtualSize,o=n*(r/e.size);s="auto"===e.params.scrollbar.dragSize?r*n:parseInt(e.params.scrollbar.dragSize,10),e.isHorizontal()?a[0].style.width=s+"px":a[0].style.height=s+"px",i[0].style.display=1<=n?"none":"",e.params.scrollbar.hide&&(i[0].style.opacity=0),te.extend(t,{trackSize:r,divider:n,moveDivider:o,dragSize:s}),t.$el[e.params.watchOverflow&&e.isLocked?"addClass":"removeClass"](e.params.scrollbar.lockClass)}},getPointerPosition:function(e){return this.isHorizontal()?"touchstart"===e.type||"touchmove"===e.type?e.targetTouches[0].pageX:e.pageX||e.clientX:"touchstart"===e.type||"touchmove"===e.type?e.targetTouches[0].pageY:e.pageY||e.clientY},setDragPosition:function(e){var t,a=this,i=a.scrollbar,s=a.rtlTranslate,r=i.$el,n=i.dragSize,o=i.trackSize,l=i.dragStartPos;t=(i.getPointerPosition(e)-r.offset()[a.isHorizontal()?"left":"top"]-(null!==l?l:n/2))/(o-n),t=Math.max(Math.min(t,1),0),s&&(t=1-t);var d=a.minTranslate()+(a.maxTranslate()-a.minTranslate())*t;a.updateProgress(d),a.setTranslate(d),a.updateActiveIndex(),a.updateSlidesClasses()}
vendor: 9,991 bytes, line 910
910,onDragStart:function(e){var t=this,a=t.params.scrollbar,i=t.scrollbar,s=t.$wrapperEl,r=i.$el,n=i.$dragEl;t.scrollbar.isTouched=!0,t.scrollbar.dragStartPos=e.target===n[0]||e.target===n?i.getPointerPosition(e)-e.target.getBoundingClientRect()[t.isHorizontal()?"left":"top"]:null,e.preventDefault(),e.stopPropagation(),s.transition(100),n.transition(100),i.setDragPosition(e),clearTimeout(t.scrollbar.dragTimeout),r.transition(0),a.hide&&r.css("opacity",1),t.emit("scrollbarDragStart",e)},onDragMove:function(e){var t=this.scrollbar,a=this.$wrapperEl,i=t.$el,s=t.$dragEl;this.scrollbar.isTouched&&(e.preventDefault?e.preventDefault():e.returnValue=!1,t.setDragPosition(e),a.transition(0),i.transition(0),s.transition(0),this.emit("scrollbarDragMove",e))},onDragEnd:function(e){var t=this,a=t.params.scrollbar,i=t.scrollbar.$el;t.scrollbar.isTouched&&(t.scrollbar.isTouched=!1,a.hide&&(clearTimeout(t.scrollbar.dragTimeout),t.scrollbar.dragTimeout=te.nextTick(function(){i.css("opacity",0),i.transition(400)},1e3)),t.emit("scrollbarDragEnd",e),a.snapOnRelease&&t.slideToClosest())},enableDraggable:function(){var e=this;if(e.params.scrollbar.el){var t=e.scrollbar,a=e.touchEventsTouch,i=e.touchEventsDesktop,s=e.params,r=t.$el[0],n=!(!ae.passiveListener||!s.passiveListeners)&&{passive:!1,capture:!1},o=!(!ae.passiveListener||!s.passiveListeners)&&{passive:!0,capture:!1};ae.touch?(r.addEventListener(a.start,e.scrollbar.onDragStart,n),r.addEventListener(a.move,e.scrollbar.onDragMove,n),r.addEventListener(a.end,e.scrollbar.onDragEnd,o)):(r.addEventListener(i.start,e.scrollbar.onDragStart,n),f.addEventListener(i.move,e.scrollbar.onDragMove,n),f.addEventListener(i.end,e.scrollbar.onDragEnd,o))}},disableDraggable:function(){var e=this;if(e.params.scrollbar.el){var t=e.scrollbar,a=e.touchEventsTouch,i=e.touchEventsDesktop,s=e.params,r=t.$el[0],n=!(!ae.passiveListener||!s.passiveListeners)&&{passive:!1,capture:!1},o=!(!ae.passiveListener||!s.passiveListeners)&&{passive:!0,capture:!1};ae.touch?(r.removeEventListener(a.start,e.scrollbar.onDragStart,n),r.removeEventListener(a.move,e.scrollbar.onDragMove,n),r.removeEventListener(a.end,e.scrollbar.onDragEnd,o)):(r.removeEventListener(i.start,e.scrollbar.onDragStart,n),f.removeEventListener(i.move,e.scrollbar.onDragMove,n),f.removeEventListener(i.end,e.scrollbar.onDragEnd,o))}},init:function(){var e=this;if(e.params.scrollbar.el){var t=e.scrollbar,a=e.$el,i=e.params.scrollbar,s=I(i.el);e.params.uniqueNavElements&&"string"==typeof i.el&&1<s.length&&1===a.find(i.el).length&&(s=a.find(i.el));var r=s.find("."+e.params.scrollbar.dragClass);0===r.length&&(r=I('<div class="'+e.params.scrollbar.dragClass+'"></div>'),s.append(r)),te.extend(t,{$el:s,el:s[0],$dragEl:r,dragEl:r[0]}),i.draggable&&t.enableDraggable()}},destroy:function(){this.scrollbar.disableDraggable()}},N={setTransform:function(e,t){var a=this.rtl,i=I(e),s=a?-1:1,r=i.attr("data-swiper-parallax")||"0",n=i.attr("data-swiper-parallax-x"),o=i.attr("data-swiper-parallax-y"),l=i.attr("data-swiper-parallax-scale"),d=i.attr("data-swiper-parallax-opacity");if(n||o?(n=n||"0",o=o||"0"):this.isHorizontal()?(n=r,o="0"):(o=r,n="0"),n=0<=n.indexOf("%")?parseInt(n,10)*t*s+"%":n*t*s+"px",o=0<=o.indexOf("%")?parseInt(o,10)*t+"%":o*t+"px",null!=d){var p=d-(d-1)*(1-Math.abs(t));i[0].style.opacity=p}if(null==l)i.transform("translate3d("+n+", "+o+", 0px)");else{var c=l-(l-1)*(1-Math.abs(t));i.transform("translate3d("+n+", "+o+", 0px) scale("+c+")")}},setTranslate:function(){var i=this,e=i.$el,t=i.slides,s=i.progress,r=i.snapGrid;e.children("[data-swiper-parallax], [data-swiper-parallax-x], [data-swiper-parallax-y], [data-swiper-parallax-opacity], [data-swiper-parallax-scale]").each(function(e,t){i.parallax.setTransform(t,s)}),t.each(function(e,t){var a=t.progress;1<i.params.slidesPerGroup&&"auto"!==i.params.slidesPerView&&(a+=Math.ceil(e/2)-s*(r.length-1)),a=Math.min(Math.max(a,-1),1),I(t).find("[data-swiper-parallax], [data-swiper-parallax-x], [data-swiper-parallax-y], [data-swiper-parallax-opacity], [data-swiper-parallax-scale]").each(function(e,t){i.parallax.setTransform(t,a)})})},setTransition:function(s){void 0===s&&(s=this.params.speed);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,t){var a=I(t),i=parseInt(a.attr("data-swiper-parallax-duration"),10)||s;0===s&&(i=0),a.transition(i)})}},B={getDistanceBetweenTouches:function(e){if(e.targetTouches.length<2)return 1;var t=e.targetTouches[0].pageX,a=e.targetTouches[0].pageY,i=e.targetTouches[1].pageX,s=e.targetTouches[1].pageY;return Math.sqrt(Math.pow(i-t,2)+Math.pow(s-a,2))},onGestureStart:function(e){var t=this,a=t.params.zoom,i=t.zoom,s=i.gesture;if(i.fakeGestureTouched=!1,i.fakeGestureMoved=!1,!ae.gestures){if("touchstart"!==e.type||"touchstart"===e.type&&e.targetTouches.length<2)return;i.fakeGestureTouched=!0,s.scaleStart=B.getDistanceBetweenTouches(e)}s.$slideEl&&s.$slideEl.length||(s.$slideEl=I(e.target).closest(".swiper-slide"),0===s.$slideEl.length&&(s.$slideEl=t.slides.eq(t.activeIndex)),s.$imageEl=s.$slideEl.find("img, svg, canvas"),s.$imageWrapEl=s.$imageEl.parent("."+a.containerClass),s.maxRatio=s.$imageWrapEl.attr("data-swiper-zoom")||a.maxRatio,0!==s.$imageWrapEl.length)?(s.$imageEl.transition(0),t.zoom.isScaling=!0):s.$imageEl=void 0},onGestureChange:function(e){var t=this.params.zoom,a=this.zoom,i=a.gesture;if(!ae.gestures){if("touchmove"!==e.type||"touchmove"===e.type&&e.targetTouches.length<2)return;a.fakeGestureMoved=!0,i.scaleMove=B.getDistanceBetweenTouches(e)}i.$imageEl&&0!==i.$imageEl.length&&(a.scale=ae.gestures?e.scale*a.currentScale:i.scaleMove/i.scaleStart*a.currentScale,a.scale>i.maxRatio&&(a.scale=i.maxRatio-1+Math.pow(a.scale-i.maxRatio+1,.5)),a.scale<t.minRatio&&(a.scale=t.minRatio+1-Math.pow(t.minRatio-a.scale+1,.5)),i.$imageEl.transform("translate3d(0,0,0) scale("+a.scale+")"))},onGestureEnd:function(e){var t=this.params.zoom,a=this.zoom,i=a.gesture;if(!ae.gestures){if(!a.fakeGestureTouched||!a.fakeGestureMoved)return;if("touchend"!==e.type||"touchend"===e.type&&e.changedTouches.length<2&&!g.android)return;a.fakeGestureTouched=!1,a.fakeGestureMoved=!1}i.$imageEl&&0!==i.$imageEl.length&&(a.scale=Math.max(Math.min(a.scale,i.maxRatio),t.minRatio),i.$imageEl.transition(this.params.speed).transform("translate3d(0,0,0) scale("+a.scale+")"),a.currentScale=a.scale,a.isScaling=!1,1===a.scale&&(i.$slideEl=void 0))},onTouchStart:function(e){var t=this.zoom,a=t.gesture,i=t.image;a.$imageEl&&0!==a.$imageEl.length&&(i.isTouched||(g.android&&e.preventDefault(),i.isTouched=!0,i.touchesStart.x="touchstart"===e.type?e.targetTouches[0].pageX:e.pageX,i.touchesStart.y="touchstart"===e.type?e.targetTouches[0].pageY:e.pageY))},onTouchMove:function(e){var t=this,a=t.zoom,i=a.gesture,s=a.image,r=a.velocity;if(i.$imageEl&&0!==i.$imageEl.length&&(t.allowClick=!1,s.isTouched&&i.$slideEl)){s.isMoved||(s.width=i.$imageEl[0].offsetWidth,s.height=i.$imageEl[0].offsetHeight,s.startX=te.getTranslate(i.$imageWrapEl[0],"x")||0,s.startY=te.getTranslate(i.$imageWrapEl[0],"y")||0,i.slideWidth=i.$slideEl[0].offsetWidth,i.slideHeight=i.$slideEl[0].offsetHeight,i.$imageWrapEl.transition(0),t.rtl&&(s.startX=-s.startX,s.startY=-s.startY));var n=s.width*a.scale,o=s.height*a.scale;if(!(n<i.slideWidth&&o<i.slideHeight)){if(s.minX=Math.min(i.slideWidth/2-n/2,0),s.maxX=-s.minX,s.minY=Math.min(i.slideHeight/2-o/2,0),s.maxY=-s.minY,s.touchesCurrent.x="touchmove"===e.type?e.targetTouches[0].pageX:e.pageX,s.touchesCurrent.y="touchmove"===e.type?e.targetTouches[0].pageY:e.pageY,!s.isMoved&&!a.isScaling){if(t.isHorizontal()&&(Math.floor(s.minX)===Math.floor(s.startX)&&s.touchesCurrent.x<s.touchesStart.x||Math.floor(s.maxX)===Math.floor(s.startX)&&s.touchesCurrent.x>s.touchesStart.x))return void(s.isTouched=!1);if(!t.isHorizontal()&&(Math.floor(s.minY)===Math.floor(s.startY)&&s.touchesCurrent.y<s.touchesStart.y||Math.floor(s.maxY)===Math.floor(s.startY)&&s.touchesCurrent.y>s.touchesStart.y))return void(s.isTouched=!1)}e.preventDefault(),e.stopPropagation(),s.isMoved=!0,s.currentX=s.touchesCurrent.x-s.touchesStart.x+s.startX,s.currentY=s.touchesCurrent.y-s.touchesStart.y+s.startY,s.currentX<s.minX&&(s.currentX=s.minX+1-Math.pow(s.minX-s.currentX+1,.8)),s.currentX>s.maxX&&(s.currentX=s.maxX-1+Math.pow(s.currentX-s.maxX+1,.8)),s.currentY<s.minY&&(s.currentY=s.minY+1-Math.pow(s.minY-s.currentY+1,.8)),s.currentY>s.maxY&&(s.currentY=s.maxY-1+Math.pow(s.currentY-s.maxY+1,.8)),r.prevPositionX||(r.prevPositionX=s.touchesCurrent.x),r.prevPositionY||(r.prevPositionY=s.touchesCurrent.y),r.prevTime||(r.prevTime=Date.now()),r.x=(s.touchesCurrent.x-r.prevPositionX)/(Date.now()-r.prevTime)/2,r.y=(s.touchesCurrent.y-r.prevPositionY)/(Date.now()-r.prevTime)/2,Math.abs(s.touchesCurrent.x-r.prevPositionX)<2&&(r.x=0),Math.abs(s.touchesCurrent.y-r.prevPositionY)<2&&(r.y=0),r.prevPositionX=s.touchesCurrent.x,r.prevPositionY=s.touchesCurrent.y,r.prevTime=Date.now(),i.$imageWrapEl.transform("translate3d("+s.currentX+"px, "+s.currentY+"px,0)")}}},onTouchEnd:function(){var e=this.zoom,t=e.gesture,a=e.image,i=e.velocity;if(t.$imageEl&&0!==t.$imageEl.length){if(!a.isTouched||!a.isMoved)return a.isTouched=!1,void(a.isMoved=!1);a.isTouched=!1,a.isMoved=!1;var s=300,r=300,n=i.x*s,o=a.currentX+n,l=i.y*r,d=a.currentY+l;0!==i.x&&(s=Math.abs((o-a.currentX)/i.x)),0!==i.y&&(r=Math.abs((d-a.currentY)/i.y));var p=Math.max(s,r);a.currentX=o,a.currentY=d;var c=a.width*e.scale,u=a.height*e.scale;a.minX=Math.min(t.slideWidth/2-c/2,0),a.maxX=-a.minX,a.minY=Math.min(t.slideHeight/2-u/2,0),a.maxY=-a.minY,a.currentX=Math.max(Math.min(a.currentX,a.maxX),a.minX),a.currentY=Math.max(Math.min(a.currentY,a.maxY),a.minY),t.$imageWrapEl.transition(p).transform("translate3d("+a.currentX+"px, "+a.currentY+"px,0)")}},onTransitionEnd:function(){var e=this.zoom,t=e.gesture;t.$slideEl&&this.previousIndex!==this.activeIndex&&(t.$imageEl.transform("translate3d(0,
9100,0) scale(1)"),t.$imageWrapEl.transform("translate3d(0,0,0)"),e.scale=1,e.currentScale=1,t.$slideEl=void 0,t.$imageEl=void 0,t.$imageWrapEl=void 0)},toggle:function(e){var t=this.zoom;t.scale&&1!==t.scale?t.out():t.in(e)},in:function(e){var t,a,i,s,r,n,o,l,d,p,c,u,h,v,f,m,g=this,b=g.zoom,w=g.params.zoom,y=b.gesture,x=b.image;y.$slideEl||(y.$slideEl=g.clickedSlide?I(g.clickedSlide):g.slides.eq(g.activeIndex),y.$imageEl=y.$slideEl.find("img, svg, canvas"),y.$imageWrapEl=y.$imageEl.parent("."+w.containerClass)),y.$imageEl&&0!==y.$imageEl.length&&(y.$slideEl.addClass(""+w.zoomedSlideClass),a=void 0===x.touchesStart.x&&e?(t="touchend"===e.type?e.changedTouches[0].pageX:e.pageX,"touchend"===e.type?e.changedTouches[0].pageY:e.pageY):(t=x.touchesStart.x,x.touchesStart.y),b.scale=y.$imageWrapEl.attr("data-swiper-zoom")||w.maxRatio,b.currentScale=y.$imageWrapEl.attr("data-swiper-zoom")||w.maxRatio,e?(f=y.$slideEl[0].offsetWidth,m=y.$slideEl[0].offsetHeight,i=y.$slideEl.offset().left+f/2-t,s=y.$slideEl.offset().top+m/2-a,o=y.$imageEl[0].offsetWidth,l=y.$imageEl[0].offsetHeight,d=o*b.scale,p=l*b.scale,h=-(c=Math.min(f/2-d/2,0)),v=-(u=Math.min(m/2-p/2,0)),(r=i*b.scale)<c&&(r=c),h<r&&(r=h),(n=s*b.scale)<u&&(n=u),v<n&&(n=v)):n=r=0,y.$imageWrapEl.transition(300).transform("translate3d("+r+"px, "+n+"px,0)"),y.$imageEl.transition(300).transform("translate3d(0,0,0) scale("+b.scale+")"))},out:function(){var e=this,t=e.zoom,a=e.params.zoom,i=t.gesture;i.$slideEl||(i.$slideEl=e.clickedSlide?I(e.clickedSlide):e.slides.eq(e.activeIndex),i.$imageEl=i.$slideEl.find("img, svg, canvas"),i.$imageWrapEl=i.$imageEl.parent("."+a.containerClass)),i.$imageEl&&0!==i.$imageEl.length&&(t.scale=1,t.currentScale=1,i.$imageWrapEl.transition(300).transform("translate3d(0,0,0)"),i.$imageEl.transition(300).transform("translate3d(0,0,0) scale(1)"),i.$slideEl.removeClass(""+a.zoomedSlideClass),i.$slideEl=void 0)},enable:function(){var e=this,t=e.zoom;if(!t.enabled){t.enabled=!0;var a=!("touchstart"!==e.touchEvents.start||!ae.passiveListener||!e.params.passiveListeners)&&{passive:!0,capture:!1};ae.gestures?(e.$wrapperEl.on("gesturestart",".swiper-slide",t.onGestureStart,a),e.$wrapperEl.on("gesturechange",".swiper-slide",t.onGestureChange,a),e.$wrapperEl.on("gestureend",".swiper-slide",t.onGestureEnd,a)):"touchstart"===e.touchEvents.start&&(e.$wrapperEl.on(e.touchEvents.start,".swiper-slide",t.onGestureStart,a),e.$wrapperEl.on(e.touchEvents.move,".swiper-slide",t.onGestureChange,a),e.$wrapperEl.on(e.touchEvents.end,".swiper-slide",t.onGestureEnd,a)),e.$wrapperEl.on(e.touchEvents.move,"."+e.params.zoom.containerClass,t.onTouchMove)}},disable:function(){var e=this,t=e.zoom;if(t.enabled){e.zoom.enabled=!1;var a=!("touchstart"!==e.touchEvents.start||!ae.passiveListener||!e.params.passiveListeners)&&{passive:!0,capture:!1};ae.gestures?(e.$wrapperEl.off("gesturestart",".swiper-slide",t.onGestureStart,a),e.$wrapperEl.off("gesturechange",".swiper-slide",t.onGestureChange,a),e.$wrapperEl.off("gestureend",".swiper-slide",t.onGestureEnd,a)):"touchstart"===e.touchEvents.start&&(e.$wrapperEl.off(e.touchEvents.start,".swiper-slide",t.onGestureStart,a),e.$wrapperEl.off(e.touchEvents.move,".swiper-slide",t.onGestureChange,a),e.$wrapperEl.off(e.touchEvents.end,".swiper-slide",t.onGestureEnd,a)),e.$wrapperEl.off(e.touchEvents.move,"."+e.params.zoom.containerClass,t.onTouchMove)}}},X={loadInSlide:function(e,l){void 0===l&&(l=!0);var d=this,p=d.params.lazy;if(void 0!==e&&0!==d.slides.length){var c=d.virtual&&d.params.virtual.enabled?d.$wrapperEl.children("."+d.params.slideClass+'[data-swiper-slide-index="'+e+'"]'):d.slides.eq(e),t=c.find("."+p.elementClass+":not(."+p.loadedClass+"):not(."+p.loadingClass+")");!c.hasClass(p.elementClass)||c.hasClass(p.loadedClass)||c.hasClass(p.loadingClass)||(t=t.add(c[0])),0!==t.length&&t.each(function(e,t){var i=I(t);i.addClass(p.loadingClass);var s=i.attr("data-background"),r=i.attr("data-src"),n=i.attr("data-srcset"),o=i.attr("data-sizes");d.loadImage(i[0],r||s,n,o,!1,function(){if(null!=d&&d&&(!d||d.params)&&!d.destroyed){if(s?(i.css("background-image",'url("'+s+'")'),i.removeAttr("data-background")):(n&&(i.attr("srcset",n
vendor: 5,170 bytes, line 910
910),i.removeAttr("data-srcset")),o&&(i.attr("sizes",o),i.removeAttr("data-sizes")),r&&(i.attr("src",r),i.removeAttr("data-src"))),i.addClass(p.loadedClass).removeClass(p.loadingClass),c.find("."+p.preloaderClass).remove(),d.params.loop&&l){var e=c.attr("data-swiper-slide-index");if(c.hasClass(d.params.slideDuplicateClass)){var t=d.$wrapperEl.children('[data-swiper-slide-index="'+e+'"]:not(.'+d.params.slideDuplicateClass+")");d.lazy.loadInSlide(t.index(),!1)}else{var a=d.$wrapperEl.children("."+d.params.slideDuplicateClass+'[data-swiper-slide-index="'+e+'"]');d.lazy.loadInSlide(a.index(),!1)}}d.emit("lazyImageReady",c[0],i[0])}}),d.emit("lazyImageLoad",c[0],i[0])})}},load:function(){var i=this,t=i.$wrapperEl,a=i.params,s=i.slides,e=i.activeIndex,r=i.virtual&&a.virtual.enabled,n=a.lazy,o=a.slidesPerView;function l(e){if(r){if(t.children("."+a.slideClass+'[data-swiper-slide-index="'+e+'"]').length)return!0}else if(s[e])return!0;return!1}function d(e){return r?I(e).attr("data-swiper-slide-index"):I(e).index()}if("auto"===o&&(o=0),i.lazy.initialImageLoaded||(i.lazy.initialImageLoaded=!0),i.params.watchSlidesVisibility)t.children("."+a.slideVisibleClass).each(function(e,t){var a=r?I(t).attr("data-swiper-slide-index"):I(t).index();i.lazy.loadInSlide(a)});else if(1<o)for(var p=e;p<e+o;p+=1)l(p)&&i.lazy.loadInSlide(p);else i.lazy.loadInSlide(e);if(n.loadPrevNext)if(1<o||n.loadPrevNextAmount&&1<n.loadPrevNextAmount){for(var c=n.loadPrevNextAmount,u=o,h=Math.min(e+u+Math.max(c,u),s.length),v=Math.max(e-Math.max(u,c),0),f=e+o;f<h;f+=1)l(f)&&i.lazy.loadInSlide(f);for(var m=v;m<e;m+=1)l(m)&&i.lazy.loadInSlide(m)}else{var g=t.children("."+a.slideNextClass);0<g.length&&i.lazy.loadInSlide(d(g));var b=t.children("."+a.slidePrevClass);0<b.length&&i.lazy.loadInSlide(d(b))}}},V={LinearSpline:function(e,t){var a,i,s,r,n,o=function(e,t){for(i=-1,a=e.length;1<a-i;)e[s=a+i>>1]<=t?i=s:a=s;return a};return this.x=e,this.y=t,this.lastIndex=e.length-1,this.interpolate=function(e){return e?(n=o(this.x,e),r=n-1,(e-this.x[r])*(this.y[n]-this.y[r])/(this.x[n]-this.x[r])+this.y[r]):0},this},getInterpolateFunction:function(e){var t=this;t.controller.spline||(t.controller.spline=t.params.loop?new V.LinearSpline(t.slidesGrid,e.slidesGrid):new V.LinearSpline(t.snapGrid,e.snapGrid))},setTranslate:function(e,t){var a,i,s=this,r=s.controller.control;function n(e){var t=s.rtlTranslate?-s.translate:s.translate;"slide"===s.params.controller.by&&(s.controller.getInterpolateFunction(e),i=-s.controller.spline.interpolate(-t)),i&&"container"!==s.params.controller.by||(a=(e.maxTranslate()-e.minTranslate())/(s.maxTranslate()-s.minTranslate()),i=(t-s.minTranslate())*a+e.minTranslate()),s.params.controller.inverse&&(i=e.maxTranslate()-i),e.updateProgress(i),e.setTranslate(i,s),e.updateActiveIndex(),e.updateSlidesClasses()}if(Array.isArray(r))for(var o=0;o<r.length;o+=1)r[o]!==t&&r[o]instanceof T&&n(r[o]);else r instanceof T&&t!==r&&n(r)},setTransition:function(t,e){var a,i=this,s=i.controller.control;function r(e){e.setTransition(t,i),0!==t&&(e.transitionStart(),e.params.autoHeight&&te.nextTick(function(){e.updateAutoHeight()}),e.$wrapperEl.transitionEnd(function(){s&&(e.params.loop&&"slide"===i.params.controller.by&&e.loopFix(),e.transitionEnd())}))}if(Array.isArray(s))for(a=0;a<s.length;a+=1)s[a]!==e&&s[a]instanceof T&&r(s[a]);else s instanceof T&&e!==s&&r(s)}},Y={makeElFocusable:function(e){return e.attr("tabIndex","0"),e},addElRole:function(e,t){return e.attr("role",t),e},addElLabel:function(e,t){return e.attr("aria-label",t),e},disableEl:function(e){return e.attr("aria-disabled",!0),e},enableEl:function(e){return e.attr("aria-disabled",!1),e},onEnterKey:function(e){var t=this,a=t.params.a11y;if(13===e.keyCode){var i=I(e.target);t.navigation&&t.navigation.$nextEl&&i.is(t.navigation.$nextEl)&&(t.isEnd&&!t.params.loop||t.slideNext(),t.isEnd?t.a11y.notify(a.lastSlideMessage):t.a11y.notify(a.nextSlideMessage)),t.navigation&&t.navigation.$prevEl&&i.is(t.navigation.$prevEl)&&(t.isBeginning&&!t.params.loop||t.slidePrev(),t.isBeginning?t.a11y.notify(a.firstSlideMessage):t.a11y.notify(a.prevSlideMessage)),t.pagination&&i.is("."+t.params.pagination.bulletClass)&&i[0].click()}},notify:function(e){var t=this.a11y.liveRegion;0!==t.length&&(t.html(""),t.html(e))},updateNavigation:function(){var e=this;if(!e.params.loop){var t=e.navigation,a=t.$nextEl,i=t.$prevEl;i&&0<i.length&&(e.isBeginning?e.a11y.disableEl(i):e.a11y.enableEl(i)),a&&0<a.length&&(e.isEnd?e.a11y.disableEl(a):e.a11y.enableEl(a))}},updatePagination:function(){var i=this,s=i.params.a11y;i.pagination&&i.params.pagination.clickable&&i.pagination.bullets&&i.pagination.bullets.length&&i.pagination.bullets.each(function(e,t){var a=I(t);i.a11y.makeElFocusable(a),i.a11y.addElRole(a,"button"),i.a11y.addElLabel(a,s.paginationBulletMessage.replace(/{{index}}/,a.index()+1))})},init:function(){var e=this;e.$el.append(e.a11y.liveRegion);var t,a,i=e.params.a11y;e.navigation&&e.navigation.$nextEl&&(t=e.navigation.$nextEl),e.navigation&&e.navigation.$prevEl&&(a=e.navigation.$prevEl),t&&(e.a11y.makeElFocusable(t),e.a11y.addElRole(t,"button"),e.a11y.addElLabel(t,i.nextSlideMessage),t.on("key
910down",e.a11y.onEnterKey)),a&&(e.a11y.makeElFocusable(a),e.a11y.addElRole(a,"button"),e.a11y.addElLabel(a,i.prevSlideMessage),a.on("keydown",e.a11y.onEnterKey)),e.pagination&&e.params.pagination.clickable&&e.pagination.bullets&&e.pagination.bullets.length&&e.pagination.$el.on("keydown","."+e.params.pagination.bulletClass,e.a11y.onEnterKey)},destroy:function(){var e,t,a=this;a.a11y.liveRegion&&0<a.a11y.liveRegion.length&&a.a11y.liveRegion.remove(),a.navigation&&a.navigation.$nextEl&&(e=a.navigation.$nextEl),a.navigation&&a.navigation.$prevEl&&(t=a.navigation.$prevEl),e&&e.off("keydown",a.a11y.onEnterKey),t&&t.off("keydown",a.a11y.onEnterKey),a.pagination&&a.params.pagination.clickable&&a.pagination.bullets&&a.pagination.bullets.length&&a.pagination.$el.off("keydown","."+a.params.pagination.bulletClass,a.a11y.onEnterKey)}},F={init:function(){var e=this;if(e.params.history){if(!ee.history||!ee.history.pushState)return e.params.history.enabled=!1,void(e.params.hashNavigation.enabled=!0);var t=e.history;t.initialized=!0,t.paths=F.getPathValues(),(t.paths.key||t.paths.value)&&(t.scrollToSlide(0,t.paths.value,e.params.runCallbacksOnInit),e.params.history.replaceState||ee.addEventListener("popstate",e.history.setHistoryPopState))}},destroy:function(){this.params.history.replaceState||ee.removeEventListener("popstate",this.history.setHistoryPopState)},setHistoryPopState:function(){this.history.paths=F.getPathValues(),this.history.scrollToSlide(this.params.speed,this.history.paths.value,!1)},getPathValues:function(){var e=ee.location.pathname.slice(1).split("/").filter(function(e){return""!==e}),t=e.length;return{key:e[t-2],value:e[t-1]}},setHistory:function(e,t){if(this.history.initialized&&this.params.history.enabled){var a=this.slides.eq(t),i=F.slugify(a.attr("data-history"));ee.location.pathname.includes(e)||(i=e+"/"+i);var s=ee.history.state;s&&s.value===i||(this.params.history.replaceState?ee.history.replaceState({value:i},null,i):ee.history.pushState({value:i},null,i))}},slugify:function(e){return e.toString().replace(/\s+/g,"-").replace(/[^\w-]+/g,"").replace(/--+/g,"-").replace(/^-+/,"").replace(/-+$/,"")},scrollToSlide:function(e,t,a){var i=this;if(t)for(var s=0,r=i.slides.length;s<r;s+=1){var n=i.slides.eq(s);if(F.slugify(n.attr("data-history"))===t&&!n.hasClass(i.params.slideDuplicateClass)){var o=n.index();i.slideTo(o,e,a)}}else i.slideTo(0,e,a)}},R={onHashCange:function(){var e=this,t=f.location.hash.replace("#","");if(t!==e.slides.eq(e.activeIndex).attr("data-hash")){var a=e.$wrapperEl.children("."+e.params.slideClass+'[data-hash="'+t+'"]').index();if(void 0===a)return;e.slideTo(a)}},setHash:function(){var e=this;if(e.hashNavigation.initialized&&e.params.hashNavigation.enabled)if(e.params.hashNavigation.replaceState&&ee.history&&ee.history.replaceState)ee.history.replaceState(null,null,"#"+e.slides.eq(e.activeIndex).attr("data-hash")||"");else{var t=e.slides.eq(e.activeIndex),a=t.attr("data-hash")||t.attr("data-history");f.location.hash=a||""}},init:function(){var e=this;if(!(!e.params.hashNavigation.enabled||e.params.history&&e.params.history.enabled)){e.hashNavigation.initialized=!0;var t=f.location.hash.replace("#","");if(t)for(var a=0,i=e.slides.length;a<i;a+=1){var s=e.slides.eq(a);if((s.attr("data-hash")||s.attr("data-history"))===t&&!s.hasClass(e.params.slideDuplicateClass)){var r=s.index();e.slideTo(r,0,e.params.runCallbacksOnInit,!0)}}e.params.hashNavigation.watchState&&I(ee).on("hashchange",e.hashNavigation.onHashCange)}},destroy:function(){this.params.hashNavigation.watchState&&I(ee).off("hashchange",this.hashNavigation.onHashCange)}},q={run:function(){var e=this,t=e.slides.eq(e.activeIndex),a=e.params.autoplay.delay;t.attr("data-swiper-autoplay")&&(a=t.attr("data-swiper-autoplay")||e.params.autoplay.delay),clearTimeout(e.autoplay.timeout),e.autoplay.timeout=te.nextTick(function(){e.params.autoplay.reverseDirection?e.params.loop?(e.loopFix(),e.slidePrev(e.params.speed,!0,!0),e.emit("autoplay")):e.isBeginning?e.params.autoplay.stopOnLastSlide?e.autoplay.stop():(e.slideTo(e.slides.length-1,e.params.speed,!0,
vendor: 24,839 bytes, lines 910-911
910!0),e.emit("autoplay")):(e.slidePrev(e.params.speed,!0,!0),e.emit("autoplay")):e.params.loop?(e.loopFix(),e.slideNext(e.params.speed,!0,!0),e.emit("autoplay")):e.isEnd?e.params.autoplay.stopOnLastSlide?e.autoplay.stop():(e.slideTo(0,e.params.speed,!0,!0),e.emit("autoplay")):(e.slideNext(e.params.speed,!0,!0),e.emit("autoplay"))},a)},start:function(){var e=this;return void 0===e.autoplay.timeout&&(!e.autoplay.running&&(e.autoplay.running=!0,e.emit("autoplayStart"),e.autoplay.run(),!0))},stop:function(){var e=this;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))},pause:function(e){var t=this;t.autoplay.running&&(t.autoplay.paused||(t.autoplay.timeout&&clearTimeout(t.autoplay.timeout),t.autoplay.paused=!0,0!==e&&t.params.autoplay.waitForTransition?(t.$wrapperEl[0].addEventListener("transitionend",t.autoplay.onTransitionEnd),t.$wrapperEl[0].addEventListener("webkitTransitionEnd",t.autoplay.onTransitionEnd)):(t.autoplay.paused=!1,t.autoplay.run())))}},W={setTranslate:function(){for(var e=this,t=e.slides,a=0;a<t.length;a+=1){var i=e.slides.eq(a),s=-i[0].swiperSlideOffset;e.params.virtualTranslate||(s-=e.translate);var r=0;e.isHorizontal()||(r=s,s=0);var n=e.params.fadeEffect.crossFade?Math.max(1-Math.abs(i[0].progress),0):1+Math.min(Math.max(i[0].progress,-1),0);i.css({opacity:n}).transform("translate3d("+s+"px, "+r+"px, 0px)")}},setTransition:function(e){var a=this,t=a.slides,i=a.$wrapperEl;if(t.transition(e),a.params.virtualTranslate&&0!==e){var s=!1;t.transitionEnd(function(){if(!s&&a&&!a.destroyed){s=!0,a.animating=!1;for(var e=["webkitTransitionEnd","transitionend"],t=0;t<e.length;t+=1)i.trigger(e[t])}})}}},j={setTranslate:function(){var e,t=this,a=t.$el,i=t.$wrapperEl,s=t.slides,r=t.width,n=t.height,o=t.rtlTranslate,l=t.size,d=t.params.cubeEffect,p=t.isHorizontal(),c=t.virtual&&t.params.virtual.enabled,u=0;d.shadow&&(p?(0===(e=i.find(".swiper-cube-shadow")).length&&(e=I('<div class="swiper-cube-shadow"></div>'),i.append(e)),e.css({height:r+"px"})):0===(e=a.find(".swiper-cube-shadow")).length&&(e=I('<div class="swiper-cube-shadow"></div>'),a.append(e)));for(var h=0;h<s.length;h+=1){var v=s.eq(h),f=h;c&&(f=parseInt(v.attr("data-swiper-slide-index"),10));var m=90*f,g=Math.floor(m/360);o&&(m=-m,g=Math.floor(-m/360));var b=Math.max(Math.min(v[0].progress,1),-1),w=0,y=0,x=0;f%4==0?(w=4*-g*l,x=0):(f-1)%4==0?(w=0,x=4*-g*l):(f-2)%4==0?(w=l+4*g*l,x=l):(f-3)%4==0&&(w=-l,x=3*l+4*l*g),o&&(w=-w),p||(y=w,w=0);var T="rotateX("+(p?0:-m)+"deg) rotateY("+(p?m:0)+"deg) translate3d("+w+"px, "+y+"px, "+x+"px)";if(b<=1&&-1<b&&(u=90*f+90*b,o&&(u=90*-f-90*b)),v.transform(T),d.slideShadows){var E=p?v.find(".swiper-slide-shadow-left"):v.find(".swiper-slide-shadow-top"),S=p?v.find(".swiper-slide-shadow-right"):v.find(".swiper-slide-shadow-bottom");0===E.length&&(E=I('<div class="swiper-slide-shadow-'+(p?"left":"top")+'"></div>'),v.append(E)),0===S.length&&(S=I('<div class="swiper-slide-shadow-'+(p?"right":"bottom")+'"></div>'),v.append(S)),E.length&&(E[0].style.opacity=Math.max(-b,0)),S.length&&(S[0].style.opacity=Math.max(b,0))}}if(i.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"}),d.shadow)if(p)e.transform("translate3d(0px, "+(r/2+d.shadowOffset)+"px, "+-r/2+"px) rotateX(90deg) rotateZ(0deg) scale("+d.shadowScale+")");else{var C=Math.abs(u)-90*Math.floor(Math.abs(u)/90),M=1.5-(Math.sin(2*C*Math.PI/360)/2+Math.cos(2*C*Math.PI/360)/2),P=d.shadowScale,k=d.shadowScale/M,z=d.shadowOffset;e.transform("scale3d("+P+", 1, "+k+") translate3d(0px, "+(n/2+z)+"px, "+-n/2/k+"px) rotateX(-90deg)")}var $=ie.isSafari||ie.isUiWebView?-l/2:0;i.transform("translate3d(0px,0,"+$+"px) rotateX("+(t.isHorizontal()?0:u)+"deg) rotateY("+(t.isHorizontal()?-u:0)+"deg)")},setTransition:function(e){var t=this.$el;this.slides.transition(e).find(".swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left").transition(e),this.params.cubeEffect.shadow&&!this.isHorizontal()&&t.find(".swiper-cube-shadow").transition(e)}},U={setTranslate:function(){for(var e=this,t=e.slides,a=e.rtlTranslate,i=0;i<t.length;i+=1){var s=t.eq(i),r=s[0].progress;e.params.flipEffect.limitRotation&&(r=Math.max(Math.min(s[0].progress,1),-1));var n=-180*r,o=0,l=-s[0].swiperSlideOffset,d=0;if(e.isHorizontal()?a&&(n=-n):(d=l,o=-n,n=l=0),s[0].style.zIndex=-Math.abs(Math.round(r))+t.length,e.params.flipEffect.slideShadows){var p=e.isHorizontal()?s.find(".swiper-slide-shadow-left"):s.find(".swiper-slide-shadow-top"),c=e.isHorizontal()?s.find(".swiper-slide-shadow-right"):s.find(".swiper-slide-shadow-bottom");0===p.length&&(p=I('<div class="swiper-slide-shadow-'+(e.isHorizontal()?"left":"top")+'"></div>'),s.append(p)),0===c.length&&(c=I('<div class="swiper-slide-shadow-'+(e.isHorizontal()?"right":"bottom")+'"></div>'),s.append(c)),p.length&&(p[0].style.opacity=Math.max(-r,0)),c.length&&(c[0].style.opacity=Math.max(r,0))}s.transform("translate3d("+l+"px, "+d+"px, 0px) rotateX("+o+"deg) rotateY("+n+"deg)")}},setTransition:function(e){var a=this,t=a.slides,i=a.activeIndex,s=a.$wrapperEl;if(t.transition(e).find(".swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left").transition(e),a.params.virtualTranslate&&0!==e){var r=!1;t.eq(i).transitionEnd(function(){if(!r&&a&&!a.destroyed){r=!0,a.animating=!1;for(var e=["webkitTransitionEnd","transitionend"],t=0;t<e.length;t+=1)s.trigger(e[t])}})}}},K={setTranslate:function(){for(var e=this,t=e.width,a=e.height,i=e.slides,s=e.$wrapperEl,r=e.slidesSizesGrid,n=e.params.coverflowEffect,o=e.isHorizontal(),l=e.translate,d=o?t/2-l:a/2-l,p=o?n.rotate:-n.rotate,c=n.depth,u=0,h=i.length;u<h;u+=1){var v=i.eq(u),f=r[u],m=(d-v[0].swiperSlideOffset-f/2)/f*n.modifier,g=o?p*m:0,b=o?0:p*m,w=-c*Math.abs(m),y=o?0:n.stretch*m,x=o?n.stretch*m:0;Math.abs(x)<.001&&(x=0),Math.abs(y)<.001&&(y=0),Math.abs(w)<.001&&(w=0),Math.abs(g)<.001&&(g=0),Math.abs(b)<.001&&(b=0);var T="translate3d("+x+"px,"+y+"px,"+w+"px) rotateX("+b+"deg) rotateY("+g+"deg)";if(v.transform(T),v[0].style.zIndex=1-Math.abs(Math.round(m)),n.slideShadows){var E=o?v.find(".swiper-slide-shadow-left"):v.find(".swiper-slide-shadow-top"),S=o?v.find(".swiper-slide-shadow-right"):v.find(".swiper-slide-shadow-bottom");0===E.length&&(E=I('<div class="swiper-slide-shadow-'+(o?"left":"top")+'"></div>'),v.append(E)),0===S.length&&(S=I('<div class="swiper-slide-shadow-'+(o?"right":"bottom")+'"></div>'),v.append(S)),E.length&&(E[0].style.opacity=0<m?m:0),S.length&&(S[0].style.opacity=0<-m?-m:0)}}(ae.pointerEvents||ae.prefixedPointerEvents)&&(s[0].style.perspectiveOrigin=d+"px 50%")},setTransition:function(e){this.slides.transition(e).find(".swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left").transition(e)}},_={init:function(){var e=this,t=e.params.thumbs,a=e.constructor;t.swiper instanceof a?(e.thumbs.swiper=t.swiper,te.extend(e.thumbs.swiper.originalParams,{watchSlidesProgress:!0,slideToClickedSlide:!1}),te.extend(e.thumbs.swiper.params,{watchSlidesProgress:!0,slideToClickedSlide:!1})):te.isObject(t.swiper)&&(e.thumbs.swiper=new a(te.extend({},t.swiper,{watchSlidesVisibility:!0,watchSlidesProgress:!0,slideToClickedSlide:!1})),e.thumbs.swiperCreated=!0),e.thumbs.swiper.$el.addClass(e.params.thumbs.thumbsContainerClass),e.thumbs.swiper.on("tap",e.thumbs.onThumbClick)},onThumbClick:function(){var e=this,t=e.thumbs.swiper;if(t){var a=t.clickedIndex,i=t.clickedSlide;if(!(i&&I(i).hasClass(e.params.thumbs.slideThumbActiveClass)||null==a)){var s;if(s=t.params.loop?parseInt(I(t.clickedSlide).attr("data-swiper-slide-index"),10):a,e.params.loop){var r=e.activeIndex;e.slides.eq(r).hasClass(e.params.slideDuplicateClass)&&(e.loopFix(),e._clientLeft=e.$wrapperEl[0].clientLeft,r=e.activeIndex);var n=e.slides.eq(r).prevAll('[data-swiper-slide-index="'+s+'"]').eq(0).index(),o=e.slides.eq(r).nextAll('[data-swiper-slide-index="'+s+'"]').eq(0).index();s=void 0===n?o:void 0===o?n:o-r<r-n?o:n}e.slideTo(s)}}},update:function(e){var t=this,a=t.thumbs.swiper;if(a){var i="auto"===a.params.slidesPerView?a.slidesPerViewDynamic():a.params.slidesPerView;if(t.realIndex!==a.realIndex){var s,r=a.activeIndex;if(a.params.loop){a.slides.eq(r).hasClass(a.params.slideDuplicateClass)&&(a.loopFix(),a._clientLeft=a.$wrapperEl[0].clientLeft,r=a.activeIndex);var n=a.slides.eq(r).prevAll('[data-swiper-slide-index="'+t.realIndex+'"]').eq(0).index(),o=a.slides.eq(r).nextAll('[data-swiper-slide-index="'+t.realIndex+'"]').eq(0).index();s=void 0===n?o:void 0===o?n:o-r==r-n?r:o-r<r-n?o:n}else s=t.realIndex;a.visibleSlidesIndexes&&a.visibleSlidesIndexes.indexOf(s)<0&&(a.params.centeredSlides?s=r<s?s-Math.floor(i/2)+1:s+Math.floor(i/2)-1:r<s&&(s=s-i+1),a.slideTo(s,e?0:void 0))}var l=1,d=t.params.thumbs.slideThumbActiveClass;if(1<t.params.slidesPerView&&!t.params.centeredSlides&&(l=t.params.slidesPerView),a.slides.removeClass(d),a.params.loop||a.params.virtual)for(var p=0;p<l;p+=1)a.$wrapperEl.children('[data-swiper-slide-index="'+(t.realIndex+p)+'"]').addClass(d);else for(var c=0;c<l;c+=1)a.slides.eq(t.realIndex+c).addClass(d)}}},Z=[E,S,C,M,k,$,D,{name:"mousewheel",params:{mousewheel:{enabled:!1,releaseOnEdges:!1,invert:!1,forceToAxis:!1,sensitivity:1,eventsTarged:"container"}},create:function(){var e=this;te.extend(e,{mousewheel:{enabled:!1,enable:O.enable.bind(e),disable:O.disable.bind(e),handle:O.handle.bind(e),handleMouseEnter:O.handleMouseEnter.bind(e),handleMouseLeave:O.handleMouseLeave.bind(e),lastScrollTime:te.now()}})},on:{init:function(){this.params.mousewheel.enabled&&this.mousewheel.enable()},destroy:function(){this.mousewheel.enabled&&this.mousewheel.disable()}}},{name:"navigation",params:{navigation:{nextEl:null,prevEl:null,hideOnClick:!1,disabledClass:"swiper-button-disabled",hiddenClass:"swiper-button-hidden",lockClass:"swiper-button-lock"}},create:function(){var e=this;te.extend(e,{navigation:{init:A.init.bind(e),update:A.update.bind(e),destroy:A.destroy.bind(e),onNextClick:A.onNextClick.bind(e),onPrevClick:A.onPrevClick.bind(e)}})},on:{init:function(){this.navigation.init(),this.navigation.update()},toEdge:function(){this.navigation.update()},fromEdge:function(){this.navigation.update()},destroy:function(){this.navigation.destroy()},click:function(e){var t,a=this,i=a.navigation,s=i.$nextEl,r=i.$prevEl;!a.params.navigation.hideOnClick||I(e.target).is(r)||I(e.target).is(s)||(s?t=s.hasClass(a.params.navigation.hiddenClass):r&&(t=r.hasClass(a.params.navigation.hiddenClass)),!0===t?a.emit("navigationShow",a):a.emit("navigationHide",a),s&&s.toggleClass(a.params.navigation.hiddenClass),r&&r.toggleClass(a.params.navigation.hiddenClass))}}},{name:"pagination",params:{pagination:{el:null,bulletElement:"span",clickable:!1,hideOnClick:!1,renderBullet:null,renderProgressbar:null,renderFraction:null,renderCustom:null,progressbarOpposite:!1,type:"bullets",dynamicBullets:!1,dynamicMainBullets:1,formatFractionCurrent:function(e){return e},formatFractionTotal:function(e){return e},bulletClass:"swiper-pagination-bullet",bulletActiveClass:"swiper-pagination-bullet-active",modifierClass:"swiper-pagination-",currentClass:"swiper-pagination-current",totalClass:"swiper-pagination-total",hiddenClass:"swiper-pagination-hidden",progressbarFillClass:"swiper-pagination-progressbar-fill",progressbarOppositeClass:"swiper-pagination-progressbar-opposite",clickableClass:"swiper-pagination-clickable",lockClass:"swiper-pagination-lock"}},create:function(){var e=this;te.extend(e,{pagination:{init:H.init.bind(e),render:H.render.bind(e),update:H.update.bind(e),destroy:H.destroy.bind(e),dynamicBulletIndex:0}})},on:{init:function(){this.pagination.init(),this.pagination.render(),this.pagination.update()},activeIndexChange:function(){this.params.loop?this.pagination.update():void 0===this.snapIndex&&this.pagination.update()},snapIndexChange:function(){this.params.loop||this.pagination.update()},slidesLengthChange:function(){this.params.loop&&(this.pagination.render(),this.pagination.update())},snapGridLengthChange:function(){this.params.loop||(this.pagination.render(),this.pagination.update())},destroy:function(){this.pagination.destroy()},click:function(e){var t=this;t.params.pagination.el&&t.params.pagination.hideOnClick&&0<t.pagination.$el.length&&!I(e.target).hasClass(t.params.pagination.bulletClass)&&(!0===t.pagination.$el.hasClass(t.params.pagination.hiddenClass)?t.emit("paginationShow",t):t.emit("paginationHide",t),t.pagination.$el.toggleClass(t.params.pagination.hiddenClass))}}},{name:"scrollbar",params:{scrollbar:{el:null,dragSize:"auto",hide:!1,draggable:!1,snapOnRelease:!0,lockClass:"swiper-scrollbar-lock",dragClass:"swiper-scrollbar-drag"}},create:function(){var e=this;te.extend(e,{scrollbar:{init:G.init.bind(e),destroy:G.destroy.bind(e),updateSize:G.updateSize.bind(e),setTranslate:G.setTranslate.bind(e),setTransition:G.setTransition.bind(e),enableDraggable:G.enableDraggable.bind(e),disableDraggable:G.disableDraggable.bind(e),setDragPosition:G.setDragPosition.bind(e),getPointerPosition:G.getPointerPosition.bind(e),onDragStart:G.onDragStart.bind(e),onDragMove:G.onDragMove.bind(e),onDragEnd:G.onDragEnd.bind(e),isTouched:!1,timeout:null,dragTimeout:null}})},on:{init:function(){this.scrollbar.init(),this.scrollbar.updateSize(),this.scrollbar.setTranslate()},update:function(){this.scrollbar.updateSize()},resize:function(){this.scrollbar.updateSize()},observerUpdate:function(){this.scrollbar.updateSize()},setTranslate:function(){this.scrollbar.setTranslate()},setTransition:function(e){this.scrollbar.setTransition(e)},destroy:function(){this.scrollbar.destroy()}}},{name:"parallax",params:{parallax:{enabled:!1}},create:function(){te.extend(this,{parallax:{setTransform:N.setTransform.bind(this),setTranslate:N.setTranslate.bind(this),setTransition:N.setTransition.bind(this)}})},on:{beforeInit:function(){this.params.parallax.enabled&&(this.params.watchSlidesProgress=!0,this.originalParams.watchSlidesProgress=!0)},init:function(){this.params.parallax.enabled&&this.parallax.setTranslate()},setTranslate:function(){this.params.parallax.enabled&&this.parallax.setTranslate()},setTransition:function(e){this.params.parallax.enabled&&this.parallax.setTransition(e)}}},{name:"zoom",params:{zoom:{enabled:!1,maxRatio:3,minRatio:1,toggle:!0,containerClass:"swiper-zoom-container",zoomedSlideClass:"swiper-slide-zoomed"}},create:function(){var i=this,t={enabled:!1,scale:1,currentScale:1,isScaling:!1,gesture:{$slideEl:void 0,slideWidth:void 0,slideHeight:void 0,$imageEl:void 0,$imageWrapEl:void 0,maxRatio:3},image:{isTouched:void 0,isMoved:void 0,currentX:void 0,currentY:void 0,minX:void 0,minY:void 0,maxX:void 0,maxY:void 0,width:void 0,height:void 0,startX:void 0,startY:void 0,touchesStart:{},touchesCurrent:{}},velocity:{x:void 0,y:void 0,prevPositionX:void 0,prevPositionY:void 0,prevTime:void 0}};"onGestureStart onGestureChange onGestureEnd onTouchStart onTouchMove onTouchEnd onTransitionEnd toggle enable disable in out".split(" ").forEach(function(e){t[e]=B[e].bind(i)}),te.extend(i,{zoom:t});var s=1;Object.defineProperty(i.zoom,"scale",{get:function(){return s},set:function(e){if(s!==e){var t=i.zoom.gesture.$imageEl?i.zoom.gesture.$imageEl[0]:void 0,a=i.zoom.gesture.$slideEl?i.zoom.gesture.$slideEl[0]:void 0;i.emit("zoomChange",e,t,a)}s=e}})},on:{init:function(){this.params.zoom.enabled&&this.zoom.enable()},destroy:function(){this.zoom.disable()},touchStart:function(e){this.zoom.enabled&&this.zoom.onTouchStart(e)},touchEnd:function(e){this.zoom.enabled&&this.zoom.onTouchEnd(e)},doubleTap:function(e){this.params.zoom.enabled&&this.zoom.enabled&&this.params.zoom.toggle&&this.zoom.toggle(e)},transitionEnd:function(){this.zoom.enabled&&this.params.zoom.enabled&&this.zoom.onTransitionEnd()}}},{name:"lazy",params:{lazy:{enabled:!1,loadPrevNext:!1,loadPrevNextAmount:1,loadOnTransitionStart:!1,elementClass:"swiper-lazy",loadingClass:"swiper-lazy-loading",loadedClass:"swiper-lazy-loaded",preloaderClass:"swiper-lazy-preloader"}},create:function(){te.extend(this,{lazy:{initialImageLoaded:!1,load:X.load.bind(this),loadInSlide:X.loadInSlide.bind(this)}})},on:{beforeInit:function(){this.params.lazy.enabled&&this.params.preloadImages&&(this.params.preloadImages=!1)},init:function(){this.params.lazy.enabled&&!this.params.loop&&0===this.params.initialSlide&&this.lazy.load()},scroll:function(){this.params.freeMode&&!this.params.freeModeSticky&&this.lazy.load()},resize:function(){this.params.lazy.enabled&&this.lazy.load()},scrollbarDragMove:function(){this.params.lazy.enabled&&this.lazy.load()},transitionStart:function(){var e=this;e.params.lazy.enabled&&(!e.params.lazy.loadOnTransitionStart&&(e.params.lazy.loadOnTransitionStart||e.lazy.initialImageLoaded)||e.lazy.load())},transitionEnd:function(){this.params.lazy.enabled&&!this.params.lazy.loadOnTransitionStart&&this.lazy.load()}}},{name:"controller",params:{controller:{control:void 0,inverse:!1,by:"slide"}},create:function(){var e=this;te.extend(e,{controller:{control:e.params.controller.control,getInterpolateFunction:V.getInterpolateFunction.bind(e),setTranslate:V.setTranslate.bind(e),setTransition:V.setTransition.bind(e)}})},on:{update:function(){this.controller.control&&this.controller.spline&&(this.controller.spline=void 0,delete this.controller.spline)},resize:function(){this.controller.control&&this.controller.spline&&(this.controller.spline=void 0,delete this.controller.spline)},observerUpdate:function(){this.controller.control&&this.controller.spline&&(this.controller.spline=void 0,delete this.controller.spline)},setTranslate:function(e,t){this.controller.control&&this.controller.setTranslate(e,t)},setTransition:function(e,t){this.controller.control&&this.controller.setTransition(e,t)}}},{name:"a11y",params:{a11y:{enabled:!0,notificationClass:"swiper-notification",prevSlideMessage:"Previous slide",nextSlideMessage:"Next slide",firstSlideMessage:"This is the first slide",lastSlideMessage:"This is the last slide",paginationBulletMessage:"Go to slide {{index}}"}},create:function(){var t=this;te.extend(t,{a11y:{liveRegion:I('<span class="'+t.params.a11y.notificationClass+'" aria-live="assertive" aria-atomic="true"></span>')}}),Object.keys(Y).forEach(function(e){t.a11y[e]=Y[e].bind(t)})},on:{init:function(){this.params.a11y.enabled&&(this.a11y.init(),this.a11y.updateNavigation())},toEdge:function(){this.params.a11y.enabled&&this.a11y.updateNavigation()},fromEdge:function(){this.params.a11y.enabled&&this.a11y.updateNavigation()},paginationUpdate:function(){this.params.a11y.enabled&&this.a11y.updatePagination()},destroy:function(){this.params.a11y.enabled&&this.a11y.destroy()}}},{name:"history",params:{history:{enabled:!1,replaceState:!1,key:"slides"}},create:function(){var e=this;te.extend(e,{history:{init:F.init.bind(e),setHistory:F.setHistory.bind(e),setHistoryPopState:F.setHistoryPopState.bind(e),scrollToSlide:F.scrollToSlide.bind(e),destroy:F.destroy.bind(e)}})},on:{init:function(){this.params.history.enabled&&this.history.init()},destroy:function(){this.params.history.enabled&&this.history.destroy()},transitionEnd:function(){this.history.initialized&&this.history.setHistory(this.params.history.key,this.activeIndex)}}},{name:"hash-navigation",params:{hashNavigation:{enabled:!1,replaceState:!1,watchState:!1}},create:function(){var e=this;te.extend(e,{hashNavigation:{initialized:!1,init:R.init.bind(e),destroy:R.destroy.bind(e),setHash:R.setHash.bind(e),onHashCange:R.onHashCange.bind(e)}})},on:{init:function(){this.params.hashNavigation.enabled&&this.hashNavigation.init()},destroy:function(){this.params.hashNavigation.enabled&&this.hashNavigation.destroy()},transitionEnd:function(){this.hashNavigation.initialized&&this.hashNavigation.setHash()}}},{name:"autoplay",params:{autoplay:{enabled:!1,delay:3e3,waitForTransition:!0,disableOnInteraction:!0,stopOnLastSlide:!1,reverseDirection:!1}},create:function(){var t=this;te.extend(t,{autoplay:{running:!1,paused:!1,run:q.run.bind(t),start:q.start.bind(t),stop:q.stop.bind(t),pause:q.pause.bind(t),onTransitionEnd:function(e){t&&!t.destroyed&&t.$wrapperEl&&e.target===this&&(t.$wrapperEl[0].removeEventListener("transitionend",t.autoplay.onTransitionEnd),t.$wrapperEl[0].removeEventListener("webkitTransitionEnd",t.autoplay.onTransitionEnd),t.autoplay.paused=!1,t.autoplay.running?t.autoplay.run():t.autoplay.stop())}}})},on:{init:function(){this.params.autoplay.enabled&&this.autoplay.start()},beforeTransitionStart:function(e,t){this.autoplay.running&&(t||!this.params.autoplay.disableOnInteraction?this.autoplay.pause(e):this.autoplay.stop())},sliderFirstMove:function(){this.autoplay.running&&(this.params.autoplay.disableOnInteraction?this.autoplay.stop():this.autoplay.pause())},destroy:function(){this.autoplay.running&&this.autoplay.stop()}}},{name:"effect-fade",params:{fadeEffect:{crossFade:!1}},create:function(){te.extend(this,{fadeEffect:{setTranslate:W.setTranslate.bind(this),setTransition:W.setTransition.bind(this)}})},on:{beforeInit:function(){var e=this;if("fade"===e.params.effect){e.classNames.push(e.params.containerModifierClass+"fade");var t={slidesPerView:1,slidesPerColumn:1,slidesPerGroup:1,watchSlidesProgress:!0,spaceBetween:0,virtualTranslate:!0};te.extend(e.params,t),te.extend(e.originalParams,t)}},setTranslate:function(){"fade"===this.params.effect&&this.fadeEffect.setTranslate()},setTransition:function(e){"fade"===this.params.effect&&this.fadeEffect.setTransition(e)}}},{name:"effect-cube",params:{cubeEffect:{slideShadows:!0,shadow:!0,shadowOffset:20,shadowScale:.94}},create:function(){te.extend(this,{cubeEffect:{setTranslate:j.setTranslate.bind(this),setTransition:j.setTransition.bind(this)}})},on:{beforeInit:function(){var e=this;if("cube"===e.params.effect){e.classNames.push(e.params.containerModifierClass+"cube"),e.classNames.push(e.params.containerModifierClass+"3d");var t={slidesPerView:1,slidesPerColumn:1,slidesPerGroup:1,watchSlidesProgress:!0,resistanceRatio:0,spaceBetween:0,centeredSlides:!1,virtualTranslate:!0};te.extend(e.params,t),te.extend(e.originalParams,t)}},setTranslate:function(){"cube"===this.params.effect&&this.cubeEffect.setTranslate()},setTransition:function(e){"cube"===this.params.effect&&this.cubeEffect.setTransition(e)}}},{name:"effect-flip",params:{flipEffect:{slideShadows:!0,limitRotation:!0}},create:function(){te.extend(this,{flipEffect:{setTranslate:U.setTranslate.bind(this),setTransition:U.setTransition.bind(this)}})},on:{beforeInit:function(){var e=this;if("flip"===e.params.effect){e.classNames.push(e.params.containerModifierClass+"flip"),e.classNames.push(e.params.containerModifierClass+"3d");var t={slidesPerView:1,slidesPerColumn:1,slidesPerGroup:1,watchSlidesProgress:!0,spaceBetween:0,virtualTranslate:!0};te.extend(e.params,t),te.extend(e.originalParams,t)}},setTranslate:function(){"flip"===this.params.effect&&this.flipEffect.setTranslate()},setTransition:function(e){"flip"===this.params.effect&&this.flipEffect.setTransition(e)}}},{name:"effect-coverflow",params:{coverflowEffect:{rotate:50,stretch:0,depth:100,modifier:1,slideShadows:!0}},create:function(){te.extend(this,{coverflowEffect:{setTranslate:K.setTranslate.bind(this),setTransition:K.setTransition.bind(this)}})},on:{beforeInit:function(){var e=this;"coverflow"===e.params.effect&&(e.classNames.push(e.params.containerModifierClass+"coverflow"),e.classNames.push(e.params.containerModifierClass+"3d"),e.params.watchSlidesProgress=!0,e.originalParams.watchSlidesProgress=!0)},setTranslate:function(){"coverflow"===this.params.effect&&this.coverflowEffect.setTranslate()},setTransition:function(e){"coverflow"===this.params.effect&&this.coverflowEffect.setTransition(e)}}},{name:"thumbs",params:{thumbs:{swiper:null,slideThumbActiveClass:"swiper-slide-thumb-active",thumbsContainerClass:"swiper-container-thumbs"}},create:function(){te.extend(this,{thumbs:{swiper:null,init:_.init.bind(this),update:_.update.bind(this),onThumbClick:_.onThumbClick.bind(this)}})},on:{beforeInit:function(){var e=this.params.thumbs;e&&e.swiper&&(this.thumbs.init(),this.thumbs.update(!0))},slideChange:function(){this.thumbs.swiper&&this.thumbs.update()},update:function(){this.thumbs.swiper&&this.thumbs.update()},resize:function(){this.thumbs.swiper&&this.thumbs.update()},observerUpdate:function(){this.thumbs.swiper&&this.thumbs.update()},setTransition:function(e){var t=this.thumbs.swiper;t&&t.setTransition(e)},beforeDestroy:function(){var e=this.thumbs.swiper;e&&this.thumbs.swiperCreated&&e&&e.destroy()}}}];return void 0===T.use&&(T.use=T.Class.use,T.installModule=T.Class.installModule),T.use(Z),T}); 911
vendor: 40,580 bytes, lines 912-2011
912/* 913== malihu jquery custom scrollbar plugin == 914Version: 3.1.5 915Plugin URI: http://manos.malihu.gr/jquery-custom-content-scroller 916Author: malihu 917Author URI: http://manos.malihu.gr 918License: MIT License (MIT) 919*/ 920 921/* 922Copyright Manos Malihutsakis (email: [email protected]) 923 924Permission is hereby granted, free of charge, to any person obtaining a copy 925of this software and associated documentation files (the "Software"), to deal 926in the Software without restriction, including without limitation the rights 927to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 928copies of the Software, and to permit persons to whom the Software is 929furnished to do so, subject to the following conditions: 930 931The above copyright notice and this permission notice shall be included in 932all copies or substantial portions of the Software. 933 934THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 935IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 936FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 937AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 938LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 939OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 940THE SOFTWARE. 941*/ 942 943/* 944The code below is fairly long, fully commented and should be normally used in development. 945For production, use either the minified jquery.mCustomScrollbar.min.js script or 946the production-ready jquery.mCustomScrollbar.concat.min.js which contains the plugin 947and dependencies (minified). 948*/ 949 950(function(factory){ 951 if(typeof define==="function" && define.amd){ 952 define(["jquery"],factory); 953 }else if(typeof module!=="undefined" && module.exports){ 954 module.exports=factory; 955 }else{ 956 factory(jQuery,window,document); 957 } 958}(function($){ 959(function(init){ 960 var _rjs=typeof define==="function" && define.amd, /* RequireJS */ 961 _njs=typeof module !== "undefined" && module.exports, /* NodeJS */ 962 _dlp=("https:"==document.location.protocol) ? "https:" : "http:", /* location protocol */ 963 _url="cdnjs.cloudflare.com/ajax/libs/jquery-mousewheel/3.1.13/jquery.mousewheel.min.js"; 964 if(!_rjs){ 965 if(_njs){ 966 require("jquery-mousewheel")($); 967 }else{ 968 /* load jquery-mousewheel plugin (via CDN) if it's not present or not loaded via RequireJS 969 (works when mCustomScrollbar fn is called on window load) */ 970 $.event.special.mousewheel || $("head").append(decodeURI("%3Cscript src="+_dlp+"//"+_url+"%3E%3C/script%3E")); 971 } 972 } 973 init(); 974}(function(){ 975 976 /* 977 ---------------------------------------- 978 PLUGIN NAMESPACE, PREFIX, DEFAULT SELECTOR(S) 979 ---------------------------------------- 980 */ 981 982 var pluginNS="mCustomScrollbar", 983 pluginPfx="mCS", 984 defaultSelector=".mCustomScrollbar", 985 986 987 988 989 990 /* 991 ---------------------------------------- 992 DEFAULT OPTIONS 993 ---------------------------------------- 994 */ 995 996 defaults={ 997 /* 998 set element/content width/height programmatically 999 values: boolean, pixels, percentage 1000 option default 1001 ------------------------------------- 1002 setWidth false 1003 setHeight false 1004 */ 1005 /* 1006 set the initial css top property of content 1007 values: string (e.g. "-100px", "10%" etc.) 1008 */ 1009 setTop:0, 1010 /* 1011 set the initial css left property of content 1012 values: string (e.g. "-100px", "10%" etc.) 1013 */ 1014 setLeft:0, 1015 /* 1016 scrollbar axis (vertical and/or horizontal scrollbars) 1017 values (string): "y", "x", "yx" 1018 */ 1019 axis:"y", 1020 /* 1021 position of scrollbar relative to content 1022 values (string): "inside", "outside" ("outside" requires elements with position:relative) 1023 */ 1024 scrollbarPosition:"inside", 1025 /* 1026 scrolling inertia 1027 values: integer (milliseconds) 1028 */ 1029 scrollInertia:950, 1030 /* 1031 auto-adjust scrollbar dragger length 1032 values: boolean 1033 */ 1034 autoDraggerLength:true, 1035 /* 1036 auto-hide scrollbar when idle 1037 values: boolean 1038 option default 1039 ------------------------------------- 1040 autoHideScrollbar false 1041 */ 1042 /* 1043 auto-expands scrollbar on mouse-over and dragging 1044 values: boolean 1045 option default 1046 ------------------------------------- 1047 autoExpandScrollbar false 1048 */ 1049 /* 1050 always show scrollbar, even when there's nothing to scroll 1051 values: integer (0=disable, 1=always show dragger rail and buttons, 2=always show dragger rail, dragger and buttons), boolean 1052 */ 1053 alwaysShowScrollbar:0, 1054 /* 1055 scrolling always snaps to a multiple of this number in pixels 1056 values: integer, array ([y,x]) 1057 option default 1058 ------------------------------------- 1059 snapAmount null 1060 */ 1061 /* 1062 when snapping, snap with this number in pixels as an offset 1063 values: integer 1064 */ 1065 snapOffset:0, 1066 /* 1067 mouse-wheel scrolling 1068 */ 1069 mouseWheel:{ 1070 /* 1071 enable mouse-wheel scrolling 1072 values: boolean 1073 */ 1074 enable:true, 1075 /* 1076 scrolling amount in pixels 1077 values: "auto", integer 1078 */ 1079 scrollAmount:"auto", 1080 /* 1081 mouse-wheel scrolling axis 1082 the default scrolling direction when both vertical and horizontal scrollbars are present 1083 values (string): "y", "x" 1084 */ 1085 axis:"y", 1086 /* 1087 prevent the default behaviour which automatically scrolls the parent element(s) when end of scrolling is reached 1088 values: boolean 1089 option default 1090 ------------------------------------- 1091 preventDefault null 1092 */ 1093 /* 1094 the reported mouse-wheel delta value. The number of lines (translated to pixels) one wheel notch scrolls. 1095 values: "auto", integer 1096 "auto" uses the default OS/browser value 1097 */ 1098 deltaFactor:"auto", 1099 /* 1100 normalize mouse-wheel delta to -1 or 1 (disables mouse-wheel acceleration) 1101 values: boolean 1102 option default 1103 ------------------------------------- 1104 normalizeDelta null 1105 */ 1106 /* 1107 invert mouse-wheel scrolling direction 1108 values: boolean 1109 option default 1110 ------------------------------------- 1111 invert null 1112 */ 1113 /* 1114 the tags that disable mouse-wheel when cursor is over them 1115 */ 1116 disableOver:["select","option","keygen","datalist","textarea"] 1117 }, 1118 /* 1119 scrollbar buttons 1120 */ 1121 scrollButtons:{ 1122 /* 1123 enable scrollbar buttons 1124 values: boolean 1125 option default 1126 ------------------------------------- 1127 enable null 1128 */ 1129 /* 1130 scrollbar buttons scrolling type 1131 values (string): "stepless", "stepped" 1132 */ 1133 scrollType:"stepless", 1134 /* 1135 scrolling amount in pixels 1136 values: "auto", integer 1137 */ 1138 scrollAmount:"auto" 1139 /* 1140 tabindex of the scrollbar buttons 1141 values: false, integer 1142 option default 1143 ------------------------------------- 1144 tabindex null 1145 */ 1146 }, 1147 /* 1148 keyboard scrolling 1149 */ 1150 keyboard:{ 1151 /* 1152 enable scrolling via keyboard 1153 values: boolean 1154 */ 1155 enable:true, 1156 /* 1157 keyboard scrolling type 1158 values (string): "stepless", "stepped" 1159 */ 1160 scrollType:"stepless", 1161 /* 1162 scrolling amount in pixels 1163 values: "auto", integer 1164 */ 1165 scrollAmount:"auto" 1166 }, 1167 /* 1168 enable content touch-swipe scrolling 1169 values: boolean, integer, string (number) 1170 integer values define the axis-specific minimum amount required for scrolling momentum 1171 */ 1172 contentTouchScroll:25, 1173 /* 1174 enable/disable document (default) touch-swipe scrolling 1175 */ 1176 documentTouchScroll:true, 1177 /* 1178 advanced option parameters 1179 */ 1180 advanced:{ 1181 /* 1182 auto-expand content horizontally (for "x" or "yx" axis) 1183 values: boolean, integer (the value 2 forces the non scrollHeight/scrollWidth method, the value 3 forces the scrollHeight/scrollWidth method) 1184 option default 1185 ------------------------------------- 1186 autoExpandHorizontalScroll null 1187 */ 1188 /* 1189 auto-scroll to elements with focus 1190 */ 1191 autoScrollOnFocus:"input,textarea,select,button,datalist,keygen,a[tabindex],area,object,[contenteditable='true']", 1192 /* 1193 auto-update scrollbars on content, element or viewport resize 1194 should be true for fluid layouts/elements, adding/removing content dynamically, hiding/showing elements, content with images etc. 1195 values: boolean 1196 */ 1197 updateOnContentResize:true, 1198 /* 1199 auto-update scrollbars each time each image inside the element is fully loaded 1200 values: "auto", boolean 1201 */ 1202 updateOnImageLoad:"auto", 1203 /* 1204 auto-update scrollbars based on the amount and size changes of specific selectors 1205 useful when you need to update the scrollbar(s) automatically, each time a type of element is added, removed or changes its size 1206 values: boolean, string (e.g. "ul li" will auto-update scrollbars each time list-items inside the element are changed) 1207 a value of true (boolean) will auto-update scrollbars each time any element is changed 1208 option default 1209 ------------------------------------- 1210 updateOnSelectorChange null 1211 */ 1212 /* 1213 extra selectors that'll allow scrollbar dragging upon mousemove/up, pointermove/up, touchend etc. (e.g. "selector-1, selector-2") 1214 option default 1215 ------------------------------------- 1216 extraDraggableSelectors null 1217 */ 1218 /* 1219 extra selectors that'll release scrollbar dragging upon mouseup, pointerup, touchend etc. (e.g. "selector-1, selector-2") 1220 option default 1221 ------------------------------------- 1222 releaseDraggableSelectors null 1223 */ 1224 /* 1225 auto-update timeout 1226 values: integer (milliseconds) 1227 */ 1228 autoUpdateTimeout:60 1229 }, 1230 /* 1231 scrollbar theme 1232 values: string (see CSS/plugin URI for a list of ready-to-use themes) 1233 */ 1234 theme:"light", 1235 /* 1236 user defined callback functions 1237 */ 1238 callbacks:{ 1239 /* 1240 Available callbacks: 1241 callback default 1242 ------------------------------------- 1243 onCreate null 1244 onInit null 1245 onScrollStart null 1246 onScroll null 1247 onTotalScroll null 1248 onTotalScrollBack null 1249 whileScrolling null 1250 onOverflowY null 1251 onOverflowX null 1252 onOverflowYNone null 1253 onOverflowXNone null 1254 onImageLoad null 1255 onSelectorChange null 1256 onBeforeUpdate null 1257 onUpdate null 1258 */ 1259 onTotalScrollOffset:0, 1260 onTotalScrollBackOffset:0, 1261 alwaysTriggerOffsets:true 1262 } 1263 /* 1264 add scrollbar(s) on all elements matching the current selector, now and in the future 1265 values: boolean, string 1266 string values: "on" (enable), "once" (disable after first invocation), "off" (disable) 1267 liveSelector values: string (selector) 1268 option default 1269 ------------------------------------- 1270 live false 1271 liveSelector null 1272 */ 1273 }, 1274 1275 1276 1277 1278 1279 /* 1280 ---------------------------------------- 1281 VARS, CONSTANTS 1282 ---------------------------------------- 1283 */ 1284 1285 totalInstances=0, /* plugin instances amount */ 1286 liveTimers={}, /* live option timers */ 1287 oldIE=(window.attachEvent && !window.addEventListener) ? 1 : 0, /* detect IE < 9 */ 1288 touchActive=false,touchable, /* global touch vars (for touch and pointer events) */ 1289 /* general plugin classes */ 1290 classes=[ 1291 "mCSB_dragger_onDrag","mCSB_scrollTools_onDrag","mCS_img_loaded","mCS_disabled","mCS_destroyed","mCS_no_scrollbar", 1292 "mCS-autoHide","mCS-dir-rtl","mCS_no_scrollbar_y","mCS_no_scrollbar_x","mCS_y_hidden","mCS_x_hidden","mCSB_draggerContainer", 1293 "mCSB_buttonUp","mCSB_buttonDown","mCSB_buttonLeft","mCSB_buttonRight" 1294 ], 1295 1296 1297 1298 1299 1300 /* 1301 ---------------------------------------- 1302 METHODS 1303 ---------------------------------------- 1304 */ 1305 1306 methods={ 1307 1308 /* 1309 plugin initialization method 1310 creates the scrollbar(s), plugin data object and options 1311 ---------------------------------------- 1312 */ 1313 1314 init:function(options){ 1315 1316 var options=$.extend(true,{},defaults,options), 1317 selector=_selector.call(this); /* validate selector */ 1318 1319 /* 1320 if live option is enabled, monitor for elements matching the current selector and 1321 apply scrollbar(s) when found (now and in the future) 1322 */ 1323 if(options.live){ 1324 var liveSelector=options.liveSelector || this.selector || defaultSelector, /* live selector(s) */ 1325 $liveSelector=$(liveSelector); /* live selector(s) as jquery object */ 1326 if(options.live==="off"){ 1327 /* 1328 disable live if requested 1329 usage: $(selector).mCustomScrollbar({live:"off"}); 1330 */ 1331 removeLiveTimers(liveSelector); 1332 return; 1333 } 1334 liveTimers[liveSelector]=setTimeout(function(){ 1335 /* call mCustomScrollbar fn on live selector(s) every half-second */ 1336 $liveSelector.mCustomScrollbar(options); 1337 if(options.live==="once" && $liveSelector.length){ 1338 /* disable live after first invocation */ 1339 removeLiveTimers(liveSelector); 1340 } 1341 },500); 1342 }else{ 1343 removeLiveTimers(liveSelector); 1344 } 1345 1346 /* options backward compatibility (for versions < 3.0.0) and normalization */ 1347 options.setWidth=(options.set_width) ? options.set_width : options.setWidth; 1348 options.setHeight=(options.set_height) ? options.set_height : options.setHeight; 1349 options.axis=(options.horizontalScroll) ? "x" : _findAxis(options.axis); 1350 options.scrollInertia=options.scrollInertia>0 && options.scrollInertia<17 ? 17 : options.scrollInertia; 1351 if(typeof options.mouseWheel!=="object" && options.mouseWheel==true){ /* old school mouseWheel option (non-object) */ 1352 options.mouseWheel={enable:true,scrollAmount:"auto",axis:"y",preventDefault:false,deltaFactor:"auto",normalizeDelta:false,invert:false} 1353 } 1354 options.mouseWheel.scrollAmount=!options.mouseWheelPixels ? options.mouseWheel.scrollAmount : options.mouseWheelPixels; 1355 options.mouseWheel.normalizeDelta=!options.advanced.normalizeMouseWheelDelta ? options.mouseWheel.normalizeDelta : options.advanced.normalizeMouseWheelDelta; 1356 options.scrollButtons.scrollType=_findScrollButtonsType(options.scrollButtons.scrollType); 1357 1358 _theme(options); /* theme-specific options */ 1359 1360 /* plugin constructor */ 1361 return $(selector).each(function(){ 1362 1363 var $this=$(this); 1364 1365 if(!$this.data(pluginPfx)){ /* prevent multiple instantiations */ 1366 1367 /* store options and create objects in jquery data */ 1368 $this.data(pluginPfx,{ 1369 idx:++totalInstances, /* instance index */ 1370 opt:options, /* options */ 1371 scrollRatio:{y:null,x:null}, /* scrollbar to content ratio */ 1372 overflowed:null, /* overflowed axis */ 1373 contentReset:{y:null,x:null}, /* object to check when content resets */ 1374 bindEvents:false, /* object to check if events are bound */ 1375 tweenRunning:false, /* object to check if tween is running */ 1376 sequential:{}, /* sequential scrolling object */ 1377 langDir:$this.css("direction"), /* detect/store direction (ltr or rtl) */ 1378 cbOffsets:null, /* object to check whether callback offsets always trigger */ 1379 /* 1380 object to check how scrolling events where last triggered 1381 "internal" (default - triggered by this script), "external" (triggered by other scripts, e.g. via scrollTo method) 1382 usage: object.data("mCS").trigger 1383 */ 1384 trigger:null, 1385 /* 1386 object to check for changes in elements in order to call the update method automatically 1387 */ 1388 poll:{size:{o:0,n:0},img:{o:0,n:0},change:{o:0,n:0}} 1389 }); 1390 1391 var d=$this.data(pluginPfx),o=d.opt, 1392 /* HTML data attributes */ 1393 htmlDataAxis=$this.data("mcs-axis"),htmlDataSbPos=$this.data("mcs-scrollbar-position"),htmlDataTheme=$this.data("mcs-theme"); 1394 1395 if(htmlDataAxis){o.axis=htmlDataAxis;} /* usage example: data-mcs-axis="y" */ 1396 if(htmlDataSbPos){o.scrollbarPosition=htmlDataSbPos;} /* usage example: data-mcs-scrollbar-position="outside" */ 1397 if(htmlDataTheme){ /* usage example: data-mcs-theme="minimal" */ 1398 o.theme=htmlDataTheme; 1399 _theme(o); /* theme-specific options */ 1400 } 1401 1402 _pluginMarkup.call(this); /* add plugin markup */ 1403 1404 if(d && o.callbacks.onCreate && typeof o.callbacks.onCreate==="function"){o.callbacks.onCreate.call(this);} /* callbacks: onCreate */ 1405 1406 $("#mCSB_"+d.idx+"_container img:not(."+classes[2]+")").addClass(classes[2]); /* flag loaded images */ 1407 1408 methods.update.call(null,$this); /* call the update method */ 1409 1410 } 1411 1412 }); 1413 1414 }, 1415 /* ---------------------------------------- */ 1416 1417 1418 1419 /* 1420 plugin update method 1421 updates content and scrollbar(s) values, events and status 1422 ---------------------------------------- 1423 usage: $(selector).mCustomScrollbar("update"); 1424 */ 1425 1426 update:function(el,cb){ 1427 1428 var selector=el || _selector.call(this); /* validate selector */ 1429 1430 return $(selector).each(function(){ 1431 1432 var $this=$(this); 1433 1434 if($this.data(pluginPfx)){ /* check if plugin has initialized */ 1435 1436 var d=$this.data(pluginPfx),o=d.opt, 1437 mCSB_container=$("#mCSB_"+d.idx+"_container"), 1438 mCustomScrollBox=$("#mCSB_"+d.idx), 1439 mCSB_dragger=[$("#mCSB_"+d.idx+"_dragger_vertical"),$("#mCSB_"+d.idx+"_dragger_horizontal")]; 1440 1441 if(!mCSB_container.length){return;} 1442 1443 if(d.tweenRunning){_stop($this);} /* stop any running tweens while updating */ 1444 1445 if(cb && d && o.callbacks.onBeforeUpdate && typeof o.callbacks.onBeforeUpdate==="function"){o.callbacks.onBeforeUpdate.call(this);} /* callbacks: onBeforeUpdate */ 1446 1447 /* if element was disabled or destroyed, remove class(es) */ 1448 if($this.hasClass(classes[3])){$this.removeClass(classes[3]);} 1449 if($this.hasClass(classes[4])){$this.removeClass(classes[4]);} 1450 1451 /* css flexbox fix, detect/set max-height */ 1452 mCustomScrollBox.css("max-height","none"); 1453 if(mCustomScrollBox.height()!==$this.height()){mCustomScrollBox.css("max-height",$this.height());} 1454 1455 _expandContentHorizontally.call(this); /* expand content horizontally */ 1456 1457 if(o.axis!=="y" && !o.advanced.autoExpandHorizontalScroll){ 1458 mCSB_container.css("width",_contentWidth(mCSB_container)); 1459 } 1460 1461 d.overflowed=_overflowed.call(this); /* determine if scrolling is required */ 1462 1463 _scrollbarVisibility.call(this); /* show/hide scrollbar(s) */ 1464 1465 /* auto-adjust scrollbar dragger length analogous to content */ 1466 if(o.autoDraggerLength){_setDraggerLength.call(this);} 1467 1468 _scrollRatio.call(this); /* calculate and store scrollbar to content ratio */ 1469 1470 _bindEvents.call(this); /* bind scrollbar events */ 1471 1472 /* reset scrolling position and/or events */ 1473 var to=[Math.abs(mCSB_container[0].offsetTop),Math.abs(mCSB_container[0].offsetLeft)]; 1474 if(o.axis!=="x"){ /* y/yx axis */ 1475 if(!d.overflowed[0]){ /* y scrolling is not required */ 1476 _resetContentPosition.call(this); /* reset content position */ 1477 if(o.axis==="y"){ 1478 _unbindEvents.call(this); 1479 }else if(o.axis==="yx" && d.overflowed[1]){ 1480 _scrollTo($this,to[1].toString(),{dir:"x",dur:0,overwrite:"none"}); 1481 } 1482 }else if(mCSB_dragger[0].height()>mCSB_dragger[0].parent().height()){ 1483 _resetContentPosition.call(this); /* reset content position */ 1484 }else{ /* y scrolling is required */ 1485 _scrollTo($this,to[0].toString(),{dir:"y",dur:0,overwrite:"none"}); 1486 d.contentReset.y=null; 1487 } 1488 } 1489 if(o.axis!=="y"){ /* x/yx axis */ 1490 if(!d.overflowed[1]){ /* x scrolling is not required */ 1491 _resetContentPosition.call(this); /* reset content position */ 1492 if(o.axis==="x"){ 1493 _unbindEvents.call(this); 1494 }else if(o.axis==="yx" && d.overflowed[0]){ 1495 _scrollTo($this,to[0].toString(),{dir:"y",dur:0,overwrite:"none"}); 1496 } 1497 }else if(mCSB_dragger[1].width()>mCSB_dragger[1].parent().width()){ 1498 _resetContentPosition.call(this); /* reset content position */ 1499 }else{ /* x scrolling is required */ 1500 _scrollTo($this,to[1].toString(),{dir:"x",dur:0,overwrite:"none"}); 1501 d.contentReset.x=null; 1502 } 1503 } 1504 1505 /* callbacks: onImageLoad, onSelectorChange, onUpdate */ 1506 if(cb && d){ 1507 if(cb===2 && o.callbacks.onImageLoad && typeof o.callbacks.onImageLoad==="function"){ 1508 o.callbacks.onImageLoad.call(this); 1509 }else if(cb===3 && o.callbacks.onSelectorChange && typeof o.callbacks.onSelectorChange==="function"){ 1510 o.callbacks.onSelectorChange.call(this); 1511 }else if(o.callbacks.onUpdate && typeof o.callbacks.onUpdate==="function"){ 1512 o.callbacks.onUpdate.call(this); 1513 } 1514 } 1515 1516 _autoUpdate.call(this); /* initialize automatic updating (for dynamic content, fluid layouts etc.) */ 1517 1518 } 1519 1520 }); 1521 1522 }, 1523 /* ---------------------------------------- */ 1524 1525 1526 1527 /* 1528 plugin scrollTo method 1529 triggers a scrolling event to a specific value 1530 ---------------------------------------- 1531 usage: $(selector).mCustomScrollbar("scrollTo",value,options); 1532 */ 1533 1534 scrollTo:function(val,options){ 1535 1536 /* prevent silly things like $(selector).mCustomScrollbar("scrollTo",undefined); */ 1537 if(typeof val=="undefined" || val==null){return;} 1538 1539 var selector=_selector.call(this); /* validate selector */ 1540 1541 return $(selector).each(function(){ 1542 1543 var $this=$(this); 1544 1545 if($this.data(pluginPfx)){ /* check if plugin has initialized */ 1546 1547 var d=$this.data(pluginPfx),o=d.opt, 1548 /* method default options */ 1549 methodDefaults={ 1550 trigger:"external", /* method is by default triggered externally (e.g. from other scripts) */ 1551 scrollInertia:o.scrollInertia, /* scrolling inertia (animation duration) */ 1552 scrollEasing:"mcsEaseInOut", /* animation easing */ 1553 moveDragger:false, /* move dragger instead of content */ 1554 timeout:60, /* scroll-to delay */ 1555 callbacks:true, /* enable/disable callbacks */ 1556 onStart:true, 1557 onUpdate:true, 1558 onComplete:true 1559 }, 1560 methodOptions=$.extend(true,{},methodDefaults,options), 1561 to=_arr.call(this,val),dur=methodOptions.scrollInertia>0 && methodOptions.scrollInertia<17 ? 17 : methodOptions.scrollInertia; 1562 1563 /* translate yx values to actual scroll-to positions */ 1564 to[0]=_to.call(this,to[0],"y"); 1565 to[1]=_to.call(this,to[1],"x"); 1566 1567 /* 1568 check if scroll-to value moves the dragger instead of content. 1569 Only pixel values apply on dragger (e.g. 100, "100px", "-=100" etc.) 1570 */ 1571 if(methodOptions.moveDragger){ 1572 to[0]*=d.scrollRatio.y; 1573 to[1]*=d.scrollRatio.x; 1574 } 1575 1576 methodOptions.dur=_isTabHidden() ? 0 : dur; //skip animations if browser tab is hidden 1577 1578 setTimeout(function(){ 1579 /* do the scrolling */ 1580 if(to[0]!==null && typeof to[0]!=="undefined" && o.axis!=="x" && d.overflowed[0]){ /* scroll y */ 1581 methodOptions.dir="y"; 1582 methodOptions.overwrite="all"; 1583 _scrollTo($this,to[0].toString(),methodOptions); 1584 } 1585 if(to[1]!==null && typeof to[1]!=="undefined" && o.axis!=="y" && d.overflowed[1]){ /* scroll x */ 1586 methodOptions.dir="x"; 1587 methodOptions.overwrite="none"; 1588 _scrollTo($this,to[1].toString(),methodOptions); 1589 } 1590 },methodOptions.timeout); 1591 1592 } 1593 1594 }); 1595 1596 }, 1597 /* ---------------------------------------- */ 1598 1599 1600 1601 /* 1602 plugin stop method 1603 stops scrolling animation 1604 ---------------------------------------- 1605 usage: $(selector).mCustomScrollbar("stop"); 1606 */ 1607 stop:function(){ 1608 1609 var selector=_selector.call(this); /* validate selector */ 1610 1611 return $(selector).each(function(){ 1612 1613 var $this=$(this); 1614 1615 if($this.data(pluginPfx)){ /* check if plugin has initialized */ 1616 1617 _stop($this); 1618 1619 } 1620 1621 }); 1622 1623 }, 1624 /* ---------------------------------------- */ 1625 1626 1627 1628 /* 1629 plugin disable method 1630 temporarily disables the scrollbar(s) 1631 ---------------------------------------- 1632 usage: $(selector).mCustomScrollbar("disable",reset); 1633 reset (boolean): resets content position to 0 1634 */ 1635 disable:function(r){ 1636 1637 var selector=_selector.call(this); /* validate selector */ 1638 1639 return $(selector).each(function(){ 1640 1641 var $this=$(this); 1642 1643 if($this.data(pluginPfx)){ /* check if plugin has initialized */ 1644 1645 var d=$this.data(pluginPfx); 1646 1647 _autoUpdate.call(this,"remove"); /* remove automatic updating */ 1648 1649 _unbindEvents.call(this); /* unbind events */ 1650 1651 if(r){_resetContentPosition.call(this);} /* reset content position */ 1652 1653 _scrollbarVisibility.call(this,true); /* show/hide scrollbar(s) */ 1654 1655 $this.addClass(classes[3]); /* add disable class */ 1656 1657 } 1658 1659 }); 1660 1661 }, 1662 /* ---------------------------------------- */ 1663 1664 1665 1666 /* 1667 plugin destroy method 1668 completely removes the scrollbar(s) and returns the element to its original state 1669 ---------------------------------------- 1670 usage: $(selector).mCustomScrollbar("destroy"); 1671 */ 1672 destroy:function(){ 1673 1674 var selector=_selector.call(this); /* validate selector */ 1675 1676 return $(selector).each(function(){ 1677 1678 var $this=$(this); 1679 1680 if($this.data(pluginPfx)){ /* check if plugin has initialized */ 1681 1682 var d=$this.data(pluginPfx),o=d.opt, 1683 mCustomScrollBox=$("#mCSB_"+d.idx), 1684 mCSB_container=$("#mCSB_"+d.idx+"_container"), 1685 scrollbar=$(".mCSB_"+d.idx+"_scrollbar"); 1686 1687 if(o.live){removeLiveTimers(o.liveSelector || $(selector).selector);} /* remove live timers */ 1688 1689 _autoUpdate.call(this,"remove"); /* remove automatic updating */ 1690 1691 _unbindEvents.call(this); /* unbind events */ 1692 1693 _resetContentPosition.call(this); /* reset content position */ 1694 1695 $this.removeData(pluginPfx); /* remove plugin data object */ 1696 1697 _delete(this,"mcs"); /* delete callbacks object */ 1698 1699 /* remove plugin markup */ 1700 scrollbar.remove(); /* remove scrollbar(s) first (those can be either inside or outside plugin's inner wrapper) */ 1701 mCSB_container.find("img."+classes[2]).removeClass(classes[2]); /* remove loaded images flag */ 1702 mCustomScrollBox.replaceWith(mCSB_container.contents()); /* replace plugin's inner wrapper with the original content */ 1703 /* remove plugin classes from the element and add destroy class */ 1704 $this.removeClass(pluginNS+" _"+pluginPfx+"_"+d.idx+" "+classes[6]+" "+classes[7]+" "+classes[5]+" "+classes[3]).addClass(classes[4]); 1705 1706 } 1707 1708 }); 1709 1710 } 1711 /* ---------------------------------------- */ 1712 1713 }, 1714 1715 1716 1717 1718 1719 /* 1720 ---------------------------------------- 1721 FUNCTIONS 1722 ---------------------------------------- 1723 */ 1724 1725 /* validates selector (if selector is invalid or undefined uses the default one) */ 1726 _selector=function(){ 1727 return (typeof $(this)!=="object" || $(this).length<1) ? defaultSelector : this; 1728 }, 1729 /* -------------------- */ 1730 1731 1732 /* changes options according to theme */ 1733 _theme=function(obj){ 1734 var fixedSizeScrollbarThemes=["rounded","rounded-dark","rounded-dots","rounded-dots-dark"], 1735 nonExpandedScrollbarThemes=["rounded-dots","rounded-dots-dark","3d","3d-dark","3d-thick","3d-thick-dark","inset","inset-dark","inset-2","inset-2-dark","inset-3","inset-3-dark"], 1736 disabledScrollButtonsThemes=["minimal","minimal-dark"], 1737 enabledAutoHideScrollbarThemes=["minimal","minimal-dark"], 1738 scrollbarPositionOutsideThemes=["minimal","minimal-dark"]; 1739 obj.autoDraggerLength=$.inArray(obj.theme,fixedSizeScrollbarThemes) > -1 ? false : obj.autoDraggerLength; 1740 obj.autoExpandScrollbar=$.inArray(obj.theme,nonExpandedScrollbarThemes) > -1 ? false : obj.autoExpandScrollbar; 1741 obj.scrollButtons.enable=$.inArray(obj.theme,disabledScrollButtonsThemes) > -1 ? false : obj.scrollButtons.enable; 1742 obj.autoHideScrollbar=$.inArray(obj.theme,enabledAutoHideScrollbarThemes) > -1 ? true : obj.autoHideScrollbar; 1743 obj.scrollbarPosition=$.inArray(obj.theme,scrollbarPositionOutsideThemes) > -1 ? "outside" : obj.scrollbarPosition; 1744 }, 1745 /* -------------------- */ 1746 1747 1748 /* live option timers removal */ 1749 removeLiveTimers=function(selector){ 1750 if(liveTimers[selector]){ 1751 clearTimeout(liveTimers[selector]); 1752 _delete(liveTimers,selector); 1753 } 1754 }, 1755 /* -------------------- */ 1756 1757 1758 /* normalizes axis option to valid values: "y", "x", "yx" */ 1759 _findAxis=function(val){ 1760 return (val==="yx" || val==="xy" || val==="auto") ? "yx" : (val==="x" || val==="horizontal") ? "x" : "y"; 1761 }, 1762 /* -------------------- */ 1763 1764 1765 /* normalizes scrollButtons.scrollType option to valid values: "stepless", "stepped" */ 1766 _findScrollButtonsType=function(val){ 1767 return (val==="stepped" || val==="pixels" || val==="step" || val==="click") ? "stepped" : "stepless"; 1768 }, 1769 /* -------------------- */ 1770 1771 1772 /* generates plugin markup */ 1773 _pluginMarkup=function(){ 1774 var $this=$(this),d=$this.data(pluginPfx),o=d.opt, 1775 expandClass=o.autoExpandScrollbar ? " "+classes[1]+"_expand" : "", 1776 scrollbar=["<div id='mCSB_"+d.idx+"_scrollbar_vertical' class='mCSB_scrollTools mCSB_"+d.idx+"_scrollbar mCS-"+o.theme+" mCSB_scrollTools_vertical"+expandClass+"'><div class='"+classes[12]+"'><div id='mCSB_"+d.idx+"_dragger_vertical' class='mCSB_dragger' style='position:absolute;'><div class='mCSB_dragger_bar' /></div><div class='mCSB_draggerRail' /></div></div>","<div id='mCSB_"+d.idx+"_scrollbar_horizontal' class='mCSB_scrollTools mCSB_"+d.idx+"_scrollbar mCS-"+o.theme+" mCSB_scrollTools_horizontal"+expandClass+"'><div class='"+classes[12]+"'><div id='mCSB_"+d.idx+"_dragger_horizontal' class='mCSB_dragger' style='position:absolute;'><div class='mCSB_dragger_bar' /></div><div class='mCSB_draggerRail' /></div></div>"], 1777 wrapperClass=o.axis==="yx" ? "mCSB_vertical_horizontal" : o.axis==="x" ? "mCSB_horizontal" : "mCSB_vertical", 1778 scrollbars=o.axis==="yx" ? scrollbar[0]+scrollbar[1] : o.axis==="x" ? scrollbar[1] : scrollbar[0], 1779 contentWrapper=o.axis==="yx" ? "<div id='mCSB_"+d.idx+"_container_wrapper' class='mCSB_container_wrapper' />" : "", 1780 autoHideClass=o.autoHideScrollbar ? " "+classes[6] : "", 1781 scrollbarDirClass=(o.axis!=="x" && d.langDir==="rtl") ? " "+classes[7] : ""; 1782 if(o.setWidth){$this.css("width",o.setWidth);} /* set element width */ 1783 if(o.setHeight){$this.css("height",o.setHeight);} /* set element height */ 1784 o.setLeft=(o.axis!=="y" && d.langDir==="rtl") ? "989999px" : o.setLeft; /* adjust left position for rtl direction */ 1785 $this.addClass(pluginNS+" _"+pluginPfx+"_"+d.idx+autoHideClass+scrollbarDirClass).wrapInner("<div id='mCSB_"+d.idx+"' class='mCustomScrollBox mCS-"+o.theme+" "+wrapperClass+"'><div id='mCSB_"+d.idx+"_container' class='mCSB_container' style='position:relative; top:"+o.setTop+"; left:"+o.setLeft+";' dir='"+d.langDir+"' /></div>"); 1786 var mCustomScrollBox=$("#mCSB_"+d.idx), 1787 mCSB_container=$("#mCSB_"+d.idx+"_container"); 1788 if(o.axis!=="y" && !o.advanced.autoExpandHorizontalScroll){ 1789 mCSB_container.css("width",_contentWidth(mCSB_container)); 1790 } 1791 if(o.scrollbarPosition==="outside"){ 1792 if($this.css("position")==="static"){ /* requires elements with non-static position */ 1793 $this.css("position","relative"); 1794 } 1795 $this.css("overflow","visible"); 1796 mCustomScrollBox.addClass("mCSB_outside").after(scrollbars); 1797 }else{ 1798 mCustomScrollBox.addClass("mCSB_inside").append(scrollbars); 1799 mCSB_container.wrap(contentWrapper); 1800 } 1801 _scrollButtons.call(this); /* add scrollbar buttons */ 1802 /* minimum dragger length */ 1803 var mCSB_dragger=[$("#mCSB_"+d.idx+"_dragger_vertical"),$("#mCSB_"+d.idx+"_dragger_horizontal")]; 1804 mCSB_dragger[0].css("min-height",mCSB_dragger[0].height()); 1805 mCSB_dragger[1].css("min-width",mCSB_dragger[1].width()); 1806 }, 1807 /* -------------------- */ 1808 1809 1810 /* calculates content width */ 1811 _contentWidth=function(el){ 1812 var val=[el[0].scrollWidth,Math.max.apply(Math,el.children().map(function(){return $(this).outerWidth(true);}).get())],w=el.parent().width(); 1813 return val[0]>w ? val[0] : val[1]>w ? val[1] : "100%"; 1814 }, 1815 /* -------------------- */ 1816 1817 1818 /* expands content horizontally */ 1819 _expandContentHorizontally=function(){ 1820 var $this=$(this),d=$this.data(pluginPfx),o=d.opt, 1821 mCSB_container=$("#mCSB_"+d.idx+"_container"); 1822 if(o.advanced.autoExpandHorizontalScroll && o.axis!=="y"){ 1823 /* calculate scrollWidth */ 1824 mCSB_container.css({"width":"auto","min-width":0,"overflow-x":"scroll"}); 1825 var w=Math.ceil(mCSB_container[0].scrollWidth); 1826 if(o.advanced.autoExpandHorizontalScroll===3 || (o.advanced.autoExpandHorizontalScroll!==2 && w>mCSB_container.parent().width())){ 1827 mCSB_container.css({"width":w,"min-width":"100%","overflow-x":"inherit"}); 1828 }else{ 1829 /* 1830 wrap content with an infinite width div and set its position to absolute and width to auto. 1831 Setting width to auto before calculating the actual width is important! 1832 We must let the browser set the width as browser zoom values are impossible to calculate. 1833 */ 1834 mCSB_container.css({"overflow-x":"inherit","position":"absolute"}) 1835 .wrap("<div class='mCSB_h_wrapper' style='position:relative; left:0; width:999999px;' />") 1836 .css({ /* set actual width, original position and un-wrap */ 1837 /* 1838 get the exact width (with decimals) and then round-up. 1839 Using jquery outerWidth() will round the width value which will mess up with inner elements that have non-integer width 1840 */ 1841 "width":(Math.ceil(mCSB_container[0].getBoundingClientRect().right+0.4)-Math.floor(mCSB_container[0].getBoundingClientRect().left)), 1842 "min-width":"100%", 1843 "position":"relative" 1844 }).unwrap(); 1845 } 1846 } 1847 }, 1848 /* -------------------- */ 1849 1850 1851 /* adds scrollbar buttons */ 1852 _scrollButtons=function(){ 1853 var $this=$(this),d=$this.data(pluginPfx),o=d.opt, 1854 mCSB_scrollTools=$(".mCSB_"+d.idx+"_scrollbar:first"), 1855 tabindex=!_isNumeric(o.scrollButtons.tabindex) ? "" : "tabindex='"+o.scrollButtons.tabindex+"'", 1856 btnHTML=[ 1857 "<a href='#' class='"+classes[13]+"' "+tabindex+" />", 1858 "<a href='#' class='"+classes[14]+"' "+tabindex+" />", 1859 "<a href='#' class='"+classes[15]+"' "+tabindex+" />", 1860 "<a href='#' class='"+classes[16]+"' "+tabindex+" />" 1861 ], 1862 btn=[(o.axis==="x" ? btnHTML[2] : btnHTML[0]),(o.axis==="x" ? btnHTML[3] : btnHTML[1]),btnHTML[2],btnHTML[3]]; 1863 if(o.scrollButtons.enable){ 1864 mCSB_scrollTools.prepend(btn[0]).append(btn[1]).next(".mCSB_scrollTools").prepend(btn[2]).append(btn[3]); 1865 } 1866 }, 1867 /* -------------------- */ 1868 1869 1870 /* auto-adjusts scrollbar dragger length */ 1871 _setDraggerLength=function(){ 1872 var $this=$(this),d=$this.data(pluginPfx), 1873 mCustomScrollBox=$("#mCSB_"+d.idx), 1874 mCSB_container=$("#mCSB_"+d.idx+"_container"), 1875 mCSB_dragger=[$("#mCSB_"+d.idx+"_dragger_vertical"),$("#mCSB_"+d.idx+"_dragger_horizontal")], 1876 ratio=[mCustomScrollBox.height()/mCSB_container.outerHeight(false),mCustomScrollBox.width()/mCSB_container.outerWidth(false)], 1877 l=[ 1878 parseInt(mCSB_dragger[0].css("min-height")),Math.round(ratio[0]*mCSB_dragger[0].parent().height()), 1879 parseInt(mCSB_dragger[1].css("min-width")),Math.round(ratio[1]*mCSB_dragger[1].parent().width()) 1880 ], 1881 h=oldIE && (l[1]<l[0]) ? l[0] : l[1],w=oldIE && (l[3]<l[2]) ? l[2] : l[3]; 1882 mCSB_dragger[0].css({ 1883 "height":h,"max-height":(mCSB_dragger[0].parent().height()-10) 1884 }).find(".mCSB_dragger_bar").css({"line-height":l[0]+"px"}); 1885 mCSB_dragger[1].css({ 1886 "width":w,"max-width":(mCSB_dragger[1].parent().width()-10) 1887 }); 1888 }, 1889 /* -------------------- */ 1890 1891 1892 /* calculates scrollbar to content ratio */ 1893 _scrollRatio=function(){ 1894 var $this=$(this),d=$this.data(pluginPfx), 1895 mCustomScrollBox=$("#mCSB_"+d.idx), 1896 mCSB_container=$("#mCSB_"+d.idx+"_container"), 1897 mCSB_dragger=[$("#mCSB_"+d.idx+"_dragger_vertical"),$("#mCSB_"+d.idx+"_dragger_horizontal")], 1898 scrollAmount=[mCSB_container.outerHeight(false)-mCustomScrollBox.height(),mCSB_container.outerWidth(false)-mCustomScrollBox.width()], 1899 ratio=[ 1900 scrollAmount[0]/(mCSB_dragger[0].parent().height()-mCSB_dragger[0].height()), 1901 scrollAmount[1]/(mCSB_dragger[1].parent().width()-mCSB_dragger[1].width()) 1902 ]; 1903 d.scrollRatio={y:ratio[0],x:ratio[1]}; 1904 }, 1905 /* -------------------- */ 1906 1907 1908 /* toggles scrolling classes */ 1909 _onDragClasses=function(el,action,xpnd){ 1910 var expandClass=xpnd ? classes[0]+"_expanded" : "", 1911 scrollbar=el.closest(".mCSB_scrollTools"); 1912 if(action==="active"){ 1913 el.toggleClass(classes[0]+" "+expandClass); scrollbar.toggleClass(classes[1]); 1914 el[0]._draggable=el[0]._draggable ? 0 : 1; 1915 }else{ 1916 if(!el[0]._draggable){ 1917 if(action==="hide"){ 1918 el.removeClass(classes[0]); scrollbar.removeClass(classes[1]); 1919 }else{ 1920 el.addClass(classes[0]); scrollbar.addClass(classes[1]); 1921 } 1922 } 1923 } 1924 }, 1925 /* -------------------- */ 1926 1927 1928 /* checks if content overflows its container to determine if scrolling is required */ 1929 _overflowed=function(){ 1930 var $this=$(this),d=$this.data(pluginPfx), 1931 mCustomScrollBox=$("#mCSB_"+d.idx), 1932 mCSB_container=$("#mCSB_"+d.idx+"_container"), 1933 contentHeight=d.overflowed==null ? mCSB_container.height() : mCSB_container.outerHeight(false), 1934 contentWidth=d.overflowed==null ? mCSB_container.width() : mCSB_container.outerWidth(false), 1935 h=mCSB_container[0].scrollHeight,w=mCSB_container[0].scrollWidth; 1936 if(h>contentHeight){contentHeight=h;} 1937 if(w>contentWidth){contentWidth=w;} 1938 return [contentHeight>mCustomScrollBox.height(),contentWidth>mCustomScrollBox.width()]; 1939 }, 1940 /* -------------------- */ 1941 1942 1943 /* resets content position to 0 */ 1944 _resetContentPosition=function(){ 1945 var $this=$(this),d=$this.data(pluginPfx),o=d.opt, 1946 mCustomScrollBox=$("#mCSB_"+d.idx), 1947 mCSB_container=$("#mCSB_"+d.idx+"_container"), 1948 mCSB_dragger=[$("#mCSB_"+d.idx+"_dragger_vertical"),$("#mCSB_"+d.idx+"_dragger_horizontal")]; 1949 _stop($this); /* stop any current scrolling before resetting */ 1950 if((o.axis!=="x" && !d.overflowed[0]) || (o.axis==="y" && d.overflowed[0])){ /* reset y */ 1951 mCSB_dragger[0].add(mCSB_container).css("top",0); 1952 _scrollTo($this,"_resetY"); 1953 } 1954 if((o.axis!=="y" && !d.overflowed[1]) || (o.axis==="x" && d.overflowed[1])){ /* reset x */ 1955 var cx=dx=0; 1956 if(d.langDir==="rtl"){ /* adjust left position for rtl direction */ 1957 cx=mCustomScrollBox.width()-mCSB_container.outerWidth(false); 1958 dx=Math.abs(cx/d.scrollRatio.x); 1959 } 1960 mCSB_container.css("left",cx); 1961 mCSB_dragger[1].css("left",dx); 1962 _scrollTo($this,"_resetX"); 1963 } 1964 }, 1965 /* -------------------- */ 1966 1967 1968 /* binds scrollbar events */ 1969 _bindEvents=function(){ 1970 var $this=$(this),d=$this.data(pluginPfx),o=d.opt; 1971 if(!d.bindEvents){ /* check if events are already bound */ 1972 _draggable.call(this); 1973 if(o.contentTouchScroll){_contentDraggable.call(this);} 1974 _selectable.call(this); 1975 if(o.mouseWheel.enable){ /* bind mousewheel fn when plugin is available */ 1976 function _mwt(){ 1977 mousewheelTimeout=setTimeout(function(){ 1978 if(!$.event.special.mousewheel){ 1979 _mwt(); 1980 }else{ 1981 clearTimeout(mousewheelTimeout); 1982 _mousewheel.call($this[0]); 1983 } 1984 },100); 1985 } 1986 var mousewheelTimeout; 1987 _mwt(); 1988 } 1989 _draggerRail.call(this); 1990 _wrapperScroll.call(this); 1991 if(o.advanced.autoScrollOnFocus){_focus.call(this);} 1992 if(o.scrollButtons.enable){_buttons.call(this);} 1993 if(o.keyboard.enable){_keyboard.call(this);} 1994 d.bindEvents=true; 1995 } 1996 }, 1997 /* -------------------- */ 1998 1999 2000 /* unbinds scrollbar events */ 2001 _unbindEvents=function(){ 2002 var $this=$(this),d=$this.data(pluginPfx),o=d.opt, 2003 namespace=pluginPfx+"_"+d.idx, 2004 sb=".mCSB_"+d.idx+"_scrollbar", 2005 sel=$("#mCSB_"+d.idx+",#mCSB_"+d.idx+"_container,#mCSB_"+d.idx+"_container_wrapper,"+sb+" ."+classes[12]+",#mCSB_"+d.idx+"_dragger_vertical,#mCSB_"+d.idx+"_dragger_horizontal,"+sb+">a"), 2006 mCSB_container=$("#mCSB_"+d.idx+"_container"); 2007 if(o.advanced.releaseDraggableSelectors){sel.add($(o.advanced.releaseDraggableSelectors));} 2008 if(o.advanced.extraDraggableSelectors){sel.add($(o.advanced.extraDraggableSelectors));} 2009 if(d.bindEvents){ /* check if events are bound */ 2010 /* unbind namespaced events from document/selectors */ 2011
2011$(document).add($(!_canAccessIFrame() || top.document
vendor: 3,898 bytes, lines 2011-2103
2011)).unbind("."+namespace); 2012 sel.each(function(){ 2013 $(this).unbind("."+namespace); 2014 }); 2015 /* clear and delete timeouts/objects */ 2016 clearTimeout($this[0]._focusTimeout); _delete($this[0],"_focusTimeout"); 2017 clearTimeout(d.sequential.step); _delete(d.sequential,"step"); 2018 clearTimeout(mCSB_container[0].onCompleteTimeout); _delete(mCSB_container[0],"onCompleteTimeout"); 2019 d.bindEvents=false; 2020 } 2021 }, 2022 /* -------------------- */ 2023 2024 2025 /* toggles scrollbar visibility */ 2026 _scrollbarVisibility=function(disabled){ 2027 var $this=$(this),d=$this.data(pluginPfx),o=d.opt, 2028 contentWrapper=$("#mCSB_"+d.idx+"_container_wrapper"), 2029 content=contentWrapper.length ? contentWrapper : $("#mCSB_"+d.idx+"_container"), 2030 scrollbar=[$("#mCSB_"+d.idx+"_scrollbar_vertical"),$("#mCSB_"+d.idx+"_scrollbar_horizontal")], 2031 mCSB_dragger=[scrollbar[0].find(".mCSB_dragger"),scrollbar[1].find(".mCSB_dragger")]; 2032 if(o.axis!=="x"){ 2033 if(d.overflowed[0] && !disabled){ 2034 scrollbar[0].add(mCSB_dragger[0]).add(scrollbar[0].children("a")).css("display","block"); 2035 content.removeClass(classes[8]+" "+classes[10]); 2036 }else{ 2037 if(o.alwaysShowScrollbar){ 2038 if(o.alwaysShowScrollbar!==2){mCSB_dragger[0].css("display","none");} 2039 content.removeClass(classes[10]); 2040 }else{ 2041 scrollbar[0].css("display","none"); 2042 content.addClass(classes[10]); 2043 } 2044 content.addClass(classes[8]); 2045 } 2046 } 2047 if(o.axis!=="y"){ 2048 if(d.overflowed[1] && !disabled){ 2049 scrollbar[1].add(mCSB_dragger[1]).add(scrollbar[1].children("a")).css("display","block"); 2050 content.removeClass(classes[9]+" "+classes[11]); 2051 }else{ 2052 if(o.alwaysShowScrollbar){ 2053 if(o.alwaysShowScrollbar!==2){mCSB_dragger[1].css("display","none");} 2054 content.removeClass(classes[11]); 2055 }else{ 2056 scrollbar[1].css("display","none"); 2057 content.addClass(classes[11]); 2058 } 2059 content.addClass(classes[9]); 2060 } 2061 } 2062 if(!d.overflowed[0] && !d.overflowed[1]){ 2063 $this.addClass(classes[5]); 2064 }else{ 2065 $this.removeClass(classes[5]); 2066 } 2067 }, 2068 /* -------------------- */ 2069 2070 2071 /* returns input coordinates of pointer, touch and mouse events (relative to document) */ 2072 _coordinates=function(e){ 2073 var t=e.type,o=e.target.ownerDocument!==document && frameElement!==null ? [$(frameElement).offset().top,$(frameElement).offset().left] : null, 2074 io=_canAccessIFrame() && e.target.ownerDocument!==top.document && frameElement!==null ? [$(e.view.frameElement).offset().top,$(e.view.frameElement).offset().left] : [0,0]; 2075 switch(t){ 2076 case "pointerdown": case "MSPointerDown": case "pointermove": case "MSPointerMove": case "pointerup": case "MSPointerUp": 2077 return o ? [e.originalEvent.pageY-o[0]+io[0],e.originalEvent.pageX-o[1]+io[1],false] : [e.originalEvent.pageY,e.originalEvent.pageX,false]; 2078 break; 2079 case "touchstart": case "touchmove": case "touchend": 2080 var touch=e.originalEvent.touches[0] || e.originalEvent.changedTouches[0], 2081 touches=e.originalEvent.touches.length || e.originalEvent.changedTouches.length; 2082 return e.target.ownerDocument!==document ? [touch.screenY,touch.screenX,touches>1] : [touch.pageY,touch.pageX,touches>1]; 2083 break; 2084 default: 2085 return o ? [e.pageY-o[0]+io[0],e.pageX-o[1]+io[1],false] : [e.pageY,e.pageX,false]; 2086 } 2087 }, 2088 /* -------------------- */ 2089 2090 2091 /* 2092 SCROLLBAR DRAG EVENTS 2093 scrolls content via scrollbar dragging 2094 */ 2095 _draggable=function(){ 2096 var $this=$(this),d=$this.data(pluginPfx),o=d.opt, 2097 namespace=pluginPfx+"_"+d.idx, 2098 draggerId=["mCSB_"+d.idx+"_dragger_vertical","mCSB_"+d.idx+"_dragger_horizontal"], 2099 mCSB_container=$("#mCSB_"+d.idx+"_container"), 2100 mCSB_dragger=$("#"+draggerId[0]+",#"+draggerId[1]), 2101 draggable,dragY,dragX, 2102 rds=o.advanced.releaseDraggableSelectors ? mCSB_dragger.add($(o.advanced.releaseDraggableSelectors)) : mCSB_dragger, 2103
2103eds=o.advanced.extraDraggableSelectors ? $(!_canAccessIFrame() || top.document).add($(o.advanced.extraDraggableSelectors)) : $(!_canAccessIFrame() || top.document
vendor: 48,256 bytes, lines 2103-3369
2103); 2104 mCSB_dragger.bind("contextmenu."+namespace,function(e){ 2105 e.preventDefault(); //prevent right click 2106 }).bind("mousedown."+namespace+" touchstart."+namespace+" pointerdown."+namespace+" MSPointerDown."+namespace,function(e){ 2107 e.stopImmediatePropagation(); 2108 e.preventDefault(); 2109 if(!_mouseBtnLeft(e)){return;} /* left mouse button only */ 2110 touchActive=true; 2111 if(oldIE){document.onselectstart=function(){return false;}} /* disable text selection for IE < 9 */ 2112 _iframe.call(mCSB_container,false); /* enable scrollbar dragging over iframes by disabling their events */ 2113 _stop($this); 2114 draggable=$(this); 2115 var offset=draggable.offset(),y=_coordinates(e)[0]-offset.top,x=_coordinates(e)[1]-offset.left, 2116 h=draggable.height()+offset.top,w=draggable.width()+offset.left; 2117 if(y<h && y>0 && x<w && x>0){ 2118 dragY=y; 2119 dragX=x; 2120 } 2121 _onDragClasses(draggable,"active",o.autoExpandScrollbar); 2122 }).bind("touchmove."+namespace,function(e){ 2123 e.stopImmediatePropagation(); 2124 e.preventDefault(); 2125 var offset=draggable.offset(),y=_coordinates(e)[0]-offset.top,x=_coordinates(e)[1]-offset.left; 2126 _drag(dragY,dragX,y,x); 2127 }); 2128 $(document).add(eds).bind("mousemove."+namespace+" pointermove."+namespace+" MSPointerMove."+namespace,function(e){ 2129 if(draggable){ 2130 var offset=draggable.offset(),y=_coordinates(e)[0]-offset.top,x=_coordinates(e)[1]-offset.left; 2131 if(dragY===y && dragX===x){return;} /* has it really moved? */ 2132 _drag(dragY,dragX,y,x); 2133 } 2134 }).add(rds).bind("mouseup."+namespace+" touchend."+namespace+" pointerup."+namespace+" MSPointerUp."+namespace,function(e){ 2135 if(draggable){ 2136 _onDragClasses(draggable,"active",o.autoExpandScrollbar); 2137 draggable=null; 2138 } 2139 touchActive=false; 2140 if(oldIE){document.onselectstart=null;} /* enable text selection for IE < 9 */ 2141 _iframe.call(mCSB_container,true); /* enable iframes events */ 2142 }); 2143 function _drag(dragY,dragX,y,x){ 2144 mCSB_container[0].idleTimer=o.scrollInertia<233 ? 250 : 0; 2145 if(draggable.attr("id")===draggerId[1]){ 2146 var dir="x",to=((draggable[0].offsetLeft-dragX)+x)*d.scrollRatio.x; 2147 }else{ 2148 var dir="y",to=((draggable[0].offsetTop-dragY)+y)*d.scrollRatio.y; 2149 } 2150 _scrollTo($this,to.toString(),{dir:dir,drag:true}); 2151 } 2152 }, 2153 /* -------------------- */ 2154 2155 2156 /* 2157 TOUCH SWIPE EVENTS 2158 scrolls content via touch swipe 2159 Emulates the native touch-swipe scrolling with momentum found in iOS, Android and WP devices 2160 */ 2161 _contentDraggable=function(){ 2162 var $this=$(this),d=$this.data(pluginPfx),o=d.opt, 2163 namespace=pluginPfx+"_"+d.idx, 2164 mCustomScrollBox=$("#mCSB_"+d.idx), 2165 mCSB_container=$("#mCSB_"+d.idx+"_container"), 2166 mCSB_dragger=[$("#mCSB_"+d.idx+"_dragger_vertical"),$("#mCSB_"+d.idx+"_dragger_horizontal")], 2167 draggable,dragY,dragX,touchStartY,touchStartX,touchMoveY=[],touchMoveX=[],startTime,runningTime,endTime,distance,speed,amount, 2168 durA=0,durB,overwrite=o.axis==="yx" ? "none" : "all",touchIntent=[],touchDrag,docDrag, 2169 iframe=mCSB_container.find("iframe"), 2170 events=[ 2171 "touchstart."+namespace+" pointerdown."+namespace+" MSPointerDown."+namespace, //start 2172 "touchmove."+namespace+" pointermove."+namespace+" MSPointerMove."+namespace, //move 2173 "touchend."+namespace+" pointerup."+namespace+" MSPointerUp."+namespace //end 2174 ], 2175 touchAction=document.body.style.touchAction!==undefined && document.body.style.touchAction!==""; 2176 mCSB_container.bind(events[0],function(e){ 2177 _onTouchstart(e); 2178 }).bind(events[1],function(e){ 2179 _onTouchmove(e); 2180 }); 2181 mCustomScrollBox.bind(events[0],function(e){ 2182 _onTouchstart2(e); 2183 }).bind(events[2],function(e){ 2184 _onTouchend(e); 2185 }); 2186 if(iframe.length){ 2187 iframe.each(function(){ 2188 $(this).bind("load",function(){ 2189 /* bind events on accessible iframes */ 2190 if(_canAccessIFrame(this)){ 2191 $(this.contentDocument || this.contentWindow.document).bind(events[0],function(e){ 2192 _onTouchstart(e); 2193 _onTouchstart2(e); 2194 }).bind(events[1],function(e){ 2195 _onTouchmove(e); 2196 }).bind(events[2],function(e){ 2197 _onTouchend(e); 2198 }); 2199 } 2200 }); 2201 }); 2202 } 2203 function _onTouchstart(e){ 2204 if(!_pointerTouch(e) || touchActive || _coordinates(e)[2]){touchable=0; return;} 2205 touchable=1; touchDrag=0; docDrag=0; draggable=1; 2206 $this.removeClass("mCS_touch_action"); 2207 var offset=mCSB_container.offset(); 2208 dragY=_coordinates(e)[0]-offset.top; 2209 dragX=_coordinates(e)[1]-offset.left; 2210 touchIntent=[_coordinates(e)[0],_coordinates(e)[1]]; 2211 } 2212 function _onTouchmove(e){ 2213 if(!_pointerTouch(e) || touchActive || _coordinates(e)[2]){return;} 2214 if(!o.documentTouchScroll){e.preventDefault();} 2215 e.stopImmediatePropagation(); 2216 if(docDrag && !touchDrag){return;} 2217 if(draggable){ 2218 runningTime=_getTime(); 2219 var offset=mCustomScrollBox.offset(),y=_coordinates(e)[0]-offset.top,x=_coordinates(e)[1]-offset.left, 2220 easing="mcsLinearOut"; 2221 touchMoveY.push(y); 2222 touchMoveX.push(x); 2223 touchIntent[2]=Math.abs(_coordinates(e)[0]-touchIntent[0]); touchIntent[3]=Math.abs(_coordinates(e)[1]-touchIntent[1]); 2224 if(d.overflowed[0]){ 2225 var limit=mCSB_dragger[0].parent().height()-mCSB_dragger[0].height(), 2226 prevent=((dragY-y)>0 && (y-dragY)>-(limit*d.scrollRatio.y) && (touchIntent[3]*2<touchIntent[2] || o.axis==="yx")); 2227 } 2228 if(d.overflowed[1]){ 2229 var limitX=mCSB_dragger[1].parent().width()-mCSB_dragger[1].width(), 2230 preventX=((dragX-x)>0 && (x-dragX)>-(limitX*d.scrollRatio.x) && (touchIntent[2]*2<touchIntent[3] || o.axis==="yx")); 2231 } 2232 if(prevent || preventX){ /* prevent native document scrolling */ 2233 if(!touchAction){e.preventDefault();} 2234 touchDrag=1; 2235 }else{ 2236 docDrag=1; 2237 $this.addClass("mCS_touch_action"); 2238 } 2239 if(touchAction){e.preventDefault();} 2240 amount=o.axis==="yx" ? [(dragY-y),(dragX-x)] : o.axis==="x" ? [null,(dragX-x)] : [(dragY-y),null]; 2241 mCSB_container[0].idleTimer=250; 2242 if(d.overflowed[0]){_drag(amount[0],durA,easing,"y","all",true);} 2243 if(d.overflowed[1]){_drag(amount[1],durA,easing,"x",overwrite,true);} 2244 } 2245 } 2246 function _onTouchstart2(e){ 2247 if(!_pointerTouch(e) || touchActive || _coordinates(e)[2]){touchable=0; return;} 2248 touchable=1; 2249 e.stopImmediatePropagation(); 2250 _stop($this); 2251 startTime=_getTime(); 2252 var offset=mCustomScrollBox.offset(); 2253 touchStartY=_coordinates(e)[0]-offset.top; 2254 touchStartX=_coordinates(e)[1]-offset.left; 2255 touchMoveY=[]; touchMoveX=[]; 2256 } 2257 function _onTouchend(e){ 2258 if(!_pointerTouch(e) || touchActive || _coordinates(e)[2]){return;} 2259 draggable=0; 2260 e.stopImmediatePropagation(); 2261 touchDrag=0; docDrag=0; 2262 endTime=_getTime(); 2263 var offset=mCustomScrollBox.offset(),y=_coordinates(e)[0]-offset.top,x=_coordinates(e)[1]-offset.left; 2264 if((endTime-runningTime)>30){return;} 2265 speed=1000/(endTime-startTime); 2266 var easing="mcsEaseOut",slow=speed<2.5, 2267 diff=slow ? [touchMoveY[touchMoveY.length-2],touchMoveX[touchMoveX.length-2]] : [0,0]; 2268 distance=slow ? [(y-diff[0]),(x-diff[1])] : [y-touchStartY,x-touchStartX]; 2269 var absDistance=[Math.abs(distance[0]),Math.abs(distance[1])]; 2270 speed=slow ? [Math.abs(distance[0]/4),Math.abs(distance[1]/4)] : [speed,speed]; 2271 var a=[ 2272 Math.abs(mCSB_container[0].offsetTop)-(distance[0]*_m((absDistance[0]/speed[0]),speed[0])), 2273 Math.abs(mCSB_container[0].offsetLeft)-(distance[1]*_m((absDistance[1]/speed[1]),speed[1])) 2274 ]; 2275 amount=o.axis==="yx" ? [a[0],a[1]] : o.axis==="x" ? [null,a[1]] : [a[0],null]; 2276 durB=[(absDistance[0]*4)+o.scrollInertia,(absDistance[1]*4)+o.scrollInertia]; 2277 var md=parseInt(o.contentTouchScroll) || 0; /* absolute minimum distance required */ 2278 amount[0]=absDistance[0]>md ? amount[0] : 0; 2279 amount[1]=absDistance[1]>md ? amount[1] : 0; 2280 if(d.overflowed[0]){_drag(amount[0],durB[0],easing,"y",overwrite,false);} 2281 if(d.overflowed[1]){_drag(amount[1],durB[1],easing,"x",overwrite,false);} 2282 } 2283 function _m(ds,s){ 2284 var r=[s*1.5,s*2,s/1.5,s/2]; 2285 if(ds>90){ 2286 return s>4 ? r[0] : r[3]; 2287 }else if(ds>60){ 2288 return s>3 ? r[3] : r[2]; 2289 }else if(ds>30){ 2290 return s>8 ? r[1] : s>6 ? r[0] : s>4 ? s : r[2]; 2291 }else{ 2292 return s>8 ? s : r[3]; 2293 } 2294 } 2295 function _drag(amount,dur,easing,dir,overwrite,drag){ 2296 if(!amount){return;} 2297 _scrollTo($this,amount.toString(),{dur:dur,scrollEasing:easing,dir:dir,overwrite:overwrite,drag:drag}); 2298 } 2299 }, 2300 /* -------------------- */ 2301 2302 2303 /* 2304 SELECT TEXT EVENTS 2305 scrolls content when text is selected 2306 */ 2307 _selectable=function(){ 2308 var $this=$(this),d=$this.data(pluginPfx),o=d.opt,seq=d.sequential, 2309 namespace=pluginPfx+"_"+d.idx, 2310 mCSB_container=$("#mCSB_"+d.idx+"_container"), 2311 wrapper=mCSB_container.parent(), 2312 action; 2313 mCSB_container.bind("mousedown."+namespace,function(e){ 2314 if(touchable){return;} 2315 if(!action){action=1; touchActive=true;} 2316 }).add(document).bind("mousemove."+namespace,function(e){ 2317 if(!touchable && action && _sel()){ 2318 var offset=mCSB_container.offset(), 2319 y=_coordinates(e)[0]-offset.top+mCSB_container[0].offsetTop,x=_coordinates(e)[1]-offset.left+mCSB_container[0].offsetLeft; 2320 if(y>0 && y<wrapper.height() && x>0 && x<wrapper.width()){ 2321 if(seq.step){_seq("off",null,"stepped");} 2322 }else{ 2323 if(o.axis!=="x" && d.overflowed[0]){ 2324 if(y<0){ 2325 _seq("on",38); 2326 }else if(y>wrapper.height()){ 2327 _seq("on",40); 2328 } 2329 } 2330 if(o.axis!=="y" && d.overflowed[1]){ 2331 if(x<0){ 2332 _seq("on",37); 2333 }else if(x>wrapper.width()){ 2334 _seq("on",39); 2335 } 2336 } 2337 } 2338 } 2339 }).bind("mouseup."+namespace+" dragend."+namespace,function(e){ 2340 if(touchable){return;} 2341 if(action){action=0; _seq("off",null);} 2342 touchActive=false; 2343 }); 2344 function _sel(){ 2345 return window.getSelection ? window.getSelection().toString() : 2346 document.selection && document.selection.type!="Control" ? document.selection.createRange().text : 0; 2347 } 2348 function _seq(a,c,s){ 2349 seq.type=s && action ? "stepped" : "stepless"; 2350 seq.scrollAmount=10; 2351 _sequentialScroll($this,a,c,"mcsLinearOut",s ? 60 : null); 2352 } 2353 }, 2354 /* -------------------- */ 2355 2356 2357 /* 2358 MOUSE WHEEL EVENT 2359 scrolls content via mouse-wheel 2360 via mouse-wheel plugin (https://github.com/brandonaaron/jquery-mousewheel) 2361 */ 2362 _mousewheel=function(){ 2363 if(!$(this).data(pluginPfx)){return;} /* Check if the scrollbar is ready to use mousewheel events (issue: #185) */ 2364 var $this=$(this),d=$this.data(pluginPfx),o=d.opt, 2365 namespace=pluginPfx+"_"+d.idx, 2366 mCustomScrollBox=$("#mCSB_"+d.idx), 2367 mCSB_dragger=[$("#mCSB_"+d.idx+"_dragger_vertical"),$("#mCSB_"+d.idx+"_dragger_horizontal")], 2368 iframe=$("#mCSB_"+d.idx+"_container").find("iframe"); 2369 if(iframe.length){ 2370 iframe.each(function(){ 2371 $(this).bind("load",function(){ 2372 /* bind events on accessible iframes */ 2373 if(_canAccessIFrame(this)){ 2374 $(this.contentDocument || this.contentWindow.document).bind("mousewheel."+namespace,function(e,delta){ 2375 _onMousewheel(e,delta); 2376 }); 2377 } 2378 }); 2379 }); 2380 } 2381 mCustomScrollBox.bind("mousewheel."+namespace,function(e,delta){ 2382 _onMousewheel(e,delta); 2383 }); 2384 function _onMousewheel(e,delta){ 2385 _stop($this); 2386 if(_disableMousewheel($this,e.target)){return;} /* disables mouse-wheel when hovering specific elements */ 2387 var deltaFactor=o.mouseWheel.deltaFactor!=="auto" ? parseInt(o.mouseWheel.deltaFactor) : (oldIE && e.deltaFactor<100) ? 100 : e.deltaFactor || 100, 2388 dur=o.scrollInertia; 2389 if(o.axis==="x" || o.mouseWheel.axis==="x"){ 2390 var dir="x", 2391 px=[Math.round(deltaFactor*d.scrollRatio.x),parseInt(o.mouseWheel.scrollAmount)], 2392 amount=o.mouseWheel.scrollAmount!=="auto" ? px[1] : px[0]>=mCustomScrollBox.width() ? mCustomScrollBox.width()*0.9 : px[0], 2393 contentPos=Math.abs($("#mCSB_"+d.idx+"_container")[0].offsetLeft), 2394 draggerPos=mCSB_dragger[1][0].offsetLeft, 2395 limit=mCSB_dragger[1].parent().width()-mCSB_dragger[1].width(), 2396 dlt=o.mouseWheel.axis==="y" ? (e.deltaY || delta) : e.deltaX; 2397 }else{ 2398 var dir="y", 2399 px=[Math.round(deltaFactor*d.scrollRatio.y),parseInt(o.mouseWheel.scrollAmount)], 2400 amount=o.mouseWheel.scrollAmount!=="auto" ? px[1] : px[0]>=mCustomScrollBox.height() ? mCustomScrollBox.height()*0.9 : px[0], 2401 contentPos=Math.abs($("#mCSB_"+d.idx+"_container")[0].offsetTop), 2402 draggerPos=mCSB_dragger[0][0].offsetTop, 2403 limit=mCSB_dragger[0].parent().height()-mCSB_dragger[0].height(), 2404 dlt=e.deltaY || delta; 2405 } 2406 if((dir==="y" && !d.overflowed[0]) || (dir==="x" && !d.overflowed[1])){return;} 2407 if(o.mouseWheel.invert || e.webkitDirectionInvertedFromDevice){dlt=-dlt;} 2408 if(o.mouseWheel.normalizeDelta){dlt=dlt<0 ? -1 : 1;} 2409 if((dlt>0 && draggerPos!==0) || (dlt<0 && draggerPos!==limit) || o.mouseWheel.preventDefault){ 2410 e.stopImmediatePropagation(); 2411 e.preventDefault(); 2412 } 2413 if(e.deltaFactor<5 && !o.mouseWheel.normalizeDelta){ 2414 //very low deltaFactor values mean some kind of delta acceleration (e.g. osx trackpad), so adjusting scrolling accordingly 2415 amount=e.deltaFactor; dur=17; 2416 } 2417 _scrollTo($this,(contentPos-(dlt*amount)).toString(),{dir:dir,dur:dur}); 2418 } 2419 }, 2420 /* -------------------- */ 2421 2422 2423 /* checks if iframe can be accessed */ 2424 _canAccessIFrameCache=new Object(), 2425 _canAccessIFrame=function(iframe){ 2426 var result=false,cacheKey=false,html=null; 2427 if(iframe===undefined){ 2428 cacheKey="#empty"; 2429 }else if($(iframe).attr("id")!==undefined){ 2430 cacheKey=$(iframe).attr("id"); 2431 } 2432 if(cacheKey!==false && _canAccessIFrameCache[cacheKey]!==undefined){ 2433 return _canAccessIFrameCache[cacheKey]; 2434 } 2435 if(!iframe){ 2436 try{ 2437 var doc=top.document; 2438 html=doc.body.innerHTML; 2439 }catch(err){/* do nothing */} 2440 result=(html!==null); 2441 }else{ 2442 try{ 2443 var doc=iframe.contentDocument || iframe.contentWindow.document; 2444 html=doc.body.innerHTML; 2445 }catch(err){/* do nothing */} 2446 result=(html!==null); 2447 } 2448 if(cacheKey!==false){_canAccessIFrameCache[cacheKey]=result;} 2449 return result; 2450 }, 2451 /* -------------------- */ 2452 2453 2454 /* switches iframe's pointer-events property (drag, mousewheel etc. over cross-domain iframes) */ 2455 _iframe=function(evt){ 2456 var el=this.find("iframe"); 2457 if(!el.length){return;} /* check if content contains iframes */ 2458 var val=!evt ? "none" : "auto"; 2459 el.css("pointer-events",val); /* for IE11, iframe's display property should not be "block" */ 2460 }, 2461 /* -------------------- */ 2462 2463 2464 /* disables mouse-wheel when hovering specific elements like select, datalist etc. */ 2465 _disableMousewheel=function(el,target){ 2466 var tag=target.nodeName.toLowerCase(), 2467 tags=el.data(pluginPfx).opt.mouseWheel.disableOver, 2468 /* elements that require focus */ 2469 focusTags=["select","textarea"]; 2470 return $.inArray(tag,tags) > -1 && !($.inArray(tag,focusTags) > -1 && !$(target).is(":focus")); 2471 }, 2472 /* -------------------- */ 2473 2474 2475 /* 2476 DRAGGER RAIL CLICK EVENT 2477 scrolls content via dragger rail 2478 */ 2479 _draggerRail=function(){ 2480 var $this=$(this),d=$this.data(pluginPfx), 2481 namespace=pluginPfx+"_"+d.idx, 2482 mCSB_container=$("#mCSB_"+d.idx+"_container"), 2483 wrapper=mCSB_container.parent(), 2484 mCSB_draggerContainer=$(".mCSB_"+d.idx+"_scrollbar ."+classes[12]), 2485 clickable; 2486 mCSB_draggerContainer.bind("mousedown."+namespace+" touchstart."+namespace+" pointerdown."+namespace+" MSPointerDown."+namespace,function(e){ 2487 touchActive=true; 2488 if(!$(e.target).hasClass("mCSB_dragger")){clickable=1;} 2489 }).bind("touchend."+namespace+" pointerup."+namespace+" MSPointerUp."+namespace,function(e){ 2490 touchActive=false; 2491 }).bind("click."+namespace,function(e){ 2492 if(!clickable){return;} 2493 clickable=0; 2494 if($(e.target).hasClass(classes[12]) || $(e.target).hasClass("mCSB_draggerRail")){ 2495 _stop($this); 2496 var el=$(this),mCSB_dragger=el.find(".mCSB_dragger"); 2497 if(el.parent(".mCSB_scrollTools_horizontal").length>0){ 2498 if(!d.overflowed[1]){return;} 2499 var dir="x", 2500 clickDir=e.pageX>mCSB_dragger.offset().left ? -1 : 1, 2501 to=Math.abs(mCSB_container[0].offsetLeft)-(clickDir*(wrapper.width()*0.9)); 2502 }else{ 2503 if(!d.overflowed[0]){return;} 2504 var dir="y", 2505 clickDir=e.pageY>mCSB_dragger.offset().top ? -1 : 1, 2506 to=Math.abs(mCSB_container[0].offsetTop)-(clickDir*(wrapper.height()*0.9)); 2507 } 2508 _scrollTo($this,to.toString(),{dir:dir,scrollEasing:"mcsEaseInOut"}); 2509 } 2510 }); 2511 }, 2512 /* -------------------- */ 2513 2514 2515 /* 2516 FOCUS EVENT 2517 scrolls content via element focus (e.g. clicking an input, pressing TAB key etc.) 2518 */ 2519 _focus=function(){ 2520 var $this=$(this),d=$this.data(pluginPfx),o=d.opt, 2521 namespace=pluginPfx+"_"+d.idx, 2522 mCSB_container=$("#mCSB_"+d.idx+"_container"), 2523 wrapper=mCSB_container.parent(); 2524 mCSB_container.bind("focusin."+namespace,function(e){ 2525 var el=$(document.activeElement), 2526 nested=mCSB_container.find(".mCustomScrollBox").length, 2527 dur=0; 2528 if(!el.is(o.advanced.autoScrollOnFocus)){return;} 2529 _stop($this); 2530 clearTimeout($this[0]._focusTimeout); 2531 $this[0]._focusTimer=nested ? (dur+17)*nested : 0; 2532 $this[0]._focusTimeout=setTimeout(function(){ 2533 var to=[_childPos(el)[0],_childPos(el)[1]], 2534 contentPos=[mCSB_container[0].offsetTop,mCSB_container[0].offsetLeft], 2535 isVisible=[ 2536 (contentPos[0]+to[0]>=0 && contentPos[0]+to[0]<wrapper.height()-el.outerHeight(false)), 2537 (contentPos[1]+to[1]>=0 && contentPos[0]+to[1]<wrapper.width()-el.outerWidth(false)) 2538 ], 2539 overwrite=(o.axis==="yx" && !isVisible[0] && !isVisible[1]) ? "none" : "all"; 2540 if(o.axis!=="x" && !isVisible[0]){ 2541 _scrollTo($this,to[0].toString(),{dir:"y",scrollEasing:"mcsEaseInOut",overwrite:overwrite,dur:dur}); 2542 } 2543 if(o.axis!=="y" && !isVisible[1]){ 2544 _scrollTo($this,to[1].toString(),{dir:"x",scrollEasing:"mcsEaseInOut",overwrite:overwrite,dur:dur}); 2545 } 2546 },$this[0]._focusTimer); 2547 }); 2548 }, 2549 /* -------------------- */ 2550 2551 2552 /* sets content wrapper scrollTop/scrollLeft always to 0 */ 2553 _wrapperScroll=function(){ 2554 var $this=$(this),d=$this.data(pluginPfx), 2555 namespace=pluginPfx+"_"+d.idx, 2556 wrapper=$("#mCSB_"+d.idx+"_container").parent(); 2557 wrapper.bind("scroll."+namespace,function(e){ 2558 if(wrapper.scrollTop()!==0 || wrapper.scrollLeft()!==0){ 2559 $(".mCSB_"+d.idx+"_scrollbar").css("visibility","hidden"); /* hide scrollbar(s) */ 2560 } 2561 }); 2562 }, 2563 /* -------------------- */ 2564 2565 2566 /* 2567 BUTTONS EVENTS 2568 scrolls content via up, down, left and right buttons 2569 */ 2570 _buttons=function(){ 2571 var $this=$(this),d=$this.data(pluginPfx),o=d.opt,seq=d.sequential, 2572 namespace=pluginPfx+"_"+d.idx, 2573 sel=".mCSB_"+d.idx+"_scrollbar", 2574 btn=$(sel+">a"); 2575 btn.bind("contextmenu."+namespace,function(e){ 2576 e.preventDefault(); //prevent right click 2577 }).bind("mousedown."+namespace+" touchstart."+namespace+" pointerdown."+namespace+" MSPointerDown."+namespace+" mouseup."+namespace+" touchend."+namespace+" pointerup."+namespace+" MSPointerUp."+namespace+" mouseout."+namespace+" pointerout."+namespace+" MSPointerOut."+namespace+" click."+namespace,function(e){ 2578 e.preventDefault(); 2579 if(!_mouseBtnLeft(e)){return;} /* left mouse button only */ 2580 var btnClass=$(this).attr("class"); 2581 seq.type=o.scrollButtons.scrollType; 2582 switch(e.type){ 2583 case "mousedown": case "touchstart": case "pointerdown": case "MSPointerDown": 2584 if(seq.type==="stepped"){return;} 2585 touchActive=true; 2586 d.tweenRunning=false; 2587 _seq("on",btnClass); 2588 break; 2589 case "mouseup": case "touchend": case "pointerup": case "MSPointerUp": 2590 case "mouseout": case "pointerout": case "MSPointerOut": 2591 if(seq.type==="stepped"){return;} 2592 touchActive=false; 2593 if(seq.dir){_seq("off",btnClass);} 2594 break; 2595 case "click": 2596 if(seq.type!=="stepped" || d.tweenRunning){return;} 2597 _seq("on",btnClass); 2598 break; 2599 } 2600 function _seq(a,c){ 2601 seq.scrollAmount=o.scrollButtons.scrollAmount; 2602 _sequentialScroll($this,a,c); 2603 } 2604 }); 2605 }, 2606 /* -------------------- */ 2607 2608 2609 /* 2610 KEYBOARD EVENTS 2611 scrolls content via keyboard 2612 Keys: up arrow, down arrow, left arrow, right arrow, PgUp, PgDn, Home, End 2613 */ 2614 _keyboard=function(){ 2615 var $this=$(this),d=$this.data(pluginPfx),o=d.opt,seq=d.sequential, 2616 namespace=pluginPfx+"_"+d.idx, 2617 mCustomScrollBox=$("#mCSB_"+d.idx), 2618 mCSB_container=$("#mCSB_"+d.idx+"_container"), 2619 wrapper=mCSB_container.parent(), 2620 editables="input,textarea,select,datalist,keygen,[contenteditable='true']", 2621 iframe=mCSB_container.find("iframe"), 2622 events=["blur."+namespace+" keydown."+namespace+" keyup."+namespace]; 2623 if(iframe.length){ 2624 iframe.each(function(){ 2625 $(this).bind("load",function(){ 2626 /* bind events on accessible iframes */ 2627 if(_canAccessIFrame(this)){ 2628 $(this.contentDocument || this.contentWindow.document).bind(events[0],function(e){ 2629 _onKeyboard(e); 2630 }); 2631 } 2632 }); 2633 }); 2634 } 2635 mCustomScrollBox.attr("tabindex","0").bind(events[0],function(e){ 2636 _onKeyboard(e); 2637 }); 2638 function _onKeyboard(e){ 2639 switch(e.type){ 2640 case "blur": 2641 if(d.tweenRunning && seq.dir){_seq("off",null);} 2642 break; 2643 case "keydown": case "keyup": 2644 var code=e.keyCode ? e.keyCode : e.which,action="on"; 2645 if((o.axis!=="x" && (code===38 || code===40)) || (o.axis!=="y" && (code===37 || code===39))){ 2646 /* up (38), down (40), left (37), right (39) arrows */ 2647 if(((code===38 || code===40) && !d.overflowed[0]) || ((code===37 || code===39) && !d.overflowed[1])){return;} 2648 if(e.type==="keyup"){action="off";} 2649 if(!$(document.activeElement).is(editables)){ 2650 e.preventDefault(); 2651 e.stopImmediatePropagation(); 2652 _seq(action,code); 2653 } 2654 }else if(code===33 || code===34){ 2655 /* PgUp (33), PgDn (34) */ 2656 if(d.overflowed[0] || d.overflowed[1]){ 2657 e.preventDefault(); 2658 e.stopImmediatePropagation(); 2659 } 2660 if(e.type==="keyup"){ 2661 _stop($this); 2662 var keyboardDir=code===34 ? -1 : 1; 2663 if(o.axis==="x" || (o.axis==="yx" && d.overflowed[1] && !d.overflowed[0])){ 2664 var dir="x",to=Math.abs(mCSB_container[0].offsetLeft)-(keyboardDir*(wrapper.width()*0.9)); 2665 }else{ 2666 var dir="y",to=Math.abs(mCSB_container[0].offsetTop)-(keyboardDir*(wrapper.height()*0.9)); 2667 } 2668 _scrollTo($this,to.toString(),{dir:dir,scrollEasing:"mcsEaseInOut"}); 2669 } 2670 }else if(code===35 || code===36){ 2671 /* End (35), Home (36) */ 2672 if(!$(document.activeElement).is(editables)){ 2673 if(d.overflowed[0] || d.overflowed[1]){ 2674 e.preventDefault(); 2675 e.stopImmediatePropagation(); 2676 } 2677 if(e.type==="keyup"){ 2678 if(o.axis==="x" || (o.axis==="yx" && d.overflowed[1] && !d.overflowed[0])){ 2679 var dir="x",to=code===35 ? Math.abs(wrapper.width()-mCSB_container.outerWidth(false)) : 0; 2680 }else{ 2681 var dir="y",to=code===35 ? Math.abs(wrapper.height()-mCSB_container.outerHeight(false)) : 0; 2682 } 2683 _scrollTo($this,to.toString(),{dir:dir,scrollEasing:"mcsEaseInOut"}); 2684 } 2685 } 2686 } 2687 break; 2688 } 2689 function _seq(a,c){ 2690 seq.type=o.keyboard.scrollType; 2691 seq.scrollAmount=o.keyboard.scrollAmount; 2692 if(seq.type==="stepped" && d.tweenRunning){return;} 2693 _sequentialScroll($this,a,c); 2694 } 2695 } 2696 }, 2697 /* -------------------- */ 2698 2699 2700 /* scrolls content sequentially (used when scrolling via buttons, keyboard arrows etc.) */ 2701 _sequentialScroll=function(el,action,trigger,e,s){ 2702 var d=el.data(pluginPfx),o=d.opt,seq=d.sequential, 2703 mCSB_container=$("#mCSB_"+d.idx+"_container"), 2704 once=seq.type==="stepped" ? true : false, 2705 steplessSpeed=o.scrollInertia < 26 ? 26 : o.scrollInertia, /* 26/1.5=17 */ 2706 steppedSpeed=o.scrollInertia < 1 ? 17 : o.scrollInertia; 2707 switch(action){ 2708 case "on": 2709 seq.dir=[ 2710 (trigger===classes[16] || trigger===classes[15] || trigger===39 || trigger===37 ? "x" : "y"), 2711 (trigger===classes[13] || trigger===classes[15] || trigger===38 || trigger===37 ? -1 : 1) 2712 ]; 2713 _stop(el); 2714 if(_isNumeric(trigger) && seq.type==="stepped"){return;} 2715 _on(once); 2716 break; 2717 case "off": 2718 _off(); 2719 if(once || (d.tweenRunning && seq.dir)){ 2720 _on(true); 2721 } 2722 break; 2723 } 2724 2725 /* starts sequence */ 2726 function _on(once){ 2727 if(o.snapAmount){seq.scrollAmount=!(o.snapAmount instanceof Array) ? o.snapAmount : seq.dir[0]==="x" ? o.snapAmount[1] : o.snapAmount[0];} /* scrolling snapping */ 2728 var c=seq.type!=="stepped", /* continuous scrolling */ 2729 t=s ? s : !once ? 1000/60 : c ? steplessSpeed/1.5 : steppedSpeed, /* timer */ 2730 m=!once ? 2.5 : c ? 7.5 : 40, /* multiplier */ 2731 contentPos=[Math.abs(mCSB_container[0].offsetTop),Math.abs(mCSB_container[0].offsetLeft)], 2732 ratio=[d.scrollRatio.y>10 ? 10 : d.scrollRatio.y,d.scrollRatio.x>10 ? 10 : d.scrollRatio.x], 2733 amount=seq.dir[0]==="x" ? contentPos[1]+(seq.dir[1]*(ratio[1]*m)) : contentPos[0]+(seq.dir[1]*(ratio[0]*m)), 2734 px=seq.dir[0]==="x" ? contentPos[1]+(seq.dir[1]*parseInt(seq.scrollAmount)) : contentPos[0]+(seq.dir[1]*parseInt(seq.scrollAmount)), 2735 to=seq.scrollAmount!=="auto" ? px : amount, 2736 easing=e ? e : !once ? "mcsLinear" : c ? "mcsLinearOut" : "mcsEaseInOut", 2737 onComplete=!once ? false : true; 2738 if(once && t<17){ 2739 to=seq.dir[0]==="x" ? contentPos[1] : contentPos[0]; 2740 } 2741 _scrollTo(el,to.toString(),{dir:seq.dir[0],scrollEasing:easing,dur:t,onComplete:onComplete}); 2742 if(once){ 2743 seq.dir=false; 2744 return; 2745 } 2746 clearTimeout(seq.step); 2747 seq.step=setTimeout(function(){ 2748 _on(); 2749 },t); 2750 } 2751 /* stops sequence */ 2752 function _off(){ 2753 clearTimeout(seq.step); 2754 _delete(seq,"step"); 2755 _stop(el); 2756 } 2757 }, 2758 /* -------------------- */ 2759 2760 2761 /* returns a yx array from value */ 2762 _arr=function(val){ 2763 var o=$(this).data(pluginPfx).opt,vals=[]; 2764 if(typeof val==="function"){val=val();} /* check if the value is a single anonymous function */ 2765 /* check if value is object or array, its length and create an array with yx values */ 2766 if(!(val instanceof Array)){ /* object value (e.g. {y:"100",x:"100"}, 100 etc.) */ 2767 vals[0]=val.y ? val.y : val.x || o.axis==="x" ? null : val; 2768 vals[1]=val.x ? val.x : val.y || o.axis==="y" ? null : val; 2769 }else{ /* array value (e.g. [100,100]) */ 2770 vals=val.length>1 ? [val[0],val[1]] : o.axis==="x" ? [null,val[0]] : [val[0],null]; 2771 } 2772 /* check if array values are anonymous functions */ 2773 if(typeof vals[0]==="function"){vals[0]=vals[0]();} 2774 if(typeof vals[1]==="function"){vals[1]=vals[1]();} 2775 return vals; 2776 }, 2777 /* -------------------- */ 2778 2779 2780 /* translates values (e.g. "top", 100, "100px", "#id") to actual scroll-to positions */ 2781 _to=function(val,dir){ 2782 if(val==null || typeof val=="undefined"){return;} 2783 var $this=$(this),d=$this.data(pluginPfx),o=d.opt, 2784 mCSB_container=$("#mCSB_"+d.idx+"_container"), 2785 wrapper=mCSB_container.parent(), 2786 t=typeof val; 2787 if(!dir){dir=o.axis==="x" ? "x" : "y";} 2788 var contentLength=dir==="x" ? mCSB_container.outerWidth(false)-wrapper.width() : mCSB_container.outerHeight(false)-wrapper.height(), 2789 contentPos=dir==="x" ? mCSB_container[0].offsetLeft : mCSB_container[0].offsetTop, 2790 cssProp=dir==="x" ? "left" : "top"; 2791 switch(t){ 2792 case "function": /* this currently is not used. Consider removing it */ 2793 return val(); 2794 break; 2795 case "object": /* js/jquery object */ 2796 var obj=val.jquery ? val : $(val); 2797 if(!obj.length){return;} 2798 return dir==="x" ? _childPos(obj)[1] : _childPos(obj)[0]; 2799 break; 2800 case "string": case "number": 2801 if(_isNumeric(val)){ /* numeric value */ 2802 return Math.abs(val); 2803 }else if(val.indexOf("%")!==-1){ /* percentage value */ 2804 return Math.abs(contentLength*parseInt(val)/100); 2805 }else if(val.indexOf("-=")!==-1){ /* decrease value */ 2806 return Math.abs(contentPos-parseInt(val.split("-=")[1])); 2807 }else if(val.indexOf("+=")!==-1){ /* inrease value */ 2808 var p=(contentPos+parseInt(val.split("+=")[1])); 2809 return p>=0 ? 0 : Math.abs(p); 2810 }else if(val.indexOf("px")!==-1 && _isNumeric(val.split("px")[0])){ /* pixels string value (e.g. "100px") */ 2811 return Math.abs(val.split("px")[0]); 2812 }else{ 2813 if(val==="top" || val==="left"){ /* special strings */ 2814 return 0; 2815 }else if(val==="bottom"){ 2816 return Math.abs(wrapper.height()-mCSB_container.outerHeight(false)); 2817 }else if(val==="right"){ 2818 return Math.abs(wrapper.width()-mCSB_container.outerWidth(false)); 2819 }else if(val==="first" || val==="last"){ 2820 var obj=mCSB_container.find(":"+val); 2821 return dir==="x" ? _childPos(obj)[1] : _childPos(obj)[0]; 2822 }else{ 2823 if($(val).length){ /* jquery selector */ 2824 return dir==="x" ? _childPos($(val))[1] : _childPos($(val))[0]; 2825 }else{ /* other values (e.g. "100em") */ 2826 mCSB_container.css(cssProp,val); 2827 methods.update.call(null,$this[0]); 2828 return; 2829 } 2830 } 2831 } 2832 break; 2833 } 2834 }, 2835 /* -------------------- */ 2836 2837 2838 /* calls the update method automatically */ 2839 _autoUpdate=function(rem){ 2840 var $this=$(this),d=$this.data(pluginPfx),o=d.opt, 2841 mCSB_container=$("#mCSB_"+d.idx+"_container"); 2842 if(rem){ 2843 /* 2844 removes autoUpdate timer 2845 usage: _autoUpdate.call(this,"remove"); 2846 */ 2847 clearTimeout(mCSB_container[0].autoUpdate); 2848 _delete(mCSB_container[0],"autoUpdate"); 2849 return; 2850 } 2851 upd(); 2852 function upd(){ 2853 clearTimeout(mCSB_container[0].autoUpdate); 2854 if($this.parents("html").length===0){ 2855 /* check element in dom tree */ 2856 $this=null; 2857 return; 2858 } 2859 mCSB_container[0].autoUpdate=setTimeout(function(){ 2860 /* update on specific selector(s) length and size change */ 2861 if(o.advanced.updateOnSelectorChange){ 2862 d.poll.change.n=sizesSum(); 2863 if(d.poll.change.n!==d.poll.change.o){ 2864 d.poll.change.o=d.poll.change.n; 2865 doUpd(3); 2866 return; 2867 } 2868 } 2869 /* update on main element and scrollbar size changes */ 2870 if(o.advanced.updateOnContentResize){ 2871 d.poll.size.n=$this[0].scrollHeight+$this[0].scrollWidth+mCSB_container[0].offsetHeight+$this[0].offsetHeight+$this[0].offsetWidth; 2872 if(d.poll.size.n!==d.poll.size.o){ 2873 d.poll.size.o=d.poll.size.n; 2874 doUpd(1); 2875 return; 2876 } 2877 } 2878 /* update on image load */ 2879 if(o.advanced.updateOnImageLoad){ 2880 if(!(o.advanced.updateOnImageLoad==="auto" && o.axis==="y")){ //by default, it doesn't run on vertical content 2881 d.poll.img.n=mCSB_container.find("img").length; 2882 if(d.poll.img.n!==d.poll.img.o){ 2883 d.poll.img.o=d.poll.img.n; 2884 mCSB_container.find("img").each(function(){ 2885 imgLoader(this); 2886 }); 2887 return; 2888 } 2889 } 2890 } 2891 if(o.advanced.updateOnSelectorChange || o.advanced.updateOnContentResize || o.advanced.updateOnImageLoad){upd();} 2892 },o.advanced.autoUpdateTimeout); 2893 } 2894 /* a tiny image loader */ 2895 function imgLoader(el){ 2896 if($(el).hasClass(classes[2])){doUpd(); return;} 2897 var img=new Image(); 2898 function createDelegate(contextObject,delegateMethod){ 2899 return function(){return delegateMethod.apply(contextObject,arguments);} 2900 } 2901 function imgOnLoad(){ 2902 this.onload=null; 2903 $(el).addClass(classes[2]); 2904 doUpd(2); 2905 } 2906 img.onload=createDelegate(img,imgOnLoad); 2907 img.src=el.src; 2908 } 2909 /* returns the total height and width sum of all elements matching the selector */ 2910 function sizesSum(){ 2911 if(o.advanced.updateOnSelectorChange===true){o.advanced.updateOnSelectorChange="*";} 2912 var total=0,sel=mCSB_container.find(o.advanced.updateOnSelectorChange); 2913 if(o.advanced.updateOnSelectorChange && sel.length>0){sel.each(function(){total+=this.offsetHeight+this.offsetWidth;});} 2914 return total; 2915 } 2916 /* calls the update method */ 2917 function doUpd(cb){ 2918 clearTimeout(mCSB_container[0].autoUpdate); 2919 methods.update.call(null,$this[0],cb); 2920 } 2921 }, 2922 /* -------------------- */ 2923 2924 2925 /* snaps scrolling to a multiple of a pixels number */ 2926 _snapAmount=function(to,amount,offset){ 2927 return (Math.round(to/amount)*amount-offset); 2928 }, 2929 /* -------------------- */ 2930 2931 2932 /* stops content and scrollbar animations */ 2933 _stop=function(el){ 2934 var d=el.data(pluginPfx), 2935 sel=$("#mCSB_"+d.idx+"_container,#mCSB_"+d.idx+"_container_wrapper,#mCSB_"+d.idx+"_dragger_vertical,#mCSB_"+d.idx+"_dragger_horizontal"); 2936 sel.each(function(){ 2937 _stopTween.call(this); 2938 }); 2939 }, 2940 /* -------------------- */ 2941 2942 2943 /* 2944 ANIMATES CONTENT 2945 This is where the actual scrolling happens 2946 */ 2947 _scrollTo=function(el,to,options){ 2948 var d=el.data(pluginPfx),o=d.opt, 2949 defaults={ 2950 trigger:"internal", 2951 dir:"y", 2952 scrollEasing:"mcsEaseOut", 2953 drag:false, 2954 dur:o.scrollInertia, 2955 overwrite:"all", 2956 callbacks:true, 2957 onStart:true, 2958 onUpdate:true, 2959 onComplete:true 2960 }, 2961 options=$.extend(defaults,options), 2962 dur=[options.dur,(options.drag ? 0 : options.dur)], 2963 mCustomScrollBox=$("#mCSB_"+d.idx), 2964 mCSB_container=$("#mCSB_"+d.idx+"_container"), 2965 wrapper=mCSB_container.parent(), 2966 totalScrollOffsets=o.callbacks.onTotalScrollOffset ? _arr.call(el,o.callbacks.onTotalScrollOffset) : [0,0], 2967 totalScrollBackOffsets=o.callbacks.onTotalScrollBackOffset ? _arr.call(el,o.callbacks.onTotalScrollBackOffset) : [0,0]; 2968 d.trigger=options.trigger; 2969 if(wrapper.scrollTop()!==0 || wrapper.scrollLeft()!==0){ /* always reset scrollTop/Left */ 2970 $(".mCSB_"+d.idx+"_scrollbar").css("visibility","visible"); 2971 wrapper.scrollTop(0).scrollLeft(0); 2972 } 2973 if(to==="_resetY" && !d.contentReset.y){ 2974 /* callbacks: onOverflowYNone */ 2975 if(_cb("onOverflowYNone")){o.callbacks.onOverflowYNone.call(el[0]);} 2976 d.contentReset.y=1; 2977 } 2978 if(to==="_resetX" && !d.contentReset.x){ 2979 /* callbacks: onOverflowXNone */ 2980 if(_cb("onOverflowXNone")){o.callbacks.onOverflowXNone.call(el[0]);} 2981 d.contentReset.x=1; 2982 } 2983 if(to==="_resetY" || to==="_resetX"){return;} 2984 if((d.contentReset.y || !el[0].mcs) && d.overflowed[0]){ 2985 /* callbacks: onOverflowY */ 2986 if(_cb("onOverflowY")){o.callbacks.onOverflowY.call(el[0]);} 2987 d.contentReset.x=null; 2988 } 2989 if((d.contentReset.x || !el[0].mcs) && d.overflowed[1]){ 2990 /* callbacks: onOverflowX */ 2991 if(_cb("onOverflowX")){o.callbacks.onOverflowX.call(el[0]);} 2992 d.contentReset.x=null; 2993 } 2994 if(o.snapAmount){ /* scrolling snapping */ 2995 var snapAmount=!(o.snapAmount instanceof Array) ? o.snapAmount : options.dir==="x" ? o.snapAmount[1] : o.snapAmount[0]; 2996 to=_snapAmount(to,snapAmount,o.snapOffset); 2997 } 2998 switch(options.dir){ 2999 case "x": 3000 var mCSB_dragger=$("#mCSB_"+d.idx+"_dragger_horizontal"), 3001 property="left", 3002 contentPos=mCSB_container[0].offsetLeft, 3003 limit=[ 3004 mCustomScrollBox.width()-mCSB_container.outerWidth(false), 3005 mCSB_dragger.parent().width()-mCSB_dragger.width() 3006 ], 3007 scrollTo=[to,to===0 ? 0 : (to/d.scrollRatio.x)], 3008 tso=totalScrollOffsets[1], 3009 tsbo=totalScrollBackOffsets[1], 3010 totalScrollOffset=tso>0 ? tso/d.scrollRatio.x : 0, 3011 totalScrollBackOffset=tsbo>0 ? tsbo/d.scrollRatio.x : 0; 3012 break; 3013 case "y": 3014 var mCSB_dragger=$("#mCSB_"+d.idx+"_dragger_vertical"), 3015 property="top", 3016 contentPos=mCSB_container[0].offsetTop, 3017 limit=[ 3018 mCustomScrollBox.height()-mCSB_container.outerHeight(false), 3019 mCSB_dragger.parent().height()-mCSB_dragger.height() 3020 ], 3021 scrollTo=[to,to===0 ? 0 : (to/d.scrollRatio.y)], 3022 tso=totalScrollOffsets[0], 3023 tsbo=totalScrollBackOffsets[0], 3024 totalScrollOffset=tso>0 ? tso/d.scrollRatio.y : 0, 3025 totalScrollBackOffset=tsbo>0 ? tsbo/d.scrollRatio.y : 0; 3026 break; 3027 } 3028 if(scrollTo[1]<0 || (scrollTo[0]===0 && scrollTo[1]===0)){ 3029 scrollTo=[0,0]; 3030 }else if(scrollTo[1]>=limit[1]){ 3031 scrollTo=[limit[0],limit[1]]; 3032 }else{ 3033 scrollTo[0]=-scrollTo[0]; 3034 } 3035 if(!el[0].mcs){ 3036 _mcs(); /* init mcs object (once) to make it available before callbacks */ 3037 if(_cb("onInit")){o.callbacks.onInit.call(el[0]);} /* callbacks: onInit */ 3038 } 3039 clearTimeout(mCSB_container[0].onCompleteTimeout); 3040 _tweenTo(mCSB_dragger[0],property,Math.round(scrollTo[1]),dur[1],options.scrollEasing); 3041 if(!d.tweenRunning && ((contentPos===0 && scrollTo[0]>=0) || (contentPos===limit[0] && scrollTo[0]<=limit[0]))){return;} 3042 _tweenTo(mCSB_container[0],property,Math.round(scrollTo[0]),dur[0],options.scrollEasing,options.overwrite,{ 3043 onStart:function(){ 3044 if(options.callbacks && options.onStart && !d.tweenRunning){ 3045 /* callbacks: onScrollStart */ 3046 if(_cb("onScrollStart")){_mcs(); o.callbacks.onScrollStart.call(el[0]);} 3047 d.tweenRunning=true; 3048 _onDragClasses(mCSB_dragger); 3049 d.cbOffsets=_cbOffsets(); 3050 } 3051 },onUpdate:function(){ 3052 if(options.callbacks && options.onUpdate){ 3053 /* callbacks: whileScrolling */ 3054 if(_cb("whileScrolling")){_mcs(); o.callbacks.whileScrolling.call(el[0]);} 3055 } 3056 },onComplete:function(){ 3057 if(options.callbacks && options.onComplete){ 3058 if(o.axis==="yx"){clearTimeout(mCSB_container[0].onCompleteTimeout);} 3059 var t=mCSB_container[0].idleTimer || 0; 3060 mCSB_container[0].onCompleteTimeout=setTimeout(function(){ 3061 /* callbacks: onScroll, onTotalScroll, onTotalScrollBack */ 3062 if(_cb("onScroll")){_mcs(); o.callbacks.onScroll.call(el[0]);} 3063 if(_cb("onTotalScroll") && scrollTo[1]>=limit[1]-totalScrollOffset && d.cbOffsets[0]){_mcs(); o.callbacks.onTotalScroll.call(el[0]);} 3064 if(_cb("onTotalScrollBack") && scrollTo[1]<=totalScrollBackOffset && d.cbOffsets[1]){_mcs(); o.callbacks.onTotalScrollBack.call(el[0]);} 3065 d.tweenRunning=false; 3066 mCSB_container[0].idleTimer=0; 3067 _onDragClasses(mCSB_dragger,"hide"); 3068 },t); 3069 } 3070 } 3071 }); 3072 /* checks if callback function exists */ 3073 function _cb(cb){ 3074 return d && o.callbacks[cb] && typeof o.callbacks[cb]==="function"; 3075 } 3076 /* checks whether callback offsets always trigger */ 3077 function _cbOffsets(){ 3078 return [o.callbacks.alwaysTriggerOffsets || contentPos>=limit[0]+tso,o.callbacks.alwaysTriggerOffsets || contentPos<=-tsbo]; 3079 } 3080 /* 3081 populates object with useful values for the user 3082 values: 3083 content: this.mcs.content 3084 content top position: this.mcs.top 3085 content left position: this.mcs.left 3086 dragger top position: this.mcs.draggerTop 3087 dragger left position: this.mcs.draggerLeft 3088 scrolling y percentage: this.mcs.topPct 3089 scrolling x percentage: this.mcs.leftPct 3090 scrolling direction: this.mcs.direction 3091 */ 3092 function _mcs(){ 3093 var cp=[mCSB_container[0].offsetTop,mCSB_container[0].offsetLeft], /* content position */ 3094 dp=[mCSB_dragger[0].offsetTop,mCSB_dragger[0].offsetLeft], /* dragger position */ 3095 cl=[mCSB_container.outerHeight(false),mCSB_container.outerWidth(false)], /* content length */ 3096 pl=[mCustomScrollBox.height(),mCustomScrollBox.width()]; /* content parent length */ 3097 el[0].mcs={ 3098 content:mCSB_container, /* original content wrapper as jquery object */ 3099 top:cp[0],left:cp[1],draggerTop:dp[0],draggerLeft:dp[1], 3100 topPct:Math.round((100*Math.abs(cp[0]))/(Math.abs(cl[0])-pl[0])),leftPct:Math.round((100*Math.abs(cp[1]))/(Math.abs(cl[1])-pl[1])), 3101 direction:options.dir 3102 }; 3103 /* 3104 this refers to the original element containing the scrollbar(s) 3105 usage: this.mcs.top, this.mcs.leftPct etc. 3106 */ 3107 } 3108 }, 3109 /* -------------------- */ 3110 3111 3112 /* 3113 CUSTOM JAVASCRIPT ANIMATION TWEEN 3114 Lighter and faster than jquery animate() and css transitions 3115 Animates top/left properties and includes easings 3116 */ 3117 _tweenTo=function(el,prop,to,duration,easing,overwrite,callbacks){ 3118 if(!el._mTween){el._mTween={top:{},left:{}};} 3119 var callbacks=callbacks || {}, 3120 onStart=callbacks.onStart || function(){},onUpdate=callbacks.onUpdate || function(){},onComplete=callbacks.onComplete || function(){}, 3121 startTime=_getTime(),_delay,progress=0,from=el.offsetTop,elStyle=el.style,_request,tobj=el._mTween[prop]; 3122 if(prop==="left"){from=el.offsetLeft;} 3123 var diff=to-from; 3124 tobj.stop=0; 3125 if(overwrite!=="none"){_cancelTween();} 3126 _startTween(); 3127 function _step(){ 3128 if(tobj.stop){return;} 3129 if(!progress){onStart.call();} 3130 progress=_getTime()-startTime; 3131 _tween(); 3132 if(progress>=tobj.time){ 3133 tobj.time=(progress>tobj.time) ? progress+_delay-(progress-tobj.time) : progress+_delay-1; 3134 if(tobj.time<progress+1){tobj.time=progress+1;} 3135 } 3136 if(tobj.time<duration){tobj.id=_request(_step);}else{onComplete.call();} 3137 } 3138 function _tween(){ 3139 if(duration>0){ 3140 tobj.currVal=_ease(tobj.time,from,diff,duration,easing); 3141 elStyle[prop]=Math.round(tobj.currVal)+"px"; 3142 }else{ 3143 elStyle[prop]=to+"px"; 3144 } 3145 onUpdate.call(); 3146 } 3147 function _startTween(){ 3148 _delay=1000/60; 3149 tobj.time=progress+_delay; 3150 _request=(!window.requestAnimationFrame) ? function(f){_tween(); return setTimeout(f,0.01);} : window.requestAnimationFrame; 3151 tobj.id=_request(_step); 3152 } 3153 function _cancelTween(){ 3154 if(tobj.id==null){return;} 3155 if(!window.requestAnimationFrame){clearTimeout(tobj.id); 3156 }else{window.cancelAnimationFrame(tobj.id);} 3157 tobj.id=null; 3158 } 3159 function _ease(t,b,c,d,type){ 3160 switch(type){ 3161 case "linear": case "mcsLinear": 3162 return c*t/d + b; 3163 break; 3164 case "mcsLinearOut": 3165 t/=d; t--; return c * Math.sqrt(1 - t*t) + b; 3166 break; 3167 case "easeInOutSmooth": 3168 t/=d/2; 3169 if(t<1) return c/2*t*t + b; 3170 t--; 3171 return -c/2 * (t*(t-2) - 1) + b; 3172 break; 3173 case "easeInOutStrong": 3174 t/=d/2; 3175 if(t<1) return c/2 * Math.pow( 2, 10 * (t - 1) ) + b; 3176 t--; 3177 return c/2 * ( -Math.pow( 2, -10 * t) + 2 ) + b; 3178 break; 3179 case "easeInOut": case "mcsEaseInOut": 3180 t/=d/2; 3181 if(t<1) return c/2*t*t*t + b; 3182 t-=2; 3183 return c/2*(t*t*t + 2) + b; 3184 break; 3185 case "easeOutSmooth": 3186 t/=d; t--; 3187 return -c * (t*t*t*t - 1) + b; 3188 break; 3189 case "easeOutStrong": 3190 return c * ( -Math.pow( 2, -10 * t/d ) + 1 ) + b; 3191 break; 3192 case "easeOut": case "mcsEaseOut": default: 3193 var ts=(t/=d)*t,tc=ts*t; 3194 return b+c*(0.499999999999997*tc*ts + -2.5*ts*ts + 5.5*tc + -6.5*ts + 4*t); 3195 } 3196 } 3197 }, 3198 /* -------------------- */ 3199 3200 3201 /* returns current time */ 3202 _getTime=function(){ 3203 if(window.performance && window.performance.now){ 3204 return window.performance.now(); 3205 }else{ 3206 if(window.performance && window.performance.webkitNow){ 3207 return window.performance.webkitNow(); 3208 }else{ 3209 if(Date.now){return Date.now();}else{return new Date().getTime();} 3210 } 3211 } 3212 }, 3213 /* -------------------- */ 3214 3215 3216 /* stops a tween */ 3217 _stopTween=function(){ 3218 var el=this; 3219 if(!el._mTween){el._mTween={top:{},left:{}};} 3220 var props=["top","left"]; 3221 for(var i=0; i<props.length; i++){ 3222 var prop=props[i]; 3223 if(el._mTween[prop].id){ 3224 if(!window.requestAnimationFrame){clearTimeout(el._mTween[prop].id); 3225 }else{window.cancelAnimationFrame(el._mTween[prop].id);} 3226 el._mTween[prop].id=null; 3227 el._mTween[prop].stop=1; 3228 } 3229 } 3230 }, 3231 /* -------------------- */ 3232 3233 3234 /* deletes a property (avoiding the exception thrown by IE) */ 3235 _delete=function(c,m){ 3236 try{delete c[m];}catch(e){c[m]=null;} 3237 }, 3238 /* -------------------- */ 3239 3240 3241 /* detects left mouse button */ 3242 _mouseBtnLeft=function(e){ 3243 return !(e.which && e.which!==1); 3244 }, 3245 /* -------------------- */ 3246 3247 3248 /* detects if pointer type event is touch */ 3249 _pointerTouch=function(e){ 3250 var t=e.originalEvent.pointerType; 3251 return !(t && t!=="touch" && t!==2); 3252 }, 3253 /* -------------------- */ 3254 3255 3256 /* checks if value is numeric */ 3257 _isNumeric=function(val){ 3258 return !isNaN(parseFloat(val)) && isFinite(val); 3259 }, 3260 /* -------------------- */ 3261 3262 3263 /* returns element position according to content */ 3264 _childPos=function(el){ 3265 var p=el.parents(".mCSB_container"); 3266 return [el.offset().top-p.offset().top,el.offset().left-p.offset().left]; 3267 }, 3268 /* -------------------- */ 3269 3270 3271 /* checks if browser tab is hidden/inactive via Page Visibility API */ 3272 _isTabHidden=function(){ 3273 var prop=_getHiddenProp(); 3274 if(!prop) return false; 3275 return document[prop]; 3276 function _getHiddenProp(){ 3277 var pfx=["webkit","moz","ms","o"]; 3278 if("hidden" in document) return "hidden"; //natively supported 3279 for(var i=0; i<pfx.length; i++){ //prefixed 3280 if((pfx[i]+"Hidden") in document) 3281 return pfx[i]+"Hidden"; 3282 } 3283 return null; //not supported 3284 } 3285 }; 3286 /* -------------------- */ 3287 3288 3289 3290 3291 3292 /* 3293 ---------------------------------------- 3294 PLUGIN SETUP 3295 ---------------------------------------- 3296 */ 3297 3298 /* plugin constructor functions */ 3299 $.fn[pluginNS]=function(method){ /* usage: $(selector).mCustomScrollbar(); */ 3300 if(methods[method]){ 3301 return methods[method].apply(this,Array.prototype.slice.call(arguments,1)); 3302 }else if(typeof method==="object" || !method){ 3303 return methods.init.apply(this,arguments); 3304 }else{ 3305 $.error("Method "+method+" does not exist"); 3306 } 3307 }; 3308 $[pluginNS]=function(method){ /* usage: $.mCustomScrollbar(); */ 3309 if(methods[method]){ 3310 return methods[method].apply(this,Array.prototype.slice.call(arguments,1)); 3311 }else if(typeof method==="object" || !method){ 3312 return methods.init.apply(this,arguments); 3313 }else{ 3314 $.error("Method "+method+" does not exist"); 3315 } 3316 }; 3317 3318 /* 3319 allow setting plugin default options. 3320 usage: $.mCustomScrollbar.defaults.scrollInertia=500; 3321 to apply any changed default options on default selectors (below), use inside document ready fn 3322 e.g.: $(document).ready(function(){ $.mCustomScrollbar.defaults.scrollInertia=500; }); 3323 */ 3324 $[pluginNS].defaults=defaults; 3325 3326 /* 3327 add window object (window.mCustomScrollbar) 3328 usage: if(window.mCustomScrollbar){console.log("custom scrollbar plugin loaded");} 3329 */ 3330 window[pluginNS]=true; 3331 3332 $(window).bind("load",function(){ 3333 3334 $(defaultSelector)[pluginNS](); /* add scrollbars automatically on default selector */ 3335 3336 /* extend jQuery expressions */ 3337 $.extend($.expr[":"],{ 3338 /* checks if element is within scrollable viewport */ 3339 mcsInView:$.expr[":"].mcsInView || function(el){ 3340 var $el=$(el),content=$el.parents(".mCSB_container"),wrapper,cPos; 3341 if(!content.length){return;} 3342 wrapper=content.parent(); 3343 cPos=[content[0].offsetTop,content[0].offsetLeft]; 3344 return cPos[0]+_childPos($el)[0]>=0 && cPos[0]+_childPos($el)[0]<wrapper.height()-$el.outerHeight(false) && 3345 cPos[1]+_childPos($el)[1]>=0 && cPos[1]+_childPos($el)[1]<wrapper.width()-$el.outerWidth(false); 3346 }, 3347 /* checks if element or part of element is in view of scrollable viewport */ 3348 mcsInSight:$.expr[":"].mcsInSight || function(el,i,m){ 3349 var $el=$(el),elD,content=$el.parents(".mCSB_container"),wrapperView,pos,wrapperViewPct, 3350 pctVals=m[3]==="exact" ? [[1,0],[1,0]] : [[0.9,0.1],[0.6,0.4]]; 3351 if(!content.length){return;} 3352 elD=[$el.outerHeight(false),$el.outerWidth(false)]; 3353 pos=[content[0].offsetTop+_childPos($el)[0],content[0].offsetLeft+_childPos($el)[1]]; 3354 wrapperView=[content.parent()[0].offsetHeight,content.parent()[0].offsetWidth]; 3355 wrapperViewPct=[elD[0]<wrapperView[0] ? pctVals[0] : pctVals[1],elD[1]<wrapperView[1] ? pctVals[0] : pctVals[1]]; 3356 return pos[0]-(wrapperView[0]*wrapperViewPct[0][0])<0 && pos[0]+elD[0]-(wrapperView[0]*wrapperViewPct[0][1])>=0 && 3357 pos[1]-(wrapperView[1]*wrapperViewPct[1][0])<0 && pos[1]+elD[1]-(wrapperView[1]*wrapperViewPct[1][1])>=0; 3358 }, 3359 /* checks if element is overflowed having visible scrollbar(s) */ 3360 mcsOverflow:$.expr[":"].mcsOverflow || function(el){ 3361 var d=$(el).data(pluginPfx); 3362 if(!d){return;} 3363 return d.overflowed[0] || d.overflowed[1]; 3364 } 3365 }); 3366 3367 }); 3368 3369}))}));
3369
vendor: 15,553 bytes, lines 3370-3882
3370(function() { 3371 var MutationObserver, Util, WeakMap, getComputedStyle, getComputedStyleRX, 3372 bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }, 3373 indexOf = [].indexOf || function(item) { for (var i = 0, l = this.length; i < l; i++) { if (i in this && this[i] === item) return i; } return -1; }; 3374 3375 Util = (function() { 3376 function Util() {} 3377 3378 Util.prototype.extend = function(custom, defaults) { 3379 var key, value; 3380 for (key in defaults) { 3381 value = defaults[key]; 3382 if (custom[key] == null) { 3383 custom[key] = value; 3384 } 3385 } 3386 return custom; 3387 }; 3388 3389 Util.prototype.isMobile = function(agent) { 3390 return /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(agent); 3391 }; 3392 3393 Util.prototype.createEvent = function(event, bubble, cancel, detail) { 3394 var customEvent; 3395 if (bubble == null) { 3396 bubble = false; 3397 } 3398 if (cancel == null) { 3399 cancel = false; 3400 } 3401 if (detail == null) { 3402 detail = null; 3403 } 3404 if (document.createEvent != null) { 3405 customEvent = document.createEvent('CustomEvent'); 3406 customEvent.initCustomEvent(event, bubble, cancel, detail); 3407 } else if (document.createEventObject != null) { 3408 customEvent = document.createEventObject(); 3409 customEvent.eventType = event; 3410 } else { 3411 customEvent.eventName = event; 3412 } 3413 return customEvent; 3414 }; 3415 3416 Util.prototype.emitEvent = function(elem, event) { 3417 if (elem.dispatchEvent != null) { 3418 return elem.dispatchEvent(event); 3419 } else if (event in (elem != null)) { 3420 return elem[event](); 3421 } else if (("on" + event) in (elem != null)) { 3422 return elem["on" + event](); 3423 } 3424 }; 3425 3426 Util.prototype.addEvent = function(elem, event, fn) { 3427 if (elem.addEventListener != null) { 3428 return elem.addEventListener(event, fn, false); 3429 } else if (elem.attachEvent != null) { 3430 return elem.attachEvent("on" + event, fn); 3431 } else { 3432 return elem[event] = fn; 3433 } 3434 }; 3435 3436 Util.prototype.removeEvent = function(elem, event, fn) { 3437 if (elem.removeEventListener != null) { 3438 return elem.removeEventListener(event, fn, false); 3439 } else if (elem.detachEvent != null) { 3440 return elem.detachEvent("on" + event, fn); 3441 } else { 3442 return delete elem[event]; 3443 } 3444 }; 3445 3446 Util.prototype.innerHeight = function() { 3447 if ('innerHeight' in window) { 3448 return window.innerHeight; 3449 } else { 3450 return document.documentElement.clientHeight; 3451 } 3452 }; 3453 3454 return Util; 3455 3456 })(); 3457 3458 WeakMap = this.WeakMap || this.MozWeakMap || (WeakMap = (function() { 3459 function WeakMap() { 3460 this.keys = []; 3461 this.values = []; 3462 } 3463 3464 WeakMap.prototype.get = function(key) { 3465 var i, item, j, len, ref; 3466 ref = this.keys; 3467 for (i = j = 0, len = ref.length; j < len; i = ++j) { 3468 item = ref[i]; 3469 if (item === key) { 3470 return this.values[i]; 3471 } 3472 } 3473 }; 3474 3475 WeakMap.prototype.set = function(key, value) { 3476 var i, item, j, len, ref; 3477 ref = this.keys; 3478 for (i = j = 0, len = ref.length; j < len; i = ++j) { 3479 item = ref[i]; 3480 if (item === key) { 3481 this.values[i] = value; 3482 return; 3483 } 3484 } 3485 this.keys.push(key); 3486 return this.values.push(value); 3487 }; 3488 3489 return WeakMap; 3490 3491 })()); 3492 3493 MutationObserver = this.MutationObserver || this.WebkitMutationObserver || this.MozMutationObserver || (MutationObserver = (function() { 3494 function MutationObserver() { 3495 if (typeof console !== "undefined" && console !== null) { 3496 console.warn('MutationObserver is not supported by your browser.'); 3497 } 3498 if (typeof console !== "undefined" && console !== null) { 3499 console.warn('WOW.js cannot detect dom mutations, please call .sync() after loading new content.'); 3500 } 3501 } 3502 3503 MutationObserver.notSupported = true; 3504 3505 MutationObserver.prototype.observe = function() {}; 3506 3507 return MutationObserver; 3508 3509 })()); 3510 3511 getComputedStyle = this.getComputedStyle || function(el, pseudo) { 3512 this.getPropertyValue = function(prop) { 3513 var ref; 3514 if (prop === 'float') { 3515 prop = 'styleFloat'; 3516 } 3517 if (getComputedStyleRX.test(prop)) { 3518 prop.replace(getComputedStyleRX, function(_, _char) { 3519 return _char.toUpperCase(); 3520 }); 3521 } 3522 return ((ref = el.currentStyle) != null ? ref[prop] : void 0) || null; 3523 }; 3524 return this; 3525 }; 3526 3527 getComputedStyleRX = /(\-([a-z]){1})/g; 3528 3529 this.WOW = (function() { 3530 WOW.prototype.defaults = { 3531 boxClass: 'wow', 3532 animateClass: 'animated', 3533 offset: 0, 3534 mobile: true, 3535 live: true, 3536 callback: null, 3537 scrollContainer: null 3538 }; 3539 3540 function WOW(options) { 3541 if (options == null) { 3542 options = {}; 3543 } 3544 this.scrollCallback = bind(this.scrollCallback, this); 3545 this.scrollHandler = bind(this.scrollHandler, this); 3546 this.resetAnimation = bind(this.resetAnimation, this); 3547 this.start = bind(this.start, this); 3548 this.scrolled = true; 3549 this.config = this.util().extend(options, this.defaults); 3550 if (options.scrollContainer != null) { 3551 this.config.scrollContainer = document.querySelector(options.scrollContainer); 3552 } 3553 this.animationNameCache = new WeakMap(); 3554 this.wowEvent = this.util().createEvent(this.config.boxClass); 3555 } 3556 3557 WOW.prototype.init = function() { 3558 var ref; 3559 this.element = window.document.documentElement; 3560 if ((ref = document.readyState) === "interactive" || ref === "complete") { 3561 this.start(); 3562 } else { 3563 this.util().addEvent(document, 'DOMContentLoaded', this.start); 3564 } 3565 return this.finished = []; 3566 }; 3567 3568 WOW.prototype.start = function() { 3569 var box, j, len, ref; 3570 this.stopped = false; 3571 this.boxes = (function() { 3572 var j, len, ref, results; 3573 ref = this.element.querySelectorAll("." + this.config.boxClass); 3574 results = []; 3575 for (j = 0, len = ref.length; j < len; j++) { 3576 box = ref[j]; 3577 results.push(box); 3578 } 3579 return results; 3580 }).call(this); 3581 this.all = (function() { 3582 var j, len, ref, results; 3583 ref = this.boxes; 3584 results = []; 3585 for (j = 0, len = ref.length; j < len; j++) { 3586 box = ref[j]; 3587 results.push(box); 3588 } 3589 return results; 3590 }).call(this); 3591 if (this.boxes.length) { 3592 if (this.disabled()) { 3593 this.resetStyle(); 3594 } else { 3595 ref = this.boxes; 3596 for (j = 0, len = ref.length; j < len; j++) { 3597 box = ref[j]; 3598 this.applyStyle(box, true); 3599 } 3600 } 3601 } 3602 if (!this.disabled()) { 3603 this.util().addEvent(this.config.scrollContainer || window, 'scroll', this.scrollHandler); 3604 this.util().addEvent(window, 'resize', this.scrollHandler); 3605 this.interval = setInterval(this.scrollCallback, 50); 3606 } 3607 if (this.config.live) { 3608 return new MutationObserver((function(_this) { 3609 return function(records) { 3610 var k, len1, node, record, results; 3611 results = []; 3612 for (k = 0, len1 = records.length; k < len1; k++) { 3613 record = records[k]; 3614 results.push((function() { 3615 var l, len2, ref1, results1; 3616 ref1 = record.addedNodes || []; 3617 results1 = []; 3618 for (l = 0, len2 = ref1.length; l < len2; l++) { 3619 node = ref1[l]; 3620 results1.push(this.doSync(node)); 3621 } 3622 return results1; 3623 }).call(_this)); 3624 } 3625 return results; 3626 }; 3627 })(this)).observe(document.body, { 3628 childList: true, 3629 subtree: true 3630 }); 3631 } 3632 }; 3633 3634 WOW.prototype.stop = function() { 3635 this.stopped = true; 3636 this.util().removeEvent(this.config.scrollContainer || window, 'scroll', this.scrollHandler); 3637 this.util().removeEvent(window, 'resize', this.scrollHandler); 3638 if (this.interval != null) { 3639 return clearInterval(this.interval); 3640 } 3641 }; 3642 3643 WOW.prototype.sync = function(element) { 3644 if (MutationObserver.notSupported) { 3645 return this.doSync(this.element); 3646 } 3647 }; 3648 3649 WOW.prototype.doSync = function(element) { 3650 var box, j, len, ref, results; 3651 if (element == null) { 3652 element = this.element; 3653 } 3654 if (element.nodeType !== 1) { 3655 return; 3656 } 3657 element = element.parentNode || element; 3658 ref = element.querySelectorAll("." + this.config.boxClass); 3659 results = []; 3660 for (j = 0, len = ref.length; j < len; j++) { 3661 box = ref[j]; 3662 if (indexOf.call(this.all, box) < 0) { 3663 this.boxes.push(box); 3664 this.all.push(box); 3665 if (this.stopped || this.disabled()) { 3666 this.resetStyle(); 3667 } else { 3668 this.applyStyle(box, true); 3669 } 3670 results.push(this.scrolled = true); 3671 } else { 3672 results.push(void 0); 3673 } 3674 } 3675 return results; 3676 }; 3677 3678 WOW.prototype.show = function(box) { 3679 this.applyStyle(box); 3680 box.className = box.className + " " + this.config.animateClass; 3681 if (this.config.callback != null) { 3682 this.config.callback(box); 3683 } 3684 this.util().emitEvent(box, this.wowEvent); 3685 this.util().addEvent(box, 'animationend', this.resetAnimation); 3686 this.util().addEvent(box, 'oanimationend', this.resetAnimation); 3687 this.util().addEvent(box, 'webkitAnimationEnd', this.resetAnimation); 3688 this.util().addEvent(box, 'MSAnimationEnd', this.resetAnimation); 3689 return box; 3690 }; 3691 3692 WOW.prototype.applyStyle = function(box, hidden) { 3693 var delay, duration, iteration; 3694 duration = box.getAttribute('data-wow-duration'); 3695 delay = box.getAttribute('data-wow-delay'); 3696 iteration = box.getAttribute('data-wow-iteration'); 3697 return this.animate((function(_this) { 3698 return function() { 3699 return _this.customStyle(box, hidden, duration, delay, iteration); 3700 }; 3701 })(this)); 3702 }; 3703 3704 WOW.prototype.animate = (function() { 3705 if ('requestAnimationFrame' in window) { 3706 return function(callback) { 3707 return window.requestAnimationFrame(callback); 3708 }; 3709 } else { 3710 return function(callback) { 3711 return callback(); 3712 }; 3713 } 3714 })(); 3715 3716 WOW.prototype.resetStyle = function() { 3717 var box, j, len, ref, results; 3718 ref = this.boxes; 3719 results = []; 3720 for (j = 0, len = ref.length; j < len; j++) { 3721 box = ref[j]; 3722 results.push(box.style.visibility = 'visible'); 3723 } 3724 return results; 3725 }; 3726 3727 WOW.prototype.resetAnimation = function(event) { 3728 var target; 3729 if (event.type.toLowerCase().indexOf('animationend') >= 0) { 3730 target = event.target || event.srcElement; 3731 return target.className = target.className.replace(this.config.animateClass, '').trim(); 3732 } 3733 }; 3734 3735 WOW.prototype.customStyle = function(box, hidden, duration, delay, iteration) { 3736 if (hidden) { 3737 this.cacheAnimationName(box); 3738 } 3739 box.style.visibility = hidden ? 'hidden' : 'visible'; 3740 if (duration) { 3741 this.vendorSet(box.style, { 3742 animationDuration: duration 3743 }); 3744 } 3745 if (delay) { 3746 this.vendorSet(box.style, { 3747 animationDelay: delay 3748 }); 3749 } 3750 if (iteration) { 3751 this.vendorSet(box.style, { 3752 animationIterationCount: iteration 3753 }); 3754 } 3755 this.vendorSet(box.style, { 3756 animationName: hidden ? 'none' : this.cachedAnimationName(box) 3757 }); 3758 return box; 3759 }; 3760 3761 WOW.prototype.vendors = ["moz", "webkit"]; 3762 3763 WOW.prototype.vendorSet = function(elem, properties) { 3764 var name, results, value, vendor; 3765 results = []; 3766 for (name in properties) { 3767 value = properties[name]; 3768 elem["" + name] = value; 3769 results.push((function() { 3770 var j, len, ref, results1; 3771 ref = this.vendors; 3772 results1 = []; 3773 for (j = 0, len = ref.length; j < len; j++) { 3774 vendor = ref[j]; 3775 results1.push(elem["" + vendor + (name.charAt(0).toUpperCase()) + (name.substr(1))] = value); 3776 } 3777 return results1; 3778 }).call(this)); 3779 } 3780 return results; 3781 }; 3782 3783 WOW.prototype.vendorCSS = function(elem, property) { 3784 var j, len, ref, result, style, vendor; 3785 style = getComputedStyle(elem); 3786 result = style.getPropertyCSSValue(property); 3787 ref = this.vendors; 3788 for (j = 0, len = ref.length; j < len; j++) { 3789 vendor = ref[j]; 3790 result = result || style.getPropertyCSSValue("-" + vendor + "-" + property); 3791 } 3792 return result; 3793 }; 3794 3795 WOW.prototype.animationName = function(box) { 3796 var animationName, error; 3797 try { 3798 animationName = this.vendorCSS(box, 'animation-name').cssText; 3799 } catch (error) { 3800 animationName = getComputedStyle(box).getPropertyValue('animation-name'); 3801 } 3802 if (animationName === 'none') { 3803 return ''; 3804 } else { 3805 return animationName; 3806 } 3807 }; 3808 3809 WOW.prototype.cacheAnimationName = function(box) { 3810 return this.animationNameCache.set(box, this.animationName(box)); 3811 }; 3812 3813 WOW.prototype.cachedAnimationName = function(box) { 3814 return this.animationNameCache.get(box); 3815 }; 3816 3817 WOW.prototype.scrollHandler = function() { 3818 return this.scrolled = true; 3819 }; 3820 3821 WOW.prototype.scrollCallback = function() { 3822 var box; 3823 if (this.scrolled) { 3824 this.scrolled = false; 3825 this.boxes = (function() { 3826 var j, len, ref, results; 3827 ref = this.boxes; 3828 results = []; 3829 for (j = 0, len = ref.length; j < len; j++) { 3830 box = ref[j]; 3831 if (!(box)) { 3832 continue; 3833 } 3834 if (this.isVisible(box)) { 3835 this.show(box); 3836 continue; 3837 } 3838 results.push(box); 3839 } 3840 return results; 3841 }).call(this); 3842 if (!(this.boxes.length || this.config.live)) { 3843 return this.stop(); 3844 } 3845 } 3846 }; 3847 3848 WOW.prototype.offsetTop = function(element) { 3849 var top; 3850 while (element.offsetTop === void 0) { 3851 element = element.parentNode; 3852 } 3853 top = element.offsetTop; 3854 while (element = element.offsetParent) { 3855 top += element.offsetTop; 3856 } 3857 return top; 3858 }; 3859 3860 WOW.prototype.isVisible = function(box) { 3861 var bottom, offset, top, viewBottom, viewTop; 3862 offset = box.getAttribute('data-wow-offset') || this.config.offset; 3863 viewTop = (this.config.scrollContainer && this.config.scrollContainer.scrollTop) || window.pageYOffset; 3864 viewBottom = viewTop + Math.min(this.element.clientHeight, this.util().innerHeight()) - offset; 3865 top = this.offsetTop(box); 3866 bottom = top + box.clientHeight; 3867 return top <= viewBottom && bottom >= viewTop; 3868 }; 3869 3870 WOW.prototype.util = function() { 3871 return this._util != null ? this._util : this._util = new Util(); 3872 }; 3873 3874 WOW.prototype.disabled = function() { 3875 return !this.config.mobile && this.util().isMobile(navigator.userAgent); 3876 }; 3877 3878 return WOW; 3879 3880 })(); 3881 3882}).call(this);
3883 3884 3885 3886 3887new WOW().init(); 3888 3889 3890 3891/* https://animate.style/ */ 3892 3893 3894 3895 3896$(function(){ 3897 3898 if ($(document).scrollTop() > 0) { 3899 $("#top_go").fadeIn(300); 3900 } 3901 3902 if ($(document).scrollTop() < $(document).height()- $(window).height()) { 3903 $("#bottom_go").fadeIn(300); 3904 } 3905 3906}); 3907 3908 3909$(window).scroll(function() { 3910 3911 if ($(document).scrollTop() > 0) { 3912 $("#top_go").fadeIn(300); 3913 } 3914 3915 if ($(document).scrollTop() == 0) { 3916 $("#top_go").fadeOut(300); 3917 } 3918 3919 if ($(document).scrollTop() < $(document).height()- $(window).height()) { 3920 $("#bottom_go").fadeIn(300); 3921 } 3922 3923 if ($(document).scrollTop() == $(document).height()- $(window).height()) { 3924 $("#bottom_go").fadeOut(300); 3925 } 3926 3927}); 3928 3929 3930 3931$('#top_go').click(function(){ 3932 $('html, body').animate({scrollTop:0}, '300'); 3933}); 3934 3935$('#bottom_go').click(function(){ 3936 var bottomScrollV = $(document).height()- $(window).height(); 3937 $('html, body').animate({scrollTop:bottomScrollV}, '300'); 3938 3939}); 3940 3941 /** 3942 * 모ë°ì¼ì¼í몰 ì¬ë¼ì´ë©ë©ë´ */ 3943var aCategory = []; 3944$(document).ready(function(){ 3945 var methods = { 3946 aCategory : [], 3947 aSubCategory : {}, 3948 get: function() 3949 { 3950 $.ajax({ 3951 url : '/exec/front/Product/SubCategory', 3952 dataType: 'json', 3953 success: function(aData) { 3954 if (aData == null || aData == 'undefined') { 3955 methods.checkSub(); 3956 return; 3957 } 3958 for (var i=0; i<aData.length; i++) 3959 { 3960 var sParentCateNo = aData[i].parent_cate_no; 3961 var sCateNo = aData[i].cate_no; 3962 if (!methods.aSubCategory[sParentCateNo]) { 3963 methods.aSubCategory[sParentCateNo] = []; 3964 } 3965 if (!aCategory[sCateNo]) { 3966 aCategory[sCateNo] = []; 3967 } 3968 methods.aSubCategory[sParentCateNo].push( aData[i] ); 3969 aCategory[sCateNo] = aData[i]; 3970 } 3971 methods.checkSub(); 3972 methods.getMyCateList(); 3973 } 3974 }); 3975 }, 3976 getParam: function(sUrl, sKey) { 3977 if (typeof sUrl !== 'string') return; 3978 var aUrl = sUrl.split('?'); 3979 var sQueryString = aUrl[1]; 3980 var aParam = {}; 3981 if (sQueryString) { 3982 var aFields = sQueryString.split("&"); 3983 var aField = []; 3984 for (var i=0; i<aFields.length; i++) { 3985 aField = aFields[i].split('='); 3986 aParam[aField[0]] = aField[1]; 3987 } 3988 } 3989 return sKey ? aParam[sKey] : aParam; 3990 }, 3991 3992 show: function(overNode, iCateNo) { 3993 var oParentNode = overNode; 3994 var aHtml = []; 3995 var sMyCateList = localStorage.getItem("myCateList"); 3996 if (methods.aSubCategory[iCateNo] != undefined) { 3997 aHtml.push('<ul class="slideSubMenu">'); 3998 $(methods.aSubCategory[iCateNo]).each(function() { 3999 var sNextParentNo = this.cate_no; 4000 var sCateSelected = (checkInArray(sMyCateList, this.cate_no) == true) ? ' selected' : ''; 4001 if (methods.aSubCategory[sNextParentNo] == undefined) { 4002 aHtml.push('<li class="noChild" id="cate'+this.cate_no+'">'); 4003 var sHref = '/product/list.html'+this.param; 4004 } else { 4005 aHtml.push('<li id="cate'+this.cate_no+'">'); 4006 var sHref = '#none'; 4007 } 4008 aHtml.push('<a class="cate" href="/product/list.html'+this.param+'">'+this.name+'</a>'); 4009 if (methods.aSubCategory[sNextParentNo] != undefined) aHtml.push('<a href="'+sHref+'" class="view" cate="'+this.param+'" onclick="subMenuEvent(this);"><i class="xi-plus-min"></i><i class="xi-minus-min"></i></a>'); 4010 aHtml.push('<button type="button" class="icoBookmark'+sCateSelected+'" id="icoBookmark">ì¦ê²¨ì°¾ê¸° ì¶ê°</button>'); 4011 4012 if (methods.aSubCategory[sNextParentNo] != undefined) { 4013 aHtml.push('<ul>'); 4014 $(methods.aSubCategory[sNextParentNo]).each(function() { 4015 var sNextParentNo2 = this.cate_no; 4016 var sCateSelected = (checkInArray(sMyCateList, this.cate_no) == true) ? ' selected' : ''; 4017 if (methods.aSubCategory[sNextParentNo2] == undefined) { 4018 aHtml.push('<li class="noChild" id="cate'+this.cate_no+'">'); 4019 var sHref = '/product/list.html'+this.param; 4020 } else { 4021 aHtml.push('<li id="cate'+this.cate_no+'">'); 4022 var sHref = '#none'; 4023 } 4024 aHtml.push('<a class="cate" href="/product/list.html'+this.param+'">'+this.name+'</a>'); 4025 if (methods.aSubCategory[sNextParentNo] != undefined) aHtml.push('<a href="'+sHref+'" class="view" cate="'+this.param+'" onclick="subMenuEvent(this);"><i class="xi-plus-min"></i><i class="xi-minus-min"></i></a>'); 4026 aHtml.push('<button type="button" class="icoBookmark'+sCateSelected+'" id="icoBookmark">ì¦ê²¨ì°¾ê¸° ì¶ê°</button>'); 4027 4028 if (methods.aSubCategory[sNextParentNo2] != undefined) { 4029 aHtml.push('<ul>'); 4030 4031 $(methods.aSubCategory[sNextParentNo2]).each(function() { 4032 aHtml.push('<li class="noChild" id="cate'+this.cate_no+'">'); 4033 var sCateSelected = (checkInArray(sMyCateList, this.cate_no) == true) ? ' selected' : ''; 4034 aHtml.push('<a class="cate" href="/product/list.html'+this.param+'">'+this.name+'</a>'); 4035 aHtml.push('<button type="button" class="icoBookmark'+sCateSelected+'" id="icoBookmark">ì¦ê²¨ì°¾ê¸° ì¶ê°</button>'); 4036 aHtml.push('</li>'); 4037 }); 4038 aHtml.push('</ul>'); 4039 } 4040 aHtml.push('</li>'); 4041 }); 4042 aHtml.push('</ul>'); 4043 } 4044 aHtml.push('</li>'); 4045 }); 4046 aHtml.push('</ul>'); 4047 } 4048 $(oParentNode).append(aHtml.join('')); 4049 }, 4050 close: function() { 4051 $('.slideSubMenu').remove(); 4052 }, 4053 checkSub: function() { 4054 $('.view').each(function(){ 4055 var sParam = $(this).attr('cate'); 4056 if (!sParam) return; 4057 var iCateNo = Number(methods.getParam(sParam, 'cate_no')); 4058 var result = methods.aSubCategory[iCateNo]; 4059 if (result == undefined) { 4060 if ($(this).closest('#slideProjectList').length) { 4061 var sHref = '/product/project.html'+sParam; 4062 } else { 4063 var sHref = '/product/list.html'+sParam; 4064 } 4065 4066 $(this).attr('href', sHref); 4067 $(this).parent().attr('class', 'noChild'); 4068 } 4069 }); 4070 }, 4071 getMyCateList :function() { 4072 var sMyCateList = localStorage.getItem("myCateList"); 4073 if (sMyCateList != null && sMyCateList != "") { 4074 var aTempList = sMyCateList.split("|"); 4075 var aHtml = []; 4076 for (var i = 0; i < aTempList.length; i++) { 4077 if (aTempList[i] != "") { 4078 var iCateNo = aTempList[i]; 4079 var sCateName = aCategory[iCateNo].name; 4080 var sCateParam = aCategory[iCateNo].param; 4081 aHtml.push('<li id="bookmark'+iCateNo+'"><a href="/product/list.html'+sCateParam+'" book_mark="'+iCateNo+'">'+sCateName+'</a><button type="button" class="icoBookmark selected" onclick="setMyCateList('+iCateNo+');">ì¦ê²¨ì°¾ê¸° ìì </button></li>'); 4082 $("#cate"+iCateNo+" #icoBookmark").addClass("selected"); 4083 } 4084 } 4085 $('#bookmartCateArea').append('<ul>'+aHtml.join('')+'</ul>'); 4086 } 4087 chkMyCateList(); 4088 } 4089 }; 4090 4091 var offCover = { 4092 init : function() { 4093 $(function() { 4094 offCover.resize(); 4095 $(window).resize(function(){ 4096 offCover.resize(); 4097 }); 4098 }); 4099 }, 4100 resize : function(){ 4101 var height = $('body').height(); 4102 $('#container').css({'min-height':height}); 4103 } 4104 }; 4105 methods.get(); 4106 4107 offCover.init(); 4108 4109 4110 4111 $('#slideCateList li > a.view').click(function(e) { 4112 var sParam = $(this).attr('cate'); 4113 if (!sParam) return; 4114 var iCateNo = Number(methods.getParam(sParam, 'cate_no')); 4115 if ($(this).parent().attr('class') == 'xans-record- selected') { 4116 methods.close(); 4117 } else { 4118 if (!iCateNo) return; 4119 $('#aside #slideCateList li').removeClass('selected'); 4120 methods.close(); 4121 methods.show(this.parentNode, iCateNo); 4122 } 4123 }); 4124 4125 $('#aside ul a.view').click(function(e){ 4126 $(this).parent().find('li').removeClass('selected'); 4127 $(this).parent().toggleClass('selected'); 4128 if (!$(this).parent('li').hasClass('noChild')){ 4129 e.preventDefault(); 4130 } 4131 }); 4132
4133 $("#icoBookmark").live('click', function() { 4134 var sParam = $(this).parent().find('a').attr('cate'); 4135 if (!sParam) return; 4136 var iCateNo = Number(methods.getParam(sParam, 'cate_no')); 4137 setMyCateList(iCateNo, $(this)); 4138 }); 4139 4140 $('#slideCateList h2').click(function() { 4141 var oParentId = $(this).parent().attr('id'); 4142 if (oParentId == 'slideCateList' || oParentId == 'slideMultishopList' || oParentId == 'slideProjectList') { 4143 ($(this).attr('class') == 'selected') ? $(this).next().hide() : $(this).next().show(); 4144 } else if (oParentId == 'bookmarkCategory') { 4145 if ($(this).attr('class') == 'selected') { 4146 $(this).parent().find('#bookmarkEmpty').hide(); 4147 $(this).parent().find('#bookmartCateArea').hide(); 4148 } else { 4149 chkMyCateList(); 4150 $(this).parent().find('#bookmartCateArea').show(); 4151 } 4152 } 4153 $(this).toggleClass('selected'); 4154 }); 4155}); 4156function subMenuEvent(obj) { 4157 $(obj).parent().find('li').removeClass('selected'); 4158 $(obj).parent().toggleClass('selected'); 4159} 4160function setMyCateList(iCateNo, oObj) { 4161 $(oObj).toggleClass('selected'); 4162 var sMyCateList = localStorage.getItem("myCateList"); 4163 var aCateList = []; 4164 if (checkInArray(sMyCateList, iCateNo) == true) { 4165 var aTemp = sMyCateList.split("|"); 4166 for (var i = 0 ; i < aTemp.length ; i++) { 4167 if (aTemp[i] != iCateNo) { 4168 aCateList.push(aTemp[i]); 4169 } 4170 } 4171 var sCateList = aCateList.join('|'); 4172 localStorage.setItem("myCateList" , sCateList); 4173 $('#bookmartCateArea #bookmark'+iCateNo).remove(); 4174 if (aCateList.length == 0) { 4175 $('#bookmarkCategory #bookmartCateArea').find('ul').remove(); 4176 } 4177 $("#cate"+iCateNo+" > #icoBookmark").removeClass("selected"); 4178 } else { 4179 var sCateName = aCategory[iCateNo].name; 4180 var sCateParam = aCategory[iCateNo].param; 4181 var sHtml = ''; 4182 if (sMyCateList == null || sMyCateList == '') { 4183 sHtml = '<ul><li id="bookmark'+iCateNo+'"><a href="/product/list.html'+sCateParam+'" book_mark="'+iCateNo+'">'+sCateName+'</a><button type="button" class="icoBookmark selected" onclick="setMyCateList('+iCateNo+');">ì¦ê²¨ì°¾ê¸° ìì </button></li></ul>' 4184 $('#bookmarkCategory #bookmartCateArea').append(sHtml); 4185 } else { 4186 sHtml = '<li id="bookmark'+iCateNo+'"><a href="/product/list.html'+sCateParam+'" book_mark="'+iCateNo+'">'+sCateName+'</a><button type="button" class="icoBookmark selected" onclick="setMyCateList('+iCateNo+');">ì¦ê²¨ì°¾ê¸° ìì </button></li>' 4187 $('#bookmarkCategory #bookmartCateArea ul').append(sHtml); 4188 } 4189 $(this).addClass('selected'); 4190 if (sMyCateList == null || sMyCateList == '') { 4191 localStorage.setItem('myCateList' , iCateNo); 4192 } else { 4193 localStorage.setItem('myCateList' , sMyCateList + '|' + iCateNo); 4194 } 4195 } 4196 chkMyCateList(); 4197} 4198function checkInArray(sBookmarkList, iCateNo) { 4199 if (sBookmarkList == null) return false; 4200 var aBookmarkList = sBookmarkList.split("|"); 4201 for (var i = 0; i < aBookmarkList.length; i++) { 4202 if (aBookmarkList[i] == iCateNo) { 4203 return true; 4204 } 4205 } 4206 return false; 4207} 4208function chkMyCateList() { 4209 var sMyCateList = localStorage.getItem("myCateList"); 4210 if (sMyCateList == null || sMyCateList == '') { 4211 $('#bookmarkEmpty').show(); 4212 } else { 4213 $('#bookmarkEmpty').hide(); 4214 } 4215} 4216 4217 4218 4219 4220 $('#tab_bt_shop').click(function(){ 4221 if($(this).hasClass('onTabBt')){ 4222 return 0; 4223 }else{ 4224 $('#tab_bt_community').removeClass('onTabBt'); 4225 $('#side_community_list').css('display','none'); 4226 $(this).addClass('onTabBt'); 4227 $('#slideCateList').css('display','block'); 4228 } 4229 }); 4230 4231 4232 $('#tab_bt_community').click(function(){ 4233 if($(this).hasClass('onTabBt')){ 4234 return 0; 4235 }else{ 4236 $('#tab_bt_shop').removeClass('onTabBt'); 4237 $('#slideCateList').css('display','none'); 4238 $(this).addClass('onTabBt'); 4239 $('#side_community_list').css('display','block'); 4240 } 4241 }); 4242 4243 4244 4245 $(function(){ 4246 4247 4248 if($('#aside .wish_real').length){ 4249 const wish_real = $('#aside .wish_real').text(); 4250 const wish_count = wish_real.replace(/[^0-9]/g, ""); 4251 if(wish_count=="0"){ 4252 $('#aside .wish_count').css('display','none'); 4253 }else{ 4254 $('#aside .wish_count').css('display','inline-block'); 4255 } 4256 } 4257 4258 4259 }); 4260 4261 4262 4263 4264 $('body').on('DOMSubtreeModified', '#aside .wish_real', function(){ 4265 const wish_real = $('#aside .wish_real').text(); 4266 const wish_count = wish_real.replace(/[^0-9]/g, ""); 4267 if(wish_count=="0"){ 4268 $('#aside .wish_count').css('display','none'); 4269 }else{ 4270 $('#aside .wish_count').css('display','inline-block') 4271 $('#aside .wish_count').text(wish_count); 4272 } 4273 }); 4274 4275 4276 4277 4278$(function(){ 4279
4280 $("#fixed_recent_view_mid").mCustomScrollbar({ 4281 axis:"y", 4282 theme:"dark" 4283 }); 4284 4285 var windowW = $( window ).width(); 4286 if(windowW>1024){ 4287 $('#recent_viwe_bt').css('display','block'); 4288 } 4289 4290 $('#recent_viwe_bt').click(function(){ 4291 if($('#fixed_recent_view').hasClass('onState')){ 4292 $('#fixed_recent_view').removeClass('onState'); 4293 $('#fixed_recent_view').fadeOut(300); 4294 }else{ 4295 $('#fixed_recent_view').addClass('onState'); 4296 $('#fixed_recent_view').fadeIn(300); 4297 } 4298 }); 4299 4300 $('#fixed_recent_view_close').click(function(){ 4301 $('#fixed_recent_view').removeClass('onState'); 4302 $('#fixed_recent_view').fadeOut(300); 4303 }); 4304 4305 4306 4307 4308}); 4309 4310 4311 4312$( window ).resize( function() { 4313 4314 var windowW = $( window ).width(); 4315 if(windowW<1025){ 4316 $('#recent_viwe_bt').css('display','none'); 4317 if($('#fixed_recent_view').hasClass('onState')){ 4318 $('#fixed_recent_view').removeClass('onState'); 4319 $('#fixed_recent_view').fadeOut(300); 4320 } 4321 }else{ 4322 $('#recent_viwe_bt').css('display','block'); 4323 } 4324 4325}); 4326 4327
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.